devices/e1000e/update.sh
author Gavin Lambert <gavinl@compacsort.com>
Sat, 31 May 2014 15:37:33 +1200
changeset 2617 559f2f9c5b08
parent 2589 2b9c78543663
permissions -rwxr-xr-x
Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.
2589
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#!/bin/bash
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
set -x
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
KERNELDIR=/data/kernel/linux-3.16.6
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
PREVER=3.14
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
KERNELVER=3.16
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     9
for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; do
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
    echo $f
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
    b=$(basename $f)
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
    o=${b/\./-$KERNELVER-orig.}
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
    e=${b/\./-$KERNELVER-ethercat.}
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
    cp -v $f $o
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
    chmod 644 $o
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
    cp -v $o $e
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
    op=${b/\./-$PREVER-orig.}
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
    ep=${b/\./-$PREVER-ethercat.}
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
    diff -u $op $ep | patch -p1 $e
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
    sed -i s/$PREVER-ethercat.h/$KERNELVER-ethercat.h/ $e
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
    hg add $o $e
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    22
done