Skip to content

Commit

Permalink
v6.32
Browse files Browse the repository at this point in the history
+ DietPi-PREP | Apply USBridgeSig Ethernet drive patch, provided by Allo, to v8+ kernel as well, where it is available now
  • Loading branch information
MichaIng authored Jul 21, 2020
1 parent 7e40f89 commit 75a93a0
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions dietpi/patch_file
Original file line number Diff line number Diff line change
Expand Up @@ -2077,37 +2077,6 @@ _EOF_
# Unhold ARMbian packages (set on hold via DietPi-PREP until v6.27)
[[ -f '/etc/armbian-release' ]] && apt-mark unhold $(dpkg-query -Wf '${package }' linux-{dtb,u,image,$G_DISTRO_NAME}-* sunxi-tools 2> /dev/null)
#-------------------------------------------------------------------------------
# RPi: Update USBridgeSig Ethernet driver via postinst kernel script, until it has been merged into official RPi kernel: https://github.com/allocom/USBridgeSig/tree/master/ethernet
if (( $G_HW_MODEL < 10 )); then

cat << _EOF_ > /etc/kernel/postinst.d/dietpi-USBridgeSig
#!/bin/bash
# Only apply to ARMv7+ kernel
[[ \$1 == *'-v7+' ]] || exit 0
echo "[ INFO ] Updating asix ax88179 driver for kernel \$1, as provided by allo.com:"
echo '[ INFO ] - https://github.com/allocom/USBridgeSig/tree/master/ethernet'
echo '[ INFO ] Downloading driver...'
wget http://3.230.113.73:9011/Allocom/USBridgeSig/rpi-usbs-\$1/ax88179_178a.ko -O /tmp/ax88179_178a.ko || exit 0
echo '[ INFO ] Installing driver...'
install -vpm 644 /tmp/ax88179_178a.ko /lib/modules/\$1/kernel/drivers/net/usb || exit 0
echo '[ INFO ] Running depmod...'
depmod \$1 || exit 0
echo '[ INFO ] Cleaning up...'
rm -v /tmp/ax88179_178a.ko || exit 0
_EOF_
chmod +x /etc/kernel/postinst.d/dietpi-USBridgeSig
# Update for all installed ARMv7+ kernel versions now
for i in /lib/modules/*-v7+
do

[[ -d $i ]] || continue
i=${i##*/}
/etc/kernel/postinst.d/dietpi-USBridgeSig $i

done

fi
#-------------------------------------------------------------------------------
# Reinstalls
# Syncthing: https://github.com/MichaIng/DietPi/pull/3202
# Grafana: https://github.com/MichaIng/DietPi/issues/3213
Expand Down Expand Up @@ -2449,6 +2418,37 @@ To reinstall now, run: "dietpi-software reinstall 106 144 145"
# APT configs have been merged into a single file, contained in update archive
rm -fv /etc/apt/apt.conf.d/{99-dietpi-norecommends,98-dietpi-no_translations,99-dietpi-forceconf}
#-------------------------------------------------------------------------------
# RPi: Update USBridgeSig Ethernet driver via postinst kernel script, until it has been merged into official RPi kernel: https://github.com/allocom/USBridgeSig/tree/master/ethernet
if (( $G_HW_MODEL < 10 )); then

cat << _EOF_ > /etc/kernel/postinst.d/dietpi-USBridgeSig
#!/bin/bash
# Only apply to v7+ and v8+ kernel
[[ \$1 == *'-v'[78]'+' ]] || exit 0
echo "[ INFO ] Updating asix ax88179 driver for kernel \$1, as provided by allo.com:"
echo '[ INFO ] - https://github.com/allocom/USBridgeSig/tree/master/ethernet'
echo '[ INFO ] Downloading driver...'
wget http://3.230.113.73:9011/Allocom/USBridgeSig/rpi-usbs-\$1/ax88179_178a.ko -O /tmp/ax88179_178a.ko || exit 0
echo '[ INFO ] Installing driver...'
install -vpm 644 /tmp/ax88179_178a.ko /lib/modules/\$1/kernel/drivers/net/usb || exit 0
echo '[ INFO ] Running depmod...'
depmod \$1 || exit 0
echo '[ INFO ] Cleaning up...'
rm -v /tmp/ax88179_178a.ko || exit 0
_EOF_
chmod +x /etc/kernel/postinst.d/dietpi-USBridgeSig
# Update for all installed v7+ and v8+ kernel versions now
for i in /lib/modules/*-v[78]+
do

[[ -d $i ]] || continue
i=${i##*/}
/etc/kernel/postinst.d/dietpi-USBridgeSig $i

done

fi
#-------------------------------------------------------------------------------
# Last subversion patch completed
# - Apply reinstalls
if [[ -f '/var/tmp/dietpi/dietpi-update_reinstalls' ]]; then
Expand Down

0 comments on commit 75a93a0

Please sign in to comment.