2

Background: I successfully compiled kernel versions 5.4.y and 5.6.y from source. It turns out I have some keyboard problems with v5.6.y on my RPI4, so I used tried 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!

8
  • Rename the kernel7.img file as 5.4.kernel7.img and add kernel=5.4.kernel7.img in '/boot//config.txt' – Dougie May 11 '20 at 20:11
  • What was this supposed to do? Right now, my RPI3 uses kernel7l.img, and after doing what you suggested, it still uses the kernel7l. – GChuf May 12 '20 at 6:42
  • That allows you to override the default kernel names. raspberrypi.org/documentation/configuration/config-txt/boot.md – Dougie May 12 '20 at 8:58
  • Thanks, but I don't really need to override kernel names. – GChuf May 12 '20 at 10:01
  • 1
    You didn't bother reading the link I gave you. The default is RPi3B boots kernel7, the RPi4 boots kernel7l, so do nothing. – Dougie May 12 '20 at 22:33
3

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)
1
  • Thank you, this is what I needed! Adding a line for pi3 booted from kernel7.img like I wanted it to. – GChuf May 13 '20 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.