]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/env_common.c
env: fix endian ordering in crc table
[karo-tx-uboot.git] / common / env_common.c
index 77f99441a1cc1d20b986d9cb36776cfcd60d1bf6..439a4a905b937a66dd098a6505e144b67dc0c713 100644 (file)
@@ -91,14 +91,20 @@ uchar default_environment[] = {
 #ifdef CONFIG_ETH3ADDR
        "eth3addr="     MK_STR(CONFIG_ETH3ADDR)         "\0"
 #endif
+#ifdef CONFIG_ETH4ADDR
+       "eth4addr="     MK_STR(CONFIG_ETH4ADDR)         "\0"
+#endif
+#ifdef CONFIG_ETH5ADDR
+       "eth5addr="     MK_STR(CONFIG_ETH5ADDR)         "\0"
+#endif
 #ifdef CONFIG_IPADDR
        "ipaddr="       MK_STR(CONFIG_IPADDR)           "\0"
 #endif
 #ifdef CONFIG_SERVERIP
        "serverip="     MK_STR(CONFIG_SERVERIP)         "\0"
 #endif
-#ifdef CFG_AUTOLOAD
-       "autoload="     CFG_AUTOLOAD                    "\0"
+#ifdef CONFIG_SYS_AUTOLOAD
+       "autoload="     CONFIG_SYS_AUTOLOAD                     "\0"
 #endif
 #ifdef CONFIG_PREBOOT
        "preboot="      CONFIG_PREBOOT                  "\0"
@@ -133,11 +139,6 @@ uchar default_environment[] = {
        "\0"
 };
 
-#if defined(CONFIG_ENV_IS_IN_NAND)             /* Environment is in Nand Flash */ \
-       || defined(CONFIG_ENV_IS_IN_SPI_FLASH)
-int default_environment_size = sizeof(default_environment);
-#endif
-
 void env_crc_update (void)
 {
        env_ptr->crc = crc32(0, env_ptr->data, ENV_SIZE);
@@ -214,7 +215,7 @@ void set_default_env(void)
        memset(env_ptr, 0, sizeof(env_t));
        memcpy(env_ptr->data, default_environment,
               sizeof(default_environment));
-#ifdef CFG_REDUNDAND_ENVIRONMENT
+#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
        env_ptr->flags = 0xFF;
 #endif
        env_crc_update ();
@@ -223,8 +224,10 @@ void set_default_env(void)
 
 void env_relocate (void)
 {
+#ifndef CONFIG_RELOC_FIXUP_WORKS
        DEBUGF ("%s[%d] offset = 0x%lx\n", __FUNCTION__,__LINE__,
                gd->reloc_off);
+#endif
 
 #ifdef CONFIG_AMIGAONEG3SE
        enable_nvram();
@@ -235,7 +238,9 @@ void env_relocate (void)
         * The environment buffer is embedded with the text segment,
         * just relocate the environment pointer
         */
+#ifndef CONFIG_RELOC_FIXUP_WORKS
        env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
+#endif
        DEBUGF ("%s[%d] embedded ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
 #else
        /*