From a76fac4fa796fc17ab385595425dbbf1e4e1d7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= Date: Mon, 1 Jan 2024 23:01:57 +0100 Subject: [PATCH 1/2] Allow update_env to incorporate runtime changes to bootstrap.cfg Perform variable substitution at runtime, rather than at generation time. This way, if bootstrap.cfg changes after update_env, the new values there take effect immediately. --- steps/improve/update_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steps/improve/update_env.sh b/steps/improve/update_env.sh index 70ab828..89ccfce 100755 --- a/steps/improve/update_env.sh +++ b/steps/improve/update_env.sh @@ -6,7 +6,7 @@ unset GUILE_LOAD_PATH -cat > /steps/env <<- EOF +cat >> /steps/env <<- 'EOF' export PATH=${PREFIX}/bin PREFIX=${PREFIX} LIBDIR=${LIBDIR} From 50d1d68f99672a545503e584e5c6d6e49b7d87d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Stefanik?= Date: Mon, 1 Jan 2024 23:18:55 +0100 Subject: [PATCH 2/2] Restore multicore build support with kernel-bootstrap This was removed as part of the simplify refactor, severely slowing down qemu and bare-metal builds. Restoring it brings us back to the same build times that we saw before the refactor. --- rootfs.py | 1 + steps/improve/finalize_job_count.sh | 14 ++++++++++++++ steps/manifest | 1 + 3 files changed, 16 insertions(+) create mode 100644 steps/improve/finalize_job_count.sh diff --git a/rootfs.py b/rootfs.py index bce02ac..36799f4 100755 --- a/rootfs.py +++ b/rootfs.py @@ -33,6 +33,7 @@ def create_configuration_file(args): config.write(f"UPDATE_CHECKSUMS={args.update_checksums}\n") config.write(f"JOBS={args.cores}\n") config.write(f"SWAP_SIZE={args.swap}\n") + config.write(f"FINAL_JOBS={args.cores}\n") config.write(f"INTERNAL_CI={args.internal_ci or False}\n") config.write(f"BARE_METAL={args.bare_metal}\n") if (args.bare_metal or args.qemu) and not args.kernel: diff --git a/steps/improve/finalize_job_count.sh b/steps/improve/finalize_job_count.sh new file mode 100644 index 0000000..225348e --- /dev/null +++ b/steps/improve/finalize_job_count.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# SPDX-FileCopyrightText: 2024 Gábor Stefanik +# +# SPDX-License-Identifier: GPL-3.0-or-later +# +# Finalize job count once SMP support is available + +cat >> /steps/bootstrap.cfg <<- EOF +JOBS=${FINAL_JOBS} +EOF + +. /steps/bootstrap.cfg +. /steps/env diff --git a/steps/manifest b/steps/manifest index 67bffe5..7ef6496 100644 --- a/steps/manifest +++ b/steps/manifest @@ -119,6 +119,7 @@ build: linux-4.9.10 ( BUILD_LINUX == True ) jump: break ( INTERNAL_CI == pass1 ) jump: linux ( CHROOT == False ) jump: move_disk ( KERNEL_BOOTSTRAP == True ) +improve: finalize_job_count improve: finalize_fhs improve: swap ( SWAP_SIZE != 0 ) build: musl-1.2.4