path: root/release/release.sh
diff options
authorGlen Barber <gjb@FreeBSD.org>2013-12-28 02:27:06 +0000
committerGlen Barber <gjb@FreeBSD.org>2013-12-28 02:27:06 +0000
commit34d63eb56086384594a6c97e5128f9602e0fdaaf (patch)
treee9da829aef87f1df89415d982271614089f85488 /release/release.sh
parentdf5e2cbe16c763a318e99e672fe06da882df445b (diff)
Implement cross build support for embedded devices into
release.sh: - Modify release/release.sh to recognize an 'EMBEDDEDBUILD' variable. When set, release/release.sh will build the chroot userland as is done for big-iron builds. - Instead of running the 'buildworld', 'buildkernel', and 'release' targets in the chroot, a separate script is run. The script tools/release/${XDEV}/release.sh sets up the rest of the chroot workspace, such as installing ports that will be needed, and building the 'xdev' target. - crochet (by kientzle@) is checked out from the upstream repository (and if needed, u-boot, in the case of Raspberry Pi). - tools/release/${XDEV}/release.sh then runs crochet with a configuration file specific to the ${KERNCONF} being built. Note that this is effectively a first-pass attempt to integrate this into the release process. Tested against: head@r259961 Sponsored by: The FreeBSD Foundation
Notes: svn path=/user/gjb/hacking/release-embedded/; revision=259994
Diffstat (limited to 'release/release.sh')
1 files changed, 23 insertions, 0 deletions
diff --git a/release/release.sh b/release/release.sh
index 79419c4feb5e..cbeb9825c771 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -45,6 +45,9 @@ SRCBRANCH="base/head@rHEAD"
+# Set for embedded device builds.
# Sometimes one needs to checkout src with --force svn option.
# If custom kernel configs copied to src tree before checkout, e.g.
@@ -98,6 +101,11 @@ while getopts c: opt; do
shift $(($OPTIND - 1))
+if [ "x${EMBEDDEDBUILD}" != "x" ]; then
+ NODOC=yes
# 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
@@ -184,6 +192,21 @@ if [ -e ${SRC_CONF} ] && [ ! -c ${SRC_CONF} ]; then
+# Embedded builds do not use the 'make release' target.
+if [ "X${EMBEDDEDBUILD}" != "X" ]; then
+ if [ -e ${CHROOTDIR}/usr/src/release/${XDEV}/release.sh ]; then
+ /bin/sh ${CHROOTDIR}/usr/src/release/${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
+ # Not embedded.
+ continue
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.