config.mk 1.7 KB
Newer Older
1
EFI_ARCHES := x86_64 aarch64 riscv64 loongarch64
2

3
+efi: use/efi/signed use/efi/dtb; @:
4

5
ifeq (,$(filter-out $(EFI_ARCHES),$(ARCH)))
6

7 8
EFI_LISTS := $(call tags,base efi)

Michael Shigorin's avatar
Michael Shigorin committed
9
use/efi:
Michael Shigorin's avatar
Michael Shigorin committed
10
	@$(call add_feature)
11 12
	@$(call try,EFI_BOOTLOADER,grub-efi)	# default one
	@$(call xport,EFI_BOOTLOADER)
13
	@$(call add,COMMON_LISTS,$(EFI_LISTS))
14
ifeq (distro,$(IMAGE_CLASS))
Michael Shigorin's avatar
Michael Shigorin committed
15
	@$(call add,INSTALL2_PACKAGES,dosfstools fatresize)
16
	@$(call add,STAGE1_KCONFIG,EFI EFI_PARTITION EFIVAR_FS)
17
ifeq (x86_64,$(ARCH))
18
	@$(call add,THE_PACKAGES,$$(EFI_SHELL))
19
endif
20
endif
21

22 23 24 25
use/efi/grub: use/efi use/bootloader/grub
	@$(call set,EFI_BOOTLOADER,grub-efi)

ifeq (x86_64,$(ARCH))
26
use/efi/shell: use/efi
27 28
	@$(call add,STAGE1_PACKAGES,efi-shell)
	@$(call add,GRUB_CFG,shell_efi)
29

30 31 32
use/efi/signed: use/efi
	@$(call set,EFI_CERT,altlinux)
	@$(call add,COMMON_PACKAGES,shim-signed)
33
	@$(call add,RESCUE_PACKAGES,mokutil pesign)
34
	@$(call add,RESCUE_PACKAGES,openssl)
35
ifeq (,$(filter-out p10 c10f%,$(BRANCH)))
36 37
	@$(call add,STAGE1_PACKAGES,shim-signed-installer-kludge grub-efi alt-uefi-certs dosfstools mtools)
endif
38

39 40
else

41
use/efi/signed use/efi/shell: use/efi; @:
42 43 44 45

endif

ifeq (distro,$(IMAGE_CLASS))
Michael Shigorin's avatar
Michael Shigorin committed
46 47
use/efi/debug: use/efi
	@$(call add,STAGE2_PACKAGES,efibootmgr gdisk)
48 49 50
else
use/efi/debug: use/efi; @:
endif
51 52 53 54

else

# ignore on an unsupported target arch but make it hybrid at least
55
use/efi use/efi/signed use/efi/debug use/efi/grub \
56
  use/efi/shell: use/isohybrid; @:
57 58

endif
59 60 61 62

# copy devicetree for default kernel on ESP partition
use/efi/dtb: use/efi; @:
ifeq (distro,$(IMAGE_CLASS))
63
ifeq (,$(filter-out aarch64 riscv64,$(ARCH)))
64 65 66 67
	@$(call set,GLOBAL_COPY_DTB,1)
	@$(call add,EFI_FILES_REPLACE,dtb)
endif
endif
68 69 70

use/efi/memtest86:
	@echo Warning: use/efi/memtest86 is deprecated!!! >&2