igep003x: Add netboot support
authorPau Pajuelo <ppajuelo@iseebcn.com>
Sat, 1 Apr 2017 15:19:43 +0000 (17:19 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 8 May 2017 15:57:27 +0000 (11:57 -0400)
netboot allows to boot an external image using TFTP and NFS protocols

Signed-off-by: Pau Pajuelo <ppajuelo@iseebcn.com>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Tested-by: Pau Pajuelo <ppajuel@gmail.com>
include/configs/am335x_igep003x.h

index 1b189887d23df5de627ba3ad0c9563e77b3961c4..55b511c408edc1895aebecb637a626c19edd8d29 100644 (file)
                "run nandargs; " \
                "run nandload; " \
                "bootz ${loadaddr} - ${fdtaddr} \0" \
+       "netload=tftpboot ${loadaddr} ${bootfile}; " \
+               "tftpboot ${fdtaddr} ${fdtfile} \0" \
+       "netargs=setenv bootargs console=${console} " \
+               "${optargs} " \
+               "root=/dev/nfs " \
+               "ip=${ipaddr} nfsroot=${serverip}:${rootnfs},v3,tcp \0" \
+       "netboot=echo Booting from net ...; " \
+               "run netargs; " \
+               "run netload; " \
+               "bootz ${loadaddr} - ${fdtaddr} \0" \
        "findfdt="\
                "if test ${board_name} = igep0033; then " \
                        "setenv fdtfile am335x-igep-base0033.dtb; fi; " \
 #define CONFIG_BOOTCOMMAND \
        "run findfdt;" \
        "run mmcboot;" \
-       "run nandboot;"
+       "run nandboot;" \
+       "run netboot;"
 
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550_COM1                0x44e09000      /* UART0 */