Skip to content

Commit

Permalink
Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASE
Browse files Browse the repository at this point in the history
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE
and this makes it imposible to use CONFIG_VAL().

Rename it to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
  • Loading branch information
sjg20 authored and trini committed Oct 31, 2022
1 parent 6f38d91 commit 9846390
Show file tree
Hide file tree
Showing 1,118 changed files with 1,632 additions and 1,267 deletions.
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ config HAS_CUSTOM_SYS_INIT_SP_ADDR
config CUSTOM_SYS_INIT_SP_ADDR
hex "Static location for the initial stack pointer"
depends on HAS_CUSTOM_SYS_INIT_SP_ADDR
default SYS_TEXT_BASE if TFABOOT
default TEXT_BASE if TFABOOT

config SYS_MALLOC_F
bool "Enable malloc() pool before relocation"
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ LDFLAGS_u-boot += -z notext $(call ld-option,--apply-dynamic-relocs)
LDFLAGS_u-boot += --build-id=none

ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
LDFLAGS_u-boot += -Ttext $(CONFIG_TEXT_BASE)
endif

# insure the checker run with the right endianness
Expand Down Expand Up @@ -1311,7 +1311,7 @@ shell_cmd = { $(call echo-cmd,$(1)) $(cmd_$(1)); }

quiet_cmd_objcopy_uboot = OBJCOPY $@
ifdef cmd_static_rela
cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_SYS_TEXT_BASE)) || { rm -f $@; false; }
cmd_objcopy_uboot = $(cmd_objcopy) && $(call shell_cmd,static_rela,$<,$@,$(CONFIG_TEXT_BASE)) || { rm -f $@; false; }
else
cmd_objcopy_uboot = $(cmd_objcopy)
endif
Expand Down Expand Up @@ -1365,7 +1365,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 := $(CONFIG_SYS_TEXT_BASE)
CONFIG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
endif

# Boards with more complex image requirements can provide an .its source file
Expand All @@ -1390,18 +1390,18 @@ endif

ifdef CONFIG_SPL_LOAD_FIT
MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_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))) \
$(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) \
$(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_SYS_TEXT_BASE) -e $(CONFIG_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_SYS_TEXT_BASE) -e $(CONFIG_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
Expand All @@ -1420,10 +1420,10 @@ KWD_CONFIG_FILE = $(shell \
fi)

MKIMAGEFLAGS_u-boot.kwb = -n $(KWD_CONFIG_FILE) \
-T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE)
-T kwbimage -a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE)

MKIMAGEFLAGS_u-boot-spl.kwb = -n $(KWD_CONFIG_FILE) \
-T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
-T kwbimage -a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE) \
$(if $(KEYDIR),-k $(KEYDIR))

MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
Expand All @@ -1432,7 +1432,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_SYS_TEXT_BASE) -e $(CONFIG_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
Expand Down Expand Up @@ -1540,7 +1540,7 @@ u-boot.uim: u-boot.bin FORCE
u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.img,u-boot.uim) FORCE
$(Q)$(MAKE) $(build)=arch/arm/mach-imx $@

MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_TEXT_BASE)

u-boot.ubl: u-boot-with-spl.bin FORCE
$(call if_changed,mkimage)
Expand Down Expand Up @@ -1684,8 +1684,8 @@ u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
quiet_cmd_u-boot-elf ?= LD $@
cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
$(if $(CONFIG_SYS_BIG_ENDIAN),-EB,-EL) \
-T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
-Ttext=$(CONFIG_SYS_TEXT_BASE)
-T u-boot-elf.lds --defsym=$(CONFIG_PLATFORM_ELFENTRY)=$(CONFIG_TEXT_BASE) \
-Ttext=$(CONFIG_TEXT_BASE)
u-boot.elf: u-boot.bin u-boot-elf.lds
$(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
$(call if_changed,u-boot-elf)
Expand All @@ -1706,7 +1706,7 @@ u-boot-mtk.bin: u-boot-with-spl.bin
$(call if_changed,copy)
else
MKIMAGEFLAGS_u-boot-mtk.bin = -T mtk_image \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
-a $(CONFIG_TEXT_BASE) -e $(CONFIG_TEXT_BASE) \
-n "$(patsubst "%",%,$(CONFIG_MTK_BROM_HEADER_INFO))"

u-boot-mtk.bin: u-boot.bin FORCE
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/cpu/u-boot.lds
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ OUTPUT_ARCH(arc)
ENTRY(_start)
SECTIONS
{
. = CONFIG_SYS_TEXT_BASE;
. = CONFIG_TEXT_BASE;
__image_copy_start = .;
. = ALIGN(1024);
__ivt_start = .;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ config LNX_KRNL_IMG_TEXT_OFFSET_BASE
depends on LINUX_KERNEL_IMAGE_HEADER
hex
help
The value subtracted from CONFIG_SYS_TEXT_BASE to calculate the
The value subtracted from CONFIG_TEXT_BASE to calculate the
TEXT_OFFSET value written to the Linux kernel image header.

config GICV2
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/arm1176/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ cpu_init_crit:

/* Prepare to disable the MMU */
adr r2, mmu_disable_phys
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_SYS_TEXT_BASE)
sub r2, r2, #(CONFIG_SYS_PHY_UBOOT_BASE - CONFIG_TEXT_BASE)
b mmu_disable

.align 5
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/cpu/arm926ejs/mxs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ spl/u-boot-spl.ivt: spl/u-boot-spl.bin

u-boot.ivt: u-boot.bin
$(call if_changed,mkalign_mxs)
$(call if_changed,mkivt_mxs,$(CONFIG_SYS_TEXT_BASE),\
$(call if_changed,mkivt_mxs,$(CONFIG_TEXT_BASE),\
0x40001000,0x40001040)

spl/u-boot-spl.csf: spl/u-boot-spl.ivt spl/u-boot-spl.bin board/$(VENDOR)/$(BOARD)/sign/u-boot-spl.csf
$(call if_changed,mkcsfreq_mxs,$(CONFIG_SPL_TEXT_BASE),0x8000)

u-boot.csf: u-boot.ivt u-boot.bin board/$(VENDOR)/$(BOARD)/sign/u-boot.csf
$(call if_changed,mkcsfreq_mxs,$(CONFIG_SYS_TEXT_BASE),0x40001000)
$(call if_changed,mkcsfreq_mxs,$(CONFIG_TEXT_BASE),0x40001000)

%.sig: %.csf
$(call if_changed,mkcst_mxs)
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/cpu/armv7/ls102xa/fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,9 @@ void ft_cpu_setup(void *blob, struct bd_info *bd)
* Since second uboot binary has a head, that space need to be
* reserved either(assuming its size is less than 0x1000).
*/
off = fdt_add_mem_rsv(blob, CONFIG_SYS_TEXT_BASE - UBOOT_HEAD_LEN,
CONFIG_SYS_MONITOR_LEN + CONFIG_SYS_SPL_MALLOC_SIZE +
UBOOT_HEAD_LEN);
off = fdt_add_mem_rsv(blob, CONFIG_TEXT_BASE - UBOOT_HEAD_LEN,
CONFIG_SYS_MONITOR_LEN +
CONFIG_SYS_SPL_MALLOC_SIZE + UBOOT_HEAD_LEN);
if (off < 0)
printf("Failed to reserve memory for SD boot deep sleep: %s\n",
fdt_strerror(off));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/armv8/linux-kernel-image-header-vars.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
(__HEAD_FLAG_PAGE_SIZE << 1) | \
(__HEAD_FLAG_PHYS_BASE << 3))

#define TEXT_OFFSET (CONFIG_SYS_TEXT_BASE - \
#define TEXT_OFFSET (CONFIG_TEXT_BASE - \
CONFIG_LNX_KRNL_IMG_TEXT_OFFSET_BASE)

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/cpu/armv8/start.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ _start:

.globl _TEXT_BASE
_TEXT_BASE:
.quad CONFIG_SYS_TEXT_BASE
.quad CONFIG_TEXT_BASE

/*
* These are defined in the linker script.
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
os = "u-boot";
arch = "arm";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;

u-boot-nodtb {
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/imx8mm-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
arch = "arm64";
compression = "none";
description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;
type = "standalone";

uboot-blob {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/imx8mn-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
arch = "arm64";
compression = "none";
description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;
type = "standalone";

uboot-blob {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/imx8mp-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
type = "standalone";
arch = "arm64";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;

uboot_blob: blob-ext {
filename = "u-boot-nodtb.bin";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/imx8mq-cm-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
type = "standalone";
arch = "arm64";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;

uboot_blob: blob-ext {
filename = "u-boot-nodtb.bin";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/imx8mq-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
arch = "arm64";
compression = "none";
description = "U-Boot (64-bit)";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;
type = "standalone";

uboot-blob {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/rockchip-optee.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
os = "U-Boot";
arch = "arm";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;

u-boot-nodtb {
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/sunxi-u-boot.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
os = "u-boot";
arch = "arm64";
compression = "none";
load = <CONFIG_SYS_TEXT_BASE>;
load = <CONFIG_TEXT_BASE>;

u-boot-nodtb {
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/dts/tegra-u-boot.dtsi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <config.h>

#ifdef CONFIG_SPL_TEXT_BASE
#define U_BOOT_OFFSET (CONFIG_SYS_TEXT_BASE - CONFIG_SPL_TEXT_BASE)
#define U_BOOT_OFFSET (CONFIG_TEXT_BASE - CONFIG_SPL_TEXT_BASE)
#else
#define U_BOOT_OFFSET 0
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/arch-mxs/sys_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static const struct mxs_pair mxs_boot_modes[] = {
#define MXS_BM_SDMMC1_3V3 0x0a
#define MXS_BM_SDMMC1_1V8 0x1a

#define MXS_SPL_DATA ((struct mxs_spl_data *)(CONFIG_SYS_TEXT_BASE - 0x200))
#define MXS_SPL_DATA ((struct mxs_spl_data *)(CONFIG_TEXT_BASE - 0x200))

struct mxs_spl_data {
uint8_t boot_mode_idx;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/include/asm/arch-sunxi/boot0.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#ifdef CONFIG_SPL_BUILD
.word CONFIG_SPL_TEXT_BASE
#else
.word CONFIG_SYS_TEXT_BASE
.word CONFIG_TEXT_BASE
#endif
.word fel_stash - .
#else
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/lib/crt0.S
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ENTRY(_main)
adr r0, _main
ldr r1, _start_ofs
add r0, r1
ldr r1, =CONFIG_SYS_TEXT_BASE
ldr r1, =CONFIG_TEXT_BASE
sub r1, r0
add lr, r1
#endif
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/lib/relocate_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ENTRY(relocate_code)
* correctly apply relocations, we need to know the linked value.
*
* Linked &__image_copy_start, which we know was at
* CONFIG_SYS_TEXT_BASE, which is stored in _TEXT_BASE, as a non-
* CONFIG_TEXT_BASE, which is stored in _TEXT_BASE, as a non-
* relocated value, since it isn't a symbol reference.
*/
ldr x1, _TEXT_BASE /* x1 <- Linked &__image_copy_start */
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-apple/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if ARCH_APPLE

config SYS_TEXT_BASE
config TEXT_BASE
default 0x00000000

config SYS_CONFIG_NAME
Expand All @@ -16,6 +16,6 @@ config SYS_MALLOC_F_LEN
default 0x4000

config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default SYS_TEXT_BASE
default TEXT_BASE

endif
2 changes: 1 addition & 1 deletion arch/arm/mach-aspeed/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ config SYS_ARCH
config SYS_SOC
default "aspeed"

config SYS_TEXT_BASE
config TEXT_BASE
default 0x00000000

choice
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/arm920t/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
_MTEXT_BASE:
#undef START_FROM_MEM
#ifdef START_FROM_MEM
.word CONFIG_SYS_TEXT_BASE-PHYS_FLASH_1
.word CONFIG_TEXT_BASE-PHYS_FLASH_1
#else
.word CONFIG_SYS_TEXT_BASE
.word CONFIG_TEXT_BASE
#endif

.globl lowlevel_init
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/arm926ejs/lowlevel_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ lowlevel_init:
POS1:
adr r5, POS1 /* r5 = POS1 run time */
ldr r0, =POS1 /* r0 = POS1 compile */
sub r5, r5, r0 /* r0 = CONFIG_SYS_TEXT_BASE-1 */
sub r5, r5, r0 /* r0 = CONFIG_TEXT_BASE-1 */

/* memory control configuration 1 */
ldr r0, =SMRDATA
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/mach-exynos/spl_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void copy_uboot_to_ram(void)
#ifdef CONFIG_SPI_BOOTING
case BOOT_MODE_SERIAL:
/* Customised function to copy u-boot from SF */
exynos_spi_copy(param->uboot_size, CONFIG_SYS_TEXT_BASE);
exynos_spi_copy(param->uboot_size, CONFIG_TEXT_BASE);
break;
#endif
case BOOT_MODE_SD:
Expand All @@ -267,7 +267,7 @@ void copy_uboot_to_ram(void)
copy_bl2_from_emmc = get_irom_func(EMMC44_INDEX);
end_bootop_from_emmc = get_irom_func(EMMC44_END_INDEX);

copy_bl2_from_emmc(BL2_SIZE_BLOC_COUNT, CONFIG_SYS_TEXT_BASE);
copy_bl2_from_emmc(BL2_SIZE_BLOC_COUNT, CONFIG_TEXT_BASE);
end_bootop_from_emmc();
break;
#endif
Expand All @@ -279,7 +279,7 @@ void copy_uboot_to_ram(void)
*/
is_cr_z_set = config_branch_prediction(0);
usb_copy = get_irom_func(USB_INDEX);
usb_copy(0, (u32 *)CONFIG_SYS_TEXT_BASE);
usb_copy(0, (u32 *)CONFIG_TEXT_BASE);
config_branch_prediction(is_cr_z_set);
break;
#endif
Expand All @@ -288,7 +288,7 @@ void copy_uboot_to_ram(void)
}

if (copy_bl2)
copy_bl2(offset, size, CONFIG_SYS_TEXT_BASE);
copy_bl2(offset, size, CONFIG_TEXT_BASE);
}

void memzero(void *s, size_t n)
Expand Down Expand Up @@ -329,7 +329,7 @@ void board_init_f(unsigned long bootflag)
copy_uboot_to_ram();

/* Jump to U-Boot image */
uboot = (void *)CONFIG_SYS_TEXT_BASE;
uboot = (void *)CONFIG_TEXT_BASE;
(*uboot)();
/* Never returns Here */
}
Expand Down
Loading

0 comments on commit 9846390

Please sign in to comment.