From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] config_cmd_default.h: wrap each definition in "ifndef"
Date: Fri, 9 Jan 2015 21:21:20 +0000 [thread overview]
Message-ID: <1420838479.3108.5.camel@synopsys.com> (raw)
In-Reply-To: <1420291209-20249-3-git-send-email-abrodkin@synopsys.com>
Hi all,
On Sat, 2015-01-03 at 16:20 +0300, Alexey Brodkin wrote:
> Now with switch to Kconfig it's possible to select commands via
> menuconfig or defconfigs.
>
> Moreover some commands are enabled by default in both
> "config_cmd_default.h" as a legacy way and in "common/Kconfig".
>
> And on attempt to build U-Boot following warnings are printed for
> definitions made in both:
> --->---
> In file included from include/configs/arcangel4.h:45:0,
> from include/config.h:4,
> from include/common.h:18,
> from examples/standalone/stubs.c:1:
> include/config_cmd_default.h:20:0: warning: "CONFIG_CMD_BDI" redefined
> [enabled by default]
> #define CONFIG_CMD_BDI /* bdinfo */
> ^
> In file included from ././include/linux/kconfig.h:4:0,
> from <command-line>:0:
> include/generated/autoconf.h:10:0: note: this is the location of the
> previous definition
> #define CONFIG_CMD_BDI 1
> ^
> --->---
>
> An obvious fix is to wrap all definitions in "config_cmd_default.h"
> since we still have to keep it util we're done with complete switch to
> Kconfig.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Tom Rini <trini@ti.com>
> ---
> include/config_cmd_default.h | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/include/config_cmd_default.h b/include/config_cmd_default.h
> index 73c9544..b33f21b 100644
> --- a/include/config_cmd_default.h
> +++ b/include/config_cmd_default.h
> @@ -16,28 +16,70 @@
> * hardware, not fully tested, etc.).
> */
>
> +#ifndef CONFIG_CMD_BDI
> #define CONFIG_CMD_BDI /* bdinfo */
> +#endif
> +#ifndef CONFIG_CMD_BOOTD
> #define CONFIG_CMD_BOOTD /* bootd */
> +#endif
> +#ifndef CONFIG_CMD_CONSOLE
> #define CONFIG_CMD_CONSOLE /* coninfo */
> +#endif
> +#ifndef CONFIG_CMD_ECHO
> #define CONFIG_CMD_ECHO /* echo arguments */
> +#endif
> +#ifndef CONFIG_CMD_EDITENV
> #define CONFIG_CMD_EDITENV /* editenv */
> +#endif
> +#ifndef CONFIG_CMD_FPGA
> #define CONFIG_CMD_FPGA /* FPGA configuration Support */
> +#endif
> +#ifndef CONFIG_CMD_IMI
> #define CONFIG_CMD_IMI /* iminfo */
> +#endif
> +#ifndef CONFIG_CMD_ITEST
> #define CONFIG_CMD_ITEST /* Integer (and string) test */
> +#endif
> #ifndef CONFIG_SYS_NO_FLASH
> +#ifndef CONFIG_CMD_FLASH
> #define CONFIG_CMD_FLASH /* flinfo, erase, protect */
> +#endif
> +#ifndef CONFIG_CMD_IMLS
> #define CONFIG_CMD_IMLS /* List all found images */
> #endif
> +#endif /* CONFIG_SYS_NO_FLASH */
> +#ifndef CONFIG_CMD_LOADB
> #define CONFIG_CMD_LOADB /* loadb */
> +#endif
> +#ifndef CONFIG_CMD_LOADS
> #define CONFIG_CMD_LOADS /* loads */
> +#endif
> +#ifndef CONFIG_CMD_MEMORY
> #define CONFIG_CMD_MEMORY /* md mm nm mw cp cmp crc base loop */
> +#endif
> +#ifndef CONFIG_CMD_MISC
> #define CONFIG_CMD_MISC /* Misc functions like sleep etc*/
> +#endif
> +#ifndef CONFIG_CMD_NET
> #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */
> +#endif
> +#ifndef CONFIG_CMD_NFS
> #define CONFIG_CMD_NFS /* NFS support */
> +#endif
> +#ifndef CONFIG_CMD_RUN
> #define CONFIG_CMD_RUN /* run command in env variable */
> +#endif
> +#ifndef CONFIG_CMD_SAVEENV
> #define CONFIG_CMD_SAVEENV /* saveenv */
> +#endif
> +#ifndef CONFIG_CMD_SETGETDCR
> #define CONFIG_CMD_SETGETDCR /* DCR support on 4xx */
> +#endif
> +#ifndef CONFIG_CMD_SOURCE
> #define CONFIG_CMD_SOURCE /* "source" command support */
> +#endif
> +#ifndef CONFIG_CMD_XIMG
> #define CONFIG_CMD_XIMG /* Load part of Multi Image */
> +#endif
>
> #endif /* _CONFIG_CMD_DEFAULT_H */
Looks like the first patch from this series is not yet ready for a
prime-time (look at discussion here
http://patchwork.ozlabs.org/patch/425106/) I still think this particular
patch makes sense because users may select command via Kconfig now and
once one of the commands listed in "config_cmd_default.h" is selected
inevitably warnings will appear in build console.
So if there're no comment and objections I'll re-send this patch
separately.
-Alexey
next prev parent reply other threads:[~2015-01-09 21:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-03 13:20 [U-Boot] [PATCH 0/2] select default commands in Kconfig Alexey Brodkin
2015-01-03 13:20 ` [U-Boot] [PATCH 1/2] common: mark commands as default to match "config_cmd_default.h" Alexey Brodkin
2015-01-05 15:34 ` Masahiro YAMADA
2015-01-09 20:09 ` Alexey Brodkin
2015-01-14 4:05 ` Masahiro Yamada
2015-01-14 4:18 ` Simon Glass
2015-01-14 8:18 ` Alexey Brodkin
2015-01-15 14:46 ` Simon Glass
2015-01-15 19:10 ` Masahiro YAMADA
2015-01-15 19:44 ` Simon Glass
2015-01-15 21:49 ` Alexey Brodkin
2015-01-16 16:55 ` Simon Glass
2015-01-19 12:52 ` Masahiro Yamada
2015-01-19 12:22 ` Masahiro Yamada
2015-01-20 4:52 ` Masahiro Yamada
2015-01-22 15:30 ` Simon Glass
2015-01-15 18:36 ` Masahiro YAMADA
2015-01-15 21:22 ` Alexey Brodkin
2015-01-19 12:34 ` Masahiro Yamada
2015-01-03 13:20 ` [U-Boot] [PATCH 2/2] config_cmd_default.h: wrap each definition in "ifndef" Alexey Brodkin
2015-01-09 21:21 ` Alexey Brodkin [this message]
2015-01-14 4:12 ` Masahiro Yamada
2015-01-14 6:23 ` Alexey Brodkin
2015-01-14 6:42 ` Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1420838479.3108.5.camel@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox