Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 May 2014 11:17:44 +0000 (UTC)
From:      Thomas Quinot <thomas@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r266442 - stable/9/tools/tools/nanobsd
Message-ID:  <201405191117.s4JBHiGU053494@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thomas
Date: Mon May 19 11:17:44 2014
New Revision: 266442
URL: http://svnweb.freebsd.org/changeset/base/266442

Log:
  MFC rev. 265926:
  (NANO_CONFIG): New variable containing path of config file, so that
  the configuration can reference additional files relative to its own
  location.
  
  (NANO_MODULES): If set to "default", install all built modules.
  
  Also update mergeinfo for past MFC of rev. 265260.
  
  Reviewed by:	imp

Modified:
  stable/9/tools/tools/nanobsd/nanobsd.sh
Directory Properties:
  stable/9/   (props changed)
  stable/9/tools/   (props changed)
  stable/9/tools/tools/   (props changed)
  stable/9/tools/tools/nanobsd/   (props changed)

Modified: stable/9/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- stable/9/tools/tools/nanobsd/nanobsd.sh	Mon May 19 10:08:05 2014	(r266441)
+++ stable/9/tools/tools/nanobsd/nanobsd.sh	Mon May 19 11:17:44 2014	(r266442)
@@ -75,7 +75,8 @@ CONF_WORLD=' '
 # Kernel config file to use
 NANO_KERNEL=GENERIC
 
-# Kernel modules to build; default is none
+# Kernel modules to install. If empty, no modules are installed.
+# Use "default" to install all built modules.
 NANO_MODULES=
 
 # Customize commands.
@@ -286,12 +287,18 @@ install_kernel ( ) (
 		kernconf=${NANO_KERNEL}
 	fi
 
+	# Install all built modules if NANO_MODULES=default,
+	# else install only listed modules (none if NANO_MODULES is empty).
+	if [ "${NANO_MODULES}" != "default" ]; then
+		modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'"
+	fi
+
 	cd ${NANO_SRC}
 	eval "TARGET_ARCH=${NANO_ARCH} ${NANO_MAKE} installkernel \
 		DESTDIR='${NANO_WORLDDIR}' \
 		__MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \
 		${kernconfdir_arg} KERNCONF=${kernconf} \
-		MODULES_OVERRIDE='${NANO_MODULES}'"
+		${modules_override_arg}"
 	) > ${NANO_OBJ}/_.ik 2>&1
 )
 
@@ -810,6 +817,10 @@ do
 		shift
 		;;
 	-c)
+		# Make config file path available to the config file
+		# itself so that it can access additional files relative
+		# to its own location.
+		NANO_CONFIG=$2
 		. "$2"
 		shift
 		shift



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405191117.s4JBHiGU053494>