[U-Boot] [PATCH] cmd: remove NET and CMD_NET dependency for CMD_PXE

Tom Rini trini at konsulko.com
Mon Oct 28 13:49:46 UTC 2019


On Mon, Oct 28, 2019 at 02:23:19PM +0100, Patrice Chotard wrote:

> 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.
> 
> Signed-off-by: Patrice Chotard <patrice.chotard at st.com>

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:

> ---
> 
>  Kconfig     |  2 +-
>  cmd/Kconfig | 12 ++++++------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/Kconfig b/Kconfig
> index 66b059f749..ce2ad16ea5 100644
> --- a/Kconfig
> +++ b/Kconfig
> @@ -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
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index 07060c63a7..2cb0935632 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -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
> +

We should expand the prompt as well to note that sysboot is in here as
well, if we cannot split.  Thanks!

-- 
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>


More information about the U-Boot mailing list