diff mbox series

[U-Boot] Revert "arm: config: fix default console only to specify the device"

Message ID 20181120055439.24485-1-sw0312.kim@samsung.com
State Accepted
Commit 767edf0f6b3eaa0303f3fd6afdc14ddce0aca70c
Delegated to: Minkyu Kang
Headers show
Series [U-Boot] Revert "arm: config: fix default console only to specify the device" | expand

Commit Message

Seung-Woo Kim Nov. 20, 2018, 5:54 a.m. UTC
This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.

In exynos boards, ${console} is used to set bootargs but it sets
without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
designated with "console=" but it is removed. So revert the commit.

References for using ${console} in
   board/samsung/common/bootscripts/autoboot.cmd
   board/samsung/common/bootscripts/bootzimg.cmd

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
---
 include/configs/odroid.h            | 4 ++--
 include/configs/odroid_xu3.h        | 4 ++--
 include/configs/s5p_goni.h          | 4 ++--
 include/configs/s5pc210_universal.h | 4 ++--
 include/configs/trats.h             | 4 ++--
 include/configs/trats2.h            | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

Comments

Minkyu Kang Dec. 26, 2018, 2:43 a.m. UTC | #1
Hi,

On 20/11/18 14:54, Seung-Woo Kim wrote:
> This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.
> 
> In exynos boards, ${console} is used to set bootargs but it sets
> without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
> designated with "console=" but it is removed. So revert the commit.
> 
> References for using ${console} in
>    board/samsung/common/bootscripts/autoboot.cmd
>    board/samsung/common/bootscripts/bootzimg.cmd
> 
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> ---
>  include/configs/odroid.h            | 4 ++--
>  include/configs/odroid_xu3.h        | 4 ++--
>  include/configs/s5p_goni.h          | 4 ++--
>  include/configs/s5pc210_universal.h | 4 ++--
>  include/configs/trats.h             | 4 ++--
>  include/configs/trats2.h            | 4 ++--
>  6 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> index ad77242e38..c3520bb15f 100644
> --- a/include/configs/odroid.h
> +++ b/include/configs/odroid.h
> @@ -40,7 +40,7 @@
>  /* Console configuration */
>  
>  #define CONFIG_BOOTCOMMAND		"run distro_bootcmd ; run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
>  
>  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
>  					- GENERATED_GBL_DATA_SIZE)
> @@ -157,7 +157,7 @@
>  		"elif test -e mmc 0 uImage; then; " \
>  			"run boot_uimg;" \
>  		"fi;\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"mmcbootdev=0\0" \
>  	"mmcbootpart=1\0" \
>  	"mmcrootdev=0\0" \
> diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
> index f683ee46e3..3b9a945e7c 100644
> --- a/include/configs/odroid_xu3.h
> +++ b/include/configs/odroid_xu3.h
> @@ -30,7 +30,7 @@
>  
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR - 0x1000000)
>  
> -#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
>  
>  /* USB */
>  #define CONFIG_USB_EHCI_EXYNOS
> @@ -99,7 +99,7 @@
>  	MEM_LAYOUT_ENV_SETTINGS \
>  	BOOTENV \
>  	"rootfstype=ext4\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0"\
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"fdtfile=exynos5422-odroidxu3.dtb\0" \
>  	"boardname=odroidxu3\0" \
>  	"mmcbootdev=0\0" \
> diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
> index 87ddc20a52..ff634d91dd 100644
> --- a/include/configs/s5p_goni.h
> +++ b/include/configs/s5p_goni.h
> @@ -87,7 +87,7 @@
>  
>  #define CONFIG_BOOTCOMMAND	"run mmcboot"
>  
> -#define CONFIG_DEFAULT_CONSOLE	"ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE	"console=ttySAC2,115200n8\0"
>  
>  #define CONFIG_RAMDISK_BOOT	"root=/dev/ram0 rw rootfstype=ext4" \
>  		" ${console} ${meminfo}"
> @@ -134,7 +134,7 @@
>  	"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
>  	"verify=n\0" \
>  	"rootfstype=ext4\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0"\
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
>  	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \
>  	"mmcdev=0\0" \
> diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
> index 999bdd1676..832032da18 100644
> --- a/include/configs/s5pc210_universal.h
> +++ b/include/configs/s5pc210_universal.h
> @@ -27,7 +27,7 @@
>  /* Console configuration */
>  
>  #define CONFIG_BOOTCOMMAND		"run mmcboot"
> -#define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
>  
>  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
>  					- GENERATED_GBL_DATA_SIZE)
> @@ -108,7 +108,7 @@
>  	"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
>  	"verify=n\0" \
>  	"rootfstype=ext4\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"mtdparts=" CONFIG_MTDPARTS_DEFAULT \
>  	"mbrparts=" MBRPARTS_DEFAULT \
>  	"meminfo=crashkernel=32M@0x50000000\0" \
> diff --git a/include/configs/trats.h b/include/configs/trats.h
> index 223fce49a7..af8e8ce3b6 100644
> --- a/include/configs/trats.h
> +++ b/include/configs/trats.h
> @@ -36,7 +36,7 @@
>  #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
>  
>  #define CONFIG_BOOTCOMMAND		"run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
>  
>  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
>  					- GENERATED_GBL_DATA_SIZE)
> @@ -120,7 +120,7 @@
>  	"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
>  	"verify=n\0" \
>  	"rootfstype=ext4\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"meminfo=crashkernel=32M@0x50000000\0" \
>  	"nfsroot=/nfsroot/arm\0" \
>  	"bootblock=" CONFIG_BOOTBLOCK "\0" \
> diff --git a/include/configs/trats2.h b/include/configs/trats2.h
> index f1e4cbad30..9c6b2bbc8d 100644
> --- a/include/configs/trats2.h
> +++ b/include/configs/trats2.h
> @@ -34,7 +34,7 @@
>  /* Console configuration */
>  
>  #define CONFIG_BOOTCOMMAND		"run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
>  
>  #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
>  					- GENERATED_GBL_DATA_SIZE)
> @@ -103,7 +103,7 @@
>  	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
>  	"verify=n\0" \
>  	"rootfstype=ext4\0" \
> -	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +	"console=" CONFIG_DEFAULT_CONSOLE \
>  	"kernelname=uImage\0" \
>  	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
>  		"${kernelname}\0" \
> 

