Bug 1329916

Summary: packaging incompatible firmware versions
Product: [Fedora] Fedora Reporter: Jan Včelák <jv+fedora>
Component: linux-firmwareAssignee: David Woodhouse <dwmw2>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: dwmw2, jforbes, kernel-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-16 12:03:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Včelák 2016-04-24 21:41:13 UTC
Description of problem:

(Not only) the iwl7260-firmware package contains a firmware versions which are incompatible with the kernels shipped in Fedora. Some of the firmware ucodes could be removed to shrink the package and installation size a little bit.

The upcoming Fedora 24 currently contains kernel 4.5.2. Taking a look at the iwlwifi module sources [1], the Intel 7000 cards require at least firmware version 13. And the package contains even firmware version 7 for kernel 3.13.

I'm proposing to remove firmwares older than X. Where X is determined by some reasonable policy.

[1] https://github.com/torvalds/linux/blob/v4.5/drivers/net/wireless/intel/iwlwifi/iwl-7000.c#L73

Version-Release number of selected component (if applicable):
iwl7260-firmware-25.30.13.0-61.fc24.noarch


How reproducible
always

Steps to Reproduce:
1. dnf install iwl7260-firmware
2. rpm -ql iwl7260-firmware
3.

Actual results:
Both supported and unsupported firmwares are listed.

Expected results:
Only firmwares supported by recent Fedora kernels are listed.

Additional info:

Some rough math shows that about 10 MB of the .ucode files shipped with the package are usable with the current kernel. And about 7 MB of .ucode files are for old kernels.

iwlwifi-7260-10.ucode    -      672352 bytes
iwlwifi-7260-12.ucode    -      782300 bytes
iwlwifi-7260-13.ucode    ok     786920 bytes
iwlwifi-7260-16.ucode    ok    1049284 bytes
iwlwifi-7260-7.ucode     -      683236 bytes
iwlwifi-7260-8.ucode     -      679780 bytes
iwlwifi-7260-9.ucode     -      680508 bytes
iwlwifi-7265-10.ucode    -      736844 bytes
iwlwifi-7265-12.ucode    -      880604 bytes
iwlwifi-7265-13.ucode    ok     885224 bytes
iwlwifi-7265-16.ucode    ok    1180356 bytes
iwlwifi-7265-8.ucode     -      690452 bytes
iwlwifi-7265-9.ucode     -      697828 bytes
iwlwifi-7265D-10.ucode   -          21 bytes
iwlwifi-7265D-12.ucode   -     1002800 bytes
iwlwifi-7265D-13.ucode   ok    1008692 bytes
iwlwifi-7265D-16.ucode   ok    1384500 bytes
iwlwifi-8000C-13.ucode   ok    1745176 bytes
iwlwifi-8000C-16.ucode   ok    2351636 bytes

Comment 1 Josh Boyer 2016-04-25 12:24:13 UTC
We currently ship whatever is in the upstream linux-firmware repo.  Pruning files according to some heuristic would be possible, but the only benefit of doing that is reducing a small amount of disk space.  It doesn't appear to be worthwhile.

Comment 2 David Woodhouse 2016-04-25 12:49:45 UTC
There have been discussions about changing the ad-hoc format of the 'WHENCE' file to something more standard, and adding fields which indicate which kernel versions correspond to each firmware file — which would allow you to drop the old obsolete firmware images as you desire.

Unfortunately it isn't quite as simple as 'kernel version', when drivers are being backported to old stable kernels by distributions. It's not quite as simple as that. You could potentially contrive something which works from the MODULE_FIRMWARE tags in the built modules... not that we'd really have any way to use that in Fedora as it would depend on the built kernel and I don't think we really want to do that (even if it didn't change over time).

On the whole, nobody's been overly interested in actually *implementing* anything like this. As Josh notes, it's not exactly that huge.

We're more likely to delete certain files manually in the Fedora package, for those offenders who ship large firmware *and* keep changing its filename due to incompatible API changes. It's not as if there are many of those.