Skip to contentSkip to conversation

Fix CONFIG_SYS_UBOOT_START default value

PATCH New Patrice Chotard 4 participants 7 messages Dec 6, 2019 – Jan 8, 2020

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

cover Fix CONFIG_SYS_UBOOT_START default value

This series fixes a regression introduced by
d3e97b53c1f2 ("spl: fix entry_point equal to load_addr") which breaks some board boot (at least STM32MP15 in basic configuration)

If CONFIG_SYS_UBOOT_START is not set, it's set to CONFIG_SYS_TEXT_BASE by default.
This allows also to clean include/configs board files in which CONFIG_SYS_UBOOT_START is already set to CONFIG_SYS_TEXT_BASE.

Patrice Chotard (2):
Makefile: Fix CONFIG_SYS_UBOOT_START default value
treewide: Remove CONFIG_SYS_UBOOT_START from configs board files

 Makefile                                        | 2 +-
 include/configs/gardena-smart-gateway-at91sam.h | 1 -
 include/configs/ls1046a_common.h                | 1 -
 include/configs/mccmon6.h                       | 1 -
 include/configs/microblaze-generic.h            | 2 --
 include/configs/mt7623.h                        | 1 -
 include/configs/mt7629.h                        | 1 -
 include/configs/mt8518.h                        | 1 -
 include/configs/omap3_cairo.h                   | 1 -
 include/configs/pumpkin.h                       | 1 -
 include/configs/tegra-common.h                  | 1 -
 include/configs/x600.h                          | 1 -
 include/configs/xilinx_zynqmp_r5.h              | 2 --
 include/configs/zynq-common.h                   | 2 --
 14 files changed, 1 insertion(+), 17 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 Makefile: Fix CONFIG_SYS_UBOOT_START default value

This patches restores boot on boards which rely on CONFIG_SYS_UBOOT_START equal to CONFIG_SYS_TEXT_BASE when using SPL

Fixes d3e97b53c1f2 ("spl: fix entry_point equal to load_addr")

---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index 0ee0c70102..d679459305 100644
@@ -1265,7 +1265,7 @@ u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
 # from the SPL U-Boot version.
 #
 ifndef CONFIG_SYS_UBOOT_START
-CONFIG_SYS_UBOOT_START := 0
+CONFIG_SYS_UBOOT_START := $(CONFIG_SYS_TEXT_BASE)
 endif
 
 # Boards with more complex image requirements can provide an .its source file
Signature · 1 line
2.17.1
#2 lore raw

PATCH 1/2 Makefile: Fix CONFIG_SYS_UBOOT_START default value

Quoted 11 lines · Patrice Chotard

This patches restores boot on boards which rely on CONFIG_SYS_UBOOT_START equal to CONFIG_SYS_TEXT_BASE when using SPL

Fixes d3e97b53c1f2 ("spl: fix entry_point equal to load_addr")

---

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw

PATCH 1/2 Makefile: Fix CONFIG_SYS_UBOOT_START default value

In reply to Patrice Chotard
Quoted 7 lines · Patrice Chotard

This patches restores boot on boards which rely on CONFIG_SYS_UBOOT_START equal to CONFIG_SYS_TEXT_BASE when using SPL

Fixes d3e97b53c1f2 ("spl: fix entry_point equal to load_addr")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200108/ecba36af/attachment.sig>
#4 lore raw

PATCH 2/2 treewide: Remove CONFIG_SYS_UBOOT_START from configs board files

In reply to Patrice Chotard

As previous CONFIG_SYS_UBOOT_START is now set by default to CONFIG_SYS_TEXT_BASE when not defined, CONFIG_SYS_UBOOT_START can be removed from include/configs board files.

---

 include/configs/gardena-smart-gateway-at91sam.h | 1 -
 include/configs/ls1046a_common.h                | 1 -
 include/configs/mccmon6.h                       | 1 -
 include/configs/microblaze-generic.h            | 2 --
 include/configs/mt7623.h                        | 1 -
 include/configs/mt7629.h                        | 1 -
 include/configs/mt8518.h                        | 1 -
 include/configs/omap3_cairo.h                   | 1 -
 include/configs/pumpkin.h                       | 1 -
 include/configs/tegra-common.h                  | 1 -
 include/configs/x600.h                          | 1 -
 include/configs/xilinx_zynqmp_r5.h              | 2 --
 include/configs/zynq-common.h                   | 2 --
 13 files changed, 16 deletions(-)
