162 lines
4.4 KiB
PHP
162 lines
4.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
|
|
}
|
|
|
|
VENDOR_MODS=(
|
|
amlogic_crypto_dma
|
|
amlogic_wireless
|
|
sha1_ce
|
|
zsmalloc
|
|
libarc4
|
|
leds_gpio
|
|
gpio_regulator
|
|
drm_dp_aux_bus
|
|
aml_zram
|
|
system_heap
|
|
mdio_mux
|
|
pcs_xpcs
|
|
mii
|
|
rtl8150
|
|
r8152
|
|
usbnet
|
|
asix
|
|
ax88179_178a
|
|
cdc_ether
|
|
cdc_eem
|
|
cdc_ncm
|
|
aqc111
|
|
r8153_ecm
|
|
usb_f_rndis
|
|
i2c_dev
|
|
pps_core
|
|
ptp
|
|
cfg80211
|
|
mac80211
|
|
slab_large
|
|
amlogic_dma
|
|
amlogic_i3c
|
|
amlogic_dvb_demux
|
|
amlogic_dummy_fe
|
|
amlogic_dvb_ci
|
|
meson_typec_ctrl
|
|
amlogic_rtc
|
|
aml_watermark
|
|
amlogic_usbgadget
|
|
i2c_gsv2715
|
|
it8563
|
|
amlogic_socinfo
|
|
amlogic_host
|
|
amlogic_led
|
|
amlogic_mdio_g12a
|
|
amlogic_realtek
|
|
stmmac
|
|
stmmac_platform
|
|
dwmac_meson
|
|
dwmac_meson8b
|
|
dwmac_dwc_qos_eth
|
|
amlogic_hsg_phy
|
|
amlogic_jtag
|
|
amlogic_seckey
|
|
amlogic_usb_cam
|
|
amlogic_global_timer
|
|
amlogic_pio
|
|
amlogic_snd_codec_dummy
|
|
amlogic_snd_codec_ad82120b
|
|
amlogic_snd_codec_es8389
|
|
amlogic_snd_soc
|
|
amlogic_pcie
|
|
snd_aloop
|
|
)
|
|
|
|
# Include this configuration in the build process
|
|
validate_kernel_config__amlbian_k6_12
|
|
|
|
# End of amlogic_k6.12.inc
|