diff mbox series

[U-Boot,5/5] board: ti: beagleboneai: enable in am57xx_evm_defconfig

Message ID 20191120220924.19156-6-c-robey@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series board: ti: beagleboneai: add initial support | expand

Commit Message

Caleb Robey Nov. 20, 2019, 10:09 p.m. UTC
Adding the configurations to the evm_defconfig file

Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Caleb Robey <c-robey@ti.com>

---
 configs/am57xx_evm_defconfig  | 2 +-
 include/environment/ti/boot.h | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Lokesh Vutla Nov. 21, 2019, 3:45 a.m. UTC | #1
On 21/11/19 3:39 AM, Caleb Robey wrote:
> Adding the configurations to the evm_defconfig file
> 
> Signed-off-by: Jason Kridner <jdk@ti.com>
> Signed-off-by: Caleb Robey <c-robey@ti.com>
> 
> ---
>  configs/am57xx_evm_defconfig  | 2 +-
>  include/environment/ti/boot.h | 4 +++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
> index 588e58947d..f59305794c 100644
> --- a/configs/am57xx_evm_defconfig
> +++ b/configs/am57xx_evm_defconfig
> @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_SPL_OF_CONTROL=y
>  CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk"
>  CONFIG_ENV_IS_IN_MMC=y
>  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
>  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
> index 684a744f31..d6f153c934 100644
> --- a/include/environment/ti/boot.h
> +++ b/include/environment/ti/boot.h
> @@ -10,7 +10,7 @@
>  #define __TI_BOOT_H
>  
>  #ifndef CONSOLEDEV
> -#define CONSOLEDEV "ttyS2"
> +#define CONSOLEDEV "ttyS0"
>  #endif

This will fail kernel to boot when using the default args. Can you try updating
this dynamically?

Thanks and regards,
Lokesh

>  
>  #define VBMETA_PART_SIZE		(64 * 1024)
> @@ -185,6 +185,8 @@
>  			"setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
>  		"if test $board_name = beagle_x15_revc; then " \
>  			"setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \
> +		"if test $board_name = am5729_beagleboneai; then " \
> +			"setenv fdtfile am5729-beagleboneai.dtb; fi;" \
>  		"if test $board_name = am572x_idk; then " \
>  			"setenv fdtfile am572x-idk.dtb; fi;" \
>  		"if test $board_name = am574x_idk; then " \
>
Tom Rini Nov. 21, 2019, 3:12 p.m. UTC | #2
On Thu, Nov 21, 2019 at 09:15:03AM +0530, Lokesh Vutla wrote:
> 
> 
> On 21/11/19 3:39 AM, Caleb Robey wrote:
> > Adding the configurations to the evm_defconfig file
> > 
> > Signed-off-by: Jason Kridner <jdk@ti.com>
> > Signed-off-by: Caleb Robey <c-robey@ti.com>
> > 
> > ---
> >  configs/am57xx_evm_defconfig  | 2 +-
> >  include/environment/ti/boot.h | 4 +++-
> >  2 files changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
> > index 588e58947d..f59305794c 100644
> > --- a/configs/am57xx_evm_defconfig
> > +++ b/configs/am57xx_evm_defconfig
> > @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y
> >  CONFIG_OF_CONTROL=y
> >  CONFIG_SPL_OF_CONTROL=y
> >  CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> > -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> > +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk"
> >  CONFIG_ENV_IS_IN_MMC=y
> >  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> >  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> > diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
> > index 684a744f31..d6f153c934 100644
> > --- a/include/environment/ti/boot.h
> > +++ b/include/environment/ti/boot.h
> > @@ -10,7 +10,7 @@
> >  #define __TI_BOOT_H
> >  
> >  #ifndef CONSOLEDEV
> > -#define CONSOLEDEV "ttyS2"
> > +#define CONSOLEDEV "ttyS0"
> >  #endif
> 
> This will fail kernel to boot when using the default args. Can you try updating
> this dynamically?

