Flash disk bootscript

Dear all,
I am truying to build up the image and bootscript for my flash disk to run the athenna board. I try the following bootscript :

[virtual=x86,bios +compress] boot = {
PATH=/proc/boot procnto

[+script] startup-script = {
# Start up some consoles
devc-con -n4 &
reopen /dev/con1

display_msg Welcome to QNX Neutrino

# Start the PCI server
pci-bios &
waitfor /dev/pci

# Start IDE and mount the flash disk in /usr/hdd
devb-eide blk automount=hd0t77:/usr/hdd &

# Start Networking
io-net -d ns83815 duplex=0 -p tcpip
waitfor /dev/socket
ifconfig en0 netmask
route add default

Some common servers

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

# USB keyboard and mouse.  Disable this if not needed.
devu-ohci &
devu-kbd &
devu-mouse &

# Start a debug server for debugging programs
waitfor /dev/ser1
[+session] pdebug /dev/ser1 &

# These env variables inherited by all the programs which follow

# Start some extra shells on other consoles
reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &

# Start a high priority shell just in case
reopen /dev/con4
[pri=25 +session] sh &

# Start the main shell
reopen /dev/con1
[+session] sh


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

You’ll need to add lines for the additional libraries you need. For

example, this will include support for C++ applications which require

the math library.

[type=link] /lib/stdc++.so.
[type=link] /lib/libm.so.2=/proc/boot/libm.so


Executables must currently be below this line

Include a console driver


Include pci server


Network related items

/lib/dll/devn-ns83815.so # National Semiconductor DP83815 “Macphyter”

Use the “public domain korn shell” as the default shell “sh”


Other executables


devu-ohci # Remove these three devices if USB not needed
devu-kbd # See above
devu-mouse # See above

Your programs go here


from diamondsystems.com/support/faqs/48
But after using the command
dinit -h -B ipl-diskpc1 /dev/hd1

dinit -h -f /path/to/my.ifs -B ipl-diskpc2 /dev/hd1t77

It become DOS, non QNX drive, not QNX drive I want
Do anyone can help me with this?
Thank you for your time.

you need to run fdisk first to format the disk with a qnx filesystem

Yes, I already run the fdisk to format the disk to type 77 - QNX. But after I run the dinit command, it becomes DOS and non QNX drive already.

Becomes DOS??? That can’t be. How do you tell it becomes DOS.

yes, unfortunately, it is.

After doing all the fdisk to set it to QNX 77 , bootable, loader, I copy the my.ifs file to the flash disk.
Then, when I run the command :
dinit -h -B ipl-diskpc1 /dev/hd1
the command ask me something about I am going to initialize for a raw disk, not a partition. I continued the process.
After that, I try again
fdisk /dev/hd1
It become two partition indeeed, one is DOS and one is NONQNX.

Do anyone know how to set up the bootscript for the flashdisk and athena board.

Thank you very much.

You say you copy my.ifs to flash and THEN run dinit? Well that should be the other way around.

fdisk then dinit -h /dev/hd1 then copy my.ifs as .boot

Thank you, i’ll try.

The tool is right, you should not init raw device, you should init partition. So:
first run fdisk, create partition type 79 (or 77, shouldn’t matter)
second run dinit on /dev/hd1t79
third copy boot image to disk

you should also use dloader utility to write bootloader.

Thank you, I got them run already.

Hi, I now got a new problem. I have to adjust the baud rate of my com port to 9600. I tried
stty baud=9600 </dev/ser1.
However, the system printed out: " cannot open /dev/ser1".
Can you please help me with this?

Thank you.


It sounds like the serial driver (devc-ser8250) isn’t being started at boot time.

If you do a ‘pidin’ command do you see it running?