Skip to contentSkip to conversation

implementation of generic distro options

U-Boot Superseded Dennis Gilmore 4 participants 10 messages Jan 23, 2014 – Feb 3, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

PATCH 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
index c27ec35..20569bb 100644
@@ -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
#2 lore raw

PATCH 1/2 cmd_pxe.c add any option for filesystem with sysboot uses generic load

Dear Dennis Gilmore,

Quoted 1 line · In message <[email protected]> you wrote:

"add any option for filesystem with sysboot uses generic load" ?

I'm sorry, but I cannot understand what this is supposed to mean.

Quoted 1 line

+#ifdef CONFIG_CMD_FS_GENERIC

Can you please add some documentation to the README what this (so far undocumented) option means?

Thanks.

Wolfgang Denk

Signature · 4 lines
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!
#3 lore raw

PATCH 1/2 cmd_pxe.c add any option for filesystem with sysboot uses generic load

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Wolfgang Denk

Dear Dennis Gilmore,

Quoted 1 line · In message <[email protected]> you wrote:
Quoted 8 lines

"add any option for filesystem with sysboot uses generic load" ?

I'm sorry, but I cannot understand what this is supposed to mean.

Quoted 1 line

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

#4 lore raw

PATCH 1/2 cmd_pxe.c add any option for filesystem with sysboot uses generic load

Quoted 10 lines · Tom Rini
Quoted 8 lines · Wolfgang Denk

Dear Dennis Gilmore,

Quoted 1 line · In message <[email protected]> you wrote:

"add any option for filesystem with sysboot uses generic load" ?

I'm sorry, but I cannot understand what this is supposed to mean.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

+#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.

#5 lore raw

PATCH 2/2 config: add config_distro_defaults.h

In reply to 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.

---
 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
new file mode 100644
index 0000000..7b13586
@@ -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 */
Signature · 1 line
1.8.5.3
#6 lore raw

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

with one tiny nit:

include/config_distro_defaults.h line 8

Quoted 4 lines
include/config_distro_defaults.h +2 -0
 
+#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.

#7 lore raw

PATCH 2/2 config: add config_distro_defaults.h

In reply to Dennis Gilmore

Dear Dennis Gilmore,

Quoted 9 lines · In message <[email protected]> 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.

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

Signature · 4 lines
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
#8 lore raw

PATCH 2/2 config: add config_distro_defaults.h

Hi Wolfgang,

El Fri, 24 Jan 2014 14:50:10 +0100
Wolfgang Denk <[email protected]> escribi?:

Quoted 8 lines

Dear Dennis Gilmore,

In message <[email protected]> you

Quoted 4 lines · 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.

Quoted 8 lines
Quoted 5 lines
---
 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

Quoted 5 lines

Best regards,

Wolfgang Denk

-

#9 lore raw

PATCH 2/2 config: add config_distro_defaults.h

Quoted 30 lines · Dennis Gilmore

Hi Wolfgang,

El Fri, 24 Jan 2014 14:50:10 +0100
Wolfgang Denk <[email protected]> escribi?:

Quoted 8 lines

Dear Dennis Gilmore,

In message <[email protected]> you

Quoted 4 lines · 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.

Quoted 8 lines
Quoted 5 lines
---
 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.
"""

Quoted 2 lines

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?

Quoted 1 line

I will be submitting a V2 that fixes Stephens comment

Dennis, I don't think I saw V2 of this series?