From 960c89a63d41dfa2e2802ddfc92c7ddf92dafbd5 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 9 Apr 2018 22:47:07 +0200 Subject: 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. --- perl-install/bootloader.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'perl-install/bootloader.pm') 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; -- cgit v1.2.1