X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fenv_common.c;h=439a4a905b937a66dd098a6505e144b67dc0c713;hb=64a0a4995e79ef9813bb51d5f1ff35ae5dabfc7e;hp=c3946f0a74cd84bc39a525407f62aa0e6081962c;hpb=93f6d72544da4510a146bc4c93d609b0116cde37;p=u-boot diff --git a/common/env_common.c b/common/env_common.c index c3946f0a74..439a4a905b 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -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,13 +238,15 @@ 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 /* * We must allocate a buffer for the environment */ - env_ptr = (env_t *)malloc (CFG_ENV_SIZE); + env_ptr = (env_t *)malloc (CONFIG_ENV_SIZE); DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr); #endif