Jetson TX2 Kernel Module Extension


#1

Hi everyone I’m trying to follow the Kernel Module load and compilation and I’m hitting the following error, why the opcodes library is not included? any ideas?

thanks

root@ac944d2:/usr/src/app# ./build.sh 'jetson-tx2' '2.7.4+rev1.prod' example_module 
Building images/jetson-tx2/2.7.4+rev1.prod/kernel_modules_headers.tar.gz...
--2017-11-15 17:15:57--  https://files.resin.io/images/jetson-tx2/2.7.4%2Brev1.prod/kernel_modules_headers.tar.gz
Resolving files.resin.io (files.resin.io)... 34.225.84.11, 54.83.178.117
Connecting to files.resin.io (files.resin.io)|34.225.84.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9336559 (8.9M) [application/x-tar]
Saving to: 'kernel_modules_headers.tar.gz'

kernel_modules_headers.tar.gz                                       100%[==================================================================================================================================================================>]   8.90M  3.68MB/s    in 2.4s    

2017-11-15 17:16:01 (3.68 MB/s) - 'kernel_modules_headers.tar.gz' saved [9336559/9336559]

make: Entering directory '/tmp/tmp.9gvOdW0OKh'
  CC [M]  /usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod/hello.o
In file included from ./arch/arm64/include/asm/sysreg.h:23:0,
                 from ./arch/arm64/include/asm/cpufeature.h:13,
                 from ./arch/arm64/include/asm/hw_breakpoint.h:20,
                 from ./arch/arm64/include/asm/processor.h:33,
                 from ./arch/arm64/include/asm/spinlock.h:21,
                 from include/linux/spinlock.h:87,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/uapi/linux/timex.h:56,
                 from include/linux/timex.h:56,
                 from include/linux/sched.h:19,
                 from ./arch/arm64/include/asm/compat.h:25,
                 from ./arch/arm64/include/asm/stat.h:23,
                 from include/linux/stat.h:5,
                 from include/linux/module.h:10,
                 from /usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod/hello.c:2:
./arch/arm64/include/asm/opcodes.h:5:43: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory
compilation terminated.
scripts/Makefile.build:267: recipe for target '/usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod/hello.o' failed
make[1]: *** [/usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod/hello.o] Error 1
Makefile:1414: recipe for target '_module_/usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod' failed
make: *** [_module_/usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod] Error 2
make: Leaving directory '/tmp/tmp.9gvOdW0OKh'
root@ac944d2:/usr/src/app# Connection to ssh.resindevice.io closed.

#2

Hi, thanks for the report. We’ll take a look at this and come back to you.


#3

Nada, even from the Docker,

 scripts/Makefile.build:267: recipe for target '/usr/src/app/example_module_jetson-tx2_2.7.4+rev1.prod/hello.o' failed
 ./arch/arm64/include/asm/opcodes.h:5:43: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory

Any suggestions?


Resin OS v4l2 Jetson TX2 loopback
#5

@telphan please take a look at this issue. Thanks


#9

Hello @davidnet,

I am so sorry that this took such a long time, but I finally managed to look into this. Indeed the opcode.h is missing from the headers. I was a bit confused as to why we need that, but it seems like older versions of the linux kernel still include opcodes for 32-bit architecture. opcodes.h

I have pushed a fix to our staging server, so if you could change this:

into files_url='https://files.resinstaging.io and try it again, you should be able to build your module now.

I will push this fix to our production server next week.

Kind regards,
Theodor


#11

@telphan
Nada, getting the same error while downloading from https://files.resinstaging.io/images/jetson-tx2/2.7.2%2Brev5.dev/kernel_modules_headers.tar.gz , I’m getting the same error

make: Entering directory ‘/tmp/tmp.tLx61of6T6’
[Build] CC [M] /usr/src/app/v4l2loopback_jetson-tx2_2.7.2+rev5.dev/v4l2loopback.o
[Build] 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.2+rev5.dev/v4l2loopback.c:17:
[Build] ./arch/arm64/include/asm/opcodes.h:5:43: fatal error: …/…/arm/include/asm/opcodes.h: No such file or directory


#12

@davidnet The version has also been bumped, v2.8.1+rev1. I forgot to mention that.


#14

Hi! When should we see version 2.8.1 on prod?


#15

I’m afraid the TX2 maintainer is on holiday this week, so I can’t definitively give you an ETA right now. This version is now available on staging though, if you’d like to test it there, and I would expect it to reach production very soon. We’ll let you know more as soon as we can.


#18

Hi,
Sorry for the delay, but I was away last week. We should see a release on the tx2 this week. We will send you a message when it happens.
Kind regards,
Theodor


#19

Hello,
Earlier this week we have release the Jetson TX2 to v2.9.7. Enjoy!
Kind regards,
Theodor