[PATCH 1/1][core22] firmware: add missing firmware for ar3k Atheros bluetooth

Stefan Bader stefan.bader at canonical.com
Thu Jul 13 07:11:31 UTC 2023


On 12.07.23 20:18, Sergio Costas wrote:
>  From 27eddbbb1d30c97d192b9dd8e8f65d9dbf890a38 Mon Sep 17 00:00:00 2001
> From: Sergio Costas Rodriguez <sergio.costas at canonical.com>
> Date: Mon, 29 May 2023 14:09:03 +0200
> Subject: [PATCH] firmware: add missing firmware for ar3k Atheros bluetooth

To me there are multiple problems here. First cover email and patch do 
not seem to be submitted as a thread so there is no way to keep them 
together. Second, even [core22] to me is not immediately clear. But I am 
not sure what what would be better. It looks to target 
kernel-snaps-uc22:main which is probably a lot to type.
> 
> When using the Ubuntu Core 22 kernel in an Asus Zenbook UX22,
> this error is shown in journalctl:
> 
>      usb 1-1-1: Direct firmware load for ar3k/AthrBT_0x01020200.dfu 
> failed with error -2
>      Bluetooth: Patch file not found ar3k/AthrBT_0x01020200.dfu
>      Bluetooth: Loading patch file failed
>      ath3k: probe of 1-1.1:1.0 failed with error -2
> 
> and, of course, bluetooth doesn't work.
> 
> This patch adds the missing files, and makes bluetooth work.
> 
> Fix https://bugs.launchpad.net/ubuntu/+bug/2025054

This should use the BugLink: format. Looking at the bug report I think 
we also have a problem how to correctly classify these kind of changes 
there. Because there is no related package.

Subscribing Juerg and Dimitri since I found both had recent changes in 
that repo/branch and maybe have an idea how to improve this.

-Stefan
> ---
>   trim-firmware | 18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
> 
> diff --git a/trim-firmware b/trim-firmware
> index 148c964..e2fe269 100755
> --- a/trim-firmware
> +++ b/trim-firmware
> @@ -68,6 +68,24 @@ if [ -e "${DESTDIR}"/firmware/regulatory.db ] ; then
>       cp "${DESTDIR}"/firmware/regulatory.* "${DESTDIR}"/firmware.new
>   fi
> 
> +# Copy all AthrBT files, because they are needed for some devices
> +# like the original Asus Zenbook, but only if the module ath3k.ko
> +# is compiled
> +if [[ -n `find "${DESTDIR}"/modules -name ath3k.ko` ]] ; then
> +    if [ -d "${DESTDIR}"/firmware/ar3k ] ; then
> +        mkdir -p "${DESTDIR}"/firmware.new/ar3k
> +        cp -a "${DESTDIR}"/firmware/ar3k/AthrBT_0x*.dfu 
> "${DESTDIR}"/firmware.new/ar3k/
> +        # the "ramps_" files are refered in the source code of the 
> driver, so
> +        # we must add them too.
> +        cp -a "${DESTDIR}"/firmware/ar3k/ramps_0x*.dfu 
> "${DESTDIR}"/firmware.new/ar3k/
> +    else
> +        # fail if the folder doesn't exist, because that means that this
> +        # script requires a rework
> +        echo "The firmware folder for the Atheros Bluetoot firmware 
> doesn't exist".
> +        exit 1
> +    fi
> +fi
> +
>   # Move kernel firmware files to the new firmware directory
>   for d in "${DESTDIR}"/modules/* ; do
>       if [ -d "${DESTDIR}"/firmware/"${d##*/}" ] ; then
> -- 
> 2.39.2
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 44613 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230713/0989c274/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20230713/0989c274/attachment-0001.sig>


More information about the kernel-team mailing list