[PATCH] added check for ignored CONFIG_ENV_EXT4_DEVICE_AND_PART definition

Manuel Reis mluis.reis at gmail.com
Sun Nov 22 16:19:39 CET 2020


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 <mluis.reis at gmail.com>
Cc: Patrick Delaunay <patrick.delaunay at st.com>
Cc: Patrice Chotard <patrice.chotard at st.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 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();
 
-- 
2.27.0



More information about the U-Boot mailing list