From: Selvamuthukumar Date: Sun, 1 Mar 2009 00:27:51 +0530 Subject: [U-Boot] [PATCH] [RFC] Make default environment available in fw_printenv Message-ID: <1235847471-18312-1-git-send-email-selva.muthukumar@vvdntech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Include board configuration file in fw_printenv to get default environment variables. Signed-off-by: Selvamuthukumar --- 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 #include #include #include @@ -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