aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-09-07 13:16:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:47:20 +0100
commit1d3dc681e809846dba7cae4f81566045a3f8c205 (patch)
treecb01a9b38badb40c59c9373bed2dcaa566a3c468 /meta
parentdfd6d4c765924f472ac2df724342547b5c15249a (diff)
downloadopenembedded-core-contrib-1d3dc681e809846dba7cae4f81566045a3f8c205.tar.gz
initramfs-framework: support dropping into shell on failure
When the init_fatal_sh boot parameter is present (i.e. used without value) and a fatal problem occurs inside the initramfs-module, a shell will be started instead of looping forever. Useful for debugging. Interestingly enough, the code was already indented to support such an if check... Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-core/initrdscripts/initramfs-framework/init4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index e8f4713b52..9291ad5c21 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -58,9 +58,13 @@ fatal() {
echo $1 >/dev/console
echo >/dev/console
+ if [ -n "bootparam_init_fatal_sh" ]; then
+ sh
+ else
while [ "true" ]; do
sleep 3600
done
+ fi
}
# Variables shared amoung modules