include/configs/gardena-smart-gateway-at91sam.h +0 -1
index 482e4714b1..f5ee65cb8a 100644
@@ -64,7 +64,6 @@
 #define CONFIG_SPL_NAND_RAW_ONLY
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x40000
 #define CONFIG_SYS_NAND_U_BOOT_SIZE	0xa0000
-#define	CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define	CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_DST	CONFIG_SYS_TEXT_BASE
 
include/configs/ls1046a_common.h +0 -1
index cc8f4c0210..6543cfd868 100644
@@ -98,7 +98,6 @@
 					CONFIG_SPL_BSS_MAX_SIZE)
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
 #define CONFIG_SYS_MONITOR_LEN		0x100000
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #endif
 
 /* NAND SPL */
include/configs/mccmon6.h +0 -1
index 045a9f7bdf..0aee1e1cf6 100644
@@ -12,7 +12,6 @@
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #include "imx6_spl.h"
 
-#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_UBOOT_BASE (CONFIG_SYS_FLASH_BASE + 0x80000)
 #define CONFIG_SYS_SPL_ARGS_ADDR	0x18000000
 
include/configs/microblaze-generic.h +0 -2
index 385b30c99b..8ca0e83c78 100644
@@ -173,8 +173,6 @@
 /* Just for sure that there is a space for stack */
 #define CONFIG_SPL_STACK_SIZE		0x100
 
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
-
 #define CONFIG_SPL_MAX_FOOTPRINT	(CONFIG_SYS_INIT_RAM_SIZE - \
 					 CONFIG_SYS_INIT_RAM_ADDR - \
 					 CONFIG_SYS_MALLOC_F_LEN - \
include/configs/mt7623.h +0 -1
index e5182aeea8..faab0913fc 100644
@@ -31,7 +31,6 @@
 #define CONFIG_ENV_OVERWRITE
 
 /* Preloader -> Uboot */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE + SZ_2M - \
 					 GENERATED_GBL_DATA_SIZE)
 
include/configs/mt7629.h +0 -1
index 4aef894c6e..6a6c2f2414 100644
@@ -40,7 +40,6 @@
 #define CONFIG_SYS_UBOOT_BASE		(CONFIG_SPI_ADDR + CONFIG_SPL_PAD_TO)
 
 /* SPL -> Uboot */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE + SZ_2M - \
 					 GENERATED_GBL_DATA_SIZE)
 
include/configs/mt8518.h +0 -1
index a7fe83a605..514722be99 100644
@@ -29,7 +29,6 @@
 #define CONFIG_SYS_BOOTM_LEN			SZ_64M
 
 /* Uboot definition */
-#define CONFIG_SYS_UBOOT_START			CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR			(CONFIG_SYS_TEXT_BASE + \
 						SZ_2M - \
 						GENERATED_GBL_DATA_SIZE)
include/configs/omap3_cairo.h +0 -1
index 1b1a56d7cd..c76c81ddd5 100644
@@ -26,7 +26,6 @@
  * other needs.  We use this rather than the inherited defines from
  * ti_armv7_common.h for backwards compatibility.
  */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 #define CONFIG_SPL_BSS_MAX_SIZE		(512 << 10)	/* 512 KB */
 #define CONFIG_SYS_SPL_MALLOC_START	0x80208000
include/configs/pumpkin.h +0 -1
index 35e28be950..9c52cae41d 100644
@@ -23,7 +23,6 @@
 #define CONFIG_SYS_NS16550_COM1		0x11005000
 #define CONFIG_SYS_NS16550_CLK		26000000
 
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE + SZ_2M - \
 						 GENERATED_GBL_DATA_SIZE)
 
include/configs/tegra-common.h +0 -1
index b4da1f8428..f2cdd9c019 100644
@@ -61,7 +61,6 @@
 #define PHYS_SDRAM_1		NV_PA_SDRC_CS0
 #define PHYS_SDRAM_1_SIZE	0x20000000	/* 512M */
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
 
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)	/* 256M */
include/configs/x600.h +0 -1
index 63092b24a5..8b6caae7be 100644
@@ -27,7 +27,6 @@
 #define CONFIG_SYS_SPL_LEN			CONFIG_SPL_PAD_TO
 #define CONFIG_SYS_UBOOT_BASE			(CONFIG_SYS_FLASH_BASE + \
 						 CONFIG_SYS_SPL_LEN)
