Skip to content

Commit 57f0806

Browse files
committed
Add support for CM5 and RPi500
At this moment the RPi5 image does not build properly, and CM5 and RPi500 are not supported at all. This patch does several things: * Bumps kernel to 6.6 on the Pi5 image * Bumps the balena bootloader kernel to 6.6 * Adds CM5 and RPi500 device trees to the RPi5 image It was necessary to backport the 6.6 recipe from meta-raspberrypi, as 6.6 is only available from scarthgap up, and balena-raspberrypi is still on kirkstone. RPi5, RPi500 and CM5 are therefore supported by a single device type. Change-type: minor Changelog-entry: Add support for CM5 and RPi500 Signed-off-by: Michal Toman <michalt@balena.io>
1 parent da1b4bb commit 57f0806

File tree

4 files changed

+52
-5
lines changed

4 files changed

+52
-5
lines changed

layers/meta-balena-raspberrypi/conf/layer.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ KERNEL_DEVICETREE:append:npe-x500-m3 = " overlays/npe-x500-m3.dtbo"
2424
# for updating boot EEPROM on RPI4
2525
KERNEL_DEVICETREE:append:raspberrypi4-64 = " overlays/spi-gpio40-45.dtbo"
2626

27+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712d0-rpi-5-b.dtb"
28+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-500.dtb"
29+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5-cm4io.dtb"
30+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5-cm5io.dtb"
31+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5l-cm4io.dtb"
32+
RPI_KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5l-cm5io.dtb"
33+
2734
# we do not add the following overlays for the linux-kunbus kernel
2835
KERNEL_DEVICETREE:remove:revpi = "overlays/ds2482.dtbo"
2936
KERNEL_DEVICETREE:remove:revpi = "overlays/neuron-spi-new.dtbo"
@@ -138,6 +145,9 @@ RPI_KERNEL_DEVICETREE:remove:revpi-connect = "bcm2711-rpi-cm4s.dtb"
138145
RPI_KERNEL_DEVICETREE:remove:revpi-core-3 = "bcm2711-rpi-cm4s.dtb"
139146

140147
PREFERRED_VERSION:linux-raspberrypi = "5.10.%"
148+
PREFERRED_VERSION_linux-raspberrypi:raspberrypi5 = "6.6%"
149+
150+
KBUILD_DEFCONFIG:raspberrypi5 = "bcm2712_defconfig"
141151

142152
FIRMWARE_COMPRESSION:raspberrypi4-64 ?= "1"
143153
FIRMWARE_COMPRESSION:raspberrypi0-2w-64 ?= "1"

layers/meta-balena-raspberrypi/recipes-core/images/balena-image.inc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ SDIMG_KERNELIMAGE:raspberrypi2 ?= "kernel7.img"
1111
SDIMG_KERNELIMAGE:raspberrypi3-64 ?= "kernel8.img"
1212
SDIMG_KERNELIMAGE:raspberrypi0-2w-64 ?= "kernel8.img"
1313

14+
# We want to stick with kernel8.img for the Pi5,
15+
# even though upstream uses kernel_2712.img
16+
SDIMG_KERNELIMAGE:raspberrypi5 ?= "kernel8.img"
17+
1418
# Double the root partition size from 320MiB to 640MiB and boot partition size from 40MiB to 80MiB for the Pi5
1519
IMAGE_ROOTFS_SIZE:raspberrypi5="655360"
1620
BALENA_BOOT_SIZE:raspberrypi5="81920"

layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-balena-bootloader_6.1.bb renamed to layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-balena-bootloader_6.6.bb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
LINUX_VERSION ?= "6.1.64"
2-
LINUX_RPI_BRANCH ?= "rpi-6.1.y"
3-
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1"
1+
LINUX_VERSION ?= "6.6.63"
2+
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
3+
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"
44

5-
SRCREV_machine = "dad5d57939cfae7af363e7c9862b59d33d96794b"
6-
SRCREV_meta = "f845a7f37d7114230d6609e2bd630070f2f6cd9b"
5+
SRCREV_machine = "e442e5c1ab6bff5b5460b4fc949beb72aaf77970"
6+
SRCREV_meta = "52ff0d75713ce61962b325a2090bd55e216f0cf3"
77

88
KMETA = "kernel-meta"
99

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FILESEXTRAPATHS:prepend := "${THISDIR}/../../../meta-raspberrypi/recipes-kernel/linux/files:"
2+
3+
LINUX_VERSION ?= "6.6.63"
4+
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
5+
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"
6+
7+
SRCREV_machine = "e442e5c1ab6bff5b5460b4fc949beb72aaf77970"
8+
SRCREV_meta = "52ff0d75713ce61962b325a2090bd55e216f0cf3"
9+
10+
KMETA = "kernel-meta"
11+
12+
SRC_URI = " \
13+
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \
14+
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
15+
file://powersave.cfg \
16+
file://android-drivers.cfg \
17+
"
18+
19+
require recipes-kernel/linux/linux-raspberrypi.inc
20+
21+
KERNEL_DTC_FLAGS += "-@ -H epapr"
22+
23+
RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}"
24+
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base"
25+
RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image"
26+
RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev"
27+
RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux"
28+
RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules"
29+
RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg"
30+
31+
DEPLOYDEP = ""
32+
DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy"
33+
do_deploy[depends] += "${DEPLOYDEP}"

0 commit comments

Comments
 (0)