mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 16:39:35 +00:00
fb4384490d
Move MTD-related lines out of the root Makefile. Put them in their respective directories. Enclose some of these new lines to skip them when building the SPL. MTD core files and some MTD device drivers are compiled in a mtd.o object and included in the final object only if MTD support is required (there are two different symbols for that, one for U-Boot and one for the SPL). Now that all defconfigs have been fixed, we can stop the logic where enabling a command selects the core files to compile. This logic is broken since selecting a symbol with a 'depends on' will not enforce this secondary dependency. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
43 lines
1.1 KiB
Makefile
43 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0+
|
|
#
|
|
# (C) Copyright 2000-2007
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
mtd-$(CONFIG_MTD) += mtdcore.o mtd_uboot.o
|
|
mtd-$(CONFIG_DM_MTD) += mtd-uclass.o
|
|
mtd-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
|
|
mtd-$(CONFIG_MTD_CONCAT) += mtdconcat.o
|
|
mtd-$(CONFIG_ALTERA_QSPI) += altera_qspi.o
|
|
mtd-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
|
|
mtd-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o
|
|
mtd-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
|
|
mtd-$(CONFIG_MW_EEPROM) += mw_eeprom.o
|
|
mtd-$(CONFIG_FLASH_PIC32) += pic32_flash.o
|
|
mtd-$(CONFIG_ST_SMI) += st_smi.o
|
|
mtd-$(CONFIG_STM32_FLASH) += stm32_flash.o
|
|
mtd-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o
|
|
mtd-$(CONFIG_HBMC_AM654) += hbmc-am654.o
|
|
|
|
# U-Boot build
|
|
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
|
|
|
|
ifneq ($(mtd-y),)
|
|
obj-y += mtd.o
|
|
endif
|
|
obj-y += nand/
|
|
obj-y += onenand/
|
|
obj-y += spi/
|
|
obj-$(CONFIG_MTD_UBI) += ubi/
|
|
|
|
#SPL/TPL build
|
|
else
|
|
|
|
ifneq ($(mtd-y),)
|
|
obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd.o
|
|
endif
|
|
obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += nand/
|
|
obj-$(CONFIG_SPL_ONENAND_SUPPORT) += onenand/
|
|
obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += spi/
|
|
obj-$(CONFIG_SPL_UBI) += ubispl/
|
|
|
|
endif
|