summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorNikhil Devshatwar <nikhil.nd@ti.com>2021-06-15 16:42:44 +0530
committerYogesh Siraswar <yogeshs@ti.com>2021-06-26 11:53:49 +0000
commitd8e96545f10bd2057b665a1e0c363f60f0a8cda5 (patch)
tree7b64e9acb6fceff5ecaa972228a156827b839ed8 /recipes-kernel
parent7876863adbd123ac939c6ca546a61aeb8606e51a (diff)
downloadmeta-ti-d8e96545f10bd2057b665a1e0c363f60f0a8cda5.tar.gz
recipes-kernel: jailhouse: Remove jailhouse recipe
Jailhouse support is dropped for K3 platforms, remove the recipe and corresponding patches. Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com> Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/jailhouse/jailhouse-arch.inc22
-rw-r--r--recipes-kernel/jailhouse/jailhouse/0001-tools-update-shebang-in-helper-scripts-for-python3.patch56
-rw-r--r--recipes-kernel/jailhouse/jailhouse_git.bb168
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#
5valid_jh_archs = "x86 arm"
6
7def 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
20export JH_ARCH = "${@map_jh_arch(d.getVar('TARGET_ARCH', True), d)}"
21
22COMPATIBLE_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 @@
1From 24e58c75592a2ba09f3062c8a4722c0e29a9b558 Mon Sep 17 00:00:00 2001
2From: Denys Dmytriyenko <denys@ti.com>
3Date: Wed, 1 Apr 2020 15:44:46 -0400
4Subject: [PATCH] tools: update shebang in helper scripts for python3
5
6Signed-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
14diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux
15index 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 #
24diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats
25index 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 #
34diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create
35index 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 #
44diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check
45index 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--
552.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 @@
1SUMMARY = "Linux-based partitioning hypervisor"
2DESCRIPTION = "Jailhouse is a partitioning Hypervisor based on Linux. It is able to run bare-metal applications or (adapted) \
3operating systems besides Linux. For this purpose, it configures CPU and device virtualization features of the hardware \
4platform in a way that none of these domains, called 'cells' here, can interfere with each other in an unacceptable way."
5HOMEPAGE = "https://github.com/siemens/jailhouse"
6SECTION = "jailhouse"
7LICENSE = "GPL-2.0 & BSD-2-Clause"
8
9LIC_FILES_CHKSUM = " \
10 file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \
11"
12
13PV = "0.12+git${SRCPV}"
14SRCREV = "0d059b6f2c3efeaa2466517300540498b34b7655"
15BRANCH = "ti-jailhouse-0.12"
16
17SRC_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
22DEPENDS = "virtual/kernel dtc-native python3-mako-native python3-mako make-native"
23RDEPENDS_${PN} += "\
24 python3-curses\
25 python3-datetime\
26 python3-mmap\
27"
28
29require jailhouse-arch.inc
30inherit module python3native bash-completion deploy setuptools3
31
32S = "${WORKDIR}/git"
33B = "${S}"
34
35PACKAGE_ARCH = "${MACHINE_ARCH}"
36COMPATIBLE_MACHINE = "(ti-soc)"
37
38JH_DATADIR ?= "${datadir}/jailhouse"
39JH_EXEC_DIR ?= "${libexecdir}/jailhouse"
40CELL_DIR ?= "${JH_DATADIR}/cells"
41CELLCONF_DIR ?= "${JH_DATADIR}/configs"
42INMATES_DIR ?= "${JH_DATADIR}/inmates"
43
44JH_CELL_FILES ?= "*.cell"
45JH_CELL_FILES_k3 ?= "k3-*.cell"
46
47JH_INMATE_DTB ?= ""
48JH_INMATE_DTB_am65xx ?= "inmate-k3-am654-idk.dtb"
49JH_INMATE_DTB_j7 ?= "inmate-k3-j721e-evm.dtb"
50JH_INMATE_DTB_j7200-evm ?= "inmate-k3-j7200-evm.dtb"
51
52JH_LINUX_DEMO_CELL ?= ""
53JH_LINUX_DEMO_CELL_am65xx ?= "k3-am654-idk-linux-demo.cell"
54JH_LINUX_DEMO_CELL_j7 ?= "k3-j721e-evm-linux-demo.cell"
55JH_LINUX_DEMO_CELL_j7200-evm ?= "k3-j7200-evm-linux-demo.cell"
56
57JH_SYSCONFIG_CELL ?= ""
58JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
59JH_SYSCONFIG_CELL_j7 ?= "k3-j721e-evm.cell"
60JH_SYSCONFIG_CELL_j7200-evm ?= "k3-j7200-evm.cell"
61
62INITRAMFS_IMAGE ?= ""
63JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}"
64
65JH_CMDLINE ?= ""
66JH_CMDLINE_am65xx ?= "console=ttyS1,115200n8"
67JH_CMDLINE_j7 ?= "console=ttyS3,115200n8"
68JH_CMDLINE_j7200-evm ?= "console=ttyS3,115200n8"
69
70do_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
77USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
78 -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \
79 -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
80 -I../driver'
81
82TOOLS_SRC_DIR = "${S}/tools"
83
84EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC="${CC}" KDIR=${STAGING_KERNEL_BUILDDIR}"
85
86do_compile() {
87 oe_runmake V=1
88}
89
90do_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
140PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
141FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
142FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
143FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
144
145RDEPENDS_${PN}-tools = "pyjailhouse python3-mmap python3-math python3-datetime python3-curses python3-compression"
146RDEPENDS_pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell"
147
148RRECOMMENDS_${PN} = "${PN}-tools"
149
150INSANE_SKIP_${PN} = "ldflags"
151
152KERNEL_MODULE_AUTOLOAD += "jailhouse"
153
154# Any extra cells/inmates from external recipes/packages
155CELLS = ""
156
157python __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}