diff options
3 files changed, 0 insertions, 246 deletions
diff --git a/recipes-kernel/jailhouse/jailhouse-arch.inc b/recipes-kernel/jailhouse/jailhouse-arch.inc deleted file mode 100644 index 498b25ed..00000000 --- a/recipes-kernel/jailhouse/jailhouse-arch.inc +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | # Set jailhouse architecture JH_ARCH variable | ||
2 | # | ||
3 | # return value must match one of architectures supported by jailhouse | ||
4 | # | ||
5 | valid_jh_archs = "x86 arm" | ||
6 | |||
7 | def map_jh_arch(a, d): | ||
8 | import re | ||
9 | |||
10 | valid_jh_archs = d.getVar('valid_jh_archs', True).split() | ||
11 | |||
12 | if re.match('(i.86|athlon|x86.64)$', a): return 'x86' | ||
13 | elif re.match('armeb$', a): return 'arm' | ||
14 | elif re.match('aarch64$', a): return 'arm64' | ||
15 | elif re.match('aarch64_be$', a): return 'arm64' | ||
16 | elif a in valid_jh_archs: return a | ||
17 | else: | ||
18 | bb.error("cannot map '%s' to a jailhouse supported architecture" % a) | ||
19 | |||
20 | export JH_ARCH = "${@map_jh_arch(d.getVar('TARGET_ARCH', True), d)}" | ||
21 | |||
22 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | ||
diff --git a/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch b/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch deleted file mode 100644 index f4922363..00000000 --- a/recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 24e58c75592a2ba09f3062c8a4722c0e29a9b558 Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Wed, 1 Apr 2020 15:44:46 -0400 | ||
4 | Subject: [PATCH] tools: update shebang in helper scripts for python3 | ||
5 | |||
6 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
7 | --- | ||
8 | tools/jailhouse-cell-linux | 2 +- | ||
9 | tools/jailhouse-cell-stats | 2 +- | ||
10 | tools/jailhouse-config-create | 2 +- | ||
11 | tools/jailhouse-hardware-check | 2 +- | ||
12 | 4 files changed, 4 insertions(+), 4 deletions(-) | ||
13 | |||
14 | diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux | ||
15 | index 007a5c4..e106b9d 100755 | ||
16 | --- a/tools/jailhouse-cell-linux | ||
17 | +++ b/tools/jailhouse-cell-linux | ||
18 | @@ -1,4 +1,4 @@ | ||
19 | -#!/usr/bin/env python | ||
20 | +#!/usr/bin/env python3 | ||
21 | |||
22 | # Jailhouse, a Linux-based partitioning hypervisor | ||
23 | # | ||
24 | diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats | ||
25 | index 2f7e966..4c5289f 100755 | ||
26 | --- a/tools/jailhouse-cell-stats | ||
27 | +++ b/tools/jailhouse-cell-stats | ||
28 | @@ -1,4 +1,4 @@ | ||
29 | -#!/usr/bin/env python | ||
30 | +#!/usr/bin/env python3 | ||
31 | |||
32 | # Jailhouse, a Linux-based partitioning hypervisor | ||
33 | # | ||
34 | diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create | ||
35 | index 1e2df74..9382b05 100755 | ||
36 | --- a/tools/jailhouse-config-create | ||
37 | +++ b/tools/jailhouse-config-create | ||
38 | @@ -1,4 +1,4 @@ | ||
39 | -#!/usr/bin/env python | ||
40 | +#!/usr/bin/env python3 | ||
41 | # | ||
42 | # Jailhouse, a Linux-based partitioning hypervisor | ||
43 | # | ||
44 | diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check | ||
45 | index 375816e..658ce6f 100755 | ||
46 | --- a/tools/jailhouse-hardware-check | ||
47 | +++ b/tools/jailhouse-hardware-check | ||
48 | @@ -1,4 +1,4 @@ | ||
49 | -#!/usr/bin/env python | ||
50 | +#!/usr/bin/env python3 | ||
51 | |||
52 | # Jailhouse, a Linux-based partitioning hypervisor | ||
53 | # | ||
54 | -- | ||
55 | 2.7.4 | ||
56 | |||
diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb deleted file mode 100644 index 1011f286..00000000 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | SUMMARY = "Linux-based partitioning hypervisor" | ||
2 | DESCRIPTION = "Jailhouse is a partitioning Hypervisor based on Linux. It is able to run bare-metal applications or (adapted) \ | ||
3 | operating systems besides Linux. For this purpose, it configures CPU and device virtualization features of the hardware \ | ||
4 | platform in a way that none of these domains, called 'cells' here, can interfere with each other in an unacceptable way." | ||
5 | HOMEPAGE = "https://github.com/siemens/jailhouse" | ||
6 | SECTION = "jailhouse" | ||
7 | LICENSE = "GPL-2.0 & BSD-2-Clause" | ||
8 | |||
9 | LIC_FILES_CHKSUM = " \ | ||
10 | file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ | ||
11 | " | ||
12 | |||
13 | PV = "0.12+git${SRCPV}" | ||
14 | SRCREV = "0d059b6f2c3efeaa2466517300540498b34b7655" | ||
15 | BRANCH = "ti-jailhouse-0.12" | ||
16 | |||
17 | SRC_URI = " \ | ||
18 | git://git.ti.com/jailhouse/ti-jailhouse.git;protocol=git;branch=${BRANCH} \ | ||
19 | file://0001-tools-update-shebang-in-helper-scripts-for-python3.patch \ | ||
20 | " | ||
21 | |||
22 | DEPENDS = "virtual/kernel dtc-native python3-mako-native python3-mako make-native" | ||
23 | RDEPENDS_${PN} += "\ | ||
24 | python3-curses\ | ||
25 | python3-datetime\ | ||
26 | python3-mmap\ | ||
27 | " | ||
28 | |||
29 | require jailhouse-arch.inc | ||
30 | inherit module python3native bash-completion deploy setuptools3 | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | B = "${S}" | ||
34 | |||
35 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
36 | COMPATIBLE_MACHINE = "(ti-soc)" | ||
37 | |||
38 | JH_DATADIR ?= "${datadir}/jailhouse" | ||
39 | JH_EXEC_DIR ?= "${libexecdir}/jailhouse" | ||
40 | CELL_DIR ?= "${JH_DATADIR}/cells" | ||
41 | CELLCONF_DIR ?= "${JH_DATADIR}/configs" | ||
42 | INMATES_DIR ?= "${JH_DATADIR}/inmates" | ||
43 | |||
44 | JH_CELL_FILES ?= "*.cell" | ||
45 | JH_CELL_FILES_k3 ?= "k3-*.cell" | ||
46 | |||
47 | JH_INMATE_DTB ?= "" | ||
48 | JH_INMATE_DTB_am65xx ?= "inmate-k3-am654-idk.dtb" | ||
49 | JH_INMATE_DTB_j7 ?= "inmate-k3-j721e-evm.dtb" | ||
50 | JH_INMATE_DTB_j7200-evm ?= "inmate-k3-j7200-evm.dtb" | ||
51 | |||
52 | JH_LINUX_DEMO_CELL ?= "" | ||
53 | JH_LINUX_DEMO_CELL_am65xx ?= "k3-am654-idk-linux-demo.cell" | ||
54 | JH_LINUX_DEMO_CELL_j7 ?= "k3-j721e-evm-linux-demo.cell" | ||
55 | JH_LINUX_DEMO_CELL_j7200-evm ?= "k3-j7200-evm-linux-demo.cell" | ||
56 | |||
57 | JH_SYSCONFIG_CELL ?= "" | ||
58 | JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell" | ||
59 | JH_SYSCONFIG_CELL_j7 ?= "k3-j721e-evm.cell" | ||
60 | JH_SYSCONFIG_CELL_j7200-evm ?= "k3-j7200-evm.cell" | ||
61 | |||
62 | INITRAMFS_IMAGE ?= "" | ||
63 | JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}" | ||
64 | |||
65 | JH_CMDLINE ?= "" | ||
66 | JH_CMDLINE_am65xx ?= "console=ttyS1,115200n8" | ||
67 | JH_CMDLINE_j7 ?= "console=ttyS3,115200n8" | ||
68 | JH_CMDLINE_j7200-evm ?= "console=ttyS3,115200n8" | ||
69 | |||
70 | do_configure() { | ||
71 | if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; | ||
72 | then | ||
73 | cp ${STAGING_DIR_HOST}/${CELLCONF_DIR}/*.c ${S}/configs/ | ||
74 | fi | ||
75 | } | ||
76 | |||
77 | USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ | ||
78 | -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \ | ||
79 | -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \ | ||
80 | -I../driver' | ||
81 | |||
82 | TOOLS_SRC_DIR = "${S}/tools" | ||
83 | |||
84 | EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}" | ||
85 | |||
86 | do_compile() { | ||
87 | oe_runmake V=1 | ||
88 | } | ||
89 | |||
90 | do_install() { | ||
91 | # Install pyjailhouse python modules needed by the tools | ||
92 | distutils3_do_install | ||
93 | |||
94 | # We want to install the python tools, but we do not want to use pip... | ||
95 | # At least with v0.10, we can work around this with | ||
96 | # 'PIP=":" PYTHON_PIP_USEABLE=yes' | ||
97 | oe_runmake PIP=: PYTHON=python3 PYTHON_PIP_USEABLE=yes DESTDIR=${D} install | ||
98 | |||
99 | install -d ${D}${CELL_DIR} | ||
100 | install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/ | ||
101 | |||
102 | install -d ${D}${INMATES_DIR} | ||
103 | install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR} | ||
104 | |||
105 | install -d ${D}/boot | ||
106 | if [ -n "${JH_RAMFS_IMAGE}" ] | ||
107 | then | ||
108 | if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ] | ||
109 | then | ||
110 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot | ||
111 | else | ||
112 | bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!" | ||
113 | bberror "Please make sure that \"cpio\" is in IMAGE_FSTYPES." | ||
114 | fi | ||
115 | fi | ||
116 | |||
117 | if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then | ||
118 | cd ${TOOLS_SRC_DIR} | ||
119 | |||
120 | echo "#! /bin/sh" > ${D}${JH_DATADIR}/linux-demo.sh | ||
121 | echo "jailhouse enable ${CELL_DIR}/${JH_SYSCONFIG_CELL}" >> ${D}${JH_DATADIR}/linux-demo.sh | ||
122 | ./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \ | ||
123 | -a ${JH_ARCH} -c "${JH_CMDLINE}" \ | ||
124 | -d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \ | ||
125 | -i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \ | ||
126 | ${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \ | ||
127 | ${DEPLOY_DIR_IMAGE}/Image \ | ||
128 | | tr -cd '\11\12\15\40-\176' \ | ||
129 | >> ${D}${JH_DATADIR}/linux-demo.sh | ||
130 | |||
131 | sed -i -e 's,^Modified device tree written.*,,g' ${D}${JH_DATADIR}/linux-demo.sh | ||
132 | sed -i -e 's,\${D},,g' ${D}${JH_DATADIR}/linux-demo.sh | ||
133 | sed -i -e 's, linux-loader.bin, ${JH_EXEC_DIR}/linux-loader.bin,g' ${D}${JH_DATADIR}/linux-demo.sh | ||
134 | sed -i -e 's,\${DEPLOY_DIR_IMAGE},/boot,g' ${D}${JH_DATADIR}/linux-demo.sh | ||
135 | sed -i -e '/^\s*$/d' ${D}${JH_DATADIR}/linux-demo.sh | ||
136 | chmod +x ${D}${JH_DATADIR}/linux-demo.sh | ||
137 | fi | ||
138 | } | ||
139 | |||
140 | PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools" | ||
141 | FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot" | ||
142 | FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" | ||
143 | FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*" | ||
144 | |||
145 | RDEPENDS_${PN}-tools = "pyjailhouse python3-mmap python3-math python3-datetime python3-curses python3-compression" | ||
146 | RDEPENDS_pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell" | ||
147 | |||
148 | RRECOMMENDS_${PN} = "${PN}-tools" | ||
149 | |||
150 | INSANE_SKIP_${PN} = "ldflags" | ||
151 | |||
152 | KERNEL_MODULE_AUTOLOAD += "jailhouse" | ||
153 | |||
154 | # Any extra cells/inmates from external recipes/packages | ||
155 | CELLS = "" | ||
156 | |||
157 | python __anonymous () { | ||
158 | d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy') | ||
159 | ramfs = d.getVar('JH_RAMFS_IMAGE', True) | ||
160 | if ramfs: | ||
161 | d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete') | ||
162 | |||
163 | # Setup DEPENDS and RDEPENDS to included cells | ||
164 | cells = d.getVar('CELLS', True) or "" | ||
165 | for cell in cells.split(): | ||
166 | d.appendVar('DEPENDS', ' ' + cell) | ||
167 | d.appendVar('RDEPENDS_${PN}', ' ' + cell) | ||
168 | } | ||