Cannot boot from DOM

Dear members,

I got a problem to boot an image from dom (disk on module). I created a script file, cpu145x.build, for my target. The script was original for QNX 6.2.1 system use.

I rebuild it under QNX 6.3.0 and got an image, e.g. cpu145x.ifs, by command;
mkifs cpu145x.build cpu145x.ifs

I attach an 128M dom to secondary IDE slot in a development station under QNX Neutrino 6.3 with SP1.

Run “fdisk /dev/hd1” to create a new partiion of type 77 (qnx)

I copy the image to dom by use:

dinit -h -B ipl-diskpc1 /dev/hd1
dinit -h -f cpu145x.ifs -B ipl-diskpc2 /dev/hd1t77

After then, I took dom to target and boot it, but it only showed;
Boot Operating System…
Hit ESC for .altbootD

It stopped forever. I also have tried other way to copy image in dom by;
dinit -h -f cpu145x.ifs /dev/hd1t77
which it did copy the image to .boot, since they have same format. but when I boot it, it showed several error messages.
Unable to access /etc (2)
Unable to access /dev/ser1 (2)
Unable to get dll in lib for npm-tcpio

I am sure the script file is fine because it was successful booting on QNx 6.2.1 system.

Any way, I wonder if any one has comment on above processes or suggestion. It will be great appreciated.

Bill

Hi,

Post the exact procedure you follow to initialize you DOC.

Take also a look at:
openqnx.com/index.php?name=P … pic&p=1538

Try:
0) devb-doc &

  1. dd if=/dev/zero of=/dev/hd[x] count=100

  2. fdisk /dev/hd[x] delete all

  3. fdisk /dev/hd[x] add -s1 -t77 -p100

  4. fdisk /dev/hd[x] boot -s1

  5. fdisk /dev/hd[x] loader

  6. mount -e /dev/hd[x] (this works for me)

  7. dinit -hb /dev/hd[x]t77

8) dinit -h /dev/hd[x]/t77

if you want, you can load the proper ipl using ‘dloader’
8b) dloader /dev/hd0 /boot/sys/ipl-diskpc1
8c) dloader /dev/hd0t77 /boot/sys/ipl-diskpc2

  1. answer yes to the question asked
  2. mount /dev/hd[x]t77 /fs/doc1
  3. copy a valid bootimage (.boot) to the doc.

Good luck.
Freddy

Hi Freddy,

Thanks for your help. I have not tried your suggested procedures for boot a DOM. First, I have a question that the DOC is same as DOM? Since DOC is a chip on target board, DOM is a module card connect to target via IDE bus. Second, I did a simple process for a bootable image on DOM. The followings are the procedures.

  1. Get script file for building image. please find attach script file at bottom.
  2. In a Qnx 6.3 development station, build the script, “mkifs cpu1450.build cpu1450.ifs”.
  3. Connect a 128M disk on module (DOM) to secondary IDE port on development station. It will show /dev/hd1.
  4. fdisk /dev/hd1 to create a partition of type 77 (qnx).
  5. reboot development station and saw /dev/hd1t77 created.
  6. dinit -h -f cpu1450.ifs /dev/hd1t77, which copy image over .boot. (Is it a correct process? I am not sure.)
  7. Shutdown station, took out DOM and connect it to target system and boot it.
8) The errores are

Unable to access /etc (2)
Unable to access /dev/ser1 (2)
Unable to get dll in lib for npm-tcpio
9) It stopped. I have turn off power.

The script file cpu1450.build:
#-----------------------------------------------------------------------------------

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

[+script] startup-script = {

Start up some consoles and display intro message

devc-con -n4 &
reopen /dev/con1
display_msg " "

Start the pci server

seedres	
pci-bios &
waitfor /dev/pci

Start DOM …

devb-eide cam quiet blk automount=hd0t77:/:qnx4:ro &

waitfor /etc 10

Start and configuring network …

io-net -d speedo -p tcpip -p qnet &	
waitfor /dev/socket 40

Some common servers

pipe &
mqueue &
devc-eth_ser8250 -b 19200 -E -F -t 14 -T 14 3F8,4 2F8,3 &
devc-pty &	

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi

Start network services

netmanager &
inetd &	

Load i815 native audio driver

io-audio -d i8x0 &

Start the shells (see /etc/config/ttys for details)

waitfor /dev/con4 5
waitfor /dev/ser1 5
tinit &	

}

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] /usr/lib/ldqnx.so.1=/lib/libc.so.1

********************

***** Includes *****

********************

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

libc.so

Include the socket library

libsocket.so

Just incase someone needs floating point…

fpemu.so.2

Include pci server

pci-bios
seedres

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

devb-eide
libcam.so
io-blk.so

filesystem required shared libs

cam-disk.so
fs-qnx4.so

Include a console driver

devc-con

network drivers and executables

devn-speedo.so
npm-tcpip.so
npm-qnet.so
inetd
netmanager
io-net

audio

io-audio
deva-ctrl-i8x0.so
deva-mixer-ac97.so

Miscellaneous

pipe
mqueue
devc-par
devc-pty

------------------------------------------------------------

The files above this line can be shared by mltiple processes

------------------------------------------------------------

[data=copy]

Executables must currently be below this line

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

sh=ksh

Other executables

pdebug
devc-eth_ser8250
login
tinit
ls
cat
pidin
uname
/sbin/io-net
/sbin/ifconfig
/sbin/route
/usr/bin/telnet
/usr/bin/ftp
/usr/bin/ping

Your program go here

/opt/my/app

Correct me if I am wrong but you should use devb-doc. Community, is this right ?

Freddy

1 I think that is correct to use devb-eide for DOM because it have IDE interface.
2 Are you have /etc/ directory on you DOM? I do:

dinit -h -R -f my.ifs /dev/hd1t77

Write QNX boot loader to CF…
dloader /dev/hd1t77 ./ipl-diskpc2

Mounting new QNX partition…
mount -t qnx4 /dev/hd1t77 /fs/hd1-qnx6

Copy files…
cp -cR ./qnx/etc /fs/hd1-qnx6
cp -cR ./qnx/sbin /fs/hd1-qnx6
cp -cR ./qnx/bin /fs/hd1-qnx6
cp -cR ./qnx/lib /fs/hd1-qnx6
cp -cR ./qnx/root /fs/hd1-qnx6
cp -cR ./qnx/usr /fs/hd1-qnx6
cp -cR ./qnx/var /fs/hd1-qnx6

and it works fine (for CF & HDD)
3 Try to do, what you do with CF or HDD

Hi, I want to continue to discuss my OS image issue. I did this as qnxloader sugessed above, but it is still not working. I think the problem may be improper in my build file. It was booting and showed the message of the eth_ser8250 driver passing that I modified it from ser_8250. Then it stopped in “Couldn’t find ser1 (2)” that is for setting a debug server. So I commented the “waitfor /dev/ser1 5” in my build file. And tried to boot again, it halts again and nothing shows up.

I am wondering if any one can provide me a successful sample build file, it will be appreicated.

Bill