LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why make kernel compiling so confusing? (https://www.linuxquestions.org/questions/linux-newbie-8/why-make-kernel-compiling-so-confusing-650328/)

lifeforce4 06-19-2008 09:15 AM

Why make kernel compiling so confusing?
 
I was reading tons trying to get an idea since this was going to be my first kernel compiling/upgrading. Why do people make it such a task to try and figure out? Are there added benefits to doing it other then the way I did below?

I edited the .config file with make menuconfig.
Compiled the kernel make
Then set the new kernel make install
The biggest part was going through the config menus trimming off what I did not need. Finally adding a GRUB boot selection in menu.lst for the new kernel.

Thanks,
Kyle

Agrouf 06-19-2008 09:32 AM

Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.
For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker. So what are you talking about exactly?

ufmale 06-19-2008 09:43 AM

There are some .config in your current linux under /boot/
I usually copy .config and extend from there.

lifeforce4 06-19-2008 10:12 AM

Quote:

Originally Posted by Agrouf (Post 3189360)
Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.
For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker. So what are you talking about exactly?

Yeah the patching was the next thing I was going to check out. Right now I just did a basic 2.6.25 kernel and will attempt to add the .6 patch. What I was going on about is you do a google search, read forums, do what ever and no one just said how to do a basic upgrade of a kernel. I was just really surprised it was as simple as a normal compiling and installing of another application.

I guess the whole "kernel compiling is difficult" mind set and things people say made me expect something more and go on a wild search for what was not there.

I'm glad I finally figured it out and stopped the search. :-)

Quote:

Originally Posted by ufmale
There are some .config in your current linux under /boot/
I usually copy .config and extend from there.

The setup I have is a basic debian install so the config is not fully configured. I probably could have saved some time by going though its .config instead of a new one.

Kyle

nx5000 06-19-2008 10:26 AM

Quote:

Are there added benefits to doing it other then the way I did below?
The advantages of having packages rather than files here and there that you forget to remove when uninstalling, handling versions,..

jschiwal 06-19-2008 10:40 AM

I always start with "make oldconfig" before "make menuconfig" to start with the the options of the current running kernel. If you are compiling a newer version, you will be prompted for any newer features. Some options I might leave alone simply because I don't understand an item well enough.

mrrangerman 06-19-2008 11:22 AM

Quote:

Agrouf

Which people? There are more than a billion ways to do it other than the way you do it and each way has its benefits.

For example, some people patch the kernel because they want to add a functionality that is not present in the default vanilla one. Some other people may want to use a script like genkernel, because it's quicker.

Well you listed two ways, could you please list the other 999,999,998 ways for us. :D :D

DragonM15 06-19-2008 11:37 AM

Quote:

Originally Posted by lifeforce4 (Post 3189403)
What I was going on about is you do a google search, read forums, do what ever and no one just said how to do a basic upgrade of a kernel.

There are lots of sites that go over a basic upgrade/compiling of a kernel. It is just a little bit complicated to go over one, because you know SOMEONE is going to follow the "basic" upgrade and take it as 100% and end up compiling their kernel with an unknown config most likely for a kernel version they are most likely not using. If that makes any sense.

DragonM15

lifeforce4 06-19-2008 12:44 PM

Quote:

Originally Posted by nx5000 (Post 3189411)
The advantages of having packages rather than files here and there that you forget to remove when uninstalling, handling versions,..

Now that makes sense to have a cleaner way of doing it. Guess either have the latest kernel or the latest kernel package(which might be a few kernels back). Am I correct thinking this way?

Quote:

Originally Posted by jschiwal (Post 3189419)
I always start with "make oldconfig" before "make menuconfig" to start with the the options of the current running kernel. If you are compiling a newer version, you will be prompted for any newer features. Some options I might leave alone simply because I don't understand an item well enough.

Thats what I thought oldconfig did but was not sure since I just did a standard install and never really configured the kernel before. From now on I will. :-)



Quote:

Originally Posted by DragonM15 (Post 3189469)
There are lots of sites that go over a basic upgrade/compiling of a kernel. It is just a little bit complicated to go over one, because you know SOMEONE is going to follow the "basic" upgrade and take it as 100% and end up compiling their kernel with an unknown config most likely for a kernel version they are most likely not using. If that makes any sense.

DragonM15

Sorry you kind of lost me on that... you mean they compiling 2.6.25 from a .config that was setup for say 2.6.18? If thats what you mean I guess I understood lol other wise, I probably am just like everyone your talking about. ;-)

Thanks for the replies,
Kyle

DragonM15 06-19-2008 01:31 PM

Quote:

Originally Posted by lifeforce4 (Post 3189516)
Sorry you kind of lost me on that... you mean they compiling 2.6.25 from a .config that was setup for say 2.6.18? If thats what you mean I guess I understood lol other wise, I probably am just like everyone your talking about. ;-)

Yeah, that was exactly what I meant. Sorry, I'm kinda tired.

DragonM15

lifeforce4 06-20-2008 01:42 AM

Quote:

Originally Posted by DragonM15 (Post 3189555)
Yeah, that was exactly what I meant. Sorry, I'm kinda tired.

DragonM15

Ok glad to clear that up. :-) thanks for the pointer on why things are the way they are.

nx5000 06-20-2008 02:21 AM

Quote:

Guess either have the latest kernel or the latest kernel package(which might be a few kernels back).
Package everything. I got so used to it that now, I really hate "make install" which usually doesn't have a make uninstall. A bit like on windows where you end up with so many dlls in system32 and you have no clue where they come from.

My comment was more general, for the kernel it's easier as it should only install in seperate directories.

For debian, latest kernel packages:
2.6.26-rc6
Last one has been packaged today (a week after kernel.org release).
http://wiki.debian.org/DebianKernel

Agrouf 06-20-2008 03:33 AM

Quote:

Originally Posted by nx5000 (Post 3190068)
Package everything. I got so used to it that now, I really hate "make install" which usually doesn't have a make uninstall. A bit like on windows where you end up with so many dlls in system32 and you have no clue where they come from.

Not only that, but you can also overwrite files that belongs to other packages and suppress them with make uninstall when you should not, or you can uninstall that is a dependancy for another package and make the other package no longer work correctly. The package manager is definitely a better way to manage your packages.
One or two packages installed by make install is no great pain, especially the kernel and provide more flexibility, but it should be an exception and the rule should be to use the package manager. To get the best of both worlds, just get yourself a distro that has portage, which is the best package manager I've ever seen in my life for linux.

i92guboj 06-20-2008 04:21 AM

Each one has his/her own ways.

I, for one, maintain it in my home, because I find that having to be logged as root to compile your kernel is just stupid, unnecessary, and a pain. Additionally, this allow me to:
  1. download only the patchlevels, which means 7kb vs. 40-50mb, do you want more?
  2. ease to handle my custom patches, I don't have to put manually stuff on system folder
  3. I can configure and compile as user, I only need to be root to "make install modules_install", which is why su -c exists
  4. I don't idiotically add fragmentation to my root filesystem, the kernel tree is not an easy piece of cake in which regards fragmentation

For those having a binary distro, probably this would be a hassle. For me it's just perfect.


All times are GMT -5. The time now is 10:13 PM.