devices/e1000e/update.sh
author Florian Pose <fp@igh-essen.com>
Fri, 20 Feb 2015 16:06:23 +0100
changeset 2600 1a969896d52e
parent 2589 2b9c78543663
permissions -rwxr-xr-x
Added --enable-loop-control to make use of the loop control registers.
#!/bin/bash

set -x

KERNELDIR=/data/kernel/linux-3.16.6
PREVER=3.14
KERNELVER=3.16

for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; do
    echo $f
    b=$(basename $f)
    o=${b/\./-$KERNELVER-orig.}
    e=${b/\./-$KERNELVER-ethercat.}
    cp -v $f $o
    chmod 644 $o
    cp -v $o $e
    op=${b/\./-$PREVER-orig.}
    ep=${b/\./-$PREVER-ethercat.}
    diff -u $op $ep | patch -p1 $e
    sed -i s/$PREVER-ethercat.h/$KERNELVER-ethercat.h/ $e
    hg add $o $e
done