Skip to contentSkip to conversation

cmd: move CMD_PXE to Kconfig

PATCH New Yann E. MORIN 4 participants 8 messages Nov 13, 2016 – Nov 29, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 Kconfig                          | 1 +
 cmd/Kconfig                      | 5 +++++
 include/config_distro_defaults.h | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)
Kconfig +1 -0
index 1263d0b..5421cd3 100644
@@ -60,6 +60,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
cmd/Kconfig +5 -0
index e339d86..95f5ce6 100644
@@ -496,6 +496,11 @@ config CMD_DHCP
 	help
 	  Boot image via network using DHCP/TFTP protocol
 
+config CMD_PXE
+	bool "pxe"
+	help
+	  Boot image via network using PXE protocol
+
 config CMD_NFS
 	bool "nfs"
 	default y
include/config_distro_defaults.h +0 -2
index b5efab5..01cd6d9 100644
@@ -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
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Quoted 13 lines · Yann E. MORIN

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.

Quoted 8 lines

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.

I like this, but do you not also need to run moveconfig.py on this patch?

Thanks,
-Joe

#2 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Joe, All,

On 2016-11-14 21:15 -0600, Joe Hershberger spake thusly:

Quoted 17 lines · Yann E. MORIN
Quoted 16 lines

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.

Quoted 7 lines
Quoted 5 lines

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.

I like this, but do you not also need to run moveconfig.py on this patch?

Ack. I was not aware of this tool. I will run it and if it does change any defconfig, I'll repost. If nothing is changed, I'll just reply to this thread. OK?

Should the defconfig update be a separate patch, or should it be squashed into this one?

Thanks for the feedback! :-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Quoted 23 lines · Yann E. MORIN

Joe, All,

On 2016-11-14 21:15 -0600, Joe Hershberger spake thusly:

Quoted 20 lines · Yann E. MORIN
Quoted 19 lines

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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I like this, but do you not also need to run moveconfig.py on this patch?

Ack. I was not aware of this tool. I will run it and if it does change any defconfig, I'll repost. If nothing is changed, I'll just reply to this thread. OK?

Sure.

Quoted 2 lines

Should the defconfig update be a separate patch, or should it be squashed into this one?

I think most that I have seen it is squashed (though I prefer to create a real patch first to run it against and squash later - I know others prefer to run it against a working directory).

Quoted 12 lines

Thanks for the feedback! :-)

Regards,
Yann E. MORIN.

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

#4 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Quoted 33 lines · Joe Hershberger
Quoted 23 lines · Yann E. MORIN

Joe, All,

On 2016-11-14 21:15 -0600, Joe Hershberger spake thusly:

Quoted 20 lines · Yann E. MORIN
Quoted 19 lines

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.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

I like this, but do you not also need to run moveconfig.py on this patch?

Ack. I was not aware of this tool. I will run it and if it does change any defconfig, I'll repost. If nothing is changed, I'll just reply to this thread. OK?

Quoted 8 lines

Sure.

Quoted 2 lines

Should the defconfig update be a separate patch, or should it be squashed into this one?

I think most that I have seen it is squashed (though I prefer to create a real patch first to run it against and squash later - I know others prefer to run it against a working directory).

So I'm stepping in here. I'm close to being able to take the original patch as-is, the main problems with it were what I addressed in a series earlier today, that MENU and CMD_BOOTMENU need to be migrated and a number of platforms that are using config_distro_defaults.h and config_distro_bootcmd.h but were not enabling CONFIG_DISTRO_DEFAULTS so had lost various features. With these two in, and a minor change to this patch to have it select MENU, everything is good, and I'll take it.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/4a0ede54/attachment.sig>
#5 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

In reply to Yann E. MORIN
Quoted 10 lines · Yann E. MORIN

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.

Quoted 8 lines

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.

So this changes the default expectation on all boards that currently use distro defaults?

Quoted 56 lines
---
 Kconfig                          | 1 +
 cmd/Kconfig                      | 5 +++++
 include/config_distro_defaults.h | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)
Kconfig +1 -0
index 1263d0b..5421cd3 100644
@@ -60,6 +60,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
cmd/Kconfig +5 -0
index e339d86..95f5ce6 100644
@@ -496,6 +496,11 @@ config CMD_DHCP
        help
          Boot image via network using DHCP/TFTP protocol
 
+config CMD_PXE
+       bool "pxe"
+       help
+         Boot image via network using PXE protocol
+
 config CMD_NFS
        bool "nfs"
        default y
include/config_distro_defaults.h +0 -3
index b5efab5..01cd6d9 100644
@@ -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
--

2.7.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Peter, All,

On 2016-11-16 14:04 +0000, Peter Robinson spake thusly:

Quoted 14 lines · Yann E. MORIN
Quoted 13 lines

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.

Quoted 8 lines
Quoted 5 lines

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.

So this changes the default expectation on all boards that currently use distro defaults?

Well, I'm not totally aware of all the implications of such a change, but my analysis is:

- CONFIG_CMD_PXE was in include/config_distro_defaults.h, which to my

    poor little brain means "we want that as a distro default";

- CONFIG_CMD_PXE is now enabled by CONFIG_DISTRO_DEFAULTS, which means the same (and the help text confirms that).

So, it looks to me that the expected behaviour does not change. In theory! ;-)

Now, I may well have missed something, in which case I always accept being enlighten; just point me to the pieces I missed (totally possible, I'm new in U-Boot land!).

I'm running buildman on all configs right now, on current master (but it takes a lot of time...). Once this is done, I'll re-run it on my change. From what I understand, buildman should point me to boards which are affected by the change, right? When we have that list, we can assess whether it is acceptable or not.

Thanks! :-)

Regards,
Yann E. MORIN.

Quoted 56 lines
Quoted 56 lines
---
 Kconfig                          | 1 +
 cmd/Kconfig                      | 5 +++++
 include/config_distro_defaults.h | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)
Kconfig +1 -0
index 1263d0b..5421cd3 100644
@@ -60,6 +60,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
cmd/Kconfig +5 -0
index e339d86..95f5ce6 100644
@@ -496,6 +496,11 @@ config CMD_DHCP
        help
          Boot image via network using DHCP/TFTP protocol
 
+config CMD_PXE
+       bool "pxe"
+       help
+         Boot image via network using PXE protocol
+
 config CMD_NFS
        bool "nfs"
        default y
include/config_distro_defaults.h +0 -3
index b5efab5..01cd6d9 100644
@@ -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
--

2.7.4

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/1 cmd: move CMD_PXE to Kconfig

Quoted 42 lines · Yann E. MORIN

Peter, All,

On 2016-11-16 14:04 +0000, Peter Robinson spake thusly:

Quoted 14 lines · Yann E. MORIN
Quoted 13 lines

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.

Quoted 8 lines
Quoted 5 lines

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.

So this changes the default expectation on all boards that currently use distro defaults?

Well, I'm not totally aware of all the implications of such a change, but my analysis is:

- CONFIG_CMD_PXE was in include/config_distro_defaults.h, which to my

    poor little brain means "we want that as a distro default";

- CONFIG_CMD_PXE is now enabled by CONFIG_DISTRO_DEFAULTS, which means the same (and the help text confirms that).

So, it looks to me that the expected behaviour does not change. In theory! ;-)

Now, I may well have missed something, in which case I always accept being enlighten; just point me to the pieces I missed (totally possible, I'm new in U-Boot land!).

Quoted 5 lines

I'm running buildman on all configs right now, on current master (but it takes a lot of time...). Once this is done, I'll re-run it on my change. From what I understand, buildman should point me to boards which are affected by the change, right? When we have that list, we can assess whether it is acceptable or not.

The --show-config option on buildman will tell you about boards that have changes configs.

Quoted 73 lines

Thanks! :-)

Regards,
Yann E. MORIN.

Quoted 52 lines
Quoted 52 lines
---
 Kconfig                          | 1 +
 cmd/Kconfig                      | 5 +++++
 include/config_distro_defaults.h | 2 --
 3 files changed, 6 insertions(+), 2 deletions(-)
Kconfig +1 -0
index 1263d0b..5421cd3 100644
@@ -60,6 +60,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
cmd/Kconfig +5 -0
index e339d86..95f5ce6 100644
@@ -496,6 +496,11 @@ config CMD_DHCP
        help
          Boot image via network using DHCP/TFTP protocol
 
+config CMD_PXE
+       bool "pxe"
+       help
+         Boot image via network using PXE protocol
+
 config CMD_NFS
        bool "nfs"
        default y
include/config_distro_defaults.h +0 -3
index b5efab5..01cd6d9 100644
@@ -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
--

2.7.4

Quoted 4 lines
Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

--
.-----------------.--------------------.------------------.--------------------.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot