devices/update.sh
author Florian Pose <fp@igh-essen.com>
Tue, 18 Oct 2016 10:20:47 +0200
changeset 2660 161c675135f0
parent 2589 2b9c78543663
permissions -rwxr-xr-x
Support changed sock_create_kern() interface from Linux 4.2.
#!/bin/bash

set -x

KERNELDIR=/data/kernel/linux-3.16.6
PREVER=3.14
KERNELVER=3.16

for f in $KERNELDIR/drivers/net/ethernet/{realtek/8139too,realtek/r8169,intel/e100}.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
    hg add $o $e
done