initscripts : remove bootup.
authorhschang <chang@dev3>
Tue, 5 Feb 2013 05:44:41 +0000 (14:44 +0900)
committerhschang <chang@dev3>
Wed, 6 Feb 2013 06:58:33 +0000 (15:58 +0900)
meta-bsp/common/recipes/vuplus/vuplus-bootlogo.bb
meta-bsp/common/recipes/vuplus/vuplus-bootlogo/vuplus-bootlogo.sysvinit [new file with mode: 0644]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/bm750/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuduo2/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuplus/halt
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootmisc.sh [new file with mode: 0755]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo2/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuultimo/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuuno/bootup_3.1 [deleted file]
meta-openvuplus/recipes-core/initscripts/initscripts_1.0.bbappend

index c57e440..2fc21ef 100644 (file)
@@ -1,29 +1,45 @@
 DESCRIPTION = "Bootlogo support"
 SECTION = "base"
+LICENSE = "CLOSED"
 PRIORITY = "required"
-LICENSE = "proprietary"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28"
 
 IMAGES_VERSION = "1"
 BINARY_VERSION = "7"
 
 PV = "${BINARY_VERSION}.${IMAGES_VERSION}"
-PR = "r5"
+PR = "r6"
 
-SRC_URI = "file://bootlogo.mvi file://backdrop.mvi file://bootlogo_wait.mvi file://switchoff.mvi"
+#SRC_URI = "file://bootlogo.mvi file://backdrop.mvi file://bootlogo_wait.mvi file://switchoff.mvi"
+SRC_URI = "file://bootlogo.mvi file://backdrop.mvi file://bootlogo_wait.mvi"
 
 S = "${WORKDIR}/"
-
-MVI = "bootlogo backdrop bootlogo_wait"
+PACKAGES = "${PN}"
+INHIBIT_PACKAGE_STRIP = "1"
 
 do_install() {
-       install -d ${D}/boot
+       install -d ${D}/boot ${D}${datadir}/${PN}
        install -d ${D}/usr/share
-       for i in ${MVI}; do
-               install -m 0755 ${S}/$i.mvi ${D}/usr/share/$i.mvi;
-               ln -sf /usr/share/$i.mvi ${D}/boot/$i.mvi;
-       done;
+       for file in *.mvi; do
+                install -m 0644 $file ${D}${datadir}/${PN}
+                ln -s ${PN}/$file ${D}${datadir}
+               ln -sf ${datadir}/${PN}/$file ${D}/boot/$file;
+        done
 }
 
 PACKAGE_ARCH := "${MACHINE_ARCH}"
-FILES_${PN} = "/boot /usr/share"
+FILES_${PN} = "/boot ${datadir} ${sysconfdir}"
+
+inherit update-rc.d
+
+INITSCRIPT_PARAMS = "start 5 S . stop 89 0 ."
+INITSCRIPT_NAME = "${PN}"
+
+SRC_URI += "file://${INITSCRIPT_NAME}.sysvinit"
+
+do_install_append() {
+        if [ -f ${WORKDIR}/${INITSCRIPT_NAME}.sysvinit ]; then
+                install -d ${D}${INIT_D_DIR}
+                install -m 0755 ${WORKDIR}/${INITSCRIPT_NAME}.sysvinit ${D}${INIT_D_DIR}/${INITSCRIPT_NAME}
+        fi
+}
+
diff --git a/meta-bsp/common/recipes/vuplus/vuplus-bootlogo/vuplus-bootlogo.sysvinit b/meta-bsp/common/recipes/vuplus/vuplus-bootlogo/vuplus-bootlogo.sysvinit
new file mode 100644 (file)
index 0000000..c6afb46
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+SHOWIFRAME=/usr/bin/showiframe
+
+test -x $SHOWIFRAME || exit 0
+
+case "$1" in
+  start)
+    # first boot?
+    [ -f /etc/dropbear/dropbear_rsa_host_key ] && LOGO=bootlogo || LOGO=bootlogo_wait
+    echo -n "Displaying $LOGO"
+    (
+      while [ ! -c /dev/dvb/adapter0/video0 ]; do
+        usleep 100000
+      done
+      $SHOWIFRAME /usr/share/vuplus-bootlogo/$LOGO.mvi
+    ) &
+    echo "."
+    ;;
+  stop)
+    LOGO=/usr/share/vuplus-bootlogo/switchoff.mvi
+    [ -f $LOGO ] && $SHOWIFRAME $LOGO
+    ;;
+  restart)
+    ;;
+  *)
+    echo "Usage: /etc/init.d/vuplus-bootlogo {start|stop|restart}"
+    exit 1
+esac
+
+exit 0
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/bm750/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/bm750/bootup_3.1
deleted file mode 100755 (executable)
index 5373396..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#double check driver
-if lsmod | grep -q 'brcmfb'; then
-        echo driver is installed
-else
-       for mod in procmk dvb-bcm7335 brcmfb; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M 128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuduo2/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuduo2/bootup_3.1
deleted file mode 100755 (executable)
index 4775c37..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#Double check driver existence
-if lsmod | grep -q 'brcmfb'; then      
-        echo driver is installed  
-else                           
-       for mod in procmk dvb-bcm7424 brcmfb fpga_directc; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
-
index e31ef66..830122f 100755 (executable)
@@ -1,9 +1,13 @@
-#! /bin/sh
-#
-# halt         Execute the halt command.
-#
-# Version:      @(#)halt  2.84-2  07-Jan-2002  miquels@cistron.nl
-#
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          halt
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:      0
+# Short-Description: Execute the halt command.
+# Description:
+### END INIT INFO
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
@@ -20,8 +24,6 @@ then
        hddown=""
 fi
 
