From: Lennart Poettering Date: Tue, 7 Sep 2021 19:50:35 +0000 (+0200) Subject: mkosi: hook up i386 gpt pt types X-Git-Tag: v11~59^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F795%2Fhead;p=thirdparty%2Fmkosi.git mkosi: hook up i386 gpt pt types Let's actually hook up the i386 gpt pt types to be used. (This uses the list of known uname machine fields we use in systemd: https://github.com/systemd/systemd/blob/main/src/basic/architecture.c#L32 ) --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 5c3f91e39..f74ca81f2 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -331,7 +331,9 @@ def gpt_root_native(arch: Optional[str], usr_only: bool = False) -> GPTRootTypeP arch = platform.machine() if usr_only: - if arch == "x86_64": + if arch in ("i386", "i486", "i586", "i686"): + return GPTRootTypePair(GPT_USR_X86, GPT_USR_X86_VERITY) + elif arch == "x86_64": return GPTRootTypePair(GPT_USR_X86_64, GPT_USR_X86_64_VERITY) elif arch == "aarch64": return GPTRootTypePair(GPT_USR_ARM_64, GPT_USR_ARM_64_VERITY) @@ -340,7 +342,9 @@ def gpt_root_native(arch: Optional[str], usr_only: bool = False) -> GPTRootTypeP else: die(f"Unknown architecture {arch}.") else: - if arch == "x86_64": + if arch in ("i386", "i486", "i586", "i686"): + return GPTRootTypePair(GPT_ROOT_X86, GPT_ROOT_X86_VERITY) + elif arch == "x86_64": return GPTRootTypePair(GPT_ROOT_X86_64, GPT_ROOT_X86_64_VERITY) elif arch == "aarch64": return GPTRootTypePair(GPT_ROOT_ARM_64, GPT_ROOT_ARM_64_VERITY)