Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Starting up an APP after linux bootup

Altera_Forum
Honored Contributor II
1,693 Views

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.DK
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
657 Views

Hi 

 

Have found it. It is in the /init/main.c in the bottom. 

 

GreateWhite.DK
0 Kudos
Altera_Forum
Honored Contributor II
657 Views

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
0 Kudos
Reply