Skip to content

Commit

Permalink
Use $(BOARD)-$(HEADS_GIT_VERSION) as basis for output filename
Browse files Browse the repository at this point in the history
makes builds uniquely identifiable based on board and version.

Signed-off-by: Matt DeVillier <[email protected]>
  • Loading branch information
MrChromebox committed Oct 18, 2020
1 parent 1e915b0 commit 0cd0684
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ CROSS_TOOLS := \


ifeq "$(CONFIG_COREBOOT)" "y"
all: $(build)/$(BOARD)/coreboot.rom
OUTPUT_FILE := heads-$(BOARD)-$(HEADS_GIT_VERSION).rom
else ifeq "$(CONFIG_LINUXBOOT)" "y"
all: $(build)/$(BOARD)/linuxboot.rom
OUTPUT_FILE := linuxboot-$(BOARD)-$(HEADS_GIT_VERSION).rom
else
$(error "$(BOARD): neither CONFIG_COREBOOT nor CONFIG_LINUXBOOT is set?")
endif

all:
all: $(build)/$(BOARD)/$(OUTPUT_FILE)
@sha256sum $< | tee -a "$(HASHES)"

# Disable all built in rules
Expand Down
2 changes: 1 addition & 1 deletion boards/x230-flash/x230-flash.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal --ifd --image
# allow the board to boot into a minimal Heads and read the full
# ROM from an external USB media.
all: $(build)/$(BOARD)/$(BOARD).rom
$(build)/$(BOARD)/$(BOARD).rom: $(build)/$(BOARD)/coreboot.rom
$(build)/$(BOARD)/$(BOARD).rom: $(build)/$(BOARD)/$(OUTPUT_FILE)
dd of=$@ if=$< bs=65536 count=64 skip=128
sha256sum $@
2 changes: 1 addition & 1 deletion modules/coreboot
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $(build)/$(coreboot_dir)/.build: \
$(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)/$(BOARD)/$(OUTPUT_FILE): $(build)/$(coreboot_dir)/.build
"$(build)/$(coreboot_dir)/cbfstool" "$(dir $<)coreboot.rom" print
$(call do-copy,$(dir $<)coreboot.rom,$@)
@touch $@ # update the time stamp
Expand Down
6 changes: 3 additions & 3 deletions modules/linuxboot
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ endif
# ready to flash onto the mainboard. There might be partial
# firmware volumes as well, but that depends on the board
# so this only retrieves the final one
linuxboot_output := build/$(linuxboot_board)/linuxboot.rom
linuxboot_output := build/$(linuxboot_board)/$(OUTPUT_FILE)
linuxboot_rom := $(build)/$(linuxboot_dir)/$(linuxboot_output)

$(build)/$(BOARD)/linuxboot.rom: $(build)/$(linuxboot_dir)/.build
$(build)/$(BOARD)/$(OUTPUT_FILE): $(build)/$(linuxboot_dir)/.build
$(call do-copy,$(dir $<)linuxboot.rom,$@)
@touch $@

Expand All @@ -70,7 +70,7 @@ $(build)/$(linuxboot_dir)/.build: \
$(build)/$(BOARD)/initrd.cpio.xz \


linuxboot.run: $(build)/$(BOARD)/linuxboot.rom
linuxboot.run: $(build)/$(BOARD)/$(OUTPUT_FILE)
$(MAKE) -C $(build)/$(linuxboot_base_dir) \
BOARD:=$(linuxboot_board) \
KERNEL=$(build)/$(BOARD)/bzImage \
Expand Down

0 comments on commit 0cd0684

Please sign in to comment.