Here is step by step procedure for LINUX KERNEL compilation inside Eclipse-CDT.

1) Download Eclipse-CDT and install

$ sudo apt-get install eclipse-cdt

2) Make a directory which holds kernel source

$ mkdir kernel_source

and copy kernel source code inside to this,

$ cp linux.x.xx/ kernel_source/ -r

3) Configure kernel with following options enabled, if your are looking for debugging kernel

$ make menuconfig

Enter inside Kernel Hacking section; select Kernel Debugging; check “Compile the kernel with debug info” and “Compile the kernel with frame pointers”.

4) Open Eclipse

$ eclipse

In order to save time, just disable automatic building and indexing, by navigating through following options,

Go to Window –> Preference –> General –> Workspace and disable the option “Build automatically”. To disable indexing, visit Window –> Preference –> General –> C/C++ –> Indexer. Select “No Indexer”.

To proceed, select File –> New –> C Project. Give a name to your project, uncheck “Use Default Location” and browse to your kernel source-code directory. From Project Type, select Makefile Project –> Empty Project. If you want to cross-compile the kernel, and you already have some other tool chain installed, you can choose it from “Toolchain”. Click Finish to complete this initial step.

5) Compiling linux kernel

Right click on the audhil directory, and select Build project option, Kernel will start to compile as shown below.

compilation At last you may see kernel image at arch/x86/boot/bzImage.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s