diff options
Diffstat (limited to 'meta-xilinx-virtualization')
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 | |||
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 | ||
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 | ||
3 | This layer enables AMD Xilinx Xen configurations and features for ZynqMP and | 3 | This layer enables AMD Xen configurations and features for ZynqMP and |
4 | Versal devices and also provides related metadata. | 4 | Versal devices and also provides related metadata. |
5 | 5 | ||
6 | ## Xen Build Instructions | 6 | See [Xen Build Instructions](README.build.xen.md) to configure and build xen |
7 | 7 | images. | |
8 | The Yocto Project setup for AMD Xilinx Xen configurations workflow is as follows. | ||
9 | Be sure to read everything below. | ||
10 | |||
11 | 1. Follow [Building Instructions](../README.building.md) upto step 2. | ||
12 | |||
13 | 2. Clone the meta-security repository. | ||
14 | |||
15 | ``` | ||
16 | $ git clone -b <release-branch> https://git.yoctoproject.org/meta-security | ||
17 | ``` | ||
18 | |||
19 | 3. 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 | |||
24 | 4. 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 | |||
30 | 5. The following variables needs to be added to the end of the conf/local.conf file. | ||
31 | |||
32 | ``` | ||
33 | # Xen variables | ||
34 | BOOTMODE = "xen" | ||
35 | ENABLE_XEN_UBOOT_SCR = "1" | ||
36 | ENABLE_XEN_DTSI = "1" | ||
37 | ENABLE_XEN_QEMU_DTSI = "1" | ||
38 | |||
39 | # Default Xen Serial Console is serial0, if you are using serial1 then set as show below. | ||
40 | XEN_SERIAL_CONSOLES = "serial1" | ||
41 | |||
42 | # Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image. | ||
43 | IMAGE_FSTYPES += "cpio.gz" | ||
44 | RAMDISK_IMAGE = "rootfs.cpio.gz" | ||
45 | |||
46 | # Variables for Xen SD WIC image boot flow. | ||
47 | IMAGE_FSTYPES += "wic" | ||
48 | WKS_FILES = "xilinx-default-sd.wks" | ||
49 | |||
50 | DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen" | ||
51 | |||
52 | IMAGE_FEATURES += "ssh-server-openssh" | ||
53 | |||
54 | DISTRO_FEATURES:append = " systemd" | ||
55 | VIRTUAL-RUNTIME_init_manager = "systemd" | ||
56 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | ||
57 | |||
58 | IMAGE_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 | |||
71 | 6. 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 | |||
78 | 1. Follow [Booting Instructions](../README.booting.md) upto step 2. | ||
79 | |||
80 | 2. Verify Xen Dom0 is up and running on QEMU or target as shown below. | ||
81 | |||
82 | ``` | ||
83 | Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0 | ||
84 | |||
85 | zynqmp-generic login: root | ||
86 | root@zynqmp-generic:~# xl list | ||
87 | Name ID Mem VCPUs State Time(s) | ||
88 | Domain-0 0 1500 1 r----- 123.5 | ||
89 | root@zynqmp-generic:~# xl info | ||
90 | host : zynqmp-generic | ||
91 | release : 6.1.0-xilinx-v2024.1 | ||
92 | version : #1 SMP Thu Dec 21 07:00:11 UTC 2023 | ||
93 | machine : aarch64 | ||
94 | nr_cpus : 4 | ||
95 | max_cpu_id : 3 | ||
96 | nr_nodes : 1 | ||
97 | cores_per_socket : 1 | ||
98 | threads_per_core : 1 | ||
99 | cpu_mhz : 99.990 | ||
100 | hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000 | ||
101 | virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1 | ||
102 | total_memory : 4095 | ||
103 | free_memory : 2529 | ||
104 | sharing_freed_memory : 0 | ||
105 | sharing_used_memory : 0 | ||
106 | outstanding_claims : 0 | ||
107 | free_cpus : 0 | ||
108 | xen_major : 4 | ||
109 | xen_minor : 17 | ||
110 | xen_extra : .0 | ||
111 | xen_version : 4.17.0 | ||
112 | xen_caps : xen-3.0-aarch64 xen-3.0-armv7l | ||
113 | xen_scheduler : credit2 | ||
114 | xen_pagesize : 4096 | ||
115 | platform_params : virt_start=0x200000 | ||
116 | xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty | ||
117 | xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native | ||
118 | cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0 | ||
119 | cc_compile_by : santraju | ||
120 | cc_compile_domain : | ||
121 | cc_compile_date : 2023-12-12 | ||
122 | build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285 | ||
123 | xend_config_format : 4 | ||
124 | root@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 = "\ | |||
19 | LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" | 19 | LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" |
20 | 20 | ||
21 | XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" | 21 | XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" |
22 | XILINX_XEN_VERSION[v2024.2] = "4.18+stable-xilinx+git%" | ||
22 | PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" | 23 | PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" |
23 | PREFERRED_VERSION_xen-tools ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" | 24 | PREFERRED_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 @@ | |||
1 | DESCRIPTION = "Xen supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup features_check | ||
6 | |||
7 | REQUIRED_DISTRO_FEATURES = "xen" | ||
8 | |||
9 | XEN_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 | |||
21 | RDEPENDS:${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 @@ | |||
1 | QEMU_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. |
2 | do_install:append () { | 4 | do_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 @@ | |||
1 | SRCREV = "c4ff3360900b7428ca31de2425763acfe7ad9c21" | 1 | SRCREV = "c9de96c0cbe9b2f2aa5e55a0e1e645ca72865102" |
2 | XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" | 2 | XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" |
3 | XEN_BRANCH = "xlnx_rebase_4.18" | 3 | XEN_BRANCH = "xlnx_rebase_4.18" |
4 | 4 | ||