summaryrefslogtreecommitdiff
path: root/scripts/package-build
diff options
context:
space:
mode:
authorAndrii Klymenko <a.klymenko@vyos.io>2025-12-10 12:26:03 +0200
committerGitHub <noreply@github.com>2025-12-10 12:26:03 +0200
commit7e803f5000bd77b8cb172cf31b04146c4fc76c8a (patch)
tree5de0003e8b07c26538c48a335be1c4a477598689 /scripts/package-build
parent7a5f513f801edf80f83f2c52710ac666c4becc56 (diff)
downloadvyos-build-7e803f5000bd77b8cb172cf31b04146c4fc76c8a.tar.gz
vyos-build-7e803f5000bd77b8cb172cf31b04146c4fc76c8a.zip
T8085: Do not hardcode values in kernel build scripts
Add architecture detection for kernel configuration file.
Diffstat (limited to 'scripts/package-build')
-rwxr-xr-xscripts/package-build/linux-kernel/build-kernel.sh10
1 files changed, 9 insertions, 1 deletions
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