Yes, am57xx_evm will need to perhaps leverage CONFIG_PREBOOT to run
something to dynamically update the console environment variable at run
time.
Caleb Robey Nov. 21, 2019, 4 p.m. UTC | #3
> -----Original Message-----
> From: Tom Rini [mailto:trini@konsulko.com]
> Sent: Thursday, November 21, 2019 9:12 AM
> To: Vutla, Lokesh
> Cc: Robey, Caleb; u-boot@lists.denx.de; Jason Kridner; Erdahl, Michael;
> Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek; Stefan Roese; Neil
> Armstrong; Masahiro Yamada; Fabio Estevam; Troy Kisky; Rizvi, Mohammad
> Faiz Abbas; Dannenberg, Andreas; Hiblot, Jean-Jacques; Heiko Schocher; Joe
> Hershberger; Simon Glass; Sam Protsenko; Bajjuri, Praneeth; Ruslan
> Trofymenko; Alistair Strachan; Davis, Andrew
> Subject: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable in
> am57xx_evm_defconfig
> 
> On Thu, Nov 21, 2019 at 09:15:03AM +0530, Lokesh Vutla wrote:
> >
> >
> > On 21/11/19 3:39 AM, Caleb Robey wrote:
> > > Adding the configurations to the evm_defconfig file
> > >
> > > Signed-off-by: Jason Kridner <jdk@ti.com>
> > > Signed-off-by: Caleb Robey <c-robey@ti.com>
> > >
> > > ---
> > >  configs/am57xx_evm_defconfig  | 2 +-  include/environment/ti/boot.h
> > > | 4 +++-
> > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/configs/am57xx_evm_defconfig
> > > b/configs/am57xx_evm_defconfig index 588e58947d..f59305794c 100644
> > > --- a/configs/am57xx_evm_defconfig
> > > +++ b/configs/am57xx_evm_defconfig
> > > @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y
> > >  CONFIG_OF_CONTROL=y
> > >  CONFIG_SPL_OF_CONTROL=y
> > >  CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> > > -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> > > +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk
> am574x-idk"
> > >  CONFIG_ENV_IS_IN_MMC=y
> > >  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> > >  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> > > diff --git a/include/environment/ti/boot.h
> > > b/include/environment/ti/boot.h index 684a744f31..d6f153c934 100644
> > > --- a/include/environment/ti/boot.h
> > > +++ b/include/environment/ti/boot.h
> > > @@ -10,7 +10,7 @@
> > >  #define __TI_BOOT_H
> > >
> > >  #ifndef CONSOLEDEV
> > > -#define CONSOLEDEV "ttyS2"
> > > +#define CONSOLEDEV "ttyS0"
> > >  #endif
> >
> > This will fail kernel to boot when using the default args. Can you try
> > updating this dynamically?
> 
> Yes, am57xx_evm will need to perhaps leverage CONFIG_PREBOOT to run
> something to dynamically update the console environment variable at run
> time.
> 

This line seems to be working: 
CONFIG_PREBOOT="if board_name am5729_beagleboneai; then setenv console ttyS0,115200; fi"

Any concerns with that? I removed the change from boot.h and 
tested with the am5729 IDK and beagleboneai board. Everything seems to be working just fine.

Best,
Caleb

> --
> Tom
Tom Rini Nov. 21, 2019, 4:34 p.m. UTC | #4
On Thu, Nov 21, 2019 at 04:00:03PM +0000, Robey, Caleb wrote:
> 
> 
> > -----Original Message-----
> > From: Tom Rini [mailto:trini@konsulko.com]
> > Sent: Thursday, November 21, 2019 9:12 AM
> > To: Vutla, Lokesh
> > Cc: Robey, Caleb; u-boot@lists.denx.de; Jason Kridner; Erdahl, Michael;
> > Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek; Stefan Roese; Neil
> > Armstrong; Masahiro Yamada; Fabio Estevam; Troy Kisky; Rizvi, Mohammad
> > Faiz Abbas; Dannenberg, Andreas; Hiblot, Jean-Jacques; Heiko Schocher; Joe
> > Hershberger; Simon Glass; Sam Protsenko; Bajjuri, Praneeth; Ruslan
> > Trofymenko; Alistair Strachan; Davis, Andrew
> > Subject: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable in
> > am57xx_evm_defconfig
> > 
> > On Thu, Nov 21, 2019 at 09:15:03AM +0530, Lokesh Vutla wrote:
> > >
> > >
> > > On 21/11/19 3:39 AM, Caleb Robey wrote:
> > > > Adding the configurations to the evm_defconfig file
> > > >
> > > > Signed-off-by: Jason Kridner <jdk@ti.com>
> > > > Signed-off-by: Caleb Robey <c-robey@ti.com>
> > > >
> > > > ---
> > > >  configs/am57xx_evm_defconfig  | 2 +-  include/environment/ti/boot.h
> > > > | 4 +++-
> > > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/configs/am57xx_evm_defconfig
> > > > b/configs/am57xx_evm_defconfig index 588e58947d..f59305794c 100644
> > > > --- a/configs/am57xx_evm_defconfig
> > > > +++ b/configs/am57xx_evm_defconfig
> > > > @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y
> > > >  CONFIG_OF_CONTROL=y
> > > >  CONFIG_SPL_OF_CONTROL=y
> > > >  CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> > > > -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> > > > +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk
> > am574x-idk"
> > > >  CONFIG_ENV_IS_IN_MMC=y
> > > >  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> > > >  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> > > > diff --git a/include/environment/ti/boot.h
> > > > b/include/environment/ti/boot.h index 684a744f31..d6f153c934 100644
> > > > --- a/include/environment/ti/boot.h
> > > > +++ b/include/environment/ti/boot.h
> > > > @@ -10,7 +10,7 @@
> > > >  #define __TI_BOOT_H
> > > >
> > > >  #ifndef CONSOLEDEV
> > > > -#define CONSOLEDEV "ttyS2"
> > > > +#define CONSOLEDEV "ttyS0"
> > > >  #endif
> > >
> > > This will fail kernel to boot when using the default args. Can you try
> > > updating this dynamically?
> > 
> > Yes, am57xx_evm will need to perhaps leverage CONFIG_PREBOOT to run
> > something to dynamically update the console environment variable at run
> > time.
> > 
> 
> This line seems to be working: 
> CONFIG_PREBOOT="if board_name am5729_beagleboneai; then setenv console ttyS0,115200; fi"
> 
> Any concerns with that? I removed the change from boot.h and 
> tested with the am5729 IDK and beagleboneai board. Everything seems to be working just fine.

That literal string?  That can't work right, can it?  I think you need
more like (borrowing from include/environment/ti/boot.h):
if test $board_name = am5729_beagleboneai; then setenv console ttyS0,115200; fi
Caleb Robey Nov. 21, 2019, 10:28 p.m. UTC | #5
> -----Original Message-----
> From: Tom Rini [mailto:trini@konsulko.com]
> Sent: Thursday, November 21, 2019 10:34 AM
> To: Robey, Caleb
> Cc: Vutla, Lokesh; u-boot@lists.denx.de; Jason Kridner; Erdahl, Michael;
> Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek; Stefan Roese; Neil
> Armstrong; Masahiro Yamada; Fabio Estevam; Troy Kisky; Rizvi, Mohammad
> Faiz Abbas; Dannenberg, Andreas; Hiblot, Jean-Jacques; Heiko Schocher; Joe
> Hershberger; Simon Glass; Sam Protsenko; Bajjuri, Praneeth; Ruslan
> Trofymenko; Alistair Strachan; Davis, Andrew
> Subject: Re: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable in
> am57xx_evm_defconfig
> 
> On Thu, Nov 21, 2019 at 04:00:03PM +0000, Robey, Caleb wrote:
> >
> >
> > > -----Original Message-----
> > > From: Tom Rini [mailto:trini@konsulko.com]
> > > Sent: Thursday, November 21, 2019 9:12 AM
> > > To: Vutla, Lokesh
> > > Cc: Robey, Caleb; u-boot@lists.denx.de; Jason Kridner; Erdahl,
> > > Michael; Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek;
> > > Stefan Roese; Neil Armstrong; Masahiro Yamada; Fabio Estevam; Troy
> > > Kisky; Rizvi, Mohammad Faiz Abbas; Dannenberg, Andreas; Hiblot,
> > > Jean-Jacques; Heiko Schocher; Joe Hershberger; Simon Glass; Sam
> > > Protsenko; Bajjuri, Praneeth; Ruslan Trofymenko; Alistair Strachan;
> > > Davis, Andrew
> > > Subject: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable
> > > in am57xx_evm_defconfig
> > >
> > > On Thu, Nov 21, 2019 at 09:15:03AM +0530, Lokesh Vutla wrote:
> > > >
> > > >
> > > > On 21/11/19 3:39 AM, Caleb Robey wrote:
> > > > > Adding the configurations to the evm_defconfig file
> > > > >
> > > > > Signed-off-by: Jason Kridner <jdk@ti.com>
> > > > > Signed-off-by: Caleb Robey <c-robey@ti.com>
> > > > >
> > > > > ---
> > > > >  configs/am57xx_evm_defconfig  | 2 +-
> > > > > include/environment/ti/boot.h
> > > > > | 4 +++-
> > > > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/configs/am57xx_evm_defconfig
> > > > > b/configs/am57xx_evm_defconfig index 588e58947d..f59305794c
> > > > > 100644
> > > > > --- a/configs/am57xx_evm_defconfig
> > > > > +++ b/configs/am57xx_evm_defconfig
> > > > > @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y  CONFIG_OF_CONTROL=y
> > > > > CONFIG_SPL_OF_CONTROL=y
> CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> > > > > -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > > am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> > > > > +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > > am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk
> > > am574x-idk"
> > > > >  CONFIG_ENV_IS_IN_MMC=y
> > > > >  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> > > > >  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> > > > > diff --git a/include/environment/ti/boot.h
> > > > > b/include/environment/ti/boot.h index 684a744f31..d6f153c934
> > > > > 100644
> > > > > --- a/include/environment/ti/boot.h
> > > > > +++ b/include/environment/ti/boot.h
> > > > > @@ -10,7 +10,7 @@
> > > > >  #define __TI_BOOT_H
> > > > >
> > > > >  #ifndef CONSOLEDEV
> > > > > -#define CONSOLEDEV "ttyS2"
> > > > > +#define CONSOLEDEV "ttyS0"
> > > > >  #endif
> > > >
> > > > This will fail kernel to boot when using the default args. Can you
> > > > try updating this dynamically?
> > >
> > > Yes, am57xx_evm will need to perhaps leverage CONFIG_PREBOOT to run
> > > something to dynamically update the console environment variable at
> > > run time.
> > >
> >
> > This line seems to be working:
> > CONFIG_PREBOOT="if board_name am5729_beagleboneai; then setenv
> console ttyS0,115200; fi"
> >
> > Any concerns with that? I removed the change from boot.h and tested
> > with the am5729 IDK and beagleboneai board. Everything seems to be
> working just fine.
> 
> That literal string?  That can't work right, can it?  I think you need more like
> (borrowing from include/environment/ti/boot.h):
> if test $board_name = am5729_beagleboneai; then setenv console
> ttyS0,115200; fi

