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 <[email protected]> --- meta/classes-recipe/barebox.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta/classes-recipe/barebox.bbclass b/meta/classes-recipe/barebox.bbclass index d8f568594849aa0d17d792a73fabda249617e287..3980849b531028c944fdaec76e6656a38210ec7c 100644 --- a/meta/classes-recipe/barebox.bbclass +++ b/meta/classes-recipe/barebox.bbclass @@ -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}" --- base-commit: c264544ea440477db8ab84ca26fd9a7ab2c7da90 change-id: 20260909-barebox-dts-c8d00b35b0fc Best regards, -- Fabian Pfitzner <[email protected]>
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#246570): https://lists.openembedded.org/g/openembedded-core/message/246570 Mute This Topic: https://lists.openembedded.org/mt/121405765/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
