Skip to content

Commit

Permalink
grub: Use regexp in grub.cfg for smbios product name of rpi4/rpi5
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
dpoulios authored and rene committed Dec 17, 2024
1 parent a25fd20 commit ec4c8f1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/grub/rootfs.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,9 @@ function set_arm64_baremetal {
fi
if [ "$smb_vendor" = "raspberrypi" ]; then
smbios -t 1 -s 5 --set smb_product
if [ "$smb_product" = "rpi" ]; then
if regexp -- "Raspberry Pi 4 Model B Rev.*" "$smb_product"; 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
elif regexp -- "Raspberry Pi 5 Model B Rev.*" "$smb_product"; then
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
Expand Down

0 comments on commit ec4c8f1

Please sign in to comment.