[U-Boot] [PATCH v2 6/14] cmd: Add Kconfig option for CMD_MTDPARTS and related options

Maxime Ripard maxime.ripard at free-electrons.com
Mon Jan 9 09:28:26 CET 2017


Hi Boris,

On Wed, Jan 04, 2017 at 10:10:56AM +0100, Boris Brezillon wrote:
> Hi Maxime,
> 
> On Tue, 22 Nov 2016 13:38:36 +0100
> Maxime Ripard <maxime.ripard at free-electrons.com> wrote:
> 
> > CMD_MTDPARTS is something the user might or might not want to select, and
> > might depends on (or be selected by) other options too.
> > 
> > This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that
> > might change from one board to another, or from one user to the other,
> > depending on what it expects and what storage devices are available.
> > 
> > In order to ease that configuration, add those options to Kconfig.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
> > ---
> >  cmd/Kconfig    | 19 +++++++++++++++++++
> >  cmd/mtdparts.c |  8 ++++++++
> >  2 files changed, 27 insertions(+), 0 deletions(-)
> > 
> > diff --git a/cmd/Kconfig b/cmd/Kconfig
> > index e339d8638aa5..cd98e2a2bd00 100644
> > --- a/cmd/Kconfig
> > +++ b/cmd/Kconfig
> > @@ -717,6 +717,25 @@ config CMD_FS_GENERIC
> >  	help
> >  	  Enables filesystem commands (e.g. load, ls) that work for multiple
> >  	  fs types.
> > +
> > +config CMD_MTDPARTS
> > +	bool "MTD partition support"
> 
> 	depends on MTD
> 
> Also, it seems that MTD_DEVICE and MTD_PARTITIONS still have to be
> defined in the board/soc config header, which is kind of disturbing.

Indeed

> I modified the patch (see below) to add hidden MTD_DEVICE and
> MTD_PARTITIONS options and select them from MTDPARTS. This way you can
> get rid of all MTD related definitions in sunxi-common.h.
> 
> I also have 3 more patches [1][2][3] to expose UBIFS and NAND suboptions
> through Kconfig in order to get rid of the extra definitions you add in
> sunxi-common.h (patch 9). Let me know if you want me to send them
> separately, otherwise, you can include them in your series.

Looks good. I won't have time to send them before a while, so feel
free to send them separately.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170109/16bdf298/attachment.sig>


More information about the U-Boot mailing list