public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v7 00/13] Cleaner MTD devices management
@ 2018-08-31 14:57 Miquel Raynal
  2018-08-31 14:57 ` [U-Boot] [PATCH v7 01/13] lib: strto: parse all lowercase metric prefixes in ustrtoul[l] Miquel Raynal
                   ` (12 more replies)
  0 siblings, 13 replies; 36+ messages in thread
From: Miquel Raynal @ 2018-08-31 14:57 UTC (permalink / raw)
  To: u-boot

The introduction of the SPI-NAND framework and, more widely, the
support of non parallel-NOR, parallel-NAND and SPI-NOR has shown that
extending U-Boot MTD devices/partitions handling was not
straightforward at all. While this first series [1] is a great step
forward, it is not actually usable due to purely software
limitations.

This series intends to:
* Do some cleanup in the MTD layer
* Add a new 'mtd' command that should replace in the future all the
  MTD-specific commands like 'nand' and 'sf'.
* Make deep changes in the partition handling by introducing a new way
  of managing MTD partitions (that soon will be also sent to the Linux
  kernel), and adding a generic 'mtdparts' environment variable parser
  in prevision of the 'mtdparts' command removal.
* The UBI command is also updated to stop messing with partitions that
  should just be declared in the 'mtdparts' variable.

People can now do the following without 'mtdids':
# setenv mtdparts "nor0=1m(some),-(more);spi-nand0=-(all)"

Partitions are visible with:
# mtd list

And UBI support is available with (for the above example):
# ubi part all

At least these two missing features will be added with further changes:
* 'mtd write' on NANDs should use by default the trimffs option (to
  avoid writing empty pages).
* 'nand bad' is a great way to know the list of detected bad-blocks
  and could be implemented in 'mtd'.

Of course, this series only applies on top of [1].

[1] https://lists.denx.de/pipermail/u-boot/2018-August/336780.html


Thanks,
Miquèl


Miquel Raynal (13):
  lib: strto: parse all lowercase metric prefixes in ustrtoul[l]
  lib: strto: fix metric suffix parsing in strtoul[l]
  mtd: Kconfig: remove MTD_PARTITIONS duplicated symbol
  cmd: mtdparts: accept spi-nand devices
  cmd: mtdparts: remove mandatory 'mtdparts=' prefix
  mtd: uclass: add probe function
  mtd: uclass: add a generic 'mtdparts' parser
  mtd: uclass: search for an equivalent MTD name with the mtdids
  mtd: mtdpart: implement proper partition handling
  cmd: mtd: add 'mtd' command
  cmd: mtdparts: try to probe the MTD devices as a fallback
  cmd: ubi: clean the partition handling
  cmd: mtdparts: describe as legacy

 cmd/Kconfig                    |  22 +-
 cmd/Makefile                   |   1 +
 cmd/mtd.c                      | 517 ++++++++++++++++++++++++++
 cmd/mtdparts.c                 |  46 ++-
 cmd/ubi.c                      | 100 ++---
 drivers/mtd/Kconfig            |   3 -
 drivers/mtd/Makefile           |   2 +-
 drivers/mtd/mtd-uclass.c       |  16 +
 drivers/mtd/mtdcore.c          |   2 +
 drivers/mtd/mtdpart.c          | 661 +++++++++++++++++++++------------
 include/jffs2/load_kernel.h    |   7 +-
 include/linux/mtd/mtd.h        |  31 ++
 include/linux/mtd/partitions.h |   5 +-
 include/mtd.h                  |   3 +
 lib/strto.c                    |  26 +-
 15 files changed, 1093 insertions(+), 349 deletions(-)
 create mode 100644 cmd/mtd.c

-- 
2.17.1

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2018-09-03  8:27 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 14:57 [U-Boot] [PATCH v7 00/13] Cleaner MTD devices management Miquel Raynal
2018-08-31 14:57 ` [U-Boot] [PATCH v7 01/13] lib: strto: parse all lowercase metric prefixes in ustrtoul[l] Miquel Raynal
2018-09-01  8:43   ` Stefan Roese
2018-09-03  6:47     ` Miquel Raynal
2018-08-31 14:57 ` [U-Boot] [PATCH v7 02/13] lib: strto: fix metric suffix parsing in strtoul[l] Miquel Raynal
2018-09-01  8:48   ` Stefan Roese
2018-09-03  6:49     ` Miquel Raynal
2018-09-03  7:41       ` Stefan
2018-08-31 14:57 ` [U-Boot] [PATCH v7 03/13] mtd: Kconfig: remove MTD_PARTITIONS duplicated symbol Miquel Raynal
2018-09-01  8:48   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 04/13] cmd: mtdparts: accept spi-nand devices Miquel Raynal
2018-09-01  8:49   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 05/13] cmd: mtdparts: remove mandatory 'mtdparts=' prefix Miquel Raynal
2018-09-01  8:50   ` Stefan Roese
2018-09-03  7:13     ` Miquel Raynal
2018-08-31 14:57 ` [U-Boot] [PATCH v7 06/13] mtd: uclass: add probe function Miquel Raynal
2018-09-01  8:51   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 07/13] mtd: uclass: add a generic 'mtdparts' parser Miquel Raynal
2018-09-01  8:52   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 08/13] mtd: uclass: search for an equivalent MTD name with the mtdids Miquel Raynal
2018-09-01  8:54   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 09/13] mtd: mtdpart: implement proper partition handling Miquel Raynal
2018-09-01  8:56   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 10/13] cmd: mtd: add 'mtd' command Miquel Raynal
2018-09-01  8:59   ` Stefan Roese
2018-09-03  6:54     ` Miquel Raynal
2018-09-03  7:43       ` Stefan
2018-09-03  8:04       ` Jagan Teki
2018-09-03  8:27         ` Miquel Raynal
2018-08-31 14:57 ` [U-Boot] [PATCH v7 11/13] cmd: mtdparts: try to probe the MTD devices as a fallback Miquel Raynal
2018-09-01  9:02   ` Stefan Roese
2018-09-03  7:02     ` Miquel Raynal
2018-08-31 14:57 ` [U-Boot] [PATCH v7 12/13] cmd: ubi: clean the partition handling Miquel Raynal
2018-09-01  9:03   ` Stefan Roese
2018-08-31 14:57 ` [U-Boot] [PATCH v7 13/13] cmd: mtdparts: describe as legacy Miquel Raynal
2018-09-01  9:04   ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox