angstrom, exquisite, psplash, opkg, angsrtom-images, sysvinit: abstract splash
authorCarsten Haitzler (Rasterman <raster@rasterman.com>
Fri, 17 Apr 2009 05:44:58 +0000 (15:44 +1000)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Fri, 17 Apr 2009 05:48:45 +0000 (15:48 +1000)
this abstracts psplash to be generic. now as long as something provides a
splashfuncs file that sysvinit (and other scripts) can source, and all the
approproate init hooks to start the splash etc. you can use psplash,
exquisitie, usplash or anything that tickles your fancy. this moves splash
toa ${SPLASH} variable to include in your image (or override). the default in
angstrom is psplash - unless you override it. opkg also runs a configure
script that cna take forever - and so this speically sends off some splash
commands (if there) to let you know the systme is alive and working (but just
busy).

this is one commit as if this breaks things you either want to fix the minor
break or totally revert the whole patch. i hope it didn't break anything.

36 files changed:
conf/distro/angstrom-2008.1.conf
recipes/angstrom/angstrom-gpe-task-base.bb
recipes/e17/exquisite/exquisite-init
recipes/e17/exquisite/splashfuncs [new file with mode: 0644]
recipes/e17/exquisite_svn.bb
recipes/images/beagleboard-demo-image.bb
recipes/images/bootmanager-image.bb
recipes/images/gateway-image.bb
recipes/images/illume-image.bb
recipes/images/minimal-gpe-image.bb
recipes/images/minimal-image.bb
recipes/images/sdr-image.bb
recipes/images/sugar-image.bb
recipes/images/udumpty-image.bb
recipes/images/x11-gpe-image.bb
recipes/images/x11-gpe-java-image.bb
recipes/images/x11-image.bb
recipes/images/x11-office-image.bb
recipes/images/x11-pimlico-image.bb
recipes/initrdscripts/files/00-psplash.sh
recipes/initrdscripts/files/99-psplash.sh
recipes/initrdscripts/initramfs-module-psplash_1.0.bb
recipes/opie-init/opie-init/opie
recipes/opie-init/opie-init_1.2.2.bb
recipes/opkg/files/configure [new file with mode: 0644]
recipes/opkg/opkg-nogpg_svn.bb
recipes/opkg/opkg_svn.bb
recipes/psplash/files/psplash-init
recipes/psplash/files/splashfuncs [new file with mode: 0644]
recipes/psplash/files/zzapsplash-init
recipes/psplash/psplash-angstrom_svn.bb
recipes/psplash/psplash.inc
recipes/psplash/psplash_svn.bb
recipes/sysvinit/sysvinit/angstrom/rc
recipes/sysvinit/sysvinit_2.86.bb
recipes/tasks/task-base.bb

index 37cb8f0..a26a987 100644 (file)
@@ -237,7 +237,7 @@ DISTRO_EXTRA_RRECOMMENDS += " \
     avahi-daemon \
     avahi-autoipd \
     openssh-sftp-server \
-    ${@base_contains("MACHINE_FEATURES", "screen", "psplash-angstrom", "",d)} \
     ${DEBUG_APPS} \
 "
 
+SPLASH ?= ' ${@base_contains("MACHINE_FEATURES", "screen", "psplash-angstrom", "",d)}'
index f2c897d..4540fdd 100644 (file)
@@ -1,5 +1,5 @@
 DESCRIPTION = "Task packages for the Angstrom distribution"
-PR = "r37"
+PR = "r38"
 
 inherit task
 
index 1750184..2de6774 100644 (file)
@@ -28,13 +28,13 @@ case `machine_id` in
 esac
 args=$args" $FPS $THEME"
 
-export EXDIR=/mnt/.exquisite
+export EXDIR=/mnt/.splash
 export EXQUISITE_IPC=$EXDIR/exquisite
 mount tmpfs -t tmpfs $EXDIR -o,size=40k
 exquisite -fb -fs $args &
 
-exquisite-write -wait 40
+exquisite-write -wait 120
 exquisite-write "PULSATE"
-
-# kill off exquisite in 300 seconds if its not gone yet
-(sleep 300; exquisite-write "QUIT")&
+setterm -blank 0
+setterm -powersave off
+setterm -powerdown 0
diff --git a/recipes/e17/exquisite/splashfuncs b/recipes/e17/exquisite/splashfuncs
new file mode 100644 (file)
index 0000000..ada2a96
--- /dev/null
@@ -0,0 +1,29 @@
+status() {
+  if type splash-write >/dev/null 2>&1; then
+    (TMPDIR="/mnt/.splash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) &
+  fi
+}
+
+status_position() {
+  status "PROGRESS $1"
+}
+
+status_title() {
+  status "TITLE $1"
+}
+
+status_text() {
+  if test -n "$1"; then
+    status "MSG $1"
+  else
+    status "CLEAR"
+  fi
+}
+
+status_pulse() {
+  status "PULSATE"
+}
+
+status_tick() {
+  status "TICK"
+}
index e303600..ac4c6b5 100644 (file)
@@ -2,9 +2,10 @@ DESCRIPTION = "A psplash replacement for display"
 LICENSE = "MIT BSD"
 DEPENDS = "eet evas ecore embryo edje"
 PV = "0.0.1+svnr${SRCREV}"
-PR = "r3"
+PR = "r8"
 RDEPENDS = "initscripts"
 RRECOMMENDS_${PN} = "exquisite-themes"
+RCONFLICTS_${PN} = "psplash virtual/psplash"
 
 SRCNAME = "exquisite"
 
@@ -13,13 +14,18 @@ inherit e
 EXTRA_OECONF = "--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
 
 SRC_URI += "file://exquisite-init"
+SRC_URI += "file://splashfuncs"
 
 inherit update-rc.d
 
 do_install_prepend() {
-  install -d ${D}/mnt/.exquisite/
-  install -d ${D}${sysconfdir}/init.d/
+  install -d ${D}/mnt/.splash/
+  install -d ${D}${sysconfdir}/init.d
   install -m 0755 ${WORKDIR}/exquisite-init ${D}${sysconfdir}/init.d/exquisite
+  install -d ${D}${sysconfdir}/default
+  install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs
+  install -d ${D}${bindir}
+  ln -s exquisite-write ${D}${bindir}/splash-write
 }
 
 
@@ -30,4 +36,4 @@ do_install_append() {
 INITSCRIPT_NAME = "exquisite"
 INITSCRIPT_PARAMS = "start 01 S . stop 20 0 1 6 ."
 
-FILES_${PN} += "/mnt/.exquisite/"
+FILES_${PN} += "/mnt/.splash/"
index 4007dae..7d0e408 100644 (file)
@@ -18,6 +18,7 @@ IMAGE_INSTALL = "\
     ${XSERVER} \
     ${ANGSTROM_EXTRA_INSTALL} \
     task-beagleboard-demo \
+    ${SPLASH} \
     "
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index d829590..1f8c327 100644 (file)
@@ -1,7 +1,7 @@
 #Angstrom bootmanager image
 
 DEPENDS = "task-angstrom"
-IMAGE_INSTALL = "angstrom-base-depends angstrom-bootmanager"
+IMAGE_INSTALL = "angstrom-base-depends angstrom-bootmanager ${SPLASH}"
 
 export IMAGE_BASENAME = "bootmanager-image"
 
index ee9d1d9..8df21bc 100644 (file)
@@ -11,6 +11,7 @@ IMAGE_INSTALL = "task-boot \
             dnsmasq \
 #            vsftpd \
             angstrom-version \
+            ${SPLASH} \
           "
 
 export IMAGE_BASENAME = "gateway-image"
index 9c2b1be..3ab006a 100644 (file)
@@ -4,6 +4,9 @@
 
 IMAGE_LINGUAS = "en-us de-de fr-fr pt-br ca-es zh-cn zh-tw bg-bg cs-cz da-dk nl-nl fi-fi hu-hu it-it ja-jp ko-kr nb-no pl-pl ru-ru sk-sk sl-si es-ar sv-se"
 
+# use exquisite splash
+SPLASH = "exquisite exquisite-themes exquisite-theme-illume"
+
 # getting the base system up
 BASE_INSTALL = "\
   angstrom-libc-fixup-hack \
@@ -17,9 +20,6 @@ BASE_INSTALL = "\
   pointercal \
   tslib-conf \
 #  prelink \
-#  exquisite \
-#  exquisite-themes \
-#  exquisite-theme-illume \
 #  rsync \
 #  screen \
 #  fbset \
@@ -154,6 +154,7 @@ IMAGE_INSTALL = "\
 #  ${ZHONE_INSTALL} \
   ${APPS_INSTALL} \
   ${DEV_INSTALL} \
+  ${SPLASH} \
 "
 inherit image
 
index 5dd08f6..d71f9de 100644 (file)
@@ -17,6 +17,7 @@ IMAGE_INSTALL = "\
     gpe-terminal \
     angstrom-feed-configs \
     opkg-nogpg opkg-collateral \
+    ${SPLASH} \
     "
 
 #zap root password for release images
index e1635dc..0acb5f1 100644 (file)
@@ -11,6 +11,7 @@ IMAGE_INSTALL = "task-boot \
             ${DISTRO_SSH_DAEMON} \
             ${ANGSTROM_EXTRA_INSTALL} \
             angstrom-version \
+            ${SPLASH} \
           "
 
 export IMAGE_BASENAME = "minimalist-image"
index 9e0f4e6..8338a57 100644 (file)
@@ -43,6 +43,7 @@ IMAGE_INSTALL = " task-base-extended \
        uucp picocom \
        angstrom-zeroconf-audio avahi-utils \
        ${ANGSTROM_EXTRA_INSTALL} \
+        ${SPLASH} \
 "
 
 inherit image
index 4dbc167..2787f99 100644 (file)
@@ -10,6 +10,7 @@ IMAGE_INSTALL = "\
     angstrom-gpe-task-base \
     angstrom-gpe-task-settings \
     sugar-sucrose \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index c55381e..e581a8e 100644 (file)
@@ -43,6 +43,7 @@ IMAGE_INSTALL = "\
        gnome-control-center \
        gnome-settings-daemon \
        gnome-session \
+    ${SPLASH} \
 "
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index 7b272f6..03c9761 100644 (file)
@@ -16,6 +16,7 @@ IMAGE_INSTALL = "\
     kernel-modules \
     hal \
     angstrom-gpe-task-pim \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 
index fcc022c..b8904e3 100644 (file)
@@ -18,6 +18,7 @@ IMAGE_INSTALL = "\
     kernel-modules \
     hal \
     angstrom-gpe-task-pim \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index 093e0c5..7c632e3 100644 (file)
@@ -12,6 +12,7 @@ IMAGE_INSTALL = "\
     angstrom-x11-base-depends \
     angstrom-gpe-task-base \
     angstrom-gpe-task-settings \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index 48799d8..66cc762 100644 (file)
@@ -21,6 +21,7 @@ IMAGE_INSTALL = "\
     claws-mail claws-mail claws-plugin-mailmbox claws-plugin-rssyl \
     midori minimo \
     gphoto2 \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index 79dcacc..e16eb51 100644 (file)
@@ -16,6 +16,7 @@ IMAGE_INSTALL = "\
     kernel-modules \
     hal \
     angstrom-ohand-task-pim \
+    ${SPLASH} \
     ${ANGSTROM_EXTRA_INSTALL}"
 
 IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
index db8aabe..bd1ed04 100644 (file)
@@ -1,6 +1,6 @@
 if ! grep -Eq '\s?psplash=false\s?' /proc/cmdline; then
-       mkdir -p /mnt/.psplash
-       mount tmpfs -t tmpfs /mnt/.psplash -o,size=40k
+       mkdir -p /mnt/.splash
+       mount tmpfs -t tmpfs /mnt/.splash -o,size=40k
 
        psplash &
 fi
index 3d5f1d6..ae8495c 100644 (file)
@@ -1,4 +1,4 @@
 if ! grep -Eq '\s?psplash=false\s?' /proc/cmdline; then
-       mkdir -p /mnt/mnt/.psplash
-       mount -n -o move /mnt/.psplash /mnt/mnt/.psplash
+       mkdir -p /mnt/mnt/.s0plash
+       mount -n -o move /mnt/.splash /mnt/mnt/.splash
 fi
index 44781fb..8d61257 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://00-psplash.sh file://99-psplash.sh"
-PR = "r3"
+PR = "r4"
 RDEPENDS = "initramfs-uniboot virtual/psplash"
 DESCRIPTION = "An initramfs module to enable psplash."
 
index d7e06e5..6bebec7 100755 (executable)
@@ -43,8 +43,8 @@ fi
 case $1 in
 'start')
     # Turn off psplash if any - sleep is required for anti-race
-    if [ -e /mnt/.psplash ]; then
-        TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
+    if [ -e /mnt/.splash ]; then
+        TMPDIR=/mnt/.splash splash-write "QUIT" || true
         sleep 1
     fi
     
index b52e162..0a03abb 100644 (file)
@@ -1,5 +1,5 @@
 require ${PN}.inc
-PR = "r8"
+PR = "r9"
 
 SRC_URI = "file://opie-reorgfiles \
            file://opie \
diff --git a/recipes/opkg/files/configure b/recipes/opkg/files/configure
new file mode 100644 (file)
index 0000000..1a8c314
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+# get splash funcs
+if [ -f /etc/default/splashfuncs ]; then
+  . /etc/default/splashfuncs
+fi
+## tell boot status to "pulsate" really long busy cycle here
+status_pulse || true
+# run configure in bg
+opkg-cl configure &
+PID=$!
+# while configure still running loop
+while test -d /proc/$PID; do
+# tick to splash so it doesn't time out
+  status_tick || true
+  sleep 1
+done
+# delete myself
+rm -f /etc/rcS.d/S98configure
index a9297d7..641c7be 100644 (file)
@@ -3,7 +3,7 @@ require opkg_svn.bb
 DEPENDS = "curl"
 PROVIDES += "opkg"
 
-PR = "r3"
+PR = "r11"
 
 SRCREV = "${SRCREV_pn-opkg}"
 
index a472897..bc9af61 100644 (file)
@@ -1,6 +1,6 @@
 require opkg.inc
 
-PR = "r2"
+PR = "r11"
 
 PACKAGES =+ "libopkg-dev libopkg"
 
@@ -12,23 +12,17 @@ FILES_libopkg = "${libdir}/*.so.*"
 OPKG_INIT_POSITION = "98"
 OPKG_INIT_POSITION_slugos = "41"
 
+SRC_URI += "file://configure"
+
+do_install_prepend() {
+  install -d ${D}${sysconfdir}/rcS.d
+  install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S98configure
+}
+
 pkg_postinst_${PN} () {
-#!/bin/sh
-if [ "x$D" != "x" ]; then
-       install -d $D${sysconfdir}/rcS.d
-       # this happens at S98 where our good 'ole packages script used to run
-       echo "#!/bin/sh
-opkg-cl configure
-rm -f ${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
-" > $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
-       chmod 0755 $D${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
-fi
-
-update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+  update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
 }
 
 pkg_postrm_${PN} () {
-#!/bin/sh
-update-alternatives --remove opkg ${bindir}/opkg-cl
+  update-alternatives --remove opkg ${bindir}/opkg-cl
 }
-
index a4fb1dc..0409240 100644 (file)
@@ -15,7 +15,7 @@ case `machine_id` in
        PARAMS='-a 270' ;;
 esac
 
-export TMPDIR=/mnt/.psplash
+export TMPDIR=/mnt/.splash
 mount tmpfs -t tmpfs $TMPDIR -o,size=40k
 
 /usr/bin/psplash $PARAMS &
diff --git a/recipes/psplash/files/splashfuncs b/recipes/psplash/files/splashfuncs
new file mode 100644 (file)
index 0000000..ada2a96
--- /dev/null
@@ -0,0 +1,29 @@
+status() {
+  if type splash-write >/dev/null 2>&1; then
+    (TMPDIR="/mnt/.splash" EXQUISITE_IPC="$TMPDIR/exquisite" splash-write "$1" || true) &
+  fi
+}
+
+status_position() {
+  status "PROGRESS $1"
+}
+
+status_title() {
+  status "TITLE $1"
+}
+
+status_text() {
+  if test -n "$1"; then
+    status "MSG $1"
+  else
+    status "CLEAR"
+  fi
+}
+
+status_pulse() {
+  status "PULSATE"
+}
+
+status_tick() {
+  status "TICK"
+}
index 5a713e5..19e1896 100644 (file)
@@ -1,4 +1,4 @@
 #!/bin/sh
-TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
+TMPDIR=/mnt/.splash psplash-write "QUIT" || true
 sleep 1
-umount /mnt/.psplash >/dev/null 2>/dev/null
+umount /mnt/.splash >/dev/null 2>/dev/null
index 401afdf..f65fb81 100644 (file)
@@ -14,6 +14,7 @@ SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
           file://psplash-hand-img.h \
           file://psplash-bar-img.h \
           file://psplash-default \
+          file://splashfuncs \
           file://psplash-init"
 S = "${WORKDIR}/psplash"
 
index 8946469..a038f63 100644 (file)
@@ -5,9 +5,10 @@ LICENSE = "GPL"
 RDEPENDS = "initscripts"
 PROVIDES = "virtual/psplash"
 RPROVIDES_${PN} = "virtual/psplash"
+RCONFLICTS_${PN} = "exquisite"
 
 PV = "0.0+svnr${SRCREV}"
-PR = "r2"
+PR = "r20"
 
 # You can create your own pslash-hand-img.h by doing
 # ./make-image-header.sh <file>.png HAND
@@ -27,11 +28,15 @@ do_configure_append() {
 }
 
 do_install_prepend() {
-       install -d ${D}/mnt/.psplash/
+       install -d ${D}/mnt/.splash/
        install -d ${D}${sysconfdir}/default/
        install -m 0644 ${WORKDIR}/psplash-default ${D}${sysconfdir}/default/psplash
        install -d ${D}${sysconfdir}/init.d/
        install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash
+       install -d ${D}${bindir}
+       ln -s psplash-write ${D}${bindir}/splash-write
+       install -d ${D}${sysconfdir}/default
+       install -m 0755 ${WORKDIR}/splashfuncs ${D}${sysconfdir}/default/splashfuncs
 }
 
 INITSCRIPT_NAME = "psplash"
@@ -40,4 +45,4 @@ INITSCRIPT_PARAMS = "start 01 S . stop 20 0 1 6 ."
 PACKAGES =+ "psplash-support"
 
 RDEPENDS_${PN} += "psplash-support"
-FILES_psplash-support += "/mnt/.psplash ${sysconfdir} ${bindir}/psplash-write"
+FILES_psplash-support += "/mnt/.splash ${sysconfdir} ${bindir}/psplash-write ${bindir}/splash-write"
index cb370b7..8119ccf 100644 (file)
@@ -3,12 +3,13 @@ require psplash-ua.inc
 
 ALTERNATIVE_PRIORITY = "10"
 
-PR = "r19"
+PR = "r20"
 
 SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
           file://psplash-hand-img.h \
           file://psplash-bar-img.h \
           file://psplash-default \
+          file://splashfuncs \
           file://psplash-init"
 S = "${WORKDIR}/psplash"
 
index 30b69ad..6c5f4ca 100755 (executable)
@@ -16,6 +16,9 @@
 #
 
 . /etc/default/rcS
+if [ -f /etc/default/splashfuncs ]; then
+    . /etc/default/splashfuncs
+fi
 export VERBOSE
 
 startup_progress() {
@@ -26,9 +29,7 @@ startup_progress() {
         progress=$progress_size
     fi
     #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size"
-    if type psplash-write >/dev/null 2>&1; then
-        TMPDIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true
-    fi
+    status_position $progress || true
 }
 
 
@@ -169,8 +170,8 @@ startup() {
 
 #Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch
 #if [ "x$runlevel" != "xS" ]; then
-#    if type psplash-write >/dev/null 2>&1; then
-#        TMPDIR=/mnt/.psplash psplash-write "QUIT" || true
-#      umount /mnt/.psplash
+#    if type splash-write >/dev/null 2>&1; then
+#        TMPDIR=/mnt/.splash splash-write "QUIT" || true
+#      umount /mnt/.splash
 #    fi
 #fi
index 6e6f98c..d3a1517 100644 (file)
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
 SECTION = "base"
 LICENSE = "GPL"
 HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r46"
+PR = "r52"
 
 # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
 # Set PACKAGE_ARCH appropriately.
index 4003359..2269662 100644 (file)
@@ -1,5 +1,5 @@
 DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
-PR = "r80"
+PR = "r82"
 
 inherit task