summaryrefslogtreecommitdiff
path: root/packages/altboot
diff options
context:
space:
mode:
authorMatthias Hentges <oe@hentges.net>2006-01-31 23:52:30 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-01-31 23:52:30 +0000
commit28655b2cf027be29af97f2c6d52b3256c66acff1 (patch)
treec70be4589d29eb75493a4614ac2a574ea744bcec /packages/altboot
parente66483e9adcb6701bb7a2cdd6625324029d700c9 (diff)
altboot:
- More kernel 2.6 changes - Booting off SD seems to work as expected now - Turn off printk before showing the menu, kernel messages make a mess of it - Load keympas before showing the menu. init=/bin/sh is useless with a b0rked keymapping.
Diffstat (limited to 'packages/altboot')
-rw-r--r--packages/altboot/altboot.bb4
-rw-r--r--packages/altboot/files/altboot-menu/15-bootSD15
-rw-r--r--packages/altboot/files/altboot.func8
-rw-r--r--packages/altboot/files/altboot.rc/disable_printk.sh4
-rw-r--r--packages/altboot/files/altboot.rc/loadkeymap.sh5
-rw-r--r--packages/altboot/files/init.altboot10
6 files changed, 31 insertions, 15 deletions
diff --git a/packages/altboot/altboot.bb b/packages/altboot/altboot.bb
index 46a95ac5d6..a6b2bcb524 100644
--- a/packages/altboot/altboot.bb
+++ b/packages/altboot/altboot.bb
@@ -6,7 +6,7 @@ MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>"
LICENSE = "GPL"
IGNORE_STRIP_ERRORS = "1"
-PR = "r15"
+PR = "r16"
SRC_URI = "file://altboot-menu \
@@ -30,6 +30,8 @@ do_install() {
install -m 0755 ${WORKDIR}/init.altboot ${D}/sbin
install -m 0755 ${WORKDIR}/altboot-menu/*-* ${D}/etc/altboot-menu
install -m 0755 ${WORKDIR}/altboot-menu/Advanced/*-* ${D}/etc/altboot-menu/Advanced
+ install -m 0755 ${WORKDIR}/altboot.rc/*.sh ${D}/etc/altboot.rc
+ install -m 0644 ${WORKDIR}/altboot.rc/*.txt ${D}/etc/altboot.rc
}
diff --git a/packages/altboot/files/altboot-menu/15-bootSD b/packages/altboot/files/altboot-menu/15-bootSD
index 6ce0cdc9b3..d086cde344 100644
--- a/packages/altboot/files/altboot-menu/15-bootSD
+++ b/packages/altboot/files/altboot-menu/15-bootSD
@@ -24,23 +24,24 @@ run_module() {
/etc/init.d/devices start && echo ok >/dev/tty0|| die "FAILED"
# We can't trust that the SD device file is there when running kernel 2.6 w/ udev
- # Starting udev at this point may not be the best idea...
-# echo "*1*"
+ # and starting udev at this point may not be the best idea...
+
if `uname -r | grep -q "2.6"`
then
- #echo "***"
+ #Let's just assume the device file name never changes...
dev_no="`echo "$SD_DEVICE" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\1/p"`"
part_no="`echo "/dev/mmcblk0p1" | sed -n "s/\/dev\/mmcblk\(.*\)p\(.*\)/\2/p"`"
! test -e /dev/mmcblk${dev_no} && mknod /dev/mmcblk${dev_no} b 254 0
- ! test -e /dev/mmcblk${dev_no}p${part_no} && mknod /dev/mmcblk${dev_no}p${part_no} b 254 $part_no
-
- #echo "[mknod /dev/mmcblk${dev_no}p${part_no}]"
+ ! test -e /dev/mmcblk${dev_no}p${part_no} && mknod /dev/mmcblk${dev_no}p${part_no} b 254 $part_no
fi
- if test -n "$SD_KERNEL_MODULE"
+ # Kernel 2.6 has the SD driver compiled into the kernel
+ if test -n "$SD_KERNEL_MODULE"
then
echo -n "Loading SD kernel module..."
/sbin/insmod $SD_KERNEL_MODULE >/dev/null 2>&1 && echo ok || die "insmod failed"
+ else
+ echo "No SD kernel module, configured, assuming it's build-in"
fi
echo -n "Mounting $SD_MOUNTPOINT..." >/dev/tty0
diff --git a/packages/altboot/files/altboot.func b/packages/altboot/files/altboot.func
index e1196ecc7f..ceee6abae2 100644
--- a/packages/altboot/files/altboot.func
+++ b/packages/altboot/files/altboot.func
@@ -205,14 +205,14 @@ set_password() {
then
crypt_pw="`echo "$junk1" | md5sum | awk '{print $1}'`"
- if test -e /etc/altboot.cfg
+ if test -e "${ALTBOOT_CFG_FILE}"
then
- sed "/^MASTER_PASSWORD/s/\(.*\=\).*/\1\"$crypt_pw\"/" /etc/altboot.cfg > /etc/altboot.cfg_
- mv /etc/altboot.cfg_ /etc/altboot.cfg
+ sed "/^MASTER_PASSWORD/s/\(.*\=\).*/\1\"$crypt_pw\"/" "${ALTBOOT_CFG_FILE}" > ${ALTBOOT_CFG_FILE}_
+ mv ${ALTBOOT_CFG_FILE}_ ${ALTBOOT_CFG_FILE}
MASTER_PASSWORD="$crypt_pw"
echo "Password changed."
else
- echo "/etc/altboot.cfg is missing, no password saved"
+ echo "${ALTBOOT_CFG_FILE} is missing, no password saved"
fi
break
diff --git a/packages/altboot/files/altboot.rc/disable_printk.sh b/packages/altboot/files/altboot.rc/disable_printk.sh
new file mode 100644
index 0000000000..9d5f918c1e
--- /dev/null
+++ b/packages/altboot/files/altboot.rc/disable_printk.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+echo 0 > /proc/sys/kernel/printk
+
diff --git a/packages/altboot/files/altboot.rc/loadkeymap.sh b/packages/altboot/files/altboot.rc/loadkeymap.sh
new file mode 100644
index 0000000000..f9a7774549
--- /dev/null
+++ b/packages/altboot/files/altboot.rc/loadkeymap.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Note: With kernel 2.6 the standard keymap is unusable
+test -x /etc/init.d/keymap && /etc/init.d/keymap start >/dev/null 2>&1
+
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot
index 2de4ba247c..cd8b6b8929 100644
--- a/packages/altboot/files/init.altboot
+++ b/packages/altboot/files/init.altboot
@@ -18,11 +18,15 @@ INIT_RUNLEVEL="`cat /etc/inittab | sed -n "/^id\:/s/id\:\([0-9]\)\:.*$/\1/p"`"
test -z "$INIT_RUNLEVEL" && INIT_RUNLEVEL=5
case "`uname -r`" in
-2.6*) test -e /etc/altboot-2.6.cfg && . /etc/altboot-2.6.cfg || echo "WARNING: No altboot-2.6.cfg found! Check your installation of Altboot!" > /dev/tty1;;
-2.4*) test -e /etc/altboot-2.4.cfg && . /etc/altboot-2.4.cfg || echo "WARNING: No altboot-2.4.cfg found! Check your installation of Altboot!" > /dev/tty1;;
-*) die "Unknown kernel [uname -r], no configuration found.";;
+2.6*) ALTBOOT_CFG_FILE="/etc/altboot-2.6.cfg";;
+2.4*) ALTBOOT_CFG_FILE="/etc/altboot-2.4.cfg";;
+*) echo "Warning: Unknown kernel [`uname -r`], using kernel 2.6 configuration!"
+ ALTBOOT_CFG_FILE="/etc/altboot-2.6.cfg";;
esac
+echo "Using [${ALTBOOT_CFG_FILE}]"
+test -e "$ALTBOOT_CFG_FILE" && . "$ALTBOOT_CFG_FILE" || echo "WARNING: No $ALTBOOT_CFG_FILE found! Check your installation of Altboot!" > /dev/tty1
+
C_RED="\033[31m"
C_BLUE="\033[34m"
C_WHITE="\033[37m"