Files
build/config/boards/khadas-vim3l.conf
2023-10-14 00:02:58 +02:00

42 lines
1.9 KiB
Plaintext

# Amlogic S905D3 quad core 2GB RAM SoC eMMC GBE USB3 SPI
BOARD_NAME="Khadas VIM3L"
BOARDFAMILY="meson-sm1"
BOARD_MAINTAINER="rpardini"
BOOTCONFIG="khadas-vim3l_defconfig"
KERNEL_TARGET="current,edge"
FULL_DESKTOP="yes"
SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-sm1-khadas-vim3l.dtb"
ASOUND_STATE="asound.state.khadas-vim3l"
BOOTBRANCH_BOARD="tag:v2023.10"
BOOTPATCHDIR="v2023.10" # this has 'board_khadas-vim3l' which has a patch to boot USB/NVMe/SCSI first
declare -g KHADAS_OOWOW_BOARD_ID="VIM3L" # for use with EXT=output-image-oowow
# To enable the SPI NOR the -spi .dtb is required, because eMMC shares a pin with SPI on the VIM3L. To use it:
# fdtfile=amlogic/meson-sm1-khadas-vim3l-spinor.dtb # in armbianEnv.txt and reboot, then run armbian-install
# After deploying to SPI-NOR/MTD, return back to the normal DTB, otherwise eMMC speed is impaired.
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img u-boot.bin:u-boot-spi.bin"
# Smarter/faster/better to-spi writer using flashcp (hopefully with --partition)
function write_uboot_platform_mtd() {
declare -a extra_opts_flashcp=("--verbose")
if flashcp -h | grep -q -e '--partition'; then
echo "Confirmed flashcp supports --partition -- read and write only changed blocks." >&2
extra_opts_flashcp+=("--partition")
else
echo "flashcp does not support --partition, will write full SPI flash blocks." >&2
fi
flashcp "${extra_opts_flashcp[@]}" "${1}/u-boot-spi.bin" /dev/mtd0
}
# Khadas provided fixed FIP blobs for SPI, so we can now use the same blobs for both SPI and eMMC booting.
# See https://github.com/armbian/build/pull/5386#issuecomment-1752400874
# See https://github.com/LibreELEC/amlogic-boot-fip/pull/21
function post_uboot_custom_postprocess__khadas_vim3l_uboot() {
display_alert "Signing u-boot FIP" "${BOARD}" "info"
uboot_g12_postprocess "${SRC}"/cache/sources/amlogic-boot-fip/khadas-vim3l g12a
}