auto run script while boot up

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

auto run script while boot up

663 Views
afreenmusarrath23
Contributor I

hi 

i'm facing issue in running simple script while boot up on imx8mm mini board

these are the changes i have made 

in init.imx8mm.rc --> 

on property:sys.boot_completed=1
start init-myservice-sh

service init-myservice-sh /vendor/bin/sh /vendor/bin/init.myscript.sh
class main
user root
group root system
disabled
oneshot

in evk8mm.mk

#Script
PRODUCT_COPY_FILES += \
device/fsl/imx8m/evk_8mm/init.myscript.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.myscript.sh

 

and my script is in vendor/bin/

 

what else changes do i need to make for running a script automtically

0 Kudos
Reply
1 Reply

647 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

1.sepolicy/file_contexts

/vendor/bin/init.myscript.sh u:object_r:init-myservice-sh_exec:s0

2.te

 

type init-myservice-sh, domain;
type init-myservice-sh_exec, exec_type, file_type;
#init_daemon_domain(rftoolcopy)

allow init-myservice-sh shell_exec:file { getattr open read };
#allow rftoolcopy toolbox_exec:file { getattr execute read open execute_no_trans };
allow init-myservice-sh storage_file:lnk_file { read   };
allow init-myservice-sh tmpfs:dir { search  };
allow init-myservice-sh mnt_user_file:dir { search  };
allow init-myservice-sh mnt_user_file:lnk_file {  read };
.......
.......

 

 

0 Kudos
Reply