Sorry, you need to enable JavaScript to visit this website.

Run linux user application automatically after boot

Unsolved
3 posts / 0 new
psullivan's picture
psullivan
Junior(0)
Run linux user application automatically after boot

I have followed the Zynq Concepts, Tools, and Techniques tutorial and have been able to run the linux hello world application on the sd card from the "zynq> " terminal prompt without issue. How would I get this or some other linux user application to run automatically after the zedboard boots up?

-Pat

TroutChaser's picture
TroutChaser
Moderator(18)
Take a look at this link to

Take a look at this link to stackoverflow on the subject:
 
http://stackoverflow.com/questions/17024197/run-application-program-afte...
 
-Gary

zedhed's picture
zedhed
Moderator(25)
RE: Run linux user application automatically after boot

Hi psullivan,

I am assuming that this is the 2013.2 CTT you are referring to.

One option that works well for me during prototyping is to modify your /etc/init.d/rcS file to mount the SD card under say /mnt and call a startup script. In fact, if you take a look at the following Wiki entry, it contains a Zynq ramdisk image which already has this modification I refer to:

http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs

If you use the are_ramdisk.image.gz image from this wiki page and rename it to overwrite the ramdisk8M.image.gz from the CTT, you can accomplish this rather quickly.

If you look at /etc/init.d/rcS in this ramdisk image, it will mount your SD card to /mnt and look for an init.sh script there. If init.sh exists on the SD card, it will run it automatically. Simply place your own init.sh onto the SD card and have it call the executable that you want to have launched after Linux boots.

Start with something simple in init.sh like this:

#!/bin/sh
echo "Hello ZedBoard"

And then work your way up from there.

Regards,

-Kevin