Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83363?usp=email )
Change subject: payloads/ipxe/makefile: Use git checkout for resetting config state ......................................................................
payloads/ipxe/makefile: Use git checkout for resetting config state
At the moment copies of the original configuration files are created before customisations are applied and the state is reset by copying them back after the build finished, so that the state is not left dirty when another build is done. That's not just overly complicated but it also doesn't allow debugging the state after the build finished and the state is left dirty when the build gets interrupted in between.
Simplify resetting the state by using `git reset --hard` before config customisations are applied, which makes the file copies superfluous and it also leaves the tree dirty after the build.
Change-Id: I325cf4d155780208b6f9cbbc49e50a69a4d59dd3 Signed-off-by: Felix Singer felixsinger@posteo.net --- M payloads/external/iPXE/Makefile 1 file changed, 2 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/83363/1
diff --git a/payloads/external/iPXE/Makefile b/payloads/external/iPXE/Makefile index 7ec8126..05475a3 100644 --- a/payloads/external/iPXE/Makefile +++ b/payloads/external/iPXE/Makefile @@ -33,16 +33,13 @@ git checkout -b coreboot $(TAG-y)
config: checkout + cd $(project_dir); \ + git reset --hard 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 @@ -65,13 +62,6 @@ $(MAKE) -C $(project_dir)/src bin/$(PXE_ROM_PCI_ID).rom endif cp $(project_dir)/src/bin/$(PXE_ROM_PCI_ID).rom $(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
clean: test -d $(project_dir) && $(MAKE) -C $(project_dir)/src veryclean || exit 0