
Signed-off-by: Sumit Garg sumit.garg@linaro.org --- include/configs/hmibsc.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+)
diff --git a/include/configs/hmibsc.h b/include/configs/hmibsc.h index 04052ed6dee..b614dec7870 100644 --- a/include/configs/hmibsc.h +++ b/include/configs/hmibsc.h @@ -16,4 +16,42 @@ #define PHYS_SDRAM_1_SIZE SZ_1G #define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1
+#undef CONFIG_BOOTCOMMAND +# define CONFIG_BOOTCOMMAND \ + "setenv devtype mmc; setenv devnum 0; " \ + "test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"; " \ + "test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3; " \ + "test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3; " \ + "setenv raucslot; " \ + "for BOOT_SLOT in "${BOOT_ORDER}"; do " \ + " if test "x${raucslot}" != "x"; then " \ + " echo "skip remaining slots..."; " \ + " elif test "x${BOOT_SLOT}" = "xA"; then " \ + " if test ${BOOT_A_LEFT} -gt 0; then " \ + " setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1; " \ + " echo "Found valid RAUC slot A"; " \ + " setenv raucslot "rauc.slot=A"; " \ + " setenv raucpart A; setenv distro_bootpart 6;" \ + " fi; " \ + " elif test "x${BOOT_SLOT}" = "xB"; then " \ + " if test ${BOOT_B_LEFT} -gt 0; then " \ + " setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1; " \ + " echo "Found valid RAUC slot B"; " \ + " setenv raucslot "rauc.slot=B"; " \ + " setenv raucpart B; setenv distro_bootpart 7;" \ + " fi; " \ + " fi; " \ + "done; " \ + "if test -n "${raucslot}"; then " \ + " setenv bootargs console=ttyMSM1 root=PARTLABEL=rootfs_${raucpart} rw rootwait ${raucslot}; " \ + " saveenv; " \ + "else " \ + " echo "No valid RAUC slot found. Resetting tries to 3"; " \ + " setenv BOOT_A_LEFT 3; " \ + " setenv BOOT_B_LEFT 3; " \ + " saveenv; " \ + " reset; " \ + "fi; " \ + "load ${devtype} ${devnum}:${distro_bootpart} ${loadaddr} /boot/fitImage && bootm" + #endif