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/NEWS | 1 + perl-install/bootloader.pm | 5 +++++ 2 files changed, 6 insertions(+) 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; -- cgit v1.2.1