From 608618a6f5b341a1a171d3a0841a4807432d8294 Mon Sep 17 00:00:00 2001 From: Gunjan Gupta Date: Sun, 17 Sep 2023 23:08:18 +0530 Subject: [PATCH] orangepi3lts: load wifi module via systemd service otherwise it crashes cpufreq_dt module --- config/boards/orangepi3-lts.csc | 3 +-- config/sources/families/sun50iw6.conf | 4 ++++ packages/bsp/sunxi/aw859a-wifi.service | 12 ++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/bsp/sunxi/aw859a-wifi.service diff --git a/config/boards/orangepi3-lts.csc b/config/boards/orangepi3-lts.csc index bf32386a8..22cf911cf 100644 --- a/config/boards/orangepi3-lts.csc +++ b/config/boards/orangepi3-lts.csc @@ -5,6 +5,5 @@ BOARD_MAINTAINER="" BOOTCONFIG="orangepi_3_lts_defconfig" KERNEL_TARGET="current,edge" KERNEL_TEST_TARGET="current,edge" -MODULES="sprdbt_tty sprdwl_ng" -MODULES_BLACKLIST_LEGACY="bcmdhd" +MODULES="sprdbt_tty" CRUSTCONFIG="orangepi_3_lts_defconfig" diff --git a/config/sources/families/sun50iw6.conf b/config/sources/families/sun50iw6.conf index 09fbaf037..b7d9814ca 100644 --- a/config/sources/families/sun50iw6.conf +++ b/config/sources/families/sun50iw6.conf @@ -38,7 +38,10 @@ family_tweaks_s() { # install and enable Bluetooth chroot_sdcard_apt_get_install rfkill bluetooth bluez bluez-tools chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-bluetooth.service >/dev/null 2>&1" + fi + if [[ -f $SDCARD/lib/systemd/system/aw859a-wifi.service ]]; then + chroot $SDCARD /bin/bash -c "systemctl --no-reload enable aw859a-wifi.service >/dev/null 2>&1" fi if [[ $BUILD_DESKTOP == yes && $BOARD == orangepi3-lts ]]; then @@ -53,6 +56,7 @@ family_tweaks_s() { family_tweaks_bsp() { if [[ ${BOARD} == orangepi3-lts ]]; then cp $SRC/packages/bsp/sunxi/aw859a-bluetooth.service $destination/lib/systemd/system/ + cp $SRC/packages/bsp/sunxi/aw859a-wifi.service $destination/lib/systemd/system/ fi install -m 755 $SRC/packages/blobs/bt/hciattach/hciattach_opi_${ARCH} $destination/usr/bin/hciattach_opi diff --git a/packages/bsp/sunxi/aw859a-wifi.service b/packages/bsp/sunxi/aw859a-wifi.service new file mode 100644 index 000000000..ab92cd135 --- /dev/null +++ b/packages/bsp/sunxi/aw859a-wifi.service @@ -0,0 +1,12 @@ +[Unit] +Description=WIFI AW859A + +[Service] +Type=forking +ExecStart=/sbin/modprobe sprdwl_ng +TimeoutSec=0 +RemainAfterExit=yes +SysVStartPriority=99 + +[Install] +WantedBy=multi-user.target