Compare commits

...

3 Commits

Author SHA1 Message Date
Oleg Kalachev
720b7d4274 image: add some todo 2021-04-02 18:58:36 +03:00
Oleg Kalachev
efaddd34c8 image: enable USB in Compute Module 4 2021-04-02 10:35:49 +03:00
Oleg Kalachev
5d29453ae0 image: build rtl8812au wi-fi driver 2021-04-02 02:31:34 +03:00
2 changed files with 29 additions and 2 deletions

View File

@@ -79,4 +79,10 @@ if ! grep -q "^bcm2835-v4l2" /etc/modules;
then printf "bcm2835-v4l2\n" >> /etc/modules
fi
echo_stamp "#8 End of configure hardware interfaces"
echo_stamp "#8 Check if Compute Module 4"
if grep -q "Compute Module 4" "/proc/device-tree/model"; then
echo_stamp "Enable USB on Compute Module 4"
echo "dtoverlay=dwc2,dr_mode=host" >> /boot/config.txt
fi
echo_stamp "#9 End of configure hardware interfaces"

View File

@@ -60,4 +60,25 @@ domain-needed
quiet-dhcp6
EOF
echo_stamp "#4 End of network installation"
echo_stamp "#4 Build the RTL8814AU Wi-Fi adapter driver"
wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/raspberrypi-kernel-headers_1.20210108-1_armhf.deb
dpkg -i raspberrypi-kernel-headers_1.20210108-1_armhf.deb
cd /home/pi
git clone https://github.com/aircrack-ng/rtl8812au.git --depth=1
cd rtl8812au
echo kernel version: $(uname -r)
echo kernel version from procfs: $(cat /proc/version)
echo version: $(git describe --tags --always)
sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile # https://github.com/aircrack-ng/rtl8812au#for-raspberry-rpi
sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile
# sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile
apt-cache policy raspberrypi-kernel-headers
# apt-get install -y raspberrypi-kernel-headers=1.20210108 dkms
apt-get install -y dkms
ls /lib/modules
echo make
make KERNEL_VER=5.4.83-v7l+ KVER=5.4.83-v7l+ # TODO: determine kernel version from fs
echo make install
make install KERNEL_VER=5.4.83-v7l+ KVER=5.4.83-v7l+
echo_stamp "#5 End of network installation"