[PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig
dwmw2 at infradead.org
Wed Aug 5 15:04:02 CEST 2020
On 5 August 2020 13:51:43 BST, Tom Rini <trini at konsulko.com> wrote:
>On Wed, Aug 05, 2020 at 11:07:15AM +0200, Stefan Roese wrote:
>> Hi Rasmus,
>> On 05.08.20 10:47, Rasmus Villemoes wrote:
>> > On 24/07/2020 23.14, Tom Rini wrote:
>> > > This converts the following to Kconfig:
>> > > CONFIG_SYS_MMC_ENV_DEV
>> > > CONFIG_SYS_MMC_ENV_PART
>> > Yes, please! That's the only thing preventing us from running a
>> > upstream U-Boot on a number of our boards where we have the
>> > out of tree - we currently have a single patch touching a few
>> > headers.
>> > > Cc: Priyanka Jain <priyanka.jain at nxp.com>
>> > > Cc: Madalin Bucur <madalin.bucur at oss.nxp.com>
>> > > Signed-off-by: Tom Rini <trini at konsulko.com>
>> > > ---
>> > > Due to some non-environment usage of the variables, cc'ing a few
>> > Yes, and those are the reason I didn't already send a patch.
>> > > diff --git a/env/Kconfig b/env/Kconfig
>> > > index 38e7fadbb93a..2eb2fe48da3d 100644
>> > > --- a/env/Kconfig
>> > > +++ b/env/Kconfig
>> > > @@ -567,6 +567,25 @@ config SYS_RELOC_GD_ENV_ADDR
>> > > Relocate the early env_addr pointer so we know it is not
>> > > the binary. Some systems need this and for the rest, it
>> > > +config SYS_MMC_ENV_DEV
>> > > + int "mmc device number"
>> > > + depends on ENV_IS_IN_MMC || ENV_IS_IN_FAT ||
>SYS_LS_PPA_FW_IN_MMC || \
>> > > + CMD_MVEBU_BUBT || FMAN_ENET || QE
>> > Slight yuck. But I suppose that those (ab)uses of
>> > can grow their own proper config symbols piecemeal and then get
>> > from that list, rather than having to wean off all of them before
>> > SYS_MMC_ENV_* can get converted.
>> > Why is ENV_IS_IN_FAT in that list? That has its own
>> > ENV_FAT_DEVICE_AND_PART.
>ENV_IS_IN_FAT is in the list because with 6731bef6966e ("env/fat.c:
>allow loading from a FAT partition on the MMC boot device") we can pick
>up the device dynamically and hard-code the partition. But that in
>means needing a default device. This even gets expanded to cover ext4
FAT and ext4 don't need to grow their own config symbols because they already *have* them. The only reason they're involved here is because of the case where they explicitly want to *abdicate* responsibility and let platform code determine the device to use, not hard-coded config. Like the MT7623 platforms where the preloader tells U-Boot if it was actually loaded from the internal eMMC or external SD card.
If someone is setting up the ENV_FAT_DEVICE_AND_PART to start with a colon and thus abdicate the device part, but then that decision is only coming from a hard-coded SYS_MMC_ENV_DEV option, then they're probably somewhat confused.
Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the U-Boot