You are not logged in.

#1 2019-11-23 01:52:26

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

[solved] remaking kernel with only configuration changes?

My requirements summarize as optimizing my workstation for audio recording, My custom build changes only the arguments in config to handle Athlon performance optimization. I am trying to have the kernel update take as little time as possible. I am assuming that, after building the kernel once as a complete compile, I can perform incremental compiles afterwards when an update is posted.

In the Arch Wiki, on the page https://wiki.archlinux.org/index.php/Ke … ild_System, the shell code for doing a kernel update is referenced.
Under the major heading "Updating", it is written,
"Then run manually most, if not all, the shell commands of PKGBUILD::prepare(). ..."

I have looked at the sh code in PKGBUILD .  I realize that I need to change pkgbase to "linux-custom" and replace "make olddefconfig" with "make nconfig;make prepare" to install my preferred changes correctly. Is there a way to get an incremental compile instead of a full compile at that point? I cannot figure out how to do that. I apologize if it is obvious.

(And my thanks to those who updated the Arch Linux Wiki to clarify the kernel building ops!)

Last edited by OrigBitmancer (2019-11-25 19:07:02)

Offline

#2 2019-11-23 02:01:30

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [solved] remaking kernel with only configuration changes?

I am unfamiliar with an incremental compile... my advice to you is to modify the PKGBUILD to do whatever you need (custom config or patches or whatever) and just build as new kernels upstream are released.

Offline

#3 2019-11-23 04:08:40

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [solved] remaking kernel with only configuration changes?

Sorry for language if so. An incremental compile is one in which, when many source modules are linked to form an executable, only those which have had source code changes since the last compile are recompiled.

Offline

#4 2019-11-23 05:10:07

g2g591
Member
Registered: 2007-12-24
Posts: 54

Re: [solved] remaking kernel with only configuration changes?

Don't adjust the configuration during the build (what you're doing by editing the pkgbuild to run make nconfig), adjust the configuration once, then replace the config file in the same directory with the package build with your new config. Use asp checkout linux rather than export to clone a git repository of the pkgbuild (it'l be in the trunk directory), do your changes to the pkgbuild and replace the config, make a git commit then you can use git to rebase your changes onto future updates (asp update to update the git repository it's linked to, then git rebase to apply your changes on top of the update's changes)

As for an incremental build, iirc it should just rebuild the changed files... but the first time you are starting from scratch. I might be wrong, but at least the kernel is a relatively medium-short compile, especially compared to the giant monsters that are modern web browsers.

Offline

#5 2019-11-23 07:45:10

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [solved] remaking kernel with only configuration changes?

So I would effectively be doing an "olddefconfig" every time when I rebuilt it with my custom config?

But the config patches are not straightforward are they?

Offline

#6 2019-11-23 09:27:46

g2g591
Member
Registered: 2007-12-24
Posts: 54

Re: [solved] remaking kernel with only configuration changes?

OrigBitmancer wrote:

So I would effectively be doing an "olddefconfig" every time when I rebuilt it with my custom config?

But the config patches are not straightforward are they?

Git is pretty smart for the most part, when doing a rebase like I suggest it basically takes the diff of your change to the first version, temporarily undoes it, then applies upstream (in this case Arch's) new changes onto the original version, then applies your change ontop of that. In case something conflicts HEAD denotes Arch's change (that may sometimes be adding a line where none previously existed, in which case you want to keep both). Anyway, resolve the conflict (edit the file and fix it somehow.. it WILL depend on what any conflict ends up being, do read up on git conflicts and using git show to see what the change made actually was) then git add the conflicting file , then git rebase --continue.

For minor kernel updates eg 5.1.10 to 5.1.11 there's pretty much no chance of a change to the kernel config outside of any Arch specfic changes being needed, but for major versions you may have to look at generating a new config based on Arch's latest as options may get renamed etc then.

Offline

#7 2019-11-23 09:29:24

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [solved] remaking kernel with only configuration changes?

Thanks for the encouragement! I will get with the git docs.

Offline

#8 2019-11-23 13:16:49

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: [solved] remaking kernel with only configuration changes?

g2g591 wrote:

As for an incremental build, iirc it should just rebuild the changed files... but the first time you are starting from scratch. I might be wrong, but at least the kernel is a relatively medium-short compile, especially compared to the giant monsters that are modern web browsers.

Each stable update changes the top level Makefile as that contains the version information which triggers a rebuild of .config not sure if everything else is also then rebuilt.

Offline

#9 2019-11-23 15:08:22

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,472

Re: [solved] remaking kernel with only configuration changes?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2019-11-25 01:25:16

OrigBitmancer
Member
Registered: 2019-01-22
Posts: 144

Re: [solved] remaking kernel with only configuration changes?

Well, I have decided to follow those who have gone before me. Pro Audio has its own Archwiki page (https://wiki.archlinux.org/index.php/Professional_audio). I shall use their work to provide my foundation.
If they have not gone to a performance profile, they have still solved it as far as possible. Getting ready to bite a different bullet, my thanks go to all who contributed help!

Offline

Board footer

Powered by FluxBB