You're totally right - I think some default behaviors allowed them to boot.
It can be written 'if test $board_name am5729_beagleboneai;" but then that
will work.


> 
> --
> Tom
Tom Rini Nov. 21, 2019, 11:07 p.m. UTC | #6
On Thu, Nov 21, 2019 at 10:28:05PM +0000, Robey, Caleb wrote:
> 
> 
> > -----Original Message-----
> > From: Tom Rini [mailto:trini@konsulko.com]
> > Sent: Thursday, November 21, 2019 10:34 AM
> > To: Robey, Caleb
> > Cc: Vutla, Lokesh; u-boot@lists.denx.de; Jason Kridner; Erdahl, Michael;
> > Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek; Stefan Roese; Neil
> > Armstrong; Masahiro Yamada; Fabio Estevam; Troy Kisky; Rizvi, Mohammad
> > Faiz Abbas; Dannenberg, Andreas; Hiblot, Jean-Jacques; Heiko Schocher; Joe
> > Hershberger; Simon Glass; Sam Protsenko; Bajjuri, Praneeth; Ruslan
> > Trofymenko; Alistair Strachan; Davis, Andrew
> > Subject: Re: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable in
> > am57xx_evm_defconfig
> > 
> > On Thu, Nov 21, 2019 at 04:00:03PM +0000, Robey, Caleb wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Tom Rini [mailto:trini@konsulko.com]
> > > > Sent: Thursday, November 21, 2019 9:12 AM
> > > > To: Vutla, Lokesh
> > > > Cc: Robey, Caleb; u-boot@lists.denx.de; Jason Kridner; Erdahl,
> > > > Michael; Kridner, Jason; Kever Yang; Jagan Teki; Michal Simek;
> > > > Stefan Roese; Neil Armstrong; Masahiro Yamada; Fabio Estevam; Troy
> > > > Kisky; Rizvi, Mohammad Faiz Abbas; Dannenberg, Andreas; Hiblot,
> > > > Jean-Jacques; Heiko Schocher; Joe Hershberger; Simon Glass; Sam
> > > > Protsenko; Bajjuri, Praneeth; Ruslan Trofymenko; Alistair Strachan;
> > > > Davis, Andrew
> > > > Subject: [EXTERNAL] Re: [PATCH 5/5] board: ti: beagleboneai: enable
> > > > in am57xx_evm_defconfig
> > > >
> > > > On Thu, Nov 21, 2019 at 09:15:03AM +0530, Lokesh Vutla wrote:
> > > > >
> > > > >
> > > > > On 21/11/19 3:39 AM, Caleb Robey wrote:
> > > > > > Adding the configurations to the evm_defconfig file
> > > > > >
> > > > > > Signed-off-by: Jason Kridner <jdk@ti.com>
> > > > > > Signed-off-by: Caleb Robey <c-robey@ti.com>
> > > > > >
> > > > > > ---
> > > > > >  configs/am57xx_evm_defconfig  | 2 +-
> > > > > > include/environment/ti/boot.h
> > > > > > | 4 +++-
> > > > > >  2 files changed, 4 insertions(+), 2 deletions(-)
> > > > > >
> > > > > > diff --git a/configs/am57xx_evm_defconfig
> > > > > > b/configs/am57xx_evm_defconfig index 588e58947d..f59305794c
> > > > > > 100644
> > > > > > --- a/configs/am57xx_evm_defconfig
> > > > > > +++ b/configs/am57xx_evm_defconfig
> > > > > > @@ -38,7 +38,7 @@ CONFIG_CMD_BCB=y  CONFIG_OF_CONTROL=y
> > > > > > CONFIG_SPL_OF_CONTROL=y
> > CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
> > > > > > -CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > > > am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
> > > > > > +CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1
> > > > am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk
> > > > am574x-idk"
> > > > > >  CONFIG_ENV_IS_IN_MMC=y
> > > > > >  CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
> > > > > >  CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> > > > > > diff --git a/include/environment/ti/boot.h
> > > > > > b/include/environment/ti/boot.h index 684a744f31..d6f153c934
> > > > > > 100644
> > > > > > --- a/include/environment/ti/boot.h
> > > > > > +++ b/include/environment/ti/boot.h
> > > > > > @@ -10,7 +10,7 @@
> > > > > >  #define __TI_BOOT_H
> > > > > >
> > > > > >  #ifndef CONSOLEDEV
> > > > > > -#define CONSOLEDEV "ttyS2"
> > > > > > +#define CONSOLEDEV "ttyS0"
> > > > > >  #endif
> > > > >
> > > > > This will fail kernel to boot when using the default args. Can you
> > > > > try updating this dynamically?
> > > >
> > > > Yes, am57xx_evm will need to perhaps leverage CONFIG_PREBOOT to run
> > > > something to dynamically update the console environment variable at
> > > > run time.
> > > >
> > >
> > > This line seems to be working:
> > > CONFIG_PREBOOT="if board_name am5729_beagleboneai; then setenv
> > console ttyS0,115200; fi"
> > >
> > > Any concerns with that? I removed the change from boot.h and tested
> > > with the am5729 IDK and beagleboneai board. Everything seems to be
> > working just fine.
> > 
> > That literal string?  That can't work right, can it?  I think you need more like
> > (borrowing from include/environment/ti/boot.h):
> > if test $board_name = am5729_beagleboneai; then setenv console
> > ttyS0,115200; fi
> 
> You're totally right - I think some default behaviors allowed them to boot.
> It can be written 'if test $board_name am5729_beagleboneai;" but then that
> will work.

Nope, it needs that = too.  Doing a sandbox build can be really helpful
for testing things like this:
=> if test $stdin serial;then echo happen;fi
happen
=> if test $stdin foo;then echo happen;fi
happen
=> if test $stdin = foo;then echo happen;fi
=> if test $stdin = serial;then echo happen;fi
happen
=>
diff mbox series

Patch

diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 588e58947d..f59305794c 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -38,7 +38,7 @@  CONFIG_CMD_BCB=y
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
-CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
+CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk"
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 684a744f31..d6f153c934 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -10,7 +10,7 @@ 
 #define __TI_BOOT_H
 
 #ifndef CONSOLEDEV
-#define CONSOLEDEV "ttyS2"
+#define CONSOLEDEV "ttyS0"
 #endif
 
 #define VBMETA_PART_SIZE		(64 * 1024)
@@ -185,6 +185,8 @@ 
 			"setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \
 		"if test $board_name = beagle_x15_revc; then " \
 			"setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \
+		"if test $board_name = am5729_beagleboneai; then " \
+			"setenv fdtfile am5729-beagleboneai.dtb; fi;" \
 		"if test $board_name = am572x_idk; then " \
 			"setenv fdtfile am572x-idk.dtb; fi;" \
 		"if test $board_name = am574x_idk; then " \