global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD

Complete this rename for all directories outside arch/ board/ drivers/
and include/

Use the new symbol to refer to any 'SPL' build, including TPL and VPL

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2024-09-29 19:49:50 -06:00 committed by Tom Rini
parent f38956a687
commit 1d6132e2a2
48 changed files with 78 additions and 78 deletions

4
README
View file

@ -1418,13 +1418,13 @@ Low Level (hardware related) configuration options:
This only takes effect if the memory commands are activated This only takes effect if the memory commands are activated
globally (CONFIG_CMD_MEMORY). globally (CONFIG_CMD_MEMORY).
- CONFIG_SPL_BUILD - CONFIG_XPL_BUILD
Set when the currently running compilation is for an artifact Set when the currently running compilation is for an artifact
that will end up in one of the 'xPL' builds, i.e. SPL, TPL or that will end up in one of the 'xPL' builds, i.e. SPL, TPL or
VPL. Code that needs phase-specific behaviour can check this, VPL. Code that needs phase-specific behaviour can check this,
or (where possible) use xpl_phase() instead. or (where possible) use xpl_phase() instead.
Note that CONFIG_SPL_BUILD *is* always defined when either Note that CONFIG_XPL_BUILD *is* always defined when either
of CONFIG_TPL_BUILD / CONFIG_VPL_BUILD is defined. This can be of CONFIG_TPL_BUILD / CONFIG_VPL_BUILD is defined. This can be
counter-intuitive and should perhaps be changed. counter-intuitive and should perhaps be changed.

View file

@ -3,7 +3,7 @@
# (C) Copyright 2004-2006 # (C) Copyright 2004-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
ifndef CONFIG_SPL_BUILD ifndef CONFIG_XPL_BUILD
obj-$(CONFIG_BOOT_RETRY) += bootretry.o obj-$(CONFIG_BOOT_RETRY) += bootretry.o
obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o obj-$(CONFIG_CMD_BOOTM) += bootm.o bootm_os.o

View file

