PDA

View Full Version : Help Understanding User Include Linux Header Files After Kernel Upgrade



danmartinj
12-03-2014, 09:36 PM
Hello,

I am trying to port a small Linux Kernel module and additional User Land Code originally built on Kali Linux with a 3.14 kernel to Debian Wheezy. I upgrade the Wheezy kernel to 3.14 and the kernel module seems fine but the user land component seems to not build correctly.

To be more specific its the linux/netfilter/nf_nat.h file which the program cannot find. I am just wondering from a general stand point, now that I have updated the Debian Linux Kernel from 3.2 to 3.14 how can I update the user land include files? Or is there a better way of getting this stuff to work?

Thanks,

Joe

manasij7479
12-03-2014, 10:07 PM
Install the linux-headers package.
(And iirc, with the new kernels, you have to build the kernel on your machine at least once to invoke the out of tree module makefile in its context)

danmartinj
12-05-2014, 10:33 PM
Thanks for your help manasij7479,
When I originally compiled the new kernel I used make-kpkg and I also built custom header-files into a deb package and I installed those kernel header files. When I try to install the linux-headers package as you suggested it seems it is already up to date. It appears linux-headers package install kernel headers and not the /usr/include headers?

I am really just trying to update the /usr/include files and associated C files so that it more resembles kali linux 3.14 kernel so that I can compile my C programs. As far as I can tell the linux kernel files are up to date using 3.14 kernel but everything else is still from the original Debian wheezy. Perhaps you have more suggestions?

Thanks again, I am not a C developer and I am not very experienced with Linux so any suggestions or comments are really appreciated.

Joe.