Help with my build file

Hi. I’ve got a problem with my boot velocity, it’s too slow.
I want to do it faster by I don`t know how.
I’m using QNX6.

My build file is:

The build file for QNX Neutrino booting on a PC

[virtual=x86,bios +compress] boot = {
# Reserve 64k of video memory to handle multiple video cards
startup-bios -s64k

# 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:/bin:/usr/bin:/opt/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto-instr

}

[+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 use DMA on IDE drives (-D1)
# Start 4 text consoles buy passing "-n4" to "devc-con" (-o)
# By adding "-e" linux ext2 filesystem will be mounted as well.
[pri=10o] PATH=/proc/boot diskboot -b1 -D1 -odevc-con,-n4

}

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

Include the network files so we can access files across the net

npm-tcpip.so
npm-pppmgr.so
devn-rtl.so

Include math librery

libm.so.2

Include all tie files for the default filesystems

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

libcam.so
io-blk.so

cam-disk.so
fs-qnx4.so
fs-dos.so
fs-ext2.so
cam-cdrom.so
fs-cd.so

These programs only need to be run once from the boot image.

“data=uip” will waste less memory as the ram from the boot

image will be used directly without making a copy of the data

(i.e. as the default “data=cpy” does). When they have been

run once, they will be unlinked from /proc/boot.

[data=copy]
seedres
pci-bios
devb-eide
devb-amd
devb-aha2
devb-aha4
devb-aha7
devb-aha8
devb-adpu320
devb-ncr8
diskboot
slogger
fesh
devc-con
pipe
mqueue
io-net
dhcp.client

These files will be unlinked after the system has started

to release the memory back to the system. They are only

needed during boot. If needed later on, they will be loaded

from the boot device.

unlink_list={
/proc/boot/devb-*
}

The boot sequence prompts “Detected EIDE. Scannig for devices” and then the wait begins.
I’ve tried with devb-eide options but I’m a beginner with QNX and I think that I did something wrong.

P.D : I am booting QNX6 from a Transcend Flash Memory.

Thanks and sorry for my poor English.

If you are booting from flash, why do you need devb-eide?
Are you using a compact flash disk?

Remove all unsued components. e.g. devb-amd, devb-aha2…

A good rule is to do the absolute minimum in the boot file and then call a script.

So I suggest you remove io-net for example and start this later in a script.
The advantage of this is that whilst io-net is starting you can doe other things (multi task).

all components included in your boot file will be loaded into memory (thats is what is happening when the dots appear on the screen "hit esc for altboot… "

Once in memory they stay there unless you specifically unlink them.

You need to put all of the other stuff into a file system that is copied to your disk when it is initialised.
Then create a “system init” script that is called from the boot file.

When I do this sort of thin, I start the eide driver and the console manager, devc-con and a shell
and then call my script.

That may be a bit daunting if you are new to qnx boot files, so you could just try removing all of the unused stuff as suggested above, smaller boot image, less dots, quicker boot.

Thank you for answer me.
I should have said that the flash memory is a IDE flash module so I think I need devb-eide in build file. I tried remove it and the boot prompts “Spawn of devb-eide failed”.
I included devb-eide, devb-amd, … in /etc/system/sysinit and it didn’t work.
“xpt_configure No amd interfaces found” was prompted.

After the boot prompts “Starting EIDE. Scanning for devices” there is a animated symbol which indicates a scan is being done. This symbol moves very slowly.
I don’t know if this is important or not.

Thanks.

You should only need:
devb-eide
libcam.so
io-blk.so
cam-disk.so

You should be able to get rid of:
npm-tcpip.so
npm-pppmgr.so
devn-rtl.so
fs-dos.so
fs-ext2.so
cam-cdrom.so
fs-cd.so

seedres
pci-bios
devb-amd
devb-aha2
devb-aha4
devb-aha7
devb-aha8
devb-adpu320
devb-ncr8
io-net
dhcp.client

the diskboot program is starting other servers such as pci-bios, pipe and mqueue

You could do away with diskboot all together, see the help documentation for a simple boot file example.
I think diskboot relies on a file system being in place, not sure on that as I haven’t used it.

oops: don’t get rid of seedres or pci-bios, you wont get far without these.

I could remove

npm-tcpip.so
npm-pppmgr.so
devn-rtl.so
fs-dos.so
fs-ext2.so
cam-cdrom.so
fs-cd.so
io-net
dhcp.client

but if I remove devb-* drivers an error message is prompted. “xpt_configure. No * interfaces found”.
And the boot is still slow. But thanks for your advices.

you will need devb-eide

I didn’t remove devb-eide, I was referring to the other devb-* drivers,

devb-amd
devb-aha2

Removing stuff from the build file doesn’t make it boot that much faster, it only help make the image load faster in memory ( when you see all the … )

Check the documentation on diskboot to pass some argument to devb-eide to try to speed up detection (noslave comes to mind).

Off course as bren-uk suggested getting rid of diskboot is from my experience the best way to speed startup.

Hello. Finally I changed my build file to make it without diskboot and it’s fast. It takes a few seconds to start the console.

Thanks for your advices.

Please would you be so kind and send me final build file (grupatnt at gmail dot com). I’m starting to work with CF cards and have little expirience, so this would be a good starting point for me.

Best regards,
G

G,

Here is a minimal boot file that works for an Ampro PC104 board with a CF card. All it does is start devb-eide and tell it to automount the QNX partition. There are other options you can add to devb-eide which will further speed things like (like -noslave) etc. I omitted those from this example so it won’t be over complicated. As it stands, this boots the PC104 Ampro board in about 2-3 seconds (we have a minimal setup in etc/rc.d/rc.syinit) once the BIOS is finished.

As you can see, there is nothing special about using a CF card vs a
regular harddrive.

Tim

###############################################################################
#
# The build file for starting QNX on the Ampro Board used in the subsea
# controller.
#
# This image is designed for fast booting. Only the bare minimum of services
# (IDE/SATA disk driver) is installed in this image.
# Everything else will be started by the rc.sysinit file.
#
# This boot image assumes that the QNX 6.3 SP3 Runtime kit has been installed
# on the compact flash drive.
#
###############################################################################
[virtual=x86,bios +compress] boot = {
    # Reserve 64k of video memory to handle multiple video cards 
    startup-bios -s64k

    # 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:/bin:/sbin:/usr/bin:/usr/sbin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto
}

[+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)
    display_msg "amproBoard Build Ver 1.0"

    [pri=10o] PATH=/proc/boot pci-bios &
    devc-con -n4 &
       
    # Disk Driver
    devb-eide blk cache=2m,automount=hd0t79:/ & 

    # Wait until the disk manifests itself
    waitfor /x86  10

    # Some common servers 	
    pipe &
    mqueue &
    devc-pty -n32 &

    # Do all the system initialization (ethernet/serial etc) from /etc/rc.d/rc.sysinit
    sh /etc/rc.d/rc.sysinit

    # Start the console sessions for logging in	
    reopen /dev/con1
    [+session] login &
		
    reopen /dev/con2
    [+session] login &

    reopen /dev/con3
    [+session] login &

    reopen /dev/con4
    [+session] login &
}

# Include the current "libc.so". It will be created as a real file using
# it's 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

# Include all the files for the default filesystems
libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so

#------------------------------------------------------------
#  This comment from example text file - disregard it.
# XX These programs only need to be run once from the boot image.
# XX "data=uip" will waste less memory as the ram from the boot
# XX image will be used directly without making a copy of the data
# XX (i.e. as the default "data=cpy" does). When they have been
# XX run once, they will be unlinked from /proc/boot.
#------------------------------------------------------------
[data=copy]
seedres
pci-bios
devb-eide
slogger
devc-con
esh

Tim,

Thank you for quick reply. I’m going to put things together in following days and see if they work as I wish.

Best regards,
G