when making a myuvc.c to generate a myuvc.ko module or ins, some warnings reported of some funcs not defined(they are defined in drivers/media/video/uvc/*.c and there are references of them in myuvc.c).
check they whether appear in Module.symvers in linux dir, as a result, they don't().
run the below command to make they be presented in Module.symvers:
'make modules'// no such command run before for this kernel
drivers/media/video/uvc is configured as compiled as uvcvideo.ko module.
when 'make modules', all funcs symbols defined in uvc/*.c to be added to Module.symvers.
if compiling successfully, /lib/modules/[linux_ver]/build/drivers/media/video/uvc/uvcvideo.ko generated.
when making myuvc.c, it will check symbols defined out of myuvc.c whether present in linux_src/Module.symvers or Module.symvers in the current dir, if don't, throwing out warning like above described.
error unable to install myuvc.ko after reboot Ubuntu
dmesg:
[ 288.035856] myuvc: Unknown symbol video_ioctl2
[ 288.036067] myuvc: Unknown symbol video_unregister_device
[ 288.036135] myuvc: Unknown symbol video_device_alloc
[ 288.036185] myuvc: Unknown symbol video_register_device
[ 288.036292] myuvc: Unknown symbol video_device_release
but video_ioctl2 and the rest are present in Module.symvers in linux src dir.
solution:
sudo modprobe uvcvideo
sudo rmmod uvcvideo
sudo insmod myuvc.ko
installation is successful:
[ 391.616770] usbcore: registered new interface driver myuvc