summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-06-25 18:49:24 +0800
committerHuang Shijie <b32955@freescale.com>2013-06-26 10:21:56 +0800
commit3cf770f74f07a6a5a65b429b017b4806004fd902 (patch)
tree32157430a1b3cd021604b51612fb61c7a0b12e37
parent5427205cb33275ccc658daf19dbfd8711bc190f3 (diff)
downloadu-boot-imx-3cf770f74f07a6a5a65b429b017b4806004fd902.zip
u-boot-imx-3cf770f74f07a6a5a65b429b017b4806004fd902.tar.gz
u-boot-imx-3cf770f74f07a6a5a65b429b017b4806004fd902.tar.bz2
ENGR00268502-2 imx6q{dl}-sabreauto: set the environment for NAND boot
Set the default environment for nand boot. Signed-off-by: Huang Shijie <b32955@freescale.com>
-rw-r--r--include/configs/mx6qsabre_common.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h
index eb078d5..a11731f 100644
--- a/include/configs/mx6qsabre_common.h
+++ b/include/configs/mx6qsabre_common.h
@@ -85,6 +85,26 @@
#define CONFIG_SYS_TEXT_BASE 0x17800000
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
+#ifdef CONFIG_SYS_BOOT_NAND
+ /*
+ * The partions' layout for NAND is:
+ * mtd0: 16M (uboot)
+ * mtd1: 16M (kernel)
+ * mtd2: 16M (dtb)
+ * mtd3: left (rootfs)
+ */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "fdt_addr=0x18000000\0" \
+ "fdt_high=0xffffffff\0" \
+ "bootargs=console=" CONFIG_CONSOLE_DEV ",115200 ubi.mtd=3 " \
+ "root=ubi0:rootfs rootfstype=ubifs " \
+ "mtdparts=gpmi-nand:16m(boot),16m(kernel),16m(dtb),-(rootfs)\0"\
+ "bootcmd=nand read ${loadaddr} 0x1000000 0x800000;"\
+ "nand read ${fdt_addr} 0x2000000 0x100000;"\
+ "bootm ${loadaddr} - ${fdt_addr}\0"
+
+#else /* the following is used by the non-NAND boot. */
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
"uimage=uImage\0" \
@@ -159,6 +179,7 @@
"fi; " \
"fi; " \
"else run netboot; fi"
+#endif
#define CONFIG_ARP_TIMEOUT 200UL