Add a simplified linux worktree mechanism

Also fix two invalid regex escape warnings on python 3.12.7.
This commit is contained in:
Ciro Santilli
2025-05-01 12:23:31 +01:00
parent e4847e4b40
commit ea7275d35b
2 changed files with 39 additions and 8 deletions

View File

@@ -28222,6 +28222,24 @@ You can also build <<kernel-modules>> against a specific prebuilt kernel with:
This will then allow you to insmod the kernel modules on your newly built kernel.
===== Linux worktree
If you are working with multiple Linux versions at once, it can be helpful to have their source code checked out all the time, in particular if you are going to be <<gdb,GDB step debugging>>.
We have some automation for that. Suppose that you are also interested in the kernel v6.14.4. Then you could do:
....
git -C submodules/linux worktree add ../../data/wt/linux/v6.14.4
git -C data/wt/linux/v6.14.4 reset --hard v6.14.4
....
Then you can use a specific source for a specific <<linux-kernel-build-variants>> with:
....
./build-linux --linux-worktree v6.14.4 --linux-build-id v6.14.4
./run --linux-build-id v6.14.4
....
==== QEMU build variants
Analogous to the <<linux-kernel-build-variants>> but with the `--qemu-build-id` option instead: