Written by Holguer Andres

Requirements:

  1. DE0-NANO-SOC with and SD-CARD preloaded with the following Linux Image (compiled and customized by Holguer Andres).
  2. Putty

Procedure:

  • Using putty open the Linux Terminal through the UART port at 115200 bps.
  • On the Console type:
    nano /etc/inittab​

  • As you can observe in the next image, and highlighted in red, all the initial system processes init with ":sysinit:" and next to this a command or a script that is going to be run on the initialization of the system.

     

  • To see how it works, we are going to modify the file rcS by typing the following:

    nano /etc/init.d/rcS
    
  • once you have typed the previous console line, the nano editor is going to show you on the console the file rcS, and you are going to add the line highlighted in red 'fpgalover.com'

  •  Now save and exit.

  • Type on the console 'reboot' to restart the system

    reboot
  •  once the system is relaunched, you will see at the beginning a new line message that contains what you just have written on the rcS file.

  • Now it is your time to add your own script to the inittab file and execute what you desire!

 

 References

  1. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Installation_Guide/s1-boot-init-shutdown-sysv.html
  2. http://stackoverflow.com/questions/10408816/how-do-i-use-the-nohup-command-without-getting-nohup-out