[U-Boot] implementation of generic distro options

In this set of patches I am adding a generic set of config options for Distros to work with. this enables for simplified support of systems by distros.
I have left out any implementations in this set of patches. I am working to redo all the implementations based on the work done by Stephen Warren in his recent set to base on top of these and his exists work.
Dennis

Signed-off-by: Dennis Gilmore dennis@ausil.us --- common/cmd_pxe.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index c27ec35..20569bb 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -11,6 +11,7 @@ #include <linux/ctype.h> #include <errno.h> #include <linux/list.h> +#include <fs.h>
#include "menu.h"
@@ -160,6 +161,19 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) return -ENOENT; }
+static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) +{ +#ifdef CONFIG_CMD_FS_GENERIC + fs_argv[0] = "load"; + fs_argv[3] = file_addr; + fs_argv[4] = (void *)file_path; + + if (!do_load(cmdtp, 0, 5, fs_argv, FS_TYPE_ANY)) + return 1; +#endif + return -ENOENT; +} + /* * As in pxelinux, paths to files referenced from files we retrieve are * relative to the location of bootfile. get_relfile takes such a path and @@ -1539,6 +1553,8 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) do_getfile = do_get_ext2; else if (strstr(argv[3], "fat")) do_getfile = do_get_fat; + else if (strstr(argv[3], "any")) + do_getfile = do_get_any; else { printf("Invalid filesystem: %s\n", argv[3]); return 1; @@ -1576,7 +1592,7 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( sysboot, 7, 1, do_sysboot, "command to get and boot from syslinux files", - "[-p] <interface> <dev[:part]> <ext2|fat> [addr] [filename]\n" - " - load and parse syslinux menu file 'filename' from ext2 or fat\n" - " filesystem on 'dev' on 'interface' to address 'addr'" + "[-p] <interface> <dev[:part]> <ext2|fat|any> [addr] [filename]\n" + " - load and parse syslinux menu file 'filename' from ext2, fat\n" + " or any filesystem on 'dev' on 'interface' to address 'addr'" );

Dear Dennis Gilmore,
In message 1390501358-4564-2-git-send-email-dennis@ausil.us you wrote:
Signed-off-by: Dennis Gilmore dennis@ausil.us
"add any option for filesystem with sysboot uses generic load" ?
I'm sorry, but I cannot understand what this is supposed to mean.
+#ifdef CONFIG_CMD_FS_GENERIC
Can you please add some documentation to the README what this (so far undocumented) option means?
Thanks.
Wolfgang Denk

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 01/24/2014 08:49 AM, Wolfgang Denk wrote:
Dear Dennis Gilmore,
In message 1390501358-4564-2-git-send-email-dennis@ausil.us you wrote:
Signed-off-by: Dennis Gilmore dennis@ausil.us
"add any option for filesystem with sysboot uses generic load" ?
I'm sorry, but I cannot understand what this is supposed to mean.
+#ifdef CONFIG_CMD_FS_GENERIC
Can you please add some documentation to the README what this (so far undocumented) option means?
For the record, this is another (relatively) long-standing undocumented option.
- -- Tom

On 01/24/2014 06:59 AM, Tom Rini wrote:
On 01/24/2014 08:49 AM, Wolfgang Denk wrote:
Dear Dennis Gilmore,
In message 1390501358-4564-2-git-send-email-dennis@ausil.us you wrote:
Signed-off-by: Dennis Gilmore dennis@ausil.us
"add any option for filesystem with sysboot uses generic load" ?
I'm sorry, but I cannot understand what this is supposed to mean.
+#ifdef CONFIG_CMD_FS_GENERIC
Can you please add some documentation to the README what this (so far undocumented) option means?
For the record, this is another (relatively) long-standing undocumented option.
Just so this thread is up-to-date, I have sent patch "README: document CONFIG_CMD_FS_GENERIC" to resolve this objection.

describe a set of default features that distros can rely on being available. having this common definition means that distros can easily support systems implementing them.
Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/config_distro_defaults.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/config_distro_defaults.h
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h new file mode 100644 index 0000000..7b13586 --- /dev/null +++ b/include/config_distro_defaults.h @@ -0,0 +1,55 @@ +/* + * Copyright 2013 Red Hat, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _CONFIG_CMD_DISTRO_DEFAULT_H +#define _CONFIG_CMD_DISTRO_DEFAULT_H + +/* + * List of all commands and options that when defined enables support for features + * required by distros to support boards in a standardised and consitant manner. + */ + +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_SUBNETMASK + +#if defined(__arm__) +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7" +#else +#define CONFIG_BOOTP_VCI_STRING "U-boot.arm" +#endif +#endif + +#define CONFIG_OF_LIBFDT + +#define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ELF +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_MII +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING +#define CONFIG_CMD_PXE + +#define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE +#define CONFIG_BOOTDELAY 2 +#define CONFIG_SYS_LONGHELP +#define CONFIG_MENU +#define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION +#define CONFIG_SUPPORT_RAW_INITRD +#define CONFIG_SYS_HUSH_PARSER + +#endif /* _CONFIG_CMD_DISTRO_DEFAULT_H */

On 01/23/2014 11:22 AM, Dennis Gilmore wrote:
describe a set of default features that distros can rely on being available. having this common definition means that distros can easily support systems implementing them.
The series, Tested-by: Stephen Warren swarren@nvidia.com Reviewed-by: Stephen Warren swarren@nvidia.com
with one tiny nit:
diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
+#ifndef _CONFIG_CMD_DISTRO_DEFAULT_H +#define _CONFIG_CMD_DISTRO_DEFAULT_H
This file got renamed from config_distro_default.h in the RFC to config_distro_defaults.h in this patch, but the include guard wasn't updated.

Dear Dennis Gilmore,
In message 1390501358-4564-3-git-send-email-dennis@ausil.us you wrote:
describe a set of default features that distros can rely on being available. having this common definition means that distros can easily support systems implementing them.
Signed-off-by: Dennis Gilmore dennis@ausil.us
include/config_distro_defaults.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/config_distro_defaults.h
For this patch set this adds dead code. Please resubmit as part of a series that actually uses this.
Best regards,
Wolfgang Denk

Hi Wolfgang,
El Fri, 24 Jan 2014 14:50:10 +0100 Wolfgang Denk wd@denx.de escribió:
Dear Dennis Gilmore,
In message 1390501358-4564-3-git-send-email-dennis@ausil.us you wrote:
describe a set of default features that distros can rely on being available. having this common definition means that distros can easily support systems implementing them.
Signed-off-by: Dennis Gilmore dennis@ausil.us
include/config_distro_defaults.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/config_distro_defaults.h
For this patch set this adds dead code. Please resubmit as part of a series that actually uses this.
in the cover email i put """ I have left out any implementations in this set of patches. I am working to redo all the implementations based on the work done by Stephen Warren in his recent set to base on top of these and his exists work. """
Stephen has submitted patches that use this code. and I will be submitting further patches that use it in the next few days.
I will be submitting a V2 that fixes Stephens comment
Dennis
Best regards,
Wolfgang Denk
-

On 01/24/2014 07:58 AM, Dennis Gilmore wrote:
Hi Wolfgang,
El Fri, 24 Jan 2014 14:50:10 +0100 Wolfgang Denk wd@denx.de escribió:
Dear Dennis Gilmore,
In message 1390501358-4564-3-git-send-email-dennis@ausil.us you wrote:
describe a set of default features that distros can rely on being available. having this common definition means that distros can easily support systems implementing them.
Signed-off-by: Dennis Gilmore dennis@ausil.us
include/config_distro_defaults.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/config_distro_defaults.h
For this patch set this adds dead code. Please resubmit as part of a series that actually uses this.
in the cover email i put """ I have left out any implementations in this set of patches. I am working to redo all the implementations based on the work done by Stephen Warren in his recent set to base on top of these and his exists work. """
Stephen has submitted patches that use this code. and I will be submitting further patches that use it in the next few days.
Wolfgang, is this OK (Dennis submitting patches that adds a feature, and my submitting a separate series that uses it, all sent to the mailing list at the same time and applied together)? Or, do I need to physically send Dennis's patches in the same series as my patches?
I will be submitting a V2 that fixes Stephens comment
Dennis, I don't think I saw V2 of this series?
participants (4)
-
Dennis Gilmore
-
Stephen Warren
-
Tom Rini
-
Wolfgang Denk