Compare commits

...

4 Commits

Author SHA1 Message Date
Oleg Kalachev
8ce700380c image: update Raspberry Pi OS to 2021-03-04 2021-04-08 02:12:16 +03:00
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
3 changed files with 29 additions and 3 deletions

View File

@@ -79,4 +79,10 @@ if ! grep -q "^bcm2835-v4l2" /etc/modules;
then printf "bcm2835-v4l2\n" >> /etc/modules then printf "bcm2835-v4l2\n" >> /etc/modules
fi 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

@@ -15,7 +15,8 @@
set -e # Exit immidiately on non-zero result set -e # Exit immidiately on non-zero result
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-01-12/2021-01-11-raspios-buster-armhf-lite.zip" # https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
SOURCE_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-03-25/2021-03-04-raspios-buster-armhf-lite.zip"
export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'} export DEBIAN_FRONTEND=${DEBIAN_FRONTEND:='noninteractive'}
export LANG=${LANG:='C.UTF-8'} export LANG=${LANG:='C.UTF-8'}

View File

@@ -60,4 +60,23 @@ domain-needed
quiet-dhcp6 quiet-dhcp6
EOF EOF
echo_stamp "#4 End of network installation" echo_stamp "#4 Build the RTL8814AU Wi-Fi adapter driver"
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 dkms
ls /lib/modules
KERNEL_VERSION=5.10.17-v7l+ # TODO: get kernel version from the fs
echo make
make KERNEL_VER=$KERNEL_VERSION KVER=$KERNEL_VERSION # TODO: determine kernel version from fs
echo make install
make install KERNEL_VER=$KERNEL_VERSION KVER=$KERNEL_VERSION
echo_stamp "#5 End of network installation"