Move gxlimg to board level and some clean

This commit is contained in:
retro98boy 2025-11-17 16:20:56 +08:00 committed by Igor
parent ccd1ca04f9
commit bda8e76be6
3 changed files with 21 additions and 15 deletions

View File

@ -10,9 +10,11 @@ SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-gxl-s905x-bestv-r3300-l.dtb"
PACKAGE_LIST_BOARD="alsa-ucm-conf" # Contain ALSA UCM top-level configuration file
BOOTBRANCH_BOARD="tag:v2025.04"
BOOTPATCHDIR="v2025.04" # This has a patch that adds support for BesTV R3300-L.
BOOTPATCHDIR="v2025.04"
enable_extension "gxlimg"
enable_extension "amlogic-fip-blobs"
function post_family_config__use_repacked_fip() {
declare -g UBOOT_TARGET_MAP="u-boot.bin"
@ -24,22 +26,24 @@ function post_family_config__use_repacked_fip() {
}
function post_uboot_custom_postprocess__repack_vendor_fip_with_mainline_uboot() {
gxlimg_repack_fip_with_new_uboot "${SRC}/cache/sources/amlogic-fip-blobs/bestv-r3300-l/bootloader.PARTITION" gxl
gxlimg_repack_fip_with_new_uboot \
"${SRC}/cache/sources/amlogic-fip-blobs/bestv-r3300-l/bootloader.PARTITION" \
gxl
}
function post_family_tweaks_bsp__bestv-r3300-l() {
display_alert "${BOARD}" "Installing ALSA UCM configuration files" "info"
# Use ALSA UCM via GUI: Install a desktop environment such as GNOME, PipeWire, and WirePlumber.
# Use ALSA UCM via CLI:
# alsactl init && alsaucm set _verb "HiFi" set _enadev "HDMI"
# or
# alsactl init && alsaucm set _verb "HiFi" set _enadev "Lineout"
# playback: aplay -D plughw:S905XP212,0 /usr/share/sounds/alsa/Front_Center.wav
install -Dm644 "${SRC}/packages/bsp/S905X-P212/S905X-P212-HiFi.conf" "${destination}/usr/share/alsa/ucm2/Amlogic/gx-sound-card/S905X-P212-HiFi.conf"
install -Dm644 "${SRC}/packages/bsp/S905X-P212/S905X-P212.conf" "${destination}/usr/share/alsa/ucm2/Amlogic/gx-sound-card/S905X-P212.conf"
install -Dm644 "${SRC}/packages/bsp/S905X-P212/S905X-P212-HiFi.conf" \
"${destination}/usr/share/alsa/ucm2/Amlogic/gx-sound-card/S905X-P212-HiFi.conf"
install -Dm644 "${SRC}/packages/bsp/S905X-P212/S905X-P212.conf" \
"${destination}/usr/share/alsa/ucm2/Amlogic/gx-sound-card/S905X-P212.conf"
if [ ! -d "${destination}/usr/share/alsa/ucm2/conf.d/gx-sound-card" ]; then
mkdir -p "${destination}/usr/share/alsa/ucm2/conf.d/gx-sound-card"

View File

@ -11,10 +11,12 @@ SERIALCON="ttyAML0"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="amlogic/meson-g12b-a311d-cainiao-cniot-core.dtb"
PACKAGE_LIST_BOARD="alsa-ucm-conf" # Contain ALSA UCM top-level configuration file
BOOTBRANCH_BOARD="tag:v2025.04"
BOOTPATCHDIR="v2025.04"
enable_extension "gxlimg"
enable_extension "amlogic-fip-blobs"
function post_family_config__use_repacked_fip() {
declare -g UBOOT_TARGET_MAP="u-boot.bin"
unset write_uboot_platform
@ -25,20 +27,22 @@ function post_family_config__use_repacked_fip() {
}
function post_uboot_custom_postprocess__repack_vendor_fip_with_mainline_uboot() {
gxlimg_repack_fip_with_new_uboot "${SRC}/cache/sources/amlogic-fip-blobs/cainiao-cniot-core/DDR.USB" g12b
gxlimg_repack_fip_with_new_uboot \
"${SRC}/cache/sources/amlogic-fip-blobs/cainiao-cniot-core/DDR.USB" \
g12b
}
function post_family_tweaks_bsp__cainiao-cniot-core() {
display_alert "${BOARD}" "Installing ALSA UCM configuration files" "info"
# Use ALSA UCM via GUI: Install a desktop environment such as GNOME, PipeWire, and WirePlumber.
# Use ALSA UCM via CLI: alsactl init && alsaucm set _verb "HiFi" set _enadev "HDMI" set _enadev "Speaker"
# playback via HDMI: aplay -D plughw:cainiaocniotcor,0 /usr/share/sounds/alsa/Front_Center.wav
# playback via internal speaker: aplay -D plughw:cainiaocniotcor,1 /usr/share/sounds/alsa/Front_Center.wav
install -Dm644 "${SRC}/packages/bsp/cainiao-cniot-core/cainiao-cniot-core-HiFi.conf" "${destination}/usr/share/alsa/ucm2/Amlogic/axg-sound-card/cainiao-cniot-core-HiFi.conf"
install -Dm644 "${SRC}/packages/bsp/cainiao-cniot-core/cainiao-cniot-core.conf" "${destination}/usr/share/alsa/ucm2/Amlogic/axg-sound-card/cainiao-cniot-core.conf"
install -Dm644 "${SRC}/packages/bsp/cainiao-cniot-core/cainiao-cniot-core-HiFi.conf" \
"${destination}/usr/share/alsa/ucm2/Amlogic/axg-sound-card/cainiao-cniot-core-HiFi.conf"
install -Dm644 "${SRC}/packages/bsp/cainiao-cniot-core/cainiao-cniot-core.conf" \
"${destination}/usr/share/alsa/ucm2/Amlogic/axg-sound-card/cainiao-cniot-core.conf"
if [ ! -d "${destination}/usr/share/alsa/ucm2/conf.d/axg-sound-card" ]; then
mkdir -p "${destination}/usr/share/alsa/ucm2/conf.d/axg-sound-card"

View File

@ -6,8 +6,6 @@
# This file is a part of the Armbian Build Framework
# https://github.com/armbian/build/
#
enable_extension "gxlimg"
enable_extension "amlogic-fip-blobs"
UBOOT_TARGET_MAP="${UBOOT_TARGET_MAP:-u-boot-dtb.img;;u-boot.bin.sd.bin:u-boot.bin u-boot-dtb.img}"
BOOTSCRIPT="boot-meson64.cmd:boot.cmd"
BOOTENV_FILE='meson.txt'