-showiframe /usr/share/switchoff.mvi
-
 /usr/bin/turnoff_power
 
 halt -d -f -i -p $hddown
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootmisc.sh b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootmisc.sh
new file mode 100755 (executable)
index 0000000..c2a9536
--- /dev/null
@@ -0,0 +1,92 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          bootmisc
+# Required-Start:    $local_fs mountvirtfs
+# Required-Stop:     $local_fs
+# Default-Start:     S
+# Default-Stop:      0 6
+# Short-Description: Misc and other.
+### END INIT INFO
+
+. /etc/default/rcS
+#
+# Put a nologin file in /etc to prevent people from logging in before
+# system startup is complete.
+#
+if test "$DELAYLOGIN" = yes
+then
+  echo "System bootup in progress - please wait" > /etc/nologin
+  cp /etc/nologin /etc/nologin.boot
+fi
+
+#
+# Set pseudo-terminal access permissions.
+#
+if test -c /dev/ttyp0
+then
+       chmod 666 /dev/tty[p-za-e][0-9a-f]
+       chown root:tty /dev/tty[p-za-e][0-9a-f]
+fi
+
+#
+# Apply /proc settings if defined
+#
+SYSCTL_CONF="/etc/sysctl.conf"
+if [ -f "${SYSCTL_CONF}" ]
+then
+       if [ -x "/sbin/sysctl" ]
+       then
+               /sbin/sysctl -p "${SYSCTL_CONF}"
+       else
+               echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
+       fi
+fi
+
+#
+# Update /etc/motd.
+#
+if test "$EDITMOTD" != no
+then
+       uname -a > /etc/motd.tmp
+       sed 1d /etc/motd >> /etc/motd.tmp
+       mv /etc/motd.tmp /etc/motd
+fi
+
+#
+# This is as good a place as any for a sanity check
+# /tmp should be a symlink to /var/tmp to cut down on the number
+# of mounted ramdisks.
+if test ! -L /tmp && test -d /var/tmp
+then
+       rm -rf /tmp
+       ln -sf /var/tmp /tmp
+fi
+
+# Set the system clock from hardware clock
+# If the timestamp is more recent than the current time,
+# use the timestamp instead.
+test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
+if test -e /etc/timestamp
+then
+       SYSTEMDATE=`date -u +%4Y%2m%2d%2H%2M`
+       read TIMESTAMP < /etc/timestamp
+       if [ ${TIMESTAMP} -gt $SYSTEMDATE ]; then
+               date -u ${TIMESTAMP#????}${TIMESTAMP%????????}
+               test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh stop
+       fi
+fi
+
+#solo has only usb port. Needs a delay for usb pvr
+count=1
+while [ $count -le 5 ]
+do
+   let count=$count+1
+   if [ -e /dev/sda1 ]; then
+      echo count, $count
+      echo "External USB HDD will be mounted on /media/hdd"
+      break;
+   fi;
+   sleep 1
+done
+
+: exit 0
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo/bootup_3.1
deleted file mode 100755 (executable)
index 5673133..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#double check driver
-if lsmod | grep -q 'brcmfb'; then
-        echo driver is installed
-else
-       for mod in procmk dvb-bcm7325 brcmfb; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-#Solo has only usb port. Needs a delay for usb pvr
-count=1
-while [ $count -le 5 ]
-do
-   let count=$count+1
-   if [ -e /dev/sda1 ]; then 
-      echo count, $count
-      echo "External USB HDD will be mounted on /media/hdd"
-      break;  
-   fi; 
-   sleep 1 
-done
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M 128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
-
-
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo2/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vusolo2/bootup_3.1
deleted file mode 100755 (executable)
index e08dc3f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#Double check driver existence
-if lsmod | grep -q 'brcmfb'; then      
-        echo driver is installed  
-else                           
-       for mod in procmk dvb-bcm7356 brcmfb fpga_directc; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
-
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuultimo/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuultimo/bootup_3.1
deleted file mode 100755 (executable)
index 8b28138..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#Double check driver existence
-if lsmod | grep -q 'brcmfb'; then      
-        echo driver is installed  
-else                           
-       for mod in procmk dvb-bcm7413 brcmfb fpga_directc; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
-
diff --git a/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuuno/bootup_3.1 b/meta-openvuplus/recipes-core/initscripts/initscripts-1.0/vuuno/bootup_3.1
deleted file mode 100755 (executable)
index 7aa3413..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#double check driver
-if lsmod | grep -q 'brcmfb'; then
-        echo driver is installed
-else
-       for mod in procmk dvb-bcm7413 brcmfb fpga_directc; do
-               modprobe $mod
-       done
-fi
-
-depmod -A
-
-# sleep after 10min
-hdparm -S 120 /dev/sda
-
-# accustic management
-hdparm -M128 /dev/sda
-
-if [ ! -h /boot/bootlogo.mvi ]; then                                                                                               
-        ln -sf /usr/share/bootlogo.mvi /boot/bootlogo.mvi                                                                          
-fi                                                                                                                                 
-                                                                                                                                   
-if [ ! -h /boot/bootlogo_wait.mvi ]; then                                                                                          
-        ln -sf /usr/share/bootlogo_wait.mvi /boot/bootlogo_wait.mvi                                                                
-fi                                                                                                                                 
-                                     
-if [ ! -h /boot/backdrop.mvi ]; then                                                                                               
-        ln -sf /usr/share/backdrop.mvi /boot/backdrop.mvi
-fi
-
-[ -e /etc/dropbear/dropbear_rsa_host_key ] && /usr/bin/showiframe /boot/bootlogo.mvi || /usr/bin/showiframe /boot/bootlogo_wait.mvi
-
-ipkg-cl configure
-
-if [ -f /usr/local/bin/vucamd ]; then
-       /usr/local/bin/vucamd &
-fi
-
index a9e4420..0059c2d 100644 (file)
@@ -1,6 +1,4 @@
-PR .= "-vuplus5"
-
-BOOTUP = "bootup_3.1" 
+PR .= "-vuplus6"
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:"
 
@@ -8,7 +6,6 @@ SRC_URI_append = " \
        file://turnoff_power \
        file://hotplug_br \
        file://make_mac_sector \
-       file://${BOOTUP} \
        file://mountrun.sh \
 "
 
@@ -19,8 +16,6 @@ do_install_append() {
        install -m 0755 ${WORKDIR}/turnoff_power     ${D}/usr/bin
        install -m 0755 ${WORKDIR}/hotplug_br        ${D}/usr/bin
        install -m 0755 ${WORKDIR}/make_mac_sector   ${D}/usr/bin
-       install -m 0755 ${WORKDIR}/${BOOTUP}         ${D}${sysconfdir}/init.d/bootup
-       ln      -sf     ../init.d/bootup             ${D}${sysconfdir}/rcS.d/S05bootup
 
        install -m 0755 ${WORKDIR}/mountrun.sh ${D}${sysconfdir}/init.d
         ln -s ../init.d/mountrun.sh ${D}${sysconfdir}/rcS.d/S02mountrun.sh