openwrtv3/package/boot/uboot-layerscape/patches/0092-armv8-set-openwrt-lede-default-boot-env-for-ls1012ar.patch
Yutang Jiang 15a14cf166 layerscape: add 64b/32b target for ls1012ardb device
The QorIQ LS1012A processor, optimized for battery-backed or
USB-powered, integrates a single ARM Cortex-A53 core with a hardware
packet forwarding engine and high-speed interfaces to deliver
line-rate networking performance.
QorIQ LS1012A Reference Design System (LS1012ARDB) is a high-performance
development platform, with a complete debugging environment.
The LS1012ARDB board supports the QorIQ LS1012A processor and is
optimized to support the high-bandwidth DDR3L memory and
a full complement of high-speed SerDes ports.

LEDE/OPENWRT will auto strip executable program file while make. So we
need select CONFIG_NO_STRIP=y while make menuconfig to avoid the ppfe network
fiemware be destroyed, then run make to build ls1012ardb firmware.

The fsl-quadspi flash with jffs2 fs is unstable and arise some failed message.
This issue have noticed the IP owner for investigate, hope he can solve it
earlier. So the ls1012ardb now also provide a xx-firmware.ext4.bin as default
firmware, and the uboot bootcmd will run wrtboot_ext4rfs for "rootfstype=ext4"
bootargs.

Signed-off-by: Yutang Jiang <yutang.jiang@nxp.com>
2016-10-31 17:00:10 +01:00

67 lines
2.5 KiB
Diff

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