Attention is currently required from: Krystian Hebel.

Filip Lewiński would like Krystian Hebel to review this change.

View Change

payloads/iPXE: option for reproducible building

Change-Id: I926b096e77a9d45ba2beecd1fc2b7d0a9b9a7b9c
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
---
M payloads/external/Makefile.mk
M payloads/external/iPXE/Kconfig
M payloads/external/iPXE/Makefile
3 files changed, 23 insertions(+), 3 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/39/82039/1
diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk
index c227402..7aed5cb 100644
--- a/payloads/external/Makefile.mk
+++ b/payloads/external/Makefile.mk
@@ -381,6 +381,7 @@
CONFIG_HAS_SCRIPT=$(CONFIG_IPXE_ADD_SCRIPT) \
CONFIG_IPXE_NO_PROMPT=$(CONFIG_IPXE_NO_PROMPT) \
CONFIG_IPXE_HAS_HTTPS=$(CONFIG_IPXE_HAS_HTTPS) \
+ CONFIG_IPXE_CUSTOM_BUILD_ID=$(CONFIG_IPXE_CUSTOM_BUILD_ID) \
MFLAGS= MAKEFLAGS=

# LinuxBoot
diff --git a/payloads/external/iPXE/Kconfig b/payloads/external/iPXE/Kconfig
index 2ad39a1..2250be9 100644
--- a/payloads/external/iPXE/Kconfig
+++ b/payloads/external/iPXE/Kconfig
@@ -108,7 +108,15 @@
Enable HTTPS protocol, which allows you to encrypt all communication
with a web server and to verify the server's identity

-endif # BUILD_IPXE
+config PXE_CUSTOM_BUILD_ID
+ string "iPXE custom build_id variable"
+ default ""
+ help
+ This option allows user to customize build_id for reproducible builds.
+ It is 32-bit hexadecimal number without "0x" prefix.
+
+endif
+
endmenu

endif # PXE
diff --git a/payloads/external/iPXE/Makefile b/payloads/external/iPXE/Makefile
index 6f5525b..7d468d3 100644
--- a/payloads/external/iPXE/Makefile
+++ b/payloads/external/iPXE/Makefile
@@ -11,6 +11,17 @@
project_dir=ipxe
project_git_repo=https://git.ipxe.org/ipxe.git

+unexport KCONFIG_AUTOHEADER
+unexport KCONFIG_AUTOCONFIG
+unexport KCONFIG_DEPENDENCIES
+unexport KCONFIG_SPLITCONFIG
+unexport KCONFIG_TRISTATE
+unexport KCONFIG_NEGATIVES
+
+ifneq ($(CONFIG_PXE_CUSTOM_BUILD_ID),)
+PXE_MAKE_OPTS := BUILD_ID_CMD="echo 0x$(CONFIG_PXE_CUSTOM_BUILD_ID)"
+endif
+
all: build

$(project_dir):
@@ -56,10 +67,10 @@
build: config $(CONFIG_SCRIPT)
ifeq ($(CONFIG_HAS_SCRIPT),y)
echo " MAKE $(project_name) $(TAG-y) EMBED=$(CONFIG_SCRIPT)"
- $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom EMBED=$(CONFIG_SCRIPT)
+ $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom EMBED=$(CONFIG_SCRIPT) $(PXE_MAKE_OPTS)
else
echo " MAKE $(project_name) $(TAG-y)"
- $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom
+ $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom $(PXE_MAKE_OPTS)
endif
cp $(project_dir)/src/bin/$(PXE_ROM_PCI_ID).rom $(project_dir)/ipxe.rom
ifeq ($(CONSOLE_SERIAL),yy)

To view, visit change 82039. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I926b096e77a9d45ba2beecd1fc2b7d0a9b9a7b9c
Gerrit-Change-Number: 82039
Gerrit-PatchSet: 1
Gerrit-Owner: Filip Lewiński <filip.lewinski@3mdeb.com>
Gerrit-Reviewer: Krystian Hebel <krystian.hebel@3mdeb.com>
Gerrit-Attention: Krystian Hebel <krystian.hebel@3mdeb.com>
Gerrit-MessageType: newchange