perfstr Posted November 14, 2022 Posted November 14, 2022 Hello, once I developed my appliance based on Armbian with Kernel 3.4. And the goal of the appliance was to work as custom USB gadget. The appliance was based on sunxi_usb_udc. Now, after big delay I returned to the need of bulding a new appliance with similar functionality. As far as I understand, there is a problem with UDC module in kernel 5.x. Am I right? Can I build my custom system based on legacy (v.4.x) kernel to workaround the problem or there is a better suggestion with available information for fast startup? Please advise. Thanks in advance. 0 Quote
Werner Posted November 14, 2022 Posted November 14, 2022 You can always try to fetch the armbian/build repository selecting an older tag but chances are high that compiling will not work since those tags obviously cannot revert changes from upstream or other dependencies Armbian relies on. Fixing if necessary is up to you. I think 5.10 is legacy at the moment for sunxi. Older kernels are no longer available in master branch. I don't know about sunxi_usb_udc. Is that one of those vendor developed and never maintained or even upstreamed hardware-specific drivers? 0 Quote
perfstr Posted November 14, 2022 Author Posted November 14, 2022 I think i created the problem by attempt to customize the kernel configuration. Using the custom image I was not able to load module g_ether, got error about UDC problem. But if I load the module in standard Armbian desktop system, there is no problem. I will try now the standard console system and check, if the problem appears there. Will update later. 0 Quote
perfstr Posted November 14, 2022 Author Posted November 14, 2022 The g_ether works correctly also in standard console image. 0 Quote
perfstr Posted November 14, 2022 Author Posted November 14, 2022 Hi, please review and let me know, if there is a better way to create custom USB gadget.. The libusbgx library (https://github.com/linux-usb-gadgets/libusbgx) and examples were used. After compilation, there was a problem to run example. First of all, there was no usb_gadget in /sys/kernel/config folder. It appeared after calling this sequence # to create usb_gadget folder modprobe g_ether # not required rmmod g_ether The next commands prepare libusbgx environment, as per its README file. umount /sys/kernel/config #this removed error in the next comand mount -t configfs non /sys/kernel/config After that it was possible to run libusbgx examples. In order to run more than one example, their name should be different. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.