Skip to content

Commit

Permalink
Make T440p Coreboot build depend on blob files
Browse files Browse the repository at this point in the history
Now, when you run `make BOARD=any-t440p-variant`, the build system
automatically fetches mrc.bin and me.bin.
  • Loading branch information
rbreslow committed Feb 26, 2023
1 parent 144f9c1 commit 1dc5d4e
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions boards/t440p-maximized/t440p-maximized.config
Expand Up @@ -35,9 +35,20 @@ export CONFIG_BOOT_DEV="/dev/sda1"
export CONFIG_BOARD_NAME="ThinkPad T440p-maximized"
export CONFIG_FLASHROM_OPTIONS="-p internal"

all: $(board_build)/$(CB_OUTPUT_FILE)
@sha256sum $@ | tee -a "$(HASHES)"
# Make the Coreboot build depend on the following 3rd party blobs:
$(build)/coreboot-$(CONFIG_COREBOOT_VERSION)/$(BOARD)/.build: \
$(pwd)/blobs/haswell/mrc.bin $(pwd)/blobs/t440p/me.bin

$(pwd)/blobs/haswell/mrc.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
$(pwd)/blobs/haswell/obtain-mrc $(pwd)/blobs/haswell

$(pwd)/blobs/t440p/me.bin:
COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \
$(pwd)/blobs/t440p/download-clean-me $(pwd)/blobs/t440p

# Haswell boards have an 8 MiB and 4 MiB SPI flash chip. So, we split the
# Coreboot ROM into two files to flash one on each chip.
all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-bottom.rom
$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-bottom.rom: $(board_build)/$(CB_OUTPUT_FILE)
$(call do,DD 8MB,$@,dd of=$@ if=$< bs=65536 count=128 skip=0 status=none)
Expand Down

0 comments on commit 1dc5d4e

Please sign in to comment.