From 0c1252c1c4cab23c6f141709fc2f6192cfae5cd1 Mon Sep 17 00:00:00 2001 From: Tom Cubie Date: Tue, 17 Dec 2013 16:23:03 +0800 Subject: [PATCH] Add serial console when debug is enabled --- etc/hostname | 1 + etc/passwd | 1 + init | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 etc/hostname create mode 100644 etc/passwd diff --git a/etc/hostname b/etc/hostname new file mode 100644 index 0000000..e661420 --- /dev/null +++ b/etc/hostname @@ -0,0 +1 @@ +(initramfs) diff --git a/etc/passwd b/etc/passwd new file mode 100644 index 0000000..bcaab64 --- /dev/null +++ b/etc/passwd @@ -0,0 +1 @@ +root::0:0:root:/root:/bin/sh diff --git a/init b/init index 6d735ff..b75ffc4 100755 --- a/init +++ b/init @@ -60,7 +60,7 @@ export recovery= # mdadm needs hostname to be set. This has to be done before the udev rules are called! if [ -f "/etc/hostname" ]; then - /bin/hostname -b -F /etc/hostname 2>&1 1>/dev/null + /bin/hostname -F /etc/hostname 2>&1 1>/dev/null fi # Bring in the main config @@ -225,6 +225,9 @@ else resume=${RESUME:-} fi +# get the serial console if we want to debug +[ "$debug" = "y" ] && /sbin/getty 115200 ttyFIQ0 & + maybe_break top # export BOOT variable value for compcache,