diff options
Diffstat (limited to 'include/configs/smegw01.h')
-rw-r--r-- | include/configs/smegw01.h | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h index 8521883277..6f373973ab 100644 --- a/include/configs/smegw01.h +++ b/include/configs/smegw01.h @@ -22,6 +22,32 @@ #define EXTRA_BOOTPARAMS #endif +#ifdef CONFIG_SYS_BOOT_LOCKED +#define EXTRA_ENV_FLAGS +#define SETUP_BOOT_MENU "setup_boot_menu=setenv bootmenu_0 eMMC=run bootcmd\0" +#else +#define EXTRA_ENV_FLAGS "mmcdev:dw," +#define SETUP_BOOT_MENU "setup_boot_menu=" \ + "if test \"${mmcdev}\" = 1; then " \ + "setenv emmc_priority 0;" \ + "setenv sd_priority 1;" \ + "else " \ + "setenv emmc_priority 1;" \ + "setenv sd_priority 0;" \ + "fi;" \ + "setenv bootmenu_${emmc_priority} eMMC=run boot_emmc;" \ + "setenv bootmenu_${sd_priority} SD=run boot_sd;\0" +#endif + +#define CFG_ENV_FLAGS_LIST_STATIC \ + "mmcpart:dw," \ + "mmcpart_committed:dw," \ + "ustate:dw," \ + "bootcount:dw," \ + "bootlimit:dw," \ + "upgrade_available:dw," \ + EXTRA_ENV_FLAGS + #define CFG_EXTRA_ENV_SETTINGS \ "image=fitImage\0" \ "console=ttymxc0\0" \ @@ -40,13 +66,28 @@ "fi;\0" \ "bootlimit=3\0" \ "fit_addr=0x88000000\0" \ - "loadimage=load mmc ${mmcdev}#rootfs-${mmcpart_committed} ${fit_addr} boot/${image}\0" \ + "loadimage=load mmc ${mmcdev}:${gpt_partition_entry} ${fit_addr} boot/${image}\0" \ "loadpart=gpt setenv mmc ${mmcdev} rootfs-${mmcpart_committed}\0" \ "loadbootpart=mmc partconf 1 boot_part\0" \ - "mmcboot=echo Booting from mmc ...; " \ + "boot_sd=setenv mmcdev_wanted 0; run persist_mmcdev; run bootcmd;\0" \ + "boot_emmc=setenv mmcdev_wanted 1; run persist_mmcdev; run bootcmd;\0" \ + "persist_mmcdev=" \ + "if test \"${mmcdev}\" != \"${mmcdev_wanted}\"; then " \ + "setenv mmcdev \"${mmcdev_wanted}\";" \ + "saveenv;" \ + "fi;\0" \ + "mmcboot=echo Booting...; " \ + "echo mmcdev: ${mmcdev}; " \ "run commit_mmc; " \ + "echo mmcpart: ${mmcpart_committed}; " \ "run loadpart; " \ + "echo gptpart: ${gpt_partition_entry}; " \ "run loadbootpart; " \ + "if run loadimage; then " \ + "; " \ + "else " \ + "run altbootcmd; " \ + "fi; " \ "run mmcargs; " \ "if bootm ${fit_addr}; then " \ "; " \ @@ -61,7 +102,8 @@ "setenv mmcpart 1; " \ "setenv mmcpart_committed 1;" \ "fi; setenv bootcount 0; setenv upgrade_available; setenv ustate 3; saveenv; " \ - "run bootcmd;\0" + "run bootcmd;\0" \ + SETUP_BOOT_MENU /* Physical Memory Map */ #define PHYS_SDRAM MMDC0_ARB_BASE_ADDR |