[lfs-dev] Proposal: Firmware instructions

Olaf mailinglists at ban-solms.de
Tue Mar 18 03:31:29 PDT 2014


On 2014-03-16 10:08, Olaf wrote:
> On 2014-03-16 03:18, Bruce Dubbs wrote:

>> The only way I would think that the user would know what is needed is to
>> start with the entire tree in /lib/firmware and check dmesg to see what
>> it wants and then delete the rest.  I would think there is a better way.
>
> I had following idea (still to be implemented/tested), in chapter 8.3.1
> the LFS user more or less chooses his kernel config and the required
> stuff is build. By using modinfo -F firmware<module>  it is possible to
> list the firmware files. So using a script that tests all modules should
> be produce a list of blobs that matches. Then copy only those instead of
> running make install.


Something like this:

find /lib/modules/<kernel-version>/kernel/ -type f > modules
for m in `cat modules`; do modinfo -F firmware $m done > firmware


Firmware now contains a list of blobs which can then be copied:

for b in `cat firmware`; do
     if [ -f "$b" ]; then
         install -D $b /lib/firmware/$b
     fi
done


Olaf



More information about the lfs-dev mailing list