FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12682 questions

15065 answers

24137 comments

47098 members

0 votes
797 views 19 comments
by

Hi,

I have the latest teltonika firmware for RUT955: RUT9_R_00.07.01.2. 

I tried to install kmod-video-uvc, but i got the following error:

root@Teltonika-RUT955:/# opkg install kmod-video-uvc
Unknown package 'kmod-video-uvc'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-nls-base
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-usb-core
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-dma-buf
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-dma-buf found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-i2c-core
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-video-core
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-core found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-video-videobuf2
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-videobuf2 found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-input-core
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-input-core found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-video-uvc
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-uvc found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package kmod-video-uvc.

So i downloaded the SDK and compiled the package/kernel/linux with VIDEO UVC selected from a make menuconfig run. 

And tried to install my built kmod-video-uvc and got:

root@Teltonika-RUT955:/tmp/kernelz# opkg install kmod-video-uvc_5.4.147-1_mips_24kc.ipk  
Unknown package 'kmod-video-uvc'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-nls-base
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-usb-core
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-dma-buf
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-dma-buf found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-i2c-core
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-video-core
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-core found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-video-videobuf2
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-videobuf2 found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.143-1-79c5dc6db69102eb2943a96b9bec8b63) for kmod-input-core
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-input-core found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.4.147-1-unknown) for kmod-video-uvc
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-video-uvc found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package kmod-video-uvc.

Anyone have any ideas why the pre-built kmod packages dossen't work with the firmware provided by teltonika and why the custom build package with the correct SDK dossen't work, i know i have the right version of the SDK since i use it to build other custom packages.

Any help or pointers would be appreciated!

1 Answer

+1 vote
by
Hello,

When you install your custom built kernel module via opkg install, make sure it takes the correct ipk not the one from the opkg update list. For that, execute rm /tmp/opkg-list/* and retry.

Regards,
Best answer
by

I manually extracted and modules.d files and lib/modules files and made a list to keep track of them.

Now i get this at boot:

[   27.294359] videobuf2_memops: Unknown symbol put_vaddr_frames (err -2)
[   27.301427] videobuf2_memops: Unknown symbol get_vaddr_frames (err -2)
[   27.308450] videobuf2_memops: Unknown symbol frame_vector_destroy (err -2)
[   27.315814] videobuf2_memops: Unknown symbol frame_vector_create (err -2)
[   27.388114] kmodloader: 3 modules could not be probed
[   27.404200] kmodloader: dependency not loaded videobuf2-vmalloc
[   27.428669] kmodloader: - uvcvideo - 1
[   27.436653] kmodloader: - videobuf2-memops - 0
[   27.456668] kmodloader: dependency not loaded videobuf2-memops
[   27.472709] kmodloader: - videobuf2-vmalloc - 1

 

Seems like something is broken!, checking online it seems like the kernel needs to be configured with some option FRAME_VECTOR, how can i do this IF it is the source of the issue?

From some mailinglist:

diff --git a/mm/Kconfig b/mm/Kconfig
index 9b8fccb969dc..cfa6a80d1a0a 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -701,7 +701,7 @@  config ZONE_DEVICE
          If FS_DAX is enabled, then say Y.

 config FRAME_VECTOR
-       bool
+       tristate "frame vector"

 config ARCH_USES_HIGH_VMA_FLAGS
        bool




All files shows up as loaded in when issuing lsmod, it seems like somthing else is missing in the kernel.
by
I finally fixed it, it turns out your kernel need to be built with the option above if the videobuf2_memops is to be loaded as a module.

So i just flashed the modem with my own image (so that i get the custom kernel).

Now the everyting works verified on the modem and webcam works fine, i can take my pictures.

Thanks to Flebourse for all the help!

R.
by
Turns out there was two issues, the .143 to .147 subversion and kernel hash one, and the FRAME_VECTOR one. So forcing the kernel hash was doomed anyway due to the second.

Where did you put the patch ?
by
Never put the patch anywhere, never used it, instead i run make menuconfig and selected the kernelmodules -> video (all modules) to include in image so (*) instead of (M). ran make -j10 -k after that and flashed the router with the generated image, after modem reboot it all worked, detection of USB camera and taking a picture periodically worked fine.

But i guess you can go to build_dir/target-mips.../linux-ath79_generic/linux-5.4.147/mm/Kconfig and apply the patch to that Kconfig or just change the affected line from "bool" to: { tristate "frame vector" } as mentioned above, but i never tried it, however the pro with having a kernel installed with the patch is that you could build ipks modulary {M} and your custom modules should be able to find the kernel address space even if you load them after boot a.k.a. loading a .ko file with "insmod". But as i said i never tried it just builded them into kernel with {*}, and flashed.

R.
by
I have added it to target/linux/ath79/patches-5.4/950-mm-tristate-frame-vector.pach to be immune to a make clean.

Btw, kudos for your RS485 comment.