-#ifdef ENV_IS_EMBEDDED
- /*
- * The environment buffer is embedded with the text segment,
- * just relocate the environment pointer
- */
- env_ptr = (env_t *)((ulong)env_ptr + gd->reloc_off);
- 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);
- DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
-#endif
-
- if (gd->env_valid == 0) {
-#if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
- puts ("Using default environment\n\n");
-#else
- puts ("*** Warning - bad CRC, using default environment\n\n");
- show_boot_progress (-60);
-#endif