aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/uboot-layerscape/patches/0004-armv8-ls1088ardb-add-LEDE-boot-support-in-environmen.patch
blob: 72c43ebcd0b6822d1b4f03a1381f7439d30c67f9 (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
From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Mon, 16 Oct 2017 11:57:36 +0800
Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
 include/configs/ls1088ardb.h | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index 7bd152d..4cefa40 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -404,7 +404,20 @@
 		"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/mtdblock10 " \
+		"rootfstype=ext4 noinitrd " \
+		"earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
+		"mtdparts=20c0000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
+		"6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \
+		"16M(kernel),17M(ext4rfs),15M(user)\0" \
+	"lede_run=sf probe 0:0 && " \
+		"sf read $fdtaddr f00000 100000 && " \
+		"sf read $loadaddr 1000000 1000000 && " \
+		"bootm $loadaddr - $fdtaddr\0" \
+	"lede_boot=run lede_setenv;run lede_run\0"
 
 #undef CONFIG_BOOTCOMMAND
 #if defined(CONFIG_QSPI_BOOT)
@@ -429,6 +442,18 @@
 			"run distro_bootcmd;run sd_bootcmd;"		\
 			"env exists secureboot && esbc_halt;"
 #endif
+
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND                                      \
+		"sf probe 0:0;sf read 0x80000000 0xA00000 0x300000;"	\
+		"sf read 0x80300000 0xE00000 0x100000;"		\
+		"fsl_mc start mc 0x80000000 0x80300000;"	\
+		"sf read 0x80400000 0xd00000 0x100000;"	\
+		"fsl_mc apply dpl 0x80400000;"	\
+		"run lede_boot;"
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTDELAY		3
+
 /* MAC/PHY configuration */
 #ifdef CONFIG_FSL_MC_ENET
 #define CONFIG_PHYLIB_10G
-- 
2.7.4