summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@toradex.com>2020-06-12 15:10:41 +0300
committerIgor Opaniuk <igor.opaniuk@toradex.com>2020-06-12 15:10:41 +0300
commite161c85d8a2bfcf997e19c8ea2fb746c691f4bfe (patch)
tree2df298ba6953fcfb368693ff542f9d0c77ef35ed
parentde4742be04b8ed87929507c07399b59850104259 (diff)
apalis_imx6: use distro_bootcmd as default boot cmd
1. Drop legacy emmcboot, usbboot and sdboot wrappers from env. 2. Change bootcmd to use only distro_bootcmd 3. Change the "boot try" order. Default one is: SD -> eMMC -> USB -> DHCP 4. Drop DFU defines Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
-rw-r--r--include/configs/apalis_imx6.h72
1 files changed, 2 insertions, 70 deletions
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h
index db37fa7b73..51942e0c32 100644
--- a/include/configs/apalis_imx6.h
+++ b/include/configs/apalis_imx6.h
@@ -104,6 +104,7 @@
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 2) \
+ func(MMC, mmc, 0) \
func(USB, usb, 0) \
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
@@ -113,31 +114,6 @@
#define BOOTENV
#endif /* CONFIG_SPL_BUILD */
-#define DFU_ALT_EMMC_INFO \
- "u-boot.imx raw 0x2 0x3ff mmcpart 0;" \
- "boot part 0 1;" \
- "rootfs part 0 2;" \
- "zImage fat 0 1;" \
- "imx6q-apalis-eval.dtb fat 0 1;" \
- "imx6q-apalis-cam-eval.dtb fat 0 1"
-
-#define EMMC_BOOTCMD \
- "set_emmcargs=setenv emmcargs ip=off root=PARTUUID=${uuid} " \
- "ro,noatime rootfstype=ext4 rootwait\0" \
- "emmcboot=run setup; run emmcfinduuid; run set_emmcargs; " \
- "setenv bootargs ${defargs} ${emmcargs} ${setupargs} " \
- "${vidargs}; echo Booting from internal eMMC chip...; " \
- "run emmcdtbload; load mmc ${emmcdev}:${emmcbootpart} " \
- "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
- "bootz ${kernel_addr_r} ${dtbparam}\0" \
- "emmcbootpart=1\0" \
- "emmcdev=0\0" \
- "emmcdtbload=setenv dtbparam; load mmc ${emmcdev}:${emmcbootpart} " \
- "${fdt_addr_r} ${fdt_file} && " \
- "setenv dtbparam \" - ${fdt_addr_r}\" && true\0" \
- "emmcfinduuid=part uuid mmc ${mmcdev}:${emmcrootpart} uuid\0" \
- "emmcrootpart=2\0"
-
#define MEM_LAYOUT_ENV_SETTINGS \
"bootm_size=0x20000000\0" \
"fdt_addr_r=0x12100000\0" \
@@ -158,45 +134,6 @@
"nfsdtbload=setenv dtbparam; tftp ${fdt_addr_r} ${fdt_file} " \
"&& setenv dtbparam \" - ${fdt_addr_r}\" && true\0"
-#define SD_BOOTCMD \
- "set_sdargs=setenv sdargs ip=off root=PARTUUID=${uuid} ro,noatime " \
- "rootfstype=ext4 rootwait\0" \
- "sdboot=run setup; run sdfinduuid; run set_sdargs; " \
- "setenv bootargs ${defargs} ${sdargs} ${setupargs} " \
- "${vidargs}; echo Booting from SD card; " \
- "run sddtbload; load mmc ${sddev}:${sdbootpart} " \
- "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
- "bootz ${kernel_addr_r} ${dtbparam}\0" \
- "sdbootpart=1\0" \
- "sddev=1\0" \
- "sddtbload=setenv dtbparam; load mmc ${sddev}:${sdbootpart} " \
- "${fdt_addr_r} " \
- "${fdt_file} && setenv dtbparam \" - " \
- "${fdt_addr_r}\" && true\0" \
- "sdfinduuid=part uuid mmc ${sddev}:${sdrootpart} uuid\0" \
- "sdrootpart=2\0"
-
-
-#define USB_BOOTCMD \
- "set_usbargs=setenv usbargs ip=off root=PARTUUID=${uuid} ro,noatime " \
- "rootfstype=ext4 rootwait\0" \
- "usbboot=run setup; usb start; run usbfinduuid; run set_usbargs; " \
- "setenv bootargs ${defargs} ${setupargs} " \
- "${usbargs} ${vidargs}; echo Booting from USB stick...; " \
- "run usbdtbload; load usb " \
- "${usbdev}:${usbbootpart} ${kernel_addr_r} " \
- "${boot_file} && run fdt_fixup && " \
- "bootz ${kernel_addr_r} ${dtbparam}\0" \
- "usbbootpart=1\0" \
- "usbdev=0\0" \
- "usbdtbload=setenv dtbparam; load usb ${usbdev}:${usbbootpart} "\
- "${fdt_addr_r} " \
- "${fdt_file} && setenv dtbparam \" - " \
- "${fdt_addr_r}\" && true\0" \
- "usbfinduuid=part uuid usb ${usbdev}:${usbrootpart} uuid\0" \
- "usbrootpart=2\0"
-
-
#ifndef CONFIG_TDX_APALIS_IMX6_V1_0
#define FDT_FILE "imx6q-apalis-eval.dtb"
#define FDT_FILE_V1_0 "imx6q-apalis_v1_0-eval.dtb"
@@ -205,21 +142,16 @@
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
BOOTENV \
- "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \
- "setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \
+ "bootcmd=setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \
"usb start ; " \
"setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \
"boot_file=zImage\0" \
"console=ttymxc0\0" \
"defargs=enable_wait_mode=off vmalloc=400M\0" \
- "dfu_alt_info=" DFU_ALT_EMMC_INFO "\0" \
- EMMC_BOOTCMD \
"fdt_file=" FDT_FILE "\0" \
"fdt_fixup=;\0" \
MEM_LAYOUT_ENV_SETTINGS \
NFS_BOOTCMD \
- SD_BOOTCMD \
- USB_BOOTCMD \
"setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
"00:14:2d:00:00:00; fi; tftpboot ${loadaddr} " \
"flash_eth.img && source ${loadaddr}\0" \