radxa0: Decommonize init.amlogic.wifi_buildin.rc
authorNolen Johnson <johnsonnolen@gmail.com>
Thu, 1 Jul 2021 21:11:57 +0000 (17:11 -0400)
committerJan Altensen <info@stricted.net>
Fri, 30 Jul 2021 17:25:44 +0000 (19:25 +0200)
* Only deadpool/wade/sabrina have Broadcom Wi-Fi/Bluetooth,
  dopinder/beast have Realtek, and will need different modules
  and node permissions changed.

Change-Id: I204e5c22a1dc306c9c932a3634f5e6534a438ee5

device.mk
init-files/init.amlogic.wifi_buildin.rc [new file with mode: 0644]

index 1c65589bd204400abd8f3c6efb27202370e96898..e5b69f81f1813a07e9d066939d7594ea51797d20 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -12,6 +12,10 @@ $(call inherit-product, device/amlogic/g12-common/g12.mk)
 PRODUCT_PACKAGES += \
     libbt-vendor
 
+## Init-Files
+PRODUCT_COPY_FILES += \
+    $(DEVICE_PATH)/init-files/init.amlogic.wifi_buildin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.wifi_buildin.rc
+
 ## Kernel Modules
 PRODUCT_PACKAGES += \
     dhd
diff --git a/init-files/init.amlogic.wifi_buildin.rc b/init-files/init.amlogic.wifi_buildin.rc
new file mode 100644 (file)
index 0000000..7979822
--- /dev/null
@@ -0,0 +1,6 @@
+on boot
+    insmod /vendor/lib/modules/dhd.ko firmware_path=/vendor/etc/wifi/buildin/ nvram_path=/vendor/etc/wifi/buildin/
+    chown root wifi /sys/module/dhd/parameters/firmware_path
+    chown root wifi /sys/module/bcmdhd/parameters/firmware_path
+    chmod 664 /sys/module/bcmdhd/parameters/firmware_path
+    chmod 664 /sys/module/dhd/parameters/firmware_path