Make default environment available in fw_printenv
RFC PATCH 1/1 Make default environment available in fw_printenv
Include board configuration file in fw_printenv to get default environment variables.
Signed-off-by Selvamuthukumar <[email protected]>
---
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(-)
tools/env/fw_env.c +4 -0
@@ -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()
tools/env/fw_env.h +0 -8
@@ -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[]);
Signature · 1 line
1.5.5