All of lore.kernel.org
 help / color / mirror / Atom feed
* BUG in u-boot  for ODROID-XU3/XU4/HC1/HC2
@ 2022-05-28  0:10 Gabriel Hojda
  2022-06-07 16:14 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Hojda @ 2022-05-28  0:10 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

hi,

i've recently tried u-boot 2022.04 (u-boot-v2022.04.tar.bz2) and my 
odroid-hc2 didn't boot with uefi (default since Fedora 35) but worked 
when i used exlinux.conf

trying to track down the problem, i've found that in the default u-boot 
environment the "board" and "boardname" variables were "smdk5420" and 
not "odroid" (like before) ... and thus the "fdtfile" variable was 
"exynos5422-smdk5420hc1.dtb" and not "exynos5422-odroidhc1.dtb".

continuing i've made a diff between the u-boot-v2021.10.tar.bz2 and 
u-boot-v2022.04.tar.bz2 ... and long story short, i've found the culprit 
in commit f76750d1 "Convert CONFIG_CONS_INDEX et al to Kconfig" :

-------------------------------------------------------------------------------------------------
--- u-boot-v2021.10/include/configs/odroid_xu3.h 2021-10-04 
18:09:26.000000000 +0300
+++ u-boot-v2022.04/include/configs/odroid_xu3.h 2022-04-04 
17:31:32.000000000 +0300
@@ -75,14 +75,11 @@

  /* Set soc_rev, soc_id, board_rev, board_name, fdtfile */
  #define CONFIG_ODROID_REV_AIN          9
-#define CONFIG_REVISION_TAG

  /*
   * Need to override existing one (smdk5420) with odroid so 
set_board_info will
   * use proper prefix when creating full board_name (SYS_BOARD + type)
   */
-#undef CONFIG_SYS_BOARD
-#define CONFIG_SYS_BOARD               "odroid"

  /* Define new extra env settings, including DFU settings */
  #undef CONFIG_EXTRA_ENV_SETTINGS
-------------------------------------------------------------------------------------------------

and following part needs a revert

-------------------------------------------------------------------------------------------------
-#undef CONFIG_SYS_BOARD
-#define CONFIG_SYS_BOARD               "odroid"
-------------------------------------------------------------------------------------------------

or, as an (untested) alternative, define CONFIG_SYS_BOARD correctly in 
board/samsung/smdk5420/Kconfig as follows:

-------------------------------------------------------------------------------------------------
--- Kconfig     2022-04-04 17:31:32.000000000 +0300
+++ Kconfig.new 2022-05-28 02:57:19.867518057 +0300
@@ -1,7 +1,7 @@
  if TARGET_ODROID_XU3

  config SYS_BOARD
-       default "smdk5420"
+       default "odroid"

  config SYS_VENDOR
         default "samsung"
-------------------------------------------------------------------------------------------------

Gabriel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG in u-boot  for ODROID-XU3/XU4/HC1/HC2
  2022-05-28  0:10 BUG in u-boot for ODROID-XU3/XU4/HC1/HC2 Gabriel Hojda
@ 2022-06-07 16:14 ` Tom Rini
  2022-06-08  8:51   ` Gabriel Hojda
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2022-06-07 16:14 UTC (permalink / raw)
  To: Gabriel Hojda; +Cc: u-boot

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

On Sat, May 28, 2022 at 03:10:51AM +0300, Gabriel Hojda wrote:

> hi,
> 
> i've recently tried u-boot 2022.04 (u-boot-v2022.04.tar.bz2) and my
> odroid-hc2 didn't boot with uefi (default since Fedora 35) but worked when i
> used exlinux.conf
> 
> trying to track down the problem, i've found that in the default u-boot
> environment the "board" and "boardname" variables were "smdk5420" and not
> "odroid" (like before) ... and thus the "fdtfile" variable was
> "exynos5422-smdk5420hc1.dtb" and not "exynos5422-odroidhc1.dtb".
> 
> continuing i've made a diff between the u-boot-v2021.10.tar.bz2 and
> u-boot-v2022.04.tar.bz2 ... and long story short, i've found the culprit in
> commit f76750d1 "Convert CONFIG_CONS_INDEX et al to Kconfig" :

Thanks for the report.  Can you please try updating
include/configs/odroid_xu3.h to override "board" in
CONFIG_EXTRA_ENV_SETTINGS and see if the auto-detection works as
expected?  We can't change CONFIG_SYS_BOARD as that would then change
wht we look for in board/samsung/ to build.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG in u-boot  for ODROID-XU3/XU4/HC1/HC2
  2022-06-07 16:14 ` Tom Rini
@ 2022-06-08  8:51   ` Gabriel Hojda
  0 siblings, 0 replies; 3+ messages in thread
From: Gabriel Hojda @ 2022-06-08  8:51 UTC (permalink / raw)
  To: Tom Rini; +Cc: u-boot

hi,

finally got around to do it: added "board=ordoid" to 
CONFIG_EXTRA_ENV_SETTINGS in include/configs/odroid_xu3.h using 
following patch, rebuild the rpm locally, updated u-boot on the sdcard 
for my local odroid-hc2 and booted with the new u-boot ... so adding 
board to CONFIG_EXTRA_ENV_SETTINGS fixes the problem.

Gabriel

-----------------------------------------------------------------------------
diff -u -r u-boot-2021.10/include/configs/odroid_xu3.h 
u-boot-2021.10-mod/include/configs/odroid_xu3.h
--- u-boot-2021.10/include/configs/odroid_xu3.h 2022-06-08 
10:56:19.361113780 +0300
+++ u-boot-2021.10-mod/include/configs/odroid_xu3.h     2022-06-08 
10:53:10.834233375 +0300
@@ -94,6 +94,7 @@
         "rootfstype=ext4\0" \
         "console=console=ttySAC2,115200n8\0" \
         "fdtfile=exynos5422-odroidxu3.dtb\0" \
+       "board=odroid\0" \
         "board_name=odroidxu3\0" \
         "mmcbootdev=0\0" \
         "mmcrootdev=0\0" \
-----------------------------------------------------------------------------

On 2022-06-07 19:14, Tom Rini wrote:
> On Sat, May 28, 2022 at 03:10:51AM +0300, Gabriel Hojda wrote:
> 
>> hi,
>> 
>> i've recently tried u-boot 2022.04 (u-boot-v2022.04.tar.bz2) and my
>> odroid-hc2 didn't boot with uefi (default since Fedora 35) but worked 
>> when i
>> used exlinux.conf
>> 
>> trying to track down the problem, i've found that in the default 
>> u-boot
>> environment the "board" and "boardname" variables were "smdk5420" and 
>> not
>> "odroid" (like before) ... and thus the "fdtfile" variable was
>> "exynos5422-smdk5420hc1.dtb" and not "exynos5422-odroidhc1.dtb".
>> 
>> continuing i've made a diff between the u-boot-v2021.10.tar.bz2 and
>> u-boot-v2022.04.tar.bz2 ... and long story short, i've found the 
>> culprit in
>> commit f76750d1 "Convert CONFIG_CONS_INDEX et al to Kconfig" :
> 
> Thanks for the report.  Can you please try updating
> include/configs/odroid_xu3.h to override "board" in
> CONFIG_EXTRA_ENV_SETTINGS and see if the auto-detection works as
> expected?  We can't change CONFIG_SYS_BOARD as that would then change
> wht we look for in board/samsung/ to build.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-08 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-28  0:10 BUG in u-boot for ODROID-XU3/XU4/HC1/HC2 Gabriel Hojda
2022-06-07 16:14 ` Tom Rini
2022-06-08  8:51   ` Gabriel Hojda

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.