You are not logged in.

#1 2006-03-14 19:22:15

aaronamd
Member
Registered: 2006-03-14
Posts: 22

custom kernel --is it possible in arch?

I noticed that the installer made the kernel for me, I would like to make my own custom kernel so that I can properly support my laptops features. I also don't like modules... how would I create this custom kernel? I just came from gentoo and after running make menuconfig in the kernel dir and typing make to build it, it won't build... :shock: this process works fine on all of my other linux machines.


-- I have the exact error now,

 # make
CHK        include/linux/version.h
scripts/Makefiles.build:15: /usr/src/linux2.6.15-ARCH/init/Makefile: No such file or directory
make[1]: *** No rule to make target '/usr/src/linux-2.6.15-ARCH/init/Makefile' .
Stop.
make: *** [init] Error 2
#

Offline

#2 2006-03-14 20:46:41

trapdoor
Member
Registered: 2005-03-27
Posts: 82
Website

Re: custom kernel --is it possible in arch?

I would suggest, that you get a fresh kernel from www.kernel.org and try to compile this one.

Offline

#3 2006-03-14 21:10:15

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: custom kernel --is it possible in arch?

Yeah, Arch doesn't install kernel source - you have to go get it. Once you've done that, I would recommend using ABS to build your custom kernel, and pacman to install it. The wiki has all the details. If you get stuck, post your question(s).

Offline

#4 2006-03-14 21:16:55

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

thanks for the quick replys!  big_smile  I diden't know arch diden't install the source, that would make sense though lol it is a binary distro  tongue

Offline

#5 2006-03-14 21:23:25

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

I normaly take arch's stock PKGBUILD for kernel26 and replace

 yes "" |makeconfig 

with

make menuconfig

and adjust the kernel that way.

Offline

#6 2006-03-14 21:31:26

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

hello, where would I find  this PKGBUILD file?  :oops: --I don't think it matters anymore, I just borked up the stock kernel bad anyway, it runs beutifully but I can't make menuconfig anymore...

edit yet again! lol --I just tried it again and make menuconfig finally works again, I dunno what that was about.

Offline

#7 2006-03-14 22:56:04

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: custom kernel --is it possible in arch?

Read the wiki for the PKGBUILD info...


Sign of the times: Navajo blanket..made in China
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#8 2006-03-14 23:58:14

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

I don't think I found the right wiki page but why can't I just do a simple download of the kernel from kernel.org and then a make menuconfig and then a make && make modules_install and everything be all good? http://wiki.archlinux.org/index.php/Arc … guidelines
that is the page that I found when looking for "PKGBUILD" in the wiki...

^^sorry for that, I just found the right page and am editing the pkgbuild right now tongue

Offline

#9 2006-03-15 00:10:33

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

aaronamd wrote:

...why can't I just do a simple download of the kernel from kernel.org and then a make menuconfig and then a make && make modules_install and everything be all good?

because then you'll have several unaccounted for files on your system that pacman doesn't know about -it can make things a real mess in the future.
Just add the make menuconfig line as I described above and pacman -U /path/to/package.pkg.tar.gz will install it.

Offline

#10 2006-03-15 00:14:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: custom kernel --is it possible in arch?

OK, check out the Package Management category - you'll find everything there.

To answer your question - of course you can do it any way you like - the "classic" way that you describe will work fine. However, as you become more accustomed to the way Arch works, you'll realise the benefits of installing the apps you need as packages, under pacman's control - and that includes kernels.

<edit>
Overlap with Penguin - but we're talking about the same thing anyway. smile

Offline

#11 2006-03-15 00:22:09

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

since I found the right page I understand it now  big_smile  I really do like pacman, it just looked alittle scary editing a file I have no clue about lol

Offline

#12 2006-03-15 00:24:44

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

aaronamd wrote:

it just looked alittle scary editing a file I have no clue about lol

you can just copy it out of the directory you found it or run abs again to restore to its original state

Offline

#13 2006-03-15 00:28:52

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

yea! it's runnig make menuconfig now! (I just ran makepkg) I know I sound like a noob, heck in arch I am one but will it also install this kernel to /boot too? or do I copy things over manually?

Offline

#14 2006-03-15 00:36:33

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

Just let it run. when you build a package wtih makepkg it builds everything in a consolodated directory `pwd`/pkg/. If it builds successfully, the package.pkg.tar.gz is made with everything you need in it.
So to answer your question no, you don't need to do any copying of any sort -those lines are included in the PKGBUILD file you are building from.