-#define CONFIG_SYS_UBOOT_START			CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_MONITOR_BASE			CONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_MONITOR_LEN			0x60000
 
include/configs/xilinx_zynqmp_r5.h +0 -2
index 38d952d0c0..155d7fe883 100644
@@ -35,8 +35,6 @@
 /* Extend size of kernel image for uncompression */
 #define CONFIG_SYS_BOOTM_LEN	(60 * 1024 * 1024)
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
-
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
 /* 0x0 - 0x40 is used for placing exception vectors */
include/configs/zynq-common.h +0 -2
index 274cc19112..189ca81bbe 100644
@@ -274,6 +274,4 @@
 
 #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x10000000
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
-
 #endif /* __CONFIG_ZYNQ_COMMON_H */
Signature · 1 line
2.17.1
#5 lore raw

PATCH 2/2 treewide: Remove CONFIG_SYS_UBOOT_START from configs board files

Quoted 174 lines · On Fri, 6 Dec 2019 15:01:49 +0100 Patrice Chotard <[email protected]>…

As previous CONFIG_SYS_UBOOT_START is now set by default to CONFIG_SYS_TEXT_BASE when not defined, CONFIG_SYS_UBOOT_START can be removed from include/configs board files.

---

 include/configs/gardena-smart-gateway-at91sam.h | 1 -
 include/configs/ls1046a_common.h                | 1 -
 include/configs/mccmon6.h                       | 1 -
 include/configs/microblaze-generic.h            | 2 --
 include/configs/mt7623.h                        | 1 -
 include/configs/mt7629.h                        | 1 -
 include/configs/mt8518.h                        | 1 -
 include/configs/omap3_cairo.h                   | 1 -
 include/configs/pumpkin.h                       | 1 -
 include/configs/tegra-common.h                  | 1 -
 include/configs/x600.h                          | 1 -
 include/configs/xilinx_zynqmp_r5.h              | 2 --
 include/configs/zynq-common.h                   | 2 --
 13 files changed, 16 deletions(-)
(quoted diff) +0 -0

b/include/configs/gardena-smart-gateway-at91sam.h index 482e4714b1..f5ee65cb8a 100644 --- a/include/configs/gardena-smart-gateway-at91sam.h +++ b/include/configs/gardena-smart-gateway-at91sam.h @@ -64,7 +64,6 @@
#define CONFIG_SPL_NAND_RAW_ONLY
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
#define CONFIG_SYS_NAND_U_BOOT_SIZE 0xa0000
-#define CONFIG_SYS_UBOOT_START
CONFIG_SYS_TEXT_BASE #define
CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define
CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE

(quoted diff) +0 -0

b/include/configs/ls1046a_common.h index cc8f4c0210..6543cfd868 100644

include/configs/ls1046a_common.h +0 -1
@@ -98,7 +98,6 @@
 					CONFIG_SPL_BSS_MAX_SIZE)
 #define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
 #define CONFIG_SYS_MONITOR_LEN		0x100000
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #endif
 
 /* NAND SPL */
include/configs/mccmon6.h +0 -1
index 045a9f7bdf..0aee1e1cf6 100644
@@ -12,7 +12,6 @@
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #include "imx6_spl.h"
 
-#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_UBOOT_BASE (CONFIG_SYS_FLASH_BASE + 0x80000)
 #define CONFIG_SYS_SPL_ARGS_ADDR	0x18000000
 
(quoted diff) +0 -0

b/include/configs/microblaze-generic.h index 385b30c99b..8ca0e83c78 100644 --- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h

include/configs/microblaze-generic.h +0 -2
@@ -173,8 +173,6 @@
 /* Just for sure that there is a space for stack */
 #define CONFIG_SPL_STACK_SIZE		0x100
 
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
-
 #define CONFIG_SPL_MAX_FOOTPRINT	(CONFIG_SYS_INIT_RAM_SIZE - \
 					 CONFIG_SYS_INIT_RAM_ADDR - \
 					 CONFIG_SYS_MALLOC_F_LEN - \
include/configs/mt7623.h +1 -1
index e5182aeea8..faab0913fc 100644
@@ -31,7 +31,6 @@
 #define CONFIG_ENV_OVERWRITE
 
 /* Preloader -> Uboot */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE
+ SZ_2M - \ GENERATED_GBL_DATA_SIZE)
 
include/configs/mt7629.h +1 -1
index 4aef894c6e..6a6c2f2414 100644
@@ -40,7 +40,6 @@
 #define CONFIG_SYS_UBOOT_BASE		(CONFIG_SPI_ADDR +
 CONFIG_SPL_PAD_TO) 
 /* SPL -> Uboot */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE
+ SZ_2M - \ GENERATED_GBL_DATA_SIZE)
 
include/configs/mt8518.h +0 -1
index a7fe83a605..514722be99 100644
@@ -29,7 +29,6 @@
 #define CONFIG_SYS_BOOTM_LEN			SZ_64M
 
 /* Uboot definition */
-#define CONFIG_SYS_UBOOT_START

CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_INIT_SP_ADDR

	(CONFIG_SYS_TEXT_BASE + \ SZ_2M - \
include/configs/mt8518.h +0 -0
 						GENERATED_GBL_DATA_SIZE)
(quoted diff) +0 -0

b/include/configs/omap3_cairo.h index 1b1a56d7cd..c76c81ddd5 100644

include/configs/omap3_cairo.h +0 -1
@@ -26,7 +26,6 @@
  * other needs.  We use this rather than the inherited defines from
  * ti_armv7_common.h for backwards compatibility.
  */
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SPL_BSS_START_ADDR	0x80000000
 #define CONFIG_SPL_BSS_MAX_SIZE		(512 << 10)	/*

512 KB */ #define CONFIG_SYS_SPL_MALLOC_START 0x80208000

include/configs/pumpkin.h +1 -1
index 35e28be950..9c52cae41d 100644
@@ -23,7 +23,6 @@
 #define CONFIG_SYS_NS16550_COM1		0x11005000
 #define CONFIG_SYS_NS16550_CLK		26000000
 
-#define CONFIG_SYS_UBOOT_START		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE
+ SZ_2M - \ GENERATED_GBL_DATA_SIZE)
 
(quoted diff) +0 -0

b/include/configs/tegra-common.h index b4da1f8428..f2cdd9c019 100644

include/configs/tegra-common.h +0 -1
@@ -61,7 +61,6 @@
 #define PHYS_SDRAM_1		NV_PA_SDRC_CS0
 #define PHYS_SDRAM_1_SIZE	0x20000000	/* 512M */
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_SDRAM_BASE	PHYS_SDRAM_1
 
 #define CONFIG_SYS_BOOTMAPSZ	(256 << 20)	/* 256M */
include/configs/x600.h +0 -1
index 63092b24a5..8b6caae7be 100644
@@ -27,7 +27,6 @@
 #define CONFIG_SYS_SPL_LEN			CONFIG_SPL_PAD_TO
 #define CONFIG_SYS_UBOOT_BASE
 (CONFIG_SYS_FLASH_BASE + \ CONFIG_SYS_SPL_LEN)
-#define CONFIG_SYS_UBOOT_START

CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_MONITOR_BASE

	CONFIG_SYS_FLASH_BASE #define CONFIG_SYS_MONITOR_LEN
		0x60000 
(quoted diff) +0 -0

b/include/configs/xilinx_zynqmp_r5.h index 38d952d0c0..155d7fe883 100644 --- a/include/configs/xilinx_zynqmp_r5.h
+++ b/include/configs/xilinx_zynqmp_r5.h

include/configs/x600.h +0 -2
@@ -35,8 +35,6 @@
 /* Extend size of kernel image for uncompression */
 #define CONFIG_SYS_BOOTM_LEN	(60 * 1024 * 1024)
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
-
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
 /* 0x0 - 0x40 is used for placing exception vectors */
(quoted diff) +0 -0

b/include/configs/zynq-common.h index 274cc19112..189ca81bbe 100644

include/configs/zynq-common.h line 277

Quoted 6 lines
include/configs/zynq-common.h +0 -2
@@ -274,6 +274,4 @@
 
 #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x10000000
 
-#define CONFIG_SYS_UBOOT_START	CONFIG_SYS_TEXT_BASE
-
 #endif /* __CONFIG_ZYNQ_COMMON_H */

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: <https://lists.denx.de/pipermail/u-boot/attachments/20191208/af449129/attachment.sig>

#6 lore raw

PATCH 2/2 treewide: Remove CONFIG_SYS_UBOOT_START from configs board files

In reply to Patrice Chotard
Quoted 6 lines · Patrice Chotard

As previous CONFIG_SYS_UBOOT_START is now set by default to CONFIG_SYS_TEXT_BASE when not defined, CONFIG_SYS_UBOOT_START can be removed from include/configs board files.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200108/38232a0b/attachment.sig>