mbox series

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

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

Message

Uladzimir Bely July 12, 2024, 5:09 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 responcible for DTB deployment. DTBs are
extracted from a kernel package (provided by distro or self-built).

First (RFC) version of the patchset directly used linux recipes for
this, but such approach still had "multiple execution" issues in case
the same linux recipe was used by different machines. This required
per-machine linux build splitting that increases build time and brings
some other problems (e.g. with kernel modules dependencies).

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's built only once.

The case when different distros (e.g., bullseye/bookworm) use the same
name for DTB binaries is covered by a separate patch.

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

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 )

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

Uladzimir Bely (2):
  testsuite: Build also debug images for some targets
  meta: Move DTB deployment to a separate dtb-files recipe

 RECIPE-API-CHANGELOG.md                    |  8 ++++
 meta/classes/image.bbclass                 | 16 +++-----
 meta/conf/bitbake.conf                     |  2 +-
 meta/recipes-kernel/dtb-files/dtb-files.bb | 45 ++++++++++++++++++++++
 testsuite/citest.py                        |  3 ++
 5 files changed, 62 insertions(+), 12 deletions(-)
 create mode 100644 meta/recipes-kernel/dtb-files/dtb-files.bb