collapse collapse

* Who's Online

  • Dot Guests: 69
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Board Stats

  • stats Total Members: 88
  • stats Total Posts: 11164
  • stats Total Topics: 1700
  • stats Total Categories: 4
  • stats Total Boards: 76
  • stats Most Online: 1470

Author Topic: Do you compiler your own Linux Kernel?  (Read 11710 times)

0 Members and 1 Guest are viewing this topic.

Offline FireX

  • Full Member
  • ***
  • Posts: 108
  • Reputation 131
  • Gender: Male
    • View Profile
Do you compiler your own Linux Kernel?
« on: April 01, 2011, 12:36:33 pm »
Do you compiler your own Linux Kernel?
You should at least try once, and it boots up faster and it is more efficient.
but listing all the modules is a pain...

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Do you compiler your own Linux Kernel?
« Reply #1 on: April 01, 2011, 12:47:25 pm »
it boots up faster and it is more efficient.

That is system dependent. Windows 7 boots up faster then Nix(not recompiled) on my computer. It all depends on what you have setup to run on boot up vs run at login. I'm sure the same holds true for Nix systems. It is all in the settings. Since you did a clean compile, chances are, you reset to the defaults, not the settings the installation disk or ISO you used gave. You often see different builds with slightly different settings and operations. In the end, it comes down to "What do I want my OS to do, and do it well?"
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

Offline FireX

  • Full Member
  • ***
  • Posts: 108
  • Reputation 131
  • Gender: Male
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #2 on: April 01, 2011, 02:37:59 pm »
It is all in the settings. Since you did a clean compile, chances are, you reset to the defaults, not the settings the installation disk or ISO you used gave.

Some Linux/BSD distribution doesn't have the installation ISO.
Like I run Gentoo, a source base distribution, it is like LinuxFromStracth except they provide you with a pre-bootstrapped system and portage(package manager)
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
once you finish installing.. you recompile the base again :P

In settings you can set very specific drivers on what hardware you want to be built, so you will have a lighter kernel and less modules running in the background == faster.

You can also set the optimzation for gcc for your processor eg:
Code: [Select]
-O3 -march=blah -mtune=blah ... and so on

[edited name=FireX date=1301686867][/edited]
« Last Edit: April 01, 2011, 02:52:58 pm by FireX »

Offline Nathan

  • Administrator
  • Hero Member
  • *
  • Posts: 1437
  • Reputation 1768
  • Gender: Male
  • woof woof
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #3 on: April 02, 2011, 09:12:05 am »
Do you compiler your own Linux Kernel?
You should at least try once, and it boots up faster and it is more efficient.
but listing all the modules is a pain...
I really doubt that you will get that much of a speed increase from it. And even if you do - it's more hassle than its worth. Especially considering you have to recompile every time a new kernel version comes out.
Projects:
[ Axios Engine ] [ sourcehub ]
Compilers: Microsoft Visual Studio 2008, GNU C++, FASM, MASM, VB 6/.Net.
Languages: C++, PHP, ASM, JS, VB6/.Net, BASIC, HTML, MySQL
Please buy me some books: Amazon Wishlist

Offline jho

  • The flamboyant FLOSS fanatic
  • Sr. Member
  • *
  • Posts: 352
  • Reputation 1199
  • Gender: Male
    • View Profile
    • http://hajotus.net
Re: Do you compiler your own Linux Kernel?
« Reply #4 on: April 02, 2011, 11:09:06 am »
I really doubt that you will get that much of a speed increase from it. And even if you do - it's more hassle than its worth. Especially considering you have to recompile every time a new kernel version comes out.
Actually you can get the kernel to be quite a bit faster and leaner than in most binary distributions. You can get rid of initrd, most of the unneeded drivers, and you can try out BFS or some other crazy patches that might not be the stablest thing out there, but can yield a noticeable performance increase on certain tasks.

There's also make oldconfig which allows you to migrate from older kernel's .config to the newer, only changing if something new was added, or if something was marked stable instead of experimental, and so on. So in reality upgrading is quite easy and painless.

But yeah, still I'd say the init/rc system and other software you use matters more, especially when considering the general speed and performance of the system, not just startup.

Size is another thing why some people might want to do it, especially on embedded and other systems where smaller is better. I used Gentoo for a few years and had gotten used to having a boot partition of 16 megs. Then I switched to Ubuntu without resizing any partitions, and was quite surprised to find out that apt would run out of free space on /boot when installing a new kernel.. I'd have to manually remove the old kernel before installing a new one, and could only have one kernel version installed at a time. With Gentoo and my own kernels the final kernel images were generally around two megabytes, so potentially I could've installed up to eight different kernels on /boot. Usually I kept kernel images from two or three versions ago in case of regressions or anything.
"I'm sorry, I only accept criticism in the form of sed expressions."

