# Resin OS v4l2 Jetson TX2 loopback

**URL:** <https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184>\
**Category:** Product support\
**Tags:** kernelmodules\
**Created:** [November 17, 2017, 9:15pm UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184 "2017-11-17T21:15:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidnet](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/davidnet/32/667_2.png) [@davidnet](https://forums.balena.io/u/davidnet)\
**Post date:** [November 17, 2017, 9:15pm UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/1 "2017-11-17T21:15:09Z")

</div>

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

> **[umlaeute/v4l2loopback](https://github.com/umlaeute/v4l2loopback/)**
>
> v4l2-loopback device . Contribute to umlaeute/v4l2loopback development by creating an account on GitHub.

The device is Nvidia Jetson TX2.

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

---

<div class="post-metadata">

**Author:** ![\_Page](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/_page/32/22_2.png) [@\_Page](https://forums.balena.io/u/_Page)\
**Post date:** [November 18, 2017, 12:17am UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/2 "2017-11-18T00:17:35Z")

</div>

Hey, you should be able to take [https://github.com/resin-io-playground/kernel-module-build](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](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`

---

<div class="post-metadata">

**Author:** ![davidnet](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/davidnet/32/667_2.png) [@davidnet](https://forums.balena.io/u/davidnet)\
**Post date:** [November 18, 2017, 12:38am UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/3 "2017-11-18T00:38:05Z")

</div>

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

Look at: [Jetson TX2 Kernel Module Extension](https://forums.balena.io/t/jetson-tx2-kernel-module-extension/2175/3)

---

<div class="post-metadata">

**Author:** ![\_Page](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/_page/32/22_2.png) [@\_Page](https://forums.balena.io/u/_Page)\
**Post date:** [November 18, 2017, 12:55am UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/4 "2017-11-18T00:55:52Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![davidnet](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/davidnet/32/667_2.png) [@davidnet](https://forums.balena.io/u/davidnet)\
**Post date:** [November 18, 2017, 2:28am UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/5 "2017-11-18T02:28:43Z")

</div>

@_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

---

<div class="post-metadata">

**Author:** ![telphan](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@telphan](https://forums.balena.io/u/telphan)\
**Post date:** [December 1, 2017, 5:30pm UTC](https://forums.balena.io/t/resin-os-v4l2-jetson-tx2-loopback/2184/10 "2017-12-01T17:30:05Z")

</div>

This was answered here: [Jetson TX2 Kernel Module Extension](https://forums.balena.io/t/jetson-tx2-kernel-module-extension/2175/7)
