]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_nvedit.c
Patch by Detlev Zundel, 14 Mar 2005:
[karo-tx-uboot.git] / common / cmd_nvedit.c
index a3898dda0f521e4503974f689740e3d20967979c..578b0ca93608ba28b4ff9a70f4b7138ffd75878b 100644 (file)
@@ -43,6 +43,7 @@
 #include <command.h>
 #include <environment.h>
 #include <watchdog.h>
+#include <serial.h>
 #include <linux/stddef.h>
 #include <asm/byteorder.h>
 #if (CONFIG_COMMANDS & CFG_CMD_NET)
@@ -53,6 +54,7 @@
     !defined(CFG_ENV_IS_IN_EEPROM)     && \
     !defined(CFG_ENV_IS_IN_FLASH)      && \
     !defined(CFG_ENV_IS_IN_DATAFLASH)  && \
+    !defined(CFG_ENV_IS_IN_NAND)       && \
     !defined(CFG_ENV_IS_NOWHERE)
 # error Define one of CFG_ENV_IS_IN_{NVRAM|EEPROM|FLASH|DATAFLASH|NOWHERE}
 #endif
@@ -215,6 +217,11 @@ int _do_setenv (int flag, int argc, char *argv[])
                        /* Try assigning specified device */
                        if (console_assign (console, argv[2]) < 0)
                                return 1;
+
+#ifdef CONFIG_SERIAL_MULTI
+                       if (serial_assign (argv[2]) < 0)
+                               return 1;
+#endif
                }
 
                /*
@@ -579,8 +586,9 @@ U_BOOT_CMD(
        "    - delete environment variable 'name'\n"
 );
 
-#if ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == (CFG_CMD_ENV|CFG_CMD_FLASH))
-
+#if defined(CFG_ENV_IS_IN_NVRAM) || defined(CFG_ENV_IS_IN_EEPROM) || \
+    ((CONFIG_COMMANDS & (CFG_CMD_ENV|CFG_CMD_FLASH)) == \
+      (CFG_CMD_ENV|CFG_CMD_FLASH))
 U_BOOT_CMD(
        saveenv, 1, 0,  do_saveenv,
        "saveenv - save environment variables to persistent storage\n",