use CDROM or USB Flash to startup the QNX boot image

If I want to use CDROM or USB Flash to startup the QNX boot image.
How can I do? Because I write a boot image. befer I use the IDE interface. and use the command "dinit " and “dloader” . the HD and my boot image can startup normal. now I want to use the CDROM or USB Flash to startup and loader my boot image to HD. Make the HD use my boot image for startup. please supply me! How can I do? thanks!

I copied this from a web site a year or so ago. I tried it once and it mostly worked. Unfortunately, I don’t have the URL of the web site.

Create an USB boot image file your_image.build in the /boot/build/ folder. Example:

Build file for QNX Neutrino booting on a PC from USB

[virtual=x86,bios +compress] boot = {

Reserve 64k of video memory to handle multiple video cards

startup-bios

PATH is the safe path for executables (confstr(_CS_PATH…))

LD_LIBRARY_PATH is the safe path for libraries (confstr(_CS_LIBPATH))

i.e. This is the path searched for libs in setuid/setgid executables.

PATH=/proc/boot procnto -vv
LD_LIBRARY_PATH=/proc/boot:/usr/lib
}

[+script] startup-script = {

To save memory make everyone use the libc in the boot image!

For speed (less symbolic lookups) we point to libc.so.2 instead of libc.so

procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

Default user programs to priorty 10, other scheduler (pri=10o)

Tell “diskboot” this is a hard disk boot (-b1)

Tell “diskboot” to not use DMA on IDE drives (-D0)

Start 4 text consoles buy passing “-n4” to “devc-con” (-o)

By adding “-e” linux ext2 filesystem will be mounted as well.

devc-con -n4 &
reopen /dev/con1
display_msg Welcome to QNX Neutrino on USB
seedres
pci-bios &
waitfor /dev/pci
io-usb -duhci & # starting USB daemon
waitfor /dev/io-usb/io-usb # wait for create /dev/io-usb/io-usb
mount -T io-usb devu-uhci.so /dev/io-usb/io-usb # connect driver UHCI
waitfor /dev/io-usb/devu-uhci.so
pipe &
mqueue &
devc-ser8250 -e &
devc-pty &

SYSNAME=nto
TERM=qansi

reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &

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

devb-umass cam verbose umass path=/dev/io-usb/io-usb & # create mass storage device as hd0
waitfor /dev/hd0t79 10 # wait for create hd0t79
mount /dev/hd0t79 / # mounting root folder

reopen /dev/con1
[+session] login -p
}

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

Include the current “libc.so”. It will be created as a real file using

its internal “SONAME”, with “libc.so” being a symlink to it. The symlink

will point to the last “libc.so.*” so if an earlier libc is needed

(e.g. libc.so.1) add it before the this line.

libc.so
fpemu.so.2
devu-uhci.so
devu-ehci.so
libusbdi.so
libcam.so
cam-disk.so
io-blk.so
fs-qnx4.so
fs-ext2.so

[data=copy]
devc-con
pci-bios
seedres
devb-eide
sh=esh
pipe
mqueue
devc-ser8250
devc-pty
ls
pidin
uname
mount
io-usb
diskboot
usb
devb-umass
login
Make file system image using the mkifs utility:
mkifs -v your_image.build /boot/fs/your_image.ifs

Prepare the boot device:

  1. Connect the USB flash disk to the computer. (See USB flash disk Basic Instructions)
  2. Using fdisk /dev/hdX, where X is the number of the USB flash disk, create a QNZ partition (type 79), and set the BOOT flag and apply the LOADER.
  3. Tell the file system to re-look at the drive: mount –e /dev/hdX
  4. Use the dinit command to initialize the partition: dinit -h /dev/hdXt79
  5. Check the partition using chkfsys /dev/hdXt79
  6. Mount partition using mount /dev/hdXt79 /fs/usb
  7. Copy the boot image file to the flash disk:
    cp /boot/images/your_image.ifs /fs/usb/.boot
  8. Add other files you need for the QNX system

