From 6e35b14b39f7245826ede7cf017cd39ed9cc5c86 Mon Sep 17 00:00:00 2001 From: Manami Mori Date: Sun, 7 Apr 2024 23:07:39 +0900 Subject: [PATCH] Docs: Update supported devices Signed-off-by: Manami Mori --- README.md | 25 +++++++++++++++---------- docs/raspberry_pi4.md | 23 ++++++++++++++++------- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 87309f5..ceaf567 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,9 @@ If you want to build with extra features, you can build by `make custom_all FEAT - Control some A64FX specific registers - PXE Boot (Feature Name: `tftp`) - Download hypervisor_kernel and payload(usually, bootloader) via TFTP -- Raspberry Pi (Feature Name: `raspberrypi`) - - For running MilvusVisor on a Raspberry pi. See [the document](./docs/raspberry_pi4.md) for details. +- Raspberry Pi 4 (Feature Name: `raspberrypi`) + - For running MilvusVisor on a Raspberry Pi 4. See [the document](./docs/raspberry_pi4.md) for details. + - Note that you do not need to use this option for Raspberry Pi 5. Please see the "Tested machines" section for more detail. - Virtio Network (Feature Name: `virtio_net`) - Add virtual devices to communicate with OS - This is the interface, you must implement a protocol stack @@ -58,19 +59,23 @@ We have tested MilvusVisor on the following machines. - GIGABYTE E252-P30 - QEMU (>= 7.1.0) - Bluefield-2 -- Rasspberry pi 4 model B +- Rasspberry Pi 4 model B - The setup steps for Raspbrry pi are different from the other machines. So please also see [the document](./docs/raspberry_pi4.md) when you try MilvusVisor on Raspberry pi. +- Raspberry Pi 5 + - With https://github.com/worproject/rpi5-uefi + - Build without `raspberrypi` The following table shows which feature worked on which machines. -| Test items \\ Machine | FX700 | FX1000 | E252-P30 | QEMU | Bluefield-2 | RPi4B | -|:------------------------------------------------------------|:-----:|:------:|:--------:|:----:|:-----------:|:-----:| -| Booting Linux on MilvusVisor (Multi-core) | o | o | o | o | o | o | -| Protecting non-volatile data of Intel I210 | o | - | - | - | - | - | -| Protecting firmware update of Mellanox Technologies MT27800 | o | - | - | - | - | - | -| Protecting MilvusVisor itself against DMA attack | o | - | - | - | - | - | -| Fast Restore | o | o | - | - | - | - | +| Test items (o: works, -: Not works, ?: Not tested) \\ Machine | FX700 | FX1000 | E252-P30 | QEMU | Bluefield-2 | RPi4B | RPi5 | +|:--------------------------------------------------------------|:-----:|:------:|:--------:|:----:|:-----------:|:-----:|:----:| +| Booting Linux on MilvusVisor (Multi-core) | o | o | o | o | o | o | o | +| Protecting non-volatile data of Intel I210 | o | - | - | ? | - | - | ? | +| Protecting firmware update of Mellanox Technologies MT27800 | o | - | - | ? | - | - | ? | +| Protecting MilvusVisor itself against DMA attack | o | - | - | - | - | - | - | +| Fast Restore | o | o | - | o | - | - | o | +| Virtio Network | - | - | ? | o | o | - | - | ## How to build the hypervisor diff --git a/docs/raspberry_pi4.md b/docs/raspberry_pi4.md index fcad4c6..e4eb92a 100644 --- a/docs/raspberry_pi4.md +++ b/docs/raspberry_pi4.md @@ -1,19 +1,24 @@ # Raspberry Pi4 Support + MilvusVisor has support for Raspberry Pi 4 environments. We tested "Raspberry Pi 4 Computer Model B" ## How to build -To enable Raspberry Pi 4 support, you need to add `raspberrypi` feature flag on building binaries of hypervisor and bootloader. + +To enable Raspberry Pi 4 support, you need to add `raspberrypi` feature flag on building binaries of hypervisor and +bootloader. ```shell -make custom_all FEATURES=raspberrypi +./builder.rs -r -f raspberrypi ``` ## How to boot + ### Build U-boot + (This step assumed that your environment is Ubuntu. Otherwise, please replace the package names to suitable.) -1. Install `gcc-aarch64-linux-gnu` and `libssl-dev` +1. Install `gcc-aarch64-linux-gnu` and `libssl-dev` 2. Clone u-boot and move into the directory 3. `export CROSS_COMPILE=aarch64-linux-gnu-` 4. Set configuration for Raspberry Pi 4: `make rpi_4_defconfig` @@ -32,7 +37,8 @@ setenv kernel_comp_addr_r 0x3800000 booti ${kernel_addr_r} - ${fdt_addr_r} ``` -You can build in the docker with the below shell script(When run docker, don't forget bind directory to get the output binary :) ) +You can build in the docker with the below shell script(When run docker, don't forget bind directory to get the output +binary :) ) ```shell #!/bin/sh @@ -59,17 +65,20 @@ cp boot.scr /path/to/bound/ ``` ### Download "Raspberry Pi OS (64-bit)" -Go to https://www.raspberrypi.com/software/operating-systems/ , find "Raspberry Pi OS (64-bit)" section, and download "Raspberry Pi OS with desktop" or "Raspberry Pi OS Lite". (We tested with "Raspberry Pi OS Lite") +Go to https://www.raspberrypi.com/software/operating-systems/ , find "Raspberry Pi OS (64-bit)" section, and download " +Raspberry Pi OS with desktop" or "Raspberry Pi OS Lite". (We tested with "Raspberry Pi OS Lite") ### Write image and binaries -1. Write the OS image to SD: (For example: `unxz 20XX-XX-XX-raspios-version-arm64-lite.img.xz && sudo dd if=20XX-XX-XX-raspios-version-arm64-lite.img of=/dev/mmcblk0 bs=10M status=progress`) +1. Write the OS image to SD: (For + example: `unxz 20XX-XX-XX-raspios-version-arm64-lite.img.xz && sudo dd if=20XX-XX-XX-raspios-version-arm64-lite.img of=/dev/mmcblk0 bs=10M status=progress`) 2. Mount SD Card: `sudo mount /dev/mmcblk0p1 /mnt` 3. Copy u-boot.bin: `sudo cp u-boot.bin /mnt/` 4. Copy MilvusVisor: `sudo cp -r /path/to/MlivusVisor/bin/EFI /mnt` 5. Copy boot.scr: `sudo cp boot.scr /mnt/` 6. Modify config.txt: `sudo sed -i '/arm_64bit=1/akernel=u-boot.bin' /mnt/config.txt` 7. Modify cmdline.txt: `sudo sed -i -e 's/console=serial0,115200 console=tty1//g' /mnt/cmdline.txt` -8. Enable UART(Optional): `sudo sed -i '/arm_64bit=1/adtoverlay=miniuart-bt\ncore_freq=250' /mnt/config.txt && sudo sed -i -e 's/quiet/console=ttyAMA0/g' /mnt/cmdline.txt` +8. Enable UART( + Optional): `sudo sed -i '/arm_64bit=1/adtoverlay=miniuart-bt\ncore_freq=250' /mnt/config.txt && sudo sed -i -e 's/quiet/console=ttyAMA0/g' /mnt/cmdline.txt` 9. Unmount: `sudo umount /mnt`