Modprobe directory changed

Hi,
I am using Colibri iMX7d 1Gb eMMC V1.1A with Colibri evaluation board V3.2b running embedded linux v2.8b6 from yocto. I have changed the device tree and kernel using

ums 0 mmc 0

during u-boot. I have build the kernel from source as described here. The problem is

modprobe imx_rpmsg_tty

was working fine but after changing the kernel,while modprobe, I am getting the following error

modprobe: FATAL: Module imx_rpmsg_tty not found in directory /lib/modules/4.9.166-00001-g6bd85ffba9f2-dirty

The modprobe is looking for kernel-modules in a directory that doesn’t exist. The name of the folder that I have in /lib/modules is 4.9.166-2.8.6+gd899927728be. Is this due to kernel mismatch? Is it possible to change the directory that modprobe looks for the kernel-modules?

Thanks and Regards,
Nishanth

HI @nishanth1829

What is your kernel name ( uname -a)?

Best regards,
Jaski

Hi @jaski.tx ,
My kernel name is

4.9.166-00001-g6bd85ffba9f2-dirty

Thanks for your quick reply.
Regards,
Nishanth

Hi @nishanth1829

Thanks for this Information. If you create a custom kernel, you also need to build and deploy the kernel modules.

Best regards,
Jaski

Hi @jaski.tx ,
Will compiling the kernel does not include the kernel-modules into the kernel?
Regards,Nishanth

No, one can choose the modules to be in Kernel or compiled as kernel modules separately. If the kernel modules are compiled separately, then they should be deployed as described here.

Best regards,
Jaski