From owner-svn-src-user@FreeBSD.ORG Fri Feb 21 21:53:24 2014 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EC9D7A4; Fri, 21 Feb 2014 21:53:24 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 11F3E1182; Fri, 21 Feb 2014 21:53:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1LLrNtj080141; Fri, 21 Feb 2014 21:53:23 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1LLrNNU080140; Fri, 21 Feb 2014 21:53:23 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201402212153.s1LLrNNU080140@svn.freebsd.org> From: Glen Barber Date: Fri, 21 Feb 2014 21:53:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r262307 - user/gjb/release-embedded/release/arm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 21:53:24 -0000 Author: gjb Date: Fri Feb 21 21:53:23 2014 New Revision: 262307 URL: http://svnweb.freebsd.org/changeset/base/262307 Log: Consolidate a few cases of redundant code: - In before_build(), only set WANT_UBOOT, UBOOT_VERSION, and KNOWNHASH values. - Fetch/extract u-boot sources if WANT_UBOOT is set. Add UBOOT_VERSION and KNOWNHASH for WANDBOARD-QUAD. Sponsored by: The FreeBSD Foundation Modified: user/gjb/release-embedded/release/arm/release.sh Modified: user/gjb/release-embedded/release/arm/release.sh ============================================================================== --- user/gjb/release-embedded/release/arm/release.sh Fri Feb 21 21:51:19 2014 (r262306) +++ user/gjb/release-embedded/release/arm/release.sh Fri Feb 21 21:53:23 2014 (r262307) @@ -11,35 +11,40 @@ set -e before_build() { + WANT_UBOOT= + KNOWNHASH= + UBOOT_VERSION= case ${KERNEL} in BEAGLEBONE) + WANT_UBOOT=1 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/ + UBOOT_VERSION="u-boot-2013.04" ;; PANDABOARD) + WANT_UBOOT=1 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/ + 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() {