From c02e08a842649a5af40091f6c28cd76bdcb2a004 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Tue, 8 May 2018 14:41:32 +0900 Subject: [PATCH] rpi: tizen-boot: rpi2: 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: I36f58c0532e0a10efb7844c14caeb21258c9b792 Signed-off-by: Seung-Woo Kim --- board/raspberrypi/rpi/tizen-boot-rpi2.scr | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/board/raspberrypi/rpi/tizen-boot-rpi2.scr b/board/raspberrypi/rpi/tizen-boot-rpi2.scr index 6264cc1..5923f49 100644 --- a/board/raspberrypi/rpi/tizen-boot-rpi2.scr +++ b/board/raspberrypi/rpi/tizen-boot-rpi2.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=ttyAMA0,115200n8 earlyprintk" +fi +echo "console: ${console}" + # Kernel image kernel=zImage setenv fdtfile \"bcm2709-rpi-2-b.dtb\" setenv boot_prefixes \"/\" # To use comdline for using serial console. /* Normal mode */ -setenv bootargs \"dma.dmachans=0x7f35 bcm2709.serial=0xed6687d3 bcm2709.uart_clock=48000000 smsc95xx.macaddr=${ethaddr} root=/dev/${rootdev} rw bootmode=${bootmode} bcm2709.boardrev=0xa02082 rootwait console=ttyAMA0,115200n8 earlyprintk vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 ${opts}\" +setenv bootargs \"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=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbswap=1 ${opts}\" # Find the ramdisk offset and block count part start $bootdev $mmcrootdev $ramdiskpart ramdisk_start -- 2.7.4