You are not logged in.

#1 2007-12-23 23:55:57

dante4d
Member
From: Czech Republic
Registered: 2007-04-14
Posts: 176

Kernel The Arch Way

Hi,

after some problems with alsa and #archlinux irc talk I decided to try and build my own kernel. As I see it's lot of learning. I already read The Arch Way, ABS - The Arch Build System, The Arch package making HOW-TO - with guidelines, man makepkg, dependencies thread, makepkg/abs tutorial thread, PKGBUILD help, Arch CVS & SVN PKGBUILD guidelines, Arch Packaging Standards, Kernel Compilation, Kernel Compilation with ABS, Custom Kernel Compilation with ABS, Kernel Patches and Patchsets. And at last I read this thread and I feel the same... Btw I thing kernel compilation also has lots to do with mkinitcpio, right?

I want to build kernel that would have all necessary stuff for my hw configuration built in. Thats the fastest boot, right? But actually all this wiki stuff got me more confused than I was before smile.

What would be the best way? I know all the hw details, so just do 'make menuconfig' and select everything as built in (*), maybe add some patches and automate this using one of example PKGBUILDs?

I'm still reading forums and googling but I believe some of you can point me faster.

Offline

#2 2007-12-24 00:13:12

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Kernel The Arch Way

Take the kernel from the ABS tree and hack that. The kernel config files are there, just edit away. Add a few patches. That would be the easiest way i guess.


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#3 2007-12-24 00:21:05

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Kernel The Arch Way

It is a bit of learning at first.  Once you understand how it works it's very simple.  There is no shortcut, I'm afraid, it seems like you're looking for one...  If there was one it would be outlined in the wiki most likely.

As far as building kernel with all the hw stuff built in...  IMO, it's not a good idea.  This is something that needed to be done in the past when there was no way to autoload system specific modules at boot.  Boot time benefits would be negligible.  The kernel wouldn't be any faster either.  And you would have to recompile every time there is a kernel update if you wanted to keep up with Arch repos - the net result would be wasting time and speed.

Kernel compilation itself has nothing to do with mkinitcpio - mkinitcpio is only necessary to generate boot image which happens after the kernel is already compiled; pacman will do it for you completely automatically if you customize the Arch kernel PKGBUILD instead of compiling manually.

Offline

#4 2007-12-24 01:48:55

dante4d
Member
From: Czech Republic
Registered: 2007-04-14
Posts: 176

Re: Kernel The Arch Way

pelle.k wrote:

Take the kernel from the ABS tree and hack that.

Did that. Let's see what happens. It looks like compiling...

fwojciec wrote:

It is a bit of learning at first.  Once you understand how it works it's very simple.  There is no shortcut, I'm afraid, it seems like you're looking for one...  If there was one it would be outlined in the wiki most likely.

I'm just bit confused with all the info there...

Last edited by dante4d (2007-12-24 01:55:31)

Offline

#5 2007-12-24 02:14:28

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Kernel The Arch Way

Well, it's compiling, so it's all good wink  I think it's best to use all wiki info as reference as you're experimenting with the actual process - that way it's easiest to learn and it all makes much more sense.

Offline

#6 2007-12-24 02:18:08

dante4d
Member
From: Czech Republic
Registered: 2007-04-14
Posts: 176

Re: Kernel The Arch Way

I'll see what I can do. Thanx smile

So now I have kernel26-2.6.23.12-3-i686.pkg.tar.gz package and I installed it. Let's see what happens after reboot tongue.

I'm still alive so it's fine... Now lets try that alsa-drivers.

Last edited by dante4d (2007-12-24 02:34:38)

Offline

#7 2007-12-24 04:14:40

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Kernel The Arch Way

See howto. I recommend zen-sources.

Offline

#8 2007-12-24 08:31:08

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Kernel The Arch Way

You could try using you own -BRANCH like in 2.6.23-ARCH, so you wont mess with the existing kernel. Then just modify the nvidia PKGBUILD (and all other modules you've got installed) to compile against that -BRANCH. also make sure to rename those packages to $packagename-BRANCH.


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#9 2007-12-24 15:22:03

dante4d
Member
From: Czech Republic
Registered: 2007-04-14
Posts: 176

Re: Kernel The Arch Way

I'll go through the wiki and try that modules stuff. So I have to do kernel-my_patch and all packages that need nvidia-my_patch... Ok

wrote:

See howto. I recommend zen-sources.

I read it. He's using the traditional way of kernel compilation. He's patching the kernel and removing modules manually. In case of ABS that would mean another patch in sources() array and alsa-lib in provides()/conflicts() array, right roll?

Last edited by dante4d (2007-12-24 16:21:24)

Offline

#10 2007-12-24 19:55:15

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Kernel The Arch Way

To be honest, all the "Arch ways" of doing a custom kernel utterly suck. I still just do it manually make menuconfig; make; make modules_install and install the bzImage myself. Way easier.

And that's even though I know the kernel PKGBUILD inside and out.

Last edited by iphitus (2007-12-24 21:09:43)

Offline

#11 2007-12-24 20:35:19

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: Kernel The Arch Way

iphitus wrote:

To be honest, all the "Arch ways" of doing a custom kernel utterly suck. I still just do it manually make menuconfig; make; make modules_install and install the bzImage myself. Way easier.

I guess it depends on what you're used to.  It takes me about 2-3 minutes nowadays to customize the default kernel PKGBUILD so that it creates my custom kernel package that I can install parallel to the default package -- it's not exactly a difficult thing to do once you know what you're doing.  I do configure/make/make install for the extra modules I need for my custom kernel (madwifi, etc.) - making custom packages for this seems like an overkill.

Offline

#12 2007-12-25 02:19:24

dante4d
Member
From: Czech Republic
Registered: 2007-04-14
Posts: 176

Re: Kernel The Arch Way

I'm trying Kernel Compilation with ABS now. Seems like a good direction. I wonder about sources() although. 'config' is backed up and coped to '.confg'. That's what 'make menuconfig' takes as default config I suppose. But what's 'config.stock' good for? And is it ok to take them both from 'zcat /proc/config.gz'? I see latter is copied to '/usr/linux/src'...

Last edited by dante4d (2007-12-25 02:21:36)

Offline

Board footer

Powered by FluxBB