i want to build my own boot image, but i dont know which shared libs and binarys i need to include.
My ES has a Touchscreen, ethernet, usb, integrated graficchip intel gma 945 Gm, SSD over Sata, and i want to use the qnx filesystem 6.
And another question is, when i start my System i become some Messages:
"Press F1-F4 to select drive or select Partition 1? 1
QNX v1.2b Boot Loeader: qnxbase.ifs
Press the Space bar to input boot options…
Trying SATA ahci. Scanning for devices…
xpt_configure: ahci SIM attach failure
Trying EIDE. Scanning for devices…
…found 1 device
Detected USB. Scanning for devices…
Trying Sata mvSata. Scanning for devices…
xpt_configure: No mvSata interfaces found
mount: Can’t mount / (type io-audio)
mount: Possible reason: Invalid argument
Starting extra run commands
Starting qconn…
Starting inetd…
login:
"
How to disable the partition selection? Is there any file i need to change, to boot automatically from the first partition?
and in which files i find the print or echo outputs of the boot progress?
and is there any possibility to skip the login?
i have a Qt application on the system and in rc.local i added “qconn”, “inetd”, “devi-hid -Pr kbd touch abs -a3”, “cd /home/Qt” and “./Qtapp -qws”. this is how i made my own “skip” the login.
and my last question is, when i shutdown the system without reboot, i need to power off the system manually.
can i made this automatically?
Building a boot image and figuring out what needs to be included can be a bit of a black art.
The documentation is very sparse on this kind of information. Obviously common sense helps but ultimately you need to use trial an error to see what is missing.
I recommend you not use the QNX diskboot program. Instead you start the appropriate hard disk driver, waitfor /dev/hd0, then enumerate the partitions (mount -e /dev/hd0), mount the partition as root and start your startup script. This speeds up the process and allows you to just have the needed driver.
To disable the partition selection, you will need to get or write a custom partition loader. There may be something available with QNX, but I don’t know. Fdisk has the option to load it however.
login is optional. Typically tinit is used to put up login’s, which you can skip. In that case your startup script has to start everything.
There is a program “shutdown” which will stop the system. Not all hardware responds by powering down, in which case you may need to write a custom shutdown program.
okay now i have written my own build-image.
But i become an error when i want to load the ethernet adapter/driver.
here is my build file:
#
# own image file
#
[virtual=x86,bios +compress] boot = {
# Reserve 64k of video memory to handle multiple video cards
startup-bios -s64k
PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto
}
#
# Startscript
#
[+script] startup-script = {
# Programs require the runtime linker (ldqnx.so) to be at a fixed location
procmgr_symlink ../../proc/boot/libc.so.3 /usr/lib/ldqnx.so.2
display_msg "Image v1.0"
# start pci
display_msg "Start PCI"
seedres
pci-bios &
waitfor /dev/pci
pipe
slogger
# start hdd driver
display_msg "Start hdd driver"
devb-eide blk automount=hd0t179
waitfor /dev/hd0t179
#mount -v -e -t qnx6 /dev/hd0t179 /mnt/fs
# start other driver
display_msg "Start other driver"
#devc-con-hid &
io-pkt-v4-hc -v -ptcpip
waitfor /dev/io-net/en0
mount -v -T io-pkt /dev/io-net/en0
#qconn
# start console
display_msg "Start Console"
devc-con -n4 &
reopen /dev/con1
[+session] sh &
}
[type=link] /tmp=/dev/shmem
libsocket.so
devnp-shim.so
devnp-e1000.so
libc.so
fs-qnx6.so
io-blk.so
libcam.so.2
cam-disk.so
# executable
[data=copy]
pci-bios
seedres
pipe
slogger
ls
shutdown
sh
pidin
devc-con
ifconfig
qconn
devc-con
shutdown
use
devb-eide
mount
devc-con-hid
io-pkt-v4-hc
waitfor
and the error is:
“unable to access “/dev/io-net/en0” (2)
Parsed: mount from [/dev/io-net/en0] mount on [NULL] type [io-pkt]
mount: can’t mount / (type io-pkt)
mount: possible reason: No such device or address”
and sometimes i become an error when i reboot the system to test my image. its sound like: Boot OS cannot be loaded.
and then i must reinstall the hole system with the bootable CD.
Why are you waiting for this? You only need to if the next application is immediately trying to access the network.
The mount afterwards makes no sense.
And, your io-pkt line is missing the corresponding driver, e.g.: io-pkt-v4-hc -de1000 ← should be enough. -p tcpip is legacy io-net and not needed any more.
If you need to wait, wait for the right thing. I understand you use the devnp-e1000 driver - does it really create an entry like that under /dev? I think only legacy io-net drivers do that. Check which entry it actually creates. Alternatively, you could wait for /dev/socket.
Finally, how does it feel to be an error? I ask because you wrote that you became an error
okay i removed waitfor and mount.
now i only start “io-pkt-v4-hc -de1000”.
when i call ifconfig i get the following output:
“lo0: flags=8049<UP, LOOPBACK, RUNNING, MULTICAST> mtu 33192
inet 127.0.0.1 netmask 0xff000000”
how do i start the ethernet driver?
sry, but i dont have only 1 week experience with qnx
You have to know which driver to start.
You can find out by checking the Ethernet chipset detected by pci server.
Here is how to do that:
“pci -vvv | grep Ethernet”
It will print out the Ethernet chipset used in your system. With this info in hand go to qnx.com and look for Hardware Supported.
There you will find which driver you have to start. Note that QNX version is important.
Ehm, actually I assumed you were using devnp-e1000.so because you found out that it’s the right driver for your hardware. If it’s not, then of course it doesn’t work.
So, boot from CD and do a
pidin mem
It will show you all processes and all the libraries they have loaded. For io-pkt, this will show you which driver has been loaded by the enumerator.
On a side note: to analyze startup problems, include slogger and sloginfo in your boot image, start slogger as first item in the boot script, and then use sloginfo to find out if, maybe, a driver put a message into the system log that it couldn’t find the hardware it was written for.
after a few times of building .ifs files and testing them on the target, there is a new error.
when i now want to build a new image with mkifs, i get this error:
“cc: unknown target 'gcc_ntox86+static
cc: no targets defined in /usr/qnx650/host/qnx6/x86/etc/qcc/gcc!
Unable to link relocatable elf file /usr/qnx650/target/qnx6/x86/boot/sys/procnto.”
but funny is, that i didn’t changed anything. i just restarted and commented my “my.build” -file.
here is my .build - file:
(but its not perfect)
#
# own image file
#
[virtual=x86,bios +compress] boot = {
# Reserve 64k of video memory to handle multiple video cards
startup-bios -s64k
PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto
}
#
# Startscript
#
[+script] startup-script = {
# Programs require the runtime linker (ldqnx.so) to be at a fixed location
procmgr_symlink ../../proc/boot/libc.so.3 /usr/lib/ldqnx.so.2
# start slogger
slogger
display_msg "Image v1.0"
# start pci
seedres
pci-bios &
waitfor /dev/pci
pipe
# start hdd driver
devb-eide blk automount=hd0t179:/
waitfor /dev/hd0t179
# start console driver
devc-con -n4
# Anzahl der möglichen verbindungen
devc-pty -n32
# start Ethernet driver and init en0 with 192.168.1.3
io-pkt-v4-hc -drtl
waitfor /dev/socket
ifconfig en0 192.168.1.3
# start connections to host
qconn
inetd
# start common server
io-hid
io-usb
io-display -dvid=0x8086,did=0x27a2
mount -T io-usb devu-ehci.so /dev/io-usb/io-usb
#enum-devices
#enum-usb
# start console
reopen /dev/con1
[+session] sh
}
[type=link] /tmp=/dev/shmem
devg-svga.so
libffb.so.2
libsocket.so
devnp-shim.so
devn-rtl.so
libc.so
fs-qnx6.so
io-blk.so
libcam.so.2
cam-disk.so
libhiddi.so
libsocket.so.3
libusbdi.so.2
libm.so.2
libz.so.2
libgf.so.1
devh-usb.so
#libstdc++.so.6
devu-ehci.so
devu-uhci.so
# executable
[data=copy]
pci-bios
seedres
pipe
slogger
ls
shutdown
sh
pidin
ifconfig
qconn
devc-con
shutdown
use
devb-eide
mount
devc-con-hid
io-pkt-v4-hc
waitfor
io-hid
inetd
netstat
sloginfo
io-display
io-hid
enum-devices
enum-usb
devc-pty
tar
cp
okay guys, now i have some new problems :D:D
i dont know or its too difficult or im too stupid
i tried to mount the usb stack and tried to connect a usb keyboard.
when i dont mount the usb stack, then the keyboard works (through a usb port), but when i mount the usb stack, the keyboard dont works
here is my image:
#
# own image file
#
[virtual=x86,bios +compress] boot = {
# Reserve 64k of video memory to handle multiple video cards
startup-bios -s64k
PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib procnto-instr
}
#
# Startscript
#
[+script] startup-script = {
# Programs require the runtime linker (ldqnx.so) to be at a fixed location
procmgr_symlink ../../proc/boot/libc.so.3 /usr/lib/ldqnx.so.2
# start slogger
slogger
display_msg "Image v1.0"
# start pci
seedres
pci-bios &
waitfor /dev/pci
pipe
# start hdd driver
devb-eide blk automount=hd0t179:/
waitfor /dev/hd0t179
# start console driver
devc-con -n4
# Anzahl der möglichen verbindungen
devc-pty -n4
# start Ethernet driver and init en0 with 192.168.1.3
io-pkt-v4-hc -drtl
waitfor /dev/socket
ifconfig en0 192.168.1.3
# start connections to host
qconn
inetd
# start common server
io-usb -duhci -dehci &
waitfor /dev/io-usb/io-usb
io-hid -dusb
io-display -dvid=0x8086,did=0x27a2
# start console
reopen /dev/con1
[+session] sh
}
[type=link] /tmp=/dev/mem
devg-svga.so
libffb.so.2
libsocket.so
devnp-shim.so
devn-rtl.so
libc.so
fs-qnx6.so
io-blk.so
libcam.so.2
cam-disk.so
libhiddi.so
libsocket.so.3
libusbdi.so
libm.so.2
libz.so.2
libgf.so.1
devh-usb.so
#libstdc++.so.6
devu-ehci.so
devu-uhci.so
# executable
[data=copy]
seedres
pci-bios
pipe
slogger
pidin
ifconfig
qconn
devc-con
devb-eide
mount
devc-con-hid
inetd
netstat
sloginfo
devi-hid
devc-con-hid
unlink_list={
/proc/boot/devb-*
}
and another Problem i have is with Qt Libraries.
i have started my own image and have installed the Qt Libs.
now when i want to start a Qt app, like cEasy with “./cEasy -qws” then i get this error: “ldd:FATAL: Could not load library libQtGui.so.4”.
do i need to set a path to the direction where the libs are? (they are in : “\usr\qnx650\target\qnx6\x86\usr\lib” and they are definitly in this direction).
but when i start the normal qnx image like qnxbase.ifs then the qt app works normally
I recall that getting a USB keyboard working can be a bit tricky. How you do it depends on whether or not you are using photon or just a console. I didn’t see anything wrong in your boot file, but that’s not saying I know much about it.
The way I always go about figuring out such things is
use a development system and see what is loaded when you are running
read the docs
I hope this is helpful.
In any case, my theory about your problem is that by default your BIOS is emulating a PS2 keyboard using a USB keyboard. When you start the USB stack, you interfere with this, which is of course what you want to do, but you have to get it right.
they are in : “\usr\qnx650\target\qnx6\x86\usr\lib” and they are definitly in this direction
That location is the “development” location… it should not be present in your .ifs.
On your CD install, the “runtime” location is “/usr/lib”. The environment variable “LD_LIBRARY_PATH” tells the loader where to look for libraries - and includes “/usr/lib”.
i tried to mount the usb stack and tried to connect a usb keyboard.
when i dont mount the usb stack, then the keyboard works (through a usb port), but when i mount the usb stack, the keyboard dont works
This should work - assuming a usb keyboard is attached…