I agree with that we did not consider about side effect of this patch.
So, applied to u-boot-samsung.

@ Dongjin Kim,
I'm sorry to revert your patch because you missed some boards and scripts.
Please check and send new patch.

Thanks,
Minkyu Kang.
Anand Moon March 25, 2019, 6:45 a.m. UTC | #2
Hi Seung-Woo,

On Tue, 20 Nov 2018 at 11:25, Seung-Woo Kim <sw0312.kim@samsung.com> wrote:
>
> This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.
>
> In exynos boards, ${console} is used to set bootargs but it sets
> without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
> designated with "console=" but it is removed. So revert the commit.
>
> References for using ${console} in
>    board/samsung/common/bootscripts/autoboot.cmd
>    board/samsung/common/bootscripts/bootzimg.cmd
>
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> ---
>  include/configs/odroid.h            | 4 ++--
>  include/configs/odroid_xu3.h        | 4 ++--
>  include/configs/s5p_goni.h          | 4 ++--
>  include/configs/s5pc210_universal.h | 4 ++--
>  include/configs/trats.h             | 4 ++--
>  include/configs/trats2.h            | 4 ++--
>  6 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> index ad77242e38..c3520bb15f 100644
> --- a/include/configs/odroid.h
> +++ b/include/configs/odroid.h
> @@ -40,7 +40,7 @@
>  /* Console configuration */
>
>  #define CONFIG_BOOTCOMMAND             "run distro_bootcmd ; run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE         "ttySAC1,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC1,115200n8\0"
>
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
>                                         - GENERATED_GBL_DATA_SIZE)
> @@ -157,7 +157,7 @@
>                 "elif test -e mmc 0 uImage; then; " \
>                         "run boot_uimg;" \
>                 "fi;\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "mmcbootdev=0\0" \
>         "mmcbootpart=1\0" \
>         "mmcrootdev=0\0" \
> diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
> index f683ee46e3..3b9a945e7c 100644
> --- a/include/configs/odroid_xu3.h
> +++ b/include/configs/odroid_xu3.h
> @@ -30,7 +30,7 @@
>
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR - 0x1000000)
>
> -#define CONFIG_DEFAULT_CONSOLE         "ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC2,115200n8\0"
>
>  /* USB */
>  #define CONFIG_USB_EHCI_EXYNOS
> @@ -99,7 +99,7 @@
>         MEM_LAYOUT_ENV_SETTINGS \
>         BOOTENV \
>         "rootfstype=ext4\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "fdtfile=exynos5422-odroidxu3.dtb\0" \
>         "boardname=odroidxu3\0" \
>         "mmcbootdev=0\0" \
> diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
> index 87ddc20a52..ff634d91dd 100644
> --- a/include/configs/s5p_goni.h
> +++ b/include/configs/s5p_goni.h
> @@ -87,7 +87,7 @@
>
>  #define CONFIG_BOOTCOMMAND     "run mmcboot"
>
> -#define CONFIG_DEFAULT_CONSOLE "ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE "console=ttySAC2,115200n8\0"
>
>  #define CONFIG_RAMDISK_BOOT    "root=/dev/ram0 rw rootfstype=ext4" \
>                 " ${console} ${meminfo}"
> @@ -134,7 +134,7 @@
>         "bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
>         "verify=n\0" \
>         "rootfstype=ext4\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0"\
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
>         "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \
>         "mmcdev=0\0" \
> diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
> index 999bdd1676..832032da18 100644
> --- a/include/configs/s5pc210_universal.h
> +++ b/include/configs/s5pc210_universal.h
> @@ -27,7 +27,7 @@
>  /* Console configuration */
>
>  #define CONFIG_BOOTCOMMAND             "run mmcboot"
> -#define CONFIG_DEFAULT_CONSOLE         "ttySAC1,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC1,115200n8\0"
>
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
>                                         - GENERATED_GBL_DATA_SIZE)
> @@ -108,7 +108,7 @@
>         "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
>         "verify=n\0" \
>         "rootfstype=ext4\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "mtdparts=" CONFIG_MTDPARTS_DEFAULT \
>         "mbrparts=" MBRPARTS_DEFAULT \
>         "meminfo=crashkernel=32M@0x50000000\0" \
> diff --git a/include/configs/trats.h b/include/configs/trats.h
> index 223fce49a7..af8e8ce3b6 100644
> --- a/include/configs/trats.h
> +++ b/include/configs/trats.h
> @@ -36,7 +36,7 @@
>  #define CONFIG_MACH_TYPE               MACH_TYPE_TRATS
>
>  #define CONFIG_BOOTCOMMAND             "run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE         "ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC2,115200n8\0"
>
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
>                                         - GENERATED_GBL_DATA_SIZE)
> @@ -120,7 +120,7 @@
>         "mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
>         "verify=n\0" \
>         "rootfstype=ext4\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "meminfo=crashkernel=32M@0x50000000\0" \
>         "nfsroot=/nfsroot/arm\0" \
>         "bootblock=" CONFIG_BOOTBLOCK "\0" \
> diff --git a/include/configs/trats2.h b/include/configs/trats2.h
> index f1e4cbad30..9c6b2bbc8d 100644
> --- a/include/configs/trats2.h
> +++ b/include/configs/trats2.h
> @@ -34,7 +34,7 @@
>  /* Console configuration */
>
>  #define CONFIG_BOOTCOMMAND             "run autoboot"
> -#define CONFIG_DEFAULT_CONSOLE         "ttySAC2,115200n8"
> +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC2,115200n8\0"
>
>  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
>                                         - GENERATED_GBL_DATA_SIZE)
> @@ -103,7 +103,7 @@
>         "boottrace=setenv opts initcall_debug; run bootcmd\0" \
>         "verify=n\0" \
>         "rootfstype=ext4\0" \
> -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> +       "console=" CONFIG_DEFAULT_CONSOLE \
>         "kernelname=uImage\0" \
>         "loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
>                 "${kernelname}\0" \
> --
> 2.19.1

