From 3d5445d8f7c00f712963fbf85bbccaae13de92ea Mon Sep 17 00:00:00 2001 From: Date Huang Date: Wed, 16 Aug 2023 01:35:57 +0800 Subject: T5499: arm64: build jool with correct depends Signed-off-by: Date Huang --- packages/linux-kernel/build-jool.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/linux-kernel/build-jool.py') 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' -- cgit v1.2.3