Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6333

Linux kernel out-of-tree module, installation of uapi headers issue

$
0
0

I have an external out-of-tree linux kernel module, say foo. Therein, I have a directory include/uapi/ that should, I assume, contain Kbuild file defining inclusion rules and/or headers to export. The directory include/uapi/ on its turn contains one more directory linux having the target user-API headers in, say three files foo.h bar.h baz.h

Ok, I have defined this Kbuild file inside include/uapi and it contains:

header-y += linux/

Then, inside include/uapi/linux directory I've defined one more KBuild and it has the content:

header-y += foo.h bar.h baz.h

Now I am expecting that upon running the command

make -C /lib/modules/5.4.48-dannftk/build M=/home/dannftk/foo INSTALL_HDR_PATH=/home/dannftk/my_exported_headers/ headers_install

I will get the headers installed in the /home/dannftk/my_exported_headers/ directory, instead, I am getting the error saying:

make: *** No rule to make target 'headers_install'. Stop.

  • /home/dannftk/foo - the path the out-of-tree module discussed is located by
  • /lib/modules/5.4.48-dannftk/build - the build directory of the kernel, it points to /usr/src/linux-5.4.48 containing the source code of the kernel, actually, I am on Gentoo Linux

May someone give me a hint what I am doing wrongly? Am I incorrectly setting rules for Kbuild? Or maybe I am locating them in unexpected for the kernel build system directories?

Thank you in advance


Viewing all articles
Browse latest Browse all 6333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>