Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0e0020d1c5
Fetching contributors…

Cannot retrieve contributors at this time

executable file 80 lines (64 sloc) 1.76 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
#!/bin/sh

TESTDIR=`pwd`
PATCHDIR="$TESTDIR/staging"
BUILDDIR="$TESTDIR/linux-staging"
LOG="$TESTDIR/log-stage"
GIT_LOCAL="greg@aria:git/staging.git"
GIT_REMOTE="git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git"

HOSTNAME=`hostname`

ONE_SHOT=$1

echo "PATCHDIR=$PATCHDIR"
echo "BUILDDIR=$BUILDDIR"

echo "cleaning up from any previous runs"
rm -rf $BUILDDIR
rm $LOG $LOG.run1 $LOG.run2

# If we are a machine on the local network, don't download the kernel.org
# version of the patch repo
if [ $HOSTNAME = "kvm" ]; then
PATCH_REPO=$GIT_LOCAL
elif [ $HOSTNAME = "mini" ]; then
PATCH_REPO=$GIT_LOCAL
else
PATCH_REPO=$GIT_REMOTE
fi

if [ -d $PATCHDIR ]; then
# just pull, don't clone a whole new tree
cd $PATCHDIR
git pull
cd ..
else
# check out latest version of patches
git clone $PATCH_REPO $PATCHDIR
fi

VERSION=`cat $PATCHDIR/version`

echo "working with kernel version $VERSION"

# get latest version of kernel based on patch level
mkdir $BUILDDIR
cd $BUILDDIR
ketchup $VERSION

FAILED=0
J=$(expr $(grep processor /proc/cpuinfo | wc -l) \* 4)

if [ "X$ONE_SHOTX" == "XX" ] ; then
# do a build first to set a baseline
make allmodconfig
nice -20 make -j$J 2> $LOG.run1 || FAILED=1
if [ "$FAILED" != "0" ]; then
echo "initial build FAILED!"
echo "see $LOG.run1 for what happened"
exit $FAILED
fi

# now clean up and do a second build with our patches
make distclean
fi

# apply all patches
QUILT_PATCHES=$PATCHDIR QUILT_SERIES=$PATCHDIR/series quilt push -aq --quiltrc

# build for allmodconfig
make allmodconfig
#make -j4 &> $LOG
nice -20 make -j$J 2> $LOG.run2 || FAILED=1
if [ "$FAILED" != "0" ]; then
echo "initial build FAILED!"
echo "see $LOG.run2 for what happened"
exit $FAILED
fi

diff -u $LOG.run1 $LOG.run2
Something went wrong with that request. Please try again.