@ -72,7 +72,7 @@ bool android_dt_get_fdt_by_index(ulong hdr_addr, u32 index, ulong *addr,
return true; return true;
} }
#if !defined(CONFIG_SPL_BUILD) #if !defined(CONFIG_XPL_BUILD)
static void android_dt_print_fdt_info(const struct fdt_header *fdt) static void android_dt_print_fdt_info(const struct fdt_header *fdt)
{ {
u32 fdt_size; u32 fdt_size;

View file

@ -652,7 +652,7 @@ bool android_image_get_dtb_by_index(ulong hdr_addr, ulong vendor_boot_img,
return false; return false;
} }
#if !defined(CONFIG_SPL_BUILD) #if !defined(CONFIG_XPL_BUILD)
/** /**
* android_print_contents - prints out the contents of the Android format image * android_print_contents - prints out the contents of the Android format image
* @hdr: pointer to the Android format image header * @hdr: pointer to the Android format image header

View file

@ -48,7 +48,7 @@ struct image_region *fit_region_make_list(const void *fit,
* Use malloc() except in SPL (to save code size). In SPL the caller * Use malloc() except in SPL (to save code size). In SPL the caller
* must allocate the array. * must allocate the array.
*/ */
if (!IS_ENABLED(CONFIG_SPL_BUILD) && !region) if (!IS_ENABLED(CONFIG_XPL_BUILD) && !region)
region = calloc(sizeof(*region), count); region = calloc(sizeof(*region), count);
if (!region) if (!region)
return NULL; return NULL;

View file

@ -3,7 +3,7 @@
# (C) Copyright 2004-2006 # (C) Copyright 2004-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
ifndef CONFIG_SPL_BUILD ifndef CONFIG_XPL_BUILD
# core command # core command
obj-y += boot.o obj-y += boot.o
obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-$(CONFIG_CMD_BOOTM) += bootm.o
@ -247,7 +247,7 @@ obj-$(CONFIG_ARCH_MVEBU) += mvebu/
obj-$(CONFIG_ARCH_KEYSTONE) += ti/ obj-$(CONFIG_ARCH_KEYSTONE) += ti/
obj-$(CONFIG_ARCH_K3) += ti/ obj-$(CONFIG_ARCH_K3) += ti/
obj-$(CONFIG_ARCH_OMAP2PLUS) += ti/ obj-$(CONFIG_ARCH_OMAP2PLUS) += ti/
endif # !CONFIG_SPL_BUILD endif # !CONFIG_XPL_BUILD
obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o obj-$(CONFIG_$(SPL_)CMD_TLV_EEPROM) += tlv_eeprom.o

View file

@ -49,7 +49,7 @@ DECLARE_GLOBAL_DATA_PTR;
*/ */
#define MAX_ENV_SIZE (1 << 20) /* 1 MiB */ #define MAX_ENV_SIZE (1 << 20) /* 1 MiB */
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
/* /*
* Command interface: print one or all environment variables * Command interface: print one or all environment variables
* *
@ -182,9 +182,9 @@ DONE:
return 0; return 0;
} }
#endif #endif
#endif /* CONFIG_SPL_BUILD */ #endif /* CONFIG_XPL_BUILD */
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
static int do_env_set(struct cmd_tbl *cmdtp, int flag, int argc, static int do_env_set(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
@ -503,9 +503,9 @@ static int do_env_select(struct cmd_tbl *cmdtp, int flag, int argc,
} }
#endif #endif
#endif /* CONFIG_SPL_BUILD */ #endif /* CONFIG_XPL_BUILD */
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
static int do_env_default(struct cmd_tbl *cmdtp, int flag, static int do_env_default(struct cmd_tbl *cmdtp, int flag,
int argc, char *const argv[]) int argc, char *const argv[])
{ {
@ -1289,4 +1289,4 @@ U_BOOT_CMD_COMPLETE(
var_complete var_complete
); );
#endif #endif
#endif /* CONFIG_SPL_BUILD */ #endif /* CONFIG_XPL_BUILD */

View file

@ -4,7 +4,7 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
# core # core
ifndef CONFIG_SPL_BUILD ifndef CONFIG_XPL_BUILD
obj-y += init/ obj-y += init/
obj-y += main.o obj-y += main.o
obj-y += exports.o obj-y += exports.o
@ -42,12 +42,12 @@ obj-$(CONFIG_MENU) += menu.o
obj-$(CONFIG_UPDATE_COMMON) += update.o obj-$(CONFIG_UPDATE_COMMON) += update.o
obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
endif # !CONFIG_SPL_BUILD endif # !CONFIG_XPL_BUILD
obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o obj-$(CONFIG_$(SPL_TPL_)BLOBLIST) += bloblist.o
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
ifdef CONFIG_SPL_DFU ifdef CONFIG_SPL_DFU
obj-$(CONFIG_DFU_OVER_USB) += dfu.o obj-$(CONFIG_DFU_OVER_USB) += dfu.o
endif endif
@ -58,7 +58,7 @@ obj-$(CONFIG_SPL_USB_STORAGE) += usb_storage.o
obj-$(CONFIG_SPL_MUSB_NEW) += usb.o obj-$(CONFIG_SPL_MUSB_NEW) += usb.o
obj-$(CONFIG_SPL_SPLASH_SCREEN) += splash.o obj-$(CONFIG_SPL_SPLASH_SCREEN) += splash.o
obj-$(CONFIG_SPL_SPLASH_SOURCE) += splash_source.o obj-$(CONFIG_SPL_SPLASH_SOURCE) += splash_source.o
endif # CONFIG_SPL_BUILD endif # CONFIG_XPL_BUILD
#others #others
obj-$(CONFIG_DDR_SPD) += ddr_spd.o obj-$(CONFIG_DDR_SPD) += ddr_spd.o

View file

@ -73,7 +73,7 @@ static char *delete_char (char *buffer, char *p, int *colp, int *np, int plen)
#define getcmd_getch() getchar() #define getcmd_getch() getchar()
#define getcmd_cbeep() getcmd_putch('\a') #define getcmd_cbeep() getcmd_putch('\a')
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_XPL_BUILD
#define HIST_MAX 3 #define HIST_MAX 3
#define HIST_SIZE 32 #define HIST_SIZE 32
#else #else

View file

@ -191,7 +191,7 @@ static int console_setfile(int file, struct stdio_dev * dev)
/* Assign the new device (leaving the existing one started) */ /* Assign the new device (leaving the existing one started) */
stdio_devices[file] = dev; stdio_devices[file] = dev;
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
/* /*
* Update monitor functions * Update monitor functions
* (to use the console stuff by other applications) * (to use the console stuff by other applications)

View file

@ -403,7 +403,7 @@ int hash_block(const char *algo_name, const void *data, unsigned int len,
return 0; return 0;
} }
#if !defined(CONFIG_SPL_BUILD) && (defined(CONFIG_CMD_HASH) || \ #if !defined(CONFIG_XPL_BUILD) && (defined(CONFIG_CMD_HASH) || \
defined(CONFIG_CMD_SHA1SUM) || defined(CONFIG_CMD_CRC32)) || \ defined(CONFIG_CMD_SHA1SUM) || defined(CONFIG_CMD_CRC32)) || \
defined(CONFIG_CMD_MD5SUM) defined(CONFIG_CMD_MD5SUM)
/** /**

View file

@ -6,7 +6,7 @@
# Based on common/Makefile. # Based on common/Makefile.
# #
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o
obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o

View file

@ -215,7 +215,7 @@ static int splash_init_virtio(void)
} }
} }
#if defined(CONFIG_CMD_UBIFS) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_CMD_UBIFS) && !defined(CONFIG_XPL_BUILD)
static int splash_mount_ubifs(struct splash_location *location) static int splash_mount_ubifs(struct splash_location *location)
{ {
int res; int res;

View file

@ -21,7 +21,7 @@ VENDOR :=
ARCH := $(CONFIG_SYS_ARCH:"%"=%) ARCH := $(CONFIG_SYS_ARCH:"%"=%)
CPU := $(CONFIG_SYS_CPU:"%"=%) CPU := $(CONFIG_SYS_CPU:"%"=%)
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
ifdef CONFIG_ARCH_TEGRA ifdef CONFIG_ARCH_TEGRA
CPU := arm720t CPU := arm720t
endif endif

View file

@ -482,7 +482,7 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str,
} }
#endif #endif
#if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_SPL_BUILD) #if IS_ENABLED(CONFIG_CMD_UBIFS) && !IS_ENABLED(CONFIG_XPL_BUILD)
/* /*
* Special-case ubi, ubi goes through a mtd, rather than through * Special-case ubi, ubi goes through a mtd, rather than through
* a regular block device. * a regular block device.

View file

@ -100,7 +100,7 @@ static int test_block_type(unsigned char *buffer)
static int part_test_dos(struct blk_desc *desc) static int part_test_dos(struct blk_desc *desc)
{ {
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr,
DIV_ROUND_UP(desc->blksz, sizeof(legacy_mbr))); DIV_ROUND_UP(desc->blksz, sizeof(legacy_mbr)));

View file

@ -189,7 +189,7 @@ TO BE UPDATED:
In your board configuration file, include the following:: In your board configuration file, include the following::
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
#include <config_distro_bootcmd.h> #include <config_distro_bootcmd.h>
#endif #endif
@ -316,7 +316,7 @@ that it supports the correct set of possible boot device types. To provide this
configuration, simply define macro BOOT_TARGET_DEVICES prior to including configuration, simply define macro BOOT_TARGET_DEVICES prior to including
<config_distro_bootcmd.h>. For example:: <config_distro_bootcmd.h>. For example::
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
#define BOOT_TARGET_DEVICES(func) \ #define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \ func(MMC, mmc, 1) \
func(MMC, mmc, 0) \ func(MMC, mmc, 0) \

View file

@ -226,7 +226,7 @@ Available options
Look for moved config options in spl/include/autoconf.mk instead of Look for moved config options in spl/include/autoconf.mk instead of
include/autoconf.mk. This is useful for moving options for SPL build include/autoconf.mk. This is useful for moving options for SPL build
because SPL related options (mostly prefixed with CONFIG_SPL\_) are because SPL related options (mostly prefixed with CONFIG_SPL\_) are
sometimes blocked by CONFIG_SPL_BUILD ifdef conditionals. sometimes blocked by CONFIG_XPL_BUILD ifdef conditionals.
-j, --jobs -j, --jobs
Specify the number of threads to run simultaneously. If not specified, Specify the number of threads to run simultaneously. If not specified,

View file

@ -278,7 +278,7 @@ Whatever sandbox build is used, which tests are present is determined by which
source files are built. For sandbox_spl, the of_platdata tests are built source files are built. For sandbox_spl, the of_platdata tests are built
because of the build rule in test/dm/Makefile:: because of the build rule in test/dm/Makefile::
ifeq ($(CONFIG_SPL_BUILD),y) ifeq ($(CONFIG_XPL_BUILD),y)
obj-$(CONFIG_SPL_OF_PLATDATA) += of_platdata.o obj-$(CONFIG_SPL_OF_PLATDATA) += of_platdata.o
else else
...other tests for non-spl ...other tests for non-spl

View file

@ -53,7 +53,7 @@ PHONY += arch-dtbs
arch-dtbs: arch-dtbs:
$(Q)$(MAKE) $(build)=$(dt_dir) dtbs $(Q)$(MAKE) $(build)=$(dt_dir) dtbs
ifeq ($(CONFIG_SPL_BUILD),y) ifeq ($(CONFIG_XPL_BUILD),y)
obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o
# support "out-of-tree" build for dtb-spl # support "out-of-tree" build for dtb-spl
$(obj)/dt-spl.dtb.o: $(obj)/dt-spl.dtb.S FORCE $(obj)/dt-spl.dtb.o: $(obj)/dt-spl.dtb.S FORCE

2
env/Makefile vendored
View file

@ -8,7 +8,7 @@ obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += env.o
obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += attr.o obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += attr.o
obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += flags.o obj-$(CONFIG_$(SPL_TPL_)ENV_SUPPORT) += flags.o
ifndef CONFIG_SPL_BUILD ifndef CONFIG_XPL_BUILD
obj-y += callback.o obj-y += callback.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o
obj-$(CONFIG_ENV_IS_IN_EEPROM) += embedded.o obj-$(CONFIG_ENV_IS_IN_EEPROM) += embedded.o

4
env/common.c vendored
View file

@ -61,7 +61,7 @@ int env_do_env_set(int flag, int argc, char *const argv[], int env_flag)
debug("Initial value for argc=%d\n", argc); debug("Initial value for argc=%d\n", argc);
#if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_CMD_NVEDIT_EFI) #if !IS_ENABLED(CONFIG_XPL_BUILD) && IS_ENABLED(CONFIG_CMD_NVEDIT_EFI)
if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'e') if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'e')
return do_env_set_efi(NULL, flag, --argc, ++argv); return do_env_set_efi(NULL, flag, --argc, ++argv);
#endif #endif
@ -551,7 +551,7 @@ int env_export(env_t *env_out)
void env_relocate(void) void env_relocate(void)
{ {
if (gd->env_valid == ENV_INVALID) { if (gd->env_valid == ENV_INVALID) {
#if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD) #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_XPL_BUILD)
/* Environment not changable */ /* Environment not changable */
env_set_default(NULL, 0); env_set_default(NULL, 0);
#else #else

4
env/fat.c vendored
View file

@ -22,7 +22,7 @@
#include <asm/global_data.h> #include <asm/global_data.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_XPL_BUILD
/* TODO(sjg@chromium.org): Figure out why this is needed */ /* TODO(sjg@chromium.org): Figure out why this is needed */
# if !defined(CONFIG_TARGET_AM335X_EVM) || defined(CONFIG_SPL_OS_BOOT) # if !defined(CONFIG_TARGET_AM335X_EVM) || defined(CONFIG_SPL_OS_BOOT)
# define LOADENV # define LOADENV
@ -129,7 +129,7 @@ static int env_fat_load(void)
if (!strcmp(ifname, "mmc")) if (!strcmp(ifname, "mmc"))
mmc_initialize(NULL); mmc_initialize(NULL);
#endif #endif
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
#if defined(CONFIG_AHCI) || defined(CONFIG_SCSI) #if defined(CONFIG_AHCI) || defined(CONFIG_SCSI)
if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi")) if (!strcmp(CONFIG_ENV_FAT_INTERFACE, "scsi"))
scsi_scan(true); scsi_scan(true);

6
env/flash.c vendored
View file

@ -22,7 +22,7 @@
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
# if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_FLASH) # if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_FLASH)
# include <flash.h> # include <flash.h>
# define CMD_SAVEENV # define CMD_SAVEENV
@ -35,11 +35,11 @@ DECLARE_GLOBAL_DATA_PTR;
#if (!defined(CONFIG_MICROBLAZE) && !defined(CONFIG_ARCH_ZYNQ) && \ #if (!defined(CONFIG_MICROBLAZE) && !defined(CONFIG_ARCH_ZYNQ) && \
!defined(CONFIG_TARGET_MCCMON6) && !defined(CONFIG_TARGET_X600) && \ !defined(CONFIG_TARGET_MCCMON6) && !defined(CONFIG_TARGET_X600) && \
!defined(CONFIG_TARGET_EDMINIV2)) || \ !defined(CONFIG_TARGET_EDMINIV2)) || \
!defined(CONFIG_SPL_BUILD) !defined(CONFIG_XPL_BUILD)
#define LOADENV #define LOADENV
#endif #endif
#if !defined(CONFIG_TARGET_X600) || !defined(CONFIG_SPL_BUILD) #if !defined(CONFIG_TARGET_X600) || !defined(CONFIG_XPL_BUILD)
#define INITENV #define INITENV
#endif #endif

6
env/mmc.c vendored
View file

@ -239,7 +239,7 @@ static void fini_mmc_for_env(struct mmc *mmc)
mmc_set_env_part_restore(mmc); mmc_set_env_part_restore(mmc);
} }
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_XPL_BUILD)
static inline int write_env(struct mmc *mmc, unsigned long size, static inline int write_env(struct mmc *mmc, unsigned long size,
unsigned long offset, const void *buffer) unsigned long offset, const void *buffer)
{ {
@ -368,7 +368,7 @@ fini:
fini_mmc_for_env(mmc); fini_mmc_for_env(mmc);
return ret; return ret;
} }
#endif /* CONFIG_CMD_SAVEENV && !CONFIG_SPL_BUILD */ #endif /* CONFIG_CMD_SAVEENV && !CONFIG_XPL_BUILD */
static inline int read_env(struct mmc *mmc, unsigned long size, static inline int read_env(struct mmc *mmc, unsigned long size,
unsigned long offset, const void *buffer) unsigned long offset, const void *buffer)
@ -498,7 +498,7 @@ U_BOOT_ENV_LOCATION(mmc) = {
.location = ENVL_MMC, .location = ENVL_MMC,
ENV_NAME("MMC") ENV_NAME("MMC")
.load = env_mmc_load, .load = env_mmc_load,
#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_XPL_BUILD)
.save = env_save_ptr(env_mmc_save), .save = env_save_ptr(env_mmc_save),
.erase = ENV_ERASE_PTR(env_mmc_erase) .erase = ENV_ERASE_PTR(env_mmc_erase)
#endif #endif

8
env/nand.c vendored
View file

@ -26,9 +26,9 @@
#include <u-boot/crc.h> #include <u-boot/crc.h>
#if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \ #if defined(CONFIG_CMD_SAVEENV) && defined(CONFIG_CMD_NAND) && \
!defined(CONFIG_SPL_BUILD) !defined(CONFIG_XPL_BUILD)
#define CMD_SAVEENV #define CMD_SAVEENV
#elif defined(CONFIG_ENV_OFFSET_REDUND) && !defined(CONFIG_SPL_BUILD) #elif defined(CONFIG_ENV_OFFSET_REDUND) && !defined(CONFIG_XPL_BUILD)
#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND #error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND
#endif #endif
@ -224,7 +224,7 @@ static int env_nand_save(void)
} }
#endif /* CMD_SAVEENV */ #endif /* CMD_SAVEENV */
#if defined(CONFIG_SPL_BUILD) #if defined(CONFIG_XPL_BUILD)
static int readenv(size_t offset, u_char *buf) static int readenv(size_t offset, u_char *buf)
{ {
return nand_spl_load_image(offset, CONFIG_ENV_SIZE, buf); return nand_spl_load_image(offset, CONFIG_ENV_SIZE, buf);
@ -265,7 +265,7 @@ static int readenv(size_t offset, u_char *buf)
return 0; return 0;
} }
#endif /* #if defined(CONFIG_SPL_BUILD) */ #endif /* #if defined(CONFIG_XPL_BUILD) */
#ifdef CONFIG_ENV_OFFSET_OOB #ifdef CONFIG_ENV_OFFSET_OOB
int get_nand_env_oob(struct mtd_info *mtd, unsigned long *result) int get_nand_env_oob(struct mtd_info *mtd, unsigned long *result)