I can boot from USB memory now . but it have some debug.
are there some idea for me?
Who could supply me?
the web site: becom.sk/index.php?option=co … &Itemid=25

[b]debug message:

xpt-configure:No umass interface found
unable to access: “/dev/hd0” (2)
mount: can’t mount / (type qnx4)
mount: Possible reason: Invalid argument[/b]

follow is my code:

[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto-smp
-instr

LD_LIBRARY_PATH=/proc/boot:/usr/lib
}

[+script] startup-script = {

procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2 
# Start 1 keyboard console
devc-con -n4 &
# Start serial A driver
waitfor /dev/con1
reopen /dev/con1

 display_msg "Welcome to QNX Neutrino on an PC compatible BIOS system "
 display_msg "for SMP from USB"
 
seedres 
pci-bios &
waitfor /dev/pci

 io-usb -duhci  & # starting USB daemon 
waitfor /dev/io-usb/io-usb # wait for create /dev/io-usb/io-usb 
mount -T io-usb devu-uhci.so /dev/io-usb/io-usb # connect driver UHCI 
waitfor /dev/io-usb/devu-uhci.so 



  waitfor /dev/ser1
pipe

&
mqueue &
slogger
# scan IDE machine
devb-eide
devc-pty &

 SYSNAME=nto 
 TERM=qansi
 
 devb-umass cam verbose umass path=/sbin/io-usb/io-usb & # create mass storage device as hd0 
 waitfor /dev/hd0 10 # wait for create hd0t79 
 mount /dev/hd0 / # mounting root folder 

waitfor /dev/con1
reopen /dev/con1

display_msg "Startup Finish"
[+session] PATH=/bin:/proc/boot esh &

}

Make /tmp 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
libm.so
libsocket.so
npm-ttcpip.so

devn-rtl.so
devn-via-rhine.so
io-blk.so
fs-qnx4.so
cam-disk.so
libcam.so

#####/uncomment for USB driver/
fpemu.so.2
libusbdi.so
devu-uhci.so
devu-ohci.so
devu-ehci.so
devn-asix.so
######/end USB driver/

fs-ext2.so

The files above this line can be shared by multiple

processes

[data=c]
devc-con
devc-ser8250
devc-pty
pci-bios
seedres
mqueue
pipe
io-net
/bin/echo=echo
/bin/stty=stty
cat
tail
pci
ifconfig
ping
syslogd
slogger
ls
qconn
pidin
pdebug
slay
mount
devb-eide
ftp
inetd
shutdown
sin
use
esh
mount
sloginfo
telnet

uname
login
more
fdisk
grep
cp
#####/USB/
io-usb
usb
devb-umass
#####/end USB/

#Services (telnetd etc) config

/usr/sbin/telnetd=telnetd
/usr/sbin/ftpd=ftpd
/bin/login=login
/bin/sh=sh

/sbin/io-usb=/dev/io-usb
/sbin/io-usb/io-usb=/dev/io-usb/io-usb
/bin/on=on

/etc/ppp/chap-secrets = {

Client Server Secret Addrs

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

  •       *           "password"  *
    

}
/etc/syslog.conf = {
. /tmp/syslog
. /…/…
}

Inetd config Files

/etc/services= /etc/services
/etc/protocols= /etc/protocols
/etc/termcap= /etc/termcap
/etc/passwd= /etc/passwd
/etc/default/login= /etc/default/login
/etc/resolv.conf= /etc/resolv.conf
#/etc/shadow = /etc/shadow

/etc/inetd.conf = {
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
#tftp dgram udp wait root /usr/sbin/tftpd in.tftpd
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd
-l
}

/etc/hosts = {
127.1 localhost.localdomain localhost
10.99.99.1 server server
10.99.99.2 client client
}

