compact flash boot image

Hi all,
I created a boot image for my m-systems compact flash 128 MB IDE drive and
am able to boot from it. In my build script I have added du, df and mount
commands . So when I boot into the system and do a df the process just
returns

df
process exited …(0)

But when I mount the same drive on a normal qnx machine I can see that 110
MB is free.

Am i missing something basic here. How do I make the system show me what
amount of free space exists on the system. I currently have jsut 4 files on
the system ( .boot, .altbbot,.inode, .bitmap)

Similarly when I do a du I get a usage of about 490 MB when my hard disk is
only 128 MB.

I know i am missing something basic here, but could anybody tell me what i
am doing wrong

In my build file i mount my hard disk as

devb-eide blk automount=hdt077:/ &

Thanks in advance
Srikanth

Hi Srikanth,

What shell are you using?

E.


srik <srik@robotics.usc.edu> wrote:



Hi all,
I created a boot image for my m-systems compact flash 128 MB IDE drive and
am able to boot from it. In my build script I have added du, df and mount
commands . So when I boot into the system and do a df the process just
returns

df
process exited …(0)

But when I mount the same drive on a normal qnx machine I can see that 110
MB is free.

Am i missing something basic here. How do I make the system show me what
amount of free space exists on the system. I currently have jsut 4 files on
the system ( .boot, .altbbot,.inode, .bitmap)

Similarly when I do a du I get a usage of about 490 MB when my hard disk is
only 128 MB.

I know i am missing something basic here, but could anybody tell me what i
am doing wrong

In my build file i mount my hard disk as

devb-eide blk automount=hdt077:/ &

Thanks in advance
Srikanth

Hardware Support Account wrote:
Hi
I am using ksh

Srikanth

Hi Srikanth,

What shell are you using?

E.


srik <> srik@robotics.usc.edu> > wrote:



Hi all,
I created a boot image for my m-systems compact flash 128 MB IDE drive
and am able to boot from it. In my build script I have added du, df and
mount commands . So when I boot into the system and do a df the process
just returns

df
process exited …(0)

But when I mount the same drive on a normal qnx machine I can see that
110 MB is free.

Am i missing something basic here. How do I make the system show me what
amount of free space exists on the system. I currently have jsut 4 files
on the system ( .boot, .altbbot,.inode, .bitmap)

Similarly when I do a du I get a usage of about 490 MB when my hard disk
is only 128 MB.

I know i am missing something basic here, but could anybody tell me what
i am doing wrong

In my build file i mount my hard disk as

devb-eide blk automount=hdt077:/ &

Thanks in advance
Srikanth

Hi Srikanth,

Thanks, also could you possibly post up your OS image (text format).

Thanks

Erick.


Srikanth Saripalli <srik@robotics.usc.edu> wrote:

Hardware Support Account wrote:
Hi
I am using ksh

Srikanth
Hi Srikanth,

What shell are you using?

E.


srik <> srik@robotics.usc.edu> > wrote:



Hi all,
I created a boot image for my m-systems compact flash 128 MB IDE drive
and am able to boot from it. In my build script I have added du, df and
mount commands . So when I boot into the system and do a df the process
just returns

df
process exited …(0)

But when I mount the same drive on a normal qnx machine I can see that
110 MB is free.

Am i missing something basic here. How do I make the system show me what
amount of free space exists on the system. I currently have jsut 4 files
on the system ( .boot, .altbbot,.inode, .bitmap)

Similarly when I do a du I get a usage of about 490 MB when my hard disk
is only 128 MB.

I know i am missing something basic here, but could anybody tell me what
i am doing wrong

In my build file i mount my hard disk as

devb-eide blk automount=hdt077:/ &

Thanks in advance
Srikanth

HI
I had solved the problem. Thanks but I have another strange problem now. I
have my own buildfile, in which i try to start the pc-card server and then
the io-net using

devp-pccard &
waitfor /dev/pccard

io-net -dorinoco -ptcpip -pqnet
waitfor /dev/socket
ifconfig en0 192.168.1.5
route add deafult 192.168.1.1

when put these commands in the image file and try to boot it says unable
load dll devn-orinoco , no such device found and doenot configure the
network. So i go to the shell prompt and type the same commands and it
works.

any help would be appreciated!!

I am attaching my boot script


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

[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg boot

Start the pci server

seedres
pci-bios &
waitfor /dev/pci
devp-pccard &
display_msg pccard started
waitfor /dev/pccard

Disk drivers

devb-eide cam quiet blk automount=hd0t79:/ &


waitfor /
io-net -dorinoco -ptcpip -pqnet
display_msg net started
waitfor /dev/socket
ifconfig en0 192.168.1.5
route add default 192.168.1.1
fs-nfs2 192.168.1.4:/x86/bin /sbin

Some common servers

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

\

These env variables inherited by all the programs which follow

SYSNAME=nto
HOME=/
TERM=qansi-m
SHELL=/usr/bin/sh
TTY=/dev/con1

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

[+session] login -p

}

