How can I made a script runs automatically immediatly after boot finished?
Hi,
I'm using OpenST-linux version 4.9 on a STM32MP157c-ev1 and I wrote a simple script to run my firmware for Core M4. I would like to know how I can make the script run automatically after system boot.
Here's my script if could of any help for answers, I wrote it following this guide, I tested it launching manually and it works, but now I would like to it runs automatically after system finishes booting. How can I do?
Regards
Marco
#! /bin/sh
################### CONFIGURATION VARIABLES ###################################################
FIRMAWARE_PATH="/lib/firmware/"
M4_FIRMWARE_NAME="xmi_ccu-test_CM4.elf"
REMOTE_PROCESSOR="remoteproc0"
########################### SCRIPT BODY ######################################################
# Add firmware path if different then /lib/firmware
if [ $FIRMAWARE_PATH != "/lib/firmware/" ]; then
echo -n $FIRMAWARE_PATH$FIRMAWARE_PATH > "/sys/module/firmware_class/parameters/path"
fi
# Load firmware
echo -n $M4_FIRMWARE_NAME > "/sys/class/remoteproc/$REMOTE_PROCESSOR/firmware"
# Start firmware
echo start > "/sys/class/remoteproc/$REMOTE_PROCESSOR/state"