diff --git a/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/S10udev b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/S10udev new file mode 100644 index 0000000..4e799d6 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/S10udev @@ -0,0 +1,46 @@ +#!/bin/sh +# +# udev This is a minimal non-LSB version of a UDEV startup script. It +# was derived by stripping down the udev-058 LSB version for use +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. +# +# You may need to customize this for your system's resource limits +# (including startup time!) and administration. For example, if +# your early userspace has a custom initramfs or initrd you might +# need /dev much earlier; or without hotpluggable busses (like USB, +# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. +# +# This script assumes your system boots right into the eventual root +# filesystem, and that init runs this udev script before any programs +# needing more device nodes than the bare-bones set -- /dev/console, +# /dev/zero, /dev/null -- that's needed to boot and run this script. +# + +# Check for config file and read it +UDEV_CONFIG=/etc/udev/udev.conf +test -r $UDEV_CONFIG || exit 6 +. $UDEV_CONFIG + +case "$1" in + start) + printf "Populating %s using udev: " "${udev_root:-/dev}" + [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevd -d || { echo "FAIL"; exit 1; } + udevadm trigger --type=subsystems --action=add + udevadm trigger --type=devices --action=add + udevadm settle --timeout=30 || echo "udevadm settle failed" + echo "done" + ;; + stop) + # Stop execution of events + udevadm control --stop-exec-queue + killall udevd + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + + +exit 0 diff --git a/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcK b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcK new file mode 100644 index 0000000..59e9c54 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcK @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i stop + ;; + esac +done + diff --git a/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcS b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcS new file mode 100644 index 0000000..de41153 --- /dev/null +++ b/board/myna-player-odyssey/rootfs_overlay/etc/init.d-overlay/rcS @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + # No sh extension, so fork subprocess. + $i start + ;; + esac +done + diff --git a/board/myna-player-odyssey/scripts/rootfs_postbuild.sh b/board/myna-player-odyssey/scripts/rootfs_postbuild.sh index 9333c86..be85add 100755 --- a/board/myna-player-odyssey/scripts/rootfs_postbuild.sh +++ b/board/myna-player-odyssey/scripts/rootfs_postbuild.sh @@ -4,6 +4,12 @@ . "${BR2_EXTERNAL_MynaPlayer_PATH}"/scripts/certs.sh +# remove /etc/init.d and replace with the one copied from overlay + +rm -rf "${TARGET_DIR}"/etc/init.d +mv "${TARGET_DIR}"/etc/init.d-overlay \ + "${TARGET_DIR}"/etc/init.d + # copy changelog into the target cp "${BR2_EXTERNAL_MynaPlayer_PATH}"/changelog.md \