From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 13/27] optee-os[-tadevkit]-custom: Migrate to bbclass'es
Date: Mon,  3 Nov 2025 12:52:01 +0100	[thread overview]
Message-ID: <2c41d8e09fb52933c4ef2f049d40b812f32aedee.1762170735.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1762170735.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
"inherit optee-os[-tadevkit]" is shorter and a more common pattern
compared to OE/yocto. Keep the original .inc files as transitional
helpers, issuing a warning when they are used with a migration
suggestion.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../optee-os-base.bbclass}                    |  3 +--
 .../optee-os-tadevkit.bbclass}                |  2 +-
 .../optee-os.bbclass}                         |  4 +--
 meta/recipes-bsp/optee-os/optee-os-custom.inc | 19 +++++---------
 .../optee-os/optee-os-tadevkit-custom.inc     | 25 +++++--------------
 5 files changed, 16 insertions(+), 37 deletions(-)
 rename meta/{recipes-bsp/optee-os/optee-os.inc => classes-recipe/optee-os-base.bbclass} (92%)
 copy meta/{recipes-bsp/optee-os/optee-os-tadevkit-custom.inc => classes-recipe/optee-os-tadevkit.bbclass} (97%)
 copy meta/{recipes-bsp/optee-os/optee-os-custom.inc => classes-recipe/optee-os.bbclass} (88%)
diff --git a/meta/recipes-bsp/optee-os/optee-os.inc b/meta/classes-recipe/optee-os-base.bbclass
similarity index 92%
rename from meta/recipes-bsp/optee-os/optee-os.inc
rename to meta/classes-recipe/optee-os-base.bbclass
index eac75ae8..58305383 100644
--- a/meta/recipes-bsp/optee-os/optee-os.inc
+++ b/meta/classes-recipe/optee-os-base.bbclass
@@ -7,8 +7,7 @@
 
 inherit dpkg
 
-FILESPATH:append := ":${FILE_DIRNAME}/files"
-
+FILESPATH:append = ":${LAYERDIR_core}/recipes-bsp/optee-os/files"
 SRC_URI += "file://debian/"
 
 DESCRIPTION ?= "Custom OP-TEE OS"
diff --git a/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc b/meta/classes-recipe/optee-os-tadevkit.bbclass
similarity index 97%
copy from meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc
copy to meta/classes-recipe/optee-os-tadevkit.bbclass
index cfb2cfd5..77d63d02 100644
--- a/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc
+++ b/meta/classes-recipe/optee-os-tadevkit.bbclass
@@ -5,7 +5,7 @@
 #
 # SPDX-License-Identifier: MIT
 
-require optee-os.inc
+inherit optee-os-base
 
 DEBIAN_PACKAGE_NAME = "optee-os-tadevkit-${OPTEE_NAME}"
 DESCRIPTION:append = ", trust application development kit."
diff --git a/meta/recipes-bsp/optee-os/optee-os-custom.inc b/meta/classes-recipe/optee-os.bbclass
similarity index 88%
copy from meta/recipes-bsp/optee-os/optee-os-custom.inc
copy to meta/classes-recipe/optee-os.bbclass
index abe46e81..48f97bee 100644
--- a/meta/recipes-bsp/optee-os/optee-os-custom.inc
+++ b/meta/classes-recipe/optee-os.bbclass
@@ -1,11 +1,11 @@
 # Custom OP-TEE OS build
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2020-2023
+# Copyright (c) Siemens AG, 2020-2025
 #
 # SPDX-License-Identifier: MIT
 
-require optee-os.inc
+inherit optee-os-base
 
 DESCRIPTION:append = ", firmware binaries"
 
diff --git a/meta/recipes-bsp/optee-os/optee-os-custom.inc b/meta/recipes-bsp/optee-os/optee-os-custom.inc
index abe46e81..1f4ebf7e 100644
--- a/meta/recipes-bsp/optee-os/optee-os-custom.inc
+++ b/meta/recipes-bsp/optee-os/optee-os-custom.inc
@@ -1,20 +1,13 @@
-# Custom OP-TEE OS build
+# Transitional include for optee-os.bbclass
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2020-2023
+# Copyright (c) Siemens AG, 2025
 #
 # SPDX-License-Identifier: MIT
 
-require optee-os.inc
+inherir optee-os
 
