Linux init

JFMartel
Hi,

First, I am quite new with linux but I have very good knowledge of embedded
programming.

I managed to build a nice GUI with Qt embedded 4.  Now I would like to have
it starting up automatically when Mini2440 device boots.

I did some research on init sequence of linux.  Everywhere there are notes
about /etc/inittab but I can't find this file on my device ?  Why ?  How
can linux boot successfuly without this file ?

I tried to add my executable in the rcS file.  The program fires at boot
but the touchscreen is not responding.  This is because I need to export
some variables before executing the program.  I added the export lines in
/etc/profile.  

When I kill the application and restart it manually, the touchscreen works.
 This tells me that the rcS file is executed before the profile variables
are exported... am I right ?

If so, how can I launch ma program at the total END of init of linux kernel
?

Thanks for the help

davef
Show us your rcS script.

After your application have you got a <&>

JFMartel
Hi, thanks for replying.

On the last line of my rcS file I add the following lines: (my app is
AVDistGui)


cd /home/AVDist
./AVDistGui -qws -display transformed:Rot90 &

In theory this works... it does if I enter manually.  As I said, the
program launches but without touchscreen...  It's very wierd.

Thanks in advance for helping.

davef
Can't see how the line that fires up Qtopia ends.  Haven't got my
FriendlyArm at work.

JFMartel
Ok,

I figured some things out.

/etc/profile contains systemwide definitions, such as environment variables
but it is "executed" only when a user logs in.
/etc/init.d/rcS is executed on linux initialization but I tried to export
environment variables without success.

I got two questions:
- Is it possible to have environment variables exported without having a
user logged-in ?

- If not, is it possible to have some kind of auto-login that would login a
user automatically at boot and run /etc/profile and fire my app
automatically with the touchscreen environment variables enabled.

Thanks to anyone who can help.

JFMartel
Finally.  I found the solution.

For those interested, if you wish to export environment variables, you can
do it in /etc/rcS.

Experience showed me that you have to do it in two parts.  First declare
the variable and then export it.

THE_VARIABLE=blah
export THE_VARIABLE

I did export all my environment variables before invoking my app and
everything works fine.  It fires and touchscreen works.

JF

lester
hi,

can somebody tell me why is my friendlyArm mini2440 is not responding??
please help me.

davef
You are going to have to give us more information then that!

Respond to what input?

ebi
hi,
how can i create a sample with qt creator
can i see a sample that runs in mini 2440

prettywolf
You can change FriendlyARM.ini to set Linux-CommandLine,add parameter
init=/sbin/init (this program is first run when kernel total END of init.