Giter VIP home page Giter VIP logo

camkes-vm-examples's Introduction

camkes-vm-apps

This project is for running virtualised Linux guests on seL4 for ARM and x86 platforms. The camkes-vm implements a virtual machine monitor (VMM) server, facilitating the initialisation, booting and run-time management of a guest OS. You can view the code for the VMMs in the camkes-vm repository under VM_Arm and VM.

Currently the supported platforms include:

  • Exynos5 (exynos5410, exynos5422)
  • TK1
  • TX1
  • TX2
  • QEMU ARM virt machine
  • ZCU102
  • x86
  • x86_64

Getting and Building

Cloning the repository set and preparing a build directory

repo init -u https://github.com/seL4/camkes-vm-examples-manifest.git
repo sync
mkdir build
cd build

Arm and x86 have slightly differing build instructions. See the sections below.

Building for Arm

The following example builds the CAmkES Arm VMM for the TK1. In the build directory, run:

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=tk1
ninja

Note: To buid for another platform you can substitute the value of the -DPLATFORM variable e.g. (exynos5422, tx1, tx2, zcu102, qemu-arm-virt)

An EFI application file will be left in images/capdl-loader-image-arm-tk1 We normally boot using TFTP, by first copying capdl-loader-image-arm-tk1 to a tftpserver then on the U-Boot serial console doing:

dhcp
tftpboot ${loadaddr} /capdl-loader-image-arm-tk1
bootefi ${loadaddr}

Building for x86

The following example builds the CAmkES VMM for x64. In the build directory, run:

../init-build.sh -DCAMKES_VM_APP=minimal_64
ninja

Boot images/kernel-x86_64-pc99 and images/capdl-loader-image-x86_64-pc99 with the multiboot boot loader of your choice. Use *.ia32-pc99 if built for 32-bit with ../init-build.sh -DCAMKES_VM_APP=minimal.

CAmkES ARM VMM Applications

This project contains various reference CAmkES applications that incorporate the VMM component. These applications include:

  • vm_minimal: A simple VMM application, launching a single guest Linux with a buildroot RAM-based file system
  • vm_cross_connector: Application demonstrating communication between a Linux guest user-level process and a native seL4 component. This leveraging cross vm communication channels established between the VMM and the seL4 component.
  • vm_multi: Application demonstrating running multiple guest VM's. This is achieved through having multiple VMM components, each managing a single Linux guest (1-1 model).
  • vm_serial_server: Application demonstrating the use of Virtio Console, where a VM's serial I/O is forwarded to/from a serial server.
  • vm_virtio_net: Application demonstrating the use of Virtio Net, where a virtual network interface is presented to a VM and subsequent network traffic on the virtual network interface is sent to/from other native seL4 components.

See the apps/Arm/ subdirectory for all the supported virtual machine manager apps, their implementations and the platforms they target.

CAmkES x86 VMM Applications

  • The minimal application is a simple CAmkES VM application. The application is configured with:

    • 1 Guest Linux VM: The Linux guest is a buildroot built image sourced from the the camkes-vm repo. The Linux images (rootfs and kernel) are defined in the CMakeLists.txt file of the minimal application. In the CMakeLists.txt file we are able to find that the rootfs and kernel images are added to the FileServer under the names "rootfs.cpio" and "bzimage" respectively.
  • The optiplex9020 VM application is configured with:

    • 2 Guest Linux VM's: The Linux guests are buildroot built images sourced from the the camkes-vm repo.

    • Cross VM Connectors: To demo the use of cross-vm connectors a series of shared dataports and events are established between vm0 and the StringReverse component. The StringReverse demo can be invoked from the command-line of vm0:

      Welcome to Buildroot
      buildroot login: root
      Password:
      \# string_reverse
      [   19.739028] dataport received mmap for minor 1
      [   19.743337] dataport received mmap for minor 2
      hello
      olleh
      
  • The cma34cr_centos application is a more complex CAmkES VM configuration demonstrating the use of passthrough hardware. The cma34cr_centos application is configured with:

    • 1 Guest Linux VM: The Linux guest images (bzimage and roofs.cpio) are located in the applications directory (cma34cr_centos/centos_linux), originally sourced from an i386 altarch CentOS-7 installation. Additionally the CentosOS installation should be on a flash drive passed-through to the cma34cr application. Further information regarding the Linux installation can be found in the applications README.
    • Cross VM Connectors: A series of shared dataports and events are established between vm0 and the StringReverse component.
    • Ethernet Driver, UDPSever, Echo, Firewall: A passthrough ethernet configuration demo. The guest VM is configured to use the Ethernet driver component through a virtio configuration.
    • Passthrough hardware storage (SATA/USB): A hardware configuration to boot the CentOS installation.
  • The zmq_samples application demonstrates messaging between VMs using the ZeroMQ messaging library. See the README.md in its folder for more information.

