]> git.openpandora.org Git - openembedded.git/commitdiff
initramfs-*: Use $CONSOLE for input/output.
authorPaul Sokolovsky <pmiscml@gmail.com>
Sun, 9 Mar 2008 01:35:38 +0000 (01:35 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Sun, 9 Mar 2008 01:35:38 +0000 (01:35 +0000)
packages/initrdscripts/files/30-bootmenu.sh
packages/initrdscripts/files/87-kexecboot.sh
packages/initrdscripts/files/init.sh
packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
packages/initrdscripts/initramfs-uniboot_1.0.bb

index f5ecb8c82802eea260f225e667f6f071112a2a4e..283daadd44a64cbcad27bd0bae8556dcbec501a1 100644 (file)
@@ -36,14 +36,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 +109,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 +139,7 @@ while read -n1 i; do
     esac
     show_menu
 #    echo "*$esc$i"
-done
+done < $CONSOLE
 
 stty echo
 
@@ -170,8 +170,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
index 9232934f981797f1dff78bdc8165f76b7cceee92..2a51b4d9c89d556a6e58db9e0c9cdf4ffdf671b9 100644 (file)
@@ -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
index c3b4336e4088a13f992361236925b0e53f05fbea..06b9119a1c3f60b9ebf69225c98a6bed7871caeb 100644 (file)
@@ -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
@@ -67,7 +68,7 @@ load_modules '0*'
 read_args
 
 if [ -n "$rootdelay" ]; then
-    echo "Waiting $rootdelay seconds for devices to settle..."
+    echo "Waiting $rootdelay seconds for devices to settle..." >$CONSOLE
     sleep $rootdelay
 fi
 
index 6c01b5edc5a7129ec35d703d6b61cdd25716ead4..6be8d733c93ea3fda5bced5995235fdeedb8bd87 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://30-bootmenu.sh"
-PR = "r15"
+PR = "r16"
 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.
index 35100a94e61f590ec5d50bbf17bb931bd7d7a52d..face73038a113d18c9d03d0cdd9aa5e1b82cf407 100644 (file)
@@ -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"
 
index cfa065b619c8d117c0d83402bac13dc581367e18..95eda7d9541ae707723ce84db6220bd1dc98bad3 100644 (file)
@@ -1,5 +1,5 @@
 SRC_URI = "file://init.sh"
-PR = "r6"
+PR = "r7"
 DESCRIPTON = "A modular initramfs init script system."
 RRECOMMENDS = "kernel-module-mtdblock"