summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-virtualization
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-virtualization')
-rw-r--r--meta-xilinx-virtualization/README.build.xen.md120
-rw-r--r--meta-xilinx-virtualization/README.md144
-rw-r--r--meta-xilinx-virtualization/conf/layer.conf1
-rw-r--r--meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb21
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc2
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc2
6 files changed, 158 insertions, 132 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
diff --git a/meta-xilinx-virtualization/README.md b/meta-xilinx-virtualization/README.md
index 5b66ea38..ad019fee 100644
--- a/meta-xilinx-virtualization/README.md
+++ b/meta-xilinx-virtualization/README.md
@@ -1,128 +1,10 @@
1# meta-xilinx-vendor 1# meta-xilinx-virtualization
2 2
3This layer enables AMD Xilinx Xen configurations and features for ZynqMP and 3This layer enables AMD Xen configurations and features for ZynqMP and
4Versal devices and also provides related metadata. 4Versal devices and also provides related metadata.
5 5
6## Xen Build Instructions 6See [Xen Build Instructions](README.build.xen.md) to configure and build xen
7 7images.
8The Yocto Project setup for AMD Xilinx Xen configurations workflow is as follows.
9Be sure to read everything below.
10
111. Follow [Building Instructions](../README.building.md) upto step 2.
12
132. Clone the meta-security repository.
14
15```
16$ git clone -b <release-branch> https://git.yoctoproject.org/meta-security
17```
18
193. Continue [Building Instructions](../README.building.md) from step 4.
20
21> **Note:**
22> * For System Device Tree(SDT) workflow see [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md)
23
244. Add meta-xilinx-virtualization layer to bblayers.conf as shown below.
25
26```
27$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-virtualization
28```
29
305. The following variables needs to be added to the end of the conf/local.conf file.
31
32```
33# Xen variables
34BOOTMODE = "xen"
35ENABLE_XEN_UBOOT_SCR = "1"
36ENABLE_XEN_DTSI = "1"
37ENABLE_XEN_QEMU_DTSI = "1"
38
39# Default Xen Serial Console is serial0, if you are using serial1 then set as show below.
40XEN_SERIAL_CONSOLES = "serial1"
41
42# Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image.
43IMAGE_FSTYPES += "cpio.gz"
44RAMDISK_IMAGE = "rootfs.cpio.gz"
45
46# Variables for Xen SD WIC image boot flow.
47IMAGE_FSTYPES += "wic"
48WKS_FILES = "xilinx-default-sd.wks"
49
50DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen"
51
52IMAGE_FEATURES += "ssh-server-openssh"
53
54DISTRO_FEATURES:append = " systemd"
55VIRTUAL-RUNTIME_init_manager = "systemd"
56DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
57
58IMAGE_INSTALL:append = " \
59 kernel-module-xen-blkback \
60 kernel-module-xen-gntalloc \
61 kernel-module-xen-gntdev \
62 kernel-module-xen-netback \
63 kernel-module-xen-wdt \
64 xen \
65 xen-tools \
66 xen-tools-xenstat \
67 ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \
68 "
69```
70
716. Continue [Building Instructions](../README.building.md) from step 5.
72
73## Xen Boot Instructions
74
75> **Note:**
76> * This README provides instructions for Xen Dom0 only.
77
781. Follow [Booting Instructions](../README.booting.md) upto step 2.
79
802. Verify Xen Dom0 is up and running on QEMU or target as shown below.
81
82```
83Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0
84
85zynqmp-generic login: root
86root@zynqmp-generic:~# xl list
87Name ID Mem VCPUs State Time(s)
88Domain-0 0 1500 1 r----- 123.5
89root@zynqmp-generic:~# xl info
90host : zynqmp-generic
91release : 6.1.0-xilinx-v2024.1
92version : #1 SMP Thu Dec 21 07:00:11 UTC 2023
93machine : aarch64
94nr_cpus : 4
95max_cpu_id : 3
96nr_nodes : 1
97cores_per_socket : 1
98threads_per_core : 1
99cpu_mhz : 99.990
100hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
101virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1
102total_memory : 4095
103free_memory : 2529
104sharing_freed_memory : 0
105sharing_used_memory : 0
106outstanding_claims : 0
107free_cpus : 0
108xen_major : 4
109xen_minor : 17
110xen_extra : .0
111xen_version : 4.17.0
112xen_caps : xen-3.0-aarch64 xen-3.0-armv7l
113xen_scheduler : credit2
114xen_pagesize : 4096
115platform_params : virt_start=0x200000
116xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty
117xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native
118cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0
119cc_compile_by : santraju
120cc_compile_domain :
121cc_compile_date : 2023-12-12
122build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285
123xend_config_format : 4
124root@zynqmp-generic:~#
125```
126 8
127## Dependencies 9## Dependencies
128 10
@@ -130,25 +12,25 @@ This layer depends on:
130 12
131 URI: https://git.yoctoproject.org/poky 13 URI: https://git.yoctoproject.org/poky
132 layers: meta, meta-poky 14 layers: meta, meta-poky
133 branch: langdale 15 branch: scarthgap
134 16
135 URI: https://git.openembedded.org/meta-openembedded 17 URI: https://git.openembedded.org/meta-openembedded
136 layers: meta-oe, meta-python, meta-filesystems, meta-networking. 18 layers: meta-oe, meta-python, meta-filesystems, meta-networking.
137 branch: langdale 19 branch: scarthgap
138 20
139 URI: 21 URI:
140 https://git.yoctoproject.org/meta-xilinx (official version) 22 https://git.yoctoproject.org/meta-xilinx (official version)
141 https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) 23 https://github.com/Xilinx/meta-xilinx (development and AMD release)
142 layers: meta-xilinx-core, meta-xilinx-standalone 24 layers: meta-xilinx-core, meta-xilinx-standalone
143 branch: langdale or amd xilinx release version (e.g. rel-v2024.1) 25 branch: scarthgap or AMD release version (e.g. rel-v2024.2)
144 26
145 URI: https://git.yoctoproject.org/meta-virtualization 27 URI: https://git.yoctoproject.org/meta-virtualization
146 branch: langdale 28 branch: scarthgap
147 29
148 URI: https://git.yoctoproject.org/meta-security 30 URI: https://git.yoctoproject.org/meta-security
149 layers: meta-tpm 31 layers: meta-tpm
150 branch: langdale 32 branch: scarthgap
151
152## References
153 33
154* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor 34 URI: https://git.yoctoproject.org/meta-arm
35 layers: meta-arm, meta-arm-toolchain
36 branch: scarthgap
diff --git a/meta-xilinx-virtualization/conf/layer.conf b/meta-xilinx-virtualization/conf/layer.conf
index 29506eab..1ce8ccfe 100644
--- a/meta-xilinx-virtualization/conf/layer.conf
+++ b/meta-xilinx-virtualization/conf/layer.conf
@@ -19,5 +19,6 @@ LAYERDEPENDS_xilinx-virtualization = "\
19LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" 19LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap"
20 20
21XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" 21XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%"
22XILINX_XEN_VERSION[v2024.2] = "4.18+stable-xilinx+git%"
22PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" 23PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}"
23PREFERRED_VERSION_xen-tools ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" 24PREFERRED_VERSION_xen-tools ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}"
diff --git a/meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb b/meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb
new file mode 100644
index 00000000..4fecbcae
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb
@@ -0,0 +1,21 @@
1DESCRIPTION = "Xen supported packages"
2
3PACKAGE_ARCH = "${TUNE_PKGARCH}"
4
5inherit packagegroup features_check
6
7REQUIRED_DISTRO_FEATURES = "xen"
8
9XEN_EXTRA_PACKAGES = " \
10 kernel-module-xen-blkback \
11 kernel-module-xen-gntalloc \
12 kernel-module-xen-gntdev \
13 kernel-module-xen-netback \
14 kernel-module-xen-wdt \
15 xen \
16 xen-tools \
17 xen-tools-xenstat \
18 ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \
19 "
20
21RDEPENDS:${PN} = "${XEN_EXTRA_PACKAGES}"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc
index e7bc8d7e..aa308f41 100644
--- a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc
@@ -1,3 +1,5 @@
1QEMU_SYSTEM:aarch64 = "qemu-system-aarch64"
2
1# Only include the sysvinit scripts if sysvinit is enabled. 3# Only include the sysvinit scripts if sysvinit is enabled.
2do_install:append () { 4do_install:append () {
3 if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then 5 if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc
index 4d4b1588..7c563d32 100644
--- a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc
@@ -1,4 +1,4 @@
1SRCREV = "c4ff3360900b7428ca31de2425763acfe7ad9c21" 1SRCREV = "c9de96c0cbe9b2f2aa5e55a0e1e645ca72865102"
2XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" 2XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https"
3XEN_BRANCH = "xlnx_rebase_4.18" 3XEN_BRANCH = "xlnx_rebase_4.18"
4 4