aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMathew McBride2023-07-21 04:39:21 +0000
committerTom Rini2023-08-03 09:40:50 -0400
commitbcedba521bb6f5a4b117aeb342229de27bfe9042 (patch)
treeaeb1bec315dca42f9f39c8697b2d29544085e32d /include
parent1fd2186a814b8481af8c01ddd47f645b9588db5b (diff)
board: traverse: ten64: add NAND based OpenWrt bootcmd
The default Ten64 MTD configuration reserves two ubifs partitions for OpenWrt residing on NAND flash. Add the bootcmd for this system into the default environment. Signed-off-by: Mathew McBride <matt@traverse.com.au> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/ten64.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/configs/ten64.h b/include/configs/ten64.h
index 1b8b27c2307..f9e800d4b6c 100644
--- a/include/configs/ten64.h
+++ b/include/configs/ten64.h
@@ -39,6 +39,11 @@
func(PXE, pxe, 0)
#include <config_distro_bootcmd.h>
+#define OPENWRT_NAND_BOOTCMD \
+ "bootcmd_openwrt_nand=ubi part ubi${openwrt_active_sys} && "\
+ "ubi read $load_addr kernel && " \
+ "setenv bootargs \"root=/dev/ubiblock0_1 earlycon ubi.mtd=ubi${openwrt_active_sys}\" &&"\
+ "bootm $load_addr#ten64\0"
#undef CFG_EXTRA_ENV_SETTINGS
#define CFG_EXTRA_ENV_SETTINGS \
@@ -48,6 +53,8 @@
"kernel_addr_r=0x81000000\0" \
"load_addr=0xa0000000\0" \
BOOTENV \
+ OPENWRT_NAND_BOOTCMD \
+ "openwrt_active_sys=a\0" \
"load_efi_dtb=mtd read devicetree $fdt_addr_r && fdt addr $fdt_addr_r && " \
"fdt resize && fdt boardsetup\0" \
"bootcmd_recovery=mtd read recovery 0xa0000000 && " \