Commit bfb380b30ad2d678c09037560abb6f09a5e9c9b6

Authored by Yann E. MORIN
Committed by Tom Rini
1 parent 3337e3af5d

cmd: move CMD_PXE to Kconfig

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>

Showing 19 changed files with 18 additions and 9 deletions Side-by-side Diff

... ... @@ -61,6 +61,7 @@
61 61 select CMD_BOOTZ if ARM && !ARM64
62 62 select CMD_BOOTI if ARM64
63 63 select CMD_DHCP
  64 + select CMD_PXE
64 65 select CMD_EXT2
65 66 select CMD_EXT4
66 67 select CMD_FAT
... ... @@ -524,6 +524,12 @@
524 524 help
525 525 Boot image via network using DHCP/TFTP protocol
526 526  
  527 +config CMD_PXE
  528 + bool "pxe"
  529 + select MENU
  530 + help
  531 + Boot image via network using PXE protocol
  532 +
527 533 config CMD_NFS
528 534 bool "nfs"
529 535 default y
configs/ls1043aqds_defconfig
... ... @@ -16,6 +16,7 @@
16 16 CONFIG_CMD_I2C=y
17 17 CONFIG_CMD_USB=y
18 18 CONFIG_CMD_DHCP=y
  19 +CONFIG_CMD_PXE=y
19 20 CONFIG_CMD_MII=y
20 21 CONFIG_CMD_PING=y
21 22 CONFIG_CMD_CACHE=y
configs/ls1043aqds_lpuart_defconfig
... ... @@ -17,6 +17,7 @@
17 17 CONFIG_CMD_I2C=y
18 18 CONFIG_CMD_USB=y
19 19 CONFIG_CMD_DHCP=y
  20 +CONFIG_CMD_PXE=y
20 21 CONFIG_CMD_MII=y
21 22 CONFIG_CMD_PING=y
22 23 CONFIG_CMD_CACHE=y
configs/ls1043aqds_nand_defconfig
... ... @@ -30,6 +30,7 @@
30 30 CONFIG_CMD_I2C=y
31 31 CONFIG_CMD_USB=y
32 32 CONFIG_CMD_DHCP=y
  33 +CONFIG_CMD_PXE=y
33 34 CONFIG_CMD_MII=y
34 35 CONFIG_CMD_PING=y
35 36 CONFIG_CMD_CACHE=y
configs/ls1043aqds_nor_ddr3_defconfig
... ... @@ -16,6 +16,7 @@
16 16 CONFIG_CMD_I2C=y
17 17 CONFIG_CMD_USB=y
18 18 CONFIG_CMD_DHCP=y
  19 +CONFIG_CMD_PXE=y
19 20 CONFIG_CMD_MII=y
20 21 CONFIG_CMD_PING=y
21 22 CONFIG_CMD_CACHE=y
configs/ls1043aqds_qspi_defconfig
... ... @@ -19,6 +19,7 @@
19 19 CONFIG_CMD_I2C=y
20 20 CONFIG_CMD_USB=y
21 21 CONFIG_CMD_DHCP=y
  22 +CONFIG_CMD_PXE=y
22 23 CONFIG_CMD_MII=y
23 24 CONFIG_CMD_PING=y
24 25 CONFIG_CMD_CACHE=y
configs/ls1043aqds_sdcard_ifc_defconfig
... ... @@ -30,6 +30,7 @@
30 30 CONFIG_CMD_I2C=y
31 31 CONFIG_CMD_USB=y
32 32 CONFIG_CMD_DHCP=y
  33 +CONFIG_CMD_PXE=y
33 34 CONFIG_CMD_MII=y
34 35 CONFIG_CMD_PING=y
35 36 CONFIG_CMD_CACHE=y
configs/ls1043aqds_sdcard_qspi_defconfig
... ... @@ -31,6 +31,7 @@
31 31 CONFIG_CMD_I2C=y
32 32 CONFIG_CMD_USB=y
33 33 CONFIG_CMD_DHCP=y
  34 +CONFIG_CMD_PXE=y
