From 7191e10f9165ded0f00c60cdafa1fe3da7310645 Mon Sep 17 00:00:00 2001 From: bryan Date: Tue, 22 Apr 2025 16:55:43 -0400 Subject: [PATCH] Use n-1 cores --- openwrtbuilder | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openwrtbuilder b/openwrtbuilder index 89be674..1c78edc 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -530,6 +530,9 @@ from_source() { # make dirclean # compiled output, toolchain, build tools # make distclean # compiled output, toolchain, build tools, .config, feeds, .ccache + # Use a custom (faster) mirror + # execute sed -i -E 's;git.openwrt.org/(feed|project);github.com/openwrt;' feeds.conf.default + # Update package feed ./scripts/feeds update -i -f && ./scripts/feeds update -a -f && @@ -589,7 +592,7 @@ from_source() { execute make "${make_opts[@]}" "-j1" defconfig execute make "${make_opts[@]}" "-j1" download # ((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)+1))") - make_opts+=("-j$(($(nproc)+1))") + make_opts+=("-j$(($(nproc)-1))") # Make image if ! execute ionice -c 3 chrt --idle 0 nice -n19 make "${make_opts[@]}" world; then