Offline

#15 2006-03-15 00:47:35

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

thats sweet so all I would do is pacman -A (packagename.tar.gz) and then take the bzImage out of there? we'll find out! I actually like this better than portage,compiling everything is only fun on rainy days tongue now I can use my system instead of watching gcc scroll by   lol

Offline

#16 2006-03-15 00:58:29

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

oh crap the build failed... trying again...

Offline

#17 2006-03-15 01:04:11

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

Re: custom kernel --is it possible in arch?

you can do a download from kernel.org. Some people just believe it's best to put everything through the package manager.

For kernels however, I disagree. They're tidy, so easy to clean up yourself, and often much easier to compile and install --- particularly if you are compiling a lot of them.

iphitus

Offline

#18 2006-03-15 01:12:38

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

aaronamd wrote:

oh crap the build failed... trying again...

try doing it in vc/1. CTRL + ALT + 1.

Psuedo terminals tend to cause kernel compilations to fail.

Offline

#19 2006-03-15 01:16:25

aaronamd
Member
Registered: 2006-03-14
Posts: 22

Re: custom kernel --is it possible in arch?

the sad thing was I was doing it in a real VT... I'm trying again twith the section that failed disabled, I will notify you if any progress is made. thanks to everyone here for the fast and helpfull replys.

Offline

#20 2006-03-15 01:27:02

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

Re: custom kernel --is it possible in arch?

Penguin wrote:
aaronamd wrote:

oh crap the build failed... trying again...

try doing it in vc/1. CTRL + ALT + 1.

Psuedo terminals tend to cause kernel compilations to fail.

Uh, wha? That interests me, because I've literally compiled 100s of kernels (sad eh?), and never had one fail, nor even heard of one fail because it was running on a pseudo terminal.  I've compiled them in screen, xterm, and every terminal emulator out there without any problems.

iphitus

Offline

#21 2006-03-15 01:39:42

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

I think it was eterm and aterm for me. It would happen every single time I would resize the window during the compiling. I know it happened to rasat a few times as well while doing some tests on a kernel builder I wrote a while back.
I could have swore it did it to me recently without resizing but I'm not sure.

Offline

#22 2006-03-15 03:06:04

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,475
Website

Re: custom kernel --is it possible in arch?

iphitus wrote:

you can do a download from kernel.org. Some people just believe it's best to put everything through the package manager.

For kernels however, I disagree. They're tidy, so easy to clean up yourself, and often much easier to compile and install --- particularly if you are compiling a lot of them.

iphitus

So true, I couldn't agree more. download latest kernel from kernel.org and apply ck patch or archck which I find is a great patchset too.


Follow me in: Identi.ca, Twitter, Google+

Offline

#23 2006-03-15 03:15:59

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

um...guys.. this guy is obviously new to the arch system and its package management. Maybe we should encourage "proper" package installation through makepkg and pacman for now then maybe later when he becomes more familiar with it he can attempt this?

Offline

#24 2006-03-15 03:39:21

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

Re: custom kernel --is it possible in arch?

Penguin wrote:

um...guys.. this guy is obviously new to the arch system and its package management. Maybe we should encourage "proper" package installation through makepkg and pacman for now then maybe later when he becomes more familiar with it he can attempt this?

Because packages of kernels are complicated. It is just sooo much easier to just build a kernel from source manually, especially when you're trying to create a custom config, want to change one option, or just like patching things.

Aside from that, kernels are clean and well behaved things. Modules in /usr/lib/modules/kernver/, bzImage in /boot.  No conflicts with any other package, easy to remove. kernel source wherever he wants.

So, it's up to him, he can use pacman and one one of those complicated custom PKGBUILDs out there, and waste half an hour on the PKGBUILD, or just compile it how he already knows.

If he's using Arch, its inevitable that he will be introduced to PKGBUILDs and the AUR, but using a kernel PKGBUILD to do so, is enough to scare away anyone.

Offline

#25 2006-03-15 03:51:42

T-Dawg
Forum Fellow
From: Wilmington, NC
Registered: 2005-01-29
Posts: 2,734

Re: custom kernel --is it possible in arch?

Penguin wrote:

I normaly take arch's stock PKGBUILD for kernel26 and replace

 yes "" |makeconfig 

with

make menuconfig

and adjust the kernel that way.

Thats all I suggested him to do, nothing complicated in that what so ever. But you're right, its up to him to decide.

Offline

Board footer

Powered by FluxBB