public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] implementation of generic distro options
@ 2014-01-23 18:22 Dennis Gilmore
  2014-01-23 18:22 ` [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
  2014-01-23 18:22 ` [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h Dennis Gilmore
  0 siblings, 2 replies; 10+ messages in thread
From: Dennis Gilmore @ 2014-01-23 18:22 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.

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] 10+ messages in thread

* [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
  2014-01-23 18:22 [U-Boot] implementation of generic distro options Dennis Gilmore
@ 2014-01-23 18:22 ` Dennis Gilmore
  2014-01-24 13:49   ` Wolfgang Denk
  2014-01-23 18:22 ` [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h Dennis Gilmore
  1 sibling, 1 reply; 10+ messages in thread
From: Dennis Gilmore @ 2014-01-23 18:22 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] 10+ messages in thread

* [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h
  2014-01-23 18:22 [U-Boot] implementation of generic distro options Dennis Gilmore
  2014-01-23 18:22 ` [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
@ 2014-01-23 18:22 ` Dennis Gilmore
  2014-01-23 19:49   ` Stephen Warren
  2014-01-24 13:50   ` Wolfgang Denk
  1 sibling, 2 replies; 10+ messages in thread
From: Dennis Gilmore @ 2014-01-23 18:22 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..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 */
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h
  2014-01-23 18:22 ` [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h Dennis Gilmore
@ 2014-01-23 19:49   ` Stephen Warren
  2014-01-24 13:50   ` Wolfgang Denk
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2014-01-23 19:49 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
  2014-01-23 18:22 ` [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
@ 2014-01-24 13:49   ` Wolfgang Denk
  2014-01-24 13:59     ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2014-01-24 13:49 UTC (permalink / raw)
  To: u-boot

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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
F u cn rd ths u cnt spl wrth a dm!

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h
  2014-01-23 18:22 ` [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h Dennis Gilmore
  2014-01-23 19:49   ` Stephen Warren
@ 2014-01-24 13:50   ` Wolfgang Denk
  2014-01-24 14:58     ` Dennis Gilmore
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2014-01-24 13:50 UTC (permalink / raw)
  To: u-boot

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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
An Elephant is a mouse with an Operating System.              - Knuth

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
  2014-01-24 13:49   ` Wolfgang Denk
@ 2014-01-24 13:59     ` Tom Rini
  2014-02-03 21:20       ` Stephen Warren
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2014-01-24 13:59 UTC (permalink / raw)
  To: u-boot

-----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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJS4nG/AAoJENk4IS6UOR1WpowQAJ9mvamsYIp9/EiyG7+i6Y5x
rjPNTiwWq0CVCpQsHOkTkzC0Fsgu1Pv9zPBqiVE+u4R/oItnEXxPZVexKreaT6YN
F4BP2z4+x65TCMclbMKSmRMgaQOlnaowofP6vesE5NwwEtdC1wPG5cx0cAXYSE3E
CsqADFm1O62Zpi5uNSkQjYZ0dJhX1Iupykx+nFpwx/mrGis9iyDnqHD6cKTGFMwn
58knHK0/r6icda04LPUTaZ6M8lmvgSvNhgjS76we/EhkFTeCgvbwQa8wOJynZoYE
Nralsd4c8JlUjLtTaHnB8TQACq4wE9/EYNeGwJmutrUnBAHLV0AH7QS4gnPvSyXQ
HO+fuA4g/6zAAMIPDrLWDn6jsAHQ4IIDmCcvqI7g2Irut9OHw2kKdyktKFcIW4+x
VLkZoi8pFrpSdHab9o4xzqpehSNA/bTKp1q2foHrdfxbRw6BIwEkwgrqUNI7XRg9
rzFb9eTdKedTszHBX7WQquyAZhSx1YqvGYXXGRZj1MQ6uvl+X2As1eva9ajoNKqQ
x2ahXpXr5+di3AZmGYgfD6TG7jnOnYynEj3ATxpLkR615tXnojByvCKR4fJeyio3
q9BZqEq8Zc9CTU7aZUCRyI88Ewvn6Q3lYE/E57xAoyoXMPvTmErmmxbgZAy8qZWh
sNEV+Jl6A2w5QxzfGqGt
=wHiM
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h
  2014-01-24 13:50   ` Wolfgang Denk
@ 2014-01-24 14:58     ` Dennis Gilmore
  2014-02-03 21:22       ` Stephen Warren
  0 siblings, 1 reply; 10+ messages in thread
From: Dennis Gilmore @ 2014-01-24 14:58 UTC (permalink / raw)
  To: u-boot

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
> 

-

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load
  2014-01-24 13:59     ` Tom Rini
@ 2014-02-03 21:20       ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2014-02-03 21:20 UTC (permalink / raw)
  To: u-boot

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h
  2014-01-24 14:58     ` Dennis Gilmore
@ 2014-02-03 21:22       ` Stephen Warren
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Warren @ 2014-02-03 21:22 UTC (permalink / raw)
  To: u-boot

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?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-03 21:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23 18:22 [U-Boot] implementation of generic distro options Dennis Gilmore
2014-01-23 18:22 ` [U-Boot] [PATCH 1/2] cmd_pxe.c add any option for filesystem with sysboot uses generic load Dennis Gilmore
2014-01-24 13:49   ` Wolfgang Denk
2014-01-24 13:59     ` Tom Rini
2014-02-03 21:20       ` Stephen Warren
2014-01-23 18:22 ` [U-Boot] [PATCH 2/2] config: add config_distro_defaults.h Dennis Gilmore
2014-01-23 19:49   ` Stephen Warren
2014-01-24 13:50   ` Wolfgang Denk
2014-01-24 14:58     ` Dennis Gilmore
2014-02-03 21:22       ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox