Merge ^/projects/release-embedded into ^/head.

After several months of testing and fixing (and breaking)
various parts of release/release.sh changes, it is now
possible to build FreeBSD/arm images as part of the release
process.

When EMBEDDEDBUILD is set in the release.conf file, release.sh
will create the build environment, then run a separate script
in release/${XDEV}/release.sh [1].  Currently, only arm is
supported.

The release/${XDEV}/release.sh configures the build environment
specific for the target image, such as installing gcc(1),
installing additional third-party software from the ports tree,
and fetching external sources.

Once the build environment is set up, release/${XDEV}/release.sh
runs Crochet, written by Tim Kientzle, which builds the userland
and kernel, and creates an image that can be written to an SD
card with dd(1).  Many thanks to Tim for his work on Crochet.

Sample configurations for FreeBSD/arm boards are in the
release/arm/ directory, and Crochet configuration files for each
board are located in release/tools/arm/.  Supported boards at this
time are: BEAGLEBONE, PANDABOARD, RPI-B, and WANDBOARD-QUAD.

Adding support for additional boards will continue in the
projects/release-embedded/ branch, and incrementally merged back
to head/.

Many thanks to the FreeBSD Foundation for the support and
sponsorship of this project.

[1] XDEV is used in order to keep the various configurations
    organized by architecture, but since TARGET and TARGET_ARCH
    are used to build the chroot, the values of those variables
    cannot be used.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2014-03-05 23:17:53 +00:00
commit e0436612a9
12 changed files with 540 additions and 24 deletions

View File

@ -0,0 +1,37 @@
#
# $FreeBSD$
#
# This is only supported on amd64 right now. It may work on
# i386, but I do not have the hardware to test, so until I get
# a VM set up to make sure, be cautious and assume it will not.
if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then
echo "This is only supported on amd64 right now."
exit 0
fi
# Build chroot configuration
TARGET="amd64"
TARGET_ARCH="amd64"
SVNROOT="svn://svn.FreeBSD.org/"
SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
NODOC=yes
# Build target configuration
# Since this file is sourced by a script that runs another
# script, these must be exported.
set -a
WORLD_FLAGS="-j $(sysctl -n hw.ncpu)"
KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
CHROOTDIR="/scratch"
EMBEDDEDBUILD=1
EMBEDDEDPORTS="lang/python textproc/gsed"
XDEV="arm"
XDEV_ARCH="armv6"
KERNEL="BEAGLEBONE"
CROCHETSRC="https://github.com/kientzle/crochet-freebsd"
CROCHETBRANCH="trunk"
set +a

View File

@ -0,0 +1,37 @@
#
# $FreeBSD$
#
# This is only supported on amd64 right now. It may work on
# i386, but I do not have the hardware to test, so until I get
# a VM set up to make sure, be cautious and assume it will not.
if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then
echo "This is only supported on amd64 right now."
exit 0
fi
# Build chroot configuration
TARGET="amd64"
TARGET_ARCH="amd64"
SVNROOT="svn://svn.FreeBSD.org/"
SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
NODOC=yes
# Build target configuration
# Since this file is sourced by a script that runs another
# script, these must be exported.
set -a
WORLD_FLAGS="-j $(sysctl -n hw.ncpu)"
KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
CHROOTDIR="/scratch"
EMBEDDEDBUILD=1
EMBEDDEDPORTS="lang/python textproc/gsed"
XDEV="arm"
XDEV_ARCH="armv6"
KERNEL="PANDABOARD"
CROCHETSRC="https://github.com/kientzle/crochet-freebsd"
CROCHETBRANCH="trunk"
set +a

39
release/arm/RPI-B.conf Normal file
View File

@ -0,0 +1,39 @@
#
# $FreeBSD$
#
# This is only supported on amd64 right now. It may work on
# i386, but I do not have the hardware to test, so until I get
# a VM set up to make sure, be cautious and assume it will not.
if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then
echo "This is only supported on amd64 right now."
exit 0
fi
# Build chroot configuration
TARGET="amd64"
TARGET_ARCH="amd64"
SVNROOT="svn://svn.FreeBSD.org/"
SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
NODOC=yes
# Build target configuration
# Since this file is sourced by a script that runs another
# script, these must be exported.
set -a
WORLD_FLAGS="-j $(sysctl -n hw.ncpu)"
KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
CHROOTDIR="/scratch"
EMBEDDEDBUILD=1
EMBEDDEDPORTS="lang/python textproc/gsed"
XDEV="arm"
XDEV_ARCH="armv6"
KERNEL="RPI-B"
CROCHETSRC="https://github.com/kientzle/crochet-freebsd"
CROCHETBRANCH="trunk"
UBOOTSRC="https://github.com/gonzoua/u-boot-pi"
UBOOTBRANCH="trunk"
UBOOTDIR="/tmp/crochet/u-boot-rpi"
set +a

View File

@ -0,0 +1,37 @@
#
# $FreeBSD$
#
# This is only supported on amd64 right now. It may work on
# i386, but I do not have the hardware to test, so until I get
# a VM set up to make sure, be cautious and assume it will not.
if [ "$(uname -p)" != "amd64" ] || [ "$(uname -m)" != "amd64" ]; then
echo "This is only supported on amd64 right now."
exit 0
fi
# Build chroot configuration
TARGET="amd64"
TARGET_ARCH="amd64"
SVNROOT="svn://svn.FreeBSD.org/"
SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
NODOC=yes
# Build target configuration
# Since this file is sourced by a script that runs another
# script, these must be exported.
set -a
WORLD_FLAGS="-j $(sysctl -n hw.ncpu)"
KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))"
CHROOTDIR="/scratch"
EMBEDDEDBUILD=1
EMBEDDEDPORTS="lang/python textproc/gsed"
XDEV="arm"
XDEV_ARCH="armv6"
KERNEL="WANDBOARD-QUAD"
CROCHETSRC="https://github.com/kientzle/crochet-freebsd"
CROCHETBRANCH="trunk"
set +a

133
release/arm/release.sh Executable file
View File

