From: Michael Opdenacker Date: Tue, 24 Nov 2020 16:24:18 +0100 Subject: [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition In-Reply-To: <20201122151939.20005-1-mluis.reis@gmail.com> References: <20201122151939.20005-1-mluis.reis@gmail.com> Message-ID: <9db0e304-39a9-7fab-81f3-fd0debf47eee@bootlin.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Manuel, Thanks for this fix. Indeed, without it, I don't manage to get U-Boot to use the EXT4 partition for the environment on stm32mp1 with the below configuration: CONFIG_ENV_IS_IN_EXT4=y CONFIG_ENV_EXT4_INTERFACE="mmc" CONFIG_ENV_EXT4_DEVICE_AND_PART="0:4" On 11/22/20 4:19 PM, Manuel Reis wrote: > Check whether user has explicitly defined device and partition where > environment file will be located. Voids the need to set such partition > as bootable to work with the 'dev:auto' > > Signed-off-by: Manuel Reis > Cc: Patrick Delaunay > Cc: Patrice Chotard > --- > > board/st/stm32mp1/stm32mp1.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index 4553329b25..4dda70740d 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -868,6 +868,11 @@ const char *env_ext4_get_intf(void) > > const char *env_ext4_get_dev_part(void) > { > + static char *const env_dev_part = CONFIG_ENV_EXT4_DEVICE_AND_PART; > + > + if (strlen(env_dev_part) > 0) > + return env_dev_part; > + > static char *const dev_part[] = {"0:auto", "1:auto", "2:auto"}; > u32 bootmode = get_bootmode(); > Tested-by: Michael Opdenacker -- Michael Opdenacker, CEO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com