6

我无法在 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

没有这样的运气......什么决定了固件应该在哪里,我如何确定它正在扫描固件的目录?

4

3 回答 3

8

在 Android 上(无论如何是 ICS),它有自己的守护进程/服务(或任何你想调用的)来管理热插拔事件,包括固件请求。在<android>/system/core/init/devices.c中,有两个#defines 指定将检查固件的位置:

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

在我最初构建的 ICS 文件系统中,/etc/firmware它并不存在(并且 etc 目录似乎是在引导/初始化时创建的符号链接)。我必须在 NFS 安装的 rootfs 上放置固件的目录是<mount point>/system/etc/firmware

完成此操作后,来自我的模块的 request_firmware() 调用成功完成。

于 2012-08-09T13:23:15.630 回答
2

我的固件也有类似的问题:(down3.bin
之前,我当然插入了我的"io_ti.ko"模块# insmod

当我将我的设备(USB-RS232 转换器、Digi International EdgeportTI1 端口适配器)插入我的 Android 平板电脑(Samsung Galaxy Tab 2)时,他无法在“linux android 适配目录”中找到他的固件。所以,像你一样,我试着把我"down3.bin"的:

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

与:# dmesg我仍然有错误:

<6>[00000.00000] io_ti 1-1:1.0 : Edgeport TI 1 port adapter converter detected
<6>[00000.00000] Failed to load image "edgeport/down3.bin" err-2
<6>[00000.00000] io_ti:probe of 1-1:1.0 failed with error -5
err -2 = [ENOENT] = No such file or directory.

事实上,就像你提到的:

<android>/system/core/init/devices.c中,有两个#defines 指定将检查固件的位置:

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

- 所以你必须把你的固件放在这些目录之一。希望它对我有用。


于 2013-04-04T13:39:39.333 回答
1

The kernel executes a user-space script to load the firmware. Check if you have the script on the right location.

  1. Check the which location the kernel looks for the script. / # cat /proc/sys/kernel/hotplug. The default location is "/sbin/hotplug".
  2. Check if you have the script, the kernel is looking for, in this location. On android the script should be "/system/busybox/sbin/mdev", so you can set "/proc/sys/kernel/hotplug" to this, if it is not.
于 2011-06-27T09:33:42.720 回答