aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-layerscape/patches/0092-armv8-set-openwrt-lede-default-boot-env-for-ls1012ar.patch
blob: aee81f40745450b17e0e2defcc8a406e3c27bc0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From b0f227f32f898bdf52f4ecafc83d1e2f1d6ee6ec Mon Sep 17 00:00:00 2001
From: Yutang Jiang <yutang.jiang@nxp.com>
Date: Thu, 27 Oct 2016 23:47:43 +0800
Subject: [PATCH 92/93] armv8: set openwrt/lede default boot env for
 ls1012ardb

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
---
 include/configs/ls1012a_common.h |   28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
index 0489492..b23ba4f 100644
--- a/include/configs/ls1012a_common.h
+++ b/include/configs/ls1012a_common.h
@@ -130,6 +130,24 @@
 
 #define CONFIG_DISPLAY_CPUINFO
 
+#define WRTBOOT_DEFAULT "pfe stop && sf probe 0:0 && setenv bootargs " \
+	"root=/dev/mtdblock5 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 " \
+	"earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1M(rcw)," \
+	"1M(u-boot),1M(u-boot-env),1M(dtb),5M(kernel),23M(rootfs),32M(user)" \
+	" && sf read $fdtaddr 0x300000 100000 && " \
+	"sf read $loadaddr 0x400000 500000 && bootm $loadaddr - $fdtaddr"
+
+#define WRTBOOT_EXT4RFS "pfe stop && sf probe 0:0 && setenv bootargs " \
+	"root=/dev/mtdblock5 rootfstype=ext4 noinitrd console=ttyS0,115200 " \
+	"earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1M(rcw)," \
+	"1M(u-boot),1M(u-boot-env),1M(dtb),5M(kernel),23M(ext4rfs),32M(user)" \
+	" && sf read $fdtaddr 0x300000 100000 && " \
+	"sf read $loadaddr 0x400000 500000 && bootm $loadaddr - $fdtaddr"
+
+#define WRTUPDATE_DEFAULT " sf probe 0:0 && tftp 0xa0000000 <tftp_folder>/" \
+	"lede-layerscape-64b-ls1012ardb-squashfs-firmware.ext4.bin && protect off all" \
+	" && sf erase 0 $filesize && sf write 0xa0000000 0 $filesize; reset"
+
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"initrd_high=0xffffffff\0"		\
@@ -144,6 +162,12 @@
 	"kernel_start=0xa00000\0"		\
 	"kernel_load=0xa0000000\0"		\
 	"kernel_size=0x2800000\0"		\
+	"loadaddr=82000000\0"			\
+	"ramdiskaddr=88000000\0"		\
+	"fdtaddr=8f000000\0"			\
+	"wrtboot=" WRTBOOT_DEFAULT "\0"	\
+	"wrtboot_ext4rfs=" WRTBOOT_EXT4RFS "\0"	\
+	"wrtupdate=" WRTUPDATE_DEFAULT "\0"	\
 	"console=ttyAMA0,38400n8\0"
 
 #ifdef	CONFIG_EMU
@@ -158,7 +182,9 @@
 					"$kernel_start $kernel_size && "\
 					"bootm $kernel_load"
 #endif
-#define CONFIG_BOOTDELAY		10
+#define CONFIG_BOOTDELAY		3
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND		"run wrtboot_ext4rfs"
 
 /* Monitor Command Prompt */
 #define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
-- 
1.7.9.5