devices/update.sh
author Florian Pose <fp@igh-essen.com>
Mon, 27 Oct 2014 14:33:03 +0100
branchstable-1.5
changeset 2579 273d15e0f301
parent 2548 3339dcc91b88
child 2584 0e3d989ff233
permissions -rwxr-xr-x
Merged CCAT 0.10 changes.
2547
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     1
#!/bin/bash
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     2
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     3
set -x
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     4
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     5
KERNELDIR=/data/kernel/linux-3.6.11
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     6
PREVER=3.4
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     7
KERNELVER=3.6
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
     8
2548
3339dcc91b88 Added e100 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents: 2547
diff changeset
     9
for f in $KERNELDIR/drivers/net/ethernet/{realtek/8139too,realtek/r8169,intel/e100}.c; do
2547
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    10
    echo $f
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    11
    b=$(basename $f)
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    12
    o=${b/\./-$KERNELVER-orig.}
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    13
    e=${b/\./-$KERNELVER-ethercat.}
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    14
    cp -v $f $o
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    15
    chmod 644 $o
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    16
    cp -v $o $e
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    17
    op=${b/\./-$PREVER-orig.}
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    18
    ep=${b/\./-$PREVER-ethercat.}
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    19
    diff -u $op $ep | patch -p1 $e
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    20
done