6ce71f2c667d4c1dd979856d87a32909ed972790
[openwrt/staging/neocturne.git] /
1 From 479bf0c0bec2e99442214facf0f414c2c737ac7b Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Mon, 16 Oct 2017 11:57:36 +0800
4 Subject: [PATCH] armv8: ls1088ardb: add LEDE boot support in environment
5
6 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 ---
8 include/configs/ls1088ardb.h | 27 ++++++++++++++++++++++++++-
9 1 file changed, 26 insertions(+), 1 deletion(-)
10
11 diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
12 index 7bd152d..4cefa40 100644
13 --- a/include/configs/ls1088ardb.h
14 +++ b/include/configs/ls1088ardb.h
15 @@ -404,7 +404,20 @@
16 "env exists secureboot && mmc read $kernelheader_addr_r " \
17 "$kernelhdr_addr_sd $kernelhdr_size_sd " \
18 " && esbc_validate ${kernelheader_addr_r};" \
19 - "bootm $load_addr#$BOARD\0"
20 + "bootm $load_addr#$BOARD\0" \
21 + "lede_setenv=setenv loadaddr 82000000 && " \
22 + "setenv fdtaddr 8f000000 && " \
23 + "setenv bootargs ubi.mtd=10 root=ubi0:rootfs rw " \
24 + "rootfstype=ubifs noinitrd " \
25 + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
26 + "mtdparts=20c0000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
27 + "6M(reserved-1),3M(mc),1M(dpl),1M(dpc),1M(dtb)," \
28 + "16M(kernel),32M(ubifs)\0" \
29 + "lede_run=sf probe 0:0 && " \
30 + "sf read $fdtaddr f00000 100000 && " \
31 + "sf read $loadaddr 1000000 1000000 && " \
32 + "bootm $loadaddr - $fdtaddr\0" \
33 + "lede_boot=run lede_setenv;run lede_run\0"
34
35 #undef CONFIG_BOOTCOMMAND
36 #if defined(CONFIG_QSPI_BOOT)
37 @@ -429,6 +442,18 @@
38 "run distro_bootcmd;run sd_bootcmd;" \
39 "env exists secureboot && esbc_halt;"
40 #endif
41 +
42 +#undef CONFIG_BOOTCOMMAND
43 +#define CONFIG_BOOTCOMMAND \
44 + "sf probe 0:0;sf read 0x80000000 0xA00000 0x300000;" \
45 + "sf read 0x80300000 0xE00000 0x100000;" \
46 + "fsl_mc start mc 0x80000000 0x80300000;" \
47 + "sf read 0x80400000 0xd00000 0x100000;" \
48 + "fsl_mc apply dpl 0x80400000;" \
49 + "run lede_boot;"
50 +#undef CONFIG_BOOTDELAY
51 +#define CONFIG_BOOTDELAY 3
52 +
53 /* MAC/PHY configuration */
54 #ifdef CONFIG_FSL_MC_ENET
55 #define CONFIG_PHYLIB_10G
56 --
57 2.7.4
58