6da256ab068e5020bf2bf35746a209375a48d92f
[openwrt/staging/dedeckeh.git] /
1 From 20f270670d1d5e14f3fd128f359535300a955ac8 Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Mon, 16 Oct 2017 12:37:05 +0800
4 Subject: [PATCH] armv8: ls2088ardb: add LEDE boot support in environment
5
6 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 ---
8 include/configs/ls2080ardb.h | 23 ++++++++++++++++++++++-
9 1 file changed, 22 insertions(+), 1 deletion(-)
10
11 diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
12 index 8a34990..8ae3944 100644
13 --- a/include/configs/ls2080ardb.h
14 +++ b/include/configs/ls2080ardb.h
15 @@ -432,7 +432,19 @@ unsigned long get_board_sys_clk(void);
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 root=/dev/mtdblock9 " \
24 + "rootfstype=squashfs,jffs2 noinitrd " \
25 + "earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 " \
26 + "mtdparts=580000000.nor: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(rootfs),64M(otherbank)\0" \
29 + "lede_run=cp.b 580f00000 $fdtaddr 100000 && " \
30 + "cp.b 581000000 $loadaddr 1000000 && " \
31 + "bootm $loadaddr - $fdtaddr\0" \
32 + "lede_boot=run lede_setenv;run lede_run\0"
33
34 #undef CONFIG_BOOTCOMMAND
35 #ifdef CONFIG_QSPI_BOOT
36 @@ -463,6 +475,15 @@ unsigned long get_board_sys_clk(void);
37 "env exists secureboot && esbc_halt;"
38 #endif
39
40 +#undef CONFIG_BOOTCOMMAND
41 +#define CONFIG_BOOTCOMMAND \
42 + "fsl_mc start mc 0x580a00000 0x580e00000;" \
43 + "fsl_mc apply dpl 0x580d00000;" \
44 + "run lede_boot;"
45 +
46 +#undef CONFIG_BOOTDELAY
47 +#define CONFIG_BOOTDELAY 3
48 +
49 #undef CONFIG_BOOTARGS
50 #define CONFIG_BOOTARGS "console=ttyS1,115200 root=/dev/ram0 " \
51 "earlycon=uart8250,mmio,0x21c0600 " \
52 --
53 2.7.4
54