public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH v2] meta-isar: Allow to include isar-image-base from external layers
Date: Thu, 6 Jul 2017 07:58:02 +0200	[thread overview]
Message-ID: <4d380e5e-96c9-4ee6-7441-0de7aa07a2b4@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

THISDIR is expanded in way that the including file defines the path,
rather than the file that contains this variable. This prevents
including this recipe from an external layer in order to derive an
image from it.

Define an use the COREBASE variable with points to the Isar core
repository, analogously to OE's COREBASE.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta-isar/recipes-core/images/isar-image-base.bb | 10 ++++++----
 meta/conf/layer.conf                             |  3 +++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/meta-isar/recipes-core/images/isar-image-base.bb b/meta-isar/recipes-core/images/isar-image-base.bb
index 66d3cb9..7ea8c75 100644
--- a/meta-isar/recipes-core/images/isar-image-base.bb
+++ b/meta-isar/recipes-core/images/isar-image-base.bb
@@ -21,16 +21,18 @@ WORKDIR = "${TMPDIR}/work/${PN}/${MACHINE}"
 S = "${WORKDIR}/rootfs"
 IMAGE_ROOTFS = "${S}"
 
+FILESDIR = "${COREBASE}/meta-isar/recipes-core/images/files"
+
 do_rootfs[stamp-extra-info] = "${MACHINE}"
 
 do_rootfs() {
     install -d -m 755 ${WORKDIR}/hooks_multistrap
 
     # Copy config file
-    install -m 644 ${THISDIR}/files/multistrap.conf.in ${WORKDIR}/multistrap.conf
-    install -m 755 ${THISDIR}/files/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
-    install -m 755 ${THISDIR}/files/setup.sh ${WORKDIR}
-    install -m 755 ${THISDIR}/files/download_dev-random ${WORKDIR}/hooks_multistrap/
+    install -m 644 ${FILESDIR}/multistrap.conf.in ${WORKDIR}/multistrap.conf
+    install -m 755 ${FILESDIR}/${DISTRO_CONFIG_SCRIPT} ${WORKDIR}/configscript.sh
+    install -m 755 ${FILESDIR}/setup.sh ${WORKDIR}
+    install -m 755 ${FILESDIR}/download_dev-random ${WORKDIR}/hooks_multistrap/
 
     # Adjust multistrap config
     sed -i 's|##IMAGE_PREINSTALL##|${IMAGE_PREINSTALL}|' ${WORKDIR}/multistrap.conf
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index ab6ae8e..470e834 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -16,3 +16,6 @@ BBFILE_PRIORITY_core = "5"
 LAYERVERSION_core = "1"
 
 LAYERDIR_core = "${LAYERDIR}"
+
+# Set a variable to get to the top of the metadata location
+COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
-- 
2.12.3

                 reply	other threads:[~2017-07-06  5:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4d380e5e-96c9-4ee6-7441-0de7aa07a2b4@siemens.com \
    --to=jan.kiszka@siemens.com \
    --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