diff options
Diffstat (limited to 'meta-xilinx-virtualization/README.build.xen.md')
-rw-r--r-- | meta-xilinx-virtualization/README.build.xen.md | 120 |
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 | |||
3 | The Yocto Project setup for AMD Xen configurations workflow is as follows. Be sure | ||
4 | to read everything below. | ||
5 | |||
6 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
7 | |||
8 | 2. 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 | |||
15 | 3. 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 | |||
22 | 4. The following variables needs to be added to the end of the conf/local.conf file. | ||
23 | ``` | ||
24 | # Xen variables | ||
25 | BOOTMODE = "xen" | ||
26 | ENABLE_XEN_UBOOT_SCR = "1" | ||
27 | ENABLE_XEN_DTSI = "1" | ||
28 | ENABLE_XEN_QEMU_DTSI = "1" | ||
29 | |||
30 | # Default Xen Serial Console is serial0, if you are using serial1 then set as show below. | ||
31 | XEN_SERIAL_CONSOLES = "serial1" | ||
32 | |||
33 | # Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image. | ||
34 | IMAGE_FSTYPES += "cpio.gz" | ||
35 | RAMDISK_IMAGE = "rootfs.cpio.gz" | ||
36 | |||
37 | # Variables for Xen SD WIC image boot flow. | ||
38 | IMAGE_FSTYPES += "wic" | ||
39 | WKS_FILES = "xilinx-default-sd.wks" | ||
40 | |||
41 | DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen" | ||
42 | |||
43 | IMAGE_FEATURES += "ssh-server-openssh" | ||
44 | |||
45 | DISTRO_FEATURES:append = " systemd" | ||
46 | VIRTUAL-RUNTIME_init_manager = "systemd" | ||
47 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | ||
48 | |||
49 | IMAGE_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 | |||
62 | 5. 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 | |||
69 | 1. Follow [Booting Instructions](../README.booting.md) upto step 2. | ||
70 | |||
71 | 2. Verify Xen Dom0 is up and running on QEMU or target as shown below. | ||
72 | |||
73 | ``` | ||
74 | Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0 | ||
75 | |||
76 | zynqmp-generic login: root | ||
77 | root@zynqmp-generic:~# xl list | ||
78 | Name ID Mem VCPUs State Time(s) | ||
79 | Domain-0 0 1500 1 r----- 123.5 | ||
80 | root@zynqmp-generic:~# xl info | ||
81 | host : zynqmp-generic | ||
82 | release : 6.1.0-xilinx-v2024.1 | ||
83 | version : #1 SMP Thu Dec 21 07:00:11 UTC 2023 | ||
84 | machine : aarch64 | ||
85 | nr_cpus : 4 | ||
86 | max_cpu_id : 3 | ||
87 | nr_nodes : 1 | ||
88 | cores_per_socket : 1 | ||
89 | threads_per_core : 1 | ||
90 | cpu_mhz : 99.990 | ||
91 | hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000 | ||
92 | virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1 | ||
93 | total_memory : 4095 | ||
94 | free_memory : 2529 | ||
95 | sharing_freed_memory : 0 | ||
96 | sharing_used_memory : 0 | ||
97 | outstanding_claims : 0 | ||
98 | free_cpus : 0 | ||
99 | xen_major : 4 | ||
100 | xen_minor : 17 | ||
101 | xen_extra : .0 | ||
102 | xen_version : 4.17.0 | ||
103 | xen_caps : xen-3.0-aarch64 xen-3.0-armv7l | ||
104 | xen_scheduler : credit2 | ||
105 | xen_pagesize : 4096 | ||
106 | platform_params : virt_start=0x200000 | ||
107 | xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty | ||
108 | xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native | ||
109 | cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0 | ||
110 | cc_compile_by : santraju | ||
111 | cc_compile_domain : | ||
112 | cc_compile_date : 2023-12-12 | ||
113 | build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285 | ||
114 | xend_config_format : 4 | ||
115 | root@zynqmp-generic:~# | ||
116 | ``` | ||
117 | |||
118 | ## References | ||
119 | |||
120 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor | ||