You are not logged in.

#1 2004-04-25 23:25:30

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Preferred way to compile kernel?

After the discussion here:
http://bbs.archlinux.org/viewtopic.php?t=4057&start=30

I'm wondering which way most people use for compiling their kernel. I've used /usr/src because its simpler and makes me feel more in control.  Having an Arch package for the custom kernel has no real value, according to apeiro.  Plus, using /usr/src has the kernel headers in place automatically, useful for programs that need it. (This offset by the fact that the kernel package copies the necessary files into place anyway). However, using ABS has the advantage of automating a lot of the task using Arch systems, rather than, for example, a custom shell script. (I'm trying an ABS version right now, for comparison).

Both methods are described in the wiki. I'm going to be cleaning up and expanding both shortly.

I'm asking this question in order to semi-standardize the process. Some people might say that the Arch philosophy is "There is more than one way to do everything", but I believe we could also append "but there is a best way to do it and Arch suggests that way". Now I want to find out which way is best in this case. smile

I'd be most interested in "I use xyz method because... [valid reason]" statements, rather than just "I use xyz". wink

Dusty

Offline

#2 2004-04-25 23:32:50

wakeupbomb
Member
From: Liverpool, UK
Registered: 2004-02-15
Posts: 164

Re: Preferred way to compile kernel?

I love the standard kernel with Arch, never had a problem with it and hardly ever need to add my own modules
When I did need to recompile I took one look at the documentation for the abs way and gave up instantly and did it the old easy way. Maybe I didn't get  it I dunno but the /usr/src way is much more practical if it's what you are used to. I just thought the abs way looked overcomplicated, but I may be wrong, I didn't look into it hugely
So yeah, /usr/src all the way for me because it's what i've always done

Offline

#3 2004-04-26 03:58:49

ganlu
Member
From: ChongQing, China
Registered: 2004-01-04
Posts: 360

Re: Preferred way to compile kernel?

Before I try Arch, I complile my kernel with quite "standard" process, say, make mrproper, make, make install etc. but I do find ABS so easy to modify according my environment. I can simply change some lines in the config file and PKGBUILD file, then let ABS goes all the left . If I need some other file for some applications, I can do it the other way, that doesn't matter at all. ABS is so flexible.

Offline

#4 2004-04-26 05:30:00

rasat
Forum Fellow
From: Finland
Registered: 2002-12-27
Posts: 2,296
Website

Re: Preferred way to compile kernel?

I have not tried ABS, cannot vote. The /usr/src is the common way but don't like it..... requires too much technical knowledge.


Markku

Offline

#5 2004-04-26 06:40:50

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,912
Website

Re: Preferred way to compile kernel?

I have only used ABS because it was the only way to get Nvidia drivers to work (at the time).

But given the right documentation I would love to have a go at custom kernel :-)

Mr Green


Mr Green

Offline

#6 2004-04-26 06:41:45

razor
Member
From: Kiev, Ukraine
Registered: 2004-04-08
Posts: 16

Re: Preferred way to compile kernel?

I use /usr/src way, because I always use that way, and now don't see anything why I need to use ABS instead of /usr/src smile


Best wishes, Alexander Solovyov

Offline

#7 2004-04-26 06:46:14

robot5x
Member
Registered: 2004-01-26
Posts: 266

Re: Preferred way to compile kernel?

I guess the best situation is to know how to use both methods and then to decide which you prefer. For me, ABS is just quick, clean and consistent. For instance, the different commands needed between kernels 2.4 and 2.6 are not complicated, but it's much nicer to just type makepkg. So maybe my justification is lazyness.

Offline

#8 2004-04-26 11:38:06

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Preferred way to compile kernel?

rasat wrote:

I have not tried ABS, cannot vote. The /usr/src is the common way but don't like it..... requires too much technical knowledge.

The question is how you compile the kernel, not if you use a precompiled one or not. I didn't try the ABS way (I see no advantages), but I assume you still have to configure it. Configuring the kernel requires the most knowledge, how you get the source doesn't matter that much (I don't know what's easier, to use ABS or wget + tar).

