Compiling A New Kernel


Recommended Posts

ok, as most of you probably know I am goign to attmept to compile my own kernel. but I got one little problem. how do I go about getting everything I need? I know I need the kernel source, and the modules, are all the modules seperate or do I they generally come with the Kernel source? And where would I get them?

Any and all input greatly appreciated. This is something new for me, so be prepared for a lot of questions throughout the process.

Link to post
Share on other sites

you get just the sources.. the modules are apart of the source..

things you sould do..

one your kernel is under /boot

look in there and see what files are there..

one should be System.map

and the kernel will be somehting like vmlinuz.. if you don't see that post a ls of the /boot folder and we will tell you.. so you can back them up.

when the kernel sources are installed it is linked to /usr/src/linux

to configure your kernel one of two commands..

make menuconfig

or if you what a gui

make xconfig

things you should look at

under /boot/grub should be grub.conf, this is your boot file.. (it may be lilo.conf under /etc I am not sure with ubuntu)

always make a backup of any files you edit..

cp <filename> <newfilename>

I'll think of more..

oh you must be root to install but not to compile..

Link to post
Share on other sites

kewl,

Ubuntu uses GRUB. and I know where the vmlinuz is. would I be able to use the sources from synaptic, 2.6.12 or do you think I would be better off working with the newest stable release 2.6.15?

Link to post
Share on other sites

I would probably go with a new realease, I personally think it is worth the effort to take the time and only compile modules you need (but be prepared to boot with a live cd and chroot to re-compile because you missed something) rather than using something like genkernel. The most important thing to do is know as much about your hardware as possible. Also anything required for boot must be compiled in, in particular filesystem support and IDE/SATA drivers.

EDIT:

You will also need to recompile any external drivers (ndiswrapper, alsa-driver, nvidia, ati...etc).

Edited by naraku9333
Link to post
Share on other sites

AFAIK Ubuntu inherited Debian's kernel build and packaging system. You get the same kernel either way but it's nice to have it packaged.

Edited by jcl
Link to post
Share on other sites

streamlining the system, getting all my equipment to work, only having modules I will use. for example: With the base ubuntu 5.10 you get bluetooth support, I have removed that module from my rc.d files since I don't use, or plan to even own, bluetooth compatible items. And there are plenty of other modules that load, and "run" after bootup that I don't feel I need to have an operating system.

I know there are a lot of modules I don't need or use. This won't be for general release, only for my computer. Probably the only thing I may submit to them would be the compatibility for the GE optical mouse that I have, once I get it working. I know there are a lot of Ubuntu users with this mouse that have the same problem I do. This shouldn't be the case. All PC components should have the availability to work. I understand not everything will work because of the manufacturers not releasing the code.

The biggest thing is resources, I only have a 5gig hdd, and every module that needs to load on the OS takes up disk space. Which I might add, until I get a larger hdd, is very valuable real estate for files.

Plus, I think it would be a good learning experience for Linux.

Link to post
Share on other sites

just a thought, since you have a via chipset you will need these things(among others) enabled in your kernel

device drivers >> ata/atapi/mmf/rll support >> via82cxxx chipset support
>> Use pci dma by default
>> Generic PCI bus-master DMA support

for your network card you will need support for this device.

device drivers >> network device support >> ehternet 10-100 >> Via-rhine support

Edited by shanenin
Link to post
Share on other sites
you mentioned in another thread the mouse problem was kernel related. Do you have an idea of what needs to be chaged with this kernel?

not yet, however that is one of my priorities on this project. I will be looking over the code, and then I will make mods where necessary to make it work. I know the main code will be in mousedev, but I gotta figure out where, I also plan on downloading the latest DSL and looking at it's source, once I have verified that the mouse works in it. I may just try a Hybrid module crossover, making the DSL module supply the info for the new kernel install.

Link to post
Share on other sites
  • 3 weeks later...

ok I'm running into a little problem,

$ make xconfig
HOSTCXX scripts/kconfig/qconf.o
/bin/sh: g++: command not found
make[1]: *** [scripts/kconfig/qconf.o] Error 127
make: *** [xconfig] Error 2

I have all the necessary files to do this but I keep getting that error, I'm using g++ 4.0

Link to post
Share on other sites

haha, I knew i forgot something, didn't have build essential installed. once I installed it I was good to go, Thanks shanenin.

 whereis g++
g++: /usr/bin/g++ /usr/bin/X11/g++ /usr/share/man/man1/g++.1.gz

 g++ --version
g++ (GCC) 4.0.2 20050808

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...