summaryrefslogtreecommitdiffstats
path: root/release/arm
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2014-02-21 03:35:43 +0000
committergjb <gjb@FreeBSD.org>2014-02-21 03:35:43 +0000
commiteb1a5f8de9f7ea602c373a710f531abbf81141c4 (patch)
tree9043e8f02818053af950ea20e3c120d28634fd63 /release/arm
parent59f5cc5e8c828a54b44c5f3f853cb850a05d48c0 (diff)
downloadFreeBSD-src-eb1a5f8de9f7ea602c373a710f531abbf81141c4.zip
FreeBSD-src-eb1a5f8de9f7ea602c373a710f531abbf81141c4.tar.gz
Move ^/user/gjb/hacking/release-embedded up one directory, and remove
^/user/gjb/hacking since this is likely to be merged to head/ soon. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release/arm')
-rw-r--r--release/arm/BEAGLEBONE.conf37
-rw-r--r--release/arm/PANDABOARD.conf37
-rw-r--r--release/arm/RPI-B.conf39
-rwxr-xr-xrelease/arm/release.sh101
4 files changed, 214 insertions, 0 deletions
diff --git a/release/arm/BEAGLEBONE.conf b/release/arm/BEAGLEBONE.conf
new file mode 100644
index 0000000..6d9927c
--- /dev/null
+++ b/release/arm/BEAGLEBONE.conf
@@ -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 $(expr \( $(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
+
diff --git a/release/arm/PANDABOARD.conf b/release/arm/PANDABOARD.conf
new file mode 100644
index 0000000..1e2b7a3
--- /dev/null
+++ b/release/arm/PANDABOARD.conf
@@ -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 $(expr \( $(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
+
diff --git a/release/arm/RPI-B.conf b/release/arm/RPI-B.conf
new file mode 100644
index 0000000..417af4e
--- /dev/null
+++ b/release/arm/RPI-B.conf
@@ -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 $(expr \( $(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
diff --git a/release/arm/release.sh b/release/arm/release.sh
new file mode 100755
index 0000000..6a2e7e7
--- /dev/null
+++ b/release/arm/release.sh
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# $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() {
+ case ${KERNEL} in
+ BEAGLEBONE)
+ KNOWNHASH="4150e5a4480707c55a8d5b4570262e43af68d8ed3bdc0a433d8e7df47989a69e"
+ chroot ${CHROOTDIR} fetch -o /tmp/crochet/u-boot-2013.04.tar.bz2 \
+ http://people.freebsd.org/~gjb/u-boot-2013.04.tar.bz2
+ UBOOT_HASH="$(sha256 -q ${CHROOTDIR}/tmp/crochet/u-boot-2013.04.tar.bz2)"
+ if [ "${UBOOT_HASH}" != "${KNOWNHASH}" ]; then
+ echo "Checksum mismatch! Exiting now."
+ exit 1
+ fi
+ chroot ${CHROOTDIR} tar xf /tmp/crochet/u-boot-2013.04.tar.bz2 \
+ -C /tmp/crochet/
+ ;;
+ PANDABOARD)
+ KNOWNHASH="e08e20a6979bfca6eebb9a2b0e42aa4416af3d796332fd63a3470495a089d496"
+ chroot ${CHROOTDIR} fetch -o /tmp/crochet/u-boot-2012.07.tar.bz2 \
+ http://people.freebsd.org/~gjb/u-boot-2012.07.tar.bz2
+ UBOOT_HASH="$(sha256 -q ${CHROOTDIR}/tmp/crochet/u-boot-2012.07.tar.bz2)"
+ if [ "${UBOOT_HASH}" != "${KNOWNHASH}" ]; then
+ echo "Checksum mismatch! Exiting now."
+ exit 1
+ fi
+ chroot ${CHROOTDIR} tar xf /tmp/crochet/u-boot-2012.07.tar.bz2 \
+ -C /tmp/crochet/
+ ;;
+ *)
+ # Fallthrough.
+ ;;
+ esac
+}
+
+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 [ "X${UBOOTSRC}" != "X" ]; 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
OpenPOWER on IntegriCloud