mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
Convert CFG_SYS_UBOOT_START to Kconfig
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> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
90c81f407d
commit
6ab77bb14f
22
Kconfig
22
Kconfig
@ -601,7 +601,27 @@ config TEXT_BASE
|
|||||||
default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
|
default 0x42e00000 if SUNXI_MINIMUM_DRAM_MB >= 64
|
||||||
hex "Text Base"
|
hex "Text Base"
|
||||||
help
|
help
|
||||||
The address in memory that U-Boot will be running from, initially.
|
The address in memory that U-Boot will be copied and executed from
|
||||||
|
initially.
|
||||||
|
|
||||||
|
config HAVE_SYS_UBOOT_START
|
||||||
|
bool "Use custom U-Boot Start"
|
||||||
|
depends on HAVE_TEXT_BASE
|
||||||
|
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 start the
|
||||||
|
execution of U-Boot from a different address.
|
||||||
|
This may be required if a header or vector table needs to be copied
|
||||||
|
but not executed.
|
||||||
|
|
||||||
|
config SYS_UBOOT_START
|
||||||
|
hex
|
||||||
|
depends on HAVE_TEXT_BASE
|
||||||
|
default TEXT_BASE
|
||||||
|
prompt "U-Boot entry" if HAVE_SYS_UBOOT_START
|
||||||
|
help
|
||||||
|
If TEXT_BASE differs from the start of execution, this sets the
|
||||||
|
address in memory that U-Boot will start execution from initially.
|
||||||
|
|
||||||
config HAVE_SYS_MONITOR_BASE
|
config HAVE_SYS_MONITOR_BASE
|
||||||
bool
|
bool
|
||||||
|
16
Makefile
16
Makefile
@ -1367,14 +1367,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
|
|||||||
u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
|
u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
|
||||||
$(call if_changed,objcopy)
|
$(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
|
# Boards with more complex image requirements can provide an .its source file
|
||||||
# or a generator script
|
# or a generator script
|
||||||
# NOTE: Please do not use this. We are migrating away from Makefile rules to use
|
# NOTE: Please do not use this. We are migrating away from Makefile rules to use
|
||||||
@ -1394,7 +1386,7 @@ endif
|
|||||||
|
|
||||||
ifdef CONFIG_SPL_LOAD_FIT
|
ifdef CONFIG_SPL_LOAD_FIT
|
||||||
MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
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) \
|
-p $(CONFIG_FIT_EXTERNAL_OFFSET) \
|
||||||
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
||||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
|
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
|
||||||
@ -1402,10 +1394,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)))
|
$(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
|
||||||
else
|
else
|
||||||
MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
|
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"
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||||
MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
|
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"
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||||
u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
|
u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
|
||||||
endif
|
endif
|
||||||
@ -1436,7 +1428,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
|
|||||||
UBOOT_BIN := u-boot.bin
|
UBOOT_BIN := u-boot.bin
|
||||||
|
|
||||||
MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
|
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"
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
|
||||||
|
|
||||||
u-boot.bin.lzma: u-boot.bin FORCE
|
u-boot.bin.lzma: u-boot.bin FORCE
|
||||||
|
@ -30,7 +30,7 @@ tispl.bin_HS: $(obj)/u-boot-spl-nodtb.bin_HS $(patsubst %,$(obj)/dts/%.dtb_HS,$(
|
|||||||
$(call if_changed,mkfitimage)
|
$(call if_changed,mkfitimage)
|
||||||
|
|
||||||
MKIMAGEFLAGS_u-boot.img_HS = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
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 \
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
||||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
|
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ u-boot_HS_XIP_X-LOADER: $(obj)/u-boot.bin FORCE
|
|||||||
ifdef CONFIG_SPL_LOAD_FIT
|
ifdef CONFIG_SPL_LOAD_FIT
|
||||||
|
|
||||||
MKIMAGEFLAGS_u-boot_HS.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
|
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 \
|
-n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
|
||||||
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
|
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb_HS,$(subst ",,$(CONFIG_OF_LIST)))
|
||||||
|
|
||||||
|
@ -45,10 +45,6 @@
|
|||||||
DECLARE_GLOBAL_DATA_PTR;
|
DECLARE_GLOBAL_DATA_PTR;
|
||||||
DECLARE_BINMAN_MAGIC_SYM;
|
DECLARE_BINMAN_MAGIC_SYM;
|
||||||
|
|
||||||
#ifndef CFG_SYS_UBOOT_START
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u32 *boot_params_ptr = NULL;
|
u32 *boot_params_ptr = NULL;
|
||||||
|
|
||||||
#if CONFIG_IS_ENABLED(BINMAN_UBOOT_SYMBOLS)
|
#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->entry_point = u_boot_pos;
|
||||||
spl_image->load_addr = u_boot_pos;
|
spl_image->load_addr = u_boot_pos;
|
||||||
} else {
|
} 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->load_addr = CONFIG_TEXT_BASE;
|
||||||
}
|
}
|
||||||
spl_image->os = IH_OS_U_BOOT;
|
spl_image->os = IH_OS_U_BOOT;
|
||||||
|
@ -817,7 +817,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
|
* 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.
|
* here. What it actually means is: use the load address.
|
||||||
*/
|
*/
|
||||||
|
@ -19,6 +19,8 @@ CONFIG_SPL_SERIAL=y
|
|||||||
CONFIG_SPL_SIZE_LIMIT=0x20000
|
CONFIG_SPL_SIZE_LIMIT=0x20000
|
||||||
CONFIG_SPL=y
|
CONFIG_SPL=y
|
||||||
CONFIG_SYS_LOAD_ADDR=0x20209000
|
CONFIG_SYS_LOAD_ADDR=0x20209000
|
||||||
|
CONFIG_HAVE_SYS_UBOOT_START=y
|
||||||
|
CONFIG_SYS_UBOOT_START=0x800023FD
|
||||||
CONFIG_DISTRO_DEFAULTS=y
|
CONFIG_DISTRO_DEFAULTS=y
|
||||||
CONFIG_SD_BOOT=y
|
CONFIG_SD_BOOT=y
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
# CONFIG_USE_BOOTCOMMAND is not set
|
||||||
|
@ -21,6 +21,8 @@ CONFIG_SPL_SERIAL=y
|
|||||||
CONFIG_SPL_SIZE_LIMIT=0x20000
|
CONFIG_SPL_SIZE_LIMIT=0x20000
|
||||||
CONFIG_SPL=y
|
CONFIG_SPL=y
|
||||||
CONFIG_SYS_LOAD_ADDR=0x20209000
|
CONFIG_SYS_LOAD_ADDR=0x20209000
|
||||||
|
CONFIG_HAVE_SYS_UBOOT_START=y
|
||||||
|
CONFIG_SYS_UBOOT_START=0x800023FD
|
||||||
CONFIG_DISTRO_DEFAULTS=y
|
CONFIG_DISTRO_DEFAULTS=y
|
||||||
CONFIG_SD_BOOT=y
|
CONFIG_SD_BOOT=y
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
# CONFIG_USE_BOOTCOMMAND is not set
|
||||||
|
@ -21,6 +21,8 @@ CONFIG_SPL_SERIAL=y
|
|||||||
CONFIG_SPL_SIZE_LIMIT=0x20000
|
CONFIG_SPL_SIZE_LIMIT=0x20000
|
||||||
CONFIG_SPL=y
|
CONFIG_SPL=y
|
||||||
CONFIG_SYS_LOAD_ADDR=0x202C0000
|
CONFIG_SYS_LOAD_ADDR=0x202C0000
|
||||||
|
CONFIG_HAVE_SYS_UBOOT_START=y
|
||||||
|
CONFIG_SYS_UBOOT_START=0x202403FD
|
||||||
CONFIG_DISTRO_DEFAULTS=y
|
CONFIG_DISTRO_DEFAULTS=y
|
||||||
CONFIG_SD_BOOT=y
|
CONFIG_SD_BOOT=y
|
||||||
# CONFIG_USE_BOOTCOMMAND is not set
|
# CONFIG_USE_BOOTCOMMAND is not set
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
|
|
||||||
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
||||||
|
|
||||||
/* SPL */
|
|
||||||
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
/* Dummy value */
|
/* Dummy value */
|
||||||
#define CFG_SYS_UBOOT_BASE 0
|
#define CFG_SYS_UBOOT_BASE 0
|
||||||
|
|
||||||
|
@ -18,10 +18,4 @@
|
|||||||
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
|
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
|
||||||
DMAMEM_SZ_ALL)
|
DMAMEM_SZ_ALL)
|
||||||
|
|
||||||
/*
|
|
||||||
* Configuration of the external SDRAM memory
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CFG_SYS_UBOOT_START 0x800023FD
|
|
||||||
|
|
||||||
#endif /* __IMXRT1020_EVK_H */
|
#endif /* __IMXRT1020_EVK_H */
|
||||||
|
@ -25,10 +25,4 @@
|
|||||||
"stderr=serial,vidconsole\0"
|
"stderr=serial,vidconsole\0"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* Configuration of the external SDRAM memory
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CFG_SYS_UBOOT_START 0x800023FD
|
|
||||||
|
|
||||||
#endif /* __IMXRT1050_EVK_H */
|
#endif /* __IMXRT1050_EVK_H */
|
||||||
|
@ -22,8 +22,5 @@
|
|||||||
#define DMAMEM_SZ_ALL (1 * 1024 * 1024)
|
#define DMAMEM_SZ_ALL (1 * 1024 * 1024)
|
||||||
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
|
#define DMAMEM_BASE (PHYS_SDRAM + PHYS_SDRAM_SIZE - \
|
||||||
DMAMEM_SZ_ALL)
|
DMAMEM_SZ_ALL)
|
||||||
/* For SPL */
|
|
||||||
#define CFG_SYS_UBOOT_START 0x202403FD
|
|
||||||
/* For SPL ends */
|
|
||||||
|
|
||||||
#endif /* __IMXRT1170_EVK_H */
|
#endif /* __IMXRT1170_EVK_H */
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
|
|
||||||
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
||||||
|
|
||||||
/* SPL */
|
|
||||||
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
/* Dummy value */
|
/* Dummy value */
|
||||||
#define CFG_SYS_UBOOT_BASE 0
|
#define CFG_SYS_UBOOT_BASE 0
|
||||||
|
|
||||||
|
@ -12,9 +12,6 @@
|
|||||||
|
|
||||||
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
||||||
|
|
||||||
/* SPL */
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
/* Dummy value */
|
/* Dummy value */
|
||||||
#define CFG_SYS_UBOOT_BASE 0
|
#define CFG_SYS_UBOOT_BASE 0
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@
|
|||||||
#define CFG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
|
#define CFG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
|
||||||
230400, 460800, 921600 }
|
230400, 460800, 921600 }
|
||||||
|
|
||||||
/* SPL */
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
/* Dummy value */
|
/* Dummy value */
|
||||||
#define CFG_SYS_UBOOT_BASE 0
|
#define CFG_SYS_UBOOT_BASE 0
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
#define __MT8512_H
|
#define __MT8512_H
|
||||||
|
|
||||||
/* Uboot definition */
|
/* Uboot definition */
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
#define ENV_BOOT_READ_IMAGE \
|
#define ENV_BOOT_READ_IMAGE \
|
||||||
"boot_rd_img=mmc dev 0" \
|
"boot_rd_img=mmc dev 0" \
|
||||||
";mmc read ${loadaddr} 0x27000 0x8000" \
|
";mmc read ${loadaddr} 0x27000 0x8000" \
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
|
|
||||||
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
#define CFG_SYS_INIT_SP_OFFSET 0x400000
|
||||||
|
|
||||||
/* SPL */
|
|
||||||
|
|
||||||
#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE
|
|
||||||
|
|
||||||
/* Dummy value */
|
/* Dummy value */
|
||||||
#define CFG_SYS_UBOOT_BASE 0
|
#define CFG_SYS_UBOOT_BASE 0
|
||||||
|
|
||||||
|
@ -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
|
* 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
|
* 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.
|
* CONFIG_TEXT_BASE.
|
||||||
*
|
*
|
||||||
* @spl_image: Image description to set up
|
* @spl_image: Image description to set up
|
||||||
|
Loading…
x
Reference in New Issue
Block a user