You are not logged in.

#1 2009-11-08 04:33:44

RedScare
Member
Registered: 2009-03-28
Posts: 91

Finding info for kernel compilation

I would like to do a minimal kernel compilation so that I can eliminate the initramfs/initrd portion of the boot. This is both for the learning experience and for the speed-up in boot time. Futhermore, there will be even less ram usage from the kernel (no extra modules, kernel only has what is necessary).

How would I collect ALL the hardware information about my computer that is necessary for compiling only the things that I need into the kernel? "lspci" and "cat /proc/cpuinfo" don't provide all the information I need. How can I get even more hardware info? Thanks.

Note: I'm compiling the zen version, but that shouldn't affect things the way I see it. The reason I posted this topic is that I thought I had all the hardware compiled into the kernel, but I've run into problems.

Offline

#2 2009-11-08 05:00:24

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: Finding info for kernel compilation

lsmod and lspci will be a good place to start

you may also want to check out this site, read the how to on there for working with kernel seeds, there'll be a little more guidance on collecting the needed info, and working with it
http://www.kernel-seeds.org/

some of the others here may be able to offer more. it's still somewhat new to me. but the main thing to keep in mind, that i've learned, if you remove initrd, make sure that whatever file system driver and hardware drivers required to find and mount your root volume, are built into the kernel, not modules, but built in

Last edited by ssl6 (2009-11-08 05:01:19)


this is a signature

Offline

#3 2009-11-08 05:10:14

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Finding info for kernel compilation

I've seen this in the AUR but never tried it though:

aur/autokernconf


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#4 2009-11-08 05:39:53

RedScare
Member
Registered: 2009-03-28
Posts: 91

Re: Finding info for kernel compilation

Thanks to both responders.

ssl6: Would there be a way to convert from the modules given by lsmod to the names in the kernel config? Although even if I could, I still wouldn't have enough info.

Gen2ly: That tool is rumored not to work in 64 bit (what I am running), and I wouldn't trust the script too much anyway smile.

Offline

#5 2009-11-08 07:13:51

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: Finding info for kernel compilation

honestly, i use make xconfig, rather than the old fashion make menuconfig, its qt based, and its in the kernel source. there's also gconfig, that uses gtk if you prefer. i personally like the gui config tools for the search function. for the most part, you can get away with searching the module names, and that'll get you to what you want to add. only for the most part though, if you try to search sg_mod, it won't work, but if you search sg, you're safe. thats scsi generic btw.

the gui apps are also a little easier in the sense that module info is easier to see


this is a signature

Offline

#6 2009-11-08 08:45:35

skipio
Member
Registered: 2009-01-27
Posts: 12

Re: Finding info for kernel compilation

lspci and dmesg help you knowing what your system needs. be also sure to check modules description, for instance by pressing '?' in menuconfig (the ncurses based frontend). oh... and build your new kernel with a different pkgname, so you can still boot the stock arch kernel in case things go wrong.

Offline

#7 2009-11-08 15:25:15

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: Finding info for kernel compilation

definitely keep the stock kernel as a fallback.

and here's another tip, with a story. I spent several hours yesterday compiling a kernel for my webserver, to squeeze a little more juice out of it. I can't found how many times i kept recompiling because i kept getting kernel panics. luckily i still had the stock kernel as a fallback. but what i messed up, and must have known somehow i messed up the whole time, because it eventually just dawned on me out of nowhere, was my messed up my grub menu.lst. what i did, was copy and paste the default arch kernel lines and just modified them for the new kernel, but what i forgot to do was add the -custom on the vmlinuz26 line, so i was still using the stock kernel, but with initrd disabled, thats why i was getting the kernel panics, god knows how much compile time i could have saved had i noticed that sooner.....but my ADD must have kicked into overdrive or something, i guess it comes with the territory

bottom line is, pay attention,


this is a signature

Offline

Board footer

Powered by FluxBB