cancel
Showing results for 
Search instead for 
Did you mean: 

How can I made a script runs automatically immediatly after boot finished?

MBassi
Associate III

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"

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @MBassi​ ,

Please can you check the answer on this topic.

It seems to be the same use case as yours.

Let me know if it helps you or if you need more support.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Erwan SZYMANSKI
ST Employee

Hello @MBassi​ ,

Please can you check the answer on this topic.

It seems to be the same use case as yours.

Let me know if it helps you or if you need more support.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MBassi
Associate III

Hi @Erwan SZYMANSKI​ 

Thank you for the answer, the topic you linked resolved my question.

Regards

Marco.