Skip to content

RPi5 should use kernel_2712.img (not kernel8.img)#817

Open
user706 wants to merge 1 commit into
mendersoftware:masterfrom
user706:rpi5_use_kernel_2712
Open

RPi5 should use kernel_2712.img (not kernel8.img)#817
user706 wants to merge 1 commit into
mendersoftware:masterfrom
user706:rpi5_use_kernel_2712

Conversation

@user706
Copy link
Copy Markdown

@user706 user706 commented Jan 28, 2026

The following (kernel8.img) works for RPi5, but is not optimal:

https://github.com/mendersoftware/mender-convert/blob/5.1.0/configs/raspberrypi/uboot/include/raspberrypi_64_config#L4-L5

Ref: https://www.raspberrypi.com/documentation/computers/config_txt.html#kernel
"The Raspberry Pi 5, 500, 500+, and Compute Module 5 firmware defaults to loading kernel_2712.img because this image contains optimisations specific to those models (e.g. 16K page-size). If this file is not present, then the common 64-bit kernel (kernel8.img) will be loaded instead."

It's better if RPi5 uses kernel_2712.img, since it has optimizations.

@user706
Copy link
Copy Markdown
Author

user706 commented Feb 10, 2026

By the way... (and not handled in this PullRequest)

it's not good that mender copies the bootloader into
/boot/firmware/kernel8.img
or into
/boot/firmware/kernel_2712.img (which would happend with RPi 5, in this PullRequest)

If you do

sudo apt update
sudo apt upgrade

you can destroy the setup if a new kernel is upgraded and written to
/boot/firmware/kernel8.img (or /boot/firmware/kernel_2712.img)
since it overwrites the bootloader.

See here for details: https://hub.mender.io/t/raspberry-pi-64-bit-can-destroy-itself-through-apt-upgrade/8181

@elkoniu
Copy link
Copy Markdown
Contributor

elkoniu commented Apr 13, 2026

Hi @user706 - thanks for this PR. I started testing it last week together with the recently released RPi images. When the testing will be completed I will add comments to this PR.

@user706
Copy link
Copy Markdown
Author

user706 commented Apr 13, 2026

great thanks.

@elkoniu
Copy link
Copy Markdown
Contributor

elkoniu commented May 26, 2026

@user706 I have cloned this PR into #844 to speed up testing on my side and easier rebase on top of the latest changes. When I will finish the testing and confirm everything looks fine I will ask you to rebase this PR and will merge it.

@elkoniu
Copy link
Copy Markdown
Contributor

elkoniu commented May 26, 2026

@user706 my tests confirms that everything looks to work fine.
Can you please:

  1. Rebase on top of latest master branch
  2. Format the commit following existing commit style:
chore: XYZ

Description

Signature
  1. Sign the commit
    Above will satisfy our formal requirements for this PR to be merged.

@elkoniu
Copy link
Copy Markdown
Contributor

elkoniu commented May 26, 2026

@TheYoctoJester I have performed some basic conversion testing here: #844
Generally it looks good so if you are not aware of any possible issues which may be caused by this "better" kernel I think we can merge it.

Copy link
Copy Markdown
Contributor

@elkoniu elkoniu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my testing with mender-convert - it looks good.

@user706 user706 force-pushed the rpi5_use_kernel_2712 branch from 397cf1d to be6ae15 Compare May 27, 2026 19:39
@user706
Copy link
Copy Markdown
Author

user706 commented May 27, 2026

OK.
commit is now on master.

Commit looks like this

Author: user706
Date:   Wed May 27 21:37:31 2026 +0200

    chore: use kernel_2712.img for raspberry pi 5
    
    RPi5 should use kernel_2712.img (not kernel8.img),
    which is the kernel that original
    official raspberry pi images also load when running on RPi5.

And it is signed with GPG Key ID: 938FD2002C592940
as you can see if you go here...
https://github.com/mendersoftware/mender-convert/pull/817/commits
... and then click the green Verified button.

(By the way... kernel_2712.img is the kernel which a Raspberry Pi 5 loads, when you run an original official rasperry pi image on an RPi5. So it is "the right thing to do".)

RPi5 should use kernel_2712.img (not kernel8.img),
which is the kernel that original
official raspberry pi images also load when running on RPi5.

Signed-off-by: user706 <39215612+user706@users.noreply.github.com>
@user706 user706 force-pushed the rpi5_use_kernel_2712 branch from be6ae15 to 4167319 Compare May 28, 2026 11:18
@user706
Copy link
Copy Markdown
Author

user706 commented May 28, 2026

now fixed commit, this time with --signoff

@user706
Copy link
Copy Markdown
Author

user706 commented May 28, 2026

this time the pipeline failure is not because of commit-formatting:
https://gitlab.com/Northern.tech/Mender/mender-convert/-/pipelines/2558723606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants