summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/picobsd/build/Makefile.conf8
-rwxr-xr-xrelease/picobsd/build/picobsd13
2 files changed, 19 insertions, 2 deletions
diff --git a/release/picobsd/build/Makefile.conf b/release/picobsd/build/Makefile.conf
index 936f062..c4f048b 100644
--- a/release/picobsd/build/Makefile.conf
+++ b/release/picobsd/build/Makefile.conf
@@ -11,6 +11,10 @@
SRC?=/usr/src
CONFIG?=config
+MODULES?=-DNO_MODULES # do not build them as a default
+
+# caller will set MODULES to empty if modules are needed.
+# Indeed, it can be used to specify other Makefile options as well.
# These 3 variables determine where the kernel is built.
# If config were smart enough, we could place the config
@@ -34,11 +38,11 @@ ${BUILDDIR}/kernel: ${KERNFILE}
${KERNFILE}: ${COMPILE} do_a_make_in_the_kernel_directory_anyways
do_a_make_in_the_kernel_directory_anyways:
- (cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES)
+ (cd ${COMPILE}; make KERNEL=kernel ${MODULES} )
${COMPILE}: ${CONF}/${CONFFILE}
(cd ${CONF}; ${CONFIG} -d ${COMPILE} ${CONFFILE}; \
- cd ${COMPILE}; make KERNEL=kernel -DNO_MODULES depend )
+ cd ${COMPILE}; make KERNEL=kernel ${MODULES} depend )
${CONF}/${CONFFILE}: PICOBSD
# -mkdir -p ${CONF} # XXX not needed yet.
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd
index be83b5c..d672636 100755
--- a/release/picobsd/build/picobsd
+++ b/release/picobsd/build/picobsd
@@ -100,6 +100,7 @@ set_defaults() {
o_init_src="" # non "" if we need to init libs and includes.
o_makeopts=${MAKEOPTS:--s} # make options, be silent by default
o_no_devfs=yes # we do not want devfs
+ o_do_modules="" # do not build modules
SRC="/usr/src" # default location for sources
c_startdir=`pwd` # directory where we start
@@ -397,6 +398,11 @@ this as small as possible. " 10 70 2> ${c_reply} \
do_install() {
log "do_install()"
+ if [ "${o_interactive}" = "NO" ] ; then
+ echo "+++ Build completed +++"
+ cat .build.reply
+ return
+ fi
dialog --title "Build ${THETYPE} completed" --inputbox \
"\nThe build process was completed successfuly.\n\
`cat .build.reply` \n\n\
@@ -424,6 +430,10 @@ Your options:\n\
do_kernel() { # OK
log "do_kernel() Preparing kernel \"$name\" in $MY_TREE"
(cd $MY_TREE; export name SRC CONFIG BUILDDIR # used in this makefile ;
+ if [ "${o_do_modules}" = "yes" ] ; then
+ MODULES=""
+ export MODULES
+ fi
make -v -f ${PICO_TREE}/build/Makefile.conf ) || \
fail $? missing_kernel
}
@@ -830,6 +840,9 @@ while [ true ]; do
o_all_in_mfs=""
;;
+ --modules) # also build kernel modules
+ o_do_modules="yes"
+ ;;
-n)
o_interactive="NO"
;;
OpenPOWER on IntegriCloud