c++ - What do I need to compile the kernel on Ubuntu Eee? -


I'm trying to follow a tutorial to create a custom USB driver in Linux and let me know this from my EE Expect to develop on PC using G ++ with Ubuntu E. Unfortunately, to follow the tutorial I need Linux / module O header file. I understand that I need to compile the kernel to do this work. I've never compiled the kernel and I think all instructions are for desktop Ubuntu.

I am doing this on my EE because I will get extra credit in one class if I can do it and I can use it in a class project.

The tutorials that I am following are here: and here:

major Linux Most distros (all?) Not only distribute the Linux kernel, but also apply several patches for it. By improving sustainability and adding many features. You will want to use Ubuntu's package system to capture Uberunt's Purchased kernel source!

You probably need to rebuild not Kernel! Most likely, you need only kernel header packages for your current kernel to compile your USB driver. Let's say that you are making it as a kernel module, then you can load it with modprobe or insmod. (LSMOD and RMMOD is also useful.)

If you need to recreate the kernel, well, it's easy (there are so many on the web.) You are trying to find out that What options do you want, what you want, and what you want to quit. You can shorten the kernel, but you can remember some of that stuff.



Modified to add:

I remember that "sudo apt - linux-headers-e Install eepc, "Do I need more than that? If not, where are those headers because my test code includes" linux / module.h "

Alternatively, Linux In the package such as header-2.6.27-7, the file includes /usr/src/linux-headers-2.6.27-7/include/linux/module H. then come Just press / usr / src / * / include / linux / module.h. .

Alternatively, try:

% Detect linux / module.h. Grep 'linux / module.h $'

or

% Search /-path '* / linux / module.h' < / P>

(It may take some time to locate complete ...)


Comments