diff mbox

[U-Boot,03/17] env: move extern default_environment[] to environment.h

Message ID 4EC524BA.8030605@compulab.co.il
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Igor Grinberg Nov. 17, 2011, 3:14 p.m. UTC
Hi Stefano,

On 11/17/11 16:12, Stefano Babic wrote:
> On 11/07/2011 12:13 PM, Igor Grinberg wrote:
>> Extract all extern declarations for default_environment[] out of c files
>> into the environment.h header.
>>
>> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
>> Cc: Stefan Roese <sr@denx.de>
>> ---
>>  board/zeus/zeus.c      |    1 -
>>  common/env_dataflash.c |    2 --
>>  common/env_flash.c     |    2 --
>>  common/env_mgdisk.c    |    3 ---
>>  common/env_mmc.c       |    3 ---
>>  common/env_nand.c      |    3 ---
>>  common/env_nowhere.c   |    2 --
>>  common/env_nvram.c     |    2 --
>>  common/env_onenand.c   |    3 ---
>>  common/env_sf.c        |    3 ---
>>  include/environment.h  |    2 ++
>>  11 files changed, 2 insertions(+), 24 deletions(-)
>>
> 
> Hi Igor,
> 
> this patch breaks several boards because "tools" cannot be compiled clean:
> 
> gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter
> /home/stefano/Projects/u-boot-staging/include -idirafter
> /home/stefano/Projects/u-boot-staging/include2 -idirafter
> /home/stefano/Projects/u-boot-staging/include -I
> /home/stefano/Projects/u-boot-staging/lib/libfdt -I
> /home/stefano/Projects/u-boot-staging/tools
> -DCONFIG_SYS_TEXT_BASE=0x02000000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
> -pedantic   -o envcrc.o envcrc.c -c
> envcrc.c:80:1: Fehler: unbekannter Typname: »env_t«
> make[1]: *** [envcrc.o] Fehler 1
> 
> You can try with the cmi_mpc5xx board, but it is only an example - I get
> the same errors with several ARM boards, because at the end
> environment.h is not included. Can you take a look at it ?

I don't have the ppc cross tool chain at hand, can you tell me which
ARM board(s) get broken, so I can verify this?

Also, I think it is not that patch but the next one:
[PATCH 04/17] env: move extern environment[] to environment.h

Can you please check if the attached patch fixes the envcrc.c problem?

Thanks.

Comments

Stefano Babic Nov. 17, 2011, 3:30 p.m. UTC | #1
On 11/17/2011 04:14 PM, Igor Grinberg wrote:
> 
> I don't have the ppc cross tool chain at hand, can you tell me which
> ARM board(s) get broken, so I can verify this?
> 
> Also, I think it is not that patch but the next one:
> [PATCH 04/17] env: move extern environment[] to environment.h

You're right, but that was the result bisecting the tree.

> 
> Can you please check if the attached patch fixes the envcrc.c problem?

Yes, it is fixed - it is the missing environment.h. The board is built,
as well as the other powerpc boards (the ones I tested up now). Can you
resend only the [PATCH 04/17] ?

Thanks,
Stefano
diff mbox

Patch

diff --git a/tools/envcrc.c b/tools/envcrc.c
index 12913c2..111d9f6 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -61,6 +61,7 @@ 
 #endif	/* CONFIG_ENV_IS_IN_FLASH */
 
 #if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC)
+# include <environment.h>
 # define CONFIG_BUILD_ENVCRC 1
 #endif