Raspberry PI

From Blue-IT.org Wiki

Compiling custom kernel modules

Wlan rtl8192cu

I ran into a problem with one of my wifi dongles (see: https://ubuntuforums.org/showthread.php?t=2325802). So I needed to recompile the module.

Prerequisites:

Install rpi-source

sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source \ 
-O /usr/bin/rpi-source && \
sudo chmod +x /usr/bin/rpi-source && \
/usr/bin/rpi-source -q --tag-update

Then do:

rpi-source 

Then install the necessary files (in my case for the rtl8182cu wlan chip):

# sudo apt-get install --reinstall linux-headers-$(uname -r) - NOT WORKING linux-headers-generic build-essential git dkms
sudo apt-get install --reinstall  linux-headers-generic build-essential git dkms
git clone https://github.com/pvaret/rtl8192cu-fixes.git
sudo dkms add ./rtl8192cu-fixes
sudo dkms install 8192cu/1.10
echo "blacklist rtl8192cu" | sudo tee -a /etc/modprobe.d/blacklist.conf