Trying to build a module with no luck

Running a TX2 inside a ConnectTech Rudi.

I’m trying to build the Magewell USB HDMI capture module without luck. See info below

===================================================
      Magewell ProCapture Linux Driver Installer
===================================================

Checking for required tools ... Done.
Checking for required packages ... 

Your system is missing kernel development packages which
is required to build and load the ProCapture Linux driver.

Required packages: kernel-devel

Please make sure that the correct versions of these packages are
installed.  Versions required: 4.4.38+

Please check mwcap_install.log for more details.
If you are experiencing difficulty with this installation
please contact support@magewell.net

When I try to run the installer app I get the error that the required package is missing: kernel-devel

I then tried to get the Linux headers and see this issue:

sudo apt-get install linux-headers-`uname -r`
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.4.38
E: Couldn't find any package by glob 'linux-headers-4.4.38'
E: Couldn't find any package by regex 'linux-headers-4.4.38'

I did some research and tried to go to /usr/src/linux-headers-4.4.38-tegra and run “sudo make modules_prepare” it errors out with:

CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: 'include/generated/mach-types.h' is up to date.
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
grep: scripts/../arch/x86/entry/syscalls/syscall_32.tbl: No such file or directory

I am at a loss at what to do now as I have exhausted my searching abilities. Can someone please help?

You’re using x86, which in turn means you are building for a desktop PC host machine, not the Jetson. Have you tried building this directly on the Jetson?

Hi 3DCADGuy,

You can try building external kernel modules on TX2 platform (AARCH64) directly.
If you want to cross-compile on another system, you need download L4T source and set up the cross-compile toolchain, the detail steps you can refer L4T documentation.
Kernel Customization -> Building External Kernel Modules

Download from: https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-1

I am facing the same issue with L4T 28.2. But I’m not doing cross-compilation.

I’m trying to interface an arduino board with TX2, but facing problems due to some missing drivers. Any idea how I can proceed?

Here are the full details: https://devtalk.nvidia.com/default/topic/1038629/jetson-tx2/unable-to-install-cp210x-drivers-for-usb-serial-communication-on-tx2-with-orbitty/

Answered in the other thread.