[U-Boot] [PATCH] [RFC] Make default environment available in fw_printenv
Selvamuthukumar
selva.muthukumar at vvdntech.com
Sat Feb 28 19:57:51 CET 2009
Include board configuration file in fw_printenv to get
default environment variables.
Signed-off-by: Selvamuthukumar <selva.muthukumar at vvdntech.com>
---
I'm not sure whether this can be achived without any change in code,
And howmany other things this change breaks, so marking it as RFC.
tools/env/fw_env.c | 4 ++++
tools/env/fw_env.h | 8 --------
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 46747d3..52bae45 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -24,6 +24,7 @@
* MA 02111-1307 USA
*/
+#include <config.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -80,6 +81,9 @@ static int dev_current;
#define ENVSECTORS(i) envdevices[(i)].env_sectors
#define DEVTYPE(i) envdevices[(i)].mtd_type
+#ifdef CONFIG_ENV_SIZE
+#undef CONFIG_ENV_SIZE
+#endif
#define CONFIG_ENV_SIZE ENVSIZE(dev_current)
#define ENV_SIZE getenvsize()
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index c04da54..ce4b5ed 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -39,14 +39,6 @@
#define ENV2_SIZE 0x4000
#define DEVICE2_ESIZE 0x4000
-#define CONFIG_BAUDRATE 115200
-#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */
-#define CONFIG_BOOTCOMMAND \
- "bootp; " \
- "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \
- "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \
- "bootm"
-
extern int fw_printenv(int argc, char *argv[]);
extern char *fw_getenv (char *name);
extern int fw_setenv (int argc, char *argv[]);
--
1.5.5
More information about the U-Boot
mailing list