Offline Nathan

  • Administrator
  • Hero Member
  • *
  • Posts: 1437
  • Reputation 1768
  • Gender: Male
  • woof woof
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #5 on: April 02, 2011, 12:52:16 pm »
I really doubt that you will get that much of a speed increase from it. And even if you do - it's more hassle than its worth. Especially considering you have to recompile every time a new kernel version comes out.
Actually you can get the kernel to be quite a bit faster and leaner than in most binary distributions. You can get rid of initrd, most of the unneeded drivers, and you can try out BFS or some other crazy patches that might not be the stablest thing out there, but can yield a noticeable performance increase on certain tasks.

There's also make oldconfig which allows you to migrate from older kernel's .config to the newer, only changing if something new was added, or if something was marked stable instead of experimental, and so on. So in reality upgrading is quite easy and painless.

But yeah, still I'd say the init/rc system and other software you use matters more, especially when considering the general speed and performance of the system, not just startup.

Size is another thing why some people might want to do it, especially on embedded and other systems where smaller is better. I used Gentoo for a few years and had gotten used to having a boot partition of 16 megs. Then I switched to Ubuntu without resizing any partitions, and was quite surprised to find out that apt would run out of free space on /boot when installing a new kernel.. I'd have to manually remove the old kernel before installing a new one, and could only have one kernel version installed at a time. With Gentoo and my own kernels the final kernel images were generally around two megabytes, so potentially I could've installed up to eight different kernels on /boot. Usually I kept kernel images from two or three versions ago in case of regressions or anything.
I remember awhile back Ubuntu wanted a 10 second boot up time in 10.04. In fact this guy has his laptop boot up in 8.6 seconds: http://www.jamesward.com/2010/09/08/ubuntu-10-10-boots-in-8-6-seconds/

For the average user and the amount of time learning how to do vs the slight speed increase, I don't think it would be worth it.
Projects:
[ Axios Engine ] [ sourcehub ]
Compilers: Microsoft Visual Studio 2008, GNU C++, FASM, MASM, VB 6/.Net.
Languages: C++, PHP, ASM, JS, VB6/.Net, BASIC, HTML, MySQL
Please buy me some books: Amazon Wishlist

Offline FireX

  • Full Member
  • ***
  • Posts: 108
  • Reputation 131
  • Gender: Male
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #6 on: April 02, 2011, 01:09:07 pm »
Get a account and read this. Optimizations does matter.
http://www.linux-mag.com/id/7574/1/

Besides if you remove initrd, the kernel doest' have to detect your hardware every time you boot and load the modules.
« Last Edit: April 02, 2011, 01:20:13 pm by FireX »

Offline jho

  • The flamboyant FLOSS fanatic
  • Sr. Member
  • *
  • Posts: 352
  • Reputation 1199
  • Gender: Male
    • View Profile
    • http://hajotus.net
Re: Do you compiler your own Linux Kernel?
« Reply #7 on: April 02, 2011, 01:48:29 pm »
I remember awhile back Ubuntu wanted a 10 second boot up time in 10.04. In fact this guy has his laptop boot up in 8.6 seconds: http://www.jamesward.com/2010/09/08/ubuntu-10-10-boots-in-8-6-seconds/
Yeah, I wonder if Ubuntu ever really pushed the changes to the release. I had Ubuntu 10.10 installed on my laptop for a while using the same configs (i.e. defaults) as him, but it took my laptop still over 1.5 minutes to boot. I admit it's a measly 1.6 GHz Atom with a gig of ram, but I've seen a lot faster on other OSes.

Quote
For the average user and the amount of time learning how to do vs the slight speed increase, I don't think it would be worth it.
Absolutely. If you spend two hours fiddling with this stuff, you've wasted more time than you can save in the next five years for all of your boots with that one second speedup. I did it because it was fun. I don't do it anymore because I have other equally fun or even funnier stuff to do.
"I'm sorry, I only accept criticism in the form of sed expressions."

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Do you compiler your own Linux Kernel?
« Reply #8 on: April 02, 2011, 05:46:16 pm »
I really doubt that you will get that much of a speed increase from it. And even if you do - it's more hassle than its worth. Especially considering you have to recompile every time a new kernel version comes out.
Actually you can get the kernel to be quite a bit faster and leaner than in most binary distributions. You can get rid of initrd, most of the unneeded drivers, and you can try out BFS or some other crazy patches that might not be the stablest thing out there, but can yield a noticeable performance increase on certain tasks.

There's also make oldconfig which allows you to migrate from older kernel's .config to the newer, only changing if something new was added, or if something was marked stable instead of experimental, and so on. So in reality upgrading is quite easy and painless.

