mbox series

[v10,0/2] Move kernel artifacts deployment from image recipe

Message ID 20260429153829.2668049-1-wzh@ilbers.de
Headers show
Series Move kernel artifacts deployment from image recipe | expand

Message

Zhihang Wei April 29, 2026, 3:38 p.m. UTC
This patch set should be applied on top of the series "[PATCH 0/3]
Revert "prefix DTB files with PN in deploy dir"".

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 'kernel-deploy' is kernel-dependent, so different DTB_FILES
may be deployed for different machines. At the same time, all these
'kernel-deploy-${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 3. 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://lists.isar-build.org/isar-users/20250403170701.807745-1-badrikesh.prusty@siemens.com/T/#u
https://lists.isar-build.org/isar-users/20240705071856.904-1-cedric.hombourger@siemens.com/T/#u
https://lists.isar-build.org/isar-users/c426ad86-5cc5-42e6-8223-e7a7e5b3424en@googlegroups.com/T/#u
https://lists.isar-build.org/isar-users/20240416100746.5681-1-nicusor_huhulea@mentor.com/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690820CF3DD2DCA71D822AF1E63B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690861E70EB246FEF845E253E64B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/20240131144459.2386220-1-iskochilov@ilbers.de/T/#u

Changes since v9:
- Base on v6.
- Rebase on next.
- Move also kernel deployment from image recipe.

Changes since v8:
- Rebase on next.
- Document how this approach differs from OpenEmbedded.

Changes since v7:
- Fix SOB.

Changes since v6:
- Fix isoimage-isohybrid-isar WIC plugin.
- Split testcases.
- Update wording.

Changes since v4:
- Rebase on next.
- Squash latest patch to first one.
- Fix deploy paths in initrd tests.

Changes since v3:
- Rebase on next.
- Fix target deploy dir path for installer.

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 (2):
  meta: Fix do_copy_boot_files error for different distros of same
    machine
  meta: Move kernel artifacts deployment from image recipe

 RECIPE-API-CHANGELOG.md                       | 27 ++++++++++
 .../installer-add-rootfs.bbclass              |  4 +-
 meta/classes-recipe/image.bbclass             | 39 +++++---------
 meta/conf/bitbake.conf                        |  2 +-
 .../kernel-deploy/kernel-deploy.bb            | 53 +++++++++++++++++++
 testsuite/citest.py                           |  7 +--
 6 files changed, 100 insertions(+), 32 deletions(-)
 create mode 100644 meta/recipes-kernel/kernel-deploy/kernel-deploy.bb