diff options
author | Jacob Stiffler <j-stiffler@ti.com> | 2019-08-30 22:32:46 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2019-08-30 17:17:17 +0000 |
commit | 40b21c453aec2a175dd920878f52fa0d46b98c12 (patch) | |
tree | 4e057e9d9bd7952f288b7156e2d0661a964ce206 | |
parent | f15153c2e61abab9d67e5600b1c2f04667b591d1 (diff) | |
download | meta-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.bb | 24 |
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} += "\ | |||
29 | S = "${WORKDIR}/git" | 29 | S = "${WORKDIR}/git" |
30 | 30 | ||
31 | require jailhouse-arch.inc | 31 | require jailhouse-arch.inc |
32 | inherit module pythonnative bash-completion deploy | 32 | inherit module pythonnative bash-completion deploy setuptools |
33 | 33 | ||
34 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 34 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
35 | COMPATIBLE_MACHINE = "(ti-soc)" | 35 | COMPATIBLE_MACHINE = "(ti-soc)" |
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ | |||
78 | TOOLS_SRC_DIR = "${S}/tools" | 78 | TOOLS_SRC_DIR = "${S}/tools" |
79 | TOOLS_OBJ_DIR = "${S}/tools" | 79 | TOOLS_OBJ_DIR = "${S}/tools" |
80 | 80 | ||
81 | EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}" | ||
82 | |||
83 | |||
81 | do_compile() { | 84 | do_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 | ||
85 | do_install() { | 88 | do_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 | ||
118 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse" | 127 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools" |
119 | FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot" | 128 | FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot" |
129 | FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" | ||
130 | FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*" | ||
131 | |||
132 | RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression" | ||
133 | RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell" | ||
134 | |||
135 | RRECOMMENDS_${PN} = "${PN}-tools" | ||
120 | 136 | ||
121 | INSANE_SKIP_${PN} = "ldflags" | 137 | INSANE_SKIP_${PN} = "ldflags" |
122 | 138 | ||