No subject
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
PATCH 1/1 add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition
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
---
board/st/stm32mp1/stm32mp1.c | 5 +++++ 1 file changed, 5 insertions(+)
board/st/stm32mp1/stm32mp1.c +5 -0
@@ -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 ];
Signature · 1 line
2.27.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition
Hi Manuel,
Quoted 32 lines · Patrick DELAUNAY
From: Manuel Reis <[email protected]>
Sent: mercredi 25 novembre 2020 11:16Check 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 <[email protected]>Cc Patrick Delaunay <[email protected]>Cc Patrice Chotard <[email protected]>Tested-by Michael Opdenacker <[email protected]>---
board/st/stm32mp1/stm32mp1.c | 5 +++++ 1 file changed, 5 insertions(+)board/st/stm32mp1/stm32mp1.c +5
-1@@ -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 ]; --
Quoted 2 lines
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/
Applied to u-boot-stm/master.
Thanks
Patrick
PATCH 1/1 add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition
Quoted 44 lines · Patrick DELAUNAY
Hi Manuel,
Quoted 36 lines · Patrick DELAUNAY
From: Manuel Reis <[email protected]>
Sent: mercredi 25 novembre 2020 11:16Check 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 <[email protected]>Cc Patrick Delaunay <[email protected]>Cc Patrice Chotard <[email protected]>Tested-by Michael Opdenacker <[email protected]>---
?
board/st/stm32mp1/stm32mp1.c| 5 +++++
? 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/board/st/stm32mp1/stm32mp1.cindex03a19af930..09d9bbf07d100644board/st/stm32mp1/stm32mp1.c +5
-0@@ -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];Signature · 1 line
2.27.0In fact it just is V2 of previous patch
http://patchwork.ozlabs.org/project/uboot/patch/20201122151939.20005-1-mluis.reis at gmail.com/
Quoted 9 lines
Reviewed-by Patrick Delaunay <[email protected]>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]; ?}
+
PATCH 1/1 add check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition
Hi Patrick,
Apologies. Must have missed that.
Thanks
Manuel
Quoted 92 lines · Patrick DELAUNAY
Quoted 32 lines · Patrick DELAUNAY
Hi Manuel,
Quoted 29 lines · Patrick DELAUNAY
From: Manuel Reis <[email protected]>
Sent: mercredi 25 novembre 2020 11:16Check 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 <[email protected]>Cc Patrick Delaunay <[email protected]>Cc Patrice Chotard <[email protected]>Tested-by Michael Opdenacker <[email protected]>---
board/st/stm32mp1/stm32mp1.c | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/board/st/stm32mp1/stm32mp1.cindex03a19af930..09d9bbf07d100644board/st/stm32mp1/stm32mp1.c +3
-0@@ -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 )Quoted 10 lines
Quoted 7 lines
board/st/stm32mp1/stm32mp1.c +2
-1+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/
Quoted 11 lines
Reviewed-by Patrick Delaunay <[email protected]>Applied to u-boot-stm/master.
Thanks
Patrick
To solve compilation issue when
CONFIG_ENV_EXT4_DEVICE_AND_PARTis not definedI modify the patch before to apply it in u-boot-stm/master.
Regards
Patrick
-------------------------
board/st/stm32mp1/stm32mp1.c
-------------------------
index8a3ce0a6f5..d3cffdd770100644board/st/stm32mp1/stm32mp1.c +11
-0@@ -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 ]; } +