Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/83081?usp=email )
Change subject: payloads/external: don't prevent parallel build of iPXE ......................................................................
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 sergii.dmytruk@3mdeb.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/83081 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de Reviewed-by: Krystian Hebel krystian.hebel@3mdeb.com --- M payloads/external/Makefile.mk 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Krystian Hebel: Looks good to me, approved
diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk index 4a17791..73b600b 100644 --- a/payloads/external/Makefile.mk +++ b/payloads/external/Makefile.mk @@ -381,8 +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_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