devices/e1000e/update.sh
branchstable-1.5
changeset 2584 0e3d989ff233
parent 2546 2fa43746d972
child 2585 26480934a057
equal deleted inserted replaced
2583:fe5687a0a322 2584:0e3d989ff233
     1 #!/bin/bash
     1 #!/bin/bash
     2 
     2 
     3 set -x
     3 set -x
     4 
     4 
     5 KERNELDIR=/data/kernel/linux-3.6.11
     5 KERNELDIR=/data/kernel/linux-3.8.13
     6 PREVER=3.4
     6 PREVER=3.6
     7 KERNELVER=3.6
     7 KERNELVER=3.8
     8 
     8 
     9 for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; do
     9 for f in $KERNELDIR/drivers/net/ethernet/intel/e1000e/*.[ch]; do
    10     echo $f
    10     echo $f
    11     b=$(basename $f)
    11     b=$(basename $f)
    12     o=${b/\./-$KERNELVER-orig.}
    12     o=${b/\./-$KERNELVER-orig.}
    15     chmod 644 $o
    15     chmod 644 $o
    16     cp -v $o $e
    16     cp -v $o $e
    17     op=${b/\./-$PREVER-orig.}
    17     op=${b/\./-$PREVER-orig.}
    18     ep=${b/\./-$PREVER-ethercat.}
    18     ep=${b/\./-$PREVER-ethercat.}
    19     diff -u $op $ep | patch -p1 $e
    19     diff -u $op $ep | patch -p1 $e
       
    20     sed -i s/$PREVER-ethercat.h/$KERNELVER-ethercat.h/ $e
       
    21     hg add $o $e
    20 done
    22 done