cmd: remove NET and CMD_NET dependency for CMD_PXE
PATCH 1/1 cmd: remove NET and CMD_NET dependency for CMD_PXE
It allows to use sysboot command on board which have no NET support.
Currently, sysboot command can't be used if CMD_NET and NET flags are not set, while sysboot allows to load extlinux.conf file from local filesystem, so it doesn't need to depend of CMD_NET and NET flags.
One solution would be to put sysboot command's code outside pxe.c and create a new sysboot.c file. But sysboot command code is imbricated with pxe command code and as all CMD_NET relative code is already under CMD_NET flag, the easiest way to break sysboot dependency with CMD_NET and NET flags is to move CMD_PXE outside CMD_NET and NET section in Kconfig.
---
Kconfig | 2 +- cmd/Kconfig | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)
Kconfig +1 -1
@@ -87,7 +87,7 @@ config DISTRO_DEFAULTS select CMD_FS_GENERIC select CMD_PART if PARTITIONS select CMD_PING if CMD_NET - select CMD_PXE if NET + select CMD_PXE select ENV_VARS_UBOOT_CONFIG select HUSH_PARSER select SUPPORT_RAW_INITRD
cmd/Kconfig +6 -6
@@ -1499,12 +1499,6 @@ config CMD_ETHSW operations such as enabling / disabling a port and viewing/maintaining the filtering database (FDB) -config CMD_PXE - bool "pxe" - select MENU - help - Boot image via network using PXE protocol - config CMD_WOL bool "wol" help
@@ -1636,6 +1630,12 @@ config CMD_MISC help Delay execution for some time +config CMD_PXE + bool "pxe" + select MENU + help + Boot image via network using PXE protocol or via local extlinux.conf file + config MP bool "support for multiprocessor" help
Signature · 1 line
2.17.1
PATCH 1/1 cmd: remove NET and CMD_NET dependency for CMD_PXE
Quoted 6 lines · Patrice Chotard
It allows to use sysboot command on board which have no NET support.
Currently, sysboot command can't be used if
CMD_NETand NET flags are not set, while sysboot allows to load extlinux.conf file from local filesystem, so it doesn't need to depend ofCMD_NETand NET flags.
Quoted 8 lines
One solution would be to put sysboot command's code outside
pxe.cand create a newsysboot.cfile. But sysboot command code is imbricated with pxe command code and as allCMD_NETrelative code is already underCMD_NETflag, the easiest way to break sysboot dependency withCMD_NETand NET flags is to moveCMD_PXEoutsideCMD_NETand NET section inKconfig.Signed-off-by Patrice Chotard <[email protected]>
How far did you go down the path of making cmd/sysboot.c or similar? Since it's not obvious unless you're already in here that the extlinux.conf stuff is inside pxe, it really would be good to split things out. If you even have a rough draft patch to look at that would be great. Also:
Quoted 37 lines
---
Kconfig | 2 +- cmd/Kconfig | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)Kconfig +1
-1@@ -87,7 +87,7 @@ config DISTRO_DEFAULTS select CMD_FS_GENERIC select CMD_PART if PARTITIONS select CMD_PING if CMD_NET - select CMD_PXE if NET + select CMD_PXE select ENV_VARS_UBOOT_CONFIG select HUSH_PARSER select SUPPORT_RAW_INITRDcmd/Kconfig +0
-6@@ -1499,12 +1499,6 @@ config CMD_ETHSW operations such as enabling / disabling a port and viewing/maintaining the filtering database (FDB) -config CMD_PXE - bool "pxe" - select MENU - help - Boot image via network using PXE protocol - config CMD_WOL bool "wol" help
cmd/Kconfig config CMD_MISC · line 1638
Quoted 9 lines
cmd/Kconfig +6
-0@@ -1636,6 +1630,12 @@ config CMD_MISC help Delay execution for some time +config CMD_PXE + bool "pxe" + select MENU + help + Boot image via network using PXE protocol or via local extlinux.conf file +
We should expand the prompt as well to note that sysboot is in here as well, if we cannot split. Thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191028/e388f5e1/attachment.sig>
PATCH 1/1 cmd: remove NET and CMD_NET dependency for CMD_PXE
Hi Tom
Quoted 15 lines · Tom Rini
Quoted 13 lines · Patrice Chotard
It allows to use sysboot command on board which have no NET support.
Currently, sysboot command can't be used if
CMD_NETand NET flags are not set, while sysboot allows to load extlinux.conf file from local filesystem, so it doesn't need to depend ofCMD_NETand NET flags.One solution would be to put sysboot command's code outside
pxe.cand create a newsysboot.cfile. But sysboot command code is imbricated with pxe command code and as allCMD_NETrelative code is already underCMD_NETflag, the easiest way to break sysboot dependency withCMD_NETand NET flags is to moveCMD_PXEoutsideCMD_NETand NET section inKconfig.
Quoted 5 lines
Quoted 1 line
Signed-off-by Patrice Chotard <[email protected]>How far did you go down the path of making
cmd/sysboot.cor similar? Since it's not obvious unless you're already in here that the extlinux.conf stuff is inside pxe, it really would be good to split things out. If you even have a rough draft patch to look at that would
As explained, this implementation was the easiest way ... but ok i will split out
sysboot code from pxe one, and put common code into a new file.
Thanks
Patrice
Quoted 51 lines
be great. Also:
Quoted 37 lines
---
Kconfig | 2 +- cmd/Kconfig | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-)Kconfig +1
-1@@ -87,7 +87,7 @@ config DISTRO_DEFAULTS select CMD_FS_GENERIC select CMD_PART if PARTITIONS select CMD_PING if CMD_NET - select CMD_PXE if NET + select CMD_PXE select ENV_VARS_UBOOT_CONFIG select HUSH_PARSER select SUPPORT_RAW_INITRDcmd/Kconfig +0
-6@@ -1499,12 +1499,6 @@ config CMD_ETHSW operations such as enabling / disabling a port and viewing/maintaining the filtering database (FDB) -config CMD_PXE - bool "pxe" - select MENU - help - Boot image via network using PXE protocol - config CMD_WOL bool "wol" helpcmd/Kconfig config CMD_MISC · line 1638
Quoted 9 lines
cmd/Kconfig +6
-0@@ -1636,6 +1630,12 @@ config CMD_MISC help Delay execution for some time +config CMD_PXE + bool "pxe" + select MENU + help + Boot image via network using PXE protocol or via local extlinux.conf file +We should expand the prompt as well to note that sysboot is in here as well, if we cannot split. Thanks!