From: Wolfgang Denk Date: Sun, 22 Nov 2009 21:10:43 +0100 Subject: [U-Boot] [PATCH 2/2] 85xx: add the nfsboot/ramboot to default environment In-Reply-To: <1238751340-26758-1-git-send-email-daveliu@freescale.com> References: <1238751340-26758-1-git-send-email-daveliu@freescale.com> Message-ID: <20091122201043.1D614E34A27@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Andy & Kumar, In message <1238751340-26758-1-git-send-email-daveliu@freescale.com> Dave Liu wrote: > Give the MPC8569MDS board one default environment var. > > Signed-off-by: Dave Liu > --- > include/configs/MPC8569MDS.h | 72 ++++++++++++++++++++++++------------------ > 1 files changed, 41 insertions(+), 31 deletions(-) > > diff --git a/include/configs/MPC8569MDS.h b/include/configs/MPC8569MDS.h > index b0af5dc..7fd2b56 100644 > --- a/include/configs/MPC8569MDS.h > +++ b/include/configs/MPC8569MDS.h > @@ -409,46 +409,56 @@ extern unsigned long get_clock_freq(void); > * Environment Configuration > */ > #define CONFIG_HOSTNAME mpc8569mds > -#define CONFIG_ROOTPATH /nfsroot > -#define CONFIG_BOOTFILE your.uImage > +#define CONFIG_ROOTPATH /tftpboot > +#define CONFIG_BOOTFILE uImage.8569 > > +#define CONFIG_HAS_ETH0 > +#define CONFIG_ETHADDR 00:E0:0C:85:69:01 > +#define CONFIG_HAS_ETH1 > +#define CONFIG_ETH1ADDR 00:E0:0C:85:69:02 > + > +#define CONFIG_IPADDR 192.168.1.100 > #define CONFIG_SERVERIP 192.168.1.1 > -#define CONFIG_GATEWAYIP 192.168.1.1 > +#define CONFIG_GATEWAYIP 192.168.1.254 > #define CONFIG_NETMASK 255.255.255.0 > > -#define CONFIG_LOADADDR 200000 /*default location for tftp and bootm*/ > +#define CONFIG_LOADADDR 1000000 /*default location for tftp and bootm*/ > > #define CONFIG_BOOTDELAY 10 /* -1 disables auto-boot */ > #undef CONFIG_BOOTARGS /* the boot command will set bootargs*/ > > #define CONFIG_BAUDRATE 115200 > > -#define CONFIG_EXTRA_ENV_SETTINGS \ > - "netdev=eth0\0" \ > - "consoledev=ttyS0\0" \ > - "ramdiskaddr=600000\0" \ > - "ramdiskfile=your.ramdisk.u-boot\0" \ > - "fdtaddr=400000\0" \ > - "fdtfile=your.fdt.dtb\0" \ > - "nfsargs=setenv bootargs root=/dev/nfs rw " \ > - "nfsroot=$serverip:$rootpath " \ > - "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ > - "console=$consoledev,$baudrate $othbootargs\0" \ > - "ramargs=setenv bootargs root=/dev/ram rw " \ > - "console=$consoledev,$baudrate $othbootargs\0" \ > - > -#define CONFIG_NFSBOOTCOMMAND \ > - "run nfsargs;" \ > - "tftp $loadaddr $bootfile;" \ > - "tftp $fdtaddr $fdtfile;" \ > - "bootm $loadaddr - $fdtaddr" > - > -#define CONFIG_RAMBOOTCOMMAND \ > - "run ramargs;" \ > - "tftp $ramdiskaddr $ramdiskfile;" \ > - "tftp $loadaddr $bootfile;" \ > - "bootm $loadaddr $ramdiskaddr" > - > -#define CONFIG_BOOTCOMMAND CONFIG_NFSBOOTCOMMAND > +#define CONFIG_EXTRA_ENV_SETTINGS \ > + "netdev=eth0\0" \ > + "uboot=u-boot.8569\0" \ > + "tftpflash=tftpboot $loadaddr $uboot; " \ > + "protect off " MK_STR(TEXT_BASE) " +$filesize; " \ > + "erase " MK_STR(TEXT_BASE) " +$filesize; " \ > + "cp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize; " \ > + "protect on " MK_STR(TEXT_BASE) " +$filesize; " \ > + "cmp.b $loadaddr " MK_STR(TEXT_BASE) " $filesize\0" \ > + "consoledev=ttyS0\0" \ > + "ramdiskaddr=2000000\0" \ > + "ramdiskfile=ramdisk.8569\0" \ > + "fdtaddr=c00000\0" \ > + "fdtfile=dtb.8569\0" > + > +#define CONFIG_NFSBOOTCOMMAND \ > + "setenv bootargs root=/dev/nfs rw " \ > + "nfsroot=$serverip:$rootpath " \ > + "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \ > + "console=$consoledev,$baudrate $othbootargs;" \ > + "tftp $loadaddr $bootfile;" \ > + "tftp $fdtaddr $fdtfile;" \ > + "bootm $loadaddr - $fdtaddr" > + > +#define CONFIG_RAMBOOTCOMMAND \ > + "setenv bootargs root=/dev/ram rw " \ > + "console=$consoledev,$baudrate $othbootargs;" \ > + "tftp $ramdiskaddr $ramdiskfile;" \ > + "tftp $loadaddr $bootfile;" \ > + "tftp $fdtaddr $fdtfile;" \ > + "bootm $loadaddr $ramdiskaddr $fdtaddr" > > #endif /* __CONFIG_H */ Is there a specific reason this has bneve rbeen picked up? Shall I drop it from my list? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de They say a little knowledge is a dangerous thing, but it is not one half so bad as a lot of ignorance. - Terry Pratchett, _Equal Rites_