You are not logged in.

#1 2024-07-13 11:11:07

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Help with bisecting the kernel

Recently I needed to do kernel bisection. I followed this guide. However the problem is that if I execute makepkg -ef then prepare() function is skipped and as a result version file in src/linux-mainline is not properly updated, as a result vmlinuz ends up in the wrong directory. And if I don't use -e flag then the source directory gets reset. In the end I could fish out vmlinuz and copy it manually. However the question is what's the proper way to do it? How do I get version file properly updated without destroying manual changes in the src directory?

Offline

#2 2024-07-13 12:12:03

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,616

Re: Help with bisecting the kernel

I do occasionally troubleshoot trunk builds of programs I use by bisecting and need prepare() to setup stuff, so can't use -e / --noextract .

After some experimentation I've decided to split the bisect from building and settled on this flow :

git clone upstream source to a separate folder and run the bisect commands in that folder .

In the PKGBUILD I manually add the #commit= paramater to the git source url with the hash shown by the git bisect commands.

This way the packages are build exactly the same as normal, just from a different upstream commit .

Note : this works fine with VCS packages, but packages that build from tarballs will probably have to be converted to VCS first .


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

#3 2024-07-13 17:07:17

loqs
Member
Registered: 2014-03-06
Posts: 17,861

Re: Help with bisecting the kernel

You might be able to reuse the some of the prebuilt bisection kernels in https://pkgbuild.com//~gromit/linux-bisection-kernels/

Offline

#4 2024-07-13 17:11:08

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 380
Website

Re: Help with bisecting the kernel

Also as I have offered on the other post I can also guide you through the bisection smile

Offline

#5 2024-07-14 09:18:22

Ph0enix42
Member
Registered: 2024-07-03
Posts: 9

Re: Help with bisecting the kernel

Thank you for your input. The method with adding #commit= works, just seems a bit hackish so to say.

I think what bugs me a bit is the fact that when I look at PKGBUILD file I see that pkgver is adjusted to match the current commit. So it seems that the system still "knows" the commit that it's working with even without executing prepare and for all files other than vmlinuz and pkgbase it figures out the proper place to put them. So in the end it looks like it relies on two ways to construct the target path of pkg/linux-mainline-git/usr/lib/modules/${CURRENT_VERSION} and for everything to work properly these have to match. However I could be easily missing something as I have not dug into the code too deeply.

Offline

#6 2024-07-14 10:02:17

progandy
Member
Registered: 2012-05-17
Posts: 5,220

Re: Help with bisecting the kernel

Another option would be to move the required steps from prepare() to the beginnig of build() and make sure they work with the existing source and don't need a clean source directory.

Last edited by progandy (2024-07-14 10:17:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

Board footer

Powered by FluxBB