diff options
| author | Matthias Hentges <oe@hentges.net> | 2006-04-23 14:47:58 +0000 |
|---|---|---|
| committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-04-23 14:47:58 +0000 |
| commit | a6e74fd03c93ec9cdb31570b9a6b676aef4ee4c5 (patch) | |
| tree | bd526f28c6b86d39c11cd5d2aeb04e187d6a0c80 /packages/altboot/files/init.altboot | |
| parent | 8508cd3be7c4c6a43dc3a7963b7a83ed8d4febe9 (diff) | |
altboot:
- Removed multiple die() functions
- Altboot no longer activates an off-flash altboot-menu when not
booting from flash
- Added a debug_echo function which is disabled in non-rc and
non-snapshot builds
- RC's and snapshots now spawn a debug shell on tty4 right after
the kernel is booted
- die() messages are now colored red/white, debug is purple(?)/white
- Fixed start_networking() on collie and made it a little bit more verbose
Diffstat (limited to 'packages/altboot/files/init.altboot')
| -rw-r--r-- | packages/altboot/files/init.altboot | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/packages/altboot/files/init.altboot b/packages/altboot/files/init.altboot index a987918760..3dc7c60240 100644 --- a/packages/altboot/files/init.altboot +++ b/packages/altboot/files/init.altboot @@ -27,16 +27,31 @@ esac 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_YELLOW="\033[33m" C_BLUE="\033[34m" C_WHITE="\033[37m" C_RESET="\033[0m" die() { - echo -e "ERROR: $1" >/dev/tty0 + echo -e "${C_RED}ERROR: $1${C_RESET}" >/dev/tty0 exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1 } +debug_shell() { + # VT 2 = Opie, VT 3 = GPE + test -z "$1" && VT=4 || VT=$1 + + echo -e "\033c" > /dev/tty$VT + + echo -en "\nPress <ENTER> to activate the debug shell." > /dev/tty$VT + read junk </dev/tty$VT + + echo "" > /dev/tty$VT + /bin/sh </dev/tty$VT >/dev/tty$VT 2>&1 + + #openvt -lf -c$VT -- /bin/sh </dev/tty$VT >/dev/tty$VT 2>&1 +} # This function prints the boot-menu # $1: Directory containing the scripts for the menu-items @@ -299,6 +314,13 @@ wait_for_input() { # Note: this is positively ugly. If someone knows a better way to detect wheter # we are already booted into a runlevel _without_ reading /var and / or using `runlevel` # PLEASE let me know. + +if ( echo "$VERSION" | egrep -iq "(snapshot|-rc)" ) +then + ENABLE_DEBUG="yes" + debug_shell 4 >/dev/null 2>&1 & +fi + if test -f /proc/cmdline -a "`ps ax|wc -l|tr -d " "`" -gt 30 -a "$1" != "-force" then echo "altboot: Using real init [$REAL_INIT] [$*] [`ps ax|wc -l|tr -d " "`] *" >/dev/tty1 |
