[coreboot] r125 - in buildrom-devel: config/payloads packages/busybox/conf scripts skeleton
svn at coreboot.org
svn at coreboot.org
Fri Feb 22 19:58:33 CET 2008
Author: ward
Date: 2008-02-22 19:58:33 +0100 (Fri, 22 Feb 2008)
New Revision: 125
Modified:
buildrom-devel/config/payloads/Config.in
buildrom-devel/packages/busybox/conf/defconfig
buildrom-devel/packages/busybox/conf/defconfig-serengeti_cheetah-x86_64
buildrom-devel/scripts/Makefile.lab
buildrom-devel/skeleton/linuxrc
Log:
This patch adds an optional delay before the LAB environment kexecs the on-disk
kernel. This allows entering the busybox shell, which can be useful for
maintenance and debugging. The delay is configurable from kconfig, and defaults
to 5 seconds.
The patch enables CONFIG_ASH_READ_TIMEOUT in the uclibc configuration because
the 'read' command in the ash shell does not support the '-t' timeout parameter
otherwise.
It also changes the default for including a statically compiled copy of kexec
into the LAB payload to no, because this makes the payload too large for 1MB
rom chips.
Tested on real hardware.
Signed-off-by: Ward Vandewege <ward at gnu.org>
Acked-by: Jordan Crouse <jordan.crouse at amd.com>
Modified: buildrom-devel/config/payloads/Config.in
===================================================================
--- buildrom-devel/config/payloads/Config.in 2008-02-21 21:51:05 UTC (rev 124)
+++ buildrom-devel/config/payloads/Config.in 2008-02-22 18:58:33 UTC (rev 125)
@@ -95,12 +95,20 @@
config KBL
bool "Reduced size kexec-tools"
- default y
+ default n
select KBL_KEXEC_ONLY
help
Say 'Y' here to include the the Kexec Bootloader as a cheep
substitute for kexec-tools
+config LAB_PAUSE
+ int "Seconds to pause before booting, to allow access to the busybox environment"
+ default 5
+ help
+ Set the number of seconds you'd like to pause before booting the kexec'ed
+ kernel here. During this pause, you can press enter to gain access to the
+ busybox environment.
+
config BUSYBOX
bool "Busybox"
default y
Modified: buildrom-devel/packages/busybox/conf/defconfig
===================================================================
--- buildrom-devel/packages/busybox/conf/defconfig 2008-02-21 21:51:05 UTC (rev 124)
+++ buildrom-devel/packages/busybox/conf/defconfig 2008-02-22 18:58:33 UTC (rev 125)
@@ -556,7 +556,7 @@
#
# CONFIG_ASH_JOB_CONTROL is not set
# CONFIG_ASH_READ_NCHARS is not set
-# CONFIG_ASH_READ_TIMEOUT is not set
+CONFIG_ASH_READ_TIMEOUT=y
CONFIG_ASH_ALIAS=y
CONFIG_ASH_MATH_SUPPORT=y
# CONFIG_ASH_MATH_SUPPORT_64 is not set
Modified: buildrom-devel/packages/busybox/conf/defconfig-serengeti_cheetah-x86_64
===================================================================
--- buildrom-devel/packages/busybox/conf/defconfig-serengeti_cheetah-x86_64 2008-02-21 21:51:05 UTC (rev 124)
+++ buildrom-devel/packages/busybox/conf/defconfig-serengeti_cheetah-x86_64 2008-02-22 18:58:33 UTC (rev 125)
@@ -556,7 +556,7 @@
#
# CONFIG_ASH_JOB_CONTROL is not set
# CONFIG_ASH_READ_NCHARS is not set
-# CONFIG_ASH_READ_TIMEOUT is not set
+CONFIG_ASH_READ_TIMEOUT=y
CONFIG_ASH_ALIAS=y
CONFIG_ASH_MATH_SUPPORT=y
# CONFIG_ASH_MATH_SUPPORT_64 is not set
Modified: buildrom-devel/scripts/Makefile.lab
===================================================================
--- buildrom-devel/scripts/Makefile.lab 2008-02-21 21:51:05 UTC (rev 124)
+++ buildrom-devel/scripts/Makefile.lab 2008-02-22 18:58:33 UTC (rev 125)
@@ -3,6 +3,7 @@
$(OUTPUT_DIR)/initrd.uncompressed: $(PAYLOAD-y)
@ cp -af $(SKELETON_DIR)/* $(INITRD_DIR)
@ chmod 0755 $(INITRD_DIR)/linuxrc
+ @ sed -i 's/%%LAB_PAUSE%%/$(CONFIG_LAB_PAUSE)/' $(INITRD_DIR)/linuxrc
@ echo "Cleaning up shared libraries..."
Modified: buildrom-devel/skeleton/linuxrc
===================================================================
--- buildrom-devel/skeleton/linuxrc 2008-02-21 21:51:05 UTC (rev 124)
+++ buildrom-devel/skeleton/linuxrc 2008-02-22 18:58:33 UTC (rev 125)
@@ -17,11 +17,24 @@
# Show the version
cat /buildrom-version > /dev/tty$VT
-message "Trying to boot from hdd."
-cd /bin
-./boot-hdd
+message "Press enter to start the busybox shell (pausing %%LAB_PAUSE%% seconds)."
+read -t %%LAB_PAUSE%% UNUSED
RET=$?
-cd /
+if [ "$RET" == '0' ]; then
+ message "NOTICE: Starting the shell..."
+ message ""
+ message "To boot your system as normal, type:"
+ message " cd /bin; ./boot-hdd"
+ message ""
+ openvt $VT /bin/ash
+ exec /bin/ash
+else
+ message "Trying to boot from hdd."
+ cd /bin
+ ./boot-hdd
+ RET=$?
+ cd /
+fi
message "NOTICE: Starting the shell..."
openvt $VT /bin/ash
More information about the coreboot
mailing list