内核模块找不到Android设备的固件文件;在那里应该是什么?找不到、在那里、内核、固件

2023-09-05 09:26:06 作者:把心熬成铁

我无法将正确的固件在Android设备上,我不断收到:

I am having trouble placing firmware properly on an Android device, I keep getting:

<3>[ 3590.997375] usb 3-1.4: ath9k_htc: Firmware - htc_7010.fw not found

如果一个标准的Linux机器上运行Ubuntu的,我把htc_7010.fw位于/ lib /固件的话,我没有得到这个错误。

If on a standard linux machine running Ubuntu, I place htc_7010.fw in /lib/firmware then I do not get this error.

不过,如果我把这个固件在Android上/ lib中/固件,我仍然得到错误。我已经尝试了所有的以下目录,仍然收到错误:

However, if I place this firmware in /lib/firmware on Android, I still get the error. I have tried all of the following directories and still receive the error:

/lib/firmware
/etc/firmware
/system/lib/modules
/system/lib/firmware
/system/etc

没有这样的运气...什么决定了固件是应该的,我怎么能确定哪个目录,它是扫描固件?

No such luck... what dictates where the firmware should be, and how could I determine which directories it is scanning for the firmware?

推荐答案

在Android(ICS反正)它有自己的后台程序/服务(或任何你想将它命名),以管理热插拔事件,包括固件请求。在&LT;机器人&GT; /system/core/init/devices.c ,有两个的#define s表示指定地点在哪里固件将被检查:

On Android (ICS anyways) it has its own daemon/service (or whatever you want to call it) to manage hotplug events, including firmware requests. In <android>/system/core/init/devices.c, there are two #defines that specify locations where firmware will be checked:

#define FIRMWARE_DIR1   "/etc/firmware"
#define FIRMWARE_DIR2   "/vendor/firmware"

在ICS的文件系统,我最初的版本,的/ etc /固件不存在(和etc目录似乎是在引导创建符号链接/ init的时间)。我只好把固件在我的NFS目录挂载根文件系统是&LT;挂载点&GT; /系统的/ etc /固件

On my initial build of the ICS filesystem, /etc/firmware didn't exist (and the etc directory seems to be a symbolic link created at boot/init time). The directory I had to place firmware in on my NFS mounted rootfs was <mount point>/system/etc/firmware

这样做了以后,request_firmware()调用从我的模块成功完成。

After doing this, request_firmware() calls from my module successfully completed.