From 4f267b8acf4c0c2401f827c08b0e18da943c873a Mon Sep 17 00:00:00 2001 From: Luka Pivk Date: Tue, 27 Nov 2018 12:42:14 +0100 Subject: classes/image_types_ostree.bbclass: add device tree to boot/devicetree-* Include device trees into boot/devicetree-*-checksum. Device trees with this name format get picked up by ostree and copied into boot/. Ostree also generates entry inside uEnv.txt called fdt_file pointing to this device tree. Normaly one would include only one device tree. If KERNEL_DEVICETREE includes more then one device tree this will add all the device trees but ostree will still pick only one device tree and include it into boot. We are working on modifications to ostree so it will pickup all the device trees. Signed-off-by: Luka Pivk --- classes/image_types_ostree.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes/image_types_ostree.bbclass') diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 41b8d0d..d433acb 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass @@ -5,6 +5,7 @@ OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" OSTREE_COMMIT_BODY ??= "" OSTREE_UPDATE_SUMMARY ??= "0" +OSTREE_DEPLOY_DEVICETREE ??= "0" BUILD_OSTREE_TARBALL ??= "1" @@ -121,6 +122,14 @@ IMAGE_CMD_ostree () { touch boot/initramfs-${checksum} else cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} boot/initramfs-${checksum} + if [ "${OSTREE_DEPLOY_DEVICETREE}" = "1" ]; then + if test -n "${KERNEL_DEVICETREE}"; then + for DTS_FILE in ${KERNEL_DEVICETREE}; do + DTS_FILE_BASENAME=$(basename ${DTS_FILE}) + cp ${DEPLOY_DIR_IMAGE}/${DTS_FILE_BASENAME} boot/devicetree-${DTS_FILE_BASENAME}-${checksum} + done + fi + fi fi # Copy image manifest -- cgit v1.2.3-54-g00ecf