Created attachment 248702 [details] Patch As of now, the default value of the variable NANO_PMAKE ("Parallel MAKE") as set in the script `default.sh` contains the default value of NANO_NCPU ("Number of CPUs used"). Thus, if NANO_NCPU is set to a different value in the respective config file, this won't change anything for the actual build, since the value of NANO_PMAKE is not automatically updated to the configured number of cores - rendering the variable more or less useless. The proposed solution (c.f. the patch attached) is to eliminate the variable NANO_PMAKE and use the "original" variables NANO_MAKE and NANO_NCPU directly, since it only affects two places in `defaults.sh´. In addition, the patch adds the missing available options to the output of `nanobsd.sh -h`.
Good catch! Let's divide this PR in two parts: 1. Fix the usage string. 2. Fix parallel make. Attached are the two proposed patches. The reason I want to avoid your approach for No. 2, if possible, is that NANO_PMAKE is older than NANO_NCPU. Nobody knows what NANO_PMAKE string other users might have, and your proposed change could "break" their build system. If you don't mind testing, I would highly appreciate it. Thank you for reporting it!
Created attachment 255003 [details] nanobsd: Add missing options to usage() -B suppress installs (both kernel and world) -I build disk image from existing build/install -W suppress installworld
Created attachment 255004 [details] nanobsd: Fix parallel make The NANO_NCPU (number of CPUs) value gets ignored by the build script when setting the NANO_PMAKE (parallel make) value. Fix it by setting the NANO_PMAKE later in the process.
Created attachment 255010 [details] nanobsd: Fix parallel make
(In reply to Jose Luis Duran from comment #3) Looks good to me, I would just like to propose to add the line setting NANO_PMAKE in the same way NANO_LOG, etc., is set. For overview's sake, if you will.
(In reply to Jose Luis Duran from comment #2) Nothing to add here, looks good!
https://reviews.freebsd.org/D47475 https://reviews.freebsd.org/D47476
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3c5d19a40de7273bb478163639dd8532af425595 commit 3c5d19a40de7273bb478163639dd8532af425595 Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2024-11-07 14:32:01 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2024-11-16 06:55:25 +0000 nanobsd: Fix parallel make The NANO_NCPU (number of CPUs) value gets ignored by the build script when setting the NANO_PMAKE (parallel make) value. Fix it by setting the NANO_PMAKE later in the process. PR: 277269 Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47476 tools/tools/nanobsd/defaults.sh | 5 ++++- tools/tools/nanobsd/nanobsd.sh | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-)
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=999f288a0eeb230d3655da94c1186ca03c0cc404 commit 999f288a0eeb230d3655da94c1186ca03c0cc404 Author: Jose Luis Duran <jlduran@FreeBSD.org> AuthorDate: 2024-11-07 14:16:50 +0000 Commit: Jose Luis Duran <jlduran@FreeBSD.org> CommitDate: 2024-11-16 06:54:58 +0000 nanobsd: Add missing options to usage() -B suppress installs (both kernel and world) -I build disk image from existing build/install -W suppress installworld PR: 277269 Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47475 tools/tools/nanobsd/defaults.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)