MTD defconfigs/Kconfigs/Makefiles heavy cleanup
Get series with b4
b4 am 20191205025050.GI9549@bill-the-catVersions newest first · linked by author and title
- v5 Latest posting 3/323 of 26 patches 0 repliesNew
- v5 posting 2/31 of 26 patches 0 repliesSuperseded
- v5 posting 1/30 of 26 patches 0 repliesSuperseded
23 of 26 patches are in this archive. The cover letter announces 26.
Patches in v5 posting 3/3 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [U-Boot] [PATCH v5 00/26]MTD defconfigs/Kconfigs/Makefiles heavy cleanup
Quoted 113 lines · Miquel Raynal
Hello,
A year ago, while working on SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the rootMakefile
* Commands are at the root of everythingFirst I sent a series to move
Makefileentries in their respective directories. Then, I decided to continue working on the clarification of theMakefilehierarchy in MTD and I sent four iterations of this series which did not got merge at that time. Anyway, I revived this series by rebasing all my work and updating everything that needed an update.Here are the main points of the re-organization:
* RenameCONFIG_MTDintoCONFIG_DM_MTDto reserveCONFIG_MTDto what is called todayCONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix theKconfigfiles to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling thedrivers/mtd/nand/raw/sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend onCMD_NAND.The New green Travis CI build for the fifth version of this series is there (yes, 53 iterations):
Please note that the only red test fails because of timeout, not an actual error (at least I could not spot it). It is possible that this series will produce noticeable changes for the users. The only reason for that is because their configuration file was wrong. I have done my best to fix them one by one, but I am not omniscient.
Thanks,
MiquèlNote: as the number of Cc:'ed people reached 184 with get_maintainers.pl I decided to trim the list to:
* People interested by the MTD subsystem.
* A few maintainers: I had to tweak some defconfigs after more digging than with other boards (k2g, bcm11130, M54418TWR, ls104/108/208). Maintainers of these platforms are Cc:'ed.Changes since v4:
=================
* Rebased on top of v2019.10-rc4.
* Fixed tens of configurations that got broken since the last version of this series several months ago.
* Added a specific commit for ls104/108/208 configurations.Changes since v3:
=================
* As suggested by Vignesh,SPI_FLASH_MTDdepends on MTD. Enforce this inKconfigwith a new patch. There is no defconfig to fix, all defconfigs withSPI_FLASH_MTDalready use MTD.
* s/coherent Makefile/appropriate Makefile/ in commit title of patch 1.
* s/Kconfig/Makefile in commit message of "mtd: nand: remove dependency on commands inKconfig" and "mtd: ubi: remove dependency on command inKconfig".
* Add Boris R-b tags.
* Correct typos pointed by Boris.
* Remove the if/endif in cmd/Kconfig about mtdparts, let the "depends on" that was already present.
* Use an if/endif block to compilelegacy-mtd-utils.c(to avoid failures when both 'sf' and 'nand' commands are compiled-in).
* Merge allMakefilechanges in one consistent commit as suggested by Boris.Changes since v2:
=================
* Cleanup also applied to the SPL in an additional patch.
* NOR dependency on MTD extracted from the patch adding MTD dependencies on commands only to do it in a separate change.
* Typo s/copile/compile/ in "renameCONFIG_MTD_DEVICE..." commit log.
* No more MTD depencency onSPI_FLASH, only kept onSPI_FLASH_MTD.
* Same applies to the sf command.
* Avoid compiling the NAND core while it is not needed (not speaking about the raw NAND core, really what is indrivers/mtd/nand:).
* Last patch droppingCONFIG_MTD_PARTITIONSforgotten. We need them in order to reduce the final binary size.
* Additional fixes in cmd/Kconfig.Changes since v1:
=================
* Squashed both patches from the first series and included them in "mtd: simplify Makefiles".
* Added all other patches.
* RenamedCONFIG_NANDintoCONFIG_MTD_RAW_NANDas suggested.Miquel Raynal (26):
mtd: renameCONFIG_NAND->CONFIG_MTD_RAW_NAND
mtd: renameCONFIG_MTD->CONFIG_DM_MTD
mtd: renameCONFIG_MTD_DEVICE->CONFIG_MTD
mtd: ensure MTD is compiled when there is a NOR flash
mtd: ensure MTD/the raw NAND core are compiled when there is a NAND
flash
mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
mtd: ensure UBI is compiled when using fastmap
mtd: ensure MTD is compiled when UBI is used
mtd: ensure UBI is compiled whenCMD_UBIis selected
mtd: ensure UBI is compiled whenENV_IS_IN_UBIis selected
mtd: ensureMTD_RAW_NANDis compiled whenENV_IS_IN_NANDis selected
mtd: ensureCMD_NANDis compiled when its options are selected
mtd: ensure MTD is compiled whenCMD_MTDPARTSis selected
configs: moveCONFIG_MTDin defconfigs when set in arch includes
configs: remove raw NAND core from k2g defconfigs
configs: remove MTD support from bcm11130 and M54418TWR defconfigs
configs: socfpga: mcvevk: Remove useless UBI infos
configs: ls104x/ls108x/ls208x: Build the raw NAND core with TFABOOT
Quoted 8 lines
mtd: nand: add includes in NAND core to avoid warnings
dfu: add dependency on the raw NAND core
mtd: nor: NOR flashes depend on MTD
mtd: spi:SPI_FLASH_MTDdepends on MTD
cmd: mtdparts:Kconfig: join mtdparts command entry with its options
cmd: nand/sf: isolate legacy code
cmd: make MTD commands depend on MTD
mtd:Makefile: deep cleanup
So, a feature of this series is that it exposes a problem of the following PowerPC configurations:
P1022DS P1022DS_SDCARD P1022DS_SPIFLASH P1022DS_36BIT_SPIFLASH P1022DS_36BIT P1022DS_36BIT_SDCARD T4240QDS_SRIO_PCIE_BOOT T4240QDS_SDCARD T4160QDS_SECURE_BOOT T4160QDS T4240QDS T4160QDS_SDCARD T4240QDS_SECURE_BOOT B4860QDS_SECURE_BOOT T4160RDB B4420QDS B4860QDS B4860QDS_SRIO_PCIE_BOOT B4860QDS_SPIFLASH B4420QDS_SPIFLASH T4240RDB_SDCARD T4240RDB P1025RDB_SPIFLASH P1025RDB_SDCARD P1024RDB_SPIFLASH P1025RDB P1024RDB_SDCARD P1024RDB P1024RDB_36BIT P1025RDB_36BIT P5020DS_SECURE_BOOT P3041DS_SRIO_PCIE_BOOT P3041DS_SECURE_BOOT P5020DS_SDCARD P5020DS P5020DS_SRIO_PCIE_BOOT P5020DS_SPIFLASH P5040DS_SECURE_BOOT P2041RDB_SECURE_BOOT P2041RDB_SRIO_PCIE_BOOT P1021RDB-PC_SPIFLASH P1021RDB-PC P1021RDB-PC_SDCARD P1021RDB-PC_36BIT_SPIFLASH P1021RDB-PC_36BIT_SDCARD P1021RDB-PC_36BIT P1020RDB-PC_SDCARD P1020RDB-PC_SPIFLASH P1020RDB-PC P1020RDB-PC_36BIT_SPIFLASH P1020RDB-PC_36BIT_SDCARD P1020RDB-PC_36BIT P5040DS_SDCARD P3041DS_SPIFLASH P3041DS_SDCARD P5040DS P5040DS_SPIFLASH P2041RDB P2041RDB_SDCARD P2041RDB_SPIFLASH P3041DS P1020RDB-PD_SDCARD P2020RDB-PC_SPIFLASH P1020RDB-PD P2020RDB-PC P2020RDB-PC_SDCARD P1020RDB-PD_SPIFLASH P2020RDB-PC_36BIT P2020RDB-PC_36BIT_SPIFLASH P2020RDB-PC_36BIT_SDCARD C29XPCIE_NOR_SECBOOT C29XPCIE_SPIFLASH C29XPCIE_SPIFLASH_SECBOOT C29XPCIE BSC9132QDS_SDCARD_DDRCLK133_SECURE BSC9132QDS_NOR_DDRCLK133_SECURE BSC9132QDS_SDCARD_DDRCLK100_SECURE BSC9132QDS_NOR_DDRCLK100_SECURE BSC9132QDS_SPIFLASH_DDRCLK133_SECURE BSC9132QDS_SPIFLASH_DDRCLK100_SECURE BSC9132QDS_NOR_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK133 BSC9132QDS_NAND_DDRCLK133_SECURE BSC9132QDS_NOR_DDRCLK133 BSC9132QDS_SDCARD_DDRCLK100 BSC9132QDS_SPIFLASH_DDRCLK100 BSC9132QDS_NAND_DDRCLK100_SECURE BSC9132QDS_SDCARD_DDRCLK133 P1010RDB-PA_SPIFLASH_SECBOOT P1010RDB-PA_NAND_SECBOOT P1010RDB-PA_SPIFLASH P1010RDB-PA_NOR P1010RDB-PA_SDCARD BSC9131RDB_SPIFLASH_SYSCLK100 BSC9131RDB_SPIFLASH P1010RDB-PA_36BIT_SPIFLASH P1010RDB-PA_36BIT_NOR_SECBOOT P1010RDB-PA_36BIT_NOR_SECBOOT P1010RDB-PA_36BIT_SPIFLASH_SECBOOT P1010RDB-PA_36BIT_SDCARD P1010RDB-PA_36BIT_NAND_SECBOOT T2081QDS_SRIO_PCIE_BOOT T2080RDB_SRIO_PCIE_BOOT T1024QDS_DDR4 T2081QDS T1042RDB T1040RDB_SDCARD T1040RDB T2081QDS_SPIFLASH T1042RDB_PI_SDCARD T1042D4RDB_SECURE_BOOT T1023RDB_SECURE_BOOT T1023RDB T1040RDB_SPIFLASH T1040D4RDB_SDCARD T1023RDB_SDCARD T1042RDB_PI T1040D4RDB T2081QDS_SDCARD T2080RDB_SECURE_BOOT T1042RDB_PI_SPIFLASH T1023RDB_SPIFLASH T1040D4RDB_SPIFLASH T1040QDS_SECURE_BOOT T1040QDS T1024QDS_DDR4_SECURE_BOOT T1040QDS_DDR4 T1024QDS_SDCARD T1024QDS T1024QDS_SECURE_BOOT T1024RDB_SECURE_BOOT T1040D4RDB_SECURE_BOOT T1040RDB_SECURE_BOOT T1042RDB_SECURE_BOOT T1024QDS_SPIFLASH T2080QDS_SRIO_PCIE_BOOT P1010RDB-PB_SPIFLASH_SECBOOT P1010RDB-PB_NOR_SECBOOT P1010RDB-PB_SDCARD P1010RDB-PB_NAND_SECBOOT P1010RDB-PB_SPIFLASH P1010RDB-PB_NOR P1010RDB-PB_36BIT_NOR P1010RDB-PB_36BIT_NAND_SECBOOT P1010RDB-PB_36BIT_SPIFLASH_SECBOOT P1010RDB-PB_36BIT_SDCARD P1010RDB-PB_36BIT_NOR_SECBOOT P1010RDB-PB_36BIT_SPIFLASH T2080QDS_SECURE_BOOT T1042D4RDB T1042D4RDB_SDCARD T2080RDB_SDCARD T2080RDB T1042D4RDB_SPIFLASH T2080RDB_SPIFLASH T1024RDB_SDCARD T1024RDB T1024RDB_SPIFLASH T2080QDS_SDCARD T2080QDS_SPIFLASH T2080QDS P1010RDB-PA_NOR_SECBOOT
And that is that before this series they do not fully enable NAND support normally but do enable it partially and do enable CMD_NAND. After this series they do not enable CMD_NAND. This is because if I do enable CMD_NAND instead we see a large number of other changes wrt things such as CONFIG_SYS_AMASK0/CONFIG_SYS_AMASK1 and change those configs from pointing at NOR to pointing at NAND and that seems the larger functional regression over removing the nand command. If the NAND command really should be on in these boards then we do need to figure out or otherwise rework the config files such that the rest of the board functions the intended way still.
Also note that while there are a few *_NAND_* configs in that list, investigation of the u-boot.cfg files shows that enabling CONFIG_MTD_RAW_NAND (formerly CONFIG_NAND) leads to the other functional changes noted above. My assumption currently is that those *_NAND_* boards above have a latent bug that is now exposed.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191204/9c8cc262/attachment.sig>