From d512cd4ad241beaf606d09e31b2f263bfffdea76 Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Mon, 18 Dec 2023 16:44:00 -0500 Subject: [PATCH] 12MB boards: Deduplicate generation of 8MB/4MB split ROMs Move Makefile targets for split ROMs to targets/split_8mb4mb.mk. Signed-off-by: Jonathon Hall --- .../UNTESTED_t530-dgpu-hotp-maximized.config | 23 ++----------------- .../UNTESTED_t530-dgpu-maximized.config | 23 ++----------------- .../UNTESTED_t530-hotp-maximized.config | 23 ++----------------- .../UNTESTED_t530-maximized.config | 23 ++----------------- ...TED_w530-dgpu-K1000m-hotp-maximized.config | 23 ++----------------- ...UNTESTED_w530-dgpu-K1000m-maximized.config | 23 ++----------------- ...TED_w530-dgpu-K2000m-hotp-maximized.config | 23 ++----------------- ...UNTESTED_w530-dgpu-K2000m-maximized.config | 23 ++----------------- .../UNTESTED_w530-hotp-maximized.config | 23 ++----------------- .../UNTESTED_w530-maximized.config | 23 ++----------------- .../t430-hotp-maximized.config | 23 ++----------------- boards/t430-maximized/t430-maximized.config | 23 ++----------------- boards/t440p-maximized/t440p-maximized.config | 13 ++--------- boards/w541-maximized/w541-maximized.config | 13 ++--------- .../x230-hotp-maximized-fhd_edp.config | 23 ++----------------- .../x230-hotp-maximized.config | 23 ++----------------- .../x230-hotp-maximized_usb-kb.config | 23 ++----------------- .../x230-maximized-fhd_edp.config | 23 ++----------------- boards/x230-maximized/x230-maximized.config | 23 ++----------------- targets/split_8mb4mb.mk | 18 +++++++++++++++ 20 files changed, 56 insertions(+), 379 deletions(-) create mode 100644 targets/split_8mb4mb.mk diff --git a/boards/UNTESTED_t530-dgpu-hotp-maximized/UNTESTED_t530-dgpu-hotp-maximized.config b/boards/UNTESTED_t530-dgpu-hotp-maximized/UNTESTED_t530-dgpu-hotp-maximized.config index b231c8d4..e0d0bcae 100644 --- a/boards/UNTESTED_t530-dgpu-hotp-maximized/UNTESTED_t530-dgpu-hotp-maximized.config +++ b/boards/UNTESTED_t530-dgpu-hotp-maximized/UNTESTED_t530-dgpu-hotp-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_t530-dgpu-maximized/UNTESTED_t530-dgpu-maximized.config b/boards/UNTESTED_t530-dgpu-maximized/UNTESTED_t530-dgpu-maximized.config index e89c98f9..446157e8 100644 --- a/boards/UNTESTED_t530-dgpu-maximized/UNTESTED_t530-dgpu-maximized.config +++ b/boards/UNTESTED_t530-dgpu-maximized/UNTESTED_t530-dgpu-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_t530-hotp-maximized/UNTESTED_t530-hotp-maximized.config b/boards/UNTESTED_t530-hotp-maximized/UNTESTED_t530-hotp-maximized.config index 647fbc28..3228c3cd 100644 --- a/boards/UNTESTED_t530-hotp-maximized/UNTESTED_t530-hotp-maximized.config +++ b/boards/UNTESTED_t530-hotp-maximized/UNTESTED_t530-hotp-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_t530-maximized/UNTESTED_t530-maximized.config b/boards/UNTESTED_t530-maximized/UNTESTED_t530-maximized.config index b5890d2b..098e617b 100644 --- a/boards/UNTESTED_t530-maximized/UNTESTED_t530-maximized.config +++ b/boards/UNTESTED_t530-maximized/UNTESTED_t530-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-dgpu-K1000m-hotp-maximized/UNTESTED_w530-dgpu-K1000m-hotp-maximized.config b/boards/UNTESTED_w530-dgpu-K1000m-hotp-maximized/UNTESTED_w530-dgpu-K1000m-hotp-maximized.config index ca5cd972..4f801981 100644 --- a/boards/UNTESTED_w530-dgpu-K1000m-hotp-maximized/UNTESTED_w530-dgpu-K1000m-hotp-maximized.config +++ b/boards/UNTESTED_w530-dgpu-K1000m-hotp-maximized/UNTESTED_w530-dgpu-K1000m-hotp-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-dgpu-K1000m-maximized/UNTESTED_w530-dgpu-K1000m-maximized.config b/boards/UNTESTED_w530-dgpu-K1000m-maximized/UNTESTED_w530-dgpu-K1000m-maximized.config index 7dfc6d82..fb0649bf 100644 --- a/boards/UNTESTED_w530-dgpu-K1000m-maximized/UNTESTED_w530-dgpu-K1000m-maximized.config +++ b/boards/UNTESTED_w530-dgpu-K1000m-maximized/UNTESTED_w530-dgpu-K1000m-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-dgpu-K2000m-hotp-maximized/UNTESTED_w530-dgpu-K2000m-hotp-maximized.config b/boards/UNTESTED_w530-dgpu-K2000m-hotp-maximized/UNTESTED_w530-dgpu-K2000m-hotp-maximized.config index e9a7ab8a..70ed7023 100644 --- a/boards/UNTESTED_w530-dgpu-K2000m-hotp-maximized/UNTESTED_w530-dgpu-K2000m-hotp-maximized.config +++ b/boards/UNTESTED_w530-dgpu-K2000m-hotp-maximized/UNTESTED_w530-dgpu-K2000m-hotp-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-dgpu-K2000m-maximized/UNTESTED_w530-dgpu-K2000m-maximized.config b/boards/UNTESTED_w530-dgpu-K2000m-maximized/UNTESTED_w530-dgpu-K2000m-maximized.config index 93cb8d99..baa822e4 100644 --- a/boards/UNTESTED_w530-dgpu-K2000m-maximized/UNTESTED_w530-dgpu-K2000m-maximized.config +++ b/boards/UNTESTED_w530-dgpu-K2000m-maximized/UNTESTED_w530-dgpu-K2000m-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-hotp-maximized/UNTESTED_w530-hotp-maximized.config b/boards/UNTESTED_w530-hotp-maximized/UNTESTED_w530-hotp-maximized.config index ec01b248..75516c56 100644 --- a/boards/UNTESTED_w530-hotp-maximized/UNTESTED_w530-hotp-maximized.config +++ b/boards/UNTESTED_w530-hotp-maximized/UNTESTED_w530-hotp-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/UNTESTED_w530-maximized/UNTESTED_w530-maximized.config b/boards/UNTESTED_w530-maximized/UNTESTED_w530-maximized.config index b369d4d4..5587c1ff 100644 --- a/boards/UNTESTED_w530-maximized/UNTESTED_w530-maximized.config +++ b/boards/UNTESTED_w530-maximized/UNTESTED_w530-maximized.config @@ -74,25 +74,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t530-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/t430-hotp-maximized/t430-hotp-maximized.config b/boards/t430-hotp-maximized/t430-hotp-maximized.config index 749de960..45f982d8 100644 --- a/boards/t430-hotp-maximized/t430-hotp-maximized.config +++ b/boards/t430-hotp-maximized/t430-hotp-maximized.config @@ -72,25 +72,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t430-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/t430-maximized/t430-maximized.config b/boards/t430-maximized/t430-maximized.config index 3a5d3516..a8e32a67 100644 --- a/boards/t430-maximized/t430-maximized.config +++ b/boards/t430-maximized/t430-maximized.config @@ -73,25 +73,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash t430-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/t440p-maximized/t440p-maximized.config b/boards/t440p-maximized/t440p-maximized.config index 2f94b882..34f7bfbf 100644 --- a/boards/t440p-maximized/t440p-maximized.config +++ b/boards/t440p-maximized/t440p-maximized.config @@ -52,14 +52,5 @@ $(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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/w541-maximized/w541-maximized.config b/boards/w541-maximized/w541-maximized.config index a3c1a50f..220229f5 100644 --- a/boards/w541-maximized/w541-maximized.config +++ b/boards/w541-maximized/w541-maximized.config @@ -52,14 +52,5 @@ $(pwd)/blobs/w541/me.bin: COREBOOT_DIR="$(build)/$(coreboot_base_dir)" \ $(pwd)/blobs/w541/download-clean-me $(pwd)/blobs/w541 -# 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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/x230-hotp-maximized-fhd_edp/x230-hotp-maximized-fhd_edp.config b/boards/x230-hotp-maximized-fhd_edp/x230-hotp-maximized-fhd_edp.config index cef25df1..accbc52b 100644 --- a/boards/x230-hotp-maximized-fhd_edp/x230-hotp-maximized-fhd_edp.config +++ b/boards/x230-hotp-maximized-fhd_edp/x230-hotp-maximized-fhd_edp.config @@ -86,25 +86,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash x230-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(build)/$(BOARD)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -all: $(build)/$(BOARD)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-bottom.rom -$(build)/$(BOARD)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-bottom.rom: $(build)/$(BOARD)/$(CB_OUTPUT_FILE) - $(call do,DD 8MB,$@,dd of=$@ if=$< bs=65536 count=128 skip=0 status=none) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(build)/$(BOARD)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(build)/$(BOARD)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(build)/$(BOARD)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/x230-hotp-maximized/x230-hotp-maximized.config b/boards/x230-hotp-maximized/x230-hotp-maximized.config index acc0dd59..08b16f66 100644 --- a/boards/x230-hotp-maximized/x230-hotp-maximized.config +++ b/boards/x230-hotp-maximized/x230-hotp-maximized.config @@ -77,25 +77,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash x230-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/x230-hotp-maximized_usb-kb/x230-hotp-maximized_usb-kb.config b/boards/x230-hotp-maximized_usb-kb/x230-hotp-maximized_usb-kb.config index 07acf58d..dd860cdc 100644 --- a/boards/x230-hotp-maximized_usb-kb/x230-hotp-maximized_usb-kb.config +++ b/boards/x230-hotp-maximized_usb-kb/x230-hotp-maximized_usb-kb.config @@ -76,25 +76,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash x230-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/x230-maximized-fhd_edp/x230-maximized-fhd_edp.config b/boards/x230-maximized-fhd_edp/x230-maximized-fhd_edp.config index 07ac10cc..8e53f5d9 100644 --- a/boards/x230-maximized-fhd_edp/x230-maximized-fhd_edp.config +++ b/boards/x230-maximized-fhd_edp/x230-maximized-fhd_edp.config @@ -86,25 +86,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash x230-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/boards/x230-maximized/x230-maximized.config b/boards/x230-maximized/x230-maximized.config index 47dc1b84..28e23b9e 100644 --- a/boards/x230-maximized/x230-maximized.config +++ b/boards/x230-maximized/x230-maximized.config @@ -77,25 +77,6 @@ export CONFIG_FLASHROM_OPTIONS="--force --noverify-all -p internal" # reduced IFD ME region and expanded BIOS IFD region. # - blobs/xx30/extract.sh # To extract from backuped 8M (bottom SPI) ME binary, GBE and IFD blobs. -# -# This board has two SPI flash chips, an 8 MB that holds the IFD, -# the ME image and part of the coreboot image, and a 4 MB one that -# has the rest of the coreboot and the reset vector. -# -# As a consequence, this replaces the need of having to flash x230-flash -# and expands available CBFS region (11.5Mb available CBFS space) -# -# When flashing via an external programmer it is easiest to have -# two separate files for these pieces. -all: $(board_build)/$(CB_OUTPUT_FILE) - @sha256sum $@ | tee -a "$(HASHES)" -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) - @sha256sum $@ | tee -a "$(HASHES)" - -all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom -$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) - $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) - @sha256sum $@ | tee -a "$(HASHES)" +# Generate split 4MB top / 8MB bottom ROMs +BOARD_TARGETS := split_8mb4mb diff --git a/targets/split_8mb4mb.mk b/targets/split_8mb4mb.mk new file mode 100644 index 00000000..473c41bc --- /dev/null +++ b/targets/split_8mb4mb.mk @@ -0,0 +1,18 @@ +# Many Lenovo boards have two SPI flash chips, an 8 MB that holds the IFD, +# the ME image and part of the coreboot image, and a 4 MB one that +# has the rest of the coreboot and the reset vector. +# +# As a consequence, this replaces the need of having to flash a legacy-flash ROM +# and expands available CBFS region (11.5Mb available CBFS space) +# +# When flashing via an external programmer it is easiest to have +# two separate files for these pieces. +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) + @sha256sum $@ | tee -a "$(HASHES)" + +all: $(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom +$(board_build)/heads-$(BOARD)-$(HEADS_GIT_VERSION)-top.rom: $(board_build)/$(CB_OUTPUT_FILE) + $(call do,DD 4MB,$@,dd of=$@ if=$< bs=65536 count=64 skip=128 status=none) + @sha256sum $@ | tee -a "$(HASHES)"