kernel module cannot find firmware file on Android device; where should it be?

前端 未结 3 1483
执笔经年
执笔经年 2021-02-10 02:40

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 foun         


        
相关标签:
3条回答
  • 2021-02-10 02:54

    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:

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

    with :# dmesg I still had error :

    <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.
    

    In fact, like you mentionned :

    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"
    

    - So you have to put your firmware in one of these directories. It worked properly for me, hopefully.


    0 讨论(0)
  • 2021-02-10 03:03

    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.
    0 讨论(0)
  • 2021-02-10 03:10

    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"
    

    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.

    0 讨论(0)
提交回复
热议问题