715d7869a1bed54148a31e9712363cad18720304
[openwrt/staging/yousong.git] /
1 From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Fri, 22 Sep 2017 11:36:43 +0800
4 Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment
5
6 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
7 ---
8 include/configs/ls1046a_common.h | 15 ++++++++++++++-
9 include/configs/ls1046ardb.h | 6 ++++++
10 2 files changed, 20 insertions(+), 1 deletion(-)
11
12 diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
13 index 4fc2f94..53bd41b 100644
14 --- a/include/configs/ls1046a_common.h
15 +++ b/include/configs/ls1046a_common.h
16 @@ -276,7 +276,20 @@
17 "sd_bootcmd=echo Trying load from SD ..;" \
18 "mmcinfo; mmc read $load_addr " \
19 "$kernel_addr_sd $kernel_size_sd ;" \
20 - " bootm $load_addr#$board\0"
21 + " bootm $load_addr#$board\0" \
22 + "lede_setenv=setenv loadaddr 82000000 && " \
23 + "setenv fdtaddr 8f000000 && " \
24 + "setenv bootargs root=/dev/mtdblock9 " \
25 + "rootfstype=ext4 noinitrd " \
26 + "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
27 + "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
28 + "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
29 + "16M(kernel),22M(ext4rfs),10M(user)\0" \
30 + "lede_run=sf probe 0:0 && " \
31 + "sf read $fdtaddr f00000 100000 && " \
32 + "sf read $loadaddr 1000000 1000000 && " \
33 + "bootm $loadaddr - $fdtaddr\0" \
34 + "lede_boot=run lede_setenv;run lede_run\0"
35
36
37 #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \
38 diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
39 index f8c15a6..c3b50b1 100644
40 --- a/include/configs/ls1046ardb.h
41 +++ b/include/configs/ls1046ardb.h
42 @@ -251,6 +251,12 @@
43 "env exists secureboot && esbc_halt;"
44 #endif
45
46 +#undef CONFIG_BOOTCOMMAND
47 +#define CONFIG_BOOTCOMMAND "run lede_boot"
48 +
49 +#undef CONFIG_BOOTDELAY
50 +#define CONFIG_BOOTDELAY 3
51 +
52 #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \
53 "15m(u-boot),48m(kernel.itb);" \
54 "7e800000.flash:16m(nand_uboot)," \
55 --
56 2.7.4
57