Software Archive
Read-only legacy content
17061 Discussions

Writing a kernel module for Xeon Phi

Jun_Hyun_S_
Beginner
230 Views

Hello, I have written a simple kernel-space memory allocator module for Xeon Phi, but I have yet to figure out how it builds.

It should compile from the host, but there is no Xeon Phi-specific build /lib/modules/ folder.

I copied one from the ramfs in running Xeon Phi (2.6.38.8+mpss3.4.2), but then there is no 'build' folder initialized.

Is there any documentation or an article to guide me through?

0 Kudos
1 Reply
Jun_Hyun_S_
Beginner
230 Views

Nevermind, I found a nice, succinct solution by Mr. Powers from Intel here: https://software.intel.com/en-us/forums/intel-many-integrated-core/topic/505659

The sequence of commands works, except that I had to prefix CROSS_COMPILE with the full path (/usr/linux-k1om-4.7/bin/) and fuse.ko somehow didn't make it to the module build path: /lib/modules/2.6.38.8+mpss3.4.2/, and an error showed upon 'sudo make modules install'. I had to copy fuse.ko from the kernel build directory. Other than that, everything worked like a charm.

0 Kudos
Reply