From 5d88511bb3882ee398e71c2b8d993d87bd18f478 Mon Sep 17 00:00:00 2001 From: David Pottage Date: Wed, 10 Jun 2020 17:31:50 +0100 Subject: [PATCH] Add earlycon for early verbose boot messages. (#1871) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add earlycon for early verbose boot messages. * Update boot-cubox.cmd * Update boot-rockchip.cmd * Update boot-rockpis.cmd * Update boot-sunxi.cmd * Update boot-udoo.cmd Co-authored-by: Igor Pečovnik --- config/bootscripts/boot-cubox.cmd | 2 ++ config/bootscripts/boot-rockchip.cmd | 2 ++ config/bootscripts/boot-rockchip64.cmd | 2 ++ config/bootscripts/boot-rockpis.cmd | 2 ++ config/bootscripts/boot-sunxi.cmd | 2 ++ config/bootscripts/boot-udoo.cmd | 3 ++- 6 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config/bootscripts/boot-cubox.cmd b/config/bootscripts/boot-cubox.cmd index 4f601bc6b4..588a8ad7e7 100644 --- a/config/bootscripts/boot-cubox.cmd +++ b/config/bootscripts/boot-cubox.cmd @@ -9,6 +9,7 @@ setenv verbosity "1" setenv console "display" setenv rootfstype "ext4" setenv disp_mode "1920x1080m60" +setenv earlycon "off" # next kernels have different u-boot without autodetection if ext2load mmc 0 0x00000000 /boot/.next || ext2load mmc 0 0x00000000 .next; then @@ -27,6 +28,7 @@ fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttymxc0,115200"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi setenv bootargs "root=${rootdev} rootfstype=${rootfstype} rootwait ${consoleargs} consoleblank=0 video=mxcfb0:dev=hdmi,${disp_mode},if=RGB24,bpp=32 coherent_pool=2M cma=256M@2G rd.dm=0 rd.luks=0 rd.lvm=0 raid=noautodetect pci=nomsi vt.global_cursor_default=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}" ext2load mmc 0 ${fdt_addr} /boot/dtb/${fdt_file} || fatload mmc 0 ${fdt_addr} /dtb/${fdt_file} || ext2load mmc 0 ${fdt_addr} /dtb/${fdt_file} diff --git a/config/bootscripts/boot-rockchip.cmd b/config/bootscripts/boot-rockchip.cmd index 990f1118c6..930ade76bd 100644 --- a/config/bootscripts/boot-rockchip.cmd +++ b/config/bootscripts/boot-rockchip.cmd @@ -12,6 +12,7 @@ setenv verbosity "1" setenv console "both" setenv rootfstype "ext4" setenv docker_optimizations "on" +setenv earlycon "off" echo "Boot script loaded from ${devtype} ${devnum}" @@ -26,6 +27,7 @@ if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi if test "${console}" = "ttyS2,115200n8"; then setenv console "both"; fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,115200n8 ${consoleargs}"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi # get PARTUUID of first partition on SD/eMMC the boot script was loaded from if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi diff --git a/config/bootscripts/boot-rockchip64.cmd b/config/bootscripts/boot-rockchip64.cmd index cc8d1e6fe0..a39fe96e97 100644 --- a/config/bootscripts/boot-rockchip64.cmd +++ b/config/bootscripts/boot-rockchip64.cmd @@ -11,6 +11,7 @@ setenv verbosity "1" setenv console "both" setenv rootfstype "ext4" setenv docker_optimizations "on" +setenv earlycon "off" echo "Boot script loaded from ${devtype} ${devnum}" @@ -23,6 +24,7 @@ if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi # get PARTUUID of first partition on SD/eMMC the boot script was loaded from if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi diff --git a/config/bootscripts/boot-rockpis.cmd b/config/bootscripts/boot-rockpis.cmd index 22cb2786de..8ec0a3a4a9 100644 --- a/config/bootscripts/boot-rockpis.cmd +++ b/config/bootscripts/boot-rockpis.cmd @@ -11,6 +11,7 @@ setenv verbosity "1" setenv console "both" setenv rootfstype "ext4" setenv docker_optimizations "on" +setenv earlycon "off" echo "Boot script loaded from ${devtype} ${devnum}" @@ -23,6 +24,7 @@ if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,1500000 ${consoleargs}"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi # get PARTUUID of first partition on SD/eMMC the boot script was loaded from if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi diff --git a/config/bootscripts/boot-sunxi.cmd b/config/bootscripts/boot-sunxi.cmd index d5c00bdc05..9c44051503 100644 --- a/config/bootscripts/boot-sunxi.cmd +++ b/config/bootscripts/boot-sunxi.cmd @@ -14,6 +14,7 @@ setenv rootfstype "ext4" setenv docker_optimizations "on" setenv devnum "0" setenv rootdev "/dev/mmcblk${devnum}p1" +setenv earlycon "off" # Print boot source itest.b *0x28 == 0x00 && echo "U-boot loaded from SD" @@ -39,6 +40,7 @@ if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,115200 console=tty1"; fi if test "${console}" = "serial"; then setenv consoleargs "console=ttyS0,115200"; fi +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} hdmi.audio=EDID:0 disp.screen0_output_mode=${disp_mode} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}" diff --git a/config/bootscripts/boot-udoo.cmd b/config/bootscripts/boot-udoo.cmd index b3fbdb5e72..a3450b3403 100644 --- a/config/bootscripts/boot-udoo.cmd +++ b/config/bootscripts/boot-udoo.cmd @@ -12,6 +12,7 @@ setenv verbosity "1" setenv console "both" setenv disp_mode "1920x1080M60" setenv rootfstype "ext4" +setenv earlycon "off" # Print boot source echo "Booting from SD" @@ -22,7 +23,7 @@ fi if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=ttymxc1,115200 console=tty1"; fi if test "${console}" = "serial"; then setenv consoleargs "console=ttymxc1,115200"; fi - +if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi setenv bootargs "root=${rootdev} rootfstype=${rootfstype} rootwait ${consoleargs} video=mxcfb0:dev=hdmi,${disp_mode},if=RGB24,bpp=32 rd.dm=0 rd.luks=0 rd.lvm=0 raid=noautodetect pci=nomsi ahci_imx.hotplug=1 vt.global_cursor_default=0 loglevel=${verbosity} usb-storage.quirks=${usbstoragequirks} ${extraargs}" run findfdt