diff options
3 files changed, 199 insertions, 0 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 0985a6cfb..4be14fb1e 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
| @@ -255,6 +255,11 @@ MACHINE_EXTRA_RRECOMMENDS_append = " ${@bb.utils.contains('MACHINE_FEATURES', 'q | |||
| 255 | # Extra udev rules | 255 | # Extra udev rules |
| 256 | MACHINE_EXTRA_RRECOMMENDS += "udev-rules-imx" | 256 | MACHINE_EXTRA_RRECOMMENDS += "udev-rules-imx" |
| 257 | 257 | ||
| 258 | # Jailhouse | ||
| 259 | MACHINE_EXTRA_RRECOMMENDS += " \ | ||
| 260 | ${@bb.utils.contains('COMBINED_FEATURES', 'jailhouse', 'jailhouse', '', d)} \ | ||
| 261 | " | ||
| 262 | |||
| 258 | # GStreamer 1.0 plugins | 263 | # GStreamer 1.0 plugins |
| 259 | MACHINE_GSTREAMER_1_0_PLUGIN ?= "" | 264 | MACHINE_GSTREAMER_1_0_PLUGIN ?= "" |
| 260 | MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta" | 265 | MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta" |
| @@ -376,6 +381,9 @@ KERNEL_IMAGETYPE_aarch64 = "Image" | |||
| 376 | 381 | ||
| 377 | MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" | 382 | MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen" |
| 378 | 383 | ||
| 384 | SOC_MACHINE_FEATURES_BACKFILL_mx8m = "jailhouse" | ||
| 385 | MACHINE_FEATURES_BACKFILL_append = " ${SOC_MACHINE_FEATURES_BACKFILL}" | ||
| 386 | |||
| 379 | # Add the ability to specify _imx machines | 387 | # Add the ability to specify _imx machines |
| 380 | MACHINEOVERRIDES =. "imx:" | 388 | MACHINEOVERRIDES =. "imx:" |
| 381 | 389 | ||
diff --git a/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch b/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch new file mode 100644 index 000000000..df2f37ada --- /dev/null +++ b/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | From f07cd0e5f32a00a4091fa964d0dae0cd46c17554 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Cristinel Panfir <cristinel.panfir@nxp.com> | ||
| 3 | Date: Sat, 23 May 2020 08:51:31 +0000 | ||
| 4 | Subject: [PATCH] tools/scripts: update shebang to python3 | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com> | ||
| 9 | --- | ||
| 10 | scripts/arm64-parsedump.py | 2 +- | ||
| 11 | tools/jailhouse-cell-linux | 2 +- | ||
| 12 | tools/jailhouse-cell-stats | 2 +- | ||
| 13 | tools/jailhouse-config-create | 2 +- | ||
| 14 | tools/jailhouse-hardware-check | 2 +- | ||
| 15 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/scripts/arm64-parsedump.py b/scripts/arm64-parsedump.py | ||
| 18 | index 9519eb5..c695706 100755 | ||
| 19 | --- a/scripts/arm64-parsedump.py | ||
| 20 | +++ b/scripts/arm64-parsedump.py | ||
| 21 | @@ -1,4 +1,4 @@ | ||
| 22 | -#!/usr/bin/env python | ||
| 23 | +#!/usr/bin/env python3 | ||
| 24 | |||
| 25 | # Jailhouse, a Linux-based partitioning hypervisor | ||
| 26 | # | ||
| 27 | diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux | ||
| 28 | index 215932a..bcbb902 100755 | ||
| 29 | --- a/tools/jailhouse-cell-linux | ||
| 30 | +++ b/tools/jailhouse-cell-linux | ||
| 31 | @@ -1,4 +1,4 @@ | ||
| 32 | -#!/usr/bin/env python | ||
| 33 | +#!/usr/bin/env python3 | ||
| 34 | |||
| 35 | # Jailhouse, a Linux-based partitioning hypervisor | ||
| 36 | # | ||
| 37 | diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats | ||
| 38 | index 2f7e966..4c5289f 100755 | ||
| 39 | --- a/tools/jailhouse-cell-stats | ||
| 40 | +++ b/tools/jailhouse-cell-stats | ||
| 41 | @@ -1,4 +1,4 @@ | ||
| 42 | -#!/usr/bin/env python | ||
| 43 | +#!/usr/bin/env python3 | ||
| 44 | |||
| 45 | # Jailhouse, a Linux-based partitioning hypervisor | ||
| 46 | # | ||
| 47 | diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create | ||
| 48 | index 55601a6..9869b94 100755 | ||
| 49 | --- a/tools/jailhouse-config-create | ||
| 50 | +++ b/tools/jailhouse-config-create | ||
| 51 | @@ -1,4 +1,4 @@ | ||
| 52 | -#!/usr/bin/env python | ||
| 53 | +#!/usr/bin/env python3 | ||
| 54 | # | ||
| 55 | # Jailhouse, a Linux-based partitioning hypervisor | ||
| 56 | # | ||
| 57 | diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check | ||
| 58 | index b86756a..0c8fb42 100755 | ||
| 59 | --- a/tools/jailhouse-hardware-check | ||
| 60 | +++ b/tools/jailhouse-hardware-check | ||
| 61 | @@ -1,4 +1,4 @@ | ||
| 62 | -#!/usr/bin/env python | ||
| 63 | +#!/usr/bin/env python3 | ||
| 64 | |||
| 65 | # Jailhouse, a Linux-based partitioning hypervisor | ||
| 66 | # | ||
| 67 | -- | ||
| 68 | 2.7.4 | ||
| 69 | |||
diff --git a/recipes-extended/jailhouse/jailhouse_0.11.bb b/recipes-extended/jailhouse/jailhouse_0.11.bb new file mode 100644 index 000000000..32a4f92f4 --- /dev/null +++ b/recipes-extended/jailhouse/jailhouse_0.11.bb | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | SUMMARY = "Jailhouse, i.MX fork" | ||
| 2 | HOMEPAGE = "https://github.com/siemens/jailhouse" | ||
| 3 | SECTION = "jailhouse" | ||
| 4 | LICENSE = "GPL-2.0" | ||
| 5 | |||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ | ||
| 7 | file://tools/root-cell-config.c.tmpl;beginline=6;endline=33;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 8 | file://include/jailhouse/hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 9 | file://include/jailhouse/cell-config.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 10 | file://include/arch/arm/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 11 | file://include/arch/arm64/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 12 | file://include/arch/x86/asm/jailhouse_hypercall.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 13 | file://driver/jailhouse.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRCBRANCH = "lf-5.4.y" | ||
| 17 | SRCREV = "82d5698945eafaffa58bab3b4d6da320bf56289c" | ||
| 18 | |||
| 19 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \ | ||
| 20 | file://0001-tools-scripts-update-shebang-to-python3.patch \ | ||
| 21 | " | ||
| 22 | |||
| 23 | DEPENDS = " \ | ||
| 24 | make-native \ | ||
| 25 | python3-mako-native \ | ||
| 26 | python3-mako \ | ||
| 27 | dtc-native \ | ||
| 28 | " | ||
| 29 | |||
| 30 | inherit module python3native bash-completion deploy setuptools3 | ||
| 31 | |||
| 32 | S = "${WORKDIR}/git" | ||
| 33 | B = "${S}" | ||
| 34 | |||
| 35 | JH_ARCH = "arm64" | ||
| 36 | JH_DATADIR ?= "${datadir}/jailhouse" | ||
| 37 | CELL_DIR ?= "${JH_DATADIR}/cells" | ||
| 38 | CELLCONF_DIR ?= "${JH_DATADIR}/configs" | ||
| 39 | INMATES_DIR ?= "${JH_DATADIR}/inmates" | ||
| 40 | |||
| 41 | JH_CONFIG ?= "${S}/ci/jailhouse-config-x86.h" | ||
| 42 | JH_CONFIG_x86 ?= "${S}/ci/jailhouse-config-x86.h" | ||
| 43 | JH_CONFIG_x86-64 ?= "${S}/ci/jailhouse-config-x86.h" | ||
| 44 | JH_CONFIG_arm ?= "${S}/ci/jailhouse-config-banana-pi.h" | ||
| 45 | |||
| 46 | do_configure() { | ||
| 47 | if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; | ||
| 48 | then | ||
| 49 | cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/${ARCH}/ | ||
| 50 | fi | ||
| 51 | } | ||
| 52 | |||
| 53 | USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ | ||
| 54 | -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \ | ||
| 55 | -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \ | ||
| 56 | -I../driver' | ||
| 57 | |||
| 58 | TOOLS_SRC_DIR = "${S}/tools" | ||
| 59 | TOOLS_OBJ_DIR = "${S}/tools" | ||
| 60 | |||
| 61 | do_compile() { | ||
| 62 | unset LDFLAGS | ||
| 63 | oe_runmake V=1 CC="${CC}" \ | ||
| 64 | ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} \ | ||
| 65 | KDIR=${STAGING_KERNEL_BUILDDIR} | ||
| 66 | |||
| 67 | cd ${TOOLS_SRC_DIR} | ||
| 68 | export JAILHOUSE_VERSION=$(cat ../VERSION) | ||
| 69 | oe_runmake V=1 \ | ||
| 70 | CFLAGS="${USER_SPACE_CFLAGS}" \ | ||
| 71 | src=${TOOLS_SRC_DIR} obj=${TOOLS_OBJ_DIR} \ | ||
| 72 | ${TOOLS_OBJ_DIR}/jailhouse-config-collect ${TOOLS_OBJ_DIR}/jailhouse | ||
| 73 | } | ||
| 74 | |||
| 75 | do_install() { | ||
| 76 | oe_runmake \ | ||
| 77 | PYTHON=python3 \ | ||
| 78 | V=1 \ | ||
| 79 | LDFLAGS="" \ | ||
| 80 | CC="${CC}" \ | ||
| 81 | ARCH=${JH_ARCH} \ | ||
| 82 | CROSS_COMPILE=${TARGET_PREFIX} \ | ||
| 83 | KDIR=${STAGING_KERNEL_BUILDDIR} \ | ||
| 84 | DESTDIR=${D} install | ||
| 85 | |||
| 86 | install -d ${D}${CELL_DIR} | ||
| 87 | install ${B}/configs/${JH_ARCH}/*.cell ${D}${CELL_DIR}/ | ||
| 88 | |||
| 89 | install -d ${D}${INMATES_DIR}/tools/${JH_ARCH} | ||
| 90 | install ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR} | ||
| 91 | |||
| 92 | install -d ${D}${JH_DATADIR}/tools | ||
| 93 | install ${B}/tools/jailhouse-cell-linux ${D}${JH_DATADIR}/tools | ||
| 94 | install ${B}/tools/jailhouse-cell-stats ${D}${JH_DATADIR}/tools | ||
| 95 | install ${B}/tools/jailhouse-config-collect ${D}${JH_DATADIR}/tools | ||
| 96 | install ${B}/tools/jailhouse-config-create ${D}${JH_DATADIR}/tools | ||
| 97 | install ${B}/tools/jailhouse-gcov-extract ${D}${JH_DATADIR}/tools | ||
| 98 | install ${B}/tools/jailhouse-hardware-check ${D}${JH_DATADIR}/tools | ||
| 99 | install ${B}/inmates/tools/${JH_ARCH}/linux-loader.bin ${D}${INMATES_DIR}/tools/${JH_ARCH} | ||
| 100 | } | ||
| 101 | |||
| 102 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse" | ||
| 103 | |||
| 104 | FILES_${PN} += "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" | ||
| 105 | FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" | ||
| 106 | |||
| 107 | RDEPENDS_${PN} += " \ | ||
| 108 | python3-curses \ | ||
| 109 | python3-datetime \ | ||
| 110 | python3-mmap \ | ||
| 111 | " | ||
| 112 | |||
| 113 | RDEPENDS_pyjailhouse = " \ | ||
| 114 | python3-core \ | ||
| 115 | python3-ctypes \ | ||
| 116 | python3-fcntl \ | ||
| 117 | python3-shell \ | ||
| 118 | " | ||
| 119 | |||
| 120 | INSANE_SKIP_${PN} = "ldflags" | ||
| 121 | |||
| 122 | COMPATIBLE_MACHINE = "(mx8m)" | ||
