devices/update.sh
author Florian Pose <fp@igh-essen.com>
Wed, 05 Nov 2014 15:06:54 +0100
changeset 2590 0e207abed88a
parent 2589 2b9c78543663
permissions -rwxr-xr-x
Made some throw methods static.
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/{realtek/8139too,realtek/r8169,intel/e100}.c; 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
    hg add $o $e
2b9c78543663 Reverted default branch to stable-1.5.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
done