Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Trimming kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 352
Location: Somewhere in Denmark

PostPosted: Tue Mar 27, 2018 4:29 pm    Post subject: Trimming kernel Reply with quote

Running on headless APU/APU2 (https://www.pcengines.ch/apu2c4.htm) from mSATA SSDs - I'd like to keep kernel (/kernel-compiletime) as small as possible.

dmesg from APU1D4 - http://bpaste.net/show/79d96da5604e

.config from APU1D4 - http://bpaste.net/show/929f6dff45cb

lspci from APU1D4 - http://bpaste.net/show/341a1fb3efaa

lshw from APU1D4 - http://bpaste.net/show/d4529aa4f9ac

dmesg from APU2C4 - https://paste.pound-python.org/show/vnyxgoa7OsO95fmA5juX/

.config from APU2C4 - https://paste.pound-python.org/show/yxjhYmI2qDNbx6kgVicY/

lspci from APU2C4 - https://paste.pound-python.org/show/yi4A9YE8EbZM7TDRAZAu/

lshw from APU2C4 - https://paste.pound-python.org/show/XML4vQ1MFZntBxeaw20M/

Is there anything I need/want to fix (ie. I got alot of probably - not needed - modules compiled, I don't see them loaded using lsmod.

TIA to anyone taking their time :)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6233
Location: /usr/lib64/lv2

PostPosted: Tue Mar 27, 2018 6:31 pm    Post subject: Reply with quote

Pappy's Kernel Seeds were great for this, but that project isn't maintained any more.

This tool will help, though: https://kmuto.jp/debian/hcl/

You'll need the output of:
Code:

lspci -n


This will cover the drivers needed for the hardware you have.

For the rest... There is a lot of stuff in defconfig that you will probably not need, but it depends entirely on your hardware and your willingness to weed through the config and disable stuff you don't want.

It would be nice to have a "make minconfig" that requires the user to enable the required drivers (with the tool above, for example) and little other than what's necessary to get a system up and running.
_________________
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 40960
Location: 56N 3W

PostPosted: Tue Mar 27, 2018 7:09 pm    Post subject: Reply with quote

freke,

Pappys seeds lives on in the shape of Pappys preconfigs
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3561
Location: Hamburg

PostPosted: Tue Mar 27, 2018 8:44 pm    Post subject: Reply with quote

Code:
scripts/kconfig/streamline_config.pl
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2331

PostPosted: Tue Mar 27, 2018 11:56 pm    Post subject: Reply with quote

I used to use Pappy's seeds too.

Here's what I do:

  1. Get a list of your hardware (lshw, lspci, lsusb, ...)
  2. Prune out the devices you don't need.
  3. Get device drivers for the list you have, and absolutely nothing else.


The rest of it is more problematic.


  1. Get a list of the apps that you need.
  2. Get a list of kernel flags they need, or that you need in conjunction with these apps.
  3. Work out to your entire dependency tree.
  4. Enable those options.
  5. Get a working kernel.
  6. Prune unnecessary options sparingly, recompile the kernel, retest.
  7. Repeat until you're sick of it.
Back to top
View user's profile Send private message
Goverp
Guru
Guru


Joined: 07 Mar 2007
Posts: 560

PostPosted: Wed Mar 28, 2018 9:15 am    Post subject: Reply with quote

audiodef wrote:
...
It would be nice to have a "make minconfig" that requires the user to enable the required drivers (with the tool above, for example) and little other than what's necessary to get a system up and running.

Read up on
Code:
make localmodconfig
make localyesconfig

_________________
Greybeard
Back to top
View user's profile Send private message
Zucca
Veteran
Veteran


Joined: 14 Jun 2007
Posts: 1312
Location: KUUSANKOSKI, Finland

PostPosted: Wed Mar 28, 2018 9:51 am    Post subject: Reply with quote

All this time... I've been
Code:
zcat /proc/config.gz > .config && make oldconfig
... Sometimes tweaking using menuconfig or nconfig.
I guess "It didn't need fixing".

So... Ladies and gentlemen, where can I find meanings for all these kernel configuration tools?
_________________
..: Zucca :..

Code:
ERROR: '--failure' is not an option. Aborting...
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6233
Location: /usr/lib64/lv2

PostPosted: Wed Mar 28, 2018 11:28 am    Post subject: Reply with quote

NeddySeagoon wrote:


Pappys seeds lives on in the shape of Pappys preconfigs


Yes! :D

Also, app-portage/cpuid2cpuflags might be useful.
_________________
Gentoo Studio in open beta. Feedback wanted.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5067

PostPosted: Wed Mar 28, 2018 5:45 pm    Post subject: Reply with quote

Zucca wrote:
So... Ladies and gentlemen, where can I find meanings for all these kernel configuration tools?

`make help`
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 40960
Location: 56N 3W

PostPosted: Wed Mar 28, 2018 6:54 pm    Post subject: Reply with quote

Team,

There is this method from 2005.
In the last 13 years a lot more options have been added to the kernel.
It follows that you need more coffee.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 352
Location: Somewhere in Denmark

PostPosted: Wed Apr 04, 2018 4:55 pm    Post subject: Reply with quote

Thx for the feedback, and sorry for the late reply - been pretty busy at work :(

Adding another APU2C4 tomorrow and trying out the 4.16.0 kernel - going to check out some of the links :D

Thanks

NeddySeagoon wrote:
It follows that you need more coffee.


I'm all in for coffee :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum