From afc61dfb834da61f7ec32197a10cb4ff849b7640 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Tue, 16 Nov 2021 18:14:23 +0100 Subject: [PATCH] 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 --- .../firmware-qualcomm/firmware-qualcomm.bb | 5 +++++ .../kernel-module-qualcomm/qualcomm.sh | 19 ------------------- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb index 1117b2dbf..2f13801b8 100644 --- a/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb +++ b/meta-digi-arm/recipes-bsp/firmware-qualcomm/firmware-qualcomm.bb @@ -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-address2 ${D}${WIFI_FW_PATH}/wlan/wlan_mac2 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 ln -s qwlan30.bin ${D}${WIFI_FW_PATH}/athwlan.bin ln -s otp30.bin ${D}${WIFI_FW_PATH}/athsetup.bin diff --git a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh index 3d4d2b52b..813f9bd61 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh +++ b/meta-digi-arm/recipes-kernel/kernel-module-qualcomm/kernel-module-qualcomm/qualcomm.sh @@ -57,25 +57,6 @@ grep -qws 'wlan' /proc/modules && exit 0 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 # 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)"