Skip to contentSkip to conversation

bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

RFC PATCH New Kumar Gala 5 participants 29 messages Oct 20, 2008 – Jan 25, 2010

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Added the ability to config out bootm support for Linux, NetBSD, RTEMS

---

Looking for suggestions on how to deal with enabling LINUX, NETBSD, and RTEMS.

 common/cmd_bootm.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
common/cmd_bootm.c +20 -0
index 1b2dfc4..47f9b45 100644
@@ -103,13 +103,23 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
+
+#ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
+#endif
+#ifdef CONFIG_BOOTM_NETBSD
 static boot_os_fn do_bootm_netbsd;
+#endif
 #if defined(CONFIG_LYNXKDI)
 static boot_os_fn do_bootm_lynxkdi;
 extern void lynxkdi_boot (image_header_t *);
 #endif
+#ifdef CONFIG_BOOTM_RTEMS
 static boot_os_fn do_bootm_rtems;
+#endif
 #if defined(CONFIG_CMD_ELF)
 static boot_os_fn do_bootm_vxworks;
 static boot_os_fn do_bootm_qnxelf;
@@ -121,12 +131,18 @@ static boot_os_fn do_bootm_integrity;
 #endif
 
 boot_os_fn * boot_os[] = {
+#ifdef CONFIG_BOOTM_LINUX
 	[IH_OS_LINUX] = do_bootm_linux,
+#endif
+#ifdef CONFIG_BOOTM_NETBSD
 	[IH_OS_NETBSD] = do_bootm_netbsd,
+#endif
 #ifdef CONFIG_LYNXKDI
 	[IH_OS_LYNXOS] = do_bootm_lynxkdi,
 #endif
+#ifdef CONFIG_BOOTM_RTEMS
 	[IH_OS_RTEMS] = do_bootm_rtems,
+#endif
 #if defined(CONFIG_CMD_ELF)
 	[IH_OS_VXWORKS] = do_bootm_vxworks,
 	[IH_OS_QNX] = do_bootm_qnxelf,
@@ -1161,6 +1177,7 @@ static void fixup_silent_linux ()
 /* OS booting routines */
 /*******************************************************************/
 
+#ifdef CONFIG_BOOTM_NETBSD
 static int do_bootm_netbsd (int flag, int argc, char *argv[],
 			    bootm_headers_t *images)
 {
@@ -1246,6 +1263,7 @@ static int do_bootm_netbsd (int flag, int argc, char *argv[],
 
 	return 1;
 }
+#endif /* CONFIG_BOOTM_NETBSD*/
 
 #ifdef CONFIG_LYNXKDI
 static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
@@ -1269,6 +1287,7 @@ static int do_bootm_lynxkdi (int flag, int argc, char *argv[],
 }
 #endif /* CONFIG_LYNXKDI */
 
+#ifdef CONFIG_BOOTM_RTEMS
 static int do_bootm_rtems (int flag, int argc, char *argv[],
 			   bootm_headers_t *images)
 {
@@ -1299,6 +1318,7 @@ static int do_bootm_rtems (int flag, int argc, char *argv[],
 
 	return 1;
 }
+#endif /* CONFIG_BOOTM_RTEMS */
 
 #if defined(CONFIG_CMD_ELF)
 static int do_bootm_vxworks (int flag, int argc, char *argv[],
Signature · 1 line
1.5.5.1
#1 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Dear Kumar Gala,

Quoted 6 lines · In message <[email protected]> you…

Added the ability to config out bootm support for Linux, NetBSD, RTEMS

---

Looking for suggestions on how to deal with enabling LINUX, NETBSD, and RTEMS.

...

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 9 lines
common/cmd_bootm.c +3 -0
@@ -103,13 +103,23 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Comment?

Best regards,

Wolfgang Denk

Signature · 6 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
"It was the Law of the Sea, they said. Civilization ends at  the  wa-
terline.  Beyond  that,  we  all enter the food chain, and not always
right at the top."                               - Hunter S. Thompson
author
#2 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Quoted 26 lines · Wolfgang Denk

Dear Kumar Gala,

In message <[email protected]

Quoted 9 lines

you wrote:
Added the ability to config out bootm support for Linux, NetBSD, RTEMS

---

Looking for suggestions on how to deal with enabling LINUX, NETBSD, and RTEMS.

...

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int · line 109

Quoted 10 lines
common/cmd_bootm.c +3 -0
@@ -103,13 +103,23 @@ extern int do_reset (cmd_tbl_t *cmdtp, int  
 flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all
Quoted 4 lines

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Comment?

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

- k

#3 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Dear Kumar Gala,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 10 lines

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 4 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Quoted 4 lines
Quoted 1 line

Comment?

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

OK from my POV. Should we check in your patch as is, then?

Best regards,

Wolfgang Denk

Signature · 5 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
It is necessary to have purpose.
	-- Alice #1, "I, Mudd", stardate 4513.3
#4 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Quoted 12 lines · Wolfgang Denk

Dear Kumar Gala,

Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 9 lines

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 3 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Comment?

Quoted 8 lines
Quoted 2 lines

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

OK from my POV. Should we check in your patch as is, then?

Best regards,

Wolfgang Denk

Ugly but effective work-around would be to put in an appropriate location:
/*
* Todo: REMOVE when Kconfig becomes real!
*/
#ifndef CONFIG_BOOTM_LINUX
#define CONFIG_BOOTM_LINUX 1
#endif

Best regards,
gvb

#5 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

Quoted 21 lines · Jerry Van Baren
Quoted 11 lines · Wolfgang Denk

Dear Kumar Gala,

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

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 3 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Comment?

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

OK from my POV. Should we check in your patch as is, then?

Best regards,

Wolfgang Denk

Quoted 7 lines

Ugly but effective work-around would be to put in an appropriate location:
/*
* Todo: REMOVE when Kconfig becomes real!
*/
#ifndef CONFIG_BOOTM_LINUX
#define CONFIG_BOOTM_LINUX 1
#endif

...or not. I'm OK with it as is. My #define hack is mostly useless.

gvb

author
#6 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

In reply to Wolfgang Denk
Quoted 17 lines · Wolfgang Denk

Dear Kumar Gala,

In message <4DE53147-6FF6-4145-

Quoted 13 lines · AB35-68D124CD20F8 at kernel.crashing.org> you wrote:
Quoted 13 lines

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 4 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1

The only somewhat reasonable thing I can come up with is to add a
"#define CONFIG_BOOTM_LINUX" to all board config files, so all
support Linux by default, and leave it up to the board maintainers to
add additioonal OS support if needed.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Comment?

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

OK from my POV. Should we check in your patch as is, then?

I say commit as is than.

- k

#7 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

In reply to Wolfgang Denk
Quoted 13 lines · Wolfgang Denk

Dear Kumar Gala,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 10 lines

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 4 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Comment?

Hmm, can we hold off on this until we have Kconfig than? It would be much easier at that point rather me having to touch ~450 config.h's.

OK from my POV. Should we check in your patch as is, then?

Maybe simple add the CONFIG_BOOTM to include/config_cmd_default.h and include/config_cmd_all.h until we have Kconfig? So if a board do not need an OS support it will just add an #undef to its config.

Best Regards,
J.

#8 lore raw

PATCH 1/1 move default bootm config options to config_cmd_default.h

Rather than declare default bootm OS support options in cmd_bootm.c where boards cannot override it, move the options to config_cmd_default.h. Now boards that want to disable certain default OS's can do just that.

---
 common/cmd_bootm.c           |    4 ----
 include/config_cmd_default.h |    4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
common/cmd_bootm.c +0 -4
index 365ceeb..a2e8456 100644
@@ -102,10 +102,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
-#define CONFIG_BOOTM_LINUX 1
-#define CONFIG_BOOTM_NETBSD 1
-#define CONFIG_BOOTM_RTEMS 1
-
 #ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 #endif
include/config_cmd_default.h +4 -0
index a5d87a6..a28ad4d 100644
@@ -39,4 +39,8 @@
 #define CONFIG_CMD_SOURCE	/* "source" command support	*/
 #define CONFIG_CMD_XIMG		/* Load part of Multi Image	*/
 
+#define CONFIG_BOOTM_LINUX
+#define CONFIG_BOOTM_NETBSD
+#define CONFIG_BOOTM_RTEMS
+
 #endif	/* _CONFIG_CMD_DEFAULT_H */
Signature · 1 line
1.6.4.2
#9 lore raw

PATCH 1/1 move default bootm config options to config_cmd_default.h

Dear Mike Frysinger,

Quoted 3 lines · In message <[email protected]> you wrote:

Rather than declare default bootm OS support options in cmd_bootm.c where boards cannot override it, move the options to config_cmd_default.h. Now boards that want to disable certain default OS's can do just that.

While I agree with your intention (i. e. I also think it wouldbe better if this could be more easily changed), I disagree with the
implementation: config_cmd_default.h is intended to select which commands are enabled by default; it is not the right place to add any default settings for any commands.

We need to find a better place for that.

Best regards,

Wolfgang Denk

Signature · 5 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
"No problem is so formidable that you can't walk away from it."
- C. Schulz
#10 lore raw

PATCH 1/1 move default bootm config options to config_cmd_default.h

Quoted 5 lines · On Wednesday 09 September 2009 09:06:21 Wolfgang Denk wrote:
Quoted 3 lines · Mike Frysinger

Rather than declare default bootm OS support options in cmd_bootm.c where boards cannot override it, move the options to config_cmd_default.h. Now boards that want to disable certain default OS's can do just that.

Quoted 7 lines

While I agree with your intention (i. e. I also think it wouldbe better if this could be more easily changed), I disagree with the
implementation: config_cmd_default.h is intended to select which commands are enabled by default; it is not the right place to add any default settings for any commands.

We need to find a better place for that.

i'm not familiar enough with the nest of includes to locate a better place. a quick grep starting at common.h indicates a new header would have to be made. -mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090909/5e8fefab/attachment.pgp

#11 lore raw

PATCH 1/1 move default bootm config options to config_cmd_default.h

Dear Mike Frysinger,

Quoted 3 lines · In message <[email protected]> you wrote:

i'm not familiar enough with the nest of includes to locate a better place. a quick grep starting at common.h indicates a new header would have to be made.

Probably. There are many areas where default settings would make sense; environment variables, BOOTP / DHCP options, ...

Best regards,

Wolfgang Denk

Signature · 5 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
"God is a comedian playing to an audience too afraid to laugh."
- Voltaire
#12 lore raw

PATCH 1/1 move default bootm config options to config_cmd_default.h

Quoted 7 lines · On Wednesday 09 September 2009 10:28:23 Wolfgang Denk wrote:
Quoted 3 lines · Mike Frysinger

i'm not familiar enough with the nest of includes to locate a better place. a quick grep starting at common.h indicates a new header would have to be made.

Probably. There are many areas where default settings would make sense; environment variables, BOOTP / DHCP options, ...

presumably a new "config_defaults.h" that is added to the generated config.h before including the board config ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090909/1d1eeeff/attachment.pgp

#13 lore raw

PATCH 1/4 config_defaults.h: new header for common u-boot config defaults

In reply to Wolfgang Denk

There are a bunch of features in U-Boot that we want to enable by default, and it's best if we centralize them in one place rather than updating all the board files out there.

---
 common/cmd_bootm.c        |    4 ----
 include/config_defaults.h |   17 +++++++++++++++++
 mkconfig                  |    7 +++++--
 3 files changed, 22 insertions(+), 6 deletions(-)
 create mode 100644 include/config_defaults.h
common/cmd_bootm.c +0 -4
index a4b2e26..f275d02 100644
@@ -102,10 +102,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
-#define CONFIG_BOOTM_LINUX 1
-#define CONFIG_BOOTM_NETBSD 1
-#define CONFIG_BOOTM_RTEMS 1
-
 #ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 #endif
include/config_defaults.h new file +17 -0
new file mode 100644
index 0000000..08b6ede
@@ -0,0 +1,17 @@
+/*
+ * config_defaults.h - sane defaults for everyone
+ *
+ * Copyright (c) 2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _CONFIG_DEFAULTS_H_
+#define _CONFIG_DEFAULTS_H_
+
+/* Support bootm-ing different OSes */
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
+
+#endif
mkconfig +5 -2
index 4c5675b..0d2e0f7 100755
@@ -89,7 +89,10 @@ for i in ${TARGETS} ; do
 	echo "#define CONFIG_MK_${i} 1" >>config.h ;
 done
 
-echo "#include <configs/$1.h>" >>config.h
-echo "#include <asm/config.h>" >>config.h
+cat << EOF >> config.h
+#include <config_defaults.h>
+#include <configs/$1.h>
+#include <asm/config.h>
+EOF
 
 exit 0
Signature · 1 line
1.6.5.2
#14 lore raw

PATCH 1/4 config_defaults.h: new header for common u-boot config defaults

Dear Mike Frysinger,

Quoted 11 lines · In message <[email protected]> you wrote:

There are a bunch of features in U-Boot that we want to enable by default, and it's best if we centralize them in one place rather than updating all the board files out there.

---
 common/cmd_bootm.c        |    4 ----
 include/config_defaults.h |   17 +++++++++++++++++
 mkconfig                  |    7 +++++--
 3 files changed, 22 insertions(+), 6 deletions(-)
 create mode 100644 include/config_defaults.h

Sorry, but does not apply:

Applying: config_defaults.h: new header for common u-boot config defaults
error: patch failed: mkconfig:89
error: mkconfig: patch does not apply
fatal: sha1 information is lacking or useless (common/cmd_bootm.c). Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 config_defaults.h: new header for common u-boot config defaults

Please rebase patch series against "next" branch and resubmit. Thanks.

Best regards,

Wolfgang Denk

Signature · 5 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
Some people march to the beat of a different drummer. And some people
tango!
#15 lore raw

PATCH v2 1/4 config_defaults.h: new header for common u-boot config defaults

There are a bunch of features in U-Boot that we want to enable by default, and it's best if we centralize them in one place rather than updating all the board files out there.

---
note: the LMB patch should be applied before this small series to avoid conflicts -- there isnt any actual dependency on each other

v2
- rebased onto latest next

 common/cmd_bootm.c        |    4 ----
 include/config_defaults.h |   17 +++++++++++++++++
 mkconfig                  |   10 ++++++----
 3 files changed, 23 insertions(+), 8 deletions(-)
 create mode 100644 include/config_defaults.h
common/cmd_bootm.c +0 -4
index 22aa7f8..2101162 100644
@@ -102,10 +102,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 typedef int boot_os_fn (int flag, int argc, char *argv[],
 			bootm_headers_t *images); /* pointers to os/initrd/fdt */
 
-#define CONFIG_BOOTM_LINUX 1
-#define CONFIG_BOOTM_NETBSD 1
-#define CONFIG_BOOTM_RTEMS 1
-
 #ifdef CONFIG_BOOTM_LINUX
 extern boot_os_fn do_bootm_linux;
 #endif
include/config_defaults.h new file +17 -0
new file mode 100644
index 0000000..08b6ede
@@ -0,0 +1,17 @@
+/*
+ * config_defaults.h - sane defaults for everyone
+ *
+ * Copyright (c) 2009 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#ifndef _CONFIG_DEFAULTS_H_
+#define _CONFIG_DEFAULTS_H_
+
+/* Support bootm-ing different OSes */
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
+
+#endif
mkconfig +6 -4
index bdc9d91..01e6ced 100755
@@ -96,9 +96,11 @@ for i in ${TARGETS} ; do
 	echo "#define CONFIG_MK_${i} 1" >>config.h ;
 done
 
-echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >>config.h
-
-echo "#include <configs/$1.h>" >>config.h
-echo "#include <asm/config.h>" >>config.h
+cat << EOF >> config.h
+#define CONFIG_BOARDDIR board/$BOARDDIR
+#include <config_defaults.h>
+#include <configs/$1.h>
+#include <asm/config.h>
+EOF
 
 exit 0
Signature · 1 line
1.6.5.3
#16 lore raw

PATCH v2 1/4 config_defaults.h: new header for common u-boot config defaults

Dear Mike Frysinger,

Quoted 9 lines · In message <[email protected]> you wrote:

There are a bunch of features in U-Boot that we want to enable by default, and it's best if we centralize them in one place rather than updating all the board files out there.

---
note: the LMB patch should be applied before this small series to avoid conflicts -- there isnt any actual dependency on each other

Quoted 8 lines

v2
- rebased onto latest next

 common/cmd_bootm.c        |    4 ----
 include/config_defaults.h |   17 +++++++++++++++++
 mkconfig                  |   10 ++++++----
 3 files changed, 23 insertions(+), 8 deletions(-)
 create mode 100644 include/config_defaults.h

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 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
:       I've tried (in vi) "g/[a-z]\n[a-z]/s//_/"...but that doesn't
: cut it.  Any ideas?  (I take it that it may be a two-pass sort of solution).
In the first pass, install perl. :-) Larry Wall <[email protected]>
#17 lore raw

PATCH 2/4 gzip/zlib: make features optional

In reply to Wolfgang Denk

If you really want to slim down U-Boot and you would rather use a higher compression scheme (like LZMA), it'd be nice to disable gzip/zlib since these code bases take up a significant amount of space.

---
 common/cmd_bootm.c        |    2 ++
 include/config_defaults.h |    3 +++
 lib_generic/Makefile      |    4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)
common/cmd_bootm.c +2 -0
index f275d02..ce174d7 100644
@@ -348,6 +348,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 		*load_end = load + image_len;
 		puts("OK\n");
 		break;
+#ifdef CONFIG_GZIP
 	case IH_COMP_GZIP:
 		printf ("   Uncompressing %s ... ", type_name);
 		if (gunzip ((void *)load, unc_len,
@@ -361,6 +362,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 
 		*load_end = load + image_len;
 		break;
+#endif /* CONFIG_GZIP */
 #ifdef CONFIG_BZIP2
 	case IH_COMP_BZIP2:
 		printf ("   Uncompressing %s ... ", type_name);
include/config_defaults.h +3 -0
index 08b6ede..0337163 100644
@@ -14,4 +14,7 @@
 #define CONFIG_BOOTM_NETBSD 1
 #define CONFIG_BOOTM_RTEMS 1
 
+#define CONFIG_GZIP 1
+#define CONFIG_ZLIB 1
+
 #endif
lib_generic/Makefile +2 -2
index 8d23c5d..ae2c282 100644
@@ -36,7 +36,7 @@ COBJS-y += crc32.o
 COBJS-y += ctype.o
 COBJS-y += display_options.o
 COBJS-y += div64.o
-COBJS-y += gunzip.o
+COBJS-$(CONFIG_GZIP) += gunzip.o
 COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
@@ -45,7 +45,7 @@ COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y += string.o
 COBJS-y	+= strmhz.o
 COBJS-y += vsprintf.o
-COBJS-y += zlib.o
+COBJS-$(CONFIG_ZLIB) += zlib.o
 COBJS-$(CONFIG_RBTREE)	+= rbtree.o
 
 COBJS	:= $(COBJS-y)
Signature · 1 line
1.6.5.2
#18 lore raw

PATCH 2/4 gzip/zlib: make features optional

Dear Mike Frysinger,

Quoted 10 lines · In message <[email protected]> you wrote:

If you really want to slim down U-Boot and you would rather use a higher compression scheme (like LZMA), it'd be nice to disable gzip/zlib since these code bases take up a significant amount of space.

---
 common/cmd_bootm.c        |    2 ++
 include/config_defaults.h |    3 +++
 lib_generic/Makefile      |    4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)

Does not apply any more:

Applying: gzip/zlib: make features optional
error: patch failed: lib_generic/Makefile:36
error: lib_generic/Makefile: patch does not apply
fatal: sha1 information is lacking or useless (common/cmd_bootm.c). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
Patch failed at 0001 gzip/zlib: make features optional

Can you please rebase and resend?

Best regards,

Wolfgang Denk

Signature · 5 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
"The number  of  Unix  installations  has  grown  to  10,  with  more
expected."    - The Unix Programmer's Manual, 2nd Edition, June, 1972
#19 lore raw

PATCH v2 1/1 gzip/zlib: make features optional

If you really want to slim down U-Boot and you would rather use a higher compression scheme (like LZMA), it'd be nice to disable gzip/zlib since these code bases take up a significant amount of space.

---
v2
- rebased onto latest master

 common/cmd_bootm.c        |    2 ++
 include/config_defaults.h |    3 +++
 lib_generic/Makefile      |    4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)
common/cmd_bootm.c +2 -0
index f28e88f..23ab0c4 100644
@@ -352,6 +352,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 		*load_end = load + image_len;
 		puts("OK\n");
 		break;
+#ifdef CONFIG_GZIP
 	case IH_COMP_GZIP:
 		printf ("   Uncompressing %s ... ", type_name);
 		if (gunzip ((void *)load, unc_len,
@@ -365,6 +366,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
 
 		*load_end = load + image_len;
 		break;
+#endif /* CONFIG_GZIP */
 #ifdef CONFIG_BZIP2
 	case IH_COMP_BZIP2:
 		printf ("   Uncompressing %s ... ", type_name);
include/config_defaults.h +3 -0
index 08b6ede..0337163 100644
@@ -14,4 +14,7 @@
 #define CONFIG_BOOTM_NETBSD 1
 #define CONFIG_BOOTM_RTEMS 1
 
+#define CONFIG_GZIP 1
+#define CONFIG_ZLIB 1
+
 #endif
lib_generic/Makefile +2 -2
index 4e4496a..c45f07c 100644
@@ -37,7 +37,7 @@ COBJS-y += crc32.o
 COBJS-y += ctype.o
 COBJS-y += display_options.o
 COBJS-y += div64.o
-COBJS-y += gunzip.o
+COBJS-$(CONFIG_GZIP) += gunzip.o
 COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
@@ -48,7 +48,7 @@ COBJS-y += string.o
 COBJS-y	+= strmhz.o
 COBJS-y += time.o
 COBJS-y += vsprintf.o
-COBJS-y += zlib.o
+COBJS-$(CONFIG_ZLIB) += zlib.o
 COBJS-$(CONFIG_RBTREE)	+= rbtree.o
 
 COBJS	:= $(COBJS-y)
Signature · 1 line
1.6.6
#20 lore raw

PATCH v2 1/1 gzip/zlib: make features optional

Dear Mike Frysinger,

Quoted 5 lines · In message <[email protected]> you wrote:

If you really want to slim down U-Boot and you would rather use a higher compression scheme (like LZMA), it'd be nice to disable gzip/zlib since these code bases take up a significant amount of space.

Quoted 8 lines

---
v2
- rebased onto latest master

 common/cmd_bootm.c        |    2 ++
 include/config_defaults.h |    3 +++
 lib_generic/Makefile      |    4 ++--
 3 files changed, 7 insertions(+), 2 deletions(-)

Applied, thanks.

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
Today is the yesterday you worried about tomorrow.
#21 lore raw

PATCH 3/4 sha1: add dedicated config option

In reply to Wolfgang Denk

The sha1 code is currently compiled for everyone, but in reality, it's only used by the FIT code. So make it optional just like MD5.

---
 include/image.h      |    1 +
 lib_generic/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
include/image.h +1 -0
index b82f4b9..6474eca 100644
@@ -56,6 +56,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #define CONFIG_MD5		/* FIT images need MD5 support */
+#define CONFIG_SHA1		/* and SHA1 */
 #endif
 
 /*
lib_generic/Makefile +1 -1
index ae2c282..63b8cca 100644
@@ -40,7 +40,7 @@ COBJS-$(CONFIG_GZIP) += gunzip.o
 COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
-COBJS-y += sha1.o
+COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y += string.o
 COBJS-y	+= strmhz.o
Signature · 1 line
1.6.5.2
#22 lore raw

PATCH v2 3/4 sha1: add dedicated config option

The sha1 code is currently compiled for everyone, but in reality, it's only used by the FIT code. So make it optional just like MD5.

---
v2
- rebased onto latest tree

 include/image.h      |    1 +
 lib_generic/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
include/image.h +1 -0
index 8c0c1b0..4ed0379 100644
@@ -56,6 +56,7 @@
 #include <libfdt.h>
 #include <fdt_support.h>
 #define CONFIG_MD5		/* FIT images need MD5 support */
+#define CONFIG_SHA1		/* and SHA1 */
 #endif
 
 /*
lib_generic/Makefile +1 -1
index 2938825..c45f07c 100644
@@ -42,7 +42,7 @@ COBJS-$(CONFIG_LMB) += lmb.o
 COBJS-y += ldiv.o
 COBJS-$(CONFIG_MD5) += md5.o
 COBJS-y += net_utils.o
-COBJS-y += sha1.o
+COBJS-$(CONFIG_SHA1) += sha1.o
 COBJS-$(CONFIG_SHA256) += sha256.o
 COBJS-y += string.o
 COBJS-y	+= strmhz.o
Signature · 1 line
1.6.6
#23 lore raw

PATCH v2 3/4 sha1: add dedicated config option

Dear Mike Frysinger,

Quoted 11 lines · In message <[email protected]> you wrote:

The sha1 code is currently compiled for everyone, but in reality, it's only used by the FIT code. So make it optional just like MD5.

---
v2
- rebased onto latest tree

 include/image.h      |    1 +
 lib_generic/Makefile |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 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
For every problem there is one solution which is  simple,  neat,  and
wrong.                                                - H. L. Mencken
#24 lore raw

PATCH 4/4 bootm: allow people to disable this command

In reply to Wolfgang Denk
---
 common/cmd_bootm.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
common/cmd_bootm.c +6 -1
index ce174d7..ab636c0 100644
@@ -57,6 +57,10 @@
 #include <lzma/LzmaTools.h>
 #endif /* CONFIG_LZMA */
 
+ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
+
+#ifndef CONFIG_SYS_NO_BOOTM
+
 DECLARE_GLOBAL_DATA_PTR;
 
 extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
@@ -147,7 +151,6 @@ static boot_os_fn *boot_os[] = {
 #endif
 };
 
-ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
 static bootm_headers_t images;		/* pointers to os/initrd/fdt images */
 
 /* Allow for arch specific config before we boot */
@@ -1453,3 +1456,5 @@ static int do_bootm_integrity (int flag, int argc, char *argv[],
 	return 1;
 }
 #endif
+
+#endif /* CONFIG_SYS_NO_BOOTM */
Signature · 1 line
1.6.5.2
#25 lore raw

PATCH 4/4 bootm: allow people to disable this command

Dear Mike Frysinger,

Quoted 29 lines · In message <[email protected]> you wrote:
---
 common/cmd_bootm.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
common/cmd_bootm.c +4 -1
index ce174d7..ab636c0 100644
@@ -57,6 +57,10 @@
 #include <lzma/LzmaTools.h>
 #endif /* CONFIG_LZMA */
 
+ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
+
+#ifndef CONFIG_SYS_NO_BOOTM
+
 DECLARE_GLOBAL_DATA_PTR;
 
 extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp);
@@ -147,7 +151,6 @@ static boot_os_fn *boot_os[] = {
 #endif
 };
 
-ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
 static bootm_headers_t images;		/* pointers to os/initrd/fdt images */
 
 /* Allow for arch specific config before we boot */

common/cmd_bootm.c static int do_bootm_integrity (int flag, int argc, char *argv[], · line 1460

Quoted 5 lines
common/cmd_bootm.c +2 -0
@@ -1453,3 +1456,5 @@ static int do_bootm_integrity (int flag, int argc, char *argv[],
 	return 1;
 }
 #endif
+
+#endif /* CONFIG_SYS_NO_BOOTM */

Hm... please let's not invent a new style to configure commands - please use CONFIG_CMD_BOOTM instead (enabled by default).

Best regards,

Wolfgang Denk

Signature · 5 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
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
#26 lore raw

PATCH 4/4 bootm: allow people to disable this command

Quoted 21 lines · On Thursday 21 January 2010 16:17:19 Wolfgang Denk wrote:
Quoted 20 lines · Mike Frysinger
common/cmd_bootm.c +4 -0
@@ -57,6 +57,10 @@
 #include <lzma/LzmaTools.h>
 #endif /* CONFIG_LZMA */
 
+ulong load_addr = CONFIG_SYS_LOAD_ADDR;	/* Default Load Address */
+
+#ifndef CONFIG_SYS_NO_BOOTM
+
 DECLARE_GLOBAL_DATA_PTR;
 
 extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned

long *lenp); @@ -147,7 +151,6 @@ static boot_os_fn *boot_os[] = {
#endif
};

-ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */
static bootm_headers_t images; /* pointers to os/initrd/fdt images */

Quoted 10 lines

common/cmd_bootm.c static int do_bootm_integrity (int flag, int argc, · line 1460

Quoted 7 lines

/* Allow for arch specific config before we boot */

common/cmd_bootm.c +2 -0
@@ -1453,3 +1456,5 @@ static int do_bootm_integrity (int flag, int argc,
 char *argv[], return 1;
 }
 #endif
+
+#endif /* CONFIG_SYS_NO_BOOTM */

Hm... please let's not invent a new style to configure commands - please use CONFIG_CMD_BOOTM instead (enabled by default).

i did it this way because u-boot doesnt have a default list for everyone of commands. the config_cmd_default.h isnt included by all boards. i can (semi-)reuse the new config_defaults.h if you're OK with that.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100121/59cef11e/attachment.pgp

#27 lore raw

PATCH 4/4 bootm: allow people to disable this command

Dear Mike Frysinger,

Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines

Hm... please let's not invent a new style to configure commands - please use CONFIG_CMD_BOOTM instead (enabled by default).

i did it this way because u-boot doesnt have a default list for everyone of commands. the config_cmd_default.h isnt included by all boards. i can

Those boards need to be adapted, then.

Quoted 1 line

(semi-)reuse the new config_defaults.h if you're OK with that.

No, please don't. Let's not scatter this allover the place.

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
Never call a man a fool.  Borrow from him.
#28 lore raw

RFC PATCH 1/1 bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}

In reply to Wolfgang Denk
Quoted 3 lines · Wolfgang Denk

Dear Kumar Gala,

In message <[email protected]> you

Quoted 17 lines · wrote:
Quoted 7 lines

Added the ability to config out bootm support for Linux, NetBSD, RTEMS

---

Looking for suggestions on how to deal with enabling LINUX, NETBSD, and RTEMS.

...

Quoted 7 lines
common/cmd_bootm.c +0 -0
@@ -103,13 +103,23 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag,

int argc, char *argv[]); typedef int boot_os_fn (int flag, int argc, char *argv[],
bootm_headers_t *images); /* pointers to os/initrd/fdt */

Quoted 8 lines

common/cmd_bootm.c extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); · line 108

Quoted 3 lines
common/cmd_bootm.c +3 -0
+#define CONFIG_BOOTM_LINUX 1
+#define CONFIG_BOOTM_NETBSD 1
+#define CONFIG_BOOTM_RTEMS 1
The only somewhat reasonable thing I can come up with  is  to  add  a
"#define  CONFIG_BOOTM_LINUX"  to  all  board  config  files,  so all

support Linux by default, and leave it up to the board maintainers to add additioonal OS support if needed.

sounds great to me
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20081021/be5e7cd1/attachment.pgp