config.mk 1.71 KB
Newer Older
1 2
EFI_ARCHES := x86_64 aarch64

3
+efi: use/efi/signed; @:
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
	@$(call set,MKI_VER_MINIMAL,0.2.12)	# it's official now
12 13 14
	@$(call set,MKI_VER_OPTIMAL,0.2.17)	# for EFI_BOOTARGS
	@$(call try,EFI_BOOTLOADER,grub-efi)	# default one
	@$(call xport,EFI_BOOTLOADER)
15
	@$(call add,THE_LISTS,$(EFI_LISTS))
16 17
ifeq (distro,$(IMAGE_CLASS))
	@$(call add,RESCUE_LISTS,$(EFI_LISTS))
Michael Shigorin's avatar
Michael Shigorin committed
18
	@$(call add,INSTALL2_PACKAGES,dosfstools fatresize)
19
	@$(call add,STAGE1_KCONFIG,EFI EFI_PARTITION EFI_VARS FB_EFI)
20
	@$(call add,EFI_BOOTARGS,$$(STAGE2_BOOTARGS))
21 22
ifeq (x86_64,$(ARCH))
	@$(call add,RESCUE_PACKAGES,refind $$(EFI_SHELL) $$(EFI_BOOTLOADER))
23
	@$(call add,THE_PACKAGES,$$(EFI_SHELL))
24
endif
25
endif
26

27 28 29 30
use/efi/grub: use/efi use/bootloader/grub
	@$(call set,EFI_BOOTLOADER,grub-efi)

ifeq (x86_64,$(ARCH))
31 32
use/efi/shell: use/efi
	@$(call try,EFI_SHELL,efi-shell)
33

34 35 36 37 38
use/efi/signed: use/efi
	@$(call set,EFI_CERT,altlinux)
	@$(call add,COMMON_PACKAGES,shim-signed)
	@$(call add,RESCUE_PACKAGES,openssl pesign)

39 40 41 42 43 44
use/efi/lilo: use/efi use/bootloader/lilo
	@$(call set,EFI_BOOTLOADER,elilo)

use/efi/refind: use/efi
	@$(call set,EFI_BOOTLOADER,refind)

45
use/efi/memtest86: use/efi
46 47
	@$(call set,EFI_MEMTEST86,efi-memtest86)

48 49
else

50 51
use/efi/signed use/efi/shell \
	use/efi/refind use/efi/memtest86 use/efi/lilo: use/efi; @:
52 53 54 55

endif

ifeq (distro,$(IMAGE_CLASS))
Michael Shigorin's avatar
Michael Shigorin committed
56 57
use/efi/debug: use/efi
	@$(call add,STAGE2_PACKAGES,efibootmgr gdisk)
58 59 60
else
use/efi/debug: use/efi; @:
endif
61 62 63 64

else

# ignore on an unsupported target arch but make it hybrid at least
65
use/efi use/efi/signed use/efi/debug use/efi/grub use/efi/lilo \
66
  use/efi/refind use/efi/shell use/efi/memtest86: use/isohybrid; @:
67 68

endif