[U-Boot] [RFC PATCH] kconfig: introduce kconfig for UBI

Andrew F. Davis afd at ti.com
Mon Sep 19 17:38:57 CEST 2016


On 09/14/2016 12:03 AM, Heiko Schocher wrote:
> move the UBI config options into Kconfig.
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>
> ---
> Tested with tbot:
> http://lists.denx.de/pipermail/u-boot/2016-June/258119.html
> 
> result:
> Boards      : 1196
> compile err : 36
> not checked : 0
> U-Boot good : 1157 bad 3
> SPL good    : 427 bad 0
> ('compile err :', [...]
> ('bad         :', ['sandbox', 'sandbox_noblk', 'sandbox_spl'])
> 
> I have 36 boards, which do not compile, at least with my
> toolchains used, see:
> https://github.com/hsdenx/tbot/blob/master/config/tbot_uboot_kconfig_check.cfg#L68
> but none of them had UBI support, so this should be OK.
> 
> One change which should be discussed in microblaze-generic:
> (I preceded the patchsnipset with a 'D' so I hope it does
>  not confuse patchwork)
> Ddiff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
> Dindex e5bf700..d8e65f8 100644
> D--- a/include/configs/microblaze-generic.h
> D+++ b/include/configs/microblaze-generic.h
> D@@ -177,7 +177,6 @@
> D
> D #if defined(FLASH)
> D # define CONFIG_CMD_JFFS2
> D-# define CONFIG_CMD_UBI
> D # undef CONFIG_CMD_UBIFS
> D
> D # if !defined(RAMENV)
> D@@ -192,7 +191,6 @@
> D # endif
> D #else
> D # undef CONFIG_CMD_JFFS2
> D-# undef CONFIG_CMD_UBI
> D # undef CONFIG_CMD_UBIFS
> D #endif
> D #endif
> D@@ -202,7 +200,6 @@
> D #endif
> D
> D #if defined(CONFIG_CMD_UBIFS)
> D-# define CONFIG_CMD_UBI
> D # define CONFIG_LZO
> D #endif
> 
> Hmm... how to handle such a move?
> Just ignore it, as my test does not detect different
> binaries?

This kind of thing has shown up for me a bit, some of this logic should
be moved over to Kconfig, others like these maybe not. These could be
replaced by defaulting CMD_UBI when a FLASH or UBI enabled defconfig is
selected.

IMHO all of this can be added later when the Kconfig conversion is
finished, for now if the binary doesn't change I see no harm.

[snip]

> +config CMD_UBI
> +	tristate "Enable UBI - Unsorted block images commands"
> +	select CRC32
> +	select MTD_UBI
> +	help
> +	  UBI is a software layer above MTD layer which admits of LVM-like

                                                            ^^ use of?

Otherwise:

Reviewed-by: Andrew F. Davis <afd at ti.com>

> +	  logical volumes on top of MTD devices, hides some complexities of
> +	  flash chips like wear and bad blocks and provides some other useful
> +	  capabilities. Please, consult the MTD web site for more details
> +	  (www.linux-mtd.infradead.org). Activate this option if you want
> +	  to use U-Boot UBI commands.
> +


More information about the U-Boot mailing list