Added update script to r8169

This commit is contained in:
Florian Pose 2025-06-26 12:52:06 +02:00
parent 85871277a4
commit 66e624d89f
1 changed files with 28 additions and 0 deletions

28
devices/r8169/update.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Need 3 arguments: 1) kernel source dir, 2) previous version, 3) version to add"
exit 1
fi
KERNELDIR=$1
PREVER=$2
KERNELVER=$3
set -x
for f in $KERNELDIR/drivers/net/ethernet/realtek/r8169*; do
echo Driver $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
git add $o $e
done
echo "Remember to update Makefile.am!"