aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch
blob: b5adca6202fbc1112a375bd1b3dd89885d09f64e (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
From d1b42455f62baefe7fb782d0d7100715b0fdb41f Mon Sep 17 00:00:00 2001
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Fri, 19 Jan 2018 10:16:57 +0800
Subject: [PATCH] armv8: ls1043a: add LEDE boot support in environment

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 include/configs/ls1043a_common.h |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index c437ce5..48ecff5 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -341,7 +341,19 @@
 		"env exists secureboot && mmc read $kernelheader_addr_r "		\
 		"$kernelhdr_addr_sd $kernelhdr_size_sd "		\
 		" && esbc_validate ${kernelheader_addr_r};"	\
-		" bootm $load_addr#$board\0"
+		" bootm $load_addr#$board\0" \
+	"lede_setenv=setenv loadaddr 82000000 && " \
+		"setenv fdtaddr 8f000000 && " \
+		"setenv bootargs root=/dev/mtdblock8 " \
+		"rootfstype=squashfs,jffs2 noinitrd " \
+		"earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
+		"mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \
+		"5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
+		"16M(kernel),32M(rootfs),64M(otherbank)\0" \
+	"lede_run=cp.b 60f00000 $fdtaddr 100000 && " \
+		"cp.b 61000000 $loadaddr 1000000 && " \
+		"bootm $loadaddr - $fdtaddr\0" \
+	"lede_boot=run lede_setenv;run lede_run\0"
 
 
 #undef CONFIG_BOOTCOMMAND
@@ -356,6 +368,12 @@
 			   "env exists secureboot && esbc_halt;"
 #endif
 
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND "run lede_boot"
+
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTDELAY		3
+
 #define CONFIG_BOOTARGS			"console=ttyS0,115200 root=/dev/ram0 " \
 					"earlycon=uart8250,mmio,0x21c0500 "    \
 					MTDPARTS_DEFAULT
-- 
1.7.1