I can boot from USB memory now . but it have some debug.
are there some idea for me?
Who could supply me?
the web site: becom.sk/index.php?option=co … &Itemid=25

[b]debug message:

xpt-configure:No umass interface found
unable to access: “/dev/hd0” (2)
mount: can’t mount / (type qnx4)
mount: Possible reason: Invalid argument[/b]

follow is my code:

[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto-smp
-instr

LD_LIBRARY_PATH=/proc/boot:/usr/lib
}

[+script] startup-script = {

procmgr_symlink ../../proc/boot/libc.so.2 /usr/lib/ldqnx.so.2 
# Start 1 keyboard console
devc-con -n4 &
# Start serial A driver
waitfor /dev/con1
reopen /dev/con1

 display_msg "Welcome to QNX Neutrino on an PC compatible BIOS system "
 display_msg "for SMP from USB"
 
seedres 
pci-bios &
waitfor /dev/pci

 io-usb -duhci  & # starting USB daemon 
waitfor /dev/io-usb/io-usb # wait for create /dev/io-usb/io-usb 
mount -T io-usb devu-uhci.so /dev/io-usb/io-usb # connect driver UHCI 
waitfor /dev/io-usb/devu-uhci.so 



  waitfor /dev/ser1
pipe

&
mqueue &
slogger
# scan IDE machine
devb-eide
devc-pty &

 SYSNAME=nto 
 TERM=qansi
 
 devb-umass cam verbose umass path=/sbin/io-usb/io-usb & # create mass storage device as hd0 
 waitfor /dev/hd0 10 # wait for create hd0t79 
 mount /dev/hd0 / # mounting root folder 

waitfor /dev/con1
reopen /dev/con1

display_msg "Startup Finish"
[+session] PATH=/bin:/proc/boot esh &

}

Make /tmp 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
libm.so
libsocket.so
npm-ttcpip.so

devn-rtl.so
devn-via-rhine.so
io-blk.so
fs-qnx4.so
cam-disk.so
libcam.so

#####/uncomment for USB driver/
fpemu.so.2
libusbdi.so
devu-uhci.so
devu-ohci.so
devu-ehci.so
devn-asix.so
######/end USB driver/

fs-ext2.so

The files above this line can be shared by multiple

processes

[data=c]
devc-con
devc-ser8250
devc-pty
pci-bios
seedres
mqueue
pipe
io-net
/bin/echo=echo
/bin/stty=stty
cat
tail
pci
ifconfig
ping
syslogd
slogger
ls
qconn
pidin
pdebug
slay
mount
devb-eide
ftp
inetd
shutdown
sin
use
esh
mount
sloginfo
telnet

uname
login
more
fdisk
grep
cp
#####/USB/
io-usb
usb
devb-umass
#####/end USB/

#Services (telnetd etc) config

/usr/sbin/telnetd=telnetd
/usr/sbin/ftpd=ftpd
/bin/login=login
/bin/sh=sh

/sbin/io-usb=/dev/io-usb
/sbin/io-usb/io-usb=/dev/io-usb/io-usb
/bin/on=on

/etc/ppp/chap-secrets = {

Client Server Secret Addrs

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

  •       *           "password"  *
    

}
/etc/syslog.conf = {
. /tmp/syslog
. /…/…
}

Inetd config Files

/etc/services= /etc/services
/etc/protocols= /etc/protocols
/etc/termcap= /etc/termcap
/etc/passwd= /etc/passwd
/etc/default/login= /etc/default/login
/etc/resolv.conf= /etc/resolv.conf
#/etc/shadow = /etc/shadow

/etc/inetd.conf = {
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
#tftp dgram udp wait root /usr/sbin/tftpd in.tftpd
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd
-l
}

/etc/hosts = {
127.1 localhost.localdomain localhost
10.99.99.1 server server
10.99.99.2 client client
}

io-usb alone doesn’t do much. It’s like io-net you to to supply a usb stack -duhci -dohci or -d ehci depending on your hardware.