ARM: tegra: implement bootcmd_pxe

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>
This commit is contained in:
Stephen Warren
2014-02-05 09:24:59 -07:00
committed by Tom Warren
parent 4d7d2e570a
commit f940c72e16
4 changed files with 29 additions and 1 deletions

View File

@@ -66,6 +66,20 @@
#define BOOT_TARGETS_DHCP "" #define BOOT_TARGETS_DHCP ""
#endif #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 \ #define BOOTCMDS_COMMON \
"rootpart=1\0" \ "rootpart=1\0" \
\ \
@@ -108,6 +122,7 @@
"boot_targets=" \ "boot_targets=" \
BOOT_TARGETS_MMC " " \ BOOT_TARGETS_MMC " " \
BOOT_TARGETS_USB " " \ BOOT_TARGETS_USB " " \
BOOT_TARGETS_PXE " " \
BOOT_TARGETS_DHCP " " \ BOOT_TARGETS_DHCP " " \
"\0" \ "\0" \
\ \
@@ -117,7 +132,8 @@
\ \
BOOTCMDS_MMC \ BOOTCMDS_MMC \
BOOTCMDS_USB \ BOOTCMDS_USB \
BOOTCMDS_DHCP BOOTCMDS_DHCP \
BOOTCMDS_PXE
#define CONFIG_BOOTCOMMAND \ #define CONFIG_BOOTCOMMAND \
"set usb_need_init; " \ "set usb_need_init; " \

View File

@@ -46,6 +46,9 @@
* scriptaddr can be pretty much anywhere that doesn't conflict with something * scriptaddr can be pretty much anywhere that doesn't conflict with something
* else. Put it above BOOTMAPSZ to eliminate conflicts. * 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_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 * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
* decompress itself to 0x8000 after the start of RAM, kernel_addr_r * decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -63,6 +66,7 @@
*/ */
#define MEM_LAYOUT_ENV_SETTINGS \ #define MEM_LAYOUT_ENV_SETTINGS \
"scriptaddr=0x90000000\0" \ "scriptaddr=0x90000000\0" \
"pxefile_addr_r=0x90100000\0" \
"kernel_addr_r=0x81000000\0" \ "kernel_addr_r=0x81000000\0" \
"fdt_addr_r=0x82000000\0" \ "fdt_addr_r=0x82000000\0" \
"ramdisk_addr_r=0x82100000\0" "ramdisk_addr_r=0x82100000\0"

View File

@@ -44,6 +44,9 @@
* scriptaddr can be pretty much anywhere that doesn't conflict with something * scriptaddr can be pretty much anywhere that doesn't conflict with something
* else. Put it above BOOTMAPSZ to eliminate conflicts. * 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_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 * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
* decompress itself to 0x8000 after the start of RAM, kernel_addr_r * decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -61,6 +64,7 @@
*/ */
#define MEM_LAYOUT_ENV_SETTINGS \ #define MEM_LAYOUT_ENV_SETTINGS \
"scriptaddr=0x10000000\0" \ "scriptaddr=0x10000000\0" \
"pxefile_addr_r=0x10100000\0" \
"kernel_addr_r=0x01000000\0" \ "kernel_addr_r=0x01000000\0" \
"fdt_addr_r=0x02000000\0" \ "fdt_addr_r=0x02000000\0" \
"ramdisk_addr_r=0x02100000\0" "ramdisk_addr_r=0x02100000\0"

View File

@@ -43,6 +43,9 @@
* scriptaddr can be pretty much anywhere that doesn't conflict with something * scriptaddr can be pretty much anywhere that doesn't conflict with something
* else. Put it above BOOTMAPSZ to eliminate conflicts. * 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_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 * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will
* decompress itself to 0x8000 after the start of RAM, kernel_addr_r * decompress itself to 0x8000 after the start of RAM, kernel_addr_r
@@ -60,6 +63,7 @@
*/ */
#define MEM_LAYOUT_ENV_SETTINGS \ #define MEM_LAYOUT_ENV_SETTINGS \
"scriptaddr=0x90000000\0" \ "scriptaddr=0x90000000\0" \
"pxefile_addr_r=0x90100000\0" \
"kernel_addr_r=0x81000000\0" \ "kernel_addr_r=0x81000000\0" \
"fdt_addr_r=0x82000000\0" \ "fdt_addr_r=0x82000000\0" \
"ramdisk_addr_r=0x82100000\0" "ramdisk_addr_r=0x82100000\0"