How do I compile kernel for qubes?

i wanted to change the dom0 kernel but dom0 doesn’t have internet connection to be able to download the kernel files i want to compile. how do i download the source code when dom0 doesn’t have internet connection and would compiling it like other distros work or are there additional steps for qubes? I want to compile it

You need to use qubes-builderv2 inside a qube. Follow the setup, choose your executor, copy the main configuration file qubes-os-main.yml from example-configs to builder.yml, comment the corresponding executor according to your choice and then build the linux-kernel or linux-kernel-latest component:

# Select one
./qb -c linux-kernel-latest package fetch prep build

./qb -c linux-kernel package fetch prep build
2 Likes

Since i do it in a qube how would this change the dom0 kernel?

It generates .rpm files, which you then send to dom0 for installation.

How do i send it to dom0?