Commit e85a536ca41f77b9d06e8a2eb703e63fb01b3f4c
Committed by
Stefano Babic
1 parent
2910c0a135
Exists in
smarc_8mq_lf_v2020.04
and in
9 other branches
colibri_imx6: add distroboot support
Add support for distro boot. This is especially helpful for external devices. There is a global boot command which scans a predefined list of boot targets: run distro_bootcmd As well as direct boot commands such as: run bootcmd_mmc1 run bootcmd_usb run bootcmd_dhcp ... Refer to doc/README.distro fo details. While at it, remove the CONFIG_DRIVE_TYPES define which has not been used and was meant to be used for multi device boot support which is now provided by distroboot. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Showing 1 changed file with 15 additions and 8 deletions Side-by-side Diff
include/configs/colibri_imx6.h
... | ... | @@ -100,14 +100,18 @@ |
100 | 100 | |
101 | 101 | #define CONFIG_LOADADDR 0x12000000 |
102 | 102 | |
103 | -#ifdef CONFIG_CMD_MMC | |
104 | -#define CONFIG_DRIVE_MMC "mmc " | |
103 | +#ifndef CONFIG_SPL_BUILD | |
104 | +#define BOOT_TARGET_DEVICES(func) \ | |
105 | + func(MMC, mmc, 1) \ | |
106 | + func(USB, usb, 0) \ | |
107 | + func(DHCP, dhcp, na) | |
108 | +#include <config_distro_bootcmd.h> | |
109 | +#undef BOOTENV_RUN_NET_USB_START | |
110 | +#define BOOTENV_RUN_NET_USB_START "" | |
105 | 111 | #else |
106 | -#define CONFIG_DRIVE_MMC | |
112 | +#define BOOTENV | |
107 | 113 | #endif |
108 | 114 | |
109 | -#define CONFIG_DRIVE_TYPES CONFIG_DRIVE_MMC | |
110 | - | |
111 | 115 | #define DFU_ALT_EMMC_INFO \ |
112 | 116 | "u-boot.imx raw 0x2 0x3ff mmcpart 0;" \ |
113 | 117 | "boot part 0 1;" \ |
... | ... | @@ -134,7 +138,9 @@ |
134 | 138 | "fdt_high=0xffffffff\0" \ |
135 | 139 | "initrd_high=0xffffffff\0" \ |
136 | 140 | "kernel_addr_r=0x11000000\0" \ |
137 | - "ramdisk_addr_r=0x12100000\0" | |
141 | + "pxefile_addr_r=0x17100000\0" \ | |
142 | + "ramdisk_addr_r=0x12100000\0" \ | |
143 | + "scriptaddr=0x17000000\0" | |
138 | 144 | |
139 | 145 | #define NFS_BOOTCMD \ |
140 | 146 | "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \ |
141 | 147 | |
... | ... | @@ -171,9 +177,10 @@ |
171 | 177 | |
172 | 178 | #define FDT_FILE "imx6dl-colibri-eval-v3.dtb" |
173 | 179 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
180 | + BOOTENV \ | |
174 | 181 | "bootcmd=run emmcboot ; echo ; echo emmcboot failed ; " \ |
175 | - "run nfsboot ; echo ; echo nfsboot failed ; " \ | |
176 | - "usb start ;" \ | |
182 | + "run distro_bootcmd ; " \ | |
183 | + "usb start ; " \ | |
177 | 184 | "setenv stdout serial,vga ; setenv stdin serial,usbkbd\0" \ |
178 | 185 | "boot_file=uImage\0" \ |
179 | 186 | "console=ttymxc0\0" \ |