Part 1
요약·해설
Xen Dom0 Snippet의 공식 원문 구조, 설정 조건과 실행 흐름을 생략 없이 설명합니다.
snippets/xen_dom0/README.html
Zephyr 3.7.0
Full translation
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
336E1DE51CEE0856D48F57E4DC32E434B8DFE9A08E8D080E2851463B7C05F233
.. _xen_dom0:
Xen Dom0: universal snippet for XEN control domain
##################################################
Overview
********
This snippet allows user to build Zephyr as a Xen initial domain (Dom0). The feature
is implemented as configuration snippet to allow support for any compatible platform.
How to add support of a new board
*********************************
* add board dts overlay to this snippet which deletes/adds memory and deletes UART nodes;
* add correct memory and hypervisor nodes, based on regions Xen picked for Domain-0 on your setup.
Programming
***********
Correct snippet designation for Xen must
be entered when you invoke ``west build``.
For example:
.. code-block:: console
west build -b qemu_cortex_a53 -S xen_dom0 samples/synchronization
QEMU example with Xen
***********************
Overlay for qemu_cortex_a53 board, that is present in `board/` directory of this snippet is QEMU
Xen control domain example. To run such setup, you need to:
* fetch and build Xen (e.g. RELEASE-4.17.0) for arm64 platform
* take and compile sample device tree from `example/` directory
* build your Zephyr sample/application with `xen_dom0` snippet and start it as Xen control domain
For starting you can use QEMU from Zephyr SDK by following command:
.. code-block:: console
<path to Zephyr SDK>/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-aarch64 -cpu cortex-a53 \
-m 6G -nographic -machine virt,gic-version=3,virtualization=true -chardev stdio,id=con,mux=on \
-serial chardev:con -mon chardev=con,mode=readline -pidfile qemu.pid \
-device loader,file=<path to Zephyr app build>/zephyr.bin,addr=0x40600000 \
-dtb <path to DTB>/xen.dtb -kernel <path to Xen build>/xen
This will start you a Xen hypervisor with your application as Xen control domain. To make it usable,
you can add `zephyr-xenlib` by Xen-troops library to your project. It'll provide basic domain
management functionalities - domain creation and configuration.
Part 3
한국어 전문 번역
Overview
이 snippet은 Zephyr를 Xen initial domain, 즉 Dom0 control domain으로 build합니다. 특정 board에 고정된 feature가 아니라 compatible platform에 적용할 수 있는 configuration snippet입니다.
How to add support of a new board
- Snippet에 board DTS overlay를 추가해 Xen이 소유·재배치한 memory와 기존 UART node를 삭제하거나 다시 정의합니다.
- 실제 setup에서 Xen이 Domain-0에 선택한 region에 맞춰 올바른 memory node와 hypervisor node를 추가합니다.
Programming
west build 때 Xen용 snippet 이름을 정확히 지정해야 합니다. 예:
west build -b qemu_cortex_a53 -S xen_dom0 samples/synchronization
QEMU example with Xen
Snippet의 board/ directory에 있는 qemu_cortex_a53 overlay는 QEMU Xen control-domain 예제입니다. Arm64용 Xen(예: RELEASE-4.17.0)을 fetch·build하고, example/의 sample device tree를 compile한 뒤, Zephyr application을 xen_dom0 snippet으로 build해 control domain으로 시작합니다.
Zephyr SDK의 QEMU는 다음 command line으로 Xen image, DTB와 Zephyr Dom0 binary를 함께 load할 수 있습니다.
<path to Zephyr SDK>/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-aarch64 -cpu cortex-a53 \
-m 6G -nographic -machine virt,gic-version=3,virtualization=true -chardev stdio,id=con,mux=on \
-serial chardev:con -mon chardev=con,mode=readline -pidfile qemu.pid \
-device loader,file=<path to Zephyr app build>/zephyr.bin,addr=0x40600000 \
-dtb <path to DTB>/xen.dtb -kernel <path to Xen build>/xen
이 명령은 Xen hypervisor와 Zephyr application을 control domain으로 시작합니다. Project에 Xen-troops의 zephyr-xenlib를 추가하면 domain 생성과 configuration 같은 기본 management 기능을 사용할 수 있습니다.
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.