devices/update.sh
author Edouard Tisserant <edouard.tisserant@gmail.com>
Thu, 27 Sep 2018 00:21:27 +0200
branchstable-1.5
changeset 2712 5d21d80777a6
parent 2588 792892ab4806
permissions -rwxr-xr-x
Use new RTDM's mmap, not anymore a special case compared to normal linux mmap.
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
2588
792892ab4806 Added all drivers for kernel 3.16.
Florian Pose <fp@igh-essen.com>
parents: 2587
diff changeset
     5
KERNELDIR=/data/kernel/linux-3.16.6
792892ab4806 Added all drivers for kernel 3.16.
Florian Pose <fp@igh-essen.com>
parents: 2587
diff changeset
     6
PREVER=3.14
792892ab4806 Added all drivers for kernel 3.16.
Florian Pose <fp@igh-essen.com>
parents: 2587
diff changeset
     7
KERNELVER=3.16
2547
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
2585
26480934a057 Added all drivers for kernel 3.10.
Florian Pose <fp@igh-essen.com>
parents: 2584
diff changeset
    20
    hg add $o $e
2547
5b349a0b1e2b Added r8169 driver for kernel 3.6.
Florian Pose <fp@igh-essen.com>
parents:
diff changeset
    21
done