@ -0,0 +1,133 @@
#!/bin/sh
#-
# Copyright (c) 2013, 2014 The FreeBSD Foundation
# All rights reserved.
#
# This software was developed by Glen Barber
# under sponsorship from the FreeBSD Foundation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD$
#
# This script is intended to be called by release/release.sh to build ARM
# images for release. It is not intended to be run directly. This sets up
# the software needed within a build chroot, then runs crochet to provide
# downloadable images for embedded devices.
set -e
before_build() {
WANT_UBOOT=
KNOWNHASH=
UBOOT_VERSION=
case ${KERNEL} in
BEAGLEBONE)
WANT_UBOOT=1
KNOWNHASH="4150e5a4480707c55a8d5b4570262e43af68d8ed3bdc0a433d8e7df47989a69e"
UBOOT_VERSION="u-boot-2013.04"
;;
PANDABOARD)
WANT_UBOOT=1
KNOWNHASH="e08e20a6979bfca6eebb9a2b0e42aa4416af3d796332fd63a3470495a089d496"
UBOOT_VERSION="u-boot-2012.07"
;;
WANDBOARD-QUAD)
WANT_UBOOT=1
KNOWNHASH="0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55"
UBOOT_VERSION="u-boot-2013.10"
;;
*)
# Fallthrough.
;;
esac
if [ ! -z ${WANT_UBOOT} ]; then
chroot ${CHROOTDIR} fetch -o /tmp/crochet/${UBOOT_VERSION}.tar.bz2 \
http://people.freebsd.org/~gjb/${UBOOT_VERSION}.tar.bz2
UBOOT_HASH="$(sha256 -q ${CHROOTDIR}/tmp/crochet/${UBOOT_VERSION}.tar.bz2)"
if [ "${UBOOT_HASH}" != "${KNOWNHASH}" ]; then
echo "Checksum mismatch! Exiting now."
exit 1
fi
chroot ${CHROOTDIR} tar xf /tmp/crochet/${UBOOT_VERSION}.tar.bz2 \
-C /tmp/crochet/
fi
}
install_crochet() {
chroot ${CHROOTDIR} svn co -q ${CROCHETSRC}/${CROCHETBRANCH} \
/tmp/crochet
}
install_uboot() {
# Only fetch u-boot sources if UBOOTSRC is set; otherwise it is
# not needed.
if [ -n "${UBOOTSRC}" ]; then
continue
else
return 0
fi
chroot ${CHROOTDIR} svn co -q ${UBOOTSRC}/${UBOOTBRANCH} \
/${UBOOTDIR}
}
main() {
# Build gcc for use in the chroot for arm builds.
# This is not '-j'-safe, so force '-j1' to allow using
# additional, non-'-j' options specified in WORLD_FLAGS.
eval chroot ${CHROOTDIR} make -C /usr/src/gnu/usr.bin/cc \
WITH_GCC=1 ${WORLD_FLAGS} -j1 obj depend all install
# Build the 'xdev' target for crochet.
eval chroot ${CHROOTDIR} make -C /usr/src \
XDEV=${XDEV} XDEV_ARCH=${XDEV_ARCH} WITH_GCC=1 \
${WORLD_FLAGS} xdev
# Run the ldconfig(8) startup script so /var/run/ld-elf*.so.hints
# is created.
eval chroot ${CHROOTDIR} /etc/rc.d/ldconfig forcerestart
# Install security/ca_root_nss since we need to check the https
# certificate of github.
eval chroot ${CHROOTDIR} make -C /usr/ports/security/ca_root_nss \
OPTIONS_SET="ETCSYMLINK" BATCH=1 FORCE_PKG_REGISTER=1 \
install clean distclean
EMBEDDEDPORTS="${EMBEDDEDPORTS} devel/subversion"
for _PORT in ${EMBEDDEDPORTS}; do
eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \
BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean
done
mkdir -p ${CHROOTDIR}/tmp/crochet/work
before_build
install_crochet
install_uboot
eval chroot ${CHROOTDIR} /bin/sh /tmp/crochet/crochet.sh \
-c /tmp/external/${XDEV}/crochet-${KERNEL}.conf
mkdir -p ${CHROOTDIR}/R/
cp -p ${CHROOTDIR}/usr/obj/*.img ${CHROOTDIR}/R/
bzip2 ${CHROOTDIR}/R/FreeBSD*.img
cd ${CHROOTDIR}/R/ && sha256 FreeBSD*.img.bz2 > CHECKSUM.SHA256
cd ${CHROOTDIR}/R/ && md5 FreeBSD*.img.bz2 > CHECKSUM.MD5
}
main "$@"
exit 0

View File

@ -45,5 +45,17 @@ PORTBRANCH="ports/head@rHEAD"
## Set miscellaneous 'make release' settings.
#NODOC=
#NOPORTS=
#RELSTRING=
#WITH_DVD=
## Set when building embedded images.
#EMBEDDEDBUILD=
## Set to skip the chroot environment buildworld/installworld/distribution
## step if it is expected the build environment will exist via alternate
## means.
#CHROOTBUILD_SKIP=
## Set to pass additional flags to make(1) for the build chroot setup, such
## as TARGET/TARGET_ARCH.
#CHROOT_MAKEENV=

View File

@ -41,6 +41,7 @@ export PATH
# The directory within which the release will be built.
CHROOTDIR="/scratch"
RELENGDIR="$(realpath $(dirname $(basename ${0})))"
# The default version control system command to obtain the sources.
VCSCMD="svn checkout"
@ -52,6 +53,9 @@ SRCBRANCH="base/head@rHEAD"
DOCBRANCH="doc/head@rHEAD"
PORTBRANCH="ports/head@rHEAD"
# Set for embedded device builds.
EMBEDDEDBUILD=
# Sometimes one needs to checkout src with --force svn option.
# If custom kernel configs copied to src tree before checkout, e.g.
SRC_FORCE_CHECKOUT=
@ -108,9 +112,18 @@ SRCBRANCH="${SVNROOT}${SRCBRANCH}"
DOCBRANCH="${SVNROOT}${DOCBRANCH}"
PORTBRANCH="${SVNROOT}${PORTBRANCH}"
if [ -n "${EMBEDDEDBUILD}" ]; then
if [ -z "${XDEV}" ] || [ -z "${XDEV_ARCH}" ]; then
echo "ERROR: XDEV and XDEV_ARCH must be set in ${RELEASECONF}."
exit 1
fi
WITH_DVD=
NODOC=yes
fi
# If PORTS is set and NODOC is unset, force NODOC=yes because the ports tree
# is required to build the documentation set.
if [ "x${NOPORTS}" != "x" ] && [ "x${NODOC}" = "x" ]; then
if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then
echo "*** NOTICE: Setting NODOC=1 since ports tree is required"
echo " and NOPORTS is set."
NODOC=yes
@ -120,10 +133,10 @@ fi
# The release makefile verifies definedness of NOPORTS/NODOC variables
# instead of their values.
DOCPORTS=
if [ "x${NOPORTS}" != "x" ]; then
if [ -n "${NOPORTS}" ]; then
DOCPORTS="NOPORTS=yes "
fi
if [ "x${NODOC}" != "x" ]; then
if [ -n "${NODOC}" ]; then
DOCPORTS="${DOCPORTS}NODOC=yes"
fi
@ -131,12 +144,12 @@ fi
# this file, unless overridden by release.conf. In most cases, these
# will not need to be changed.
CONF_FILES="__MAKE_CONF=${MAKE_CONF} SRCCONF=${SRC_CONF}"
if [ "x${TARGET}" != "x" ] && [ "x${TARGET_ARCH}" != "x" ]; then
if [ -n "${TARGET}" ] && [ -n "${TARGET_ARCH}" ]; then
ARCH_FLAGS="TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH}"
else
ARCH_FLAGS=
fi
CHROOT_MAKEENV="MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
CHROOT_MAKEENV="${CHROOT_MAKEENV} MAKEOBJDIRPREFIX=${CHROOTDIR}/tmp/obj"
CHROOT_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${CONF_FILES}"
CHROOT_IMAKEFLAGS="${CONF_FILES}"
CHROOT_DMAKEFLAGS="${CONF_FILES}"
@ -147,11 +160,11 @@ RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \
# Force src checkout if configured
FORCE_SRC_KEY=
if [ "x${SRC_FORCE_CHECKOUT}" != "x" ]; then
if [ -n "${SRC_FORCE_CHECKOUT}" ]; then
FORCE_SRC_KEY="--force"
fi
if [ ! ${CHROOTDIR} ]; then
if [ -z "${CHROOTDIR}" ]; then
echo "Please set CHROOTDIR."
exit 1
fi
@ -166,19 +179,21 @@ set -e # Everything must succeed
mkdir -p ${CHROOTDIR}/usr
${VCSCMD} ${FORCE_SRC_KEY} ${SRCBRANCH} ${CHROOTDIR}/usr/src
if [ "x${NODOC}" = "x" ]; then
if [ -z "${NODOC}" ]; then
${VCSCMD} ${DOCBRANCH} ${CHROOTDIR}/usr/doc
fi
if [ "x${NOPORTS}" = "x" ]; then
if [ -z "${NOPORTS}" ]; then
${VCSCMD} ${PORTBRANCH} ${CHROOTDIR}/usr/ports
fi
cd ${CHROOTDIR}/usr/src
env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
DESTDIR=${CHROOTDIR}
env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
DESTDIR=${CHROOTDIR}
if [ -z "${CHROOTBUILD_SKIP}" ]; then
cd ${CHROOTDIR}/usr/src
env ${CHROOT_MAKEENV} make ${CHROOT_WMAKEFLAGS} buildworld
env ${CHROOT_MAKEENV} make ${CHROOT_IMAKEFLAGS} installworld \
DESTDIR=${CHROOTDIR}
env ${CHROOT_MAKEENV} make ${CHROOT_DMAKEFLAGS} distribution \
DESTDIR=${CHROOTDIR}
fi
mount -t devfs devfs ${CHROOTDIR}/dev
cp /etc/resolv.conf ${CHROOTDIR}/etc/resolv.conf
trap "umount ${CHROOTDIR}/dev" EXIT # Clean up devfs mount on exit
@ -194,6 +209,29 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
cp ${SRC_CONF} ${CHROOTDIR}/${SRC_CONF}
fi
# Embedded builds do not use the 'make release' target.
if [ -n "${EMBEDDEDBUILD}" ]; then
# If a crochet configuration file exists in *this* checkout of
# release/, copy it to the /tmp/external directory within the chroot.
# This allows building embedded releases without relying on updated
# scripts and/or configurations to exist in the branch being built.
if [ -e ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf ] && \
[ -e ${RELENGDIR}/${XDEV}/release.sh ]; then
mkdir -p ${CHROOTDIR}/tmp/external/${XDEV}/
cp ${RELENGDIR}/tools/${XDEV}/crochet-${KERNEL}.conf \
${CHROOTDIR}/tmp/external/${XDEV}/crochet-${KERNEL}.conf
/bin/sh ${RELENGDIR}/${XDEV}/release.sh
fi
# If the script does not exist for this architecture, exit.
# This probably should be checked earlier, but allowing the rest
# of the build process to get this far will at least set up the
# chroot environment for testing.
exit 0
else
# Not embedded.
continue
fi
if [ -d ${CHROOTDIR}/usr/ports ]; then
# Run ldconfig(8) in the chroot directory so /var/run/ld-elf*.so.hints
# is created. This is needed by ports-mgmt/pkg.
@ -201,7 +239,7 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then
## Trick the ports 'run-autotools-fixup' target to do the right thing.
_OSVERSION=$(sysctl -n kern.osreldate)
if [ -d ${CHROOTDIR}/usr/doc ] && [ "x${NODOC}" = "x" ]; then
if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then
PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes"
PBUILD_FLAGS="${PBUILD_FLAGS}"
chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \
@ -209,13 +247,9 @@ if [ -d ${CHROOTDIR}/usr/ports ]; then
fi
fi
if [ "x${RELSTRING}" = "x" ]; then
RELSTRING="$(chroot ${CHROOTDIR} uname -s)-${OSRELEASE}-${TARGET_ARCH}"
fi
eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_WMAKEFLAGS} buildworld
eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel
eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
release RELSTRING=${RELSTRING}
release
eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \
install DESTDIR=/R RELSTRING=${RELSTRING}
install DESTDIR=/R

View File

@ -0,0 +1,29 @@
#
# $FreeBSD$
#
# This is the configuration file for use with crochet to produce
# FreeBSD BeagleBone images.
board_setup BeagleBone
option ImageSize 1gb
option AutoSize
export MAKEOBJDIRPREFIX=/usr/obj
FREEBSD_SRC=/usr/src
__MAKE_CONF=/dev/null
SRCCONF=/dev/null
WORKDIR=/usr/obj
_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH)
_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION)
KERNCONF=BEAGLEBONE
TARGET=arm
TARGET_ARCH=armv6
FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}"
FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}"
FREEBSD_INSTALLWORLD_EXTRA_ARGS=""
FREEBSD_INSTALLKERNEL_EXTRA_ARGS=""
FREEBSD_WORLD_EXTRA_ARGS=""
FREEBSD_KERNEL_EXTRA_ARGS=""
FREEBSD_EXTRA_ARGS=""
IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img

View File

@ -0,0 +1,29 @@
#
# $FreeBSD$
#
# This is the configuration file for use with crochet to produce
# FreeBSD PandaBoard images.
board_setup PandaBoard
option ImageSize 1gb
option AutoSize
export MAKEOBJDIRPREFIX=/usr/obj
FREEBSD_SRC=/usr/src
__MAKE_CONF=/dev/null
SRCCONF=/dev/null
WORKDIR=/usr/obj
_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH)
_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION)
KERNCONF=PANDABOARD
TARGET=arm
TARGET_ARCH=armv6
FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}"
FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}"
FREEBSD_INSTALLWORLD_EXTRA_ARGS=""
FREEBSD_INSTALLKERNEL_EXTRA_ARGS=""
FREEBSD_WORLD_EXTRA_ARGS=""
FREEBSD_KERNEL_EXTRA_ARGS=""
FREEBSD_EXTRA_ARGS=""
IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img

View File

@ -0,0 +1,29 @@
#
# $FreeBSD$
#
# This is the configuration file for use with crochet to produce
# FreeBSD Raspberry Pi images.
board_setup RaspberryPi
option ImageSize 1gb
option AutoSize
export MAKEOBJDIRPREFIX=/usr/obj
FREEBSD_SRC=/usr/src
__MAKE_CONF=/dev/null
SRCCONF=/dev/null
WORKDIR=/usr/obj
_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH)
_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION)
KERNCONF=RPI-B
TARGET=arm
TARGET_ARCH=armv6
FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}"
FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}"
FREEBSD_INSTALLWORLD_EXTRA_ARGS=""
FREEBSD_INSTALLKERNEL_EXTRA_ARGS=""
FREEBSD_WORLD_EXTRA_ARGS=""
FREEBSD_KERNEL_EXTRA_ARGS=""
FREEBSD_EXTRA_ARGS=""
IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img

View File

@ -0,0 +1,29 @@
#
# $FreeBSD$
#
# This is the configuration file for use with crochet to produce
# FreeBSD WandboardQuad images.
board_setup WandboardQuad
option ImageSize 1gb
option AutoSize
export MAKEOBJDIRPREFIX=/usr/obj
FREEBSD_SRC=/usr/src
__MAKE_CONF=/dev/null
SRCCONF=/dev/null
WORKDIR=/usr/obj
_BRANCH=$(make -C ${FREEBSD_SRC}/release -V BRANCH)
_REVISION=$(make -C ${FREEBSD_SRC}/release -V REVISION)
KERNCONF=WANDBOARD-QUAD
TARGET=arm
TARGET_ARCH=armv6
FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}"
FREEBSD_BUILDKERNEL_EXTRA_ARGS="${KERNEL_FLAGS}"
FREEBSD_INSTALLWORLD_EXTRA_ARGS=""
FREEBSD_INSTALLKERNEL_EXTRA_ARGS=""
FREEBSD_WORLD_EXTRA_ARGS=""
FREEBSD_KERNEL_EXTRA_ARGS=""
FREEBSD_EXTRA_ARGS=""
IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${TARGET}-${TARGET_ARCH}-${KERNCONF}.img

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd February 25, 2014
.Dd March 5, 2014
.Dt RELEASE 7
.Os
.Sh NAME
@ -138,6 +138,11 @@ configuration file supports the following variables:
.Bl -tag -width Ev
.It Va CHROOTDIR
The directory within which the release will be built.
.It Va CHROOT_MAKEENV
Additional
.Xr make 1
arguments to pass through, which directly affect the
tuning of the build chroot.
.It Va SVNROOT
The
.Xr svn 1
@ -249,6 +254,72 @@ target.
The command run to obtain the source trees.
Defaults to
.Qq Cm svn checkout .
.It Va CHROOTBUILD_SKIP
If defined, the
.Li buildworld ,
.Li installworld ,
and
.Li distribution
stages of the
.Xr chroot 8
build environment setup are skipped.
This is intended solely for cases where the
.Xr chroot 8
userland are provided by alternate means.
.El
.Sh EMBEDDED BUILDS
The following
.Fa release.conf
variables are relevant only to release builds for embedded systems:
.Bl -tag -width Ev
.It Va EMBEDDEDBUILD
Set to a non-null value to enable functionality for embedded device
release builds.
.Pq This option is considered highly experimental.
.Pp
When set,
.Va WITH_DVD
is unset, and
.Va NODOC
is defined.
Additionally,
.Va XDEV
and
.Va XDEV_ARCH
must also be defined.
When the build environment is created,
.Fa release.sh
runs a separate build script located in an architecture-specific
directory in
.Pa src/release/${XDEV}/ .
.It Va EMBEDDEDPORTS
Set to the list of any ports that are required for the target device
in the format of
.Fa category/port .
The
.Fa devel/subversion
port is built by default.
.It Va CROCHETSRC
Set to the source URL for the Crochet build tool.
.It Va CROCHETBRANCH
Set to the subversion branch from
.Va ${CROCHETSRC}
to use.
Defaults to
.Pa trunk .
.It Va UBOOTSRC
Set to the source URL of u-boot, if required.
.It Va UBOOTBRANCH
Set to the subversion branch from
.Va ${UBOOTSRC}
to use.
Defaults to
.Pa trunk .
.It Va UBOOTDIR
Set to the target directory within
.Va ${CHROOTDIR}
to check out
.Va ${UBOOTSRC}/${UBOOTBRANCH} .
.El
.Sh MAKEFILE TARGETS
The release makefile