* [U-Boot] V2 implementation of generic distro options
@ 2014-02-04 11:25 Dennis Gilmore
2014-02-04 11:25 ` [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
2014-02-04 11:25 ` [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h Dennis Gilmore
0 siblings, 2 replies; 6+ messages in thread
From: Dennis Gilmore @ 2014-02-04 11:25 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
2014-02-04 11:25 [U-Boot] V2 implementation of generic distro options Dennis Gilmore
@ 2014-02-04 11:25 ` Dennis Gilmore
2014-02-04 22:47 ` Tom Rini
2014-02-04 11:25 ` [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h Dennis Gilmore
1 sibling, 1 reply; 6+ messages in thread
From: Dennis Gilmore @ 2014-02-04 11:25 UTC (permalink / raw)
To: u-boot
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'"
);
--
1.8.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h
2014-02-04 11:25 [U-Boot] V2 implementation of generic distro options Dennis Gilmore
2014-02-04 11:25 ` [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
@ 2014-02-04 11:25 ` Dennis Gilmore
2014-02-04 17:21 ` Stephen Warren
2014-02-04 22:47 ` Tom Rini
1 sibling, 2 replies; 6+ messages in thread
From: Dennis Gilmore @ 2014-02-04 11:25 UTC (permalink / raw)
To: u-boot
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..11b5b79
--- /dev/null
+++ b/include/config_distro_defaults.h
@@ -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 */
--
1.8.5.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h
2014-02-04 11:25 ` [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h Dennis Gilmore
@ 2014-02-04 17:21 ` Stephen Warren
2014-02-04 22:47 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Stephen Warren @ 2014-02-04 17:21 UTC (permalink / raw)
To: u-boot
On 02/04/2014 04:25 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,
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
A changelog between V1 and V2 would have been nice. FWIW, only patch 2/2
is different, and the V1->V2 diff is below:
diff --git a/include/config_distro_defaults.h
b/include/config_distro_defaults.h
index 7b1358614c01..11b5b793046f 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -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 */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
2014-02-04 11:25 ` [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
@ 2014-02-04 22:47 ` Tom Rini
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2014-02-04 22:47 UTC (permalink / raw)
To: u-boot
On Tue, Feb 04, 2014 at 05:25:46AM -0600, Dennis Gilmore wrote:
> Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h
2014-02-04 11:25 ` [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h Dennis Gilmore
2014-02-04 17:21 ` Stephen Warren
@ 2014-02-04 22:47 ` Tom Rini
1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2014-02-04 22:47 UTC (permalink / raw)
To: u-boot
On Tue, Feb 04, 2014 at 05:25:47AM -0600, 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.
>
> Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Applied to u-boot/master with a quick rewrap of the comments, thanks!
--
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>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-04 22:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 11:25 [U-Boot] V2 implementation of generic distro options Dennis Gilmore
2014-02-04 11:25 ` [U-Boot] [PATCH V2 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
2014-02-04 22:47 ` Tom Rini
2014-02-04 11:25 ` [U-Boot] [PATCH V2 2/2] config: add config_distro_defaults.h Dennis Gilmore
2014-02-04 17:21 ` Stephen Warren
2014-02-04 22:47 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox