LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-01-2021, 09:55 AM   #16
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479

Quote:
Originally Posted by Paulo2 View Post
Here it takes about 5 minutes to build the kernel (5.11) with config-generic,
and about 35 minutes to build 'bzImage modules'.
I run 'make -j9', CPU is an AMD FX-8320E (eight cores).
My 1st run with the compile pair on 5.10.19 was similar but slightly longer than your numbers. 6 min for the generic kernel portion & 46 minutes for the modules. I need to streamline Pat's scripts to only build those 2 packages without having to build the other 3 packages.
 
Old 03-02-2021, 01:05 AM   #17
nobodino
Senior Member
 
Registered: Jul 2010
Location: Near Bordeaux in France
Distribution: slackware, slackware from scratch, LFS, slackware [arm], linux Mint...
Posts: 1,564

Rep: Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892Reputation: 892
- on i7-6700 with 16 GB ram (make -j9): time ./build-all-kernels.sh (45 mn)
- on bi-Xeon E5645 with 16 GB ram (make - j25): time ./build-all-kernels.sh (48 mn), it's an old server.
 
Old 03-02-2021, 01:39 AM   #18
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
I know that it is comparing apples and oranges but I have just compiled my stable, default kernel that I use to drive my daily -current usage. Today it is 5.10.18 with the following very small changes:
  1. Patched to allow proper operation of my Kindle Oasis (very important to me!!)
  2. Local version added in (-ads)
  3. Built in Ext4 (may as well while I am there!)

So only small changes to the kernel and using PV's config. The following process was then timed:

Code:
make -j 32 bzImage modules && \
make -j 32 modules_install  && \
cp -v arch/x86/boot/bzImage /boot/vmlinuz-5.10.18-ads
And this process (which takes up 100% CPU usage of a 16 core Threadripper 2950X) took a total of 7 minutes. And it insulates me against any kernel issues in the future .

Edit: I love the way the newer AMD 5900X / 5950X CPUs chew up this task!!

Last edited by andrew.46; 03-02-2021 at 02:00 AM.
 
1 members found this post helpful.
Old 03-02-2021, 02:08 AM   #19
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,700

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
Quote:
Originally Posted by andrew.46 View Post
I know that it is comparing apples and oranges but I have just compiled my stable, default kernel that I use to drive my daily -current usage. Today it is 5.10.18 with the following very small changes:
  1. Patched to allow proper operation of my Kindle Oasis (very important to me!!)
  2. Local version added in (-ads)
  3. Built in Ext4 (may as well while I am there!)

So only small changes to the kernel and using PV's config. The following process was then timed:

Code:
make -j 32 bzImage modules && \
make -j 32 modules_install  && \
cp -v arch/x86/boot/bzImage /boot/vmlinuz-5.10.18-ads
And this process (which takes up 100% CPU usage of a 16 core Threadripper 2950X) took a total of 7 minutes. And it insulates me against any kernel issues in the future .

Edit: I love the way the newer AMD 5900X / 5950X CPUs chew up this task!!
Couldn't agree more. My 5930k would take around 20-25 minutes to compile wine. My new 5900x can knock it out in about 7 minutes flat now.
 
2 members found this post helpful.
Old 03-02-2021, 08:07 AM   #20
karlmag
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 127

Rep: Reputation: Disabled
Quote:
Originally Posted by andrew.46 View Post

[snip ...]

Code:
make -j 32 bzImage modules && \
make -j 32 modules_install  && \
cp -v arch/x86/boot/bzImage /boot/vmlinuz-5.10.18-ads
And this process (which takes up 100% CPU usage of a 16 core Threadripper 2950X) took a total of 7 minutes. And it insulates me against any kernel issues in the future .

Edit: I love the way the newer AMD 5900X / 5950X CPUs chew up this task!!

A while back (may be around a year now so details are a bit hazy) I did do some test compiles on a 40c/80t (quad 10c/20t) server beast. I probably tested both kernels, firefox and a couple others.
One thing I remember noticing was that on some of those compiles (sorry, don't remember which anymore) the memory footprint peeked at over 200GB RAM. And that server did not do anything but the compiling at the time. So - especially with many threads there may also be a RAM requirement following it. My point being; you can't just throw more CPUs on a problem if you don't have enough RAM for it available also.

But yeah, you do have a nice rig :-)

Thanks
--
KarlMag
 
Old 03-03-2021, 09:05 PM   #21
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by karlmag View Post
One thing I remember noticing was that on some of those compiles (sorry, don't remember which anymore) the memory footprint peeked at over 200GB RAM. And that server did not do anything but the compiling at the time. So - especially with many threads there may also be a RAM requirement following it. My point being; you can't just throw more CPUs on a problem if you don't have enough RAM for it available also.
When I built the computer I thought I went a little crazy when I invested in 32GiB RAM but this turned out to be a decent investment. In part for the compile issues that you have mentioned but also for the running of Virtual Machines. I notice in particular with my Windows 10 VM all allocated RAM is taken completely, no matter what the current windows requirement is. Crazy.

ALso for checking out 32bit and 64bit Slackware 14.2 installations for SBo scripts that I maintain, I can have both VMs open at the same time..
 
Old 03-03-2021, 11:41 PM   #22
nullptr
Member
 
Registered: Nov 2019
Posts: 50

Rep: Reputation: Disabled
Try to tweak the config suitable for your hardware. It takes about 3mins to compile on thinkpad x230.
 
Old 03-05-2021, 07:50 AM   #23
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by nullptr View Post
Try to tweak the config suitable for your hardware. It takes about 3mins to compile on thinkpad x230.
I agree, if compiling a custom kernel first things I change in configuration is processor type, then I get rid of most modules which I know I'll never use. I have no recent hardware (I7 4790k) but compilation time is fast enough with stripped down configuration.
 
Old 03-05-2021, 08:59 AM   #24
Jan K.
Member
 
Registered: Apr 2019
Location: Esbjerg
Distribution: Windows 7...
Posts: 773

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
What do you gain by customizing the kernel?

During boot only what's needed gets picked from huge and used?
And with the insanely high read speeds of SSDs, any shortened load time must be in millisceonds?

At least that's what I thought, so would you care to enlighten me?
 
Old 03-05-2021, 09:25 AM   #25
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by Jan K. View Post
What do you gain by customizing the kernel?
If you have hardware that requires newer kernel than the distro stock kernel (it can happen if you run stable version), if you like some features as built-in rather than as modules, if you want some modules not installed instead of blacklisting them, enable feature not enabled in stock... I aggree for the speed gain being non relevant though
 
1 members found this post helpful.
Old 03-05-2021, 11:13 AM   #26
deNiro
Member
 
Registered: Jun 2003
Distribution: Slackware-Current and Salix 14.2
Posts: 274
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Jan K. View Post
What do you gain by customizing the kernel?

During boot only what's needed gets picked from huge and used?
And with the insanely high read speeds of SSDs, any shortened load time must be in millisceonds?

At least that's what I thought, so would you care to enlighten me?
It's not only customizing for performance. In my case, I stick to kernel series 5.4.x, because it's easier for compatibility reasons, and I also need a few security features enabled.
 
1 members found this post helpful.
Old 03-05-2021, 11:59 AM   #27
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Okay gang...for dummies like me - where and how does one get/do the kernel build? I'd like to try it out just for comparison with my 7 year old machine (I build my own when I can afford it, and surviving on a disability check makes that not near as often as I wish I could, so my current system is an AMD FX8350 w/16GB RAM and 14.2 on an SSD), but especially so I can do as keefaz mentions, just for my own reasons to customize my kernel if I decide to do such a thing some time in the future with my Slackware version I'm using at the time hopefully that being whatever Pat is going to name the latest and greatest when he's ready to give it to the world).

Where is one getting Pat's scripts for building kernels and are/is the kernel downloaded from kernel.org or from the same place Pat's scripts are found? Where too does one get the .config file to be adjusted for my customization?

I really did try to look around and search the 'net, but the things that have come up I'm not really sure are what I should use or what everyone in this thread is talking about using.

For instance, the kernel build script I believe is the one being used is here, correct?

The '.config' file would be one of these here? If so, those are for a 5.10.x kernel and I would just change it for whatever version I get/find and download, right?
 
Old 03-05-2021, 12:10 PM   #28
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
The scripts are in the source dir as you said, the config file in your /boot and the cookbook did not changed much from 2.6 that's found in the documentation (author Alien Bob, will edit with link).

Edit : Here you are https://docs.slackware.com/howtos:sl...kernelbuilding

Last edited by Tonus; 03-05-2021 at 12:12 PM.
 
1 members found this post helpful.
Old 03-05-2021, 01:11 PM   #29
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by FTIO View Post
Where is one getting Pat's scripts for building kernels and are/is the kernel downloaded from kernel.org or from the same place Pat's scripts are found?
Either is fine. The kernels in a Slackware mirror are the same as the ones from kernel.org. I usually grab them from my local Slackware mirror.

Quote:
Originally Posted by FTIO View Post
For instance, the kernel build script I believe is the one being used is here, correct?
You can use Pat's kernel build script, but it builds both the huge and generic kernels and creates packages for the headers, source, modules, and the kernels themselves. That's overkill for my usage. Kernels are the only thing I install without being a package. They're really self-contained, so I've never worried about it. However, if you do want packages, you could continue to use Pat's script.

Quote:
Originally Posted by FTIO View Post
Where too does one get the .config file to be adjusted for my customization?

The '.config' file would be one of these here? If so, those are for a 5.10.x kernel and I would just change it for whatever version I get/find and download, right?
Kernel configs are designed for that specific version, however, configs within the same series (5.10.x) rarely change, so they're usually good to use without modification (although, it's always a good idea to run make oldconfig, just to make sure there aren't any incompatible options).

In case you weren't aware, there is no official kernel terminology for huge and generic kernels. These are Slackware terms and relate to whether most things are compiled into the kernel or compiled as modules. If you're running a 64bit system, simply grab the huge or generic kernel that ends in x64, copy/move it to the root of your extracted kernel source and save it as .config in the root of the directory.

Configuring the kernel can be a lot of work, so many will just use Pat's config, as it has pretty good defaults. If you want to get into configuring your kernel, you can use make menuconfig, make xconfig, or make gconfig. There's far too many options to explain in a post, but they do have a help and they will occasionally say "If unsure, do this".

Once you're ready to build, it's pretty easy:

Code:
make all              # Builds the kernel and modules
make modules_install  # Installs the modules to /lib/modules/
Then you simply copy your kernel from arch/x86/boot/bzImage to where your bootloader needs it (/boot/ for lilo, /boot/efi/EFI/Slackware/ for elilo), generate an initrd (if needed), and update your bootloader.

Code:
cp arch/x86/boot/bzImage /boot/efi/EFI/Slackware/vmlinuz-generic-5.10.19
$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 5.10.19)            # Needed for unmodified generic kernel
mv /boot/initrd.gz /boot/efi/EFI/Slackware/initrd-5.10.19.gz               # Needed for unmodified generic kernel
nano /boot/efi/EFI/Slackware/elilo.conf                                    # Add the new entries for the 5.10.19 kernel
reboot
 
