From: Daan De Meyer Date: Mon, 21 Aug 2023 10:13:04 +0000 (+0200) Subject: Make ESP logic bootloader independent X-Git-Tag: v16~52^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=686991c5f092eb8e15f4adf15bd23e26ca758a1c;p=thirdparty%2Fmkosi.git Make ESP logic bootloader independent Let's simply check if a bootloader was placed in the right location instead of having systemd-boot specific checks. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 3dc1cd671..fb4b61013 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1374,14 +1374,10 @@ def make_image(state: MkosiState, skip: Sequence[str] = [], split: bool = False) definitions = state.workspace / "repart-definitions" if not definitions.exists(): definitions.mkdir() - bootdir = state.root / "usr/lib/systemd/boot/efi" + bootloader = state.root / f"efi/EFI/BOOT/BOOT{state.config.architecture.to_efi()}.EFI" - # If Bootable=auto and we have at least one UKI and a bootloader, let's generate an ESP partition. add = (state.config.bootable == ConfigFeature.enabled or - (state.config.bootable == ConfigFeature.auto and - bootdir.exists() and - any(bootdir.iterdir()) and - any(gen_kernel_images(state)))) + (state.config.bootable == ConfigFeature.auto and bootloader.exists())) if add: (definitions / "00-esp.conf").write_text(