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?
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.
Have a great day,
Platon
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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?