Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial raspberrypi5 support #4441

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Initial raspberrypi5 support #4441

merged 4 commits into from
Dec 17, 2024

Conversation

dpoulios
Copy link
Contributor

Initial support for rpi5:

  • u-boot still has very limited support for rpi5 (no pci/usb/ethernet/hdmi output)
  • so, we can only boot from the sd card now
  • eve support is ok, however

- enable booting from sd card
- u-boot has no pci support for rpi5 yet, so the usb/ethernet ports are
not enabled.
- there is no hdmi output yet, only uart.

Signed-off-by: Dimitrios Poulios <[email protected]>
- enable raspberrypi5 console in grub config
- use the devicetree provided by the firmware (and not the one
provided by the kernel) to ensure the ethernet mac address is
set correctly

Signed-off-by: Dimitrios Poulios <[email protected]>
@dpoulios dpoulios requested a review from rene as a code owner November 18, 2024 14:01
@@ -8,7 +8,9 @@ SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
ENV VERSION v2024.10-rc2
ENV SOURCE_URL https://github.com/u-boot/u-boot/archive/${VERSION}.tar.gz
ENV RASPBERRY_FIRMWARE_BLOBS_VERSION 1.20211007
ENV RASPBERRY_FIRMWARE_BLOBS_VERSION2 1.20240306
Copy link
Member

Choose a reason for hiding this comment

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

Should we use some more descriptive names, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, it would be better to get all the files from the newer version, but then I guess we should test on all raspberry devices to ensure that everything is ok.

pkg/grub/rootfs.cfg Outdated Show resolved Hide resolved
@@ -8,7 +8,9 @@ SHELL ["/bin/bash", "-eo", "pipefail", "-c"]
ENV VERSION v2024.10-rc2
ENV SOURCE_URL https://github.com/u-boot/u-boot/archive/${VERSION}.tar.gz
ENV RASPBERRY_FIRMWARE_BLOBS_VERSION 1.20211007
ENV RASPBERRY_FIRMWARE_BLOBS_VERSION2 1.20240306
Copy link
Contributor

Choose a reason for hiding this comment

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

@dpoulios I think we can use the newest firmware for RPi model 4 as well, right? So you can just update the version on RASPBERRY_FIRMWARE_BLOBS_VERSION...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I will do it this way and test on rpi4 & rpi5

Copy link
Contributor Author

@dpoulios dpoulios Dec 10, 2024

Choose a reason for hiding this comment

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

I tested on RPI4, RPI5 & OnLogic FR201 (rpi cm4) using the latest firmware files (version 1.20240306 for all binary files we download) and although rpi4 & rpi5 seemed ok, I saw some issues in u-boot in FR201. So, I'm suggesting to keep this as it is now (that is to use only the rpi5 devicetree from the latest version and the other files from the original version) and revisit it again in the future.

@eriknordmark eriknordmark requested a review from rene November 21, 2024 04:54
- Latest u-boot has removed smbios model info for raspberrypi devices
- So, grub gets the full product name reported by the firmware (eg.
"Raspberry Pi 4 Model B Rev 1.5" / "Raspberry Pi 5 Model B Rev 1.0")
- We use regexp to be able to support different revisions of the
devices

Signed-off-by: Dimitrios Poulios <[email protected]>
@dpoulios
Copy link
Contributor Author

During the latest tests I did, I discovered that in this u-boot version (we updated it in the FR201 pr), the smbios model info for raspberrypi devices has been removed. So, now when grub asks for the smbios model name it gets a string like "Raspberry Pi 4 Model B Rev 1.5", instead of "rpi" that it was returned with the old u-boot version. Therefore, I updated this for rpi4 & rpi5 in the latest commit I pushed. In order to support different revisions of the devices, the "regexp" command of grub was used, to ignore the revision part in the string.

ENV RASPBERRY_FIRMWARE_BLOBS https://github.com/raspberrypi/firmware/raw/${RASPBERRY_FIRMWARE_BLOBS_VERSION}
ENV RASPBERRY_FIRMWARE_BLOBS2 https://github.com/raspberrypi/firmware/raw/${RASPBERRY_FIRMWARE_BLOBS_VERSION2}
Copy link
Member

Choose a reason for hiding this comment

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

So, are we going to fix the variable names?...

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: RASPBERRY_5_FIRMWARE_BLOBS, RASPBERRY_FIRMWARE_BLOBS_RPI5 or something like that....

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

The PR still looks to be in a PoC form. I hope it becomes pretty soon =)

Use better variable names for rpi5 firmware files

Signed-off-by: Dimitrios Poulios <[email protected]>
Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

If @rene is fine, let's start the tests...

Copy link
Contributor

@rene rene left a comment

Choose a reason for hiding this comment

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

LGTM

@rene rene merged commit cb623a9 into lf-edge:master Dec 17, 2024
49 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants