custom kernel compile

Write suggestions and new ideas in here
More ideas here http://community.linuxmint.com/idea/welcome
Forum rules
  • Only post ideas here that are specifically about the Linux Mint distribution or its websites.
  • So that developers and users from any distribution can discuss ideas in one place, post ideas about improving software to the collaboration website for that software instead.
Post Reply
kneedragon1962
Level 1
Level 1
Posts: 4
Joined: Wed May 24, 2017 5:22 am

custom kernel compile

Post by kneedragon1962 » Tue Jun 05, 2018 11:05 am

I've got the very fuzzy early stages of an idea. Or, more accurately, I want to do something, but I'm not quite smart enough to do it myself.

What I'd like to do, is download an install ISO, let's say Mint, or Ubuntu or something, and run the install, get it working, and then do the heavy-duty optimise. I want to get a complete linux kernel source, either the source for the generic kernel that the installer grabbed, or maybe download the most recent stable edition from kernel.org, and then fire up my rocket-science tool and compile a custom kernel. My beautiful assistant will now make a list of all the hardware she can see in this computer, now, and add to that list anything which just should be there in any and all working Linux kernels, and prepare a .config file to suit. It would warn the user that if she wanted to add some other stray piece of equipment, like that old Canon printer, then now would be a real good time to plug it in... So maybe next it would make a kernel from the source that included drivers and modules for pretty much everything, and install that, and prompt her to shut down and restart, and then it would go through all the modules and drivers and stuff it had, and tick off the ones it found equipment for, and remove anything that it saw no trace of. The trick, the catch, is knowing what you can take out and knowing what has to be there or the machine (any machine) is simply not going to run. Then it could write a new, leaner meaner .config file, and go through the build process again, and give you a custom kernel that has all the bits and bods for your computer, and leaves out all the weird & wonderful stuff that's still there, because some people still use PS2 mice...

I want a tool that walks you through making a custom kernel, using recent source, but removing all the stuff you don't need. Then maybe helps you install it, in case you forget or can't read or something...

There are a number of good arguments against this, starting with the idea that if your machine has the computational horsepower and resources to compile a custom kernel, perhaps twice, then it has the resources to install and use a generic kernel and don't be a goose doing this stuff... You are introducing 37 different points where you may break things, for a build that is going to have to re-done anyway, the first time they plug in a different mouse...

The expert part of this, is knowing what to take out and what to leave in.... The Linux kernel is like any other piece of software - it's subject to bloat. There is a way around that, but it requires real expertise to use it properly. I want to simplify the process, and guide chumps like myself through it so they don't chop their left foot off with the axe...

Menuconfig is a nightmare. It was a nightmare in 1998 the first time I tried (and failed) to use it, and it has been a nightmare ever since.
Windows does this kind of stuff more or less automatically. (Kind-a, anyway) and Windows sucks. But doing this in Linux, now, requires real expertise....
The concept, is start with a generic kernel that has drivers & modules for pretty much everything, all the stuff that's reasonably common anyway. Then sort through and mark everything that doesn't get used. Then remove it, and build the kernel again, with only the things it needs. Now make that a whole lot easier to do...

deepakdeshp
Level 11
Level 11
Posts: 3928
Joined: Sun Aug 09, 2015 10:00 am

Re: custom kernel compile

Post by deepakdeshp » Tue Jun 05, 2018 12:51 pm

We get more and more powerful computers with powerful CPUs and larger and larger memory.
So why would one remove the so called bloatware when the hardware is perfectly capable of handling it
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
jimallyn
Level 18
Level 18
Posts: 8546
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: custom kernel compile

Post by jimallyn » Wed Jun 06, 2018 2:58 am

You could probably find some useful information at these two sites:

https://gentoo.org/

http://www.linuxfromscratch.org/index.html
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: custom kernel compile

Post by catweazel » Wed Jun 06, 2018 3:40 am

kneedragon1962 wrote:
Tue Jun 05, 2018 11:05 am
Menuconfig is a nightmare.
Welcome to compiling your own kernel. The only other way is to edit the .config yourself with a text editor.
Windows does this kind of stuff more or less automatically. (Kind-a, anyway)
Nonsense. With Windwoes you get what you're given.
But doing this in Linux, now, requires real expertise....
Yes, real expertise in simple, everyday reading of the information displayed by menuconfig, and expertise in making simple, everyday yes/no decisions.
The concept, is start with a generic kernel that has drivers & modules for pretty much everything, all the stuff that's reasonably common anyway. Then sort through and mark everything that doesn't get used. Then remove it, and build the kernel again, with only the things it needs.
That's what menuconfig is used for. Copying the existing kernel's .config being the first step.
Now make that a whole lot easier to do...
Linux is open source so there's nothing stopping you from pulling the menuconfig code and working out how it treats the kernel .config and writing your own GUI.

It seems all this boils down to you not wanting to use menuconfig, so my vote is -1.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

kneedragon1962
Level 1
Level 1
Posts: 4
Joined: Wed May 24, 2017 5:22 am

Re: custom kernel compile

Post by kneedragon1962 » Thu Jun 07, 2018 12:10 am

Catweazel, these are all fair criticisms, and I can't point to a singe fault. I can't argue with you.
In 1985, I was using DOS and looking to get Windows for Workgroups. It's not that I liked them, they were simply what we had. What we have now, 30+ years later, is much better.
In 1998, I had my first go at compiling a custom kernel, using pretty much exactly the tools we have now. I tried for 5 days and failed, miserably.
About 3 months ago, I had another go at it. This time, I didn't try to edit or change or customise anything, I simply copied the config for the current kernel, and then opened it with menuconfig, saved it, and left again. That does work.
What I'm requesting, as an old doofus, is something to hold my hand and whisper soft reassurance in my ear, while it leads me through that dark paths of Mordor...
It doesn't need to be GUI, it just needs to be slightly easier to use than the menuconfig, which doesn't look to me as if it's changed in any way in the last 20 years...
I could still be using DOS and Win-3.11, but thankfully I'm not.... We've seen change and evolution and improvement, and things have gotten a whole lot better.

kneedragon1962
Level 1
Level 1
Posts: 4
Joined: Wed May 24, 2017 5:22 am

Re: custom kernel compile

Post by kneedragon1962 » Thu Jun 07, 2018 12:24 am

jimallyn wrote:
Wed Jun 06, 2018 2:58 am
You could probably find some useful information at these two sites:
https://gentoo.org/
http://www.linuxfromscratch.org/index.html
Thank you Jim.
LOL - You're the second person who's pointed me at Linux From Scratch in the last year... If I hadn't proven to be quite such a digital & technical idiot, I might try it... I am perhaps ready to lance a blister, and maybe use a makeshift splint to get someone back to civilisation, make an assault on an ingrown toenail. I'm not ready to scrub up and perform surgery. That's a little bit over my head.

Post Reply

Return to “Suggestions & New Ideas”