Skip to content

Commit

Permalink
Merge pull request #308 from skiffos/add-pi-5
Browse files Browse the repository at this point in the history
pi/common: add support for pi 5 and cleanup
  • Loading branch information
paralin authored Feb 21, 2024
2 parents d4d6d46 + 61cbe0c commit 4639cb3
Show file tree
Hide file tree
Showing 23 changed files with 237 additions and 46 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ main SkiffOS repository:
| [Pi 3] + 1, 2 | [pi/3] | N/A | ✔ rpi-6.1.77 |
| [Pi 4] | [pi/4] | N/A | ✔ rpi-6.1.77 |
| [Pi 4] (32bit mode) | [pi/4x32] | N/A | ✔ rpi-6.1.77 |
| [Pi 5] | [pi/5] | N/A | ✔ rpi-6.1.77 |
| [Pine64 H64] | [pine64/h64] | ✔ U-Boot 2022.04 | ✔ megi-6.6-pre |
| [PineBook A64] | [pine64/book_a64] | ✔ U-Boot (bin) | ✔ megi-6.6-pre |
| [PineBook Pro] | [pine64/book] | ✔ U-Boot (bin) | ✔ megi-6.6-pre |
Expand Down Expand Up @@ -152,6 +153,7 @@ main SkiffOS repository:
[Pi 1]: https://www.raspberrypi.org/products/raspberry-pi-1-model-b-plus/
[Pi 3]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
[Pi 4]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
[Pi 5]: https://www.raspberrypi.org/products/raspberry-pi-5/
[Pine64 H64]: https://www.pine64.org/pine-h64-ver-b/
[PineBook A64]: https://www.pine64.org/pinebook/
[PineBook Pro]: https://www.pine64.org/pinebook-pro/
Expand Down Expand Up @@ -209,6 +211,7 @@ main SkiffOS repository:
[pi/3]: ./configs/pi
[pi/4]: ./configs/pi
[pi/4x32]: ./configs/pi
[pi/5]: ./configs/pi
[pine64/book_a64]: ./configs/pine64/book_a64
[pine64/book]: ./configs/pine64/book
[pine64/h64]: ./configs/pine64/h64
Expand Down
1 change: 1 addition & 0 deletions configs/pi/1/resources/rpi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console=tty1 console=serial0,115200 root=/dev/ram0 ro net.ifnames=0 dwc_otg.lpm_enable=0 cgroup_enable=cpuset cgroup_enable=memory
55 changes: 55 additions & 0 deletions configs/pi/1/resources/rpi/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality.

# This is the default Skiff config.txt.
# You should customize it to your own needs.
# Create a Skiff config, and copy this file to:
# my/config/resources/rpi/config.txt

kernel=zImage
initramfs rootfs.cpio.lz4

start_file=start_x.elf
fixup_file=fixup_x.dat

# fixes rpi (3B, 3B+, 3A+, 4B ,zero W and zero 2) ttyAMA0 serial console
dtoverlay=miniuart-bt

# enable autoprobing of Bluetooth driver without need of hciattach/btattach
dtoverlay=krnbt=on

# GPU memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# Enable GPIO features
# dtparam=i2c_arm=on
# dtparam=spi=on
# dtparam=i2s=on

# Audio card
dtparam=audio=on
# dtoverlay=hifiberry-dac
# dtoverlay=hifiberry-dacplus
# dtoverlay=hifiberry-digi
# dtoverlay=iqaudio-dac
# dtoverlay=iqaudio-dacplus

# Heartbeat LED
# dtparam=act_led_trigger=heartbeat

# Allow the board to draw additional voltage.
# Note: this sets a permanent overclock canary bit on the Pi.
# over_voltage=4

# Forces the CPU to run at maximum clock speed (expect heat)
# force_turbo=1

# Forces CPU to run in turbo for initial seconds
# initial_turbo=45
1 change: 1 addition & 0 deletions configs/pi/2/resources/rpi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console=tty1 console=serial0,115200 root=/dev/ram0 ro net.ifnames=0 dwc_otg.lpm_enable=0 cgroup_enable=cpuset cgroup_enable=memory
55 changes: 55 additions & 0 deletions configs/pi/2/resources/rpi/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality.

# This is the default Skiff config.txt.
# You should customize it to your own needs.
# Create a Skiff config, and copy this file to:
# my/config/resources/rpi/config.txt

kernel=zImage
initramfs rootfs.cpio.lz4

start_file=start_x.elf
fixup_file=fixup_x.dat

# fixes rpi (3B, 3B+, 3A+, 4B ,zero W and zero 2) ttyAMA0 serial console
dtoverlay=miniuart-bt

# enable autoprobing of Bluetooth driver without need of hciattach/btattach
dtoverlay=krnbt=on

# GPU memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# Enable GPIO features
# dtparam=i2c_arm=on
# dtparam=spi=on
# dtparam=i2s=on

# Audio card
dtparam=audio=on
# dtoverlay=hifiberry-dac
# dtoverlay=hifiberry-dacplus
# dtoverlay=hifiberry-digi
# dtoverlay=iqaudio-dac
# dtoverlay=iqaudio-dacplus

# Heartbeat LED
# dtparam=act_led_trigger=heartbeat

# Allow the board to draw additional voltage.
# Note: this sets a permanent overclock canary bit on the Pi.
# over_voltage=4

# Forces the CPU to run at maximum clock speed (expect heat)
# force_turbo=1

# Forces CPU to run in turbo for initial seconds
# initial_turbo=45
1 change: 1 addition & 0 deletions configs/pi/3/resources/rpi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console=tty1 console=serial0,115200 root=/dev/ram0 ro net.ifnames=0 dwc_otg.lpm_enable=0 cgroup_enable=cpuset cgroup_enable=memory
55 changes: 55 additions & 0 deletions configs/pi/3/resources/rpi/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality.

# This is the default Skiff config.txt.
# You should customize it to your own needs.
# Create a Skiff config, and copy this file to:
# my/config/resources/rpi/config.txt

kernel=zImage
initramfs rootfs.cpio.lz4

start_file=start_x.elf
fixup_file=fixup_x.dat

# fixes rpi (3B, 3B+, 3A+, 4B ,zero W and zero 2) ttyAMA0 serial console
dtoverlay=miniuart-bt

# enable autoprobing of Bluetooth driver without need of hciattach/btattach
dtoverlay=krnbt=on

# GPU memory
gpu_mem_256=100
gpu_mem_512=100
gpu_mem_1024=100

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
disable_overscan=1

# Enable GPIO features
# dtparam=i2c_arm=on
# dtparam=spi=on
# dtparam=i2s=on

# Audio card
dtparam=audio=on
# dtoverlay=hifiberry-dac
# dtoverlay=hifiberry-dacplus
# dtoverlay=hifiberry-digi
# dtoverlay=iqaudio-dac
# dtoverlay=iqaudio-dacplus

# Heartbeat LED
# dtparam=act_led_trigger=heartbeat

# Allow the board to draw additional voltage.
# Note: this sets a permanent overclock canary bit on the Pi.
# over_voltage=4

# Forces the CPU to run at maximum clock speed (expect heat)
# force_turbo=1

# Forces CPU to run in turbo for initial seconds
# initial_turbo=45
3 changes: 0 additions & 3 deletions configs/pi/4x32/buildroot/firmware

This file was deleted.

4 changes: 2 additions & 2 deletions configs/pi/4x32/buildroot/kernel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2711-rpi-4-b"

BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4 broadcom/bcm2711-rpi-cm4s broadcom/bcm2712-rpi-5-b"
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
# Create a Skiff config, and copy this file to:
# my/config/resources/rpi/config.txt

kernel=Image
kernel=zImage
initramfs rootfs.cpio.lz4

# enable 64bits support
arm_64bit=1

# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) ttyAMA0 serial console
dtoverlay=miniuart-bt

Expand Down Expand Up @@ -69,8 +66,6 @@ hdmi_force_hotplug=1
# [hdmi:1]
# hdmi_max_pixel_freq=200000000

# Settings specific to Raspberry Pi 4.
[pi4]
# This is the modern kernel modesetting driver.
dtoverlay=vc4-kms-v3d
max_framebuffers=2
13 changes: 0 additions & 13 deletions configs/pi/4x64/buildroot/firmware

