From owner-svn-src-all@FreeBSD.ORG Wed Nov 23 12:05:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 844071065679; Wed, 23 Nov 2011 12:05:40 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 742A38FC17; Wed, 23 Nov 2011 12:05:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pANC5ewo044802; Wed, 23 Nov 2011 12:05:40 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pANC5ejf044799; Wed, 23 Nov 2011 12:05:40 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201111231205.pANC5ejf044799@svn.freebsd.org> From: Luigi Rizzo Date: Wed, 23 Nov 2011 12:05:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r227878 - head/release/picobsd/build X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2011 12:05:40 -0000 Author: luigi Date: Wed Nov 23 12:05:39 2011 New Revision: 227878 URL: http://svn.freebsd.org/changeset/base/227878 Log: some tweaks to build picobsd for different architectures. Modified: head/release/picobsd/build/Makefile.conf head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/Makefile.conf ============================================================================== --- head/release/picobsd/build/Makefile.conf Wed Nov 23 11:59:01 2011 (r227877) +++ head/release/picobsd/build/Makefile.conf Wed Nov 23 12:05:39 2011 (r227878) @@ -19,9 +19,9 @@ MODULES?=-DNO_MODULES # do not build the # These 3 variables determine where the kernel is built. # If config were smart enough, we could place the config -# file in some other place than ${SRC}/sys/i386/conf, but +# file in some other place than ${SRC}/sys/${TARGET_ARCH}/conf, but # at the moment (Oct.2001) this is not possible yet. -CONF=${SRC}/sys/i386/conf +CONF=${SRC}/sys/${TARGET_ARCH}/conf #CONF=${BUILDDIR}/conf # XXX does not work yet CONFFILE=PICOBSD-${name} Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Wed Nov 23 11:59:01 2011 (r227877) +++ head/release/picobsd/build/picobsd Wed Nov 23 12:05:39 2011 (r227878) @@ -67,7 +67,7 @@ # SRC points to your FreeBSD source tree. # l_usrtree points to the /usr subdir for the source tree. # Normally /usr or ${SRC}/../usr -# l_objtree points to the obj tree. Normally ${l_usrtree}/obj-pico +# l_objtree points to the obj tree. Normally ${l_usrtree}/obj-pico-${o_arch} # c_label is either bsdlabel or disklabel # PICO_TREE is where standard picobsd stuff resides. # Normally ${SRC}/release/picobsd @@ -121,6 +121,7 @@ set_defaults() { # no arguments o_no_devfs= # default is use devfs. # You should only set it when building 4.x images o_do_modules="" # do not build modules + o_arch=`uname -m` # default to amd64 or i386 ... SRC="/usr/src" # default location for sources c_startdir=`pwd` # directory where we start @@ -451,6 +452,7 @@ do_kernel() { # OK log "do_kernel() Preparing kernel \"$name\" in $MY_TREE" (cd $MY_TREE; export name SRC BUILDDIR # used in this makefile ; # export CONFIG + export WARNS CWARNFLAGS [ "${o_do_modules}" = "yes" ] && export MODULES="" ${BINMAKE} ${o_par} -v -f ${PICO_TREE}/build/Makefile.conf ) || \ fail $? missing_kernel @@ -973,7 +975,7 @@ set_build_parameters() { else l_usrtree=${USR:-${SRC}/../usr} fi - l_objtree=${l_usrtree}/obj-pico + l_objtree=${l_usrtree}/obj-pico-${o_arch} PICO_TREE=${PICO_TREE:-${SRC}/release/picobsd} set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h` @@ -981,7 +983,8 @@ set_build_parameters() { log "OSVERSION is ${OSVERSION}" if [ ${OSVERSION} -ge 500035 ] ; then export MAKEOBJDIRPREFIX=${l_objtree} - export TARGET_ARCH=i386 TARGET=i386 + export TARGET_ARCH=${o_arch} TARGET=${o_arch} + # export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers" eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` fi @@ -1035,6 +1038,11 @@ while [ true ]; do o_init_src="YES" ;; + --arch) + o_arch=$2 + shift + ;; + --floppy_size) fd_size=$2 shift