Skip to content

Commit

Permalink
pi/common: make 64-bit the default and cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Stewart <[email protected]>
  • Loading branch information
paralin committed Feb 21, 2024
1 parent 8ce95ec commit 631d5e1
Show file tree
Hide file tree
Showing 19 changed files with 226 additions and 48 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 @@ -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.

5 changes: 4 additions & 1 deletion configs/pi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,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 +133,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
4 changes: 2 additions & 2 deletions configs/pi/common/buildroot/kernel
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y

# rpi-6.1.y
# BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,3d9d7e7b2aa312f79f8034a9d42b7e7ccb92c54b)/linux-rpi-6.1.66-r1.tar.gz"
# BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,77fc1fbcb5c013329af9583307dd1ff3cd4752aa)/linux-rpi-6.1.77-r1.tar.gz"
# BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y

# rpi-6.1.y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,77fc1fbcb5c013329af9583307dd1ff3cd4752aa)/linux-rpi-6.1.77-r1.tar.gz"
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,afd5f659b0453e4c710ce5cf74c577563ff16239)/linux-rpi-6.1.77-r2.tar.gz"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y

BR2_KERNEL_HEADERS_AS_KERNEL=y
Expand Down
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 631d5e1

Please sign in to comment.