devices/e1000e/update.sh
author Edouard Tisserant <edouard.tisserant@gmail.com>
Fri, 05 Oct 2018 01:26:51 +0200
branchstable-1.5
changeset 2719 94c9657e0bee
parent 2588 792892ab4806
permissions -rwxr-xr-x
Xenomai 2 to 3 migration says "RTDM drivers implementing differentiated ioctl() support for both domains should serve all real-time only requests from ioctl_rt(), returning -ENOSYS for any unrecognized request, which will cause the adaptive switch to take place automatically to the ioctl_nrt() handler. The ioctl_nrt() should then implement all requests which may be valid from the regular Linux domain exclusively."
#!/bin/bash

set -x

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

for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; 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
    sed -i s/$PREVER-ethercat.h/$KERNELVER-ethercat.h/ $e
    hg add $o $e
done