config.mk 1.29 KB
Newer Older
Anton Midyukov's avatar
Anton Midyukov committed
1
# TODO: invent something prettier
2
# - add,BASE_PACKAGES,alterator-$* is overly additive
3 4
#   NB: due to make target becoming having been made,
#       the last different one wins
5
# - remember .base if adding yet another *_PACKAGES
6

7 8
# NB: "mysterious" conflicts if BASE_BOOTLOADER is empty

9
GRUB_ARCHES := i586 x86_64 aarch64 ppc64le riscv64 loongarch64
10

11
use/bootloader: use/pkgpriorities
12
ifneq (,$(filter-out e2k%,$(ARCH)))
13
	@$(call add_feature)
14 15 16
	@$(call try,BASE_BOOTLOADER,grub)
	@$(call xport,BASE_BOOTLOADER)
	@$(call add,BASE_LISTS,$$(BASE_BOOTLOADER))
17
	@$(call xport,BASE_BOOTARGS)
18
ifeq (distro,$(IMAGE_CLASS))
19
	@$(call add,BASE_PACKAGES,installer-feature-bootloader-$$(BASE_BOOTLOADER))
20
	@$(call add,PINNED_PACKAGES,alterator-$$(BASE_BOOTLOADER))
21
	@$(call add,PINNED_PACKAGES,installer-bootloader-$$(BASE_BOOTLOADER)-stage2)
22
endif
23
endif
24

25 26 27 28
ifeq (,$(filter-out $(GRUB_ARCHES),$(ARCH)))
use/bootloader/grub: \
	use/bootloader/%: use/bootloader
	@$(call set,BASE_BOOTLOADER,$*)
29 30
else
use/bootloader/grub: ; @:
31
endif
32

33 34 35
use/bootloader/uboot: use/bootloader use/uboot
	@$(call set,BASE_BOOTLOADER,uboot)

36 37
use/bootloader/live: use/bootloader; @:
ifneq (,$(filter-out e2k%,$(ARCH)))
38
	@$(call add,LIVE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
39
endif
40 41 42

use/bootloader/os-prober: use/bootloader
	@$(call add,BASE_PACKAGES,os-prober)