From 79e087c3309574cfccb58f598501efa83c546d5c Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Thu, 25 Sep 2025 15:38:22 -0700 Subject: [PATCH 1/4] Add support for rpi5 d0 hardware Initial stab at u-boot support for rpi5 d0 hardware Signed-off-by: Kevin Fox --- .github/actions/shared-steps/action.yml | 21 ++++++++++++++++++++- 10-kitten-rpi/almalinux-10-kitten-rpi.yaml | 1 + 10-rpi/almalinux-10-rpi.yaml | 1 + 9-rpi/almalinux-9-rpi.yaml | 1 + config.txt | 4 ++++ 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/actions/shared-steps/action.yml b/.github/actions/shared-steps/action.yml index ed411781..78813e49 100644 --- a/.github/actions/shared-steps/action.yml +++ b/.github/actions/shared-steps/action.yml @@ -162,6 +162,7 @@ runs: cd /tmp && \ curl -L -O https://github.com/worproject/rpi5-uefi/releases/download/v0.3/RPi5_UEFI_Release_v0.3.zip && \ sudo /bin/bash -c "cd mnt && unzip ../RPi5_UEFI_Release_v0.3.zip" && \ + sudo mkdir /tmp/mnt/overlays && \ sudo podman run \ --rm \ -i \ @@ -188,7 +189,7 @@ runs: -v /tmp/mnt:/tmp \ --entrypoint /bin/bash \ localhost/${{ env.IMAGE_NAME }}:${{ inputs.VERSION_MAJOR }}${{ env.VERSION_MINOR }}-${{ inputs.DATE_STAMP }}-${{ env.CLEAN_ARCH }} \ - -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/" && \ + -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/" && cp -a /usr/share/raspberrypi2-kernel*/*/boot/overlays/* /tmp/overlays/" && \ curl -o uboot.tar.bz2 https://ftp.denx.de/pub/u-boot/u-boot-2025.07.tar.bz2 && \ tar -jxf uboot.tar.bz2 && \ cd u-boot-2025.07/ && \ @@ -197,6 +198,24 @@ runs: make && \ ls -l && \ sudo cp u-boot-nodtb.bin /tmp/mnt/kernel8.img && \ + curl -L -o uboot.tar.gz https://github.com/talos-rpi5/u-boot/archive/refs/tags/v2025.04-rpi5-3.tar.gz && \ + tar -zxf uboot.tar.gz && \ + cd u-boot-*/ && \ + cp arch/arm/dts/bcm2711-rpi-4-b.dts arch/arm/dts/bcm2712-rpi-5-b.dtb && \ + echo CONFIG_USB_XHCI_DWC3=y >> configs/rpi_5_defconfig && \ + echo CONFIG_USB_DWC3=y >> configs/rpi_5_defconfig && \ + echo CONFIG_USB_DWC3_GENERIC=y >> configs/rpi_5_defconfig && \ + echo CONFIG_BOOTDELAY=1 >> configs/rpi_5_defconfig && \ + echo CONFIG_AUTOBOOT_KEYED=y >> configs/rpi_5_defconfig && \ + echo 'CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"' >> configs/rpi_5_defconfig && \ + echo 'CONFIG_AUTOBOOT_DELAY_STR="d"' >> configs/rpi_5_defconfig && \ + echo 'CONFIG_AUTOBOOT_STOP_STR=" "' >> configs/rpi_5_defconfig && \ + echo 'CONFIG_BOOTCOMMAND="bootflow scan;"' >> configs/rpi_5_defconfig && \ + sed -i 's/CONFIG_PREBOOT=.*/CONFIG_PREBOOT="pci enum; nvme scan; usb start;"/' configs/rpi_5_defconfig && \ + make rpi_5_defconfig && \ + make && \ + ls -l && \ + sudo cp u-boot-nodtb.bin /tmp/mnt/kernel8-rpi5.img && \ sudo umount /tmp/mnt && \ sudo /usr/sbin/sgdisk --typecode="1:0700" $LOOP && \ sudo cp /tmp/image-${{ env.IMAGE_NAME }}4-${{ inputs.VERSION_MAJOR }}${{ env.VERSION_MINOR }}-${{ inputs.DATE_STAMP }}-${{ env.CLEAN_ARCH }}.raw /tmp/image-${{ env.IMAGE_NAME }}3-${{ inputs.VERSION_MAJOR }}${{ env.VERSION_MINOR }}-${{ inputs.DATE_STAMP }}-${{ env.CLEAN_ARCH }}.raw && \ diff --git a/10-kitten-rpi/almalinux-10-kitten-rpi.yaml b/10-kitten-rpi/almalinux-10-kitten-rpi.yaml index 16e204c1..ce19c29b 100644 --- a/10-kitten-rpi/almalinux-10-kitten-rpi.yaml +++ b/10-kitten-rpi/almalinux-10-kitten-rpi.yaml @@ -22,6 +22,7 @@ postprocess: cat > /usr/lib/bootc/install/20-rhel.toml << EOF [install] root-fs-type = "xfs" + kargs = ["console=tty0", "console=ttyS0", "console=ttyAMA10"] EOF - | #!/usr/bin/env bash diff --git a/10-rpi/almalinux-10-rpi.yaml b/10-rpi/almalinux-10-rpi.yaml index 94335591..acb813c7 100644 --- a/10-rpi/almalinux-10-rpi.yaml +++ b/10-rpi/almalinux-10-rpi.yaml @@ -22,6 +22,7 @@ postprocess: cat > /usr/lib/bootc/install/20-rhel.toml << EOF [install] root-fs-type = "xfs" + kargs = ["console=tty0", "console=ttyS0", "console=ttyAMA10"] EOF - | #!/usr/bin/env bash diff --git a/9-rpi/almalinux-9-rpi.yaml b/9-rpi/almalinux-9-rpi.yaml index 90baa3f1..30969bf9 100644 --- a/9-rpi/almalinux-9-rpi.yaml +++ b/9-rpi/almalinux-9-rpi.yaml @@ -22,6 +22,7 @@ postprocess: cat > /usr/lib/bootc/install/20-rhel.toml << EOF [install] root-fs-type = "xfs" + kargs = ["console=tty0", "console=ttyS0", "console=ttyAMA10"] EOF - | #!/usr/bin/env bash diff --git a/config.txt b/config.txt index 328b1712..c7eb008f 100644 --- a/config.txt +++ b/config.txt @@ -1,6 +1,10 @@ # This file is provided as a placeholder for user options # AlmaLinux - few default config options +[pi5] +kernel=kernel8-rpi5.img +framebuffer_depth=16 + [pi3] arm_64bit=1 From 2d73de08a364421a571a461b7d631c5f8354204a Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Thu, 25 Sep 2025 16:24:03 -0700 Subject: [PATCH 2/4] Fix typo Signed-off-by: Kevin Fox --- .github/actions/shared-steps/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/shared-steps/action.yml b/.github/actions/shared-steps/action.yml index 78813e49..024a5762 100644 --- a/.github/actions/shared-steps/action.yml +++ b/.github/actions/shared-steps/action.yml @@ -189,7 +189,7 @@ runs: -v /tmp/mnt:/tmp \ --entrypoint /bin/bash \ localhost/${{ env.IMAGE_NAME }}:${{ inputs.VERSION_MAJOR }}${{ env.VERSION_MINOR }}-${{ inputs.DATE_STAMP }}-${{ env.CLEAN_ARCH }} \ - -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/" && cp -a /usr/share/raspberrypi2-kernel*/*/boot/overlays/* /tmp/overlays/" && \ + -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/" && cp -a /usr/share/raspberrypi2-kernel*/*/boot/overlays/* "/tmp/overlays/" && \ curl -o uboot.tar.bz2 https://ftp.denx.de/pub/u-boot/u-boot-2025.07.tar.bz2 && \ tar -jxf uboot.tar.bz2 && \ cd u-boot-2025.07/ && \ From a3400fe34516a8e2af74d3132ca175a2a9811e3d Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Thu, 25 Sep 2025 16:41:21 -0700 Subject: [PATCH 3/4] Fix typo Signed-off-by: Kevin Fox --- .github/actions/shared-steps/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/shared-steps/action.yml b/.github/actions/shared-steps/action.yml index 024a5762..2d800474 100644 --- a/.github/actions/shared-steps/action.yml +++ b/.github/actions/shared-steps/action.yml @@ -189,7 +189,7 @@ runs: -v /tmp/mnt:/tmp \ --entrypoint /bin/bash \ localhost/${{ env.IMAGE_NAME }}:${{ inputs.VERSION_MAJOR }}${{ env.VERSION_MINOR }}-${{ inputs.DATE_STAMP }}-${{ env.CLEAN_ARCH }} \ - -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/" && cp -a /usr/share/raspberrypi2-kernel*/*/boot/overlays/* "/tmp/overlays/" && \ + -c "cp -a --no-preserve=links /usr/share/raspberrypi2-kernel*/*/boot/*.dtb /tmp/ && cp -a --no-preserve=links /usr/lib/ostree-boot/* /tmp/ && cp -a /usr/share/raspberrypi2-kernel*/*/boot/overlays/* /tmp/overlays/" && \ curl -o uboot.tar.bz2 https://ftp.denx.de/pub/u-boot/u-boot-2025.07.tar.bz2 && \ tar -jxf uboot.tar.bz2 && \ cd u-boot-2025.07/ && \ From 6fb3d570fa4f0a3bcf0cf6b354724a617af2f089 Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Sat, 25 Oct 2025 18:36:15 -0700 Subject: [PATCH 4/4] Test Signed-off-by: Kevin Fox --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f0e24470..d7b4e306 100644 --- a/README.md +++ b/README.md @@ -149,3 +149,4 @@ Join the discussion and get involved with the relevant AlmaLinux Special Interes * **Cloud SIG:** Focused on cloud images and deployments. * [Wiki](https://wiki.almalinux.org/sigs/Cloud.html) * Chat: [Mattermost](https://chat.almalinux.org/almalinux/channels/sigcloud) | [Matrix](https://matrix.to/#/#sig-cloud:almalinux.im) +