#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

add symbolic links for bin and lib

[type=link] /bin=/sbin
[type=link] /lib=usr/lib
[type=link] /dll=usr/dll
[type=link] /sys=usr/sys
[type=link] /usr/bin=/proc/boot

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

libc.so

Just incase someone needs floating point…

fpemu.so.2

Include the socket library

libsocket.so
libph.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

cdrom required shared libs

cam-cdrom.so
fs-cd.so
devn-orinoco.so
npm-tcpip.so
npm-qnet.so
libz.so
/etc/hosts=/etc/hosts
/etc/termcap=/etc/termcap
/etc/resolv.conf=/etc/resolv.conf
/usr/lib/terminfo/a/ansi=/usr/lib/terminfo/a/ansi
/usr/lib/terminfo/q/qansi-m=/usr/lib/terminfo/q/qansi-m
/usr/lib/terminfo/terminfo.src=/usr/lib/terminfo/terminfo.src

The files above this line can be shared by mutiple processes

# Executables must currently be below this line

# Include a console driver
devc-con

# Include the disk drivers.
devb-eide

# Include pci server
pci-bios
seedres
devc-ser8250
io-net
fs-nfs2
pipe
mqueue
sh
devc-pty
devc-par
devp-pccard
sin
slay
pidin
pin
ls
vi
stty
cat
slay
shutdown
du
df
mount
more
pdebug
elvis
use
cp
mv
mkdir
rm
rmdir
ftp
telnet
ping
route
ifconfig
mkifs
dinit
fdisk

HI,

I finallay figured it out, I put a sleep before io-net, although i guess
that is not the correct way of doing things.

I have a few questions regarding boot image

  1. I am using a M-systems compact flash IDE disk with 128 MB .
    I have heard if the flash disk gets written constantly to then it may fail.
    … Now my question is since the boot image is on the RAM and I mount the
    Compact flash, do i need to make a RAM disk so that my flash system doesnot
    fail.

The way I will be using the Copact flash is to copy some executables from
another qnx machine and run them on this embedded machine.

  1. What is the advantage of a RAM disk. When should we use a RAM disk?

  2. And if using a RAM disk is advantages, how should I go about making it
    and installing my boot script on it. How do i make changes to the below
    boot file to use RAM disk?

The boot script is attached below

Thanks
Srikanth

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

[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg boot

Start the pci server

seedres
pci-bios &
waitfor /dev/pci
devp-pccard &
display_msg pccard started
waitfor /dev/pccard

Disk drivers

devb-eide cam quiet blk automount=hd0t79:/ &


waitfor /
sleep 3
io-net -dorinoco -ptcpip -pqnet
display_msg net started
waitfor /dev/socket
ifconfig en0 192.168.1.5
route add default 192.168.1.1
fs-nfs2 192.168.1.4:/x86/bin /sbin

Some common servers

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

\

These env variables inherited by all the programs which follow

SYSNAME=nto
HOME=/
TERM=qansi-m
SHELL=/usr/bin/sh
TTY=/dev/con1

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

[+session] login -p

}

#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

add symbolic links for bin and lib

[type=link] /bin=/sbin
[type=link] /lib=usr/lib
[type=link] /dll=usr/dll
[type=link] /sys=usr/sys
[type=link] /usr/bin=/proc/boot

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

libc.so

Just incase someone needs floating point…

fpemu.so.2

Include the socket library

libsocket.so
libph.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

cdrom required shared libs

cam-cdrom.so
fs-cd.so
devn-orinoco.so
npm-tcpip.so
npm-qnet.so
libz.so
/etc/hosts=/etc/hosts
/etc/termcap=/etc/termcap
/etc/resolv.conf=/etc/resolv.conf
/usr/lib/terminfo/a/ansi=/usr/lib/terminfo/a/ansi
/usr/lib/terminfo/q/qansi-m=/usr/lib/terminfo/q/qansi-m
/usr/lib/terminfo/terminfo.src=/usr/lib/terminfo/terminfo.src

The files above this line can be shared by mutiple processes

# Executables must currently be below this line

# Include a console driver
devc-con

# Include the disk drivers.
devb-eide

# Include pci server
pci-bios
seedres
devc-ser8250
io-net
fs-nfs2
pipe
mqueue
sh
devc-pty
devc-par
devp-pccard
sin
sleep
slay
pidin
pin
ls
vi
stty
cat
slay
shutdown
du
df
mount
more
pdebug
elvis
use
cp
mv
mkdir
rm
rmdir
ftp
telnet
ping
route
ifconfig
mkifs
dinit
fdisk

“Srikanth Saripalli” <srik@robotics.usc.edu> wrote in message
news:9ru26f$qg$1@inn.qnx.com

