* [PATCH v2] meta-isar: Allow to include isar-image-base from external layers
@ 2017-07-06 5:58 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2017-07-06 5:58 UTC (permalink / raw)
To: isar-users
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-06 5:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 5:58 [PATCH v2] meta-isar: Allow to include isar-image-base from external layers Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox