summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <dev@blino.org>2018-04-09 22:47:07 +0200
committerOlivier Blin <dev@blino.org>2018-05-16 02:10:35 +0200
commit960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5 (patch)
tree54e7dc9d6d122a307598f6b101ed1a829e837f59
parent006edf2c7e85f4d81a3548fd280b7804991daeb4 (diff)
downloaddrakx-960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5.tar
drakx-960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5.tar.gz
drakx-960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5.tar.bz2
drakx-960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5.tar.xz
drakx-960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5.zip
bootloader: add specific boot cmdline options for Raspberry Pi serial console
console=ttyS0,115200 will work on Raspberry Pi 3. Raspberry Pi 2 does not boot without console=tty1 on cmdline. To have console output on both serial port and HDMI display, 8250.nr_uarts=1 is needed. On Raspberry Pi 2, though, it is required to edit /boot/extlinux/extlinux.conf to use ttyAMA0 instead of ttyS0 in the console parameter.
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/bootloader.pm5
2 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index b71697a7d..0c9971e89 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -4,6 +4,7 @@
o read/write extlinux.conf in U-Boot backend for ARM
o build initrd for ARM arch
o create /usr/lib/linux symlink for devicee tree files
+ o add specific boot options for Raspberry Pi serial console
Version 17.96 - 13 March 2018
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index d3783ed49..a93da7f3b 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -623,6 +623,11 @@ sub read_uboot() {
$b{method} = 'uboot';
$b{timeout} //= 30;
+ my $is_raspberry = cat_("/proc/device-tree/model") =~ /^Raspberry Pi/;
+ if ($is_raspberry) {
+ $b{perImageAppend} //= "8250.nr_uarts=1 console=ttyS0,115200 console=tty1";
+ }
+
$b{perImageAppend} //= $b{entries}[0]{append};
\%b;