- "mmcargs=setenv bootargs console=${console},${baudrate} " \
- "root=${mmcroot}; run videoargs\0" \
- "videoargs=" \
- "setenv nextcon 0; " \
- "if hdmidet; then " \
- "setenv bootargs ${bootargs} " \
- "video=mxcfb${nextcon}:dev=hdmi,1280x720M@60," \
- "if=RGB24; " \
- "setenv fbmen fbmem=28M; " \
- "setexpr nextcon ${nextcon} + 1; " \
- "else " \
- "echo - no HDMI monitor;" \
- "fi; " \
- "i2c dev 1; " \
- "if i2c probe 0x10; then " \
- "setenv bootargs ${bootargs} " \
- "video=mxcfb${nextcon}:dev=lcd,800x480@60," \
- "if=RGB666,bpp=32; " \
- "if test 0 -eq ${nextcon}; then " \
- "setenv fbmem fbmem=10M; " \
- "else " \
- "setenv fbmem ${fbmem},10M; " \
- "fi; " \
- "setexpr nextcon ${nextcon} + 1; " \
- "else " \
- "echo '- no FWBADAPT-7WVGA-LCD-F07A-0102 display';" \
- "fi; " \
- "setenv bootargs ${bootargs} ${fbmem}\0" \
- "loadbootscript=" \
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
- "bootscript=echo Running bootscript from mmc ...; " \
- "source\0" \
- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "mmcboot=echo Booting from mmc ...; " \
- "run mmcargs; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if run loadfdt; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootz; " \
- "fi;\0" \
- "netargs=setenv bootargs console=${console},${baudrate} " \
- "root=/dev/nfs " \
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
- "netboot=echo Booting from net ...; " \
- "run netargs; " \
- "if test ${ip_dyn} = yes; then " \
- "setenv get_cmd dhcp; " \
- "else " \
- "setenv get_cmd tftp; " \
- "fi; " \
- "${get_cmd} ${image}; " \
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
- "bootz ${loadaddr} - ${fdt_addr}; " \
- "else " \
- "if test ${boot_fdt} = try; then " \
- "bootz; " \
- "else " \
- "echo WARN: Cannot load the DT; " \
- "fi; " \
- "fi; " \
- "else " \
- "bootz; " \
- "fi;\0"
-
-#define CONFIG_BOOTCOMMAND \
- "mmc dev ${mmcdev}; if mmc rescan; then " \
- "if run loadbootscript; then " \
- "run bootscript; " \
- "else " \
- "if run loadimage; then " \
- "run mmcboot; " \
- "else run netboot; " \
- "fi; " \
- "fi; " \
- "else run netboot; fi"
-
-/* Miscellaneous configurable options */
-#define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_HUSH_PARSER
-#define CONFIG_AUTO_COMPLETE
-#define CONFIG_SYS_CBSIZE 256
-
-/* Print Buffer Size */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
-#define CONFIG_SYS_MAXARGS 16
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
-#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
-
-#define CONFIG_CMDLINE_EDITING
+ "findfdt="\
+ "if test $board_name = D1 && test $board_rev = MX6QP ; then " \
+ "setenv fdtfile imx6qp-wandboard-revd1.dtb; fi; " \
+ "if test $board_name = D1 && test $board_rev = MX6Q ; then " \
+ "setenv fdtfile imx6q-wandboard-revd1.dtb; fi; " \
+ "if test $board_name = D1 && test $board_rev = MX6DL ; then " \
+ "setenv fdtfile imx6dl-wandboard-revd1.dtb; fi; " \
+ "if test $board_name = C1 && test $board_rev = MX6Q ; then " \
+ "setenv fdtfile imx6q-wandboard.dtb; fi; " \
+ "if test $board_name = C1 && test $board_rev = MX6DL ; then " \
+ "setenv fdtfile imx6dl-wandboard.dtb; fi; " \
+ "if test $board_name = B1 && test $board_rev = MX6Q ; then " \
+ "setenv fdtfile imx6q-wandboard-revb1.dtb; fi; " \
+ "if test $board_name = B1 && test $board_rev = MX6DL ; then " \
+ "setenv fdtfile imx6dl-wandboard-revb1.dtb; fi; " \
+ "if test $fdtfile = undefined; then " \
+ "echo WARNING: Could not determine dtb to use; fi; \0" \
+ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "pxefile_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
+ "ramdisk_addr_r=0x13000000\0" \
+ "ramdiskaddr=0x13000000\0" \
+ "scriptaddr=" __stringify(CONFIG_LOADADDR) "\0" \
+ BOOTENV
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 0) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 2) \
+ func(SATA, sata, 0) \
+ func(USB, usb, 0) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
+#include <config_distro_bootcmd.h>