summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2011-11-23 12:05:39 +0000
committerluigi <luigi@FreeBSD.org>2011-11-23 12:05:39 +0000
commitfe3a1e2f9d4008e82270bec9e315f5ad26e1aaa1 (patch)
treefbcd88753356c0d3894a39d72b0a365c3dfe4218 /release
parent2fca8765a2f8f21d5d59ea3a791e5ca51fba50dc (diff)
downloadFreeBSD-src-fe3a1e2f9d4008e82270bec9e315f5ad26e1aaa1.zip
FreeBSD-src-fe3a1e2f9d4008e82270bec9e315f5ad26e1aaa1.tar.gz
some tweaks to build picobsd for different architectures.
Diffstat (limited to 'release')
-rw-r--r--release/picobsd/build/Makefile.conf4
-rwxr-xr-xrelease/picobsd/build/picobsd14
2 files changed, 13 insertions, 5 deletions
diff --git a/release/picobsd/build/Makefile.conf b/release/picobsd/build/Makefile.conf
index 22077b0..5234349 100644
--- a/release/picobsd/build/Makefile.conf
+++ b/release/picobsd/build/Makefile.conf
@@ -19,9 +19,9 @@ MODULES?=-DNO_MODULES # do not build them as a default
# 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}
diff --git a/release/picobsd/build/picobsd b/release/picobsd/build/picobsd
index eacefc4..2910f9f 100755
--- a/release/picobsd/build/picobsd
+++ b/release/picobsd/build/picobsd
@@ -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
OpenPOWER on IntegriCloud