Skip to content

Commit

Permalink
pi/common: add support for pi 5 and cleanup
Browse files Browse the repository at this point in the history
- Add support for pi/5
- pi/common default config is for pi 4 and up in 64 bit mode
- copy old legacy configs for the arm 32 bit devices
- commonize some settings (rpi firmware settings)

Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Feb 21, 2024
1 parent 8ce95ec commit 488224a
Show file tree
Hide file tree
Showing 22 changed files with 227 additions and 44 deletions.
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 @@ -10,9 +10,6 @@
kernel=Image
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"
Empty file removed configs/pi/4x64/metadata/unlisted
Empty file.
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.
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
43 changes: 31 additions & 12 deletions configs/pi/common/resources/rpi/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,24 @@
# Create a Skiff config, and copy this file to:
# my/config/resources/rpi/config.txt

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

start_file=start_x.elf
fixup_file=fixup_x.dat
# enable 64bits support
arm_64bit=1

# fixes rpi (3B, 3B+, 3A+, 4B ,zero W and zero 2) ttyAMA0 serial console
# fixes rpi (3B, 3B+, 3A+, 4B and Zero W) 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
# Avoid pi safe mode
avoid_safe_mode=1

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

Expand All @@ -53,3 +48,27 @@ dtparam=audio=on

# Forces CPU to run in turbo for initial seconds
# initial_turbo=45

# GPU memory split
# gpu_mem_256=128
# gpu_mem_512=256
# gpu_mem_1024=512

# 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

# Force hdmi hotplug
hdmi_force_hotplug=1

# Uncomment to force HD and prevent 4k memory drain
# hdmi_group=1
# hdmi_mode=16
# [hdmi:0]
# hdmi_max_pixel_freq=200000000
# [hdmi:1]
# hdmi_max_pixel_freq=200000000

# This is the modern kernel modesetting driver.
dtoverlay=vc4-kms-v3d
max_framebuffers=2

0 comments on commit 488224a

Please sign in to comment.