From f2d505cd530c6eac5224ae047f6e2a4bfe9a0a81 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Tue, 28 Jan 2014 03:09:57 +0000 Subject: [PATCH] Add initial support for the PANDABOARD. Sponsored by: The FreeBSD Foundation --- release/arm/PANDABOARD.conf | 35 +++++++++++++++++++++++ release/arm/release.sh | 12 ++++++++ release/tools/arm/crochet-PANDABOARD.conf | 29 +++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 release/arm/PANDABOARD.conf create mode 100644 release/tools/arm/crochet-PANDABOARD.conf diff --git a/release/arm/PANDABOARD.conf b/release/arm/PANDABOARD.conf new file mode 100644 index 000000000000..1ddd68a99a70 --- /dev/null +++ b/release/arm/PANDABOARD.conf @@ -0,0 +1,35 @@ +# +# $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 +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/release.sh b/release/arm/release.sh index 3bac581a245b..9fcbb14303b9 100755 --- a/release/arm/release.sh +++ b/release/arm/release.sh @@ -24,6 +24,18 @@ before_build() { 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. ;; diff --git a/release/tools/arm/crochet-PANDABOARD.conf b/release/tools/arm/crochet-PANDABOARD.conf new file mode 100644 index 000000000000..faa1c8355753 --- /dev/null +++ b/release/tools/arm/crochet-PANDABOARD.conf @@ -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="" +FREEBSD_INSTALLWORLD_EXTRA_ARGS="" +FREEBSD_BUILDKERNEL_EXTRA_ARGS="" +FREEBSD_INSTALLKERNEL_EXTRA_ARGS="" +FREEBSD_WORLD_EXTRA_ARGS="" +FREEBSD_KERNEL_EXTRA_ARGS="" +FREEBSD_EXTRA_ARGS="" +IMG=${WORKDIR}/FreeBSD-${_REVISION}-${_BRANCH}-${KERNCONF}.img