aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorEduard Strehlau <eduard@lionizers.com>2023-04-26 13:04:54 -0300
committerStefano Babic <sbabic@denx.de>2023-05-02 10:57:32 +0200
commit31c6c79a01c05dca9ab93b42f0f97d973a4db61f (patch)
tree7c49e023a47c3bab969a410977377ceba2f6c190 /board
parent52726d24d6c8e857f40d9125b0bce5f6272b6022 (diff)
downloadu-boot-31c6c79a01c05dca9ab93b42f0f97d973a4db61f.zip
u-boot-31c6c79a01c05dca9ab93b42f0f97d973a4db61f.tar.gz
u-boot-31c6c79a01c05dca9ab93b42f0f97d973a4db61f.tar.bz2
smegw01: Enable EMMC boot from multiple partitions
GPT Partition labels are used for determining the right root filesystem to boot from. The U-Boot environment is configured to reside in the eMMC hardware boot partition we are currently booted from. This should enable a dual copy approach for upgrading the bootloader. One can overwrite the inactive hardware partition with new bootloader and environment and afterwards switch the eMMC boot partition for an atomic bootloader switch. Signed-off-by: Eduard Strehlau <eduard@lionizers.com> Signed-off-by: Fabio Estevam <festevam@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/storopack/smegw01/smegw01.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/storopack/smegw01/smegw01.c b/board/storopack/smegw01/smegw01.c
index e6bff80..7d4de93 100644
--- a/board/storopack/smegw01/smegw01.c
+++ b/board/storopack/smegw01/smegw01.c
@@ -17,6 +17,7 @@
#include <asm/arch/crm_regs.h>
#include <asm/setup.h>
#include <asm/bootm.h>
+#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -93,3 +94,12 @@ int board_late_init(void)
return 0;
}
+
+uint board_mmc_get_env_part(struct mmc *mmc)
+{
+ uint part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
+
+ if (part == 7)
+ part = 0;
+ return part;
+}