summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-virtualization/README.build.xen.md
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-virtualization/README.build.xen.md')
-rw-r--r--meta-xilinx-virtualization/README.build.xen.md120
1 files changed, 120 insertions, 0 deletions
diff --git a/meta-xilinx-virtualization/README.build.xen.md b/meta-xilinx-virtualization/README.build.xen.md
new file mode 100644
index 00000000..2176f8db
--- /dev/null
+++ b/meta-xilinx-virtualization/README.build.xen.md
@@ -0,0 +1,120 @@
1# Xen Build Instructions
2
3The Yocto Project setup for AMD Xen configurations workflow is as follows. Be sure
4to read everything below.
5
61. Follow [Building Instructions](../README.building.md) upto step 4.
7
82. Clone the meta-security repository.
9```
10$ cd ../sources
11$ git clone -b <release-branch> https://git.yoctoproject.org/meta-security
12$ cd -
13```
14
153. Add xilinx-virtualization, security and tpm layer to bblayers.conf as shown below.
16```
17$ bitbake-layers add-layer ./<path-to-layer>/meta-security
18$ bitbake-layers add-layer ./<path-to-layer>/meta-security/meta-tpm
19$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-virtualization
20```
21
224. The following variables needs to be added to the end of the conf/local.conf file.
23```
24# Xen variables
25BOOTMODE = "xen"
26ENABLE_XEN_UBOOT_SCR = "1"
27ENABLE_XEN_DTSI = "1"
28ENABLE_XEN_QEMU_DTSI = "1"
29
30# Default Xen Serial Console is serial0, if you are using serial1 then set as show below.
31XEN_SERIAL_CONSOLES = "serial1"
32
33# Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image.
34IMAGE_FSTYPES += "cpio.gz"
35RAMDISK_IMAGE = "rootfs.cpio.gz"
36
37# Variables for Xen SD WIC image boot flow.
38IMAGE_FSTYPES += "wic"
39WKS_FILES = "xilinx-default-sd.wks"
40
41DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen"
42
43IMAGE_FEATURES += "ssh-server-openssh"
44
45DISTRO_FEATURES:append = " systemd"
46VIRTUAL-RUNTIME_init_manager = "systemd"
47DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
48
49IMAGE_INSTALL:append = " \
50 kernel-module-xen-blkback \
51 kernel-module-xen-gntalloc \
52 kernel-module-xen-gntdev \
53 kernel-module-xen-netback \
54 kernel-module-xen-wdt \
55 xen \
56 xen-tools \
57 xen-tools-xenstat \
58 ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \
59 "
60```
61
625. Continue [Building Instructions](../README.building.md) from step 5.
63
64## Xen Boot Instructions
65
66> **Note:**
67> * This README provides instructions for Xen Dom0 only.
68
691. Follow [Booting Instructions](../README.booting.md) upto step 2.
70
712. Verify Xen Dom0 is up and running on QEMU or target as shown below.
72
73```
74Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0
75
76zynqmp-generic login: root
77root@zynqmp-generic:~# xl list
78Name ID Mem VCPUs State Time(s)
79Domain-0 0 1500 1 r----- 123.5
80root@zynqmp-generic:~# xl info
81host : zynqmp-generic
82release : 6.1.0-xilinx-v2024.1
83version : #1 SMP Thu Dec 21 07:00:11 UTC 2023
84machine : aarch64
85nr_cpus : 4
86max_cpu_id : 3
87nr_nodes : 1
88cores_per_socket : 1
89threads_per_core : 1
90cpu_mhz : 99.990
91hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
92virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1
93total_memory : 4095
94free_memory : 2529
95sharing_freed_memory : 0
96sharing_used_memory : 0
97outstanding_claims : 0
98free_cpus : 0
99xen_major : 4
100xen_minor : 17
101xen_extra : .0
102xen_version : 4.17.0
103xen_caps : xen-3.0-aarch64 xen-3.0-armv7l
104xen_scheduler : credit2
105xen_pagesize : 4096
106platform_params : virt_start=0x200000
107xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty
108xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native
109cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0
110cc_compile_by : santraju
111cc_compile_domain :
112cc_compile_date : 2023-12-12
113build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285
114xend_config_format : 4
115root@zynqmp-generic:~#
116```
117
118## References
119
120* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor