From 7d652ac991b6c518b980a58869c57d9d5e4b87a0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Fri, 3 May 2024 06:35:38 +0100 Subject: [PATCH] coreboot: never download blobs even if USE_BLOBS=y Same idea as my never-download-microcode patch. Even if a coreboot config enables blobs, the blobs are not actually downloaded or inserted or otherwise handled in any way. This means I can re-use lbmk-based coreboot configs without as much modification, thus reducing the maintenance burden for Canoeboot releases. Signed-off-by: Leah Rowe --- ...r-download-blobs-even-if-USE_BLOBS-y.patch | 47 ++++++++++++++++ ...r-download-blobs-even-if-USE_BLOBS-y.patch | 47 ++++++++++++++++ ...r-download-blobs-even-if-USE_BLOBS-y.patch | 43 +++++++++++++++ ...r-download-blobs-even-if-USE_BLOBS-y.patch | 43 +++++++++++++++ ...r-download-blobs-even-if-USE_BLOBS-y.patch | 54 +++++++++++++++++++ 5 files changed, 234 insertions(+) create mode 100644 config/coreboot/default/patches/0017-Never-download-blobs-even-if-USE_BLOBS-y.patch create mode 100644 config/coreboot/dell/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch create mode 100644 config/coreboot/fam15h_rdimm/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch create mode 100644 config/coreboot/fam15h_udimm/patches/0011-Never-download-blobs-even-if-USE_BLOBS-y.patch create mode 100644 config/coreboot/i945/patches/0011-never-download-blobs-even-if-USE_BLOBS-y.patch diff --git a/config/coreboot/default/patches/0017-Never-download-blobs-even-if-USE_BLOBS-y.patch b/config/coreboot/default/patches/0017-Never-download-blobs-even-if-USE_BLOBS-y.patch new file mode 100644 index 0000000..96a9015 --- /dev/null +++ b/config/coreboot/default/patches/0017-Never-download-blobs-even-if-USE_BLOBS-y.patch @@ -0,0 +1,47 @@ +From c7d9dcec39fbda870b7cddbeb87771bac0fb68b8 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Fri, 3 May 2024 06:24:49 +0100 +Subject: [PATCH 1/1] Never download blobs, even if USE_BLOBS=y + +same idea as my never-microcode patches. i maintain +canoeboot and i like to re-use the same configs from +lbmk. with this and the never-microcode patch, it should +now be possible to re-use lbmk coreboot configs unmodified! + +when those configs are used in cbmk, the relevant blobs +are never downloaded, ever. + +Signed-off-by: Leah Rowe +--- + Makefile.mk | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/Makefile.mk b/Makefile.mk +index 87c6bcb247..3747eaa556 100644 +--- a/Makefile.mk ++++ b/Makefile.mk +@@ -222,21 +222,6 @@ $(info Updating git submodules.) + forgetthis:=$(shell git submodule update --init $(quiet_errors)) + # Checkout Cmocka repository + forgetthis:=$(shell git submodule update --init --checkout 3rdparty/cmocka $(quiet_errors)) +-ifeq ($(CONFIG_USE_BLOBS),y) +-# These items are necessary because each has update=none in .gitmodules. They are ignored +-# until expressly requested and enabled with --checkout +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/blobs $(quiet_errors)) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/intel-microcode $(quiet_errors)) +-ifeq ($(CONFIG_FSP_USE_REPO),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/fsp $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_AMD_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/amd_blobs $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_QC_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/qc_blobs $(quiet_errors)) +-endif +-endif + UPDATED_SUBMODULES:=1 + COREBOOT_EXPORTS += UPDATED_SUBMODULES + +-- +2.39.2 + diff --git a/config/coreboot/dell/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch b/config/coreboot/dell/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch new file mode 100644 index 0000000..96a9015 --- /dev/null +++ b/config/coreboot/dell/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch @@ -0,0 +1,47 @@ +From c7d9dcec39fbda870b7cddbeb87771bac0fb68b8 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Fri, 3 May 2024 06:24:49 +0100 +Subject: [PATCH 1/1] Never download blobs, even if USE_BLOBS=y + +same idea as my never-microcode patches. i maintain +canoeboot and i like to re-use the same configs from +lbmk. with this and the never-microcode patch, it should +now be possible to re-use lbmk coreboot configs unmodified! + +when those configs are used in cbmk, the relevant blobs +are never downloaded, ever. + +Signed-off-by: Leah Rowe +--- + Makefile.mk | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/Makefile.mk b/Makefile.mk +index 87c6bcb247..3747eaa556 100644 +--- a/Makefile.mk ++++ b/Makefile.mk +@@ -222,21 +222,6 @@ $(info Updating git submodules.) + forgetthis:=$(shell git submodule update --init $(quiet_errors)) + # Checkout Cmocka repository + forgetthis:=$(shell git submodule update --init --checkout 3rdparty/cmocka $(quiet_errors)) +-ifeq ($(CONFIG_USE_BLOBS),y) +-# These items are necessary because each has update=none in .gitmodules. They are ignored +-# until expressly requested and enabled with --checkout +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/blobs $(quiet_errors)) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/intel-microcode $(quiet_errors)) +-ifeq ($(CONFIG_FSP_USE_REPO),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/fsp $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_AMD_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/amd_blobs $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_QC_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/qc_blobs $(quiet_errors)) +-endif +-endif + UPDATED_SUBMODULES:=1 + COREBOOT_EXPORTS += UPDATED_SUBMODULES + +-- +2.39.2 + diff --git a/config/coreboot/fam15h_rdimm/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch b/config/coreboot/fam15h_rdimm/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch new file mode 100644 index 0000000..a39ea08 --- /dev/null +++ b/config/coreboot/fam15h_rdimm/patches/0010-Never-download-blobs-even-if-USE_BLOBS-y.patch @@ -0,0 +1,43 @@ +From 31cb9eefd880bd8011d18fa070f31c498a0265e5 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Fri, 3 May 2024 06:29:41 +0100 +Subject: [PATCH 1/1] Never download blobs, even if USE_BLOBS=y + +Same idea as my never-microcode patch. With this and that +other patch, I can now re-use lbmk coreboot configs reliably +without modifying them; i currently set CONFIG_USE_BLOBS=n +on the Canoeboot versions. + +Thus, this patch will reduce the maintenance burden for cbmk. + +Signed-off-by: Leah Rowe +--- + Makefile.inc | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index be198d6580..2b3718b67c 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -196,18 +196,6 @@ endif + ifneq ($(UPDATED_SUBMODULES),1) + # try to fetch non-optional submodules if the source is under git + forgetthis:=$(if $(GIT),$(shell git submodule update --init)) +-ifeq ($(CONFIG_USE_BLOBS),y) +-# These items are necessary because each has update=none in .gitmodules. They are ignored +-# until expressly requested and enabled with --checkout +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/blobs)) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/intel-microcode)) +-ifeq ($(CONFIG_PLATFORM_USES_FSP1_0)$(CONFIG_PLATFORM_USES_FSP1_1)$(CONFIG_PLATFORM_USES_FSP2_0),y) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/fsp)) +-endif +-ifeq ($(CONFIG_USE_AMD_BLOBS),y) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/amd_blobs)) +-endif +-endif + UPDATED_SUBMODULES:=1 + COREBOOT_EXPORTS += UPDATED_SUBMODULES + endif +-- +2.39.2 + diff --git a/config/coreboot/fam15h_udimm/patches/0011-Never-download-blobs-even-if-USE_BLOBS-y.patch b/config/coreboot/fam15h_udimm/patches/0011-Never-download-blobs-even-if-USE_BLOBS-y.patch new file mode 100644 index 0000000..a39ea08 --- /dev/null +++ b/config/coreboot/fam15h_udimm/patches/0011-Never-download-blobs-even-if-USE_BLOBS-y.patch @@ -0,0 +1,43 @@ +From 31cb9eefd880bd8011d18fa070f31c498a0265e5 Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Fri, 3 May 2024 06:29:41 +0100 +Subject: [PATCH 1/1] Never download blobs, even if USE_BLOBS=y + +Same idea as my never-microcode patch. With this and that +other patch, I can now re-use lbmk coreboot configs reliably +without modifying them; i currently set CONFIG_USE_BLOBS=n +on the Canoeboot versions. + +Thus, this patch will reduce the maintenance burden for cbmk. + +Signed-off-by: Leah Rowe +--- + Makefile.inc | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index be198d6580..2b3718b67c 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -196,18 +196,6 @@ endif + ifneq ($(UPDATED_SUBMODULES),1) + # try to fetch non-optional submodules if the source is under git + forgetthis:=$(if $(GIT),$(shell git submodule update --init)) +-ifeq ($(CONFIG_USE_BLOBS),y) +-# These items are necessary because each has update=none in .gitmodules. They are ignored +-# until expressly requested and enabled with --checkout +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/blobs)) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/intel-microcode)) +-ifeq ($(CONFIG_PLATFORM_USES_FSP1_0)$(CONFIG_PLATFORM_USES_FSP1_1)$(CONFIG_PLATFORM_USES_FSP2_0),y) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/fsp)) +-endif +-ifeq ($(CONFIG_USE_AMD_BLOBS),y) +-forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/amd_blobs)) +-endif +-endif + UPDATED_SUBMODULES:=1 + COREBOOT_EXPORTS += UPDATED_SUBMODULES + endif +-- +2.39.2 + diff --git a/config/coreboot/i945/patches/0011-never-download-blobs-even-if-USE_BLOBS-y.patch b/config/coreboot/i945/patches/0011-never-download-blobs-even-if-USE_BLOBS-y.patch new file mode 100644 index 0000000..1369615 --- /dev/null +++ b/config/coreboot/i945/patches/0011-never-download-blobs-even-if-USE_BLOBS-y.patch @@ -0,0 +1,54 @@ +From 72a2762b7b7cadac1dfd628a908af17fb907df9c Mon Sep 17 00:00:00 2001 +From: Leah Rowe +Date: Fri, 3 May 2024 06:33:05 +0100 +Subject: [PATCH 1/1] never download blobs even if USE_BLOBS=y + +With this and the existing never-add-microcode patch, +I can re-use lbmk coreboot configs without modifying them. + +I already don't disable microcode in those configs when +porting them to canoeboot, because Canoeboot modifies +coreboot to never download/handle microcode, even when +microcode is enabled in a coreboot config. + +This patch does the same thing, but for disabling the download +of 3rdparty blob repositories. + +Therefore, I can now keep canoeboot's coreboot configs more +closely in sync with those of Libreboot, reducing the +maintenance burden for each Canoeboot release. + +Signed-off-by: Leah Rowe +--- + Makefile.inc | 15 --------------- + 1 file changed, 15 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 96121d4019..6e8f7ec581 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -199,21 +199,6 @@ $(info Updating git submodules.) + forgetthis:=$(shell git submodule update --init $(quiet_errors)) + # Checkout Cmocka repository + forgetthis:=$(shell git submodule update --init --checkout 3rdparty/cmocka $(quiet_errors)) +-ifeq ($(CONFIG_USE_BLOBS),y) +-# These items are necessary because each has update=none in .gitmodules. They are ignored +-# until expressly requested and enabled with --checkout +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/blobs $(quiet_errors)) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/intel-microcode $(quiet_errors)) +-ifeq ($(CONFIG_FSP_USE_REPO),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/fsp $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_AMD_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/amd_blobs $(quiet_errors)) +-endif +-ifeq ($(CONFIG_USE_QC_BLOBS),y) +-forgetthis:=$(shell git submodule update --init --checkout 3rdparty/qc_blobs $(quiet_errors)) +-endif +-endif + UPDATED_SUBMODULES:=1 + COREBOOT_EXPORTS += UPDATED_SUBMODULES + +-- +2.39.2 +