[U-Boot] [PATCH 2/2] 85xx: add the nfsboot/ramboot to default environment

Wolfgang Denk wd at denx.de
Sun Nov 22 21:10:43 CET 2009


Dear Andy & Kumar,

In message <1238751340-26758-1-git-send-email-daveliu at freescale.com> Dave Liu wrote:
> Give the MPC8569MDS board one default environment var.
> 
> Signed-off-by: Dave Liu <daveliu at freescale.com>
> ---
>  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_


More information about the U-Boot mailing list