# Are my kernel headers broken, and how to fix them

**URL:** <https://forums.developer.nvidia.com/t/are-my-kernel-headers-broken-and-how-to-fix-them/147496>\
**Category:** Jetson TX2\
**Tags:** kernel\
**Created:** [August 19, 2020, 10:52am UTC](https://forums.developer.nvidia.com/t/are-my-kernel-headers-broken-and-how-to-fix-them/147496 "2020-08-19T10:52:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![otekik](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@otekik](https://forums.developer.nvidia.com/u/otekik)\
**Post date:** [August 19, 2020, 10:52am UTC](https://forums.developer.nvidia.com/t/are-my-kernel-headers-broken-and-how-to-fix-them/147496/1 "2020-08-19T10:52:46Z")

</div>

Hey!

So, I was trying to build an external kernel module for my Jetson TX2, I am building it natively. When I hit that make, I started seeing lots of “incompatible pointer type” errors and the build failed.

At first, I somehow suspected my code, but at the end I’ve decided to build a “hello world kernel module” on it. You know, a module kprints hello etc. that can be read from dmesg. So, today it is failed to be built. I think I somehow broke my linux headers located at “/usr/src/linux-headers-4.9.140-tegra-ubuntu18.04\_aarch64”.

The device is not fully mine, so I’m trying to avoid re-flashing it. I want to know if it is possible for me to check if they are broken or not, and if there is another way to fix it rather than re-flashing the board. Thanks for your advices, XO!

Edit: I tried to build the hello world module on another TX2 and it completely works! I am sure the headers are broken on the other one. I guess I need to fix it, need help on it.

---

<div class="post-metadata">

**Author:** ![ShaneCCC](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/shaneccc/32/14043_2.png) [@ShaneCCC](https://forums.developer.nvidia.com/u/ShaneCCC)\
**Post date:** [August 20, 2020, 2:50am UTC](https://forums.developer.nvidia.com/t/are-my-kernel-headers-broken-and-how-to-fix-them/147496/3 "2020-08-20T02:50:57Z")

</div>

Have a try to copy the header file and overrides it.

…/Linux\_for\_Tegra/kernel/kernel\_headers.tbz2

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:17pm UTC](https://forums.developer.nvidia.com/t/are-my-kernel-headers-broken-and-how-to-fix-them/147496/5 "2021-10-18T18:17:16Z")

</div>

Closed on October 18, 2021, 6:17pm UTC


