mbox series

[v3,0/3] Deploy DTBs with separate recipe

Message ID 20251008085507.1017500-1-amikan@ilbers.de
Headers show
Series Deploy DTBs with separate recipe | expand

Message

Anton Mikanovich Oct. 8, 2025, 8:55 a.m. UTC
Image task "do_copy_boot_files" is used to deploy kernel, initrd and
devicetree binaries to deploy directory.

When different images for the same target are built (e.g., "-base" and
"-debug") in parallel, this causes issues with DTB deployment since
they have no any image_name-specific stuff in the path, unlike kernel
and initrd.

Here we make a separate recipe responsible for the DTB deployment.
DTBs are extracted from the kernel package (provided by distro or
self-built).

The recipe 'dtb-files' is MACHINE-dependent, so different DTB_FILES
may be deployed for different machines. At the same time, all these
'dtb-files-${MACHINE}' targets depend on the same kernel package, so
it is built only once.

The case when different distros (e.g., bullseye/bookworm) are using the
same name for DTB binaries is covered by the patch 1. It also covers
the case when image uses different kernel suffix (e.g., "realtime"
option for the kernel in some downstreams).

Related topics on maillist:

https://groups.google.com/g/isar-users/c/ht3YmKZcJlM
https://groups.google.com/g/isar-users/c/4BRDM02xC40
https://groups.google.com/g/isar-users/c/qAnjahjjfsw
https://groups.google.com/g/isar-users/c/ZMD4XY4dKWQ
https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8
https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA
https://groups.google.com/g/isar-users/c/ixzytHYnTmI

Changes since v2:
- Patch 1: Consider also kernel suffix.
- Patch 2: Use separate testcase for possible dtb clashes.
- Minor cosmetic fixes.

Changes since v1:
- Separate `dtb-files` recipe used instead of linux one
- Included older "[PATCH] Fix do_copy_boot_files error" into the
series ( https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA )

Anton Mikanovich (1):
  testsuite: Add test to check dtb deployment

Ilia Skochilov (1):
  meta: Fix do_copy_boot_files error for different distros of same
    machine

Uladzimir Bely (1):
  meta: Move DTB deployment to a separate dtb-files recipe

 RECIPE-API-CHANGELOG.md                    | 15 ++++++++
 meta/classes/image.bbclass                 | 15 +++-----
 meta/conf/bitbake.conf                     |  2 +-
 meta/recipes-kernel/dtb-files/dtb-files.bb | 41 ++++++++++++++++++++++
 testsuite/citest.py                        | 23 ++++++++++++
 5 files changed, 85 insertions(+), 11 deletions(-)
 create mode 100644 meta/recipes-kernel/dtb-files/dtb-files.bb