cmd: move CMD_PXE to Kconfig
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 13 Nov 2016 20:59:52 +0000 (21:59 +0100)
committerTom Rini <trini@konsulko.com>
Sat, 3 Dec 2016 18:21:24 +0000 (13:21 -0500)
Currently, CMD_PXE is forcibly enabled in config_distro_defaults.h, so
that general purpose distributions can rely on it being defined. This
header is included, under conditions or not, by various archs or
famillies of archs / SoCs.

However, it is very possible that boards based on those SoCs will not
have a physical ethernet connector at all, even if the have a MAC; for
example, the Nanopi Neo AIR (sunxi H3) does not. It is also possible
that network booting is absolutely not necessary for a device.

However, it is not possible to disable the PXE command, as it is
forcibly enabled and is non-configurable.

But it turns out we already have a config option to build a distro-ready
image, in the name of DISTRO_DEFAULTS.

Move CMD_PXE out of the hard-coded config_distro_defaults.h into a
Kconfig option, that gets selected by DISTRO_DEFAULTS when it is set.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Joe Hershberger <joe.hershberger@ni.com>
[trini: Make it select MENU, run moveconfig.py]
Signed-off-by: Tom Rini <trini@konsulko.com>
19 files changed:
Kconfig
cmd/Kconfig
configs/ls1043aqds_defconfig
configs/ls1043aqds_lpuart_defconfig
configs/ls1043aqds_nand_defconfig
configs/ls1043aqds_nor_ddr3_defconfig
configs/ls1043aqds_qspi_defconfig
configs/ls1043aqds_sdcard_ifc_defconfig
configs/ls1043aqds_sdcard_qspi_defconfig
configs/ls1043ardb_SECURE_BOOT_defconfig
configs/ls1043ardb_defconfig
configs/ls1043ardb_nand_defconfig
configs/ls1043ardb_sdcard_defconfig
include/config_distro_defaults.h
include/configs/am335x_shc.h
include/configs/ls1043a_common.h
include/configs/s32v234evb.h
include/configs/vexpress_aemv8a.h
include/configs/xilinx_zynqmp.h

diff --git a/Kconfig b/Kconfig
index e09b9c3b0351971a8a82ce6ebfe195c7c0307e92..26fd917759ed1e293678fb1ea879280ab17e576f 100644 (file)
--- a/Kconfig
+++ b/Kconfig
@@ -61,6 +61,7 @@ config DISTRO_DEFAULTS
        select CMD_BOOTZ if ARM && !ARM64
        select CMD_BOOTI if ARM64
        select CMD_DHCP
+       select CMD_PXE
        select CMD_EXT2
        select CMD_EXT4
        select CMD_FAT
index bafba6f61c9dce872a6c5507ce5bced69cf0bfc3..586a6456e4f3597e74fef347e3ffbb1841d62abe 100644 (file)
@@ -524,6 +524,12 @@ config CMD_DHCP
        help
          Boot image via network using DHCP/TFTP protocol
 
+config CMD_PXE
+       bool "pxe"
+       select MENU
+       help
+         Boot image via network using PXE protocol
+
 config CMD_NFS
        bool "nfs"
        default y
index 7ca27d7ab2ece29e6f508910aeb333aefdb65883..6ddd54c7f3a51cad171c7f0c7d3a4397a4290541 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index f6efe46a961aa524b19fee67c955ced0ed6565fb..dce9bda43ae76c4b5337ba08d5cca5422725bc0a 100644 (file)
@@ -17,6 +17,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index de0780157c5f524d14d8bed37dbae02b50a2df48..ac6da0ea7a73daf255bbd51d1efab9526573a4f8 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 1f33c881dfa843c75d23b26b5e753e6758e629ed..454701a7dc9d5f062c6e91b71a02664b3f2c7206 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 38abeaf3955a162edfbb4611f6fe5e95baf003ca..f76a698877b58ba65eb201f3e71b7e15942d2429 100644 (file)
@@ -19,6 +19,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 48ea853b9a2368098f5543686354aa895947cd40..22faf715eea46f817b31ff05df6d8d08464afee4 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index fd0922da03221f2b57b148121253fbe223bba3bb..e8e31b66a5b2ac1d7ffc43c4106bf46981be6c12 100644 (file)
@@ -31,6 +31,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 6ee0ad05a91ddf4839912a63459f61649ac5dd7e..6f93612b91568f7336c968bd7e8beb13dc822715 100644 (file)
@@ -13,6 +13,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 79a4eb2ecfd288781bbedb4566e916cb118306f4..9042ac702a271d13a62b52ad016a1c027cf3cbec 100644 (file)
@@ -12,6 +12,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index da69986010074440774d76ee466f4e0651f280b2..9f0c491f9f9824a42cee073cdd9381c294ff3982 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index c0b0a9253e4b3a5986cd999c80434a962368da4b..0b3f2470345d230a8993a36350fc568da005242e 100644 (file)
@@ -26,6 +26,7 @@ CONFIG_CMD_SF=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
+CONFIG_CMD_PXE=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
index 2e24b17b84f214bafd6e57986b540bc58552d79e..f2e87ee2f3a0a86640a04a0d21452fd498ccadb9 100644 (file)
@@ -20,8 +20,6 @@
 #define CONFIG_BOOTP_PXE
 #define CONFIG_BOOTP_SUBNETMASK
 
-#define CONFIG_CMD_PXE
-
 #define CONFIG_CMDLINE_EDITING
 #define CONFIG_AUTO_COMPLETE
 #define CONFIG_SYS_LONGHELP
index 48353e9d3d3dd162056352f945cba12246a7fd8f..32f93d221f01a2eaf2700a46610a234fb71da960 100644 (file)
@@ -21,7 +21,6 @@
 #undef CONFIG_CMD_EXT4_WRITE
 #undef CONFIG_CMD_MMC_SPI
 #undef CONFIG_CMD_SPI
-#undef CONFIG_CMD_PXE
 
 #define CONFIG_CMD_CACHE
 
index 9b20c56d7b37c181e24742f8e58ea920bd3a45a1..c1e3ec67845efca51345962a99efdd20c4ac4a26 100644 (file)
 
 /* Command line configuration */
 #define CONFIG_CMD_ENV
-#define CONFIG_CMD_PXE
 
 /*  MMC  */
 #define CONFIG_MMC
index 631656c0b9d50210bbecc16d18d511621e4e0ca1..9f85fdc11b954516878b2198f9d3299091c18b33 100644 (file)
 
 #if 0
 /* Configure PXE */
-#define CONFIG_CMD_PXE
 #define CONFIG_BOOTP_PXE
 #define CONFIG_BOOTP_PXE_CLIENTARCH    0x100
 #endif
index 733f01170e726100743c13e7cdaaa32fc8ac341b..f026f356f3af3e0c370a35a961a9d1de036503d5 100644 (file)
 
 /*#define CONFIG_MENU_SHOW*/
 #define CONFIG_CMD_UNZIP
-#define CONFIG_CMD_PXE
 #define CONFIG_CMD_ENV
 #define CONFIG_DOS_PARTITION
 
index d0b609549fe266eac0a69fd20e657e08aff31191..d480990d2dd01a9dcf98801bb0bcb51e51c1542f 100644 (file)
@@ -80,9 +80,6 @@
 #endif
 #define CONFIG_AUTO_COMPLETE
 
-/* PXE */
-#define CONFIG_CMD_PXE
-
 #if defined(CONFIG_ZYNQ_SDHCI)
 # define CONFIG_MMC
 # define CONFIG_GENERIC_MMC