But yeah, still I'd say the init/rc system and other software you use matters more, especially when considering the general speed and performance of the system, not just startup.

Size is another thing why some people might want to do it, especially on embedded and other systems where smaller is better. I used Gentoo for a few years and had gotten used to having a boot partition of 16 megs. Then I switched to Ubuntu without resizing any partitions, and was quite surprised to find out that apt would run out of free space on /boot when installing a new kernel.. I'd have to manually remove the old kernel before installing a new one, and could only have one kernel version installed at a time. With Gentoo and my own kernels the final kernel images were generally around two megabytes, so potentially I could've installed up to eight different kernels on /boot. Usually I kept kernel images from two or three versions ago in case of regressions or anything.
I remember awhile back Ubuntu wanted a 10 second boot up time in 10.04. In fact this guy has his laptop boot up in 8.6 seconds: http://www.jamesward.com/2010/09/08/ubuntu-10-10-boots-in-8-6-seconds/

For the average user and the amount of time learning how to do vs the slight speed increase, I don't think it would be worth it.

Win7 boots in 12 for me on my SS.
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

Offline Azrathud

  • - Secret Permissions Level 1 -
  • Full Member
  • ***
  • Posts: 130
  • Reputation 162
  • Gender: Male
  • FLOSS sympathizer
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #9 on: August 30, 2011, 09:00:40 am »
I've been planning to build LFS for sometime, Either in a virtualbox or once I get my hands on another computer. One thing I know: It'll be a learning experience.
Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Do you compiler your own Linux Kernel?
« Reply #10 on: August 31, 2011, 04:05:29 pm »
After trying to build my own OS from scratch, I've come to realize that its actually pretty easy to write a OS. The hardest part was the damn boot loader which had to be written in ASM. Compiling your own nix would be a good way to skip all that.
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

Offline Azrathud

  • - Secret Permissions Level 1 -
  • Full Member
  • ***
  • Posts: 130
  • Reputation 162
  • Gender: Male
  • FLOSS sympathizer
    • View Profile
Re: Do you compiler your own Linux Kernel?
« Reply #11 on: September 08, 2011, 05:31:58 pm »
After trying to build my own OS from scratch, I've come to realize that its actually pretty easy to write a OS. The hardest part was the damn boot loader which had to be written in ASM. Compiling your own nix would be a good way to skip all that.

I thought that creating all the drivers would be the hardest part. You know, with there needing to be a shite-tonne of them to make the OS compatible with people's computers.

Also, why does it need to be written in assembly?
Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end.

Offline Celestialkey

  • Administrator
  • Hero Member
  • *
  • Posts: 3962
  • Reputation 4874
  • Gender: Male
  • Its Alive!!
    • View Profile
    • www.CelestialCoding.com
Re: Do you compiler your own Linux Kernel?
« Reply #12 on: September 10, 2011, 01:57:41 pm »
Drivers are difficult depending on the device, but the initial starting bootloader is the hardest part of a OS in my opinion.

Honestly, I don't know why. I've never seen a bootloader written in anything but asm. I assume there is something low level that you are incapable of doing with a higher level language such as C. Maybe creating the basic filesystem, or maybe certain commands simply don't exist in C for certain features.
Created By: Eczuo
Quote
I have noticed that people who claim that everything is predestined, and we can do nothing to change it, look both ways before they cross the road.
Quote
I'd prefer to die standing, than to live on my knees - Che Guevara
Quote
If you change the way you look at something, does that something change in any way?
- Quantum Theory

Hacking
Quote
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill


Quote from: Revelations 12:4
And his tail drew the third part of the stars of heaven, and did cast them into the earth; and the dragon stood before the woman which was ready to be delivered, for to devour her child as soon as it was born.

Quote
It takes skill to build an empire. It takes an idiot to maintain it.

Offline jho

  • The flamboyant FLOSS fanatic
  • Sr. Member
  • *
  • Posts: 352
  • Reputation 1199
  • Gender: Male
    • View Profile
    • http://hajotus.net
Re: Do you compiler your own Linux Kernel?
« Reply #13 on: September 19, 2011, 07:59:26 am »
GRUB (which is what most linuxes and bsd's use) is mostly written in C, with only some platform-specific snippets in assembly.
"I'm sorry, I only accept criticism in the form of sed expressions."

 

Donate


* Search


* Recent Posts

I miss the chatbox by Shishka
[August 27, 2019, 11:52:39 pm]


Image Comparison by Shishka
[May 15, 2017, 01:18:02 pm]


Re: srchub - free source code hosting by Nathan
[December 14, 2015, 11:37:02 pm]


Re: srchub - free source code hosting by Celestialkey
[November 27, 2015, 08:51:42 am]


Updates by Nathan
[October 30, 2015, 08:27:36 pm]