From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 01/24] Makefile: move MTD-related lines in coherent Makefiles
Date: Thu, 29 Nov 2018 10:16:50 +0100 [thread overview]
Message-ID: <20181129101650.4a44d06a@xps13> (raw)
In-Reply-To: <20181129004623.084c2d50@bbrezillon>
Hi Boris,
Boris Brezillon <boris.brezillon@bootlin.com> wrote on Thu, 29 Nov 2018
00:46:23 +0100:
> On Thu, 29 Nov 2018 00:07:37 +0100
> Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
>
> > --- a/drivers/Makefile
> > +++ b/drivers/Makefile
> > @@ -6,7 +6,7 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/
> > obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/
> > obj-$(CONFIG_$(SPL_TPL_)LED) += led/
> > obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/
> > -obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/raw/
> > +obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/
>
> Can't we have
> += mtd/
>
> instead?
You are right the SPL Makefile lines needs to be improved as well. I
propose the following diff for that.
Thanks,
Miquèl
---
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -6,12 +6,11 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/
obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/
obj-$(CONFIG_$(SPL_TPL_)LED) += led/
obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/
-obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/
+obj-y += mtd/
obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/
obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/
obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/
obj-$(CONFIG_$(SPL_TPL_)SERIAL_SUPPORT) += serial/
-obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += mtd/spi/
obj-$(CONFIG_$(SPL_TPL_)SPI_SUPPORT) += spi/
obj-$(CONFIG_$(SPL_TPL_)TIMER) += timer/
obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/
@@ -33,9 +32,6 @@ obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/
obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/
obj-$(CONFIG_SPL_POWER_DOMAIN) += power/domain/
obj-$(CONFIG_SPL_DM_RESET) += reset/
-obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/
-obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/
-obj-$(CONFIG_SPL_UBI) += mtd/ubispl/
obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/
obj-$(CONFIG_SPL_ETH_SUPPORT) += net/
obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 7574084f36..5e2caa9e46 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -3,23 +3,29 @@
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
-obj-$(CONFIG_MTD) += mtdcore.o mtdpart.o mtd_uboot.o
-obj-$(CONFIG_DM_MTD) += mtd-uclass.o
-obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
-obj-$(CONFIG_ALTERA_QSPI) += altera_qspi.o
-obj-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
-obj-$(CONFIG_FLASH_CFI_MTD) += cfi_mtd.o
-obj-$(CONFIG_FLASH_CFI_LEGACY) += jedec_flash.o
-obj-$(CONFIG_MW_EEPROM) += mw_eeprom.o
-obj-$(CONFIG_FLASH_PIC32) += pic32_flash.o
-obj-$(CONFIG_ST_SMI) += st_smi.o
-obj-$(CONFIG_STM32_FLASH) += stm32_flash.o
-obj-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o
+mtd-$(CONFIG_MTD) += mtdcore.o mtdpart.o mtd_uboot.o
+mtd-$(CONFIG_DM_MTD) += mtd-uclass.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
-# SPL will manually build the files it needs
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
+obj-y += mtd.o
obj-y += nand/
obj-y += onenand/
obj-y += spi/
obj-$(CONFIG_MTD_UBI) += ubi/
+else
+obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd.o
+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
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index e5849dc02a..96e186600a 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -1,6 +1,10 @@
# SPDX-License-Identifier: GPL-2.0+
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
nandcore-objs := core.o bbt.o
obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
obj-$(CONFIG_MTD_RAW_NAND) += raw/
obj-$(CONFIG_MTD_SPI_NAND) += spi/
+else
+obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += raw/
+endif
next prev parent reply other threads:[~2018-11-29 9:16 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 23:07 [U-Boot] [PATCH v2 00/24] MTD defconfigs/Kconfigs/Makefiles heavy cleanup Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 01/24] Makefile: move MTD-related lines in coherent Makefiles Miquel Raynal
2018-11-28 23:46 ` Boris Brezillon
2018-11-29 7:57 ` Miquel Raynal
2018-11-29 9:16 ` Miquel Raynal [this message]
2018-11-29 9:21 ` Boris Brezillon
2018-11-28 23:07 ` [U-Boot] [PATCH v2 02/24] mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 03/24] mtd: rename CONFIG_MTD -> CONFIG_DM_MTD Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 04/24] mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD Miquel Raynal
2018-11-28 23:49 ` Boris Brezillon
2018-11-28 23:07 ` [U-Boot] [PATCH v2 05/24] mtd: ensure MTD is compiled when there is a NOR flash Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 06/24] mtd: ensure MTD/the raw NAND core are compiled when there is a NAND flash Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 07/24] mtd: ensure MTD is compiled when there is a SPI NOR flash Miquel Raynal
2018-11-28 23:52 ` Boris Brezillon
2018-11-29 8:06 ` Miquel Raynal
2018-12-04 14:35 ` Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 08/24] mtd: ensure UBI is compiled when using fastmap Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 09/24] mtd: ensure MTD is compiled when UBI is used Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 10/24] mtd: ensure UBI is compiled when CMD_UBI is selected Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 11/24] mtd: ensure UBI is compiled when ENV_IS_IN_UBI " Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 12/24] mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND " Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 13/24] mtd: ensure MTD is compiled when ENV_IS_IN_FLASH " Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 14/24] mtd: ensure CMD_NAND is compiled when its options are selected Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 15/24] configs: remove raw NAND core from k2g defconfigs Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 16/24] configs: remove MTD support from bcm11130 and M54418TWR defconfigs Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 17/24] mtd: nand: add includes in NAND core to avoid warnings Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 18/24] mtd: rawnand: compile-in the NAND core Miquel Raynal
2018-11-28 23:57 ` Boris Brezillon
2018-12-04 14:33 ` Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 19/24] dfu: add dependency on " Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 20/24] mtd: nand: remove dependency on commands in Kconfig Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 21/24] mtd: ubi: remove dependency on command " Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 22/24] cmd: make all MTD commands depend on MTD Miquel Raynal
2018-11-28 23:59 ` Boris Brezillon
2018-12-04 14:34 ` Miquel Raynal
2018-11-28 23:07 ` [U-Boot] [PATCH v2 23/24] mtd: simplify Makefile Miquel Raynal
2018-11-28 23:08 ` [U-Boot] [PATCH v2 24/24] mtd: drop CONFIG_MTD_PARTITIONS Miquel Raynal
2018-11-29 0:05 ` Boris Brezillon
2018-12-04 14:49 ` Miquel Raynal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181129101650.4a44d06a@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox