Files
BPI-CM9-Linux/amlbian/config/boards/include/amlogic_uboot2023.inc
T
2026-08-24 10:03:24 +08:00

65 lines
2.2 KiB
PHP

# Amlogic U-Boot 2023 Configuration Include
# This file contains U-Boot specific configuration for Amlogic boards using U-Boot 2023
#
# Usage: source amlogic_uboot2023.inc
# AMLOGIC TODO: U-Boot 2023 configuration loaded
display_alert "AMLOGIC TODO: Loading Amlogic U-Boot 2023 configuration" "${BOARD:-unknown}" "info"
# U-Boot version information
UBOOT_VERSION="2023"
UBOOT_MAJOR="2023"
UBOOT_MINOR="01"
# U-Boot source configuration
#BOOTCONFIG="s6_bq201" # UBOOT_MACHINE for meson build
#BOOTCONFIG should be defined in Machine Config
UBOOT_MACHINE="${BOOTCONFIG}"
# U-Boot target map for compilation
UBOOT_TARGET_MAP="u-boot-dtb.img;;u-boot.bin.sd.bin.signed:u-boot.bin u-boot.bin.signed u-boot.bin.usb.signed:u-boot-usb.bin"
# U-Boot build options
UBOOT_COMPRESS_IMAGE="no"
UBOOT_NEEDS_GCC10_OR_NEWER="yes"
BL33_2023="${UBOOT_VENDOR_DIR}/bl33/v2023"
UBOOT_DEFCONFIG_DIR="${BL33_2023}/configs/amlogic"
# Function to validate U-Boot configuration
function validate_uboot_config__amlbian_2023() {
display_alert "AMLOGIC TODO: Validating U-Boot 2023 configuration" "${BOARD}" "info"
# Ensure BOOTBRANCH is valid
if [[ "${USE_LOCAL_SOURCES}" != "yes" ]]; then
BOOTBRANCH="${BOOTBRANCH:-${BOOTBRANCH_DEFAULT}}"
fi
display_alert "AMLOGIC TODO: U-Boot config" \
"BOOTBRANCH: ${BOOTBRANCH:-local}, BOOTCONFIG: ${BOOTCONFIG}, UBOOT_TARGET_MAP: ${UBOOT_TARGET_MAP}" \
"info"
return 0
}
# Function to get U-Boot source info
function get_uboot_source_info__amlbian_2023() {
if [[ "${USE_LOCAL_SOURCES}" == "yes" ]]; then
echo "Using local U-Boot source at: ${LOCAL_UBOOT_PATH:-not set}"
echo "U-Boot version: ${UBOOT_VERSION}"
else
echo "Using remote U-Boot source: ${BOOTSOURCE:-${BOOTSOURCE_DEFAULT}}"
echo "U-Boot branch: ${BOOTBRANCH:-${BOOTBRANCH_DEFAULT}}"
echo "U-Boot version: ${UBOOT_VERSION}"
fi
}
# Hook to setup U-Boot build environment
function pre_uboot_build__amlbian_2023() {
display_alert "AMLOGIC TODO: Pre-U-Boot 2023 build hook" "${BOARD}" "info"
validate_uboot_config__amlbian_2023
}
# Include this configuration
validate_uboot_config__amlbian_2023
# End of amlogic_uboot2023.inc