Udc-core not recognising gadget drivers. Adding to list of pending drivers

I am unable to add my gdget driver to the kernel module. I keep getting this error :
“udc-core: couldn’t find an available UDC - added [ubq_gadget] to list of pending drivers”

I was supposed to edit the kernel config and tried doing the same, but when I run
sudo make menuconfig

I get the following error:
drivers/net/ethernet/nvidia/Kconfig:30: can’t open file “drivers/net/ethernet/nvidia/eqos/Kconfig”

I followed the solution in this Menuconfig on Jetson Nano 4GB - kernel build

but am unable to resolve it. Could you please help me in this issue?

I’ll post some info tomorrow morning.

Thank you for the help.

Just want to add, if you compile natively on the Jetson, then don’t use “ARCH=arm64” (this is only for cross compile). If you cross-compile, then you need to also name tool chains. In all cases you need a base configuration (such as “tegra_defconfig”) prior to using menuconfig.

Thank you. I still cannot use the make menuconfig option.

scripts/kconfig/conf --oldconfig Kconfig
arch/arm64/Kconfig:1239: can’t open file “drivers/firmware/tegra/Kconfig”
scripts/kconfig/Makefile:86: recipe for target ‘oldconfig’ failed
make[1]: *** [oldconfig] Error 1
Makefile:575: recipe for target ‘oldconfig’ failed
make: *** [oldconfig] Error 2

I keep getting this error. I am not sure how to resolve it.

You have to start with some default value, e.g., the make target “tegra_defconfig”. Did you perform that prior to trying menuconfig? Also, if you use the “O=/some/where”, then be sure to use that on every build command.

Hello. Sorry for the late reply. I was able to compile the kernel and access the menuconfig. I enabled the gadget support. I used /opt/nv4-l4t-device-mode.sh script (need to write “exit 0”) to prevent autoload of the gadget on boot. I then tried inserting my own driver module, but the dmesg says :
“failed to start error -2”
I am not sure how to solve this. I was able to load a gadget using the steps provided here. But, I am not able to load my own gadget module.

Did you configure the kernel source to match your running (original, working) kernel before menuconfig?

Yes I did. The menuconfig is working now, but I cannot load my own module as a gadget. I however can use configfs to load a gadget. I am not sure if the kernel premits loading of gadgets as a module during runtime (custom gadget).

Modules must be coded a bit differently than integrated function. If you used menuconfig and it offered to build as a module (“m”), then the code has module availability. Was your module configured with the “m” key in menuconfig? If so, then the issue is something different, e.g., the gadget has incomplete configuration.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.