boot image problems with npm-tcpip.so & dhcp.client

I’m hitting a wall while trying to make a network boot image for QNX
6.1.0A. The intention of the boot image is to load the kernel and
network drivers on a “diskless” workstation, and to mount the server’s
filesystem as the workstation’s, so the workstation has no local
filesystem except the floppy disk. I’d like the workstation to get its
IP address via DHCP. (If anybody has an example of such a build file,
I’d like to see it!)

When I include npm-tcpip.so in the build file’s file list, without
even running it in the startup-script
, the boot stops after “Press
Esc for alternate OS…”, with the cursor blinking after a line of
dots. When I comment out npm-tcpip.so, the boot completes without a
problem. (But lacking the services I want.)

When I include dhcp.client in the file list, again without running
it
, the “Press Esc for alternate OS…” line comes up, followed by a
bunch of dots, followed by the computer rebooting itself.

I can’t even get to the point of being able to test the network
software, because the boot won’t finish. Any help would be greatly
appreciated.

I based my build file (preliminary version below; search for “*****”)
on /boot/build/bios.nfs-ne2000.build and buildfile #3 from
http://qdn.qnx.com/articles/oct1901/Using_buildfiles2.html. The output
from mkifs is also attached.

Thanks in advance.

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
e-mail: dgoodger@atsautomation.com

############################################################

/boot/build/netfloppy:

[search=/bin:/usr/bin:/lib:/usr/lib:/sbin:/usr/sbin:/lib/dll:/boot/sys]

\

Bootstrap Script

================

[virtual=x86,bios +compress] boot = {
startup-bios -vv -Ndgoodger
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem procnto -vv
}

\

Startup Script

==============

[+script] startup-script = {

LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib:/dev/shmem:/x86/lib:/x86/d
ll
DL_DEBUG=1

Start up some consoles

devc-con -n9 &
reopen /dev/con1

display_msg ATS Advanced Systems QNX6.1 Network Boot Test

Fill kernel data structure with appropriate

system-specific values (IRQs, DMA channels, etc.).

seedres

Start the pci server

pci-bios &
waitfor /dev/pci

Some common servers

pipe &
mqueue &
devc-ser8250 &
devc-pty &

Start a debug server for debugging programs

waitfor /dev/ser1
[+session] pdebug /dev/ser1 &

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi-m
HOME=/

Start NIC driver with full TCP/IP stack.

io-net -del900 -ptcpip &

Configure NIC statically.

ifconfig en0 192.168.6.17 netmask 255.255.255.0

route add default 192.168.6.1

# Configure NIC with DHCP.

dhcp.client -h dgoodger -i en0 -u

if_up en0

mount odin’s root filesystem as local /

fs-nfs2 192.168.6.80:/ /

waitfor /dev/socket

io-net -del900 -pqnet &

waitfor /net/odin

Start a high priority shell just in case…

reopen /dev/con4
[pri=25 +session] ksh &

Start the main shell

reopen /dev/con1
[+session] ksh

[+session] login -p

/etc/system/sysinit

}

\

File List

=========

[perms=+r,+x]

Cheat and make the /temp point to the shared memory area…

[type=link] /tmp=/dev/shmem

Programs require the runtime linker (ldqnx.so) to be at a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

We use the C shared lib (which also contains the runtime linker)

libc.so

Just in case someone needs floating point…

fpemu.so.2

libsocket.so

#***** When npm-tcpip isuncommented, the boot stops after “Press Esc
#***** for alternate OS…” (cursor blinking after last “.”).
npm-tcpip.so

##npm-qnet.so
devn-el900.so

The files above this line can be shared by mutiple processes

[data=c]

# Executables must currently be below this line

# Include a console driver
devc-con

# Include pci server
pci-bios
seedres

# Use the "public domain korn shell" as the default shell "sh"
ksh
#[type=link] /bin/sh=/bin/ksh

#/etc/hosts=/etc/hosts
#/etc/termcap=/etc/termcap
#/etc/passwd=/etc/passwd
#/etc/group=/etc/group

pdebug
pipe
mqueue
devc-ser8250
devc-pty
io-net
ifconfig
route

#***** If uncommented, the computer automatically reboots
#***** after "Press Esc for alternate OS........", over & over.
#dhcp.client

if_up
fs-nfs2

# end of /boot/build/netfloppy
############################################################

############################################################
# output of mkifs:

