mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-24 07:06:42 +00:00
ensure that both coreboot.rom and linuxboot.rom are built in a parallel build (#394)
This commit is contained in:
parent
022ca815e4
commit
e5740c6bfe
6
Makefile
6
Makefile
@ -506,12 +506,6 @@ $(build)/$(initrd_dir)/tools.cpio: \
|
||||
# binaries for it
|
||||
$(build)/$(initrd_dir)/tools.cpio: $(foreach d,$(bin_modules-y),$(build)/$($d_dir)/.build)
|
||||
|
||||
# This produces a ROM image that is written with the flashrom program
|
||||
$(build)/$(BOARD)/coreboot.rom: $(build)/$(coreboot_dir)/.build
|
||||
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
|
||||
$(call do-copy,$(dir $<)coreboot.rom,$@)
|
||||
@touch $@ # update the time stamp
|
||||
|
||||
|
||||
# List of all modules, excluding the slow to-build modules
|
||||
modules-slow := musl musl-cross kernel_headers
|
||||
|
@ -49,6 +49,11 @@ $(build)/$(coreboot_dir)/.build: \
|
||||
$(build)/$(BOARD)/bzImage \
|
||||
$(build)/$(BOARD)/initrd.cpio.xz \
|
||||
|
||||
# This produces a ROM image that is written with the flashrom program
|
||||
$(build)/$(BOARD)/coreboot.rom: $(build)/$(coreboot_dir)/.build
|
||||
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
|
||||
$(call do-copy,$(dir $<)coreboot.rom,$@)
|
||||
@touch $@ # update the time stamp
|
||||
|
||||
#
|
||||
# Helpful target for reconfiguring the coreboot target
|
||||
|
@ -2,18 +2,19 @@ modules-$(CONFIG_LINUXBOOT) += linuxboot
|
||||
|
||||
linuxboot_version := git
|
||||
linuxboot_repo := https://github.com/osresearch/linuxboot
|
||||
linuxboot_dir := linuxboot-$(linuxboot_version)
|
||||
linuxboot_base_dir := linuxboot-$(linuxboot_version)
|
||||
|
||||
# linuxboot builds are specialized on a per-target basis.
|
||||
# They can be specialized by defining $(CONFIG_LINUXBOOT_BOARD)
|
||||
# otherwise it is assumed that it will have the same name
|
||||
# as the Heads BOARD.
|
||||
linuxboot_board := $(or $(CONFIG_LINUXBOOT_BOARD),$(BOARD))
|
||||
|
||||
linuxboot_dir := linuxboot-$(linuxboot_version)/build/$(linuxboot_board)
|
||||
|
||||
linuxboot_configure := \
|
||||
echo >&2 "Pre-building edk2" ; \
|
||||
$(MAKE) \
|
||||
-C $(build)/$(linuxboot_base_dir) \
|
||||
BOARD=$(linuxboot_board) \
|
||||
edk2.force \
|
||||
|| exit 1 ; \
|
||||
@ -29,6 +30,7 @@ ifdef CUSTOM
|
||||
endif
|
||||
|
||||
linuxboot_target := \
|
||||
-C $(build)/$(linuxboot_base_dir) \
|
||||
BOARD=$(linuxboot_board) \
|
||||
KERNEL=$(build)/$(BOARD)/bzImage \
|
||||
INITRD=$(build)/$(BOARD)/initrd.cpio.xz \
|
||||
@ -55,8 +57,9 @@ endif
|
||||
linuxboot_output := build/$(linuxboot_board)/linuxboot.rom
|
||||
linuxboot_rom := $(build)/$(linuxboot_dir)/$(linuxboot_output)
|
||||
|
||||
$(build)/$(BOARD)/linuxboot.rom: $(linuxboot_rom)
|
||||
$(call do-copy,$<,$@)
|
||||
$(build)/$(BOARD)/linuxboot.rom: $(build)/$(linuxboot_dir)/.build
|
||||
$(call do-copy,$(dir $<)linuxboot.rom,$@)
|
||||
@touch $@
|
||||
|
||||
# Also force a rebuild if any of the input files are updated
|
||||
$(build)/$(linuxboot_dir)/.build: \
|
||||
@ -66,7 +69,7 @@ $(build)/$(linuxboot_dir)/.build: \
|
||||
|
||||
|
||||
linuxboot.run: $(build)/$(BOARD)/linuxboot.rom
|
||||
$(MAKE) -C $(build)/$(linuxboot_dir) \
|
||||
$(MAKE) -C $(build)/$(linuxboot_base_dir) \
|
||||
BOARD:=$(linuxboot_board) \
|
||||
KERNEL=$(build)/$(BOARD)/bzImage \
|
||||
INITRD=$(build)/$(BOARD)/initrd.cpio.xz \
|
||||
|
Loading…
Reference in New Issue
Block a user