From 829d38ca5a04e6718a090f74b25d0ef2e7bc326b Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 23 Feb 2024 21:31:54 +0100 Subject: [PATCH] nanoBSD: allow NANO_NCPU and NANO_MAKE to be used independently In addition, add missing options to the output of `nanobsd.sh -h`. --- tools/tools/nanobsd/defaults.sh | 9 +++++---- tools/tools/nanobsd/embedded/common | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index b4f1f3466a3..45b742e29a0 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -67,7 +67,6 @@ NANO_PKG_META_BASE=/var/db # Make & parallel Make NANO_MAKE="make" NANO_NCPU=$(sysctl -n hw.ncpu) -NANO_PMAKE="make -j $NANO_NCPU" # The default name for any image we create. NANO_IMGNAME="_.disk.full" @@ -308,7 +307,7 @@ build_world ( ) ( nano_make_build_env set -o xtrace cd "${NANO_SRC}" - ${NANO_PMAKE} buildworld + ${NANO_MAKE} -j ${NANO_NCPU} buildworld ) > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) @@ -326,7 +325,7 @@ build_kernel ( ) ( # file to override this behavior. Just set NANO_MODULES=default. set -o xtrace cd "${NANO_SRC}" - ${NANO_PMAKE} buildkernel + ${NANO_MAKE} -j ${NANO_NCPU} buildkernel ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -843,16 +842,19 @@ pprint ( ) ( usage ( ) { ( echo "Usage: $0 [-bfhiKknqvwX] [-c config_file]" + echo " -B suppress installs (both kernel and world)" echo " -b suppress builds (both kernel and world)" echo " -c specify config file" echo " -f suppress code slice extraction (implies -i)" echo " -h print this help summary page" + echo " -I build disk image from existing build/install" echo " -i suppress disk image build" echo " -K suppress installkernel" echo " -k suppress buildkernel" echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc" echo " -q make output more quiet" echo " -v make output more verbose" + echo " -W suppress installworld" echo " -w suppress buildworld" echo " -X make native-xtools" ) 1>&2 @@ -913,7 +915,6 @@ set_defaults_and_export ( ) { export_var NANO_NCPU export_var NANO_NEWFS export_var NANO_OBJ - export_var NANO_PMAKE export_var NANO_SECTS export_var NANO_SRC export_var NANO_TOOLS diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index 17caef798af..ca7e0155945 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -81,8 +81,6 @@ NANO_RAM_ETCSIZE=8192 NANO_RAM_TMPVARSIZE=8192 NANO_IMAGES=2 -NANO_PMAKE="make -j $(sysctl -n hw.ncpu)" - NANO_CFG_BASE=$(pwd) NANO_CFG_BASE=$(realpath ${NANO_CFG_BASE}/..) NANO_SRC=$(realpath ${NANO_CFG_BASE}/../../..) -- 2.43.0