summaryrefslogtreecommitdiffstats
path: root/meta-agl-jailhouse/README.md
blob: 99fe160739433d704b27ffbdf6120d79177a7aa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Jailhouse support layer

Yocto layer that enables use of the Jailhouse partitioning hypervisor - <https://github.com/siemens/jailhouse>.

## How to use

The AGL feature `agl-jailhouse` has to be enabled. That needs to be done when including aglsetup.sh, for example:

    source meta-agl/scripts/aglsetup.sh -m raspberrypi4 agl-demo agl-netboot agl-appfw-smack agl-jailhouse

That will enable this layer and include the `jailhouse` package in the image.

Then, in the target system, the cell configurations (*.cell) are placed in `/usr/share/jailhouse/cells/` and the demo inmates (bare-metal applications to run in a non-root cell) are located in `/usr/share/jailhouse/inmates`.

## Raspberry Pi 4 example

Use this commands to enable Jailhouse and run the GIC demo inmate in a non-root cell. After issuing these commands, the GIC demo will be measuring jitter of a timer and print the output on the serial console of the RPi.

    jailhouse enable /usr/share/jailhouse/cells/rpi4.cell
    jailhouse cell create /usr/share/jailhouse/cells/rpi4-inmate-demo.cell
    jailhouse cell load inmate-demo /usr/share/jailhouse/inmates/gic-demo.bin
    jailhouse cell start inmate-demo

## Dependencies

This layer depends on:

* URI: git://git.yoctoproject.org/meta-arm
  * branch: dunfell
  * revision: 0bd9c740267c0926e89bcfdb489790b7bf1fbd4b
  * note: actually only required on the Raspberry Pi 4 target

## Supported targets

* Raspberry Pi 4
    * All (1G-8G) memory variants. But note that there is 256M reserved for Jailhouse and 256MiB for GPU in AGL, so the smaller variants are not recommended.

* QEMU x86-64
    * Work in progress. Requires KVM. Nested virtualization must be enabled on the host. Currently, the right configuration of QEMU and Jailhouse to work out-of-box is being worked on.
" icu" if you are having problems # with the do_configure step and harfbuzz. DEPENDS = "zlib enchant libsoup-2.4 curl libxml2 cairo libxslt libidn gnutls \ gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native icu \ gperf-native perl-native ruby-native sqlite3 \ libwebp harfbuzz virtual/libgles2 wayland weston mesa" REQUIRED_DISTRO_FEATURES = "wayland" inherit cmake pkgconfig perlnative pythonnative # # We download a tarball from github instead of cloning the git repository because # requires less resources (network bandwidth and disk space) on the build machine. # # PV is the release or tag version (from https://github.com/WebKitForWayland/webkit/releases) PV = "wpe-20160519" S = "${WORKDIR}/webkit-${PV}/" SRC_URI = "\ https://github.com/WebKitForWayland/webkit/archive/${PV}.tar.gz \ " SRC_URI[md5sum] = "2b5f254c426ec74d62a72e136cf5e274" SRC_URI[sha256sum] = "f4f5076b2f7e17e86976bb14dffc750b446392b1e68946eea9dd0d733ec5f5f2" EXTRA_OECMAKE = " \ -DPORT=WPE \ -DCMAKE_BUILD_TYPE=Release \ " # Javascript JIT is not supported on powerpc EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF " EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF " # ARM JIT code does not build on ARMv5/6 anymore, apparently they test only on v7 onwards EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF " EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF " # binutils 2.25.1 has a bug on aarch64: # https://sourceware.org/bugzilla/show_bug.cgi?id=18430 EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF " # JIT not supported on MIPS either EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF " EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF " # We manually set the includes files for the binary and dev package here, # (overriding the default settings) because some libraries (libWPE and # libWPEWebInspectorResources) are not versioned, so we must include # the .so file in the binary package instead of the dev one. FILES_${PN}-dev = " \ ${includedir} \ ${libdir}/libWPE.so \ ${libdir}/libWPEWebKit.so \ ${libdir}/pkgconfig \ " FILES_${PN} = " \ ${bindir} \ ${libdir}/libWPE.so.* \ ${libdir}/libWPEWebInspectorResources.so \ ${libdir}/libWPEWebKit.so.* \ " RRECOMMENDS_${PN} += "ca-certificates"