summaryrefslogtreecommitdiff
path: root/include/configs/pico-imx7d.h
diff options
context:
space:
mode:
authorJun Nie <jun.nie@linaro.org>2019-07-16 15:42:57 +0800
committerStefano Babic <sbabic@denx.de>2019-10-13 22:49:11 +0200
commit7cc7c1e9db61ecf02e6f9b7d3d27171aaf1719fe (patch)
tree1244d954c7dcb3ddf28e8c606fa9550c99ea7bf1 /include/configs/pico-imx7d.h
parentb86745efea580e0da82dc061afc5159f0809e057 (diff)
pico-imx7d: Support distro boot for FIT image case
Support distro boot for pico imx7d in FIT image case. Signed-off-by: Jun Nie <jun.nie@linaro.org> Tested-by: Joris Offouga <offougajoris@gmail.com>
Diffstat (limited to 'include/configs/pico-imx7d.h')
-rw-r--r--include/configs/pico-imx7d.h37
1 files changed, 11 insertions, 26 deletions
diff --git a/include/configs/pico-imx7d.h b/include/configs/pico-imx7d.h
index 5c4b90a8a1..607784e423 100644
--- a/include/configs/pico-imx7d.h
+++ b/include/configs/pico-imx7d.h
@@ -55,17 +55,17 @@
/* When booting with FIT specify the node entry containing boot.scr */
#if defined(CONFIG_FIT)
#define PICO_BOOT_ENV \
- "bootscr_fitimage_name=bootscr\0" \
- "bootscriptaddr=0x83200000\0" \
- "fdtovaddr=0x83100000\0" \
- "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
- "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
- "mmcargs=setenv bootargs console=${console},${baudrate} " \
- "rootwait rw;\0" \
- "loadbootscript=" \
- "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source ${bootscriptaddr}:${bootscr_fitimage_name}\0"
+ BOOTENV \
+ "fdtovaddr=0x83100000\0" \
+ "scriptaddr=0x83200000\0" \
+ "mmcargs=setenv bootargs console=${console},${baudrate} " \
+ "rootwait rw\0" \
+ "boot_a_script=" \
+ "load ${devtype} ${devnum}:${distro_bootpart} " \
+ "${scriptaddr} ${prefix}${script}; " \
+ "iminfo ${scriptaddr};" \
+ "if test $? -eq 1; then hab_failsafe; fi;" \
+ "source ${scriptaddr}:bootscr\0"
#else
#define PICO_BOOT_ENV \
"bootmenu_0=Boot using PICO-Hobbit baseboard=" \
@@ -112,21 +112,6 @@
"setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \
PICO_BOOT_ENV
-#if defined(CONFIG_FIT)
-#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev};" \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "iminfo ${bootscriptaddr};" \
- "if test $? -eq 1; then hab_failsafe; fi;" \
- "run bootscript; " \
- "else " \
- "echo Fail to load fitImage with boot script;" \
- "hab_failsafe;" \
- "fi; " \
- "fi"
-#endif
-
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(USB, usb, 0) \