[meta-ti] [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Denys Dmytriyenko denys at ti.com
Fri Aug 30 09:03:24 PDT 2019


On Tue, Aug 20, 2019 at 02:11:11PM -0400, Jacob Stiffler wrote:
> Create a package containing the jailhouse tools which are used to work
> with the cells and inmates. This recipe provides a good example for

Should it be s/recipe/package/ here ^^^?


> using the jailhouse-cell-linux tool.
> 
> The tools require the pyjailhouse python modules, so package them as
> well.

Any specific reason to package into own "pyjailhouse" package instead of 
bundling with ${PN}-tools, as it's the only consumer now?


> Signed-off-by: Jacob Stiffler <j-stiffler at ti.com>
> ---
>  recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb
> index d637d51..5d572d0 100644
> --- a/recipes-kernel/jailhouse/jailhouse_git.bb
> +++ b/recipes-kernel/jailhouse/jailhouse_git.bb
> @@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
>  S = "${WORKDIR}/git"
>  
>  require jailhouse-arch.inc
> -inherit module pythonnative bash-completion deploy
> +inherit module pythonnative bash-completion deploy setuptools
>  
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  COMPATIBLE_MACHINE = "(ti-soc)"
> @@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
>  TOOLS_SRC_DIR = "${S}/tools"
>  TOOLS_OBJ_DIR = "${S}/tools"
>  
> +EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
> +
> +
>  do_compile() {
> -	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
> +	oe_runmake V=1
>  }
>  
>  do_install() {
> -	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
> +	# Install pyjailhouse python modules needed by the tools
> +	distutils_do_install
> +
> +	# We want to install the python tools, but we do not want to use pip...
> +	# At least with v0.10, we can work around this with
> +	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
> +	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
>  
>  	install -d ${D}${CELL_DIR}
>  	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
> @@ -115,8 +124,15 @@ do_install() {
>  	fi
>  }
>  
> -PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
> +PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
>  FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
> +FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
> +FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
> +
> +RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
> +RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
> +
> +RRECCOMMENDS_${PN} = "${PN}-tools"
>  
>  INSANE_SKIP_${PN} = "ldflags"
>  
> -- 
> 2.7.4
> 
> -- 
> _______________________________________________
> meta-ti mailing list
> meta-ti at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti


More information about the meta-ti mailing list