-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #380 from leon-anavi/rpi5-master
Add Raspberry Pi 5 Support in meta-mender-community/meta-mender-raspberrypi
- Loading branch information
Showing
31 changed files
with
419 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-base.yml | ||
|
||
local_conf_header: | ||
mender-full: | | ||
INHERIT += "mender-full-ubi" | ||
INHERIT += "mender-full-ubi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-base.yml | ||
|
||
local_conf_header: | ||
mender-full: | | ||
INHERIT += "mender-full" | ||
INHERIT += "mender-full" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
header: | ||
version: 11 | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
header: | ||
version: 14 | ||
includes: | ||
- kas/include/mender-full.yml | ||
- kas/include/raspberrypi.yml | ||
|
||
machine: raspberrypi5 | ||
|
||
local_conf_header: | ||
raspberrypi5: | | ||
KERNEL_IMAGETYPE_UBOOT ?= "Image" | ||
KERNEL_BOOTCMD ?= "booti" | ||
UBOOT_MACHINE = "rpi_arm64_config" |
16 changes: 16 additions & 0 deletions
16
meta-mender-raspberrypi/classes/rpi-update-firmware.bbclass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
rpi_install_firmware_to_rootfs() { | ||
install -d ${IMAGE_ROOTFS}/boot/firmware/overlays | ||
|
||
cp ${DEPLOY_DIR_IMAGE}/${BOOTFILES_DIR_NAME}/* ${IMAGE_ROOTFS}/boot/firmware/ | ||
|
||
# To exclude files such as bcm2710-rpi-3-b-1-4.19.88+git0+988cc7beac-r0-raspberrypi3-20200323173633.dtb | ||
# as only the link names are actually valid and searched for on the device. | ||
find ${DEPLOY_DIR_IMAGE}/ -type l \( -iname "*.dtb" \) -exec cp {} ${IMAGE_ROOTFS}/boot/firmware/ \; | ||
find ${DEPLOY_DIR_IMAGE}/ -type l \( -iname "*.dtbo" \) -exec cp {} ${IMAGE_ROOTFS}/boot/firmware/overlays/ \; | ||
|
||
cp ${DEPLOY_DIR_IMAGE}/u-boot.bin ${IMAGE_ROOTFS}/boot/firmware/${SDIMG_KERNELIMAGE} | ||
cp ${DEPLOY_DIR_IMAGE}/boot.scr ${IMAGE_ROOTFS}/boot/firmware/ | ||
} | ||
ROOTFS_POSTPROCESS_COMMAND += "rpi_install_firmware_to_rootfs; " | ||
|
||
IMAGE_INSTALL:append = " update-firmware-state-script" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# We have a conf and classes directory, add to BBPATH | ||
BBPATH .= ":${LAYERDIR}" | ||
|
||
# We have recipes-* directories, add to BBFILES | ||
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
${LAYERDIR}/recipes-*/*/*.bbappend" | ||
|
||
BBFILE_COLLECTIONS += "mender-raspberrypi" | ||
BBFILE_PATTERN_mender-raspberrypi = "^${LAYERDIR}/" | ||
BBFILE_PRIORITY_mender-raspberrypi = "10" | ||
|
||
LAYERDEPENDS_mender-raspberrypi = "mender raspberrypi" | ||
|
||
# Recommended for u-boot support for raspberrypi5 | ||
# https://git.yoctoproject.org/meta-lts-mixins 'scarthgap/u-boot' branch | ||
LAYERRECOMMENDS_mender-raspberrypi = "lts-u-boot-mixin" | ||
|
||
LAYERSERIES_COMPAT_mender-raspberrypi = "scarthgap" | ||
|
||
# Raspberry Pi doesn't work with GRUB currently. | ||
_MENDER_IMAGE_TYPE_DEFAULT:rpi = "mender-image-sd" | ||
_MENDER_BOOTLOADER_DEFAULT:rpi = "mender-uboot" |
2 changes: 2 additions & 0 deletions
2
meta-mender-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline-mender.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CMDLINE_ROOTFS:remove = "root=/dev/mmcblk0p2" | ||
CMDLINE_ROOTFS:append = " root=\${mender_kernel_root} " |
1 change: 1 addition & 0 deletions
1
meta-mender-raspberrypi/recipes-bsp/bootfiles/rpi-cmdline.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include ${@mender_feature_is_enabled("mender-update-install","rpi-cmdline-mender.inc","",d)} |
6 changes: 6 additions & 0 deletions
6
meta-mender-raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs | ||
run mender_setup | ||
mmc dev ${mender_uboot_dev} | ||
load ${mender_uboot_root} ${kernel_addr_r} /boot/@@KERNEL_IMAGETYPE@@ | ||
@@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr} | ||
run mender_try_to_recover |
1 change: 1 addition & 0 deletions
1
meta-mender-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FILESEXTRAPATHS:prepend:rpi:mender-update-install := "${THISDIR}/files:" |
Oops, something went wrong.