blob: 2460c183bb4b7959fe7239aa49212f8395042aea [file] [log] [blame]
Zoltan Baldasztibe589232020-09-17 19:45:21 +02001project_git_repo=https://gitlab.com/bztsrc/bootboot.git
2project_dir=bootboot
3ifeq ($(CONFIG_COREBOOT_BUILD),)
4include ../../../.config
5endif
6ifeq ($(CONFIG_ARCH_ARM64),y)
7loader_dir=$(project_dir)/aarch64-cb
8else
9loader_dir=$(project_dir)/x86_64-cb
10endif
11
12unexport KCONFIG_AUTOHEADER
13unexport KCONFIG_AUTOCONFIG
14unexport KCONFIG_DEPENDENCIES
15unexport KCONFIG_SPLITCONFIG
16unexport KCONFIG_TRISTATE
17unexport KCONFIG_NEGATIVES
18
19all: bootboot
20
21checkout:
22 echo " GIT BOOTBOOT $(loader_dir)"
23 test -L $(project_dir) || test -d $(project_dir) || \
24 git clone $(project_git_repo) $(project_dir)
25
26bootboot: libpayload
27 echo " MAKE $(loader_dir)"
28 $(MAKE) -C $(loader_dir) LIBCONFIG_PATH=../../../libpayload
29
30libpayload: checkout
31 cp $(loader_dir)/lib.config ../../libpayload/.config
32 cd ../../libpayload && $(MAKE) oldconfig && \
33 $(MAKE) && $(MAKE) DESTDIR=../external/BOOTBOOT/$(loader_dir) install
34
35clean:
36 test -d $(loader_dir) && $(MAKE) -C $(loader_dir) clean || exit 0
37
38distclean:
39 rm -rf $(project_dir)
40
41print-repo-info:
42 echo "$(project_git_repo) $(project_dir)"
43
44.PHONY: checkout bootboot libpayload clean distclean print-repo-info