[elrepo] packaging firmware ar3k

Phil Perry phil at elrepo.org
Tue Apr 1 12:23:46 EDT 2014


On 01/04/14 16:21, Leon Fauster wrote:
> Am 01.04.2014 um 02:21 schrieb Alan Bartlett <ajb at elrepo.org>:
>> On 31 March 2014 23:51, Leon Fauster <leonfauster at googlemail.com> wrote:
>>> i noticed that booting
>>>
>>> $ rpm -q kernel-ml
>>> kernel-ml-3.13.7-1.el6.elrepo.x86_64
>>>
>>> echos
>>>
>>> uetooth: HCI socket layer initialized
>>> Bluetooth: L2CAP socket layer initialized
>>> Bluetooth: SCO socket layer initialized
>>> usbcore: registered new interface driver btusb
>>> Bluetooth: Patch file not found ar3k/AthrBT_0x11020000.dfu <<<<<<<
>>> Bluetooth: Loading patch file failed
>>> ath3k: probe of 1-1.1:1.0 failed with error -2
>>> usbcore: registered new interface driver ath3k
>>> media: Linux media interface: v0.10
>>>
>>>
>>> what is the best way to build a package for the AthrBT_0x11020000.dfu file/firmware?
>>>
>>
>> Checking in the kernel sources (the drivers/bluetooth/ath3k.c file) I
>> find that error message originates from the ath3k_load_patch()
>> function and that, in turn, is called from the ath3k_probe() function.
>>
>> In reviewing the code I also see references to the required firmware
>> file, ath3k-1.fw
>>
>> A quick check of the ath3k.ko module confirms that requirement --
>>
>> [code]
>> [Duo2 ~]$ modinfo -F firmware
>> /lib/modules/3.14.0-1.el6.elrepo.x86_64/kernel/drivers/bluetooth/ath3k.ko
>> ath3k-1.fw
>> [Duo2 ~]$
>> [/code]
>>
>> So, as a first step, I would recommend that you download the
>> ath3k-1.fw file from
>> http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/
>> and copy it to your /lib/firmware/ directory and then re-test.
>>
>> Please see if there is any change in the messages, then displayed.
>
>
> Hi Alan, thanks for your reply.
>
> that file is already installed and seems to be the same with the one in the repository
>
> $ curl -s https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/ath3k-1.fw | sha256sum
> e51feca60698858fdf8150135360a26fb4742323eea73a4d42f15410f00e7683  -
>
> $ cat $(rpm -ql ath3k-firmware)  | sha256sum
> e51feca60698858fdf8150135360a26fb4742323eea73a4d42f15410f00e7683  -
>
> $ rpm -q ath3k-firmware
> ath3k-firmware-1.0-1.el6.elrepo.noarch
>

Hi Leon,

In addition to Alan's reply...

I backported the ath3k bluetooth driver from kernel-3.10 for el6, and as 
part of that I also packaged the firmware for it (above), ath3k-firmware.

> dmesg is still showing the "file not found ar3k/AthrBT_0x11020000.dfu" output.
>

I'm pretty sure the driver I backported from kernel-3.10 did not require 
these additional files so this looks like a new requirement introduced 
in a more recent kernel.

To date we haven't attempted to package additional firmwares for our 
elrepo kernel offerings (kernel-lt and kernel-ml) as things can quickly 
start to get messy, as you've already identified, with package conflicts.

I'm open to suggestions, but so far we have pretty much left it to users 
to grab the firmware files they require and manually install them as you 
have done here. Packaging the linux firmware git tree has the potential 
to cause more problems than it solves.


>
> I see that the ar3k firmware directory is packaged via linux-firmware.rpm
> in EL7. It is packaged independently from the kernel.src.rpm [1].
>
> $ rpm -qpl http://ftp.redhat.com/pub/redhat/rhel/beta/7/x86_64/os/Packages/linux-firmware-20131106-0.1.git7d0c7a8.el7.noarch.rpm |grep ar3k
> ...
> /lib/firmware/ar3k/AthrBT_0x01020200.dfu
> /lib/firmware/ar3k/AthrBT_0x01020201.dfu
> /lib/firmware/ar3k/AthrBT_0x11020000.dfu
> /lib/firmware/ar3k/AthrBT_0x31010000.dfu
> ...
>
> for EL6 this package will conflict with the kernel-firmware.rpm and more.
>
>
> For testing i did it manually
>
> mkdir -p /lib/firmware/ar3k/ && mv ~/AthrBT_0x11020000.dfu /lib/firmware/ar3k/
> mkdir -p /lib/firmware/ar3k/ && mv ~/ramps_0x11020000_40.dfu /lib/firmware/ar3k/
>
> in el7.noarch.rpm and the repository both files are still the same.
>
> after rebooting the system these files get successfully loaded.
>
>
> $ uname -a
> Linux a.localdomain 3.13.7-1.el6.elrepo.x86_64 #1 SMP Mon Mar 24 16:34:24 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
>
> $ dmesg
> Bluetooth: Core ver 2.17
> NET: Registered protocol family 31
> Bluetooth: HCI device and connection manager initialized
> Bluetooth: HCI socket layer initialized
> Bluetooth: L2CAP socket layer initialized
> Bluetooth: SCO socket layer initialized
> usbcore: registered new interface driver btusb
> usbcore: registered new interface driver ath3k
>
>
> for this device
>
> $ lsusb -d 0489:e04e
> Bus 001 Device 005: ID 0489:e04e Foxconn / Hon Hai
>
> $ modinfo ath3k |grep -i e04e
> alias:          usb:v0489pE04Ed*dc*dsc*dp*ic*isc*ip*in*
>
> this firmware files are needed
>
> $ find /lib/firmware/ar3k/ -type f
> /lib/firmware/ar3k/AthrBT_0x11020000.dfu
> /lib/firmware/ar3k/ramps_0x11020000_40.dfu
>
>
> so far ...
>
> --
> LF
>
>
> [1] http://ftp.redhat.com/pub/redhat/rhel/beta/7/source/SRPMS/linux-firmware-20131106-0.1.git7d0c7a8.el7.src.rpm
>
>




More information about the elrepo mailing list