From 1ad9c32ae36d783792027a45c4dfe71c66137bd2 Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Fri, 14 Jun 2024 11:56:07 +0300 Subject: [PATCH] payloads/external: don't prevent parallel build of iPXE When starting a nested instance Make communicates information on the number of jobs and how to synchronize difference instances via MAKEFLAGS variable. Explicitly overwriting it when invoking payloads/external/iPXE/Makefile ends up forcing serial build of iPXE. iPXE builds hundreds of files and its dependency generation is done separately from compilation making the whole process take couple minutes on a single CPU (which becomes several seconds if large enough number of CPUs is available). iPXE seems to have Make-based build system that has no problems with parallel build and not utilizing that effectively turns it into a bottleneck when building a coreboot image in parallel. It's unclear whether MAKEFLAGS= was even added for any particular purpose. It doesn't prevent child instances from using variables of parents, nor it prevents child instance from running in parallel (because it's still passed as an environment variable that's processed prior of variable assignments on command-line), but it does prevent grandchild instance from running in parallel (actual iPXE's Makefile). MFLAGS contains flags from MAKEFLAGS and isn't used implicitly by Make, so no need to clear it either because iPXE doesn't use it. Change-Id: Iac00e2f86d160793d3217e00ddc5012202b3196a Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/coreboot/+/83081 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer Reviewed-by: Krystian Hebel --- payloads/external/Makefile.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk index 4a17791052..73b600b2bb 100644 --- a/payloads/external/Makefile.mk +++ b/payloads/external/Makefile.mk @@ -381,8 +381,7 @@ 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_PXE_TRUST_CMD=$(CONFIG_PXE_TRUST_CMD) \ - MFLAGS= MAKEFLAGS= + CONFIG_PXE_TRUST_CMD=$(CONFIG_PXE_TRUST_CMD) # LinuxBoot LINUXBOOT_CROSS_COMPILE_ARCH-$(CONFIG_LINUXBOOT_X86) = x86_32