* * * * * root /usr/local/bin/addcountry /etc/wpa_supplicant/wpa_supplicant.conf root@raspberrypi:~# cat /usr/local/bin/addcountry #!/bin/bash if ! grep -q "^country=" $1; then echo Adding sed -i -e '2a\country=FR' $1 fi apt install -y git build-essential linux-headers-rpi raspberrypi-kernel-headers bc kbuild linux-kbuild-4.18 console-data git clone https://github.com/whitebatman2/rtl8821CU.git cd rtl8821CU cat README.md ## Raspberry Pi To build this driver on Raspberry Pi you need to set correct platform in Makefile. Change ``` CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_ARM_RPI = n CONFIG_PLATFORM_ARM_RPI3 = n ``` to ``` CONFIG_PLATFORM_I386_PC = n CONFIG_PLATFORM_ARM_RPI = y CONFIG_PLATFORM_ARM_RPI3 = n ``` For the Raspberry Pi 3 you need to change it to ``` CONFIG_PLATFORM_I386_PC = n CONFIG_PLATFORM_ARM_RPI = n CONFIG_PLATFORM_ARM_RPI3 = y ``` vi Makefile make -j4 ARCH=arm make install wget -q https://git.io/voEUQ -O /tmp/raspap && bash /tmp/raspap root@adlp-desk00:/media/adlp/rootfs/root# cat /media/adlp/boot/cmdline.txt console=serial0,115200 console=tty1 root=PARTUUID=6c586e13-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait net.ifnames=0 biosdevname=0 root@adlp-desk00:/media/adlp/rootfs/etc# cat ./systemd/network/*-persistent-net.link [Match] MACAddress=b8:27:eb:5c:e4:60 [Link] Name=eth0 [Match] MACAddress=b8:27:eb:09:b1:35 [Link] Name=wlan0 [Match] MACAddress=00:e0:4c:29:5f:50 [Link] Name=wlan1