mkifs -v build/netfloppy fs/netfloppy

  Offset   Size    Entry   Ramoff Target=Host
  400000    400        0      --- /boot/sys/bios.boot
  400400    100     ----      --- Startup-header
  400500   a408   402d08      --- /tmp/DAA524390
  40a508     5c     ----      --- Image-header
  40a564    5d4     ----      --- Image-directory
    ----    ---     ----      --- usr/lib/ldqnx.so.2=/proc/boot/libc.so
    ----    ---     ----      --- tmp=/dev/shmem
  40b000  36364 ff8330a0      --- proc/boot/procnto=/tmp/EAA524390
  441364    570     ----      --- proc/boot/startup-script=/tmp/CAA524390
  442000  4d000 b032b10b      --- proc/boot/libc.so.2=/lib/libc.so
    ----    ---     ----      --- proc/boot/libc.so=libc.so.2
  48f000   9000 b0300e94      --- proc/boot/fpemu.so.2=/lib/dll/fpemu.so.2
    ----    ---     ----      --- proc/boot/fpemu.so=fpemu.so.2
  498000  10000 b030308c      --- proc/boot/libsocket.so.2=/lib/libsocket.so
    ----    ---     ----      --- proc/boot/libsocket.so=libsocket.so.2
  4a8000  31000 b030842c      ---
proc/boot/npm-tcpip.so=/lib/dll/npm-tcpip.so
  4d9000   d000 b03021d4      ---
proc/boot/devn-el900.so=/lib/dll/devn-el900.so
  4e6000   beb4  8049454      --- proc/boot/devc-con=/sbin/devc-con
  4f2000   96cc  8048c88      --- proc/boot/pci-bios=/sbin/pci-bios
  4fc000   3080  8048730      --- proc/boot/seedres=/sbin/seedres
  500000  260aa  80497a8      --- proc/boot/ksh=/bin/ksh
  527000   80cc  8049198      --- proc/boot/pdebug=/usr/bin/pdebug
  530000   416c  8049210      --- proc/boot/pipe=/sbin/pipe
  535000   375c  8048e94      --- proc/boot/mqueue=/sbin/mqueue
  539000   7c0c  80493cc      --- proc/boot/devc-ser8250=/sbin/devc-ser8250
  541000   7a68  804937c      --- proc/boot/devc-pty=/sbin/devc-pty
  549000   db1c  8049954      --- proc/boot/io-net=/sbin/io-net
  557000   4acd  8048a60      --- proc/boot/ifconfig=/usr/bin/ifconfig
  55c000   557b  8048c58      --- proc/boot/route=/usr/bin/route
  562000   c553  80493f8      ---
proc/boot/dhcp.client=/usr/sbin/dhcp.client
  56f000   1b05  8048580      --- proc/boot/if_up=/usr/sbin/if_up
  571000   ecd7  804988c      --- proc/boot/fs-nfs2=/usr/sbin/fs-nfs2
  57fcd8      4     ----      --- Image-trailer

Sounds like the boot image is too big?

On Tue, 4 Dec 2001 17:42:25 -0500, “David Goodger” <dgoodger@atsautomation.com> wrote:

I’m hitting a wall while trying to make a network boot image for QNX

“Alex Cellarius” <acellarius@systems104-don’t-you-spam-me!.co.za> wrote in
message news:1103_1007544049@pentiumii…

Sounds like the boot image is too big?

That’s the clue I needed; thanks! Turns out I was using the wrong boot
loader. Applying “dinit” under QNX 6.1 solved that problem, allowing >640K
boot images.

Now on to debugging the boot script itself…

David Goodger, Systems Administrator & Programmer
Automation Tooling Systems Inc., Advanced Systems
e-mail: dgoodger@atsautomation.com

“Operating System Tech Support” <os@qnx.com> wrote in message
news:9uld05$lcv$1@nntp.qnx.com

Why do you mark the shared libs with a permission of executable?

-Adam

“[perms=+r,+x]” migrated to the top of the file list while I was struggling
to figure out what was going on. It’s probably not necessary even for the
executables.

Why do you mark the shared libs with a permission of executable?

-Adam

“David Goodger” <dgoodger@atsautomation.com> wrote in message
news:3c0d513e$1@ats2.sentex.ca

File List

=========

[perms=+r,+x]

Cheat and make the /temp point to the shared memory area…

[type=link] /tmp=/dev/shmem

Programs require the runtime linker (ldqnx.so) to be at a fixed location

[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

We use the C shared lib (which also contains the runtime linker)

libc.so

Just in case someone needs floating point…

fpemu.so.2

libsocket.so

#***** When npm-tcpip isuncommented, the boot stops after “Press Esc
#***** for alternate OS…” (cursor blinking after last “.”).
npm-tcpip.so

##npm-qnet.so
devn-el900.so

The files above this line can be shared by mutiple processes

[data=c]

Executables must currently be below this line

Include a console driver

devc-con[/quote]

>