2
env/nowhere.c vendored
View file

@ -33,7 +33,7 @@ static int env_nowhere_load(void)
* searches default_environment array in that case. * searches default_environment array in that case.
* For U-Boot proper, import the default environment to allow reload. * For U-Boot proper, import the default environment to allow reload.
*/ */
if (!IS_ENABLED(CONFIG_SPL_BUILD)) if (!IS_ENABLED(CONFIG_XPL_BUILD))
env_set_default(NULL, 0); env_set_default(NULL, 0);
gd->env_valid = ENV_INVALID; gd->env_valid = ENV_INVALID;

2
env/sf.c vendored
View file

@ -329,7 +329,7 @@ done:
__weak void *env_sf_get_env_addr(void) __weak void *env_sf_get_env_addr(void)
{ {
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
return (void *)CONFIG_ENV_ADDR; return (void *)CONFIG_ENV_ADDR;
#else #else
return NULL; return NULL;

View file

@ -4,7 +4,7 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
# Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
obj-$(CONFIG_FS_LOADER) += fs.o obj-$(CONFIG_FS_LOADER) += fs.o
obj-$(CONFIG_SPL_FS_FAT) += fat/ obj-$(CONFIG_SPL_FS_FAT) += fat/
obj-$(CONFIG_SPL_FS_EXT4) += ext4/ obj-$(CONFIG_SPL_FS_EXT4) += ext4/

View file

@ -237,7 +237,7 @@ static struct fstype_info fstypes[] = {
.mkdir = fs_mkdir_unsupported, .mkdir = fs_mkdir_unsupported,
}, },
#endif #endif
#if IS_ENABLED(CONFIG_SANDBOX) && !IS_ENABLED(CONFIG_SPL_BUILD) #if IS_ENABLED(CONFIG_SANDBOX) && !IS_ENABLED(CONFIG_XPL_BUILD)
{ {
.fstype = FS_TYPE_SANDBOX, .fstype = FS_TYPE_SANDBOX,
.name = "sandbox", .name = "sandbox",
@ -275,7 +275,7 @@ static struct fstype_info fstypes[] = {
.ln = fs_ln_unsupported, .ln = fs_ln_unsupported,
}, },
#endif #endif
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
#ifdef CONFIG_CMD_UBIFS #ifdef CONFIG_CMD_UBIFS
{ {
.fstype = FS_TYPE_UBIFS, .fstype = FS_TYPE_UBIFS,
@ -296,7 +296,7 @@ static struct fstype_info fstypes[] = {
}, },
#endif #endif
#endif #endif
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
#ifdef CONFIG_FS_BTRFS #ifdef CONFIG_FS_BTRFS
{ {
.fstype = FS_TYPE_BTRFS, .fstype = FS_TYPE_BTRFS,

View file

@ -3,7 +3,7 @@
# (C) Copyright 2000-2006 # (C) Copyright 2000-2006
# Wolfgang Denk, DENX Software Engineering, wd@denx.de. # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
ifndef CONFIG_SPL_BUILD ifndef CONFIG_XPL_BUILD
obj-$(CONFIG_EFI) += efi/ obj-$(CONFIG_EFI) += efi/
obj-$(CONFIG_EFI_LOADER) += efi_driver/ obj-$(CONFIG_EFI_LOADER) += efi_driver/
@ -96,7 +96,7 @@ obj-$(CONFIG_LIBAVB) += libavb/
obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o
obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o
obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o
@ -131,7 +131,7 @@ obj-$(CONFIG_LIB_UUID) += uuid.o
obj-$(CONFIG_LIB_RAND) += rand.o obj-$(CONFIG_LIB_RAND) += rand.o
obj-y += panic.o obj-y += panic.o
ifeq ($(CONFIG_SPL_BUILD),y) ifeq ($(CONFIG_XPL_BUILD),y)
# SPL U-Boot may use full-printf, tiny-printf or none at all # SPL U-Boot may use full-printf, tiny-printf or none at all
ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF ifdef CONFIG_$(SPL_TPL_)USE_TINY_PRINTF
obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o obj-$(CONFIG_$(SPL_TPL_)SPRINTF) += tiny-printf.o

View file

@ -18,12 +18,12 @@ rsa_public_key-y := \
rsa_helper.o rsa_helper.o
$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h $(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
CFLAGS_rsapubkey.asn1.o += -I$(obj) CFLAGS_rsapubkey.asn1.o += -I$(obj)
endif endif
$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h $(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
CFLAGS_rsa_helper.o += -I$(obj) CFLAGS_rsa_helper.o += -I$(obj)
endif endif

View file

@ -236,7 +236,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
addr += thislinelen * width; addr += thislinelen * width;
count -= thislinelen; count -= thislinelen;
if (!IS_ENABLED(CONFIG_SPL_BUILD) && ctrlc()) if (!IS_ENABLED(CONFIG_XPL_BUILD) && ctrlc())
return -EINTR; return -EINTR;
} }

View file

@ -1230,7 +1230,7 @@ static void *fdt_find_separate(void)
if (IS_ENABLED(CONFIG_SANDBOX)) if (IS_ENABLED(CONFIG_SANDBOX))
return NULL; return NULL;
#ifdef CONFIG_SPL_BUILD #ifdef CONFIG_XPL_BUILD
/* FDT is at end of BSS unless it is in a different memory region */ /* FDT is at end of BSS unless it is in a different memory region */
if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS)) if (IS_ENABLED(CONFIG_SPL_SEPARATE_BSS))
fdt_blob = (ulong *)_image_binary_end; fdt_blob = (ulong *)_image_binary_end;
@ -1714,7 +1714,7 @@ int fdtdec_setup(void)
} }
/* Allow the early environment to override the fdt address */ /* Allow the early environment to override the fdt address */
if (!IS_ENABLED(CONFIG_SPL_BUILD)) { if (!IS_ENABLED(CONFIG_XPL_BUILD)) {
ulong addr; ulong addr;
addr = env_get_hex("fdtcontroladdr", 0); addr = env_get_hex("fdtcontroladdr", 0);

View file

@ -22,7 +22,7 @@
*/ */
void hang(void) void hang(void)
{ {
#if !defined(CONFIG_SPL_BUILD) || \ #if !defined(CONFIG_XPL_BUILD) || \
(CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \ (CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT) && \
CONFIG_IS_ENABLED(SERIAL)) CONFIG_IS_ENABLED(SERIAL))
puts("### ERROR ### Please RESET the board ###\n"); puts("### ERROR ### Please RESET the board ###\n");

View file

@ -221,7 +221,7 @@ static int
do_callback(const struct env_entry *e, const char *name, const char *value, do_callback(const struct env_entry *e, const char *name, const char *value,
enum env_op op, int flags) enum env_op op, int flags)
{ {
#ifndef CONFIG_SPL_BUILD #ifndef CONFIG_XPL_BUILD
if (e->callback) if (e->callback)
return e->callback(name, value, op, flags); return e->callback(name, value, op, flags);
#endif #endif
@ -487,7 +487,7 @@ int hdelete_r(const char *key, struct hsearch_data *htab, int flag)
return 0; return 0;
} }
#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) #if !(defined(CONFIG_XPL_BUILD) && !defined(CONFIG_SPL_SAVEENV))
/* /*
* hexport() * hexport()
*/ */

View file

@ -157,7 +157,7 @@ int print_hex_dump(const char *prefix_str, int prefix_type, int rowsize,
printf("%s%s\n", prefix_str, linebuf); printf("%s%s\n", prefix_str, linebuf);
break; break;
} }
if (!IS_ENABLED(CONFIG_SPL_BUILD) && ctrlc()) if (!IS_ENABLED(CONFIG_XPL_BUILD) && ctrlc())
return -EINTR; return -EINTR;
} }

View file

@ -477,7 +477,7 @@ void gen_rand_uuid_str(char *uuid_str, int str_format)
uuid_bin_to_str(uuid_bin, uuid_str, str_format); uuid_bin_to_str(uuid_bin, uuid_str, str_format);
} }
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CMD_UUID) #if !defined(CONFIG_XPL_BUILD) && defined(CONFIG_CMD_UUID)
int do_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) int do_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{ {
char uuid[UUID_STR_LEN + 1]; char uuid[UUID_STR_LEN + 1];

View file

@ -434,7 +434,7 @@ static u8 *add_vci(u8 *e)
char *vci = NULL; char *vci = NULL;
char *env_vci = env_get("bootp_vci"); char *env_vci = env_get("bootp_vci");
#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING) #if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_NET_VCI_STRING)
vci = CONFIG_SPL_NET_VCI_STRING; vci = CONFIG_SPL_NET_VCI_STRING;
#elif defined(CONFIG_BOOTP_VCI_STRING) #elif defined(CONFIG_BOOTP_VCI_STRING)
vci = CONFIG_BOOTP_VCI_STRING; vci = CONFIG_BOOTP_VCI_STRING;

View file

@ -305,7 +305,7 @@ U_BOOT_ENV_CALLBACK(dnsip, on_dnsip);
*/ */
void net_auto_load(void) void net_auto_load(void)
{ {
#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_CMD_NFS) && !defined(CONFIG_XPL_BUILD)
const char *s = env_get("autoload"); const char *s = env_get("autoload");
if (s != NULL && strcmp(s, "NFS") == 0) { if (s != NULL && strcmp(s, "NFS") == 0) {
@ -559,7 +559,7 @@ restart:
ping6_start(); ping6_start();
break; break;
#endif #endif
#if defined(CONFIG_CMD_NFS) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_CMD_NFS) && !defined(CONFIG_XPL_BUILD)
case NFS: case NFS:
nfs_start(); nfs_start();
break; break;
@ -574,7 +574,7 @@ restart:
cdp_start(); cdp_start();
break; break;
#endif #endif
#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
case NETCONS: case NETCONS:
nc_start(); nc_start();
break; break;
@ -1439,7 +1439,7 @@ void net_process_received_packet(uchar *in_packet, int len)
} }
} }
#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_SPL_BUILD) #if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_XPL_BUILD)
nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE, nc_input_packet((uchar *)ip + IP_UDP_HDR_SIZE,
src_ip, src_ip,
ntohs(ip->udp_dst), ntohs(ip->udp_dst),

View file

@ -324,7 +324,7 @@ endif
# do not delete intermediate files automatically # do not delete intermediate files automatically
.SECONDARY: .SECONDARY:
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
SPL_ := SPL_ SPL_ := SPL_
ifeq ($(CONFIG_VPL_BUILD),y) ifeq ($(CONFIG_VPL_BUILD),y)
SPL_TPL_ := VPL_ SPL_TPL_ := VPL_

View file

@ -55,7 +55,7 @@ endif
export SPL_NAME export SPL_NAME
ifdef CONFIG_SPL_BUILD ifdef CONFIG_XPL_BUILD
SPL_ := SPL_ SPL_ := SPL_
ifeq ($(CONFIG_VPL_BUILD),y) ifeq ($(CONFIG_VPL_BUILD),y)
SPL_TPL_ := VPL_ SPL_TPL_ := VPL_

View file

@ -25,7 +25,7 @@ obj-$(CONFIG_$(SPL_)CMDLINE) += str_ut.o
obj-$(CONFIG_UT_TIME) += time_ut.o obj-$(CONFIG_UT_TIME) += time_ut.o
obj-y += ut.o obj-y += ut.o
ifeq ($(CONFIG_SPL_BUILD),) ifeq ($(CONFIG_XPL_BUILD),)
obj-y += boot/ obj-y += boot/
obj-$(CONFIG_UNIT_TEST) += common/ obj-$(CONFIG_UNIT_TEST) += common/
obj-y += log/ obj-y += log/

View file

@ -256,7 +256,7 @@ U_BOOT_LONGHELP(ut,
"\ntime - very basic test of time functions" "\ntime - very basic test of time functions"
#endif #endif
#if defined(CONFIG_UT_UNICODE) && \ #if defined(CONFIG_UT_UNICODE) && \
!defined(CONFIG_SPL_BUILD) && !defined(API_BUILD) !defined(CONFIG_XPL_BUILD) && !defined(API_BUILD)
"\nunicode - Unicode functions" "\nunicode - Unicode functions"
#endif #endif
); );

View file

@ -7,7 +7,7 @@ obj-$(CONFIG_UT_DM) += test-dm.o
# Tests for particular subsystems - when enabling driver model for a new # Tests for particular subsystems - when enabling driver model for a new
# subsystem you must add sandbox tests here. # subsystem you must add sandbox tests here.
ifeq ($(CONFIG_SPL_BUILD),y) ifeq ($(CONFIG_XPL_BUILD),y)
obj-$(CONFIG_SPL_OF_PLATDATA) += of_platdata.o obj-$(CONFIG_SPL_OF_PLATDATA) += of_platdata.o
else else
obj-$(CONFIG_UT_DM) += bus.o obj-$(CONFIG_UT_DM) += bus.o

View file

@ -2,7 +2,7 @@
# #
# (C) Copyright 2018 # (C) Copyright 2018
# Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc # Mario Six, Guntermann & Drunck GmbH, mario.six@gdsys.cc
ifeq ($(CONFIG_SPL_BUILD),) ifeq ($(CONFIG_XPL_BUILD),)
obj-y += cmd_ut_lib.o obj-y += cmd_ut_lib.o
obj-y += abuf.o obj-y += abuf.o
obj-y += alist.o obj-y += alist.o

View file

@ -47,7 +47,7 @@ enum fdtchk_t {
static enum fdtchk_t fdt_action(void) static enum fdtchk_t fdt_action(void)
{ {
/* For sandbox SPL builds, do nothing */ /* For sandbox SPL builds, do nothing */
if (IS_ENABLED(CONFIG_SANDBOX) && IS_ENABLED(CONFIG_SPL_BUILD)) if (IS_ENABLED(CONFIG_SANDBOX) && IS_ENABLED(CONFIG_XPL_BUILD))
return FDTCHK_NONE; return FDTCHK_NONE;
/* Do a copy for sandbox (but only the U-Boot build, not SPL) */ /* Do a copy for sandbox (but only the U-Boot build, not SPL) */

View file

@ -1,3 +1,3 @@
#define CONFIG_BINMAN 1 #define CONFIG_BINMAN 1
#define CONFIG_SPL_BUILD 1 #define CONFIG_XPL_BUILD 1
#define CONFIG_SPL_BINMAN_SYMBOLS 1 #define CONFIG_SPL_BINMAN_SYMBOLS 1