diff options
-rw-r--r-- | data/architectures/amd64.toml | 2 | ||||
-rw-r--r-- | data/architectures/arm64.toml | 2 | ||||
-rw-r--r-- | data/defaults.toml | 1 | ||||
-rwxr-xr-x | packages/linux-kernel/build-jool.py | 3 | ||||
-rwxr-xr-x | packages/linux-kernel/build-kernel.sh | 2 | ||||
-rwxr-xr-x | scripts/check-qemu-install | 9 |
6 files changed, 10 insertions, 9 deletions
diff --git a/data/architectures/amd64.toml b/data/architectures/amd64.toml index 44a203a2..e85b4158 100644 --- a/data/architectures/amd64.toml +++ b/data/architectures/amd64.toml @@ -2,8 +2,6 @@ additional_repositories = [ "deb [arch=amd64] https://repo.saltproject.io/py3/debian/11/amd64/3005 bullseye main" ] -kernel_flavor = "amd64-vyos" - # Packages added to images for x86 by default packages = [ "grub2", diff --git a/data/architectures/arm64.toml b/data/architectures/arm64.toml index 22f1fd10..228d0f3f 100644 --- a/data/architectures/arm64.toml +++ b/data/architectures/arm64.toml @@ -2,8 +2,6 @@ additional_repositories = [ "deb [arch=arm64] https://repo.saltproject.io/py3/debian/11/arm64/3005 bullseye main" ] -kernel_flavor = "arm64-vyos" - # Packages included in ARM64 images by default packages = [ "grub-efi-arm64", diff --git a/data/defaults.toml b/data/defaults.toml index e6654c43..71889cf0 100644 --- a/data/defaults.toml +++ b/data/defaults.toml @@ -15,6 +15,7 @@ vyos_branch = "current" release_train = "current" kernel_version = "6.6.49" +kernel_flavor = "vyos" bootloaders = "syslinux,grub-efi" squashfs_compression_type = "xz -Xbcj x86 -b 256k -always-use-fragments -no-recovery" diff --git a/packages/linux-kernel/build-jool.py b/packages/linux-kernel/build-jool.py index 1781a6c8..3f8fd3a5 100755 --- a/packages/linux-kernel/build-jool.py +++ b/packages/linux-kernel/build-jool.py @@ -29,9 +29,8 @@ def add_depends(package_dir: str, package_name: str, # find kernel version and source path arch: str = find_arch() defaults_file: str = Path('../../data/defaults.toml').read_text() -architecture_file: str = Path(f'../../data/architectures/{arch}.toml').read_text() KERNEL_VER: str = toml_loads(defaults_file).get('kernel_version') -KERNEL_FLAVOR: str = toml_loads(architecture_file).get('kernel_flavor') +KERNEL_FLAVOR: str = toml_loads(defaults_file).get('kernel_flavor') KERNEL_SRC: str = Path.cwd().as_posix() + '/linux' # define variables diff --git a/packages/linux-kernel/build-kernel.sh b/packages/linux-kernel/build-kernel.sh index 2c02f5c3..c0a863c6 100755 --- a/packages/linux-kernel/build-kernel.sh +++ b/packages/linux-kernel/build-kernel.sh @@ -18,7 +18,7 @@ echo "I: clean modified files" git reset --hard HEAD KERNEL_VERSION=$(make kernelversion) -KERNEL_SUFFIX=-$(dpkg --print-architecture)-vyos +KERNEL_SUFFIX=-$(awk -F "= " '/kernel_flavor/ {print $2}' ../../../data/defaults.toml | tr -d \") # VyOS requires some small Kernel Patches - apply them here # It's easier to habe them here and make use of the upstream diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install index ea3aef63..fe781b60 100755 --- a/scripts/check-qemu-install +++ b/scripts/check-qemu-install @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2019-2023, VyOS maintainers and contributors +# Copyright (C) 2019-2024, VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -47,6 +47,8 @@ import tomli from io import BytesIO from io import StringIO from datetime import datetime +from pathlib import Path +from tomllib import loads as toml_loads EXCEPTION = 0 now = datetime.now() @@ -416,8 +418,11 @@ try: c.expect(op_mode_prompt) c.sendline('show version') c.expect(op_mode_prompt) + c.sendline('show version kernel') - c.expect(f'{vyos_defaults["kernel_version"]}-{vyos_defaults["architecture"]}-vyos') + kernel_flavor = toml_loads(Path('data/architectures/amd64.toml').read_text()).get('kernel_flavor') + c.expect(f'{vyos_defaults["kernel_version"]}-{kernel_flavor}') + c.expect(op_mode_prompt) c.sendline('show version frr') c.expect(op_mode_prompt) |