config_cmd_defaults.h: new header for common u-boot command defaults
PATCH 1/1 config_cmd_defaults.h: new header for common u-boot command defaults
We have config_defaults.h which are random configuration settings that everyone gets by default. We also have config_cmd_default.h which is a recommended list of defaults but boards have to opt into. Now we have config_cmd_defaults.h which is a list of defaults that everyone gets and has to actively opt out of.
For now, we populate it with the bootm command which previously was unable to be disabled.
--- common/Makefile | 2 +- include/config_cmd_defaults.h | 14 ++++++++++++++ mkconfig | 1 + 3 files changed, 16 insertions(+), 1 deletions(-) create mode 100644 include/config_cmd_defaults.h
common/Makefile +1 -1
@@ -41,7 +41,7 @@ COBJS-y += xyzModem.o # core command COBJS-y += cmd_boot.o -COBJS-y += cmd_bootm.o +COBJS-$(CONFIG_CMD_BOOTM) += cmd_bootm.o COBJS-y += cmd_help.o COBJS-y += cmd_nvedit.o COBJS-y += cmd_version.o
include/config_cmd_defaults.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* config_cmd_defaults.h - sane defaults for everyone +* +* Copyright (c) 2010 Analog Devices Inc. +* +* Licensed under the GPL-2 or later. +*/ + +#ifndef _CONFIG_CMD_DEFAULTS_H_ +#define _CONFIG_CMD_DEFAULTS_H_ + +#define CONFIG_CMD_BOOTM 1 + +#endif
mkconfig +1 -0
@@ -155,6 +155,7 @@ done cat << EOF >> config.h #define CONFIG_BOARDDIR board/$BOARDDIR +#include <config_cmd_defaults.h> #include <config_defaults.h> #include <configs/${CONFIG_NAME}.h> #include <asm/config.h>
Signature · 1 line
1.7.3.4
PATCH 1/1 load_addr: move to common env code
Rather than keep the load_addr definition with the bootm code (which just happens to use this), move it to the common env code. This way we can disable bootm support completely while retaining load_addr usage with many other commands.
--- common/cmd_bootm.c | 1 - common/cmd_nvedit.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletions(-)
common/cmd_bootm.c +0 -1
@@ -157,7 +157,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_nvedit.c +2 -0
@@ -76,6 +76,8 @@ SPI_FLASH|MG_DISK|NVRAM|MMC|NOWHERE}*/ #define MAX_ENV_SIZE (1 << 20)/* 1 MiB */ +ulong load_addr =CONFIG_SYS_LOAD_ADDR ;/* Default Load Address */ +/* * Table with supported baudrates (defined in config_xyz.h) */
Signature · 1 line
1.7.3.4
Wolfgang Denk
AppliedPATCH 1/1 load_addr: move to common env code
Dear Mike Frysinger,
Quoted 10 lines · In message <[email protected]> you wrote:
Rather than keep the
load_addrdefinition with the bootm code (which just happens to use this), move it to the common env code. This way we can disable bootm support completely while retainingload_addrusage with many other commands.Signed-off-by Mike Frysinger <[email protected]>--- common/cmd_bootm.c | 1 - common/cmd_nvedit.c | 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 Don't put off for tomorrow what you can do today, because if you enjoy it today you can do it again tomorrow.
Wolfgang Denk
AppliedPATCH 1/1 config_cmd_defaults.h: new header for common u-boot command defaults
In reply to Mike FrysingerDear Mike Frysinger,
Quoted 9 lines · In message <[email protected]> you wrote:
We have
config_defaults.hwhich are random configuration settings that everyone gets by default. We also haveconfig_cmd_default.hwhich is a recommended list of defaults but boards have to opt into. Now we haveconfig_cmd_defaults.hwhich is a list of defaults that everyone gets and has to actively opt out of.For now, we populate it with the bootm command which previously was unable to be disabled.
Quoted 7 lines
Signed-off-by Mike Frysinger <[email protected]>--- common/Makefile | 2 +- include/config_cmd_defaults.h | 14 ++++++++++++++ mkconfig | 1 + 3 files changed, 16 insertions(+), 1 deletions(-) create mode 100644 include/config_cmd_defaults.h
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 A list is only as strong as its weakest link. -- Don Knuth