build file... again.

Hi…

Here are two (modified) build files (for an Ampro PC104 with no pci bus
and no cd-rom but with a rotating eide hard disk):

  1. bios.ide.build produces an image file (.ifs) with size 9+Kb => does
    not boot.
    => It is my understanding that with rtp6.1 we can have larger (6+Kb)
    size image files? Then I wonder if you can perhaps spot what is wrong
    with the build file?

    \
  2. bios.ide2.build produces an image file with size 5.9Kb => boots.
    => the resulting *.ifs file from this build boots, but it complains
    with:
    io-blk: Failed to automount filesystem at ‘/’ can’t access shared
    library.
    What is wrong in this case? (Note: when I do mkifs -v bios.ide2.build
    boot.ifs, I can see that there are no errors generated). Which shared
    library is io-blk referring to?


    Thanks for your help…

Miguel.

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

bios.ide2.build (simple)

################################
[virtual=x86,bios +compress] boot = {
#startup-bios -Nmachine-name
startup-bios -s 64k
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/x86/lib:/x86/dll procnto
}
[+script] startup-script = {

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

populate the environment

seedres &
display_msg Booting Neutrino

Disk drivers (The default one and some fun others for your

pleasure…)
devb-eide blk automount=hd0t79:/ &
waitfor /bin 30

Start up some consoles

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to Neutrino on an PC compatible BIOS system

Some common servers

pipe &
mqueue &
devc-pty &

Start some extra shells on other consoles

reopen /dev/con2
[+session pri=10r] fesh &
reopen /dev/con3
[+session pri=10r] fesh &

Start a high priority shell just in case…

reopen /dev/con4
[+session pri=30r] fesh &

Start the main shell

reopen /dev/con1
[+session pri=10r] fesh &

[+session] login -p

}

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

[type=link] /dev/console=/dev/con1 # Redirect console messages for
syslog
[type=link] /dev/log = /dev/null
[type=link] /proc/dumper = /dev/null
#[type=link] /bin=/proc/boot # <== not needed when you have a real /bin

We use the “c” shared lib (which also contains the runtime linker)

libc.so
libm.so

Just incase someone needs floating point…

#fpemu.so

Include the hard disk files so we can access files on the disk

libcam.so
io-blk.so

filesystem required shared libs

cam-disk.so

The files above this line can be shared by mutiple processes

[data=c]
seedres

Executables must currently be below this line

#diskboot
devc-con # include the console driver
devb-fdc
devc-pty # include the pty driver
devb-eide # Include the eide driver.
pipe
mqueue
fesh # fat embedded shell
mount
ls
mkdir
more
cp
rm
##########

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

bios.ide.build (modified)

##################################
[virtual=x86,bios +compress] boot = {
#startup-bios -Nmachine-name
startup-bios -s 64k
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/x86/lib:/x86/dll procnto
}
[+script] startup-script = {

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

populate the environment

seedres &
display_msg Booting Neutrino

Disk drivers (The default one and some fun others for your

pleasure…)
devb-eide blk automount=hd0t79:/ &

Wait for a bin for the rest of the commands (up to 60 secs)

waitfor /bin 30

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg Welcome to Neutrino on an PC compatible BIOS system

Network drivers and filesystems

io-net -dsmc9000 -ptcpip &
waitfor /dev/socket
ifconfig en0 10.1.1.205 netmask 255.255.255.0 up
sleep 5
netmanager
sleep 2
mount -Tio-net -obind=ether npm-qnet.so

fs-nfs2 10.2:/usr/nto / 10.2:/ /usr/qnx4 &

Some common servers

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

Start a debug server for debugging programs

waitfor /dev/ser1 30
#[-session] pdebug /dev/ser1 &

Start some extra shells on other consoles

reopen /dev/con2
[+session pri=10r] fesh &
reopen /dev/con3
[+session pri=10r] fesh &

Start a high priority shell just in case…

reopen /dev/con4

[pri=25 +session] sh &

[+session pri=30r] fesh &

Start the main shell

reopen /dev/con1
[+session pri=10r] fesh &

[+session] login -p

}

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

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

Redirect console messages for syslog

[type=link] /dev/console=/dev/con1

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

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

[type=link] /dev/console=/dev/con1 # Redirect console messages for
syslog
[type=link] /dev/log = /dev/null
[type=link] /proc/dumper = /dev/null
#[type=link] /bin=/proc/boot # <== not needed when you have a real /bin

We use the “c” shared lib (which also contains the runtime linker)

libc.so
libm.so

Just incase someone needs floating point…

#fpemu.so

Include the socket library

libsocket.so

Include the hard disk files so we can access files on the disk

libcam.so
io-blk.so

filesystem required shared libs

cam-disk.so
fs-qnx4.so

Include the socket library

libsocket.so

devn-smc9000.so
npm-tcpip.so
npm-qnet.so

The files above this line can be shared by mutiple processes

[data=c]
seedres

Executables must currently be below this line

#diskboot
devc-con # include the console driver
devb-fdc
devc-pty # include the pty driver
devb-eide # Include the eide driver.
devc-ser8250 # serial prot driver

other

dinit
ifconfig
pipe
mqueue
fesh # fat embedded shell
mount
ls
mkdir
more
cp
rm
sleep
nicinfo
io-net # network driver
fs-nfs2 # NFS driver
inetd # NFS driver

##########

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Miguel Simon <simon@ou.edu> wrote:

  1. bios.ide.build produces an image file (.ifs) with size 9+Kb => does
    not boot.
    => It is my understanding that with rtp6.1 we can have larger (6+Kb)
    size image files? Then I wonder if you can perhaps spot what is wrong
    with the build file?

Neutrino images can be much larger than 9KB (kilobytes), in fact a few images
I have created are 2-3MB (megabytes) in size. The limitation is usually from
the hardware (or ROM monitor that loads the image) not being able to accept
images of large sizes.

  1. bios.ide2.build produces an image file with size 5.9Kb => boots.
    => the resulting *.ifs file from this build boots, but it complains
    with:
    io-blk: Failed to automount filesystem at ‘/’ can’t access shared
    library.
    What is wrong in this case? (Note: when I do mkifs -v bios.ide2.build
    boot.ifs, I can see that there are no errors generated). Which shared
    library is io-blk referring to?

Ensure when you do a mkifs -v it is infact pulling the files from the locations
you expect them to be pulled from. Verifiy that libc.so is libc.so.2 , and check
other libraries to ensure they are also the proper ones. The move from RTP 6.0
to RTP 6.1, had a change in libraries (GNU C to Dinkum C). To see what libs a
particular binary relies on you can do the following:

objdump -x | grep “NEEDED”

To list the needed libs for that binary.


-Adam
amallory@qnx.com

Thanks for your help…

Miguel.

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

bios.ide2.build (simple)

################################
[virtual=x86,bios +compress] boot = {
#startup-bios -Nmachine-name
startup-bios -s 64k
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/x86/lib:/x86/dll procnto
}
[+script] startup-script = {

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

populate the environment

seedres &
display_msg Booting Neutrino

Disk drivers (The default one and some fun others for your

pleasure…)
devb-eide blk automount=hd0t79:/ &
waitfor /bin 30

Start up some consoles

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to Neutrino on an PC compatible BIOS system

Some common servers

pipe &
mqueue &
devc-pty &

Start some extra shells on other consoles

reopen /dev/con2
[+session pri=10r] fesh &
reopen /dev/con3
[+session pri=10r] fesh &

Start a high priority shell just in case…

reopen /dev/con4
[+session pri=30r] fesh &

Start the main shell

reopen /dev/con1
[+session pri=10r] fesh &

[+session] login -p

}

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

[type=link] /dev/console=/dev/con1 # Redirect console messages for
syslog
[type=link] /dev/log = /dev/null
[type=link] /proc/dumper = /dev/null
#[type=link] /bin=/proc/boot # <== not needed when you have a real /bin

We use the “c” shared lib (which also contains the runtime linker)

libc.so
libm.so

Just incase someone needs floating point…

#fpemu.so

Include the hard disk files so we can access files on the disk

libcam.so
io-blk.so

filesystem required shared libs

cam-disk.so

The files above this line can be shared by mutiple processes

[data=c]
seedres

Executables must currently be below this line

#diskboot
devc-con # include the console driver
devb-fdc
devc-pty # include the pty driver
devb-eide # Include the eide driver.
pipe
mqueue
fesh # fat embedded shell
mount
ls
mkdir
more
cp
rm
##########

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

bios.ide.build (modified)

##################################
[virtual=x86,bios +compress] boot = {
#startup-bios -Nmachine-name
startup-bios -s 64k
PATH=/proc/boot:/x86/bin
LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/x86/lib:/x86/dll procnto
}
[+script] startup-script = {

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

populate the environment

seedres &
display_msg Booting Neutrino

Disk drivers (The default one and some fun others for your

pleasure…)
devb-eide blk automount=hd0t79:/ &

Wait for a bin for the rest of the commands (up to 60 secs)

waitfor /bin 30

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg Welcome to Neutrino on an PC compatible BIOS system

Network drivers and filesystems

io-net -dsmc9000 -ptcpip &
waitfor /dev/socket
ifconfig en0 10.1.1.205 netmask 255.255.255.0 up
sleep 5
netmanager
sleep 2
mount -Tio-net -obind=ether npm-qnet.so

fs-nfs2 10.2:/usr/nto / 10.2:/ /usr/qnx4 &

Some common servers

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

Start a debug server for debugging programs

waitfor /dev/ser1 30
#[-session] pdebug /dev/ser1 &

Start some extra shells on other consoles

reopen /dev/con2
[+session pri=10r] fesh &
reopen /dev/con3
[+session pri=10r] fesh &

Start a high priority shell just in case…

reopen /dev/con4

[pri=25 +session] sh &

[+session pri=30r] fesh &

Start the main shell

reopen /dev/con1
[+session pri=10r] fesh &

[+session] login -p

}

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

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

Redirect console messages for syslog

[type=link] /dev/console=/dev/con1

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

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

[type=link] /dev/console=/dev/con1 # Redirect console messages for
syslog
[type=link] /dev/log = /dev/null
[type=link] /proc/dumper = /dev/null
#[type=link] /bin=/proc/boot # <== not needed when you have a real /bin

We use the “c” shared lib (which also contains the runtime linker)

libc.so
libm.so

Just incase someone needs floating point…

#fpemu.so

Include the socket library

libsocket.so

Include the hard disk files so we can access files on the disk

libcam.so
io-blk.so

filesystem required shared libs

cam-disk.so
fs-qnx4.so

Include the socket library

libsocket.so

devn-smc9000.so
npm-tcpip.so
npm-qnet.so

The files above this line can be shared by mutiple processes

[data=c]
seedres

Executables must currently be below this line

#diskboot
devc-con # include the console driver
devb-fdc
devc-pty # include the pty driver
devb-eide # Include the eide driver.
devc-ser8250 # serial prot driver

other

dinit
ifconfig
pipe
mqueue
fesh # fat embedded shell
mount
ls
mkdir
more
cp
rm
sleep
nicinfo
io-net # network driver
fs-nfs2 # NFS driver
inetd # NFS driver

##########

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com