1 members found this post helpful.
Old 03-05-2021, 01:48 PM   #30
deNiro
Member
 
Registered: Jun 2003
Distribution: Slackware-Current and Salix 14.2
Posts: 274
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by FTIO View Post
Okay gang...for dummies like me - where and how does one get/do the kernel build? I'd like to try it out just for comparison with my 7 year old machine (I build my own when I can afford it, and surviving on a disability check makes that not near as often as I wish I could, so my current system is an AMD FX8350 w/16GB RAM and 14.2 on an SSD), but especially so I can do as keefaz mentions, just for my own reasons to customize my kernel if I decide to do such a thing some time in the future with my Slackware version I'm using at the time hopefully that being whatever Pat is going to name the latest and greatest when he's ready to give it to the world).

Where is one getting Pat's scripts for building kernels and are/is the kernel downloaded from kernel.org or from the same place Pat's scripts are found? Where too does one get the .config file to be adjusted for my customization?

I really did try to look around and search the 'net, but the things that have come up I'm not really sure are what I should use or what everyone in this thread is talking about using.

For instance, the kernel build script I believe is the one being used is here, correct?

The '.config' file would be one of these here? If so, those are for a 5.10.x kernel and I would just change it for whatever version I get/find and download, right?
Bassmadrigal already gave you good advice.

But if you want to build outside package management. So, just download the source from kernel.org, and do it all yourself. then this is a pretty good guide. later you can script that if you want.

the configs can be get from the kernel-generic-5.10.xx package. just extract that, and you will find the config file in the extracted boot directory. if you need a different kernel, for example kernel 5.4.xx, you can get the configs Thanks to SlackwareUK. in that case just pick the latest kernel-generic-5.4.xx package, extract that, and again in the extrated boot dir you will find the config for that kernel. and use that config to make olddefconfig or make menuconfig to change some stuff. They have other kernels as well. good luck.

Last edited by deNiro; 03-05-2021 at 01:54 PM.
 
1 members found this post helpful.
  


Reply



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
[SOLVED] Linux 4.4 seems to refuse to build IPv6 for the 64-bit build - 32-bit build works fine GameCodingNinja Linux From Scratch 2 02-07-2016 06:40 PM
how to understand user time, sys time, wait time, idle time of CPU guixingyi Linux - Server 1 08-24-2010 10:10 AM
LXer: Build 'em Right, Build 'em Strong, Build 'em Linux LXer Syndicated Linux News 0 10-01-2007 09:51 PM
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
kernel build says build is "dirty"? Quakeboy02 Debian 3 12-18-2006 11:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:16 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