FS#34255 - [mkinitcpio] should warn if modinfo has firmware that doesn't exist
Attached to Project:
Arch Linux
Opened by Zack Buhman (buhman) - Monday, 11 March 2013, 10:12 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 02 May 2013, 03:39 GMT
Opened by Zack Buhman (buhman) - Monday, 11 March 2013, 10:12 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 02 May 2013, 03:39 GMT
|
Details
Description:
As a specific example/use-case: I have a diskless PXE setup with all sorts of packages, including arch-install-scripts, installed that I use to do pretty much everything/anything, such as doing arbitrary archlinux installations. I have aur/aic94xx-firmware[1] installed on the NFS root, so said disk controller would initializes properly without any fiddling (so I wouldn't be instantly conscious that the disk controller requires firmware not present in core/linux-firmware). But the firmware would not be copied to the target root filesystem without manually installing said package. Mkinitcpio would then include aic94xx module in the initramfs as expected, but completely not mention the part where aic94xx requires aic94xx-seq.fw, but that isn't in the target /lib/firmware It would be nice, for slow people like me, if mkinitcpio would mention that the generated initramfs is probably broken because firmware for an included module was not present. Additional info: * package version(s) mkinitcpio 0.13.0-1 [1] https://aur.archlinux.org/packages/aic94xx-firmware/ |
This task depends upon
Closed by Dave Reisner (falconindy)
Thursday, 02 May 2013, 03:39 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio-0.14.0
Thursday, 02 May 2013, 03:39 GMT
Reason for closing: Fixed
Additional comments about closing: mkinitcpio-0.14.0
$ modinfo -k 3.8.8-1-ARCH bfa
filename: /lib/modules/3.8.8-1-ARCH/kernel/drivers/scsi/bfa/bfa.ko.gz
version: 3.1.2.1
author: Brocade Communications Systems, Inc.
description: Brocade Fibre Channel HBA Driver fcpim
license: GPL
firmware: ct2fw-3.1.0.0.bin
firmware: ctfw-3.1.0.0.bin
firmware: cbfw-3.1.0.0.bin
srcversion: 0E58B18DCDDBAFD81911FBD
alias: pci:v00001657d00000022sv*sd*bc0Csc04i00*
alias: pci:v00001657d00000021sv*sd*bc0Csc04i00*
alias: pci:v00001657d00000014sv*sd*bc0Csc04i00*
alias: pci:v00001657d00000017sv*sd*bc*sc*i*
alias: pci:v00001657d00000013sv*sd*bc*sc*i*
depends: scsi_mod,scsi_transport_fc
intree: Y
vermagic: 3.8.8-1-ARCH SMP preempt mod_unload modversions
The firmware file 'cbfw-3.1.0.0.bin' is nowhere to be found so mkinitcpio complains about it. Of course, there's other firmware files so it's possible that everything works out fine.
I suppose what needs to happen is for mkinitcpio to complain only if *no* firmware was found for the module, but then there's potentially problems for modules which might require multiple firmware files.
edit: nevermind. NONE of the firmware files exist for this module in the generic linux-firmware package. Everyone creating a fallback image with the block hook is going to run into this... blahhhhhhh
$ find /lib/modules/3.8.8-1-ARCH/kernel/ -name '*.ko.gz' -exec modinfo -F firmware {} + | while read fw; do [[ -f /lib/firmware/$fw ]] || echo $fw; done | wc -l
268
$ find /lib/modules/3.8.8-1-ARCH/kernel/ -name '*.ko.gz' -exec modinfo -F firmware {} + | while read fw; do [[ -f /lib/firmware/$fw ]] && echo $fw; done | wc -l
371
So in other words, 40% of the firmware referenced by mainline kernel modules isn't shipped by the kernel. I realize there's packages like alsa-firmware and bluez-firmware which drop the count of missing files down to about 170, but that's still 26% meaning our strike rate isn't so hot.