VSIDO Community

VSIDO Support => Scripts and How To's => How To's => Topic started by: jedi on August 25, 2015, 07:27:58 AM

Title: Compiling your own Kernel
Post by: jedi on August 25, 2015, 07:27:58 AM
Got this idea from PackRat.  Thought I'd just post it here so I don't lose it!  If it helps you out, thank PackRat and the other individuals listed in this post.  I copied all of it

It is smooth. I tweak it for my cpu and unload some of the video drivers - like trident - that I'll never use and pick up a bit of performance.

Using VSIDO for an NFS file/media server. Need to get it going as an (internal) ftp server; I carried over my ftp configuration from slackware (or so I thought), but something isn't right now. But all things considered VSIDO as server = happiness.

Great to hear that about a VSIDO server...  How do you go about the tweak and removal with the kernel?  That would be a great How To if you ever felt up to it

This is the method I use for a debian kernel -

http://verahill.blogspot.com/2012/07/compiling-kernel-35-on-debian-testing.html (http://verahill.blogspot.com/2012/07/compiling-kernel-35-on-debian-testing.html)

You need to install kernel-package, fakeroot, and build-essential for this to work.

There is also a site called kernel seeds (kernelseeds.org I think) that has some good commands to determine your hardware - appears to be down at the moment.

The only additional step I do is after the make oldconfig command. Once you have answered all the questions, use the command -

Code: [Select]
make menuconfig
to bring up a graphical menu of your kernel config file. I make these changes -

Change the cpu type to my cpu - the default is generic 64 or 32 bit
Change the maximum number of CPUs to what you have or 2x what you have - the default is 512 CPUs and something like 8k of memory is alloted for each one.

The real changes are in the drivers sections - usually your hardware isn't going yo change, so you can remove plenty of stuff you don't have - like broadcom ethernet devices and trident video cards.

That decreases the size of the compiled kernel, as well as memory needed since those drivers are dropped - and won't get loaded.

Save the new config and finish the steps in that linked guide.

The performance increases are really only slight - it's more about building a more efficient kernel designed for your computer.

The Slackware beginners' guide and Arch Wiki have good HowTo's for building kernels that are generic build instructions.

Doc. attached with start to finish directions.
Title: Re: Compiling your own Kernel
Post by: VastOne on August 25, 2015, 05:04:10 PM
Brilliant Jedi...

Thanks for this How To!
Title: Re: Compiling your own Kernel
Post by: PackRat on August 27, 2015, 02:45:30 PM
kernel seeds site referenced above. (http://kernel-seeds.org/working.html)

It's pretty handy to determine what hardware is on a GNU/Linux system. If you're really diligent, you can really cut down the size of your kernel and boot times. Some people were claiming 10 second boot times on sysVinit systems.

home page kernel seeds (http://kernel-seeds.org/)

Can also go the extra mile and optimize your system by compiling against your hardware. (https://wiki.gentoo.org/wiki/GCC_optimization)
Title: Re: Compiling your own Kernel
Post by: Snap on August 28, 2015, 12:27:47 AM
Thanks, guys. I'll get into all this whenever I manage to thin my too many opened fronts.
Title: Re: Compiling your own Kernel
Post by: hakerdefo on August 31, 2015, 08:05:30 PM
Nice jedi! Many will find this document very handy.
Title: Re: Compiling your own Kernel
Post by: jedi on August 31, 2015, 08:59:06 PM
As I said in the OP, all the praise goes to PackRat.   8)  I simply copied all his info into this document basically.  The 'LinuxChix (http://www.linuxchix.org/content/courses/kernel_hacking/)' web-site is great info as well, and I confess to blatantly copying from them as well...  ???