diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2018-06-29 15:19:13 -0300 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-07-23 10:59:48 +0200 |
commit | 22dda6bd8b2b495a71d3776cf0b4379fe14fd8bc (patch) | |
tree | eb0bd37591d30eecaaacf85c6a8a5772aabf03e4 /include/configs/pico-imx7d.h | |
parent | 1e646426949a4205ae973c4a7ff7f2aea9f6d9bd (diff) | |
download | u-boot-22dda6bd8b2b495a71d3776cf0b4379fe14fd8bc.tar.gz |
pico-imx7d: Add bootmenu to choose the baseboard
Currently the baseboards do not offer a way to autodetect which one is
in use, so we ask the user if no value has been set.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'include/configs/pico-imx7d.h')
-rw-r--r-- | include/configs/pico-imx7d.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h index f974b79b3b..94c846a395 100644 --- a/include/configs/pico-imx7d.h +++ b/include/configs/pico-imx7d.h @@ -40,6 +40,10 @@ "/boot/imx7d-pico-pi.dtb ext4 0 1;" \ "rootfs part 0 1\0" \ +#define BOOTMENU_ENV \ + "bootmenu_0=Boot using PICO-PI baseboard=" \ + "setenv fdtfile imx7d-pico-pi.dtb\0" \ + #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 @@ -49,7 +53,8 @@ "console=ttymxc4\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdtfile=imx7d-pico-pi.dtb\0" \ + "fdtfile=ask\0" \ + BOOTMENU_ENV \ "fdt_addr=0x83000000\0" \ "fdt_addr_r=0x83000000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ @@ -58,6 +63,11 @@ "ramdiskaddr=0x83000000\0" \ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \ CONFIG_DFU_ENV_SETTINGS \ + "findfdt=" \ + "if test $fdtfile = ask ; then " \ + "bootmenu -1; fi;" \ + "if test $fdtfile != ask ; then " \ + "saveenv; fi;\0" \ "finduuid=part uuid mmc 0:1 uuid\0" \ "partitions=" \ "uuid_disk=${uuid_gpt_disk};" \ |