From 12d9870d523ebc032804c6dddd0f0c629b78fac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Fri, 18 Oct 2019 00:00:00 +0000 Subject: [PATCH] xephyr: consider, but give up for now --- README.adoc | 71 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/README.adoc b/README.adoc index 5edb6ca..1d3af70 100644 --- a/README.adoc +++ b/README.adoc @@ -4939,6 +4939,8 @@ Alternatively, you could also mount your own with: mkdir /mnt/my9p mount -t 9p -o trans=virtio,version=9p2000.L host0 /mnt/my9p .... ++ +where mount tag `host0` is set by the emulator (`mount_tag` flag on QEMU CLI), and can be found in the guest with: `cat /sys/bus/virtio/drivers/9pnet_virtio/virtio0/mount_tag` as documented at: https://www.kernel.org/doc/Documentation/filesystems/9p.txt[]. * Launch QEMU with `-virtfs` as in your link:run[] script + When we tried: @@ -4961,6 +4963,13 @@ TODO seems possible! Lets do it: * http://gem5.org/wiki/images/b/b8/Summit2017_wa_devlib.pdf * http://gem5.org/WA-gem5 +From the source, there is just one exported tag named `gem5`, so we could try on the guest: + +.... +mkdir -p /mnt/9p/gem5 +mount -t 9p -o trans=virtio,version=9p2000.L gem5 /mnt/9p/data +.... + ==== NFS TODO: get working. @@ -9061,36 +9070,6 @@ U-Boot is a popular bootloader. It can read disk filesystems, and Buildroot supports it, so we could in theory put it into memory, and let it find a kernel image from the root filesystem and boot that, but I didn't manage to get it working yet: https://stackoverflow.com/questions/58028789/how-to-boot-linux-aarch64-with-u-boot-with-buildroot-on-qemu -== Xephyr - -TODO get a hello world working, and then consider further integration in this repo, e.g. being able to run all C userland content on it. - -Xephyr RTOS that has <> support. I think it works much like our <> which uses Newlib and generates individual ELF files that contain both our C program's code, and the Xephyr libraries. - -However, unlike Newlib, Xephyr must be setting up a simple pre-main runtime to be able to handle threads. - -Failed attempt: - -.... -# https://askubuntu.com/questions/952429/is-there-a-good-ppa-for-cmake-backports -wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - -sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic-rc main' -sudo apt-get update -sudo apt-get install cmake -git clone https://github.com/zephyrproject-rtos/zephyr -pip3 install --user -U west packaging -cd zephyr -git checkout v1.14.1 -west init zephyrproject -west update -export ZEPHYR_TOOLCHAIN_VARIANT=xtools -export XTOOLS_TOOLCHAIN_PATH="$(pwd)/out/crosstool-ng/build/default/install/aarch64/bin/" -source zephyr-env.sh -west build -b qemu_aarch64 samples/hello_world -.... - -The build system of that project is a bit excessive / wonky. You need an edge CMake not present in Ubuntu 18.04, which I don't want to install right now, and it uses the weird custom `west` build tool frontend. - == QEMU === Introduction to QEMU @@ -18111,6 +18090,38 @@ gem5: ** https://stackoverflow.com/questions/47997565/gem5-system-requirements-for-decent-performance/48941793#48941793 ** https://github.com/gem5/gem5/issues/25 +== Xephyr + +Xephyr is an RTOS that has <> support. I think it works much like our <> which uses Newlib and generates individual ELF files that contain both our C program's code, and the Xephyr libraries. + +TODO get a hello world working, and then consider further integration in this repo, e.g. being able to run all C userland content on it. + +TODO: Cortex-A CPUs are not currently supported, there are some `qemu_cortex_m0` boards, but can't find a QEMU Cortex-A. There is an x86_64 qemu board, but we don't currently have an <>. For this reason, we won't touch this further for now. + +However, unlike Newlib, Xephyr must be setting up a simple pre-main runtime to be able to handle threads. + +Failed attempt: + +.... +# https://askubuntu.com/questions/952429/is-there-a-good-ppa-for-cmake-backports +wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - +sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic-rc main' +sudo apt-get update +sudo apt-get install cmake +git clone https://github.com/zephyrproject-rtos/zephyr +pip3 install --user -U west packaging +cd zephyr +git checkout v1.14.1 +west init zephyrproject +west update +export ZEPHYR_TOOLCHAIN_VARIANT=xtools +export XTOOLS_TOOLCHAIN_PATH="$(pwd)/out/crosstool-ng/build/default/install/aarch64/bin/" +source zephyr-env.sh +west build -b qemu_aarch64 samples/hello_world +.... + +The build system of that project is a bit excessive / wonky. You need an edge CMake not present in Ubuntu 18.04, which I don't want to install right now, and it uses the weird custom `west` build tool frontend. + == About this repo === Supported hosts