@@ -48,6 +48,9 @@ BAREBOX_BUILDSYSTEM_VERSION ??= "${@get_layer_rev(os.path.dirname(d.getVar('FILE
BAREBOX_FIRMWARE_DIR[doc] = "Overwrite barebox' firmware blobs search directory (CONFIG_EXTRA_FIRMWARE_DIR) with this path, default ${B}/firmware"
BAREBOX_FIRMWARE_DIR ??= "${B}/firmware"
+BAREBOX_INSTALL_DTB[doc] = "Install dtb files from barebox into sysroot. By default, this variable is set to '0'."
+BAREBOX_INSTALL_DTB ??= "0"
+
EXTRA_OEMAKE = " \
ARCH=${@oe.kernel.map_kernel_arch(d)} CROSS_COMPILE=${TARGET_PREFIX} -C ${S} O=${B} \
BUILDSYSTEM_VERSION=${BAREBOX_BUILDSYSTEM_VERSION} \
@@ -138,6 +141,10 @@ barebox_do_install () {
install -m 644 ${B}/${image} ${D}${BAREBOX_INSTALL_PATH}/
done
fi
+
+ if [ "${BAREBOX_INSTALL_DTB}" = "1" ]; then
+ make dtbs_install INSTALL_DTBS_PATH=${D}/sysroot-only/
+ fi
}
FILES:${PN} = "${BAREBOX_INSTALL_PATH}"
Sometimes it's useful to be able to include the barebox- generated dtb. An example would be generating a FIP image for use by TF-A on the stm32mp1: There, the barebox binary and its device tree need to be provided separately to the fiptool command. Add a variable called `BAREBOX_INSTALL_DTB` to control, whether the dtb files should be installed into the sysroot. Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de> --- meta/classes-recipe/barebox.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) --- base-commit: c264544ea440477db8ab84ca26fd9a7ab2c7da90 change-id: 20260909-barebox-dts-c8d00b35b0fc Best regards,