0

I am new to linux .i have to compile a device driver sample code.

i tried to install linux-source-2.6.38 from the synaptic, then it showed the message quoted below:

This package provides the source code for the Linux kernel version 2.6.38.

This package is mainly meant for other packages to use, in order to build custom flavours.

If you wish to use this package to create a custom Linux kernel, then it is suggested that you investigate the package kernel-package, which has been designed to ease the task of creating kernel image packages.

If you are simply trying to build third-party modules for your kernel, you do not want this package. Install the appropriate linux-headers package instead.

So get confused that:

1) a linux-source needed or not for my device driver code compilation ?

2) if i install the new kernel how can i work with the new kernel ?

ThinkingStiff
65.4k31 gold badges148 silver badges241 bronze badges
asked Feb 9, 2012 at 10:07

2 Answers 2

1

You probably need packages like linux-headers-2.6-amd64 and linux-kbuild-2.6. Use apt-cache search linux headers and apt-cache search linux kbuild to find exactly the name of the packages.

You could use apt-cache search linux headers and apt-cache search linux kbuild to get the exact name of the package.

If you are making a module (a dynamically loadable kernel module *.ko) you don't need to build a new kernel. Use insmod or modprobe to load it.

Sign up to request clarification or add additional context in comments.

Comments

1

for your first question, source code is not required for compiling your kernel modules and make sure that while inserting your module you must have root privilege

and for your second question if you want to compile the source code refer any kernel compilation links like http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

answered Nov 27, 2012 at 5:24

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.