]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx: cx9020: try pxe boot, if no vmlinuz on mmc
authorPatrick Bruenn <p.bruenn@beckhoff.com>
Tue, 11 Jul 2017 09:23:21 +0000 (11:23 +0200)
committerStefano Babic <sbabic@denx.de>
Wed, 12 Jul 2017 08:29:57 +0000 (10:29 +0200)
If no vmlinuz is found on mmc, try to boot from pxe.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
configs/mx53cx9020_defconfig
include/configs/mx53cx9020.h

index e0c597cbe251b409a9716e5674bd9093ae01dae5..9609647f0b217aa2e20bd60f47c7db52749a75d3 100644 (file)
@@ -18,6 +18,7 @@ CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_PXE=y
 CONFIG_OF_CONTROL=y
 CONFIG_FPGA_ALTERA=y
 CONFIG_FPGA_CYCLON2=y
index b056298d9a1959ab8b471316045e300e27876e0c..cff1462d00835f76c6e14988c3a4e2efe5ea624b 100644 (file)
@@ -67,6 +67,7 @@
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
        "fdt_addr_r=0x71ff0000\0" \
+       "pxefile_addr_r=0x73000000\0" \
        "ramdisk_addr_r=0x72000000\0" \
        "console=ttymxc1,115200\0" \
        "uenv=/boot/uEnv.txt\0" \
@@ -81,6 +82,7 @@
                "rootfstype=${mmcrootfstype} " \
                "${cmdline}\0" \
        "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
+       "loadpxe=dhcp;setenv kernel_addr_r ${loadaddr};pxe get;pxe boot;\0" \
        "loadrd=load mmc ${bootpart} ${ramdisk_addr_r} ${bootdir}/${rdfile};" \
                "setenv rdsize ${filesize}\0" \
        "loadfdt=echo loading ${fdt_path} ...;" \
                        "echo debug: [${bootargs}] ... ;" \
                        "echo debug: [bootz ${loadaddr} - ${fdt_addr_r}];" \
                        "bootz ${loadaddr} - ${fdt_addr_r}; " \
+               "else " \
+                       "echo loading from dhcp ...; " \
+                       "run loadpxe; " \
                "fi;\0"
 
 #define CONFIG_BOOTCOMMAND \