Skip to contentSkip to conversation

snow: Expand U-Boot size

PATCH New Simon Glass 3 participants 6 messages Dec 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/4 snow: Expand U-Boot size

Now that we have EFI, etc. enabled, U-Boot is larger than it was. Expand the region allocated for it.

---

 arch/arm/dts/exynos5250-snow.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/exynos5250-snow.dts +1 -1
index 29c13c1257e..e99f6e72bf6 100644
@@ -88,7 +88,7 @@
 
 		ro-boot {
 			label = "u-boot";
-			reg = <0x6000 0x9a000>;
+			reg = <0x6000 0xb0000>;
 			read-only;
 			type = "blob boot,dtb";
 			required;
Signature · 1 line
2.20.0.rc2.403.gdbc3b29805-goog
#1 lore raw

PATCH 2/4 Convert CONFIG_BOARD_TYPES to Kconfig

This converts the following to Kconfig:
CONFIG_BOARD_TYPES

---

 arch/arm/mach-exynos/Kconfig | 8 ++++++++
 configs/odroid-xu3_defconfig | 2 +-
 configs/odroid_defconfig     | 2 +-
 include/configs/axs10x.h     | 1 -
 include/configs/hsdk.h       | 1 -
 include/configs/odroid.h     | 1 -
 include/configs/odroid_xu3.h | 1 -
 scripts/config_whitelist.txt | 1 -
 8 files changed, 10 insertions(+), 7 deletions(-)
arch/arm/mach-exynos/Kconfig +8 -0
index ed04369cfae..33323d17f4b 100644
@@ -166,4 +166,12 @@ source "board/samsung/espresso7420/Kconfig"
 config SPL_LDSCRIPT
 	default "board/samsung/common/exynos-uboot-spl.lds" if ARCH_EXYNOS5 || ARCH_EXYNOS4
 
+config BOARD_TYPES
+	bool "Call get_board_type() to get and display the board type"
+	help
+	  If this option is enabled, checkboard() will call get_board_type()
+	  to get a string containing the board type and this will be
+	  displayed immediately after the model is shown on the console
+	  early in boot.
+
 endif
configs/odroid-xu3_defconfig +1 -1
index d5c7cc7129d..f6f05b29483 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
 CONFIG_SYS_TEXT_BASE=0x43E00000
 CONFIG_ARCH_EXYNOS5=y
+CONFIG_BOARD_TYPES=y
 CONFIG_IDENT_STRING=" for ODROID-XU3/XU4/HC1/HC2"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=8
@@ -47,7 +48,6 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_PHY_SAMSUNG=y
-CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Samsung"
 CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
configs/odroid_defconfig +1 -1
index 594800fc50c..184bb62c1c1 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_EXYNOS=y
 CONFIG_SYS_TEXT_BASE=0x43e00000
 CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_ODROID=y
+CONFIG_BOARD_TYPES=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=8
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -47,7 +48,6 @@ CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Samsung"
 CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
include/configs/axs10x.h +0 -1
index 1b2966fd612..a1b9e7b21d9 100644
@@ -34,7 +34,6 @@
 /*
  * This board might be of different versions so handle it
  */
-#define CONFIG_BOARD_TYPES
 
 /*
  * NAND Flash configuration
include/configs/hsdk.h +0 -1
index cdf4fddd940..b1af1271777 100644
@@ -35,7 +35,6 @@
 /*
  * This board might be of different versions so handle it
  */
-#define CONFIG_BOARD_TYPES
 
 /*
  * UART configuration
include/configs/odroid.h +0 -1
index ad77242e380..bc044e069e0 100644
@@ -186,7 +186,6 @@
  * TODO: Add Odroid X support
  */
 #define CONFIG_MISC_COMMON
-#define CONFIG_BOARD_TYPES
 
 #undef CONFIG_REVISION_TAG
 
include/configs/odroid_xu3.h +0 -1
index f683ee46e39..c2363dd1eef 100644
@@ -86,7 +86,6 @@
 /* Set soc_rev, soc_id, board_rev, boardname, fdtfile */
 #define CONFIG_ODROID_REV_AIN			9
 #define CONFIG_REVISION_TAG
-#define CONFIG_BOARD_TYPES
 
 #undef CONFIG_SYS_BOARD
 #define CONFIG_SYS_BOARD	"odroid"
scripts/config_whitelist.txt +0 -1
index b8addeaf693..335977b3038 100644
@@ -132,7 +132,6 @@ CONFIG_BOARD_POSTCLK_INIT
 CONFIG_BOARD_REVISION_TAG
 CONFIG_BOARD_SIZE_LIMIT
 CONFIG_BOARD_TAURUS
-CONFIG_BOARD_TYPES
 CONFIG_BOOGER
 CONFIG_BOOTBLOCK
 CONFIG_BOOTFILE
Signature · 1 line
2.20.0.rc2.403.gdbc3b29805-goog
#2 lore raw

PATCH 2/4 Convert CONFIG_BOARD_TYPES to Kconfig

Hi Simon,

Quoted 11 lines · Simon Glass

This converts the following to Kconfig:
CONFIG_BOARD_TYPES

---

 arch/arm/mach-exynos/Kconfig | 8 ++++++++
 configs/odroid-xu3_defconfig | 2 +-
 configs/odroid_defconfig     | 2 +-
 include/configs/axs10x.h     | 1 -
 include/configs/hsdk.h       | 1 -

Please note ARC boards have nothing to do with Samsung Exynos. They are based on ARC cores and "arch/arm/mach-exynos/Kconfig" makes no sense for them.

Moreover I'm not sure why CONFIG_BOARD_TYPES is an Exynos-specific option. That said why don't we move CONFIG_BOARD_TYPES to the generic Kconfig?

Quoted 4 lines
 include/configs/odroid.h     | 1 -
 include/configs/odroid_xu3.h | 1 -
 scripts/config_whitelist.txt | 1 -
 8 files changed, 10 insertions(+), 7 deletions(-)

[snip]

include/configs/axs10x.h line 36

Quoted 8 lines
include/configs/axs10x.h +0 -0
index 1b2966fd612..a1b9e7b21d9 100644
@@ -34,7 +34,6 @@
 /*
  * This board might be of different versions so handle it
  */

There's no reason to keep above comment if "#define" below is gone.

include/configs/hsdk.h line 37

Quoted 12 lines
include/configs/axs10x.h +0 -1
-#define CONFIG_BOARD_TYPES
 
 /*
  * NAND Flash configuration
include/configs/hsdk.h +0 -0
index cdf4fddd940..b1af1271777 100644
@@ -35,7 +35,6 @@
 /*
  * This board might be of different versions so handle it
  */

Ditto. But then it turned out in case of HSDK CONFIG_BOARD_TYPES is just a copy-paste from AXS10x and "gd->board_type" is not used. That said this hunk is applicable but I may do it myself separately.

include/configs/hsdk.h line 40

Quoted 4 lines
include/configs/hsdk.h +0 -1
-#define CONFIG_BOARD_TYPES
 
 /*
  * UART configuration

-Alexey

#3 lore raw

PATCH 2/4 Convert CONFIG_BOARD_TYPES to Kconfig

In reply to Simon Glass

Hi Simon,

Quoted 49 lines

This converts the following to Kconfig:
CONFIG_BOARD_TYPES

---

 arch/arm/mach-exynos/Kconfig | 8 ++++++++
 configs/odroid-xu3_defconfig | 2 +-
 configs/odroid_defconfig     | 2 +-
 include/configs/axs10x.h     | 1 -
 include/configs/hsdk.h       | 1 -
 include/configs/odroid.h     | 1 -
 include/configs/odroid_xu3.h | 1 -
 scripts/config_whitelist.txt | 1 -
 8 files changed, 10 insertions(+), 7 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-exynos/Kconfig index ed04369cfae..33323d17f4b 100644

arch/arm/mach-exynos/Kconfig +0 -0
@@ -166,4 +166,12 @@ source "board/samsung/espresso7420/Kconfig"
 config SPL_LDSCRIPT
 	default "board/samsung/common/exynos-uboot-spl.lds" if

ARCH_EXYNOS5 || ARCH_EXYNOS4

arch/arm/mach-exynos/Kconfig +2 -0
+config BOARD_TYPES
+	bool "Call get_board_type() to get and display the board

type"

arch/arm/mach-exynos/Kconfig +2 -0
+	help
+	  If this option is enabled, checkboard() will call

get_board_type()

arch/arm/mach-exynos/Kconfig +2 -0
+	  to get a string containing the board type and this will be
+	  displayed immediately after the model is shown on the

console

arch/arm/mach-exynos/Kconfig +2 -0
+	  early in boot.
+
 endif
(quoted diff) +0 -0

b/configs/odroid-xu3_defconfig index d5c7cc7129d..f6f05b29483 100644

configs/odroid-xu3_defconfig +1 -0
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_ARCH_EXYNOS=y
 CONFIG_SYS_TEXT_BASE=0x43E00000
 CONFIG_ARCH_EXYNOS5=y
+CONFIG_BOARD_TYPES=y
 CONFIG_IDENT_STRING=" for ODROID-XU3/XU4/HC1/HC2"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=8

configs/odroid-xu3_defconfig CONFIG_USB_EHCI_HCD=y · line 50

Quoted 4 lines
configs/odroid-xu3_defconfig +0 -1
@@ -47,7 +48,6 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_PHY_SAMSUNG=y
-CONFIG_USB_STORAGE=y

This is interesting - we add BOARD_TYPES and then USB_STORAGE is going to be removed.

Quoted 76 lines
configs/odroid-xu3_defconfig +0 -0
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Samsung"
 CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
configs/odroid_defconfig +1 -1
index 594800fc50c..184bb62c1c1 100644
@@ -3,6 +3,7 @@ CONFIG_ARCH_EXYNOS=y
 CONFIG_SYS_TEXT_BASE=0x43e00000
 CONFIG_ARCH_EXYNOS4=y
 CONFIG_TARGET_ODROID=y
+CONFIG_BOARD_TYPES=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_NR_DRAM_BANKS=8
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
@@ -47,7 +48,6 @@ CONFIG_DM_REGULATOR_MAX77686=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_STORAGE=y
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_MANUFACTURER="Samsung"
 CONFIG_USB_GADGET_VENDOR_NUM=0x04e8
include/configs/axs10x.h +0 -1
index 1b2966fd612..a1b9e7b21d9 100644
@@ -34,7 +34,6 @@
 /*
  * This board might be of different versions so handle it
  */
-#define CONFIG_BOARD_TYPES
 
 /*
  * NAND Flash configuration
include/configs/hsdk.h +0 -1
index cdf4fddd940..b1af1271777 100644
@@ -35,7 +35,6 @@
 /*
  * This board might be of different versions so handle it
  */
-#define CONFIG_BOARD_TYPES
 
 /*
  * UART configuration
include/configs/odroid.h +0 -1
index ad77242e380..bc044e069e0 100644
@@ -186,7 +186,6 @@
  * TODO: Add Odroid X support
  */
 #define CONFIG_MISC_COMMON
-#define CONFIG_BOARD_TYPES
 
 #undef CONFIG_REVISION_TAG
 
(quoted diff) +0 -0

b/include/configs/odroid_xu3.h index f683ee46e39..c2363dd1eef 100644

include/configs/odroid_xu3.h +0 -1
@@ -86,7 +86,6 @@
 /* Set soc_rev, soc_id, board_rev, boardname, fdtfile */
 #define CONFIG_ODROID_REV_AIN			9
 #define CONFIG_REVISION_TAG
-#define CONFIG_BOARD_TYPES
 
 #undef CONFIG_SYS_BOARD
 #define CONFIG_SYS_BOARD	"odroid"
(quoted diff) +0 -0

b/scripts/config_whitelist.txt index b8addeaf693..335977b3038 100644

scripts/config_whitelist.txt CONFIG_BOARD_POSTCLK_INIT · line 137

Quoted 7 lines
scripts/config_whitelist.txt +0 -1
@@ -132,7 +132,6 @@ CONFIG_BOARD_POSTCLK_INIT
 CONFIG_BOARD_REVISION_TAG
 CONFIG_BOARD_SIZE_LIMIT
 CONFIG_BOARD_TAURUS
-CONFIG_BOARD_TYPES
 CONFIG_BOOGER
 CONFIG_BOOTBLOCK
 CONFIG_BOOTFILE

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181210/5ea3b14e/attachment.sig>

#4 lore raw

PATCH 3/4 exynos: Drop duplicate 'model' line

In reply to Simon Glass

At present the model is shown twice, once in the generic code and once in the exynos code. Drop the latter.

---

 board/samsung/common/board.c | 14 ++++++--------
 include/samsung/misc.h       |  2 --
 2 files changed, 6 insertions(+), 10 deletions(-)
board/samsung/common/board.c +6 -8
index 6fd26a3a919..3391228522c 100644
@@ -290,15 +290,13 @@ int board_mmc_init(bd_t *bis)
 #ifdef CONFIG_DISPLAY_BOARDINFO
 int checkboard(void)
 {
-	const char *board_info;
+	if (IS_ENABLED(CONFIG_BOARD_TYPES)) {
+		const char *board_info = get_board_type();
+
+		if (board_info)
+			printf("Type:  %s\n", board_info);
+	}
 
-	board_info = fdt_getprop(gd->fdt_blob, 0, "model", NULL);
-	printf("Board: %s\n", board_info ? board_info : "unknown");
-#ifdef CONFIG_BOARD_TYPES
-	board_info = get_board_type();
-	if (board_info)
-		printf("Type:  %s\n", board_info);
-#endif
 	return 0;
 }
 #endif
include/samsung/misc.h +0 -2
index 0f957dc3675..017560c2566 100644
@@ -32,9 +32,7 @@ void draw_logo(void);
 char *get_dfu_alt_system(char *interface, char *devstr);
 char *get_dfu_alt_boot(char *interface, char *devstr);
 #endif
-#ifdef CONFIG_BOARD_TYPES
 void set_board_type(void);
 const char *get_board_type(void);
-#endif
 
 #endif /* __SAMSUNG_MISC_COMMON_H__ */
Signature · 1 line
2.20.0.rc2.403.gdbc3b29805-goog
#5 lore raw

PATCH 4/4 exynos: Convert to use CONFIG_BLK

In reply to Simon Glass

Move all exynos boards over to use CONFIG_BLK.

---

 arch/arm/mach-exynos/Kconfig | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-exynos/Kconfig +7 -0
index 33323d17f4b..f3e43434bc3 100644
@@ -8,6 +8,8 @@ config ARCH_EXYNOS4
 	bool "Exynos4 SoC family"
 	select BOARD_EARLY_INIT_F
 	select CPU_V7A
+	select BLK
+	select DM_MMC
 	help
 	  Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There
 	  are multiple SoCs in this family including Exynos4210, Exynos4412,
@@ -24,6 +26,9 @@ config ARCH_EXYNOS5
 	imply USB_ETHER_ASIX
 	imply USB_ETHER_RTL8152
 	imply USB_ETHER_SMSC95XX
+	select BLK
+	select DM_MMC
+
 	help
 	  Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and
 	  Cortex-A7 CPU in big.LITTLE configuration). There are multiple SoCs
@@ -33,6 +38,8 @@ config ARCH_EXYNOS7
 	bool "Exynos7 SoC family"
 	select ARM64
 	select BOARD_EARLY_INIT_F
+	select BLK
+	select DM_MMC
 	help
 	  Samsung Exynos7 SoC family are based on ARM Cortex-A57 CPU or
 	  Cortex-A53 CPU (and some in a big.LITTLE configuration). There are
Signature · 1 line
2.20.0.rc2.403.gdbc3b29805-goog