From 77414ccb7779c5b6cd86fe38ebf1af924574a7c4 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Wed, 11 Sep 2019 23:16:18 +0300 Subject: [PATCH] Raspberry Pi (all): add S07dtoverlays init script --- .../overlay/etc/init.d/S07dtoverlays | 41 +++++++++++++++++++ .../overlay/etc/init.d/S07dtoverlays | 41 +++++++++++++++++++ .../overlay/etc/init.d/S07dtoverlays | 41 +++++++++++++++++++ .../overlay/etc/init.d/S07dtoverlays | 41 +++++++++++++++++++ 4 files changed, 164 insertions(+) create mode 100755 board/raspberrypi/overlay/etc/init.d/S07dtoverlays create mode 100755 board/raspberrypi2/overlay/etc/init.d/S07dtoverlays create mode 100755 board/raspberrypi3/overlay/etc/init.d/S07dtoverlays create mode 100755 board/raspberrypi4/overlay/etc/init.d/S07dtoverlays diff --git a/board/raspberrypi/overlay/etc/init.d/S07dtoverlays b/board/raspberrypi/overlay/etc/init.d/S07dtoverlays new file mode 100755 index 0000000000..9b67103d53 --- /dev/null +++ b/board/raspberrypi/overlay/etc/init.d/S07dtoverlays @@ -0,0 +1,41 @@ +#!/bin/bash + +SYS_DTOVERLAYS_FILE="/etc/dtoverlays" +BOOT_DTOVERLAYS_FILE="/boot/dtoverlays" +DTOVERLAYS_FILE="/data/etc/dtoverlays" + +PROG="/usr/bin/dtoverlay" + + +test -n "${OS_VERSION}" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Loading device-tree overlays" + + if [[ -r ${SYS_DTOVERLAYS_FILE} ]]; then + cat ${SYS_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${BOOT_DTOVERLAYS_FILE} ]]; then + cat ${BOOT_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${DTOVERLAYS_FILE} ]]; then + cat ${DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi2/overlay/etc/init.d/S07dtoverlays b/board/raspberrypi2/overlay/etc/init.d/S07dtoverlays new file mode 100755 index 0000000000..9b67103d53 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/init.d/S07dtoverlays @@ -0,0 +1,41 @@ +#!/bin/bash + +SYS_DTOVERLAYS_FILE="/etc/dtoverlays" +BOOT_DTOVERLAYS_FILE="/boot/dtoverlays" +DTOVERLAYS_FILE="/data/etc/dtoverlays" + +PROG="/usr/bin/dtoverlay" + + +test -n "${OS_VERSION}" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Loading device-tree overlays" + + if [[ -r ${SYS_DTOVERLAYS_FILE} ]]; then + cat ${SYS_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${BOOT_DTOVERLAYS_FILE} ]]; then + cat ${BOOT_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${DTOVERLAYS_FILE} ]]; then + cat ${DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi3/overlay/etc/init.d/S07dtoverlays b/board/raspberrypi3/overlay/etc/init.d/S07dtoverlays new file mode 100755 index 0000000000..9b67103d53 --- /dev/null +++ b/board/raspberrypi3/overlay/etc/init.d/S07dtoverlays @@ -0,0 +1,41 @@ +#!/bin/bash + +SYS_DTOVERLAYS_FILE="/etc/dtoverlays" +BOOT_DTOVERLAYS_FILE="/boot/dtoverlays" +DTOVERLAYS_FILE="/data/etc/dtoverlays" + +PROG="/usr/bin/dtoverlay" + + +test -n "${OS_VERSION}" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Loading device-tree overlays" + + if [[ -r ${SYS_DTOVERLAYS_FILE} ]]; then + cat ${SYS_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${BOOT_DTOVERLAYS_FILE} ]]; then + cat ${BOOT_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${DTOVERLAYS_FILE} ]]; then + cat ${DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi4/overlay/etc/init.d/S07dtoverlays b/board/raspberrypi4/overlay/etc/init.d/S07dtoverlays new file mode 100755 index 0000000000..9b67103d53 --- /dev/null +++ b/board/raspberrypi4/overlay/etc/init.d/S07dtoverlays @@ -0,0 +1,41 @@ +#!/bin/bash + +SYS_DTOVERLAYS_FILE="/etc/dtoverlays" +BOOT_DTOVERLAYS_FILE="/boot/dtoverlays" +DTOVERLAYS_FILE="/data/etc/dtoverlays" + +PROG="/usr/bin/dtoverlay" + + +test -n "${OS_VERSION}" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Loading device-tree overlays" + + if [[ -r ${SYS_DTOVERLAYS_FILE} ]]; then + cat ${SYS_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${BOOT_DTOVERLAYS_FILE} ]]; then + cat ${BOOT_DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + if [[ -r ${DTOVERLAYS_FILE} ]]; then + cat ${DTOVERLAYS_FILE} | while read line; do test -n "${line}" && ${PROG} ${line}; done + fi + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? +