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

2011-11-17 Thread Stefano Babic
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

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-17 Thread Igor Grinberg
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 
>> Cc: Stefan Roese 
>> ---
>>  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=0x0200 -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.

-- 
Regards,
Igor.
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 
 # define CONFIG_BUILD_ENVCRC 1
 #endif
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-17 Thread Stefano Babic
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 
> Cc: Stefan Roese 
> ---
>  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=0x0200 -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 ?

Best regards,
Stefano Babic

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-07 Thread Stefan Roese
On Monday 07 November 2011 12:13:57 Igor Grinberg wrote:
> Extract all extern declarations for default_environment[] out of c files
> into the environment.h header.
> 
> Signed-off-by: Igor Grinberg 
> Cc: Stefan Roese 

Acked-by: Stefan Roese 

Thanks.

Best regards,
Stefan

--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-07 Thread Igor Grinberg
Extract all extern declarations for default_environment[] out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg 
Cc: Stefan Roese 
---
 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(-)

diff --git a/board/zeus/zeus.c b/board/zeus/zeus.c
index 18cb85f..272e59b 100644
--- a/board/zeus/zeus.c
+++ b/board/zeus/zeus.c
@@ -40,7 +40,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH 
chips*/
 extern env_t *env_ptr;
-extern uchar default_environment[];
 
 ulong flash_get_size(ulong base, int banknum);
 void env_crc_update(void);
diff --git a/common/env_dataflash.c b/common/env_dataflash.c
index 1d57079..7970ffa 100644
--- a/common/env_dataflash.c
+++ b/common/env_dataflash.c
@@ -37,8 +37,6 @@ extern int write_dataflash(unsigned long addr_dest,
unsigned long addr_src, unsigned long size);
 extern int AT91F_DataflashInit(void);
 
-extern uchar default_environment[];
-
 uchar env_get_char_spec(int index)
 {
uchar c;
diff --git a/common/env_flash.c b/common/env_flash.c
index 50ca4ffa..1383f3c 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -74,8 +74,6 @@ static env_t *flash_addr_new = (env_t 
*)CONFIG_ENV_ADDR_REDUND;
 static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
 #endif /* CONFIG_ENV_ADDR_REDUND */
 
-extern const uchar default_environment[];
-
 
 uchar env_get_char_spec(int index)
 {
diff --git a/common/env_mgdisk.c b/common/env_mgdisk.c
index a69923b..b95d85e 100644
--- a/common/env_mgdisk.c
+++ b/common/env_mgdisk.c
@@ -27,9 +27,6 @@
 #include 
 #include 
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = "MG_DISK";
 
 env_t *env_ptr = 0;
diff --git a/common/env_mmc.c b/common/env_mmc.c
index 83f40f4..a0c0ece 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -32,9 +32,6 @@
 #include 
 #include 
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = "MMC";
 
 #ifdef ENV_IS_EMBEDDED
diff --git a/common/env_nand.c b/common/env_nand.c
index 14446a6..94d4417 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -55,9 +55,6 @@
 #define CONFIG_ENV_RANGE   CONFIG_ENV_SIZE
 #endif
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = "NAND";
 
 
diff --git a/common/env_nowhere.c b/common/env_nowhere.c
index 75ef78d..a6890db 100644
--- a/common/env_nowhere.c
+++ b/common/env_nowhere.c
@@ -33,8 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
 
 env_t *env_ptr = NULL;
 
-extern uchar default_environment[];
-
 void env_relocate_spec(void)
 {
 }
diff --git a/common/env_nvram.c b/common/env_nvram.c
index 544ce47..5357e1a 100644
--- a/common/env_nvram.c
+++ b/common/env_nvram.c
@@ -59,8 +59,6 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
 
 char * env_name_spec = "NVRAM";
 
-extern uchar default_environment[];
-
 uchar env_get_char_spec(int index)
 {
 #ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
diff --git a/common/env_onenand.c b/common/env_onenand.c
index 5e04a06..b1f266b 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -39,9 +39,6 @@
 extern struct mtd_info onenand_mtd;
 extern struct onenand_chip onenand_chip;
 
-/* References to names in env_common.c */
-extern uchar default_environment[];
-
 char *env_name_spec = "OneNAND";
 
 #define ONENAND_MAX_ENV_SIZE   4096
diff --git a/common/env_sf.c b/common/env_sf.c
index d3b36d0..2ff10dd 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -55,9 +55,6 @@ static ulong env_new_offset = CONFIG_ENV_OFFSET_REDUND;
 
 DECLARE_GLOBAL_DATA_PTR;
 
-/* references to names in env_common.c */
-extern uchar default_environment[];
-
 char * env_name_spec = "SPI Flash";
 
 static struct spi_flash *env_flash;
diff --git a/include/environment.h b/include/environment.h
index 2c8c4f1..20775da 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -154,6 +154,8 @@ typedef struct environment_s {
unsigned char   data[ENV_SIZE]; /* Environment data */
 } env_t;
 
+extern const unsigned char default_environment[];
+
 #ifndef DO_DEPS_ONLY
 
 #include 
-- 
1.7.3.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot