4

Background: I successfully compiled kernel versions 5.4.y and 5.6.y from source. It turns out I have some keyboard related problems with v5.6.y on my RPI4, so I used v5.4.y and it works fine. However, I experience some problems with power governors, I think, on my RPI3 (it always runs at half speed - 600MHz).

In short, 5.4.y works for my RPI4 and 5.6.y works for my RPI3.

Is there a way to use both kernel versions? In other words, can I boot from kernel7.img when my SD card is in my RPI3, and boot from kernel7l.img when the SD card is inside RPI4?

Clarification: Currently my RPi3 boots from kernel7l.img instead of kernel7.img - so it is not acting as it should by default!

GChuf
  • 241
  • 3
  • 15

1 Answers1

4

By default there is no need to do anything. As documented in Boot options in config.txt for option kernel you will find:

kernel is the alternative filename on the boot partition to use when loading the kernel. The default value on the Pi 1, Pi Zero, and Compute Module is kernel.img, and on the Pi 2, Pi 3, and Compute Module 3 it is kernel7.img. On the Pi4, it is kernel7l.img.

If your setup does not follow these defaults for any reason or if you want to use other kernel names you can use Conditional filters in config.txt, for example:

[pi3]
kernel=kernel7.img
[pi4]
kernel=kernel7l.img
[all]
(other options)
Ingo
  • 42,961
  • 20
  • 87
  • 207