You are not logged in.

#1 2012-06-03 20:37:02

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Stripping down the kernel

Hey all,

Playing around with Powerdown got me into removing modules I don't need, which in turn got me to build a kernel without the modules I don't need with the help of modprobed_db.

Now, I want to take things even further and strip the kernel even more - just for the fun of it and perhaps to learn one or two (or hundred lol) Basically I would like to remove everything I don't need, but I don't have a clue on what to do next! I searched through the wiki on this but it doesn't go beyond removing the modules you don't need, so I ask you kernel guru's:

What would be my next step to strip the kernel, by removing stuff I don't need? Can you point me to any good guides/resources/handbooks et cetera? (I know I can google on this but I don't know what articles to trust and which would work and whatnot, as I have no experience with this whatsoever)

Thanks in advance!

(mods, I don't know if this is the correct section. If not, please move it to the correct one)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2012-06-03 20:55:22

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

Re: Stripping down the kernel

Google is the way to go - sure, you don't know what you can trust, but the same applies to this forum. As a complete beginner, you'll be doing a lot of builds, many that won't work, to learn your one/two/hundred things about kernel building, and there aren't really any shortcuts. You wade through menuconfig, you scour the kernel docs, you google the stuff you don't understand, you strip some stuff out, you build, if you're lucky it boots.... then return to the beginning and start again.

Offline

#3 2012-06-03 20:57:56

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Stripping down the kernel

I had expected such an answer. It's just that I would trust this forum (especially respected members such as you) more than a random hit I would get on Google.

But yea, I guess I'll just start somewhere and see where I end up. Wouldn't be fun anyway to get it right in one go!

Thanks!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#4 2012-06-03 22:40:11

Odaer
Member
Registered: 2010-08-14
Posts: 87

Re: Stripping down the kernel

One of the arch wiki pages recommend the book "Linux Kernel in a Nutshell". I have no idea if its a good book bur you can find the book free at the authors web-page http://www.kroah.com/lkn/

Offline

#5 2012-06-03 22:49:58

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Stripping down the kernel

Odaer wrote:

One of the arch wiki pages recommend the book "Linux Kernel in a Nutshell". I have no idea if its a good book bur you can find the book free at the authors web-page http://www.kroah.com/lkn/

It's a good book, but it won't help you with building the kernel or other "sysadmin" kinds of tasks - it's more of an "understanding kernel code" book, which will help you become a kernel hacker that can contribute patches - at least if you already know how to program in C.

Offline

#6 2012-06-03 22:53:01

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

Re: Stripping down the kernel

1) make localmodconfig is your friend
2) modprobed_db is your friend which is in the AUR.

Last edited by graysky (2012-06-03 22:53:50)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2012-06-03 23:24:54

Odaer
Member
Registered: 2010-08-14
Posts: 87

Re: Stripping down the kernel

ataraxia wrote:
Odaer wrote:

One of the arch wiki pages recommend the book "Linux Kernel in a Nutshell". I have no idea if its a good book bur you can find the book free at the authors web-page http://www.kroah.com/lkn/

It's a good book, but it won't help you with building the kernel or other "sysadmin" kinds of tasks - it's more of an "understanding kernel code" book, which will help you become a kernel hacker that can contribute patches - at least if you already know how to program in C.

I  haven't read the book but according to the authors web-page.

This book is intended to cover everything that is needed to know in order to properly build, customize, and install the Linux kernel. No programming experience is needed to understand and use this book.

Some familiarity with how to use Linux, and some basic command-line usage is expected of the reader.

This book is not intended to go into the programming aspects of the Linux kernel; there are many other good books listed in the Bibliography that already cover this topic.

Offline

#8 2012-06-03 23:25:53

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Stripping down the kernel

graysky wrote:

1) make localmodconfig is your friend
2) modprobed_db is your friend which is in the AUR.

Thanks, I will look into localmodconfig and was already using modprobed_db. I will also look into the book, appreciate the advice guys!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB