1 From b0f227f32f898bdf52f4ecafc83d1e2f1d6ee6ec Mon Sep 17 00:00:00 2001
2 From: Yutang Jiang <yutang.jiang@nxp.com>
3 Date: Thu, 27 Oct 2016 23:47:43 +0800
4 Subject: [PATCH 92/93] armv8: set openwrt/lede default boot env for
7 Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
9 include/configs/ls1012a_common.h | 28 +++++++++++++++++++++++++++-
10 1 file changed, 27 insertions(+), 1 deletion(-)
12 diff --git a/include/configs/ls1012a_common.h b/include/configs/ls1012a_common.h
13 index 0489492..b23ba4f 100644
14 --- a/include/configs/ls1012a_common.h
15 +++ b/include/configs/ls1012a_common.h
18 #define CONFIG_DISPLAY_CPUINFO
20 +#define WRTBOOT_DEFAULT "pfe stop && sf probe 0:0 && setenv bootargs " \
21 + "root=/dev/mtdblock5 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200 " \
22 + "earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1M(rcw)," \
23 + "1M(u-boot),1M(u-boot-env),1M(dtb),5M(kernel),23M(rootfs),32M(user)" \
24 + " && sf read $fdtaddr 0x300000 100000 && " \
25 + "sf read $loadaddr 0x400000 500000 && bootm $loadaddr - $fdtaddr"
27 +#define WRTBOOT_EXT4RFS "pfe stop && sf probe 0:0 && setenv bootargs " \
28 + "root=/dev/mtdblock5 rootfstype=ext4 noinitrd console=ttyS0,115200 " \
29 + "earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1M(rcw)," \
30 + "1M(u-boot),1M(u-boot-env),1M(dtb),5M(kernel),23M(ext4rfs),32M(user)" \
31 + " && sf read $fdtaddr 0x300000 100000 && " \
32 + "sf read $loadaddr 0x400000 500000 && bootm $loadaddr - $fdtaddr"
34 +#define WRTUPDATE_DEFAULT " sf probe 0:0 && tftp 0xa0000000 <tftp_folder>/" \
35 + "lede-layerscape-64b-ls1012ardb-squashfs-firmware.ext4.bin && protect off all" \
36 + " && sf erase 0 $filesize && sf write 0xa0000000 0 $filesize; reset"
38 /* Initial environment variables */
39 #define CONFIG_EXTRA_ENV_SETTINGS \
40 "initrd_high=0xffffffff\0" \
42 "kernel_start=0xa00000\0" \
43 "kernel_load=0xa0000000\0" \
44 "kernel_size=0x2800000\0" \
45 + "loadaddr=82000000\0" \
46 + "ramdiskaddr=88000000\0" \
47 + "fdtaddr=8f000000\0" \
48 + "wrtboot=" WRTBOOT_DEFAULT "\0" \
49 + "wrtboot_ext4rfs=" WRTBOOT_EXT4RFS "\0" \
50 + "wrtupdate=" WRTUPDATE_DEFAULT "\0" \
51 "console=ttyAMA0,38400n8\0"
55 "$kernel_start $kernel_size && "\
58 -#define CONFIG_BOOTDELAY 10
59 +#define CONFIG_BOOTDELAY 3
60 +#undef CONFIG_BOOTCOMMAND
61 +#define CONFIG_BOOTCOMMAND "run wrtboot_ext4rfs"
63 /* Monitor Command Prompt */
64 #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */