* [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig
@ 2023-08-24 2:30 Jesse Taube
2023-08-24 16:54 ` Tom Rini
2023-08-24 20:01 ` Simon Glass
0 siblings, 2 replies; 5+ messages in thread
From: Jesse Taube @ 2023-08-24 2:30 UTC (permalink / raw)
To: u-boot
Cc: Andrew F . Davis, Giulio Benetti, Jesse Taube, Stefan Roese,
Weijie Gao, GSS_MTK_Uboot_upstream, Mingming lee,
Mauro Condarelli, Simon Glass, Kever Yang, Quentin Schulz,
Marek Behún, Nikhil M Jain, Michal Simek, Patrick Delaunay,
Heinrich Schuchardt, Nathan Barrett-Morrison,
Stefan Herbrechtsmeier, Marek Vasut, Oleksandr Suvorov,
Mayuresh Chitale, Roger Quadros, Marek Vasut, Tom Rini
Commit 65cc0e2a65d2 ("global: Move remaining CONFIG_SYS_* to CFG_SYS_*")
renamed CONFIG_SYS_UBOOT_START to CFG_SYS_UBOOT_START. Unfortunately,
this meant that the value was no longer available to the Makefile. This
caused imxrt to fail to boot. All the other boards that used this
variable were unaffected because they were using the default value
which is CONFIG_TEXT_BASE.
This commit converts CFG_SYS_UBOOT_START to Kconfig and sets the default
value to CONFIG_TEXT_BASE.
Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
Makefile | 16 ++++------------
arch/arm/mach-k3/config_secure.mk | 2 +-
arch/arm/mach-omap2/config_secure.mk | 2 +-
boot/Kconfig | 16 ++++++++++++++++
common/spl/spl.c | 6 +-----
common/spl/spl_fit.c | 2 +-
configs/imxrt1020-evk_defconfig | 2 ++
configs/imxrt1050-evk_defconfig | 2 ++
configs/imxrt1170-evk_defconfig | 2 ++
include/configs/gardena-smart-gateway-mt7688.h | 4 ----
include/configs/imxrt1020-evk.h | 6 ------
include/configs/imxrt1050-evk.h | 6 ------
include/configs/imxrt1170-evk.h | 3 ---
include/configs/linkit-smart-7688.h | 4 ----
include/configs/mt7620.h | 3 ---
include/configs/mt7628.h | 3 ---
include/configs/mt8512.h | 2 --
include/configs/vocore2.h | 4 ----
include/spl.h | 2 +-
19 files changed, 31 insertions(+), 56 deletions(-)
diff --git a/Makefile b/Makefile
index 9b90204bfe..13d4c63439 100644
--- a/Makefile
+++ b/Makefile
@@ -1364,14 +1364,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
$(call if_changed,objcopy)
-#
-# U-Boot entry point, needed for booting of full-blown U-Boot
-# from the SPL U-Boot version.
-#
-ifndef CFG_SYS_UBOOT_START
-CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
-endif
-
# Boards with more complex image requirements can provide an .its source file
# or a generator script
# NOTE: Please do not use this. We are migrating away from Makefile rules to use
@@ -1391,7 +1383,7 @@ endif
ifdef CONFIG_SPL_LOAD_FIT
MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
@@ -1399,10 +1391,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
else
MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
endif
@@ -1433,7 +1425,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
UBOOT_BIN := u-boot.bin
MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
u-boot.bin.lzma: u-boot.bin FORCE
diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk
index 7bc8af813a..9cc1f9eb24 100644
--- a/arch/arm/mach-k3/config_secure.mk
+++ b/arch/arm/mach-k3/config_secure.mk
@@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(
$(call if_changed,mkfitimage)
MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
diff --git a/arch/arm/mach-omap2/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk
index 24ddcdb961..f76262bb0c 100644
--- a/arch/arm/mach-omap2/config_secure.mk
+++ b/arch/arm/mach-omap2/config_secure.mk
@@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE
ifdef CONFIG_SPL_LOAD_FIT
MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
- -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+ -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
diff --git a/boot/Kconfig b/boot/Kconfig
index 5e2d4286ae..f2f7821cc1 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -737,6 +737,22 @@ config TEXT_BASE
default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
hex "Text Base"
+ help
+ The address in memory that U-Boot will be copied from, initially.
+
+config HAVE_SYS_UBOOT_START
+ bool
+ depends on HAVE_TEXT_BASE
+ prompt "Use custom U-Boot Start"
+ help
+ By default, the address in memory that U-Boot will be copied from(TEXT_BASE) and the
+ entry point are the same. Select this to set a different U-Boot start address.
+
+config SYS_UBOOT_START
+ hex
+ depends on HAVE_TEXT_BASE
+ default TEXT_BASE
+ prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
help
The address in memory that U-Boot will be running from, initially.
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 0062f3f45d..f4b30b3cf3 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -45,10 +45,6 @@
DECLARE_GLOBAL_DATA_PTR;
DECLARE_BINMAN_MAGIC_SYM;
-#ifndef CFG_SYS_UBOOT_START
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-#endif
-
u32 *boot_params_ptr = NULL;
#if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)
@@ -252,7 +248,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image)
spl_image->entry_point = u_boot_pos;
spl_image->load_addr = u_boot_pos;
} else {
- spl_image->entry_point = CFG_SYS_UBOOT_START;
+ spl_image->entry_point = CONFIG_SYS_UBOOT_START;
spl_image->load_addr = CONFIG_TEXT_BASE;
}
spl_image->os = IH_OS_U_BOOT;
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index 730639f756..3d39e70e65 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -816,7 +816,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
}
/*
- * If a platform does not provide CFG_SYS_UBOOT_START, U-Boot's
+ * If a platform does not provide CONFIG_SYS_UBOOT_START, U-Boot's
* Makefile will set it to 0 and it will end up as the entry point
* here. What it actually means is: use the load address.
*/
diff --git a/configs/imxrt1020-evk_defconfig b/configs/imxrt1020-evk_defconfig
index 40210a5f0b..6b63b80895 100644
--- a/configs/imxrt1020-evk_defconfig
+++ b/configs/imxrt1020-evk_defconfig
@@ -19,6 +19,8 @@ CONFIG_SPL_SERIAL=y
CONFIG_SPL_SIZE_LIMIT=0x20000
CONFIG_SPL=y
CONFIG_SYS_LOAD_ADDR=0x20209000
+CONFIG_HAVE_SYS_UBOOT_START=y
+CONFIG_SYS_UBOOT_START=0x800023FD
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SD_BOOT=y
# CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig
index 8f7a36fea7..cbf9469b24 100644
--- a/configs/imxrt1050-evk_defconfig
+++ b/configs/imxrt1050-evk_defconfig
@@ -21,6 +21,8 @@ CONFIG_SPL_SERIAL=y
CONFIG_SPL_SIZE_LIMIT=0x20000
CONFIG_SPL=y
CONFIG_SYS_LOAD_ADDR=0x20209000
+CONFIG_HAVE_SYS_UBOOT_START=y
+CONFIG_SYS_UBOOT_START=0x800023FD
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SD_BOOT=y
# CONFIG_USE_BOOTCOMMAND is not set
diff --git a/configs/imxrt1170-evk_defconfig b/configs/imxrt1170-evk_defconfig
index 8320c091d2..83825da6de 100644
--- a/configs/imxrt1170-evk_defconfig
+++ b/configs/imxrt1170-evk_defconfig
@@ -21,6 +21,8 @@ CONFIG_SPL_SERIAL=y
CONFIG_SPL_SIZE_LIMIT=0x20000
CONFIG_SPL=y
CONFIG_SYS_LOAD_ADDR=0x202C0000
+CONFIG_HAVE_SYS_UBOOT_START=y
+CONFIG_SYS_UBOOT_START=0x202403FD
CONFIG_DISTRO_DEFAULTS=y
CONFIG_SD_BOOT=y
# CONFIG_USE_BOOTCOMMAND is not set
diff --git a/include/configs/gardena-smart-gateway-mt7688.h b/include/configs/gardena-smart-gateway-mt7688.h
index 0ba4efe67a..1b97ae22fc 100644
--- a/include/configs/gardena-smart-gateway-mt7688.h
+++ b/include/configs/gardena-smart-gateway-mt7688.h
@@ -11,10 +11,6 @@
#define CFG_SYS_INIT_SP_OFFSET 0x400000
-/* SPL */
-
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
/* Dummy value */
#define CFG_SYS_UBOOT_BASE 0
diff --git a/include/configs/imxrt1020-evk.h b/include/configs/imxrt1020-evk.h
index e180387c68..cd6af93454 100644
--- a/include/configs/imxrt1020-evk.h
+++ b/include/configs/imxrt1020-evk.h
@@ -18,10 +18,4 @@
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
DMAMEM_SZ_ALL)
-/*
- * Configuration of the external SDRAM memory
- */
-
-#define CFG_SYS_UBOOT_START 0x800023FD
-
#endif /* __IMXRT1020_EVK_H */
diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h
index 7688464841..2af2dde2ae 100644
--- a/include/configs/imxrt1050-evk.h
+++ b/include/configs/imxrt1050-evk.h
@@ -25,10 +25,4 @@
"stderr=serial,vidconsole\0"
#endif
-/*
- * Configuration of the external SDRAM memory
- */
-
-#define CFG_SYS_UBOOT_START 0x800023FD
-
#endif /* __IMXRT1050_EVK_H */
diff --git a/include/configs/imxrt1170-evk.h b/include/configs/imxrt1170-evk.h
index f83429082a..1ccaa15bc1 100644
--- a/include/configs/imxrt1170-evk.h
+++ b/include/configs/imxrt1170-evk.h
@@ -22,8 +22,5 @@
#define DMAMEM_SZ_ALL (1 * 1024 * 1024)
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
DMAMEM_SZ_ALL)
-/* For SPL */
-#define CFG_SYS_UBOOT_START 0x202403FD
-/* For SPL ends */
#endif /* __IMXRT1170_EVK_H */
diff --git a/include/configs/linkit-smart-7688.h b/include/configs/linkit-smart-7688.h
index f16c7e9122..e8f7a59c40 100644
--- a/include/configs/linkit-smart-7688.h
+++ b/include/configs/linkit-smart-7688.h
@@ -11,10 +11,6 @@
#define CFG_SYS_INIT_SP_OFFSET 0x400000
-/* SPL */
-
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
/* Dummy value */
#define CFG_SYS_UBOOT_BASE 0
diff --git a/include/configs/mt7620.h b/include/configs/mt7620.h
index d69d35fa96..3bc0c18a1e 100644
--- a/include/configs/mt7620.h
+++ b/include/configs/mt7620.h
@@ -12,9 +12,6 @@
#define CFG_SYS_INIT_SP_OFFSET 0x400000
-/* SPL */
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
/* Dummy value */
#define CFG_SYS_UBOOT_BASE 0
diff --git a/include/configs/mt7628.h b/include/configs/mt7628.h
index 0ac376d33c..1df06811d6 100644
--- a/include/configs/mt7628.h
+++ b/include/configs/mt7628.h
@@ -22,9 +22,6 @@
#define CFG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
230400, 460800, 921600 }
-/* SPL */
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
/* Dummy value */
#define CFG_SYS_UBOOT_BASE 0
diff --git a/include/configs/mt8512.h b/include/configs/mt8512.h
index c0fc8688ca..4e70291e94 100644
--- a/include/configs/mt8512.h
+++ b/include/configs/mt8512.h
@@ -10,8 +10,6 @@
#define __MT8512_H
/* Uboot definition */
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
#define ENV_BOOT_READ_IMAGE \
"boot_rd_img=mmc dev 0" \
";mmc read ${loadaddr} 0x27000 0x8000" \
diff --git a/include/configs/vocore2.h b/include/configs/vocore2.h
index 43050d61c3..eb87633661 100644
--- a/include/configs/vocore2.h
+++ b/include/configs/vocore2.h
@@ -11,10 +11,6 @@
#define CFG_SYS_INIT_SP_OFFSET 0x400000
-/* SPL */
-
-#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
-
/* Dummy value */
#define CFG_SYS_UBOOT_BASE 0
diff --git a/include/spl.h b/include/spl.h
index 92bcaa90a4..57da1484f0 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -484,7 +484,7 @@ unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc,
* spl_set_header_raw_uboot() - Set up a standard SPL image structure
*
* This sets up the given spl_image which the standard values obtained from
- * config options: CONFIG_SYS_MONITOR_LEN, CFG_SYS_UBOOT_START,
+ * config options: CONFIG_SYS_MONITOR_LEN, CONFIG_SYS_UBOOT_START,
* CONFIG_TEXT_BASE.
*
* @spl_image: Image description to set up
--
2.40.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig
2023-08-24 2:30 [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig Jesse Taube
@ 2023-08-24 16:54 ` Tom Rini
2023-08-24 20:01 ` Simon Glass
1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2023-08-24 16:54 UTC (permalink / raw)
To: Jesse Taube
Cc: u-boot, Andrew F . Davis, Giulio Benetti, Stefan Roese,
Weijie Gao, GSS_MTK_Uboot_upstream, Mingming lee,
Mauro Condarelli, Simon Glass, Kever Yang, Quentin Schulz,
Marek Behún, Nikhil M Jain, Michal Simek, Patrick Delaunay,
Heinrich Schuchardt, Nathan Barrett-Morrison,
Stefan Herbrechtsmeier, Marek Vasut, Oleksandr Suvorov,
Mayuresh Chitale, Roger Quadros, Marek Vasut
[-- Attachment #1: Type: text/plain, Size: 2045 bytes --]
On Wed, Aug 23, 2023 at 10:30:52PM -0400, Jesse Taube wrote:
> Commit 65cc0e2a65d2 ("global: Move remaining CONFIG_SYS_* to CFG_SYS_*")
> renamed CONFIG_SYS_UBOOT_START to CFG_SYS_UBOOT_START. Unfortunately,
> this meant that the value was no longer available to the Makefile. This
> caused imxrt to fail to boot. All the other boards that used this
> variable were unaffected because they were using the default value
> which is CONFIG_TEXT_BASE.
>
> This commit converts CFG_SYS_UBOOT_START to Kconfig and sets the default
> value to CONFIG_TEXT_BASE.
>
> Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Suggested-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
[snip]
> diff --git a/boot/Kconfig b/boot/Kconfig
> index 5e2d4286ae..f2f7821cc1 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -737,6 +737,22 @@ config TEXT_BASE
> default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
> default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
> hex "Text Base"
> + help
> + The address in memory that U-Boot will be copied from, initially.
> +
> +config HAVE_SYS_UBOOT_START
> + bool
> + depends on HAVE_TEXT_BASE
> + prompt "Use custom U-Boot Start"
We should use:
bool "Use custom U-Boot start address"
instead of separate bool/prompt.
> + help
> + By default, the address in memory that U-Boot will be copied from(TEXT_BASE) and the
> + entry point are the same. Select this to set a different U-Boot start address.
> +
> +config SYS_UBOOT_START
> + hex
> + depends on HAVE_TEXT_BASE
> + default TEXT_BASE
> + prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
This is clever, and can be kept. I didn't catch at first that this will
do what I was hoping of setting a default, but then allowing for it to
be changed.
> help
> The address in memory that U-Boot will be running from, initially.
This should be slightly different and expand on what's in the help text
for HAVE_SYS_UBOOT_START.
Thanks!
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig
2023-08-24 2:30 [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig Jesse Taube
2023-08-24 16:54 ` Tom Rini
@ 2023-08-24 20:01 ` Simon Glass
2023-08-24 22:40 ` Jesse T
1 sibling, 1 reply; 5+ messages in thread
From: Simon Glass @ 2023-08-24 20:01 UTC (permalink / raw)
To: Jesse Taube
Cc: u-boot, Andrew F . Davis, Giulio Benetti, Stefan Roese,
Weijie Gao, GSS_MTK_Uboot_upstream, Mingming lee,
Mauro Condarelli, Kever Yang, Quentin Schulz, Marek Behún,
Nikhil M Jain, Michal Simek, Patrick Delaunay,
Heinrich Schuchardt, Nathan Barrett-Morrison,
Stefan Herbrechtsmeier, Marek Vasut, Oleksandr Suvorov,
Mayuresh Chitale, Roger Quadros, Marek Vasut, Tom Rini
Hi Jesse,
On Wed, 23 Aug 2023 at 20:30, Jesse Taube <mr.bossman075@gmail.com> wrote:
>
> Commit 65cc0e2a65d2 ("global: Move remaining CONFIG_SYS_* to CFG_SYS_*")
> renamed CONFIG_SYS_UBOOT_START to CFG_SYS_UBOOT_START. Unfortunately,
> this meant that the value was no longer available to the Makefile. This
> caused imxrt to fail to boot. All the other boards that used this
> variable were unaffected because they were using the default value
> which is CONFIG_TEXT_BASE.
>
> This commit converts CFG_SYS_UBOOT_START to Kconfig and sets the default
> value to CONFIG_TEXT_BASE.
>
> Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> Suggested-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> ---
> Makefile | 16 ++++------------
> arch/arm/mach-k3/config_secure.mk | 2 +-
> arch/arm/mach-omap2/config_secure.mk | 2 +-
> boot/Kconfig | 16 ++++++++++++++++
> common/spl/spl.c | 6 +-----
> common/spl/spl_fit.c | 2 +-
> configs/imxrt1020-evk_defconfig | 2 ++
> configs/imxrt1050-evk_defconfig | 2 ++
> configs/imxrt1170-evk_defconfig | 2 ++
> include/configs/gardena-smart-gateway-mt7688.h | 4 ----
> include/configs/imxrt1020-evk.h | 6 ------
> include/configs/imxrt1050-evk.h | 6 ------
> include/configs/imxrt1170-evk.h | 3 ---
> include/configs/linkit-smart-7688.h | 4 ----
> include/configs/mt7620.h | 3 ---
> include/configs/mt7628.h | 3 ---
> include/configs/mt8512.h | 2 --
> include/configs/vocore2.h | 4 ----
> include/spl.h | 2 +-
> 19 files changed, 31 insertions(+), 56 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 9b90204bfe..13d4c63439 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1364,14 +1364,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
> u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
> $(call if_changed,objcopy)
>
> -#
> -# U-Boot entry point, needed for booting of full-blown U-Boot
> -# from the SPL U-Boot version.
> -#
> -ifndef CFG_SYS_UBOOT_START
> -CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
> -endif
> -
> # Boards with more complex image requirements can provide an .its source file
> # or a generator script
> # NOTE: Please do not use this. We are migrating away from Makefile rules to use
> @@ -1391,7 +1383,7 @@ endif
>
> ifdef CONFIG_SPL_LOAD_FIT
> MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -p $(CONFIG_FIT_EXTERNAL_OFFSET) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
> @@ -1399,10 +1391,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
> else
> MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
> endif
> @@ -1433,7 +1425,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
> UBOOT_BIN := u-boot.bin
>
> MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
>
> u-boot.bin.lzma: u-boot.bin FORCE
> diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk
> index 7bc8af813a..9cc1f9eb24 100644
> --- a/arch/arm/mach-k3/config_secure.mk
> +++ b/arch/arm/mach-k3/config_secure.mk
> @@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(
> $(call if_changed,mkfitimage)
>
> MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
>
> diff --git a/arch/arm/mach-omap2/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk
> index 24ddcdb961..f76262bb0c 100644
> --- a/arch/arm/mach-omap2/config_secure.mk
> +++ b/arch/arm/mach-omap2/config_secure.mk
> @@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE
> ifdef CONFIG_SPL_LOAD_FIT
>
> MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
>
> diff --git a/boot/Kconfig b/boot/Kconfig
> index 5e2d4286ae..f2f7821cc1 100644
> --- a/boot/Kconfig
> +++ b/boot/Kconfig
> @@ -737,6 +737,22 @@ config TEXT_BASE
> default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
> default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
> hex "Text Base"
> + help
> + The address in memory that U-Boot will be copied from, initially.
> +
> +config HAVE_SYS_UBOOT_START
> + bool
> + depends on HAVE_TEXT_BASE
> + prompt "Use custom U-Boot Start"
> + help
> + By default, the address in memory that U-Boot will be copied from(TEXT_BASE) and the
> + entry point are the same. Select this to set a different U-Boot start address.
space after 'from'
Also this is a little unclear. START means the start address that
U-Boot will run from. If it is different from TEXT_BASE, then
something loads it here?
This could do with a bit more detail.
> +
> +config SYS_UBOOT_START
> + hex
> + depends on HAVE_TEXT_BASE
> + default TEXT_BASE
> + prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
> help
> The address in memory that U-Boot will be running from, initially.
>
Regards,
Simon
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig
2023-08-24 20:01 ` Simon Glass
@ 2023-08-24 22:40 ` Jesse T
2023-08-24 22:45 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Jesse T @ 2023-08-24 22:40 UTC (permalink / raw)
To: Simon Glass
Cc: u-boot, Andrew F . Davis, Giulio Benetti, Stefan Roese,
Weijie Gao, GSS_MTK_Uboot_upstream, Mingming lee,
Mauro Condarelli, Kever Yang, Quentin Schulz, Marek Behún,
Nikhil M Jain, Michal Simek, Patrick Delaunay,
Heinrich Schuchardt, Nathan Barrett-Morrison,
Stefan Herbrechtsmeier, Marek Vasut, Oleksandr Suvorov,
Mayuresh Chitale, Roger Quadros, Marek Vasut, Tom Rini
On Thu, Aug 24, 2023 at 4:01 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Jesse,
>
> On Wed, 23 Aug 2023 at 20:30, Jesse Taube <mr.bossman075@gmail.com> wrote:
> >
> > Commit 65cc0e2a65d2 ("global: Move remaining CONFIG_SYS_* to CFG_SYS_*")
> > renamed CONFIG_SYS_UBOOT_START to CFG_SYS_UBOOT_START. Unfortunately,
> > this meant that the value was no longer available to the Makefile. This
> > caused imxrt to fail to boot. All the other boards that used this
> > variable were unaffected because they were using the default value
> > which is CONFIG_TEXT_BASE.
> >
> > This commit converts CFG_SYS_UBOOT_START to Kconfig and sets the default
> > value to CONFIG_TEXT_BASE.
> >
> > Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > Suggested-by: Tom Rini <trini@konsulko.com>
> > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > ---
> > Makefile | 16 ++++------------
> > arch/arm/mach-k3/config_secure.mk | 2 +-
> > arch/arm/mach-omap2/config_secure.mk | 2 +-
> > boot/Kconfig | 16 ++++++++++++++++
> > common/spl/spl.c | 6 +-----
> > common/spl/spl_fit.c | 2 +-
> > configs/imxrt1020-evk_defconfig | 2 ++
> > configs/imxrt1050-evk_defconfig | 2 ++
> > configs/imxrt1170-evk_defconfig | 2 ++
> > include/configs/gardena-smart-gateway-mt7688.h | 4 ----
> > include/configs/imxrt1020-evk.h | 6 ------
> > include/configs/imxrt1050-evk.h | 6 ------
> > include/configs/imxrt1170-evk.h | 3 ---
> > include/configs/linkit-smart-7688.h | 4 ----
> > include/configs/mt7620.h | 3 ---
> > include/configs/mt7628.h | 3 ---
> > include/configs/mt8512.h | 2 --
> > include/configs/vocore2.h | 4 ----
> > include/spl.h | 2 +-
> > 19 files changed, 31 insertions(+), 56 deletions(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 9b90204bfe..13d4c63439 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -1364,14 +1364,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
> > u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
> > $(call if_changed,objcopy)
> >
> > -#
> > -# U-Boot entry point, needed for booting of full-blown U-Boot
> > -# from the SPL U-Boot version.
> > -#
> > -ifndef CFG_SYS_UBOOT_START
> > -CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
> > -endif
> > -
> > # Boards with more complex image requirements can provide an .its source file
> > # or a generator script
> > # NOTE: Please do not use this. We are migrating away from Makefile rules to use
> > @@ -1391,7 +1383,7 @@ endif
> >
> > ifdef CONFIG_SPL_LOAD_FIT
> > MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -p $(CONFIG_FIT_EXTERNAL_OFFSET) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
> > @@ -1399,10 +1391,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
> > else
> > MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> > MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> > u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
> > endif
> > @@ -1433,7 +1425,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
> > UBOOT_BIN := u-boot.bin
> >
> > MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> >
> > u-boot.bin.lzma: u-boot.bin FORCE
> > diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk
> > index 7bc8af813a..9cc1f9eb24 100644
> > --- a/arch/arm/mach-k3/config_secure.mk
> > +++ b/arch/arm/mach-k3/config_secure.mk
> > @@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(
> > $(call if_changed,mkfitimage)
> >
> > MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
> >
> > diff --git a/arch/arm/mach-omap2/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk
> > index 24ddcdb961..f76262bb0c 100644
> > --- a/arch/arm/mach-omap2/config_secure.mk
> > +++ b/arch/arm/mach-omap2/config_secure.mk
> > @@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE
> > ifdef CONFIG_SPL_LOAD_FIT
> >
> > MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
> >
> > diff --git a/boot/Kconfig b/boot/Kconfig
> > index 5e2d4286ae..f2f7821cc1 100644
> > --- a/boot/Kconfig
> > +++ b/boot/Kconfig
> > @@ -737,6 +737,22 @@ config TEXT_BASE
> > default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
> > default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
> > hex "Text Base"
> > + help
> > + The address in memory that U-Boot will be copied from, initially.
> > +
> > +config HAVE_SYS_UBOOT_START
> > + bool
> > + depends on HAVE_TEXT_BASE
> > + prompt "Use custom U-Boot Start"
> > + help
> > + By default, the address in memory that U-Boot will be copied from(TEXT_BASE) and the
> > + entry point are the same. Select this to set a different U-Boot start address.
>
> space after 'from'
>
> Also this is a little unclear. START means the start address that
> U-Boot will run from. If it is different from TEXT_BASE, then
> something loads it here
>
> This could do with a bit more detail.
Yes, it is and why I edited the TEXT_BASE help prompt.
I'm not sure how to word that this is where the SPL will start
execution after the jump.
TEXT_BASE is where the spl will copy the binary to.
>
> > +
> > +config SYS_UBOOT_START
> > + hex
> > + depends on HAVE_TEXT_BASE
> > + default TEXT_BASE
> > + prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
> Tom:
> This is clever, and can be kept. I didn't catch at first that this will
> do what I was hoping of setting a default, but then allowing for it to
> be changed.
Was there another way of doing this? I looked at the docs for a while
to figure this out.
Thanks,
Jesse Taube
> > help
> > The address in memory that U-Boot will be running from, initially.
> >
>
> Regards,
> Simon
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig
2023-08-24 22:40 ` Jesse T
@ 2023-08-24 22:45 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2023-08-24 22:45 UTC (permalink / raw)
To: Jesse T
Cc: Simon Glass, u-boot, Andrew F . Davis, Giulio Benetti,
Stefan Roese, Weijie Gao, GSS_MTK_Uboot_upstream, Mingming lee,
Mauro Condarelli, Kever Yang, Quentin Schulz, Marek Behún,
Nikhil M Jain, Michal Simek, Patrick Delaunay,
Heinrich Schuchardt, Nathan Barrett-Morrison,
Stefan Herbrechtsmeier, Marek Vasut, Oleksandr Suvorov,
Mayuresh Chitale, Roger Quadros, Marek Vasut
[-- Attachment #1: Type: text/plain, Size: 8355 bytes --]
On Thu, Aug 24, 2023 at 06:40:09PM -0400, Jesse T wrote:
> On Thu, Aug 24, 2023 at 4:01 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Jesse,
> >
> > On Wed, 23 Aug 2023 at 20:30, Jesse Taube <mr.bossman075@gmail.com> wrote:
> > >
> > > Commit 65cc0e2a65d2 ("global: Move remaining CONFIG_SYS_* to CFG_SYS_*")
> > > renamed CONFIG_SYS_UBOOT_START to CFG_SYS_UBOOT_START. Unfortunately,
> > > this meant that the value was no longer available to the Makefile. This
> > > caused imxrt to fail to boot. All the other boards that used this
> > > variable were unaffected because they were using the default value
> > > which is CONFIG_TEXT_BASE.
> > >
> > > This commit converts CFG_SYS_UBOOT_START to Kconfig and sets the default
> > > value to CONFIG_TEXT_BASE.
> > >
> > > Suggested-by: Marek Vasut <marek.vasut+renesas@gmail.com>
> > > Suggested-by: Tom Rini <trini@konsulko.com>
> > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
> > > ---
> > > Makefile | 16 ++++------------
> > > arch/arm/mach-k3/config_secure.mk | 2 +-
> > > arch/arm/mach-omap2/config_secure.mk | 2 +-
> > > boot/Kconfig | 16 ++++++++++++++++
> > > common/spl/spl.c | 6 +-----
> > > common/spl/spl_fit.c | 2 +-
> > > configs/imxrt1020-evk_defconfig | 2 ++
> > > configs/imxrt1050-evk_defconfig | 2 ++
> > > configs/imxrt1170-evk_defconfig | 2 ++
> > > include/configs/gardena-smart-gateway-mt7688.h | 4 ----
> > > include/configs/imxrt1020-evk.h | 6 ------
> > > include/configs/imxrt1050-evk.h | 6 ------
> > > include/configs/imxrt1170-evk.h | 3 ---
> > > include/configs/linkit-smart-7688.h | 4 ----
> > > include/configs/mt7620.h | 3 ---
> > > include/configs/mt7628.h | 3 ---
> > > include/configs/mt8512.h | 2 --
> > > include/configs/vocore2.h | 4 ----
> > > include/spl.h | 2 +-
> > > 19 files changed, 31 insertions(+), 56 deletions(-)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 9b90204bfe..13d4c63439 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -1364,14 +1364,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
> > > u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
> > > $(call if_changed,objcopy)
> > >
> > > -#
> > > -# U-Boot entry point, needed for booting of full-blown U-Boot
> > > -# from the SPL U-Boot version.
> > > -#
> > > -ifndef CFG_SYS_UBOOT_START
> > > -CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
> > > -endif
> > > -
> > > # Boards with more complex image requirements can provide an .its source file
> > > # or a generator script
> > > # NOTE: Please do not use this. We are migrating away from Makefile rules to use
> > > @@ -1391,7 +1383,7 @@ endif
> > >
> > > ifdef CONFIG_SPL_LOAD_FIT
> > > MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -p $(CONFIG_FIT_EXTERNAL_OFFSET) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
> > > @@ -1399,10 +1391,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > > $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
> > > else
> > > MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> > > MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> > > u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
> > > endif
> > > @@ -1433,7 +1425,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
> > > UBOOT_BIN := u-boot.bin
> > >
> > > MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
> > >
> > > u-boot.bin.lzma: u-boot.bin FORCE
> > > diff --git a/arch/arm/mach-k3/config_secure.mk b/arch/arm/mach-k3/config_secure.mk
> > > index 7bc8af813a..9cc1f9eb24 100644
> > > --- a/arch/arm/mach-k3/config_secure.mk
> > > +++ b/arch/arm/mach-k3/config_secure.mk
> > > @@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(
> > > $(call if_changed,mkfitimage)
> > >
> > > MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
> > >
> > > diff --git a/arch/arm/mach-omap2/config_secure.mk b/arch/arm/mach-omap2/config_secure.mk
> > > index 24ddcdb961..f76262bb0c 100644
> > > --- a/arch/arm/mach-omap2/config_secure.mk
> > > +++ b/arch/arm/mach-omap2/config_secure.mk
> > > @@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE
> > > ifdef CONFIG_SPL_LOAD_FIT
> > >
> > > MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
> > > - -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
> > > + -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
> > > -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
> > > $(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
> > >
> > > diff --git a/boot/Kconfig b/boot/Kconfig
> > > index 5e2d4286ae..f2f7821cc1 100644
> > > --- a/boot/Kconfig
> > > +++ b/boot/Kconfig
> > > @@ -737,6 +737,22 @@ config TEXT_BASE
> > > default 0x4a000000 if SUNXI_MINIMUM_DRAM_MB >= 256
> > > default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
> > > hex "Text Base"
> > > + help
> > > + The address in memory that U-Boot will be copied from, initially.
> > > +
> > > +config HAVE_SYS_UBOOT_START
> > > + bool
> > > + depends on HAVE_TEXT_BASE
> > > + prompt "Use custom U-Boot Start"
> > > + help
> > > + By default, the address in memory that U-Boot will be copied from(TEXT_BASE) and the
> > > + entry point are the same. Select this to set a different U-Boot start address.
> >
> > space after 'from'
> >
> > Also this is a little unclear. START means the start address that
> > U-Boot will run from. If it is different from TEXT_BASE, then
> > something loads it here
> >
> > This could do with a bit more detail.
>
> Yes, it is and why I edited the TEXT_BASE help prompt.
> I'm not sure how to word that this is where the SPL will start
> execution after the jump.
> TEXT_BASE is where the spl will copy the binary to.
>
> >
> > > +
> > > +config SYS_UBOOT_START
> > > + hex
> > > + depends on HAVE_TEXT_BASE
> > > + default TEXT_BASE
> > > + prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
> > Tom:
> > This is clever, and can be kept. I didn't catch at first that this will
> > do what I was hoping of setting a default, but then allowing for it to
> > be changed.
>
> Was there another way of doing this? I looked at the docs for a while
> to figure this out.
This part here is mechanically correct. Just need a slight wording
change to the help to better explain what / why one wants to adjust the
address. Why are these platforms needing start != text?
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-24 22:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-24 2:30 [PATCH] Convert CFG_SYS_UBOOT_START to Kconfig Jesse Taube
2023-08-24 16:54 ` Tom Rini
2023-08-24 20:01 ` Simon Glass
2023-08-24 22:40 ` Jesse T
2023-08-24 22:45 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox