payloads/iPXE: option for reproducible building

Change-Id: I663929a3d1cbe05d6a32e0ec5e81d58edc16f02b
Upstream-Status: Submitted [CB:82039]
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
This commit is contained in:
Signed-off-by: Krystian Hebel
2025-03-13 17:50:41 +02:00
committed by Sergii Dmytruk
parent 5db1602b1a
commit eebd5c7383
3 changed files with 22 additions and 3 deletions
+2 -1
View File
@@ -390,7 +390,8 @@ payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(IPXE_CONFIG_SCRIPT)
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_TRUST_CMD=$(CONFIG_IPXE_TRUST_CMD)
CONFIG_IPXE_TRUST_CMD=$(CONFIG_IPXE_TRUST_CMD) \
CONFIG_IPXE_CUSTOM_BUILD_ID=$(CONFIG_IPXE_CUSTOM_BUILD_ID)
# LinuxBoot
LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86) = x86_32
+7
View File
@@ -116,6 +116,13 @@ config IPXE_TRUST_CMD
digital signature of file prior loading it, and restrict to loading
trusted files only.
config IPXE_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 # BUILD_IPXE
endmenu
+13 -2
View File
@@ -13,6 +13,17 @@ project_name=iPXE
project_dir=ipxe
project_git_repo=https://github.com/Dasharo/ipxe.git
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
unexport KCONFIG_DEPENDENCIES
unexport KCONFIG_SPLITCONFIG
unexport KCONFIG_TRISTATE
unexport KCONFIG_NEGATIVES
ifneq ($(CONFIG_IPXE_CUSTOM_BUILD_ID),)
PXE_MAKE_OPTS := BUILD_ID_CMD="echo 0x$(CONFIG_IPXE_CUSTOM_BUILD_ID)"
endif
all: build
$(project_dir):
@@ -62,10 +73,10 @@ endif
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)