aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEduard Strehlau2023-04-26 13:04:54 -0300
committerStefano Babic2023-05-02 10:57:32 +0200
commit31c6c79a01c05dca9ab93b42f0f97d973a4db61f (patch)
tree7c49e023a47c3bab969a410977377ceba2f6c190 /include
parent52726d24d6c8e857f40d9125b0bce5f6272b6022 (diff)
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 'include')
-rw-r--r--include/configs/smegw01.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h
index 277c828d0e0..71f2d9c8e85 100644
--- a/include/configs/smegw01.h
+++ b/include/configs/smegw01.h
@@ -32,17 +32,21 @@
"mmcpart=1\0" \
"mmcpart_committed=1\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=/dev/mmcblk0p${mmcpart_committed} rootwait rw " \
- __stringify(EXTRA_BOOTPARAMS) "\0" \
+ "root=/dev/mmcblk${mmcdev}p${gpt_partition_entry} rootwait rw " \
+ __stringify(EXTRA_BOOTPARAMS) " SM_ROOT_DEV=${mmcdev} SM_ROOT_PART=${gpt_partition_entry} SM_BOOT_PART=${boot_part}\0" \
"commit_mmc=if test \"${ustate}\" = 1 -a \"${mmcpart}\" != \"${mmcpart_committed}\"; then " \
"setenv mmcpart_committed ${mmcpart};" \
"saveenv;" \
"fi;\0" \
"bootlimit=3\0" \
- "loadimage=load mmc ${mmcdev}:${mmcpart_committed} ${loadaddr} boot/${image}\0" \
- "loadfdt=load mmc ${mmcdev}:${mmcpart_committed} ${fdt_addr} boot/${fdtfile}\0" \
+ "loadimage=load mmc ${mmcdev}#rootfs-${mmcpart_committed} ${loadaddr} boot/${image}\0" \
+ "loadfdt=load mmc ${mmcdev}#rootfs-${mmcpart_committed} ${fdt_addr} boot/${fdtfile}\0" \
+ "loadpart=gpt setenv mmc ${mmcdev} rootfs-${mmcpart_committed}\0" \
+ "loadbootpart=mmc partconf 1 boot_part\0" \
"mmcboot=echo Booting from mmc ...; " \
"run commit_mmc; " \
+ "run loadpart; " \
+ "run loadbootpart; " \
"run mmcargs; " \
"if run loadfdt; then " \
"if bootz ${loadaddr} - ${fdt_addr}; then " \