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 2/7] ubi: Remove isar-image-ubi
Date: Wed,  9 Feb 2022 16:54:06 +0300	[thread overview]
Message-ID: <20220209135411.1313521-3-amikan@ilbers.de> (raw)
In-Reply-To: <20220209135411.1313521-1-amikan@ilbers.de>

Make Isar UBI image more generic to be able to build default
isar-image-base with UBI-related image types.
Use image types as override postfix to declare UBI-related parametes.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 .../recipes-core/images/isar-image-base.bb    | 11 +++++++++++
 .../recipes-core/images/isar-image-ubi.bb     | 19 -------------------
 meta/classes/image.bbclass                    |  8 ++++++++
 3 files changed, 19 insertions(+), 19 deletions(-)
 delete mode 100644 meta-isar/recipes-core/images/isar-image-ubi.bb

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index b381d85..b1f22fa 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -11,3 +11,14 @@ LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260
 PV = "1.0"
 
 inherit image
+
+SRC_URI_append_ubi-img = " file://ubinize.cfg.tmpl"
+SRC_URI_append_fit-img = " file://fitimage.its.tmpl"
+SRC_URI_append_ubi-ubifs-img = " file://ubinize.cfg.tmpl file://fitimage.its.tmpl"
+
+TEMPLATE_VARS_append_fit-img = " KERNEL_IMG INITRD_IMG DTB_IMG"
+TEMPLATE_VARS_append_ubi-img = " KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
+TEMPLATE_VARS_append_ubi-ubifs-img = " KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
+TEMPLATE_FILES_append_fit-img = " fitimage.its.tmpl"
+TEMPLATE_FILES_append_ubi-img = " ubinize.cfg.tmpl"
+TEMPLATE_FILES_append_ubi-ubifs-img = " ubinize.cfg.tmpl fitimage.its.tmpl"
diff --git a/meta-isar/recipes-core/images/isar-image-ubi.bb b/meta-isar/recipes-core/images/isar-image-ubi.bb
deleted file mode 100644
index 9323822..0000000
--- a/meta-isar/recipes-core/images/isar-image-ubi.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-# UBI image recipe
-#
-# This software is a part of ISAR.
-# Copyright (C) Siemens AG, 2019
-#
-# SPDX-License-Identifier: MIT
-
-DESCRIPTION = "UBI Isar image"
-
-LICENSE = "gpl-2.0"
-LIC_FILES_CHKSUM = "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
-
-inherit image
-
-SRC_URI += "file://ubinize.cfg.tmpl \
-            file://fitimage.its.tmpl"
-
-TEMPLATE_VARS = "KERNEL_IMG INITRD_IMG DTB_IMG UBIFS_IMG FIT_IMG"
-TEMPLATE_FILES = "ubinize.cfg.tmpl fitimage.its.tmpl"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4b56e91..9ad04e8 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -238,3 +238,11 @@ addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess
 
 # Last so that the image type can overwrite tasks if needed
 inherit ${IMAGE_FSTYPES}
+
+def get_fstypes_overrides(d):
+    res = ''
+    for type in (d.getVar('IMAGE_FSTYPES', True) or '').split():
+        res += ':%s' % type
+    return res
+
+OVERRIDES_append = ":${@get_fstypes_overrides(d)}"
-- 
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 ` Anton Mikanovich [this message]
2022-02-09 13:54 ` [PATCH 3/7] ubi: Move tasks reorder into parent task Anton Mikanovich
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-3-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