diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/initrdscripts/files/01-bootldr-buster.sh | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/initrdscripts/files/01-bootldr-buster.sh')
-rw-r--r-- | recipes/initrdscripts/files/01-bootldr-buster.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/recipes/initrdscripts/files/01-bootldr-buster.sh b/recipes/initrdscripts/files/01-bootldr-buster.sh new file mode 100644 index 0000000000..c3b79b5328 --- /dev/null +++ b/recipes/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="console=ttyS0,115200 console=tty0" + 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 |