layerscape: armv8_64b: add Traverse Ten64 NAND variant

The Ten64 board[1] is based around NXP's Layerscape LS1088A SoC.
It is capable of booting both standard Linux distributions
from disk devices, using EFI, and booting OpenWrt
from NAND.

See the online manual for more information, including the
flash layout[2].

This patchset adds support for generating Ten64 images
for NAND boot.
For disk boot, one can use the EFI support that was
recently added to the armvirt target.

We previously supported NAND users by building
inside our armvirt/EFI target[3], but this approach
is not suitable for OpenWrt upstream. Users who
used our supplied NAND images will be able to upgrade
to this via sysupgrade.

Signed-off-by: Mathew McBride <matt@traverse.com.au>

[1] - https://www.traverse.com.au/hardware/ten64
[2] - https://ten64doc.traverse.com.au/hardware/flash/
[3] - Example:
285e4360e1
(cherry picked from commit af0546da34)
This commit is contained in:
Mathew McBride
2023-06-06 06:24:11 +00:00
committed by Hauke Mehrtens
parent e54e5bc415
commit 68a4c60b5c
8 changed files with 93 additions and 1 deletions

View File

@@ -49,6 +49,26 @@ platform_do_upgrade_traverse_nandubi() {
nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys)
}
platform_do_upgrade_traverse_slotubi() {
part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')"
echo "Active boot slot: ${part}"
new_active_sys="b"
if [ ! -z "${part}" ]; then
if [ "${part}" = "ubia" ]; then
CI_UBIPART="ubib"
else
CI_UBIPART="ubia"
new_active_sys="a"
fi
fi
echo "Updating UBI part ${CI_UBIPART}"
fw_setenv "openwrt_active_sys" "${new_active_sys}"
nand_do_upgrade "$1"
return $?
}
platform_copy_config_sdboot() {
local diskdev partdev parttype=ext4
@@ -90,6 +110,10 @@ platform_check_image() {
nand_do_platform_check "traverse-ls1043" $1
return $?
;;
traverse,ten64)
nand_do_platform_check "ten64-mtd" $1
return $?
;;
fsl,ls1012a-frdm | \
fsl,ls1012a-frwy-sdboot | \
fsl,ls1012a-rdb | \
@@ -130,6 +154,9 @@ platform_do_upgrade() {
traverse,ls1043s)
platform_do_upgrade_traverse_nandubi "$1"
;;
traverse,ten64)
platform_do_upgrade_traverse_slotubi "${1}"
;;
fsl,ls1012a-frdm | \
fsl,ls1012a-rdb | \
fsl,ls1021a-twr | \