config.mk 1.48 KB
Newer Older
1 2
# TODO: invent something prettier (think "lilo+grub" -- or error out?)
# - 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
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
ifeq (,$(filter-out i586 x86_64,$(ARCH)))
use/bootloader/lilo: \
27
	use/bootloader/%: use/bootloader
28
	@$(call set,BASE_BOOTLOADER,$*)
29 30
else
use/bootloader/lilo: ; @:
31 32 33 34 35 36
endif

ifeq (,$(filter-out $(GRUB_ARCHES),$(ARCH)))
use/bootloader/grub: \
	use/bootloader/%: use/bootloader
	@$(call set,BASE_BOOTLOADER,$*)
37 38
else
use/bootloader/grub: ; @:
39
endif
40

41 42 43
use/bootloader/uboot: use/bootloader use/uboot
	@$(call set,BASE_BOOTLOADER,uboot)

44 45
use/bootloader/live: use/bootloader; @:
ifneq (,$(filter-out e2k%,$(ARCH)))
46
	@$(call add,LIVE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
47
endif
48 49 50

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