summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Stiffler <j-stiffler@ti.com>2019-08-30 22:32:46 +0000
committerDenys Dmytriyenko <denys@ti.com>2019-08-30 17:17:17 +0000
commit40b21c453aec2a175dd920878f52fa0d46b98c12 (patch)
tree4e057e9d9bd7952f288b7156e2d0661a964ce206
parentf15153c2e61abab9d67e5600b1c2f04667b591d1 (diff)
downloadmeta-ti-40b21c453aec2a175dd920878f52fa0d46b98c12.tar.gz
jailhouse: provide tools package
Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for using the jailhouse-cell-linux tool. The tools require the pyjailhouse python modules, so package them as well. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-rw-r--r--recipes-kernel/jailhouse/jailhouse_git.bb24
1 files changed, 20 insertions, 4 deletions
diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb
index aba4b3e7..546f1545 100644
--- a/recipes-kernel/jailhouse/jailhouse_git.bb
+++ b/recipes-kernel/jailhouse/jailhouse_git.bb
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
29S = "${WORKDIR}/git" 29S = "${WORKDIR}/git"
30 30
31require jailhouse-arch.inc 31require jailhouse-arch.inc
32inherit module pythonnative bash-completion deploy 32inherit module pythonnative bash-completion deploy setuptools
33 33
34PACKAGE_ARCH = "${MACHINE_ARCH}" 34PACKAGE_ARCH = "${MACHINE_ARCH}"
35COMPATIBLE_MACHINE = "(ti-soc)" 35COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
78TOOLS_SRC_DIR = "${S}/tools" 78TOOLS_SRC_DIR = "${S}/tools"
79TOOLS_OBJ_DIR = "${S}/tools" 79TOOLS_OBJ_DIR = "${S}/tools"
80 80
81EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
82
83
81do_compile() { 84do_compile() {
82 oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} 85 oe_runmake V=1
83} 86}
84 87
85do_install() { 88do_install() {
86 oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install 89 # Install pyjailhouse python modules needed by the tools
90 distutils_do_install
91
92 # We want to install the python tools, but we do not want to use pip...
93 # At least with v0.10, we can work around this with
94 # 'PIP=":" PYTHON_PIP_USEABLE=yes'
95 oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
87 96
88 install -d ${D}${CELL_DIR} 97 install -d ${D}${CELL_DIR}
89 install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/ 98 install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
115 fi 124 fi
116} 125}
117 126
118PACKAGE_BEFORE_PN = "kernel-module-jailhouse" 127PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
119FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot" 128FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
129FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
130FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
131
132RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
133RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
134
135RRECOMMENDS_${PN} = "${PN}-tools"
120 136
121INSANE_SKIP_${PN} = "ldflags" 137INSANE_SKIP_${PN} = "ldflags"
122 138