summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-12-31 15:11:01 +0100
committerDaniil Baturin <daniil@baturin.org>2018-12-31 15:11:01 +0100
commit01f5093ebddbc0c88b548335ac01368472b5a6c3 (patch)
treeb7b092e731edb5b05b473b9d50838f42d9ee38d2 /scripts
parentaa0eb3349d354ea245a243124ee7b3b4cb8ca81f (diff)
downloadvyos-build-01f5093ebddbc0c88b548335ac01368472b5a6c3.tar.gz
vyos-build-01f5093ebddbc0c88b548335ac01368472b5a6c3.zip
Dehardcode the kernel package version from the live-build-config script.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-config5
-rwxr-xr-xscripts/live-build-config2
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/build-config b/scripts/build-config
index 76e83192..3b44df77 100755
--- a/scripts/build-config
+++ b/scripts/build-config
@@ -125,6 +125,11 @@ env_check_retval = os.system("scripts/check-build-env")
if env_check_retval > 0:
print("Build environment check failed, fix the issues and retry")
+# Get the kernel version from data/kernel_version
+with open("data/kernel_version") as f:
+ kernel_version = f.read().strip()
+ args['kernel_version'] = kernel_version
+
# Save to file
os.makedirs(defaults.BUILD_DIR, exist_ok=True)
diff --git a/scripts/live-build-config b/scripts/live-build-config
index 9dc03c32..b585049e 100755
--- a/scripts/live-build-config
+++ b/scripts/live-build-config
@@ -37,7 +37,7 @@ lb config noauto \
--architectures {{architecture}} \
--bootappend-live "boot=live components hostname=vyos username=live nopersistence noautologin nonetworking union=overlay" \
--linux-flavours {{architecture}}-vyos \
- --linux-packages linux-image-4.19.12 \
+ --linux-packages linux-image-{{kernel_version}} \
--bootloader syslinux,grub-efi \
--binary-images iso-hybrid \
--debian-installer false \