You are not logged in.

#1 2015-02-14 23:50:51

bstaletic
Member
Registered: 2014-02-02
Posts: 658

[SOLVED] The right way to compile kernel with caved config file

Hello,

I have a kernel config file seved to ~/config which only has 19 modules (and could be further optimized), but I'm having trouble using it.
What I have done:

  1. Used ABS to get the latest linux sources from testing

  2. Copied /var/abs/testing/linux to ~/Install/linux

  3. cd ~/Install/linux

  4. makepkg -o

  5. cp ~/config ./.config

  6. cp .config config

  7. cp .config config.x86_64

  8. makepkg -ei --pkg linux

The weird part, at least to me, is that I saw a lot more then 19 modules during compilation. Is this expected for some reason or have I messed something up?

Last edited by bstaletic (2015-02-16 13:19:59)

Offline

#2 2015-02-15 00:21:44

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] The right way to compile kernel with caved config file

bstaletic wrote:

The weird part, at least to me, is that I saw a lot more then 19 modules during compilation. Is this expected for some reason or have I messed something up?

Your build method seems ok to me. Can't really say anything about the .config, but kernel modules can have dependencies too. For example, if you choose to build ext4 as a module, it selects at least jdb2 and crc16 modules to be built as well.

Offline

#3 2015-02-15 00:43:30

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] The right way to compile kernel with caved config file

I now about the dependancies, but it shouldn't matter if I'm counting modules in config file using grep and wc.

Offline

#4 2015-02-15 12:01:56

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED] The right way to compile kernel with caved config file

true..

did you just 'see' too many modules during compilation, or is there actually more than 19 modules built/installed?
if you mean the lines that look like this:

  CC [M]  fs/jbd2/transaction.o
  CC [M]  fs/jbd2/commit.o
  CC [M]  fs/jbd2/recovery.o

then that's just a compiler output, not a list of individual modules.

Offline

#5 2015-02-15 12:04:41

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: [SOLVED] The right way to compile kernel with caved config file

Offline

#6 2015-02-15 18:31:50

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] The right way to compile kernel with caved config file

ooo,

I saw lines similar to those in your post, so I should relax, thank you for the info.

grasky,

The tool is great, and I used it to gather the data, but later wanted to minimize the kernel further.

EDIT: There's also the fact I was somewhat tired while play with the kernel, and my brain started playing tricks on me (i.e. I started making dumb mistakes).

Last edited by bstaletic (2015-02-15 19:08:23)

Offline

#7 2015-02-15 19:18:17

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,732
Website

Re: [SOLVED] The right way to compile kernel with caved config file

bstaletic wrote:

The tool is great, and I used it to gather the data, but later wanted to minimize the kernel further.

The real magic is `make localmodconfig` but I don't think you can or should strip it back beyond what it does...

Offline

#8 2015-02-15 19:58:12

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [SOLVED] The right way to compile kernel with caved config file

I'm currently running arch on a kernel generated with localmodconfig and modprobed-db. A close inspection of kernel config reveals some wifi, touchpad, joystick etc drivers which I never used. It should totally be possible to get rid of those. Also adding support for some things I initially removed.

If I s/=m/=y/g the config and compile it that way, kernel is not bootable, why is that?

Offline

Board footer

Powered by FluxBB