Offline

#9 2004-04-26 13:25:18

normnmiles
Member
From: /US/IL
Registered: 2004-03-20
Posts: 64

Re: Preferred way to compile kernel?

I like using the ABS way.  Once I get the PKGBUILD and config files configured correctly upgrading the kernel on my other 2 machines is quick and consistent.

Offline

#10 2004-04-26 13:59:25

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,488

Re: Preferred way to compile kernel?

The 'abs' way was basically my idea - or at least the first wiki entry about it, I don't know if anyone tried it that way before. I thougt it could be a nice automatism, to have a proper kernel configuration once, tweak the PGKBUILD file, and after all is set up, all I had to change was the version number of the package/kernel source or change the config, and run makepkg then. I once made it switching from kernel24 to 26, using my own config. It worked fine. So, I thought it could be helpfull writing it to the wiki.

But this idea has some disadvantages, too. F.e., if you compile a minor upgrade, you may construct a modules mess, as a lot of files are already existing. Therefore, all cases must be thoroughly considered and configurated. Kernel addicts would prefer to patch the kernel instead of fully refetch the source.

After playing around with the idea for a while, I decided the work of configurating all possible eventuallities in compiling kernels by using abs was to difficult. Using the standard procedures seemed straight and easy to me.

So I removed my 'arch way' section in the kernel compiling wiki. Nevertheless, another user started an abs kernel wiki, redevelopping and enhancing my idea.

The idea is still attractive.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#11 2004-04-26 14:28:01

nifan
Member
Registered: 2003-04-10
Posts: 102

Re: Preferred way to compile kernel?

since i use arch i've always compiled my kernel using ABS (since 0.4 smile ) about a year ago. i do this cos its so simple to use it that way. all i have to do is change the config if i want to, if not change the version number and type makepkg. that simple. besides that if something gets screwed up with the new kernel package i still have the older one to help me out wink


______
"Ignorance, the root and the stem of every evil." - Plato

Offline

#12 2004-04-26 14:52:32

LB06
Member
From: The Netherlands
Registered: 2003-10-29
Posts: 435

Re: Preferred way to compile kernel?

/usr/src because it gives me more control (patches, for example) and because I want to be able to run make menuconfig, which isn't possible with ABS afaik.

Offline

#13 2004-04-26 15:55:06

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Preferred way to compile kernel?

I think I'll try Ketchup out:
http://kerneltrap.org/node/view/2976

Offline

#14 2004-04-26 16:19:55

Egil.B
Member
From: Universitas Osloensis
Registered: 2004-02-14
Posts: 116

Re: Preferred way to compile kernel?

I use /root/src/linux. /usr/src is meant to store the kernelheaders used to compile glibc  roll

Offline

#15 2004-04-26 17:18:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Preferred way to compile kernel?

Egil.B wrote:

I use /root/src/linux. /usr/src is meant to store the kernelheaders used to compile glibc  roll

You can keep any sourcecode in /usr/src

/usr/src/linux is for the kernelheaders used to compile glibc. /usr/src/linux-2.6.5 or any other folder can contain any file, logically source code.

Dusty

Offline

#16 2004-04-26 17:27:34

normnmiles
Member
From: /US/IL
Registered: 2004-03-20
Posts: 64

Re: Preferred way to compile kernel?

LB06,  you can run make menuconfig from a pkgbuild.  That's how I create my config file.  All you have to do is replace

yes "" |make config

with

make menuconfig

Offline

#17 2004-04-27 15:32:44

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Preferred way to compile kernel?

Egil.B wrote:

I use /root/src/linux. /usr/src is meant to store the kernelheaders used to compile glibc  roll

Actually, the kernel headers used for glibc are in /usr/include/linux, check out glibc's PKGBUILD for more info.  If you "#include <linux/if_ether.h>" from a .c file, it reads /usr/include/linux/if_ether.h.

/usr/src/* is just for source trees like the kernel, the compiler won't look there unless you tell it to.

Offline

Board footer

Powered by FluxBB