summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/initrdscripts/files/01-bootldr-buster.sh2
-rw-r--r--packages/initrdscripts/files/30-bootmenu.sh29
-rw-r--r--packages/initrdscripts/files/87-kexecboot.sh6
-rw-r--r--packages/initrdscripts/files/init.sh8
-rw-r--r--packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb2
-rw-r--r--packages/initrdscripts/initramfs-module-bootmenu_1.0.bb2
-rw-r--r--packages/initrdscripts/initramfs-module-kexecboot_1.0.bb2
-rw-r--r--packages/initrdscripts/initramfs-uniboot_1.0.bb2
8 files changed, 26 insertions, 27 deletions
diff --git a/packages/initrdscripts/files/01-bootldr-buster.sh b/packages/initrdscripts/files/01-bootldr-buster.sh
index 46d01903ed..c3b79b5328 100644
--- a/packages/initrdscripts/files/01-bootldr-buster.sh
+++ b/packages/initrdscripts/files/01-bootldr-buster.sh
@@ -7,7 +7,7 @@ if expr "$cmdl" : '.*mtdparts=ipaq' > /dev/null; then
echo "Detected Compaq bootldr or derivative"
echo "Kernel command line is assumed to be bogus and ignored"
echo "!!!!!!!!"
- CMDLINE=" "
+ CMDLINE="console=ttyS0,115200 console=tty0"
sleep 3
fi
diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh
index f5ecb8c828..c77bd662af 100644
--- a/packages/initrdscripts/files/30-bootmenu.sh
+++ b/packages/initrdscripts/files/30-bootmenu.sh
@@ -15,13 +15,6 @@ if ! (echo " " | read -n1 foo) >/dev/null 2>&1; then
exit 1
fi
-if [ -z "$rootdelay" ]; then
- echo "rootdelay parameter was not passed on kernel command line - assuming 2s delay"
- echo "If you would like to avoid this delay, pass explicit rootdelay=0"
- sleep 2
- dev_setup
-fi
-
mkdir -p $MOUNTLOC
list=""
@@ -36,14 +29,14 @@ add_menu_item()
}
show_menu() {
- echo -e -n "${E}3;0H"
+ echo -e -n "${E}3;0H" >$CONSOLE
cnt=0
echo -e $list | \
while read l; do
if [ $cnt == $num ]; then
- echo -e -n "${E}1m"
+ echo -e -n "${E}1m" >$CONSOLE
fi
- echo -e "$cnt: $l${E}0m"
+ echo -e "$cnt: $l${E}0m" >$CONSOLE
cnt=$((cnt + 1))
done
}
@@ -109,14 +102,14 @@ total=`echo -e $list | wc -l`
num=0
# Draw UI
-stty -echo
-echo -e -n "${E}2J"
-echo -e -n "${E}0;0H"
-echo "Select boot image:"
+stty -F $CONSOLE -echo
+echo -e -n "${E}2J" >$CONSOLE
+echo -e -n "${E}0;0H" >$CONSOLE
+echo "Select boot image:" >$CONSOLE
# Main loop
show_menu
-while read -n1 i; do
+while read -s -n1 i; do
case "$i" in
"A")
num=$((num - 1))
@@ -139,7 +132,7 @@ while read -n1 i; do
esac
show_menu
# echo "*$esc$i"
-done
+done < $CONSOLE
stty echo
@@ -170,8 +163,8 @@ else
CMDLINE="$CMDLINE root=$ROOT_DEVICE"
fi
-echo ROOT_DEVICE=$ROOT_DEVICE
-echo CMDLINE=$CMDLINE
+echo ROOT_DEVICE=$ROOT_DEVICE >$CONSOLE
+echo CMDLINE=$CMDLINE >$CONSOLE
##############################
fi
diff --git a/packages/initrdscripts/files/87-kexecboot.sh b/packages/initrdscripts/files/87-kexecboot.sh
index 9232934f98..2a51b4d9c8 100644
--- a/packages/initrdscripts/files/87-kexecboot.sh
+++ b/packages/initrdscripts/files/87-kexecboot.sh
@@ -3,15 +3,15 @@
if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/boot/zImage" ]; then
if ! expr "$CMDLINE" : '.*nokexec'; then
- echo "Kernel found in rootfs:"
- ls -l "$BOOT_ROOT/boot/zImage"
+ echo "Kernel found in rootfs:" >$CONSOLE
+ ls -l "$BOOT_ROOT/boot/zImage" >$CONSOLE
initramfs=""
if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then
echo "Initramfs found in rootfs:"
ls -l "$BOOT_ROOT/boot/initramfs.bin"
initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin"
fi
- echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
+ echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec" >$CONSOLE
sleep 10
/usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
sleep 10000
diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh
index c3b4336e40..60d2e5da8b 100644
--- a/packages/initrdscripts/files/init.sh
+++ b/packages/initrdscripts/files/init.sh
@@ -41,6 +41,7 @@ read_args() {
load_modules() {
for module in $MODULE_DIR/$1; do
+ # Cannot redir to $CONSOLE here easily - may not be set yet
echo "initramfs: Loading $module module"
source $module
done
@@ -66,8 +67,13 @@ load_modules '0*'
read_args
+if [ -z "$rootdelay" ]; then
+ echo "rootdelay parameter was not passed on kernel command line - assuming 2s delay"
+ echo "If you would like to avoid this delay, pass explicit rootdelay=0"
+ rootdelay="2"
+fi
if [ -n "$rootdelay" ]; then
- echo "Waiting $rootdelay seconds for devices to settle..."
+ echo "Waiting $rootdelay seconds for devices to settle..." >$CONSOLE
sleep $rootdelay
fi
diff --git a/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
index a3141f5a9f..8c4c2f7e93 100644
--- a/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
+++ b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://01-bootldr-buster.sh"
-PR = "r1"
+PR = "r2"
DESCRIPTION = "An initramfs module for ignoring bogus kernel commandline from Compaq bootldr"
RDEPENDS = "initramfs-uniboot"
diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
index 6c01b5edc5..5893420742 100644
--- a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
+++ b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://30-bootmenu.sh"
-PR = "r15"
+PR = "r17"
DESCRIPTION = "An initramfs module with UI for selection of boot device."
RDEPENDS = "klibc-utils-static-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs"
# For VFAT mounting.
diff --git a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
index 35100a94e6..face73038a 100644
--- a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
+++ b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://87-kexecboot.sh"
-PR = "r0.4"
+PR = "r1"
DESCRIPTION = "An initramfs module for kexecing kernel from rootfs."
RDEPENDS = "initramfs-uniboot kexec-static"
diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb
index cfa065b619..403db0b562 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 = "r6"
+PR = "r8"
DESCRIPTON = "A modular initramfs init script system."
RRECOMMENDS = "kernel-module-mtdblock"