From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 5 Aug 2020 08:51:43 -0400 Subject: [PATCH] Convert CONFIG_SYS_MMC_ENV_DEV et al to Kconfig In-Reply-To: <863b8bdb-1518-ee95-9eaa-03c0b0ab6d7c@denx.de> References: <20200724211447.3137-1-trini@konsulko.com> <174b6654-bbe1-9fee-90a6-83e1bd3207a0@prevas.dk> <863b8bdb-1518-ee95-9eaa-03c0b0ab6d7c@denx.de> Message-ID: <20200805125143.GK6965@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 vanilla > > upstream U-Boot on a number of our boards where we have the defconfig > > out of tree - we currently have a single patch touching a few config > > headers. > > > > > Cc: Priyanka Jain > > > Cc: Madalin Bucur > > > Signed-off-by: Tom Rini > > > --- > > > Due to some non-environment usage of the variables, cc'ing a few folks. > > > > 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 inside > > > the binary. Some systems need this and for the rest, it doesn't hurt. > > > +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 CONFIG_SYS_MMC_ENV_DEV > > can grow their own proper config symbols piecemeal and then get removed > > 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 already-existing > > 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 turn means needing a default device. This even gets expanded to cover ext4 here: http://patchwork.ozlabs.org/project/uboot/patch/20200804090547.2175076-2-dwmw2 at infradead.org/ > > And a more general question: What does the SYS_ prefix mean? Some config > > symbols have it, but I can't find any pattern to it. (I don't mean it > > should be changed with this patch, but I'm curious if there is any > > tribal knowledge here that I should be aware of.) > > The SYS_ prefix dates back quite some time, most likely nearly to the > beginning of U-Boot or more precise PPCBoot then. Here an extract > from the README: > > * Configuration _OPTIONS_: > These are selectable by the user and have names beginning with > "CONFIG_". > > * Configuration _SETTINGS_: > These depend on the hardware etc. and should not be meddled with if > you don't know what you're doing; they have names beginning with > "CONFIG_SYS_". > > Its most likely outdated by now, as this naming convention has not > been followed in the last years, AFAICT. Thanks for explaining. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: