summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/initrdscripts/files/01-bootldr-buster.sh41
-rw-r--r--packages/initrdscripts/files/init.sh15
-rw-r--r--packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb12
-rw-r--r--packages/initrdscripts/initramfs-uniboot_1.0.bb2
-rw-r--r--packages/linux/linux-handhelds-2.6.inc2
-rw-r--r--packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb3
6 files changed, 67 insertions, 8 deletions
diff --git a/packages/initrdscripts/files/01-bootldr-buster.sh b/packages/initrdscripts/files/01-bootldr-buster.sh
new file mode 100644
index 0000000000..46d01903ed
--- /dev/null
+++ b/packages/initrdscripts/files/01-bootldr-buster.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+cmdl=`cat /proc/cmdline`
+#cmdl="console=ttySA0,115200 console=ttySB0,115200"
+if expr "$cmdl" : '.*mtdparts=ipaq' > /dev/null; then
+ echo "!!!!!!!!"
+ echo "Detected Compaq bootldr or derivative"
+ echo "Kernel command line is assumed to be bogus and ignored"
+ echo "!!!!!!!!"
+ CMDLINE=" "
+ sleep 3
+fi
+
+# The main trouble is the bogus console=ttySA0 passed by bootldr
+# It appears that kernel doesn't have protection against only invalid
+# consoles being passed on the command line, which means that the
+# kernel is deaf and dumb when booted by bootldr
+
+INVALID_CONSOLE=0
+VALID_CONSOLE=0
+
+for arg in $cmdl; do
+ optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
+ case $arg in
+ console=*)
+ if expr "$optarg" : 'ttySA[0-9]\+' > /dev/null; then
+ INVALID_CONSOLE=1
+ elif expr "$optarg" : 'ttyS\?[0-9]\+' > /dev/null; then
+ VALID_CONSOLE=1
+ fi
+ ;;
+ esac
+done
+
+if [ $INVALID_CONSOLE -eq 1 -a $VALID_CONSOLE -eq 0 ]; then
+ echo "!!!!!!!!"
+ echo "No valid system console is detected"
+ echo "Explicitly using /dev/tty0 for input/output"
+ echo "!!!!!!!!"
+ CONSOLE="/dev/tty0"
+fi
diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh
index 8b9fe12429..c3b4336e40 100644
--- a/packages/initrdscripts/files/init.sh
+++ b/packages/initrdscripts/files/init.sh
@@ -25,7 +25,7 @@ dev_setup()
}
read_args() {
- CMDLINE=`cat /proc/cmdline`
+ [ -z "$CMDLINE" ] && CMDLINE=`cat /proc/cmdline`
for arg in $CMDLINE; do
optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
case $arg in
@@ -40,7 +40,7 @@ read_args() {
}
load_modules() {
- for module in $MODULE_DIR/*; do
+ for module in $MODULE_DIR/$1; do
echo "initramfs: Loading $module module"
source $module
done
@@ -52,14 +52,18 @@ boot_root() {
}
fatal() {
- echo $1
- echo
+ echo $1 >$CONSOLE
+ echo >$CONSOLE
exec sh
}
echo "Starting initramfs boot..."
early_setup
+load_modules '0*'
+
+[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
+
read_args
if [ -n "$rootdelay" ]; then
@@ -69,7 +73,8 @@ fi
dev_setup
-load_modules
+load_modules '[1-9]*'
+
[ -n "$BOOT_ROOT" ] && boot_root
fatal "No valid root device was specified. Please add root=/dev/something to the kernel command-line and try again."
diff --git a/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
new file mode 100644
index 0000000000..a3141f5a9f
--- /dev/null
+++ b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
@@ -0,0 +1,12 @@
+SRC_URI = "file://01-bootldr-buster.sh"
+PR = "r1"
+DESCRIPTION = "An initramfs module for ignoring bogus kernel commandline from Compaq bootldr"
+RDEPENDS = "initramfs-uniboot"
+
+do_install() {
+ install -d ${D}/initrd.d
+ install -m 0755 ${WORKDIR}/01-bootldr-buster.sh ${D}/initrd.d/
+}
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += " /initrd.d/* "
diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb
index e0f726582e..cfa065b619 100644
--- a/packages/initrdscripts/initramfs-uniboot_1.0.bb
+++ b/packages/initrdscripts/initramfs-uniboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://init.sh"
-PR = "r4"
+PR = "r6"
DESCRIPTON = "A modular initramfs init script system."
RRECOMMENDS = "kernel-module-mtdblock"
diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc
index 9a783aa6de..a2efdc955a 100644
--- a/packages/linux/linux-handhelds-2.6.inc
+++ b/packages/linux/linux-handhelds-2.6.inc
@@ -63,6 +63,8 @@ do_compile_prepend() {
exit 1
fi
cp ${KERNEL_INITRAMFS_PATH} usr/initramfs_data.cpio.gz
+ # touch is for broken Koen's cp
+ touch usr/initramfs_data.cpio.gz
fi
}
diff --git a/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb b/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
index 5c524c7ea6..4fa2e2bd9b 100644
--- a/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
+++ b/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
@@ -1,7 +1,7 @@
SECTION = "kernel"
DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer handheld devices."
LICENSE = "GPL"
-PR = "r17"
+PR = "r18"
DEFAULT_PREFERENCE = "-1"
@@ -12,7 +12,6 @@ FILESPATH = "${FILE_DIRNAME}/linux-handhelds-2.6-2.6.21/${MACHINE}:${FILE_DIRNAM
SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
file://linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch;patch=1 \
http://www.rpsys.net/openzaurus/patches/archive/export_atags-r0a.patch;patch=1 \
- file://keep-initramfs.patch;patch=1 \
file://defconfig"
require linux-handhelds-2.6.inc