From owner-svn-src-all@FreeBSD.ORG Tue May 5 16:28:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D657ABF; Tue, 5 May 2015 16:28:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7041901; Tue, 5 May 2015 16:28:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t45GS5j4073054; Tue, 5 May 2015 16:28:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t45GS5h9073051; Tue, 5 May 2015 16:28:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201505051628.t45GS5h9073051@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 5 May 2015 16:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282500 - in head/release: . arm tools/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 May 2015 16:28:06 -0000 Author: gjb Date: Tue May 5 16:28:04 2015 New Revision: 282500 URL: https://svnweb.freebsd.org/changeset/base/282500 Log: Add initial support for building RPI2 images. In release.sh, allow overriding buildenv_setup() before the handoff to arm/release.sh. Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and the correct KERNEL, and add the buildenv_setup() override to install the sysutils/u-boot-rpi2 port/package. Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf, and set the correct entries for the RaspberryPi2 board. Thanks to: loos@ Sponsored by: The FreeBSD Foundation Added: head/release/arm/RPI2.conf - copied, changed from r282497, head/release/arm/RPI-B.conf head/release/tools/arm/crochet-RPI2.conf - copied, changed from r282497, head/release/tools/arm/crochet-RPI-B.conf Modified: head/release/release.sh Copied and modified: head/release/arm/RPI2.conf (from r282497, head/release/arm/RPI-B.conf) ============================================================================== --- head/release/arm/RPI-B.conf Tue May 5 15:16:38 2015 (r282497, copy source) +++ head/release/arm/RPI2.conf Tue May 5 16:28:04 2015 (r282500) @@ -13,7 +13,7 @@ export WORLD_FLAGS="-j $(sysctl -n hw.nc export KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" export CHROOTDIR="/scratch" export EMBEDDEDBUILD=1 -export EMBEDDEDPORTS="lang/python textproc/gsed" +export UBOOT_PORT="sysutils/u-boot-rpi2" # Build chroot configuration load_chroot_env() { @@ -31,10 +31,23 @@ load_target_env() { export XDEV_ARCH="armv6" export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" - export KERNEL="RPI-B" + export KERNEL="RPI2" export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@rHEAD" - export UBOOTSRC="https://github.com/gonzoua/u-boot-pi" - export UBOOTBRANCH="trunk" - export UBOOTDIR="/tmp/crochet/u-boot-rpi" } + +# Build environment setup +buildenv_setup() { + if [ ! -d ${CHROOTDIR}/usr/ports/${UBOOT_PORT} ]; then + chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg bootstrap -y + chroot ${CHROOTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg install -y ${UBOOT_PORT} + else + chroot ${CHROOTDIR} env BATCH=1 \ + make -C /usr/ports/${UBOOT_PORT} \ + all install clean + fi + return 0 +} + Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Tue May 5 16:09:25 2015 (r282499) +++ head/release/release.sh Tue May 5 16:28:04 2015 (r282500) @@ -238,6 +238,7 @@ fi # Embedded builds do not use the 'make release' target. if [ -n "${EMBEDDEDBUILD}" ]; then + buildenv_setup # 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 Copied and modified: head/release/tools/arm/crochet-RPI2.conf (from r282497, head/release/tools/arm/crochet-RPI-B.conf) ============================================================================== --- head/release/tools/arm/crochet-RPI-B.conf Tue May 5 15:16:38 2015 (r282497, copy source) +++ head/release/tools/arm/crochet-RPI2.conf Tue May 5 16:28:04 2015 (r282500) @@ -3,9 +3,9 @@ # # This is the configuration file for use with crochet to produce -# FreeBSD Raspberry Pi images. +# FreeBSD Raspberry Pi 2 images. -board_setup RaspberryPi +board_setup RaspberryPi2 option ImageSize 1gb option Growfs @@ -16,7 +16,7 @@ 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 +KERNCONF=RPI2 TARGET=arm TARGET_ARCH=armv6 FREEBSD_BUILDWORLD_EXTRA_ARGS="${WORLD_FLAGS}"