Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2013 04:52:25 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r257778 - stable/8/release/picobsd/build
Message-ID:  <201311070452.rA74qPdn014302@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Thu Nov  7 04:52:25 2013
New Revision: 257778
URL: http://svnweb.freebsd.org/changeset/base/257778

Log:
  MFH: sync the picobsd build file with what is in head,
  except for the MALLOC_PRODUCTION definition

Modified:
  stable/8/release/picobsd/build/picobsd

Modified: stable/8/release/picobsd/build/picobsd
==============================================================================
--- stable/8/release/picobsd/build/picobsd	Thu Nov  7 04:31:21 2013	(r257777)
+++ stable/8/release/picobsd/build/picobsd	Thu Nov  7 04:52:25 2013	(r257778)
@@ -7,6 +7,8 @@
 #
 #	picobsd [options] image_type [site_name]
 #
+# CWARNFLAGS can be used to pass -Wall or similar options
+#
 # Where image_type is a directory with the picobsd config info,
 # and ${image_type}/floppy.tree.${site_name} contains
 # optional site-specific configuration.
@@ -172,17 +174,10 @@ create_includes_and_libraries2() { # opt
     if [ -d "$1" ] ; then
 	cd $1 ; ${BINMAKE} ${o_par} $2	# specific target, e.g. ld-elf.so
     else
-	MAKEOBJDIRPREFIX=${l_objtree}
-	export MAKEOBJDIRPREFIX
-	# export WITH_RESCUE=yes	# build crunchide
-	# ${BINMAKE} ${o_par} _+_= $no toolchain _includes _libraries
-	(
-	    # eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V BMAKEENV`
-	    eval "export XMAKE=\"`cd ${SRC}; make -f Makefile -V XMAKE`\""
-	    ${BINMAKE} ${o_par} _+_= $no toolchain
-	)
+	export MAKEOBJDIRPREFIX=${l_objtree}
+	make ${o_par} $no toolchain
+	# XXX do we need any of these ?
         eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV`
-	${BINMAKE} ${o_par} _+_= $no _includes _libraries
 	[ ${o_arch} != `uname -m` ] && \
 	    (cd ${l_objtree}; ln -s . ${o_arch}.${o_arch} || true )
     fi
@@ -439,9 +434,10 @@ do_kernel() {		# OK
 	# export CONFIG
 	export WARNS CWARNFLAGS
 	[ "${o_do_modules}" = "yes" ] && export MODULES=""
-	${BINMAKE} ${o_par} KERNCONF=${l_kernconf}	\
-		-v -f ${PICO_TREE}/build/Makefile.conf ) || \
-	fail $? missing_kernel
+	# kernel build not parallelizable yet
+	${BINMAKE} KERNCONF=${l_kernconf}	\
+		-f ${PICO_TREE}/build/Makefile.conf ) || \
+	    fail $? missing_kernel
 }
 
 # Populate the variable part of the floppy filesystem. Must be done before
@@ -591,7 +587,7 @@ find_progs() {	# programs
 		if [ "$old_libs" = "$i" ] ; then
 			log "libraries for: $my_progs ($u_progs) are ($i) $u_libs"
 			log "--- done find_progs ---"
-	return 0
+			return 0
 		else
 			# logverbose "old--- $old_libs --- new +++ $i +++"
 		fi
@@ -680,7 +676,7 @@ populate_mfs_tree() {
     a=${BUILDDIR}/crunch1.conf
     ( export BUILDDIR SRC MY_TREE PICO_OBJ ;
 	${BINMAKE} \
-		-v -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk )
+		-f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk )
     log "Libs are ${LIBS} "
     export SRC # used by crunch.mk
     # export LIBS CFLAGS
@@ -696,17 +692,22 @@ populate_mfs_tree() {
     # rm $a # do not remove!
     ) || fail $? crunch
 
-    if [ -f ${dst}/stand/sshd ] ; then
-	log "Setting up host key for sshd:"
-	if [ -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key.gz ] ; then
-	    log "Using existing host key"
+    log "Setting up host key for sshd:"
+    for K in rsa1 rsa dsa ; do
+	if [ $K = rsa1 ] ; then
+	    i=ssh_host_key
 	else
-	    log "Generating new host key" 
-	    ssh-keygen -t rsa1 -f ${BUILDDIR}/floppy.tree/etc/ssh_host_key \
-		 -N "" -C "root@picobsd"
-	    gzip -9 ${BUILDDIR}/floppy.tree/etc/ssh_host_key* || true
+	    i=ssh_host_${K}_key
 	fi
-    fi
+	if [ -f ${BUILDDIR}/floppy.tree/etc/$i.gz ] ; then
+	    log "Using existing host key $i"
+	else
+	    log "Generating new host key $i" 
+	    ssh-keygen -t $K -f ${BUILDDIR}/floppy.tree/etc/$i \
+		     -N "" -C "root@picobsd"
+	    gzip -9 ${BUILDDIR}/floppy.tree/etc/${i}* || true
+	fi
+    done
 
     log "Copy generic and site-specific MFS tree..."
     for MFS_TREE in ${PICO_TREE}/mfs_tree ${MY_TREE}/mfs_tree ; do
@@ -881,11 +882,13 @@ fill_floppy_image() {
     fi
     log "Compress with kgzip and copy to floppy image"
 
-	mkdir -p  ${dst}/boot/kernel
-    # XXX update loader.conf
-	echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf
-	echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf
-	cp -p /boot/loader ${dst}/boot/loader || fail $? no_space "copying bootloader"
+    mkdir -p  ${dst}/boot/kernel
+    # XXX loader.conf does not work unless we also load the .4th files
+    # echo "hint.acpi.0.disabled=\"1\"" > ${dst}/boot/loader.conf
+    # echo "console=\"comconsole\"" >> ${dst}/boot/loader.conf
+    local blf="loader* *.4th" # loader.rc loader.4th support.4th"
+    (cd /boot; cp -p loader ${dst}/boot) || fail $? no_space "copying bootloader"
+    cp ${MY_TREE}/floppy.tree/boot/loader.conf ${dst}/boot || true
     gzip -c kernel > ${dst}/boot/kernel/kernel.gz || fail $? no_space "copying kernel"
 
     # now transfer the floppy tree. If it is already in mfs, dont bother.
@@ -970,10 +973,20 @@ set_build_parameters() {
     if [ ${OSVERSION} -ge 500035 ] ; then
 	export MAKEOBJDIRPREFIX=${l_objtree}
 	export TARGET_ARCH=${o_arch} TARGET=${o_arch}
+	# XXX 20131001 see if CLANG fixes the build
+	export WITHOUT_CLANG_IS_CC=yes
+	export WITH_GCC=yes
+	export WITH_GNUCXX=yes
+	export WITHOUT_CLANG=yes
+	export WITHOUT_ICONV=yes
+
 	# XXX why change machine_arch ?
 	#-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m`
 	# export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers"
+	# XXX BINMAKE does not really exist anymore
 	eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\""
+	[ "$BINMAKE" = "" ] && \
+	   eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V SUB_MAKE`\""
     fi
 
     if [ "${o_init_src}" != "" ] ; then



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