96 lines
3.4 KiB
PHP
96 lines
3.4 KiB
PHP
# Amlogic Kernel 6.12 Configuration Include
|
|
# This file contains kernel-specific configuration for Amlogic boards using kernel 6.12
|
|
# Include this file in board configurations to ensure proper kernel version handling
|
|
#
|
|
# Usage: source amlogic_k6.12.inc
|
|
|
|
# AMLOGIC TODO: Kernel 6.12 configuration loaded
|
|
display_alert "AMLOGIC TODO: Loading Amlogic kernel 6.12 configuration" "${BOARD:-unknown}" "info"
|
|
|
|
# Kernel version information
|
|
# This is critical to avoid warnings like:
|
|
# "KERNELBRANCH ('local') is set, but KERNEL_MAJOR_MINOR is unset"
|
|
KERNEL_MAJOR_MINOR="6.12"
|
|
KERNEL_VERSION_FULL="6.12.58"
|
|
KERNEL_VER="aml-6.12"
|
|
KERNEL_BRANCH="android16-6.12"
|
|
|
|
# Kernel source configuration
|
|
# When using local sources, these will be overridden by amlogic_common.inc
|
|
KERNELSOURCE_DEFAULT="https://github.com/amlogic/linux"
|
|
KERNELBRANCH_DEFAULT="${KERNEL_BRANCH}"
|
|
KERNELPATCHDIR_DEFAULT="archive/amlogic-${KERNEL_MAJOR_MINOR}"
|
|
|
|
# Kernel build configuration
|
|
LINUX_DEFCONFIG="s6_bq201_defconfig"
|
|
LINUX_DEFCONFIG_FALLBACK="s6.cfg"
|
|
KERNEL_DEVICETREE="s6_s905d5_bq201_linux.dtb"
|
|
|
|
# Kernel target configuration
|
|
KERNEL_TARGET="amlogic-kernel-target"
|
|
KERNEL_TEST_TARGET="amlogic-kernel-test-target"
|
|
|
|
# Kernel modules configuration
|
|
MODULES_BLACKLIST="amlogic-modules-blacklist"
|
|
MODULES_INITRD="mesons6-bq201-initrd"
|
|
|
|
# Kernel build flags and options
|
|
KERNEL_BUILD_FLAGS=""
|
|
KERNEL_IMAGE_TYPE="Image"
|
|
KERNEL_CONSOLE="ttyAML0"
|
|
|
|
# Function to validate kernel configuration
|
|
function validate_kernel_config__amlbian_k6_12() {
|
|
display_alert "AMLOGIC TODO: Validating kernel 6.12 configuration" "${BOARD}" "info"
|
|
|
|
# Ensure KERNEL_MAJOR_MINOR is set when KERNELBRANCH is set
|
|
if [[ -n "${KERNELBRANCH}" ]] && [[ -z "${KERNEL_MAJOR_MINOR}" ]]; then
|
|
display_alert "WARNING" "KERNELBRANCH ('${KERNELBRANCH}') is set, but KERNEL_MAJOR_MINOR is unset" "warn"
|
|
KERNEL_MAJOR_MINOR="6.12"
|
|
display_alert "INFO" "Setting KERNEL_MAJOR_MINOR to '6.12' based on kernel version" "info"
|
|
fi
|
|
|
|
# Log kernel configuration for debugging
|
|
display_alert "AMLOGIC TODO: Kernel config" \
|
|
"MAJOR_MINOR: ${KERNEL_MAJOR_MINOR}, VERSION: ${KERNEL_VERSION_FULL}, BRANCH: ${KERNELBRANCH:-not set}" \
|
|
"info"
|
|
|
|
return 0
|
|
}
|
|
|
|
# Function to setup kernel build environment
|
|
function setup_kernel_build_env__amlbian_k6_12() {
|
|
display_alert "AMLOGIC TODO: Setting up kernel 6.12 build environment" "${BOARD}" "info"
|
|
|
|
# Export kernel version variables
|
|
export KERNEL_MAJOR_MINOR
|
|
export KERNEL_VERSION_FULL
|
|
export KERNEL_VER
|
|
|
|
return 0
|
|
}
|
|
|
|
# Hook to validate kernel config before build
|
|
function pre_kernel_build__amlbian_k6_12() {
|
|
display_alert "AMLOGIC TODO: Pre-kernel build hook for 6.12" "${BOARD}" "info"
|
|
validate_kernel_config__amlbian_k6_12
|
|
setup_kernel_build_env__amlbian_k6_12
|
|
}
|
|
|
|
# Function to get kernel source info
|
|
function get_kernel_source_info__amlbian_k6_12() {
|
|
if [[ "${USE_LOCAL_SOURCES}" == "yes" ]]; then
|
|
echo "Using local kernel source at: ${LOCAL_KERNEL_PATH:-not set}"
|
|
echo "Kernel branch: local"
|
|
echo "Kernel version: ${KERNEL_VERSION_FULL}"
|
|
else
|
|
echo "Using remote kernel source: ${KERNELSOURCE:-${KERNELSOURCE_DEFAULT}}"
|
|
echo "Kernel branch: ${KERNELBRANCH:-${KERNELBRANCH_DEFAULT}}"
|
|
echo "Kernel version: ${KERNEL_VERSION_FULL}"
|
|
fi
|
|
}
|
|
|
|
# Include this configuration in the build process
|
|
validate_kernel_config__amlbian_k6_12
|
|
|
|
# End of amlogic_k6.12.inc
|