mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
feature-wifi: Only install files in romfs if enabled
Move from board romfs directory, to inside feature-wifi
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Rename WiFi PHY devices from phy0 to radio0 to avoid name clashes
|
||||
SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy*", \
|
||||
RUN+="/bin/sh -c '/usr/sbin/iw phy %k set name radio%n'"
|
||||
@@ -0,0 +1,7 @@
|
||||
# Remove kernel-created WiFi interfaces
|
||||
# All WiFi interfaces are now virtual interfaces created by confd
|
||||
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", \
|
||||
TEST=="/sys/class/net/$name/phy80211/name", \
|
||||
PROGRAM="/bin/cat /sys/class/net/%k/phy80211/name", \
|
||||
TEST!="/run/wifi-cleaned-%c", \
|
||||
RUN+="/bin/sh -c '/usr/sbin/iw dev %k del && touch /run/wifi-cleaned-%c'"
|
||||
@@ -68,4 +68,13 @@ define FEATURE_WIFI_LINUX_CONFIG_FIXUPS
|
||||
)
|
||||
endef
|
||||
|
||||
define FEATURE_WIFI_INSTALL_IN_ROMFS
|
||||
mkdir -p $(TARGET_DIR)/etc/modprobe.d $(TARGET_DIR)/etc/udev/rules.d
|
||||
cp $(FEATURE_WIFI_PKGDIR)/mt7915e.conf $(TARGET_DIR)/etc/modprobe.d/mt7915e.conf
|
||||
cp $(FEATURE_WIFI_PKGDIR)/60-rename-wifi-phy.rules $(TARGET_DIR)/etc/udev/rules.d/60-rename-wifi-phy.rules
|
||||
cp $(FEATURE_WIFI_PKGDIR)/70-remove-virtual-wifi-interfaces.rules $(TARGET_DIR)/etc/udev/rules.d/70-remove-virtual-wifi-interfaces.rules
|
||||
endef
|
||||
FEATURE_WIFI_POST_INSTALL_TARGET_HOOKS += FEATURE_WIFI_INSTALL_IN_ROMFS
|
||||
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
options mt7915e enable_6ghz=1
|
||||
Reference in New Issue
Block a user