确定并删除未使用的固件文件

确定并删除未使用的固件文件

我正在尝试精简 Alpine Linux 安装,以便它可以安装在瘦客户端存储空间非常有限。全新安装后,我发现大部分磁盘空间被固件文件占用:

在此输入图像描述

显然,其中很大一部分将用于未安装到系统中并且永远不会使用的硬件。有没有办法确定实际使用了哪些固件文件,以便我可以删除所有未使用的固件文件?

答案1

实际加载的固件将在/var/log/syslog.所以你可以在那里查看正在使用的那些。

固件加载过程以及如何检查/调试详见这一页

How is Firmware Used?

Each driver for devices that require firmware have some special logic to retrieve firmware from files in /lib/firmware. The basic process is:

    Driver requests firmware file "ar9170.fw"
    The kernel sends an event to udev asking for the firmware
    The udev program runs a script that shoves the data in the firmware file into a special file created by the kernel
    The kernel reads the firmware data from the special file it created and hands the data to the driver
    The driver then does what it needs to do to load the firmware into the device 

If everything goes well you should see something like the following in your /var/log/syslog:

[ 12.860701] iwlagn 0000:03:00.0: firmware: requesting lbm-iwlwifi-5000-1.ucode
[ 12.949384] iwlagn 0000:03:00.0: loaded firmware version 8.24.2.12

相关内容