when put these commands in the image file and try to boot it says unable
load dll devn-orinoco , no such device found and doenot configure the
network. So i go to the shell prompt and type the same commands and it
works.

Having never used a network card with that driver (where did you get the
driver?), I think is seems that perhaps there is a timing requirement not
being met. What happens when you move all the network configuration to the
end of your startup script (ie. the last things done).

-Adam

Hi Srikanth,

The failure you are talking about sounds like the failue that is
specific to Flash. Flash devices can be written to only so many
times (it I had to guess it was something very large like 10,000 times),
check with the maker of your flash to find out for sure. If you are
going to be writing to a filesystem an awful lot then yes a ram disk
is a way of avoiding the eventual failure of flash. The downside is,
if you lose power your data will be lost.

Srikanth Saripalli <srik@robotics.usc.edu> wrote:

HI,

I finallay figured it out, I put a sleep before io-net, although i guess
that is not the correct way of doing things.

I have a few questions regarding boot image

  1. I am using a M-systems compact flash IDE disk with 128 MB .
    I have heard if the flash disk gets written constantly to then it may fail.
    . Now my question is since the boot image is on the RAM and I mount the
    Compact flash, do i need to make a RAM disk so that my flash system doesnot
    fail.

The way I will be using the Copact flash is to copy some executables from
another qnx machine and run them on this embedded machine.

  1. What is the advantage of a RAM disk. When should we use a RAM disk?

Lots for both sides.

Few examples:

  • Ram disk should be much faster (not waiting on rotational media), and
    is much faster than Flash.
  • Ram disk does not contain moving parts (e.g. motors) so less to worry
    about. Then again, Flash doesn’t either.
  • Ram disk will loose all information if power is lost
  • Flash can be portable (you can unmount it and remove it from the system).


  1. And if using a RAM disk is advantages, how should I go about making it
    and installing my boot script on it. How do i make changes to the below
    boot file to use RAM disk?

You will want to look into the utility devb-ram. It is not yet released
but should be soon. The current solution is devf-ram, but since it uses
a flash filesystem it is slower.

The boot script is attached below

Thanks
Srikanth

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

[+script] startup-script = {

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg boot

Start the pci server

seedres
pci-bios &
waitfor /dev/pci
devp-pccard &
display_msg pccard started
waitfor /dev/pccard

Disk drivers

devb-eide cam quiet blk automount=hd0t79:/ &



waitfor /
sleep 3
io-net -dorinoco -ptcpip -pqnet
display_msg net started
waitfor /dev/socket
ifconfig en0 192.168.1.5
route add default 192.168.1.1
fs-nfs2 192.168.1.4:/x86/bin /sbin

Some common servers

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


These env variables inherited by all the programs which follow

SYSNAME=nto
HOME=/
TERM=qansi-m
SHELL=/usr/bin/sh
TTY=/dev/con1

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

[+session] login -p

}

#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

add symbolic links for bin and lib

[type=link] /bin=/sbin
[type=link] /lib=usr/lib
[type=link] /dll=usr/dll
[type=link] /sys=usr/sys
[type=link] /usr/bin=/proc/boot

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

libc.so

Just incase someone needs floating point…

fpemu.so.2

Include the socket library

libsocket.so
libph.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

cdrom required shared libs

cam-cdrom.so
fs-cd.so
devn-orinoco.so
npm-tcpip.so
npm-qnet.so
libz.so
/etc/hosts=/etc/hosts
/etc/termcap=/etc/termcap
/etc/resolv.conf=/etc/resolv.conf
/usr/lib/terminfo/a/ansi=/usr/lib/terminfo/a/ansi
/usr/lib/terminfo/q/qansi-m=/usr/lib/terminfo/q/qansi-m
/usr/lib/terminfo/terminfo.src=/usr/lib/terminfo/terminfo.src

The files above this line can be shared by mutiple processes

Executables must currently be below this line

Include a console driver

devc-con

Include the disk drivers.

devb-eide

Include pci server

pci-bios
seedres
devc-ser8250
io-net
fs-nfs2
pipe
mqueue
sh
devc-pty
devc-par
devp-pccard
sin
sleep
slay
pidin
pin
ls
vi
stty
cat
slay
shutdown
du
df
mount
more
pdebug
elvis
use
cp
mv
mkdir
rm
rmdir
ftp
telnet
ping
route
ifconfig
mkifs
dinit
fdisk[/quote]

>

Hi,
Thanks for all the answers. I should probably be posting this as a
different thread. I just wanted to know how I spawn a shell on a different
node.
For example in QNX4 if I wanted to open a shell on node 2 and then run some
command, I used to type
on -f 2 sh

but in qnx 6 on doesnot support -f. So how do I open a shell on the new
node.

I tried on -n sh.

But I get an error saying that full functionality of sh might not be
present.

Thanks
Srikanth