Skip to contentSkip to conversation

linux-firmware-mt7601u-license missing - all fw installed not only selected

DISCUSSION Konstantin Kletschke 1 participant 2 messages Aug 24, 2023

lore
Share & tools
lore
#0 lore raw

Today I updated my kirkstone poky (git pull) to today's version, I do not know when the last time was, though (winter?)...

I have

IMAGE_INSTALL += " \
    kernel-module-rtl8812au \
    linux-firmware-ralink \
    linux-firmware-rtl8168 \
    linux-firmware-rtl8188 \
    linux-firmware-rtl8192ce \
    linux-firmware-rtl8192cu \
    linux-firmware-rtl8192su \
    linux-firmware-rtl8723 \
    linux-firmware-rtl8821 \
    linux-firmware-mt7662 \
    util-linux-sfdisk \
    blspec \
    e2fsprogs-resize2fs e2fsprogs-mke2fs xfsprogs \
    rauc barebox-utils dt-utils"

in my image config and only those firmware packages got installed.

To create linux-firmware-mt7662 I have a meta-insidem2m/recipes-kernel/linux-firmware/linux-firmware_%.bbappend containing this:

PACKAGES =+ "${PN}-mt7662-license ${PN}-mt7662"

LICENSE:${PN}-mt7662 = "Firmware-ralink_a_mediatek_company_firmware" LICENSE:${PN}-mt7662-license = "Firmware-ralink_a_mediatek_company_firmware"

FILES:${PN}-mt7662-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware" FILES:${PN}-mt7662 = "${nonarch_base_libdir}/firmware/mt7662.bin ${nonarch_base_libdir}/firmware/mt7662_rom_patch.bin"

RDEPENDS:${PN}-mt7662 += "${PN}-mt7662-license"

Worked fine, after today's update I got:

The following packages have unmet dependencies:
linux-firmware-mt7601u : Depends: linux-firmware-mt7601u-license but it is not installable
E: Unable to correct problems, you have held broken packages.

Why could that be?

I read there was a fix in November:
https://git.yoctoproject.org/poky/commit/meta/recipes-kernel/linux-firmware/linux-firmware_20230625.bb?id=b4b218b0699490765459995f43e945ceea6c32c1

By accident I found out if I rape my bbappend file to look so:

PACKAGES =+ "${PN}-mt7662-license ${PN}-mt7662"

LICENSE:${PN}-mt7662 = "Firmware-ralink_a_mediatek_company_firmware" LICENSE:${PN}-mt7662-license = "Firmware-ralink_a_mediatek_company_firmware"

FILES:${PN}-mt7662-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware" FILES:${PN}-mt7662 = "${nonarch_base_libdir}/firmware/mt7662.bin ${nonarch_base_libdir}/firmware/mt7662_rom_patch.bin"

RDEPENDS:${PN}-mt7662 += "${PN}-mt7662-license"

LICENSE:${PN}-mt7601u = "Firmware-ralink_a_mediatek_company_firmware" LICENSE:${PN}-mt7601u-license = "Firmware-ralink_a_mediatek_company_firmware"

FILES:${PN}-mt7601u-license = "${nonarch_base_libdir}/firmware/LICENCE.ralink_a_mediatek_company_firmware"

FILES:${PN}-mt7601u = "${nonarch_base_libdir}/firmware/mt7662.bin ${nonarch_base_libdir}/firmware/mt7662_rom_patch.bin" #FILES:${PN}-mt7601u = " \
# ${nonarch_base_libdir}/firmware/mediatek/mt7601u.bin \
#"

RDEPENDS:${PN}-mt7601u += "${PN}-mt7601u-license"

The image gets created successfully, but now it has ALL firmware packages installed (900MB). The commented out FILES:${PN}-mt7601u is the original actual recipe part.

What's going on here?

Generally the Problem looks similair to this one:

https://lore.kernel.org/all/[email protected]/T/#md2177072e60f8a737f0db0ef267d75596b34cb89

Was there ever a fix? Despite of that, why is mt7601u failing?

Regards
Konstantin

#1 lore raw
Quoted 4 lines · Konstantin Kletschke

meta-insidem2m/recipes-kernel/linux-firmware/linux-firmware_%.bbappend containing this:

FILES:${PN}-mt7662 = "${nonarch_base_libdir}/firmware/mt7662.bin ${nonarch_base_libdir}/firmware/mt7662_rom_patch.bin"

Nooooooooooooooooooooooooooooo!

I had to do the firmware -> firmware/mediatek move in my own bbappend too, of course!
I did it but not for both entries so I was mislead thinking that is not the problem. Noooooooooo!

So in my bbappend I changed to

FILES:${PN}-mt7662 = "${nonarch_base_libdir}/firmware/mediatek/mt7662.bin ${nonarch_base_libdir}/firmware/mediatek/mt7662_rom_patch.bin"

also. Problem solved!

The error message was a _bit_ misleading, though!

Regards
Konsti