From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick DELAUNAY Date: Wed, 9 Dec 2020 10:06:04 +0100 Subject: FW: [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition In-Reply-To: <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com> References: <20201125101620.59718-1-mluis.reis@gmail.com> <20201125101620.59718-2-mluis.reis@gmail.com> <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com> Message-ID: <2c8dde49-d84c-8705-8545-fb4e43404d7c@foss.st.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, On 12/9/20 9:59 AM, Patrick DELAUNAY wrote: > From: Manuel Reis > Sent: mercredi 25 novembre 2020 11:16 > > Check whether user has explicitly defined device and partition where environment file will be located before using 'auto' i.e. bootable partition > > Voids the need to set such partition as bootable to work with the 'dev:auto' tuple > > Signed-off-by: Manuel Reis > Cc: Patrick Delaunay > Cc: Patrice Chotard > Tested-by: Michael Opdenacker > --- > > 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 03a19af930..09d9bbf07d 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -827,7 +827,12 @@ 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; > static char *const dev_part[] = {"0:auto", "1:auto", "2:auto"}; > + > + if (strlen(env_dev_part) > 0) > + return env_dev_part; > + > u32 bootmode = get_bootmode(); > > return dev_part[(bootmode & TAMP_BOOT_INSTANCE_MASK) - 1]; > -- > 2.27.0 > In fact it just is V2 of previous patch http://patchwork.ozlabs.org/project/uboot/patch/20201122151939.20005-1-mluis.reis at gmail.com/ Reviewed-by: Patrick Delaunay Applied to u-boot-stm/master. Thanks Patrick