[CMake] Building linux kernel module with Cmake

Suhas Jain suhasj at aftek.com
Thu Nov 1 05:48:59 EDT 2007


Thanks for you reply Hendrik
Even I know that Kbuild is a very simple procedure to do so.
But I have a source tree which has applications, drivers and other modules
for different OS as well as hardware architectures and I want to compile all
these folders from a single top level directory. All this can be achieved
with Cmake utlity. I have already compiled other modules. 
I want to know if it possible to use cmake for compiling kernel module

-----Original Message-----
From: cmake-bounces+suhasj=aftek.com at cmake.org
[mailto:cmake-bounces+suhasj=aftek.com at cmake.org] On Behalf Of Hendrik
Sattler
Sent: Thursday, November 01, 2007 3:00 PM
To: cmake at cmake.org
Subject: Re: [CMake] Building linux kernel module with Cmake

Am Donnerstag 01 November 2007 schrieb Suhas Jain:
> I am a newbie with cmake and am trying to build a Linux device driver
> with this utility.
>
> I have tried this utility with building applications. It works fine.
> But, I am not able to compile the kernel modules.
>
> I have a makefile for this driver which uses KBuild for compiling the
> driver and generates a .ko file.
>
> Can anybody please help me?

I don't see the point using cmake for such a task. Using Kbuild with a
_very_ 
short Makefile (that never changes) and one Kbuild file, it's already simple

enough. There is also no cross-platform support needed (it's going to be a 
linux kernel module anyway).

HS
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake





More information about the CMake mailing list