From 03fcf8ef48b82be818485f8e5eb1ec9b6088e97f Mon Sep 17 00:00:00 2001 From: Anmol Anmol Date: Wed, 2 Mar 2022 09:56:43 +0000 Subject: meta-agl-jailhouse: Add kernel config. notes in Documentation Add some configuration notes to the `meta-agl-jailhouse.md` documentation for compiling the kernel separately with different configurations for backend and frontend VMs. Change-Id: I422912d658dde7de44273063926aaa3028cda302 Signed-off-by: Anmol (cherry picked from commit cb091babab501993b44e91876b7ca4179c249ee3) --- meta-agl-jailhouse/meta-agl-jailhouse.md | 36 +++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/meta-agl-jailhouse/meta-agl-jailhouse.md b/meta-agl-jailhouse/meta-agl-jailhouse.md index 1610bd29..042626e9 100644 --- a/meta-agl-jailhouse/meta-agl-jailhouse.md +++ b/meta-agl-jailhouse/meta-agl-jailhouse.md @@ -138,6 +138,17 @@ qemux86-64:~# jailhouse enable /usr/share/jailhouse/cells/qemu-agl.cell qemux86-64:~# modprobe uio_ivshmem ``` +--- +**Note** + +For the above steps to get working, compile the kernels separately with the following configurations(in the menuconfig): + +- One with `UIO_IVSHMEM`(for backend) and, +- another with `VIRTIO_IVSHMEM`(for frontend). + +For the frontend kernel you can also use the minimal Configurations present [here](https://github.com/siemens/jailhouse-images/blob/master/recipes-kernel/linux/files/amd64_defconfig_5.10). You can also build this kernel externally and copy the kernel-image later in the target image. + +--- After this check for the PCI device using `lspci -k`, you will see something like this below: @@ -182,6 +193,7 @@ qemux86-64:~# ./virtio-ivshmem-block /dev/uio0 disk.img Waiting for peer to be ready... ``` +> Note: If you can not find the device at `/dev/uio0` then look for other devices like `/dev/uio*`. After running the backend-service boot or reboot another cell, and backend will show something like this: @@ -213,17 +225,21 @@ device_features_sel: 0 In the Non-Root-Linux, the disk will show up as /dev/vda and can be accessed normally. +--- +**Note** + +- For the `virtio-ivshmem-block` you can find it in target system at `/usr/bin/`, if not then copy it from here `build/tmp/work-shared/qemux86-64/kernel-source/tools/virtio/virtio-ivshmem-block`. ->Note: ->- For the `virtio-ivshmem-block` you can find it in target system at `/usr/bin/`, if not then copy it from here `build/tmp/work-shared/qemux86-64/kernel-source/tools/virtio/virtio-ivshmem-block`. -> ->- For the `disk.img`, It needs to be a raw image. But its size matters as that defines the virtual disk size, but you may even leave it empty and only partition or format it from the front-end guest. -> -> e.g: -> -> $ dd if=/dev/zero of=disk.img bs=1M count=1024 -> -> $ mkfs.ext4 disk.img +- For the `disk.img`, It needs to be a raw image. But its size matters as that defines the virtual disk size, but you may even leave it empty and only partition or format it from the front-end guest. + +e.g: + +```sh +$ dd if=/dev/zero of=disk.img bs=1M count=1024 +$ mkfs.ext4 disk.img +``` +this can be accessed via `/dev/vda` in the frontend. +--- For manually configuring the setup, refer [`meta-agl-jailhouse.md`](meta-agl-jailhouse.md). -- cgit 1.2.3-korg