diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2011-11-17 06:07:23 +0000 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2011-11-22 08:39:25 +0100 |
commit | 994bc671cf8fd3f6d41bb680da738f814f4a9f38 (patch) | |
tree | 27a33cdeef18689c4adc5d4f532df3197de9b5fe /tools/envcrc.c | |
parent | d1459f0fab1ac145051a74094c96592c694f84af (diff) | |
download | u-boot-midas-994bc671cf8fd3f6d41bb680da738f814f4a9f38.tar.gz u-boot-midas-994bc671cf8fd3f6d41bb680da738f814f4a9f38.tar.bz2 u-boot-midas-994bc671cf8fd3f6d41bb680da738f814f4a9f38.zip |
env: move extern environment[] to environment.h
Extract all extern declarations for environment out of c files
into the environment.h header.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'tools/envcrc.c')
-rw-r--r-- | tools/envcrc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/envcrc.c b/tools/envcrc.c index feebbabea0..111d9f6289 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 @@ -77,7 +78,7 @@ extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); #ifdef CONFIG_BUILD_ENVCRC extern unsigned int env_size; -extern unsigned char environment; +extern env_t environment; #endif /* CONFIG_BUILD_ENVCRC */ int main (int argc, char **argv) @@ -85,7 +86,7 @@ int main (int argc, char **argv) #ifdef CONFIG_BUILD_ENVCRC unsigned char pad = 0x00; uint32_t crc; - unsigned char *envptr = &environment, + unsigned char *envptr = (unsigned char *)&environment, *dataptr = envptr + ENV_HEADER_SIZE; unsigned int datasize = ENV_SIZE; unsigned int eoe; |