devices/update.sh
author Florian Pose <fp@igh-essen.com>
Mon, 27 Oct 2014 13:38:51 +0100
branchstable-1.5
changeset 2547 5b349a0b1e2b
child 2548 3339dcc91b88
permissions -rwxr-xr-x
Added r8169 driver for kernel 3.6.
#!/bin/bash

set -x

KERNELDIR=/data/kernel/linux-3.6.11
PREVER=3.4
KERNELVER=3.6

for f in $KERNELDIR/drivers/net/ethernet/realtek/{8139too,r8169}.c; 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
done