add support for allwinner T527 Avaota-A1 (#6495)

This commit is contained in:
青菜萝 卜冬瓜 2024-04-26 15:22:17 +08:00 committed by GitHub
parent 3c649d2e9d
commit 35d7b325f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 6913 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# Allwinner Cortex-A55 octa core 2/4GB RAM SoC USB3 USB-C 2x GbE LCD
BOARD_NAME="Avaota A1"
BOARDFAMILY="sun55iw3-syterkit"
BOARD_MAINTAINER=""
KERNEL_TARGET="legacy"
BOOT_FDT_FILE="allwinner/sun55i-t527-avaota-a1.dtb"
SRC_EXTLINUX="yes"
SRC_CMDLINE="earlycon=uart8250,mmio32,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyAS0,115200 loglevel=8 cma=64M init=/sbin/init"
BOOTFS_TYPE="fat"
BOOTSIZE="256"
SERIALCON="ttyAS0"
declare -g SYTERKIT_BOARD_ID="avaota-a1" # This _only_ used for syterkit-allwinner extension
function post_family_tweaks__avaota-a1() {
display_alert "Applying boot blobs"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/bl31.bin" "$SDCARD/boot/bl31.bin"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/scp.bin" "$SDCARD/boot/scp.bin"
cp -v "$SRC/packages/blobs/sunxi/sun50iw3/splash.bin" "$SDCARD/boot/splash.bin"
display_alert "Applying wifi firmware"
pushd "$SDCARD/lib/firmware"
ln -s "aic8800/SDIO/aic8800D80" "aic8800d80" # use armbian-firmware
popd
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,33 @@
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2013-2023 Igor Pecovnik, igor@armbian.com
#
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
ARCH="arm64"
LINUXFAMILY="sun55iw3-syterkit"
enable_extension "syterkit-allwinner"
case "${BRANCH}" in
legacy)
KERNELSOURCE='https://github.com/AvaotaSBC/linux.git'
# This is Allwinner's new BSP kernel,
# which consists of a specific version of the mainline kernel source code and a folder containing BSP driver source code files.
KERNELBRANCH="branch:linux-5.15"
declare -g KERNEL_MAJOR_MINOR="5.15"
KERNELPATCHDIR="sun55iw3-syterkit-${BRANCH}"
LINUXCONFIG="linux-sun55iw3-syterkit-${BRANCH}"
;;
esac
write_uboot_platform() {
display_alert "The sun55iw3 platform does not have mainline or vendor u-boot available for booting Armbian."
display_alert "Instead, Syterkit is used as the bootloader: https://github.com/YuzukiHD/SyterKit"
}

View File

@ -0,0 +1,40 @@
#
# SPDX-License-Identifier: GPL-2.0
# This file is a part of the Armbian Build Framework https://github.com/armbian/build/
# This writes the SyterKit bootloader img to the image.
function post_umount_final_image__write_syterkit_to_image() {
display_alert "Finding SyterKit latest version" "from GitHub" "info"
# Find the latest version of SyterKit from GitHub, using JSON API, curl and jq.
declare api_url="https://api.github.com/repos/YuzukiHD/SyterKit/releases/latest"
declare latest_version
latest_version=$(curl -s "${api_url}" | jq -r '.tag_name')
display_alert "Latest version of SyterKit is" "${latest_version}" "info"
# Prepare the cache dir
declare syterkit_cache_dir="${SRC}/cache/syterkit"
mkdir -p "${syterkit_cache_dir}"
declare syterkit_img_filename="${SYTERKIT_BOARD_ID}.tar.gz"
declare -g -r syterkit_img_path="${syterkit_cache_dir}/${syterkit_img_filename}"
display_alert "SyterKit image path" "${syterkit_img_path}" "info"
declare download_url="https://github.com/YuzukiHD/SyterKit/releases/download/${latest_version}/${syterkit_img_filename}"
# Download the image (with wget) if it doesn't exist; download to a temporary file first, then move to the final path.
if [[ ! -f "${syterkit_cache_dir}/${SYTERKIT_BOARD_ID}/extlinux_boot/extlinux_boot_bin_card.bin" ]]; then
display_alert "Downloading SyterKit image" "${download_url}" "info"
declare tmp_syterkit_img_path="${syterkit_img_path}.tmp"
run_host_command_logged wget -O "${tmp_syterkit_img_path}" "${download_url}"
run_host_command_logged mv -v "${tmp_syterkit_img_path}" "${syterkit_img_path}"
display_alert " Decompressing SyterKit image to" "${syterkit_img_path}/${SYTERKIT_BOARD_ID}" "info"
mkdir -p ${syterkit_cache_dir}/${SYTERKIT_BOARD_ID}
run_host_command_logged tar -zxvf ${syterkit_img_path} -C ${syterkit_cache_dir}/${SYTERKIT_BOARD_ID}
else
display_alert "SyterKit image already downloaded, using it" "${syterkit_img_path}" "info"
fi
display_alert " Writing SyterKit image" "${syterkit_img_path} to ${LOOP}" "info"
dd if="${syterkit_cache_dir}/${SYTERKIT_BOARD_ID}/extlinux_boot/extlinux_boot_bin_card.bin" of="${LOOP}" bs=1k conv=notrunc seek=8
}

Binary file not shown.

Binary file not shown.

Binary file not shown.