Compile different Kernel versions using Qubesbuilder package?

Hello Everybody,

I am having partial success using the instructions in h**ps:// to compile a custom kernel. After issuing make linux-firmware linux-kernel the kernel compiles successfully (compiled kernel rpm install in dom0 still fails. See Related Notes below).

However, the compiled kernel version is not equal to kernel-latest. The compiled version is stable-5-4-80-1. I would like to compile v5.8.16-1-latest.

@fepitre, I know you have kindly suggested in that:

“You can bump the rel file h**ps:// to ensure to upgrade properly your dom0 version.”,

but I don’t know what “bump[ing] the rel file” means.
Since I don’t want to pester that issue thread with unrelated kernel compilation problems, I would like to kindly ask you if you could elaborate here a little further.

In the meantime, I’ve tried setting BRANCH_linux_kernel = v5.8.16-1-latest in builder.conf but I get a “Tag has the wrong hash” verification error during Updating sources for linux-kernel. I’ve tried setting CHECK=insecure-no-check below line NO_SIGN=1 but the error persists.

Any other suggestions would be greatly appreciated. Thanks in advanced for your support

Related Notes:

  1. The instructions in h**ps:// produce a Zstd rpm which dom0 then fails to install in dom0. Researching I found out there is a dirty fix in

sed -i ‘/%define version/a%define _binary_payload w6.gzdio’ qubes-src/linux-kernel/

  1. This user also mentions that “qubes-src/linux-kernel has questionable rules for selecting
    linux-.tar.gz (which fails) rather than linux-.tar.xz.” and proposes the following fix:

sed -i ‘s/^SRC_FILE.*gz/SRC_FILE := linux-${VERSION}.tar.xz/’ qubes-src/linux-kernel/Makefile
sed -i ‘s/^Source0.*gz/Source0: linux-%{upstream_version}.tar.xz/’ qubes-src/linux-kernel/

Both Notes 1 and 2 were needed to install the compiled kernel successfully in dom0.


It means you simply need to edit the rel file and change current number to 2. It will have the resulting version: 5.8.16-2

In your builder.conf, BRANCH_ refers to branch only so it means for kernel-latest to use master branch: BRANCH_linux_kernel = master. Then, you can make get-sources again in qubes-builder and do your changes in qubes-src/linux-kernel like modifying config-base or config-qubes etc. After your modifications done, simply run make linux-kernel and you would be able to find the resulting build into qubes-packages-mirror-repo/dom0-fc25.

Thank you for the explanation and great help fepitre, this is now clear.