# 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.07-rc4" BOOTPATCHDIR="v2023.07" 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 VIM3. 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-spi.bin:u-boot-spi.bin" write_uboot_platform_mtd() { dd if=$1/u-boot-spi.bin of=/dev/mtdblock0 } # Bring in some old FIP blobs for the VIM3L, for use exclusively with SPI booting. See https://github.com/LibreELEC/amlogic-boot-fip/pull/10 function fetch_sources_tools__libreelec_amlogic_fip_pre_vim3l_blob_update() { fetch_from_repo "https://github.com/LibreELEC/amlogic-boot-fip" "amlogic-boot-fip-vim3-spi" "commit:f49ee39e1c6988b8ddb24f4e5a63286d133864cb" # pre-VIM3/3L DDR update } function post_uboot_custom_postprocess__khadas_vim3l_uboot_new_and_old_blobs() { # Preserve the u-boot produced (unsigned) u-boot.bin run_host_command_logged cp -v u-boot.bin u-boot.bin.orig # Sign using the old FIP blobs (amlogic-boot-fip-vim3-spi), for use exclusively with SPI booting. display_alert "Signing u-boot for SPI booting with old blobs" "${BOARD}" "info" uboot_g12_postprocess "${SRC}"/cache/sources/amlogic-boot-fip-vim3-spi/khadas-vim3l g12a # Once done, store the resulting u-boot.bin as u-boot-spi.bin referenced in the UBOOT_TARGET_MAP above. run_host_command_logged cp -v u-boot.bin u-boot-spi.bin # Restore the original, so we can do everything again. run_host_command_logged cp -v u-boot.bin.orig u-boot.bin # Do the normal signing, using the regular/updated FIP blobs. This is for eMMC booting. display_alert "Signing u-boot for eMMC/SD booting with new blobs" "${BOARD}" "info" uboot_g12_postprocess "${SRC}"/cache/sources/amlogic-boot-fip/khadas-vim3l g12a display_alert "Done postprocessing u-boot with new/old FIP blobs" "${BOARD}" "info" }