Forum Discussion
Altera_Forum
Honored Contributor
22 years agoStarting up an APP after linux bootup
Hi people
I have just gotten my uCLinux kernel up and running. But now I want to start up some apps after the boot sequence has finished. This ofcourse should be done automatically. I have tried looking around on some pages on the inet and they all seem to be talking about /etc/inittab and how to start up apps with that. So I have tried making an microtronix linux filesystem that I can acces uppon bootup. My problem is that when the kernel has booted it dos not call this inittab. Is there some other way of starting up my apps in uCLinux???? Hope someone can help me out here Best regards GreateWhite.DK2 Replies
- Altera_Forum
Honored Contributor
Hi
Have found it. It is in the /init/main.c in the bottom. GreateWhite.DK - Altera_Forum
Honored Contributor
Hi GreateWhite.DK,
I have done this work by putting the app to be started into /etc/rc for standard filesystem, or into /etc/init.d/rcS for busybox based filesystem. For example, my /etc/rc file looks like as the following: <div class='quotetop'>QUOTE </div> --- Quote Start --- #!/bin/sh# # system startup. # set up the hostname /usr/apps/mytestapp /bin/hostname Nios2 . . .[/b] --- Quote End --- By this way mytestapp is started immediatly after the root filesystem is mounted. Anyway, what do you mean exactly when you say that inittab is not called when the kernel boots ? The inittab should looks like <div class='quotetop'>QUOTE </div> --- Quote Start --- # inittab for uClinux# Format:# ttyline:termcap-entry:getty-command ttyS0:vt100:/bin/agetty 115200 ttyS0 . .[/b] --- Quote End --- If the inittab is not executed I think that you are also unable to get the login prompt on the console. If you have modified the inittab or rc file, make sure to use dos2unix cmd before building the filesystem. Fab