I’m using TW on a Framework laptop, and would like to learn how I can build the current kernel with a small patch applied.
The patch is mentioned here:
I have zero experience with building the kernel, but since it is my understanding that OBS can run builds, I was wondering if I’m not better off just letting OBS do the heavy lifting for me.
What I’m looking for is a way to fork the kernel used by TW, apply that patch there, and then let OBS compile and package it.
AFAIK I should then be able to install this patched kernel on my system with a bunch of zypper commands.
Can I find a step by step guide somewhere, or would someone be so kind to explain the process to me?
You cannot change built-in driver into module without rebuilding the whole kernel to not include this driver.
But OBS does it for you. All that you need to do - provide the patch in the correct format as described in the README.SUSE. Branch kernel package, replace the patches.addon.tar.bz2 with the archive containing your patch, wait for OBS to finish build.
I’ve tried something but I’m not sure it’s correct.
I have created a project here:
Branched package kernel-source
Checked it out on my PC with: osc -A https://api.opensuse.org checkout home:andrea.ippo/pinctrl-amd-Set-up-affinity-for-GPIO-lines-when-enabling-interrupt
Browsed to the local files and modified config.addon.tar.bz2 and patches.addon.tar.bz2 as follows.
In config.addon.tar.bz2, I have added this structure:
If you had pasted text as text, instead of pictures, it were possible to comment on it. Anyway - trying to disable driver and and to apply patch for this driver at the same time sounds … amusing.
The kernel RPM package scripts check that your configuration is consistent and reproducible. make oldconfig produced different configuration, so build failed.
Kernel build system can automatically enable kernel options if other kernel options are selected. Which is what happened here. PINCTRL got re-enabled and this resulted in failure because it means your configuration change was inconsistent.
You do not need any configuration changes. You only need the patch for your driver. And if you insist on your configuration change you need to also disable any option that implicitly enables PINCTRL and do it recursively. But how are you going to test changes to pinctrl driver if you are going to disable pinctrl driver?