P1023RDB: Update default environment
authorChunhe Lan <Chunhe.Lan@freescale.com>
Fri, 17 Oct 2014 08:24:06 +0000 (16:24 +0800)
committerYork Sun <yorksun@freescale.com>
Wed, 19 Nov 2014 18:28:04 +0000 (10:28 -0800)
Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
include/configs/P1023RDB.h

index ba3da06dfb062f1bd24697132131efc8890e6c6e..6b29add78e683e45f67aeda7585d1a9548324d6a 100644 (file)
@@ -374,6 +374,49 @@ extern unsigned long get_clock_freq(void);
 #endif
 
 #define CONFIG_EXTRA_ENV_SETTINGS      \
+       "netdev=eth0\0"                                         \
+       "uboot=" __stringify(CONFIG_UBOOTPATH) "\0"             \
+       "loadaddr=1000000\0"                                    \
+       "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"     \
+       "tftpflash=tftpboot $loadaddr $uboot; "                 \
+               "protect off $ubootaddr +$filesize; "           \
+               "erase $ubootaddr +$filesize; "                 \
+               "cp.b $loadaddr $ubootaddr $filesize; "         \
+               "protect on $ubootaddr +$filesize; "            \
+               "cmp.b $loadaddr $ubootaddr $filesize\0"        \
+       "consoledev=ttyS0\0"                                    \
+       "ramdiskaddr=2000000\0"                                 \
+       "ramdiskfile=rootfs.ext2.gz.uboot\0"                    \
+       "fdtaddr=c00000\0"                                      \
+       "fdtfile=p1023rdb.dtb\0"                                \
+       "othbootargs=ramdisk_size=600000\0"                     \
+       "bdev=sda1\0"                                           \
        "hwconfig=usb1:dr_mode=host,phy_type=ulpi\0"
 
+#define CONFIG_HDBOOT                                  \
+       "setenv bootargs root=/dev/$bdev rw "           \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $loadaddr $bootfile;"                     \
+       "tftp $fdtaddr $fdtfile;"                       \
+       "bootm $loadaddr - $fdtaddr"
+
+#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"
+
+#define CONFIG_BOOTCOMMAND             CONFIG_RAMBOOTCOMMAND
+
 #endif /* __CONFIG_H */