diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-09-30 15:29:58 -0400 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-10-18 22:53:18 +0200 |
commit | 6dab6add2d8ee80905234b326abc3de11be1d178 (patch) | |
tree | 6a05c9083464fc39367ebcc6af918e5f4c8787ac /tools/envcrc.c | |
parent | 78f4ca7976748159080c9d920d5eb542d1b32d4f (diff) | |
download | u-boot-imx-6dab6add2d8ee80905234b326abc3de11be1d178.zip u-boot-imx-6dab6add2d8ee80905234b326abc3de11be1d178.tar.gz u-boot-imx-6dab6add2d8ee80905234b326abc3de11be1d178.tar.bz2 |
env: only build env_embedded and envcrc when needed
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless. Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled. And now that
the env code is conditionally compiled, we can drop the source code checks.
For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tools/envcrc.c')
-rw-r--r-- | tools/envcrc.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/tools/envcrc.c b/tools/envcrc.c index 5b0f7cd..d02a7db 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -50,10 +50,6 @@ # if defined(CONFIG_ENV_ADDR_REDUND) && !defined(CONFIG_ENV_SIZE_REDUND) # define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE # endif -# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \ - ((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) -# define ENV_IS_EMBEDDED 1 -# endif # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) # define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1 # endif @@ -70,14 +66,11 @@ extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int); -#ifdef ENV_IS_EMBEDDED extern unsigned int env_size; extern unsigned char environment; -#endif /* ENV_IS_EMBEDDED */ int main (int argc, char **argv) { -#ifdef ENV_IS_EMBEDDED unsigned char pad = 0x00; uint32_t crc; unsigned char *envptr = &environment, @@ -131,8 +124,6 @@ int main (int argc, char **argv) } else { printf ("0x%08X\n", crc); } -#else - printf ("0\n"); -#endif + return EXIT_SUCCESS; } |