some tweaks to build picobsd for different architectures.

This commit is contained in:
Luigi Rizzo 2011-11-23 12:05:39 +00:00
parent de028133d4
commit 61f49b5bc9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227878
2 changed files with 13 additions and 5 deletions

View File

@ -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}

View File

@ -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