From owner-svn-src-stable@FreeBSD.ORG Thu Nov 7 04:52:26 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 362B8C46; Thu, 7 Nov 2013 04:52:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 164FC29F6; Thu, 7 Nov 2013 04:52:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA74qP5D014303; Thu, 7 Nov 2013 04:52:25 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA74qPdn014302; Thu, 7 Nov 2013 04:52:25 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201311070452.rA74qPdn014302@svn.freebsd.org> From: Luigi Rizzo Date: Thu, 7 Nov 2013 04:52:25 +0000 (UTC) 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 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 04:52:26 -0000 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