34 35 CONFIG_CMD_MII=y
35 36 CONFIG_CMD_PING=y
36 37 CONFIG_CMD_CACHE=y
configs/ls1043ardb_SECURE_BOOT_defconfig
... ... @@ -13,6 +13,7 @@
13 13 CONFIG_CMD_I2C=y
14 14 CONFIG_CMD_USB=y
15 15 CONFIG_CMD_DHCP=y
  16 +CONFIG_CMD_PXE=y
16 17 CONFIG_CMD_MII=y
17 18 CONFIG_CMD_PING=y
18 19 CONFIG_CMD_CACHE=y
configs/ls1043ardb_defconfig
... ... @@ -12,6 +12,7 @@
12 12 CONFIG_CMD_I2C=y
13 13 CONFIG_CMD_USB=y
14 14 CONFIG_CMD_DHCP=y
  15 +CONFIG_CMD_PXE=y
15 16 CONFIG_CMD_MII=y
16 17 CONFIG_CMD_PING=y
17 18 CONFIG_CMD_CACHE=y
configs/ls1043ardb_nand_defconfig
... ... @@ -26,6 +26,7 @@
26 26 CONFIG_CMD_I2C=y
27 27 CONFIG_CMD_USB=y
28 28 CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_PXE=y
29 30 CONFIG_CMD_MII=y
30 31 CONFIG_CMD_PING=y
31 32 CONFIG_CMD_CACHE=y
configs/ls1043ardb_sdcard_defconfig
... ... @@ -26,6 +26,7 @@
26 26 CONFIG_CMD_I2C=y
27 27 CONFIG_CMD_USB=y
28 28 CONFIG_CMD_DHCP=y
  29 +CONFIG_CMD_PXE=y
29 30 CONFIG_CMD_MII=y
30 31 CONFIG_CMD_PING=y
31 32 CONFIG_CMD_CACHE=y
include/config_distro_defaults.h
... ... @@ -20,8 +20,6 @@
20 20 #define CONFIG_BOOTP_PXE
21 21 #define CONFIG_BOOTP_SUBNETMASK
22 22  
23   -#define CONFIG_CMD_PXE
24   -
25 23 #define CONFIG_CMDLINE_EDITING
26 24 #define CONFIG_AUTO_COMPLETE
27 25 #define CONFIG_SYS_LONGHELP
include/configs/am335x_shc.h
... ... @@ -21,7 +21,6 @@
21 21 #undef CONFIG_CMD_EXT4_WRITE
22 22 #undef CONFIG_CMD_MMC_SPI
23 23 #undef CONFIG_CMD_SPI
24   -#undef CONFIG_CMD_PXE
25 24  
26 25 #define CONFIG_CMD_CACHE
27 26  
include/configs/ls1043a_common.h
... ... @@ -145,7 +145,6 @@
145 145  
146 146 /* Command line configuration */
147 147 #define CONFIG_CMD_ENV
148   -#define CONFIG_CMD_PXE
149 148  
150 149 /* MMC */
151 150 #define CONFIG_MMC
include/configs/s32v234evb.h
... ... @@ -214,7 +214,6 @@
214 214  
215 215 #if 0
216 216 /* Configure PXE */
217   -#define CONFIG_CMD_PXE
218 217 #define CONFIG_BOOTP_PXE
219 218 #define CONFIG_BOOTP_PXE_CLIENTARCH 0x100
220 219 #endif
include/configs/vexpress_aemv8a.h
... ... @@ -127,7 +127,6 @@
127 127  
128 128 /*#define CONFIG_MENU_SHOW*/
129 129 #define CONFIG_CMD_UNZIP
130   -#define CONFIG_CMD_PXE
131 130 #define CONFIG_CMD_ENV
132 131 #define CONFIG_DOS_PARTITION
133 132  
include/configs/xilinx_zynqmp.h
... ... @@ -80,9 +80,6 @@
80 80 #endif
81 81 #define CONFIG_AUTO_COMPLETE
82 82  
83   -/* PXE */
84   -#define CONFIG_CMD_PXE
85   -
86 83 #if defined(CONFIG_ZYNQ_SDHCI)
87 84 # define CONFIG_MMC
88 85 # define CONFIG_GENERIC_MMC