building boot image with custom device drivers

Hi all,

I’ve been running QNX 6.3 on a system to do my developmental testing. The system includes an 8 port serial IO card which I needed to install drivers for in the /sbin and /etc/system/enum/devices folders. Now I’d like to build an image containing my application and the serial card drivers (along with some standard utilities). What do I need to do to the build file to get these drivers in the right locations?

FYI, I’m rather new to the QNX/Linux world, and very new to the building boot images process… Any help is much appreciated though!


There is a nice section in the documentation that explain it all.

QNX Neutrino RTOS/Building Embedded System

There is a nice section in the documentation that explain it all.

QNX Neutrino RTOS/Building Embedded System

Thanks for the info mario. I looked over the document and there seems to be some good info in there, but I haven’t found anything that seems to be directly related to what I want to do (or I’m just too naive to recognize it - which is probably the case).

There were two files that I copied to QNX for the serial card to work:

  1. /etc/system/enum/devices/PCISERIAL

device(pci, ven=135e, dev=7804) uniq(sernum, devc-ser, 1) driver(8PTPCISER, $(sernum $(ioport1) $(irq) )

  1. /sbin/8PTPCISER

ioport2=echo "obase=16; ibase=16; $ioport1 + 8;" | bc
ioport3=echo "obase=16; ibase=16; $ioport2 + 8;" | bc
ioport4=echo "obase=16; ibase=16; $ioport3 + 8;" | bc
ioport5=echo "obase=16; ibase=16; $ioport4 + 8;" | bc
ioport6=echo "obase=16; ibase=16; $ioport5 + 8;" | bc
ioport7=echo "obase=16; ibase=16; $ioport6 + 8;" | bc
ioport8=echo "obase=16; ibase=16; $ioport7 + 8;" | bc

devc-ser8250 -u$unit $ioport1,$irq $ioport2,$irq $ioport3,$irq $ioport4,$irq $ioport5,$irq $ioport6,$irq $ioport7,$irq $ioport8,$irq[/code]

I know when I’m running a full installation of QNX, the first file (PCISERIAL) gets parsed by the device enumerator, which in turn calls the second file (8PTPCISER) which invokes the serial driver with the correct info.

I could be wrong, but I dont think device enumeration happens in a custom build image. So how do I manually do this in my build file?

Thanks again.

You don’t need all that stuff if you know about the hardware and it’s stable. You can just start the serial driver. The enum happens when the program enum-devices is launches by the script /etc/rc.d/rc.devices.

Just thought I’d follow up with my findings. I did what you said: just start the serial driver. I just had to determine what the right settings were for the card which I figured out by adding some echo statements to the device enumerator script to see what values it was coming up with (this was done using my full install of QNX). Once I did this, I just had to copy the devc-ser8250 … line to my build file and voila!

Thanks for the advice mario.

If you are running Linux on a system with hardware or wish to use features not supported in the stock kernels, or perhaps you wish to reduce the kernel memory footprint to make better use of your system memory, you may find it necessary to build your own custom kernel.

mcp | mcsa | mcdba exams