Skip to content

Commit

Permalink
Add support for CM5 and RPi500
Browse files Browse the repository at this point in the history
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
Signed-off-by: Michal Toman <michalt@balena.io>
  • Loading branch information
mtoman committed Jan 7, 2025
1 parent 46596b8 commit a2261aa
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 6 deletions.
7 changes: 7 additions & 0 deletions layers/meta-balena-raspberrypi/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ KERNEL_DEVICETREE:append:npe-x500-m3 = " overlays/npe-x500-m3.dtbo"
# for updating boot EEPROM on RPI4
KERNEL_DEVICETREE:append:raspberrypi4-64 = " overlays/spi-gpio40-45.dtbo"

KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-500.dtb"
KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5-cm4io.dtb"
KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5-cm5io.dtb"
KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5l-cm4io.dtb"
KERNEL_DEVICETREE:append:raspberrypi5 = " broadcom/bcm2712-rpi-cm5l-cm5io.dtb"

# we do not add the following overlays for the linux-kunbus kernel
KERNEL_DEVICETREE:remove:revpi = "overlays/ds2482.dtbo"
KERNEL_DEVICETREE:remove:revpi = "overlays/neuron-spi-new.dtbo"
Expand Down Expand Up @@ -138,6 +144,7 @@ RPI_KERNEL_DEVICETREE:remove:revpi-connect = "bcm2711-rpi-cm4s.dtb"
RPI_KERNEL_DEVICETREE:remove:revpi-core-3 = "bcm2711-rpi-cm4s.dtb"

PREFERRED_VERSION_linux-raspberrypi = "6.1%"
PREFERRED_VERSION_linux-raspberrypi:raspberrypi5 = "6.6%"

FIRMWARE_COMPRESSION:raspberrypi4-64 ?= "1"
FIRMWARE_COMPRESSION:raspberrypi0-2w-64 ?= "1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
LINUX_VERSION ?= "6.1.64"
LINUX_RPI_BRANCH ?= "rpi-6.1.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1"
LINUX_VERSION ?= "6.6.69"
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"

SRCREV_machine = "dad5d57939cfae7af363e7c9862b59d33d96794b"
SRCREV_meta = "f845a7f37d7114230d6609e2bd630070f2f6cd9b"
SRCREV_machine = "de92e4b5ffe3b30e0e4156b3424e90ddb95a50ff"
SRCREV_meta = "dff911ce87fe7b9944c6058907f079ddb0f3e840"

KMETA = "kernel-meta"

Expand All @@ -12,8 +12,9 @@ SRC_URI = " \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
"
SRC_URI:remove = "file://initramfs-image-bundle.cfg"
SRC_URI:remove = "file://vc4graphics.cfg"
SRC_URI:remove = "file://default-cpu-governor.cfg"
SRC_URI:remove:raspberrypicm4-ioboard = "file://vc4graphics.cfg"
SRC_URI:remove:raspberrypicm4-ioboard-sb = "file://vc4graphics.cfg"

require recipes-kernel/linux/linux-raspberrypi.inc

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/../../../meta-raspberrypi/recipes-kernel/linux/files:"

LINUX_VERSION ?= "6.6.69"
LINUX_RPI_BRANCH ?= "rpi-6.6.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.6"

SRCREV_machine = "de92e4b5ffe3b30e0e4156b3424e90ddb95a50ff"
SRCREV_meta = "dff911ce87fe7b9944c6058907f079ddb0f3e840"

KMETA = "kernel-meta"

SRC_URI = " \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://powersave.cfg \
file://android-drivers.cfg \
"

require recipes-kernel/linux/linux-raspberrypi.inc

KERNEL_DTC_FLAGS += "-@ -H epapr"

RDEPENDS:${KERNEL_PACKAGE_NAME}:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}"
RDEPENDS:${KERNEL_PACKAGE_NAME}-base:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-base"
RDEPENDS:${KERNEL_PACKAGE_NAME}-image:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-image"
RDEPENDS:${KERNEL_PACKAGE_NAME}-dev:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dev"
RDEPENDS:${KERNEL_PACKAGE_NAME}-vmlinux:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-vmlinux"
RDEPENDS:${KERNEL_PACKAGE_NAME}-modules:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-modules"
RDEPENDS:${KERNEL_PACKAGE_NAME}-dbg:raspberrypi-armv7:append = " ${RASPBERRYPI_v7_KERNEL_PACKAGE_NAME}-dbg"

DEPLOYDEP = ""
DEPLOYDEP:raspberrypi-armv7 = "${RASPBERRYPI_v7_KERNEL}:do_deploy"
do_deploy[depends] += "${DEPLOYDEP}"

0 comments on commit a2261aa

Please sign in to comment.