Resin OS v4l2 Jetson TX2 loopback

Hi everyone! Is there any tutorial or documentation on compiling dynamically modules ? I’m trying to build the following project

The device is Nvidia Jetson TX2.

BTW there is any difference between device Nvidia TX2, and NVIDIA TX2 SK ? also SK = SDK

Hey, you should be able to take https://github.com/resin-io-playground/kernel-module-build is a starting point and then:

  • add either a git clone https://github.com/umlaeute/v4l2loopback/ in the Dockerfile.template or a curl/wget and extract of one of the release bundles in https://github.com/umlaeute/v4l2loopback/releases
  • change the example_module to v4l2loopback
  • install any extra build dependencies you need in the apt-get install in of the Dockerfile.template

@_Page
Nada, the example and code fails because is missing opcodes.h

Look at: Jetson TX2 Kernel Module Extension

@davidnet it looks from those logs like you’re trying to build the example hello.c so it’s possible you’ll have more luck trying to build your actual module by changing the example_module to v4l2loopback. Beyond that the thread you linked says @telphan is going to look into the opcodes issue so you’ll have to wait for him to investigate as he is the person with the knowledge to handle that

@_Page nada, same error

In file included from ./arch/arm64/include/asm/sysreg.h:23:0,
[Build]                     from ./arch/arm64/include/asm/cpufeature.h:13,
[Build]                     from ./arch/arm64/include/asm/hw_breakpoint.h:20,
[Build]                     from ./arch/arm64/include/asm/processor.h:33,
[Build]                     from ./arch/arm64/include/asm/spinlock.h:21,
[Build]                     from include/linux/spinlock.h:87,
[Build]                     from include/linux/vmalloc.h:4,
[Build]                     from /usr/src/app/v4l2loopback_jetson-tx2_2.7.4+rev1.prod/v4l2loopback.c:17:
[Build]    ./arch/arm64/include/asm/opcodes.h:5:43: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory
[Build]    compilation terminated.
[Build]    scripts/Makefile.build:267: recipe for target '/usr/src/app/v4l2loopback_jetson-tx2_2.7.4+rev1.prod/v4l2loopback.o' failed
[Build]    make[1]: *** [/usr/src/app/v4l2loopback_jetson-tx2_2.7.4+rev1.prod/v4l2loopback.o] Error 1
[Build]    Makefile:1414: recipe for target '_module_/usr/src/app/v4l2loopback_jetson-tx2_2.7.4+rev1.prod' failed

same missing opcodes.h

This was answered here: Jetson TX2 Kernel Module Extension