LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 12-23-2020, 10:03 AM   #16
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063

You could have fooled me, apart from a few largely very minor things, I could have sworn that is the finished product

But I was planning to make a few very, very minor edits though. But again, the vast majority of what you've written I wouldn't change at all.
 
Old 12-23-2020, 10:56 AM   #17
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
I've written the "Configuring the kernel for building" section, but I think it might still need a bit of a cleanup though and maybe a few additions/changes.

Any thoughts about it?
 
Old 12-23-2020, 11:26 AM   #18
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
A person should invoke "make defconfig" first to get a default configuration and then use one of the options for editing it next, or comparing it against an existing one, if they have one.
 
Old 12-23-2020, 12:22 PM   #19
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
OK, I've gone over that and rearranged things a bit to make it flow better.
 
Old 12-23-2020, 01:27 PM   #20
JSB
Member
 
Registered: Dec 2020
Posts: 102

Rep: Reputation: 22
Quote:
Originally Posted by jsbjsb001 View Post
I think a good start is probably to work out what kind of content and structure the new wiki article should have.

A rough draft structure could be something like this:
[*]intro/description

...
[*]preparing your system for building/prerequisites

-development tools
-development packages for kernel build
-etc

*do we have a separate section for building with LLVM/Clang?*

...
[*]configuring the kernel for building

-answering all questions from the kernel build system
-copying current kernel config over to new kernel

...
[*]steps to build new kernel

...
[*]installing the built kernel modules and kernel

...
[*]configuring the newly built kernel for use with your system

...
[*]problems/issues that might arise

*or should that be incorporated into a section above?*

...

===================

What do you think about that example structure of the new wiki article Hazel?
Thank you JSB for this great thread, it will help me to build my own kernel, the ultimate challenge for a true Linuxer!
Where do I download the source?

Last edited by JSB; 12-23-2020 at 01:39 PM.
 
1 members found this post helpful.
Old 12-23-2020, 05:09 PM   #21
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
I made a blogpost a long time ago:
https://www.linuxquestions.org/quest...i-wrong-37912/

But, when I get back to it, or someone want to do it, I always remember I know what I am doing, but they don't necessarily, or it's their first time or tenth time or whatever.

I agree with whoever said the configuration section is the biggest one. I did not really make it complicated in my thingy, but there are so many ways to configure or pre-configure the Kernel, and these also needs an explanation so people can choose the best method for them. Like make oldconfig, localmodconfig or nodefconfig or those kind of things. That's an important thing to decide when you build your Kernel. Personally I have my own copy/paste style and use various config files and manually copy them etc, bla bla. But there are so many ways to go about this, that are useful for various purposes.

