More complete (slightly) instructions for compiling a custom kernel revisions

Go back to topic: More complete (slightly) instructions for compiling a custom kernel

  1. v5 anchor; v5 full version
  2. v4 anchor; v4 full version
  3. v3 anchor; v3 full version
  4. v2 anchor; v2 full version

Revision #5

Edited on
2023-09-07
Edited by user
deeplow

Revision #4

Edited on
2021-10-11
Edited by user
ddevz
qvm-run kernel-compile 'dnf install kernel-devel' ### to install the fedora build dependancies qvm-run kernel-compile 'sudo dnf install kernel-devel' ### to install the fedora build dependancies

Revision #3

Edited on
2021-10-11
Edited by user
ddevz
qvm-run kernel-compile 'dnf install kernel-compile' ### to install the fedora build dependancies qvm-run kernel-compile 'dnf install kernel-devel' ### to install the fedora build dependancies

Revision #2

Edited on
2021-10-04
Edited by user
ddevz
**Confirmed:** typing ```make all``` or ```make zImage``` returns "flex: command not found", so it is not capable of recompiling it as it would require packages to do the actual build that are not on your system**Confirmed:** typing ```make all``` or ```make zImage``` returns "flex: command not found", so it is not capable of recompiling it as it would require packages to do the actual build that are not on your system **Conjectured procedure:** So, i suspect you are supposed to create a development qube. And I'll conjecture that it's supposed to be a fedora qube (to match dom0). I'm not familiar with the fedoa build dependancies, but I'm guessing it should be something like: ``` qvm-create --template fedora32 --label red kernel-compile cd / tar -cvzf ~/kernel-to-transfer.tgz /usr/src/kernels/{kernel version}/ qvm-copy-to-vm kernel-compile ~/kernel-to-transfer.tgz qvm-run kernel-compile 'dnf install kernel-compile' ### to install the fedora build dependancies qvm-run kernel-compile 'tar -xvzf /home/user/QubesIncoming/dom0/kernel-to-transfer.tgz' ## (this would need to be done from /) ##then log into kernel-compile cd /usr/src/kernels/{version you just copied over ending in .qubes.x86_64} make menuconfig make all tar -cvzf /home/user/back-to-dom0.tgz /usr/src/kernels/{version you just copied over ending in .qubes.x86_64} ###go back to dom0 qvm-run --pass-io kernel-compile 'cat /home/user/back-to-dom0.tgz' > /home/user/back-to-dom0.tgz cd / tar -xvzf /home/usr/back-to-dom0.tgz ``` Then use the ```sudo qubes-prepare-vm-kernel 5.10.61-1.fc32.qubes.x86_64``` (or whatever your version name was) command to install it