Browse Source

- skel-root: move mdev section to own init script

master
vanhofen 5 years ago
parent
commit
8697984298
  1. 4
      make/target-scripts.mk
  2. 27
      skel-root/general/scripts/mdev.init
  3. 18
      skel-root/hd1/etc/init.d/rcS
  4. 18
      skel-root/hd2/etc/init.d/rcS
  5. 18
      skel-root/hd51/etc/init.d/rcS
  6. 18
      skel-root/vuduo/etc/init.d/rcS
  7. 18
      skel-root/vuplus/etc/init.d/rcS

4
make/target-scripts.mk

@ -16,6 +16,7 @@ init-scripts: \
$(TARGET_DIR)/etc/init.d/fstab \
$(TARGET_DIR)/etc/init.d/hostname \
$(TARGET_DIR)/etc/init.d/inetd \
$(TARGET_DIR)/etc/init.d/mdev \
$(TARGET_DIR)/etc/init.d/networking \
$(TARGET_DIR)/etc/init.d/partitions-by-name \
$(TARGET_DIR)/etc/init.d/resizerootfs \
@ -70,6 +71,9 @@ $(TARGET_DIR)/etc/init.d/inetd:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/inetd.init $(@)
$(UPDATE-RC.D) $(@F) defaults 50
$(TARGET_DIR)/etc/init.d/mdev:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/mdev.init $(@)
$(TARGET_DIR)/etc/init.d/networking:
$(INSTALL_EXEC) -D $(TARGET_FILES)/scripts/networking.init $(@)
$(UPDATE-RC.D) $(@F) stop 98 0 6 .

27
skel-root/general/scripts/mdev.init

@ -0,0 +1,27 @@
#!/bin/sh
. /etc/init.d/functions
. /etc/init.d/globals
case "$1" in
start)
LOGINFO "mdev coldplug ..."
echo > /dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
;;
*)
echo "[$BASENAME] Usage: $0 {start}"
;;
esac

18
skel-root/hd1/etc/init.d/rcS

@ -82,22 +82,8 @@ if [ -x /etc/init.d/sys_update.sh ]; then
/etc/init.d/sys_update.sh
fi
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
# mdev coldplug for node permissions
service mdev start
# initialize hardware
LOGINFO "init hardware ..."

18
skel-root/hd2/etc/init.d/rcS

@ -77,22 +77,8 @@ service hostname start
# logging as much as possible
service syslogd start
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
# mdev coldplug for node permissions
service mdev start
# load modules / create nodes
load_module extra/lnxplatnativeDrv.ko

18
skel-root/hd51/etc/init.d/rcS

@ -80,22 +80,8 @@ load_module extra/%(BOXMODEL)_4.ko
# show bootlogo
showiframe.sh bootlogo.m2v
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
# mdev coldplug for node permissions
service mdev start
service networking start
service ntpdate start

18
skel-root/vuduo/etc/init.d/rcS

@ -76,22 +76,8 @@ load_module extra/procmk.ko
# show bootlogo
showiframe.sh bootlogo.m2v
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
# mdev coldplug for node permissions
service mdev start
service networking start
service ntpdate start

18
skel-root/vuplus/etc/init.d/rcS

@ -74,22 +74,8 @@ service vuplus-platform-util start
# show bootlogo
showiframe.sh bootlogo.m2v
## mdev coldplug for node permissions
LOGINFO "mdev coldplug ..."
echo >/dev/mdev.seq
echo $(which mdev) > /proc/sys/kernel/hotplug
mdev -s
# mdev -s does not poke usb devices, so we need to do it here.
LOGINFO "scanning /sys/bus/usb/devices/ to help mdev with usb-coldplug"
for i in /sys/bus/usb/devices/*; do
case "${i##*/}" in
*-*:1.0)
LOGINFO "usb device $i found"
echo add >$i/uevent
;;
esac
done
# mdev coldplug for node permissions
service mdev start
service networking start
service ntpdate start

Loading…
Cancel
Save