* No subject @ 2020-11-25 10:16 Manuel Reis 2020-11-25 10:16 ` [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition Manuel Reis 0 siblings, 1 reply; 5+ messages in thread From: Manuel Reis @ 2020-11-25 10:16 UTC (permalink / raw) To: u-boot Hi, thanks for feedback. sending new squash commit with grouped variables and code, and corrected git message for initial patch sent: [PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART hope this is better now. regards, manuel ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition 2020-11-25 10:16 No subject Manuel Reis @ 2020-11-25 10:16 ` Manuel Reis [not found] ` <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com> 0 siblings, 1 reply; 5+ messages in thread From: Manuel Reis @ 2020-11-25 10:16 UTC (permalink / raw) To: u-boot 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 <mluis.reis@gmail.com> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com> --- 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 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com>]
* FW: [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition [not found] ` <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com> @ 2020-12-09 9:06 ` Patrick DELAUNAY 2020-12-09 10:28 ` Patrick DELAUNAY 0 siblings, 1 reply; 5+ messages in thread From: Patrick DELAUNAY @ 2020-12-09 9:06 UTC (permalink / raw) To: u-boot Hi Manuel, On 12/9/20 9:59 AM, Patrick DELAUNAY wrote: > From: Manuel Reis <mluis.reis@gmail.com> > 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 <mluis.reis@gmail.com> > Cc: Patrick Delaunay <patrick.delaunay@st.com> > Cc: Patrice Chotard <patrice.chotard@st.com> > Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > --- > > 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 <patrick.delaunay@foss.st.com> Applied to u-boot-stm/master. Thanks Patrick ^ permalink raw reply [flat|nested] 5+ messages in thread
* FW: [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition 2020-12-09 9:06 ` FW: " Patrick DELAUNAY @ 2020-12-09 10:28 ` Patrick DELAUNAY 2020-12-09 11:55 ` Manuel Luís Reis 0 siblings, 1 reply; 5+ messages in thread From: Patrick DELAUNAY @ 2020-12-09 10:28 UTC (permalink / raw) To: u-boot On 12/9/20 10:06 AM, Patrick DELAUNAY wrote: > Hi Manuel, > > On 12/9/20 9:59 AM, Patrick DELAUNAY wrote: >> From: Manuel Reis <mluis.reis@gmail.com> >> 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 <mluis.reis@gmail.com> >> Cc: Patrick Delaunay <patrick.delaunay@st.com> >> Cc: Patrice Chotard <patrice.chotard@st.com> >> Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com> >> --- >> >> ? 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 <patrick.delaunay@foss.st.com> > > Applied to u-boot-stm/master. > > > Thanks > > Patrick > To solve compilation issue when CONFIG_ENV_EXT4_DEVICE_AND_PART is not defined I modify the patch before to apply it in u-boot-stm/master. Regards Patrick ------------------------- board/st/stm32mp1/stm32mp1.c ------------------------- index 8a3ce0a6f5..d3cffdd770 100644 @@ -827,11 +827,22 @@ const char *env_ext4_get_intf(void) ?const char *env_ext4_get_dev_part(void) ?{ +??? static char *const env_dev_part = +#ifdef CONFIG_ENV_EXT4_DEVICE_AND_PART +??? ??? CONFIG_ENV_EXT4_DEVICE_AND_PART; +#else +??? ??? ""; +#endif ???? 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]; ?} + ^ permalink raw reply [flat|nested] 5+ messages in thread
* FW: [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition 2020-12-09 10:28 ` Patrick DELAUNAY @ 2020-12-09 11:55 ` Manuel Luís Reis 0 siblings, 0 replies; 5+ messages in thread From: Manuel Luís Reis @ 2020-12-09 11:55 UTC (permalink / raw) To: u-boot Hi Patrick, Apologies. Must have missed that. Thanks Manuel On Wed, 9 Dec 2020 at 10:28, Patrick DELAUNAY <patrick.delaunay@foss.st.com> wrote: > > On 12/9/20 10:06 AM, Patrick DELAUNAY wrote: > > Hi Manuel, > > > > On 12/9/20 9:59 AM, Patrick DELAUNAY wrote: > >> From: Manuel Reis <mluis.reis@gmail.com> > >> 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 <mluis.reis@gmail.com> > >> Cc: Patrick Delaunay <patrick.delaunay@st.com> > >> Cc: Patrice Chotard <patrice.chotard@st.com> > >> Tested-by: Michael Opdenacker <michael.opdenacker@bootlin.com> > >> --- > >> > >> 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 <patrick.delaunay@foss.st.com> > > > > Applied to u-boot-stm/master. > > > > > > Thanks > > > > Patrick > > > > To solve compilation issue when CONFIG_ENV_EXT4_DEVICE_AND_PART is not > defined > > I modify the patch before to apply it in u-boot-stm/master. > > Regards > > Patrick > > ------------------------- board/st/stm32mp1/stm32mp1.c > ------------------------- > index 8a3ce0a6f5..d3cffdd770 100644 > @@ -827,11 +827,22 @@ const char *env_ext4_get_intf(void) > > const char *env_ext4_get_dev_part(void) > { > + static char *const env_dev_part = > +#ifdef CONFIG_ENV_EXT4_DEVICE_AND_PART > + CONFIG_ENV_EXT4_DEVICE_AND_PART; > +#else > + ""; > +#endif > 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]; > } > + > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-09 11:55 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-11-25 10:16 No subject Manuel Reis 2020-11-25 10:16 ` [PATCH] add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition Manuel Reis [not found] ` <8c3e8197e6fb4513a4aebd21d445c1a4@SFHDAG2NODE3.st.com> 2020-12-09 9:06 ` FW: " Patrick DELAUNAY 2020-12-09 10:28 ` Patrick DELAUNAY 2020-12-09 11:55 ` Manuel Luís Reis
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.