This file was deleted.

4 changes: 0 additions & 4 deletions configs/pi/4x64/buildroot/ged

This file was deleted.

2 changes: 1 addition & 1 deletion configs/pi/4x64/buildroot/kernel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="bcm2711"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4 broadcom/bcm2711-rpi-cm4s broadcom/bcm2712-rpi-5-b"
1 change: 0 additions & 1 deletion configs/pi/4x64/resources/rpi/cmdline.txt

This file was deleted.

2 changes: 2 additions & 0 deletions configs/pi/5/buildroot/arch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BR2_aarch64=y
BR2_cortex_a76=y
4 changes: 4 additions & 0 deletions configs/pi/5/buildroot/kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
BR2_LINUX_KERNEL_USE_DEFCONFIG=y
BR2_LINUX_KERNEL_DEFCONFIG="bcm2712"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b broadcom/bcm2711-rpi-400 broadcom/bcm2711-rpi-cm4 broadcom/bcm2711-rpi-cm4s broadcom/bcm2712-rpi-5-b"
1 change: 1 addition & 0 deletions configs/pi/5/metadata/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pi/common
1 change: 1 addition & 0 deletions configs/pi/5/metadata/description
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Configuration for the Pi 5.
7 changes: 6 additions & 1 deletion configs/pi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ There are specific packages tuned to each Pi model.
| [Pi 3] - 64bit | pi/3x64 |
| [Pi 4] | pi/4x64 or pi/4 |
| [Pi 4] - 32bit | pi/4x32 |
| [Pi 5] | pi/5 |

[Pi 0]: https://www.raspberrypi.org/products/raspberry-pi-zero/
[Pi 0 V2]: https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/
[Pi 1]: https://www.raspberrypi.org/products/raspberry-pi-1-model-b/
[Pi 2]: https://www.raspberrypi.org/products/raspberry-pi-2-model-b/
[Pi 3]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/
[Pi 4]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/
[Pi 5]: https://www.raspberrypi.org/products/raspberry-pi-5/

## Building an Image

Expand Down Expand Up @@ -122,7 +124,9 @@ force_turbo=1
max_usb_current=1
```

## Config.txt Conditional Sections
## Config.txt

Upstream docs: https://www.raspberrypi.com/documentation/computers/config_txt.html

The config.txt file supports conditional sections:

Expand All @@ -131,5 +135,6 @@ The config.txt file supports conditional sections:
- `[pi3]`: Model 3B, Model 3B+, Model 3A+, Compute Module 3
- `[pi3+]`: Model 3A+, Model 3B+
- `[pi4]`: Model 4B
- `[pi5]`: Model 5
- `[pi0]`: Zero, Zero W, Zero WH
- `[pi0w]`: Zero W, Zero WH
15 changes: 13 additions & 2 deletions configs/pi/common/buildroot/firmware
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ BR2_PACKAGE_RPI_FIRMWARE=y
BR2_PACKAGE_RPI_FIRMWARE_X=y
BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS=y

# BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 is not set
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X=y

BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI=y
BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_BT=y
BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_WIFI=y

# BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4 is not set
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X=y
# TF-A for Raspberry Pi 4
# Requires additional settings in config.txt:
# armstub=bl31.bin
# enable_uart=1
# enable_gic=1
# BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
# BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rpi4"
# BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
# BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
# BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
3 changes: 3 additions & 0 deletions configs/pi/common/buildroot/ged
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Use rngd instead of haveged.
# BR2_PACKAGE_HAVEGED is not set
BR2_PACKAGE_RNG_TOOLS=y
2 changes: 1 addition & 1 deletion configs/pi/common/resources/rpi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console=tty1 console=serial0,115200 root=/dev/ram0 ro net.ifnames=0 dwc_otg.lpm_enable=0 cgroup_enable=cpuset cgroup_enable=memory
console=tty1 console=ttyAMA0,115200 root=/dev/ram0 ro net.ifnames=0 dwc_otg.lpm_enable=0 cgroup_enable=cpuset cgroup_enable=memory usbhid.mousepoll=0 consoleblank=0 cma=384M
Loading

0 comments on commit 4639cb3

Please sign in to comment.