From afd1b4fc87d93707ffeaf9c235953fd08dafd0ee Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 7 Sep 2021 21:50:35 +0200 Subject: [PATCH] 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 ) --- mkosi/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.47.2