How to run my app on system boot up

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run my app on system boot up

315 Views
xuehuili
Contributor I

I use the P1020RDB-PC and the SDK(1.3.2 fsl-image-minimal), I compil the helloworld.c to a exec file, copy it to nandflash /dev/mtdblock10. My u-boot, uImage, rootfs write to norflsh and boot from it.

I use these command to download and run the app:

$mount -t jffs2 /dev/mtdblock10 ./tmp

$cd tmp

$tftp -g -r hellword 10.10.10.1

$./helloworld

how to configure and rebuild the image for auto run the helloworld on linux boot up?

Labels (1)
0 Kudos
2 Replies

108 Views
bpe
NXP TechSupport
NXP TechSupport

Add a script that runs your executable in /etc/rc5.d/. The name of the script should start with 'S' followed by a number.

The link below offers more theory about init and init scripts:

Linux Knowledge Base and Tutorial

Visit the FAQ list below to see how to add files to the root filesystem. Alternately, you can add a patch to 'initscripts' package.

FAQ

Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

108 Views
xuehuili
Contributor I

I have add the script to rc5.d, and the app can be run at the system boot up. How to add the script to yocto SDK and rebuild the new image?

0 Kudos