[U-Boot] [PATCH] mkconfig: include board config.h before asm/config.h

swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:
In file included from /home/r1aaha/git/u-boot/include/config.h:5, from /home/r1aaha/git/u-boot/include/common.h:35, from simpc8313.c:26: /home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning: "CONFIG_MAX_MEM_MAPPED" redefined In file included from /home/r1aaha/git/u-boot/include/config.h:4, from /home/r1aaha/git/u-boot/include/common.h:35, from simpc8313.c:26: /home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition
Signed-off-by: Kim Phillips kim.phillips@freescale.com --- mkconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mkconfig b/mkconfig index b6b0a80..b0bbbd1 100755 --- a/mkconfig +++ b/mkconfig @@ -82,7 +82,7 @@ else > config.h # Create new config file fi echo "/* Automatically generated - do not edit */" >>config.h -echo "#include <asm/config.h>" >>config.h echo "#include <configs/$1.h>" >>config.h +echo "#include <asm/config.h>" >>config.h
exit 0

Dear Kim Phillips,
In message 20090218161429.d2a02a7b.kim.phillips@freescale.com you wrote:
swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:
...
echo "/* Automatically generated - do not edit */" >>config.h -echo "#include <asm/config.h>" >>config.h echo "#include <configs/$1.h>" >>config.h +echo "#include <asm/config.h>" >>config.h
That's a pretty big hammer that affects ALL boards.
Are you absolutely sure it has no negative side effects?
Best regards,
Wolfgang Denk

On Wed, 18 Feb 2009 23:15:52 +0100 Wolfgang Denk wd@denx.de wrote:
Dear Kim Phillips,
In message 20090218161429.d2a02a7b.kim.phillips@freescale.com you wrote:
swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:
...
echo "/* Automatically generated - do not edit */" >>config.h -echo "#include <asm/config.h>" >>config.h echo "#include <configs/$1.h>" >>config.h +echo "#include <asm/config.h>" >>config.h
That's a pretty big hammer that affects ALL boards.
Are you absolutely sure it has no negative side effects?
unfortunately I don't have a supercomputer over here, so I can't be 100% sure. I did however check samples from 4xx, 83xx, 85xx, and 86xx - due to recent relevant chatter wrt those platforms.
The alternative is to search for a better home for CONFIG_MAX_MEM_MAPPED's default definition.
Kim

Dear Kim Phillips,
In message 20090218170957.5013c73d.kim.phillips@freescale.com you wrote:
-echo "#include <asm/config.h>" >>config.h echo "#include <configs/$1.h>" >>config.h +echo "#include <asm/config.h>" >>config.h
That's a pretty big hammer that affects ALL boards.
Are you absolutely sure it has no negative side effects?
unfortunately I don't have a supercomputer over here, so I can't be 100% sure. I did however check samples from 4xx, 83xx, 85xx, and 86xx
- due to recent relevant chatter wrt those platforms.
Well, I needed some time to realize that the
echo "#include <asm/config.h>" >>config.h
part is actually pretty new anyway - coming from commit 47d41cc3 less than two weeks ago. So your patch is indeed harmless.
The alternative is to search for a better home for CONFIG_MAX_MEM_MAPPED's default definition.
For now I will apply your patch. Thanks.
Best regards,
Wolfgang Denk

Dear Kim Phillips,
In message 20090218161429.d2a02a7b.kim.phillips@freescale.com you wrote:
swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:
In file included from /home/r1aaha/git/u-boot/include/config.h:5, from /home/r1aaha/git/u-boot/include/common.h:35, from simpc8313.c:26: /home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning: "CONFIG_MAX_MEM_MAPPED" redefined In file included from /home/r1aaha/git/u-boot/include/config.h:4, from /home/r1aaha/git/u-boot/include/common.h:35, from simpc8313.c:26: /home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition
Signed-off-by: Kim Phillips kim.phillips@freescale.com
mkconfig | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (2)
-
Kim Phillips
-
Wolfgang Denk