内核模块在 Android 设备上找不到固件文件;它应该在哪里?
我在 Android 设备上正确放置固件时遇到问题,我不断收到:
<3>[ 3590.997375] usb 3-1.4: ath9k_htc: Firmware - htc_7010.fw not found
如果在运行 Ubuntu 的标准 Linux 机器上,我将 htc_7010.fw 放在 /lib/firmware 中,则不会收到此错误。
但是,如果我将此固件放在 Android 上的 /lib/firmware 中,我仍然会收到错误。我已尝试了以下所有目录,但仍然收到错误:
/lib/firmware
/etc/firmware
/system/lib/modules
/system/lib/firmware
/system/etc
没有这样的运气...什么决定了固件应该在哪里,以及如何确定它正在扫描哪些目录以查找固件?
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
If on a standard linux machine running Ubuntu, I place htc_7010.fw in /lib/firmware then I do not get this error.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Android 上(无论如何 ICS),它有自己的守护进程/服务(或者任何你想调用的名称)来管理热插拔事件,包括固件请求。在
/system/core/init/devices.c
中,有两个#define
指定检查固件的位置:在我的初始构建中ICS 文件系统,/system/etc/firmware
/etc/firmware
不存在(etc 目录似乎是在启动/初始化时创建的符号链接)。我必须将固件放置在 NFS 安装的 rootfs 上的目录是执行此操作后,来自我的模块的 request_firmware() 调用成功完成。
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#define
s that specify locations where firmware will be checked: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
After doing this, request_firmware() calls from my module successfully completed.
我的固件也有类似的问题:
down3.bin
(之前,我当然已经用
# insmod
插入了我的模块"io_ti.ko"
)当我插入我的设备(USB-RS232 转换器,Digi International EdgeportTI1端口适配器)在我的 Android 平板电脑(Samsung Galaxy Tab 2)上,他无法在“linux android 适配目录”中找到他的固件。
所以,像你一样,我尝试将我的
"down3.bin"
放入:with :
# dmesg
我仍然有错误:事实上,就像你提到的:
- 因此您必须将固件放入这些目录之一。它
希望对我来说工作正常。
I had a similar problem with my firmware named :
down3.bin
(Beforehand, I had insert my module
"io_ti.ko"
with# insmod
of course)When I plugged my device (USB-RS232 converter, Digi International EdgeportTI1 port adapter) on my Android tablet (Samsung Galaxy Tab 2), he was unable to find his firmware in "linux android adapted directories".
So, like you, I tried to put my
"down3.bin"
in:with :
# dmesg
I still had error :In fact, like you mentionned :
- So you have to put your firmware in one of these directories. It
worked properly for me, hopefully.
内核执行用户空间脚本来加载固件。
检查脚本是否位于正确的位置。
/ # cat /proc/sys/kernel/hotplug.默认位置是“/sbin/hotplug”。
在 Android 上,脚本应该是“/system/busybox/sbin/mdev”,因此如果不是,您可以将“/proc/sys/kernel/hotplug”设置为此。
The kernel executes a user-space script to load the firmware.
Check if you have the script on the right location.
/ # cat /proc/sys/kernel/hotplug. The default location is "/sbin/hotplug".
On android the script should be "/system/busybox/sbin/mdev", so you can set "/proc/sys/kernel/hotplug" to this, if it is not.