From 8f1eabb7c9ffd9811e112c313ba2892ac20da5ff Mon Sep 17 00:00:00 2001 From: Daniel Gnoutcheff Date: Mon, 30 Mar 2015 14:22:34 -0400 Subject: [PATCH] Update wl1251 firmware loading path The wl1251 driver in upstream linux kernels expects its firmware files to live at ti-connectivity/wl1251-fw.bin ti-connectivity/wl1251-nvs.bin and the linux-firmware package uses the same names for these files. However, our current (older) kernel still expects them to be named wl1251-fw.bin wl1251-nvs.bin and so firmware loading would fail. RescueOS v1.1 included these files under the older filenames, but we'd like to use the official (upstream) names. Patch our kernel to match. Also remove the unnecessary (and now erroneous) firmware check from setup-wpa-wifi.sh. --- buildrootconfig | 1 + fs-overlay/rescueOS/setup-wpa-wifi.sh | 1 - ...wireless-wl1251-update-firmware-path.patch | 36 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 kernel-patches/0001-net-wireless-wl1251-update-firmware-path.patch diff --git a/buildrootconfig b/buildrootconfig index 04c87ee..1f3b552 100644 --- a/buildrootconfig +++ b/buildrootconfig @@ -39,6 +39,7 @@ BR2_TARGET_ROOTFS_CRAMFS=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="http://n900.quitesimple.org/rescueOS/sourcecode/kernel_source.tar.gz" +BR2_LINUX_KERNEL_PATCH="../N900_RescueOS/kernel-patches/0001-net-wireless-wl1251-update-firmware-path.patch" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="../N900_RescueOS/kernel_config" BR2_LINUX_KERNEL_ZIMAGE=y diff --git a/fs-overlay/rescueOS/setup-wpa-wifi.sh b/fs-overlay/rescueOS/setup-wpa-wifi.sh index 2661cb2..74c6116 100755 --- a/fs-overlay/rescueOS/setup-wpa-wifi.sh +++ b/fs-overlay/rescueOS/setup-wpa-wifi.sh @@ -4,7 +4,6 @@ ermsg() echo $1 exit } -ls /lib/firmware/ | grep wl1251 > /dev/null || ermsg "Firmware not found. Copy wl1251-fw.bin, wl1251-nvs.bin from maemo.". [ -e /run/wlan.conf ] || ermsg "Yeah, please run wpa_passphrase [essid] [password ] > /run/wlan.conf first." modprobe wl1251_spi #Works for my router, probably for yours too, if not, then not :-) diff --git a/kernel-patches/0001-net-wireless-wl1251-update-firmware-path.patch b/kernel-patches/0001-net-wireless-wl1251-update-firmware-path.patch new file mode 100644 index 0000000..69b51db --- /dev/null +++ b/kernel-patches/0001-net-wireless-wl1251-update-firmware-path.patch @@ -0,0 +1,36 @@ +From 4dc2cc73fa172892f817440877565018aa2f07c9 Mon Sep 17 00:00:00 2001 +From: Felipe Balbi +Date: Wed, 2 Oct 2013 08:00:48 -0500 +Subject: [PATCH] net: wireless: wl1251: update firmware path + +Backported from 9f55c6201354183345fa06c6986668d159b6507f + +TI firmwares are located under ti-connectivity +directory. Update path to make sure driver can +find and load firmware blob. + +Signed-off-by: Felipe Balbi +Signed-off-by: John W. Linville +Backported-by: Daniel Gnoutcheff +--- + drivers/net/wireless/wl1251/wl1251.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/wireless/wl1251/wl1251.h b/drivers/net/wireless/wl1251/wl1251.h +index a7f98a7..f705b5d 100644 +--- a/drivers/net/wireless/wl1251/wl1251.h ++++ b/drivers/net/wireless/wl1251/wl1251.h +@@ -425,8 +425,8 @@ void wl1251_disable_interrupts(struct wl1251 *wl); + #define CHIP_ID_1271_PG10 (0x4030101) + #define CHIP_ID_1271_PG20 (0x4030111) + +-#define WL1251_FW_NAME "wl1251-fw.bin" +-#define WL1251_NVS_NAME "wl1251-nvs.bin" ++#define WL1251_FW_NAME "ti-connectivity/wl1251-fw.bin" ++#define WL1251_NVS_NAME "ti-connectivity/wl1251-nvs.bin" + + #define WL1251_POWER_ON_SLEEP 10 /* in miliseconds */ + +-- +1.9.1 +