mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-20 05:28:08 +00:00
Allow using files other than coreboot.rom
Talos 2 will need signed ROM with ECC and an analogous separate bootblock file. Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
parent
ea66885acb
commit
14c7bb6b7a
6
Makefile
6
Makefile
@ -10,6 +10,7 @@ GIT_STATUS := $(shell \
|
|||||||
HEADS_GIT_VERSION := $(shell git describe --tags --dirty)
|
HEADS_GIT_VERSION := $(shell git describe --tags --dirty)
|
||||||
|
|
||||||
CB_OUTPUT_FILE := heads-$(BOARD)-$(HEADS_GIT_VERSION).rom
|
CB_OUTPUT_FILE := heads-$(BOARD)-$(HEADS_GIT_VERSION).rom
|
||||||
|
CB_BOOTBLOCK_FILE := heads-$(BOARD)-$(HEADS_GIT_VERSION).bootblock
|
||||||
LB_OUTPUT_FILE := linuxboot-$(BOARD)-$(HEADS_GIT_VERSION).rom
|
LB_OUTPUT_FILE := linuxboot-$(BOARD)-$(HEADS_GIT_VERSION).rom
|
||||||
|
|
||||||
all:
|
all:
|
||||||
@ -195,7 +196,12 @@ CROSS_TOOLS := \
|
|||||||
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_COREBOOT), y)
|
ifeq ($(CONFIG_COREBOOT), y)
|
||||||
|
|
||||||
all: $(build)/$(BOARD)/$(CB_OUTPUT_FILE)
|
all: $(build)/$(BOARD)/$(CB_OUTPUT_FILE)
|
||||||
|
ifneq ($(CONFIG_COREBOOT_BOOTBLOCK),)
|
||||||
|
all: $(build)/$(BOARD)/$(CB_BOOTBLOCK_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
else ifeq ($(CONFIG_LINUXBOOT), y)
|
else ifeq ($(CONFIG_LINUXBOOT), y)
|
||||||
all: $(build)/$(BOARD)/$(LB_OUTPUT_FILE)
|
all: $(build)/$(BOARD)/$(LB_OUTPUT_FILE)
|
||||||
else
|
else
|
||||||
|
@ -2,6 +2,9 @@ modules-$(CONFIG_COREBOOT) += coreboot
|
|||||||
|
|
||||||
ifeq "$(CONFIG_COREBOOT)" "y"
|
ifeq "$(CONFIG_COREBOOT)" "y"
|
||||||
|
|
||||||
|
CONFIG_COREBOOT_ROM ?= coreboot.rom
|
||||||
|
CONFIG_COREBOOT_BOOTBLOCK ?=
|
||||||
|
|
||||||
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
|
ifeq "$(CONFIG_COREBOOT_VERSION)" "4.8.1"
|
||||||
coreboot_version := 4.8.1
|
coreboot_version := 4.8.1
|
||||||
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
|
coreboot_hash := f0ddf4db0628c1fe1e8348c40084d9cbeb5771400c963fd419cda3995b69ad23
|
||||||
@ -67,7 +70,8 @@ coreboot_target := \
|
|||||||
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
CFLAGS_x86_64="$(EXTRA_FLAGS)" \
|
||||||
$(MAKE_JOBS)
|
$(MAKE_JOBS)
|
||||||
|
|
||||||
coreboot_output := coreboot.rom
|
coreboot_output := $(CONFIG_COREBOOT_ROM)
|
||||||
|
coreboot_output += $(CONFIG_COREBOOT_BOOTBLOCK)
|
||||||
coreboot_depend += linux initrd $(musl_dep)
|
coreboot_depend += linux initrd $(musl_dep)
|
||||||
|
|
||||||
COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile"
|
COREBOOT_TOOLCHAIN="$(build)/$(coreboot_base_dir)/.xcompile"
|
||||||
@ -85,10 +89,19 @@ $(build)/$(coreboot_dir)/.build: \
|
|||||||
|
|
||||||
# This produces a ROM image that is written with the flashrom program
|
# This produces a ROM image that is written with the flashrom program
|
||||||
ifneq ($(CONFIG_COREBOOT),)
|
ifneq ($(CONFIG_COREBOOT),)
|
||||||
|
|
||||||
$(build)/$(BOARD)/$(CB_OUTPUT_FILE): $(build)/$(coreboot_dir)/.build
|
$(build)/$(BOARD)/$(CB_OUTPUT_FILE): $(build)/$(coreboot_dir)/.build
|
||||||
|
# Use coreboot.rom, because custom output files might not be processed by cbfstool
|
||||||
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
|
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
|
||||||
$(call do-copy,$(dir $<)coreboot.rom,$@)
|
$(call do-copy,$(dir $<)$(CONFIG_COREBOOT_ROM),$@)
|
||||||
@touch $@ # update the time stamp
|
@touch $@ # update the time stamp
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_COREBOOT_BOOTBLOCK),)
|
||||||
|
$(build)/$(BOARD)/$(CB_BOOTBLOCK_FILE): $(build)/$(coreboot_dir)/.build
|
||||||
|
$(call do-copy,$(dir $<)$(CONFIG_COREBOOT_BOOTBLOCK),$@)
|
||||||
|
@touch $@ # update the time stamp
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user