Skip to content

Commit

Permalink
board: pluto|m2k: Add hook in init.d to run user application code
Browse files Browse the repository at this point in the history
Addresses Issue: analogdevicesinc/plutosdr-fw#74

Signed-off-by: Michael Hennerich <[email protected]>
  • Loading branch information
mhennerich committed Mar 20, 2023
1 parent be38b5a commit 1e4f7b5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions board/m2k/post-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ${INSTALL} -D -m 0755 ${BOARD_DIR}/../pluto/S23udc ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/../pluto/S40network ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/../pluto/S41network ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/../pluto/S45msd ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/../pluto/S98autostart ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0644 ${BOARD_DIR}/../pluto/fw_env.config ${TARGET_DIR}/etc/
${INSTALL} -D -m 0644 ${BOARD_DIR}/VERSIONS ${TARGET_DIR}/opt/
${INSTALL} -D -m 0644 ${BOARD_DIR}/m2k-calib.ini ${TARGET_DIR}/opt/
Expand Down
21 changes: 21 additions & 0 deletions board/pluto/S98autostart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh
#
# Script to check for and run user-supplied /mnt/jffs2/autorun.sh
#

case "$1" in
start)
if test -f /mnt/jffs2/autorun.sh; then
source /mnt/jffs2/autorun.sh
fi
;;
stop)
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?
1 change: 1 addition & 0 deletions board/pluto/post-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ ${INSTALL} -D -m 0755 ${BOARD_DIR}/S23udc ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/S40network ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/S41network ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/S45msd ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0755 ${BOARD_DIR}/S98autostart ${TARGET_DIR}/etc/init.d/
${INSTALL} -D -m 0644 ${BOARD_DIR}/fw_env.config ${TARGET_DIR}/etc/
${INSTALL} -D -m 0644 ${BOARD_DIR}/VERSIONS ${TARGET_DIR}/opt/
${INSTALL} -D -m 0755 ${BOARD_DIR}/device_reboot ${TARGET_DIR}/usr/sbin/
Expand Down

0 comments on commit 1e4f7b5

Please sign in to comment.