From 3b18467e8a91a1b8e1d612da0b602c87665806e5 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 14 Jan 2026 17:04:41 -0600 Subject: [PATCH] payloads/ipxe: Unconditionally restore config files post-build Replace backup file mechanism with git restore to fix restoration bugs and simplify the build system. Files are now always restored after build completion, ensuring a clean git state regardless of which configuration options modify the config files. TEST=build samsung/stumpy with iPXE for edk2 twice in a row without failure due to dirty repo state. Change-Id: I9c88f5ca5e5a0172f7c0a94e4edfe0192340d1e2 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90772 Reviewed-by: Sean Rhodes Tested-by: build bot (Jenkins) --- payloads/external/iPXE/Makefile | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/payloads/external/iPXE/Makefile b/payloads/external/iPXE/Makefile index 284d4275b4..a9fb43f846 100644 --- a/payloads/external/iPXE/Makefile +++ b/payloads/external/iPXE/Makefile @@ -42,15 +42,10 @@ checkout: fetch config: checkout ifeq ($(CONSOLE_SERIAL),yy) - cp "$(project_dir)/src/config/console.h" "$(project_dir)/src/config/console.h.cb" - cp "$(project_dir)/src/config/serial.h" "$(project_dir)/src/config/serial.h.cb" sed -i'' 's|//#define\s*CONSOLE_SERIAL.*|#define CONSOLE_SERIAL|' "$(project_dir)/src/config/console.h" sed -i'' 's|#define\s*COMCONSOLE.*|#define COMCONSOLE $(IPXE_UART)|' "$(project_dir)/src/config/serial.h" sed -i'' 's|#define\s*COMSPEED.*|#define COMSPEED $(CONFIG_TTYS0_BAUD)|' "$(project_dir)/src/config/serial.h" endif -ifneq ($(filter y,$(CONFIG_HAS_SCRIPT) $(CONFIG_IPXE_NO_PROMPT)),) - cp "$(project_dir)/src/config/general.h" "$(project_dir)/src/config/general.h.cb" -endif ifeq ($(CONFIG_HAS_SCRIPT),y) sed -i'' 's|//#define\s*IMAGE_SCRIPT.*|#define IMAGE_SCRIPT|' "$(project_dir)/src/config/general.h" endif @@ -73,13 +68,7 @@ else $(MAKE) -C $(project_dir)/src $(IPXE_BUILD_TARGET) $(PXE_MAKE_OPTS) endif cp $(project_dir)/src/$(IPXE_BUILD_TARGET) $(project_dir)/ipxe.rom -ifeq ($(CONSOLE_SERIAL),yy) - cp "$(project_dir)/src/config/console.h.cb" "$(project_dir)/src/config/console.h" - cp "$(project_dir)/src/config/serial.h.cb" "$(project_dir)/src/config/serial.h" -endif -ifneq ($(filter y,$(CONFIG_HAS_SCRIPT) $(CONFIG_IPXE_NO_PROMPT)),) - cp "$(project_dir)/src/config/general.h.cb" "$(project_dir)/src/config/general.h" -endif + cd $(project_dir) && git restore src/config/console.h src/config/serial.h src/config/general.h clean: test -d $(project_dir) && $(MAKE) -C $(project_dir)/src veryclean || exit 0