summaryrefslogtreecommitdiff
path: root/packages/altboot
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2006-04-12 14:05:43 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-12 14:05:43 +0000
commit6acda169c92c0c8b4c55ecd3742673c7cfd8edcb (patch)
tree003a0422a9a7f69f8e8840f7df97891581e7cc4b /packages/altboot
parent8045127a9bda8053ed9a3def163b67b89ccc34a0 (diff)
altboot:
- Emmit a low-volume beep on alsa devices before running the timeout - Removed some redirects from init_rootfs - Fixed CF booting w/ kernel 2.6.16 - Fixed altboot menu on c7x0 running kernel 2.6
Diffstat (limited to 'packages/altboot')
-rw-r--r--packages/altboot/altboot_0.0.0.bb5
-rw-r--r--packages/altboot/files/altboot-menu/Advanced/40-bootNFS2
-rw-r--r--packages/altboot/files/altboot.func42
-rw-r--r--packages/altboot/files/altboot.rc/playbeep.sh32
-rw-r--r--packages/altboot/files/init.altboot8
5 files changed, 69 insertions, 20 deletions
diff --git a/packages/altboot/altboot_0.0.0.bb b/packages/altboot/altboot_0.0.0.bb
index a87574b021..fbfad3c3e6 100644
--- a/packages/altboot/altboot_0.0.0.bb
+++ b/packages/altboot/altboot_0.0.0.bb
@@ -13,7 +13,8 @@ SRC_URI = "file://altboot-menu \
file://altboot.rc \
file://altboot.func \
file://init.altboot \
- file://altboot*.cfg"
+ file://altboot*.cfg \
+ file://beep.raw"
# S = "${WORKDIR}/files"
@@ -23,7 +24,9 @@ do_install() {
install -d ${D}/etc/altboot-menu/Advanced
install -d ${D}/etc/altboot.rc
install -d ${D}/usr/share/doc/altboot
+ install -d ${D}/usr/share/sounds
+ install -m 0644 ${WORKDIR}/beep.raw ${D}/usr/share/sounds
install -m 0644 ${WORKDIR}/altboot*.cfg ${D}/etc
install -m 0644 ${WORKDIR}/altboot.func ${D}/etc
# install -m 0644 ${WORKDIR}/docs/altboot/*.txt ${D}/usr/share/doc/altboot
diff --git a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
index 33d5f2795a..c3fb7cedc4 100644
--- a/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
+++ b/packages/altboot/files/altboot-menu/Advanced/40-bootNFS
@@ -37,6 +37,8 @@ run_module() {
else
# With kernel 2.6.16+ udev is used
/etc/init.d/udev start >/dev/null 2>&1 || die "/etc/init.d/udev start failed!"
+
+ /etc/init.d/udev stop
fi
nfs_host="`cat /etc/fstab | grep -v ^# | grep nfs | awk '{print $1}'|sed -n "s/\(.*\)\:\(.*\)/\1/p" `"
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func
index 83acb94324..f87cef48cd 100644
--- a/packages/altboot/files/altboot.func
+++ b/packages/altboot/files/altboot.func
@@ -439,8 +439,8 @@ check_fs() {
# Make the initial rootfs a bit more usable
init_rootfs(){
- echo -n "Mounting rootfs rw..." >/dev/tty0
- mount -o remount,rw / >/dev/tty0 2>&1 && echo ok >/dev/tty0|| die "mount -o remount,rw / failed"
+ echo -n "Mounting rootfs rw..."
+ mount -o remount,rw / && echo ok || die "mount -o remount,rw / failed"
mount | grep -q "/proc " >/dev/null 2>&1 && echo "Note: /proc is already mounted" || mount proc -t proc /proc >/dev/tty0 2>&1
@@ -449,8 +449,8 @@ init_rootfs(){
mount | grep -q "/sys " >/dev/null 2>&1 && echo "Note: /sys is already mounted" || mount sys -t sysfs /sys >/dev/tty0 2>&1
fi
- echo -n "Generating device files..." >/dev/tty0
- /etc/init.d/devices start && echo ok >/dev/tty0 || die "FAILED"
+ echo -n "Generating device files..."
+ /etc/init.d/devices start && echo ok || die "FAILED"
}
mount_sd(){
@@ -498,18 +498,26 @@ mount_cf(){
then
echo "Note: /media/cf is already mounted"
else
- # As of kernel 2.6.16, /e/i/pcmcia is replaced by udev
- if test -x /etc/init.d/pcmcia
+ if ( cat /etc/fstab | grep -v "^#" | grep -q "/media/cf" )
then
- /etc/init.d/pcmcia status | grep -q running || /etc/init.d/pcmcia start && echo "Note: cardmgr is already active"
- fi
-
- echo ""
+ # As of kernel 2.6.16, /e/i/pcmcia is replaced by udev
+ if test -x /etc/init.d/pcmcia
+ then
+ /etc/init.d/pcmcia status | grep -q running || /etc/init.d/pcmcia start && echo "Note: cardmgr is already active"
+ else
+ for n in 1 2 3
+ do
+ ! test -e "/dev/hda$n" && mknod /dev/hda$n b 3 $n
+ done
+ fi
- # Give the SD and CF mounting some time. This is a must for SD
- sleep 2
-
- mount | grep -q "/media/cf " || mount /media/cf
+ # Give the SD and CF mounting some time. This is a must for SD
+ sleep 2
+
+ mount /media/cf -o async
+ else
+ echo "Note: Your system's fstab does not include an entry for /media/cf"
+ fi
fi
}
@@ -519,7 +527,7 @@ mount_home(){
echo "Note: /home is already mounted"
else
- if ( cat /etc/fstab | grep -v "^#" | grep "/home " )
+ if ( cat /etc/fstab | grep -v "^#" | grep -q "/home " )
then
echo "Mounting /home"
home_fstab="`grep "/home " /etc/fstab`"
@@ -528,6 +536,8 @@ mount_home(){
home_options="`echo "$home_fstab" | awk '{print $4}'`"
mount -t "$home_fs" -o $home_options "$home_dev" /home
- fi
+ else
+ echo "Note: Your system's fstab does not include an entry for /home"
+ fi
fi
}
diff --git a/packages/altboot/files/altboot.rc/playbeep.sh b/packages/altboot/files/altboot.rc/playbeep.sh
new file mode 100644
index 0000000000..198a87429f
--- /dev/null
+++ b/packages/altboot/files/altboot.rc/playbeep.sh
@@ -0,0 +1,32 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: playbeep.sh
+# Date: 12-Apr-06
+
+if test -x /usr/sbin/alsactl
+then
+ for module in `cat /etc/modules | grep snd | grep -v ^#`
+ do
+ #echo "loading $module"
+ modprobe $module
+ done
+
+ mount -o remount,rw /
+
+ init_rootfs >/dev/null 2>&1
+
+ ! test -e /dev/audio && mknod /dev/audio c 14 4
+ ! test -e /dev/dsp && mknod /dev/dsp c 14 3
+
+ mkdir /dev/snd >/dev/null 2>&1
+ mknod /dev/snd/controlC0 c 116 0 >/dev/null 2>&1
+ mknod /dev/snd/pcmC0D0c c 116 24 >/dev/null 2>&1
+ mknod /dev/snd/pcmC0D0p c 116 16 >/dev/null 2>&1
+ mknod /dev/snd/timer c 116 33 >/dev/null 2>&1
+ /usr/sbin/alsactl restore >/dev/null 2>&1
+
+ test -e /usr/share/sounds/beep.raw && cat /usr/share/sounds/beep.raw > /dev/dsp
+fi
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index 22f3e86e83..273160bf19 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -157,7 +157,8 @@ run_timer() {
case "`uname -r`" in
2.4*) key_ints="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`";;
- 2.6*) key_ints="`cat /proc/interrupts | grep Spitzkbd`";;
+ 2.6*) key_ints="`cat /proc/interrupts | grep Spitzkbd`"
+ test -z "$key_ints" && key_ints="`cat /proc/interrupts | grep -i corgikbd`";;
esac
stty -echo
@@ -171,10 +172,11 @@ run_timer() {
sleep 1
case "`uname -r`" in
2.4*) key_ints_now="`cat /proc/interrupts | grep keyboard | awk '{print $2}'`";;
- 2.6*) key_ints_now="`cat /proc/interrupts | grep Spitzkbd`";;
+ 2.6*) key_ints_now="`cat /proc/interrupts | grep Spitzkbd`"
+ test -z "$key_ints_now" && key_ints_now="`cat /proc/interrupts | grep -i corgikbd`";;
esac
- if test "$key_ints_now" != "$key_ints"
+ if test "$key_ints_now" != "$key_ints" -o -z "$key_ints_now"
then
launch_altboot=yes
stty echo