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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/grub/rootfs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
OhmSpectator marked this conversation as resolved.
Show resolved Hide resolved
set_global dom0_console "console=ttyAMA10 console=tty1"
elif [ "$smb_product" = "uno-220" ]; then
set_to_existing_file devicetree /boot/dtb/broadcom/raspberrypi-uno-220.dtb
fi
Expand Down
4 changes: 4 additions & 0 deletions pkg/u-boot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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

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}

# hadolint ignore=DL3020
ADD ${SOURCE_URL} /uboot.tar.gz
Expand Down Expand Up @@ -39,6 +41,8 @@ ADD ${RASPBERRY_FIRMWARE_BLOBS}/boot/fixup4.dat /tmp/rpi/fixup4.dat
ADD ${RASPBERRY_FIRMWARE_BLOBS}/boot/start4.elf /tmp/rpi/start4.elf
# hadolint ignore=DL3020
ADD ${RASPBERRY_FIRMWARE_BLOBS}/boot/bcm2711-rpi-cm4.dtb /tmp/rpi/bcm2711-rpi-cm4.dtb
# hadolint ignore=DL3020
ADD ${RASPBERRY_FIRMWARE_BLOBS2}/boot/bcm2712-rpi-5-b.dtb /tmp/rpi/bcm2712-rpi-5-b.dtb
# hadolint ignore=DL3020,SC3060
RUN for i in /tmp/rpi/overlays/*.dts ; do \
dtc -@ -I dts -O dtb -o "${i/.dts/.dtbo}" "$i" && rm "$i" ;\
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 888d45191674ba34c9ec03100e9db9f51bf7f562 Mon Sep 17 00:00:00 2001
From: Dimitrios Poulios <[email protected]>
Date: Wed, 6 Nov 2024 11:53:46 +0200
Subject: [PATCH] Enable mmc_sdhci_bcmstb

Enable mmc_sdhci_bcmstb needed by rpi5

Signed-off-by: Dimitrios Poulios <[email protected]>
---
configs/rpi_4_defconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index fe44933d..8d92bc6a 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -39,6 +39,7 @@ CONFIG_BCM2835_GPIO=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_BCM2835=y
+CONFIG_MMC_SDHCI_BCMSTB=y
CONFIG_BCMGENET=y
CONFIG_PCI_BRCMSTB=y
CONFIG_PINCTRL=y
--
2.45.2

Loading