wifi: add symbolics links needed by the read only filesystem.

Create this symbolics links in build time instead of doing it
in run-time. This simplifies the system and allows it to work
with read only filesystems.

Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
Francisco Gil 2021-11-16 18:14:23 +01:00
parent 179d4315ef
commit afc61dfb83
2 changed files with 5 additions and 19 deletions

View File

@ -95,6 +95,11 @@ do_install() {
ln -s /proc/device-tree/wireless/mac-address1 ${D}${WIFI_FW_PATH}/wlan/wlan_mac1 ln -s /proc/device-tree/wireless/mac-address1 ${D}${WIFI_FW_PATH}/wlan/wlan_mac1
ln -s /proc/device-tree/wireless/mac-address2 ${D}${WIFI_FW_PATH}/wlan/wlan_mac2 ln -s /proc/device-tree/wireless/mac-address2 ${D}${WIFI_FW_PATH}/wlan/wlan_mac2
ln -s /proc/device-tree/wireless/mac-address3 ${D}${WIFI_FW_PATH}/wlan/wlan_mac3 ln -s /proc/device-tree/wireless/mac-address3 ${D}${WIFI_FW_PATH}/wlan/wlan_mac3
# Create symbolic links to the proper FW files depending on the country region
ln -s bdwlan30_US.bin ${D}${WIFI_FW_PATH}/bdwlan30.bin
ln -s bdwlan30_US.bin ${D}${WIFI_FW_PATH}/utfbd30.bin
if [ "${FW_QUALCOMM_WIFI}" = "${FW_QCA65X4_PCIE_PROPRIETARY}" ]; then if [ "${FW_QUALCOMM_WIFI}" = "${FW_QCA65X4_PCIE_PROPRIETARY}" ]; then
ln -s qwlan30.bin ${D}${WIFI_FW_PATH}/athwlan.bin ln -s qwlan30.bin ${D}${WIFI_FW_PATH}/athwlan.bin
ln -s otp30.bin ${D}${WIFI_FW_PATH}/athsetup.bin ln -s otp30.bin ${D}${WIFI_FW_PATH}/athsetup.bin

View File

@ -57,25 +57,6 @@ grep -qws 'wlan' /proc/modules && exit 0
FS_ORIGINAL_ACCESS="$(get_filesystem_access ${FIRMWARE_DIR})" FS_ORIGINAL_ACCESS="$(get_filesystem_access ${FIRMWARE_DIR})"
# Create symbolic links to the proper FW files depending on the country region
# Use a sub-shell here to change to firmware directory
(
cd "${FIRMWARE_DIR}"
BDATA_SOURCE="bdwlan30_US.bin"
log "5" "Setting US wireless region"
# When defined, update the links only if they are wrong so we don't
# rewrite the internal memory every time we boot
BDATA_LINK="bdwlan30.bin"
UTFBDATA_LINK="utfbd30.bin"
if ([ ! -f "${BDATA_LINK}" ] || ! cmp -s "${BDATA_LINK}" "${BDATA_SOURCE}"); then
set_filesystem_rw_access ${FIRMWARE_DIR}
ln -sf "${BDATA_SOURCE}" "${BDATA_LINK}"
ln -sf "${BDATA_SOURCE}" "${UTFBDATA_LINK}"
fi
)
# Load the wireless module with the params defined in modprobe.d/qualcomm.conf # Load the wireless module with the params defined in modprobe.d/qualcomm.conf
# and reduce the console log level to avoid debug messages at boot time # and reduce the console log level to avoid debug messages at boot time
LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sysctl.conf 2>/dev/null)" LOGLEVEL="$(sed -ne 's,^kernel.printk[^=]*=[[:blank:]]*\(.*\)$,\1,g;T;p' /etc/sysctl.conf 2>/dev/null)"