[U-Boot] [PATCH] disk: convert to Kconfig

Patrick DELAUNAY
2016-11-30T17:06:50Z

Hi Tom,

>
> > This converts the following to Kconfig:
> > CONFIG_PARTITIONS
> > CONFIG_MAC_PARTITION
> > CONFIG_DOS_PARTITION
> > CONFIG_ISO_PARTITION
> > CONFIG_AMIGA_PARTITION
> > CONFIG_EFI_PARTITION
> > CONFIG_PARTITION_UUIDS
> > CONFIG_PARTITION_TYPE_GUID
> >
> > Specific SPL config are added to reduce SPL size for some target and
> > solve compilation issues
> >
> > CONFIG_SPL_MAC_PARTITION
> > CONFIG_SPL_DOS_PARTITION
> > CONFIG_SPL_ISO_PARTITION
> > CONFIG_SPL_AMIGA_PARTITION
> > CONFIG_SPL_EFI_PARTITION
> >
> > Associated test are updated to the correct CONFIG (SPL or not) by
> > using macro CONFIG_IS_ENABLED
> >
> > To update the U-Boot code I use :
> >
> > 1- update defconfig for new SPL option
> > ./tools/moveconfig.py --spl --commit \
> > PARTITIONS MAC_PARTITION DOS_PARTITION \
> > ISO_PARTITION AMIGA_PARTITION EFI_PARTITION \
> > PARTITION_UUIDS PARTITION_TYPE_GUID
> >
> > then replace CONFIG by CONFIG_SPL in defconfig
> > sed -i
> "s/CONFIG_\(DOS\|EFI\|ISO\|MAC\|AMIGA\)_PARTITION/CONFIG_SPL_\1
> _PARTITION/" \
> > configs/*
> >
> > 2- update defconfig for existing option ./tools/moveconfig.py --commit
> > --yes \
> > PARTITIONS MAC_PARTITION DOS_PARTITION \
> > ISO_PARTITION AMIGA_PARTITION EFI_PARTITION \
> > PARTITION_UUIDS PARTITION_TYPE_GUID
> >
> > => squash the 2 modifications
> >
> >
> > Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> > Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
> > ---
> > move disk to Kconfig as proposed by Simon Glass in thread [Resend RFC
> > PATCH v1 1/3] add support of GPT partitioning over MTD
> >
> > NB: I create _SPL_ config because I have issue
> > with size of SPL for some platform
> >
> > => list of supported partition type is not the same between SPL
> > and U-Boot, that allow size reduction for SPL build
> > (CONFIG are under compilation flag CONFIG_SPL_BUILD in .h)
> >
> > I compile this patch on v2016.11 without issue linked to this code on
> > all platform and this commit is rebased on master
> [snip]
> > 1203 files changed, 2253 insertions(+), 798 deletions(-)
>
> OK, we've got a few things to fix in here.
>
> > diff --git a/Kconfig b/Kconfig
> > index 529858a..46c373e 100644
> > --- a/Kconfig
> > +++ b/Kconfig
> [snip]
> > diff --git a/configs/A10-OLinuXino-Lime_defconfig
> > b/configs/A10-OLinuXino-Lime_defconfig
> > index bb7eaf8..50436a7 100644
> > --- a/configs/A10-OLinuXino-Lime_defconfig
> > +++ b/configs/A10-OLinuXino-Lime_defconfig
> > @@ -7,8 +7,8 @@ CONFIG_DRAM_EMR1=4
> > CONFIG_SYS_CLK_FREQ=912000000
> > CONFIG_MMC0_CD_PIN="PH1"
> > CONFIG_DEFAULT_DEVICE_TREE="sun4i-a10-olinuxino-lime"
> > -# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_AHCI=y
> > +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
> > CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,SATAPWR=SUNXI_GPC(3)"
> > CONFIG_SPL=y
> > # CONFIG_CMD_IMLS is not set
>
> There's a lot of changes like this, just drop them please.
>
Ok, modification automatically done by moveconfig script
for unaligned defconfig.... I will drop them !

Do you known if I can do it automatically ?

>
> > diff --git a/disk/Kconfig b/disk/Kconfig new file mode 100644 index
> > 0000000..57da657
> > --- /dev/null
> > +++ b/disk/Kconfig
> [snip]
> > +config DOS_PARTITION
> > + bool "Enable MS Dos partition table"
> > + depends on PARTITIONS
> > + help
> > + traditional on the Intel architecture, USB sticks, etc.
> > +
> > +config SPL_DOS_PARTITION
> > + bool "Enable MS Dos partition table for SPL"
> > + depends on SPL && PARTITIONS
>
> These should both be default y. Doing both of these will make the rest of
> the patch much more reviewable, thanks!

Ok, I will do it

>
> --
> Tom

Patrick