summaryrefslogtreecommitdiffstats
path: root/meta-agl-jailhouse/recipes-extended/jailhouse
AgeCommit message (Collapse)AuthorFilesLines
2022-07-08jailhouse: Delete patch ↵Zhou Mingying1-290/+0
0001-configs-arm64-Add-support-for-RPi4-with-more-than-1G.patch not used any longer The patch 0001-configs-arm64-Add-support-for-RPi4-with-more-than-1G.patch is no longer used in jailhouse because of the update in https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl-devel/+/26546. So delete this patch. Bug-AGL: SPEC-4434 Signed-off-by: Zhou Mingying <zhoumy@fujitsu.com> Change-Id: I086b5ba98c6ff2a01b39c7205fdba7323fb9931c
2022-03-24Update to SPDX license namesScott Murray3-3/+3
Apply updates from running the new convert-spdx-licenses script from upstream. This is not currently a hard requirement from upstream, but futureproofs for when the license name mapping is finally removed. Bug-AGL: SPEC-3819 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Iad7f9d353d3111287e2b39ee98cd872e2b7fec32
2021-11-02Update github.com git:// SRC_URIsmarlin_12.90.1marlin/12.90.112.90.1Scott Murray1-1/+1
GitHub is dropping unauthenticated git protocol access in January 2022, per: https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git While a workaround in the BitBake git fetcher is forthcoming, not specifying protocol=https for github.com git:// SRC_URIs will start resulting in warnings in Yocto 3.5/Kirkstone. To ease our upgrade path, go ahead and update our affected SRC_URIs. Note that this has been done by running the scripts/contrib/convert-srcuri.py script from latest poky, which also makes git branch specification explicit since the git fetcher is likely to require that in the future due to widespread switches from master to main branches. Bug-AGL: SPEC-4126 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ic3550f08b92916bede2f21442499836b882f2db8
2021-08-30[PATCH] meta-agl-jailhouse: Add support for virtio over IVSHMEM blockAnmol4-27/+376
This patch adds the support for the virtio over IVSHMEM block for AGL with Jailhouse. Current state of the Patchset: - Add PCI devices from (00:0c.0 - 00:0f.0), for various virtio devices(virtio-ivshmem-{block, console, NET, custom}), primarily for virtio-blk. - Add Common memory regions for virtio-blk in the Root-Cell and Non-Root-Linux-Cell configurations. - Add Documentation `meta-agl-jailhouse.md` for usage and Instructions. - Add `virtio-ivshmem-block` and `virtio-ivshmem-console` recipes for ott Kernel modules. v2 (Anmol): Update `agl-linux-x86-demo.c` and `qemu-agl.c` for PCI macros and small descriptions for IVSHMEM PCI devices. V3 (Anmol): - [RFC] Add packagegroup for the virtio-ivshmem-{block, console} applications. - Update the `meta-agl-jailhouse.md` for architecture specific information. v4 (Anmol): Update recipe files according to the new syntax(3.4-honister). v5 (Anmol): - Update recipe files for virtio-ivshmem binaries. - Update `50_local.conf.inc` for `packagegroup-agl-jailhouse`. v5 (Anmol): Update syntax for `50_local.conf.inc`. Signed-off-by: Anmol <anmol.karan123@gmail.com> Change-Id: I1bed4c6f1d3d9b0792a18544ad18edca85a5f4f7
2021-08-20Convert to new override syntaxScott Murray1-9/+9
This is mostly the result of running a slightly customized version of the convert-overrides.py script from poky with additional overrides added. A few minor fixups were done by hand afterwards during a review of the changes. The intent of these changes is to minimize the effort to keep the "next" branch that builds against poky master up to date and tested in preparation for the switch to the next Yocto LTS release in early 2022. Bug-AGL: SPEC-4052 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I0bbae97331abee1367b368ce54ab39e3162a12ec
2021-08-09meta-agl-jailhouse: Update the Jailhouse configuration filesAnmol8-91/+180
The current state and Information about the patch: - Updated Jailhouse root-cell(qemu-agl.c), apic-demo(agl-apic-demo.c), ivshmem-demo(agl-ivshmem-demo.c). - Jailhouse non-root cell(agl-linux-x86-demo.c) is also working, but need some more tweak for UART redirection. - Linux Kernel updated to the latest `queues/jailhouse` kernel branch. - Updated the `recipes-kernel` structure to a more custom one. - Updated conf/local.conf according to new `recipes-kernel` structure. - Removed the Linux Kernel patches from the `recipes-kernel` as updated kernel already contain those patches. This patch is the initial block for the virtio-blk support. v2 (Anmol): Add descriptive comments for serial in cell configuration files v3 (Anmol): Remove the ` IMAGE_INSTALL_append` and `EXTRA_IMAGE_FEATURES` from `50_local.conf.inc` v4 (Anmol): Minor changes in `50_local.conf.inc` v5 (jsmoeller): add meta-arm-toolchain to fix layer dependencies v6 (jsmoeller): remove linux-yocto_5.14%.bbappend v7 (Anmol): - Update the `SRCREV` for Jailhouse in `jailhous_git.bb` - Remove the patch `configs: arm64: Add support for RPi4 with more than 1G of memory` from `SRC_URI` in `jailhouse_git.bb` - Add the helper-scripts for the `runqemu-x86_64` and non-root linux cell. v8 (Anmol): Updated the `agl-ivshmem-demo.c`. v9 (Anmol): - Resolve build errors and update `jailhouse_git.bb`. - Add `PERF_forcevariable := "bash"` in `50_local.conf.inc`. v10 (Anmol): Disable perf build. v11 (jsmoeller): update qemu-agl.c to the 2G setup of runqemu after runtime test v12 (jsmoeller): add sample inmate tarball (to be used later) Change-Id: Idfa3e513488b5ecc8dfe9573f15c4b1c0edfd54f Signed-off-by: Anmol <anmol.karan123@gmail.com> Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
2020-08-31meta-agl-jailhouse: Added inmates for jailhouse on aglParth Dode5-1/+558
w.r.t. the root cell qemu-agl updated jailhouse_git.bb accordingly Bug-AGL: SPEC-3507 Change-Id: I0548d9bbec02d8506205b0dccb4ef591b290bca6 Change-Id: I6d065032ef7fff40535929219ce067aab260f043 Signed-off-by: Parth Dode <dodecoder@gmail.com>
2020-08-28meta-agl-jailhouse: Enable jailhouse on qemu-x86_64 through runqemuParth Dode2-0/+643
jailhouse enable /usr/share/jailhouse/cells/qemu-agl.cell added the appropriate QB variables required to use runqemu v2: updated QB_SERIAL_OPT v3: updated do_configure and do_install v4: updated memmap v5: resolved comments v6: 2G to 1G Bug-AGL: SPEC-3507 Change-Id: Iae8cf6a1f27bc285e4c0c5f2518cd1985ddf3b74 Signed-off-by: Parth Dode <dodecoder@gmail.com>
2020-08-18meta-agl-jailhouse: Add support for RPi4 with 2G/4G/8G of memoryjellyfish_9.99.3jellyfish/9.99.39.99.3Jakub Luzny2-1/+295
The Jailhouse configuration files had to be modified to append the additional memory regions present on the higher mem variants of the RPi4. To avoid the use of mem= kernel parameter to fix the memory that can be used by the root cell, a device tree overlay with reserved-memory nodes is used instead. To avoid conflict with the GPU memory, the memory region used for Jailhouse and the non-root cells was moved from 0x30000000 to 0x20000000. Bug-AGL: SPEC-3507 Signed-off-by: Jakub Luzny <jakub@luzny.cz> Change-Id: Iabd67504c3df0349dd62e45f12d1019de14328f1
2020-07-24Add layer to support Jailhouse hypervisorjellyfish_9.99.2jellyfish/9.99.29.99.2Jakub Luzny2-0/+99
Jailhouse is a partitioning hypervisor based on Linux. It is able to run bare-metal applications or (adapted) operating systems besides Linux. For this purpose, it configures CPU and device virtualization features of the hardware platform in a way that none of these domains, called "cells" here, can interfere with each other in an unacceptable way. This layer adds the Jailhouse package into AGL and also appends the BSPs to allow it to run. Currently, Raspberry Pi 4 and QEMU x86-64 targets are supported. To enable Jailhouse and include it in the image, the AGL feature agl-jailhouse must be enabled. Bug-AGL: SPEC-3507 Signed-off-by: Jakub Luzny <jakub@luzny.cz> Change-Id: I0fbc0b5d931c85d6f22b0222da8c2b106c4115e1
an>" /proc/filesystems || { log_error "Unknown filesystem"; return 1; } } [[ -d "$2" ]] || mkdir -p "$2" [[ -e /proc/mounts ]] && { grep -q -e "^$1 $2 $1" /proc/mounts && { log_info "$2 ($1) already mounted"; return 0; } } mount -t "$1" "$1" "$2" } bail_out() { log_error "$@" check_debug "Reboot will occur after exiting this shell." log_info "Rebooting..." exec reboot -f } check_debug() { case $DEBUG in Y|y|yes|1|true) log_info "$@" /bin/sh -i ;; esac } # ------------------------------------------- export PATH=/sbin:/usr/sbin:/bin:/usr/bin log_info "starting initrd script" do_mount_fs proc /proc do_mount_fs sysfs /sys do_mount_fs devtmpfs /dev do_mount_fs devpts /dev/pts do_mount_fs tmpfs /dev/shm do_mount_fs tmpfs /tmp do_mount_fs tmpfs /run # parse kernel commandline to get NBD server for x in $(cat /proc/cmdline); do case $x in nbd.server=*) NBD_SERVER=${x/*=/};; nbd.port=*) NBD_PORT=${x/*=/};; nbd.dev=*) NBD_DEV=/dev/${x/*=/};; nbd.debug=*) DEBUG=${x/*=/};; esac done check_debug "Debug point 1. Exit to continue initrd script (mount NBD device)." log_info "NBD parameters: device $NBD_DEV, server $NBD_SERVER:$NBD_PORT" # check if smack is active (and if so, mount smackfs) grep -q smackfs /proc/filesystems && { SMACK=y do_mount_fs smackfs /sys/fs/smackfs # adjust current label and network label echo System >/proc/self/attr/current echo System >/sys/fs/smackfs/ambient } # start nbd client try=5 while :;do log_info "Starting NBD client" nbd-client $NBD_SERVER $NBD_PORT $NBD_DEV && { log_info "NBD client successfully started"; break; } log_info "NBD client failed" [[ $try -gt 0 ]] && { log_info "Retrying ($try trie(s) left)..."; sleep 3; try=$(( try - 1 )); continue; } bail_out "Unable to mount NBD device $NBD_DEV using server $NBD_SERVER:$NBD_PORT" done # mount NBD device mkdir -p /sysroot mount $NBD_DEV -o noatime /sysroot || bail_out "Unable to mount root NBD device" # move mounted devices to new root cd /sysroot for x in dev proc sys tmp run; do log_info "Moving /$x to new rootfs" mount -o move /$x $x done # switch to new rootfs log_info "Switching to new rootfs" mkdir -p run/initramfs pivot_root . run/initramfs || bail_out "pivot_root failed." # workaround for connman (avoid bringing down the network interface used for booting, disable DNS proxy) if [[ -f /lib/systemd/system/connman.service ]]; then log_info "Adjusting Connman configuration" iface=$(ip -o link show up | tr ':' ' ' | awk '{print $2}' | grep -v -e "^lo$" | head -1) sed -i "s|connmand -n\$|connmand -r -n -I $iface|g" /lib/systemd/system/connman.service fi # also use /proc/net/pnp to generate /etc/resolv.conf grep -v bootserver /proc/net/pnp | sed 's/^domain/search/g' >/etc/resolv.conf # finally, run systemd check_debug "Debug point 2. Exit to continue initrd script (run systemd)." log_info "Exec'ing systemd" # banner generator: echo "AGL Booting . . ." | figlet -f slant -w 80 -c cat <<'EOF' >&2 ________________________________________________________________________________ ___ ________ ____ __ _ / | / ____/ / / __ )____ ____ / /_(_)___ ____ _ / /| |/ / __/ / / __ / __ \/ __ \/ __/ / __ \/ __ `/ / ___ / /_/ / /___ / /_/ / /_/ / /_/ / /_/ / / / / /_/ / _ _ _ /_/ |_\____/_____/ /_____/\____/\____/\__/_/_/ /_/\__, / (_) (_) (_) _____________________________________________________/____/_____________________ EOF exec /lib/systemd/systemd </dev/console >/dev/console 2>&1 bail_out