From 7e803f5000bd77b8cb172cf31b04146c4fc76c8a Mon Sep 17 00:00:00 2001 From: Andrii Klymenko Date: Wed, 10 Dec 2025 12:26:03 +0200 Subject: T8085: Do not hardcode values in kernel build scripts Add architecture detection for kernel configuration file. --- scripts/package-build/linux-kernel/build-kernel.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts/package-build/linux-kernel/build-kernel.sh') diff --git a/scripts/package-build/linux-kernel/build-kernel.sh b/scripts/package-build/linux-kernel/build-kernel.sh index 62dd7829..82028244 100755 --- a/scripts/package-build/linux-kernel/build-kernel.sh +++ b/scripts/package-build/linux-kernel/build-kernel.sh @@ -1,6 +1,7 @@ #!/bin/bash CWD=$(pwd) KERNEL_SRC=linux +ARCH=$(dpkg --print-architecture) set -e @@ -22,7 +23,14 @@ cp -rv ${CWD}/arch/ . KERNEL_VERSION=$(make kernelversion) KERNEL_SUFFIX=-$(awk -F "= " '/kernel_flavor/ {print $2}' ../../../../data/defaults.toml | tr -d \") -KERNEL_CONFIG=arch/x86/configs/vyos_defconfig + +if [ "${ARCH}" = "arm64" ]; then + KERNEL_CONFIG=arch/arm64/configs/vyos_defconfig +else + KERNEL_CONFIG=arch/x86/configs/vyos_defconfig +fi + +echo "KERNEL_CONFIG: ${KERNEL_CONFIG}" # VyOS requires some small Kernel Patches - apply them here # It's easier to habe them here and make use of the upstream -- cgit v1.2.3