Another section I keep getting back to is prerequisites. I did not do it myself when I wrote this, only to realize even my own distro doesn't have them installed, duh. I have to keep reminding myself I'm not using Slackware. What you need to add I guess varies from distro to distro, some have this, some have that. But, a list of the general "build-essentials" would be nice to include in a wiki page. I mean, independent of distro, all of the pre-requisites. (I don't even know these myself tbh, just some/many of them).

Then you could have a section on added complexity. I only did/do the basics myself. I don't make headers and such things, and I did not explain why not or why one could/should and in what situations. Making headers is not the only thing, there are others too, and those could be included too, in a hyphenated section so to say. Like "things you can do" or "optional". initrd

...and I guess the least obvious section is actually the bootloader. If you want to build the Kernel, you best have some bootloader experience, maybe even in a guide have some basic bootloader tips.

Last edited by zeebra; 12-23-2020 at 05:29 PM.
 
Old 12-23-2020, 05:22 PM   #22
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
Quote:
Originally Posted by hazel View Post
I've created a stub page https://wiki.linuxquestions.org/wiki...n_Linux_kernel so that we can start adding actual text. btw where is everyone else?
Nice.. I would add "want to test or fix configurations" and "need the newest Kernel for reason XYZ" to the first section.
 
Old 12-23-2020, 11:18 PM   #23
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by rtmistler View Post
A person should invoke "make defconfig" first to get a default configuration and then use one of the options for editing it next, or comparing it against an existing one, if they have one.
Nice spot RT! I forgot all about that one!

Quote:
Originally Posted by hazel View Post
OK, I've gone over that and rearranged things a bit to make it flow better.
Very nice work once again Hazel! Do people think we should add something about make oldconfig (and perhaps and if it isn't going to make that section too long, maybe the other config options zeebra suggests?), as zeebra suggests? As personally I think it would be good for the sake of completeness if for no other reason. Assuming we are in agreement about that; could I ask you to do that since I think you could explain that better than I could, and while keeping the nice flow you've created there? Other than that, and unless anyone can think of any other improvements, I think that section hits the mark and is a winner.

Quote:
Originally Posted by zeebra View Post
...
Another section I keep getting back to is prerequisites. I did not do it myself when I wrote this, only to realize even my own distro doesn't have them installed, duh. I have to keep reminding myself I'm not using Slackware. What you need to add I guess varies from distro to distro, some have this, some have that. But, a list of the general "build-essentials" would be nice to include in a wiki page. I mean, independent of distro, all of the pre-requisites. (I don't even know these myself tbh, just some/many of them).

Then you could have a section on added complexity. I only did/do the basics myself. I don't make headers and such things, and I did not explain why not or why one could/should and in what situations. Making headers is not the only thing, there are others too, and those could be included too, in a hyphenated section so to say. Like "things you can do" or "optional". initrd

...and I guess the least obvious section is actually the bootloader. If you want to build the Kernel, you best have some bootloader experience, maybe even in a guide have some basic bootloader tips.
I do intend on making some small changes and additions to the prerequisites section, namely listing the kernel dependencies required to build it (excluding the actual development tools themselves - as I agree with Hazel's idea about just listing some of the metapackages for the tools themselves). I've also added a statement about "package groups", in that, some distros have "package groups" that can install all of the required tools for you, without having to install individual packages - similar to metapackages.

We are going to include info about both building a kernel with and without an initrd, as well as info about adding a boot option to GRUB to boot the new kernel.

Quote:
Originally Posted by zeebra View Post
Nice.. I would add "want to test or fix configurations" and "need the newest Kernel for reason XYZ" to the first section.
In regards to the first idea; could you perhaps post in this thread the content you're thinking of so we can have a clear idea of exactly what you're suggesting there, thanks. I think in relation to your second idea, what's already there should be enough. As Hazel said earlier on in this thread; we should try to strike a balance between providing complete info and not making the article "offputting" to people that have never attempted to build their own kernel before. And I agree with Hazel on that point.

The only concerns I have in relation to your first suggestion would be:
  • is it worthwhile to include such a section?
  • is it going to make the article too long and offputting to the readers of it?

I will admit that I'm on the fence in relation to your first idea, so I'll go with the majority opinion and be a "populist" and do a "me too" on that one.

Last edited by jsbjsb001; 12-23-2020 at 11:21 PM. Reason: tpyo
 
Old 12-24-2020, 02:35 AM   #24
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
Quote:
Originally Posted by jsbjsb001 View Post

I do intend on making some small changes and additions to the prerequisites section, namely listing the kernel dependencies required to build it (excluding the actual development tools themselves - as I agree with Hazel's idea about just listing some of the metapackages for the tools themselves). I've also added a statement about "package groups", in that, some distros have "package groups" that can install all of the required tools for you, without having to install individual packages - similar to metapackages.
On the top of my head I can remember some:
make
bison
ncurses-devel
openssl-devel

There are ofcourse many more, but I guess some common ones would be nice to list. Some distroes don't include them (and others), and it can be quite frustrating to try to figure it out.

Quote:
Originally Posted by jsbjsb001 View Post
In regards to the first idea; could you perhaps post in this thread the content you're thinking of so we can have a clear idea of exactly what you're suggesting there, thanks. I think in relation to your second idea, what's already there should be enough. As Hazel said earlier on in this thread; we should try to strike a balance between providing complete info and not making the article "offputting" to people that have never attempted to build their own kernel before. And I agree with Hazel on that point.

The only concerns I have in relation to your first suggestion would be:
  • is it worthwhile to include such a section?
  • is it going to make the article too long and offputting to the readers of it?

I will admit that I'm on the fence in relation to your first idea, so I'll go with the majority opinion and be a "populist" and do a "me too" on that one.
I meant, those are the most common reasons people want/need to build a custom Kernel. For testing some issues or changing the configuration to include something, or some people who need the newest Kernel for whatever reason, ex, ATI/Nvidia crowd. Especially the latter ones, there are many "newbs" that need to make their own Kernel for that reason.

1st idea? You mean about configuration? I dunno.. It just seems important, because if I refer someone to my brief little thing, I'm always tempted to say they can use localmodconfig for example, but usually I recommend just using the distro Kernel config as the base (as I do myself in most cases). But yeah, perhaps you are right, using localmodconfig and such things is probably not what a newbie should do. Probably the recommended way in that case is to use the distro config file from /boot aka config-uname.
 
Old 12-24-2020, 06:55 AM   #25
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
So I've added Zeebra's suggestions to the introduction and a paragraph on the use of "make oldconfig". I tend to agree with jsb that we don't need to do much more with these sections.

I suggest that jsb does the step-by-step build and installation guides, and I will make a start on the bootloader section. I would also like to put something about kernel help into the tips section, because this is actually the most amazing and useful help system I have ever seen (although the LQ Wiki Style Manual forbids you to say anything like that explicitly).

Last edited by hazel; 12-24-2020 at 07:14 AM.
 
1 members found this post helpful.
Old 12-24-2020, 07:18 AM   #26
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by zeebra View Post
On the top of my head I can remember some:
make
bison
ncurses-devel
openssl-devel

There are ofcourse many more, but I guess some common ones would be nice to list. Some distroes don't include them (and others), and it can be quite frustrating to try to figure it out.
...
Yes, I know which packages need to be installed to build the kernel, I was only making the point that we are not going to list all of the individual development tools themselves for the same reason already mentioned and make is a development tool. Hazel has already mentioned the ncurses library in the prerequisites section, which as far as I'm aware is only needed for make menuconfig if I'm not mistaken.

I was talking about the other kernel build dependencies, which I'll explicitly list in the wiki article after I make this post. But that said, I think after that the prerequisites section will be done and no more needs, nor should be added to it. And I think the intro section is long enough and includes more than enough info now that Hazel's added the things you were talking about before.

Quote:
1st idea? You mean about configuration? I dunno.. It just seems important, because if I refer someone to my brief little thing, I'm always tempted to say they can use localmodconfig for example, but usually I recommend just using the distro Kernel config as the base (as I do myself in most cases). But yeah, perhaps you are right, using localmodconfig and such things is probably not what a newbie should do. Probably the recommended way in that case is to use the distro config file from /boot aka config-uname.
I think I misunderstood your idea and got the wrong impression, but Hazel seems to have understood it, so again, I think the intro section is complete now.

Yes, I do plan on adding something in the "Tips and tricks" section about copying the current kernel config over to a new kernel, and yes, I've already done that on my own machine, so I know exactly how to do that so there's no need to explain that to me.

Again, we have already agreed that we should be striking a balance between completeness and not discouraging people from attempting to build their own kernel by overwhelming them with too much info.
 
Old 12-24-2020, 07:18 AM   #27
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642Reputation: 642
Quote:
Originally Posted by hazel View Post
So I've added Zeebra's suggestions to the introduction and a paragraph on the use of "make oldconfig". I tend to agree with jsb that we don't need to do much more with these sections.
Actually, that's not what I meant. It was just an example. If anything I think the "configuration section" should be simplified into the most common and foolproof methods, while other options should be mentioned as an appendix. What are the most viable options for a less experienced user and how to do those.

One of the issues I was having was trying to explain some basics while trying to keep it simple. So in the end it was a bit too long and I decided to add a summary too
 
Old 12-24-2020, 07:18 AM   #28
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by hazel View Post
So I've added Zeebra's suggestions to the introduction and a paragraph on the use of "make oldconfig". I tend to agree with jsb that we don't need to do much more with these sections.

I suggest that jsb does the step-by-step build and installation guides, and I will make a start on the bootloader section. I would also like to put something about kernel help into the tips section, because this is actually the most amazing and useful help system I have ever seen (although the LQ Wiki Style Manual forbids you to say anything like that explicitly).
No worries Hazel, sounds like a plan.
 
Old 12-24-2020, 07:22 AM   #29
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
Quote:
Originally Posted by zeebra View Post
Actually, that's not what I meant. It was just an example. If anything I think the "configuration section" should be simplified into the most common and foolproof methods, while other options should be mentioned as an appendix. What are the most viable options for a less experienced user and how to do those.
OK, Zeebra. Which bits do you think should be moved to Tips and Tricks?
 
Old 12-24-2020, 07:34 AM   #30
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Original Poster
Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by zeebra View Post
Actually, that's not what I meant. It was just an example. If anything I think the "configuration section" should be simplified into the most common and foolproof methods, while other options should be mentioned as an appendix. What are the most viable options for a less experienced user and how to do those.

One of the issues I was having was trying to explain some basics while trying to keep it simple. So in the end it was a bit too long and I decided to add a summary too
I think the configuration section should explain the various approaches rather than just having one "simple" method. As it's important to make the point to the reader that they have the flexibility to choose from a number of approaches, not have one dictated to them. So I wouldn't be in favor of taking what's already there out and stuffing it into the "Tips and tricks" section.
 
  


Reply

Tags
development, kernel, lq wiki



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Web Served 7: Wiki wiki wiki! LXer Syndicated Linux News 0 02-19-2013 09:10 PM
Tip: for answers, "wiki, wiki!" sundialsvcs Linux - Newbie 1 01-18-2006 02:40 PM
Wiki: Show Printable Version / printer friendly version / wiki page setup Emmanuel_uk LQ Suggestions & Feedback 1 10-24-2005 08:09 AM
tutorial on wiki wiki web alix123 Programming 1 04-02-2005 02:08 PM
wiki: supposed to use the same wiki namespace? liquigel LQ Suggestions & Feedback 1 03-07-2004 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration