pico-imx6ul: Add NFS boot support
authorDiego Dorta <diego.dorta@nxp.com>
Wed, 15 Jun 2016 16:53:41 +0000 (13:53 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 12 Jul 2016 15:58:50 +0000 (17:58 +0200)
Add script for retrieving the kernel via TFTP and mounting the
rootfs via NFS.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Acked-by: Fabio Estevam <fabio.estevam@nxp.com>
include/configs/pico-imx6ul.h

index db78a54..f8fe230 100644 (file)
                        "bootz ${loadaddr} - ${fdt_addr}; " \
                "else " \
                        "echo WARN: Cannot load the DT; " \
-               "fi;\0"
+               "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 \
           "if mmc rescan; then " \