This revert commit breaks the booting of the Odroid U3 using latest
u-boot on ArchLinux.
I have just tried to install archlinux on sdcard and update the latest kernel
after compiling the latest u-boot and upgrade.
It fails to boot up at-least their is not console output on the serial port.

[0] https://www.spinics.net/lists/arm-kernel/msg713918.html

I shared the my input on above link.
Can your verify this from your side.

Best Regards
-Anand
Seung-Woo Kim March 26, 2019, 4:34 a.m. UTC | #3
Hello Anand,

> -----Original Message-----
> From: Anand Moon [mailto:linux.amoon@gmail.com]
> Sent: Monday, March 25, 2019 3:45 PM
> To: Seung-Woo Kim
> Cc: U-Boot Mailing List; Lukasz Majewski
> Subject: Re: [U-Boot] [PATCH] Revert "arm: config: fix default console only to specify the device"
> 
> Hi Seung-Woo,
> 
> On Tue, 20 Nov 2018 at 11:25, Seung-Woo Kim <sw0312.kim@samsung.com> wrote:
> >
> > This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.
> >
> > In exynos boards, ${console} is used to set bootargs but it sets
> > without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
> > designated with "console=" but it is removed. So revert the commit.
> >
> > References for using ${console} in
> >    board/samsung/common/bootscripts/autoboot.cmd
> >    board/samsung/common/bootscripts/bootzimg.cmd
> >
> > Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> > ---
> >  include/configs/odroid.h            | 4 ++--
> >  include/configs/odroid_xu3.h        | 4 ++--
> >  include/configs/s5p_goni.h          | 4 ++--
> >  include/configs/s5pc210_universal.h | 4 ++--
> >  include/configs/trats.h             | 4 ++--
> >  include/configs/trats2.h            | 4 ++--
> >  6 files changed, 12 insertions(+), 12 deletions(-)
> >
> > diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> > index ad77242e38..c3520bb15f 100644
> > --- a/include/configs/odroid.h
> > +++ b/include/configs/odroid.h
> > @@ -40,7 +40,7 @@
> >  /* Console configuration */
> >
> >  #define CONFIG_BOOTCOMMAND             "run distro_bootcmd ; run autoboot"
> > -#define CONFIG_DEFAULT_CONSOLE         "ttySAC1,115200n8"
> > +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC1,115200n8\0"
> >
> >  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
> >                                         - GENERATED_GBL_DATA_SIZE)
> > @@ -157,7 +157,7 @@
> >                 "elif test -e mmc 0 uImage; then; " \
> >                         "run boot_uimg;" \
> >                 "fi;\0" \
> > -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> > +       "console=" CONFIG_DEFAULT_CONSOLE \
> >         "mmcbootdev=0\0" \
> >         "mmcbootpart=1\0" \
> >         "mmcrootdev=0\0" \

