[U-Boot] [PATCH 2/2] Makefile: move MTD-related lines in coherent Makefiles

Miquel Raynal miquel.raynal at bootlin.com
Sun Nov 18 20:07:32 UTC 2018


A move has been started to move Makefile definitions out of the main
root file and instead move these lines in their respective
directory. This change does not change any logic already in place, it
just moves lines to make the reading easier.

Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
---
 Makefile                  | 5 -----
 drivers/Makefile          | 1 +
 drivers/mtd/Makefile      | 3 +++
 drivers/mtd/nand/Makefile | 4 +++-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 552687db53..435d0257dd 100644
--- a/Makefile
+++ b/Makefile
@@ -688,11 +688,6 @@ libs-y += drivers/
 libs-y += drivers/dma/
 libs-y += drivers/gpio/
 libs-y += drivers/i2c/
-libs-y += drivers/mtd/
-libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/raw/
-libs-y += drivers/mtd/onenand/
-libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/
-libs-y += drivers/mtd/spi/
 libs-y += drivers/net/
 libs-y += drivers/net/phy/
 libs-y += drivers/pci/
diff --git a/drivers/Makefile b/drivers/Makefile
index 4453c62ad3..e407c529c4 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -99,6 +99,7 @@ obj-$(CONFIG_QE) += qe/
 obj-$(CONFIG_U_QE) += qe/
 obj-y += mailbox/
 obj-y += memory/
+obj-y += mtd/
 obj-y += pwm/
 obj-y += reset/
 obj-y += input/
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 22ceda93c0..f51ec473ea 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -20,3 +20,6 @@ obj-$(CONFIG_STM32_FLASH) += stm32_flash.o
 obj-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o
 
 obj-y += nand/
+obj-y += onenand/
+obj-y += spi/
+obj-$(CONFIG_CMD_UBI) += ubi/
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 2c33447995..99ca69ef95 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -2,5 +2,7 @@
 
 nandcore-objs := core.o bbt.o
 obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
-obj-$(CONFIG_NAND) += raw/
+ifneq (,$(findstring y,$(CONFIG_CMD_NAND)$(CONFIG_CMD_MTD)))
+obj-y += raw/
+endif
 obj-$(CONFIG_MTD_SPI_NAND) += spi/
-- 
2.17.1



More information about the U-Boot mailing list