Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Raspberry Pi 5 (kirkstone) #1234

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conf/machine/include/rpi-default-versions.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# RaspberryPi BSP default versions

PREFERRED_VERSION_linux-raspberrypi ??= "5.15.%"
PREFERRED_VERSION_linux-raspberrypi ??= "6.1.%"
36 changes: 36 additions & 0 deletions conf/machine/raspberrypi5-64.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#@TYPE: Machine
#@NAME: RaspberryPi 5 Development Board (64bit)
#@DESCRIPTION: Machine configuration for the RaspberryPi 5 in 64 bits mode

MACHINEOVERRIDES =. "raspberrypi5:"

MACHINE_FEATURES += "pci"
MACHINE_EXTRA_RRECOMMENDS += "\
linux-firmware-rpidistro-bcm43455 \
bluez-firmware-rpidistro-bcm4345c0-hcd \
linux-firmware-rpidistro-bcm43456 \
bluez-firmware-rpidistro-bcm4345c5-hcd \
"

require conf/machine/include/arm/armv8-2a/tune-cortexa76.inc
include conf/machine/include/rpi-base.inc

RPI_KERNEL_DEVICETREE = " \
broadcom/bcm2712-rpi-5-b.dtb \
"

SDIMG_KERNELIMAGE ?= "kernel8.img"
SERIAL_CONSOLES ?= "115200;ttyS0"

UBOOT_MACHINE = "rpi_arm64_config"

VC4DTBO ?= "vc4-kms-v3d"

# When u-boot is enabled we need to use the "Image" format and the "booti"
# command to load the kernel
KERNEL_IMAGETYPE_UBOOT ?= "Image"
# "zImage" not supported on arm64 and ".gz" images not supported by bootloader yet
KERNEL_IMAGETYPE_DIRECT ?= "Image"
KERNEL_BOOTCMD ?= "booti"

ARMSTUB ?= "armstub8-gic.bin"
23 changes: 23 additions & 0 deletions conf/machine/raspberrypi5.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#@TYPE: Machine
#@NAME: RaspberryPi 5 Development Board (32bit)
#@DESCRIPTION: Machine configuration for the RaspberryPi 5 in 32 bit mode

DEFAULTTUNE ?= "cortexa7thf-neon-vfpv4"
require conf/machine/include/arm/armv7a/tune-cortexa7.inc
include conf/machine/include/rpi-base.inc

MACHINE_FEATURES += "pci"
MACHINE_EXTRA_RRECOMMENDS += "\
linux-firmware-rpidistro-bcm43455 \
bluez-firmware-rpidistro-bcm4345c0-hcd \
linux-firmware-rpidistro-bcm43456 \
bluez-firmware-rpidistro-bcm4345c5-hcd \
"

# 'l' stands for LPAE
SDIMG_KERNELIMAGE ?= "kernel7l.img"
UBOOT_MACHINE = "rpi_4_32b_config"
SERIAL_CONSOLES ?= "115200;ttyS0"

VC4DTBO ?= "vc4-kms-v3d"
ARMSTUB ?= "armstub7.bin"
2 changes: 2 additions & 0 deletions recipes-kernel/linux/linux-raspberrypi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ KBUILD_DEFCONFIG:raspberrypi3 ?= "bcm2709_defconfig"
KBUILD_DEFCONFIG:raspberrypi3-64 ?= "bcmrpi3_defconfig"
KBUILD_DEFCONFIG:raspberrypi4 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi4-64 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi5 ?= "bcm2711_defconfig"
KBUILD_DEFCONFIG:raspberrypi5-64 ?= "bcm2711_defconfig"

LINUX_VERSION_EXTENSION ?= ""

Expand Down
31 changes: 31 additions & 0 deletions recipes-kernel/linux/linux-raspberrypi_6.1.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
LINUX_VERSION ?= "6.1.54"
LINUX_RPI_BRANCH ?= "rpi-6.1.y"
LINUX_RPI_KMETA_BRANCH ?= "yocto-6.1"

SRCREV_machine = "df4d584e66a660195422ca2b7ce1d68d1181f2a2"
SRCREV_meta = "e7488dd3776c76fb7d94cc92ae7a2216423f8ece"

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 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}"