MIPS: add compile time definition of L2 cache size
[oweals/u-boot.git] / tools / envcrc.c
index a9d9b48c76d407cb2c241127e2678037cc1e8846..672ef4d675e79353160c75f38ba93d3bd2945ed6 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2001
  * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <errno.h>
@@ -12,6 +11,8 @@
 #include <string.h>
 #include <unistd.h>
 
+#include <linux/kconfig.h>
+
 #ifndef __ASSEMBLY__
 #define        __ASSEMBLY__                    /* Dirty trick to get only #defines     */
 #endif
@@ -58,9 +59,9 @@
 
 
 #ifdef CONFIG_BUILD_ENVCRC
-# include <environment.h>
+# include <env_internal.h>
 extern unsigned int env_size;
-extern env_t environment;
+extern env_t embedded_environment;
 #endif /* CONFIG_BUILD_ENVCRC */
 
 extern uint32_t crc32 (uint32_t, const unsigned char *, unsigned int);
@@ -70,7 +71,7 @@ int main (int argc, char **argv)
 #ifdef CONFIG_BUILD_ENVCRC
        unsigned char pad = 0x00;
        uint32_t crc;
-       unsigned char *envptr = (unsigned char *)&environment,
+       unsigned char *envptr = (unsigned char *)&embedded_environment,
                *dataptr = envptr + ENV_HEADER_SIZE;
        unsigned int datasize = ENV_SIZE;
        unsigned int eoe;