public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 3/7] ubi: Move tasks reorder into parent task
Date: Wed,  9 Feb 2022 16:54:07 +0300	[thread overview]
Message-ID: <20220209135411.1313521-4-amikan@ilbers.de> (raw)
In-Reply-To: <20220209135411.1313521-1-amikan@ilbers.de>

Image type ubi-ubifs-img was created to implement UBI image generation
with FIT and UBIFS subimages included. Now we can implement the same
with multiple image types. This will also allow to use UBIFS+UBI setup
without creating another image type. The only issue should be resolved
then is calling task in correct order.
Move dependencies logic into parent UBI image type bbclass to set task
dependencies correctly.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 meta-isar/classes/ubi-ubifs-img.bbclass | 4 ++--
 meta/classes/ubi-img.bbclass            | 6 ++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta-isar/classes/ubi-ubifs-img.bbclass b/meta-isar/classes/ubi-ubifs-img.bbclass
index 095719a..cee29ef 100644
--- a/meta-isar/classes/ubi-ubifs-img.bbclass
+++ b/meta-isar/classes/ubi-ubifs-img.bbclass
@@ -5,6 +5,6 @@
 #
 # SPDX-License-Identifier: MIT
 
+# Deprecated: use IMAGE_FSTYPES = "ubi-img ubifs-img fit-img" instead
+
 inherit ubi-img ubifs-img fit-img
-addtask do_ubi_image after do_ubifs_image
-addtask do_ubi_image after do_fit_image
diff --git a/meta/classes/ubi-img.bbclass b/meta/classes/ubi-img.bbclass
index efaf058..b6c2ff2 100644
--- a/meta/classes/ubi-img.bbclass
+++ b/meta/classes/ubi-img.bbclass
@@ -6,6 +6,12 @@
 python() {
     if not d.getVar("UBINIZE_ARGS"):
         raise bb.parse.SkipRecipe("UBINIZE_ARGS must be set")
+
+    fstypes = d.getVar('IMAGE_FSTYPES', True) or ''
+    if 'fit-img' in fstypes.split() or 'ubi-ubifs-img' in fstypes.split():
+        bb.build.addtask('do_ubi_image', '', 'do_fit_image', d)
+    if 'ubifs-img' in fstypes.split() or 'ubi-ubifs-img' in fstypes.split():
+        bb.build.addtask('do_ubi_image', '', 'do_ubifs_image', d)
 }
 
 UBINIZE_CFG ??= "ubinize.cfg"
-- 
2.25.1


  parent reply	other threads:[~2022-02-09 13:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 13:54 [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Anton Mikanovich
2022-02-09 13:54 ` [PATCH 1/7] ubi: Move default output paths to image class Anton Mikanovich
2022-02-09 13:54 ` [PATCH 2/7] ubi: Remove isar-image-ubi Anton Mikanovich
2022-02-09 13:54 ` Anton Mikanovich [this message]
2022-02-09 13:54 ` [PATCH 4/7] ubi: Split UBI configs for phyboard-mira and imx6-sabrelite Anton Mikanovich
2022-02-09 13:54 ` [PATCH 5/7] conf: Remove machine-specific defines from multiconfig Anton Mikanovich
2022-02-09 13:54 ` [PATCH 6/7] meta-isar: Add linux-phy kernel Anton Mikanovich
2022-02-09 13:54 ` [PATCH 7/7] meta: Add barebox bootloader support Anton Mikanovich
2022-02-09 18:08   ` Jan Kiszka
2022-02-10  7:58     ` Anton Mikanovich
2022-02-10  8:05       ` Jan Kiszka
2022-02-10  8:45         ` Anton Mikanovich
2022-02-10 11:24           ` Jan Kiszka
2022-02-10 14:03             ` Anton Mikanovich
2022-02-10  6:52 ` [PATCH 0/7] Rebuild phyBOARD-Mira UBI image generation Schmidt, Adriaan
2022-02-10  8:12   ` Anton Mikanovich
2022-02-18 16:38   ` Anton Mikanovich
2022-03-31  6:10     ` Schmidt, Adriaan

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=20220209135411.1313521-4-amikan@ilbers.de \
    --to=amikan@ilbers.de \
    --cc=isar-users@googlegroups.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