Use separate options for TPL support
At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
218d0d5b9b
commit
76f1f38816
|
@ -99,10 +99,16 @@ obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
|
|||
obj-$(CONFIG_USB_STORAGE) += usb_storage.o
|
||||
endif
|
||||
# environment
|
||||
ifdef CONFIG_SPL_ENV_SUPPORT
|
||||
ifdef CONFIG_TPL_BUILD
|
||||
obj-$(CONFIG_TPL_ENV_SUPPORT) += env_attr.o
|
||||
obj-$(CONFIG_TPL_ENV_SUPPORT) += env_flags.o
|
||||
obj-$(CONFIG_TPL_ENV_SUPPORT) += env_callback.o
|
||||
else
|
||||
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o
|
||||
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
|
||||
obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
|
||||
endif
|
||||
ifneq ($(CONFIG_TPL_ENV_SUPPORT)$(CONFIG_SPL_ENV_SUPPORT),)
|
||||
obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
|
||||
obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
|
||||
obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
|
||||
|
@ -123,7 +129,11 @@ obj-$(CONFIG_SPD_EEPROM) += ddr_spd.o
|
|||
obj-$(CONFIG_HWCONFIG) += hwconfig.o
|
||||
obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
ifdef CONFIG_TPL_BUILD
|
||||
obj-$(CONFIG_TPL_SERIAL_SUPPORT) += console.o
|
||||
else
|
||||
obj-$(CONFIG_SPL_SERIAL_SUPPORT) += console.o
|
||||
endif
|
||||
else
|
||||
obj-y += console.o
|
||||
endif
|
||||
|
|
|
@ -40,8 +40,22 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
|
|||
obj-$(CONFIG_SPL_SATA_SUPPORT) += block/
|
||||
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
|
||||
obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
|
||||
endif
|
||||
|
||||
else
|
||||
ifdef CONFIG_TPL_BUILD
|
||||
|
||||
obj-$(CONFIG_TPL_I2C_SUPPORT) += i2c/
|
||||
obj-$(CONFIG_TPL_DRIVERS_MISC_SUPPORT) += misc/ sysreset/
|
||||
obj-$(CONFIG_TPL_MMC_SUPPORT) += mmc/
|
||||
obj-$(CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/fsl/
|
||||
obj-$(CONFIG_TPL_NAND_SUPPORT) += mtd/nand/
|
||||
obj-$(CONFIG_TPL_SERIAL_SUPPORT) += serial/
|
||||
obj-$(CONFIG_TPL_SPI_FLASH_SUPPORT) += mtd/spi/
|
||||
obj-$(CONFIG_TPL_SPI_SUPPORT) += spi/
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
|
||||
|
||||
obj-y += adc/
|
||||
obj-$(CONFIG_DM_DEMO) += demo/
|
||||
|
|
|
@ -866,17 +866,20 @@ int getc(void);
|
|||
int tstc(void);
|
||||
|
||||
/* stdout */
|
||||
#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SERIAL_SUPPORT)
|
||||
#define putc(...) do { } while (0)
|
||||
#define puts(...) do { } while (0)
|
||||
#define printf(...) do { } while (0)
|
||||
#define vprintf(...) do { } while (0)
|
||||
#else
|
||||
#if !defined(CONFIG_SPL_BUILD) || \
|
||||
(defined(CONFIG_TPL_BUILD) && defined(CONFIG_TPL_SERIAL_SUPPORT)) || \
|
||||
(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) && \
|
||||
defined(CONFIG_SPL_SERIAL_SUPPORT))
|
||||
void putc(const char c);
|
||||
void puts(const char *s);
|
||||
int printf(const char *fmt, ...)
|
||||
__attribute__ ((format (__printf__, 1, 2)));
|
||||
int vprintf(const char *fmt, va_list args);
|
||||
#else
|
||||
#define putc(...) do { } while (0)
|
||||
#define puts(...) do { } while (0)
|
||||
#define printf(...) do { } while (0)
|
||||
#define vprintf(...) do { } while (0)
|
||||
#endif
|
||||
|
||||
/* stderr */
|
||||
|
|
|
@ -27,15 +27,15 @@
|
|||
#ifdef CONFIG_TPL_BUILD
|
||||
#define CONFIG_SPL_NAND_BOOT
|
||||
#define CONFIG_SPL_FLUSH_IMAGE
|
||||
#define CONFIG_SPL_ENV_SUPPORT
|
||||
#define CONFIG_TPL_ENV_SUPPORT
|
||||
#define CONFIG_SPL_NAND_INIT
|
||||
#define CONFIG_SPL_SERIAL_SUPPORT
|
||||
#define CONFIG_SPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_SPL_I2C_SUPPORT
|
||||
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
|
||||
#define CONFIG_SPL_NAND_SUPPORT
|
||||
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_TPL_SERIAL_SUPPORT
|
||||
#define CONFIG_TPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_TPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_TPL_I2C_SUPPORT
|
||||
#define CONFIG_TPL_DRIVERS_MISC_SUPPORT
|
||||
#define CONFIG_TPL_NAND_SUPPORT
|
||||
#define CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_SPL_COMMON_INIT_DDR
|
||||
#define CONFIG_SPL_MAX_SIZE (128 << 10)
|
||||
#define CONFIG_SPL_TEXT_BASE 0xf8f81000
|
||||
|
|
|
@ -106,15 +106,15 @@
|
|||
#ifdef CONFIG_TPL_BUILD
|
||||
#define CONFIG_SPL_NAND_BOOT
|
||||
#define CONFIG_SPL_FLUSH_IMAGE
|
||||
#define CONFIG_SPL_ENV_SUPPORT
|
||||
#define CONFIG_TPL_ENV_SUPPORT
|
||||
#define CONFIG_SPL_NAND_INIT
|
||||
#define CONFIG_SPL_SERIAL_SUPPORT
|
||||
#define CONFIG_SPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_SPL_I2C_SUPPORT
|
||||
#define CONFIG_SPL_NAND_SUPPORT
|
||||
#define CONFIG_TPL_SERIAL_SUPPORT
|
||||
#define CONFIG_TPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_TPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_TPL_I2C_SUPPORT
|
||||
#define CONFIG_TPL_NAND_SUPPORT
|
||||
#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
|
||||
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_SPL_COMMON_INIT_DDR
|
||||
#define CONFIG_SPL_MAX_SIZE (128 << 10)
|
||||
#define CONFIG_SPL_TEXT_BASE 0xD0001000
|
||||
|
|
|
@ -78,14 +78,14 @@
|
|||
#ifdef CONFIG_TPL_BUILD
|
||||
#define CONFIG_SPL_NAND_BOOT
|
||||
#define CONFIG_SPL_FLUSH_IMAGE
|
||||
#define CONFIG_SPL_ENV_SUPPORT
|
||||
#define CONFIG_TPL_ENV_SUPPORT
|
||||
#define CONFIG_SPL_NAND_INIT
|
||||
#define CONFIG_SPL_SERIAL_SUPPORT
|
||||
#define CONFIG_SPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_SPL_I2C_SUPPORT
|
||||
#define CONFIG_SPL_NAND_SUPPORT
|
||||
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_TPL_SERIAL_SUPPORT
|
||||
#define CONFIG_TPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_TPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_TPL_I2C_SUPPORT
|
||||
#define CONFIG_TPL_NAND_SUPPORT
|
||||
#define CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_SPL_COMMON_INIT_DDR
|
||||
#define CONFIG_SPL_MAX_SIZE (128 << 10)
|
||||
#define CONFIG_SPL_TEXT_BASE 0xf8f81000
|
||||
|
|
|
@ -241,14 +241,14 @@
|
|||
#ifdef CONFIG_TPL_BUILD
|
||||
#define CONFIG_SPL_NAND_BOOT
|
||||
#define CONFIG_SPL_FLUSH_IMAGE
|
||||
#define CONFIG_SPL_ENV_SUPPORT
|
||||
#define CONFIG_TPL_ENV_SUPPORT
|
||||
#define CONFIG_SPL_NAND_INIT
|
||||
#define CONFIG_SPL_SERIAL_SUPPORT
|
||||
#define CONFIG_SPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_SPL_I2C_SUPPORT
|
||||
#define CONFIG_SPL_NAND_SUPPORT
|
||||
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_TPL_SERIAL_SUPPORT
|
||||
#define CONFIG_TPL_LIBGENERIC_SUPPORT
|
||||
#define CONFIG_TPL_LIBCOMMON_SUPPORT
|
||||
#define CONFIG_TPL_I2C_SUPPORT
|
||||
#define CONFIG_TPL_NAND_SUPPORT
|
||||
#define CONFIG_TPL_MPC8XXX_INIT_DDR_SUPPORT
|
||||
#define CONFIG_SPL_COMMON_INIT_DDR
|
||||
#define CONFIG_SPL_MAX_SIZE (128 << 10)
|
||||
#define CONFIG_SPL_TEXT_BASE 0xf8f81000
|
||||
|
|
|
@ -78,11 +78,16 @@ obj-$(CONFIG_LIB_UUID) += uuid.o
|
|||
obj-$(CONFIG_LIB_RAND) += rand.o
|
||||
|
||||
ifdef CONFIG_SPL_BUILD
|
||||
ifdef CONFIG_TPL_BUILD
|
||||
SERIAL_SUPPORT := $(CONFIG_TPL_SERIAL_SUPPORT)
|
||||
else
|
||||
SERIAL_SUPPORT := $(CONFIG_SPL_SERIAL_SUPPORT)
|
||||
endif
|
||||
# SPL U-Boot may use full-printf, tiny-printf or none at all
|
||||
ifdef CONFIG_USE_TINY_PRINTF
|
||||
obj-$(CONFIG_SPL_SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o
|
||||
obj-$(SERIAL_SUPPORT) += tiny-printf.o panic.o strto.o
|
||||
else
|
||||
obj-$(CONFIG_SPL_SERIAL_SUPPORT) += vsprintf.o panic.o strto.o strmhz.o
|
||||
obj-$(SERIAL_SUPPORT) += vsprintf.o panic.o strto.o strmhz.o
|
||||
endif
|
||||
else
|
||||
# Main U-Boot always uses the full printf support
|
||||
|
|
|
@ -54,12 +54,20 @@ libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
|
|||
|
||||
libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/
|
||||
libs-y += common/init/
|
||||
|
||||
# Special handling for a few options which support SPL/TPL
|
||||
ifeq ($(CONFIG_TPL_BUILD),y)
|
||||
libs-$(CONFIG_TPL_LIBCOMMON_SUPPORT) += common/ cmd/
|
||||
libs-$(CONFIG_TPL_LIBGENERIC_SUPPORT) += lib/
|
||||
else
|
||||
libs-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ cmd/
|
||||
libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
|
||||
endif
|
||||
|
||||
libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
|
||||
libs-y += drivers/
|
||||
libs-y += dts/
|
||||
libs-y += fs/
|
||||
libs-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
|
||||
libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
|
||||
libs-$(CONFIG_SPL_NET_SUPPORT) += net/
|
||||
|
||||
|
|
Loading…
Reference in New Issue