[PATCH] Convert CFG_SYS_UBOOT_START to Kconfig

Tom Rini trini at konsulko.com
Thu Aug 24 18:54:56 CEST 2023


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 at gmail.com>
> Suggested-by: Tom Rini <trini at konsulko.com>
> Signed-off-by: Jesse Taube <Mr.Bossman075 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230824/3379dd71/attachment.sig>


More information about the U-Boot mailing list