ARM: tegra: implement bootcmd_pxe
authorStephen Warren <swarren@nvidia.com>
Wed, 5 Feb 2014 16:24:59 +0000 (09:24 -0700)
committerTom Warren <twarren@nvidia.com>
Wed, 5 Mar 2014 23:59:08 +0000 (16:59 -0700)
This retrieves a PXE config file over the network, and executes it. This
allows an extlinux config file  to be retrieved over the network and
executed, whereas the existing bootcmd_dhcp retrieves a U-Boot script.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
include/configs/tegra-common-post.h
include/configs/tegra114-common.h
include/configs/tegra20-common.h
include/configs/tegra30-common.h

index 3bf55ce428f204a6699a50798e5c5436fb44b8a1..76dad4e88cd932da1b803ad80badc74f748ffd22 100644 (file)
 #define BOOT_TARGETS_DHCP ""
 #endif
 
+#if defined(CONFIG_CMD_DHCP) && defined(CONFIG_CMD_PXE)
+#define BOOTCMDS_PXE \
+       "bootcmd_pxe=" \
+               BOOTCMD_INIT_USB \
+               "dhcp; " \
+               "if pxe get; then " \
+                       "pxe boot; " \
+               "fi\0"
+#define BOOT_TARGETS_PXE "pxe"
+#else
+#define BOOTCMDS_PXE ""
+#define BOOT_TARGETS_PXE ""
+#endif
+
 #define BOOTCMDS_COMMON \
        "rootpart=1\0" \
        \
        "boot_targets=" \
                BOOT_TARGETS_MMC " " \
                BOOT_TARGETS_USB " " \
+               BOOT_TARGETS_PXE " " \
                BOOT_TARGETS_DHCP " " \
                "\0" \
        \
        \
        BOOTCMDS_MMC \
        BOOTCMDS_USB \
-       BOOTCMDS_DHCP
+       BOOTCMDS_DHCP \
+       BOOTCMDS_PXE
 
 #define CONFIG_BOOTCOMMAND \
        "set usb_need_init; " \
index 17546d42bd7b7b981ee009fd152291da2f779891..555c237cbf1c56bd29ed4283b5cb8391a841ba7b 100644 (file)
@@ -46,6 +46,9 @@
  * scriptaddr can be pretty much anywhere that doesn't conflict with something
  *   else. Put it above BOOTMAPSZ to eliminate conflicts.
  *
+ * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
+ *   something else. Put it above BOOTMAPSZ to eliminate conflicts.
+ *
  * kernel_addr_r must be within the first 128M of RAM in order for the
  *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
  *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -63,6 +66,7 @@
  */
 #define MEM_LAYOUT_ENV_SETTINGS \
        "scriptaddr=0x90000000\0" \
+       "pxefile_addr_r=0x90100000\0" \
        "kernel_addr_r=0x81000000\0" \
        "fdt_addr_r=0x82000000\0" \
        "ramdisk_addr_r=0x82100000\0"
index 5501c6ef0c3fb78d5161f24db309cdffac6dc52b..21bf9771742424dcf4da509e8550a2964b585b0a 100644 (file)
@@ -44,6 +44,9 @@
  * scriptaddr can be pretty much anywhere that doesn't conflict with something
  *   else. Put it above BOOTMAPSZ to eliminate conflicts.
  *
+ * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
+ *   something else. Put it above BOOTMAPSZ to eliminate conflicts.
+ *
  * kernel_addr_r must be within the first 128M of RAM in order for the
  *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
  *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -61,6 +64,7 @@
  */
 #define MEM_LAYOUT_ENV_SETTINGS \
        "scriptaddr=0x10000000\0" \
+       "pxefile_addr_r=0x10100000\0" \
        "kernel_addr_r=0x01000000\0" \
        "fdt_addr_r=0x02000000\0" \
        "ramdisk_addr_r=0x02100000\0"
index 0835bc8d85ae33178ca61cd71740102352d315b9..443c842240ede89b0e7cba4fd51b278877e95886 100644 (file)
@@ -43,6 +43,9 @@
  * scriptaddr can be pretty much anywhere that doesn't conflict with something
  *   else. Put it above BOOTMAPSZ to eliminate conflicts.
  *
+ * pxefile_addr_r can be pretty much anywhere that doesn't conflict with
+ *   something else. Put it above BOOTMAPSZ to eliminate conflicts.
+ *
  * kernel_addr_r must be within the first 128M of RAM in order for the
  *   kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
  *   decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -60,6 +63,7 @@
  */
 #define MEM_LAYOUT_ENV_SETTINGS \
        "scriptaddr=0x90000000\0" \
+       "pxefile_addr_r=0x90100000\0" \
        "kernel_addr_r=0x81000000\0" \
        "fdt_addr_r=0x82000000\0" \
        "ramdisk_addr_r=0x82100000\0"