rpi: tizen-boot: set console in cmdline as u-boot environment 87/178087/1 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20180510.070755 submit/tizen_4.0/20180510.044527
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 8 May 2018 05:39:09 +0000 (14:39 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 8 May 2018 05:46:28 +0000 (14:46 +0900)
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.

Note: backport from tizen branch

Change-Id: I0fdf7c2d1ec2e5d6b5fa5ae3e779920ac7d4ac45
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
board/raspberrypi/rpi/tizen-boot.scr

index 53d9cc5..cde1870 100644 (file)
@@ -49,13 +49,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 earlyprintk console=ttyS0,115200n8 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