aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-layerscape/patches/0005-armv8-set-openwrt-lede-default-boot-env-for-ls1043ar.patch
blob: 275485936763fa73da3bd5d320e1c99f90881583 (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
68
From 3c22f3fcbdb9f919ebdfa87a2ec237ac2abb7e03 Mon Sep 17 00:00:00 2001
From: Yutang Jiang <yutang.jiang@nxp.com>
Date: Thu, 27 Oct 2016 23:45:45 +0800
Subject: [PATCH 05/93] armv8: set openwrt/lede default boot env for
 ls1043ardb

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

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 68678f3..1db05bb 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -273,6 +273,16 @@
 			"5m(kernel),1m(dtb),9m(file_system)"
 #endif
 
+#define WRTBOOT_DEFAULT "setenv bootargs root=/dev/mtdblock6 " \
+	"rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 " \
+	"console=ttyS0,115200 mtdparts=60000000.nor:1M(rcw),1M(u-boot)," \
+	"1M(u-boot-env),1M(fman),1M(dtb),5M(kernel),54M(rootfs),64M(otherbank)" \
+	" && cp.b 60400000 $fdtaddr 100000 && cp.b 60500000 $loadaddr 500000" \
+	" && bootm $loadaddr - $fdtaddr"
+#define WRTUPDATE_DEFAULT "tftp a0000000 <tftp_folder>/" \
+	"lede-layerscape-64b-ls1043ardb-squashfs-firmware.bin && protect off all" \
+	" && erase 60000000 +4000000 && cp.b a0000000 60000000 $filesize && reset"
+
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"hwconfig=fsl_ddr:bank_intlv=auto\0"	\
@@ -286,6 +296,19 @@
 	"kernel_load=0xa0000000\0"		\
 	"kernel_size=0x2800000\0"		\
 	"console=ttyAMA0,38400n8\0"		\
+	"ethaddr=00:e0:0c:00:77:00\0"	\
+	"eth1addr=00:e0:0c:00:77:01\0"	\
+	"eth2addr=00:e0:0c:00:77:02\0"	\
+	"eth3addr=00:e0:0c:00:77:03\0"	\
+	"eth4addr=00:e0:0c:00:77:04\0"	\
+	"eth5addr=00:e0:0c:00:77:05\0"	\
+	"eth6addr=00:e0:0c:00:77:06\0"	\
+	"ethact=FM1@DTSEC2\0"			\
+	"loadaddr=82000000\0"			\
+	"ramdiskaddr=88000000\0"		\
+	"fdtaddr=8f000000\0"			\
+	"wrtboot=" WRTBOOT_DEFAULT "\0"	\
+	"wrtupdate=" WRTUPDATE_DEFAULT "\0"	\
 	"mtdparts=" MTDPARTS_DEFAULT "\0"
 
 #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
@@ -296,10 +319,9 @@
 #define CONFIG_BOOTCOMMAND		"sf probe && sf read $kernel_load "    \
 					"e0000 f00000 && bootm $kernel_load"
 #else
-#define CONFIG_BOOTCOMMAND		"cp.b $kernel_start $kernel_load "     \
-					"$kernel_size && bootm $kernel_load"
+#define CONFIG_BOOTCOMMAND		"run wrtboot"
 #endif
-#define CONFIG_BOOTDELAY		10
+#define CONFIG_BOOTDELAY		3
 
 /* Monitor Command Prompt */
 #define CONFIG_SYS_CBSIZE		512	/* Console I/O Buffer Size */
-- 
1.7.9.5