Linux Startup scripts are really important for Embedded Linux systems. Application services should start directly after a boot. This is particularly necessary because rsyocto has a watchdog timer activated and the system can therefore restart unexpectedly. For this reason, three possible ways to activate startup scripts are shown.
- For that the tool
udate-rc.d
(see here) is pre-installed - Create a new Linux Shell script remotely with Microsoft Visual Studio Code Insider or with
nano
nano /etc/init.d/myScript.h
- Write the script
#!/bin/sh # Your script echo "Hello SoC-FPGA"
- Activate the script at startup
chmod +x /etc/init.d/myScript.h update-rc.d myScript.h defaults 100
With the rsyocto building script it is possible to add startup scripts into an image file. That was shown, as well.
For the development of rsyocto I designed a simple way to import startup scripts with the Yocto project. This is a part of the meta-intelfpga
-layer (see here).