See the apps/x86/ subdirectory for all the supported virtual machine manager apps, their implementations and the platforms they target.

Arm Features

See the below feature matrix for the various features the CAmkES ARM VMM implements/facilitates across the various supported platforms.

Plaform Guest Mode SMP Support Multiple VM Support Virtio PCI Virtio Console Virtio Net Cross VM Connector Support Notes
exynos5422 32-bit Unsupported Supported Supported Supported Supported Supported SMP configurations are unsupported due to: * No exynos5422 kernel SMP support * No virtual power device interface to manage VCPU's at runtime (e.g. core startup)
TK1 32-bit Unsupported Unsupported Unsupported Unsupported Unsupported Unsupported SMP configurations are unsupported due to: * No TK1 kernel SMP support * No virtual power device interface to manage VCPU's at runtime (e.g. core startup) Virtio PCI, Console, Net, Cross VM connector support & Multi-VM are untested
TX1 64-bit Supported Unsupported Unsupported Unsupported Unsupported Unsupported Virtio PCI, Console, Net, Cross VM connector support & Multi-VM are untested
TX2 64-bit Supported Supported Supported Supported Supported Unsupported Cross VM connector support is untested
ZCU102 64-bit Supported Supported Supported Supported Supported Unsupported Cross VM connector support is untested
QEMU Virt 64-bit Supported Unsupported Supported Supported Supported Supported Multi-VM support depends on porting the TimeServer to QEMU (See https://github.com/sel4/global-components/tree/master/components/TimeServer)

Arm Platform Configuration Notes

Exynos5422, TX1, TX2, ZCU102, QEMU ARM Virt configuration

We provide a pre-built Linux image and Buildroot image for our guest VM's. See the images in the camkes-vm-images repository at https://github.com/sel4/camkes-vm-images. Feel free also to compile your own Linux and Rootfs images, see the README's in each platform subdirectory (within camkes-vm-images) for information about our image build configurations.

TK1 configuration

We currently provide two linux binaries and two device tree configurations.

  • linux-tk1-debian will try and load a debian userspace off of an emmc partition
  • linux-tk1-initrd will load an included buildroot ramdisk
  • linux-tk1-secure.dts is a device tree configuration with the devices that aren't provided to the linux are disabled.
  • linux-tk1-nonsecured.dts is a device tree configuration with all devices enabled.

In the tk1 app configuration there is a boot mode selection option that chooses between the two linux binaries, and an Insecure option which selects whether to provide all hardware devices to the linux vm or not. If Insecure is not set then the VM will only be provided a minimal amount of hardware frames and the linux-tk1-secure.dts DTS will be used. If Insecure is set then the VM will be provided all device frames apart from the Memory controller and the linux-tk1-nonsecured.dts DTS will be used.

U-Boot is required to initialise the USB devices if linux-tk1-secure.dts is used. This is done by: usb start 0.

The tk1 currently uses linux binaries constructed using Buildroot 2016.08.1 with the following configs:

  • buildroot_tk1_initrd_defconfig builds linux with an included ramdisk that will be loaded at boot.
  • buildroot_tk1_emmc_defconfig builds linux without a ramdisk and it will mount and run /sbin/init /dev/mmcblk0p2

To copy the files back into this project, change into the Linux directory and run make for each file as shown below. Note that you can only update one of linux-tk1-debian or linux-tk1-initrd at a time as they are built from different Buildroot configs:

cd projects/vm/linux
LINUX_FILE=linux-tk1-initrd BUILDROOT_DIR=~/workspaces/buildroot-2016.08.1/ make
LINUX_FILE=linux-tk1-dtb-secure BUILDROOT_DIR=~/workspaces/buildroot-2016.08.1/ make

Both of these configs use the tegra124-jetson-tk1-sel4vm-secure device tree file. To change to the tegra124-jetson-tk1-sel4vm.dts this will need to be changed in the buildroot make menuconfig. To change the mounted emmc partition the chosen dts file's bootargs entry will need to be updated.

The Linux version used can be found in the seL4 branch of our linux-tegra repo.

When buildroot starts:

buildroot login: root
#

When debian starts:

Debian GNU/Linux 8 tk1 ttyS0
tk1 login: root
Password: root
root@tk1:~#

Wireless Configuration

To configure the Ralink 2780 USB wifi dongle:

ifconfig wlan0 up
iw wlan0 scan
wpa_passphrase SSID_NAME >> /etc/wpa_supplicant.conf
  ENTER_SSID_PASSPHRASE
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
iw wlan0 link
dhclient wlan0

TK1 Build Notes

The default setup does not pass though many devices to the Linux kernel. If you make menuconfig you can set insecure mode in the Applications submenu; this is meant to pass through all devices, but not everything has been tested and confirmed to work yet. In particular, the SMMU needs to have extra entries added for any DMA-capable devices such as SATA.

Useful Links for Developing VM Applications

  1. CAmkES VM: Adding a Linux Guest
  2. CAmkES VM: Cross VM Connectors

Arm FAQ and Implementation Notes

How do I update camkes-vm-apps to support platform 'X'

Whilst large parts of the ARM VMM implementation tries to be platform agnostic, there are a few things to keep in mind and implement in order to correctly run the camkes-arm-vm on your new target platform. See the below list as as a rough list of items to check off:

  • Ensure the platform is already supported by seL4 (or you have developed support for the platform prior). See the following page for a list of supported platforms.
  • The platform supports ARM's hardware virtualisation features, these being found on ARMv7 (with virtualisation extensions) and ARMv8.
    • Second to this, the seL4 port to the given platform also supports running with KernelArmHypervisorSupport
  • Does your platform use a GICv2 or GICv3? Note: We currently only support a virtual GICV2, with virtual GICV3 support under-development. See the listed features of libsel4vm for further information: https://github.com/sel4/seL4_projects_libs/tree/master/libsel4vm
  • When porting a VMM application to your platform, say vm_minimal, ensure you provide the following:
    • A devices.camkes file for your platform. These containing platform specific definitions, see in particular the vm dtb field and the untyped_mmios field (for device passthrough). The values in the aforementioned fields corresponding with those found in the kernel device tree.
    • A vmlinux.h header for you platform. See the header file for the other supported platforms at components/VM_Arm/plat_include in camkes-vm repository.
  • Provide a pre-compiled Linux kernel and initrd image for your platform. Once compiled these are usually linked in through your apps CMakeLists.txt. See apps/Arm/vm_minimal/CMakeLists.txt for examples of how other platforms link in their images.

Feel free to contact the team for further support on porting the camkes-arm-vm to your desired platform. We are also always open to contributions for new platforms.

Can a single VMM component support running multiple VM's?

Currently, No. A VMM component only creates and manages a single VM instance. To support multiple VM's, you can run multiple VMM components, each managing its own VM. See apps/vm_multi for an example of this configuration.

How do I enable SMP support for a VM instance?

To configure your VM with multiple VCPU's, you can set the VM instance attribute num_vcpus in your camkes configuration. See here for an example. In addition, when initialising your build, ensure the KernelMaxNumNodes configuration option is set to your desired value. You can also initialise your build with variable -DNUM_NODES variable e.g.

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=tx2 -DNUM_NODES=4

Note: ensure your platform supports SMP configurations through the above feature matrix

camkes-vm-examples's People

Contributors

abrandnewusername avatar adriandanis avatar axel-h avatar branden-data61 avatar chester-p avatar chrisguikema avatar felixschladt avatar gnustomp avatar gridbugs avatar ikuz avatar japhethlim avatar kent-mcleod avatar latentprion avatar lsf37 avatar michaelsproul avatar nomadeel avatar oliver-wm avatar pingerino avatar sylgauthier avatar szhuang avatar wellmcgarnicle avatar wom-bat avatar xurtis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camkes-vm-examples's Issues

Separate CI build and simulation run

Separate CI build and simulation run, so the building queue is no blocked by the simulation getting stuck. Currently, if a build is for a platform that has a simulation, the python script in the ci-actions repo will start the simulation immediately after the build. See e.g. https://github.com/seL4/ci-actions/blob/0161435968ab9d2811e478c4c6e32bb0d4f5f4fb/camkes-vm/build.py#L46-L50 how it it implemented at the moment. Once we have split build and simulation, we could also run simulation in parallel then.

[Failed build] jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'x80000'

[Failed build]

Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/jingjin/workspace/sel4-hypervisor/projects/camkes-tool/camkes/runner/main.py", line 316, in
sys.exit(main(sys.argv, sys.stdout, sys.stderr))
File "/home/jingjin/workspace/sel4-hypervisor/projects/camkes-tool/camkes/runner/main.py", line 292, in main
g = r.render(i, assembly, template, render_state, obj_key,
File "/home/jingjin/workspace/sel4-hypervisor/projects/camkes-tool/camkes/runner/Renderer.py", line 89, in render
t = self.env.get_template(template)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 830, in get_template
return self._load_template(name, self.make_globals(globals))
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 804, in _load_template
template = self.loader.load(self, name, globals)
File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 405, in load
return loader.load(environment, name, globals)
File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 125, in load
code = environment.compile(source, name, filename)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 591, in compile
self.handle_exception(exc_info, source_hint=source_hint)
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
raise value.with_traceback(tb)
File "/home/jingjin/workspace/sel4-hypervisor/projects/vm/templates/seL4VMParameters.template.c", line 23, in
/- set entry_offset = 0x80000 if is_64_bit else 0x8000 -/
File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 497, in _parse
return Parser(self, source, name, encode_filename(filename)).parse()
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 901, in parse
result = nodes.Template(self.subparse(), lineno=1)
File "/usr/lib/python3/dist-packages/jinja2/parser.py", line 888, in subparse
self.stream.expect('block_end')
File "/usr/lib/python3/dist-packages/jinja2/lexer.py", line 386, in expect
raise TemplateSyntaxError("expected token %r, got %r" %
jinja2.exceptions.TemplateSyntaxError: expected token 'end of statement block', got 'x80000'
[299/388] Building C object kernel/CMakeFiles/kernel.elf.dir/kernel_all.c.obj

image

repo init -u https://github.com/seL4/camkes-vm-examples-manifest.git
repo sync
mkdir build
cd build
../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=qemu-arm-virt -DAARCH64=TRUE
ninja

problem with running images on qemu

Hi,

Here is the instruction that i did for running images on qemu:

#in build directory(build_vm)
sudo qemu-system-x86_64 -m 512 -kernel images/kernel-ia32-pc99 -initrd images/capdl-loader-image-ia32-pc99 --enable-kvm -smp 2 -cpu Nehalem,+vmx -nographic

#output
Boot config: parsing cmdline 'images/kernel-ia32-pc99 '
Boot config: console_port = 0x3f8
Boot config: debug_port = 0x3f8
Boot config: disable_iommu = false
Detected 1 boot module(s):
module #0: start=0x149000 end=0x175ad18 size=0x1611d18 name='images/capdl-loader-image-ia32-pc99'
Parsing GRUB physical memory map
Physical Memory Region from 0 size 9fc00 type 1
Physical Memory Region from 9fc00 size 400 type 2
Physical Memory Region from f0000 size 10000 type 2
Physical Memory Region from 100000 size 1fee0000 type 1
Adding physical memory region 0x100000-0x1fc00000
Physical Memory Region from 1ffe0000 size 20000 type 2
Physical Memory Region from feffc000 size 4000 type 2
Physical Memory Region from fffc0000 size 40000 type 2
Multiboot gave us no video information
ACPI: RSDP paddr=0xf6860
ACPI: RSDP vaddr=0xdfcf6860
ACPI: RSDT paddr=0x1ffe1656
ACPI: RSDT vaddr=0xdffe1656
WARNING SKIM window not enabled, this machine is probably vulernable to Meltdown (https://www.meltdownattack.com), consider enabling
Kernel loaded to: start=0x100000 end=0x148000 size=0x48000 entry=0x100076
ACPI: RSDT paddr=0x1ffe1656
ACPI: RSDT vaddr=0xdffe1656
ACPI: FADT paddr=0x1ffe14aa
ACPI: FADT vaddr=0xdffe14aa
ACPI: FADT flags=0x80a5
ACPI: 0 IOMMUs detected
ACPI: MADT paddr=0x1ffe159e
ACPI: MADT vaddr=0xdffe159e
ACPI: MADT apic_addr=0xfee00000
ACPI: MADT flags=0x1
ACPI: MADT_APIC apic_id=0x0
ACPI: MADT_APIC apic_id=0x1
ACPI: Not recording this APIC, only support 1
ACPI: MADT_IOAPIC ioapic_id=0 ioapic_addr=0xfec00000 gsib=0
ACPI: MADT_ISO bus=0 source=0 gsi=2 flags=0x0
ACPI: MADT_ISO bus=0 source=5 gsi=5 flags=0xd
ACPI: MADT_ISO bus=0 source=9 gsi=9 flags=0xd
ACPI: MADT_ISO bus=0 source=10 gsi=10 flags=0xd
ACPI: MADT_ISO bus=0 source=11 gsi=11 flags=0xd
ACPI: 1 CPU(s) detected
ELF-loading userland images from boot modules:
size=0x2027000 v_entry=0x8051870 v_start=0x8048000 v_end=0xa06f000 p_start=0x175b000 p_end=0x3782000
Moving loaded userland images to final location: from=0x175b000 to=0x148000 size=0x2027000
Starting node #0 with APIC ID 0
XSAVE not supported
seL4 called fail at /home/hedi/camkes_vm_examples/kernel/src/arch/x86/kernel/boot_sys.c:785 in function boot_sys, saying "boot_sys failed for some reason :(
"
halting...
Kernel entry via Interrupt, irq 0

Hedi/

Run vm on a real platform

Hi,

I try to follow the documentation to build.
And it generate two image capdl-loader-image-x86_64-pc99 and kernel-x86_64-pc99.
What is different between them ?
And how can I use them to run on a real platform ?

Thanks !

Support hw-test CI run

Support hw-test CI run for this repo also, so we can verify PRs do not break anything. Currently, the way to do such a test is via a dummy PR in the camkes-vm repo.

Issuse about running vm_multi app on qemu platform, udhcpc can not return.

After building vm_multi app for qemu and running ./simulate in my build directory, the console always printed the log "udhcpc: sending discover",which indicating udhcpc can not return. Meanwhile, your prebuilt rootfs did not support brctl in busybox judging from error log "/etc/init.d/S90bridge_setup: line 12: brctl: not found".

The related log was shown as follows:

Starting syslogd: OK
Starting syslogd: OK
Starting syslogd: OK
Starting klogd: OK
Starting klogd: OK
Starting klogd: OK
Running sysctl: OK
Running sysctl: OK
Running sysctl: OK
Initializing random number generator... [   43.352936] random: dd: uninitialized urandom read (512 bytes read)
done.
Initializing random number generator... [   43.476458] random: dd: uninitialized urandom read (512 bytes read)
done.
Initializing random number generator... [   44.130296] random: dd: uninitialized urandom read (512 bytes read)
done.
Starting network: OK
Starting network: OK
Starting network: OK
udhcpc: started, v1.31.0
udhcpc: started, v1.31.0
/etc/init.d/S90bridge_setup: line 12: brctl: not found

Welcome to Buildroot
[   53.859732] random: mktemp: uninitialized urandom read (6 bytes read)
[   53.967484] random: mktemp: uninitialized urandom read (6 bytes read)
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover

These two errors may have some interdependency. Is the expected resutl for the vm_multi that an ip address will be respectively given to eth0 and br0?

Build failed# capDl-tool

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=qemu-arm-virt
logs:
[304/385] Generating capDL-tool/parse-capDL
FAILED: capDL-tool/parse-capDL /home/luffy/workspace/github/sel4-vm-example/build/capDL-tool/parse-capDL
cd /home/luffy/workspace/github/sel4-vm-example/build/capDL-tool && printf capDL-tool/parse-capDL:\ > /home/luffy/workspace/github/sel4-vm-example/build/capDL-tool/parse-capDL.d && find -L /home/luffy/workspace/github/sel4-vm-example/projects/capdl/capDL-tool/ -type f -printf %p\ >> /home/luffy/workspace/github/sel4-vm-example/build/capDL-tool/parse-capDL.d && cp -a /home/luffy/workspace/github/sel4-vm-example/projects/capdl/capDL-tool/* . && /home/luffy/workspace/tools/cmake-3.24.0-rc3-linux-x86_64/bin/cmake -E env make && mkdir -p /home/luffy/workspace/github/sel4-vm-example/.sel4_cache/capDL-tool/04d18331a3ec4f4b408937b7b72886aa && tar -zcf code.tar.gz -C /home/luffy/workspace/github/sel4-vm-example/build/capDL-tool/ parse-capDL && mv code.tar.gz /home/luffy/workspace/github/sel4-vm-example/.sel4_cache/capDL-tool/04d18331a3ec4f4b408937b7b72886aa/
stack build --fast
Downloading lts-19.12 build plan ...
RedownloadFailed Request {
host = "raw.githubusercontent.com"
port = 443
secure = True
requestHeaders = []
path = "/fpco/lts-haskell/master//lts-19.12.yaml"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
"/home/luffy/.stack/build-plan/lts-19.12.yaml" (Response {responseStatus = Status {statusCode = 404, statusMessage = "Not Found"}, responseVersion = HTTP/1.1, responseHeaders = [("Connection","keep-alive"),("Content-Length","14"),("Content-Security-Policy","default-src 'none'; style-src 'unsafe-inline'; sandbox"),("Strict-Transport-Security","max-age=31536000"),("X-Content-Type-Options","nosniff"),("X-Frame-Options","deny"),("X-XSS-Protection","1; mode=block"),("Content-Type","text/plain; charset=utf-8"),("X-GitHub-Request-Id","FF6A:572A:28389:32C8B:638FF70A"),("Accept-Ranges","bytes"),("Date","Wed, 07 Dec 2022 02:14:34 GMT"),("Via","1.1 varnish"),("X-Served-By","cache-tyo11937-TYO"),("X-Cache","MISS"),("X-Cache-Hits","0"),("X-Timer","S1670379275.513819,VS0,VE236"),("Vary","Authorization,Accept-Encoding,Origin"),("Access-Control-Allow-Origin","*"),("X-Fastly-Request-ID","0c35d2a057b850289454425d205f8e919dbf0b12"),("Expires","Wed, 07 Dec 2022 02:19:34 GMT"),("Source-Age","0")], responseBody = (), responseCookieJar = CJ {expose = []}, responseClose' = ResponseClose})
Makefile:51: recipe for target 'parse-capDL' failed
make: *** [parse-capDL] Error 1
[306/385] Performing CAmkES generation for 20 files
ninja: build stopped: subcommand failed.

Not able to build the camkes arm vmm

I follow the step to build the camkes arm vmm.
I got some errors when I run ../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=qemu-arm-virt.

CMake Error at CMakeLists.txt:12 (find_package):
  By not providing "Findcamkes-arm-vm.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "camkes-arm-vm", but CMake did not find one.

  Could not find a package configuration file provided by "camkes-arm-vm"
  with any of the following names:

    camkes-arm-vmConfig.cmake
    camkes-arm-vm-config.cmake

  Add the installation prefix of "camkes-arm-vm" to CMAKE_PREFIX_PATH or set
  "camkes-arm-vm_DIR" to a directory containing one of the above files.  If
  "camkes-arm-vm" provides a separate development package or SDK, be sure it
  has been installed.

How can I solve this problem?

How do I port this to raspberry pi 4B?

How do I port this to raspberry pi 4B?

I have practiced with reference to this repository, but got an error:

https://github.com/second-state/wasmedge-seL4/wiki/%5BWIP%5D-seL4-on-Raspberry-Pi-4

Booting all finished, dropped to user space

[email protected]:66 Simple FDT helper failed to read path (-22, /soc/timer@7e003000)
bcm_system_timer_init@system_timer.c: 214 Failed to allocate with fdt
[email protected]:112 system timer initialisation failed
post_init@time_server.c:231 [Cond failed: error]
            Failed to init timer

[email protected]:1156 Invalid 'num_vcpus' attribute setting: Exceeds maximum number of supported nodes. Capping value to CONFIG_MAX_NUM_NODES (1)
[email protected]:266 Failed to find any untyped capable of creating an object at address 0xff846000
Loading Linux: 'linux' dtb: ''
[email protected]:651 module name: map_frame_hack
[email protected]:651 module name: init_ram
[email protected]:651 module name: virtio_con
[email protected]:651 module name: cross_vm_connections
libsel4muslcsys: Error attempting syscall 215
libsel4muslcsys: Error attempting syscall 215

how do i handle it?

How can i boot the sel4 vm through the sd mmc partition to use rootfs?

Hi,
I have already boot the vm on the sel4 hypervisor, but it used the ramdisk(in-memory initrd). I want to know how can i switch to use SD mmc partition to store the file persistently.Can i change the bootargs in camkes file from “root=/dev/mem” to "root=/dev/blkxxxxp1"? It is really useful to me.

Thanks,
Comet

VM_minimal for QEMU/ARMv7 does not work due to missing linux images

I've been testing some more CI configurations and ran into some issues with QEMU/ARMv7 CMake that prevent this from working nicely. Once these are resolved, building VM_minimal for QEMU/ARMv7 works, but it still misses a 32-bit linux image. There should at least be a warning in CMake scripts that this is unsupported. I'm not sure if this platform has worked once and just needs the linux images, or if there more that needs to be done. There seems not much practical value in ARMv7 virtualization nowadays.

x86_64 is supported or it is not...?

Hi!

I'm trying to build the x86_64 example because I can read:

"Boot images/kernel-x86_64-pc99 and images/capdl-loader-experimental-image-x86_64-pc99"

anyway, whenever I try to build x86_64 with:

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=x86_64

or

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=x86

or

../init-build.sh -DCAMKES_VM_APP=vm_minimal

all of them fail with this error:

hugo@anakin:~/camkes-vm-examples/build$ ../init-build.sh -DCAMKES_VM_APP=vm_minimal 
loading initial cache file /home/hugo/camkes-vm-examples/projects/vm-examples/settings.cmake
CMake Error at apps/Arm/vm_minimal/settings.cmake:9 (message):
  PLATFORM: x86 not supported.                                                                                                      
                                                                                                                                    
           Supported: tk1;tx1;tx2;exynos5422;qemu-arm-virt;odroidc2                                                                 
Call Stack (most recent call first):                                                                                                
  settings.cmake:67 (include)                                                                                                       
                                                                                                                                    
                                                                                                                                    
-- Configuring incomplete, errors occurred!

So, documentation is referencing a "kernel-x86_64-pc99" kernel, which looks like a x86_64 platform, but at the very beginning it says "x86_64 (coming)". Not sure if there's support and if not, should the documentation be fixed to avoid confusion?
Best,

Camkes-VM-Linux Ninja couldn't build file

I am a newbie to SeL4 and followed the step by step process to build camkes-vm-linux project
but it fails while running ninja and the output is as follows

ubuntu@ubuntu1804:~/sel4-tutorials-manifest/b11_build$ ninja
[5/427] Performing configure step for 'hello-app'
FAILED: hello-app-stamp/hello-app-configure 
cd /home/ubuntu/sel4-tutorials-manifest/b11_build/hello-app && /usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=/home/ubuntu/sel4-tutorials-manifest/tools/seL4/cmake-tool/polly_toolchains/linux-gcc-32bit-pic.cmake -GNinja /home/ubuntu/sel4-tutorials-manifest/b11/pkg/hello && /usr/local/bin/cmake -E touch /home/ubuntu/sel4-tutorials-manifest/b11_build/hello-app-stamp/hello-app-configure
-- [polly] Used toolchain: Linux / gcc / PIC / c++11 support / 32 bit
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- broken
CMake Error at /usr/local/share/cmake-3.13/Modules/CMakeTestCCompiler.cmake:52 (message):
  The C compiler
    "/usr/bin/gcc"
  is not able to compile a simple test program.
  It fails with the following output:
    Change Dir: /home/ubuntu/sel4-tutorials-manifest/b11_build/hello-app/CMakeFiles/CMakeTmp
    
    Run Build Command:"/usr/bin/ninja-build" "cmTC_ac0a4"
    [1/2] Building C object CMakeFiles/cmTC_ac0a4.dir/testCCompiler.c.o
    [2/2] Linking C executable cmTC_ac0a4
    FAILED: cmTC_ac0a4 
    : && /usr/bin/gcc -m32 -fPIC   CMakeFiles/cmTC_ac0a4.dir/testCCompiler.c.o  -o cmTC_ac0a4   && :
    /usr/bin/ld: cannot find Scrt1.o: No such file or directory
    /usr/bin/ld: cannot find crti.o: No such file or directory
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
    /usr/bin/ld: cannot find -lgcc
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/7/libgcc.a when searching for -lgcc
    /usr/bin/ld: cannot find -lgcc
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:5 (project)

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/sel4-tutorials-manifest/b11_build/hello-app/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/sel4-tutorials-manifest/b11_build/hello-app/CMakeFiles/CMakeError.log".

What changes are to be made and How do I solve this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.