From 89577f92517a5508083e4a9ce66583712c35516f Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 8 May 2018 14:39:09 +0900 Subject: [PATCH] rpi: tizen-boot: rpi3: set console in cmdline as u-boot environment The console in cmdline will be used by kernel as printk console and tizen-boot script always sets console with UART device. Set console in cmdline as u-boot environment value console and set default uart if nothing is set. Change-Id: I0d2743d445de8c8cf4bd43600fbc8c28a07cd0ea Signed-off-by: Seung-Woo Kim --- board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr | 8 +++++++- board/raspberrypi/rpi/tizen-boot-rpi3.scr | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr b/board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr index 9210217..21bea1f 100644 --- a/board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr +++ b/board/raspberrypi/rpi/tizen-boot-rpi3-32b.scr @@ -59,13 +59,19 @@ rootdev=mmcblk${mmcrootdev}p${mmcrootpart} bootmode=normal fi +# setting console device if noting is set +if test -z "${console}"; then; + setenv console "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x3f215040" +fi +echo "console: ${console}" + # Kernel image kernel=zImage setenv fdtfile \"bcm2710-rpi-3-b.dtb\" setenv boot_prefixes \"/\" # To use comdline for using serial console. /* Normal mode */ -setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x3f215040 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 ${opts}\" +setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait ${console} vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 ${opts}\" # Find the ramdisk offset and block count part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start diff --git a/board/raspberrypi/rpi/tizen-boot-rpi3.scr b/board/raspberrypi/rpi/tizen-boot-rpi3.scr index e9f8dee..da8669c 100644 --- a/board/raspberrypi/rpi/tizen-boot-rpi3.scr +++ b/board/raspberrypi/rpi/tizen-boot-rpi3.scr @@ -59,13 +59,19 @@ rootdev=mmcblk${mmcrootdev}p${mmcrootpart} bootmode=normal fi +# setting console device if noting is set +if test -z "${console}"; then; + setenv console "console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x3f215040" +fi +echo "console: ${console}" + # Kernel image kernel=Image setenv fdtfile \"bcm2710-rpi-3-b.dtb\" setenv boot_prefixes \"/\" # To use comdline for using serial console. /* Normal mode */ -setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait console=ttyS0,115200n8 earlycon=uart8250,mmio32,0x3f215040 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 ${opts}\" +setenv bootargs \"8250.nr_uarts=1 dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait ${console} vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 ${opts}\" # Find the ramdisk offset and block count part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start -- 2.7.4