[LinuxBIOS] r6 - buildrom-devel/buildrom/bin
Stefan Reinauer
stepan at coresystems.de
Tue May 8 20:56:19 CEST 2007
Please don't do stuff like this, you are messing up the
file history.
Read http://svnbook.red-bean.com/en/1.0/re23.html
$ svn propset svn:executable ON bin/*
* svn at openbios.org <svn at openbios.org> [070508 20:25]:
> Author: rminnich
> Date: 2007-05-08 20:25:34 +0200 (Tue, 08 May 2007)
> New Revision: 6
>
> Added:
> buildrom-devel/buildrom/bin/checkrom.sh
> buildrom-devel/buildrom/bin/doquilt.sh
> buildrom-devel/buildrom/bin/fetchgit.sh
> buildrom-devel/buildrom/bin/fetchsvn.sh
> buildrom-devel/buildrom/bin/getsig.sh
> buildrom-devel/buildrom/bin/setsig.sh
> buildrom-devel/buildrom/bin/verify-rom.sh
> Log:
> Adding the +x bit.
>
> Signed-off-by: Ronald G. Minnich <rminnich at gmail.com>
> Ackd-by: Ronald G. Minnnich <rminnich at gmail.com>
>
>
>
> Added: buildrom-devel/buildrom/bin/checkrom.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/checkrom.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/checkrom.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +size=`du -b $1 | cut -f1`
> +delta=`expr 884736 - $size`
> +echo "Bytes left in ROM: $delta"
> +
> +if [ $delta -lt 0 ]; then
> + echo "ERROR! ERROR! ERROR!"
> + echo "The ELF image $1 is too big!"
> + exit -1
> +fi
> +
> +exit 0
>
>
> Property changes on: buildrom-devel/buildrom/bin/checkrom.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/doquilt.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/doquilt.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/doquilt.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,32 @@
> +#!/bin/bash
> +# This script sets up the quilt directory and patches the package
> +
> +DIR=$1; shift
> +
> +# if the .pc directory already exists, then we will boldy assume
> +# that quilt has been previously applied. Aggressively restore the tree
> +# to pristine
> +
> +if [ -d $DIR/.pc ]; then
> + pushd $DIR > /dev/null
> + quilt pop -qaf > /dev/null 2>&1
> + popd > /dev/null
> +fi
> +
> +mkdir -p $DIR/patches
> +echo "# $DIR quilt series" > $DIR/patches/series
> +
> +# If there are no patches to apply, fail cleanly
> +
> +if [ $# -eq 0 ]; then
> + exit 0
> +fi
> +
> +while [ $# -gt 0 ]; do
> + echo `basename $1` >> $DIR/patches/series
> + cp $1 $DIR/patches
> + shift
> +done
> +
> +cd $DIR
> +quilt push -qa
>
>
> Property changes on: buildrom-devel/buildrom/bin/doquilt.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/fetchgit.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/fetchgit.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/fetchgit.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,30 @@
> +#!/bin/sh
> +# Check out or update a GIT repository
> +
> +URL=$1
> +DIR=$2
> +TAG=$3
> +TARBALL=$4
> +
> +# If the base git directory doesn't exist, then we need to clone it
> +
> +if [ ! -d $DIR/git ]; then
> + echo "Cloning $URL..."
> + git-clone --bare $URL $DIR/git
> + if [ $? -ne 0 ]; then
> + echo "Couldn't clone $URL."
> + exit 1
> + fi
> +fi
> +
> +# Fetch the latest and greatest bits
> +
> +export GIT_DIR=$DIR/git
> +
> +git-fetch $URL
> +git-fetch --tags $URL
> +git-prune-packed
> +git-pack-redundant --all | xargs -r rm
> +
> +# Make the tarball
> +git-tar-tree $TAG git | gzip > $TARBALL
>
>
> Property changes on: buildrom-devel/buildrom/bin/fetchgit.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/fetchsvn.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/fetchsvn.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/fetchsvn.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +# Check out or update a SVN repository
> +
> +URL=$1
> +DIR=$2
> +REV=$3
> +TARBALL=$4
> +
> +# Simple case - the repository doesn't exist
> +
> +if [ ! -d $DIR/svn/.svn ]; then
> + echo "Fetching $URL..."
> + svn co -r $REV $URL $DIR/svn
> + if [ $? -ne 0 ]; then
> + echo "Couldn't fetch the code from $URL"
> + exit 1
> + fi
> +else
> + CURREV=`svn info $DIR/svn | grep "Last Changed Rev" | awk '{ print $4 }'`
> +
> + if [ $CURREV -ne $REV ]; then
> + (cd $DIR/svn; \
> + echo "Updating from $CURREV to $REV"
> + svn update -r $REV || {
> + echo "Couldn't update the repository."
> + exit 1
> + })
> + fi
> +fi
> +
> +tar -C $DIR -zcf $TARBALL svn
>
>
> Property changes on: buildrom-devel/buildrom/bin/fetchsvn.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/getsig.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/getsig.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/getsig.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,18 @@
> +#!/bin/sh
> +
> +# These should be fairly static - we can make them dynamic if we have to
> +
> +START="FFFC0"
> +LEN="16"
> +
> +STR_BEGIN=`dc -e "16 i FFFC0 p"`
> +STR_END=`expr $(STR_BEGIN) + $(LEN)`
> +
> +IN=$1
> +
> +if [ -z "$IN" -o -z "$SIG" ]; then
> + echo "usage: ./getsig.sh <rom>"
> + exit 1
> +fi
> +
> +dd if=$IN bs=1 skip=$STR_BEGIN count=$LEN 2>/dev/null
>
>
> Property changes on: buildrom-devel/buildrom/bin/getsig.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/setsig.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/setsig.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/setsig.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,26 @@
> +#!/bin/sh
> +
> +# These should be fairly static - we can make them dynamic if we have to
> +
> +START="FFFC0"
> +LEN="16"
> +
> +STR_BEGIN=`dc -e "16 i FFFC0 p"`
> +STR_END=`expr $STR_BEGIN + $LEN`
> +
> +IN=$1
> +SIG=$2
> +OUT=$3
> +
> +if [ -z "$IN" -o -z "$SIG" ]; then
> + echo "usage: ./setsig.sh <input> <sig> <output>"
> + exit 1
> +fi
> +
> +if [ -z "$OUT" ]; then
> + OUTPUT=/dev/stdout
> +fi
> +
> +dd if=$IN bs=$STR_BEGIN count=1 > $OUT 2>/dev/null
> +echo -n "$SIG" >> $OUT
> +dd if=$IN bs=$STR_END skip=1 >> $OUT 2>/dev/null
>
>
> Property changes on: buildrom-devel/buildrom/bin/setsig.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
> Added: buildrom-devel/buildrom/bin/verify-rom.sh
> ===================================================================
> --- buildrom-devel/buildrom/bin/verify-rom.sh (rev 0)
> +++ buildrom-devel/buildrom/bin/verify-rom.sh 2007-05-08 18:25:34 UTC (rev 6)
> @@ -0,0 +1,13 @@
> +#!/bin/sh
> +
> +ROM=$1
> +if [ -z "$ROM" ]; then
> + echo "usage: ./verify-rom.sh <rom>"
> + exit 1
> +fi
> +
> +echo -n "EC: "
> +dd if=$ROM bs=1 count=64k 2> /dev/null | md5sum | awk '{print $1}'
> +
> +echo -n "VSA: "
> +dd if=$ROM bs=1 skip=64k count=64k 2> /dev/null | md5sum | awk '{print $1}'
>
>
> Property changes on: buildrom-devel/buildrom/bin/verify-rom.sh
> ___________________________________________________________________
> Name: svn:executable
> + *
>
>
> --
> linuxbios mailing list
> linuxbios at linuxbios.org
> http://www.linuxbios.org/mailman/listinfo/linuxbios
>
--
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.de • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866
More information about the coreboot
mailing list