- LWIP has issues with TFTP (serverip/tftpserverip) on v2026.01 - Kwiboo is already sending fixes, few separate series; check v2026.04 one day - for now just disable the 2 boards I had enabled it for and use the legacy network stack again - Fixes:332e43bc8c- Fixes:d88d32b248
106 lines
5.6 KiB
Plaintext
106 lines
5.6 KiB
Plaintext
# Amlogic S905D3 quad core 2GB RAM SoC eMMC GBE USB3 SPI
|
|
BOARD_NAME="Khadas VIM3L"
|
|
BOARD_VENDOR="khadas"
|
|
BOARDFAMILY="meson-sm1"
|
|
BOARD_MAINTAINER="rpardini"
|
|
BOOTCONFIG="khadas-vim3l_defconfig"
|
|
KERNEL_TARGET="current,edge"
|
|
KERNEL_TEST_TARGET="current"
|
|
MODULES_BLACKLIST="simpledrm" # SimpleDRM conflicts with Panfrost
|
|
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:v2026.01"
|
|
BOOTPATCHDIR="v2026.01" # this has 'board_khadas-vim3' 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
|
|
}
|
|
|
|
# Enable extra u-boot .config options, this way we avoid patching defconfig
|
|
function post_config_uboot_target__extra_configs_for_khadas_vim3l() {
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable preboot & flash user LED in preboot" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT
|
|
run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led white:status on; led red:status on; sleep 0.1; led white:status off; led red:status off;'" # double quotes required due to run_host_command_logged's quirks
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable I2C support" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_DM_I2C
|
|
run_host_command_logged scripts/config --enable CONFIG_SYS_I2C_MESON
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_I2C
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable GPIO expander support" "info" # to drive 'red' led
|
|
run_host_command_logged scripts/config --enable CONFIG_MAX7320_GPIO
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_PCA953X
|
|
run_host_command_logged scripts/config --enable CONFIG_DM_PCA953X
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable EFI debugging commands" "info"
|
|
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
|
|
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more filesystems support" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_BTRFS
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable more compression support" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_LZO
|
|
run_host_command_logged scripts/config --enable CONFIG_BZIP2
|
|
run_host_command_logged scripts/config --enable CONFIG_ZSTD
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable gpio LED support" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_LED
|
|
run_host_command_logged scripts/config --enable CONFIG_LED_GPIO
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable some USB ethernet drivers" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_HOST_ETHER
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_ASIX
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_ASIX88179
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_MCS7830
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_RTL8152
|
|
run_host_command_logged scripts/config --enable CONFIG_USB_ETHER_SMSC95XX
|
|
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable networking cmds" "info"
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_NFS
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_WGET
|
|
run_host_command_logged scripts/config --enable CONFIG_CMD_DNS
|
|
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP
|
|
|
|
# @TODO: disabled; v2026.01 lwip has a few issues; check after v2026.04 as Kwiboo is already at-it
|
|
#display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable LWIP (new networking stack)" "info"
|
|
#run_host_command_logged scripts/config --enable CONFIG_CMD_MII
|
|
#run_host_command_logged scripts/config --enable CONFIG_NET_LWIP
|
|
|
|
# UMS, RockUSB, gadget stuff
|
|
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable UMS/RockUSB gadget" "info"
|
|
declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ACM")
|
|
for config in "${enable_configs[@]}"; do
|
|
run_host_command_logged scripts/config --enable "${config}"
|
|
done
|
|
# Auto-enabled by the above, force off...
|
|
run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT
|
|
}
|