The error message you had before 'error inserting 'g_hid.ko': -1 No such device.' is due to incomplete hid gadget driver. You can followDocumentation/usb/gadget_hid.txt to add your own platform device portion.
接上文,配置编译gadget HID模块
make modules后在driver/usb/gadget目录下生成g_hid.ko
执行加载命令:
root@XXX:/mnt# insmod g_hid.ko
insmod: can't insert 'g_hid.ko': No such device提示错误。
在TI 技术论坛上看到相关技术回复:

本文继续探讨Linux Gadget中的HID设备模块。在完成编译生成g_hid.ko模块后,遇到加载错误提示'error inserting 'g_hid.ko': -1 No such device.'。根据TI技术论坛的建议,该错误源于hid gadget驱动不完整,需要参照Documentation/usb/gadget_hid.txt来添加平台设备部分。作者尝试并成功应用了一个适用于3.3内核的补丁。
最低0.47元/天 解锁文章
4466

被折叠的 条评论
为什么被折叠?



