diff options
| author | Andrii Klymenko <a.klymenko@vyos.io> | 2025-12-10 12:26:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-10 12:26:03 +0200 |
| commit | 7e803f5000bd77b8cb172cf31b04146c4fc76c8a (patch) | |
| tree | 5de0003e8b07c26538c48a335be1c4a477598689 /scripts/package-build/linux-kernel | |
| parent | 7a5f513f801edf80f83f2c52710ac666c4becc56 (diff) | |
| download | vyos-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/linux-kernel')
| -rwxr-xr-x | scripts/package-build/linux-kernel/build-kernel.sh | 10 |
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 |
