Custom patched kernel

Added by Nikita Zlobin 2 months ago

I remember one good thing, that calculate-sources 4.9.x (actually i have 4.9.28) allow to specify "Native" processor type, but since 4.10 or 4.11 this choice disappeared. And only these days, after installing 4.12 (though did not even load it) i discovered, that this feature is available in Con Kolivas patches, among other good desktop-oriented improvements.

Looking for ck-sources, i noticed, that it has somewhat recent ebuild versions, but only them - i.e., 4.9.39 and 4.11.12 (a day ago added 4.9.41). Appart of these, there are some other patchset, which might be interesting to try together ck.

Yet just discovered, that calculate-sources doesn't apply genpatches (by the course of learning the patching controls in kernel-2.eclass).
I have read, that genpatches include some security fixes. And fact, that they are used in many other kernels (though not in rt-sources), makes me think, applying them to calculate-sources should not break it. What indeed are pros and cons of not having them?

Closer to action, i'm thinking about combination of calculate-sources specifics (those, provided by calculate-sources-7) with patchsets from other kernel ebuilds, including ck, rt, tuxonice. Since eclass inclusion via /etc/portage/bash is impossible, the only way seems to manipulate SRC_URI and UNIPATCH_* variables for calculate-sources.

But i wonder, is it good and enough, because also noticed K_PREPATCHED var, whose description makes me thinking, that attempt to apply, e.g. ck or other sets might be more breaking, compared to using of existing ebuilds like ck-sources.

I understand, that not all sets are available for each kernel versions, provided by calculate-sources or moreover gentoo-sources, as well as between each other, so it will require to stay in specific kernel version. Or some sets might break each other... :/
(though other patchsets, than ck, are not a current goal).

Would be perfect, having in calculate-sources ability to resemble other kernel types, like ck, rt, tuxonice, etc... (hardened!, or what about servers and routers...). As well as combine them in some limited digree (not expecting to rt be appliable with hardened and genpatches after looking to rt-sources ebuild, but ck+tuonice2 probably could).

Sorry for bad english.
And many words)

p.s. Just noticed and remembered pf-sources... seems to be one such customized solution)


Replies (1)

RE: Custom patched kernel - Added by Alexander Tratsevskiy 2 months ago

The settings and patches of sys-kernel/calculate-sources are in the calculate utilities templates in the overlay calculate (/var/lib/layman/calculate/profiles/templates/3.5/6_ac_install_patch/sys-kernel/calculate-sources/).
You can change the kernel settings, add patches by continuing to install the kernel with the emerge calculate-sources command. In order to prepare changes in the settings you can use the utility cl-kernel.

(1-1/1)

Thank you!