diff options
| author | Ola Redell <ola.redell@retotech.se> | 2017-11-10 17:01:32 +0100 |
|---|---|---|
| committer | Ola Redell <ola.redell@retotech.se> | 2017-11-10 17:01:32 +0100 |
| commit | 8332c013c923cf12723291c12d946ed1585f5943 (patch) | |
| tree | 6849ed47899557dffad5f39cb6a061123a7fcdbc | |
| parent | 12eee50ff00ea53aa9ccd0bf8b36443949ae4cf5 (diff) | |
| download | meta-jailhouse-8332c013c923cf12723291c12d946ed1585f5943.tar.gz | |
added jailhouse-dirs.inc and updated the jailhouse setup
with the CELL variable to automatically add DEPENDS and RDEPENDS to
the referred cells from the jailhouse recipe
| -rw-r--r-- | classes/jailhouse-cell.bbclass | 8 | ||||
| -rw-r--r-- | recipes-jailhouse/jailhouse/jailhouse-dirs.inc | 4 | ||||
| -rw-r--r-- | recipes-jailhouse/jailhouse/jailhouse.inc | 32 | ||||
| -rw-r--r-- | recipes-jailhouse/jailhouse/jailhouse_0.6.bb | 2 |
4 files changed, 19 insertions, 27 deletions
diff --git a/classes/jailhouse-cell.bbclass b/classes/jailhouse-cell.bbclass index 63a4cbc..f1cd6a0 100644 --- a/classes/jailhouse-cell.bbclass +++ b/classes/jailhouse-cell.bbclass | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | require recipes-jailhouse/jailhouse/jailhouse-dirs.inc | ||
| 2 | |||
| 1 | INMATE ?= "" | 3 | INMATE ?= "" |
| 2 | CELLCONFIG ?= "" | 4 | CELLCONFIG ?= "" |
| 3 | 5 | ||
| 4 | INMATE_TARGET ?= "${INMATE}" | 6 | INMATE_TARGET ?= "${INMATE}" |
| 5 | CELLCONFIG_TARGET ?= "${CELLCONFIG}" | 7 | CELLCONFIG_TARGET ?= "${CELLCONFIG}" |
| 6 | 8 | ||
| 7 | INMATES_DIR ?= "${datadir}/jailhouse/inmates" | ||
| 8 | CELLCONF_DIR ?= "${datadir}/jailhouse/configs" | ||
| 9 | |||
| 10 | do_install() { | 9 | do_install() { |
| 11 | if [ -n "${CELLCONFIG}" ] | 10 | if [ -n "${CELLCONFIG}" ] |
| 12 | then | 11 | then |
| @@ -21,4 +20,5 @@ do_install() { | |||
| 21 | fi | 20 | fi |
| 22 | } | 21 | } |
| 23 | 22 | ||
| 24 | FILES_${PN} += "${INMATES_DIR} ${CELLCONF_DIR}" | 23 | FILES_${PN}-dev += "${CELLCONF_DIR}" |
| 24 | FILES_${PN} += "${INMATES_DIR}" | ||
diff --git a/recipes-jailhouse/jailhouse/jailhouse-dirs.inc b/recipes-jailhouse/jailhouse/jailhouse-dirs.inc new file mode 100644 index 0000000..df39d40 --- /dev/null +++ b/recipes-jailhouse/jailhouse/jailhouse-dirs.inc | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | JH_DATADIR ?= "${datadir}/jailhouse" | ||
| 2 | CELL_DIR ?= "${JH_DATADIR}/cells" | ||
| 3 | CELLCONF_DIR ?= "${JH_DATADIR}/configs" | ||
| 4 | INMATES_DIR ?= "${JH_DATADIR}/inmates" | ||
diff --git a/recipes-jailhouse/jailhouse/jailhouse.inc b/recipes-jailhouse/jailhouse/jailhouse.inc index 2c30725..3965fd1 100644 --- a/recipes-jailhouse/jailhouse/jailhouse.inc +++ b/recipes-jailhouse/jailhouse/jailhouse.inc | |||
| @@ -14,23 +14,11 @@ DEPENDS = "virtual/kernel make-native python-mako-native dtc-native python-mako" | |||
| 14 | 14 | ||
| 15 | S ="${WORKDIR}/git" | 15 | S ="${WORKDIR}/git" |
| 16 | 16 | ||
| 17 | JH_DATADIR="${datadir}/jailhouse" | 17 | require jailhouse-dirs.inc |
| 18 | CELL_DIR ?= "${JH_DATADIR}/cells" | ||
| 19 | CELLCONF_DIR ?= "${JH_DATADIR}/configs" | ||
| 20 | INMATES_DIR ?= "${JH_DATADIR}/inmates" | ||
| 21 | |||
| 22 | export PACKAGECONFIG_CONFARGS | ||
| 23 | |||
| 24 | inherit module pythonnative bash-completion | 18 | inherit module pythonnative bash-completion |
| 25 | 19 | ||
| 26 | do_configure() { | 20 | do_configure() { |
| 27 | # Copy all cell configs included through PACKAGECONFIG | 21 | cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/ |
| 28 | for arg in $(echo $PACKAGECONFIG_CONFARGS); do | ||
| 29 | if conf=$(echo $arg | grep -o "with-.*$"); | ||
| 30 | then | ||
| 31 | cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/${conf#with-}.c" ${S}/configs/ | ||
| 32 | fi | ||
| 33 | done | ||
| 34 | } | 22 | } |
| 35 | 23 | ||
| 36 | USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ | 24 | USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ |
| @@ -71,12 +59,10 @@ do_install() { | |||
| 71 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse" | 59 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse" |
| 72 | FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" | 60 | FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" |
| 73 | 61 | ||
| 74 | PACKAGECONFIG ??= "freertos-cell freertos-demo1-cell freertos-demo3-cell freertos-ivshmem-demo" | 62 | python __anonymous () { |
| 75 | PACKAGECONFIG[freertos-cell] = \ | 63 | # Setup DEPENDS and RDEPENDS to included cells" |
| 76 | "--with-freertos-cell,,freertos-cell,freertos-cell" | 64 | cells = d.getVar('CELLS', True) or "" |
| 77 | PACKAGECONFIG[freertos-demo1-cell] = \ | 65 | for cell in cells.split(): |
| 78 | "--with-freertos-demo1-cell,,freertos-demo1-cell,freertos-demo1-cell" | 66 | d.appendVar('DEPENDS', ' ' + cell) |
| 79 | PACKAGECONFIG[freertos-demo3-cell] = \ | 67 | d.appendVar('RDEPENDS_${PN}', ' ' + cell) |
| 80 | "--with-freertos-demo3-cell,,freertos-demo3-cell,freertos-demo3-cell" | 68 | } |
| 81 | PACKAGECONFIG[freertos-ivshmem-demo] = \ | ||
| 82 | "--with-freertos-ivshmem-demo,,freertos-ivshmem-demo,freertos-ivshmem-demo" | ||
diff --git a/recipes-jailhouse/jailhouse/jailhouse_0.6.bb b/recipes-jailhouse/jailhouse/jailhouse_0.6.bb index 6c752f7..d0fc7f9 100644 --- a/recipes-jailhouse/jailhouse/jailhouse_0.6.bb +++ b/recipes-jailhouse/jailhouse/jailhouse_0.6.bb | |||
| @@ -7,3 +7,5 @@ SRC_URI = "git://github.com/siemens/jailhouse.git;protocol=git \ | |||
| 7 | " | 7 | " |
| 8 | 8 | ||
| 9 | SRCREV = "81528e48763c8dfc10851c49968eb3d053d4b85c" | 9 | SRCREV = "81528e48763c8dfc10851c49968eb3d053d4b85c" |
| 10 | |||
| 11 | CELLS = "freertos-cell freertos-demo1-cell freertos-demo3-cell freertos-ivshmem-demo" | ||
