|
@@ -61,6 +61,7 @@
|
|
#endif /* CONFIG_ENV_IS_IN_FLASH */
|
|
#endif /* CONFIG_ENV_IS_IN_FLASH */
|
|
|
|
|
|
#if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC)
|
|
#if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC)
|
|
|
|
+# include <environment.h>
|
|
# define CONFIG_BUILD_ENVCRC 1
|
|
# define CONFIG_BUILD_ENVCRC 1
|
|
#endif
|
|
#endif
|
|
|
|
|
|
@@ -77,7 +78,7 @@ extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int);
|
|
|
|
|
|
#ifdef CONFIG_BUILD_ENVCRC
|
|
#ifdef CONFIG_BUILD_ENVCRC
|
|
extern unsigned int env_size;
|
|
extern unsigned int env_size;
|
|
-extern unsigned char environment;
|
|
|
|
|
|
+extern env_t environment;
|
|
#endif /* CONFIG_BUILD_ENVCRC */
|
|
#endif /* CONFIG_BUILD_ENVCRC */
|
|
|
|
|
|
int main (int argc, char **argv)
|
|
int main (int argc, char **argv)
|
|
@@ -85,7 +86,7 @@ int main (int argc, char **argv)
|
|
#ifdef CONFIG_BUILD_ENVCRC
|
|
#ifdef CONFIG_BUILD_ENVCRC
|
|
unsigned char pad = 0x00;
|
|
unsigned char pad = 0x00;
|
|
uint32_t crc;
|
|
uint32_t crc;
|
|
- unsigned char *envptr = &environment,
|
|
|
|
|
|
+ unsigned char *envptr = (unsigned char *)&environment,
|
|
*dataptr = envptr + ENV_HEADER_SIZE;
|
|
*dataptr = envptr + ENV_HEADER_SIZE;
|
|
unsigned int datasize = ENV_SIZE;
|
|
unsigned int datasize = ENV_SIZE;
|
|
unsigned int eoe;
|
|
unsigned int eoe;
|