Amit Singh Tomar
Amit Singh Tomar

Reputation: 8610

What is the QNX kernel binary name

I'm working on a project where underlying Kernel is from QNX and all the Kernel sources are coming as binary ,for example CAM layer for block drivers is present as libcam.a but could not find the exact kernel binary which should be there in whole source tree of project.

Can anybody tell me what is the way to find it out??

Upvotes: 0

Views: 1991

Answers (1)

kmort
kmort

Reputation: 2938

The running kernel is going to be the process with PID of 1. Use ps -e to see it.

In my case, it's procnto. If you are running the instrumented kernel (for debugging) it's procnto-instr.

 ps -e
       PID TTY          TIME CMD
         1 ?        12:25:42 procnto
      4098 ?        00:00:00 pci-bios
      4099 ?        03:40:47 io-usb
      4100 ?        00:00:00 io-hid
      4101 ?        00:00:00 devc-con-hid
      4102 ?        00:58:14 devb-eide
     20487 ?        00:00:00 /sbin/tinit
     20488 ?        00:00:00 slogger
     24585 ?        00:00:25 pipe
     28682 ?        00:10:22 mqueue

Depending on how you make your IFS file, you could have a .build file that includes something like the following:

#
# The build file for QNX Neutrino booting on a PC
#
[linker="ntox86-ld -T$QNX_TARGET/x86/lib/nto.link %(h!=0, -Ttext 0x%t%)%(d!=0, -Tdata 0x%d%) -o%o %i %[M -L%^i -uinit_%n -lmod_%n%]"]
[virtual=x86,bios +compress] boot = {
    startup-bios

    # 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

} ...

That last procnto is what tells the bootloader which kernel to use. Look at mkifs for more information.

Upvotes: 1

Related Questions