Address rpardini review: remove BTF patches, use full kernel config, use fetch_from_repo for OP-TEE
This commit is contained in:
parent
f24801893c
commit
c9f8f3caef
File diff suppressed because it is too large
Load Diff
@ -54,6 +54,12 @@ function add_host_dependencies__ma35d1_optee_deps() {
|
||||
declare -g EXTRA_BUILD_DEPS="${EXTRA_BUILD_DEPS} python3-pycryptodome python3-pyelftools"
|
||||
}
|
||||
|
||||
# Fetch OP-TEE source using Armbian's fetch_from_repo mechanism
|
||||
function fetch_sources_tools__ma35d1_fetch_optee() {
|
||||
display_alert "Fetching OP-TEE source" "for MA35D1" "info"
|
||||
fetch_from_repo "${OPTEE_SOURCE}" "${OPTEE_DIR}" "${OPTEE_BRANCH}"
|
||||
}
|
||||
|
||||
# DDR configuration DTB - 512MB for IoT board
|
||||
# Available options: ma35d1-cpu800-wb-512m, ma35d1-cpu1g-wb-512m, etc.
|
||||
declare -g MA35D1_DDR_DTB="${MA35D1_DDR_DTB:-ma35d1-cpu800-wb-512m}"
|
||||
@ -82,8 +88,6 @@ case "${BRANCH}" in
|
||||
KERNELSOURCE='https://github.com/OpenNuvoton/MA35D1_linux-5.10.y.git'
|
||||
KERNELBRANCH="branch:master"
|
||||
KERNELPATCHDIR="nuvoton-ma35d1-${BRANCH}"
|
||||
# Use Nuvoton's defconfig as base, then merge our fragment
|
||||
KERNELDEFCONFIG="ma35d1_defconfig"
|
||||
LINUXCONFIG="linux-nuvoton-ma35d1-${BRANCH}"
|
||||
;;
|
||||
|
||||
@ -102,28 +106,6 @@ family_tweaks_bsp() {
|
||||
:
|
||||
}
|
||||
|
||||
# Use Nuvoton defconfig as base, then apply Armbian modifications
|
||||
# This hook runs BEFORE write_kernel_config hooks
|
||||
armbian_kernel_config__use_nuvoton_defconfig() {
|
||||
if [[ -f .config ]]; then
|
||||
display_alert "Loading Nuvoton MA35D1 defconfig as base" "ma35d1_defconfig" "info"
|
||||
|
||||
# Save the Armbian fragment (our LINUXCONFIG file)
|
||||
run_host_command_logged cp -v .config .config.armbian_fragment
|
||||
|
||||
# Load Nuvoton defconfig as the base
|
||||
run_kernel_make ma35d1_defconfig
|
||||
|
||||
# Now merge the Armbian fragment on top using scripts/config
|
||||
display_alert "Merging Armbian config fragment" "MA35D1" "info"
|
||||
run_host_command_logged ./scripts/kconfig/merge_config.sh -m .config .config.armbian_fragment
|
||||
|
||||
# Clean up
|
||||
run_host_command_logged rm -f .config.armbian_fragment
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Custom ATF build for MA35D1 - we need BL2 with DTB embedded
|
||||
# NOTE: atf_custom_postprocess runs BEFORE atftempdir is created!
|
||||
# We are in the ATF source directory at this point (pwd = $SRC/cache/sources/$ATFSOURCEDIR)
|
||||
@ -186,15 +168,12 @@ compile_optee_ma35d1() {
|
||||
|
||||
display_alert "Compiling OP-TEE" "MA35D1" "info"
|
||||
|
||||
# Clone or update OP-TEE source
|
||||
# OP-TEE source is fetched via fetch_sources_tools__ma35d1_fetch_optee()
|
||||
# Build dependencies are declared via add_host_dependencies__ma35d1_optee_deps()
|
||||
if [[ ! -d "${optee_src_dir}" ]]; then
|
||||
display_alert "Cloning OP-TEE source" "${OPTEE_SOURCE}" "info"
|
||||
run_host_command_logged git clone --depth 1 -b "${OPTEE_BRANCH##*:}" "${OPTEE_SOURCE}" "${optee_src_dir}"
|
||||
exit_with_error "OP-TEE source not found at ${optee_src_dir} - fetch_sources_tools hook may have failed"
|
||||
fi
|
||||
|
||||
# Note: Build dependencies (python3-pycryptodome, python3-pyelftools) are
|
||||
# declared via add_host_dependencies__ma35d1_optee_deps() for proper Armbian framework handling
|
||||
|
||||
# Determine cross compiler - use system compiler directly
|
||||
local cross_compile="aarch64-linux-gnu-"
|
||||
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
From: Armbian <info@armbian.com>
|
||||
Subject: [PATCH] Disable BTF for MA35D1 platform
|
||||
|
||||
BTF generation fails on 5.10.y kernels with newer pahole/toolchain versions.
|
||||
Disable BTF specifically for MA35D1 platform.
|
||||
|
||||
Signed-off-by: Armbian <info@armbian.com>
|
||||
---
|
||||
lib/Kconfig.debug | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||
--- a/lib/Kconfig.debug
|
||||
+++ b/lib/Kconfig.debug
|
||||
@@ -267,6 +267,8 @@ config DEBUG_INFO_DWARF5
|
||||
config DEBUG_INFO_BTF
|
||||
bool "Generate BTF typeinfo"
|
||||
depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
|
||||
+ # Disabled: BTF generation fails with newer toolchains on MA35D1
|
||||
+ depends on !ARCH_MA35D1
|
||||
depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
|
||||
help
|
||||
Generate deduplicated BTF type information from DWARF debug info.
|
||||
@ -1,3 +0,0 @@
|
||||
# Disable BTF - fixes build error on 5.10.y kernels with newer toolchains
|
||||
CONFIG_DEBUG_INFO_BTF=n
|
||||
CONFIG_DEBUG_INFO_BTF_MODULES=n
|
||||
Loading…
Reference in New Issue
Block a user