diff options
author | Date Huang <tjjh89017@hotmail.com> | 2023-08-16 01:35:57 +0800 |
---|---|---|
committer | Date Huang <tjjh89017@hotmail.com> | 2023-08-22 22:44:21 +0800 |
commit | 3d5445d8f7c00f712963fbf85bbccaae13de92ea (patch) | |
tree | 769bd065f116b87d82e09410e7b61e3219264e40 /packages | |
parent | 83eb31bb743256e07b5cc3a82ea81d4ee301ed17 (diff) | |
download | vyos-build-3d5445d8f7c00f712963fbf85bbccaae13de92ea.tar.gz vyos-build-3d5445d8f7c00f712963fbf85bbccaae13de92ea.zip |
T5499: arm64: build jool with correct depends
Signed-off-by: Date Huang <tjjh89017@hotmail.com>
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/linux-kernel/build-jool.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/linux-kernel/build-jool.py b/packages/linux-kernel/build-jool.py index 10802108..5474e601 100755 --- a/packages/linux-kernel/build-jool.py +++ b/packages/linux-kernel/build-jool.py @@ -5,6 +5,10 @@ from requests import get from pathlib import Path from subprocess import run +def find_arch() -> str: + import os + arch = os.system("dpkg-architecture -q DEB_HOST_ARCH").strip() + return arch # dependency modifier def add_depends(package_dir: str, package_name: str, @@ -24,8 +28,9 @@ 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('../../data/architectures/amd64.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_SRC: str = Path.cwd().as_posix() + '/linux' |