<...>

> > --
> > 2.19.1
> 
> This revert commit breaks the booting of the Odroid U3 using latest
> u-boot on ArchLinux.
> I have just tried to install archlinux on sdcard and update the latest kernel
> after compiling the latest u-boot and upgrade.
> It fails to boot up at-least their is not console output on the serial port.
> 
> [0] https://www.spinics.net/lists/arm-kernel/msg713918.html
> 
> I shared the my input on above link.
> Can your verify this from your side.

In my case, it works fine for booting mainline kernel at least.
Can you try after "env default -a; saveenv; reset;" command from u-boot prompt?
When I cleared env, console in env is "console=console=ttySAC1,115200n8".
Please refer below my system console log from odroud-u3.

U-Boot 2019.04-rc4-00051-ge7134b9714 (Mar 26 2019 - 13:00:45 +0900)

CPU:   Exynos4412 @ 1 GHz
Model: Odroid based on Exynos4412
Type:  u3
DRAM:  2 GiB
LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling
LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling
LDO21@TFLASH_2.8V: set 2800000 uV; enabling
MMC:   sdhci@12530000 - probe failed: -19

Loading Environment from MMC... OK
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
Odroid # 
Odroid # 
Odroid # printenv
arch=arm
autoboot=if test -e mmc 0 boot.scr; then; run boot_script; elif test -e mmc 0 Image.itb; then; run boot_fit;elif test -e mmc 0 zImage; then; run boot_zimg;elif test -e mmc 0 uImage; then; run boot_uimg;fi;
<...>
console=console=ttySAC1,115200n8
<...>
Environment size: 4657/16380 bytes
Odroid # run autoboot
55205 bytes read in 4 ms (13.2 MiB/s)
8556752 bytes read in 299 ms (27.3 MiB/s)
Kernel image @ 0x41000000 [ 0x000000 - 0x8290d0 ]
## Flattened Device Tree blob at 40800000
   Booting using the fdt blob at 0x40800000
   Loading Device Tree to 4ffef000, end 4ffff7a4 ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0xa00