-DESCRIPTION:append = ", firmware binaries"
-
-PROVIDES += "optee-os-${OPTEE_NAME}"
-
-do_prepare_build:append() {
-    rm -f ${S}/debian/optee-os-${OPTEE_NAME}.install
-    for binary in ${OPTEE_BINARIES}; do
-        echo "out/arm-plat-${OPTEE_PLATFORM_BASE}/core/$binary /usr/lib/optee-os/${OPTEE_NAME}/" >> \
-            ${S}/debian/optee-os-${OPTEE_NAME}.install
-    done
+do_warn_custom_inc() {
+    bbwarn "Please migrate from \"require recipes-bsp/optee-os/optee-os-custom.inc\" to \"inherit optee-os\""
 }
+addtask warn_custom_inc before do_unpack
diff --git a/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc b/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc
index cfb2cfd5..bc011567 100644
--- a/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc
+++ b/meta/recipes-bsp/optee-os/optee-os-tadevkit-custom.inc
@@ -1,26 +1,13 @@
-# Custom OP-TEE OS build for TA devkit
+# Transitional include for optee-os-tadevkit.bbclass
 #
 # This software is a part of ISAR.
-# Copyright (c) Siemens AG, 2023
+# Copyright (c) Siemens AG, 2025
 #
 # SPDX-License-Identifier: MIT
 
-require optee-os.inc
+inherit optee-os-tadevkit
 
-DEBIAN_PACKAGE_NAME = "optee-os-tadevkit-${OPTEE_NAME}"
-DESCRIPTION:append = ", trust application development kit."
-
-PROVIDES += "${DEBIAN_PACKAGE_NAME}"
-
-do_prepare_build:append() {
-    if [ "${DISTRO_ARCH}" = "arm64" ]; then
-        TADEVKIT_DIR="export-ta_arm64"
-    elif [ "${DISTRO_ARCH}" = "armhf" ]; then
-        TADEVKIT_DIR="export-ta_arm32"
-    else
-        bbfatal "${DISTRO_ARCH} does not have a compat arch for optee TA devkit!"
-    fi
-
-    echo "out/arm-plat-${OPTEE_PLATFORM_BASE}/${TADEVKIT_DIR} /usr/lib/optee-os/${OPTEE_NAME}/" > \
-        ${S}/debian/optee-os-tadevkit-${OPTEE_NAME}.install
+do_warn_custom_inc() {
+    bbwarn "Please migrate from \"require recipes-bsp/optee-os/optee-os-tadevkit-custom.inc\" to \"inherit optee-os-tadevkit\""
 }
+addtask warn_custom_inc before do_unpack
-- 
2.51.0
-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/2c41d8e09fb52933c4ef2f049d40b812f32aedee.1762170735.git.jan.kiszka%40siemens.com.
next prev parent reply	other threads:[~2025-11-03 11:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03 11:51 [PATCH 00/27] Use more classes! 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 01/27] linux-custom: Drop redundant template inheritance 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 02/27] meta: Move INHERIT'ed classes into classes-global 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 03/27] meta: Move recipe-pulled classes into classes-recipe 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 04/27] meta-isar: " 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 05/27] linux-custom: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 06/27] meta-isar: Switch to linux-kernel class 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 07/27] linux-module: Migrate to a bbclasss 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 08/27] meta-isar: Switch to linux-module class 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 09/27] kselftest: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 10/27] meta-isar: Switch to kselftest class 'Jan Kiszka' via isar-users
2025-11-03 11:51 ` [PATCH 11/27] u-boot-custom: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 12/27] meta-isar: Switch to u-boot class 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` 'Jan Kiszka' via isar-users [this message]
2025-11-03 11:52 ` [PATCH 14/27] meta-isar: Switch to optee-os[-tadevkit] classes 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 15/27] optee-client: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 16/27] meta-isar: Switch to optee-client class 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 17/27] trusted-firmware-a: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 18/27] meta-isar: Switch to trusted-firmware-a class 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 19/27] barebox: Add SPDX license identifiers 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 20/27] barebox: Move inherit dpkg into common .inc 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 21/27] barebox: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 22/27] meta-isar: Switch to barebox class 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 23/27] initramfs-hook: Migrate to a bbclass 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 24/27] meta[-isar]: Switch to initramfs-hook class 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 25/27] container-loader: Migrate to bbclass'es 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 26/27] meta-isar: Switch to {docker,podman}-loader classes 'Jan Kiszka' via isar-users
2025-11-03 11:52 ` [PATCH 27/27] RECIPES-API-CHANGELOG: Document include to class conversion 'Jan Kiszka' via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=2c41d8e09fb52933c4ef2f049d40b812f32aedee.1762170735.git.jan.kiszka@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox