V2 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. Fixed in V2 is updating the guard to match the renamed filename since the RFC series.
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
PATCH v2 1/2 cmd_pxe.c add any option for filesystem with sysboot uses generic load
--- common/cmd_pxe.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
common/cmd_pxe.c +19 -3
@@ -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'" );
Signature · 1 line
1.8.5.3
PATCH v2 1/2 cmd_pxe.c add any option for filesystem with sysboot uses generic load
Quoted 1 line · Dennis Gilmore
Signed-off-by Dennis Gilmore <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140204/4c5ac608/attachment.pgp>
PATCH v2 2/2 config: add config_distro_defaults.h
In reply to Dennis Gilmoredescribe 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.
--- include/config_distro_defaults.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/config_distro_defaults.h
include/config_distro_defaults.h new file +55 -0
@@ -0,0 +1,55 @@ +/* +* Copyright 2013-2014 Red Hat, Inc. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _CONFIG_CMD_DISTRO_DEFAULTS_H +#define _CONFIG_CMD_DISTRO_DEFAULTS_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_DEFAULTS_H */
Signature · 1 line
1.8.5.3
PATCH v2 2/2 config: add config_distro_defaults.h
Quoted 3 lines · Dennis Gilmore
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,
A changelog between V1 and V2 would have been nice. FWIW, only patch 2/2 is different, and the V1->V2 diff is below:
(quoted diff) +0 -0
b/include/config_distro_defaults.h
index 7b1358614c01..11b5b793046f 100644
include/config_distro_defaults.h +3 -3
@@ -1,11 +1,11 @@/* -* Copyright 2013 Red Hat, Inc. +* Copyright 2013-2014 Red Hat, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ -#ifndef _CONFIG_CMD_DISTRO_DEFAULT_H -#define _CONFIG_CMD_DISTRO_DEFAULT_H +#ifndef _CONFIG_CMD_DISTRO_DEFAULTS_H +#define _CONFIG_CMD_DISTRO_DEFAULTS_H/* * List of all commands and options that when defined enables support
for features
@@ -52,4 +52,4 @@
#define CONFIG_SUPPORT_RAW_INITRD
#define CONFIG_SYS_HUSH_PARSER
-#endif /* _CONFIG_CMD_DISTRO_DEFAULT_H */
+#endif /* _CONFIG_CMD_DISTRO_DEFAULTS_H */
PATCH v2 2/2 config: add config_distro_defaults.h
In reply to Dennis GilmoreQuoted 5 lines · Dennis Gilmore
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 <[email protected]>
Applied to u-boot/master with a quick rewrap of the comments, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140204/c8c67955/attachment.pgp>