Best Regards,
- Seung-Woo Kim

> 
> Best Regards
> -Anand
Anand Moon March 27, 2019, 5:12 a.m. UTC | #4
Hi Seung-Woo Kim,

On Tue, 26 Mar 2019 at 10:04, Seung-Woo Kim <sw0312.kim@samsung.com> wrote:
>
> Hello Anand,
>
> > -----Original Message-----
> > From: Anand Moon [mailto:linux.amoon@gmail.com]
> > Sent: Monday, March 25, 2019 3:45 PM
> > To: Seung-Woo Kim
> > Cc: U-Boot Mailing List; Lukasz Majewski
> > Subject: Re: [U-Boot] [PATCH] Revert "arm: config: fix default console only to specify the device"
> >
> > Hi Seung-Woo,
> >
> > On Tue, 20 Nov 2018 at 11:25, Seung-Woo Kim <sw0312.kim@samsung.com> wrote:
> > >
> > > This reverts commit 232ed3ca534708527a9515c7c41bc3542949525c.
> > >
> > > In exynos boards, ${console} is used to set bootargs but it sets
> > > without "console=", so CONFIG_DEFAULT_CONSOLE for these boards is
> > > designated with "console=" but it is removed. So revert the commit.
> > >
> > > References for using ${console} in
> > >    board/samsung/common/bootscripts/autoboot.cmd
> > >    board/samsung/common/bootscripts/bootzimg.cmd
> > >
> > > Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
> > > ---
> > >  include/configs/odroid.h            | 4 ++--
> > >  include/configs/odroid_xu3.h        | 4 ++--
> > >  include/configs/s5p_goni.h          | 4 ++--
> > >  include/configs/s5pc210_universal.h | 4 ++--
> > >  include/configs/trats.h             | 4 ++--
> > >  include/configs/trats2.h            | 4 ++--
> > >  6 files changed, 12 insertions(+), 12 deletions(-)
> > >
> > > diff --git a/include/configs/odroid.h b/include/configs/odroid.h
> > > index ad77242e38..c3520bb15f 100644
> > > --- a/include/configs/odroid.h
> > > +++ b/include/configs/odroid.h
> > > @@ -40,7 +40,7 @@
> > >  /* Console configuration */
> > >
> > >  #define CONFIG_BOOTCOMMAND             "run distro_bootcmd ; run autoboot"
> > > -#define CONFIG_DEFAULT_CONSOLE         "ttySAC1,115200n8"
> > > +#define CONFIG_DEFAULT_CONSOLE         "console=ttySAC1,115200n8\0"
> > >
> > >  #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR \
> > >                                         - GENERATED_GBL_DATA_SIZE)
> > > @@ -157,7 +157,7 @@
> > >                 "elif test -e mmc 0 uImage; then; " \
> > >                         "run boot_uimg;" \
> > >                 "fi;\0" \
> > > -       "console=" CONFIG_DEFAULT_CONSOLE "\0" \
> > > +       "console=" CONFIG_DEFAULT_CONSOLE \
> > >         "mmcbootdev=0\0" \
> > >         "mmcbootpart=1\0" \
> > >         "mmcrootdev=0\0" \
>
> <...>
>
> > > --
> > > 2.19.1
> >
> > This revert commit breaks the booting of the Odroid U3 using latest
> > u-boot on ArchLinux.
> > I have just tried to install archlinux on sdcard and update the latest kernel
> > after compiling the latest u-boot and upgrade.
> > It fails to boot up at-least their is not console output on the serial port.
> >
> > [0] https://www.spinics.net/lists/arm-kernel/msg713918.html
> >
> > I shared the my input on above link.
> > Can your verify this from your side.
>
> In my case, it works fine for booting mainline kernel at least.
> Can you try after "env default -a; saveenv; reset;" command from u-boot prompt?
> When I cleared env, console in env is "console=console=ttySAC1,115200n8".
> Please refer below my system console log from odroud-u3.
>
> U-Boot 2019.04-rc4-00051-ge7134b9714 (Mar 26 2019 - 13:00:45 +0900)
>
> CPU:   Exynos4412 @ 1 GHz
> Model: Odroid based on Exynos4412
> Type:  u3
> DRAM:  2 GiB
> LDO20@VDDQ_EMMC_1.8V: set 1800000 uV; enabling
> LDO22@VDDQ_EMMC_2.8V: set 2800000 uV; enabling
> LDO21@TFLASH_2.8V: set 2800000 uV; enabling
> MMC:   sdhci@12530000 - probe failed: -19
>
> Loading Environment from MMC... OK
> Net:   No ethernet found.
> Hit any key to stop autoboot:  0
> Odroid #
> Odroid #
> Odroid # printenv
> arch=arm
> autoboot=if test -e mmc 0 boot.scr; then; run boot_script; elif test -e mmc 0 Image.itb; then; run boot_fit;elif test -e mmc 0 zImage; then; run boot_zimg;elif test -e mmc 0 uImage; then; run boot_uimg;fi;
> <...>
> console=console=ttySAC1,115200n8
> <...>
> Environment size: 4657/16380 bytes
> Odroid # run autoboot
> 55205 bytes read in 4 ms (13.2 MiB/s)
> 8556752 bytes read in 299 ms (27.3 MiB/s)
> Kernel image @ 0x41000000 [ 0x000000 - 0x8290d0 ]
> ## Flattened Device Tree blob at 40800000
>    Booting using the fdt blob at 0x40800000
>    Loading Device Tree to 4ffef000, end 4ffff7a4 ... OK
>
> Starting kernel ...
>
> [    0.000000] Booting Linux on physical CPU 0xa00
>
> Best Regards,
> - Seung-Woo Kim
>

Thanks for your testing.
I will check this again at my end.

Best Regards
-Anand
diff mbox series

Patch

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index ad77242e38..c3520bb15f 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -40,7 +40,7 @@ 
 /* Console configuration */
 
 #define CONFIG_BOOTCOMMAND		"run distro_bootcmd ; run autoboot"
-#define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
 					- GENERATED_GBL_DATA_SIZE)
@@ -157,7 +157,7 @@ 
 		"elif test -e mmc 0 uImage; then; " \
 			"run boot_uimg;" \
 		"fi;\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"mmcbootdev=0\0" \
 	"mmcbootpart=1\0" \
 	"mmcrootdev=0\0" \
diff --git a/include/configs/odroid_xu3.h b/include/configs/odroid_xu3.h
index f683ee46e3..3b9a945e7c 100644
--- a/include/configs/odroid_xu3.h
+++ b/include/configs/odroid_xu3.h
@@ -30,7 +30,7 @@ 
 
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_LOAD_ADDR - 0x1000000)
 
-#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
 
 /* USB */
 #define CONFIG_USB_EHCI_EXYNOS
@@ -99,7 +99,7 @@ 
 	MEM_LAYOUT_ENV_SETTINGS \
 	BOOTENV \
 	"rootfstype=ext4\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0"\
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"fdtfile=exynos5422-odroidxu3.dtb\0" \
 	"boardname=odroidxu3\0" \
 	"mmcbootdev=0\0" \
diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h
index 87ddc20a52..ff634d91dd 100644
--- a/include/configs/s5p_goni.h
+++ b/include/configs/s5p_goni.h
@@ -87,7 +87,7 @@ 
 
 #define CONFIG_BOOTCOMMAND	"run mmcboot"
 
-#define CONFIG_DEFAULT_CONSOLE	"ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE	"console=ttySAC2,115200n8\0"
 
 #define CONFIG_RAMDISK_BOOT	"root=/dev/ram0 rw rootfstype=ext4" \
 		" ${console} ${meminfo}"
@@ -134,7 +134,7 @@ 
 	"bootchart=set opts init=/sbin/bootchartd; run bootcmd\0" \
 	"verify=n\0" \
 	"rootfstype=ext4\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0"\
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"meminfo=mem=80M mem=256M@0x40000000 mem=128M@0x50000000\0" \
 	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x30007FC0 uImage\0" \
 	"mmcdev=0\0" \
diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h
index 999bdd1676..832032da18 100644
--- a/include/configs/s5pc210_universal.h
+++ b/include/configs/s5pc210_universal.h
@@ -27,7 +27,7 @@ 
 /* Console configuration */
 
 #define CONFIG_BOOTCOMMAND		"run mmcboot"
-#define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC1,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
 					- GENERATED_GBL_DATA_SIZE)
@@ -108,7 +108,7 @@ 
 	"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
 	"verify=n\0" \
 	"rootfstype=ext4\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"mtdparts=" CONFIG_MTDPARTS_DEFAULT \
 	"mbrparts=" MBRPARTS_DEFAULT \
 	"meminfo=crashkernel=32M@0x50000000\0" \
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 223fce49a7..af8e8ce3b6 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -36,7 +36,7 @@ 
 #define CONFIG_MACH_TYPE		MACH_TYPE_TRATS
 
 #define CONFIG_BOOTCOMMAND		"run autoboot"
-#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
 					- GENERATED_GBL_DATA_SIZE)
@@ -120,7 +120,7 @@ 
 	"mmcoops=mmc read 0 0x40000000 0x40 8; md 0x40000000 0x400\0" \
 	"verify=n\0" \
 	"rootfstype=ext4\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"meminfo=crashkernel=32M@0x50000000\0" \
 	"nfsroot=/nfsroot/arm\0" \
 	"bootblock=" CONFIG_BOOTBLOCK "\0" \
diff --git a/include/configs/trats2.h b/include/configs/trats2.h
index f1e4cbad30..9c6b2bbc8d 100644
--- a/include/configs/trats2.h
+++ b/include/configs/trats2.h
@@ -34,7 +34,7 @@ 
 /* Console configuration */
 
 #define CONFIG_BOOTCOMMAND		"run autoboot"
-#define CONFIG_DEFAULT_CONSOLE		"ttySAC2,115200n8"
+#define CONFIG_DEFAULT_CONSOLE		"console=ttySAC2,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
 					- GENERATED_GBL_DATA_SIZE)
@@ -103,7 +103,7 @@ 
 	"boottrace=setenv opts initcall_debug; run bootcmd\0" \
 	"verify=n\0" \
 	"rootfstype=ext4\0" \
-	"console=" CONFIG_DEFAULT_CONSOLE "\0" \
+	"console=" CONFIG_DEFAULT_CONSOLE \
 	"kernelname=uImage\0" \
 	"loaduimage=ext4load mmc ${mmcdev}:${mmcbootpart} 0x40007FC0 " \
 		"${kernelname}\0" \