From: Jan Kiszka <[email protected]>

Simplify the way to specify configs that are shipped with the recipe and
simply injected into the build by copying them over. This is
amd64-specific, so do nothing for other archs.

Signed-off-by: Jan Kiszka <[email protected]>
---
 recipes-jailhouse/jailhouse/jailhouse.inc | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/recipes-jailhouse/jailhouse/jailhouse.inc 
b/recipes-jailhouse/jailhouse/jailhouse.inc
index 772f2e3..fbca1fd 100644
--- a/recipes-jailhouse/jailhouse/jailhouse.inc
+++ b/recipes-jailhouse/jailhouse/jailhouse.inc
@@ -15,11 +15,17 @@ DESCRIPTION = "Jailhouse partitioning hypervisor"

 LICENSE = "GPL-2.0 & BSD-2-clause"

+EXTRA_JAILHOUSE_CONFIGS ?= ""
+
+EXTRA_JAILHOUSE_CONFIGS_amd64 = " \
+    nuc6cay.c linux-nuc6cay-demo.c \
+    "
+
 SRC_URI = " \
     git://github.com/siemens/jailhouse;branch=next \
     file://debian/ \
-    file://nuc6cay.c \
-    file://linux-nuc6cay-demo.c"
+    ${@ " ".join(["file://" + cfg for cfg in 
d.getVar('EXTRA_JAILHOUSE_CONFIGS').split()]) } \
+    "

 TEMPLATE_FILES = "debian/control.tmpl"
 TEMPLATE_VARS += "KERNEL_NAME"
@@ -39,8 +45,9 @@ do_prepare_build() {
     fi
     mv ${S}/debian/jailhouse.install 
${S}/debian/jailhouse-${KERNEL_NAME}.install

-    cp ${WORKDIR}/nuc6cay.c ${S}/configs/x86/
-    cp ${WORKDIR}/linux-nuc6cay-demo.c ${S}/configs/x86/
+    for cfg in ${EXTRA_JAILHOUSE_CONFIGS}; do
+        cp ${WORKDIR}/$cfg ${S}/configs/x86/
+    done
 }

 dpkg_runbuild_prepend() {
--
2.16.4

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/b175dc3e57d49c50539e7902ff89e9a5d9dcc9ba.1586760835.git.jan.kiszka%40web.de.

Reply via email to