From a8e2f17d7f65fce1180ee678d245446b2ee7b6a9 Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Sat, 27 Jan 2024 02:21:17 +0100 Subject: [PATCH] testing pi --- before-install-pi.sh | 16 ++++++++++++++++ build_chroot.sh | 13 ++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 before-install-pi.sh diff --git a/before-install-pi.sh b/before-install-pi.sh new file mode 100644 index 00000000..6eb86710 --- /dev/null +++ b/before-install-pi.sh @@ -0,0 +1,16 @@ +#!/bin/bash +if [ -e "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/88XXau_wfb.ko" ]; then + sudo rm -Rf "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/88XXau_wfb.ko" +fi +if [ -e "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/88XXau_ohd.ko" ]; then + sudo rm -Rf "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/88XXau_ohd.ko" +fi +if [ -e "/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/88XXau_wfb.ko" ]; then + sudo rm -Rf "/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/88XXau_wfb.ko" +fi +if [ -e "/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/88XXau_ohd.ko" ]; then + sudo rm -Rf "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/88XXau_ohd.ko" +fi +if [ -e "/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/realtek/" ]; then + sudo rm -Rf "/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/realtek/*" +fi \ No newline at end of file diff --git a/build_chroot.sh b/build_chroot.sh index 6de05652..3116f1be 100644 --- a/build_chroot.sh +++ b/build_chroot.sh @@ -22,9 +22,16 @@ if [[ -e /etc/os-release && $(grep -c "Raspbian" /etc/os-release) -gt 0 ]]; then echo "building for the raspberry pi" sudo apt update sudo apt install -y build-essential flex bc bison dkms raspberrypi-kernel-headers - echo "---------------" - echo "_____________________________________________" - ls -a /usr/src/ + echo "___________________BUILDING-DRIVER______PI4_____________" + make KSRC=/usr/src/linux-headers-6.1.21-v7l+ O="" modules + mkdir -p package/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/ + cp *.ko package/lib/modules/6.1.21-v7l+/kernel/drivers/net/wireless/ + ls -a + make clean + make KSRC=/usr/src/linux-headers-6.1.21-v7+ O="" modules + mkdir -p package/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/ + cp *.ko package/lib/modules/6.1.21-v7+/kernel/drivers/net/wireless/ + fpm -a amd64 -s dir -t deb -n rtl8812au-rpi -v 2.5-evo-$(date '+%m%d%H%M') -C package -p rtl8812au-rpi.deb --before-install before-install.sh --after-install after-install-pi.sh else sudo apt update