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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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 <dpoulios85@gmail.com>
- 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 <dpoulios85@gmail.com>
@@ -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.

@@ -259,6 +259,9 @@ function set_arm64_baremetal {
smbios -t 1 -s 5 --set smb_product
if [ "$smb_product" = "rpi" ]; then
set_to_existing_file devicetree /boot/dtb/broadcom/bcm2711-rpi-4-b.dtb
elif [ "$smb_product" = "Raspberry Pi 5 Model B Rev 1.0" ]; then
#set_to_existing_file devicetree /boot/dtb/broadcom/bcm2712-rpi-5-b.dtb
Copy link
Member

Choose a reason for hiding this comment

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

Don't we need the DTB file in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially, I used this, but this caused the mac address to be random on each boot. Only, when using the device tree provided by the firmware (which is pretty much the same as the one in the rootfs), we get the correct mac address.

Copy link
Member

Choose a reason for hiding this comment

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

But I don't understand how we set the DTB in this case.
And if we don't need it, we should remove the commented line...
Also, hoping @rene is taking a look here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we set the device tree here, the kernel will use this one. Otherwise, it will use the one provided by the firmware/boot process (which is already loaded in the correct address). I left this as a comment, in case we find a different solution for the mac address in the future and prefer to use the kernel device tree.

Copy link
Contributor

Choose a reason for hiding this comment

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

@OhmSpectator, the first dtb provided in the EFI partition (that comes from u-boot), will be dynamic updated by the firmware with relevant information, like the MAC address of the embedded NIC, so we are good to use this one instead of the provided by kernel as long as we don't put specific stuff in the kernel's dtb, which is not our case for RPi5. @dpoulios, please remove the commented line.

I think we can also do the same with RPi 4b, IIRC we just add the node for the TPM, which can be converted into an overlay... but it's okay to let this to a future PR....

@@ -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

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