summaryrefslogtreecommitdiff
path: root/scripts/package-build/linux-kernel/build-kernel.sh
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-11-09 13:18:29 +0100
committerGitHub <noreply@github.com>2026-11-09 13:18:29 +0100
commit9ba01bdaad997e777d5c4ed53c5abb8c0a34b027 (patch)
treedd60c7486cea73d94ad871080f55a890009e92e1 /scripts/package-build/linux-kernel/build-kernel.sh
parentb541dd70eedd78455861af42cfd262e712a75803 (diff)
parent1d6ec630d636067d802de522638396132989923a (diff)
downloadvyos-build-9ba01bdaad997e777d5c4ed53c5abb8c0a34b027.tar.gz
vyos-build-9ba01bdaad997e777d5c4ed53c5abb8c0a34b027.zip
Merge pull request #1347 from c-po/T9591-kernel-revision
Kernel: T9591: add VyOS internal revision to the kernel release string
Diffstat (limited to 'scripts/package-build/linux-kernel/build-kernel.sh')
-rwxr-xr-xscripts/package-build/linux-kernel/build-kernel.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/package-build/linux-kernel/build-kernel.sh b/scripts/package-build/linux-kernel/build-kernel.sh
index dea71aa9..14817b06 100755
--- a/scripts/package-build/linux-kernel/build-kernel.sh
+++ b/scripts/package-build/linux-kernel/build-kernel.sh
@@ -27,8 +27,15 @@ if [ -z "${KERNEL_FLAVOR}" ]; then
exit 1
fi
+if [ -z "${KERNEL_REVISION}" ]; then
+ echo "E: KERNEL_REVISION is not set, run via ./build.py so it can be passed from data/defaults.toml"
+ exit 1
+fi
+
KERNEL_VERSION=$(make kernelversion)
-KERNEL_SUFFIX=-${KERNEL_FLAVOR}
+# VyOS internal revision, e.g. 6.18.60-1-vyos - bumped when rebuilding the same
+# upstream version with additional patches
+KERNEL_SUFFIX=-${KERNEL_REVISION}-${KERNEL_FLAVOR}
echo "I: Generate Kernel config"
ARCH=$(dpkg --print-architecture)
@@ -131,7 +138,7 @@ EOF
echo "I: Build Debian Kernel package"
touch .scmversion
-make bindeb-pkg BUILD_TOOLS=1 LOCALVERSION=${KERNEL_SUFFIX} KDEB_PKGVERSION=${KERNEL_VERSION}-1 -j $(getconf _NPROCESSORS_ONLN)
+make bindeb-pkg BUILD_TOOLS=1 LOCALVERSION=${KERNEL_SUFFIX} KDEB_PKGVERSION=${KERNEL_VERSION}-${KERNEL_REVISION} -j $(getconf _NPROCESSORS_ONLN)
# Back to the old Kernel build-scripts directory
cd $CWD