File execution during start up of QNX.

I am graduate student at the University of Missouri-Rolla, working on a
project in Embedded Systems.

I need to make an executable file (C object code) execute as soon as
QNX4.25 is started up. (Even before login prompt appears)

It would be great if somebody could tell me where and how to include the
path of this executable file to achieve this.

Thanks,
Sriharsha Patil.

Hi,
On the system I use, I execute the program right in the sysinit file
(/etc/config/sysinit.#) just before it tries to run tinit. I have actually
reconfigured my sysinit to start
the Photon graphics drivers almost immediately, start up some other drivers
(Input, serial, etc) then start the window manager, without the need to log
in.

Basically the sysinit file is what you want to modify. I would “export
PATH=$PATH;/mypath” somewhere in that file to add the path to my executable
to the PATH environment variable somewhere near the beginning of the sysinit
file. The next file that it might run (if you use Photon) is ph. This is
just a script that starts up drivers, and runs the windows manager. Near
the end of this file, you could add whatever calls to execute a program that
might be Photon based if you wish. (I don’t remember where ph is by default,
it might be /bin or /usr/bin)

That’s just what I do, I’m sure there are other ways to do what you want.
But I find it easier to modify these files to do what I want them to.

Ron


“Sriharsha Patil” <spatil@umr.edu> wrote in message
news:901hgs$es$1@inn.qnx.com

I am graduate student at the University of Missouri-Rolla, working on
a
project in Embedded Systems.

I need to make an executable file (C object code) execute as soon as
QNX4.25 is started up. (Even before login prompt appears)

It would be great if somebody could tell me where and how to include
the
path of this executable file to achieve this.

Thanks,
Sriharsha Patil.

Put it in /etc/config/sysinit.
This is sorta like DOS autoexec.bat

-Bruce.

Sriharsha Patil wrote:

I am graduate student at the University of Missouri-Rolla, working on a
project in Embedded Systems.

I need to make an executable file (C object code) execute as soon as
QNX4.25 is started up. (Even before login prompt appears)

It would be great if somebody could tell me where and how to include the
path of this executable file to achieve this.

Thanks,
Sriharsha Patil.


If you just try long enough and hard enough, you can always manage to
boot yourself in the posterior.
– A.J. Liebling, “The Press”

You could go one step further and put your program in
the image. (/boot/build/install.X)

But then your program won’t be able to do much, nor
can it be very big. boot file can’t be bigger then ~620k.

“Bruce Edge” <bedge@sattel.com> wrote in message
news:3A244E40.A434B006@sattel.com

Put it in /etc/config/sysinit.<node number
This is sorta like DOS autoexec.bat

-Bruce.

Sriharsha Patil wrote:

I am graduate student at the University of Missouri-Rolla, working
on a
project in Embedded Systems.

I need to make an executable file (C object code) execute as soon as
QNX4.25 is started up. (Even before login prompt appears)

It would be great if somebody could tell me where and how to include
the
path of this executable file to achieve this.

Thanks,
Sriharsha Patil.


If you just try long enough and hard enough, you can always manage to
boot yourself in the posterior.
– A.J. Liebling, “The Press”