summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--README.booting.md12
-rw-r--r--README.building.md82
-rw-r--r--docs/README.booting.microblaze.md121
-rw-r--r--docs/README.booting.storage.md22
-rw-r--r--docs/README.booting.versal.md117
-rw-r--r--docs/README.booting.zynq.md124
-rw-r--r--docs/README.booting.zynqmp.md141
-rw-r--r--docs/README.dfx.user.dts.md326
-rw-r--r--docs/README.fpgamanager.custom.md478
-rw-r--r--docs/README.fw.package.md61
-rw-r--r--meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf52
-rw-r--r--meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend2
-rw-r--r--meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi20
-rw-r--r--meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch305
-rw-r--r--meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch607
-rw-r--r--meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch54
-rw-r--r--meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg33
-rw-r--r--meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend12
-rw-r--r--meta-xilinx-core/classes-global/xilinx-microblaze.bbclass (renamed from meta-xilinx-core/classes/xilinx-microblaze.bbclass)0
-rw-r--r--meta-xilinx-core/classes-recipe/amd_spi_image.bbclass142
-rw-r--r--meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass (renamed from meta-xilinx-core/classes/dfx_user_dts.bbclass)232
-rw-r--r--meta-xilinx-core/classes-recipe/fw-package.bbclass94
-rw-r--r--meta-xilinx-core/classes-recipe/image-wic-utils.bbclass (renamed from meta-xilinx-core/classes/image-wic-utils.bbclass)0
-rw-r--r--meta-xilinx-core/classes-recipe/kernel-simpleimage.bbclass (renamed from meta-xilinx-core/classes/kernel-simpleimage.bbclass)0
-rw-r--r--meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass (renamed from meta-xilinx-core/classes/qemuboot-xilinx.bbclass)0
-rw-r--r--meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass (renamed from meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass)0
-rw-r--r--meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass (renamed from meta-xilinx-core/classes/xilinx-platform-init.bbclass)0
-rw-r--r--meta-xilinx-core/classes/fpgamanager_custom.bbclass24
-rw-r--r--meta-xilinx-core/conf/layer.conf11
-rw-r--r--meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc6
-rw-r--r--meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc16
-rw-r--r--meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc9
-rw-r--r--meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc3
-rw-r--r--meta-xilinx-core/conf/machine/versal-net-generic.conf2
-rw-r--r--meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi65
-rw-r--r--meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi65
-rw-r--r--meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb16
-rw-r--r--meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb16
-rw-r--r--meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend4
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-7.1.inc (renamed from meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc)12
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc71
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend1
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend1
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend1
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend1
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend1
-rw-r--r--meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend3
-rw-r--r--meta-xilinx-core/lib/devtool/boot-jtag.py272
-rw-r--r--meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb29
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb (renamed from meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb)0
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc4
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb (renamed from meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb)0
-rw-r--r--meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb8
-rw-r--r--meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb54
-rw-r--r--meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb72
-rw-r--r--meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c36
-rw-r--r--meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb23
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch28
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb (renamed from meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb)2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg83
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc (renamed from meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc)6
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc9
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic12
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.zynqmp2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc2
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb (renamed from meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb)2
-rw-r--r--meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb18
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch113
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc290
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch33
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch355
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch44
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch29
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch32
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch49
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch31
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch41
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch46
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch40
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch20
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch18
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch45
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.binbin0 -> 4096 bytes
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init75
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev2
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest13
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb6
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc7
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc28
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc3
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc79
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc2
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb11
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb35
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb38
-rw-r--r--meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb29
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0001-PATCH-libdrm-Update-drm-header-file-with-XV15-and-XV.patch37
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0001-headers-Sync-with-HDR-from-v5.15.patch207
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0001-modetest-Add-YUV444-and-X403-format-support-for-mode.patch433
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0002-modetest-call-drmModeCrtcSetGamma-only-if-add_proper.patch32
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0003-modetest-Add-semiplanar-10bit-pattern-support-for-mo.patch602
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/files/0004-modetest-fix-smpte-colour-pattern-issue-for-XV20-and.patch38
-rw-r--r--meta-xilinx-core/recipes-graphics/drm/libdrm_%.bbappend9
-rw-r--r--meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb1
-rw-r--r--meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch81
-rw-r--r--meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb24
-rw-r--r--meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb24
-rw-r--r--meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch74
-rw-r--r--meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb23
-rw-r--r--meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg1
-rw-r--r--meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc2
-rw-r--r--meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb19
-rw-r--r--meta-xilinx-core/recipes-kernel/perf/perf-perl.inc11
-rw-r--r--meta-xilinx-core/recipes-kernel/perf/perf.bb414
-rwxr-xr-xmeta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py100
-rw-r--r--meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch31
-rw-r--r--meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend7
-rw-r--r--meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch61
-rw-r--r--meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend2
-rw-r--r--meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch39
-rw-r--r--meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch41
-rw-r--r--meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend5
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules3
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb39
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb50
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb41
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb38
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb38
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb41
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb50
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb4
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb38
-rw-r--r--meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch370
-rw-r--r--meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch29
-rw-r--r--meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb4
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb29
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt.inc6
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch17
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb4
-rw-r--r--meta-xilinx-standalone-experimental/README.md150
-rw-r--r--meta-xilinx-standalone-experimental/classes-recipe/esw.bbclass (renamed from meta-xilinx-standalone-experimental/classes/esw.bbclass)40
-rw-r--r--meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass31
-rw-r--r--meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass (renamed from meta-xilinx-standalone-experimental/classes/esw_examples.bbclass)1
-rw-r--r--meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc11
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb29
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_git.bb)10
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb19
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb39
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb22
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb44
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb48
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb19
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb41
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb9
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc27
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_git.bb)23
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb11
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb22
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb22
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb28
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb)3
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bbappend (renamed from meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_2024.1.bbappend (renamed from meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_git.bbappend)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bbappend (renamed from meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_git.bbappend)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_2024.1.bbappend (renamed from meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_git.bbappend)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup102
-rwxr-xr-xmeta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh1260
-rw-r--r--meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb91
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/avbuf_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/avbuf_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axicdma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axicdma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axidma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axidma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axipmon_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axipmon_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/axivdma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/axivdma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/bram-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/bram-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/bram_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/bram_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/can-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/can-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/can_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/can_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/canfd_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/canfd_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/canps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/canps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/canps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/canps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/cframe_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/cframe_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb5
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/clockps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/clockps_git.bb)3
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/common_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/common_git.bb)6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/csudma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/csudma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/devcfg_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/devcfg_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb15
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dmaps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dmaps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dpdma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dpdma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/dppsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/dppsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/emaclite_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/emaclite_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/emacps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/emacps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/gpio_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/gpio_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/gpiops_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/gpiops_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb5
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb13
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/iic-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/iic-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/iic_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/iic_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/iicps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/iicps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/intc-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/intc-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/intc_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/intc_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/iomodule_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/iomodule_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/llfifo_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/llfifo_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mbox_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mbox_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mcdma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mcdma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/mutex_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/mutex_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/qspips_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/qspips_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/resetps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/resetps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb8
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/scugic_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/scugic_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sdps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sdps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/spips-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/spips-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/spips_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/spips_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmon_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmon_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/trafgen_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/trafgen_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/ttcps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/ttcps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartlite_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartlite_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartns550_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartns550_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/usb-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/usb-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/usb_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/usb_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-csc_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-csc_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb11
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-mix_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-mix_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/video-common_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/video-common_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/vprocss_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/vprocss_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/vtc_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/vtc_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/wdtps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/wdtps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/wdttb_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/wdttb_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xadcps_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xadcps_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-drivers/zdma_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-drivers/zdma_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/libxil_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb)15
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/lwip_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/lwip_git.bb)16
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilffs_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilffs_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilloader_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilloader_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb33
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb10
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilpm_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilpm_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_git.bb)6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_git.bb)4
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_git.bb)4
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb14
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb6
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilsem_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilsem_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilskey-example_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_git.bb)58
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilskey_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilskey_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_git.bb)3
-rw-r--r--meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_2024.1.bb (renamed from meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_git.bb)0
-rw-r--r--meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend1
-rw-r--r--meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend1
-rw-r--r--meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass24
-rw-r--r--meta-xilinx-standalone/conf/distro/xilinx-standalone.inc8
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb11
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb29
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb16
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb34
-rw-r--r--meta-xilinx-virtualization/COPYING.MIT17
-rw-r--r--meta-xilinx-virtualization/README.md143
-rw-r--r--meta-xilinx-virtualization/conf/layer.conf27
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend1
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend1
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc4
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_7.1.inc33
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc20
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-pt-fix-syntax-error-that-causes-FTBFS-in-some-co.patch40
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch51
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen_common-return-error-from-xen_create_ioreq_server.patch55
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-add-pseudo-RAM-region-for-grant-mappings.patch252
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-mapcache-move-xen-mapcache.c-to-hw-xen.patch88
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-hw-i386-xen-rearrange-xen_hvm_init_pc.patch106
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch113
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-hvm-move-x86-specific-fields-out-of-XenIOState.patch180
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch49
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-memory-add-MemoryRegion-map-and-unmap-callbacks.patch150
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-xen-hvm-create-arch_handle_ioreq-and-arch_xen_set_me.patch192
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-add-map-and-unmap-callbacks-for-grant-region.patch255
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-hvm-move-common-functions-to-hw-xen-xen-hvm-comm.patch2094
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-mapcache-Fix-build-on-Arm.patch37
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-skip-ioreq-creation-on-ioreq-registration-failur.patch42
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-accel-xen-xen-all-export-xenstore_record_dm_state.patch48
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-hw-arm-Add-grant-mapping.patch39
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0009-xen-hvm-enable-xen-hvm-common-build-for-ARM.patch43
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0010-hw-arm-introduce-xenpv-machine.patch230
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0011-meson.build-do-not-set-have_xen_pci_passthrough-for-.patch33
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0012-xen-arm-call-qemu_find_tpm_be-if-CONFIG_TPM.patch72
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0013-arm-xenpv-fix-TPM-address-print-warning.patch27
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0014-xen_arm-Create-virtio-mmio-devices-during-initializa.patch83
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0015-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch105
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch79
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch353
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch116
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch124
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch55
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch70
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch117
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch153
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch117
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch49
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch155
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch262
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch30
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend1
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend1
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend5
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend5
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu_7.1%.bbappend5
-rw-r--r--meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend5
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch57
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch73
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch43
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch54
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc76
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc117
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc25
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc861
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bbappend2
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bb18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend2
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.17.inc7
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc7
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen.inc233
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb19
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bbappend20
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bb18
-rw-r--r--meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend20
-rw-r--r--meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend8
500 files changed, 16788 insertions, 3670 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..bee8a64b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
__pycache__
diff --git a/README.booting.md b/README.booting.md
index 0f96a138..a632d7f9 100644
--- a/README.booting.md
+++ b/README.booting.md
@@ -5,10 +5,22 @@ AMD Xilinx Devices support different boot modes such as JTAG, SD, eMMC, QSPI etc
5## Booting Images with QEMU 5## Booting Images with QEMU
6 6
7Once images are built, you can simulate the image using QEMU emulator. 7Once images are built, you can simulate the image using QEMU emulator.
8
9> **Note:** Use `slirp` option if you don't have sudo permissions and tap devices
10 are enabled on your build host.
11
12* Without slirp
8``` 13```
9$ MACHINE=<target_mahcine_name> runqemu nographic 14$ MACHINE=<target_mahcine_name> runqemu nographic
10``` 15```
11 16
17* With slirp
18```
19$ MACHINE=<target_mahcine_name> runqemu nographic slirp
20```
21
22> **Note:** To terminate qemu, usually the command is ctrl-a x
23
12## Booting Images with Hardware 24## Booting Images with Hardware
13 25
14Follow booting instructions [README](docs) for more details. 26Follow booting instructions [README](docs) for more details.
diff --git a/README.building.md b/README.building.md
index 45deadb9..28ba1b24 100644
--- a/README.building.md
+++ b/README.building.md
@@ -17,13 +17,22 @@ $ cd sources
17> **Note:** 17> **Note:**
18> * *release_branch:* refers to upstream stable release branch. 18> * *release_branch:* refers to upstream stable release branch.
19> * *rel-version:* refers to amd xilinx release version. 19> * *rel-version:* refers to amd xilinx release version.
20
20``` 21```
21$ mkdir sources 22$ mkdir sources
22$ git clone -b <release-branch> https://git.yoctoproject.org/poky.git 23$ git clone -b <release-branch> https://git.yoctoproject.org/poky.git
23$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git 24$ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git
25$ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization
24$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git 26$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git
25$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git 27$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git
26``` 28```
29> **Note:** When meta-xilinx layer is cloned using git tool by default it will
30> not clone [gen-machine-conf](https://github.com/Xilinx/gen-machine-conf.git)
31> repo as submodules, make sure this repo https://github.com/Xilinx/meta-xilinx.git
32> is cloned using `--recurse-submodules` option as shown.
33> `$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules`
34> Skip this step if you are using yocto-manifests https://github.com/Xilinx/yocto-manifests
35
273. Initialize a build environment using the `oe-init-build-env` script. 363. Initialize a build environment using the `oe-init-build-env` script.
28``` 37```
29$ source poky/oe-init-build-env 38$ source poky/oe-init-build-env
@@ -39,6 +48,7 @@ $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe
39$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python 48$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python
40$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems 49$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems
41$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking 50$ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking
51$ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization
42$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze 52$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze
43$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core 53$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core
44$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone 54$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone
@@ -55,45 +65,47 @@ $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools
55``` 65```
56MACHINE = "<target_machine_name>" 66MACHINE = "<target_machine_name>"
57``` 67```
58Available target machines are: 68* For list of available target machines see meta layer README files.
59 69
60| Device | target machines | 70 * [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files)
61|------------|---------------------| 71 * [meta-kria README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files)
62| MicroBlaze | microblaze-generic | 72
63| | ac701-microblazeel | 736. For NFS build host system modify the build/conf/local.conf and add TMPDIR
64| | kc705-microblazeel | 74 path as shown below. On local storage $TMPDIR will be set to build/tmp
65| | kcu105-microblazeel | 75```
66| | vcu118-microblazeel | 76TMPDIR = "/tmp/$USER/yocto/release_version/build"
67| Zynq-7000 | zynq-generic | 77```
68| | zc702-zynq7 | 78
69| | zc706-zynq7 | 797. Modify the build/conf/local.conf file to add wic image to default target
70| ZynqMP | zynqmp-generic | 80 image as shown below.
71| | zcu102-zynqmp | 81```
72| | zcu104-zynqmp | 82IMAGE_FSTYPES += "wic"
73| | zcu106-zynqmp | 83WKS_FILES = "xilinx-default-sd.wks"
74| | zcu111-zynqmp | 84```
75| | zcu208-zynqmp | 85
76| | zcu216-zynqmp | 868. Build the qemu-helper-native package to setup QEMU network tap devices.
77| | zcu670-zynqmp | 87```
78| | zcu1275-zynqmp | 88$ bitbake qemu-helper-native
79| | zcu1285-zynqmp | 89```
80| | ultra96-zynqmp | 90
81| Versal | versal-generic | 919. Manually configure a tap interface for your build system. As root run
82| | versal-net-generic | 92 <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a
83| | vck190-versal | 93 list of tap devices. Once tap interfaces are successfully create you should
84| | vmk180-versal | 94 be able to see all the interfaces by running ifconfig command.
85| | vek280-versal | 95
86| | vpk120-versal | 96```
87| | vpk180-versal | 97$ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -u $USER) $(id -g $USER) 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin
88| | vhk158-versal | 98```
89 99
906. Build an OS image for the target using `bitbake` command. 10010. Build an OS image for the target using `bitbake` command.
91> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt 101> **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt
92> for available target image-name. e.g. core-image-minimal 102> for available target image-name. e.g. core-image-minimal or petalinux-image-minimal
93 103
94``` 104```
95$ bitbake <image-name> 105$ bitbake <target-image>
96``` 106```
97 107
987. Once complete the images for the target machine will be available in the output 1087. Once complete the images for the target machine will be available in the output
99 directory `${TMPDIR}/deploy/images/${MACHINE}/`. 109 directory `${TMPDIR}/deploy/images/${MACHINE}/`.
110
1118. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md)
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md
index 1ffcc3c8..91c0eda9 100644
--- a/docs/README.booting.microblaze.md
+++ b/docs/README.booting.microblaze.md
@@ -4,11 +4,16 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo
4 4
5* [Setting Up the Target](#setting-up-the-target) 5* [Setting Up the Target](#setting-up-the-target)
6* [Booting from JTAG](#booting-from-jtag) 6* [Booting from JTAG](#booting-from-jtag)
7 * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) 7 * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
8 * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) 8 * [Deploying the images to target](#deploying-the-images-to-target)
9 * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) 9 * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
10 * [Using XSCT](#using-xsct) 10 * [Manually executing xsdb commands](#manually-executing-xsdb-commands)
11 * [Using TFTP](#using-tftp) 11 * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb)
12 * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb)
13 * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script)
14 * [Using XSDB](#using-xsdb)
15 * [Using TFTP](#using-tftp)
16 * [Booting Linux](#booting-linux)
12 17
13## Setting Up the Target 18## Setting Up the Target
14 19
@@ -34,59 +39,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo
34 39
35## Booting from JTAG 40## Booting from JTAG
36 41
37This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 42This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
38the associated JTAG device drivers. This also requires access to the JTAG interface 43the associated JTAG device drivers. This also requires access to the JTAG interface
39on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG 44on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
40modules. 45modules.
41 46
421. Source the Vivado or Vitis tools `settings.sh` scripts. 47### Sourcing the XSDB tools
432. Power on the board, Open the XSCT console in the Vitis IDE by clicking the 48
44 XSCT button. Alternatively, you can also open the XSCT console by selecting 49Source the Vivado or Vitis tools `settings.sh` scripts.
45 Xilinx -> XSCT Console. 50
51### Deploying the images to target
52
53Deploying the images can be done in two methods.
54
55#### Using devtool boot-jtag script
56
571. Run devtool command to generate the boot-jtag.tcl script.
58```
59$ devtool boot-jtag --help
60$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
61```
622. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
633. Execute this script using xsdb tool as shown below.
64```
65$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
66```
67
68#### Manually executing xsdb commands
69
701. Power on the board, Launch the XSDB shell from command line as shown below.
46``` 71```
47$ xsct 72$ xsdb
48``` 73```
493. In the XSCT console, connect to the target over JTAG using the connect command. 742. In the XSDB console, connect to the target over JTAG using the connect command.
50 Optionally user can use `-url` to specify the local/remote hw_server. The 75 Optionally user can use `-url` to specify the local/remote hw_server. The
51 connect command returns the channel ID of the connection. 76 connect command returns the channel ID of the connection.
52``` 77```
53xsct% connect 78xsdb% connect
54``` 79```
554. The targets command lists the available targets and allows you to select a 803. The targets command lists the available targets and allows you to select a
56 target using its ID. The targets are assigned IDs as they are discovered on 81 target using its ID. The targets are assigned IDs as they are discovered on
57 the JTAG chain, so the IDs can change from session to session. 82 the JTAG chain, so the IDs can change from session to session.
58``` 83```
59xsct% targets 84xsdb% targets
60``` 85```
61 86
62> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 87> **Note:** For non-interactive usage such as scripting, you can use the `-filter`
63 option to select a target instead of selecting the target using its ID. 88 option to select a target instead of selecting the target using its ID.
64 89
65### Loading Bitstream using XSCT 90##### Loading Bitstream using XSDB
66 91
67* Download the bitstream for the target using XSCT with the `fpga` command. Microblaze 92* Download the bitstream for the target using XSDB with the `fpga` command. Microblaze
68bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user 93bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user
69can use `fpga -no-revision-check` to skip FPGA silicon revision. 94can use `fpga -no-revision-check` to skip FPGA silicon revision.
70 95
71``` 96```
72xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit 97xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit
73xsct% after 2000 98xsdb% after 2000
74xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} 99xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"}
75xsct% catch {stop} 100xsdb% catch {stop}
76xsct% after 1000 101xsdb% after 1000
77``` 102```
78### Loading U-boot using XSCT 103##### Loading U-boot using XSDB
79 104
801. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be 1051. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be
81located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend 106located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend
82the execution of active target using `stop` command. 107the execution of active target using `stop` command.
83``` 108```
84xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf 109xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf
85``` 110```
862. After loading u-boot.elf resume the execution of active target using the `con` 1112. After loading u-boot.elf resume the execution of active target using the `con`
87command in XSCT shell. 112command in XSDB shell.
88``` 113```
89xsct% con 114xsdb% con
90``` 115```
913. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1163. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
92``` 117```
@@ -95,7 +120,7 @@ Hit any key to stop autoboot: 0
95U-Boot> 120U-Boot>
96``` 121```
97 122
98### Loading Kernel, Device tree, Root Filesystem and U-boot boot script 123##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script
99 124
100Load the images into the target DDR/MIG load address i.e., 125Load the images into the target DDR/MIG load address i.e.,
101`DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) 126`DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr)
@@ -121,48 +146,50 @@ this process can take a long time to execute (more than 10 minutes). If your
121system has ethernet it is recommended that you use TFTP to load these images 146system has ethernet it is recommended that you use TFTP to load these images
122using U-Boot. 147using U-Boot.
123 148
124#### Using XSCT 149###### Using XSDB
125 150
1261. Suspend the execution of active target using `stop` command in XSCT. 1511. Suspend the execution of active target using `stop` command in XSDB.
127``` 152```
128xsct% stop 153xsdb% stop
129``` 154```
1302. Using the `dow` command to load the images into the target DDR/MIG 1552. Using the `dow` command to load the images into the target DDR/MIG
131load address. 156load address.
132``` 157```
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 158xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 159xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000
135xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 160xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000
136xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 161xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000
137``` 162```
138 163
139#### Using TFTP 164###### Using TFTP
140 165
1411. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1661. Setup TFTP directory on host machine and copy the images to your TFTP directory
167 so that you can load them from U-Boot.
1682. Configure the `ipaddr` and `serverip` of the U-Boot environment.
142``` 169```
143U-Boot> set serverip <server ip> 170U-Boot> set serverip <server ip>
144U-Boot> set ipaddr <board ip> 171U-Boot> set ipaddr <board ip>
145``` 172```
1462. Load the images to DDR address. Make sure images are copied to tftp directory. 1733. Load the images to DDR address.
147``` 174```
148U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub 175U-Boot> tftpboot 0x80000000 linux.bin.ub
149U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb 176U-Boot> tftpboot 0x81e00000 system.dtb
150U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 177U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
151U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr 178U-Boot> tftpboot 0xff200000 boot.scr
152``` 179```
153 180
154### Booting Linux 181##### Booting Linux
155 182
156Once the images are loaded continue the execution. 183Once the images are loaded continue the execution.
157 184
1581. After loading images resume the execution of active target using the `con` 1851. After loading images resume the execution of active target using the `con`
159command in XSCT shell, Skip step 1 for if you have used TFTP to load images. 186command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
160``` 187```
161xsct% con 188xsdb% con
162``` 189```
1632. Terminate xsct shell. 1902. Terminate xsdb shell.
164``` 191```
165xsct% exit 192xsdb% exit
166``` 193```
1673. In the target Serial Terminal, from U-Boot prompt run `boot` command. 1943. In the target Serial Terminal, from U-Boot prompt run `boot` command.
168``` 195```
diff --git a/docs/README.booting.storage.md b/docs/README.booting.storage.md
index 4d33600d..2a1f66a7 100644
--- a/docs/README.booting.storage.md
+++ b/docs/README.booting.storage.md
@@ -22,7 +22,7 @@ This section describes how to manually prepare and populate an SD card image.
22There are automation tools in OpenEmbedded that can generate disk images already 22There are automation tools in OpenEmbedded that can generate disk images already
23formatted and prepared such that they can be written directly to a disk. Refer 23formatted and prepared such that they can be written directly to a disk. Refer
24to the Yocto Project Manual for more details: 24to the Yocto Project Manual for more details:
25https://docs.yoctoproject.org/4.1.2/singleindex.html#creating-partitioned-images-using-wic 25https://docs.yoctoproject.org/4.1.4/singleindex.html#creating-partitioned-images-using-wic
26 26
27## Writing image to SD or eMMC device 27## Writing image to SD or eMMC device
28 28
@@ -33,11 +33,17 @@ There are two ways to write the images to SD card or eMMC device.
332. To write image to eMMC device make sure you need to boot Linux from JTAG or 332. To write image to eMMC device make sure you need to boot Linux from JTAG or
34 SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. 34 SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory.
35 35
36> **Note:** `<target-image>` refers to core-image-minimal or petalinux-image-minimal
37
36### Using Wic file 38### Using Wic file
37 39
38Write wic image file to the SD card or eMMC device. 40Write wic image file to the SD card or eMMC device. Use dd command or balena
41etcher to flash the wic image file to SD card. WIC image will be
42build/tmp/deploy/${MACHINE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.wic, See
43[Flashing Images Using bmaptool](https://docs.yoctoproject.org/singleindex.html#flashing-images-using-bmaptool)
44for fast and easy way to flash the image
39``` 45```
40$ sudo dd if=xilinx-default-sd-${DATETIME}-sda.direct of=/dev/mmcblk<devnum> bs=4M 46$ sudo dd if=<target-image>-${MACHINE}-${DATETIME}.rootfs.wic of=/dev/mmcblk<devnum> bs=4M
41``` 47```
42 48
43### Using Yocto images 49### Using Yocto images
@@ -65,12 +71,12 @@ $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin
65$ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr 71$ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr
66$ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image 72$ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image
67$ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb 73$ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb
68$ cp ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot 74$ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot
69``` 75```
704. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD 764. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD
71 card or eMMC device EXT4 partition. 77 card or eMMC device EXT4 partition.
72``` 78```
73$ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs 79$ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs
74$ sync 80$ sync
75``` 81```
765. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. 825. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes.
@@ -97,10 +103,10 @@ $ sudo lsblk /dev/sd<X> -o NAME,FSTYPE,LABEL,PARTLABEL
97``` 103```
98$ sudo mount -L root /mnt/rootfs` 104$ sudo mount -L root /mnt/rootfs`
99``` 105```
1003. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content 1063. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content
101 to the USB or SATA device EXT4 partition. 107 to the USB or SATA device EXT4 partition.
102``` 108```
103$ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs 109$ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs
104$ sync 110$ sync
105``` 111```
1064. Unmount the USB or SATA device. 1124. Unmount the USB or SATA device.
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md
index afdeba2b..ef817bf3 100644
--- a/docs/README.booting.versal.md
+++ b/docs/README.booting.versal.md
@@ -5,10 +5,15 @@ modes.
5 5
6* [Setting Up the Target](#setting-up-the-target) 6* [Setting Up the Target](#setting-up-the-target)
7* [Booting from JTAG](#booting-from-jtag) 7* [Booting from JTAG](#booting-from-jtag)
8 * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct) 8 * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
9 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) 9 * [Deploying the images to target](#deploying-the-images-to-target)
10 * [Using XSCT](#using-xsct) 10 * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
11 * [Using TFTP](#using-tftp) 11 * [Manually executing xsdb commands](#manually-executing-xsdb-commands)
12 * [Loading boot.bin using XSDB](#loading-bootbin-using-xsdb)
13 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script)
14 * [Using XSDB](#using-xsdb)
15 * [Using TFTP](#using-tftp)
16 * [Booting Linux](#booting-linux)
12* [Booting from SD](#booting-from-sd) 17* [Booting from SD](#booting-from-sd)
13* [Booting from QSPI](#booting-from-qspi) 18* [Booting from QSPI](#booting-from-qspi)
14 19
@@ -37,37 +42,57 @@ modes.
37 42
38## Booting from JTAG 43## Booting from JTAG
39 44
40This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 45This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
41the associated JTAG device drivers. This also requires access to the JTAG interface 46the associated JTAG device drivers. This also requires access to the JTAG interface
42on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG 47on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
43modules. 48modules.
44 49
451. Source the Vivado or Vitis tools `settings.sh` scripts. 50### Sourcing the XSDB tools
462. Power on the board, Open the XSCT console in the Vitis IDE by clicking the 51
47 XSCT button. Alternatively, you can also open the XSCT console by selecting 52Source the Vivado or Vitis tools `settings.sh` scripts.
48 Xilinx -> XSCT Console. 53
54### Deploying the images to target
55
56Deploying the images can be done in two methods.
57
58#### Using devtool boot-jtag script
59
601. Run devtool command to generate the boot-jtag.tcl script.
61```
62$ devtool boot-jtag --help
63$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
64```
652. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
663. Execute this script using xsdb tool as shown below.
67```
68$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
69```
70
71#### Manually executing xsdb commands
72
731. Power on the board, Launch the XSDB shell from command line as shown below.
49``` 74```
50$ xsct 75$ xsdb
51``` 76```
523. In the XSCT console, connect to the target over JTAG using the connect command. 772. In the XSDB console, connect to the target over JTAG using the connect command.
53 Optionally user can use `-url` to specify the local/remote hw_server. The 78 Optionally user can use `-url` to specify the local/remote hw_server. The
54 connect command returns the channel ID of the connection. 79 connect command returns the channel ID of the connection.
55``` 80```
56xsct% connect 81xsdb% connect
57``` 82```
584. The targets command lists the available targets and allows you to select a 833. The targets command lists the available targets and allows you to select a
59 target using its ID. The targets are assigned IDs as they are discovered on 84 target using its ID. The targets are assigned IDs as they are discovered on
60 the JTAG chain, so the IDs can change from session to session. 85 the JTAG chain, so the IDs can change from session to session.
61``` 86```
62xsct% targets 87xsdb% targets
63``` 88```
64 89
65> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 90> **Note:** For non-interactive usage such as scripting, you can use the `-filter`
66 option to select a target instead of selecting the target using its ID. 91 option to select a target instead of selecting the target using its ID.
67 92
68### Loading boot.bin using XSCT 93##### Loading boot.bin using XSDB
69 94
701. Download the boot.bin for the target using XSCT with the `device program` command. 951. Download the boot.bin for the target using XSDB with the `device program` command.
71Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default 96Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default
72boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and 97boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and
73system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. 98system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file.
@@ -76,15 +101,15 @@ system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file
76> u-boot and kernel. 101> u-boot and kernel.
77 102
78``` 103```
79xsct% targets -set -nocase -filter {name =~ "*PMC*"} 104xsdb% targets -set -nocase -filter {name =~ "*PMC*"}
80xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin 105xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin
81xsct% targets -set -nocase -filter {name =~ "*A72*#0"} 106xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
82xsct% stop 107xsdb% stop
83``` 108```
842. After loading boot.bin resume the execution of active target using the `con` 1092. After loading boot.bin resume the execution of active target using the `con`
85command in XSCT shell. 110command in XSDB shell.
86``` 111```
87xsct% con 112xsdb% con
88``` 113```
893. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1143. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
90``` 115```
@@ -93,7 +118,7 @@ Hit any key to stop autoboot: 0
93U-Boot> 118U-Boot>
94``` 119```
95 120
96### Loading Kernel, Root Filesystem and U-boot boot script 121##### Loading Kernel, Root Filesystem and U-boot boot script
97 122
98Load the images into the target DDR/PL DRR load address i.e., 123Load the images into the target DDR/PL DRR load address i.e.,
99`DDR base address + <image_offset>`. 124`DDR base address + <image_offset>`.
@@ -119,49 +144,51 @@ using U-Boot.
119> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this 144> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this
120> is already part of boot.bin we can skip loading dtb, else load kernel dtb. 145> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
121 146
122#### Using XSCT 147###### Using XSDB
123 148
1241. Suspend the execution of active target using `stop` command in XSCT. 1491. Suspend the execution of active target using `stop` command in XSDB.
125``` 150```
126xsct% stop 151xsdb% stop
127``` 152```
1282. Using the `dow` command to load the images into the target DDR/PL DDR load 1532. Using the `dow` command to load the images into the target DDR/PL DDR load
129 address. 154 address.
130``` 155```
131xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 156xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000
132xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 157xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 158xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 159xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
135xsct% targets -set -nocase -filter {name =~ "*A72*#0"} 160xsdb% targets -set -nocase -filter {name =~ "*A72*#0"}
136``` 161```
137 162
138#### Using TFTP 163###### Using TFTP
139 164
1401. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1651. Setup TFTP directory on host machine and copy the images to your TFTP directory
166 so that you can load them from U-Boot.
1672. Configure the `ipaddr` and `serverip` of the U-Boot environment.
141``` 168```
142Versal> set serverip <server ip> 169Versal> set serverip <server ip>
143Versal> set ipaddr <board ip> 170Versal> set ipaddr <board ip>
144``` 171```
1452. Load the images to DDR address. Make sure images are copied to tftp directory. 1723. Load the images to DDR address.
146``` 173```
147U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image 174U-Boot> tftpboot 0x200000 Image
148U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb 175U-Boot> tftpboot 0x1000 system.dtb
149U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 176U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
150U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr 177U-Boot> tftpboot 0x20000000 boot.scr
151 178
152``` 179```
153### Booting Linux 180##### Booting Linux
154 181
155Once the images are loaded continue the execution. 182Once the images are loaded continue the execution.
156 183
1571. After loading images resume the execution of active target using the `con` 1841. After loading images resume the execution of active target using the `con`
158command in XSCT shell, Skip step 1 for if you have used TFTP to load images. 185command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
159``` 186```
160xsct% con 187xsdb% con
161``` 188```
1622. Terminate xsct shell. 1892. Terminate xsdb shell.
163``` 190```
164xsct% exit 191xsdb% exit
165``` 192```
1663. In the target Serial Terminal, from U-Boot prompt run `boot` command. 1933. In the target Serial Terminal, from U-Boot prompt run `boot` command.
167``` 194```
@@ -181,9 +208,9 @@ U-Boot> boot
181 card (part number: X_EBM-01, REV_A01). 208 card (part number: X_EBM-01, REV_A01).
1822. With the card powered off, install the QSPI daughter card. 2092. With the card powered off, install the QSPI daughter card.
1833. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that 2103. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that
184 U-Boot is running and also have boot.bin copied to DDR location using XSCT 211 U-Boot is running and also have boot.bin copied to DDR location using XSDB
185 `dow` or `tftpboot` or `fatload` command. 212 `dow` or `tftpboot` or `fatload` command.
1864. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 2134. Follow Flash boot instructions [README](README.booting.flash.md) for more details.
1875. After flashing the images, turn off the power switch on the board, and change 2145. After flashing the images, turn off the power switch on the board, and change
188 the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by 215 the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by
189 setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file 216 setting the SW1. Refer [Setting Up the Target](#setting-up-the-target).
diff --git a/docs/README.booting.zynq.md b/docs/README.booting.zynq.md
index a9b6e8f3..28aad78f 100644
--- a/docs/README.booting.zynq.md
+++ b/docs/README.booting.zynq.md
@@ -5,10 +5,15 @@ boot modes.
5 5
6* [Setting Up the Target](#setting-up-the-target) 6* [Setting Up the Target](#setting-up-the-target)
7* [Booting from JTAG](#booting-from-jtag) 7* [Booting from JTAG](#booting-from-jtag)
8 * [Loading boot components using XSCT](#loading-boot-components-using-xsct) 8 * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
9 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) 9 * [Deploying the images to target](#deploying-the-images-to-target)
10 * [Using XSCT](#using-xsct) 10 * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
11 * [Using TFTP](#using-tftp) 11 * [Manually executing xsdb commands](#manually-executing-xsdb-commands)
12 * [Loading boot components using XSDB](#loading-boot-components-using-xsdb)
13 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script)
14 * [Using XSDB](#using-xsdb)
15 * [Using TFTP](#using-tftp)
16 * [Booting Linux](#booting-linux)
12* [Booting from SD](#booting-from-sd) 17* [Booting from SD](#booting-from-sd)
13* [Booting from QSPI](#booting-from-qspi) 18* [Booting from QSPI](#booting-from-qspi)
14 19
@@ -35,37 +40,58 @@ boot modes.
35--- 40---
36## Booting from JTAG 41## Booting from JTAG
37 42
38This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 43This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
39the associated JTAG device drivers. This also requires access to the JTAG interface 44the associated JTAG device drivers. This also requires access to the JTAG interface
40on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG 45on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
41modules. 46modules.
42 47
431. Source the Vivado or Vitis tools `settings.sh` scripts. 48### Sourcing the XSDB tools
442. Power on the board, Open the XSCT console in the Vitis IDE by clicking the 49
45 XSCT button. Alternatively, you can also open the XSCT console by selecting 50Source the Vivado or Vitis tools `settings.sh` scripts.
46 Xilinx -> XSCT Console. 51
52### Deploying the images to target
53
54Deploying the images can be done in two methods.
55
56#### Using devtool boot-jtag script
57
581. Run devtool command to generate the boot-jtag.tcl script.
59```
60$ devtool boot-jtag --help
61$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
62```
632. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
643. Execute this script using xsdb tool as shown below.
47``` 65```
48$ xsct 66$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
49``` 67```
503. In the XSCT console, connect to the target over JTAG using the connect command. 68
69#### Manually executing xsdb commands
70
711. Power on the board, Launch the XSDB shell from command line as shown below.
72```
73$ xsdb
74```
752. In the XSDB console, connect to the target over JTAG using the connect command.
51 Optionally user can use `-url` to specify the local/remote hw_server. The 76 Optionally user can use `-url` to specify the local/remote hw_server. The
52 connect command returns the channel ID of the connection. 77 connect command returns the channel ID of the connection.
53``` 78```
54xsct% connect 79xsdb% connect
55``` 80```
564. The targets command lists the available targets and allows you to select a 813. The targets command lists the available targets and allows you to select a
57 target using its ID. The targets are assigned IDs as they are discovered on 82 target using its ID. The targets are assigned IDs as they are discovered on
58 the JTAG chain, so the IDs can change from session to session. 83 the JTAG chain, so the IDs can change from session to session.
59``` 84```
60xsct% targets 85xsdb% targets
61``` 86```
62 87
63> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 88> **Note:** For non-interactive usage such as scripting, you can use the `-filter`
64 option to select a target instead of selecting the target using its ID. 89 option to select a target instead of selecting the target using its ID.
90
65--- 91---
66### Loading boot components using XSCT 92##### Loading boot components using XSDB
67 93
681. Download the boot images for the target using XSCT with the `fpga` and `dow` 941. Download the boot images for the target using XSDB with the `fpga` and `dow`
69 command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` 95 command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}`
70 directory. 96 directory.
71 97
@@ -74,24 +100,24 @@ xsct% targets
74 100
752. Program the bitstream or skip this step if you are loading from u-boot or linux. 1012. Program the bitstream or skip this step if you are loading from u-boot or linux.
76``` 102```
77xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit 103xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit
78``` 104```
793. Select APU Cortex-A9 Core 0 to load and execute FSBL. 1053. Select APU Cortex-A9 Core 0 to load and execute FSBL.
80``` 106```
81xsct% targets -set -nocase -filter {name =~ "arm*#0"} 107xsdb% targets -set -nocase -filter {name =~ "arm*#0"}
82xsct% catch {stop} 108xsdb% catch {stop}
83``` 109```
845. Download and run FSBL from APU Cortex-A9 Core 0 1105. Download and run FSBL from APU Cortex-A9 Core 0
85``` 111```
86xsct% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf 112xsdb% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf
87xsct% con 113xsdb% con
88``` 114```
897. Now download U-boot.elf and Device tree to APU and execute. 1157. Now download U-boot.elf and Device tree to APU and execute.
90``` 116```
91xsct% stop 117xsdb% stop
92xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf 118xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf
93xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 119xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000
94xsct% con 120xsdb% con
95``` 121```
96 122
978. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1238. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
@@ -101,7 +127,7 @@ Hit any key to stop autoboot: 0
101U-Boot> 127U-Boot>
102``` 128```
103--- 129---
104### Loading Kernel, Root Filesystem and U-boot boot script 130##### Loading Kernel, Root Filesystem and U-boot boot script
105 131
106Load the images into the target DDR load address i.e., 132Load the images into the target DDR load address i.e.,
107`DDR base address + <image_offset>`. 133`DDR base address + <image_offset>`.
@@ -127,53 +153,56 @@ using U-Boot.
127> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this 153> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this
128> is already part of boot.bin we can skip loading dtb, else load kernel dtb. 154> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
129--- 155---
130#### Using XSCT 156###### Using XSDB
131 157
1321. Suspend the execution of active target using `stop` command in XSCT. 1581. Suspend the execution of active target using `stop` command in XSDB.
133``` 159```
134xsct% stop 160xsdb% stop
135``` 161```
1362. Using the `dow` command to load the images into the target DDR/PL DDR load 1622. Using the `dow` command to load the images into the target DDR/PL DDR load
137 address. 163 address.
138``` 164```
139xsct% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 165xsdb% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000
140xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 166xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000
141xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 167xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
142xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 168xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000
143``` 169```
144--- 170---
145#### Using TFTP 171###### Using TFTP
146 172
1471. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1731. Setup TFTP directory on host machine and copy the images to your TFTP directory
174 so that you can load them from U-Boot.
1752. Configure the `ipaddr` and `serverip` of the U-Boot environment.
148``` 176```
149Versal> set serverip <server ip> 177Versal> set serverip <server ip>
150Versal> set ipaddr <board ip> 178Versal> set ipaddr <board ip>
151``` 179```
1522. Load the images to DDR address. Make sure images are copied to tftp directory. 1803. Load the images to DDR address.
153``` 181```
154U-Boot> tftpboot 0x200000 ${TFTPDIR}/uImage 182U-Boot> tftpboot 0x200000 uImage
155U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb 183U-Boot> tftpboot 0x100000 system.dtb
156U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 184U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
157U-Boot> tftpboot 0x3000000 ${TFTPDIR}/boot.scr 185U-Boot> tftpboot 0x3000000 boot.scr
158``` 186```
159--- 187---
160### Booting Linux 188##### Booting Linux
161 189
162Once the images are loaded continue the execution. 190Once the images are loaded continue the execution.
163 191
1641. After loading images resume the execution of active target using the `con` 1921. After loading images resume the execution of active target using the `con`
165command in XSCT shell, Skip step 1 for if you have used TFTP to load images. 193command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
166``` 194```
167xsct% con 195xsdb% con
168``` 196```
1692. Terminate xsct shell. 1972. Terminate xsdb shell.
170``` 198```
171xsct% exit 199xsdb% exit
172``` 200```
1733. In the target Serial Terminal, from U-Boot prompt run `boot` command. 2013. In the target Serial Terminal, from U-Boot prompt run `boot` command.
174``` 202```
175U-Boot> boot 203U-Boot> boot
176``` 204```
205
177--- 206---
178## Booting from SD 207## Booting from SD
179 208
@@ -181,14 +210,15 @@ U-Boot> boot
1812. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) 2102. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF)
182 by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). 211 by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target).
1833. Follow SD boot instructions [README](README.booting.storage.md) for more details. 2123. Follow SD boot instructions [README](README.booting.storage.md) for more details.
213
184--- 214---
185## Booting from QSPI 215## Booting from QSPI
186 216
1871. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot 2171. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot
188 using JTAG or SD boot mode, to ensure that U-Boot is running and also have 218 using JTAG or SD boot mode, to ensure that U-Boot is running and also have
189 boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` 219 boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload`
190 command. 220 command.
1912. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 2212. Follow Flash boot instructions [README](README.booting.flash.md) for more details.
1923. After flashing the images, turn off the power switch on the board, and change 2223. After flashing the images, turn off the power switch on the board, and change
193 the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) 223 the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF)
194 by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file 224 by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target).
diff --git a/docs/README.booting.zynqmp.md b/docs/README.booting.zynqmp.md
index c8f8aa21..80e6d5ae 100644
--- a/docs/README.booting.zynqmp.md
+++ b/docs/README.booting.zynqmp.md
@@ -5,10 +5,15 @@ NAND boot modes.
5 5
6* [Setting Up the Target](#setting-up-the-target) 6* [Setting Up the Target](#setting-up-the-target)
7* [Booting from JTAG](#booting-from-jtag) 7* [Booting from JTAG](#booting-from-jtag)
8 * [Loading boot components using XSCT](#loading-boot-components-using-xsct) 8 * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools)
9 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) 9 * [Deploying the images to target](#deploying-the-images-to-target)
10 * [Using XSCT](#using-xsct) 10 * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script)
11 * [Using TFTP](#using-tftp) 11 * [Manually executing xsdb commands](#manually-executing-xsdb-commands)
12 * [Loading boot components using XSDB](#loading-boot-components-using-xsdb)
13 * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script)
14 * [Using XSDB](#using-xsdb)
15 * [Using TFTP](#using-tftp)
16 * [Booting Linux](#booting-linux)
12* [Booting from SD](#booting-from-sd) 17* [Booting from SD](#booting-from-sd)
13* [Booting from QSPI](#booting-from-qspi) 18* [Booting from QSPI](#booting-from-qspi)
14 19
@@ -34,37 +39,57 @@ NAND boot modes.
34 39
35## Booting from JTAG 40## Booting from JTAG
36 41
37This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 42This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
38the associated JTAG device drivers. This also requires access to the JTAG interface 43the associated JTAG device drivers. This also requires access to the JTAG interface
39on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG 44on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
40modules. 45modules.
41 46
421. Source the Vivado or Vitis tools `settings.sh` scripts. 47### Sourcing the XSDB tools
432. Power on the board, Open the XSCT console in the Vitis IDE by clicking the 48
44 XSCT button. Alternatively, you can also open the XSCT console by selecting 49Source the Vivado or Vitis tools `settings.sh` scripts.
45 Xilinx -> XSCT Console. 50
51### Deploying the images to target
52
53Deploying the images can be done in two methods.
54
55#### Using devtool boot-jtag script
56
571. Run devtool command to generate the boot-jtag.tcl script.
58```
59$ devtool boot-jtag --help
60$ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121
61```
622. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
633. Execute this script using xsdb tool as shown below.
64```
65$ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl
66```
67
68#### Manually executing xsdb commands
69
701. Power on the board, Launch the XSDB shell from command line as shown below.
46``` 71```
47$ xsct 72$ xsdb
48``` 73```
493. In the XSCT console, connect to the target over JTAG using the connect command. 742. In the XSDB console, connect to the target over JTAG using the connect command.
50 Optionally user can use `-url` to specify the local/remote hw_server. The 75 Optionally user can use `-url` to specify the local/remote hw_server. The
51 connect command returns the channel ID of the connection. 76 connect command returns the channel ID of the connection.
52``` 77```
53xsct% connect 78xsdb% connect
54``` 79```
554. The targets command lists the available targets and allows you to select a 803. The targets command lists the available targets and allows you to select a
56 target using its ID. The targets are assigned IDs as they are discovered on 81 target using its ID. The targets are assigned IDs as they are discovered on
57 the JTAG chain, so the IDs can change from session to session. 82 the JTAG chain, so the IDs can change from session to session.
58``` 83```
59xsct% targets 84xsdb% targets
60``` 85```
61 86
62> **Note:** For non-interactive usage such as scripting, you can use the `-filter` 87> **Note:** For non-interactive usage such as scripting, you can use the `-filter`
63 option to select a target instead of selecting the target using its ID. 88 option to select a target instead of selecting the target using its ID.
64 89
65### Loading boot components using XSCT 90##### Loading boot components using XSDB
66 91
671. Download the boot images for the target using XSCT with the `fpga` and `dow` 921. Download the boot images for the target using XSDB with the `fpga` and `dow`
68 command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` 93 command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}`
69 directory. 94 directory.
70 95
@@ -73,43 +98,43 @@ xsct% targets
73 98
742. Program the bitstream or skip this step if you are loading from u-boot or linux. 992. Program the bitstream or skip this step if you are loading from u-boot or linux.
75``` 100```
76xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit 101xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit
77``` 102```
783. By default, JTAG security gates are enabled. Disable the security gates for 1033. By default, JTAG security gates are enabled. Disable the security gates for
79 DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). 104 DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger).
80``` 105```
81xsct% targets -set -nocase -filter {name =~ "*PSU*"} 106xsdb% targets -set -nocase -filter {name =~ "*PSU*"}
82xsct% mask_write 0xFFCA0038 0x1C0 0x1C0 107xsdb% mask_write 0xFFCA0038 0x1C0 0x1C0
83``` 108```
843. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU 1093. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU
85 firmware. 110 firmware.
86``` 111```
87xsct% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} 112xsdb% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"}
88xsct% catch {stop} 113xsdb% catch {stop}
89xsct% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf 114xsdb% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf
90xsct% con 115xsdb% con
91``` 116```
925. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, 1175. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important,
93 because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores 118 because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores
94 are held in reset. You must clear the resets on each core before performing 119 are held in reset. You must clear the resets on each core before performing
95 debugging on these cores. You can use the `rst` command in XSCT to clear the 120 debugging on these cores. You can use the `rst` command in XSDB to clear the
96 resets. 121 resets.
97``` 122```
98xsct% targets -set -nocase -filter {name =~ "*A53*#0"} 123xsdb% targets -set -nocase -filter {name =~ "*A53*#0"}
99xsct% rst -processor -clear-registers 124xsdb% rst -processor -clear-registers
100``` 125```
1016. Download and run FSBL from APU Cortex-A53 Core 0 1266. Download and run FSBL from APU Cortex-A53 Core 0
102``` 127```
103xsct% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf 128xsdb% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf
104xsct% con 129xsdb% con
105``` 130```
1067. Now download TF-A, U-boot.elf and Device tree to APU and execute. 1317. Now download TF-A, U-boot.elf and Device tree to APU and execute.
107``` 132```
108xsct% stop 133xsdb% stop
109xsct% dow ${DEPLOY_DIR_IMAGE}/bl31.elf 134xsdb% dow ${DEPLOY_DIR_IMAGE}/bl31.elf
110xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf 135xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf
111xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 136xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000
112xsct% con 137xsdb% con
113``` 138```
114 139
1158. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1408. In the target Serial Terminal, press any key to stop the U-Boot auto-boot.
@@ -119,7 +144,7 @@ Hit any key to stop autoboot: 0
119U-Boot> 144U-Boot>
120``` 145```
121 146
122### Loading Kernel, Root Filesystem and U-boot boot script 147##### Loading Kernel, Root Filesystem and U-boot boot script
123 148
124Load the images into the target DDR/PL DRR load address i.e., 149Load the images into the target DDR/PL DRR load address i.e.,
125`DDR base address + <image_offset>`. 150`DDR base address + <image_offset>`.
@@ -145,48 +170,50 @@ using U-Boot.
145> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this 170> 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this
146> is already part of boot.bin we can skip loading dtb, else load kernel dtb. 171> is already part of boot.bin we can skip loading dtb, else load kernel dtb.
147 172
148#### Using XSCT 173###### Using XSDB
149 174
1501. Suspend the execution of active target using `stop` command in XSCT. 1751. Suspend the execution of active target using `stop` command in XSDB.
151``` 176```
152xsct% stop 177xsdb% stop
153``` 178```
1542. Using the `dow` command to load the images into the target DDR/PL DDR load 1792. Using the `dow` command to load the images into the target DDR/PL DDR load
155 address. 180 address.
156``` 181```
157xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 182xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000
158xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 183xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000
159xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 184xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000
160xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 185xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000
161``` 186```
162 187
163#### Using TFTP 188###### Using TFTP
164 189
1651. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1901. Setup TFTP directory on host machine and copy the images to your TFTP directory
191 so that you can load them from U-Boot.
1922. Configure the `ipaddr` and `serverip` of the U-Boot environment.
166``` 193```
167Versal> set serverip <server ip> 194ZynqMP> set serverip <host-server-ip-address>
168Versal> set ipaddr <board ip> 195ZynqMP> set ipaddr <board-ip-address>
169``` 196```
1702. Load the images to DDR address. Make sure images are copied to tftp directory. 1973. Load the images to DDR address.
171``` 198```
172U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image 199U-Boot> tftpboot 0x200000 Image
173U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb 200U-Boot> tftpboot 0x100000 system.dtb
174U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 201U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
175U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr 202U-Boot> tftpboot 0x20000000 boot.scr
176 203
177``` 204```
178### Booting Linux 205##### Booting Linux
179 206
180Once the images are loaded continue the execution. 207Once the images are loaded continue the execution.
181 208
1821. After loading images resume the execution of active target using the `con` 2091. After loading images resume the execution of active target using the `con`
183command in XSCT shell, Skip step 1 for if you have used TFTP to load images. 210command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
184``` 211```
185xsct% con 212xsdb% con
186``` 213```
1872. Terminate xsct shell. 2142. Terminate xsdb shell.
188``` 215```
189xsct% exit 216xsdb% exit
190``` 217```
1913. In the target Serial Terminal, from U-Boot prompt run `boot` command. 2183. In the target Serial Terminal, from U-Boot prompt run `boot` command.
192``` 219```
@@ -204,9 +231,9 @@ U-Boot> boot
204 231
2051. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot 2321. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot
206 using JTAG or SD boot mode, to ensure that U-Boot is running and also have 233 using JTAG or SD boot mode, to ensure that U-Boot is running and also have
207 boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` 234 boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload`
208 command. 235 command.
2092. Follow Flash boot instructions [README](README.booting.flash.md) for more details. 2362. Follow Flash boot instructions [README](README.booting.flash.md) for more details.
2103. After flashing the images, turn off the power switch on the board, and change 2373. After flashing the images, turn off the power switch on the board, and change
211 the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by 238 the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by
212 setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file 239 setting the SW6. Refer [Setting Up the Target](#setting-up-the-target).
diff --git a/docs/README.dfx.user.dts.md b/docs/README.dfx.user.dts.md
index 69e1e52b..724c1692 100644
--- a/docs/README.dfx.user.dts.md
+++ b/docs/README.dfx.user.dts.md
@@ -16,11 +16,12 @@ following use cases.
16> **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for 16> **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for
17> shell.json and accel.json file content. 17> shell.json and accel.json file content.
18 18
19* **Zynq-7000 and ZynqMP**: 19* **Zynq 7000, ZynqMP and Versal**:
20 * Design: Vivado flat design. 20 * Design: Vivado flat or Segmented Configuration design.
21 * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional) 21 * Input files to firmware recipes: .bit or .bin or _pld.pdi, .dtsi or dtbo and shell.json (optional)
22 * Usage Examples: 22 * Usage Examples:
23``` 23```
24# Zynq 7000 or ZynqMP flat design
24SRC_URI = " \ 25SRC_URI = " \
25 file://<flat_design_pl>.bit \ 26 file://<flat_design_pl>.bit \
26 file://<flat_design_pl>.dtsi \ 27 file://<flat_design_pl>.dtsi \
@@ -29,6 +30,7 @@ SRC_URI = " \
29``` 30```
30 31
31``` 32```
33# Zynq 7000 or ZynqMP flat design
32SRC_URI = " \ 34SRC_URI = " \
33 file://<flat_design_pl>.bit \ 35 file://<flat_design_pl>.bit \
34 file://<flat_design_pl>.dtbo \ 36 file://<flat_design_pl>.dtbo \
@@ -36,9 +38,69 @@ SRC_URI = " \
36 " 38 "
37``` 39```
38 40
41```
42# Zynq 7000 or ZynqMP flat design
43SRC_URI = " \
44 file://<flat_design_pl>.bin \
45 file://<flat_design_pl>.dtsi \
46 file://shell.json \
47 "
48```
49
50```
51# Zynq 7000 or ZynqMP flat design
52SRC_URI = " \
53 file://<flat_design_pl>.bin \
54 file://<flat_design_pl>.dtbo \
55 file://shell.json \
56 "
57```
58
59```
60# Zynq 7000 or ZynqMP flat design
61SRC_URI = " \
62 file://<flat_design_pl>.bit \
63 file://shell.json \
64 "
65```
66
67```
68# Zynq 7000 or ZynqMP flat design
69SRC_URI = " \
70 file://<flat_design_pl>.bin \
71 file://shell.json \
72 "
73```
74
75```
76# Versal Segmented Configuration design
77SRC_URI = " \
78 file://<flat_design>_pld.pdi \
79 file://<flat_design>_pld.dtsi \
80 file://shell.json \
81 "
82```
83
84```
85# Versal Segmented Configuration design
86SRC_URI = " \
87 file://<flat_design>_pld.pdi \
88 file://<flat_design>_pld.dtbo \
89 file://shell.json \
90 "
91```
92
93```
94# Versal Segmented Configuration design
95SRC_URI = " \
96 file://<flat_design>_pld.pdi \
97 file://shell.json \
98 "
99```
100
39* **ZynqMP and Versal**: 101* **ZynqMP and Versal**:
40 * Design: Vivado DFx design. 102 * Design: Vivado DFx design.
41 * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo 103 * Input files to firmware recipes: .bit/bin(ZynqMP) or .pdi(Versal), .dtsi or dtbo
42 shell.json or accel.json (optional) and .xclbin (optional). 104 shell.json or accel.json (optional) and .xclbin (optional).
43 * Usage Examples: 105 * Usage Examples:
44 106
@@ -63,6 +125,44 @@ SRC_URI = " \
63``` 125```
64 126
65``` 127```
128# ZynqMP DFx Static
129SRC_URI = " \
130 file://<dfx_design_static_pl>.bin \
131 file://<dfx_design_static_pl>.dtsi \
132 file://shell.json \
133 file://<dfx_design_static_pl>.xclbin \
134 "
135```
136
137```
138# ZynqMP DFx Static
139SRC_URI = " \
140 file://<dfx_design_static_pl>.bin \
141 file://<dfx_design_static_pl>.dtbo \
142 file://shell.json \
143 file://<dfx_design_static_pl>.xclbin \
144 "
145```
146
147```
148# ZynqMP DFx Static
149SRC_URI = " \
150 file://<dfx_design_static_pl>.bit \
151 file://shell.json \
152 file://<dfx_design_static_pl>.xclbin \
153 "
154```
155
156```
157# ZynqMP DFx Static
158SRC_URI = " \
159 file://<dfx_design_static_pl>.bin \
160 file://shell.json \
161 file://<dfx_design_static_pl>.xclbin \
162 "
163```
164
165```
66# ZynqMP DFx RP 166# ZynqMP DFx RP
67SRC_URI = " \ 167SRC_URI = " \
68 file://<dfx_design_rp_rm_pl>.bit \ 168 file://<dfx_design_rp_rm_pl>.bit \
@@ -81,6 +181,45 @@ SRC_URI = " \
81 file://<dfx_design_rp_rm_pl>.xclbin \ 181 file://<dfx_design_rp_rm_pl>.xclbin \
82 " 182 "
83``` 183```
184
185```
186# ZynqMP DFx RP
187SRC_URI = " \
188 file://<dfx_design_rp_rm_pl>.bin \
189 file://<dfx_design_rp_rm_pl>.dtsi \
190 file://accel.json \
191 file://<dfx_design_rp_rm_pl>.xclbin \
192 "
193```
194
195```
196# ZynqMP DFx RP
197SRC_URI = " \
198 file://<dfx_design_rp_rm_pl>.bin \
199 file://<dfx_design_rp_rm_pl>.dtbo \
200 file://accel.json \
201 file://<dfx_design_rp_rm_pl>.xclbin \
202 "
203```
204
205```
206# ZynqMP DFx RP
207SRC_URI = " \
208 file://<dfx_design_rp_rm_pl>.bit \
209 file://accel.json \
210 file://<dfx_design_rp_rm_pl>.xclbin \
211 "
212```
213
214```
215# ZynqMP DFx RP
216SRC_URI = " \
217 file://<dfx_design_rp_rm_pl>.bin \
218 file://accel.json \
219 file://<dfx_design_rp_rm_pl>.xclbin \
220 "
221```
222
84``` 223```
85# Versal DFx Static 224# Versal DFx Static
86SRC_URI = " \ 225SRC_URI = " \
@@ -102,6 +241,15 @@ SRC_URI = " \
102``` 241```
103 242
104``` 243```
244# Versal DFx Static
245SRC_URI = " \
246 file://<dfx_design_static_pl>.pdi \
247 file://shell.json \
248 file://<dfx_design_static_pl>.xclbin \
249 "
250```
251
252```
105# Versal DFx RP 253# Versal DFx RP
106SRC_URI = " \ 254SRC_URI = " \
107 file://<dfx_design_rp_rm_pl>.pdi \ 255 file://<dfx_design_rp_rm_pl>.pdi \
@@ -120,16 +268,29 @@ SRC_URI = " \
120 file://<dfx_design_rp_rm_pl>.xclbin \ 268 file://<dfx_design_rp_rm_pl>.xclbin \
121 " 269 "
122``` 270```
271
272```
273# Versal DFx RP
274SRC_URI = " \
275 file://<dfx_design_rp_rm_pl>.pdi \
276 file://accel.json \
277 file://<dfx_design_rp_rm_pl>.xclbin \
278 "
279```
123--- 280---
124 281
125## How to create a firmware recipe app 282## How to create a firmware recipe app
126 283
1271. Follow [Building Instructions](../README.building.md) upto step 4. 2841. Follow SDT or XSCT Build instructions whichever build method is used but not
1282. Create recipes-firmware directory in meta layer and copy the .bit/pdi, 285 both.
286 a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md) upto step 4.
287 b. [XSCT Building Instructions](../README.building.md)
288 upto step 4.b (With SDT overlay).
2892. Create recipes-firmware directory in meta layer and copy the .bit/bin/pdi,
129 .dtsi/dtbo, .json and .xclbin file to these directories. 290 .dtsi/dtbo, .json and .xclbin file to these directories.
130``` 291```
131$ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files 292$ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files
132$ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files 293$ cp -r <path-to-files>/*.{bit or bin or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files
133``` 294```
1343. Now create the recipes for flat or static or partial firmware using recipetool. 2953. Now create the recipes for flat or static or partial firmware using recipetool.
135``` 296```
@@ -144,8 +305,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda
144inherit dfx_user_dts 305inherit dfx_user_dts
145 306
146SRC_URI = "\ 307SRC_URI = "\
147 file://zcu111-pl-demo.bit \ 308 file://shell.json \
148 file://zcu111-pl-demo.dtsi \ 309 file://zcu111-pl-demo-user-dts.bit \
310 file://zcu111-pl-demo-user-dts.dtsi \
149 " 311 "
150 312
151COMPATIBLE_MACHINE ?= "^$" 313COMPATIBLE_MACHINE ?= "^$"
@@ -153,7 +315,7 @@ COMPATIBLE_MACHINE:zynqmp = "zynqmp"
153``` 315```
1545. Add firmware-recipe app to image and enable fpga-overlay machine features to 3165. Add firmware-recipe app to image and enable fpga-overlay machine features to
155 local.conf as shown below. 317 local.conf as shown below.
156> **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo 318> **Note:** fpga-manager-script provides fpgautil tool to load .bin/pdi and dtbo
157> at runtime linux. 319> at runtime linux.
158``` 320```
159MACHINE_FEATURES += "fpga-overlay" 321MACHINE_FEATURES += "fpga-overlay"
@@ -162,7 +324,11 @@ IMAGE_INSTALL:append = " \
162 fpga-manager-script \ 324 fpga-manager-script \
163 " 325 "
164``` 326```
1656. Follow [Building Instructions](../README.building.md) and continue from step 5. 3276. Follow SDT or XSCT Build instructions whichever build method is used but not
328 both.
329 a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from step 5.
330 b. [XSCT Building Instructions](../README.building.md)
331 and continue from step 5.
1667. Once images are built firmware app files will be installed on target_rootfs. 3327. Once images are built firmware app files will be installed on target_rootfs.
167``` 333```
168# <target_rootfs>/lib/firmware/xilinx/firmware-app-name 334# <target_rootfs>/lib/firmware/xilinx/firmware-app-name
@@ -170,7 +336,7 @@ IMAGE_INSTALL:append = " \
170--- 336---
171 337
172## Test Procedure on Target 338## Test Procedure on Target
173* Once Linux boots on target, use fpgautil command to load .bit or .pdi and 339* Once Linux boots on target, use fpgautil command to load .bin or .pdi and
174 corresponding dt overlay as shown below. 340 corresponding dt overlay as shown below.
175> **Note:** firmware can be loaded only with sudo or root permissions. 341> **Note:** firmware can be loaded only with sudo or root permissions.
176--- 342---
@@ -179,11 +345,11 @@ IMAGE_INSTALL:append = " \
179 345
180* ZynqMP 346* ZynqMP
181``` 347```
182yocto-zynqmp-generic-20231:~$ sudo su 348yocto-zynqmp-generic:~$ sudo su
183yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts 349yocto-zynqmp-generic:/home/petalinux# cat /proc/interrupts
184 CPU0 CPU1 CPU2 CPU3 350 CPU0 CPU1 CPU2 CPU3
185 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer 351 11: 5820 5482 14979 6981 GICv2 30 Level arch_timer
186 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi 352 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi
187 15: 0 0 0 0 GICv2 175 Level arm-pmu 353 15: 0 0 0 0 GICv2 175 Level arm-pmu
188 16: 0 0 0 0 GICv2 176 Level arm-pmu 354 16: 0 0 0 0 GICv2 176 Level arm-pmu
189 17: 0 0 0 0 GICv2 177 Level arm-pmu 355 17: 0 0 0 0 GICv2 177 Level arm-pmu
@@ -193,7 +359,7 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
193 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller 359 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
194 22: 0 0 0 0 GICv2 88 Level ams-irq 360 22: 0 0 0 0 GICv2 88 Level ams-irq
195 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon 361 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
196 24: 327 0 0 0 GICv2 53 Level xuartps 362 24: 366 0 0 0 GICv2 53 Level xuartps
197 27: 0 0 0 0 GICv2 156 Level zynqmp-dma 363 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
198 28: 0 0 0 0 GICv2 157 Level zynqmp-dma 364 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
199 29: 0 0 0 0 GICv2 158 Level zynqmp-dma 365 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
@@ -212,54 +378,55 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
212 42: 0 0 0 0 GICv2 116 Level zynqmp-dma 378 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
213 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller 379 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
214 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi 380 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
215 45: 76 0 0 0 GICv2 95 Level eth0, eth0 381 45: 325 0 0 0 GICv2 95 Level eth0, eth0
216 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon 382 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
217 47: 4802 0 0 0 GICv2 49 Level cdns-i2c 383 47: 2798 0 0 0 GICv2 49 Level cdns-i2c
218 48: 501 0 0 0 GICv2 50 Level cdns-i2c 384 48: 326 0 0 0 GICv2 50 Level cdns-i2c
219 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog 385 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
220 51: 0 0 0 0 GICv2 151 Level fd4a0000.display 386 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
221 52: 548 0 0 0 GICv2 81 Level mmc0 387 52: 551 0 0 0 GICv2 81 Level mmc0
222 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] 388 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
223 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 389 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
224 55: 0 0 0 0 zynq-gpio 22 Edge sw19 390 55: 0 0 0 0 zynq-gpio 22 Edge sw19
225IPI0: 64 25 87 38 Rescheduling interrupts 391IPI0: 51 94 136 48 Rescheduling interrupts
226IPI1: 1933 6579 1096 5686 Function call interrupts 392IPI1: 2295 6271 2952 873 Function call interrupts
227IPI2: 0 0 0 0 CPU stop interrupts 393IPI2: 0 0 0 0 CPU stop interrupts
228IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts 394IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
229IPI4: 0 0 0 0 Timer broadcast interrupts 395IPI4: 0 0 0 0 Timer broadcast interrupts
230IPI5: 0 0 0 0 IRQ work interrupts 396IPI5: 0 0 0 0 IRQ work interrupts
231IPI6: 0 0 0 0 CPU wake-up interrupts 397IPI6: 0 0 0 0 CPU wake-up interrupts
232Err: 0 398Err: 0
233yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/ 399yocto-zynqmp-generic:/home/petalinux# tree /lib/firmware/
234/lib/firmware/ 400/lib/firmware/
235`-- xilinx 401`-- xilinx
236 `-- zcu111-pl-demo 402 `-- zcu111-pl-demo-user-dts
237 |-- zcu111-pl-demo.bit.bin 403 |-- shell.json
238 `-- zcu111-pl-demo.dtbo 404 |-- zcu111-pl-demo-user-dts.bin
239 405 `-- zcu111-pl-demo-user-dts.dtbo
2402 directories, 2 files 406
241yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo 4072 directories, 3 files
242[ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager 408yocto-zynqmp-generic:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.bin -o /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.dtbo
243[ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name 409[ 370.737539] fpga_manager fpga0: writing zcu111-pl-demo-user-dts.bin to Xilinx ZynqMP FPGA Manager
244[ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid 410[ 370.960368] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
245[ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets 411[ 370.970508] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid
246[ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid 412[ 370.979755] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
247[ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 413[ 370.989244] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid
248[ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 414[ 370.998947] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
249[ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 415[ 371.008449] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
250[ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 416[ 371.018398] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0
251[ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 417[ 371.028420] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0
252[ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 418[ 371.038442] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1
253[ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 419[ 371.048467] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2
254[ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 420[ 371.058487] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0
255[ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it! 421[ 371.068852] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0
256[ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it! 422[ 371.096047] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it!
257[ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite 423[ 371.096223] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it!
258[ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow! 424[ 371.115206] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite
259[ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1 425[ 371.124178] uartlite a0030000.serial: Runtime PM usage count underflow!
260Time taken to load BIN is 901.000000 Milli Seconds 426[ 371.133186] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input1
427Time taken to load BIN is 409.000000 Milli Seconds
261BIN FILE loaded through FPGA manager successfully 428BIN FILE loaded through FPGA manager successfully
262yocto-zynqmp-generic-20231:/home/petalinux# 429yocto-zynqmp-generic:/home/petalinux#
263``` 430```
264* Versal (DFx Static) 431* Versal (DFx Static)
265``` 432```
@@ -324,10 +491,10 @@ root@yocto-vck190-dfx-2023:~#
324* Verify PL GPIO DIP switches and Push buttons are registered. 491* Verify PL GPIO DIP switches and Push buttons are registered.
325* Move the DIP Switches ON/OFF and verify the interrupt counts. 492* Move the DIP Switches ON/OFF and verify the interrupt counts.
326``` 493```
327yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts 494yocto-zynqmp-generic:/home/petalinux# cat /proc/interrupts
328 CPU0 CPU1 CPU2 CPU3 495 CPU0 CPU1 CPU2 CPU3
329 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer 496 11: 7674 7136 20210 8226 GICv2 30 Level arch_timer
330 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi 497 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi
331 15: 0 0 0 0 GICv2 175 Level arm-pmu 498 15: 0 0 0 0 GICv2 175 Level arm-pmu
332 16: 0 0 0 0 GICv2 176 Level arm-pmu 499 16: 0 0 0 0 GICv2 176 Level arm-pmu
333 17: 0 0 0 0 GICv2 177 Level arm-pmu 500 17: 0 0 0 0 GICv2 177 Level arm-pmu
@@ -337,7 +504,7 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
337 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller 504 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
338 22: 0 0 0 0 GICv2 88 Level ams-irq 505 22: 0 0 0 0 GICv2 88 Level ams-irq
339 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon 506 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
340 24: 515 0 0 0 GICv2 53 Level xuartps 507 24: 1143 0 0 0 GICv2 53 Level xuartps
341 27: 0 0 0 0 GICv2 156 Level zynqmp-dma 508 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
342 28: 0 0 0 0 GICv2 157 Level zynqmp-dma 509 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
343 29: 0 0 0 0 GICv2 158 Level zynqmp-dma 510 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
@@ -356,13 +523,13 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
356 42: 0 0 0 0 GICv2 116 Level zynqmp-dma 523 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
357 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller 524 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
358 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi 525 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
359 45: 110 0 0 0 GICv2 95 Level eth0, eth0 526 45: 485 0 0 0 GICv2 95 Level eth0, eth0
360 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon 527 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
361 47: 4802 0 0 0 GICv2 49 Level cdns-i2c 528 47: 2798 0 0 0 GICv2 49 Level cdns-i2c
362 48: 501 0 0 0 GICv2 50 Level cdns-i2c 529 48: 326 0 0 0 GICv2 50 Level cdns-i2c
363 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog 530 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
364 51: 0 0 0 0 GICv2 151 Level fd4a0000.display 531 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
365 52: 548 0 0 0 GICv2 81 Level mmc0 532 52: 551 0 0 0 GICv2 81 Level mmc0
366 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] 533 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
367 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 534 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
368 55: 0 0 0 0 zynq-gpio 22 Edge sw19 535 55: 0 0 0 0 zynq-gpio 22 Edge sw19
@@ -379,18 +546,19 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
379 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 546 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2
380 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 547 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1
381 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 548 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0
382IPI0: 64 25 87 38 Rescheduling interrupts 549IPI0: 64 106 160 56 Rescheduling interrupts
383IPI1: 2066 6747 1212 5791 Function call interrupts 550IPI1: 2712 6721 3259 998 Function call interrupts
384IPI2: 0 0 0 0 CPU stop interrupts 551IPI2: 0 0 0 0 CPU stop interrupts
385IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts 552IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
386IPI4: 0 0 0 0 Timer broadcast interrupts 553IPI4: 0 0 0 0 Timer broadcast interrupts
387IPI5: 0 0 0 0 IRQ work interrupts 554IPI5: 0 0 0 0 IRQ work interrupts
388IPI6: 0 0 0 0 CPU wake-up interrupts 555IPI6: 0 0 0 0 CPU wake-up interrupts
389Err: 0 556Err: 0
390yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts 557yocto-zcu111-zynqmp:/home/petalinux#
558yocto-zcu111-zynqmp:/home/petalinux# cat /proc/interrupts
391 CPU0 CPU1 CPU2 CPU3 559 CPU0 CPU1 CPU2 CPU3
392 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer 560 11: 8530 7717 22106 8626 GICv2 30 Level arch_timer
393 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi 561 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi
394 15: 0 0 0 0 GICv2 175 Level arm-pmu 562 15: 0 0 0 0 GICv2 175 Level arm-pmu
395 16: 0 0 0 0 GICv2 176 Level arm-pmu 563 16: 0 0 0 0 GICv2 176 Level arm-pmu
396 17: 0 0 0 0 GICv2 177 Level arm-pmu 564 17: 0 0 0 0 GICv2 177 Level arm-pmu
@@ -400,7 +568,7 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
400 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller 568 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
401 22: 0 0 0 0 GICv2 88 Level ams-irq 569 22: 0 0 0 0 GICv2 88 Level ams-irq
402 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon 570 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
403 24: 603 0 0 0 GICv2 53 Level xuartps 571 24: 1234 0 0 0 GICv2 53 Level xuartps
404 27: 0 0 0 0 GICv2 156 Level zynqmp-dma 572 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
405 28: 0 0 0 0 GICv2 157 Level zynqmp-dma 573 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
406 29: 0 0 0 0 GICv2 158 Level zynqmp-dma 574 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
@@ -419,45 +587,45 @@ yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
419 42: 0 0 0 0 GICv2 116 Level zynqmp-dma 587 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
420 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller 588 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
421 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi 589 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
422 45: 134 0 0 0 GICv2 95 Level eth0, eth0 590 45: 527 0 0 0 GICv2 95 Level eth0, eth0
423 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon 591 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
424 47: 4802 0 0 0 GICv2 49 Level cdns-i2c 592 47: 2798 0 0 0 GICv2 49 Level cdns-i2c
425 48: 501 0 0 0 GICv2 50 Level cdns-i2c 593 48: 326 0 0 0 GICv2 50 Level cdns-i2c
426 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog 594 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
427 51: 0 0 0 0 GICv2 151 Level fd4a0000.display 595 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
428 52: 548 0 0 0 GICv2 81 Level mmc0 596 52: 551 0 0 0 GICv2 81 Level mmc0
429 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] 597 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
430 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 598 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
431 55: 0 0 0 0 zynq-gpio 22 Edge sw19 599 55: 0 0 0 0 zynq-gpio 22 Edge sw19
432 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N 600 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N
433 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E 601 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E
434 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S 602 61: 6 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S
435 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W 603 62: 4 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W
436 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C 604 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C
437 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 605 64: 20 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7
438 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 606 65: 20 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6
439 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 607 66: 2 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5
440 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 608 67: 8 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4
441 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 609 68: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3
442 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 610 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2
443 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 611 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1
444 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 612 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0
445IPI0: 64 26 87 38 Rescheduling interrupts 613IPI0: 64 107 160 56 Rescheduling interrupts
446IPI1: 2163 6791 1243 5866 Function call interrupts 614IPI1: 2720 6763 3430 998 Function call interrupts
447IPI2: 0 0 0 0 CPU stop interrupts 615IPI2: 0 0 0 0 CPU stop interrupts
448IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts 616IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
449IPI4: 0 0 0 0 Timer broadcast interrupts 617IPI4: 0 0 0 0 Timer broadcast interrupts
450IPI5: 0 0 0 0 IRQ work interrupts 618IPI5: 0 0 0 0 IRQ work interrupts
451IPI6: 0 0 0 0 CPU wake-up interrupts 619IPI6: 0 0 0 0 CPU wake-up interrupts
452Err: 0 620Err: 0
453yocto-zynqmp-generic-20231:/home/petalinux# 621yocto-zynqmp-generic:/home/petalinux#
454``` 622```
455--- 623---
456 624
457### Unloading PL bitstream or pdi and dt overlay 625### Unloading PL bitstream or pdi and dt overlay
458* Zynq or ZynqMP 626* Zynq or ZynqMP
459``` 627```
460yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R 628yocto-zynqmp-generic:/home/petalinux# fpgautil -R
461``` 629```
462* Versal (DFx RP) 630* Versal (DFx RP)
463``` 631```
diff --git a/docs/README.fpgamanager.custom.md b/docs/README.fpgamanager.custom.md
deleted file mode 100644
index dbdf5907..00000000
--- a/docs/README.fpgamanager.custom.md
+++ /dev/null
@@ -1,478 +0,0 @@
1# Build Instructions to create firmware recipes using fpgamanager_custom bbclass
2
3* [Introduction](#introduction)
4* [How to create a firmware recipe app](#how-to-create-a-firmware-recipe-app)
5* [Test Procedure on Target](#test-procedure-on-target)
6 * [Loading PL bitstream or pdi and dt overlay](#loading-pl-bitstream-or-pdi-and-dt-overlay)
7 * [Testing PL functionality](#testing-pl-functionality)
8 * [Unloading PL bitstream or pdi and dt overlay](#unloading-pl-bitstream-or-pdi-and-dt-overlay)
9* [References](#references)
10
11> **Note:** This README will be deprecated in 2024.1 release. User sthould start
12> using [DFx User DTS README](README.dfx.user.dts.md)
13
14## Introduction
15This readme describes the build instructions to create firmware recipes using
16fpgamanager_custom.bbclass for dynamic configuration. This bitbake class supports
17following use cases.
18
19> **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for
20> shell.json and accel.json file content.
21
22* **Zynq-7000 and ZynqMP**:
23 * Design: Vivado flat design.
24 * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional)
25 * Usage Examples:
26```
27SRC_URI = " \
28 file://<flat_design_pl>.bit \
29 file://<flat_design_pl>.dtsi \
30 file://shell.json \
31 "
32```
33
34```
35SRC_URI = " \
36 file://<flat_design_pl>.bit \
37 file://<flat_design_pl>.dtbo \
38 file://shell.json \
39 "
40```
41
42* **ZynqMP and Versal**:
43 * Design: Vivado DFx design.
44 * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo
45 shell.json or accel.json (optional) and .xclbin (optional).
46 * Usage Examples:
47
48```
49# ZynqMP DFx Static
50SRC_URI = " \
51 file://<dfx_design_static_pl>.bit \
52 file://<dfx_design_static_pl>.dtsi \
53 file://shell.json \
54 file://<dfx_design_static_pl>.xclbin \
55 "
56```
57
58```
59# ZynqMP DFx Static
60SRC_URI = " \
61 file://<dfx_design_static_pl>.bit \
62 file://<dfx_design_static_pl>.dtbo \
63 file://shell.json \
64 file://<dfx_design_static_pl>.xclbin \
65 "
66```
67
68```
69# ZynqMP DFx RP
70SRC_URI = " \
71 file://<dfx_design_rp_rm_pl>.bit \
72 file://<dfx_design_rp_rm_pl>.dtsi \
73 file://accel.json \
74 file://<dfx_design_rp_rm_pl>.xclbin \
75 "
76```
77
78```
79# ZynqMP DFx RP
80SRC_URI = " \
81 file://<dfx_design_rp_rm_pl>.bit \
82 file://<dfx_design_rp_rm_pl>.dtbo \
83 file://accel.json \
84 file://<dfx_design_rp_rm_pl>.xclbin \
85 "
86```
87```
88# Versal DFx Static
89SRC_URI = " \
90 file://<dfx_design_static_pl>.pdi \
91 file://<dfx_design_static_pl>.dtsi \
92 file://shell.json \
93 file://<dfx_design_static_pl>.xclbin \
94 "
95```
96
97```
98# Versal DFx Static
99SRC_URI = " \
100 file://<dfx_design_static_pl>.pdi \
101 file://<dfx_design_static_pl>.dtbo \
102 file://shell.json \
103 file://<dfx_design_static_pl>.xclbin \
104 "
105```
106
107```
108# Versal DFx RP
109SRC_URI = " \
110 file://<dfx_design_rp_rm_pl>.pdi \
111 file://<dfx_design_rp_rm_pl>.dtsi \
112 file://accel.json \
113 file://<dfx_design_rp_rm_pl>.xclbin \
114 "
115```
116
117```
118# Versal DFx RP
119SRC_URI = " \
120 file://<dfx_design_rp_rm_pl>.pdi \
121 file://<dfx_design_rp_rm_pl>.dtbo \
122 file://accel.json \
123 file://<dfx_design_rp_rm_pl>.xclbin \
124 "
125```
126---
127
128## How to create a firmware recipe app
129
1301. Follow [Building Instructions](../README.building.md) upto step 4.
1312. Create recipes-firmware directory in meta layer and copy the .bit/pdi,
132 .dtsi/dtbo, .json and .xclbin file to these directories.
133```
134$ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files
135$ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files
136```
1373. Now create the recipes for flat or static or partial firmware using recipetool.
138```
139$ recipetool create -o <meta-layer>/recipes-firmware/<firmware-app-name>/firmware-app-name.bb file:///<meta-layer>/recipes-firmware/<firmware-app-name>/files
140```
1414. Modify the recipe and inherit fpgamanager_custom bbclass as shown below.
142```
143SUMMARY = "Full Bitstream loading zcu111-pl-demo firmware using fpgamanager_custom bbclass"
144LICENSE = "MIT"
145LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
146
147inherit fpgamanager_custom
148
149SRC_URI = "\
150 file://zcu111-pl-demo.bit \
151 file://zcu111-pl-demo.dtsi \
152 "
153
154COMPATIBLE_MACHINE ?= "^$"
155COMPATIBLE_MACHINE:zynqmp = "zynqmp"
156```
1575. Add firmware-recipe app to image and enable fpga-overlay machine features to
158 local.conf as shown below.
159> **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo
160> at runtime linux.
161```
162MACHINE_FEATURES += "fpga-overlay"
163IMAGE_INSTALL:append = " \
164 firmware-app-name \
165 fpga-manager-script \
166 "
167```
1686. Follow [Building Instructions](../README.building.md) and continue from step 5.
1697. Once images are built firmware app files will be installed on target_rootfs.
170```
171# <target_rootfs>/lib/firmware/xilinx/firmware-app-name
172```
173---
174
175## Test Procedure on Target
176* Once Linux boots on target, use fpgautil command to load .bit or .pdi and
177 corresponding dt overlay as shown below.
178> **Note:** firmware can be loaded only with sudo or root permissions.
179---
180
181### Loading PL bitstream or pdi and dt overlay
182
183* ZynqMP
184```
185yocto-zynqmp-generic-20231:~$ sudo su
186yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
187 CPU0 CPU1 CPU2 CPU3
188 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer
189 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi
190 15: 0 0 0 0 GICv2 175 Level arm-pmu
191 16: 0 0 0 0 GICv2 176 Level arm-pmu
192 17: 0 0 0 0 GICv2 177 Level arm-pmu
193 18: 0 0 0 0 GICv2 178 Level arm-pmu
194 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc
195 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc
196 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
197 22: 0 0 0 0 GICv2 88 Level ams-irq
198 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
199 24: 327 0 0 0 GICv2 53 Level xuartps
200 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
201 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
202 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
203 30: 0 0 0 0 GICv2 159 Level zynqmp-dma
204 31: 0 0 0 0 GICv2 160 Level zynqmp-dma
205 32: 0 0 0 0 GICv2 161 Level zynqmp-dma
206 33: 0 0 0 0 GICv2 162 Level zynqmp-dma
207 34: 0 0 0 0 GICv2 163 Level zynqmp-dma
208 35: 0 0 0 0 GICv2 109 Level zynqmp-dma
209 36: 0 0 0 0 GICv2 110 Level zynqmp-dma
210 37: 0 0 0 0 GICv2 111 Level zynqmp-dma
211 38: 0 0 0 0 GICv2 112 Level zynqmp-dma
212 39: 0 0 0 0 GICv2 113 Level zynqmp-dma
213 40: 0 0 0 0 GICv2 114 Level zynqmp-dma
214 41: 0 0 0 0 GICv2 115 Level zynqmp-dma
215 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
216 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
217 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
218 45: 76 0 0 0 GICv2 95 Level eth0, eth0
219 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
220 47: 4802 0 0 0 GICv2 49 Level cdns-i2c
221 48: 501 0 0 0 GICv2 50 Level cdns-i2c
222 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
223 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
224 52: 548 0 0 0 GICv2 81 Level mmc0
225 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
226 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
227 55: 0 0 0 0 zynq-gpio 22 Edge sw19
228IPI0: 64 25 87 38 Rescheduling interrupts
229IPI1: 1933 6579 1096 5686 Function call interrupts
230IPI2: 0 0 0 0 CPU stop interrupts
231IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
232IPI4: 0 0 0 0 Timer broadcast interrupts
233IPI5: 0 0 0 0 IRQ work interrupts
234IPI6: 0 0 0 0 CPU wake-up interrupts
235Err: 0
236yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/
237/lib/firmware/
238`-- xilinx
239 `-- zcu111-pl-demo
240 |-- zcu111-pl-demo.bit.bin
241 `-- zcu111-pl-demo.dtbo
242
2432 directories, 2 files
244yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo
245[ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager
246[ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name
247[ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid
248[ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets
249[ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid
250[ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0
251[ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0
252[ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0
253[ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0
254[ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1
255[ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2
256[ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0
257[ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0
258[ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it!
259[ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it!
260[ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite
261[ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow!
262[ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1
263Time taken to load BIN is 901.000000 Milli Seconds
264BIN FILE loaded through FPGA manager successfully
265yocto-zynqmp-generic-20231:/home/petalinux#
266```
267* Versal (DFx Static)
268```
269yocto-vck190-dfx-2023:~$ sudo su
270root@yocto-vck190-dfx-2023:~#
271root@yocto-vck190-dfx-2023:~# fpgautil -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo
272[ 257.555571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config
273[ 257.565879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid
274[ 257.574670] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid
275[ 257.583599] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0
276[ 257.593434] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1
277[ 257.603268] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2
278[ 257.613100] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0
279[ 257.624762] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1
280[ 257.636589] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2
281[ 257.648415] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3
282[ 257.663234] of-fpga-region fpga:fpga-PR0: FPGA Region probed
283[ 257.669135] of-fpga-region fpga:fpga-PR1: FPGA Region probed
284[ 257.675022] of-fpga-region fpga:fpga-PR2: FPGA Region probed
285root@yocto-vck190-dfx-2023:~#
286```
287* Versal (DFx RP)
288```
289root@yocto-vck190-dfx-2023:~# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0
290[ 273.511455] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager
291[284052.461]Loading PDI from DDR
292[284052.566]Monolithic/Master Device
293[284055.847]3.365 ms: PDI initialization time
294[284059.809]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002
295[284065.432]---Loading Partition#: 0x0, Id: 0x103
296[284069.829] 0.033 ms for Partition#: 0x0, Size: 1312 Bytes
297[284074.973]---Loading Partition#: 0x1, Id: 0x105
298[284079.344] 0.007 ms for Partition#: 0x1, Size: 160 Bytes
299[284084.430]---Loading Partition#: 0x2, Id: 0x205
300[284088.844] 0.049 ms for Partition#: 0x2, Size: 960 Bytes
301[284093.887]---Loading Partition#: 0x3, Id: 0x203
302[284098.280] 0.030 ms for Partition#: 0x3, Size: 688 Bytes
303[284103.342]---Loading Partition#: 0x4, Id: 0x303
304[284108.863] 1.156 ms for Partition#: 0x4, Size: 209440 Bytes
305[284113.052]---Loading Partition#: 0x5, Id: 0x305
306[284117.712] 0.296 ms for Partition#: 0x5, Size: 3536 Bytes
307[284122.594]---Loading Partition#: 0x6, Id: 0x403
308[284126.991] 0.034 ms for Partition#: 0x6, Size: 8096 Bytes
309[284132.136]---Loading Partition#: 0x7, Id: 0x405
310[284136.507] 0.007 ms for Partition#: 0x7, Size: 160 Bytes
311[284141.636]Subsystem PDI Load: Done
312[ 273.615503] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name
313[ 273.627382] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/fpga-bridges
314[ 273.636953] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/partial-fpga-config
315[ 273.647241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0
316[ 273.660826] gpio gpiochip1: (a4010000.gpio): not an immutable chip, please consider fixing it!
317[ 273.670490] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input0
318Time taken to load BIN is 171.000000 Milli Seconds
319BIN FILE loaded through FPGA manager successfully
320root@yocto-vck190-dfx-2023:~#
321```
322---
323
324### Testing PL functionality
325
326* This examples uses PL GPIO DIP switches and Push buttons to capture interrupts.
327* Verify PL GPIO DIP switches and Push buttons are registered.
328* Move the DIP Switches ON/OFF and verify the interrupt counts.
329```
330yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
331 CPU0 CPU1 CPU2 CPU3
332 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer
333 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi
334 15: 0 0 0 0 GICv2 175 Level arm-pmu
335 16: 0 0 0 0 GICv2 176 Level arm-pmu
336 17: 0 0 0 0 GICv2 177 Level arm-pmu
337 18: 0 0 0 0 GICv2 178 Level arm-pmu
338 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc
339 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc
340 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
341 22: 0 0 0 0 GICv2 88 Level ams-irq
342 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
343 24: 515 0 0 0 GICv2 53 Level xuartps
344 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
345 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
346 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
347 30: 0 0 0 0 GICv2 159 Level zynqmp-dma
348 31: 0 0 0 0 GICv2 160 Level zynqmp-dma
349 32: 0 0 0 0 GICv2 161 Level zynqmp-dma
350 33: 0 0 0 0 GICv2 162 Level zynqmp-dma
351 34: 0 0 0 0 GICv2 163 Level zynqmp-dma
352 35: 0 0 0 0 GICv2 109 Level zynqmp-dma
353 36: 0 0 0 0 GICv2 110 Level zynqmp-dma
354 37: 0 0 0 0 GICv2 111 Level zynqmp-dma
355 38: 0 0 0 0 GICv2 112 Level zynqmp-dma
356 39: 0 0 0 0 GICv2 113 Level zynqmp-dma
357 40: 0 0 0 0 GICv2 114 Level zynqmp-dma
358 41: 0 0 0 0 GICv2 115 Level zynqmp-dma
359 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
360 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
361 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
362 45: 110 0 0 0 GICv2 95 Level eth0, eth0
363 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
364 47: 4802 0 0 0 GICv2 49 Level cdns-i2c
365 48: 501 0 0 0 GICv2 50 Level cdns-i2c
366 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
367 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
368 52: 548 0 0 0 GICv2 81 Level mmc0
369 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
370 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
371 55: 0 0 0 0 zynq-gpio 22 Edge sw19
372 59: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N
373 60: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E
374 61: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S
375 62: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W
376 63: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C
377 64: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7
378 65: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6
379 66: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5
380 67: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4
381 68: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3
382 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2
383 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1
384 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0
385IPI0: 64 25 87 38 Rescheduling interrupts
386IPI1: 2066 6747 1212 5791 Function call interrupts
387IPI2: 0 0 0 0 CPU stop interrupts
388IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
389IPI4: 0 0 0 0 Timer broadcast interrupts
390IPI5: 0 0 0 0 IRQ work interrupts
391IPI6: 0 0 0 0 CPU wake-up interrupts
392Err: 0
393yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts
394 CPU0 CPU1 CPU2 CPU3
395 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer
396 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi
397 15: 0 0 0 0 GICv2 175 Level arm-pmu
398 16: 0 0 0 0 GICv2 176 Level arm-pmu
399 17: 0 0 0 0 GICv2 177 Level arm-pmu
400 18: 0 0 0 0 GICv2 178 Level arm-pmu
401 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc
402 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc
403 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller
404 22: 0 0 0 0 GICv2 88 Level ams-irq
405 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon
406 24: 603 0 0 0 GICv2 53 Level xuartps
407 27: 0 0 0 0 GICv2 156 Level zynqmp-dma
408 28: 0 0 0 0 GICv2 157 Level zynqmp-dma
409 29: 0 0 0 0 GICv2 158 Level zynqmp-dma
410 30: 0 0 0 0 GICv2 159 Level zynqmp-dma
411 31: 0 0 0 0 GICv2 160 Level zynqmp-dma
412 32: 0 0 0 0 GICv2 161 Level zynqmp-dma
413 33: 0 0 0 0 GICv2 162 Level zynqmp-dma
414 34: 0 0 0 0 GICv2 163 Level zynqmp-dma
415 35: 0 0 0 0 GICv2 109 Level zynqmp-dma
416 36: 0 0 0 0 GICv2 110 Level zynqmp-dma
417 37: 0 0 0 0 GICv2 111 Level zynqmp-dma
418 38: 0 0 0 0 GICv2 112 Level zynqmp-dma
419 39: 0 0 0 0 GICv2 113 Level zynqmp-dma
420 40: 0 0 0 0 GICv2 114 Level zynqmp-dma
421 41: 0 0 0 0 GICv2 115 Level zynqmp-dma
422 42: 0 0 0 0 GICv2 116 Level zynqmp-dma
423 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller
424 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi
425 45: 134 0 0 0 GICv2 95 Level eth0, eth0
426 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon
427 47: 4802 0 0 0 GICv2 49 Level cdns-i2c
428 48: 501 0 0 0 GICv2 50 Level cdns-i2c
429 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog
430 51: 0 0 0 0 GICv2 151 Level fd4a0000.display
431 52: 548 0 0 0 GICv2 81 Level mmc0
432 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci]
433 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1
434 55: 0 0 0 0 zynq-gpio 22 Edge sw19
435 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N
436 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E
437 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S
438 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W
439 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C
440 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7
441 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6
442 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5
443 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4
444 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3
445 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2
446 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1
447 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0
448IPI0: 64 26 87 38 Rescheduling interrupts
449IPI1: 2163 6791 1243 5866 Function call interrupts
450IPI2: 0 0 0 0 CPU stop interrupts
451IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts
452IPI4: 0 0 0 0 Timer broadcast interrupts
453IPI5: 0 0 0 0 IRQ work interrupts
454IPI6: 0 0 0 0 CPU wake-up interrupts
455Err: 0
456yocto-zynqmp-generic-20231:/home/petalinux#
457```
458---
459
460### Unloading PL bitstream or pdi and dt overlay
461* Zynq or ZynqMP
462```
463yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R
464```
465* Versal (DFx RP)
466```
467root@yocto-vck190-dfx-2023:~# fpgautil -R -n PR0
468```
469* Versal (DFx Static)
470```
471root@yocto-vck190-dfx-2023:~# fpgautil -R -n Full
472```
473---
474
475## References
476* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager
477* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming
478* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1188397412/Solution+Versal+PL+Programming
diff --git a/docs/README.fw.package.md b/docs/README.fw.package.md
new file mode 100644
index 00000000..a7e54402
--- /dev/null
+++ b/docs/README.fw.package.md
@@ -0,0 +1,61 @@
1# How to package and depoly firmware elf or bin to linux root filesystem
2
3* [Introduction](#introduction)
4* [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe)
5
6## Introduction
7This readme describes how to package and deploy firmware baremetal or freertos
8application elf or bin files to linux root filesystem under /lib/firmware directory.
9Packaging an firmware baremetal or freertos application elf or bin files to linux
10root filesystem is not automated from multiconfig baremetal or freertos recipes.
11Hence user has to create a linux recipe and inherit fw-package which provides
12infrastructure to package and deploy firmware elf or bin files to linux root
13filesystem.
14
15## How to create and install firmware package recipe
16
171. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) upto step 4.
18
192. Create recipes-firmware directory in distribution meta layer.
20```
21$ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/
22```
233. Now create the recipes firmware package using recipetool.
24```
25$ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb
26```
274. Modify the recipe and inherit fw-package bbclass as shown below.
28
29> **Note:**
30> * **DESTDIR:** Variable to specify elf or bin directory path. Default is set to
31> /lib/firmware directory from fw-package,bbclass and user can
32> change this value to /boot directory depending on requirement.
33> * **FW_NAME:** Variable to define firmware baremetal or freertos application
34> recipe name.
35> * **TARGET_MC:** Variable to define one of the multiconfig target name
36> (ex: cortexr5-0-zynqmp-baremetal) from the BBMULTICONFIG list
37> generated at [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md )
38> step 4.
39
40```
41SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs"
42LICENSE = "CLOSED"
43
44inherit fw-package
45
46FW_NAME = "hello-world"
47
48TARGET_MC = "cortexr5-0-zynqmp-baremetal"
49
50FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy"
51FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}"
52```
535. Add firmware-package recipe to image to local.conf as shown below.
54
55```
56IMAGE_INSTALL:append = " \
57 firmware-package-name \
58 "
59```
606. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from
61 step 5.
diff --git a/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf b/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf
new file mode 100644
index 00000000..e3df1d26
--- /dev/null
+++ b/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf
@@ -0,0 +1,52 @@
1#@TYPE: Machine
2#@NAME: sp701-microblazeel
3#@DESCRIPTION: Machine configuration for the SP701 boards.
4
5#### Preamble
6MACHINEOVERRIDES =. "${@['', 'sp701-microblazeel:']['sp701-microblazeel' !='${MACHINE}']}"
7#### Regular settings follow
8
9# Variables that changes based on hw design or board specific requirement must be
10# defined before calling the required inclusion file else pre-expansion value
11# defined in microblazeel-generic.conf will be set.
12
13# Yocto device-tree variables
14YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0"
15YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "MIG_7SERIES_0"
16DT_PADDING_SIZE:pn-device-tree ?= "0x1000"
17DTC_FLAGS:pn-device-tree ?= ""
18XSCTH_PROC:pn-device-tree ?= "microblaze_0"
19YAML_DT_BOARD_FLAGS ?= "{BOARD sp701-rev1.0}"
20
21# Yocto u-boot-xlnx variables
22
23# Yocto FS-Boot variables
24YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0"
25YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0"
26YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "MIG_7SERIES_0"
27YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0"
28XSCTH_PROC:pn-fs-boot ?= "microblaze_0"
29
30# Yocto KERNEL Variables
31UBOOT_ENTRYPOINT ?= "0x80000000"
32UBOOT_LOADADDRESS ?= "0x80000000"
33
34# xilinx-sp701 Serial Console
35SERIAL_CONSOLES ?= "115200;ttyUL0"
36YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200"
37
38# Set DDR Base address for u-boot-xlnx-scr variables
39DDR_BASEADDR ?= "0x80000000"
40SKIP_APPEND_BASEADDR ?= "0"
41
42# Required generic machine inclusion
43require conf/machine/microblaze-generic.conf
44
45# This machine conf file uses sp701-microblazeel xsa as reference input.
46# User can override with kc705 custom xsa using HDF_BASE and HDF_PATH variables
47# from local.conf.
48HDF_MACHINE = "sp701-microblazeel"
49
50#### No additional settings should be after the Postamble
51#### Postamble
52PACKAGE_EXTRA_ARCHS:append = "${@['', ' sp701_microblazeel']['sp701-microblazeel' != '${MACHINE}']}"
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend
index fa4816af..7acda75e 100644
--- a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend
+++ b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend
@@ -5,3 +5,5 @@ COMPATIBLE_MACHINE:qemu-zynq7 = ".*"
5SRC_URI:append:qemu-zynq7 = " file://qemu-zynq7.dts" 5SRC_URI:append:qemu-zynq7 = " file://qemu-zynq7.dts"
6 6
7EXTRA_OVERLAYS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' pnc.dtsi', '', d)}" 7EXTRA_OVERLAYS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' pnc.dtsi', '', d)}"
8
9EXTRA_OVERLAYS:append:vek280-versal = " system-vek280.dtsi"
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi b/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi
new file mode 100644
index 00000000..0d2ca87d
--- /dev/null
+++ b/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi
@@ -0,0 +1,20 @@
1/ {
2/* Reserve the bad block DDR memory for linux to not touch it, refer:CR-1143646 */
3reserved-memory {
4 #address-cells = <2>;
5 #size-cells = <2>;
6 ranges;
7 pl_ddr: buffer@0
8 {
9 no-map;
10 reg = <0x08 0x00 0x00 0x80000000>;
11 };
12
13 lpddr_memory: buffer@1
14 {
15 no-map;
16 reg = <0x500 0x0 0x2 0x0>;
17 };
18
19};
20};
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch
new file mode 100644
index 00000000..660bc218
--- /dev/null
+++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch
@@ -0,0 +1,305 @@
1From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001
2From: Jason Wu <jason.wu.misc@gmail.com>
3Date: Sun, 10 Apr 2016 13:14:13 +1000
4Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards
5
6Add the dglnt_encoder driver that enables DRM support for the VGA and
7HDMI output ports found on many Digilent boards.
8
9Upstream-Status: Pending
10
11Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com>
12Signed-off-by: Jason Wu <jason.wu.misc@gmail.com>
13---
14 .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++
15 drivers/gpu/drm/xilinx/Kconfig | 6 +
16 drivers/gpu/drm/xilinx/Makefile | 1 +
17 drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++
18 4 files changed, 247 insertions(+)
19 create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt
20 create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c
21
22diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt
23new file mode 100644
24index 0000000..242b24e
25--- /dev/null
26+++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt
27@@ -0,0 +1,23 @@
28+Device-Tree bindings for Digilent DRM Encoder Slave
29+
30+This driver provides support for VGA and HDMI outputs on Digilent FPGA boards.
31+The VGA or HDMI port must be connected to a Xilinx display pipeline via an
32+axi2vid IP core.
33+
34+Required properties:
35+ - compatible: Should be "digilent,drm-encoder".
36+
37+Optional properties:
38+ - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video
39+ connector. This is used to obtain the supported resolutions
40+ of an attached monitor. If not defined, then a default
41+ set of resolutions is used and the display will initialize
42+ to 720p. Note most VGA connectors on Digilent boards do
43+ not have the DDC bus routed out.
44+
45+Example:
46+
47+ encoder_0: digilent_encoder {
48+ compatible = "digilent,drm-encoder";
49+ dglnt,edid-i2c = <&i2c1>;
50+ };
51diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig
52index 57e18a9..d9ecff2 100644
53--- a/drivers/gpu/drm/xilinx/Kconfig
54+++ b/drivers/gpu/drm/xilinx/Kconfig
55@@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB
56 help
57 DRM driver for Xilinx Display Port Subsystem.
58
59+config DRM_DIGILENT_ENCODER
60+ tristate "Digilent VGA/HDMI DRM Encoder Driver"
61+ depends on DRM_XILINX
62+ help
63+ DRM slave encoder for Video-out on Digilent boards.
64+
65 config DRM_XILINX_DP_SUB_DEBUG_FS
66 bool "Xilinx DRM DPSUB debugfs"
67 depends on DEBUG_FS && DRM_XILINX_DP_SUB
68diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile
69index 19bc154..c2717e40 100644
70--- a/drivers/gpu/drm/xilinx/Makefile
71+++ b/drivers/gpu/drm/xilinx/Makefile
72@@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \
73 xilinx_drm_plane.o
74 xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o
75
76+obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o
77 obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o
78 obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o
79 obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o
80diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c
81new file mode 100644
82index 0000000..cb9fc7d
83--- /dev/null
84+++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c
85@@ -0,0 +1,217 @@
86+/*
87+ * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards
88+ *
89+ * Copyright (C) 2015 Digilent
90+ * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com>
91+ *
92+ * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat.
93+ * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc.
94+ *
95+ * This software is licensed under the terms of the GNU General Public
96+ * License version 2, as published by the Free Software Foundation, and
97+ * may be copied, distributed, and modified under those terms.
98+ *
99+ * This program is distributed in the hope that it will be useful,
100+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
101+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
102+ * GNU General Public License for more details.
103+ */
104+
105+#include <drm/drmP.h>
106+#include <drm/drm_edid.h>
107+#include <drm/drm_encoder_slave.h>
108+
109+#include <linux/device.h>
110+#include <linux/module.h>
111+#include <linux/err.h>
112+#include <linux/i2c.h>
113+#include <linux/of.h>
114+#include <linux/of_platform.h>
115+#include <linux/platform_device.h>
116+
117+#define DGLNT_ENC_MAX_FREQ 150000
118+#define DGLNT_ENC_MAX_H 1920
119+#define DGLNT_ENC_MAX_V 1080
120+#define DGLNT_ENC_PREF_H 1280
121+#define DGLNT_ENC_PREF_V 720
122+
123+struct dglnt_encoder {
124+ struct drm_encoder *encoder;
125+ struct i2c_adapter *i2c_bus;
126+ bool i2c_present;
127+};
128+
129+static inline struct dglnt_encoder *to_dglnt_encoder(
130+ struct drm_encoder *encoder)
131+{
132+ return to_encoder_slave(encoder)->slave_priv;
133+}
134+
135+static bool dglnt_mode_fixup(struct drm_encoder *encoder,
136+ const struct drm_display_mode *mode,
137+ struct drm_display_mode *adjusted_mode)
138+{
139+ return true;
140+}
141+
142+static void dglnt_encoder_mode_set(struct drm_encoder *encoder,
143+ struct drm_display_mode *mode,
144+ struct drm_display_mode *adjusted_mode)
145+{
146+}
147+
148+static void
149+dglnt_encoder_dpms(struct drm_encoder *encoder, int mode)
150+{
151+}
152+
153+static void dglnt_encoder_save(struct drm_encoder *encoder)
154+{
155+}
156+
157+static void dglnt_encoder_restore(struct drm_encoder *encoder)
158+{
159+}
160+
161+static int dglnt_encoder_mode_valid(struct drm_encoder *encoder,
162+ struct drm_display_mode *mode)
163+{
164+ if (mode &&
165+ !(mode->flags & ((DRM_MODE_FLAG_INTERLACE |
166+ DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) &&
167+ (mode->clock <= DGLNT_ENC_MAX_FREQ) &&
168+ (mode->hdisplay <= DGLNT_ENC_MAX_H) &&
169+ (mode->vdisplay <= DGLNT_ENC_MAX_V))
170+ return MODE_OK;
171+ return MODE_BAD;
172+}
173+
174+static int dglnt_encoder_get_modes(struct drm_encoder *encoder,
175+ struct drm_connector *connector)
176+{
177+ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder);
178+ struct edid *edid;
179+ int num_modes = 0;
180+
181+ if (dglnt->i2c_present) {
182+ edid = drm_get_edid(connector, dglnt->i2c_bus);
183+ drm_connector_update_edid_property(connector, edid);
184+ if (edid) {
185+ num_modes = drm_add_edid_modes(connector, edid);
186+ kfree(edid);
187+ }
188+ } else {
189+ num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H,
190+ DGLNT_ENC_MAX_V);
191+ drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H,
192+ DGLNT_ENC_PREF_V);
193+ }
194+ return num_modes;
195+}
196+
197+static enum drm_connector_status dglnt_encoder_detect(
198+ struct drm_encoder *encoder,
199+ struct drm_connector *connector)
200+{
201+ struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder);
202+
203+ if (dglnt->i2c_present) {
204+ if (drm_probe_ddc(dglnt->i2c_bus))
205+ return connector_status_connected;
206+ return connector_status_disconnected;
207+ } else
208+ return connector_status_unknown;
209+}
210+
211+static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = {
212+ .dpms = dglnt_encoder_dpms,
213+ .save = dglnt_encoder_save,
214+ .restore = dglnt_encoder_restore,
215+ .mode_fixup = dglnt_mode_fixup,
216+ .mode_valid = dglnt_encoder_mode_valid,
217+ .mode_set = dglnt_encoder_mode_set,
218+ .detect = dglnt_encoder_detect,
219+ .get_modes = dglnt_encoder_get_modes,
220+};
221+
222+static int dglnt_encoder_encoder_init(struct platform_device *pdev,
223+ struct drm_device *dev,
224+ struct drm_encoder_slave *encoder)
225+{
226+ struct dglnt_encoder *dglnt = platform_get_drvdata(pdev);
227+ struct device_node *sub_node;
228+
229+ encoder->slave_priv = dglnt;
230+ encoder->slave_funcs = &dglnt_encoder_slave_funcs;
231+
232+ dglnt->encoder = &encoder->base;
233+
234+ /* get i2c adapter for edid */
235+ dglnt->i2c_present = false;
236+ sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0);
237+ if (sub_node) {
238+ dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node);
239+ if (!dglnt->i2c_bus)
240+ DRM_INFO("failed to get the edid i2c adapter, using default modes\n");
241+ else
242+ dglnt->i2c_present = true;
243+ of_node_put(sub_node);
244+ }
245+
246+ return 0;
247+}
248+
249+static int dglnt_encoder_probe(struct platform_device *pdev)
250+{
251+ struct dglnt_encoder *dglnt;
252+
253+ dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL);
254+ if (!dglnt)
255+ return -ENOMEM;
256+
257+ platform_set_drvdata(pdev, dglnt);
258+
259+ return 0;
260+}
261+
262+static int dglnt_encoder_remove(struct platform_device *pdev)
263+{
264+ return 0;
265+}
266+
267+static const struct of_device_id dglnt_encoder_of_match[] = {
268+ { .compatible = "digilent,drm-encoder", },
269+ { /* end of table */ },
270+};
271+MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match);
272+
273+static struct drm_platform_encoder_driver dglnt_encoder_driver = {
274+ .platform_driver = {
275+ .probe = dglnt_encoder_probe,
276+ .remove = dglnt_encoder_remove,
277+ .driver = {
278+ .owner = THIS_MODULE,
279+ .name = "dglnt-drm-enc",
280+ .of_match_table = dglnt_encoder_of_match,
281+ },
282+ },
283+
284+ .encoder_init = dglnt_encoder_encoder_init,
285+};
286+
287+static int __init dglnt_encoder_init(void)
288+{
289+ return platform_driver_register(&dglnt_encoder_driver.platform_driver);
290+}
291+
292+static void __exit dglnt_encoder_exit(void)
293+{
294+ platform_driver_unregister(&dglnt_encoder_driver.platform_driver);
295+}
296+
297+module_init(dglnt_encoder_init);
298+module_exit(dglnt_encoder_exit);
299+
300+MODULE_AUTHOR("Digilent, Inc.");
301+MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards");
302+MODULE_LICENSE("GPL v2");
303--
3042.7.4
305
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch
new file mode 100644
index 00000000..9b6229db
--- /dev/null
+++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch
@@ -0,0 +1,607 @@
1From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001
2From: Jason Wu <jason.wu.misc@gmail.com>
3Date: Sun, 10 Apr 2016 13:16:06 +1000
4Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core
5
6Add support for the axi_dynclk IP Core available from Digilent. This IP
7core dynamically configures the clock resources inside a Xilinx FPGA to
8generate a clock with a software programmable frequency.
9
10Upstream-Status: Pending
11
12Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com>
13Signed-off-by: Jason Wu <jason.wu.misc@gmail.com>
14---
15 drivers/clk/Kconfig | 8 +
16 drivers/clk/Makefile | 1 +
17 drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++
18 3 files changed, 556 insertions(+)
19 create mode 100644 drivers/clk/clk-dglnt-dynclk.c
20
21diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
22index dccb111100..7fe65a702b 100644
23--- a/drivers/clk/Kconfig
24+++ b/drivers/clk/Kconfig
25@@ -148,6 +148,14 @@ config CLK_QORIQ
26 This adds the clock driver support for Freescale QorIQ platforms
27 using common clock framework.
28
29+config COMMON_CLK_DGLNT_DYNCLK
30+ tristate "Digilent axi_dynclk Driver"
31+ depends on ARCH_ZYNQ || MICROBLAZE
32+ help
33+ ---help---
34+ Support for the Digilent AXI Dynamic Clock core for Xilinx
35+ FPGAs.
36+
37 config COMMON_CLK_XGENE
38 bool "Clock driver for APM XGene SoC"
39 default y
40diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
41index 0760449dde..45ce97d053 100644
42--- a/drivers/clk/Makefile
43+++ b/drivers/clk/Makefile
44@@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o
45 obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o
46 obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o
47 obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o
48+obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o
49 obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o
50 obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o
51 obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
52diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c
53new file mode 100644
54index 0000000000..496ad5fc90
55--- /dev/null
56+++ b/drivers/clk/clk-dglnt-dynclk.c
57@@ -0,0 +1,547 @@
58+/*
59+ * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver
60+ *
61+ * Copyright (C) 2015 Digilent
62+ * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com>
63+ *
64+ * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc.
65+ *
66+ * This software is licensed under the terms of the GNU General Public
67+ * License version 2, as published by the Free Software Foundation, and
68+ * may be copied, distributed, and modified under those terms.
69+ *
70+ * This program is distributed in the hope that it will be useful,
71+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
72+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73+ * GNU General Public License for more details.
74+ */
75+
76+#include <linux/platform_device.h>
77+#include <linux/clk-provider.h>
78+#include <linux/clk.h>
79+#include <linux/slab.h>
80+#include <linux/io.h>
81+#include <linux/of.h>
82+#include <linux/module.h>
83+#include <linux/err.h>
84+#include <linux/kernel.h>
85+
86+#define CLK_BIT_WEDGE 13
87+#define CLK_BIT_NOCOUNT 12
88+
89+/* This value is used to signal an error */
90+#define ERR_CLKCOUNTCALC 0xFFFFFFFF
91+#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT)
92+
93+#define DYNCLK_DIV_1_REGMASK 0x1041
94+/* 25 MHz (125 KHz / 5) */
95+#define DYNCLK_DEFAULT_FREQ 125000
96+
97+#define MMCM_FREQ_VCOMIN 600000
98+#define MMCM_FREQ_VCOMAX 1200000
99+#define MMCM_FREQ_PFDMIN 10000
100+#define MMCM_FREQ_PFDMAX 450000
101+#define MMCM_FREQ_OUTMIN 4000
102+#define MMCM_FREQ_OUTMAX 800000
103+#define MMCM_DIV_MAX 106
104+#define MMCM_FB_MIN 2
105+#define MMCM_FB_MAX 64
106+#define MMCM_CLKDIV_MAX 128
107+#define MMCM_CLKDIV_MIN 1
108+
109+#define OFST_DISPLAY_CTRL 0x0
110+#define OFST_DISPLAY_STATUS 0x4
111+#define OFST_DISPLAY_CLK_L 0x8
112+#define OFST_DISPLAY_FB_L 0x0C
113+#define OFST_DISPLAY_FB_H_CLK_H 0x10
114+#define OFST_DISPLAY_DIV 0x14
115+#define OFST_DISPLAY_LOCK_L 0x18
116+#define OFST_DISPLAY_FLTR_LOCK_H 0x1C
117+
118+static const u64 lock_lookup[64] = {
119+ 0b0011000110111110100011111010010000000001,
120+ 0b0011000110111110100011111010010000000001,
121+ 0b0100001000111110100011111010010000000001,
122+ 0b0101101011111110100011111010010000000001,
123+ 0b0111001110111110100011111010010000000001,
124+ 0b1000110001111110100011111010010000000001,
125+ 0b1001110011111110100011111010010000000001,
126+ 0b1011010110111110100011111010010000000001,
127+ 0b1100111001111110100011111010010000000001,
128+ 0b1110011100111110100011111010010000000001,
129+ 0b1111111111111000010011111010010000000001,
130+ 0b1111111111110011100111111010010000000001,
131+ 0b1111111111101110111011111010010000000001,
132+ 0b1111111111101011110011111010010000000001,
133+ 0b1111111111101000101011111010010000000001,
134+ 0b1111111111100111000111111010010000000001,
135+ 0b1111111111100011111111111010010000000001,
136+ 0b1111111111100010011011111010010000000001,
137+ 0b1111111111100000110111111010010000000001,
138+ 0b1111111111011111010011111010010000000001,
139+ 0b1111111111011101101111111010010000000001,
140+ 0b1111111111011100001011111010010000000001,
141+ 0b1111111111011010100111111010010000000001,
142+ 0b1111111111011001000011111010010000000001,
143+ 0b1111111111011001000011111010010000000001,
144+ 0b1111111111010111011111111010010000000001,
145+ 0b1111111111010101111011111010010000000001,
146+ 0b1111111111010101111011111010010000000001,
147+ 0b1111111111010100010111111010010000000001,
148+ 0b1111111111010100010111111010010000000001,
149+ 0b1111111111010010110011111010010000000001,
150+ 0b1111111111010010110011111010010000000001,
151+ 0b1111111111010010110011111010010000000001,
152+ 0b1111111111010001001111111010010000000001,
153+ 0b1111111111010001001111111010010000000001,
154+ 0b1111111111010001001111111010010000000001,
155+ 0b1111111111001111101011111010010000000001,
156+ 0b1111111111001111101011111010010000000001,
157+ 0b1111111111001111101011111010010000000001,
158+ 0b1111111111001111101011111010010000000001,
159+ 0b1111111111001111101011111010010000000001,
160+ 0b1111111111001111101011111010010000000001,
161+ 0b1111111111001111101011111010010000000001,
162+ 0b1111111111001111101011111010010000000001,
163+ 0b1111111111001111101011111010010000000001,
164+ 0b1111111111001111101011111010010000000001,
165+ 0b1111111111001111101011111010010000000001,
166+ 0b1111111111001111101011111010010000000001,
167+ 0b1111111111001111101011111010010000000001,
168+ 0b1111111111001111101011111010010000000001,
169+ 0b1111111111001111101011111010010000000001,
170+ 0b1111111111001111101011111010010000000001,
171+ 0b1111111111001111101011111010010000000001,
172+ 0b1111111111001111101011111010010000000001,
173+ 0b1111111111001111101011111010010000000001,
174+ 0b1111111111001111101011111010010000000001,
175+ 0b1111111111001111101011111010010000000001,
176+ 0b1111111111001111101011111010010000000001,
177+ 0b1111111111001111101011111010010000000001,
178+ 0b1111111111001111101011111010010000000001,
179+ 0b1111111111001111101011111010010000000001,
180+ 0b1111111111001111101011111010010000000001,
181+ 0b1111111111001111101011111010010000000001,
182+ 0b1111111111001111101011111010010000000001
183+};
184+
185+static const u32 filter_lookup_low[64] = {
186+ 0b0001011111,
187+ 0b0001010111,
188+ 0b0001111011,
189+ 0b0001011011,
190+ 0b0001101011,
191+ 0b0001110011,
192+ 0b0001110011,
193+ 0b0001110011,
194+ 0b0001110011,
195+ 0b0001001011,
196+ 0b0001001011,
197+ 0b0001001011,
198+ 0b0010110011,
199+ 0b0001010011,
200+ 0b0001010011,
201+ 0b0001010011,
202+ 0b0001010011,
203+ 0b0001010011,
204+ 0b0001010011,
205+ 0b0001010011,
206+ 0b0001010011,
207+ 0b0001010011,
208+ 0b0001010011,
209+ 0b0001100011,
210+ 0b0001100011,
211+ 0b0001100011,
212+ 0b0001100011,
213+ 0b0001100011,
214+ 0b0001100011,
215+ 0b0001100011,
216+ 0b0001100011,
217+ 0b0001100011,
218+ 0b0001100011,
219+ 0b0001100011,
220+ 0b0001100011,
221+ 0b0001100011,
222+ 0b0001100011,
223+ 0b0010010011,
224+ 0b0010010011,
225+ 0b0010010011,
226+ 0b0010010011,
227+ 0b0010010011,
228+ 0b0010010011,
229+ 0b0010010011,
230+ 0b0010010011,
231+ 0b0010010011,
232+ 0b0010010011,
233+ 0b0010100011,
234+ 0b0010100011,
235+ 0b0010100011,
236+ 0b0010100011,
237+ 0b0010100011,
238+ 0b0010100011,
239+ 0b0010100011,
240+ 0b0010100011,
241+ 0b0010100011,
242+ 0b0010100011,
243+ 0b0010100011,
244+ 0b0010100011,
245+ 0b0010100011,
246+ 0b0010100011,
247+ 0b0010100011,
248+ 0b0010100011,
249+ 0b0010100011
250+};
251+
252+struct dglnt_dynclk_reg;
253+struct dglnt_dynclk_mode;
254+struct dglnt_dynclk;
255+
256+struct dglnt_dynclk_reg {
257+ u32 clk0L;
258+ u32 clkFBL;
259+ u32 clkFBH_clk0H;
260+ u32 divclk;
261+ u32 lockL;
262+ u32 fltr_lockH;
263+};
264+
265+struct dglnt_dynclk_mode {
266+ u32 freq;
267+ u32 fbmult;
268+ u32 clkdiv;
269+ u32 maindiv;
270+};
271+
272+struct dglnt_dynclk {
273+ void __iomem *base;
274+ struct clk_hw clk_hw;
275+ unsigned long freq;
276+};
277+
278+u32 dglnt_dynclk_divider(u32 divide)
279+{
280+ u32 output = 0;
281+ u32 highTime = 0;
282+ u32 lowTime = 0;
283+
284+ if ((divide < 1) || (divide > 128))
285+ return ERR_CLKDIVIDER;
286+
287+ if (divide == 1)
288+ return DYNCLK_DIV_1_REGMASK;
289+
290+ highTime = divide / 2;
291+ /* if divide is odd */
292+ if (divide & 0x1) {
293+ lowTime = highTime + 1;
294+ output = 1 << CLK_BIT_WEDGE;
295+ } else {
296+ lowTime = highTime;
297+ }
298+
299+ output |= 0x03F & lowTime;
300+ output |= 0xFC0 & (highTime << 6);
301+ return output;
302+}
303+
304+u32 dglnt_dynclk_count_calc(u32 divide)
305+{
306+ u32 output = 0;
307+ u32 divCalc = 0;
308+
309+ divCalc = dglnt_dynclk_divider(divide);
310+ if (divCalc == ERR_CLKDIVIDER)
311+ output = ERR_CLKCOUNTCALC;
312+ else
313+ output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000);
314+ return output;
315+}
316+
317+
318+int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues,
319+ struct dglnt_dynclk_mode *clkParams)
320+{
321+ if ((clkParams->fbmult < 2) || clkParams->fbmult > 64)
322+ return -EINVAL;
323+
324+ regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv);
325+ if (regValues->clk0L == ERR_CLKCOUNTCALC)
326+ return -EINVAL;
327+
328+ regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult);
329+ if (regValues->clkFBL == ERR_CLKCOUNTCALC)
330+ return -EINVAL;
331+
332+ regValues->clkFBH_clk0H = 0;
333+
334+ regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv);
335+ if (regValues->divclk == ERR_CLKDIVIDER)
336+ return -EINVAL;
337+
338+ regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] &
339+ 0xFFFFFFFF);
340+
341+ regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >>
342+ 32) & 0x000000FF);
343+ regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] <<
344+ 16) & 0x03FF0000);
345+
346+ return 0;
347+}
348+
349+void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues,
350+ void __iomem *baseaddr)
351+{
352+ writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L);
353+ writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L);
354+ writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H);
355+ writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV);
356+ writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L);
357+ writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H);
358+}
359+
360+u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq,
361+ struct dglnt_dynclk_mode *bestPick)
362+{
363+ u32 bestError = MMCM_FREQ_OUTMAX;
364+ u32 curError;
365+ u32 curClkMult;
366+ u32 curFreq;
367+ u32 divVal;
368+ u32 curFb, curClkDiv;
369+ u32 minFb = 0;
370+ u32 maxFb = 0;
371+ u32 curDiv = 1;
372+ u32 maxDiv;
373+ bool freq_found = false;
374+
375+ bestPick->freq = 0;
376+ if (parentFreq == 0)
377+ return 0;
378+
379+ /* minimum frequency is actually dictated by VCOmin */
380+ if (freq < MMCM_FREQ_OUTMIN)
381+ freq = MMCM_FREQ_OUTMIN;
382+ if (freq > MMCM_FREQ_OUTMAX)
383+ freq = MMCM_FREQ_OUTMAX;
384+
385+ if (parentFreq > MMCM_FREQ_PFDMAX)
386+ curDiv = 2;
387+ maxDiv = parentFreq / MMCM_FREQ_PFDMIN;
388+ if (maxDiv > MMCM_DIV_MAX)
389+ maxDiv = MMCM_DIV_MAX;
390+
391+ while (curDiv <= maxDiv && !freq_found) {
392+ minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq);
393+ maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq);
394+ if (maxFb > MMCM_FB_MAX)
395+ maxFb = MMCM_FB_MAX;
396+ if (minFb < MMCM_FB_MIN)
397+ minFb = MMCM_FB_MIN;
398+
399+ divVal = curDiv * freq;
400+ /*
401+ * This multiplier is used to find the best clkDiv value for
402+ * each FB value
403+ */
404+ curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal;
405+
406+ curFb = minFb;
407+ while (curFb <= maxFb && !freq_found) {
408+ curClkDiv = ((curClkMult * curFb) + 500) / 1000;
409+ if (curClkDiv > MMCM_CLKDIV_MAX)
410+ curClkDiv = MMCM_CLKDIV_MAX;
411+ if (curClkDiv < MMCM_CLKDIV_MIN)
412+ curClkDiv = MMCM_CLKDIV_MIN;
413+ curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv);
414+ if (curFreq >= freq)
415+ curError = curFreq - freq;
416+ else
417+ curError = freq - curFreq;
418+ if (curError < bestError) {
419+ bestError = curError;
420+ bestPick->clkdiv = curClkDiv;
421+ bestPick->fbmult = curFb;
422+ bestPick->maindiv = curDiv;
423+ bestPick->freq = curFreq;
424+ }
425+ if (!curError)
426+ freq_found = true;
427+ curFb++;
428+ }
429+ curDiv++;
430+ }
431+ return bestPick->freq;
432+}
433+
434+static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw)
435+{
436+ return container_of(clk_hw, struct dglnt_dynclk, clk_hw);
437+}
438+
439+
440+static int dglnt_dynclk_enable(struct clk_hw *clk_hw)
441+{
442+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw);
443+ unsigned int clock_state;
444+
445+ if (dglnt_dynclk->freq) {
446+ writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL);
447+ do {
448+ clock_state = readl(dglnt_dynclk->base +
449+ OFST_DISPLAY_STATUS);
450+ } while (!clock_state);
451+ }
452+ return 0;
453+}
454+
455+static void dglnt_dynclk_disable(struct clk_hw *clk_hw)
456+{
457+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw);
458+
459+ writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL);
460+}
461+
462+static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw,
463+ unsigned long rate, unsigned long parent_rate)
464+{
465+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw);
466+ struct dglnt_dynclk_reg clkReg;
467+ struct dglnt_dynclk_mode clkMode;
468+
469+ if (parent_rate == 0 || rate == 0)
470+ return -EINVAL;
471+ if (rate == dglnt_dynclk->freq)
472+ return 0;
473+
474+ /*
475+ * Convert from Hz to KHz, then multiply by five to account for
476+ * BUFR division
477+ */
478+ rate = (rate + 100) / 200;
479+ /* convert from Hz to KHz */
480+ parent_rate = (parent_rate + 500) / 1000;
481+ if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode))
482+ return -EINVAL;
483+
484+ /*
485+ * Write to the PLL dynamic configuration registers to configure it
486+ * with the calculated parameters.
487+ */
488+ dglnt_dynclk_find_reg(&clkReg, &clkMode);
489+ dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base);
490+ dglnt_dynclk->freq = clkMode.freq * 200;
491+ dglnt_dynclk_disable(clk_hw);
492+ dglnt_dynclk_enable(clk_hw);
493+
494+ return 0;
495+}
496+
497+static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate,
498+ unsigned long *parent_rate)
499+{
500+ struct dglnt_dynclk_mode clkMode;
501+
502+ dglnt_dynclk_find_mode(((rate + 100) / 200),
503+ ((*parent_rate) + 500) / 1000, &clkMode);
504+
505+ return (clkMode.freq * 200);
506+}
507+
508+static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw,
509+ unsigned long parent_rate)
510+{
511+ struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw);
512+
513+ return dglnt_dynclk->freq;
514+}
515+
516+
517+static const struct clk_ops dglnt_dynclk_ops = {
518+ .recalc_rate = dglnt_dynclk_recalc_rate,
519+ .round_rate = dglnt_dynclk_round_rate,
520+ .set_rate = dglnt_dynclk_set_rate,
521+ .enable = dglnt_dynclk_enable,
522+ .disable = dglnt_dynclk_disable,
523+};
524+
525+static const struct of_device_id dglnt_dynclk_ids[] = {
526+ { .compatible = "digilent,axi-dynclk", },
527+ { },
528+};
529+MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids);
530+
531+static int dglnt_dynclk_probe(struct platform_device *pdev)
532+{
533+ const struct of_device_id *id;
534+ struct dglnt_dynclk *dglnt_dynclk;
535+ struct clk_init_data init;
536+ const char *parent_name;
537+ const char *clk_name;
538+ struct resource *mem;
539+ struct clk *clk;
540+
541+ if (!pdev->dev.of_node)
542+ return -ENODEV;
543+
544+ id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node);
545+ if (!id)
546+ return -ENODEV;
547+
548+ dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk),
549+ GFP_KERNEL);
550+ if (!dglnt_dynclk)
551+ return -ENOMEM;
552+
553+ mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
554+ dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem);
555+ if (IS_ERR(dglnt_dynclk->base))
556+ return PTR_ERR(dglnt_dynclk->base);
557+
558+ parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0);
559+ if (!parent_name)
560+ return -EINVAL;
561+
562+ clk_name = pdev->dev.of_node->name;
563+ of_property_read_string(pdev->dev.of_node, "clock-output-names",
564+ &clk_name);
565+
566+ init.name = clk_name;
567+ init.ops = &dglnt_dynclk_ops;
568+ init.flags = 0;
569+ init.parent_names = &parent_name;
570+ init.num_parents = 1;
571+
572+ dglnt_dynclk->freq = 0;
573+ dglnt_dynclk_disable(&dglnt_dynclk->clk_hw);
574+
575+ dglnt_dynclk->clk_hw.init = &init;
576+ clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw);
577+ if (IS_ERR(clk))
578+ return PTR_ERR(clk);
579+
580+ return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get,
581+ clk);
582+}
583+
584+static int dglnt_dynclk_remove(struct platform_device *pdev)
585+{
586+ of_clk_del_provider(pdev->dev.of_node);
587+
588+ return 0;
589+}
590+
591+static struct platform_driver dglnt_dynclk_driver = {
592+ .driver = {
593+ .name = "dglnt-dynclk",
594+ .owner = THIS_MODULE,
595+ .of_match_table = dglnt_dynclk_ids,
596+ },
597+ .probe = dglnt_dynclk_probe,
598+ .remove = dglnt_dynclk_remove,
599+};
600+module_platform_driver(dglnt_dynclk_driver);
601+
602+MODULE_LICENSE("GPL v2");
603+MODULE_AUTHOR("Sam Bobrowicz <sbobrowicz@digilentinc.com>");
604+MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core");
605--
6062.14.2
607
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch
new file mode 100644
index 00000000..a98d84c5
--- /dev/null
+++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch
@@ -0,0 +1,54 @@
1From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001
2From: Nathan Rossi <nathan@nathanrossi.com>
3Date: Mon, 2 May 2016 23:46:42 +1000
4Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on
5
6Fix the issues where the VTC is reset (losing its timing config).
7
8Also fix the issue where the plane destroys its DMA descriptors and
9marks the DMA channels as inactive but never recreates the descriptors
10and never updates the active state when turning DPMS back on.
11
12Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
13Upstream-Status: Pending [This is a workaround]
14---
15 drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 -
16 drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c
20index 631d35b921..93dbd4b58a 100644
21--- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c
22+++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c
23@@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms)
24 default:
25 if (crtc->vtc) {
26 xilinx_vtc_disable(crtc->vtc);
27- xilinx_vtc_reset(crtc->vtc);
28 }
29 if (crtc->cresample) {
30 xilinx_cresample_disable(crtc->cresample);
31diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c
32index 6a248b72d4..d2518a4bdf 100644
33--- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c
34+++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c
35@@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane)
36 for (i = 0; i < MAX_NUM_SUB_PLANES; i++) {
37 struct xilinx_drm_plane_dma *dma = &plane->dma[i];
38
39- if (dma->chan && dma->is_active) {
40+ if (dma->chan) {
41 flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT;
42 desc = dmaengine_prep_interleaved_dma(dma->chan,
43 &dma->xt,
44@@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane)
45 dmaengine_submit(desc);
46
47 dma_async_issue_pending(dma->chan);
48+ dma->is_active = true;
49 }
50 }
51 }
52--
532.14.2
54
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg
new file mode 100644
index 00000000..f71e53ab
--- /dev/null
+++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg
@@ -0,0 +1,33 @@
1#
2# Bluetooth config
3#
4CONFIG_BT=y
5CONFIG_BT_BREDR=y
6CONFIG_BT_HS=y
7CONFIG_BT_LE=y
8CONFIG_BT_BCM=y
9CONFIG_BT_HCIUART=y
10CONFIG_BT_HCIUART_H4=y
11CONFIG_BT_HCIUART_BCM=y
12CONFIG_BT_HIDP=y
13CONFIG_CFG80211=y
14CONFIG_CFG80211_DEFAULT_PS=y
15CONFIG_CFG80211_CRDA_SUPPORT=y
16CONFIG_BRCMUTIL=y
17CONFIG_BRCMFMAC=y
18CONFIG_BRCMFMAC_PROTO_BCDC=y
19CONFIG_BRCMFMAC_SDIO=y
20CONFIG_CRYPTO_BLKCIPHER=y
21CONFIG_CRYPTO_MANAGER=y
22CONFIG_CRYPTO_ECB=y
23CONFIG_CRYPTO_CMAC=y
24CONFIG_CRYPTO_SHA256=y
25
26#
27# Regulator config
28#
29CONFIG_REGMAP_IRQ=y
30CONFIG_I2C_XILINX=y
31CONFIG_MFD_DA9062=y
32CONFIG_REGULATOR_DA9062=y
33
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend
new file mode 100644
index 00000000..c789c7a9
--- /dev/null
+++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend
@@ -0,0 +1,12 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/linux-xlnx/v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}:"
2
3# Note: These patches are very old and doesn't apply on top of 5.x
4# kernel. For more details refer README.md file.
5
6#SRC_URI:append:zybo-linux-bd-zynq7 = " \
7# file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \
8# file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \
9# file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \
10# "
11
12SRC_URI:append:minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg"
diff --git a/meta-xilinx-core/classes/xilinx-microblaze.bbclass b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass
index ed231a3a..ed231a3a 100644
--- a/meta-xilinx-core/classes/xilinx-microblaze.bbclass
+++ b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass
diff --git a/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass
new file mode 100644
index 00000000..ed4c1f87
--- /dev/null
+++ b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass
@@ -0,0 +1,142 @@
1#
2# Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6
7QSPI_SIZE ?= "0x2280000"
8
9# Register values
10IDN_REG ?= "0x4D554241"
11VERSION_REG ?= "0x1"
12LENGTH_REG ?= "0x4"
13PERSISTENT_REG ?= "0x01010000"
14
15# QSPI Offsets
16IMAGE_SELECTOR_OFFSET ?= "0x0"
17IMAGE_SELECTOR_BACKUP_OFFSET ?= "0x80000"
18PERSISTENT_REG_OFFSET ?= "0x100000"
19PERSISTENT_REG_BACKUP_OFFSET ?= "0x120000"
20IMAGE_A_OFFSET ?= "0x200000"
21IMAGE_A_IMGSEL_OFFSET ?= "0xF00000"
22IMAGE_B_OFFSET ?= "0xF80000"
23IMAGE_B_IMGSEL_OFFSET ?= "0x1C80000"
24IMAGE_RCVRY_OFFSET ?= "0x1E00000"
25IMAGE_RCVRY_BACKUP_OFFSET ?= "0x2000000"
26VERSION_OFFSET ?= "0x2240000"
27CHECKSUM_OFFSET ?= "0x2250000"
28
29def generate_spi_image(d):
30
31 import io
32 import hashlib
33 import time
34
35 qspi_size = int(d.getVar("QSPI_SIZE") or '0', 0)
36 int(d.getVar("QSPI_SIZE") or '0', 0)
37
38 # Register values
39 idn_reg = int(d.getVar("IDN_REG") or '0', 0)
40 version_reg = int(d.getVar("VERSION_REG") or '0', 0)
41 length_reg = int(d.getVar("LENGTH_REG") or '0', 0)
42 persistent_reg = int(d.getVar("PERSISTENT_REG") or '0', 0)
43
44 # QSPI Offsets
45 image_selector_offset = int(d.getVar("IMAGE_SELECTOR_OFFSET") or '0', 0)
46 image_selector_backup_offset = int(d.getVar("IMAGE_SELECTOR_BACKUP_OFFSET") or '0', 0)
47 persistent_reg_offset = int(d.getVar("PERSISTENT_REG_OFFSET") or '0', 0)
48 persistent_reg_backup_offset = int(d.getVar("PERSISTENT_REG_BACKUP_OFFSET") or '0', 0)
49 image_a_offset = int(d.getVar("IMAGE_A_OFFSET") or '0', 0)
50 image_a_imgsel_offset = int(d.getVar("IMAGE_A_IMGSEL_OFFSET") or '0', 0)
51 image_b_offset = int(d.getVar("IMAGE_B_OFFSET") or '0', 0)
52 image_b_imgsel_offset = int(d.getVar("IMAGE_B_IMGSEL_OFFSET") or '0', 0)
53 image_rcvry_offset = int(d.getVar("IMAGE_RCVRY_OFFSET") or '0', 0)
54 image_rcvry_backup_offset = int(d.getVar("IMAGE_RCVRY_BACKUP_OFFSET") or '0', 0)
55 version_offset = int(d.getVar("VERSION_OFFSET") or '0', 0)
56 checksum_offset = int(d.getVar("CHECKSUM_OFFSET") or '0', 0)
57
58 # QSPI data
59 qspi_data = io.BytesIO()
60 qspi_data.write(b'\xFF' * qspi_size)
61
62 # Image Selector - Primary, Backup, Image A and Image B
63 imgsel_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgsel-"+d.getVar("MACHINE")+".bin"
64 try:
65 with open(imgsel_file, "rb") as il:
66 imgsel = il.read(-1)
67 except OSError as err:
68 bb.fatal("Unable to open imgsel file: " + str(err))
69
70 qspi_data.seek(image_selector_offset)
71 qspi_data.write(imgsel)
72 qspi_data.seek(image_selector_backup_offset)
73 qspi_data.write(imgsel)
74 qspi_data.seek(image_a_imgsel_offset)
75 qspi_data.write(imgsel)
76 qspi_data.seek(image_b_imgsel_offset)
77 qspi_data.write(imgsel)
78
79 # Persistent Registers - Primary and Backup
80 p_reg = [idn_reg, version_reg, length_reg, persistent_reg, \
81 image_a_offset, image_b_offset, image_rcvry_offset]
82 checksum = 0xffffffff - (0xffffffff & sum(p_reg))
83 p_reg.insert(3, checksum)
84
85 qspi_data.seek(persistent_reg_offset)
86 for value in p_reg:
87 qspi_data.write(value.to_bytes(4, byteorder="little"))
88
89 qspi_data.seek(persistent_reg_backup_offset)
90 for value in p_reg:
91 qspi_data.write(value.to_bytes(4, byteorder="little"))
92
93 # Image A and B - boot.bin
94 try:
95 with open(d.getVar("DEPLOY_DIR_IMAGE")+"/boot.bin", "rb") as bo:
96 bootbin = bo.read(-1)
97 except OSError as err:
98 bb.fatal("Unable to open boot.bin file: " + str(err))
99
100 qspi_data.seek(image_a_offset)
101 qspi_data.write(bootbin)
102 qspi_data.seek(image_b_offset)
103 qspi_data.write(bootbin)
104
105 # Recovery Image & Recovery Image Backup
106 imgrcry_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgrcry-"+d.getVar("MACHINE")+".bin"
107 try:
108 with open(imgrcry_file, "rb") as iy:
109 imgrcry = iy.read(-1)
110 except OSError as err:
111 bb.fatal("Unable to open imgrcry file: " + str(err))
112
113 qspi_data.seek(image_rcvry_offset)
114 qspi_data.write(imgrcry)
115 qspi_data.seek(image_rcvry_backup_offset)
116 qspi_data.write(imgrcry)
117
118 # Version string and checksum
119 version = d.getVar("QSPI_IMAGE_VERSION")
120 date = time.strftime("%m%d%H%M")
121 machine = d.getVar("MACHINE")[:3]
122 image_name = d.getVar("QSPI_IMAGE_NAME")
123
124 qspi_version = f"{image_name}-{machine}-v{version}-{date}\x00"
125 qspi_data.seek(version_offset)
126 qspi_data.write(qspi_version.encode())
127
128 qspi_sha = hashlib.sha256(qspi_data.getbuffer())
129 qspi_data.seek(checksum_offset)
130 qspi_data.write(qspi_sha.digest())
131
132 # Write the QSPI data to file
133 with open(d.getVar("B") + "/" + d.getVar("IMAGE_NAME") + ".bin", "wb") as sq:
134 sq.write(qspi_data.getbuffer())
135
136do_compile[depends] += "virtual/boot-bin:do_deploy virtual/imgsel:do_deploy virtual/imgrcry:do_deploy"
137
138python amd_spi_image_do_compile() {
139 generate_spi_image(d)
140}
141
142EXPORT_FUNCTIONS do_compile
diff --git a/meta-xilinx-core/classes/dfx_user_dts.bbclass b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass
index 4404aa05..2b699d9d 100644
--- a/meta-xilinx-core/classes/dfx_user_dts.bbclass
+++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass
@@ -1,3 +1,8 @@
1#
2# Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
1# This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes. 6# This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes.
2# dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static 7# dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static
3# and DFx RP xsa outside of yocto. 8# and DFx RP xsa outside of yocto.
@@ -25,12 +30,23 @@ S ?= "${WORKDIR}"
25FW_DIR ?= "" 30FW_DIR ?= ""
26DTSI_PATH ?= "" 31DTSI_PATH ?= ""
27DTBO_PATH ?= "" 32DTBO_PATH ?= ""
33BIT_PATH ?= ""
34BIN_PATH ?= ""
35PDI_PATH ?= ""
36JSON_PATH ?= ""
37XCl_PATH ?= ""
28DT_FILES_PATH = "${S}/${DTSI_PATH}" 38DT_FILES_PATH = "${S}/${DTSI_PATH}"
29FIRMWARE_NAME_DT_FILE ?= "" 39FIRMWARE_NAME_DT_FILE ?= ""
30USER_DTS_FILE ?= "" 40USER_DTS_FILE ?= ""
31 41
32FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" 42FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property"
33USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay" 43USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay"
44DTSI_PATH[doc] = "Absolute '.dtsi' or ''.dts' file path as input to SRC_URI"
45DTBO_PATH[doc] = "Absolute '.dtbo' file path as input to SRC_URI"
46BIT_PATH[doc] = "Absolute '.bit' file path as input to SRC_URI"
47BIN_PATH[doc] = "Absolute '.bin' file path as input to SRC_URI"
48JSON_PATH[doc] = "Absolute '.json' file path as input to SRC_URI"
49XCL_PATH[doc] = "Absolute '.xclbin' file path as input to SRC_URI"
34 50
35python() { 51python() {
36 import re 52 import re
@@ -45,37 +61,59 @@ python() {
45 pdi_found = False 61 pdi_found = False
46 62
47 # Required Inputs 63 # Required Inputs
48 if '.dtsi' in d.getVar("SRC_URI") or '.dts' in d.getVar("SRC_URI"): 64 for s in d.getVar("SRC_URI").split():
49 dtsi_found = True 65 if s.endswith(('.dtsi', '.dts')):
50 d.setVar("DTSI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtsi' in a or '.dts' in a][0].lstrip('file://'))) 66 dtsi_found = True
51 67 d.setVar("DTSI_PATH",os.path.dirname(s.lstrip('file://')))
52 if '.dtbo' in d.getVar("SRC_URI"): 68 if s.endswith('.dtbo'):
53 dtbo_found = True 69 if dtbo_found:
54 d.setVar("DTBO_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtbo' in a][0].lstrip('file://'))) 70 bb.warn("More then one '.dtbo' file specified in SRC_URI.")
55 71 dtbo_found = True
56 if '.bit' in d.getVar("SRC_URI") and soc_family != "versal": 72 d.setVar("DTBO_PATH",os.path.dirname(s.lstrip('file://')))
57 bit_found = True 73 if soc_family == "zynq" or soc_family == "zynqmp":
58 d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bit' in a][0].lstrip('file://'))) 74 if s.endswith('.bit'):
75 if bit_found:
76 bb.warn("More then one '.bit' file specified in SRC_URI.")
77 bit_found = True
78 d.setVar("BIT_PATH",os.path.dirname(s.lstrip('file://')))
79 if s.endswith('.bin'):
80 if bin_found:
81 bb.warn("More then one '.bin' file specified in SRC_URI.")
82 bin_found = True
83 d.setVar("BIN_PATH",os.path.dirname(s.lstrip('file://')))
84 else:
85 if s.endswith('.pdi'):
86 if pdi_found:
87 bb.warn("More then one '.pdi' file specified in SRC_URI.")
88 pdi_found = True
89 d.setVar("PDI_PATH",os.path.dirname(s.lstrip('file://')))
59 90
60 if '.bin' in d.getVar("SRC_URI") and soc_family != "versal": 91 # Optional input
61 bin_found = True 92 if s.endswith('.json'):
62 d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bin' in a][0].lstrip('file://'))) 93 d.setVar("JSON_PATH",os.path.dirname(s.lstrip('file://')))
63 94
64 if '.pdi' in d.getVar("SRC_URI") and soc_family == "versal": 95 if s.endswith('.xclbin'):
65 pdi_found = True 96 d.setVar("XCL_PATH",os.path.dirname(s.lstrip('file://')))
66 d.setVar("PDI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.pdi' in a][0].lstrip('file://')))
67 97
68 # Check for valid combination of input files in SRC_URI 98 # Check for valid combination of input files in SRC_URI
69 if dtsi_found or dtbo_found: 99 # Skip recipe if any of the below conditions are not satisfied.
70 bb.debug(2, "dtsi or dtbo found in SRC_URI") 100 # 1. At least one bit or bin or pdi or dts or dtsi or dtbo should exists.
71 if bit_found or pdi_found or bin_found: 101 # 2. More than one dtbo.
72 bb.debug(2, "bitstream or pdi found in SRC_URI") 102 # 3. More than one bit or bin or pdi.
73 elif bit_found and bin_found: 103 # 4. More than one dts and zero dtsi.
104 # 5. More than one dtsi and zero dts.
105 if dtsi_found or dtbo_found or bit_found or bin_found or pdi_found:
106 bb.debug(2, "dtsi or dtbo or bitstream or pdi found in SRC_URI")
107 if bit_found and pdi_found :
108 raise bb.parse.SkipRecipe("Both '.bit' and '.pdi' file found in SRC_URI, this is invalid use case.")
109
110 if bin_found and pdi_found :
111 raise bb.parse.SkipRecipe("Both '.bin' and '.pdi' file found in SRC_URI, this is invalid use case.")
112
113 if bit_found and bin_found:
74 raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.") 114 raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.")
75 else:
76 raise bb.parse.SkipRecipe("Need one '.bit' or one '.pdi' file added to SRC_URI ")
77 else: 115 else:
78 raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ") 116 raise bb.parse.SkipRecipe("Need one '.dtsi' or '.dtbo' or '.bit' or '.bin' or '.pdi' file added to SRC_URI ")
79 117
80 # Check for valid combination of dtsi and dts files in SRC_URI 118 # Check for valid combination of dtsi and dts files in SRC_URI
81 # Following file combinations are not supported use case. 119 # Following file combinations are not supported use case.
@@ -90,27 +128,14 @@ python() {
90 raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case") 128 raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case")
91 elif dts_count > 1: 129 elif dts_count > 1:
92 raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case") 130 raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case")
93
94 # Optional input
95 if '.json' in d.getVar("SRC_URI"):
96 d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.json' in a][0].lstrip('file://')))
97
98 if '.xclbin' in d.getVar("SRC_URI"):
99 d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://')))
100} 131}
101 132
102# Function to get dts or dtsi file count.
103def get_dt_count(d, dt_ext):
104 import glob
105 dt_count = sum(1 for f in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.' + dt_ext),recursive=True) if os.path.isfile(f))
106 return dt_count
107
108# Function to search for dt firmware-name property in dts or dtsi file. 133# Function to search for dt firmware-name property in dts or dtsi file.
109python find_firmware_file() { 134python find_firmware_file() {
110 import glob 135 import glob
111 pattern_fw = 'firmware-name' 136 pattern_fw = 'firmware-name'
112 search_count = 0 137 search_count = 0
113 for dt_files in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True): 138 for dt_files in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True):
114 with open(dt_files, "r") as f: 139 with open(dt_files, "r") as f:
115 current_fd = f.read() 140 current_fd = f.read()
116 if pattern_fw in current_fd: 141 if pattern_fw in current_fd:
@@ -129,20 +154,20 @@ python do_configure() {
129 soc_family = d.getVar("SOC_FAMILY") 154 soc_family = d.getVar("SOC_FAMILY")
130 155
131 if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d): 156 if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d):
132 bb.warn("Using fpga-manager.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled") 157 bb.warn("Using dfx_user_dts.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled")
133 158
134 # Renaming firmware-name using $PN as bitstream/PDI will be renamed using 159 # Renaming firmware-name using $PN as bitstream/PDI will be renamed using
135 # $PN when generating the bin/pdi file. 160 # $PN when generating the bin/pdi file.
136 if os.path.isfile(d.getVar('S') + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): 161 if os.path.isfile(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')):
137 orig_dtsi = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0] 162 orig_dtsi = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0]
138 new_dtsi = d.getVar('S') + '/pl.dtsi_firmwarename' 163 new_dtsi = d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/pl.dtsi_firmwarename'
139 with open(new_dtsi, 'w') as newdtsi: 164 with open(new_dtsi, 'w') as newdtsi:
140 with open(orig_dtsi) as olddtsi: 165 with open(orig_dtsi) as olddtsi:
141 for line in olddtsi: 166 for line in olddtsi:
142 if soc_family == 'versal': 167 if soc_family == 'zynq' or soc_family == 'zynqmp':
143 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line)) 168 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bin\"',line))
144 else: 169 else:
145 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bit.bin\"',line)) 170 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line))
146 shutil.move(new_dtsi,orig_dtsi) 171 shutil.move(new_dtsi,orig_dtsi)
147} 172}
148 173
@@ -153,38 +178,37 @@ python devicetree_do_compile:append() {
153 soc_family = d.getVar("SOC_FAMILY") 178 soc_family = d.getVar("SOC_FAMILY")
154 179
155 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) 180 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
156 181 bin_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.bin'),recursive=True) if os.path.isfile(f))
157 # Skip devicetree do_compile task if input file is dtbo in SRC_URI 182 # Skip devicetree do_compile task if input file is dtbo or bin in SRC_URI
158 if not dtbo_count: 183 if not dtbo_count and not bin_count:
159 # Convert .bit to bit.bin format only if dtsi is input. 184 # Convert .bit to .bin format only if dtsi is input.
160 # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit or 185 # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit
161 # .bit.bin format and corresponding file name. Hence we are not doing 186 # or .bin format and corresponding file name. Hence we are not doing .bin
162 # bit.bin conversion. 187 # conversion.
163 if soc_family != 'versal' and glob.glob(d.getVar('S') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): 188 if soc_family == 'zynq' or soc_family == 'zynqmp' and glob.glob(d.getVar('S') + '/' +(d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')):
164 pn = d.getVar('PN') 189 pn = d.getVar('PN')
165 biffile = pn + '.bif' 190 biffile = pn + '.bif'
166
167 with open(biffile, 'w') as f: 191 with open(biffile, 'w') as f:
168 f.write('all:\n{\n\t' + glob.glob(d.getVar('S')+(d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}') 192 f.write('all:\n{\n\t' + glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}')
169 193
170 bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split() 194 bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split()
171 bootgenargs += ["-image", biffile, "-o", pn + ".bit.bin"] 195 bootgenargs += ["-image", biffile, "-o", pn + ".bin"]
172 subprocess.run(bootgenargs, check = True) 196 subprocess.run(bootgenargs, check = True)
173 197
174 # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag, 198 # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag,
175 # to convert bit file to bin format, "-o" option will not be effective 199 # to convert bit file to bin format, "-o" option will not be effective
176 # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bit.bin 200 # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bin
177 # file, Hence we need to rename this file from <bit_file_name>.bit.bin to 201 # file, Hence we need to rename this file from <bit_file_name>.bin to
178 # ${PN}.bit.bin which matches the firmware name in dtbo and move 202 # ${PN}.bin which matches the firmware name in dtbo and move
179 # ${PN}.bit.bin to ${B} directory. 203 # ${PN}.bin to ${B} directory.
180 if soc_family == 'zynq': 204 if soc_family == 'zynq':
181 src_bitbin_file = glob.glob(d.getVar('S') + (d.getVar('BIT_PATH') or '') + '/*.bit.bin')[0] 205 src_bitbin_file = glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bin')[0]
182 dst_bitbin_file = d.getVar('B') + '/' + pn + '.bit.bin' 206 dst_bitbin_file = d.getVar('B') + '/' + pn + '.bin'
183 shutil.move(src_bitbin_file, dst_bitbin_file) 207 shutil.move(src_bitbin_file, dst_bitbin_file)
184 208
185 if not os.path.isfile(pn + ".bit.bin"): 209 if not os.path.isfile(pn + ".bin"):
186 bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \ 210 bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \
187 "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bit.bin')) 211 "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bin'))
188} 212}
189 213
190# If user inputs both dtsi and dts files then device-tree will generate dtbo 214# If user inputs both dtsi and dts files then device-tree will generate dtbo
@@ -192,17 +216,23 @@ python devicetree_do_compile:append() {
192# overlay file. 216# overlay file.
193python find_user_dts_overlay_file() { 217python find_user_dts_overlay_file() {
194 import glob 218 import glob
195 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) 219 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTBO_PATH') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
196 # Skip if input file is dtbo in SRC_URI 220 dts_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dts'),recursive=True) if os.path.isfile(f))
197 if not dtbo_count: 221 dtsi_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dtsi'),recursive=True) if os.path.isfile(f))
198 dts_count = get_dt_count(d, 'dts') 222 # Set USER_DTS_FILE if input file is dts/dtsi in SRC_URI else skip operation.
199 dtsi_count = get_dt_count(d, 'dtsi') 223 if not dtbo_count and dts_count or dtsi_count:
200 if dtsi_count == 1 and dts_count == 0: 224 if dtsi_count == 1 and dts_count == 0:
201 dts_file =glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0] 225 dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0]
202 elif dtsi_count >=0 and dts_count == 1: 226 elif dtsi_count >=0 and dts_count == 1:
203 dts_file = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dts')[0] 227 dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dts')[0]
228 else:
229 dts_file = ''
204 230
205 d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0]) 231 d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0])
232 elif dtbo_count:
233 bb.debug(2, "Firmware recipe input file is dtbo in SRC_URI")
234 else:
235 bb.debug(2, "Firmware recipe input file is bit/bin/pdi in SRC_URI")
206} 236}
207 237
208do_install[prefuncs] += "find_user_dts_overlay_file" 238do_install[prefuncs] += "find_user_dts_overlay_file"
@@ -210,8 +240,12 @@ do_install[prefuncs] += "find_user_dts_overlay_file"
210do_install() { 240do_install() {
211 install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 241 install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
212 242
243 # Install dtbo
213 # In case of dtbo as input, dtbo will be copied from directly from ${S} 244 # In case of dtbo as input, dtbo will be copied from directly from ${S}
214 # In case of dtsi as input, dtbo will be copied from directly from ${B} 245 # In case of dtsi as input, dtbo will be copied from directly from ${B}
246 # If more than one dtbo file is found then fatal the task.
247 # If no dtbo file is found add warning message as in some use case if IP
248 # doesn't have any driver then user can load pdi/bit/bin file.
215 if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then 249 if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then
216 install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 250 install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
217 elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then 251 elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then
@@ -219,44 +253,56 @@ do_install() {
219 elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then 253 elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
220 install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo 254 install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo
221 else 255 else
222 bbfatal "A dtbo ending '.dtbo' expected but not found" 256 bbnote "A dtbo ending '.dtbo' expected but not found in ${S} or ${B}, This means firmware can be loaded without dtbo dependency."
223 fi 257 fi
224 258
225 if [ "${SOC_FAMILY}" == "versal" ]; then 259 # Install bit or bin if soc family is zynq-7000 or zynqmp.
226 # In case of dtbo as input, pdi will be copied from directly from ${S} 260 # In case of dtbo as input or no dtbo exists in ${B}, then .bit or .bin will
227 # without renaming the pdi name to ${PN}.pdi 261 # be copied from directly from ${S} without renaming the .bit/.bin name to
228 if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then 262 # ${PN}.bit/${PN}.bin.
229 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 263 # if more than one .bit/.bin file is found then fatal the task.
230 elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then 264 # if no .bit/.bin file is found then fatal the task.
231 bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" 265 if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then
232 elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
233 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi
234 else
235 bbfatal "A PDI file with '.pdi' expected but not found"
236 fi
237 else
238 # In case of dtbo as input, .bit or .bin will be copied from directly
239 # from ${S} without renaming the .bit/.bin name to ${PN}.bit/${PN}.bin
240 # if more than one .bit/.bin file is found then fail the task.
241 if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then 266 if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then
242 bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" 267 bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)"
243 elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then 268 elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then
244 bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" 269 bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)"
245 elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then 270 elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then
246 install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 271 install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
247 elif [ `ls ${S}/*.bin | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then 272 elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then
248 install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 273 install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
249 elif [ -f ${B}/${PN}.bit.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then 274 elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
250 install -Dm 0644 ${B}/${PN}.bit.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bit.bin 275 install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin
251 else 276 else
252 bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" 277 bbfatal "A bitstream file with '.bit' or '.bin' expected but not found"
253 fi 278 fi
254 fi 279 fi
255 280
281 # Install pdi if soc family is versal or new silicon.
282 # In case of dtbo as input or no dtbo exists in ${B}, then .pdi will be copied
283 # from directly from ${S} without renaming the pdi name to ${PN}.pdi
284 # if more than one .pdi file is found then fail the task.
285 # In case of Versal DFx Static, only static dtbo can be loaded as BOOT.bin
286 # already contains static pdi. bbclass is not smart enough to determine
287 # whether it is static pdi or not, hence change fatal to warn if no PDI is found.
288 if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then
289 if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then
290 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
291 elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then
292 bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)"
293 elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
294 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi
295 else
296 bbwarn "A PDI file with '.pdi' expected but not found"
297 fi
298 fi
299
300 # Install xclbin
256 if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then 301 if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then
257 install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin 302 install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin
258 fi 303 fi
259 304
305 # Install shell.json or accel.json
260 if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then 306 if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then
261 install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ 307 install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
262 fi 308 fi
diff --git a/meta-xilinx-core/classes-recipe/fw-package.bbclass b/meta-xilinx-core/classes-recipe/fw-package.bbclass
new file mode 100644
index 00000000..e9847d33
--- /dev/null
+++ b/meta-xilinx-core/classes-recipe/fw-package.bbclass
@@ -0,0 +1,94 @@
1#
2# Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6# This bbclass provides infrastructure to package and deploy firmware baremetal
7# or freertos application elf or bin files to linux root filesystem under
8# /lib/firmware directory.
9
10inherit deploy
11
12INHERIT_DEFAULT_DEPENDS = "1"
13
14# Since we're just copying, we can run any config.
15COMPATIBLE_HOST = ".*"
16
17PACKAGE_ARCH = "${MACHINE_ARCH}"
18
19# Default expects the user to provide the fw app in the deploy directory.
20# A machine, multiconfig, or local.conf should override this.
21FW_NAME ??= ""
22TARGET_MC ??= ""
23FW_DEPENDS ??= ""
24FW_MCDEPENDS ??= ""
25FW_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
26FW_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
27FW_IMAGE_NAME ??= "${FW_NAME}-${MACHINE}-${TARGET_MC}"
28
29# Default is for the multilib case (without the extension .elf/.bin)
30FW_FILE ??= "${FW_DEPLOY_DIR}/${FW_IMAGE_NAME}"
31FW_FILE[vardepsexclude] = "FW_DEPLOY_DIR"
32
33do_fetch[depends] += "${FW_DEPENDS}"
34do_fetch[mcdepends] += "${FW_MCDEPENDS}"
35
36# Set default destination directory is /lib/firmware, user can change this value
37# to /boot directory depending on requirement.
38DESTDIR ??= "${nonarch_base_libdir}/firmware/xilinx"
39SYSROOT_DIRS += "/boot"
40
41INSANE_SKIP:${PN} = "arch"
42INSANE_SKIP:${PN}-dbg = "arch"
43
44# Disable buildpaths QA check warnings.
45INSANE_SKIP:${PN} += "buildpaths"
46
47do_install() {
48 if [ ! -e ${FW_FILE}.elf ]; then
49 echo "Unable to find FW_FILE (${FW_FILE}.elf)"
50 exit 1
51 fi
52
53 install -Dm 0644 ${FW_FILE}.elf ${D}${DESTDIR}/${FW_IMAGE_NAME}.elf
54}
55
56# If the item is already in OUR deploy_image_dir, nothing to deploy!
57SHOULD_DEPLOY = "${@'false' if (d.getVar('FW_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}"
58do_deploy() {
59 # If the item is already in OUR deploy_image_dir, nothing to deploy!
60 if ${SHOULD_DEPLOY}; then
61 install -Dm 0644 ${FW_FILE}.elf ${DEPLOYDIR}/${FW_IMAGE_NAME}.elf
62 install -Dm 0644 ${FW_FILE}.bin ${DEPLOYDIR}/${FW_IMAGE_NAME}.bin
63 fi
64}
65
66FILES:${PN} += "${DESTDIR}/${FW_IMAGE_NAME}*"
67
68def check_fw_vars(d):
69 # If both are blank, the user MUST pass in the path to the firmware!
70 if not d.getVar('FW_DEPENDS') and not d.getVar('FW_MCDEPENDS'):
71 # Don't cache this, as the items on disk can change!
72 d.setVar('BB_DONT_CACHE', '1')
73
74 msg = ""
75 fail = False
76 if not os.path.exists(d.getVar('FW_FILE') + ".elf"):
77 msg = msg + "The expected file %s.elf is not available. " % d.getVar('FW_FILE')
78 fail = True
79 if not os.path.exists(d.getVar('FW_FILE') + ".bin"):
80 msg = msg + "The expected file %s.bin is not available. " % d.getVar('FW_FILE')
81 fail = True
82 if fail:
83 if not d.getVar('WITHIN_EXT_SDK'):
84 raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg)
85 else:
86 # We found the file, so be sure to track it
87 d.setVar('SRC_URI', 'file://${FW_FILE}.elf file://${FW_FILE}.bin')
88 d.setVarFlag('do_install', 'file-checksums', '${FW_FILE}.elf:True ${FW_FILE}.bin:True')
89 d.setVarFlag('do_deploy', 'file-checksums', '${FW_FILE}.elf:True ${FW_FILE}.bin:True')
90
91python() {
92 # Need to allow bbappends to change the check
93 check_fw_vars(d)
94}
diff --git a/meta-xilinx-core/classes/image-wic-utils.bbclass b/meta-xilinx-core/classes-recipe/image-wic-utils.bbclass
index 41ad8148..41ad8148 100644
--- a/meta-xilinx-core/classes/image-wic-utils.bbclass
+++ b/meta-xilinx-core/classes-recipe/image-wic-utils.bbclass
diff --git a/meta-xilinx-core/classes/kernel-simpleimage.bbclass b/meta-xilinx-core/classes-recipe/kernel-simpleimage.bbclass
index 110ee254..110ee254 100644
--- a/meta-xilinx-core/classes/kernel-simpleimage.bbclass
+++ b/meta-xilinx-core/classes-recipe/kernel-simpleimage.bbclass
diff --git a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
index 7466ab5e..7466ab5e 100644
--- a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass
+++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
diff --git a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass
index a778ec7d..a778ec7d 100644
--- a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass
+++ b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass
diff --git a/meta-xilinx-core/classes/xilinx-platform-init.bbclass b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass
index 99f7863a..99f7863a 100644
--- a/meta-xilinx-core/classes/xilinx-platform-init.bbclass
+++ b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass
diff --git a/meta-xilinx-core/classes/fpgamanager_custom.bbclass b/meta-xilinx-core/classes/fpgamanager_custom.bbclass
deleted file mode 100644
index 8c8997a1..00000000
--- a/meta-xilinx-core/classes/fpgamanager_custom.bbclass
+++ /dev/null
@@ -1,24 +0,0 @@
1# This class inherits dfx_user_dts.bbclass for below use cases.
2# Zynq-7000 and ZynqMP: Full bitstream loading.
3# ZynqMP: DFx Static and Partial bitstream loading.
4# Versal: DFx Static and Parial pdi loading.
5# Versal: Full PDI loading.
6
7inherit dfx_user_dts
8
9python fpgamanager_warn_msg () {
10 if not d.getVar("FPGAMANAGER_NO_WARN"):
11 arch = d.getVar('SOC_FAMILY')
12 pn = d.getVar('PN')
13 warn_msg = 'Users should start using dfx_user_dts bbclass for '
14 if arch == 'zynq':
15 warn_msg += 'Zynq-7000 Full bitstream loading use case.'
16 elif arch == 'zynqmp':
17 warn_msg += 'ZynqMP Full or DFx Static or DFx Partial bitstream loading use case.'
18 elif arch == 'versal':
19 warn_msg += 'Versal DFx Static or DFx Partial or Full PDI loading use case.'
20
21 bb.warn("Recipe %s has inherited fpgamanager_custom bbclass which will be deprecated in 2024.1 release. \n%s" % (pn, warn_msg))
22}
23
24do_install[postfuncs] += "fpgamanager_warn_msg" \ No newline at end of file
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf
index b9804261..d6b93f9d 100644
--- a/meta-xilinx-core/conf/layer.conf
+++ b/meta-xilinx-core/conf/layer.conf
@@ -42,7 +42,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
42 *->xserver-xorg \ 42 *->xserver-xorg \
43" 43"
44 44
45XILINX_RELEASE_VERSION ??= "v2023.2" 45XILINX_RELEASE_VERSION ??= "v2024.1"
46 46
47BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" 47BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION"
48 48
@@ -50,6 +50,8 @@ XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%"
50XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" 50XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%"
51XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" 51XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%"
52XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" 52XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%"
53XILINX_QEMU_VERSION[v2024.1] = "v8.1.0-xilinx-v2024.1%"
54PREFERRED_VERSION_qemu ?= "${@ '7.1%' if not (d.getVar('XILINX_RELEASE_VERSION') or 'undefined').startswith('v2024') else '8.1%'}"
53PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 55PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
54PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 56PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
55PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 57PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
@@ -59,12 +61,18 @@ DEFAULT_XILINX_QEMU = "qemu-xilinx"
59DEFAULT_XILINX_QEMU:arm = "qemu" 61DEFAULT_XILINX_QEMU:arm = "qemu"
60PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}" 62PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}"
61 63
64XILINX_ATF_VERSION[v2022.1] = "2.6-xilinx-v2022.1%"
65XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%"
62XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" 66XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%"
63XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" 67XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%"
68XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%"
64PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 69PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
65 70
71XILINX_UBOOT_VERSION[v2022.1] = "v2021.01-xilinx-v2022.1%"
72XILINX_UBOOT_VERSION[v2022.2] = "v2022.01-xilinx-v2022.2%"
66XILINX_UBOOT_VERSION[v2023.1] = "v2023.01-xilinx-v2023.1%" 73XILINX_UBOOT_VERSION[v2023.1] = "v2023.01-xilinx-v2023.1%"
67XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%" 74XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%"
75XILINX_UBOOT_VERSION[v2024.1] = "v2024.01-xilinx-v2024.1%"
68 76
69PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 77PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
70PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 78PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
@@ -73,6 +81,7 @@ XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%"
73XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" 81XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%"
74XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" 82XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%"
75XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" 83XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%"
84XILINX_LINUX_VERSION[v2024.1] = "6.6.10-xilinx-v2024.1%"
76PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 85PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
77 86
78# Add support to eSDK for gen-machine-conf if it exists 87# Add support to eSDK for gen-machine-conf if it exists
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc b/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc
new file mode 100644
index 00000000..5679b989
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc
@@ -0,0 +1,6 @@
1include conf/machine/include/arm/armv7r/tune-cortexr5.inc
2
3AVAILTUNES += "cortexr5hf"
4ARMPKGARCH:tune-cortexr5hf = "cortexr5"
5TUNE_FEATURES:tune-cortexr5hf = "${TUNE_FEATURES:tune-cortexr5} callconvention-hard"
6PACKAGE_EXTRA_ARCHS:tune-cortexr5hf = "cortexr5hf-vfpv3d16"
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc b/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc
new file mode 100644
index 00000000..8c85d98e
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc
@@ -0,0 +1,16 @@
1#
2# Tune Settings for Cortex-A78
3#
4DEFAULTTUNE ?= "cortexa78"
5
6TUNEVALID[cortexa78] = "Enable Cortex-A78 specific processor optimizations"
7TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa78', ' -mcpu=cortex-a78', '', d)}"
8
9require conf/machine/include/arm/arch-armv8-2a.inc
10
11# Little Endian base configs
12AVAILTUNES += "cortexa78"
13ARMPKGARCH:tune-cortexa78 = "cortexa78"
14TUNE_FEATURES:tune-cortexa78 = "${TUNE_FEATURES:tune-armv8-2a-crypto} cortexa78"
15PACKAGE_EXTRA_ARCHS:tune-cortexa78 = "${PACKAGE_EXTRA_ARCHS:tune-armv8-2a-crypto} cortexa78"
16BASE_LIB:tune-cortexa78 = "lib64"
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc b/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc
new file mode 100644
index 00000000..42c6fb37
--- /dev/null
+++ b/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc
@@ -0,0 +1,9 @@
1require conf/machine/include/arm/armv8r/tune-cortexr52.inc
2
3# simd is special, we don't pass this to the -mfpu, it's implied
4TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }"
5
6AVAILTUNES += "cortexr52hf"
7ARMPKGARCH:tune-cortexr52hf = "cortexr52"
8TUNE_FEATURES:tune-cortexr52hf = "${TUNE_FEATURES:tune-cortexr52} callconvention-hard"
9PACKAGE_EXTRA_ARCHS:tune-cortexr52hf = "cortexr52hf"
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
index e99b1f0e..c732523c 100644
--- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
@@ -28,8 +28,7 @@ do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC
28UBOOT_SUFFIX ?= "bin" 28UBOOT_SUFFIX ?= "bin"
29 29
30UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" 30UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
31UBOOT_ELF ?= "u-boot" 31UBOOT_ELF ?= "u-boot.elf"
32UBOOT_ELF:aarch64 ?= "u-boot.elf"
33 32
34# libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 33# libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400
35# lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 34# lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400
diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf
index 9945d301..eb450bbf 100644
--- a/meta-xilinx-core/conf/machine/versal-net-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf
@@ -1,5 +1,3 @@
1XILINX_DEPRECATED[versal-net] = "Versal-net is not supported in 2023.2"
2
3#@TYPE: Machine 1#@TYPE: Machine
4#@NAME: versal-net-generic 2#@NAME: versal-net-generic
5#@DESCRIPTION: Machine configuration for the versal-net-generic devices 3#@DESCRIPTION: Machine configuration for the versal-net-generic devices
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi
index 694a2fd0..a918faf2 100644
--- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi
@@ -28,6 +28,24 @@
28 no-map; 28 no-map;
29 reg = <0x0 0x3ed48000 0x0 0x100000>; 29 reg = <0x0 0x3ed48000 0x0 0x100000>;
30 }; 30 };
31
32 rproc_1_reserved: rproc@3ef00000 {
33 no-map;
34 reg = <0x0 0x3ef00000 0x0 0x40000>;
35 };
36 rpu1vdev0vring0: rpu1vdev0vring0@3ef40000 {
37 no-map;
38 reg = <0x0 0x3ef40000 0x0 0x4000>;
39 };
40 rpu1vdev0vring1: rpu1vdev0vring1@3ef44000 {
41 no-map;
42 reg = <0x0 0x3ef44000 0x0 0x4000>;
43 };
44 rpu1vdev0buffer: rpu1vdev0buffer@3ef48000 {
45 no-map;
46 compatible = "shared-dma-pool";
47 reg = <0x0 0x3ef48000 0x0 0x100000>;
48 };
31 }; 49 };
32 50
33 tcm_0a: tcm_0a@eba00000 { 51 tcm_0a: tcm_0a@eba00000 {
@@ -54,6 +72,30 @@
54 power-domain = <&versal_net_firmware 0x183180cd>; 72 power-domain = <&versal_net_firmware 0x183180cd>;
55 }; 73 };
56 74
75 tcm_1a: tcm_0a@eba40000 {
76 no-map;
77 reg = <0x0 0xeba40000 0x0 0x10000>;
78 status = "okay";
79 compatible = "mmio-sram";
80 power-domain = <&versal_net_firmware 0x183180ce>;
81 };
82
83 tcm_1b: tcm_0b@eba50000 {
84 no-map;
85 reg = <0x0 0xeba50000 0x0 0x8000>;
86 status = "okay";
87 compatible = "mmio-sram";
88 power-domain = <&versal_net_firmware 0x183180cf>;
89 };
90
91 tcm_1c: tcm_0b@eba60000 {
92 no-map;
93 reg = <0x0 0xeba60000 0x0 0x8000>;
94 status = "okay";
95 compatible = "mmio-sram";
96 power-domain = <&versal_net_firmware 0x183180d0>;
97 };
98
57 r52ss { 99 r52ss {
58 compatible = "xlnx,versal-net-r52-remoteproc"; 100 compatible = "xlnx,versal-net-r52-remoteproc";
59 #address-cells = <0x2>; 101 #address-cells = <0x2>;
@@ -72,7 +114,18 @@
72 mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; 114 mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>;
73 mbox-names = "tx", "rx"; 115 mbox-names = "tx", "rx";
74 }; 116 };
75 }; 117 r52_1 {
118 compatible = "xilinx,r52";
119 #address-cells = <0x2>;
120 #size-cells = <0x2>;
121 ranges;
122 sram = <&tcm_1a>, <&tcm_1b>, <&tcm_1c>;
123 memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>;
124 power-domain = <&versal_net_firmware 0x181100C0>;
125 mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>;
126 mbox-names = "tx", "rx";
127 };
128 };
76 129
77 zynqmp_ipi1 { 130 zynqmp_ipi1 {
78 compatible = "xlnx,zynqmp-ipi-mailbox"; 131 compatible = "xlnx,zynqmp-ipi-mailbox";
@@ -93,5 +146,15 @@
93 #mbox-cells = <0x01>; 146 #mbox-cells = <0x01>;
94 xlnx,ipi-id = <0x03>; 147 xlnx,ipi-id = <0x03>;
95 }; 148 };
149 /* APU<->RPU1 IPI mailbox controller */
150 ipi_mailbox_rpu1: mailbox@eb3f0b00{
151 reg = <0xeb3f0b00 0x20 0xeb3f0b20 0x20 0xeb3f0940 0x20 0xeb3f0960 0x20>;
152 reg-names = "local_request_region",
153 "local_response_region",
154 "remote_request_region",
155 "remote_response_region";
156 #mbox-cells = <0x01>;
157 xlnx,ipi-id = <0x04>;
158 };
96 }; 159 };
97}; 160};
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi
index c8a60d81..8ef72656 100644
--- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi
@@ -28,6 +28,23 @@
28 no-map; 28 no-map;
29 reg = <0x0 0x3ed00000 0x0 0x40000>; 29 reg = <0x0 0x3ed00000 0x0 0x40000>;
30 }; 30 };
31 rpu1vdev0vring0: rpu0vdev0vring0@3ef40000 {
32 no-map;
33 reg = <0x0 0x3ef40000 0x0 0x4000>;
34 };
35 rpu1vdev0vring1: rpu0vdev0vring1@3ef44000 {
36 no-map;
37 reg = <0x0 0x3ef44000 0x0 0x4000>;
38 };
39 rpu1vdev0buffer: rpu0vdev0buffer@3ef48000 {
40 no-map;
41 reg = <0x0 0x3ef48000 0x0 0x100000>;
42 };
43 rproc_1_reserved: rproc@3ef00000 {
44 no-map;
45 reg = <0x0 0x3ef00000 0x0 0x40000>;
46 };
47
31 }; 48 };
32 49
33 tcm_0a: tcm_0a@ffe00000 { 50 tcm_0a: tcm_0a@ffe00000 {
@@ -45,7 +62,21 @@
45 compatible = "mmio-sram"; 62 compatible = "mmio-sram";
46 power-domain = <&zynqmp_firmware 16>; 63 power-domain = <&zynqmp_firmware 16>;
47 }; 64 };
65 tcm_1a: tcm_0a@ffe90000 {
66 no-map;
67 reg = <0x0 0xffe90000 0x0 0x10000>;
68 status = "okay";
69 compatible = "mmio-sram";
70 power-domain = <&zynqmp_firmware 17>;
71 };
48 72
73 tcm_1b: tcm_0b@ffeb0000 {
74 no-map;
75 reg = <0x0 0xffeb0000 0x0 0x10000>;
76 status = "okay";
77 compatible = "mmio-sram";
78 power-domain = <&zynqmp_firmware 18>;
79 };
49 rf5ss@ff9a0000 { 80 rf5ss@ff9a0000 {
50 compatible = "xlnx,zynqmp-r5-remoteproc"; 81 compatible = "xlnx,zynqmp-r5-remoteproc";
51 xlnx,cluster-mode = <1>; 82 xlnx,cluster-mode = <1>;
@@ -65,6 +96,18 @@
65 mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; 96 mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>;
66 mbox-names = "tx", "rx"; 97 mbox-names = "tx", "rx";
67 }; 98 };
99 r5f_1: r5f@1 {
100 compatible = "xilinx,r5f";
101 #address-cells = <2>;
102 #size-cells = <2>;
103 ranges;
104 sram = <&tcm_1a>, <&tcm_1b>;
105 memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>;
106 power-domain = <&zynqmp_firmware 8>;
107 mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>;
108 mbox-names = "tx", "rx";
109 };
110
68 }; 111 };
69 112
70 zynqmp_ipi1 { 113 zynqmp_ipi1 {
@@ -90,4 +133,26 @@
90 xlnx,ipi-id = <1>; 133 xlnx,ipi-id = <1>;
91 }; 134 };
92 }; 135 };
136 zynqmp_ipi2 {
137 compatible = "xlnx,zynqmp-ipi-mailbox";
138 interrupt-parent = <&gic>;
139 interrupts = <0 30 4>;
140 xlnx,ipi-id = <8>;
141 #address-cells = <1>;
142 #size-cells = <1>;
143 ranges;
144 /* APU<->RPU1 IPI mailbox controller */
145 ipi_mailbox_rpu1: mailbox@ff990800 {
146 reg = <0xff990800 0x20>,
147 <0xff990820 0x20>,
148 <0xff990200 0x20>,
149 <0xff990220 0x20>;
150 reg-names = "local_request_region",
151 "local_response_region",
152 "remote_request_region",
153 "remote_response_region";
154 #mbox-cells = <1>;
155 xlnx,ipi-id = <2>;
156 };
157 };
93}; 158};
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb
new file mode 100644
index 00000000..ca447615
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb
@@ -0,0 +1,16 @@
1SRCBRANCH ?= "2024"
2SRCREV = "e2fdb4fecbebe41b4cd1c0b4fbfa3496bcded485"
3BRANCH = "2024"
4LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4"
5PV = "${SRCBRANCH}+git${SRCPV}"
6
7REPO = "git://github.com/Xilinx/libmetal.git;protocol=https"
8
9include ${LAYER_PATH_openamp-layer}/recipes-openamp/libmetal/libmetal.inc
10include ${LAYER_PATH_openamp-layer}/vendor/xilinx/recipes-openamp/libmetal/libmetal-xlnx.inc
11
12RPROVIDES:${PN}-dbg += "libmetal-dbg"
13RPROVIDES:${PN}-dev += "libmetal-dev"
14RPROVIDES:${PN}-lic += "libmetal-lic"
15RPROVIDES:${PN}-src += "libmetal-src"
16RPROVIDES:${PN}-staticdev += "libmetal-staticdev"
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb
new file mode 100644
index 00000000..01df6033
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb
@@ -0,0 +1,16 @@
1SRCBRANCH ?= "2024"
2SRCREV = "f4a7bc0fca5b14bb8fd185918614bcc78ce93028"
3BRANCH = "2024"
4LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505"
5PV = "${SRCBRANCH}+git${SRCPV}"
6REPO = "git://github.com/Xilinx/open-amp.git;protocol=https"
7
8include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc
9require ${LAYER_PATH_openamp-layer}/vendor/xilinx/recipes-openamp/open-amp/open-amp-xlnx.inc
10
11RPROVIDES:${PN}-dbg += "open-amp-dbg"
12RPROVIDES:${PN}-dev += "open-amp-dev"
13RPROVIDES:${PN}-lic += "open-amp-lic"
14RPROVIDES:${PN}-src += "open-amp-src"
15RPROVIDES:${PN}-staticdev += "open-amp-staticdev"
16
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend
index 2b96f152..e0de911f 100644
--- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend
@@ -3,12 +3,12 @@
3PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" 3PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}"
4EXTRA_OECMAKE:append:versal-ai-core = " -DXRT_AIE_BUILD=true" 4EXTRA_OECMAKE:append:versal-ai-core = " -DXRT_AIE_BUILD=true"
5TARGET_CXXFLAGS:append:versal-ai-core = " -DXRT_ENABLE_AIE" 5TARGET_CXXFLAGS:append:versal-ai-core = " -DXRT_ENABLE_AIE"
6DEPENDS:append:versal-ai-core = " libmetal libxaiengine aiefal" 6DEPENDS:append:versal-ai-core = " libxaiengine aiefal"
7RDEPENDS:${PN}:append:versal-ai-core = " libxaiengine aiefal" 7RDEPENDS:${PN}:append:versal-ai-core = " libxaiengine aiefal"
8 8
9# For vek280 kind of devices 9# For vek280 kind of devices
10PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" 10PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}"
11EXTRA_OECMAKE:append:versal-ai-edge = " -DXRT_AIE_BUILD=true" 11EXTRA_OECMAKE:append:versal-ai-edge = " -DXRT_AIE_BUILD=true"
12TARGET_CXXFLAGS:append:versal-ai-edge = " -DXRT_ENABLE_AIE" 12TARGET_CXXFLAGS:append:versal-ai-edge = " -DXRT_ENABLE_AIE"
13DEPENDS:append:versal-ai-edge = " libmetal libxaiengine aiefal" 13DEPENDS:append:versal-ai-edge = " libxaiengine aiefal"
14RDEPENDS:${PN}:append:versal-ai-edge = " libxaiengine aiefal" 14RDEPENDS:${PN}:append:versal-ai-edge = " libxaiengine aiefal"
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-7.1.inc
index 2c73d931..d07090bd 100644
--- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-7.1.inc
@@ -10,27 +10,27 @@ PACKAGES:prepend:class-target = "${PN}-x86_64 \
10 " 10 "
11 11
12FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" 12FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64"
13RDEPENDS:${PN}-x86_64:append:class-target = "${PN}" 13RDEPENDS:${PN}-x86_64:append:class-target = " ${PN}"
14INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" 14INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps"
15 15
16FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" 16FILES:${PN}-i386:class-target = "${bindir}/qemu-i386"
17RDEPENDS:${PN}-i386:append:class-target = "${PN}" 17RDEPENDS:${PN}-i386:append:class-target = " ${PN}"
18INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" 18INSANE_SKIP:${PN}-i386:class-target = "file-rdeps"
19 19
20FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" 20FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386"
21RDEPENDS:${PN}-system-i386:append:class-target = "${PN}" 21RDEPENDS:${PN}-system-i386:append:class-target = " ${PN}"
22INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" 22INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps"
23 23
24FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" 24FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64"
25RDEPENDS:${PN}-aarch64:append:class-target = "${PN}" 25RDEPENDS:${PN}-aarch64:append:class-target = " ${PN}"
26INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" 26INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps"
27 27
28FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" 28FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm"
29RDEPENDS:${PN}-arm:append:class-target = "${PN}" 29RDEPENDS:${PN}-arm:append:class-target = " ${PN}"
30INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" 30INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
31 31
32FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" 32FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*"
33RDEPENDS:${PN}-microblaze:append:class-target = "${PN}" 33RDEPENDS:${PN}-microblaze:append:class-target = " ${PN}"
34INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" 34INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
35 35
36FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" 36FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*"
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc
new file mode 100644
index 00000000..42f054e6
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc
@@ -0,0 +1,71 @@
1# we have our own package splitting for qemu, inhbit the oe-core
2# split by overriding the split function
3python split_qemu_packages () {
4 print( "meta-virtualization: vmsplit: inhibiting core qemu package split" )
5}
6
7PACKAGES:prepend:class-target = "${PN}-x86_64 \
8 ${PN}-aarch64 \
9 ${PN}-arm \
10 ${PN}-i386 \
11 ${PN}-system-i386 \
12 ${PN}-microblaze \
13 ${PN}-support \
14 ${PN}-keymaps \
15 ${PN}-firmware \
16 "
17
18FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64"
19RDEPENDS:${PN}-x86_64:append:class-target = " ${PN}"
20RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-system-x86_64"
21RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-user-x86_64"
22RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-x86_64"
23RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-x86_64"
24INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps"
25
26FILES:${PN}-i386:class-target = "${bindir}/qemu-i386"
27RDEPENDS:${PN}-i386:append:class-target = " ${PN}"
28RPROVIDES:${PN}-i386:append:class-target = " ${PN}-user-i386"
29RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-i386"
30INSANE_SKIP:${PN}-i386:class-target = "file-rdeps"
31
32FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386"
33RDEPENDS:${PN}-system-i386:append:class-target = " ${PN}"
34RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-system-i386"
35INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps"
36
37FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64"
38RDEPENDS:${PN}-aarch64:append:class-target = " ${PN}"
39RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-system-aarch64"
40RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-user-aarch64"
41RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-aarch64"
42RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-aarch64"
43INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps"
44
45FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm"
46RDEPENDS:${PN}-arm:append:class-target = " ${PN}"
47RPROVIDES:${PN}-arm:append:class-target = " ${PN}-system-arm"
48RPROVIDES:${PN}-arm:append:class-target = " ${PN}-user-arm"
49RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-arm"
50RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-arm"
51INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
52
53FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*"
54RDEPENDS:${PN}-microblaze:append:class-target = " ${PN}"
55RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-system-microblaze"
56RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-user-microblaze"
57RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-microblaze"
58RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-microblaze"
59INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
60
61FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*"
62RDEPENDS:${PN}-support:class-target = "${PN} bash"
63
64FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*"
65RDEPENDS:${PN}-firmware:class-target = "${PN}"
66INSANE_SKIP:${PN}-firmware:class-target = "arch"
67
68FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*"
69RDEPENDS:${PN}-keymaps:class-target = "${PN}"
70
71PACKAGECONFIG:append:class-target = " virtfs"
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend
deleted file mode 100644
index 5cca9e1f..00000000
--- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
1require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', '${BPN}-package-split.inc', '', d)}
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend
new file mode 100644
index 00000000..c9f04327
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-7.1.inc', '', d)}
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend
new file mode 100644
index 00000000..74aa15fb
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-8.1.inc', '', d)}
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend
new file mode 100644
index 00000000..c9f04327
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-7.1.inc', '', d)}
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend
new file mode 100644
index 00000000..74aa15fb
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend
@@ -0,0 +1 @@
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-8.1.inc', '', d)}
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend
index 56cb8a45..92af8a7a 100644
--- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend
@@ -1,5 +1,5 @@
1SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=master;protocol=https" 1SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=master;protocol=https"
2SRCREV = "807435ae6fa0a07e8c84b458d138f3f54614eb5c" 2SRCREV = "4b687525d2c4785eedbcbd73431bc6d236cb5bc8"
3 3
4FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" 4FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:"
5 5
@@ -10,4 +10,5 @@ RDEPENDS:${PN} += " \
10 python3-anytree \ 10 python3-anytree \
11 python3-six \ 11 python3-six \
12 python3-pyyaml \ 12 python3-pyyaml \
13 python3-packaging \
13 " 14 "
diff --git a/meta-xilinx-core/lib/devtool/boot-jtag.py b/meta-xilinx-core/lib/devtool/boot-jtag.py
new file mode 100644
index 00000000..53d70262
--- /dev/null
+++ b/meta-xilinx-core/lib/devtool/boot-jtag.py
@@ -0,0 +1,272 @@
1# Copyright (C) 2021-2022, Xilinx, Inc. All rights reserved.
2# Copyright (C) 2022-2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6# This script uses devtool and creates a boot-jtag.tcl script in
7# ${DEPLOY_DIR_IMAGE} directory. This script is executed by xsdb tool to boot
8# yocto generated images on HW via jtag boot mode.
9
10import os
11import logging
12import argparse
13from devtool import setup_tinfoil, parse_recipe, DevtoolError
14import yaml
15import sys
16import glob
17
18logger = logging.getLogger('devtool')
19
20def bootjtag(args, config, basepath, workspace):
21 """Entry point for the devtool 'boot-jtag' subcommand"""
22
23 if not args.image:
24 print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal')
25 return
26
27 # Get required boot variables
28 tinfoil = setup_tinfoil(basepath=basepath)
29 try:
30 rd = tinfoil.parse_recipe('u-boot-xlnx-scr')
31 deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE')
32 machine = rd.getVar('MACHINE')
33 arch = rd.getVar('TARGET_ARCH')
34 soc = rd.getVar("SOC_FAMILY")
35 soc_variant = rd.getVar("SOC_VARIANT")
36 ddr_base_addr = rd.getVar('DDR_BASEADDR')
37 kernel_img_name = rd.getVar('KERNEL_IMAGE')
38 kernel_load_addr = rd.getVar('KERNEL_LOAD_ADDRESS')
39 dtb_load_addr = rd.getVar('DEVICETREE_ADDRESS')
40 rootfs_load_addr = rd.getVar('RAMDISK_IMAGE_ADDRESS')
41 machine_features = rd.getVar('MACHINE_FEATURES')
42 boot_mode = rd.getVar('BOOTMODE')
43 finally:
44 tinfoil.shutdown()
45
46 if not args.hw_server:
47 print("\nINFO: --hw_server is null so default URL description of hw_server/TCF agent and port number is set to: " + str(args.hw_server))
48
49 print("INFO: HW_SERVER Connected to: " + str(args.hw_server))
50 print("INFO: Using DISTRO IMAGE: " + str(args.image))
51
52 # Use arch for MB and SOC Family other devices.
53 if arch == 'microblazeel':
54 print("INFO: ARCH: " + arch)
55 else:
56 print("INFO: SOC FAMILY: " + soc)
57
58 # Load Address of boot.scr in DDR(Except for QSPI/OSPI/NAND boot)
59 # MB = (DDR base address + DDR Size) - 0xe00000
60 # Zynq 7000 = DDR base address + 0x3000000
61 # ZynqMP = DDR base address + 0x20000000
62 # Versal = DDR base address + 0x20000000
63 if arch == 'microblazeel':
64 # Assuming DDR size is 2GB
65 bootscr_addr = hex(int(ddr_base_addr, 16) + 0x80000000 - 0xe00000)
66 elif soc == 'zynq':
67 bootscr_addr = hex(int(ddr_base_addr, 16) + 0x3000000)
68 else:
69 bootscr_addr = hex(int(ddr_base_addr, 16) + 0x20000000)
70
71 print("INFO: MACHINE: " + machine)
72
73 if arch != 'microblazeel':
74 if "fpga-overaly" in machine_features:
75 print("INFO: fpga-overlay MACHINE_FEATURES is enabled, Hence PL bitstream or PDI will not be loaded at initial boot, User can load from u-boot or linux.")
76 else:
77 print("INFO: fpga-overlay MACHINE_FEATURES is not enabled, Hence PL bitstream or PDI will be loaded at initial boot.")
78
79 #dictionary with all required artifacts
80 data = {}
81
82 # For MB, Zynq 7000 and ZynqMP.
83 if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp':
84 if not "fpga-overaly" in machine_features:
85 data['bit'] = glob.glob(os.path.join(deploy_dir, '*' + machine + '.bit'))[0]
86 data['uboot'] = os.path.join(deploy_dir, 'u-boot.elf')
87 data['dtb'] = os.path.join(deploy_dir, machine + '-system.dtb')
88
89 if soc == 'zynq' or soc == 'zynqmp':
90 data['fsbl'] = os.path.join(deploy_dir, 'fsbl-' + machine + '.elf')
91
92 if soc == 'zynqmp':
93 data['atf'] = os.path.join(deploy_dir, 'arm-trusted-firmware.elf')
94 data['pmufw'] = os.path.join(deploy_dir, 'pmu-firmware-' + machine + '.elf')
95
96 if soc == 'versal':
97 data['bootbin'] = os.path.join(deploy_dir, 'boot.bin')
98
99 data['bootscr'] = os.path.join(deploy_dir, 'boot.scr')
100 data['kernel'] = os.path.join(deploy_dir, kernel_img_name)
101
102 if not args.norootfs:
103 data['rfs'] = os.path.join(deploy_dir, args.image + '-' + machine + '.cpio.gz.u-boot')
104
105 # Check if all the required boot images exists
106 for key in data:
107 if not os.path.isfile(data[key]):
108 print('INFO:' + key + ' does not exist.')
109 print('INFO: Please make sure you have run: \n\'MACHINE=' + machine + ' devtool build-image ' + args.image + '\'')
110 return
111
112 # Enable verbose mode
113 if args.verbose:
114 print("The following artifacts are being loaded:")
115 for key in data:
116 print('INFO: ' + key + ": " + data[key])
117
118 # Start writing xsdb script
119 lines = []
120 lines.append('# Run \'xsdb ' + deploy_dir + '/boot-jtag.tcl\' to execute this script.')
121 lines.append('connect -url ' + args.hw_server)
122
123 if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp':
124 lines.append('for {set i 0} {$i < 20} {incr i} {')
125 lines.append(' if { [ta] != "" } break;')
126 lines.append(' after 50')
127 lines.append('}')
128 if not "fpga-overaly" in machine_features:
129 lines.append('')
130 lines.append('puts stderr "INFO: Configuring the PL ..."')
131 lines.append('puts stderr "INFO: Downloading bitstream: ' + data['bit'] + '"')
132 lines.append('fpga -no-revision-check \"' + data['bit'] + '\"')
133
134 if soc == 'zynqmp':
135 # Disable Security gates to view PMU MB target
136 lines.append('')
137 lines.append('targets -set -nocase -filter {name =~ \"*PSU*\"}')
138
139 # By default, JTAG security gates are enabled. This disables security gates for DAP, PLTAP and PMU.
140 lines.append('mask_write 0xFFCA0038 0x1C0 0x1C0')
141 lines.append('targets -set -nocase -filter {name =~ \"*MicroBlaze PMU*\"}')
142 lines.append('')
143
144 # Check if the target is already stopped or cannot be stopped.
145 lines.append('catch {stop}; after 1000')
146 lines.append('')
147
148 # Download the pmufw.elf and run PMUFW
149 lines.append('puts stderr "INFO: Downloading PMUFW ELF file: ' + data['pmufw'] + '"')
150 lines.append('dow \"' + data['pmufw'] + '\"')
151 lines.append('con')
152
153 # Select A53 Core 0 to load and run FSBL
154 lines.append('targets -set -nocase -filter {name =~ \"*A53*#0\"}')
155
156 # Reset A53, If the reset is being triggered after powering on the device,
157 # write bootloop at reset vector address (0xffff0000), or use
158 # -clear-registers option, to avoid unpredictable behavior.
159 # Further warnings will be suppressed
160 lines.append('rst -processor -clear-registers')
161 lines.append('')
162 elif soc == 'versal':
163 # Download boot.bin to versal device
164 lines.append('targets -set -nocase -filter {name =~ \"*PMC*\"}')
165 lines.append('puts stderr "INFO: Downloading BOOT bin file: ' + data['bootbin'] + '"')
166 lines.append('device program \"' + data['bootbin'] + '\"')
167 lines.append('')
168
169 if soc_variant == 'net':
170 lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}')
171 else:
172 lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}')
173
174 lines.append('stop')
175 lines.append('')
176 lines.append('targets -set -nocase -filter {name =~ \"*Versal*\"}')
177 elif soc == 'zynq':
178 lines.append('targets -set -nocase -filter {name =~ \"arm*#0\"}')
179 # Check if the target is already stopped or cannot be stopped.
180 lines.append('catch {stop}; after 1000')
181 lines.append('')
182 else:
183 lines.append('targets -set -nocase -filter {name =~ \"microblaze*#0\"}')
184 # Check if the target is already stopped or cannot be stopped.
185 lines.append('catch {stop}; after 1000')
186 lines.append('')
187
188
189 if soc == 'zynq' or soc == 'zynqmp':
190 # Download FSBL for Zynq 7000 and ZynqMP
191 lines.append('puts stderr "INFO: Downloading FSBL ELF file: ' + data['fsbl'] + '"')
192 lines.append('dow \"' + data['fsbl'] + '\"')
193 lines.append('con')
194 lines.append('after 4000; stop')
195 lines.append('')
196
197 # Download U-boot and DTB for MB, Zynq 7000 and ZynqMP
198 if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp':
199 lines.append('puts stderr "INFO: Downloading U-boot ELF file: ' + data['uboot'] + '"')
200 lines.append('dow \"' + data['uboot'] + '\"')
201 lines.append('')
202 # For MB and Zynq 7000 we need to connect and stop before loading
203 # kernel images
204 if soc != 'zynqmp':
205 lines.append('con')
206 lines.append('after 1000; stop')
207 lines.append('puts stderr "INFO: Downloading DTB file: ' + data['dtb'] + ' at ' + dtb_load_addr + '"')
208 lines.append('dow -data \"' + data['dtb'] + '\" ' + dtb_load_addr)
209 lines.append('')
210
211 # Download Trusted Firmware-A(TF-A) for ZynqMP
212 # Note: TF-A elf should be loaded after u-boot elf in JTAG boot mode else
213 # TF-A elf will not be loaded.
214 if soc == 'zynqmp':
215 lines.append('puts stderr "INFO: Downloading Trusted Firmware-A(TF-A) ELF file: ' + data['atf'] + '"')
216 lines.append('dow \"' + data['atf'] + '\"')
217 lines.append('')
218
219 # If BOOTMODE is xen then boot till u-boot only.
220 # Download Kernel Image for all architecture
221 if boot_mode != 'xen':
222 lines.append('puts stderr "INFO: Downloading Kernel Image file: ' + data['kernel'] + ' at ' + kernel_load_addr + '"')
223 lines.append('dow -data \"' + data['kernel'] + '\" ' + kernel_load_addr)
224 lines.append('')
225
226 # Download Rootfs
227 if not args.norootfs and boot_mode != 'xen':
228 lines.append('puts stderr "INFO: Downloading Rootfs file: ' + data['rfs'] + ' at ' + rootfs_load_addr + '"')
229 lines.append('dow -data \"' + data['rfs'] + '\" ' + rootfs_load_addr)
230 lines.append('')
231
232 lines.append('puts stderr "INFO: Downloading U-boot boot script: ' + data['bootscr'] + ' at ' + bootscr_addr + '"')
233 lines.append('dow -data \"' + data['bootscr'] + '\" ' + bootscr_addr)
234 lines.append('')
235
236 # Select A72 Core 0 to load and run Versal images
237 if soc == 'versal':
238 if soc_variant == 'net':
239 lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}')
240 else:
241 lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}')
242
243 lines.append('con')
244 lines.append('exit\n')
245
246 script = os.path.join(deploy_dir, "boot-jtag.tcl")
247 with open(script, "w") as f:
248 f.write('\n'.join(lines))
249
250 print('INFO: HW JTAG boot tcl script written to '+ script + "\n" \
251 + 'INFO: User can run \'xsdb ' + script + '\' to execute.')
252
253 return 0
254
255def register_commands(subparsers, context):
256 """Register devtool subcommands from this plugin"""
257 parser_bootjtag = subparsers.add_parser('boot-jtag',
258 help='Script to deploy target images on HW via JTAG boot mode.',
259 description='Script to deploy target images on HW via JTAG boot mode. \
260 Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}')
261 required = parser_bootjtag.add_argument_group('required arguments')
262 required.add_argument('--image',
263 help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal')
264 parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121',
265 help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \
266 Example: --hw_server TCP:puffball12:3121')
267
268 parser_bootjtag.add_argument('-v', '--verbose',
269 help='verbose mode', action="store_true")
270 parser_bootjtag.add_argument('-n', '--norootfs',
271 help='Don\'t include rootfs', action='store_true')
272 parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True)
diff --git a/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb b/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb
new file mode 100644
index 00000000..f7e18273
--- /dev/null
+++ b/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "Image update is used to update alternate images on compatible firmware."
2SUMMARY = "Image update is used to update alternate image on compatible firmware. \
3 If the current image is ImageA, ImageB will get updated and vice versa. \
4 Usage: image_update <Input Image File>"
5
6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b"
8
9BRANCH = "master"
10SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https"
11SRCREV = "a68308f329578d3585fd335071a9184aa7f46d2e"
12
13RDEPENDS:${PN} += "freeipmi"
14
15S = "${WORKDIR}/git"
16
17COMPATIBLE_MACHINE = "^$"
18COMPATIBLE_MACHINE:zynqmp = "zynqmp"
19COMPATIBLE_MACHINE:versal = "versal"
20
21PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}"
22
23# Force the make system to use the flags we want!
24EXTRA_OEMAKE = 'CC="${CC} ${TARGET_CFLAGS} ${TARGET_LDFLAGS}" all'
25
26do_install () {
27 install -d ${D}${bindir}
28 install -m 0755 ${S}/image_update ${D}${bindir}/
29}
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb
index f86c5985..f86c5985 100644
--- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc
index 11059465..0541a7a3 100644
--- a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc
@@ -2,8 +2,8 @@ SECTION = "libs"
2 2
3REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" 3REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https"
4 4
5BRANCH ?= "xlnx_rel_v2023.2" 5BRANCH ?= "main-aie"
6SRCREV ?= "84debe5d22c144fb09269b8410df4cb8a6aa3b2a" 6SRCREV ?= "5621d74d5efa99fdddd9eca47de3294804c62c24"
7 7
8LICENSE = "BSD-3-Clause" 8LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" 9LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897"
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb
index 2c6c9cd1..2c6c9cd1 100644
--- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb
new file mode 100644
index 00000000..fee8e069
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb
@@ -0,0 +1,8 @@
1ATF_VERSION = "2.10"
2SRCREV = "4f82b6134e7b43722616c855e5016d42a3ea26d2"
3BRANCH = "xlnx_rebase_v2.10"
4LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031"
5
6
7include arm-trusted-firmware.inc
8
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb
new file mode 100644
index 00000000..98eebc3e
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb
@@ -0,0 +1,54 @@
1DESCRIPTION = "Bootbin version string file"
2SUMMARY = "The BIF file for bootbin requires a version file in a specific format"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6COMPATIBLE_MACHINE = "^$"
7
8PACKAGE_ARCH = "${MACHINE_ARCH}"
9
10BOOTBIN_VER_MAIN ?= ""
11
12BOOTBIN_VER_SUFFIX ?= "${@(d.getVar('XILINX_VER_BUILD') or '')[:8] if d.getVar('XILINX_VER_UPDATE') != 'release' and not d.getVar('XILINX_VER_UPDATE').startswith('update') else ''}"
13BOOTBIN_VER_FILE = "bootbin-version-header.txt"
14BOOTBIN_VER_MAX_LEN = "36"
15
16BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest"
17
18inherit deploy image-artifact-names
19
20python do_configure() {
21 if d.getVar("BOOTBIN_VER_SUFFIX"):
22 version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX")
23
24 if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")):
25 bb.error("version string too long")
26
27 with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f:
28 f.write(version.encode("utf-8").hex())
29
30 with open(d.expand("${B}/${BOOTBIN_MANIFEST_FILE}"), "w") as f:
31 f.write("* %s\n" % d.getVar('PN'))
32 f.write("VERSION: %s\n" % version)
33 f.write("PV: %s\n" % d.getVar('PV'))
34 f.write("XILINX_VER_MAIN: %s\n" % d.getVar('XILINX_VER_MAIN'))
35 f.write("XILINX_VER_UPDATE: %s\n" % d.getVar('XILINX_VER_UPDATE'))
36 f.write("XILINX_VER_BUILD: %s\n\n" % d.getVar('XILINX_VER_BUILD'))
37}
38
39do_install() {
40 install -d ${D}/boot
41 install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${D}/boot/
42}
43
44do_deploy() {
45 install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.txt
46 ln -s ${IMAGE_NAME}.txt ${DEPLOYDIR}/${IMAGE_LINK_NAME}.txt
47 install -m 0644 ${B}/${BOOTBIN_MANIFEST_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.manifest
48 ln -s ${IMAGE_NAME}.manifest ${DEPLOYDIR}/${IMAGE_LINK_NAME}.manifest
49}
50
51addtask deploy after do_compile
52
53SYSROOT_DIRS += "/boot"
54FILES:${PN} += "/boot/${BOOTBIN_VER_FILE}"
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
index 8d7211f5..1f8ae2e3 100644
--- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
+++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
@@ -23,7 +23,7 @@ inherit devicetree image-artifact-names
23SYSTEM_DTFILE ??= "" 23SYSTEM_DTFILE ??= ""
24CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" 24CONFIG_DTFILE ??= "${SYSTEM_DTFILE}"
25 25
26BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" 26BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}"
27 27
28EXTRA_DT_FILES ?= "" 28EXTRA_DT_FILES ?= ""
29EXTRA_DTFILE_PREFIX ?= "system-top" 29EXTRA_DTFILE_PREFIX ?= "system-top"
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb
new file mode 100644
index 00000000..b0acf0ef
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb
@@ -0,0 +1,72 @@
1SUMMARY = "Xilinx dfx-mgr libraries"
2DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries"
3
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e"
6
7REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https"
8BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
9SRC_URI = "${REPO};${BRANCHARG}"
10
11BRANCH = "master"
12SRCREV = "ec70363a2a878737057995f922a9460d18aafa26"
13SOMAJOR = "1"
14SOMINOR = "0"
15SOVERSION = "${SOMAJOR}.${SOMINOR}"
16
17COMPATIBLE_MACHINE = "^$"
18COMPATIBLE_MACHINE:zynqmp = "zynqmp"
19COMPATIBLE_MACHINE:versal = "versal"
20
21S = "${WORKDIR}/git"
22
23inherit cmake update-rc.d systemd
24
25DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd"
26RDEPENDS:${PN} += " freeipmi"
27EXTRA_OECMAKE += " \
28 -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \
29 "
30
31INITSCRIPT_NAME = "dfx-mgr.sh"
32INITSCRIPT_PARAMS = "start 99 S ."
33
34SYSTEMD_PACKAGES="${PN}"
35SYSTEMD_SERVICE:${PN}="dfx-mgr.service"
36SYSTEMD_AUTO_ENABLE:${PN}="enable"
37
38
39do_install(){
40 install -d ${D}${bindir}
41 install -d ${D}${libdir}
42 install -d ${D}${includedir}
43 install -d ${D}${base_libdir}/firmware/xilinx
44 install -d ${D}${sysconfdir}/dfx-mgrd
45
46 cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd
47 cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client
48 chrpath -d ${D}${bindir}/dfx-mgrd
49 chrpath -d ${D}${bindir}/dfx-mgr-client
50 install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir}
51
52 oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir}
53
54 install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/
55
56 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
57 install -d ${D}${sysconfdir}/init.d/
58 install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/
59 fi
60
61 install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir}
62 install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir}
63
64 install -d ${D}${systemd_system_unitdir}
65 install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir}
66}
67
68PACKAGES =+ "libdfx-mgr"
69
70FILES:${PN} += "${base_libdir}/firmware/xilinx"
71FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}"
72FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}"
diff --git a/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c b/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c
index 04777a91..281e1828 100644
--- a/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c
+++ b/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c
@@ -1,7 +1,7 @@
1/****************************************************************************** 1/******************************************************************************
2 * 2 *
3 * Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved. 3 * Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved.
4 * Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved. 4 * Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy of 6 * Permission is hereby granted, free of charge, to any person obtaining a copy of
7 * this software and associated documentation files (the "Software"), to deal in 7 * this software and associated documentation files (the "Software"), to deal in
@@ -75,6 +75,20 @@ int fpga_getplatform()
75 75
76} 76}
77 77
78static bool file_exists(const char *filename)
79{
80 FILE *fp = fopen(filename, "r");
81 bool is_exist = false;
82
83 if (fp != NULL)
84 {
85 is_exist = true;
86 fclose(fp); // close the file
87 }
88
89 return is_exist;
90}
91
78void print_usage(char *prg) 92void print_usage(char *prg)
79{ 93{
80 int iszynqmp = fpga_getplatform(); 94 int iszynqmp = fpga_getplatform();
@@ -252,6 +266,12 @@ int main(int argc, char **argv)
252 struct stat sb; 266 struct stat sb;
253 double time; 267 double time;
254 struct timeval t1, t0; 268 struct timeval t1, t0;
269 uid_t euid = geteuid();
270
271 if (euid) {
272 printf("Error: This binary requires root access to execute. \n");
273 return 0;
274 }
255 275
256 if (argc == 1) { 276 if (argc == 1) {
257 print_usage(basename(argv[0])); 277 print_usage(basename(argv[0]));
@@ -262,10 +282,18 @@ int main(int argc, char **argv)
262 switch (opt) { 282 switch (opt) {
263 case 'o': 283 case 'o':
264 overlay = optarg; 284 overlay = optarg;
285 if (!file_exists(overlay)) {
286 printf("Error: User provided Overlay file doesn't exist\r\n");
287 return 1;
288 }
265 flow = OVERLAY; 289 flow = OVERLAY;
266 break; 290 break;
267 case 'b': 291 case 'b':
268 binfile = optarg; 292 binfile = optarg;
293 if (!file_exists(binfile)) {
294 printf("Error: User provided bitstream file doesn't exist\r\n");
295 return 1;
296 }
269 if (!(flow == OVERLAY)) 297 if (!(flow == OVERLAY))
270 flow = FPGA_SYSFS; 298 flow = FPGA_SYSFS;
271 break; 299 break;
@@ -415,7 +443,11 @@ int main(int argc, char **argv)
415 if (binfile != NULL) { 443 if (binfile != NULL) {
416 if (!fpga_state()) { 444 if (!fpga_state()) {
417 printf("Time taken to load BIN is %f Milli Seconds\n\r", time); 445 printf("Time taken to load BIN is %f Milli Seconds\n\r", time);
418 printf("BIN FILE loaded through FPGA manager successfully\n\r"); 446 if (ret) {
447 printf("BIN FILE loaded through FPGA manager successfull but failed to apply Overlay\n\r");
448 } else {
449 printf("BIN FILE loaded through FPGA manager successfully\n\r");
450 }
419 } else { 451 } else {
420 printf("BIN FILE loading through FPGA manager failed\n\r"); 452 printf("BIN FILE loading through FPGA manager failed\n\r");
421 } 453 }
diff --git a/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb b/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb
index d22c995c..b9a36d77 100644
--- a/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb
+++ b/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Install user script to support fpga-manager" 1SUMMARY = "Install user script to support fpga-manager"
2DESCRIPTION = "Install user script that loads and unloads overlays using kernel fpga-manager" 2DESCRIPTION = "Install user script that loads and unloads overlays using kernel fpga-manager"
3LICENSE = "Proprietary" 3LICENSE = "Proprietary"
4LIC_FILES_CHKSUM = "file://${WORKDIR}/fpgautil.c;beginline=1;endline=24;md5=0c02eabf57dba52842c5df9b96bccfae" 4LIC_FILES_CHKSUM = "file://${WORKDIR}/fpgautil.c;beginline=1;endline=24;md5=0dbf04c2c1026b3d120136e728b7a09f"
5 5
6SRC_URI = "\ 6SRC_URI = "\
7 file://fpgautil.c \ 7 file://fpgautil.c \
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb
new file mode 100644
index 00000000..0cbcaac7
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Xilinx libdfx library"
2DESCRIPTION = "Xilinx libdfx Library and headers"
3
4LICENSE = "MIT & GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7"
6
7BRANCH ?= "master"
8REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https"
9BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
10SRC_URI = "${REPO};${BRANCHARG}"
11SRCREV = "c8275891ead62b3dfce68c00cf466715f0ac75f1"
12
13COMPATIBLE_MACHINE = "^$"
14COMPATIBLE_MACHINE:zynqmp = "zynqmp"
15COMPATIBLE_MACHINE:versal = "versal"
16
17S = "${WORKDIR}/git"
18
19inherit cmake
20
21# Due to an update where the soname/version was defined, we need to use an RREPLACES
22# so updates will work properly.
23RREPLACES:${PN} = "libdfx"
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch b/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch
deleted file mode 100644
index 7091098c..00000000
--- a/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From 8127b19aa42ccfb3faae1173a12b3eb0cebf8941 Mon Sep 17 00:00:00 2001
2From: Peter Robinson <pbrobinson@gmail.com>
3Date: Thu, 30 Jan 2020 09:37:15 +0000
4Subject: [PATCH] Remove redundant YYLOC global declaration
5
6Same as the upstream fix for building dtc with gcc 10.
7
8Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
9State: upstream (e33a814e772cdc36436c8c188d8c42d019fda639)
10---
11 scripts/dtc/dtc-lexer.l | 1 -
12 1 file changed, 1 deletion(-)
13
14diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
15index fd825ebba6..24af549977 100644
16--- a/scripts/dtc/dtc-lexer.l
17+++ b/scripts/dtc/dtc-lexer.l
18@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n
19 #include "srcpos.h"
20 #include "dtc-parser.tab.h"
21
22-YYLTYPE yylloc;
23 extern bool treesource_error;
24
25 /* CAUTION: this will stop working if we ever use yyless() or yyunput() */
26--
272.29.2
28
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend
index 65b6ad9d..8df497db 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools%.bbappend
@@ -1,5 +1,5 @@
1# Skip processing of this recipe if it is not explicitly specified as the 1# Skip processing of this recipe if it is not explicitly specified as the
2# PREFERRED_PROVIDER for libmetal. This avoids network access required by 2# PREFERRED_PROVIDER for u-boot-tools. This avoids network access required by
3# the use of AUTOREV SRCREVs, which may be the default for some recipes. 3# the use of AUTOREV SRCREVs, which may be the default for some recipes.
4python () { 4python () {
5 if bb.data.inherits_class('native', d): 5 if bb.data.inherits_class('native', d):
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb
index fe5ecf79..590d1755 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb
@@ -1,5 +1,5 @@
1require u-boot-tools-xlnx.inc 1require u-boot-tools-xlnx.inc
2require u-boot-xlnx-2023.1.inc 2require u-boot-xlnx-2024.1.inc
3 3
4# MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct 4# MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct
5# bmp_logo.h 5# bmp_logo.h
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg
new file mode 100644
index 00000000..033fb197
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg
@@ -0,0 +1,83 @@
1# SPDX-License-Identifier: MIT
2
3#........................................................................
4# WARNING
5#
6# This file is a u-boot configuration fragment, and not a full u-boot
7# configuration file. The final u-boot configuration is made up of
8# an assembly of processed fragments, each of which is designed to
9# capture a specific part of the final configuration (e.g. platform
10# configuration, feature configuration, and board specific hardware
11# configuration). For more information on u-boot configuration, please
12# refer the product documentation.
13#
14#.......................................................................
15
16#
17# Definitions for Generic Microbalze machine.
18#
19CONFIG_BOOTDELAY=4
20CONFIG_TEXT_BASE=0x80100000
21CONFIG_SYS_PROMPT="U-Boot>"
22CONFIG_SYS_CONFIG_NAME="microblaze-generic"
23CONFIG_BOOT_SCRIPT_OFFSET=0x1F00000
24# CONFIG_SYS_NS16550 is not set
25# CONFIG_SYS_FLASH_USE_BUFFER_WRITE is not set
26# CONFIG_SYS_FLASH_CFI is not set
27# CONFIG_FLASH_CFI_DRIVER is not set
28# CONFIG_CMD_FLASH is not set
29# CONFIG_CMD_IMLS is not set
30# CONFIG_MTD_NOR_FLASH is not set
31# CONFIG_MTD_DEVICE is not set
32# CONFIG_SYS_FLASH_PROTECTION is not set
33# CONFIG_SPI_FLASH_SST is not set
34# CONFIG_XILINX_EMACLITE is not set
35# CONFIG_PHY_VITESSE is not set
36# CONFIG_CMD_EXT2 is not set
37# CONFIG_CMD_EXT4 is not set
38# CONFIG_CMD_EXT4_WRITE is not set
39# CONFIG_CMD_FAT is not set
40# CONFIG_DOS_PARTITION is not set
41# CONFIG_FAT_WRITE is not set
42CONFIG_DM=y
43CONFIG_SYS_MALLOC_F=y
44CONFIG_XILINX_UARTLITE=y
45CONFIG_XILINX_AXIEMAC=y
46CONFIG_PHY_XILINX=y
47CONFIG_PHY_TI=y
48CONFIG_NET=y
49CONFIG_PHY_GIGE=y
50CONFIG_NETDEVICES=y
51CONFIG_CMD_NET=y
52CONFIG_DM_ETH=y
53CONFIG_CMD_PING=y
54CONFIG_CMD_DHCP=y
55CONFIG_PHYLIB=y
56CONFIG_CMD_TFTPPUT=y
57CONFIG_CMD_NFS=y
58CONFIG_CMD_MII=y
59CONFIG_PHY_MARVELL=y
60CONFIG_PHY_REALTEK=y
61CONFIG_PHY_NATSEMI=y
62CONFIG_XILINX_SPI=y
63CONFIG_CMD_SPI=y
64CONFIG_CMD_SF=y
65CONFIG_SPI_FLASH=y
66CONFIG_SPI_FLASH_BAR=y
67CONFIG_DM_SPI_FLASH=y
68CONFIG_DM_SPI=y
69CONFIG_SPI_FLASH_SPANSION=y
70CONFIG_SPI_FLASH_STMICRO=y
71CONFIG_SPI_FLASH_WINBOND=y
72CONFIG_SPI_FLASH_MACRONIX=y
73CONFIG_SPI=y
74CONFIG_SPI_FLASH_ISSI=y
75# CONFIG_BOOTARGS is not set
76# CONFIG_USE_BOOTARGS is not set
77# CONFIG_SPL is not set
78# CONFIG_I2C_EEPROM is not set
79# CONFIG_CMD_EEPROM is not set
80# CONFIG_SYS_I2C_EEPROM_ADDR is not set
81# CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW is not set
82CONFIG_DCACHE=y
83CONFIG_ICACHE=y
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc
index 72f43f71..56d65113 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc
@@ -1,8 +1,8 @@
1UBOOT_VERSION = "v2023.01" 1UBOOT_VERSION = "v2024.01"
2 2
3UBRANCH = "xlnx_rebase_v2023.01_update" 3UBRANCH = "xlnx_rebase_v2024.01"
4 4
5SRCREV = "1689570b68dd3827e527a520805aa0bb7f58ee09" 5SRCREV = "19348a61f408d61afd7997adf511895d87b0d3ac"
6 6
7LICENSE = "GPL-2.0-or-later" 7LICENSE = "GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" 8LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc
index 2ef7b9cf..57c00c6e 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc
@@ -1,11 +1,6 @@
1SRC_URI += " \ 1SRC_URI += " \
2 file://microblaze-generic.cfg \ 2 file://microblaze-generic.cfg \
3 file://microblaze-generic-top.h \
4 " 3 "
5 4
6do_configure:prepend () { 5# Disable buildpaths and arch QA check warnings for u-boot-xlnx.elf.
7 install ${WORKDIR}/microblaze-generic-top.h ${S}/include/configs/ 6INSANE_SKIP:${PN}-elf += "buildpaths arch"
8}
9
10# Disable buildpaths QA check warnings for u-boot-xlnx.elf.
11INSANE_SKIP:${PN}-elf += "buildpaths"
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb
index 6410fc25..c3af0185 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb
@@ -65,6 +65,7 @@ UBOOTPXE_CONFIG ?= "pxelinux.cfg"
65UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}" 65UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}"
66 66
67DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}" 67DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}"
68DEVICETREE_ADDRESS_SD ?= "${DEVICETREE_ADDRESS}"
68 69
69DEVICETREE_OFFSET:microblaze ??= "0x1e00000" 70DEVICETREE_OFFSET:microblaze ??= "0x1e00000"
70DEVICETREE_OFFSET:zynqmp ??= "0x100000" 71DEVICETREE_OFFSET:zynqmp ??= "0x100000"
@@ -214,6 +215,7 @@ do_compile() {
214 -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \ 215 -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \
215 -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ 216 -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \
216 -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \ 217 -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \
218 -e 's/@@DEVICETREE_ADDRESS_SD@@/${DEVICETREE_ADDRESS_SD}/' \
217 -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \ 219 -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \
218 -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \ 220 -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \
219 -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \ 221 -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
index d99932ed..e09bdfa9 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic
@@ -39,25 +39,25 @@ do
39 fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; 39 fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name};
40 fi 40 fi
41 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then 41 if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then
42 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; 42 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS_SD@@ system.dtb;
43 setenv fdtcontroladdr @@DEVICETREE_ADDRESS@@ 43 setenv fdtcontroladdr @@DEVICETREE_ADDRESS_SD@@
44 fi 44 fi
45 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then 45 if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then
46 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; 46 fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo;
47 fdt addr @@DEVICETREE_ADDRESS@@ 47 fdt addr @@DEVICETREE_ADDRESS_SD@@
48 fdt resize 8192 48 fdt resize 8192
49 fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ 49 fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@
50 fi 50 fi
51 run update_bootargs 51 run update_bootargs
52 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then 52 if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then
53 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; 53 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name};
54 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ 54 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@
55 fi 55 fi
56 if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then 56 if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then
57 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; 57 fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name};
58 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ 58 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@
59 fi 59 fi
60 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ 60 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS_SD@@
61 fi 61 fi
62 if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then 62 if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then
63 sf probe 0 0 0; 63 sf probe 0 0 0;
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal
index d726187a..36a8f92d 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal
@@ -1,7 +1,7 @@
1@@PRE_BOOTENV@@ 1@@PRE_BOOTENV@@
2 2
3setenv sdbootdev @@SDBOOTDEV@@ 3setenv sdbootdev @@SDBOOTDEV@@
4setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon clk_ignore_unused 4setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon
5fatload mmc $sdbootdev @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@ 5fatload mmc $sdbootdev @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@
6fatload mmc $sdbootdev:$partid @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@ 6fatload mmc $sdbootdev:$partid @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@
7@@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ 7@@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.zynqmp b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.zynqmp
index bddab5d0..ac7438bb 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.zynqmp
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.zynqmp
@@ -1,7 +1,7 @@
1@@PRE_BOOTENV@@ 1@@PRE_BOOTENV@@
2 2
3setenv sdbootdev @@SDBOOTDEV@@ 3setenv sdbootdev @@SDBOOTDEV@@
4setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon clk_ignore_unused 4setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon
5if test -n "@@BITSTREAM@@"; then 5if test -n "@@BITSTREAM@@"; then
6 fatload mmc $sdbootdev @@BITSTREAM_LOAD_ADDRESS@@ @@BITSTREAM_IMAGE@@ && fpga @@BITSTREAM_LOAD_TYPE@@ 0 @@BITSTREAM_LOAD_ADDRESS@@ ${filesize} 6 fatload mmc $sdbootdev @@BITSTREAM_LOAD_ADDRESS@@ @@BITSTREAM_IMAGE@@ && fpga @@BITSTREAM_LOAD_TYPE@@ 0 @@BITSTREAM_LOAD_ADDRESS@@ ${filesize}
7fi 7fi
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
index 228396eb..1efc5392 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb
@@ -83,7 +83,7 @@ DEPENDS:append := " virtual/kernel ${@remove_task_from_depends(d)}"
83 83
84# bootargs, default to booting with the rootfs device being partition 2 84# bootargs, default to booting with the rootfs device being partition 2
85KERNEL_BOOTARGS:zynq = "earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait" 85KERNEL_BOOTARGS:zynq = "earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait"
86KERNEL_BOOTARGS:zynqmp = "earlycon clk_ignore_unused root=/dev/mmcblk${devnum}p2 rw rootwait" 86KERNEL_BOOTARGS:zynqmp = "earlycon root=/dev/mmcblk${devnum}p2 rw rootwait"
87 87
88KERNEL_LOAD_ADDRESS:zynq = "0x2080000" 88KERNEL_LOAD_ADDRESS:zynq = "0x2080000"
89KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" 89KERNEL_LOAD_ADDRESS:zynqmp = "0x200000"
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
index 4c7ea934..bd9711f5 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc
@@ -7,7 +7,7 @@ require u-boot-xlnx-common.inc
7 7
8SYSROOT_DIRS += "/boot" 8SYSROOT_DIRS += "/boot"
9 9
10BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" 10BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}"
11DTB_PATH ?= "boot/devicetree/" 11DTB_PATH ?= "boot/devicetree/"
12DTB_FILE_NAME ?= "" 12DTB_FILE_NAME ?= ""
13 13
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb
index fd76bc51..718ad9d4 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb
@@ -1,4 +1,4 @@
1 1
2require u-boot-xlnx.inc 2require u-boot-xlnx.inc
3require u-boot-spl-zynq-init.inc 3require u-boot-spl-zynq-init.inc
4require u-boot-xlnx-2023.1.inc 4require u-boot-xlnx-2024.1.inc
diff --git a/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb b/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb
new file mode 100644
index 00000000..334b786b
--- /dev/null
+++ b/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb
@@ -0,0 +1,18 @@
1SUMMARY = "A general purpose TCP-IP emulator"
2DESCRIPTION = "A general purpose TCP-IP emulator used by virtual machine hypervisors to provide virtual networking services."
3HOMEPAGE = "https://gitlab.freedesktop.org/slirp/libslirp"
4LICENSE = "BSD-3-Clause & MIT"
5LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727"
6
7SRC_URI = "git://gitlab.freedesktop.org/slirp/libslirp.git;protocol=https;branch=master"
8SRCREV = "3ad1710a96678fe79066b1469cead4058713a1d9"
9PV = "4.7.0"
10S = "${WORKDIR}/git"
11
12DEPENDS = " \
13 glib-2.0 \
14"
15
16inherit meson pkgconfig
17
18BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
index 370e694b..1dcac990 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
+++ b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch
@@ -13,58 +13,77 @@ mach_path = tempfile.mkdtemp()
13 13
14# Separate PMU and APU arguments 14# Separate PMU and APU arguments
15APU_args = sys.argv[1:] 15APU_args = sys.argv[1:]
16mbtype='' 16PMU_args = []
17PLM_args = []
17 18
18if '-pmu-args' in APU_args: 19if '-pmu-args' in APU_args:
19 MB_args = APU_args[APU_args.index('-pmu-args')+1] 20 pmu_args_idx = APU_args.index('-pmu-args')
20 APU_args.remove('-pmu-args') 21 PMU_args = APU_args[pmu_args_idx+1].split()
21 APU_args.remove(MB_args) 22 del APU_args[pmu_args_idx:pmu_args_idx+2]
22 MB_args = MB_args.split() 23
23 PMU_rom = MB_args[MB_args.index('-kernel')+1] 24if '-plm-args' in APU_args:
24 mbtype='PMU' 25 plm_args_idx = APU_args.index('-plm-args')
25elif '-plm-args' in APU_args: 26 PLM_args = APU_args[plm_args_idx+1].split()
26 MB_args = APU_args[APU_args.index('-plm-args')+1] 27 del APU_args[plm_args_idx:plm_args_idx+2]
27 APU_args.remove('-plm-args') 28
28 APU_args.remove(MB_args) 29if PMU_args and PLM_args:
29 MB_args = MB_args.split() 30 sys.exit("\nError: -pmu-args can not be used with -plm-args\n")
30 mbtype='PLM' 31
31elif '--help' in APU_args: 32if ('--help' in APU_args) or (not PMU_args and not PLM_args):
32 mbtype='help' 33 print("AMD FPGA QEMU multiarch wrapper\n")
33else: 34 print("Version 2024.1")
34 error_msg = '\nMultiarch not setup properly.' 35 print("")
35 sys.exit(error_msg) 36 print("Usage:")
36 37 print(" %s <APU options> [-pmu-args <pmu options>]" % (sys.argv[0]))
37error_msg = None 38 print(" %s <APU options> [-plm-args <plm options>]" % (sys.argv[0]))
38if (mbtype == 'PMU' and os.path.exists(PMU_rom)) or mbtype == 'PLM': 39 print("")
39 40 sys.exit(1)
40 # We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly 41
41 tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s] 42if PMU_args:
42 43 PMU_rom = PMU_args[PMU_args.index('-kernel')+1]
43 #NEED TO FIX for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream
44 # We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is
45 if len(tcp_serial_ports) == 2:
46 APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]]
47
48 mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(MB_args) + ' -machine-path ' + mach_path
49 apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path
50
51 # Debug prints
52 print('\n%s instance cmd: %s\n' % (mbtype, mb_cmd))
53 print('APU instance cmd: %s\n' % apu_cmd)
54
55
56 # Invoke QEMU pmu instance
57 process_pmu = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE)
58
59 # Invoke QEMU APU instance
60 process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE)
61 if process_apu.wait():
62 error_msg = '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode()
63 44
64else: 45 if not os.path.exists(PMU_rom):
65 if mbtype == 'PMU':
66 error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom 46 error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom
67 error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n' 47 error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n'
48 sys.exit(error_msg)
49
50# We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly
51tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s]
52
53#NEED TO FIX for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream
54# We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is
55if len(tcp_serial_ports) == 2:
56 APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]]
57
58mb_cmd = ""
59if PMU_args:
60 mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(PMU_args) + ' -machine-path ' + mach_path
61
62 print("PMU instance cmd: %s\n" % mb_cmd)
63
64if PLM_args:
65 mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(PLM_args) + ' -machine-path ' + mach_path
66
67 print("PLM instance cmd: %s\n" % mb_cmd)
68
69apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path
70
71print("APU instance cmd: %s\n" % apu_cmd)
72
73
74if mb_cmd:
75 process_mb = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE)
76
77if apu_cmd:
78 process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE)
79
80error_msg = ""
81if apu_cmd and process_apu.wait():
82 # We only check for failures on the MB instance if APU fails
83 error_msg += '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode()
84
85 if mb_cmd and process_mb.wait():
86 error_msg += '\nQEMU MB instance failed:\n%s' % process_mb.stderr.read().decode()
68 87
69shutil.rmtree(mach_path) 88shutil.rmtree(mach_path)
70sys.exit(error_msg) 89sys.exit(error_msg)
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
new file mode 100644
index 00000000..5154e247
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
@@ -0,0 +1,290 @@
1SUMMARY = "Fast open source processor emulator"
2DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \
3machine's processor through dynamic binary translation and provides a set \
4of different hardware and device models for the machine, enabling it to run \
5a variety of guest operating systems"
6HOMEPAGE = "http://qemu.org"
7LICENSE = "GPL-2.0-only & LGPL-2.1-only"
8
9DEPENDS += "bison-native meson-native ninja-native"
10
11RDEPENDS:${PN}-ptest = "bash"
12
13require qemu-targets-8.1.inc
14# https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means
15# we need a full python3-native setup
16inherit pkgconfig ptest update-rc.d systemd python3native
17
18LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
19 file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
20
21SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
22 file://powerpc_rom.bin \
23 file://run-ptest \
24 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
25 file://0003-apic-fixup-fallthrough-to-PIC.patch \
26 file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
27 file://0005-qemu-Do-not-include-file-if-not-exists.patch \
28 file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
29 file://0007-qemu-Determinism-fixes.patch \
30 file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
31 file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
32 file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
33 file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
34 file://fixedmeson.patch \
35 file://fixmips.patch \
36 file://no-pip.patch \
37 file://qemu-guest-agent.init \
38 file://qemu-guest-agent.udev \
39 "
40UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
41
42
43SRC_URI[sha256sum] = "541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087"
44
45SRC_URI:append:class-target = " file://cross.patch"
46SRC_URI:append:class-nativesdk = " file://cross.patch"
47
48CVE_STATUS[CVE-2017-5957] = "cpe-incorrect: Applies against virglrender < 0.6.0 and not qemu itself"
49
50CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
51
52# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
53CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability."
54
55# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
56# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
57CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on Windows"
58
59# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387
60CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue."
61
62COMPATIBLE_HOST:mipsarchn32 = "null"
63COMPATIBLE_HOST:mipsarchn64 = "null"
64COMPATIBLE_HOST:riscv32 = "null"
65
66# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
67# upstream states qemu doesn't work without optimization
68DEBUG_BUILD = "0"
69
70do_install:append() {
71 # Prevent QA warnings about installed ${localstatedir}/run
72 if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
73}
74
75do_install_ptest() {
76 cp -rL ${B}/tests ${D}${PTEST_PATH}
77 find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
78
79 # Don't check the file genreated by configure
80 sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
81
82 # Strip the paths from the QEMU variable, we can use PATH
83 makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
84 sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles
85
86 # Strip compiler flags as they break reproducibility
87 sed -i -e "s,^CC=.*,CC=gcc," \
88 -e "s,^CCAS=.*,CCAS=gcc," \
89 -e "s,^LD=.*,LD=ld," $makfiles
90
91 # Update SRC_PATH variable to the right place on target
92 sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles
93
94 # https://gitlab.com/qemu-project/qemu/-/issues/1403
95 rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command
96}
97
98# QEMU_TARGETS is overridable variable
99QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64"
100
101EXTRA_OECONF = " \
102 --prefix=${prefix} \
103 --bindir=${bindir} \
104 --includedir=${includedir} \
105 --libdir=${libdir} \
106 --mandir=${mandir} \
107 --datadir=${datadir} \
108 --docdir=${docdir}/${BPN} \
109 --sysconfdir=${sysconfdir} \
110 --libexecdir=${libexecdir} \
111 --localstatedir=${localstatedir} \
112 --with-suffix=${BPN} \
113 --disable-strip \
114 --disable-werror \
115 --extra-cflags='${CFLAGS}' \
116 --extra-ldflags='${LDFLAGS}' \
117 --disable-download \
118 --disable-docs \
119 --host-cc='${BUILD_CC}' \
120 ${PACKAGECONFIG_CONFARGS} \
121 "
122
123EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
124EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
125
126B = "${WORKDIR}/build"
127
128#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
129
130do_configure:prepend:class-native() {
131 # Append build host pkg-config paths for native target since the host may provide sdl
132 BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
133 if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
134 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
135 fi
136}
137
138do_configure() {
139 export PKG_CONFIG=pkg-config
140 ${S}/configure ${EXTRA_OECONF}
141}
142do_configure[cleandirs] += "${B}"
143
144do_install () {
145 export STRIP=""
146 oe_runmake 'DESTDIR=${D}' install
147
148 # If we built the guest agent, also install startup/udev rules
149 if [ -e "${D}${bindir}/qemu-ga" ]; then
150 install -d ${D}${sysconfdir}/init.d/
151 install -m 0755 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent
152 sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent
153
154 install -d ${D}${sysconfdir}/udev/rules.d/
155 install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules
156
157 install -d ${D}${systemd_unitdir}/system/
158 install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system
159 sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service
160 fi
161 # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text
162 rm ${D}${datadir}/qemu/s390-netboot.img -f
163 # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel]
164 rm ${D}${datadir}/qemu/s390-ccw.img -f
165}
166
167# The following fragment will create a wrapper for qemu-mips user emulation
168# binary in order to work around a segmentation fault issue. Basically, by
169# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
170# This will trigger a MMU access fault in the virtual CPU. With this change,
171# the qemu-mips works fine.
172# IMPORTANT: This piece needs to be removed once the root cause is fixed!
173do_install:append() {
174 if [ -e "${D}/${bindir}/qemu-mips" ]; then
175 create_wrapper ${D}/${bindir}/qemu-mips \
176 QEMU_RESERVED_VA=0x0
177 fi
178}
179# END of qemu-mips workaround
180
181# Disable kvm/virgl/mesa on targets that do not support it
182PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+"
183PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie"
184
185PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2"
186PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
187PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr,"
188PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
189PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing"
190PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest"
191PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
192PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
193PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
194PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
195PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
196PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
197PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native"
198PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
199PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh,"
200PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
201PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
202PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
203PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
204PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib"
205PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy"
206PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
207PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl"
208PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
209PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
210PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
211PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
212PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
213PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
214# spice will be in meta-networking layer
215PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
216# usbredir will be in meta-networking layer
217PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus"
218PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
219PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
220PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs"
221PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
222PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev"
223PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr,"
224PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph"
225PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,,"
226PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust,"
227PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,,"
228PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
229# libnfs is currently provided by meta-kodi
230PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
231PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk"
232PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio"
233PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux"
234PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf"
235PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone"
236PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
237PACKAGECONFIG[vde] = "--enable-vde,--disable-vde"
238PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3"
239PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp"
240PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
241PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack,"
242PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils"
243PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire"
244PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio"
245
246INSANE_SKIP:${PN}-common = "arch"
247
248FILES:${PN} += "${datadir}/icons"
249
250# For user who want to install all arch packages
251PACKAGES =+ "${PN}-common"
252RDEPENDS:${PN} += "${PN}-common"
253
254ALLOW_EMPTY:${PN} = "1"
255FILES:${PN} = ""
256
257FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}"
258
259PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*"
260
261PACKAGESPLITFUNCS =+ "split_qemu_packages"
262
263python split_qemu_packages () {
264 archdir = d.expand('${bindir}/')
265 subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common')
266
267 subpackages += do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common')
268 if subpackages:
269 d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages))
270 mipspackage = d.getVar('PN') + "-user-mips"
271 if mipspackage in ' '.join(subpackages):
272 d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash')
273}
274
275# Put the guest agent in a separate package
276PACKAGES =+ "${PN}-guest-agent"
277SUMMARY:${PN}-guest-agent = "QEMU guest agent"
278FILES:${PN}-guest-agent += " \
279 ${bindir}/qemu-ga \
280 ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \
281 ${sysconfdir}/init.d/qemu-guest-agent \
282 ${systemd_unitdir}/system/qemu-guest-agent.service \
283"
284
285INITSCRIPT_PACKAGES = "${PN}-guest-agent"
286INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent"
287INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults"
288
289SYSTEMD_PACKAGES = "${PN}-guest-agent"
290SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
new file mode 100644
index 00000000..c6550801
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -0,0 +1,33 @@
1From de64af82950a6908f9407dfc92b83c17e2af3eab Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 28 Mar 2014 17:42:43 +0800
4Subject: [PATCH 01/12] qemu: Add addition environment space to boot loader
5 qemu-system-mips
6
7Upstream-Status: Inappropriate - OE uses deep paths
8
9If you create a project with very long directory names like 128 characters
10deep and use NFS, the kernel arguments will be truncated. The kernel will
11accept longer strings such as 1024 bytes, but the qemu boot loader defaulted
12to only 256 bytes. This patch expands the limit.
13
14Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15Signed-off-by: Roy Li <rongqing.li@windriver.com>
16
17---
18 hw/mips/malta.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21Index: qemu-8.0.0/hw/mips/malta.c
22===================================================================
23--- qemu-8.0.0.orig/hw/mips/malta.c
24+++ qemu-8.0.0/hw/mips/malta.c
25@@ -64,7 +64,7 @@
26 #define ENVP_PADDR 0x2000
27 #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
28 #define ENVP_NB_ENTRIES 16
29-#define ENVP_ENTRY_SIZE 256
30+#define ENVP_ENTRY_SIZE 1024
31
32 /* Hardware addresses */
33 #define FLASH_ADDRESS 0x1e000000ULL
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
new file mode 100644
index 00000000..ceae67be
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
@@ -0,0 +1,355 @@
1From 71f14902256e3c3529710b713e1ea43100bf4c40 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 Dec 2022 08:37:46 -0800
4Subject: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and
5 macros
6
7Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions
8anf macros behave same as their 64 suffixed counterparts. This also
9helps in compiling with latest musl C library, where these macros and
10functions are no more available under _GNU_SOURCE feature macro
11
12Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg02841.html]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Cc: Laurent Vivier <laurent@vivier.eu>
15---
16 linux-user/syscall.c | 153 +++++++++++--------------------------------
17 1 file changed, 39 insertions(+), 114 deletions(-)
18
19Index: qemu-8.0.0/linux-user/syscall.c
20===================================================================
21--- qemu-8.0.0.orig/linux-user/syscall.c
22+++ qemu-8.0.0/linux-user/syscall.c
23@@ -761,8 +761,8 @@ safe_syscall6(ssize_t, copy_file_range,
24 */
25 #define safe_ioctl(...) safe_syscall(__NR_ioctl, __VA_ARGS__)
26 /* Similarly for fcntl. Note that callers must always:
27- * pass the F_GETLK64 etc constants rather than the unsuffixed F_GETLK
28- * use the flock64 struct rather than unsuffixed flock
29+ * pass the F_GETLK etc constants rather than the unsuffixed F_GETLK
30+ * use the flock struct rather than unsuffixed flock
31 * This will then work and use a 64-bit offset for both 32-bit and 64-bit hosts.
32 */
33 #ifdef __NR_fcntl64
34@@ -6813,13 +6813,13 @@ static int target_to_host_fcntl_cmd(int
35 ret = cmd;
36 break;
37 case TARGET_F_GETLK:
38- ret = F_GETLK64;
39+ ret = F_GETLK;
40 break;
41 case TARGET_F_SETLK:
42- ret = F_SETLK64;
43+ ret = F_SETLK;
44 break;
45 case TARGET_F_SETLKW:
46- ret = F_SETLKW64;
47+ ret = F_SETLKW;
48 break;
49 case TARGET_F_GETOWN:
50 ret = F_GETOWN;
51@@ -6833,17 +6833,6 @@ static int target_to_host_fcntl_cmd(int
52 case TARGET_F_SETSIG:
53 ret = F_SETSIG;
54 break;
55-#if TARGET_ABI_BITS == 32
56- case TARGET_F_GETLK64:
57- ret = F_GETLK64;
58- break;
59- case TARGET_F_SETLK64:
60- ret = F_SETLK64;
61- break;
62- case TARGET_F_SETLKW64:
63- ret = F_SETLKW64;
64- break;
65-#endif
66 case TARGET_F_SETLEASE:
67 ret = F_SETLEASE;
68 break;
69@@ -6895,8 +6884,8 @@ static int target_to_host_fcntl_cmd(int
70 * them to 5, 6 and 7 before making the syscall(). Since we make the
71 * syscall directly, adjust to what is supported by the kernel.
72 */
73- if (ret >= F_GETLK64 && ret <= F_SETLKW64) {
74- ret -= F_GETLK64 - 5;
75+ if (ret >= F_GETLK && ret <= F_SETLKW) {
76+ ret -= F_GETLK - 5;
77 }
78 #endif
79
80@@ -6929,55 +6918,11 @@ static int host_to_target_flock(int type
81 return type;
82 }
83
84-static inline abi_long copy_from_user_flock(struct flock64 *fl,
85- abi_ulong target_flock_addr)
86-{
87- struct target_flock *target_fl;
88- int l_type;
89-
90- if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
91- return -TARGET_EFAULT;
92- }
93-
94- __get_user(l_type, &target_fl->l_type);
95- l_type = target_to_host_flock(l_type);
96- if (l_type < 0) {
97- return l_type;
98- }
99- fl->l_type = l_type;
100- __get_user(fl->l_whence, &target_fl->l_whence);
101- __get_user(fl->l_start, &target_fl->l_start);
102- __get_user(fl->l_len, &target_fl->l_len);
103- __get_user(fl->l_pid, &target_fl->l_pid);
104- unlock_user_struct(target_fl, target_flock_addr, 0);
105- return 0;
106-}
107-
108-static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
109- const struct flock64 *fl)
110-{
111- struct target_flock *target_fl;
112- short l_type;
113-
114- if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
115- return -TARGET_EFAULT;
116- }
117-
118- l_type = host_to_target_flock(fl->l_type);
119- __put_user(l_type, &target_fl->l_type);
120- __put_user(fl->l_whence, &target_fl->l_whence);
121- __put_user(fl->l_start, &target_fl->l_start);
122- __put_user(fl->l_len, &target_fl->l_len);
123- __put_user(fl->l_pid, &target_fl->l_pid);
124- unlock_user_struct(target_fl, target_flock_addr, 1);
125- return 0;
126-}
127-
128-typedef abi_long from_flock64_fn(struct flock64 *fl, abi_ulong target_addr);
129-typedef abi_long to_flock64_fn(abi_ulong target_addr, const struct flock64 *fl);
130+typedef abi_long from_flock_fn(struct flock *fl, abi_ulong target_addr);
131+typedef abi_long to_flock_fn(abi_ulong target_addr, const struct flock *fl);
132
133 #if defined(TARGET_ARM) && TARGET_ABI_BITS == 32
134-struct target_oabi_flock64 {
135+struct target_oabi_flock {
136 abi_short l_type;
137 abi_short l_whence;
138 abi_llong l_start;
139@@ -6985,10 +6930,10 @@ struct target_oabi_flock64 {
140 abi_int l_pid;
141 } QEMU_PACKED;
142
143-static inline abi_long copy_from_user_oabi_flock64(struct flock64 *fl,
144+static inline abi_long copy_from_user_oabi_flock(struct flock *fl,
145 abi_ulong target_flock_addr)
146 {
147- struct target_oabi_flock64 *target_fl;
148+ struct target_oabi_flock *target_fl;
149 int l_type;
150
151 if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
152@@ -7009,10 +6954,10 @@ static inline abi_long copy_from_user_oa
153 return 0;
154 }
155
156-static inline abi_long copy_to_user_oabi_flock64(abi_ulong target_flock_addr,
157- const struct flock64 *fl)
158+static inline abi_long copy_to_user_oabi_flock(abi_ulong target_flock_addr,
159+ const struct flock *fl)
160 {
161- struct target_oabi_flock64 *target_fl;
162+ struct target_oabi_flock *target_fl;
163 short l_type;
164
165 if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
166@@ -7030,10 +6975,10 @@ static inline abi_long copy_to_user_oabi
167 }
168 #endif
169
170-static inline abi_long copy_from_user_flock64(struct flock64 *fl,
171+static inline abi_long copy_from_user_flock(struct flock *fl,
172 abi_ulong target_flock_addr)
173 {
174- struct target_flock64 *target_fl;
175+ struct target_flock *target_fl;
176 int l_type;
177
178 if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
179@@ -7054,10 +6999,10 @@ static inline abi_long copy_from_user_fl
180 return 0;
181 }
182
183-static inline abi_long copy_to_user_flock64(abi_ulong target_flock_addr,
184- const struct flock64 *fl)
185+static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
186+ const struct flock *fl)
187 {
188- struct target_flock64 *target_fl;
189+ struct target_flock *target_fl;
190 short l_type;
191
192 if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
193@@ -7076,7 +7021,7 @@ static inline abi_long copy_to_user_floc
194
195 static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
196 {
197- struct flock64 fl64;
198+ struct flock fl64;
199 #ifdef F_GETOWN_EX
200 struct f_owner_ex fox;
201 struct target_f_owner_ex *target_fox;
202@@ -7089,6 +7034,7 @@ static abi_long do_fcntl(int fd, int cmd
203
204 switch(cmd) {
205 case TARGET_F_GETLK:
206+ case TARGET_F_OFD_GETLK:
207 ret = copy_from_user_flock(&fl64, arg);
208 if (ret) {
209 return ret;
210@@ -7098,32 +7044,11 @@ static abi_long do_fcntl(int fd, int cmd
211 ret = copy_to_user_flock(arg, &fl64);
212 }
213 break;
214-
215 case TARGET_F_SETLK:
216 case TARGET_F_SETLKW:
217- ret = copy_from_user_flock(&fl64, arg);
218- if (ret) {
219- return ret;
220- }
221- ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
222- break;
223-
224- case TARGET_F_GETLK64:
225- case TARGET_F_OFD_GETLK:
226- ret = copy_from_user_flock64(&fl64, arg);
227- if (ret) {
228- return ret;
229- }
230- ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
231- if (ret == 0) {
232- ret = copy_to_user_flock64(arg, &fl64);
233- }
234- break;
235- case TARGET_F_SETLK64:
236- case TARGET_F_SETLKW64:
237 case TARGET_F_OFD_SETLK:
238 case TARGET_F_OFD_SETLKW:
239- ret = copy_from_user_flock64(&fl64, arg);
240+ ret = copy_from_user_flock(&fl64, arg);
241 if (ret) {
242 return ret;
243 }
244@@ -7348,7 +7273,7 @@ static inline abi_long target_truncate64
245 arg2 = arg3;
246 arg3 = arg4;
247 }
248- return get_errno(truncate64(arg1, target_offset64(arg2, arg3)));
249+ return get_errno(truncate(arg1, target_offset64(arg2, arg3)));
250 }
251 #endif
252
253@@ -7362,7 +7287,7 @@ static inline abi_long target_ftruncate6
254 arg2 = arg3;
255 arg3 = arg4;
256 }
257- return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3)));
258+ return get_errno(ftruncate(arg1, target_offset64(arg2, arg3)));
259 }
260 #endif
261
262@@ -8598,7 +8523,7 @@ static int do_getdents(abi_long dirfd, a
263 void *tdirp;
264 int hlen, hoff, toff;
265 int hreclen, treclen;
266- off64_t prev_diroff = 0;
267+ off_t prev_diroff = 0;
268
269 hdirp = g_try_malloc(count);
270 if (!hdirp) {
271@@ -8651,7 +8576,7 @@ static int do_getdents(abi_long dirfd, a
272 * Return what we have, resetting the file pointer to the
273 * location of the first record not returned.
274 */
275- lseek64(dirfd, prev_diroff, SEEK_SET);
276+ lseek(dirfd, prev_diroff, SEEK_SET);
277 break;
278 }
279
280@@ -8685,7 +8610,7 @@ static int do_getdents64(abi_long dirfd,
281 void *tdirp;
282 int hlen, hoff, toff;
283 int hreclen, treclen;
284- off64_t prev_diroff = 0;
285+ off_t prev_diroff = 0;
286
287 hdirp = g_try_malloc(count);
288 if (!hdirp) {
289@@ -8727,7 +8652,7 @@ static int do_getdents64(abi_long dirfd,
290 * Return what we have, resetting the file pointer to the
291 * location of the first record not returned.
292 */
293- lseek64(dirfd, prev_diroff, SEEK_SET);
294+ lseek(dirfd, prev_diroff, SEEK_SET);
295 break;
296 }
297
298@@ -11158,7 +11083,7 @@ static abi_long do_syscall1(CPUArchState
299 return -TARGET_EFAULT;
300 }
301 }
302- ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5)));
303+ ret = get_errno(pread(arg1, p, arg3, target_offset64(arg4, arg5)));
304 unlock_user(p, arg2, ret);
305 return ret;
306 case TARGET_NR_pwrite64:
307@@ -11175,7 +11100,7 @@ static abi_long do_syscall1(CPUArchState
308 return -TARGET_EFAULT;
309 }
310 }
311- ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5)));
312+ ret = get_errno(pwrite(arg1, p, arg3, target_offset64(arg4, arg5)));
313 unlock_user(p, arg2, 0);
314 return ret;
315 #endif
316@@ -11998,14 +11923,14 @@ static abi_long do_syscall1(CPUArchState
317 case TARGET_NR_fcntl64:
318 {
319 int cmd;
320- struct flock64 fl;
321- from_flock64_fn *copyfrom = copy_from_user_flock64;
322- to_flock64_fn *copyto = copy_to_user_flock64;
323+ struct flock fl;
324+ from_flock_fn *copyfrom = copy_from_user_flock;
325+ to_flock_fn *copyto = copy_to_user_flock;
326
327 #ifdef TARGET_ARM
328 if (!cpu_env->eabi) {
329- copyfrom = copy_from_user_oabi_flock64;
330- copyto = copy_to_user_oabi_flock64;
331+ copyfrom = copy_from_user_oabi_flock;
332+ copyto = copy_to_user_oabi_flock;
333 }
334 #endif
335
336@@ -12015,7 +11940,7 @@ static abi_long do_syscall1(CPUArchState
337 }
338
339 switch(arg2) {
340- case TARGET_F_GETLK64:
341+ case TARGET_F_GETLK:
342 ret = copyfrom(&fl, arg3);
343 if (ret) {
344 break;
345@@ -12026,8 +11951,8 @@ static abi_long do_syscall1(CPUArchState
346 }
347 break;
348
349- case TARGET_F_SETLK64:
350- case TARGET_F_SETLKW64:
351+ case TARGET_F_SETLK:
352+ case TARGET_F_SETLKW:
353 ret = copyfrom(&fl, arg3);
354 if (ret) {
355 break;
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
new file mode 100644
index 00000000..e85f8202
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
@@ -0,0 +1,44 @@
1From dc2a8ccd440ee3741b61606eafed3f7e092f4312 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Tue, 26 Feb 2013 11:43:28 -0500
4Subject: [PATCH 03/12] apic: fixup fallthrough to PIC
5
6Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC
7interrupts through the local APIC if the local APIC config says so.]
8missed a check to ensure the local APIC is enabled. Since if the local
9APIC is disabled it doesn't matter what the local APIC config says.
10
11If this check isn't done and the guest has disabled the local APIC the
12guest will receive a general protection fault, similar to what is seen
13here:
14
15https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html
16
17The GPF is caused by an attempt to service interrupt 0xffffffff. This
18comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr()
19(with the local APIC disabled apic_get_interrupt() returns -1).
20apic_accept_pic_intr() returns 0 and thus the interrupt number which
21is returned from cpu_get_pic_interrupt(), and which is attempted to be
22serviced, is -1.
23
24Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
25Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html]
26Signed-off-by: He Zhe <zhe.he@windriver.com>
27
28---
29 hw/intc/apic.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32Index: qemu-8.0.0/hw/intc/apic.c
33===================================================================
34--- qemu-8.0.0.orig/hw/intc/apic.c
35+++ qemu-8.0.0/hw/intc/apic.c
36@@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de
37 APICCommonState *s = APIC(dev);
38 uint32_t lvt0;
39
40- if (!s)
41+ if (!s || !(s->spurious_vec & APIC_SV_ENABLE))
42 return -1;
43
44 lvt0 = s->lvt[APIC_LVT_LINT0];
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
new file mode 100644
index 00000000..f981a64a
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -0,0 +1,29 @@
1From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001
2From: He Zhe <zhe.he@windriver.com>
3Date: Wed, 28 Aug 2019 19:56:28 +0800
4Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt
5
6libgcrypt may also be controlled by pkg-config, this patch adds pkg-config
7handling for libgcrypt.
8
9Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html]
10
11Signed-off-by: He Zhe <zhe.he@windriver.com>
12
13---
14 meson.build | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17Index: qemu-8.1.0/meson.build
18===================================================================
19--- qemu-8.1.0.orig/meson.build
20+++ qemu-8.1.0/meson.build
21@@ -1481,7 +1481,7 @@ endif
22 if not gnutls_crypto.found()
23 if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled()
24 gcrypt = dependency('libgcrypt', version: '>=1.8',
25- method: 'config-tool',
26+ method: 'pkg-config',
27 required: get_option('gcrypt'))
28 # Debian has removed -lgpg-error from libgcrypt-config
29 # as it "spreads unnecessary dependencies" which in
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
new file mode 100644
index 00000000..38aa4c3b
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
@@ -0,0 +1,32 @@
1From f39e7bfc5ed07b5ecaeb705c4eae4855ca120d47 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Wed, 25 Mar 2020 21:21:35 +0200
4Subject: [PATCH 05/12] qemu: Do not include file if not exists
5
6Script configure checks for if_alg.h and check failed but
7if_alg.h still included.
8
9Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07188.html]
10Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
11
12[update patch context]
13Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
14
15---
16 linux-user/syscall.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19Index: qemu-8.0.0/linux-user/syscall.c
20===================================================================
21--- qemu-8.0.0.orig/linux-user/syscall.c
22+++ qemu-8.0.0/linux-user/syscall.c
23@@ -115,7 +115,9 @@
24 #include <linux/blkpg.h>
25 #include <netpacket/packet.h>
26 #include <linux/netlink.h>
27+#if defined(CONFIG_AF_ALG)
28 #include <linux/if_alg.h>
29+#endif
30 #include <linux/rtc.h>
31 #include <sound/asound.h>
32 #ifdef HAVE_BTRFS_H
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
new file mode 100644
index 00000000..5d1d7c68
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -0,0 +1,49 @@
1From 375cae3dd6151ef33cae8f243f6a2c2da6c0c356 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Fri, 8 Jan 2021 17:27:06 +0000
4Subject: [PATCH 06/12] qemu: Add some user space mmap tweaks to address musl
5 32 bit
6
7When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an
8infinite loop of mremap calls of ever decreasing/increasing addresses.
9
10I suspect something in the musl memory allocation code loops indefinitely
11if it only sees ENOMEM and only exits when it hits EFAULT.
12
13According to the docs, trying to mremap outside the address space
14can/should return EFAULT and changing this allows the build to succeed.
15
16A better return value for the other cases of invalid addresses is EINVAL
17rather than ENOMEM so adjust the other part of the test to this.
18
19Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
20Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
21
22---
23 linux-user/mmap.c | 10 +++++++---
24 1 file changed, 7 insertions(+), 3 deletions(-)
25
26Index: qemu-8.0.0/linux-user/mmap.c
27===================================================================
28--- qemu-8.0.0.orig/linux-user/mmap.c
29+++ qemu-8.0.0/linux-user/mmap.c
30@@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add
31 int prot;
32 void *host_addr;
33
34- if (!guest_range_valid_untagged(old_addr, old_size) ||
35- ((flags & MREMAP_FIXED) &&
36+ if (!guest_range_valid_untagged(old_addr, old_size)) {
37+ errno = EFAULT;
38+ return -1;
39+ }
40+
41+ if (((flags & MREMAP_FIXED) &&
42 !guest_range_valid_untagged(new_addr, new_size)) ||
43 ((flags & MREMAP_MAYMOVE) == 0 &&
44 !guest_range_valid_untagged(old_addr, new_size))) {
45- errno = ENOMEM;
46+ errno = EINVAL;
47 return -1;
48 }
49
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
new file mode 100644
index 00000000..d3f965e0
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
@@ -0,0 +1,31 @@
1From 50bab5c2605b609ea7ea154f57a9be96d656725a Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Mon, 1 Mar 2021 13:00:47 +0000
4Subject: [PATCH 07/12] qemu: Determinism fixes
5
6When sources are included within debug information, a couple of areas of the
7qemu build are not reproducible due to either full buildpaths or timestamps.
8
9Replace the full paths with relative ones. I couldn't figure out how to get
10meson to pass relative paths but we can fix that in the script.
11
12Upstream-Status: Pending [some version of all/part of this may be accepted]
13RP 2021/3/1
14
15---
16 scripts/decodetree.py | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19Index: qemu-8.0.0/scripts/decodetree.py
20===================================================================
21--- qemu-8.0.0.orig/scripts/decodetree.py
22+++ qemu-8.0.0/scripts/decodetree.py
23@@ -1328,7 +1328,7 @@ def main():
24 toppat = ExcMultiPattern(0)
25
26 for filename in args:
27- input_file = filename
28+ input_file = os.path.relpath(filename)
29 f = open(filename, 'rt', encoding='utf-8')
30 parse_file(f, toppat)
31 f.close()
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
new file mode 100644
index 00000000..a84364cc
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -0,0 +1,41 @@
1From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 14 Jan 2021 06:33:04 +0000
4Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files
5
6Fix error like:
7Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long
8
9when build path is too long, use meson.source_root() will make this
10filename too long. Fixed by using relative path to refer to files
11
12Upstream-Status: Submitted [send to qemu-devel]
13
14Signed-off-by: Changqing Li <changqing.li@windriver.com>
15
16---
17 tests/unit/meson.build | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20Index: qemu-8.0.0/tests/unit/meson.build
21===================================================================
22--- qemu-8.0.0.orig/tests/unit/meson.build
23+++ qemu-8.0.0/tests/unit/meson.build
24@@ -46,7 +46,7 @@ tests = {
25 'test-keyval': [testqapi],
26 'test-logging': [],
27 'test-uuid': [],
28- 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'],
29+ 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
30 'test-qapi-util': [],
31 'test-interval-tree': [],
32 'test-xs-node': [qom],
33@@ -136,7 +136,7 @@ if have_system
34 'test-util-sockets': ['socket-helpers.c'],
35 'test-base64': [],
36 'test-bufferiszero': [],
37- 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'],
38+ 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'],
39 'test-vmstate': [migration, io],
40 'test-yank': ['socket-helpers.c', qom, io, chardev]
41 }
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
new file mode 100644
index 00000000..4de6cc24
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -0,0 +1,46 @@
1From ebf4bb2f51da83af0c61480414cfa156f7308b34 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 21 Mar 2022 10:09:38 -0700
4Subject: [PATCH 09/12] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
5 systems
6
7linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures
8which include asm-generic/mman.h and mips/powerpc are not including this
9file in linux/mman.h, therefore these should be defined for such
10architectures on Linux as well. This fixes build on mips/musl/linux
11
12Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05298.html]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Cc: Zhang Yi <yi.z.zhang@linux.intel.com>
15Cc: Michael S. Tsirkin <mst@redhat.com>
16
17---
18 util/mmap-alloc.c | 10 +++++++---
19 1 file changed, 7 insertions(+), 3 deletions(-)
20
21Index: qemu-8.0.0/util/mmap-alloc.c
22===================================================================
23--- qemu-8.0.0.orig/util/mmap-alloc.c
24+++ qemu-8.0.0/util/mmap-alloc.c
25@@ -10,14 +10,18 @@
26 * later. See the COPYING file in the top-level directory.
27 */
28
29+#include "qemu/osdep.h"
30 #ifdef CONFIG_LINUX
31 #include <linux/mman.h>
32-#else /* !CONFIG_LINUX */
33+#endif /* CONFIG_LINUX */
34+
35+#ifndef MAP_SYNC
36 #define MAP_SYNC 0x0
37+#endif /* MAP_SYNC */
38+#ifndef MAP_SHARED_VALIDATE
39 #define MAP_SHARED_VALIDATE 0x0
40-#endif /* CONFIG_LINUX */
41+#endif /* MAP_SHARED_VALIDATE */
42
43-#include "qemu/osdep.h"
44 #include "qemu/mmap-alloc.h"
45 #include "qemu/host-utils.h"
46 #include "qemu/cutils.h"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
new file mode 100644
index 00000000..6caf35b6
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
@@ -0,0 +1,40 @@
1CVE: CVE-2022-1050
2Upstream-Status: Submitted [https://lore.kernel.org/qemu-devel/20220403095234.2210-1-yuval.shaia.ml@gmail.com/]
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From dbdef95c272e8f3ec037c3db4197c66002e30995 Mon Sep 17 00:00:00 2001
6From: Yuval Shaia <yuval.shaia.ml@gmail.com>
7Date: Sun, 3 Apr 2022 12:52:34 +0300
8Subject: [PATCH] hw/pvrdma: Protect against buggy or malicious guest driver
9
10Guest driver might execute HW commands when shared buffers are not yet
11allocated.
12This could happen on purpose (malicious guest) or because of some other
13guest/host address mapping error.
14We need to protect againts such case.
15
16Fixes: CVE-2022-1050
17
18Reported-by: Raven <wxhusst@gmail.com>
19Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com>
20---
21 hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++
22 1 file changed, 6 insertions(+)
23
24Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
25===================================================================
26--- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c
27+++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
28@@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
29 goto out;
30 }
31
32+ if (!dsr_info->dsr) {
33+ /* Buggy or malicious guest driver */
34+ rdma_error_report("Exec command without dsr, req or rsp buffers");
35+ goto out;
36+ }
37+
38 if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) /
39 sizeof(struct cmd_handler)) {
40 rdma_error_report("Unsupported command");
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
new file mode 100644
index 00000000..112eb925
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
@@ -0,0 +1,38 @@
1From 76c3fc4c87231bed32974ebbbdb5079cff45a6b7 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Tue, 5 Jan 2021 23:00:14 +0000
4Subject: [PATCH 12/12] qemu: Upgrade 5.1.0->5.2.0
5
6We need to be able to trigger configure's cross code but we don't want
7to set cross_prefix as it does other things we don't want. Patch things
8so we can do what we need in the target config case.
9
10Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?]
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12
13---
14 configure | 4 ----
15 1 file changed, 4 deletions(-)
16
17Index: qemu-8.0.0/configure
18===================================================================
19--- qemu-8.0.0.orig/configure
20+++ qemu-8.0.0/configure
21@@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then
22 echo "widl = [$(meson_quote $widl)]" >> $cross
23 echo "windres = [$(meson_quote $windres)]" >> $cross
24 echo "windmc = [$(meson_quote $windmc)]" >> $cross
25- if test "$cross_compile" = "yes"; then
26 cross_arg="--cross-file config-meson.cross"
27 echo "[host_machine]" >> $cross
28 echo "system = '$targetos'" >> $cross
29@@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then
30 else
31 echo "endian = 'little'" >> $cross
32 fi
33- else
34- cross_arg="--native-file config-meson.cross"
35- fi
36 mv $cross config-meson.cross
37
38 rm -rf meson-private meson-info meson-logs
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
new file mode 100644
index 00000000..0cbaea07
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Inappropriate [workaround, would need a real fix for upstream]
2
3Index: qemu-8.1.0/configure
4===================================================================
5--- qemu-8.1.0.orig/configure
6+++ qemu-8.1.0/configure
7@@ -1032,12 +1032,7 @@ then
8 exit 1
9 fi
10
11-# At this point, we expect Meson to be installed and available.
12-# We expect mkvenv or pip to have created pyvenv/bin/meson for us.
13-# We ignore PATH completely here: we want to use the venv's Meson
14-# *exclusively*.
15-
16-meson="$(cd pyvenv/bin; pwd)/meson"
17+meson=`which meson`
18
19 # Conditionally ensure Sphinx is installed.
20
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
new file mode 100644
index 00000000..01546d10
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
@@ -0,0 +1,18 @@
1Patch to fix mips boot hangs where virtio appears broken. Patch under discussion upstream.
2Regression is introduced by other fixes to 8.1.0 to get x86 boots working.
3
4Upstream-Status: Pending [https://lore.kernel.org/qemu-devel/6c956b90-5a13-db96-9c02-9834a512fe6f@linaro.org/]
5
6Index: qemu-8.1.0/softmmu/physmem.c
7===================================================================
8--- qemu-8.1.0.orig/softmmu/physmem.c
9+++ qemu-8.1.0/softmmu/physmem.c
10@@ -2517,7 +2517,7 @@ static void tcg_commit(MemoryListener *l
11 * That said, the listener is also called during realize, before
12 * all of the tcg machinery for run-on is initialized: thus halt_cond.
13 */
14- if (cpu->halt_cond) {
15+ if (cpu->halt_cond && !qemu_cpu_is_self(cpu)) {
16 async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas));
17 } else {
18 tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas));
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
new file mode 100644
index 00000000..09e13e8b
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
@@ -0,0 +1,45 @@
1qemu: Ensure pip and the python venv aren't used for meson
2
3Qemu wants to use a supported python version and a specific meson version
4to "help" users and uses pip and creates a venv to do this. This is a nightmare
5for us. Our versions stay up to date and should be supported so we don't
6really need/want this wrapping. Tweak things to disable it.
7
8There was breakage from the wrapper shown by:
9
10bitbake qemu-system-native
11<add DISTRO_FEATURES:remove = "opengl" to local.conf>
12bitbake qemu-system-native -c configure
13
14which would crash. The issue is the change in configuration removes pieces
15from the sysroot but pyc files remainm as do pieces of pip which causes
16problems.
17
18Ideally we'd convince upstream to allow some way to disable the venv on
19the understanding that if/when it breaks, we keep the pieces. The patch
20as it stands is a workaround.
21
22Upstream-Status: Inappropriate [oe specific]
23Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
24
25Index: qemu-8.1.2/configure
26===================================================================
27--- qemu-8.1.2.orig/configure
28+++ qemu-8.1.2/configure
29@@ -1009,7 +1009,7 @@ python="$(command -v "$python")"
30 echo "python determined to be '$python'"
31 echo "python version: $($python --version)"
32
33-python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
34+python=python3
35 if test "$?" -ne 0 ; then
36 error_exit "python venv creation failed"
37 fi
38@@ -1017,6 +1017,7 @@ fi
39 # Suppress writing compiled files
40 python="$python -B"
41 mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
42+mkvenv=true
43
44 mkvenv_flags=""
45 if test "$download" = "enabled" ; then
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
new file mode 100644
index 00000000..c4044296
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
Binary files differ
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
new file mode 100644
index 00000000..5ebaadde
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
@@ -0,0 +1,75 @@
1# SPDX-License-Identifier: GPL-2.0-only
2# Initially written by: Michael Tokarev <mjt@tls.msk.ru>
3# For QEMU Debian downstream package
4
5set -e
6
7. /etc/init.d/functions
8
9PATH=/sbin:/usr/sbin:/bin:/usr/bin
10DESC="QEMU Guest Agent"
11NAME=qemu-ga
12DAEMON=@bindir@/$NAME
13PIDFILE=/var/run/$NAME.pid
14
15# config
16DAEMON_ARGS=""
17# default transport
18TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0
19NO_START=0
20
21test ! -r /etc/default/qemu-guest-agent || . /etc/default/qemu-guest-agent
22test "$NO_START" = "0" || exit 0
23test -x "$DAEMON" || exit 0
24
25#
26# Function that checks whenever system has necessary environment
27# It also splits $TRANSPORT into $method and $path
28#
29do_check_transport() {
30 method=${TRANSPORT%%:*};
31 path=${TRANSPORT#*:}
32 case "$method" in
33 virtio-serial | isa-serial)
34 if [ ! -e "$path" ]; then
35 echo "$NAME: transport endpoint not found, not starting"
36 return 1
37 fi
38 ;;
39 esac
40}
41
42case "$1" in
43 start)
44 do_check_transport || exit 0
45 echo -n "Starting $DESC: "
46 start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
47 $DAEMON_ARGS -d -m "$method" -p "$path"
48 echo "$NAME."
49 ;;
50 stop)
51 echo -n "Stopping $DESC: "
52 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
53 echo "$NAME."
54 ;;
55 status)
56 status "$DAEMON"
57 exit $?
58 ;;
59 restart|force-reload)
60 do_check_transport || exit 0
61 echo -n "Restarting $DESC: "
62 start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
63 sleep 1
64 start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
65 $DAEMON_ARGS -d -m "$method" -p "$path"
66 echo "$NAME."
67 ;;
68 *)
69 N=/etc/init.d/$NAME
70 echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
71 exit 1
72 ;;
73esac
74
75exit 0
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
new file mode 100644
index 00000000..47097057
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
@@ -0,0 +1,2 @@
1SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
2 TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
new file mode 100644
index 00000000..f9a4e8fb
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
@@ -0,0 +1,13 @@
1#!/bin/sh
2#
3#This script is used to run qemu test suites
4#
5
6ptestdir=$(dirname "$(readlink -f "$0")")
7export SRC_PATH=$ptestdir
8
9cd $ptestdir/tests
10tests=$(find . -name "test-*" ! -name "*.p")
11for f in $tests; do
12 $f | sed '/^ok/ s/ok/PASS:/g'
13done
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
new file mode 100644
index 00000000..c4fc180e
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
@@ -0,0 +1,6 @@
1
2require qemu-devicetrees.inc
3
4BRANCH ?= "master"
5SRCREV ?= "c54a1cfb7076aaf8abdfe50e89245b37cdb1c077"
6
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
new file mode 100644
index 00000000..22fa9685
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
@@ -0,0 +1,7 @@
1require qemu-8.1.inc
2
3inherit native
4
5EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
6
7LDFLAGS:append = " -fuse-ld=bfd"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
new file mode 100644
index 00000000..24f9a039
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
@@ -0,0 +1,28 @@
1# possible arch values are:
2# aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze
3# mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb
4# riscv32 riscv64 sparc sparc32 sparc32plus
5
6def get_qemu_target_list(d):
7 import bb
8 archs = d.getVar('QEMU_TARGETS').split()
9 tos = d.getVar('HOST_OS')
10 softmmuonly = ""
11 for arch in ['ppcemb', 'lm32']:
12 if arch in archs:
13 softmmuonly += arch + "-softmmu,"
14 archs.remove(arch)
15 linuxuseronly = ""
16 for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']:
17 if arch in archs:
18 linuxuseronly += arch + "-linux-user,"
19 archs.remove(arch)
20 if 'linux' not in tos:
21 return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
22 return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
23
24def get_qemu_usermode_target_list(d):
25 return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(',')))
26
27def get_qemu_system_target_list(d):
28 return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(',')))
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
new file mode 100644
index 00000000..ffaf3cdf
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
@@ -0,0 +1,3 @@
1XILINX_QEMU_VERSION = "v8.1.0"
2BRANCH = "master"
3SRCREV = "aa05b83770c0cd5a4f7fcbcef7efc806ae2abe9f"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
new file mode 100644
index 00000000..ad2af244
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
@@ -0,0 +1,79 @@
1SUMMARY = "Xilinx's fork of a fast open source processor emulator"
2HOMEPAGE = "https://github.com/xilinx/qemu/"
3
4# This qemu fork is NOT compatible with running on a 32-bit system
5# See: https://github.com/Xilinx/qemu/issues/35
6COMPATIBLE_HOST:arm = "null"
7
8# x86_64 is needed to build nativesdks
9QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64"
10
11LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
12 file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
13
14FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-8.1.0:"
15
16PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
17REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https"
18
19BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
20SRC_URI = "${REPO};${BRANCHARG};name=qemu"
21SRCREV_qemu = "${SRCREV}"
22SRCREV_FORMAT = "qemu"
23
24FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
25
26# Deal with the broken --disable-download
27SRCREV_berkeley-softfloat-3 = "b64af41c3276f97f0e181920400ee056b9c88037"
28SRCREV_berkeley-testfloat-3 = "40619cbb3bf32872df8c53cc457039229428a263"
29SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81"
30SRCREV_keycodemapdb = "f5772a62ec52591ff6870b7e8ef32482371f22c6"
31SRCREV_libvfio-user = "0b28d205572c80b568a1003db2c8f37ca333e4d7"
32SRCREV_slirp = "26be815b86e8d49add8c9a8b320239b9594ff03d"
33SRC_URI += "\
34 git://gitlab.com/qemu-project/berkeley-softfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-softfloat-3;name=berkeley-softfloat-3 \
35 git://gitlab.com/qemu-project/berkeley-testfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-testfloat-3;name=berkeley-testfloat-3 \
36 git://gitlab.com/qemu-project/dtc.git;protocol=https;nobranch=1;destsuffix=git/subprojects/dtc;name=dtc \
37 git://gitlab.com/qemu-project/keycodemapdb.git;protocol=https;nobranch=1;destsuffix=git/subprojects/keycodemapdb;name=keycodemapdb \
38 git://gitlab.com/qemu-project/libvfio-user.git;protocol=https;nobranch=1;destsuffix=git/subprojects/libvfio-user;name=libvfio-user \
39 git://gitlab.freedesktop.org/slirp/libslirp;protocol=https;nobranch=1;destsuffix=git/subprojects/slirp;name=slirp \
40"
41
42# Configure meson for disable-download
43do_configure:prepend() {
44 cp ${S}/subprojects/packagefiles/berkeley-softfloat-3/* ${S}/subprojects/berkeley-softfloat-3/.
45 cp ${S}/subprojects/packagefiles/berkeley-testfloat-3/* ${S}/subprojects/berkeley-testfloat-3/.
46}
47
48
49# Keep this in sync with the main YP QEMU integration
50SRC_URI += "\
51 file://powerpc_rom.bin \
52 file://run-ptest \
53 file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
54 file://0003-apic-fixup-fallthrough-to-PIC.patch \
55 file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
56 file://0005-qemu-Do-not-include-file-if-not-exists.patch \
57 file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
58 file://0007-qemu-Determinism-fixes.patch \
59 file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
60 file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
61 file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
62 file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
63 file://fixedmeson.patch \
64 file://no-pip.patch \
65 file://qemu-guest-agent.init \
66 file://qemu-guest-agent.udev \
67 "
68
69# Patch doesn't apply to 8.1.0
70# file://fixmips.patch
71
72S = "${WORKDIR}/git"
73
74# Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc
75DISABLE_STATIC:pn-qemu-xilinx = ""
76DISABLE_STATIC:pn-qemu-xilinx-native = ""
77DISABLE_STATIC:pn-nativesdk-qemu-xilinx = ""
78DISABLE_STATIC:pn-qemu-xilinx-system-native = ""
79
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
new file mode 100644
index 00000000..ad00453f
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
@@ -0,0 +1,2 @@
1require qemu-native-8.1.inc
2require qemu-xilinx-8.1.inc
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
new file mode 100644
index 00000000..5ffdeb98
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
@@ -0,0 +1,11 @@
1BPN = "qemu-xilinx"
2
3DEPENDS += "glib-2.0-native zlib-native"
4
5require qemu-xilinx-2024.1.inc
6require qemu-xilinx-native-8.1.inc
7require qemu-native-alt.inc
8
9EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
10
11PACKAGECONFIG ??= "pie"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
new file mode 100644
index 00000000..7e985088
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
@@ -0,0 +1,35 @@
1BPN = "qemu-xilinx"
2
3require qemu-system-native-alt.inc
4require qemu-xilinx-2024.1.inc
5require qemu-xilinx-native-8.1.inc
6
7# As some of the files installed by qemu-native and qemu-system-native
8# are the same, we depend on qemu-native to get the full installation set
9# and avoid file clashes
10DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
11
12DEPENDS += "qemu-xilinx-multiarch-helper-native"
13
14EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
15
16PACKAGECONFIG ??= "fdt alsa kvm pie slirp png gcrypt \
17 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
18"
19
20# Handle distros such as CentOS 5 32-bit that do not have kvm support
21PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}"
22
23do_install:append() {
24 install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu-xilinx
25
26 # The following is also installed by qemu-native
27 rm -f ${D}${datadir}/qemu-xilinx/trace-events-all
28 rm -rf ${D}${datadir}/qemu-xilinx/keymaps
29 rm -rf ${D}${datadir}/icons/
30 rm -rf ${D}${includedir}/qemu-plugin.h
31
32 # Install qmp.py to be used with testimage
33 install -d ${D}${libdir}/qemu-python/qmp/
34 install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
35}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
new file mode 100644
index 00000000..cff60bd6
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
@@ -0,0 +1,38 @@
1BBCLASSEXTEND = "nativesdk"
2
3require qemu-xilinx-2024.1.inc
4require qemu-8.1.inc
5require qemu-xilinx-8.1.inc
6require qemu-alt.inc
7
8# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
9DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
10MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH"
11MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}"
12PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
13PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
14
15
16DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
17
18DEPENDS:append:libc-musl = " libucontext"
19
20CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
21
22RDEPENDS:${PN}-common:class-target += "bash"
23
24EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
25EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
26EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
27
28PACKAGECONFIG ??= " \
29 fdt sdl kvm pie slirp gcrypt \
30 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
33"
34PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp gcrypt \
35 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
36"
37# ppc32 hosts are no longer supported in qemu
38COMPATIBLE_HOST:powerpc = "null"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
new file mode 100644
index 00000000..4722e1f5
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
@@ -0,0 +1,29 @@
1BBCLASSEXTEND = "nativesdk"
2
3FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
4
5require qemu-8.1.inc
6
7DEPENDS += "glib-2.0 zlib pixman"
8
9DEPENDS:append:libc-musl = " libucontext"
10
11CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
12
13RDEPENDS:${PN}-common:class-target += "bash"
14
15EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
16EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}"
17EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}"
18
19PACKAGECONFIG ??= " \
20 fdt sdl kvm pie slirp \
21 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
22 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
23 ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
24"
25PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \
26 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \
27"
28# ppc32 hosts are no longer supported in qemu
29COMPATIBLE_HOST:powerpc = "null"
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0001-PATCH-libdrm-Update-drm-header-file-with-XV15-and-XV.patch b/meta-xilinx-core/recipes-graphics/drm/files/0001-PATCH-libdrm-Update-drm-header-file-with-XV15-and-XV.patch
new file mode 100644
index 00000000..5f7df974
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0001-PATCH-libdrm-Update-drm-header-file-with-XV15-and-XV.patch
@@ -0,0 +1,37 @@
1From 7edb14622061e87bb4810fb648017b43e767d4c6 Mon Sep 17 00:00:00 2001
2From: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
3Date: Mon, 1 Nov 2021 12:59:36 -0700
4Subject: [PATCH 1/5] [PATCH] libdrm: Update drm header file with XV15 and XV20
5
6This patch updates drm header file with YUV 420 and
7YUV422 10 bit formats.
8
9Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com>
10Upstream-Status: Pending
11Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
12---
13 include/drm/drm_fourcc.h | 8 ++++++++
14 1 file changed, 8 insertions(+)
15
16diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
17index ed0258c..c5cdaed 100644
18--- a/include/drm/drm_fourcc.h
19+++ b/include/drm/drm_fourcc.h
20@@ -318,6 +318,14 @@ extern "C" {
21 #define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
22
23 /*
24+ * 2 plane 10 bit per component YCbCr
25+ * index 0 = Y plane, [31:0] x:Y2:Y1:Y0 2:10:10:10 little endian
26+ * index 1 = Cb:Cr plane, [63:0] x:Cb2:Cr2:Cb1:x:Cr1:Cb0:Cr0 2:10:10:10:2:10:10:10 little endian
27+ */
28+#define DRM_FORMAT_XV15 fourcc_code('X', 'V', '1', '5') /* 2x2 subsampled Cb:Cr plane 2:10:10:10 */
29+#define DRM_FORMAT_XV20 fourcc_code('X', 'V', '2', '0') /* 2x1 subsampled Cb:Cr plane 2:10:10:10 */
30+
31+/*
32 * 3 plane YCbCr
33 * index 0: Y plane, [7:0] Y
34 * index 1: Cb plane, [7:0] Cb
35--
362.7.4
37
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0001-headers-Sync-with-HDR-from-v5.15.patch b/meta-xilinx-core/recipes-graphics/drm/files/0001-headers-Sync-with-HDR-from-v5.15.patch
new file mode 100644
index 00000000..77a457ce
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0001-headers-Sync-with-HDR-from-v5.15.patch
@@ -0,0 +1,207 @@
1From d159e3f782d33988e52db462948e2e0eab2b9a03 Mon Sep 17 00:00:00 2001
2From: Rohit Visavalia <rohit.visavalia@xilinx.com>
3Date: Thu, 17 Mar 2022 08:21:41 -0700
4Subject: [PATCH] headers: Sync with HDR from v5.15
5
6Sync drm_mode.h with linux-xlnx/include/uapi/drm/drm_mode.h for HDR
7
8Upstream-Status: Pending
9
10Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com>
11---
12 include/drm/drm_mode.h | 129 +++++++++++++++++++++++++++++++++++++++--
13 1 file changed, 125 insertions(+), 4 deletions(-)
14
15diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
16index 9b6722d..bbce882 100644
17--- a/include/drm/drm_mode.h
18+++ b/include/drm/drm_mode.h
19@@ -312,16 +312,48 @@ struct drm_mode_set_plane {
20 __u32 src_w;
21 };
22
23+/**
24+ * struct drm_mode_get_plane - Get plane metadata.
25+ *
26+ * Userspace can perform a GETPLANE ioctl to retrieve information about a
27+ * plane.
28+ *
29+ * To retrieve the number of formats supported, set @count_format_types to zero
30+ * and call the ioctl. @count_format_types will be updated with the value.
31+ *
32+ * To retrieve these formats, allocate an array with the memory needed to store
33+ * @count_format_types formats. Point @format_type_ptr to this array and call
34+ * the ioctl again (with @count_format_types still set to the value returned in
35+ * the first ioctl call).
36+ */
37 struct drm_mode_get_plane {
38+ /**
39+ * @plane_id: Object ID of the plane whose information should be
40+ * retrieved. Set by caller.
41+ */
42 __u32 plane_id;
43
44+ /** @crtc_id: Object ID of the current CRTC. */
45 __u32 crtc_id;
46+ /** @fb_id: Object ID of the current fb. */
47 __u32 fb_id;
48
49+ /**
50+ * @possible_crtcs: Bitmask of CRTC's compatible with the plane. CRTC's
51+ * are created and they receive an index, which corresponds to their
52+ * position in the bitmask. Bit N corresponds to
53+ * :ref:`CRTC index<crtc_index>` N.
54+ */
55 __u32 possible_crtcs;
56+ /** @gamma_size: Never used. */
57 __u32 gamma_size;
58
59+ /** @count_format_types: Number of formats. */
60 __u32 count_format_types;
61+ /**
62+ * @format_type_ptr: Pointer to ``__u32`` array of formats that are
63+ * supported by the plane. These formats do not require modifiers.
64+ */
65 __u64 format_type_ptr;
66 };
67
68@@ -509,22 +541,74 @@ struct drm_mode_get_connector {
69 */
70 #define DRM_MODE_PROP_ATOMIC 0x80000000
71
72+/**
73+ * struct drm_mode_property_enum - Description for an enum/bitfield entry.
74+ * @value: numeric value for this enum entry.
75+ * @name: symbolic name for this enum entry.
76+ *
77+ * See struct drm_property_enum for details.
78+ */
79 struct drm_mode_property_enum {
80 __u64 value;
81 char name[DRM_PROP_NAME_LEN];
82 };
83
84+/**
85+ * struct drm_mode_get_property - Get property metadata.
86+ *
87+ * User-space can perform a GETPROPERTY ioctl to retrieve information about a
88+ * property. The same property may be attached to multiple objects, see
89+ * "Modeset Base Object Abstraction".
90+ *
91+ * The meaning of the @values_ptr field changes depending on the property type.
92+ * See &drm_property.flags for more details.
93+ *
94+ * The @enum_blob_ptr and @count_enum_blobs fields are only meaningful when the
95+ * property has the type &DRM_MODE_PROP_ENUM or &DRM_MODE_PROP_BITMASK. For
96+ * backwards compatibility, the kernel will always set @count_enum_blobs to
97+ * zero when the property has the type &DRM_MODE_PROP_BLOB. User-space must
98+ * ignore these two fields if the property has a different type.
99+ *
100+ * User-space is expected to retrieve values and enums by performing this ioctl
101+ * at least twice: the first time to retrieve the number of elements, the
102+ * second time to retrieve the elements themselves.
103+ *
104+ * To retrieve the number of elements, set @count_values and @count_enum_blobs
105+ * to zero, then call the ioctl. @count_values will be updated with the number
106+ * of elements. If the property has the type &DRM_MODE_PROP_ENUM or
107+ * &DRM_MODE_PROP_BITMASK, @count_enum_blobs will be updated as well.
108+ *
109+ * To retrieve the elements themselves, allocate an array for @values_ptr and
110+ * set @count_values to its capacity. If the property has the type
111+ * &DRM_MODE_PROP_ENUM or &DRM_MODE_PROP_BITMASK, allocate an array for
112+ * @enum_blob_ptr and set @count_enum_blobs to its capacity. Calling the ioctl
113+ * again will fill the arrays.
114+ */
115 struct drm_mode_get_property {
116- __u64 values_ptr; /* values and blob lengths */
117- __u64 enum_blob_ptr; /* enum and blob id ptrs */
118+ /** @values_ptr: Pointer to a ``__u64`` array. */
119+ __u64 values_ptr;
120+ /** @enum_blob_ptr: Pointer to a struct drm_mode_property_enum array. */
121+ __u64 enum_blob_ptr;
122
123+ /**
124+ * @prop_id: Object ID of the property which should be retrieved. Set
125+ * by the caller.
126+ */
127 __u32 prop_id;
128+ /**
129+ * @flags: ``DRM_MODE_PROP_*`` bitfield. See &drm_property.flags for
130+ * a definition of the flags.
131+ */
132 __u32 flags;
133+ /**
134+ * @name: Symbolic property name. User-space should use this field to
135+ * recognize properties.
136+ */
137 char name[DRM_PROP_NAME_LEN];
138
139+ /** @count_values: Number of elements in @values_ptr. */
140 __u32 count_values;
141- /* This is only used to count enum values, not blobs. The _blobs is
142- * simply because of a historical reason, i.e. backwards compat. */
143+ /** @count_enum_blobs: Number of elements in @enum_blob_ptr. */
144 __u32 count_enum_blobs;
145 };
146
147@@ -578,6 +662,8 @@ struct drm_mode_fb_cmd {
148
149 #define DRM_MODE_FB_INTERLACED (1<<0) /* for interlaced framebuffers */
150 #define DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] */
151+#define DRM_MODE_FB_ALTERNATE_TOP (1<<2) /* for alternate top field */
152+#define DRM_MODE_FB_ALTERNATE_BOTTOM (1<<3) /* for alternate bottom field */
153
154 struct drm_mode_fb_cmd2 {
155 __u32 fb_id;
156@@ -733,6 +819,20 @@ struct drm_color_lut {
157 __u16 reserved;
158 };
159
160+enum drm_hdr_type {
161+ /*
162+ * This is for the gen_hdr_output_metadata structure.
163+ * MSB differentiates static (0) or dynamic (1) metadata.
164+ * Other 15 bits represent specific HDR standards.
165+ */
166+
167+ /* static HDR */
168+ DRM_HDR_TYPE_HDR10 = 0x0000,
169+
170+ /* dynamic HDR */
171+ DRM_HDR_TYPE_HDR10P = 1 << 15 | DRM_HDR_TYPE_HDR10,
172+};
173+
174 /**
175 * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
176 *
177@@ -819,6 +919,27 @@ struct hdr_output_metadata {
178 };
179 };
180
181+/**
182+ * struct gen_hdr_output_metadata - Generic HDR output metadata
183+ *
184+ * Generic HDR Metadata Information to be passed from userspace
185+ */
186+struct gen_hdr_output_metadata {
187+ /**
188+ * @metadata_type: HDR type.
189+ */
190+ __u16 metadata_type;
191+ /**
192+ * @size: size of payload/metadata.
193+ */
194+ __u16 size;
195+ /**
196+ * @payload: Actual metadata - HDR Metadata Infoframe.
197+ * Currently the largest extended HDR infoframe is 4000 bytes.
198+ */
199+ __u8 payload[4000];
200+};
201+
202 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
203 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
204 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
205--
2062.17.1
207
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0001-modetest-Add-YUV444-and-X403-format-support-for-mode.patch b/meta-xilinx-core/recipes-graphics/drm/files/0001-modetest-Add-YUV444-and-X403-format-support-for-mode.patch
new file mode 100644
index 00000000..c517221a
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0001-modetest-Add-YUV444-and-X403-format-support-for-mode.patch
@@ -0,0 +1,433 @@
1From de3fffbf7af9d28b5f9d9e118de448a54e2628dd Mon Sep 17 00:00:00 2001
2From: Anil Kumar Mamidala <anil.mamidala@xilinx.com>
3Date: Wed, 27 Oct 2021 16:04:47 +0530
4Subject: [PATCH] modetest: Add YUV444 and X403 format support for modetest
5
6Add YUV44 8-bit and X403 10-bit formats support to modetest
7for generating color bar pattern.
8
9Upstream-Status: Pending
10
11Signed-off-by: Anil Kumar Mamidala <anil.mamidala@xilinx.com>
12---
13 include/drm/drm_fourcc.h | 7 +
14 tests/modetest/buffers.c | 32 +++++
15 tests/util/format.c | 4 +
16 tests/util/pattern.c | 270 +++++++++++++++++++++++++++++++++++++++
17 4 files changed, 313 insertions(+)
18
19Index: libdrm-2.4.118/include/drm/drm_fourcc.h
20===================================================================
21--- libdrm-2.4.118.orig/include/drm/drm_fourcc.h
22+++ libdrm-2.4.118/include/drm/drm_fourcc.h
23@@ -405,6 +405,13 @@ extern "C" {
24 #define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') /* non-subsampled Cb (1) and Cr (2) planes */
25 #define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') /* non-subsampled Cr (1) and Cb (2) planes */
26
27+/* 3 plane non-subsampled (444) YCbCr
28+ * 10 bits per component
29+ * index 0: Y plane, [31:0] x:Y2:Y1:Y0 [2:10:10:10] little endian
30+ * index 1: Cb plane, [31:0] x:Cb2:Cb1:Cb0 [2:10:10:10] little endian
31+ * index 2: Cr plane, [31:0] x:Cr2:Cr1:Cr0 [2:10:10:10] little endian
32+ */
33+#define DRM_FORMAT_X403 fourcc_code('X', '4', '0', '3') /* non-subsampled Cb:Cr plane, 10 bit per channel */
34
35 /*
36 * Format Modifiers:
37Index: libdrm-2.4.118/tests/modetest/buffers.c
38===================================================================
39--- libdrm-2.4.118.orig/tests/modetest/buffers.c
40+++ libdrm-2.4.118/tests/modetest/buffers.c
41@@ -145,6 +145,7 @@ bo_create(int fd, unsigned int format,
42 case DRM_FORMAT_NV42:
43 case DRM_FORMAT_YUV420:
44 case DRM_FORMAT_YVU420:
45+ case DRM_FORMAT_YUV444:
46 bpp = 8;
47 break;
48
49@@ -156,6 +157,7 @@ bo_create(int fd, unsigned int format,
50
51 case DRM_FORMAT_XV15:
52 case DRM_FORMAT_XV20:
53+ case DRM_FORMAT_X403:
54 bpp = 10;
55 break;
56
57@@ -242,6 +244,11 @@ bo_create(int fd, unsigned int format,
58 virtual_height = height * 2;
59 break;
60
61+ case DRM_FORMAT_X403:
62+ virtual_width = (width * 32) / 30;
63+ virtual_height = height * 3;
64+ break;
65+
66 case DRM_FORMAT_NV16:
67 case DRM_FORMAT_NV61:
68 case DRM_FORMAT_NV20:
69@@ -249,6 +256,11 @@ bo_create(int fd, unsigned int format,
70 virtual_height = height * 2;
71 break;
72
73+ case DRM_FORMAT_YUV444:
74+ virtual_width = width;
75+ virtual_height = height * 3;
76+ break;
77+
78 case DRM_FORMAT_NV24:
79 case DRM_FORMAT_NV42:
80 case DRM_FORMAT_NV30:
81@@ -322,6 +334,24 @@ bo_create(int fd, unsigned int format,
82 planes[1] = virtual + offsets[1];
83 break;
84
85+ case DRM_FORMAT_X403:
86+ case DRM_FORMAT_YUV444:
87+ offsets[0] = 0;
88+ handles[0] = bo->handle;
89+ pitches[0] = bo->pitch;
90+ pitches[1] = pitches[0];
91+ offsets[1] = pitches[0] * height;
92+ handles[1] = bo->handle;
93+ pitches[2] = pitches[1];
94+ offsets[2] = offsets[1] + pitches[1] * height;
95+ handles[2] = bo->handle;
96+
97+
98+ planes[0] = virtual;
99+ planes[1] = virtual + offsets[1];
100+ planes[2] = virtual + offsets[2];
101+ break;
102+
103 case DRM_FORMAT_YUV420:
104 case DRM_FORMAT_YVU420:
105 offsets[0] = 0;
106Index: libdrm-2.4.118/tests/util/format.c
107===================================================================
108--- libdrm-2.4.118.orig/tests/util/format.c
109+++ libdrm-2.4.118/tests/util/format.c
110@@ -64,6 +64,10 @@ static const struct util_format_info for
111 /* YUV planar */
112 { DRM_FORMAT_YUV420, "YU12", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 1) },
113 { DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) },
114+ { DRM_FORMAT_YUV444, "YU24", MAKE_YUV_INFO(YUV_YCbCr, 1, 1, 1) },
115+ { DRM_FORMAT_YVU444, "YV24", MAKE_YUV_INFO(YUV_YCrCb, 1, 1, 1) },
116+ { DRM_FORMAT_X403, "X403", MAKE_YUV_INFO(YUV_YCbCr, 1, 1, 1) },
117+
118 /* RGB16 */
119 { DRM_FORMAT_ARGB4444, "AR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 4, 12) },
120 { DRM_FORMAT_XRGB4444, "XR12", MAKE_RGB_INFO(4, 8, 4, 4, 4, 0, 0, 0) },
121Index: libdrm-2.4.118/tests/util/pattern.c
122===================================================================
123--- libdrm-2.4.118.orig/tests/util/pattern.c
124+++ libdrm-2.4.118/tests/util/pattern.c
125@@ -596,6 +596,175 @@ static void fill_smpte_yuv_semiplanar_10
126 }
127 }
128
129+static void fill_smpte_yuv_planar_x403(
130+ const struct util_yuv_info *yuv,
131+ unsigned char *y_mem, unsigned char *u_mem,
132+ unsigned char *v_mem,
133+ unsigned int width,
134+ unsigned int height, unsigned int stride)
135+{
136+ const struct color_yuv colors_top[] = {
137+ MAKE_YUV_601(191, 192, 192), /* grey */
138+ MAKE_YUV_601(192, 192, 0), /* yellow */
139+ MAKE_YUV_601(0, 192, 192), /* cyan */
140+ MAKE_YUV_601(0, 192, 0), /* green */
141+ MAKE_YUV_601(192, 0, 192), /* magenta */
142+ MAKE_YUV_601(192, 0, 0), /* red */
143+ MAKE_YUV_601(0, 0, 192), /* blue */
144+ };
145+ const struct color_yuv colors_middle[] = {
146+ MAKE_YUV_601(0, 0, 192), /* blue */
147+ MAKE_YUV_601(19, 19, 19), /* black */
148+ MAKE_YUV_601(192, 0, 192), /* magenta */
149+ MAKE_YUV_601(19, 19, 19), /* black */
150+ MAKE_YUV_601(0, 192, 192), /* cyan */
151+ MAKE_YUV_601(19, 19, 19), /* black */
152+ MAKE_YUV_601(192, 192, 192), /* grey */
153+ };
154+ const struct color_yuv colors_bottom[] = {
155+ MAKE_YUV_601(0, 33, 76), /* in-phase */
156+ MAKE_YUV_601(255, 255, 255), /* super white */
157+ MAKE_YUV_601(50, 0, 106), /* quadrature */
158+ MAKE_YUV_601(19, 19, 19), /* black */
159+ MAKE_YUV_601(9, 9, 9), /* 3.5% */
160+ MAKE_YUV_601(19, 19, 19), /* 7.5% */
161+ MAKE_YUV_601(29, 29, 29), /* 11.5% */
162+ MAKE_YUV_601(19, 19, 19), /* black */
163+ };
164+ unsigned int cs = yuv->chroma_stride;
165+ unsigned int xsub = yuv->xsub;
166+ unsigned int ysub = yuv->ysub;
167+ unsigned int x;
168+ unsigned int y;
169+ unsigned int cval = 0;
170+
171+ for (y = 0; y < height * 6 / 9; ++y) {
172+ for (x = 0; x < width; x += 3)
173+ ((unsigned int *)y_mem)[x/3] =
174+ colors_top[x * 7 / width].y << 2 |
175+ colors_top[(x+1) * 7 / width].y << 12 |
176+ colors_top[(x+2) * 7 / width].y << 22;
177+ y_mem += stride;
178+ }
179+
180+ for (; y < height * 7 / 9; ++y) {
181+ for (x = 0; x < width; x += 3)
182+ ((unsigned int *)y_mem)[x/3] =
183+ colors_middle[x * 7 / width].y << 2 |
184+ colors_middle[(x+1) * 7 / width].y << 12 |
185+ colors_middle[(x+2) * 7 / width].y << 22;
186+ y_mem += stride;
187+ }
188+
189+ for (; y < height; ++y) {
190+ for (x = 0; x < width * 5 / 7; x += 3)
191+ ((unsigned int *)y_mem)[x/3] =
192+ colors_bottom[x * 4 / (width * 5 / 7)].y << 2 |
193+ colors_bottom[(x + 1) * 4 / (width * 5 / 7)]
194+ .y << 12 | colors_bottom[(x + 2) * 4 /
195+ (width * 5 / 7)].y << 22;
196+
197+ for (; x < width * 6 / 7; x += 3)
198+ ((unsigned int *)y_mem)[x/3] =
199+ colors_bottom[(x - width * 5 / 7) * 3 /
200+ (width / 7) + 4].y << 2 |
201+ colors_bottom[((x + 1) - width * 5 / 7) * 3 /
202+ (width / 7) + 4].y << 12 |
203+ colors_bottom[((x + 2) - width * 5 / 7) * 3 /
204+ (width / 7) + 4].y << 22;
205+
206+ for (; x < width; x += 3)
207+ ((unsigned int *)y_mem)[x/3] = colors_bottom[7].y << 2 |
208+ colors_bottom[7].y << 12 |
209+ colors_bottom[7].y << 22;
210+ y_mem += stride;
211+ }
212+
213+ /* Chroma */
214+ unsigned int *cb_mem = (unsigned int *)u_mem;
215+ unsigned int *cr_mem = (unsigned int *)v_mem;
216+
217+ for (y = 0; y < height / ysub * 6 / 9; ++y) {
218+ for (x = 0; x < width; x += 3) {
219+ cval = (colors_top[x * 7 / width].u << 2) |
220+ (colors_top[(x + 1) * 7 / width].u << 12) |
221+ (colors_top[(x + 2) * 7 / width].u << 22);
222+ cb_mem[x/3] = cval;
223+ cval = (colors_top[(x) * 7 / width].v << 2) |
224+ (colors_top[(x + 1) * 7 / width].v << 12) |
225+ (colors_top[(x + 2) * 7 / width].v << 22);
226+ cr_mem[x/3] = cval;
227+ }
228+ cb_mem += stride/4;
229+ cr_mem += stride/4;
230+ }
231+
232+ for (; y < height / ysub * 7 / 9; ++y) {
233+ for (x = 0; x < width; x += 3) {
234+ cval = (colors_middle[x * 7 / width].u << 2) |
235+ (colors_middle[(x + 1) * 7 / width].u << 12) |
236+ (colors_middle[(x + 2) * 7 / width].u << 22);
237+ cb_mem[x/3] = cval;
238+ cval = (colors_middle[x * 7 / width].v << 2) |
239+ (colors_middle[(x + 1) * 7 / width].v << 12) |
240+ (colors_middle[(x + 2) * 7 / width].v << 22);
241+ cr_mem[x/3] = cval;
242+ }
243+ cb_mem += stride/4;
244+ cr_mem += stride/4;
245+ }
246+
247+ for (; y < height / ysub; ++y) {
248+ for (x = 0; x < width * 5 / 7; x += 3) {
249+ cval = colors_bottom[x * 4 /
250+ (width * 5 / 7)].u << 2 |
251+ colors_bottom[(x + 2) * 4 /
252+ (width * 5 / 7)].u << 12 |
253+ colors_bottom[(x + 4) * 4 /
254+ (width * 5 / 7)]. u << 22;
255+ cb_mem[x/3] = cval;
256+
257+ cval = colors_bottom[(x) * 4 /
258+ (width * 5 / 7)].v << 2 |
259+ colors_bottom[(x + 2) * 4 /
260+ (width * 5 / 7)].v << 12 |
261+ colors_bottom[(x + 4) * 4 /
262+ (width * 5 / 7)].v << 22;
263+
264+ cr_mem[x/3] = cval;
265+ }
266+ for (; x < width * 6 / 7; x += 3) {
267+ cval = colors_bottom[(x - width * 5 / 7) * 3 /
268+ (width / 7) + 4].u << 2 |
269+ colors_bottom[((x + 2)- width * 5 / 7) * 3 /
270+ (width / 7) + 4].u << 12 |
271+ colors_bottom[((x + 4) - width * 5 / 7) * 3 /
272+ (width / 7) + 4].u << 22;
273+ cb_mem[x/3] = cval;
274+
275+ cval = colors_bottom[((x) - width * 5 / 7) * 3 /
276+ (width / 7) + 4].v << 2 |
277+ colors_bottom[((x + 2) - width * 5 / 7) * 3 /
278+ (width / 7) + 4].v << 12 |
279+ colors_bottom[((x + 4) - width * 5 / 7) * 3 /
280+ (width / 7) + 4].v << 22;
281+ cr_mem[x/3] = cval;
282+ }
283+ for (; x < width; x += 3) {
284+ cval = colors_bottom[7].u << 2 |
285+ colors_bottom[7].u << 12 |
286+ colors_bottom[7].u << 22;
287+ cb_mem[x/3] = cval;
288+ cval = colors_bottom[7].v << 2 |
289+ colors_bottom[7].v << 12 |
290+ colors_bottom[7].v << 22;
291+ cr_mem[x/3] = cval;
292+ }
293+ cb_mem += stride/4;
294+ cr_mem += stride/4;
295+ }
296+}
297+
298 static void fill_smpte_yuv_planar_10b(
299 const struct util_yuv_info *yuv,
300 unsigned char *y_mem, unsigned char *u_mem,
301@@ -856,6 +1025,88 @@ static void fill_tiles_xv20(
302 }
303 }
304
305+static void fill_tiles_x403(
306+ const struct util_format_info *info,
307+ unsigned char *y_mem, unsigned char *u_mem,
308+ unsigned char *v_mem, uint32_t width,
309+ uint32_t height, uint32_t stride)
310+{
311+ const struct util_yuv_info *yuv = &info->yuv;
312+ unsigned int cs = yuv->chroma_stride;
313+ unsigned int x;
314+ unsigned int y;
315+ uint32_t shifter = 0, LumVal = 0;
316+ uint32_t lumIndex = 0;
317+ uint32_t *Lum;
318+ uint32_t *uChrom;
319+ uint32_t *vChrom;
320+ uint32_t ChromVal = 0;
321+ uint32_t uchromIndex = 0;
322+ uint32_t vchromIndex = 0;
323+
324+ /* preparing 10 bit Luma */
325+ Lum = (uint32_t *)y_mem;
326+ for (y = 0; y < height; ++y) {
327+ for (x = 0; x < width; x++) {
328+ div_t d = div(x+y, width);
329+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
330+ + 0x000a1120 * (d.rem >> 6);
331+ struct color_yuv color =
332+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
333+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
334+ //Checking if we got 3 components to pack in 4 bytes
335+ if (shifter == 30) {
336+ Lum[lumIndex] = LumVal;
337+ lumIndex++; shifter = 0; LumVal = 0;
338+ }
339+ LumVal = (LumVal | ((color.y << 2) << shifter));
340+ shifter += 10; //10 bit precision
341+ }
342+ lumIndex = 0; shifter = 0; LumVal = 0;
343+ y_mem += stride;
344+ Lum = (uint32_t *)y_mem;
345+ }
346+
347+ /* Preparing 10 bit Chroma */
348+ uChrom = (uint32_t *)u_mem;
349+ vChrom = (uint32_t *)v_mem;
350+
351+ for (y = 0; y < height; ++y) {
352+ for (x = 0; x < width; x = x + 3) {
353+ div_t d = div(x+y, width);
354+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
355+ + 0x000a1120 * (d.rem >> 6);
356+ struct color_yuv color =
357+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
358+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
359+ uint32_t rgb32_2 = 0x00130502 * (d.quot >> 6)
360+ + 0x000a1120 * (d.rem >> 6);
361+ struct color_yuv color_2 =
362+ MAKE_YUV_601((rgb32_2 >> 16) & 0xff,
363+ (rgb32_2 >> 8) & 0xff, rgb32_2 & 0xff);
364+ uint32_t rgb32_3 = 0x00130502 * (d.quot >> 6)
365+ + 0x000a1120 * (d.rem >> 6);
366+ struct color_yuv color_3 =
367+ MAKE_YUV_601((rgb32_3 >> 16) & 0xff,
368+ (rgb32_3 >> 8) & 0xff, rgb32_3 & 0xff);
369+
370+ ChromVal = ((color.u << 2) << 20)
371+ | ((color_2.u << 2) << 10) | (color_3.u << 2);
372+ uChrom[uchromIndex++] = ChromVal;
373+
374+ ChromVal = ((color.v << 2) << 20)
375+ | ((color_2.v << 2) << 10) | (color_3.v << 2);
376+ vChrom[vchromIndex++] = ChromVal;
377+ }
378+ uchromIndex = 0; vchromIndex = 0; ChromVal = 0;
379+ u_mem += stride;
380+ v_mem += stride;
381+ uChrom = (uint32_t *)u_mem;
382+ vChrom = (uint32_t *)v_mem;
383+ }
384+}
385+
386+
387 static void fill_smpte_yuv_packed(const struct util_yuv_info *yuv, void *mem,
388 unsigned int width, unsigned int height,
389 unsigned int stride)
390@@ -1660,10 +1911,19 @@ static void fill_smpte(const struct util
391 planes[1], width, height,
392 stride);
393
394+ case DRM_FORMAT_X403:
395+ return fill_smpte_yuv_planar_x403(&info->yuv, planes[0], planes[1],
396+ planes[2], width, height, stride);
397+
398+
399 case DRM_FORMAT_YUV420:
400 return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1],
401 planes[2], width, height, stride);
402
403+ case DRM_FORMAT_YUV444:
404+ return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[1],
405+ planes[2], width, height, stride);
406+
407 case DRM_FORMAT_YVU420:
408 return fill_smpte_yuv_planar(&info->yuv, planes[0], planes[2],
409 planes[1], width, height, stride);
410@@ -2082,6 +2342,11 @@ static void fill_tiles(const struct util
411 return fill_tiles_yuv_planar(info, planes[0], planes[1],
412 planes[2], width, height, stride);
413
414+ case DRM_FORMAT_YUV444:
415+ return fill_tiles_yuv_planar(info, planes[0], planes[1],
416+ planes[2], width, height, stride);
417+
418+
419 case DRM_FORMAT_YVU420:
420 return fill_tiles_yuv_planar(info, planes[0], planes[2],
421 planes[1], width, height, stride);
422@@ -2090,6 +2355,11 @@ static void fill_tiles(const struct util
423 return fill_tiles_xv20(info, planes[0], planes[1],
424 planes[1], width, height, stride);
425
426+ case DRM_FORMAT_X403:
427+ return fill_tiles_x403(info, planes[0], planes[1],
428+ planes[2], width, height, stride);
429+
430+
431 case DRM_FORMAT_XV15:
432 return fill_tiles_xv15(info, planes[0], planes[1],
433 planes[2], width, height, stride);
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0002-modetest-call-drmModeCrtcSetGamma-only-if-add_proper.patch b/meta-xilinx-core/recipes-graphics/drm/files/0002-modetest-call-drmModeCrtcSetGamma-only-if-add_proper.patch
new file mode 100644
index 00000000..9d2eff7d
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0002-modetest-call-drmModeCrtcSetGamma-only-if-add_proper.patch
@@ -0,0 +1,32 @@
1From ab7aa7563e3b044f84f123f0ed59b370ff0af3f5 Mon Sep 17 00:00:00 2001
2From: Rohit Visavalia <rohit.visavalia@xilinx.com>
3Date: Mon, 24 Feb 2020 03:35:58 -0800
4Subject: [PATCH 2/5] modetest: call drmModeCrtcSetGamma() only if
5 add_property_optional returns true
6
7gamma is a optional property then also it prints error message, so
8set gamma only if add_property_optional() returns true.
9
10Upstream-Status: Pending
11
12Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com>
13---
14 tests/modetest/modetest.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
18index 2c83bd0..3e73505 100644
19--- a/tests/modetest/modetest.c
20+++ b/tests/modetest/modetest.c
21@@ -1142,7 +1142,7 @@ static void set_gamma(struct device *dev, unsigned crtc_id, unsigned fourcc)
22
23 add_property_optional(dev, crtc_id, "DEGAMMA_LUT", 0);
24 add_property_optional(dev, crtc_id, "CTM", 0);
25- if (!add_property_optional(dev, crtc_id, "GAMMA_LUT", blob_id)) {
26+ if (add_property_optional(dev, crtc_id, "GAMMA_LUT", blob_id)) {
27 uint16_t r[256], g[256], b[256];
28
29 for (i = 0; i < 256; i++) {
30--
312.7.4
32
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0003-modetest-Add-semiplanar-10bit-pattern-support-for-mo.patch b/meta-xilinx-core/recipes-graphics/drm/files/0003-modetest-Add-semiplanar-10bit-pattern-support-for-mo.patch
new file mode 100644
index 00000000..6fd5faab
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0003-modetest-Add-semiplanar-10bit-pattern-support-for-mo.patch
@@ -0,0 +1,602 @@
1From adc82a4820253ed3f42bf3af9003aa33636e6f89 Mon Sep 17 00:00:00 2001
2From: Anil Kumar M <amamidal@xilinx.com>
3Date: Fri, 10 Apr 2020 21:35:47 +0530
4Subject: [PATCH 3/5] modetest: Add semiplanar 10bit pattern support for
5 modetest
6
7Add XV15 and XV20 10 bit semiplanar formats support for
8generating color bar pattern while running modetest command.
9
10Upstream-Status: Pending
11
12Signed-off-by: Anil Kumar M <amamidal@xilinx.com>
13---
14 tests/modetest/buffers.c | 24 ++-
15 tests/util/format.c | 3 +
16 tests/util/pattern.c | 455 ++++++++++++++++++++++++++++++++++++++++++++++-
17 3 files changed, 473 insertions(+), 9 deletions(-)
18
19Index: libdrm-2.4.118/tests/modetest/buffers.c
20===================================================================
21--- libdrm-2.4.118.orig/tests/modetest/buffers.c
22+++ libdrm-2.4.118/tests/modetest/buffers.c
23@@ -116,7 +116,7 @@ bo_create(int fd, unsigned int format,
24 unsigned int handles[4], unsigned int pitches[4],
25 unsigned int offsets[4], enum util_fill_pattern pattern)
26 {
27- unsigned int virtual_height;
28+ unsigned int virtual_height, virtual_width;
29 struct bo *bo;
30 unsigned int bpp;
31 void *planes[3] = { 0, };
32@@ -154,6 +154,11 @@ bo_create(int fd, unsigned int format,
33 bpp = 10;
34 break;
35
36+ case DRM_FORMAT_XV15:
37+ case DRM_FORMAT_XV20:
38+ bpp = 10;
39+ break;
40+
41 case DRM_FORMAT_ARGB4444:
42 case DRM_FORMAT_XRGB4444:
43 case DRM_FORMAT_ABGR4444:
44@@ -223,27 +228,41 @@ bo_create(int fd, unsigned int format,
45 case DRM_FORMAT_NV15:
46 case DRM_FORMAT_YUV420:
47 case DRM_FORMAT_YVU420:
48+ virtual_width = width;
49 virtual_height = height * 3 / 2;
50 break;
51
52+ case DRM_FORMAT_XV15:
53+ virtual_width = (width * 32) / 30;
54+ virtual_height = height * 3 / 2;
55+ break;
56+
57+ case DRM_FORMAT_XV20:
58+ virtual_width = (width * 32) / 30;
59+ virtual_height = height * 2;
60+ break;
61+
62 case DRM_FORMAT_NV16:
63 case DRM_FORMAT_NV61:
64 case DRM_FORMAT_NV20:
65+ virtual_width = width;
66 virtual_height = height * 2;
67 break;
68
69 case DRM_FORMAT_NV24:
70 case DRM_FORMAT_NV42:
71 case DRM_FORMAT_NV30:
72+ virtual_width = width;
73 virtual_height = height * 3;
74 break;
75
76 default:
77+ virtual_width = width;
78 virtual_height = height;
79 break;
80 }
81
82- bo = bo_create_dumb(fd, width, virtual_height, bpp);
83+ bo = bo_create_dumb(fd, virtual_width, virtual_height, bpp);
84 if (!bo)
85 return NULL;
86
87@@ -276,6 +295,8 @@ bo_create(int fd, unsigned int format,
88 case DRM_FORMAT_NV61:
89 case DRM_FORMAT_NV15:
90 case DRM_FORMAT_NV20:
91+ case DRM_FORMAT_XV15:
92+ case DRM_FORMAT_XV20:
93 offsets[0] = 0;
94 handles[0] = bo->handle;
95 pitches[0] = bo->pitch;
96Index: libdrm-2.4.118/tests/util/pattern.c
97===================================================================
98--- libdrm-2.4.118.orig/tests/util/pattern.c
99+++ libdrm-2.4.118/tests/util/pattern.c
100@@ -430,6 +430,432 @@ static void fill_smpte_yuv_planar_10bpp(
101 }
102 }
103
104+static void fill_smpte_yuv_semiplanar_10b(
105+ const struct util_yuv_info *yuv,
106+ unsigned char *y_mem, unsigned char *uv_mem,
107+ unsigned int width,
108+ unsigned int height, unsigned int stride)
109+{
110+ const struct color_yuv colors_top[] = {
111+ MAKE_YUV_601(191, 192, 192), /* grey */
112+ MAKE_YUV_601(192, 192, 0), /* yellow */
113+ MAKE_YUV_601(0, 192, 192), /* cyan */
114+ MAKE_YUV_601(0, 192, 0), /* green */
115+ MAKE_YUV_601(192, 0, 192), /* magenta */
116+ MAKE_YUV_601(192, 0, 0), /* red */
117+ MAKE_YUV_601(0, 0, 192), /* blue */
118+ };
119+ const struct color_yuv colors_middle[] = {
120+ MAKE_YUV_601(0, 0, 192), /* blue */
121+ MAKE_YUV_601(19, 19, 19), /* black */
122+ MAKE_YUV_601(192, 0, 192), /* magenta */
123+ MAKE_YUV_601(19, 19, 19), /* black */
124+ MAKE_YUV_601(0, 192, 192), /* cyan */
125+ MAKE_YUV_601(19, 19, 19), /* black */
126+ MAKE_YUV_601(192, 192, 192), /* grey */
127+ };
128+ const struct color_yuv colors_bottom[] = {
129+ MAKE_YUV_601(0, 33, 76), /* in-phase */
130+ MAKE_YUV_601(255, 255, 255), /* super white */
131+ MAKE_YUV_601(50, 0, 106), /* quadrature */
132+ MAKE_YUV_601(19, 19, 19), /* black */
133+ MAKE_YUV_601(9, 9, 9), /* 3.5% */
134+ MAKE_YUV_601(19, 19, 19), /* 7.5% */
135+ MAKE_YUV_601(29, 29, 29), /* 11.5% */
136+ MAKE_YUV_601(19, 19, 19), /* black */
137+ };
138+ unsigned int cs = yuv->chroma_stride;
139+ unsigned int xsub = yuv->xsub;
140+ unsigned int ysub = yuv->ysub;
141+ unsigned int x;
142+ unsigned int y;
143+ unsigned int cval = 0;
144+
145+ for (y = 0; y < height * 6 / 9; ++y) {
146+ for (x = 0; x < width; x += 3)
147+ ((unsigned int *)y_mem)[x/3] =
148+ colors_top[x * 7 / width].y << 2 |
149+ colors_top[(x+1) * 7 / width].y << 12 |
150+ colors_top[(x+2) * 7 / width].y << 22;
151+ y_mem += stride;
152+ }
153+
154+ for (; y < height * 7 / 9; ++y) {
155+ for (x = 0; x < width; x += 3)
156+ ((unsigned int *)y_mem)[x/3] =
157+ colors_middle[x * 7 / width].y << 2 |
158+ colors_middle[(x+1) * 7 / width].y << 12 |
159+ colors_middle[(x+2) * 7 / width].y << 22;
160+ y_mem += stride;
161+ }
162+
163+ for (; y < height; ++y) {
164+ for (x = 0; x < width * 5 / 7; x += 3)
165+ ((unsigned int *)y_mem)[x/3] =
166+ colors_bottom[x * 4 / (width * 5 / 7)].y << 2 |
167+ colors_bottom[(x + 1) * 4 / (width * 5 / 7)]
168+ .y << 12 | colors_bottom[(x + 2) * 4 /
169+ (width * 5 / 7)].y << 22;
170+
171+ for (; x < width * 6 / 7; x += 3)
172+ ((unsigned int *)y_mem)[x/3] =
173+ colors_bottom[(x - width * 5 / 7) * 3 /
174+ (width / 7) + 4].y << 2 |
175+ colors_bottom[((x + 1) - width * 5 / 7) * 3 /
176+ (width / 7) + 4].y << 12 |
177+ colors_bottom[((x + 2) - width * 5 / 7) * 3 /
178+ (width / 7) + 4].y << 22;
179+
180+ for (; x < width; x += 3)
181+ ((unsigned int *)y_mem)[x/3] = colors_bottom[7].y << 2 |
182+ colors_bottom[7].y << 12 |
183+ colors_bottom[7].y << 22;
184+ y_mem += stride;
185+ }
186+
187+ /* Chroma */
188+ unsigned int *c_mem = (unsigned int *)uv_mem;
189+
190+ for (y = 0; y < height / ysub * 6 / 9; ++y) {
191+ for (x = 0; x < width; x += 6) {
192+ cval = (colors_top[x * 7 / width].u << 2) |
193+ (colors_top[x * 7 / width].v << 12) |
194+ (colors_top[(x + 2) * 7 / width].u << 22);
195+ c_mem[x/3] = cval;
196+ cval = (colors_top[(x + 2) * 7 / width].v << 2) |
197+ (colors_top[(x + 4) * 7 / width].u << 12) |
198+ (colors_top[(x + 4) * 7 / width].v << 22);
199+ c_mem[x/3 + 1] = cval;
200+ }
201+ c_mem += (stride/4) * cs / xsub;
202+ }
203+
204+ for (; y < height / ysub * 7 / 9; ++y) {
205+ for (x = 0; x < width; x += 6) {
206+ cval = (colors_middle[x * 7 / width].u << 2) |
207+ (colors_middle[x * 7 / width].v << 12) |
208+ (colors_middle[(x + 2) * 7 / width].u << 22);
209+ c_mem[x/3] = cval;
210+ cval = (colors_middle[(x + 2) * 7 / width].v << 2) |
211+ (colors_middle[(x + 4) * 7 / width].u << 12) |
212+ (colors_middle[(x + 4) * 7 / width].v << 22);
213+ c_mem[x/3 + 1] = cval;
214+ }
215+ c_mem += (stride/4) * cs / xsub;
216+ }
217+
218+ for (; y < height / ysub; ++y) {
219+ for (x = 0; x < width * 5 / 7; x += 6) {
220+ cval = colors_bottom[x * 4 /
221+ (width * 5 / 7)].u << 2 |
222+ colors_bottom[x * 4 /
223+ (width * 5 / 7)].v << 12 |
224+ colors_bottom[(x + 2) * 4 /
225+ (width * 5 / 7)]. u << 22;
226+
227+ c_mem[x/3] = cval;
228+
229+ cval = colors_bottom[(x + 2) * 4 /
230+ (width * 5 / 7)].v << 2 |
231+ colors_bottom[(x + 4) * 4 /
232+ (width * 5 / 7)].u << 12 |
233+ colors_bottom[(x + 4) * 4 /
234+ (width * 5 / 7)].v << 22;
235+
236+ c_mem[x/3 + 1] = cval;
237+ }
238+ for (; x < width * 6 / 7; x += 6) {
239+ cval = colors_bottom[(x - width * 5 / 7) * 3 /
240+ (width / 7) + 4].u << 2 |
241+ colors_bottom[(x - width * 5 / 7) * 3 /
242+ (width / 7) + 4].v << 12 |
243+ colors_bottom[((x + 2) - width * 5 / 7) * 3 /
244+ (width / 7) + 4].u << 22;
245+
246+ c_mem[x/3] = cval;
247+
248+ cval = colors_bottom[((x + 2) - width * 5 / 7) * 3 /
249+ (width / 7) + 4].v << 2 |
250+ colors_bottom[((x + 4) - width * 5 / 7) * 3 /
251+ (width / 7) + 4].u << 12 |
252+ colors_bottom[((x + 4) - width * 5 / 7) * 3 /
253+ (width / 7) + 4].v << 22;
254+ c_mem[x/3 + 1] = cval;
255+ }
256+ for (; x < width; x += 6) {
257+ cval = colors_bottom[7].u << 2 |
258+ colors_bottom[7].v << 12 |
259+ colors_bottom[7].u << 22;
260+ c_mem[x/3] = cval;
261+ cval = colors_bottom[7].v << 2 |
262+ colors_bottom[7].u << 12 |
263+ colors_bottom[7].v << 22;
264+ c_mem[x/3 + 1] = cval;
265+ }
266+ c_mem += (stride/4) * cs / xsub;
267+ }
268+}
269+
270+static void fill_smpte_yuv_planar_10b(
271+ const struct util_yuv_info *yuv,
272+ unsigned char *y_mem, unsigned char *u_mem,
273+ unsigned char *v_mem, unsigned int width,
274+ unsigned int height, unsigned int stride)
275+{
276+ const struct color_yuv colors_top[] = {
277+ MAKE_YUV_601(191, 192, 192), /* grey */
278+ MAKE_YUV_601(192, 192, 0), /* yellow */
279+ MAKE_YUV_601(0, 192, 192), /* cyan */
280+ MAKE_YUV_601(0, 192, 0), /* green */
281+ MAKE_YUV_601(192, 0, 192), /* magenta */
282+ MAKE_YUV_601(192, 0, 0), /* red */
283+ MAKE_YUV_601(0, 0, 192), /* blue */
284+ };
285+ const struct color_yuv colors_middle[] = {
286+ MAKE_YUV_601(0, 0, 192), /* blue */
287+ MAKE_YUV_601(19, 19, 19), /* black */
288+ MAKE_YUV_601(192, 0, 192), /* magenta */
289+ MAKE_YUV_601(19, 19, 19), /* black */
290+ MAKE_YUV_601(0, 192, 192), /* cyan */
291+ MAKE_YUV_601(19, 19, 19), /* black */
292+ MAKE_YUV_601(192, 192, 192), /* grey */
293+ };
294+ const struct color_yuv colors_bottom[] = {
295+ MAKE_YUV_601(0, 33, 76), /* in-phase */
296+ MAKE_YUV_601(255, 255, 255), /* super white */
297+ MAKE_YUV_601(50, 0, 106), /* quadrature */
298+ MAKE_YUV_601(19, 19, 19), /* black */
299+ MAKE_YUV_601(9, 9, 9), /* 3.5% */
300+ MAKE_YUV_601(19, 19, 19), /* 7.5% */
301+ MAKE_YUV_601(29, 29, 29), /* 11.5% */
302+ MAKE_YUV_601(19, 19, 19), /* black */
303+ };
304+ unsigned int cs = yuv->chroma_stride;
305+ unsigned int xsub = yuv->xsub;
306+ unsigned int ysub = yuv->ysub;
307+ unsigned int x;
308+ unsigned int y;
309+
310+ /* Luma */
311+ for (y = 0; y < height * 6 / 9; ++y) {
312+ for (x = 0; x < width; ++x)
313+ y_mem[x] = colors_top[x * 7 / width].y;
314+ y_mem += stride;
315+ }
316+
317+ for (; y < height * 7 / 9; ++y) {
318+ for (x = 0; x < width; ++x)
319+ y_mem[x] = colors_middle[x * 7 / width].y;
320+ y_mem += stride;
321+ }
322+
323+ for (; y < height; ++y) {
324+ for (x = 0; x < width * 5 / 7; ++x)
325+ y_mem[x] = colors_bottom[x * 4 / (width * 5 / 7)].y;
326+ for (; x < width * 6 / 7; ++x)
327+ y_mem[x] = colors_bottom[(x - width * 5 / 7) * 3 /
328+ (width / 7) + 4].y;
329+ for (; x < width; ++x)
330+ y_mem[x] = colors_bottom[7].y;
331+ y_mem += stride;
332+ }
333+
334+ /* Chroma */
335+ for (y = 0; y < height / ysub * 6 / 9; ++y) {
336+ for (x = 0; x < width; x += xsub) {
337+ u_mem[x*cs/xsub] = colors_top[x * 7 / width].u;
338+ v_mem[x*cs/xsub] = colors_top[x * 7 / width].v;
339+ }
340+ u_mem += stride * cs / xsub;
341+ v_mem += stride * cs / xsub;
342+ }
343+
344+ for (; y < height / ysub * 7 / 9; ++y) {
345+ for (x = 0; x < width; x += xsub) {
346+ u_mem[x*cs/xsub] = colors_middle[x * 7 / width].u;
347+ v_mem[x*cs/xsub] = colors_middle[x * 7 / width].v;
348+ }
349+ u_mem += stride * cs / xsub;
350+ v_mem += stride * cs / xsub;
351+ }
352+
353+ for (; y < height / ysub; ++y) {
354+ for (x = 0; x < width * 5 / 7; x += xsub) {
355+ u_mem[x*cs/xsub] =
356+ colors_bottom[x * 4 / (width * 5 / 7)].u;
357+ v_mem[x*cs/xsub] =
358+ colors_bottom[x * 4 / (width * 5 / 7)].v;
359+ }
360+ for (; x < width * 6 / 7; x += xsub) {
361+ u_mem[x*cs/xsub] =
362+ colors_bottom[(x - width * 5 / 7) * 3 / (width / 7) + 4].u;
363+ v_mem[x*cs/xsub] =
364+ colors_bottom[(x - width * 5 / 7) * 3 / (width / 7) + 4].v;
365+ }
366+ for (; x < width; x += xsub) {
367+ u_mem[x*cs/xsub] = colors_bottom[7].u;
368+ v_mem[x*cs/xsub] = colors_bottom[7].v;
369+ }
370+ u_mem += stride * cs / xsub;
371+ v_mem += stride * cs / xsub;
372+ }
373+}
374+
375+static void fill_tiles_xv15(
376+ const struct util_format_info *info,
377+ unsigned char *y_mem, unsigned char *u_mem,
378+ unsigned char *v_mem, uint32_t width,
379+ uint32_t height, uint32_t stride)
380+{
381+ const struct util_yuv_info *yuv = &info->yuv;
382+ unsigned int cs = yuv->chroma_stride;
383+ unsigned int x;
384+ unsigned int y;
385+ uint32_t shifter = 0, LumVal = 0;
386+ uint32_t lumIndex = 0;
387+ uint32_t *Lum;
388+ uint32_t *Chrom;
389+ uint32_t ChromVal = 0;
390+ uint32_t chromIndex = 0;
391+
392+ /* preparing 10 bit Luma */
393+ Lum = (uint32_t *)y_mem;
394+ for (y = 0; y < height; ++y) {
395+ for (x = 0; x < width; x++) {
396+ div_t d = div(x+y, width);
397+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
398+ + 0x000a1120 * (d.rem >> 6);
399+ struct color_yuv color =
400+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
401+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
402+ //Checking if we got 3 components to pack in 4 bytes
403+ if (shifter == 30) {
404+ Lum[lumIndex] = LumVal;
405+ lumIndex++; shifter = 0; LumVal = 0;
406+ }
407+ LumVal = (LumVal | ((color.y << 2) << shifter));
408+ shifter += 10; //10 bit precision
409+ }
410+ lumIndex = 0; shifter = 0; LumVal = 0;
411+ y_mem += stride;
412+ Lum = (uint32_t *)y_mem;
413+ }
414+
415+ /* Preparing 10 bit Chroma */
416+ Chrom = (uint32_t *)u_mem;
417+ for (y = 0; y < height / 2; ++y) {
418+ for (x = 0; x < width; x = x + 6) {
419+ div_t d = div(x+(2 * y), width);
420+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
421+ + 0x000a1120 * (d.rem >> 6);
422+ struct color_yuv color =
423+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
424+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
425+ div_t d2 = div(x + 2 + (2*y), width);
426+ uint32_t rgb32_2 = 0x00130502 * (d2.quot >> 6)
427+ + 0x000a1120 * (d2.rem >> 6);
428+ struct color_yuv color_2 =
429+ MAKE_YUV_601((rgb32_2 >> 16) & 0xff,
430+ (rgb32_2 >> 8) & 0xff, rgb32_2 & 0xff);
431+
432+ div_t d3 = div(x + 4 + (2*y), width);
433+ uint32_t rgb32_3 = 0x00130502 * (d3.quot >> 6)
434+ + 0x000a1120 * (d3.rem >> 6);
435+ struct color_yuv color_3 =
436+ MAKE_YUV_601((rgb32_3 >> 16) & 0xff,
437+ (rgb32_3 >> 8) & 0xff, rgb32_3 & 0xff);
438+
439+ ChromVal = ((color_2.u << 2) << 20)
440+ | ((color.v << 2) << 10) | (color.u << 2);
441+ Chrom[chromIndex++] = ChromVal;
442+
443+ ChromVal = ((color_3.v << 2) << 20)
444+ | ((color_3.u << 2) << 10) | (color_2.v << 2);
445+ Chrom[chromIndex++] = ChromVal;
446+ }
447+ chromIndex = 0; ChromVal = 0;
448+ u_mem += stride;
449+ Chrom = (uint32_t *)u_mem;
450+ }
451+}
452+
453+static void fill_tiles_xv20(
454+ const struct util_format_info *info,
455+ unsigned char *y_mem, unsigned char *u_mem,
456+ unsigned char *v_mem, uint32_t width,
457+ uint32_t height, uint32_t stride)
458+{
459+ const struct util_yuv_info *yuv = &info->yuv;
460+ unsigned int cs = yuv->chroma_stride;
461+ unsigned int x;
462+ unsigned int y;
463+ uint32_t shifter = 0, LumVal = 0;
464+ uint32_t lumIndex = 0;
465+ uint32_t *Lum;
466+ uint32_t *Chrom;
467+ uint32_t ChromVal = 0;
468+ uint32_t chromIndex = 0;
469+
470+ /* preparing 10 bit Luma */
471+ Lum = (uint32_t *)y_mem;
472+ for (y = 0; y < height; ++y) {
473+ for (x = 0; x < width; x++) {
474+ div_t d = div(x+y, width);
475+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
476+ + 0x000a1120 * (d.rem >> 6);
477+ struct color_yuv color =
478+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
479+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
480+ //Checking if we got 3 components to pack in 4 bytes
481+ if (shifter == 30) {
482+ Lum[lumIndex] = LumVal;
483+ lumIndex++; shifter = 0; LumVal = 0;
484+ }
485+ LumVal = (LumVal | ((color.y << 2) << shifter));
486+ shifter += 10; //10 bit precision
487+ }
488+ lumIndex = 0; shifter = 0; LumVal = 0;
489+ y_mem += stride;
490+ Lum = (uint32_t *)y_mem;
491+ }
492+
493+ /* Preparing 10 bit Chroma */
494+ Chrom = (uint32_t *)u_mem;
495+ for (y = 0; y < height; ++y) {
496+ for (x = 0; x < width; x = x + 6) {
497+ div_t d = div(x+y, width);
498+ uint32_t rgb32 = 0x00130502 * (d.quot >> 6)
499+ + 0x000a1120 * (d.rem >> 6);
500+ struct color_yuv color =
501+ MAKE_YUV_601((rgb32 >> 16) & 0xff,
502+ (rgb32 >> 8) & 0xff, rgb32 & 0xff);
503+ div_t d2 = div(x + 2 + y, width);
504+ uint32_t rgb32_2 = 0x00130502 * (d2.quot >> 6)
505+ + 0x000a1120 * (d2.rem >> 6);
506+ struct color_yuv color_2 =
507+ MAKE_YUV_601((rgb32_2 >> 16) & 0xff,
508+ (rgb32_2 >> 8) & 0xff, rgb32_2 & 0xff);
509+ div_t d3 = div(x + 4 + y, width);
510+ uint32_t rgb32_3 = 0x00130502 * (d3.quot >> 6)
511+ + 0x000a1120 * (d3.rem >> 6);
512+ struct color_yuv color_3 =
513+ MAKE_YUV_601((rgb32_3 >> 16) & 0xff,
514+ (rgb32_3 >> 8) & 0xff, rgb32_3 & 0xff);
515+
516+ ChromVal = ((color_2.u << 2) << 20)
517+ | ((color.v << 2) << 10) | (color.u << 2);
518+ Chrom[chromIndex++] = ChromVal;
519+
520+ ChromVal = ((color_3.v << 2) << 20)
521+ | ((color_3.u << 2) << 10) | (color_2.v << 2);
522+ Chrom[chromIndex++] = ChromVal;
523+ }
524+ chromIndex = 0; ChromVal = 0;
525+ u_mem += stride;
526+ Chrom = (uint32_t *)u_mem;
527+ }
528+}
529+
530 static void fill_smpte_yuv_packed(const struct util_yuv_info *yuv, void *mem,
531 unsigned int width, unsigned int height,
532 unsigned int stride)
533@@ -1188,9 +1614,10 @@ void util_smpte_fill_lut(unsigned int nc
534 memcpy(lut, smpte_color_lut, sizeof(smpte_color_lut));
535 }
536
537-static void fill_smpte(const struct util_format_info *info, void *planes[3],
538- unsigned int width, unsigned int height,
539- unsigned int stride)
540+static void fill_smpte(const struct util_format_info *info,
541+ void *planes[3],
542+ unsigned int width, unsigned int height,
543+ unsigned int stride)
544 {
545 unsigned char *u, *v;
546
547@@ -1209,7 +1636,12 @@ static void fill_smpte(const struct util
548 case DRM_FORMAT_YVYU:
549 return fill_smpte_yuv_packed(&info->yuv, planes[0], width,
550 height, stride);
551-
552+ case DRM_FORMAT_XV20:
553+ return fill_tiles_xv20(info, planes[0], planes[1], planes[1],
554+ width, height, stride);
555+ case DRM_FORMAT_XV15:
556+ return fill_tiles_xv15(info, planes[0], planes[1], planes[2],
557+ width, height, stride);
558 case DRM_FORMAT_NV12:
559 case DRM_FORMAT_NV21:
560 case DRM_FORMAT_NV16:
561@@ -1614,9 +2046,10 @@ static void fill_tiles_rgb16fp(const str
562 }
563 }
564
565-static void fill_tiles(const struct util_format_info *info, void *planes[3],
566- unsigned int width, unsigned int height,
567- unsigned int stride)
568+static void fill_tiles(const struct util_format_info *info,
569+ void *planes[3],
570+ unsigned int width, unsigned int height,
571+ unsigned int stride)
572 {
573 unsigned char *u, *v;
574
575@@ -1653,6 +2086,14 @@ static void fill_tiles(const struct util
576 return fill_tiles_yuv_planar(info, planes[0], planes[2],
577 planes[1], width, height, stride);
578
579+ case DRM_FORMAT_XV20:
580+ return fill_tiles_xv20(info, planes[0], planes[1],
581+ planes[1], width, height, stride);
582+
583+ case DRM_FORMAT_XV15:
584+ return fill_tiles_xv15(info, planes[0], planes[1],
585+ planes[2], width, height, stride);
586+
587 case DRM_FORMAT_ARGB4444:
588 case DRM_FORMAT_XRGB4444:
589 case DRM_FORMAT_ABGR4444:
590Index: libdrm-2.4.118/tests/util/format.c
591===================================================================
592--- libdrm-2.4.118.orig/tests/util/format.c
593+++ libdrm-2.4.118/tests/util/format.c
594@@ -59,6 +59,8 @@ static const struct util_format_info for
595 { DRM_FORMAT_NV15, "NV15", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 2) },
596 { DRM_FORMAT_NV20, "NV20", MAKE_YUV_INFO(YUV_YCbCr, 2, 1, 2) },
597 { DRM_FORMAT_NV30, "NV30", MAKE_YUV_INFO(YUV_YCbCr, 1, 1, 2) },
598+ { DRM_FORMAT_XV15, "XV15", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 2) },
599+ { DRM_FORMAT_XV20, "XV20", MAKE_YUV_INFO(YUV_YCbCr, 2, 1, 2) },
600 /* YUV planar */
601 { DRM_FORMAT_YUV420, "YU12", MAKE_YUV_INFO(YUV_YCbCr, 2, 2, 1) },
602 { DRM_FORMAT_YVU420, "YV12", MAKE_YUV_INFO(YUV_YCrCb, 2, 2, 1) },
diff --git a/meta-xilinx-core/recipes-graphics/drm/files/0004-modetest-fix-smpte-colour-pattern-issue-for-XV20-and.patch b/meta-xilinx-core/recipes-graphics/drm/files/0004-modetest-fix-smpte-colour-pattern-issue-for-XV20-and.patch
new file mode 100644
index 00000000..b385bbac
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/files/0004-modetest-fix-smpte-colour-pattern-issue-for-XV20-and.patch
@@ -0,0 +1,38 @@
1From ede95ded932a8f722f339fa345c098c705f40f08 Mon Sep 17 00:00:00 2001
2From: Anil Kumar M <amamidal@xilinx.com>
3Date: Wed, 16 Sep 2020 22:42:47 +0530
4Subject: [PATCH 4/5] modetest: fix smpte colour pattern issue for XV20 and
5 XV15 formats
6
7Fix smpte colour issue for XV15 and XV20 formats.
8
9Upstream-Status: Pending
10
11Signed-off-by: Anil Kumar M <amamidal@xilinx.com>
12---
13 tests/util/pattern.c | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/tests/util/pattern.c b/tests/util/pattern.c
17index e29d160..0fe2e5f 100644
18--- a/tests/util/pattern.c
19+++ b/tests/util/pattern.c
20@@ -1121,11 +1121,11 @@ static void fill_smpte(const struct util_format_info *info,
21 return fill_smpte_yuv_packed(&info->yuv, planes[0], width,
22 height, stride);
23 case DRM_FORMAT_XV20:
24- return fill_tiles_xv20(info, planes[0], planes[1], planes[1],
25- width, height, stride);
26+ return fill_smpte_yuv_semiplanar_10b(&info->yuv, planes[0], planes[1],
27+ width, height, stride);
28 case DRM_FORMAT_XV15:
29- return fill_tiles_xv15(info, planes[0], planes[1], planes[2],
30- width, height, stride);
31+ return fill_smpte_yuv_semiplanar_10b(&info->yuv, planes[0], planes[1],
32+ width, height, stride);
33 case DRM_FORMAT_NV12:
34 case DRM_FORMAT_NV21:
35 case DRM_FORMAT_NV16:
36--
372.7.4
38
diff --git a/meta-xilinx-core/recipes-graphics/drm/libdrm_%.bbappend b/meta-xilinx-core/recipes-graphics/drm/libdrm_%.bbappend
new file mode 100644
index 00000000..c2f6c8d2
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/drm/libdrm_%.bbappend
@@ -0,0 +1,9 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2
3
4SRC_URI:append = " \
5 file://0001-PATCH-libdrm-Update-drm-header-file-with-XV15-and-XV.patch \
6 file://0003-modetest-Add-semiplanar-10bit-pattern-support-for-mo.patch \
7 file://0004-modetest-fix-smpte-colour-pattern-issue-for-XV20-and.patch \
8 file://0001-modetest-Add-YUV444-and-X403-format-support-for-mode.patch \
9"
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb
index 268759c2..cd3ba3d1 100644
--- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb
+++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb
@@ -34,6 +34,7 @@ SRC_URI = " \
34 file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ 34 file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \
35 file://0026-Fix-gpu-driver-probe-failure.patch \ 35 file://0026-Fix-gpu-driver-probe-failure.patch \
36 file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ 36 file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \
37 file://0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch \
37 " 38 "
38SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" 39SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c"
39SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" 40SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b"
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch
new file mode 100644
index 00000000..72275a4c
--- /dev/null
+++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch
@@ -0,0 +1,81 @@
1From e3e0f5e3fa0ddb396393d444bce6e575f7a16189 Mon Sep 17 00:00:00 2001
2From: Parth Gajjar <parth.gajjar@amd.com>
3Date: Thu, 21 Dec 2023 22:41:32 -0800
4Subject: [PATCH] Replace vma->vm_flags direct modifications with modifier
5 calls
6
7Replace direct modifications to vma->vm_flags with calls to modifier
8functions to be able to track flag changes and to keep vma locking
9correctness. (Kernel 6.3)
10
11Signed-off-by: Parth Gajjar <parth.gajjar@amd.com>
12---
13 linux/mali_memory.c | 10 ++++++++++
14 linux/mali_memory_cow.c | 13 ++++++++++---
15 2 files changed, 20 insertions(+), 3 deletions(-)
16
17diff --git a/linux/mali_memory.c b/linux/mali_memory.c
18index 2b2b209..c21d0b7 100644
19--- a/linux/mali_memory.c
20+++ b/linux/mali_memory.c
21@@ -266,11 +266,17 @@ int mali_mmap(struct file *filp, struct vm_area_struct *vma)
22 * that it's present and can never be paged out (see also previous
23 * entry)
24 */
25+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
26+ vm_flags_set(vma, VM_IO | VM_DONTCOPY | VM_PFNMAP);
27+#else
28 vma->vm_flags |= VM_IO;
29 vma->vm_flags |= VM_DONTCOPY;
30 vma->vm_flags |= VM_PFNMAP;
31+#endif
32 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)
33 vma->vm_flags |= VM_RESERVED;
34+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
35+ vm_flags_set(vma, VM_DONTDUMP | VM_DONTEXPAND);
36 #else
37 vma->vm_flags |= VM_DONTDUMP;
38 vma->vm_flags |= VM_DONTEXPAND;
39@@ -288,7 +294,11 @@ int mali_mmap(struct file *filp, struct vm_area_struct *vma)
40 if (!(vma->vm_flags & VM_WRITE)) {
41 MALI_DEBUG_PRINT(4, ("mmap allocation with read only !\n"));
42 /* add VM_WRITE for do_page_fault will check this when a write fault */
43+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
44+ vm_flags_set(vma, VM_WRITE | VM_READ);
45+#else
46 vma->vm_flags |= VM_WRITE | VM_READ;
47+#endif
48 vma->vm_page_prot = PAGE_READONLY;
49 vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
50 mem_bkend->flags |= MALI_MEM_BACKEND_FLAG_COW_CPU_NO_WRITE;
51diff --git a/linux/mali_memory_cow.c b/linux/mali_memory_cow.c
52index 6fadd42..e631431 100644
53--- a/linux/mali_memory_cow.c
54+++ b/linux/mali_memory_cow.c
55@@ -391,13 +391,20 @@ _mali_osk_errcode_t mali_memory_cow_modify_range(mali_mem_backend *backend,
56 }
57 } else {
58 /* used to trigger page fault for swappable cowed memory. */
59- alloc->cpu_mapping.vma->vm_flags |= VM_PFNMAP;
60- alloc->cpu_mapping.vma->vm_flags |= VM_MIXEDMAP;
61-
62+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
63+ vm_flags_set(alloc->cpu_mapping.vma, VM_PFNMAP | VM_MIXEDMAP);
64+#else
65+ alloc->cpu_mapping.vma->vm_flags |= VM_PFNMAP;
66+ alloc->cpu_mapping.vma->vm_flags |= VM_MIXEDMAP;
67+#endif
68 zap_vma_ptes(alloc->cpu_mapping.vma, alloc->cpu_mapping.vma->vm_start + range_start, range_size);
69 /* delete this flag to let swappble is ummapped regard to stauct page not page frame. */
70+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
71+ vm_flags_clear(alloc->cpu_mapping.vma, VM_PFNMAP | VM_MIXEDMAP);
72+#else
73 alloc->cpu_mapping.vma->vm_flags &= ~VM_PFNMAP;
74 alloc->cpu_mapping.vma->vm_flags &= ~VM_MIXEDMAP;
75+#endif
76 }
77 }
78
79--
802.25.1
81
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb
new file mode 100644
index 00000000..17039abb
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Xilinx DisplayPort Linux Kernel module"
2DESCRIPTION = "Out-of-tree DisplayPort(DP) kernel modules provider for aarch64 devices"
3SECTION = "kernel/modules"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a"
6
7XLNX_DP_VERSION = "6.1.0"
8PV = "${XLNX_DP_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
9
10S = "${WORKDIR}/git"
11
12BRANCH ?= "master"
13REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https"
14SRCREV ?= "e20942b256e6fb18eaef919c7441f65ad8afcf43"
15
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = "${REPO};${BRANCHARG}"
18
19inherit module
20
21EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
22COMPATIBLE_MACHINE = "^$"
23COMPATIBLE_MACHINE:zynqmp = "zynqmp"
24COMPATIBLE_MACHINE:versal = "versal"
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb
new file mode 100644
index 00000000..9757ae4b
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Xilinx HDMI Linux Kernel module"
2DESCRIPTION = "Out-of-tree HDMI kernel modules provider for MPSoC EG/EV devices"
3SECTION = "kernel/modules"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe"
6
7XLNX_HDMI_VERSION = "6.1"
8PV = "${XLNX_HDMI_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
9
10S = "${WORKDIR}/git"
11
12BRANCH ?= "master"
13REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https"
14SRCREV = "edd297762e0bac3f4c5b64ef67244968e22020e2"
15
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = "${REPO};${BRANCHARG}"
18
19inherit module
20
21EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
22COMPATIBLE_MACHINE = "^$"
23COMPATIBLE_MACHINE:zynqmp = "zynqmp"
24COMPATIBLE_MACHINE:versal = "versal"
diff --git a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch
new file mode 100644
index 00000000..38b61071
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch
@@ -0,0 +1,74 @@
1Fixes for the Meson build of libtraceevent:
2
3- Make the plugin directory the same as the Makefiles
4- Install the plugins as modules not static and versioned shared libraries
5- Add an option to disable building the documentation (needs asciidoc and xmlto)
6
7Upstream-Status: Pending
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9
10diff --git a/meson.build b/meson.build
11index b61c873..4bba4d8 100644
12--- a/meson.build
13+++ b/meson.build
14@@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir'))
15 libdir = join_paths(prefixdir, get_option('libdir'))
16 plugindir = get_option('plugindir')
17 if plugindir == ''
18- plugindir = join_paths(libdir, 'libtraceevent/plugins')
19+ plugindir = join_paths(libdir, 'traceevent/plugins')
20 endif
21
22 add_project_arguments(
23@@ -45,10 +45,13 @@ if cunit_dep.found()
24 subdir('utest')
25 endif
26 subdir('samples')
27-subdir('Documentation')
28
29-custom_target(
30- 'docs',
31- output: 'docs',
32- depends: [html, man],
33- command: ['echo'])
34+if get_option('docs')
35+ subdir('Documentation')
36+
37+ custom_target(
38+ 'docs',
39+ output: 'docs',
40+ depends: [html, man],
41+ command: ['echo'])
42+endif
43diff --git a/meson_options.txt b/meson_options.txt
44index b2294f6..0611216 100644
45--- a/meson_options.txt
46+++ b/meson_options.txt
47@@ -4,6 +4,10 @@
48
49 option('plugindir', type : 'string',
50 description : 'set the plugin dir')
51+
52+option('docs', type : 'boolean', value: true,
53+ description : 'build documentation')
54+
55 option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc',
56 description : 'directory for HTML documentation')
57 option('asciidoctor', type : 'boolean', value: false,
58diff --git a/plugins/meson.build b/plugins/meson.build
59index 74ad664..4919be4 100644
60--- a/plugins/meson.build
61+++ b/plugins/meson.build
62@@ -19,11 +19,10 @@ plugins = [
63
64 pdeps = []
65 foreach plugin : plugins
66- pdeps += library(
67+ pdeps += shared_module(
68 plugin.replace('.c', ''),
69 plugin,
70 name_prefix: '',
71- version: library_version,
72 dependencies: [libtraceevent_dep],
73 include_directories: [incdir],
74 install: true,
diff --git a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb
new file mode 100644
index 00000000..bee78918
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb
@@ -0,0 +1,23 @@
1# Copyright (C) 2022 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "API to access the kernel tracefs directory"
5HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/"
6LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
7LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \
8 file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd"
9SECTION = "libs"
10
11SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213"
12SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \
13 file://meson.patch"
14
15S = "${WORKDIR}/git"
16
17inherit meson pkgconfig
18
19EXTRA_OEMESON = "-Ddocs=false"
20
21PACKAGES += "${PN}-plugins"
22
23FILES:${PN}-plugins += "${libdir}/traceevent/plugins"
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg
new file mode 100644
index 00000000..a5b23e3f
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg
@@ -0,0 +1 @@
CONFIG_VERSAL_SYSMON_I2C=y
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc
new file mode 100644
index 00000000..c1830956
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc
@@ -0,0 +1,2 @@
1# SPDX-License-Identifier: MIT
2kconf hardware versal-sysmon.cfg
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb
new file mode 100644
index 00000000..db593947
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb
@@ -0,0 +1,19 @@
1LINUX_VERSION = "6.6.10"
2YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=yocto-kmeta"
3KBRANCH="xlnx_rebase_v6.6_LTS"
4SRCREV = "6737b74785db6341fba18dc6e3d35da9ab8fcfb7"
5SRCREV_meta = "5d0809d0d939c7738cb6e5391126c73fd0e4e865"
6
7KCONF_AUDIT_LEVEL="0"
8
9include linux-xlnx.inc
10
11FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
12
13# Workaround for:
14# rm: cannot remove '.../tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/6.6.0-xilinx-v2024.1+gitAUTOINC+340eed5001-r0/image/lib/modules/6.6.0-xilinx-v2024.1-g340eed500130/source': No such file or directory
15# This will not be required Scarthgap
16kernel_do_install:prepend () {
17 mkdir -p "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}"
18 touch "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
19}
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc b/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc
new file mode 100644
index 00000000..491f54c3
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc
@@ -0,0 +1,11 @@
1inherit perlnative cpan-base
2
3# Env var which tells perl if it should use host (no) or target (yes) settings
4export PERLCONFIGTARGET = "${@is_target(d)}"
5export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE"
6export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}"
7export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
8
9# The perl symbols CPPSTDIN and CPPRUN embed the sysroot into the
10# binaries, work needed to remove this
11INSANE_SKIP:${PN}-dbg += "buildpaths"
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf.bb b/meta-xilinx-core/recipes-kernel/perf/perf.bb
new file mode 100644
index 00000000..9164d93a
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/perf/perf.bb
@@ -0,0 +1,414 @@
1SUMMARY = "Performance analysis tools for Linux"
2DESCRIPTION = "Performance counters for Linux are a new kernel-based \
3subsystem that provide a framework for all things \
4performance analysis. It covers hardware level \
5(CPU/PMU, Performance Monitoring Unit) features \
6and software features (software counters, tracepoints) \
7as well."
8HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page"
9
10LICENSE = "GPL-2.0-only"
11
12PE = '1'
13
14PACKAGECONFIG ??= "python tui libunwind libtraceevent"
15PACKAGECONFIG[dwarf] = ",NO_DWARF=1"
16PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl"
17PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native"
18# gui support was added with kernel 3.6.35
19# since 3.10 libnewt was replaced by slang
20# to cover a wide range of kernel we add both dependencies
21PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang"
22PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind"
23PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1"
24PACKAGECONFIG[bfd] = ",NO_LIBBFD=1"
25PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap"
26PACKAGECONFIG[jvmti] = ",NO_JVMTI=1"
27# libaudit support would need scripting to be enabled
28PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit"
29PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native"
30PACKAGECONFIG[cap] = ",,libcap"
31PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent"
32# jevents requires host python for generating a .c file, but is
33# unrelated to the python item.
34PACKAGECONFIG[jevents] = ",NO_JEVENTS=1,python3-native"
35# Arm CoreSight
36PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd"
37PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4"
38PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace"
39
40# libunwind is not yet ported for some architectures
41PACKAGECONFIG:remove:arc = "libunwind"
42PACKAGECONFIG:remove:riscv32 = "libunwind"
43
44DEPENDS = " \
45 virtual/${MLPREFIX}libc \
46 ${MLPREFIX}elfutils \
47 ${MLPREFIX}binutils \
48 bison-native flex-native xz \
49"
50
51do_configure[depends] += "virtual/kernel:do_shared_workdir"
52
53PROVIDES = "virtual/perf"
54
55inherit linux-kernel-base kernel-arch manpages
56
57# needed for building the tools/perf Python bindings
58inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)}
59inherit python3-dir
60export PYTHON_SITEPACKAGES_DIR
61
62#kernel 3.1+ supports WERROR to disable warnings as errors
63export WERROR = "0"
64
65do_populate_lic[depends] += "virtual/kernel:do_shared_workdir"
66
67# needed for building the tools/perf Perl binding
68include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)}
69
70inherit kernelsrc
71
72S = "${WORKDIR}/${BP}"
73SPDX_S = "${S}/tools/perf"
74
75# The LDFLAGS is required or some old kernels fails due missing
76# symbols and this is preferred than requiring patches to every old
77# supported kernel.
78LDFLAGS="-ldl -lutil"
79
80# Perf's build system adds its own optimization flags for most TUs,
81# overriding the flags included here. But for some, perf does not add
82# any -O option, so ensure the distro's chosen optimization gets used
83# for those. Since ${SELECTED_OPTIMIZATION} always includes
84# ${DEBUG_FLAGS} which in turn includes ${DEBUG_PREFIX_MAP}, this also
85# ensures perf is built with appropriate -f*-prefix-map options,
86# avoiding the 'buildpaths' QA warning.
87TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}"
88
89EXTRA_OEMAKE = '\
90 V=1 \
91 VF=1 \
92 -C ${S}/tools/perf \
93 O=${B} \
94 CROSS_COMPILE=${TARGET_PREFIX} \
95 ARCH=${ARCH} \
96 CC="${CC}" \
97 CCLD="${CC}" \
98 LDSHARED="${CC} -shared" \
99 AR="${AR}" \
100 LD="${LD}" \
101 EXTRA_CFLAGS="-ldw -I${S}" \
102 YFLAGS='-y --file-prefix-map=${WORKDIR}=${TARGET_DBGSRC_DIR}' \
103 EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \
104 perfexecdir=${libexecdir} \
105 NO_GTK2=1 \
106 ${PACKAGECONFIG_CONFARGS} \
107 PKG_CONFIG=pkg-config \
108 TMPDIR="${B}" \
109 LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \
110'
111
112EXTRA_OEMAKE += "\
113 'DESTDIR=${D}' \
114 'prefix=${prefix}' \
115 'bindir=${bindir}' \
116 'sharedir=${datadir}' \
117 'sysconfdir=${sysconfdir}' \
118 'perfexecdir=${libexecdir}/perf-core' \
119 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \
120 'sharedir=${@os.path.relpath(datadir, prefix)}' \
121 'mandir=${@os.path.relpath(mandir, prefix)}' \
122 'infodir=${@os.path.relpath(infodir, prefix)}' \
123 ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \
124"
125
126# During do_configure, we might run a 'make clean'. That often breaks
127# when done in parallel, so disable parallelism for do_configure. Note
128# that it has to be done this way rather than by passing -j1, since
129# perf's build system by default ignores any -j argument, but does
130# honour a JOBS variable.
131EXTRA_OEMAKE:append:task-configure = " JOBS=1"
132
133PERF_SRC ?= "Makefile \
134 tools/arch \
135 tools/build \
136 tools/include \
137 tools/lib \
138 tools/Makefile \
139 tools/perf \
140 tools/scripts \
141 scripts/ \
142 arch/arm64/tools \
143 arch/${ARCH}/Makefile \
144"
145
146PERF_EXTRA_LDFLAGS = ""
147
148# MIPS N32/N64
149PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32"
150PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32"
151PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip"
152PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip"
153
154do_compile() {
155 # Linux kernel build system is expected to do the right thing
156 unset CFLAGS
157 test -e ${S}/tools/lib/traceevent/plugins/Makefile && \
158 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile
159 test -e ${S}/tools/perf/Makefile.config && \
160 sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config
161 oe_runmake all
162}
163
164do_install() {
165 # Linux kernel build system is expected to do the right thing
166 unset CFLAGS
167 oe_runmake install
168 # we are checking for this make target to be compatible with older perf versions
169 if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
170 oe_runmake DESTDIR=${D} install-python_ext
171 if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then
172 sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt
173 fi
174 fi
175}
176
177do_configure[prefuncs] += "copy_perf_source_from_kernel"
178python copy_perf_source_from_kernel() {
179 sources = (d.getVar("PERF_SRC") or "").split()
180 src_dir = d.getVar("STAGING_KERNEL_DIR")
181 dest_dir = d.getVar("S")
182 bb.utils.mkdirhier(dest_dir)
183 bb.utils.prunedir(dest_dir)
184 for s in sources:
185 src = oe.path.join(src_dir, s)
186 dest = oe.path.join(dest_dir, s)
187 if not os.path.exists(src):
188 bb.warn("Path does not exist: %s. Maybe PERF_SRC lists more files than what your kernel version provides and needs." % src)
189 continue
190 if os.path.isdir(src):
191 oe.path.copyhardlinktree(src, dest)
192 else:
193 src_path = os.path.dirname(s)
194 os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True)
195 bb.utils.copyfile(src, dest)
196}
197
198do_configure:prepend () {
199 # If building a multlib based perf, the incorrect library path will be
200 # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit
201 # build, with a 64 bit multilib, the arch won't match and the detection of a
202 # 64 bit build (and library) are not exected. To ensure that libraries are
203 # installed to the correct location, we can use the weak assignment in the
204 # config/Makefile.
205 #
206 # Also need to relocate .config-detected to $(OUTPUT)/config-detected
207 # for kernel sources that do not already do this
208 # as two builds (e.g. perf and lib32-perf from mutlilib can conflict
209 # with each other if its in the shared source directory
210 #
211 if [ -e "${S}/tools/perf/config/Makefile" ]; then
212 perfconfig="${S}/tools/perf/config/Makefile"
213 fi
214 if [ -e "${S}/tools/perf/Makefile.config" ]; then
215 perfconfig="${S}/tools/perf/Makefile.config"
216 fi
217 if [ -n "${perfconfig}" ]; then
218 # Match $(prefix)/$(lib) and $(prefix)/lib
219 sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \
220 -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \
221 -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
222 ${perfconfig}
223 fi
224 # The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)"
225 # in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it
226 # will use the relative path 'share/man', in the way it will resulting in
227 # incorrect installation for man pages.
228 if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then
229 sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile
230 fi
231 if [ -e "${S}/tools/perf/Makefile.perf" ]; then
232 sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
233 ${S}/tools/perf/Makefile.perf
234 sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(PYTHON_SITEPACKAGES_DIR)' --root='\$(DESTDIR)',g" \
235 ${S}/tools/perf/Makefile.perf
236 # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8
237 sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \
238 ${S}/tools/perf/Makefile.perf
239 fi
240 sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
241 ${S}/tools/perf/Makefile*
242
243 if [ -e "${S}/tools/build/Makefile.build" ]; then
244 sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
245 ${S}/tools/build/Makefile.build
246 fi
247
248 # start reproducibility substitutions
249 if [ -e "${S}/tools/perf/Makefile.config" ]; then
250 # The following line in the Makefle:
251 # override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO))
252 # "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've
253 # ensure that the environment is setup and we do not need the full path to be
254 # captured, since the symbol gets built into the executable, making it not
255 # reproducible.
256 sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO))),g' \
257 ${S}/tools/perf/Makefile.config
258 # The same line is in older releases, but looking explicitly for Python 2
259 sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON2)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON2))),g' \
260 ${S}/tools/perf/Makefile.config
261
262 # likewise with this substitution. Kernels with commit 18f2967418d031a39
263 # [perf tools: Use Python devtools for version autodetection rather than runtime]
264 # need this substitution for reproducibility.
265 sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO))),$(notdir $(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO)))),g' \
266 ${S}/tools/perf/Makefile.config
267
268 # The following line:
269 # srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))),
270 # Captures the full src path of perf, which of course makes it not
271 # reproducible. We really only need the relative location 'tools/perf', so we
272 # change the Makefile line to remove everything before 'tools/perf'
273 sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \
274 ${S}/tools/perf/Makefile.config
275 # Avoid hardcoded path to python-native
276 sed -i -e 's#\(PYTHON_WORD := \)$(call shell-wordify,$(PYTHON))#\1 python3#g' \
277 ${S}/tools/perf/Makefile.config
278 fi
279 if [ -e "${S}/tools/perf/tests/Build" ]; then
280 # OUTPUT is the full path, we have python on the path so we remove it from the
281 # definition. This is captured in the perf binary, so breaks reproducibility
282 sed -i -e 's,PYTHONPATH="BUILD_STR($(OUTPUT)python)",PYTHONPATH="BUILD_STR(python)",g' \
283 ${S}/tools/perf/tests/Build
284 fi
285 if [ -e "${S}/tools/perf/util/Build" ]; then
286 # To avoid bison generating #ifdefs that have captured paths, we make sure
287 # all the calls have YFLAGS, which contains prefix mapping information.
288 sed -i -e 's,$(BISON),$(BISON) $(YFLAGS),g' ${S}/tools/perf/util/Build
289 fi
290 if [ -e "${S}/scripts/Makefile.host" ]; then
291 # To avoid yacc (bison) generating #ifdefs that have captured paths, we make sure
292 # all the calls have YFLAGS, which contains prefix mapping information.
293 sed -i -e 's,$(YACC),$(YACC) $(YFLAGS),g' ${S}/scripts/Makefile.host
294 fi
295 if [ -e "${S}/tools/perf/pmu-events/Build" ]; then
296 target='$(OUTPUT)pmu-events/pmu-events.c $(V)'
297 replacement1='$(OUTPUT)pmu-events/pmu-events.c $(V)\n'
298 replacement2='\t$(srctree)/sort-pmuevents.py $(OUTPUT)pmu-events/pmu-events.c $(OUTPUT)pmu-events/pmu-events.c.new\n'
299 replacement3='\tcp $(OUTPUT)pmu-events/pmu-events.c.new $(OUTPUT)pmu-events/pmu-events.c'
300 sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \
301 "${S}/tools/perf/pmu-events/Build"
302 fi
303 if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then
304 sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: e.name)#g" \
305 "${S}/tools/perf/pmu-events/jevents.py"
306 fi
307 if [ -e "${S}/tools/perf/arch/arm64/Makefile" ]; then
308 sed -i 's,sysdef := $(srctree)/,sysdef := ,' ${S}/tools/perf/arch/arm64/Makefile
309 sed -i 's,$(incpath) $(sysdef),$(incpath) $(srctree)/$(sysdef) $(sysdef),' ${S}/tools/perf/arch/arm64/Makefile
310 fi
311 if [ -e "${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl" ]; then
312 if ! grep -q input_rel ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl; then
313 sed -i 's,input=$4,input=$4\ninput_rel=$5,' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
314 fi
315 sed -i 's,#include \\"\$input\\",#include \\"\$input_rel\\",' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl
316 fi
317 # end reproducibility substitutions
318
319 # We need to ensure the --sysroot option in CC is preserved
320 if [ -e "${S}/tools/perf/Makefile.perf" ]; then
321 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf
322 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf
323 sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf
324 sed -i 's,PKG_CONFIG = $(CROSS_COMPILE)pkg-config,#PKG_CONFIG,' ${S}/tools/perf/Makefile.perf
325 fi
326 if [ -e "${S}/tools/lib/api/Makefile" ]; then
327 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
328 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
329 sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile
330 fi
331 if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
332 sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
333 sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile
334 fi
335 if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
336 sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
337 fi
338 if [ -e "${S}/tools/build/Makefile.feature" ]; then
339 sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature
340 fi
341 # The libperl feature check produces fatal warnings due to -Werror being
342 # used, silence enough errors that the check passes.
343 sed -i 's/\(FLAGS_PERL_EMBED=.*\)/\1 -Wno-error=unused-function -Wno-error=attributes/' ${S}/tools/build/feature/Makefile
344
345 # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include
346 if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then
347 sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c
348 fi
349 if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then
350 sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
351 sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
352 fi
353
354 # use /usr/bin/env instead of version specific python
355 for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do
356 sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s}
357 done
358
359 # unistd.h can be out of sync between libc-headers and the captured version in the perf source
360 # so we copy it from the sysroot unistd.h to the perf unistd.h
361 install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
362 install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
363
364 # the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and
365 # copy for a helper script we need
366 for p in $(echo ${FILESPATH} | tr ':' '\n'); do
367 if [ -e $p/sort-pmuevents.py ]; then
368 cp $p/sort-pmuevents.py ${S}
369 fi
370 done
371}
372
373python do_package:prepend() {
374 d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0])
375}
376
377PACKAGE_ARCH = "${MACHINE_ARCH}"
378
379
380PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python"
381
382RDEPENDS:${PN} += "elfutils bash"
383RDEPENDS:${PN}-archive =+ "bash"
384RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}"
385RDEPENDS:${PN}-perl =+ "bash perl perl-modules"
386RDEPENDS:${PN}-tests =+ "python3 bash"
387
388RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \
389 ${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl', '', d)} \
390 ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \
391 "
392FILES_SOLIBSDEV = ""
393FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so"
394FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
395FILES:${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
396FILES:${PN}-python = " \
397 ${PYTHON_SITEPACKAGES_DIR} \
398 ${libexecdir}/perf-core/scripts/python \
399 "
400FILES:${PN}-perl = "${libexecdir}/perf-core/scripts/perl"
401
402DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
403
404PACKAGESPLITFUNCS =+ "perf_fix_sources"
405
406perf_fix_sources () {
407 for f in util/parse-events-flex.h util/parse-events-flex.c util/pmu-flex.c \
408 util/pmu-flex.h util/expr-flex.h util/expr-flex.c; do
409 f=${PKGD}${TARGET_DBGSRC_DIR}/$f
410 if [ -e $f ]; then
411 sed -i -e 's#${S}/##g' $f
412 fi
413 done
414}
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py b/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py
new file mode 100755
index 00000000..0362f2d8
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py
@@ -0,0 +1,100 @@
1#!/usr/bin/env python3
2
3# perf pmu-events sorting tool
4#
5# Copyright (C) 2021 Bruce Ashfield
6#
7# SPDX-License-Identifier: MIT
8#
9
10import sys
11import os
12import re
13from collections import OrderedDict
14
15if len(sys.argv) < 2:
16 print( "[ERROR]: input and output pmu files missing" )
17 sys.exit(1)
18
19if len(sys.argv) < 3:
20 print( "[ERROR]: output pmu file missing" )
21 sys.exit(1)
22
23infile = sys.argv[1]
24outfile = sys.argv[2]
25
26if not os.path.exists(infile):
27 print( "ERROR. input file does not exist: %s" % infile )
28 sys.exit(1)
29
30if os.path.exists(outfile):
31 print( "WARNING. output file will be overwritten: %s" % infile )
32
33with open(infile, 'r') as file:
34 data = file.read()
35
36preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL )
37
38preamble = re.search( preamble_regex, data )
39struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL )
40field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL )
41cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL )
42name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL )
43
44# create a dictionary structure to store all the structs, their
45# types and then their fields.
46entry_dict = {}
47for struct in re.findall( struct_block_regex, data ):
48 # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) )
49 entry_dict[struct[2]] = {}
50 entry_dict[struct[2]]['type_prefix'] = struct[0]
51 entry_dict[struct[2]]['type'] = struct[1]
52 entry_dict[struct[2]]['fields'] = {}
53 for entry in re.findall( field_regex, struct[3] ):
54 #print( " entry: %s" % entry )
55 cpuid = re.search( cpuid_regex, entry )
56 if cpuid:
57 #print( " cpuid found: %s" % cpuid.group(1) )
58 entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry
59
60 name = re.search( name_regex, entry )
61 if name:
62 #print( " name found: %s" % name.group(1) )
63 entry_dict[struct[2]]['fields'][name.group(1)] = entry
64
65 # unmatched entries are most likely array terminators and
66 # should end up as the last element in the sorted list, which
67 # is achieved by using '0' as the key
68 if not cpuid and not name:
69 entry_dict[struct[2]]['fields']['0'] = entry
70
71# created ordered dictionaries from the captured values. These are ordered by
72# a sorted() iteration of the keys. We don't care about the order we read
73# things, just the sorted order. Hency why we couldn't create these during
74# reading.
75#
76# yes, there's a more concise way to do this, but our nested dictionaries of
77# fields make it complex enough that it becomes unreadable.
78entry_dict_sorted = OrderedDict()
79for i in sorted(entry_dict.keys()):
80 entry_dict_sorted[i] = {}
81 entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix']
82 entry_dict_sorted[i]['type'] = entry_dict[i]['type']
83 entry_dict_sorted[i]['fields'] = {}
84 for f in sorted(entry_dict[i]['fields'].keys()):
85 entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f]
86
87# dump the sorted elements to the outfile
88outf = open( outfile, 'w' )
89
90print( preamble.group(1) )
91outf.write( preamble.group(1) )
92for d in entry_dict_sorted:
93 outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) )
94 for f in entry_dict_sorted[d]['fields']:
95 outf.write( entry_dict_sorted[d]['fields'][f] + '\n' )
96
97 outf.write( "};\n" )
98
99outf.close()
100
diff --git a/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch
new file mode 100644
index 00000000..c7777360
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch
@@ -0,0 +1,31 @@
1From 059f28d8eae7a1ef237eccbaaa7493480f83b764 Mon Sep 17 00:00:00 2001
2From: Rohit Visavalia <rohit.visavalia@xilinx.com>
3Date: Fri, 2 Sep 2022 01:56:47 -0700
4Subject: [PATCH] default.pai.in: disable tsched (system-timer based model)
5
6With tsched enabled we see clicking noise on DisplayPort for initial 5 sec
7every time audio is played. Disabling the same fixes the issue.
8
9Upstream-Status: Inappropriate [disable feature]
10
11Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com>
12---
13 src/daemon/default.pa.in | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
17index a3ddad9..37af3f2 100755
18--- a/src/daemon/default.pa.in
19+++ b/src/daemon/default.pa.in
20@@ -55,7 +55,7 @@ ifelse(@HAVE_MKFIFO@, 1, [dnl
21 ### Automatically load driver modules depending on the hardware available
22 ifelse(@HAVE_UDEV@, 1, [dnl
23 .ifexists module-udev-detect@PA_SOEXT@
24-load-module module-udev-detect
25+load-module module-udev-detect tsched=0
26 .else
27 ], @HAVE_COREAUDIO@, 1, [dnl
28 .ifexists module-coreaudio-detect@PA_SOEXT@
29--
302.17.1
31
diff --git a/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
new file mode 100644
index 00000000..7aae4a3a
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
@@ -0,0 +1,7 @@
1# This change appears to only affect ZynqMP configurations
2# but needs to be applied generically to all aarch64 since it affects a lot of
3# dependencies.
4FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
5SRC_URI:append = " \
6 file://0001-default.pai.in-disable-tsched-system-timer-based-mod.patch \
7 "
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch
new file mode 100644
index 00000000..fac2d719
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch
@@ -0,0 +1,61 @@
1From 373923a8cddb0b1854d3040a6ba0cf016a244128 Mon Sep 17 00:00:00 2001
2From: Anil Kumar M <amamidal@xilinx.com>
3Date: Mon, 24 Feb 2020 14:45:46 +0530
4Subject: [PATCH] v4l-utils: Add support for new media bus codes
5
6Add new media bus format codes for supporting xilinx
7specific formats.
8
9Signed-off-by: Anil Kumar M <amamidal@xilinx.com>
10---
11 include/linux/media-bus-format.h | 12 ++++++++++++
12 utils/media-ctl/libv4l2subdev.c | 11 +++++++++++
13 2 files changed, 23 insertions(+)
14
15diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h
16index d6a5a3b..3fb2346 100644
17--- a/include/linux/media-bus-format.h
18+++ b/include/linux/media-bus-format.h
19@@ -108,6 +108,18 @@
20 #define MEDIA_BUS_FMT_YUV16_1X48 0x202a
21 #define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b
22
23+/* YUV: Xilinx Specific - next is 0x2109 */
24+#define MEDIA_BUS_FMT_VYYUYY8_1X24 0x2100
25+#define MEDIA_BUS_FMT_VYYUYY10_4X20 0x2101
26+#define MEDIA_BUS_FMT_VUY10_1X30 0x2102
27+#define MEDIA_BUS_FMT_UYYVYY12_4X24 0x2103
28+#define MEDIA_BUS_FMT_VUY12_1X36 0x2104
29+#define MEDIA_BUS_FMT_Y16_1X16 0x2105
30+#define MEDIA_BUS_FMT_UYYVYY16_4X32 0x2106
31+#define MEDIA_BUS_FMT_VUY16_1X48 0x2107
32+#define MEDIA_BUS_FMT_UYVY16_2X32 0x2108
33+
34+
35 /* Bayer - next is 0x3021 */
36 #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001
37 #define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013
38diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c
39index a989efb..a37541f 100644
40--- a/utils/media-ctl/libv4l2subdev.c
41+++ b/utils/media-ctl/libv4l2subdev.c
42@@ -34,6 +34,17 @@
43
44 #include <linux/v4l2-subdev.h>
45
46+/* YUV: Xilinx Specific - next is 0x2109 */
47+#define MEDIA_BUS_FMT_VYYUYY8_1X24 (0x2100)
48+#define MEDIA_BUS_FMT_VYYUYY10_4X20 (0x2101)
49+#define MEDIA_BUS_FMT_VUY10_1X30 (0x2102)
50+#define MEDIA_BUS_FMT_UYYVYY12_4X24 (0x2103)
51+#define MEDIA_BUS_FMT_VUY12_1X36 (0x2104)
52+#define MEDIA_BUS_FMT_Y16_1X16 (0x2105)
53+#define MEDIA_BUS_FMT_UYYVYY16_4X32 (0x2106)
54+#define MEDIA_BUS_FMT_VUY16_1X48 (0x2107)
55+#define MEDIA_BUS_FMT_UYVY16_2X32 (0x2108)
56+
57 #include "mediactl.h"
58 #include "mediactl-priv.h"
59 #include "tools.h"
60--
612.7.4
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend b/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend
new file mode 100644
index 00000000..3d177bce
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend
@@ -0,0 +1,2 @@
1SRC_URI:append = " file://0001-v4l-utils-Add-support-for-new-media-bus-codes.patch"
2FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch
new file mode 100644
index 00000000..42b108fe
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch
@@ -0,0 +1,39 @@
1From 4d8ac36340423844be76ceb506bc0e4f48772944 Mon Sep 17 00:00:00 2001
2From: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
3Date: Tue, 7 Sep 2021 06:08:55 -0700
4Subject: [PATCH 1/2] Add support for 3 planar YUV444P 8bpc
5
6This patch adds support for single contiguous buffer 3 planar YUV444P
78 bpc format.
8
9Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com>
10Signed-off-by: Mark Hatle <mark.hatle@amd.com>
11---
12 include/linux/videodev2.h | 1 +
13 yavta.c | 1 +
14 2 files changed, 2 insertions(+)
15
16Index: git/include/linux/videodev2.h
17===================================================================
18--- git.orig/include/linux/videodev2.h
19+++ git/include/linux/videodev2.h
20@@ -545,6 +545,7 @@ struct v4l2_pix_format {
21 #define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */
22 #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */
23 #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */
24+#define V4L2_PIX_FMT_YUV444P v4l2_fourcc('4', '4', '4', 'P') /* 24 YUV444 planar */
25 #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */
26 #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */
27 #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */
28Index: git/yavta.c
29===================================================================
30--- git.orig/yavta.c
31+++ git/yavta.c
32@@ -309,6 +309,7 @@ static struct v4l2_format_info {
33 { "YVYU", V4L2_PIX_FMT_YVYU, 1 },
34 { "NV12", V4L2_PIX_FMT_NV12, 1 },
35 { "NV12M", V4L2_PIX_FMT_NV12M, 2 },
36+ { "YUV444P", V4L2_PIX_FMT_YUV444P, 1 },
37 { "NV21", V4L2_PIX_FMT_NV21, 1 },
38 { "NV21M", V4L2_PIX_FMT_NV21M, 2 },
39 { "NV16", V4L2_PIX_FMT_NV16, 1 },
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch
new file mode 100644
index 00000000..5dfbfa2e
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch
@@ -0,0 +1,41 @@
1From dedd0eb76ced425610bdd695029489f553923b2e Mon Sep 17 00:00:00 2001
2From: Rohit Visavalia <rohit.visavalia@xilinx.com>
3Date: Wed, 27 Oct 2021 02:45:39 -0700
4Subject: [PATCH 2/2] Add support 3 planar YUV 444 10bpc pixel format in
5 contiguous memory
6
7The new format X403 is added to support 3 planar YUV 444 10bpc
830 bits per sample image data in a single contiguous buffer.
9
10Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com>
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12---
13 include/linux/videodev2.h | 2 ++
14 yavta.c | 1 +
15 2 files changed, 3 insertions(+)
16
17Index: git/include/linux/videodev2.h
18===================================================================
19--- git.orig/include/linux/videodev2.h
20+++ git/include/linux/videodev2.h
21@@ -585,6 +585,8 @@ struct v4l2_pix_format {
22 #define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */
23 #define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */
24
25+#define V4L2_PIX_FMT_X403 v4l2_fourcc('X', '4', '0', '3') /* 32 YUV planar 4:4:4 10-bit */
26+
27 /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */
28 #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */
29 #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */
30Index: git/yavta.c
31===================================================================
32--- git.orig/yavta.c
33+++ git/yavta.c
34@@ -324,6 +324,7 @@ static struct v4l2_format_info {
35 { "YVU420M", V4L2_PIX_FMT_YVU420M, 3 },
36 { "YVU422M", V4L2_PIX_FMT_YVU422M, 3 },
37 { "YVU444M", V4L2_PIX_FMT_YVU444M, 3 },
38+ { "X403", V4L2_PIX_FMT_X403, 1 },
39 { "SBGGR8", V4L2_PIX_FMT_SBGGR8, 1 },
40 { "SGBRG8", V4L2_PIX_FMT_SGBRG8, 1 },
41 { "SGRBG8", V4L2_PIX_FMT_SGRBG8, 1 },
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend
new file mode 100644
index 00000000..52eab13d
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend
@@ -0,0 +1,5 @@
1FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
2SRC_URI:append = " \
3 file://0001-Add-support-for-3-planar-YUV444P-8bpc.patch \
4 file://0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch \
5 "
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules b/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules
index 4643ad37..1e0008a0 100644
--- a/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules
+++ b/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules
@@ -5,3 +5,6 @@ SUBSYSTEM=="allegro_decode_class", KERNEL=="allegroDecodeIP", MODE="0660", GROUP
5# Xilinx Video DMA driver 5# Xilinx Video DMA driver
6SUBSYSTEM=="char", KERNEL=="dmaproxy", MODE="0660", GROUP="video" 6SUBSYSTEM=="char", KERNEL=="dmaproxy", MODE="0660", GROUP="video"
7 7
8# Xilinx SyncIP driver
9SUBSYSTEM=="xlnxsync", KERNEL=="xlnxsync0", MODE="0660", GROUP="video"
10
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb
new file mode 100644
index 00000000..35dffb16
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Linux kernel module for Video Code Unit"
2DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices"
3SECTION = "kernel/modules"
4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a"
6
7XILINX_VCU_VERSION = "1.0.0"
8PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
9
10S = "${WORKDIR}/git"
11
12FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
13
14BRANCH = "master"
15REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https"
16SRCREV = "2ae83fc79f8a2db74be65883583cc6ad32d245e5"
17
18BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
19SRC_URI = " \
20 ${REPO};${BRANCHARG} \
21 file://99-vcu-enc-dec.rules \
22 "
23
24inherit module features_check
25
26REQUIRED_MACHINE_FEATURES = "vcu"
27
28EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
29
30RDEPENDS:${PN} = "vcu-firmware"
31
32KERNEL_MODULE_AUTOLOAD += "dmaproxy"
33
34do_install:append() {
35 install -d ${D}${sysconfdir}/udev/rules.d
36 install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/
37}
38
39FILES:${PN} = "${sysconfdir}/udev/rules.d/*"
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb
new file mode 100644
index 00000000..420fdf1d
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb
@@ -0,0 +1,50 @@
1SUMMARY = "OpenMAX Integration layer for VCU"
2DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5
6XILINX_VCU_VERSION = "1.0.0"
7PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
8
9BRANCH ?= "master"
10REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https"
11SRCREV = "01e45e0ac2f869cd46286307ae94d19010fd46df"
12
13BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
14SRC_URI = "${REPO};${BRANCHARG}"
15
16S = "${WORKDIR}/git"
17
18inherit features_check
19
20REQUIRED_MACHINE_FEATURES = "vcu"
21
22PACKAGE_ARCH = "${MACHINE_ARCH}"
23
24DEPENDS = "libvcu-xlnx"
25RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx"
26
27EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include"
28
29EXTRA_OEMAKE = " \
30 CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \
31 EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \
32 "
33
34do_install() {
35 install -d ${D}${libdir}
36 install -d ${D}${includedir}/vcu-omx-il
37
38 install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il
39
40 oe_runmake install INSTALL_PATH=${D}${bindir}
41
42 oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/
43 oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/
44 oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/
45}
46
47# These libraries shouldn't get installed in world builds unless something
48# explicitly depends upon them.
49
50EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb
new file mode 100644
index 00000000..ac7e4aa3
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb
@@ -0,0 +1,41 @@
1SUMMARY = "Control Software for VCU"
2DESCRIPTION = "Control software libraries, test applications and headers provider for VCU"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5
6XILINX_VCU_VERSION = "1.0.0"
7PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
8
9BRANCH ?= "master"
10REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https"
11SRCREV = "918ec1e87c67b2746fe0f2bfa9f1503d307b9bc2"
12
13BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
14SRC_URI = "${REPO};${BRANCHARG}"
15
16S = "${WORKDIR}/git"
17
18inherit features_check
19
20REQUIRED_MACHINE_FEATURES = "vcu"
21
22RDEPENDS:${PN} = "kernel-module-vcu"
23
24EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'"
25
26do_install() {
27 install -d ${D}${libdir}
28 install -d ${D}${includedir}/vcu-ctrl-sw/include
29
30 oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include INSTALL_PATH=${D}/${bindir}
31 oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/
32 oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/
33}
34
35# These libraries shouldn't get installed in world builds unless something
36# explicitly depends upon them.
37
38EXCLUDE_FROM_WORLD = "1"
39
40# Disable buildpaths QA check warnings.
41INSANE_SKIP:${PN} += "buildpaths"
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb
new file mode 100644
index 00000000..cc6cd5bb
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Firmware for VCU"
2DESCRIPTION = "Firmware binaries provider for VCU"
3LICENSE = "Proprietary"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9bef8aa9d1eba8aca1b7dffdef500262"
5
6XILINX_VCU_VERSION = "1.0.0"
7PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}"
8
9S = "${WORKDIR}/git"
10
11BRANCH ?= "master"
12REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https"
13SRCREV = "ffe29273f378619a711aa10664612e6c660ee590"
14
15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
16SRC_URI = "${REPO};${BRANCHARG}"
17
18inherit features_check
19
20REQUIRED_MACHINE_FEATURES = "vcu"
21
22do_install() {
23 install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}${nonarch_base_libdir}/firmware/al5d_b.fw
24 install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}${nonarch_base_libdir}/firmware/al5d.fw
25 install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}${nonarch_base_libdir}/firmware/al5e_b.fw
26 install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}${nonarch_base_libdir}/firmware/al5e.fw
27}
28
29# Inhibit warnings about files being stripped
30INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
31INHIBIT_PACKAGE_STRIP = "1"
32FILES:${PN} = "${nonarch_base_libdir}/firmware/*"
33
34# These libraries shouldn't get installed in world builds unless something
35# explicitly depends upon them.
36EXCLUDE_FROM_WORLD = "1"
37
38INSANE_SKIP:${PN} = "ldflags"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb
index 9b835490..df943bc6 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb
@@ -28,10 +28,6 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
28 28
29RDEPENDS:${PN} = "vdu-firmware" 29RDEPENDS:${PN} = "vdu-firmware"
30 30
31COMPATIBLE_MACHINE = "^$"
32COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
33COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
34
35PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 31PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
36 32
37do_install:append() { 33do_install:append() {
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb
index 1c9ba8ad..6856ec3a 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb
@@ -28,10 +28,6 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
28 28
29RDEPENDS:${PN} = "vdu-firmware" 29RDEPENDS:${PN} = "vdu-firmware"
30 30
31COMPATIBLE_MACHINE = "^$"
32COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
33COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
34
35PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 31PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
36 32
37do_install:append() { 33do_install:append() {
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb
new file mode 100644
index 00000000..0e3afbc1
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Linux kernel module for Video Decode Unit"
2DESCRIPTION = "Out-of-tree VDU decoder common kernel modules"
3SECTION = "kernel/modules"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a"
6
7XILINX_VDU_VERSION = "1.0.0"
8PV =. "${XILINX_VDU_VERSION}-xilinx-v"
9PV .= "+git${SRCPV}"
10
11S = "${WORKDIR}/git"
12FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
13
14BRANCH ?= "master"
15REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https"
16SRCREV ?= "1529b6aaf784fb5e1cafb11c949c3cb3c69d1dfd"
17
18BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
19SRC_URI = "${REPO};${BRANCHARG} \
20 file://99-vdu-enc-dec.rules \
21"
22
23inherit module features_check
24
25REQUIRED_MACHINE_FEATURES = "vdu"
26
27EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}"
28
29RDEPENDS:${PN} = "vdu-firmware"
30
31PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
32
33do_install:append() {
34 install -d ${D}${sysconfdir}/udev/rules.d
35 install -m 0644 ${WORKDIR}/99-vdu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/
36}
37
38FILES:${PN} = "${sysconfdir}/udev/rules.d/*"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb
index f9228678..c553d99b 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb
@@ -22,10 +22,6 @@ SRC_URI = "${REPO};${BRANCHARG} \
22 22
23S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
24 24
25COMPATIBLE_MACHINE = "^$"
26COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
27COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
28
29PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 25PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
30 26
31RDEPENDS:${PN} = "kernel-module-vdu" 27RDEPENDS:${PN} = "kernel-module-vdu"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb
index f8b36a93..5c47a81e 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb
@@ -22,10 +22,6 @@ SRC_URI = "${REPO};${BRANCHARG} \
22 22
23S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
24 24
25COMPATIBLE_MACHINE = "^$"
26COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
27COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
28
29PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 25PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
30 26
31RDEPENDS:${PN} = "kernel-module-vdu" 27RDEPENDS:${PN} = "kernel-module-vdu"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb
new file mode 100644
index 00000000..09a06c3e
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb
@@ -0,0 +1,41 @@
1SUMMARY = "Control Software for VDU"
2DESCRIPTION = "Control software libraries, test applications and headers provider for VDU"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5
6XILINX_VDU_VERSION = "1.0.0"
7PV =. "${XILINX_VDU_VERSION}-xilinx-v"
8PV .= "+git${SRCPV}"
9
10inherit autotools features_check
11
12REQUIRED_MACHINE_FEATURES = "vdu"
13
14BRANCH ?= "master"
15REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https"
16SRCREV ?= "db37dc935785dff57a52eabc41ac0bf26b0a1707"
17
18BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
19SRC_URI = "${REPO};${BRANCHARG}"
20
21S = "${WORKDIR}/git"
22
23PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
24
25RDEPENDS:${PN} = "kernel-module-vdu"
26
27do_compile[dirs] = "${S}"
28do_install[dirs] = "${S}"
29
30EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'"
31EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}"
32
33do_install:append() {
34
35 oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/
36}
37
38# These libraries shouldn't get installed in world builds unless something
39# explicitly depends upon them.
40
41EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb
index b3c02ca2..f501212d 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb
@@ -21,10 +21,6 @@ inherit autotools features_check
21 21
22REQUIRED_MACHINE_FEATURES = "vdu" 22REQUIRED_MACHINE_FEATURES = "vdu"
23 23
24COMPATIBLE_MACHINE = "^$"
25COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
26COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
27
28PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 24PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
29 25
30DEPENDS = "libvdu-ctrlsw" 26DEPENDS = "libvdu-ctrlsw"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb
index 04860b79..fe66c20c 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb
@@ -21,10 +21,6 @@ inherit autotools features_check
21 21
22REQUIRED_MACHINE_FEATURES = "vdu" 22REQUIRED_MACHINE_FEATURES = "vdu"
23 23
24COMPATIBLE_MACHINE = "^$"
25COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
26COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
27
28PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 24PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
29 25
30DEPENDS = "libvdu-ctrlsw" 26DEPENDS = "libvdu-ctrlsw"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb
new file mode 100644
index 00000000..51a03803
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb
@@ -0,0 +1,50 @@
1SUMMARY = "OpenMAX Integration layer for VDU"
2DESCRIPTION = "OMX IL Libraries,test application and headers for VDU"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5
6XILINX_VDU_VERSION = "1.0.0"
7PV =. "${XILINX_VDU_VERSION}-xilinx-v"
8PV .= "+git${SRCPV}"
9
10BRANCH ?= "master"
11REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https"
12SRCREV ?= "a116b0729ace66117ccb7c2aca125c33994b0f41"
13
14BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
15SRC_URI = "${REPO};${BRANCHARG} \
16 "
17S = "${WORKDIR}/git"
18
19inherit autotools features_check
20
21REQUIRED_MACHINE_FEATURES = "vdu"
22
23PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
24
25DEPENDS = "libvdu-ctrlsw"
26RDEPENDS:${PN} = "kernel-module-vdu libvdu-ctrlsw"
27
28EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include"
29
30do_compile[dirs] = "${S}"
31do_install[dirs] = "${S}"
32
33EXTRA_OEMAKE = " \
34 CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \
35 EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \
36 INSTALL_PATH=${D}${bindir} \
37 INCLUDE_INST_PATH=${D}${includedir} \
38 "
39
40do_install:append() {
41 install -d ${D}${libdir}
42
43 oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/
44 oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/
45}
46
47# These libraries shouldn't get installed in world builds unless something
48# explicitly depends upon them.
49
50EXCLUDE_FROM_WORLD = "1"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb
index 419dd681..bdb4a7be 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb
@@ -20,10 +20,6 @@ SRCREV ?= "63fe2fce6e46d5bf03e33300a58a37d8568722ee"
20BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 20BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
21SRC_URI = "${REPO};${BRANCHARG}" 21SRC_URI = "${REPO};${BRANCHARG}"
22 22
23COMPATIBLE_MACHINE = "^$"
24COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
25COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
26
27PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 23PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
28EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" 24EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware"
29 25
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb
index ade73a4e..b60b66c2 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb
@@ -20,10 +20,6 @@ SRCREV ?= "731897772730178f6a4e77eedeb4fb53faa1ab4d"
20BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 20BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
21SRC_URI = "${REPO};${BRANCHARG}" 21SRC_URI = "${REPO};${BRANCHARG}"
22 22
23COMPATIBLE_MACHINE = "^$"
24COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
25COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge"
26
27PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" 23PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
28EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" 24EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware"
29 25
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb
new file mode 100644
index 00000000..42806ea4
--- /dev/null
+++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Firmware for VDU"
2DESCRIPTION = "Firmware binaries provider for VDU"
3LICENSE = "Proprietary"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=722a9d20bf58ac06585a6d91ee36e60e"
5
6XILINX_VDU_VERSION = "1.0.0"
7PV =. "${XILINX_VDU_VERSION}-xilinx-v"
8PV .= "+git${SRCPV}"
9
10S = "${WORKDIR}/git"
11
12inherit autotools features_check
13
14REQUIRED_MACHINE_FEATURES = "vdu"
15
16BRANCH ?= "master"
17REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https"
18SRCREV ?= "7c4662d0f5b514cbb0b9890bc3011d9450bf3661"
19
20BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
21SRC_URI = "${REPO};${BRANCHARG}"
22
23PACKAGE_ARCH = "${SOC_FAMILY_ARCH}"
24EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware"
25
26do_compile[noexec] = "1"
27do_install[dirs] = "${S}"
28
29# Inhibit warnings about files being stripped
30INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
31INHIBIT_PACKAGE_STRIP = "1"
32FILES:${PN} = "${nonarch_base_libdir}/firmware/*"
33
34# These libraries shouldn't get installed in world builds unless something
35# explicitly depends upon them.
36EXCLUDE_FROM_WORLD = "1"
37
38INSANE_SKIP:${PN} = "ldflags"
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch
deleted file mode 100644
index c7d4aefd..00000000
--- a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch
+++ /dev/null
@@ -1,370 +0,0 @@
1From 1128691f6e2709b44eccafb0b303b07da55a814e Mon Sep 17 00:00:00 2001
2From: Christian Kohn <chris.kohn@amd.com>
3Date: Mon, 17 Oct 2022 19:28:22 -0700
4Subject: [PATCH] Add initial support for Xilinx OEM FRU records
5
6The supported Xilinx OEM FRU records are MAC_ID and FREE_FORM. This FRU OEM
7extension parses these records and prints them with proper formatting.
8
9To use this feature, run the ipmi-fru command as follows:
10$ sudo ./ipmi-fru --fru-file=/sys/devices/platform/axi/ff030000.i2c/i2c-1/1-0051/eeprom \
11 --interpret-oem-data
12
13Note: The EEPROM address can vary between different platforms. This is just an
14 example.
15
16This feature has been tested with the Xilinx Kria KV260 and KR260 Starter Kits.
17
18Signed-off-by: Christian Kohn <chris.kohn@amd.com>
19---
20 ipmi-fru/Makefile.am | 2 +
21 ipmi-fru/ipmi-fru-oem-xilinx.c | 171 ++++++++++++++++++
22 ipmi-fru/ipmi-fru-oem-xilinx.h | 33 ++++
23 ipmi-fru/ipmi-fru-output.c | 14 ++
24 libfreeipmi/include/freeipmi/freeipmi.h.in | 1 +
25 .../oem/ipmi-fru-xilinx-oem-record-format.h | 45 +++++
26 .../spec/ipmi-iana-enterprise-numbers-spec.h | 1 +
27 7 files changed, 267 insertions(+)
28 create mode 100644 ipmi-fru/ipmi-fru-oem-xilinx.c
29 create mode 100644 ipmi-fru/ipmi-fru-oem-xilinx.h
30 create mode 100644 libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h
31
32diff --git a/ipmi-fru/Makefile.am b/ipmi-fru/Makefile.am
33index c92ba0e8c..c8545eede 100644
34--- a/ipmi-fru/Makefile.am
35+++ b/ipmi-fru/Makefile.am
36@@ -25,6 +25,8 @@ ipmi_fru_SOURCES = \
37 ipmi-fru-argp.h \
38 ipmi-fru-oem-wistron.c \
39 ipmi-fru-oem-wistron.h \
40+ ipmi-fru-oem-xilinx.c \
41+ ipmi-fru-oem-xilinx.h \
42 ipmi-fru-output.c \
43 ipmi-fru-output.h
44
45diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c
46new file mode 100644
47index 000000000..87bb18f00
48--- /dev/null
49+++ b/ipmi-fru/ipmi-fru-oem-xilinx.c
50@@ -0,0 +1,171 @@
51+/*
52+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
53+ *
54+ * This program is free software: you can redistribute it and/or modify
55+ * it under the terms of the GNU General Public License as published by
56+ * the Free Software Foundation, either version 3 of the License, or
57+ * (at your option) any later version.
58+ *
59+ * This program is distributed in the hope that it will be useful,
60+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
61+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62+ * GNU General Public License for more details.
63+ *
64+ * You should have received a copy of the GNU General Public License
65+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
66+ *
67+ */
68+
69+#if HAVE_CONFIG_H
70+#include "config.h"
71+#endif /* HAVE_CONFIG_H */
72+
73+#include <stdio.h>
74+#include <stdlib.h>
75+#if STDC_HEADERS
76+#include <string.h>
77+#endif /* STDC_HEADERS */
78+#include <assert.h>
79+
80+#include <freeipmi/freeipmi.h>
81+
82+#include "ipmi-fru_.h"
83+#include "ipmi-fru-oem-xilinx.h"
84+
85+#include "freeipmi-portability.h"
86+
87+static char *
88+_version_str (uint8_t version)
89+{
90+ switch (version)
91+ {
92+ case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD:
93+ return "Board";
94+ case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL:
95+ return "System Controller";
96+ case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE:
97+ return "Module";
98+ case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC:
99+ return "DUT - MAC";
100+ case IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT:
101+ return "DUT - EtherCAT";
102+ default:
103+ return "";
104+ }
105+
106+ return (NULL); /* NOT REACHED */
107+}
108+
109+int
110+ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data,
111+ uint8_t record_type_id,
112+ uint32_t manufacturer_id,
113+ uint8_t *oem_data,
114+ unsigned int oem_data_len)
115+{
116+ assert (state_data);
117+ assert (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_XILINX);
118+ assert (oem_data);
119+
120+ /* The MAC_ID record type ID is 0xD2. The MAC ID record consists of a 1 byte
121+ * version ID followed by one or more 6-byte MAC addresses. If the MAC ID
122+ * version is set to "DUT - EtherCAT", a 4-byte EtherCAT ID is used instead of
123+ * a 6-byte MAC address.
124+ */
125+ if (record_type_id == IPMI_FRU_OEM_XILINX_MAC_ID && oem_data_len)
126+ {
127+ uint8_t version = oem_data[0];
128+ unsigned int len = oem_data_len - 1;
129+
130+ pstdout_printf (state_data->pstate,
131+ " FRU OEM MAC Version: %s (%xh)\n",
132+ _version_str(version),
133+ version);
134+
135+ /* The MAC_ID record can hold multiple MAC addresses that are 6 bytes long
136+ * each if version is set to 0x31.
137+ */
138+ if ((version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD ||
139+ version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL ||
140+ version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE ||
141+ version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC ) &&
142+ (len % 6) == 0)
143+ {
144+ unsigned int i, j, start, stop;
145+ unsigned int mac_cnt = len / 6;
146+
147+ for (j = 0; j < mac_cnt; j++)
148+ {
149+ pstdout_printf (state_data->pstate, " FRU OEM MAC ID %d: ", j);
150+
151+ start = j*6 + 1;
152+ stop = start + 5;
153+
154+ for (i = start; i < stop; i++)
155+ {
156+ pstdout_printf (state_data->pstate, "%02x:", oem_data[i]);
157+ }
158+
159+ pstdout_printf (state_data->pstate, "%02x\n", oem_data[i]);
160+ }
161+
162+ return (1);
163+ }
164+
165+ /* The MAC_ID record holds one EtherCAT ID that is 4 bytes long if version
166+ * is set to 0x32. The assigned EtherCAT ID for Xilinx is 0x0000056F.
167+ */
168+ if (version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT &&
169+ len == 4)
170+ {
171+ pstdout_printf (state_data->pstate, " FRU OEM EtherCAT ID: 0x");
172+
173+ for (unsigned int i = 1; i < len+1; i++)
174+ {
175+ pstdout_printf (state_data->pstate, "%02X", oem_data[i]);
176+ }
177+
178+ pstdout_printf (state_data->pstate, "\n");
179+
180+ return (1);
181+ }
182+ }
183+
184+ /* The free form data record type ID is 0xD3. It consists of one or more
185+ * fields where each field is split into N byte identifier and M byte data
186+ * followed by a 0x00 end of field delimiter. The below code parses the free
187+ * form record and prints each field on a new line prefixed with 'FRU OEM '.
188+ */
189+ if (record_type_id == IPMI_FRU_OEM_XILINX_FREE_FORM && oem_data_len)
190+ {
191+ unsigned int i;
192+ unsigned int new_field = 1;
193+
194+ for (i = 0; i < oem_data_len; i++)
195+ {
196+ /* 0x00 marks the end of the field */
197+ if (oem_data[i] == 0)
198+ {
199+ if (new_field == 0)
200+ {
201+ pstdout_printf (state_data->pstate, "\n");
202+ }
203+ new_field = 1;
204+ continue;
205+ }
206+
207+ /* Start of a new field */
208+ if (new_field == 1)
209+ {
210+ new_field = 0;
211+ pstdout_printf (state_data->pstate, " FRU OEM ");
212+ }
213+
214+ pstdout_printf (state_data->pstate, "%c", oem_data[i]);
215+ }
216+
217+ return (1);
218+ }
219+
220+ return (0);
221+}
222diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.h b/ipmi-fru/ipmi-fru-oem-xilinx.h
223new file mode 100644
224index 000000000..2484cd515
225--- /dev/null
226+++ b/ipmi-fru/ipmi-fru-oem-xilinx.h
227@@ -0,0 +1,33 @@
228+/*
229+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
230+ *
231+ * This program is free software: you can redistribute it and/or modify
232+ * it under the terms of the GNU General Public License as published by
233+ * the Free Software Foundation, either version 3 of the License, or
234+ * (at your option) any later version.
235+ *
236+ * This program is distributed in the hope that it will be useful,
237+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
238+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
239+ * GNU General Public License for more details.
240+ *
241+ * You should have received a copy of the GNU General Public License
242+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
243+ *
244+ */
245+
246+#ifndef IPMI_FRU_OEM_XILINX_H
247+#define IPMI_FRU_OEM_XILINX_H
248+
249+#include <freeipmi/freeipmi.h>
250+
251+#include "ipmi-fru_.h"
252+
253+/* Returns 1 on interpretation, 0 if not, -1 on error */
254+int ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data,
255+ uint8_t record_type_id,
256+ uint32_t manufacturer_id,
257+ uint8_t *oem_data,
258+ unsigned int oem_data_len);
259+
260+#endif /* IPMI_FRU_OEM_XILINX_H */
261diff --git a/ipmi-fru/ipmi-fru-output.c b/ipmi-fru/ipmi-fru-output.c
262index 845971018..d29c4470e 100644
263--- a/ipmi-fru/ipmi-fru-output.c
264+++ b/ipmi-fru/ipmi-fru-output.c
265@@ -51,6 +51,7 @@
266 #include "ipmi-fru_.h"
267 #include "ipmi-fru-output.h"
268 #include "ipmi-fru-oem-wistron.h"
269+#include "ipmi-fru-oem-xilinx.h"
270 #include "tool-util-common.h"
271
272 #include "freeipmi-portability.h"
273@@ -1201,6 +1202,19 @@ ipmi_fru_output_oem_record (ipmi_fru_state_data_t *state_data,
274 if (ret)
275 return (0);
276 }
277+
278+ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_XILINX)
279+ {
280+ if ((ret = ipmi_fru_oem_xilinx_oem_record (state_data,
281+ record_type_id,
282+ manufacturer_id,
283+ oem_data,
284+ oem_data_len)) < 0)
285+ return (-1);
286+
287+ if (ret)
288+ return (0);
289+ }
290 }
291
292 if (oem_data_len)
293diff --git a/libfreeipmi/include/freeipmi/freeipmi.h.in b/libfreeipmi/include/freeipmi/freeipmi.h.in
294index a03178e97..fbd6749e9 100644
295--- a/libfreeipmi/include/freeipmi/freeipmi.h.in
296+++ b/libfreeipmi/include/freeipmi/freeipmi.h.in
297@@ -82,6 +82,7 @@ extern "C" {
298 #include <freeipmi/record-format/ipmi-sdr-record-format.h>
299 #include <freeipmi/record-format/ipmi-sel-record-format.h>
300 #include <freeipmi/record-format/oem/ipmi-fru-wistron-oem-record-format.h>
301+#include <freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h>
302 #include <freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h>
303 #include <freeipmi/record-format/oem/ipmi-sdr-oem-intel-record-format.h>
304 #include <freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h>
305diff --git a/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h b/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h
306new file mode 100644
307index 000000000..434e2031a
308--- /dev/null
309+++ b/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-xilinx-oem-record-format.h
310@@ -0,0 +1,45 @@
311+/*
312+ * Copyright (C) 2022, Advanced Micro Devices, Inc.
313+ *
314+ * This program is free software: you can redistribute it and/or modify
315+ * it under the terms of the GNU General Public License as published by
316+ * the Free Software Foundation, either version 3 of the License, or
317+ * (at your option) any later version.
318+ *
319+ * This program is distributed in the hope that it will be useful,
320+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
321+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
322+ * GNU General Public License for more details.
323+ *
324+ * You should have received a copy of the GNU General Public License
325+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
326+ *
327+ */
328+
329+#ifndef IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H
330+#define IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H
331+
332+#ifdef __cplusplus
333+extern "C" {
334+#endif
335+
336+#include <freeipmi/fiid/fiid.h>
337+
338+/* OEM multi-record IDs used by Xilinx */
339+#define IPMI_FRU_OEM_XILINX_THERMAL 0xD0
340+#define IPMI_FRU_OEM_XILINX_POWER 0xD1
341+#define IPMI_FRU_OEM_XILINX_MAC_ID 0xD2
342+#define IPMI_FRU_OEM_XILINX_FREE_FORM 0xD3
343+
344+/* OEM MAC ID versions used by Xilinx */
345+#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_BOARD 0x01
346+#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_SYSCTL 0x11
347+#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_MODULE 0x21
348+#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_MAC 0x31
349+#define IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT 0x32
350+
351+#ifdef __cplusplus
352+}
353+#endif
354+
355+#endif /* IPMI_FRU_OEM_XILINX_RECORD_FORMAT_H */
356diff --git a/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h b/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h
357index d286f33a4..4c24b5259 100644
358--- a/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h
359+++ b/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h
360@@ -29,6 +29,7 @@ extern "C" {
361 #define IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS 42
362 #define IPMI_IANA_ENTERPRISE_ID_INTEL 343
363 #define IPMI_IANA_ENTERPRISE_ID_DELL 674
364+#define IPMI_IANA_ENTERPRISE_ID_XILINX 4314
365 #define IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES 5593
366 #define IPMI_IANA_ENTERPRISE_ID_QUANTA 7244
367 #define IPMI_IANA_ENTERPRISE_ID_FUJITSU 10368
368--
3692.17.1
370
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch
deleted file mode 100644
index c0f36405..00000000
--- a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From c578c999b7d9aabbd6e54b0310a609b8f96ae962 Mon Sep 17 00:00:00 2001
2From: Albert Chu <chu11@llnl.gov>
3Date: Tue, 8 Nov 2022 16:33:39 -0800
4Subject: [PATCH] ipmi-fru: fix compilation for non C99 compilation
5
6---
7 ipmi-fru/ipmi-fru-oem-xilinx.c | 4 +++-
8 1 file changed, 3 insertions(+), 1 deletion(-)
9
10diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c
11index 87bb18f00..937aa7614 100644
12--- a/ipmi-fru/ipmi-fru-oem-xilinx.c
13+++ b/ipmi-fru/ipmi-fru-oem-xilinx.c
14@@ -118,9 +118,11 @@ ipmi_fru_oem_xilinx_oem_record (ipmi_fru_state_data_t *state_data,
15 if (version == IPMI_FRU_OEM_XILINX_MAC_ID_VERSION_DUT_ETHERCAT &&
16 len == 4)
17 {
18+ unsigned int i;
19+
20 pstdout_printf (state_data->pstate, " FRU OEM EtherCAT ID: 0x");
21
22- for (unsigned int i = 1; i < len+1; i++)
23+ for (i = 1; i < len+1; i++)
24 {
25 pstdout_printf (state_data->pstate, "%02X", oem_data[i]);
26 }
27--
282.17.1
29
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb b/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb
index db4f25b4..0da7b6f6 100644
--- a/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb
+++ b/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb
@@ -31,10 +31,8 @@ LIC_FILES_CHKSUM = " \
31BRANCH ?= "freeipmi-1-6-0-stable" 31BRANCH ?= "freeipmi-1-6-0-stable"
32SRC_URI = " \ 32SRC_URI = " \
33 git://git.savannah.gnu.org/git/freeipmi.git;protocol=https;branch=${BRANCH} \ 33 git://git.savannah.gnu.org/git/freeipmi.git;protocol=https;branch=${BRANCH} \
34 file://0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch \
35 file://0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch \
36 " 34 "
37SRCREV ?= "1f7eea294c2967802019100b07cf1e44b3160a2b" 35SRCREV ?= "816a69eb15a9034351381211d9cd15de81da10c7"
38 36
39S = "${WORKDIR}/git" 37S = "${WORKDIR}/git"
40 38
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb
new file mode 100644
index 00000000..e0edbb7b
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil"
2DESCRIPTION = "Native build of xclbinutil using XRT codebase"
3
4require xrt.inc
5
6FILESEXTRAPATHS:append := ":${THISDIR}/xrt"
7
8LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT"
9LIC_FILES_CHKSUM = " \
10 file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \
11 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \
12 file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
13 file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
14 file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
15 file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 \
16"
17
18S = "${WORKDIR}/git/src"
19
20inherit cmake pkgconfig native
21
22DEPENDS = "libdrm-native ocl-icd-native boost-native rapidjson-native protobuf-native python3-pybind11-native systemtap-native"
23
24EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMANDS=ON"
25
26do_install() {
27 install -d ${D}${bindir}
28 install -Dm 0755 ${WORKDIR}/build/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir}
29}
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc
index 14b2b968..89dc87cc 100644
--- a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc
@@ -2,9 +2,9 @@ REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https"
2BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 2BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
3SRC_URI = "${REPO};${BRANCHARG};name=xrt" 3SRC_URI = "${REPO};${BRANCHARG};name=xrt"
4 4
5BRANCH= "2023.2" 5BRANCH= "master"
6SRCREV_xrt = "2865a62b6a417dea523d2d5646154aa94a2cbc28" 6SRCREV_xrt = "8426f5733c01018acbd8d12745bc9e5ffc4535e6"
7PV = "202320.2.16.0" 7PV = "202320.2.17.0"
8 8
9SRC_URI += "git://github.com/Xilinx/dma_ip_drivers.git;branch=master;name=dma_ip_drivers;destsuffix=git/src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma;protocol=https" 9SRC_URI += "git://github.com/Xilinx/dma_ip_drivers.git;branch=master;name=dma_ip_drivers;destsuffix=git/src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma;protocol=https"
10SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" 10SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578"
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch
new file mode 100644
index 00000000..f2f63470
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch
@@ -0,0 +1,17 @@
1diff --git a/src/runtime_src/xdp/profile/plugin/CMakeLists.txt b/src/runtime_src/xdp/profile/plugin/CMakeLists.txt
2index 8ef7a2f..9b8baac 100644
3--- a/src/runtime_src/xdp/profile/plugin/CMakeLists.txt
4+++ b/src/runtime_src/xdp/profile/plugin/CMakeLists.txt
5@@ -33,9 +33,9 @@ if (NOT WIN32)
6 # =========================================================
7 # The plugins to be built on Linux only
8 # =========================================================
9-add_subdirectory(aie_status)
10-add_subdirectory(aie_profile)
11-add_subdirectory(aie_trace)
12+#add_subdirectory(aie_status)
13+#add_subdirectory(aie_profile)
14+#add_subdirectory(aie_trace)
15 add_subdirectory(device_offload/hw_emu)
16 add_subdirectory(noc)
17 add_subdirectory(power)
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb
index ef3c7172..bd6f3796 100644
--- a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Xilinx Runtime User Space Libraries and headers"
3 3
4require xrt.inc 4require xrt.inc
5 5
6SRC_URI += "file://xrt-cstdint.patch;striplevel=2" 6SRC_URI += "file://disable_aie_profiling.patch;striplevel=2"
7 7
8LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" 8LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT"
9LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ 9LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \
@@ -24,7 +24,7 @@ inherit cmake pkgconfig
24BBCLASSEXTEND = "native nativesdk" 24BBCLASSEXTEND = "native nativesdk"
25 25
26# util-linux is for libuuid-dev. 26# util-linux is for libuuid-dev.
27DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson" 27DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap"
28RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" 28RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})"
29 29
30EXTRA_OECMAKE += " \ 30EXTRA_OECMAKE += " \
diff --git a/meta-xilinx-standalone-experimental/README.md b/meta-xilinx-standalone-experimental/README.md
index 31aa0f63..1c80dc8f 100644
--- a/meta-xilinx-standalone-experimental/README.md
+++ b/meta-xilinx-standalone-experimental/README.md
@@ -1,44 +1,150 @@
1# meta-xilinx-standalone-experimental 1# meta-xilinx-standalone-experimental
2 2
3This layer contains experimental items that may eventually be added 3This layer contains experimental items that may eventually be added to the
4to the meta-xilinx-standalone layer. The components in this layer 4meta-xilinx-standalone layer. The components in this layer may or may not be
5may or may not be buildable as they may require unreleased code. 5buildable as they may require unreleased code.
6 6
7The non-Linux software components are still in development and 7The non-Linux software components are still in development and this should be
8this should be considered to be a preview release only. For instance, 8considered to be a preview release only. For instance, some components may not
9some components may not be buildable, expect APIs to change on various 9be buildable, expect APIs to change on various parts and pieces.
10parts and pieces.
11 10
12## Build Instructions 11## Build Instructions
13 12
14**Note:** to use this layer you must REMOVE meta-xilinx-tools from your 13> **Note:**
15project. meta-xilinx-tools is not compatible with this experimental 14> * To use this layer you must REMOVE meta-xilinx-tools from your project.
16approach. You may also have to remove other layers that depend 15meta-xilinx-tools is not compatible with this experimental approach. You may
17on meta-xilinx-tools, such as meta-kria and meta-system-controller. 16also have to remove other layers that depend on meta-xilinx-tools, such as
17meta-kria and meta-system-controller.
18> * To use the experimental version of the embedded software (firmware) as well
19as system configuration, you must build through gen-machineconf tool. This tool
20is passed a output of system device tree directory.
18 21
19To use the experimental version of the embedded software (firmware) 22The Yocto Project setup for the System Device Tree (SDT) workflow is as follows.
20as well as system configuration, you must build the 'meta-xilinx-setup' 23Be sure to read everything below.
21SDK. This SDK is passed a device tree, constructed from System Device tree and 24
22produces a number of configuration files. 251. Follow [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md)
26 upto step 4.
27
282. Remove meta-xilinx-tools and meta-xilinx-tools dependency layers(such as
29 meta-kria and meta-system-controller if included in bblayers.conf), then add
30 the meta-xilinx-standalone-experimental layer.
31
32> **Note:** SDT builds for following devices are not supported in 2024.1 release.
33> * Zynq 7000
34> * MicoBlaze
35> * Kria
36> * System Controller
23 37
241. Remove meta-xilinx-tools, meta-kria and meta-system-controller, then add the decoupling layer
25``` 38```
26$ bitbake-layers remove-layer meta-xilinx-tools 39$ bitbake-layers remove-layer meta-xilinx-tools
27$ bitbake-layers remove-layer meta-kria 40$ bitbake-layers remove-layer meta-kria
28$ bitbake-layers remove-layer meta-system-controller 41$ bitbake-layers remove-layer meta-system-controller
29$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-experimental 42$ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-experimental
30``` 43```
312. Build the setup SDK 44
453. Export gen-machineconf tool.
32``` 46```
33$ bitbake meta-xilinx-setup 47$ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf
34``` 48```
353. Install the setup SDK: 49
504. Run the script from the build or ${TOPDIR} directory. This step describes
51 System Device Tree (SDT) with and without pl overlays. Configruations are same
52 for both SDT with and without pl overlays except for linux dts content.
53
54> **Note:**
55> 1. The -l option will automatically add the necessary parameters to the
56 local.conf file. If you need to re-run this comment, you just clear the
57 parameters from the end of the file. Without the -l option the items are
58 printed to the screen and must be manually added to your conf/local.conf
59> 2. The --soc-family argument is an optional argument and user can skip this.
60> 3. By default minimal set of multiconfigs are generated by gen-machineconf tool.
61> To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use
62> `--multiconfigfull` option.
63
64 a. Without SDT pl overlay:
36``` 65```
37$ .${TMPDIR}/tmp/deploy/sdk/x86_64-xilinx-nativesdk-prestep-2023.2....sh -d prestep -y 66 $ gen-machineconf --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf
67```
68
69 b. With SDT pl overlay:
70 To generate SDT pl overlay run gen-machineconf command with
71 `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully
72 pl.dtsi will be generated under <conf>/dts/${MACHINE}/pl-overlay-{full|dfx}
73 directory. User can use this pl.dtsi as input to full or dfx static firmware
74 recipes.
75
76> **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User
77> needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output
78> artifacts to DFx partial firmware recipes.
79
80 * ZynqMP Full bitstream or Versal Segmented Configuration:
81```
82 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g full
83```
84
85 * ZynqMP or Versal DFx:
86```
87 $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g dfx
88```
89
90For example, zynqmp:
38``` 91```
92$ gen-machineconf --soc-family zynqmp --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf
93```
94The following will be written to the end of the conf/local.conf file:
95
96```
97# Use the newly generated MACHINE
98MACHINE = "xlnx-zynqmp-zcu102-rev1-0"
99
100# Avoid errors in some baremetal configs as these layers may be present
101# but are not used. Note the following lines are optional and can be
102# safetly disabled.
103SKIP_META_VIRT_SANITY_CHECK = "1"
104SKIP_META_SECURITY_SANITY_CHECK = "1"
105SKIP_META_TPM_SANITY_CHECK = "1"
106
107# Each generated multiconfig defines it's own TMPDIR, either edit the
108# multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below
109#MC_TMPDIR_PREFIX = "${TOPDIR}/tmp"
110```
111
112For example, versal:
113```
114$ gen-machineconf --soc-family versal --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf
115```
116
117The following will be written to the end of the conf/local.conf file:
118
119```
120# Use the newly generated MACHINE
121MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva"
122
123# Avoid errors in some baremetal configs as these layers may be present
124# but are not used. Note the following lines are optional and can be
125# safetly disabled.
126SKIP_META_VIRT_SANITY_CHECK = "1"
127SKIP_META_SECURITY_SANITY_CHECK = "1"
128SKIP_META_TPM_SANITY_CHECK = "1"
129
130# Each generated multiconfig defines it's own TMPDIR, either edit the
131# multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below
132#MC_TMPDIR_PREFIX = "${TOPDIR}/tmp"
133```
134> **Bitbake Performance Note:**
135Each BBMULTICONFIG value requires all of the recipes to be parsed for that
136configuration. Thus each multiconfig will add more parsing time. A long list
137can lead to a very slow parse (many minutes). To speed up parsing, it is
138suggested that you trim this down to only the configurations you require.
139A minimum configuration is included with the generated configuration.
140
39 141
40Then follow the instructions in the 'prestep/README-setup' file. 1425. Build your project, You should now be able to build your project normally.
143 See the Yocto Project documentation if you have questions on how to work with
144 the multiconfig recipes. The following is a simple build for testing.
41 145
1466. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md)
147 from step 6.
42 148
43## Dependencies 149## Dependencies
44 150
@@ -58,3 +164,5 @@ This layer depends on:
58 layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone 164 layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone
59 branch: langdale or amd xilinx release version (e.g. rel-v2023.1) 165 branch: langdale or amd xilinx release version (e.g. rel-v2023.1)
60 166
167 URI: https://git.yoctoproject.org/meta-virtualization
168 branch: langdale
diff --git a/meta-xilinx-standalone-experimental/classes/esw.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw.bbclass
index febdebad..f13df66b 100644
--- a/meta-xilinx-standalone-experimental/classes/esw.bbclass
+++ b/meta-xilinx-standalone-experimental/classes-recipe/esw.bbclass
@@ -2,9 +2,6 @@ PV = "${ESW_VER}"
2 2
3inherit python3native xlnx-embeddedsw pkgconfig cmake 3inherit python3native xlnx-embeddedsw pkgconfig cmake
4 4
5# Override xlnx-embeddedsw with out version
6require conf/dtb-embeddedsw.inc
7
8SRCREV_FORMAT = "src_decouple" 5SRCREV_FORMAT = "src_decouple"
9 6
10S = "${WORKDIR}/git" 7S = "${WORKDIR}/git"
@@ -35,37 +32,43 @@ do_configure[depends] += "device-tree:do_deploy"
35do_compile[depends] += "device-tree:do_deploy" 32do_compile[depends] += "device-tree:do_deploy"
36do_install[depends] += "device-tree:do_deploy" 33do_install[depends] += "device-tree:do_deploy"
37 34
38def get_xlnx_cmake_machine(fam, d): 35def get_xlnx_cmake_machine(fam, variant, d):
39 cmake_machine = fam 36 cmake_machine = fam
40 if (fam == 'zynqmp'): 37 if (fam == 'zynqmp'):
41 cmake_machine = 'ZynqMP' 38 cmake_machine = 'ZynqMP'
42 elif (fam == 'versal'): 39 elif (fam == 'versal'):
43 cmake_machine = 'Versal' 40 cmake_machine = 'Versal'
41 if (variant == 'net'):
42 cmake_machine = 'VersalNet'
44 elif (fam == 'zynq'): 43 elif (fam == 'zynq'):
45 cmake_machine = 'Zynq' 44 cmake_machine = 'Zynq'
46 return cmake_machine 45 return cmake_machine
47 46
48def get_xlnx_cmake_processor(tune, machine, d): 47def get_xlnx_cmake_processor(tune, machine, variant, d):
49 cmake_processor = tune 48 cmake_processor = tune
50 if tune.startswith('microblaze'): 49 if tune.startswith('microblaze'):
51 if (machine == 'psu_pmu_0'): 50 if (machine == 'psu_pmu_0'):
52 cmake_processor = 'pmu_microblaze' 51 cmake_processor = 'pmu_microblaze'
53 elif (machine == 'psv_pmc_0'): 52 elif (machine in [ 'psv_pmc_0', 'psx_pmc_0' ]):
54 cmake_processor = 'plm_microblaze' 53 cmake_processor = 'plm_microblaze'
55 else: 54 else:
56 cmake_processor = 'microblaze' 55 cmake_processor = 'microblaze'
57 elif tune == 'cortexr5': 56 elif (tune in [ 'cortexr5', 'cortexr5hf' ]):
58 cmake_processor = 'cortexr5' 57 cmake_processor = 'cortexr5'
58 elif (tune in [ 'cortexr52', 'cortexr52hf' ]):
59 cmake_processor = 'cortexr52'
59 elif tune.startswith('cortexa9'): 60 elif tune.startswith('cortexa9'):
60 cmake_processor = 'cortexa9' 61 cmake_processor = 'cortexa9'
61 elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]): 62 elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]):
62 cmake_processor = 'cortexa53' 63 cmake_processor = 'cortexa53'
63 elif tune == 'cortexa72': 64 elif tune == 'cortexa72':
64 cmake_processor = 'cortexa72' 65 cmake_processor = 'cortexa72'
66 if (variant == 'net'):
67 cmake_processor = 'cortexa78'
65 return cmake_processor 68 return cmake_processor
66 69
67XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d)}" 70XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d.getVar('SOC_VARIANT'), d)}"
68XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d)}" 71XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d.getVar('SOC_VARIANT'), d)}"
69XLNX_CMAKE_SYSTEM_NAME ?= "Generic" 72XLNX_CMAKE_SYSTEM_NAME ?= "Generic"
70XLNX_CMAKE_BSP_VARS ?= "" 73XLNX_CMAKE_BSP_VARS ?= ""
71 74
@@ -80,11 +83,11 @@ cmake_do_generate_toolchain_file:append() {
80 # set( CMAKE_SYSTEM_NAME `echo elf | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) 83 # set( CMAKE_SYSTEM_NAME `echo elf | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` )
81 set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) 84 set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" )
82 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake) 85 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake)
83 set( CMAKE_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR}) 86 set( CMAKE_LIBRARY_PATH ${B})
84 if ("${XLNX_CMAKE_PROCESSOR}" STREQUAL "plm_microblaze") 87 if ("${XLNX_CMAKE_PROCESSOR}" STREQUAL "plm_microblaze")
85 set( CMAKE_BUILD_TYPE Release) 88 set( CMAKE_BUILD_TYPE Release)
86 endif() 89 endif()
87 add_definitions( "${XLNX_CMAKE_BSP_VARS}" ) 90 add_definitions( "${XLNX_CMAKE_BSP_VARS} -DSDT" )
88EOF 91EOF
89} 92}
90 93
@@ -96,6 +99,15 @@ do_install() {
96} 99}
97 100
98CFLAGS:append = " ${ESW_CFLAGS}" 101CFLAGS:append = " ${ESW_CFLAGS}"
102EXTRA_OECMAKE += "-DYOCTO=ON"
103
104do_configure:prepend() {
105 (
106 cd ${S}
107 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/lib/bsp/standalone/src/ hwcmake_metadata ${S}
108 install -m 0755 StandaloneExample.cmake ${S}/cmake/Findcommonmeta.cmake
109 )
110}
99 111
100# We need to find the license file, which vaires depending on the component 112# We need to find the license file, which vaires depending on the component
101# recurse a maximum of x times, could be fancier but it gets complicated since 113# recurse a maximum of x times, could be fancier but it gets complicated since
@@ -135,9 +147,9 @@ python do_generate_driver_data() {
135 os.chdir(d.getVar('B')) 147 os.chdir(d.getVar('B'))
136 command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] 148 command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]]
137 subprocess.run(command, check = True) 149 subprocess.run(command, check = True)
138 src_file = str("x") + driver_name.replace('-', '_') + str("_g.c") 150 src_file = glob.glob('*_g.c')
139 if os.path.exists(src_file): 151 if os.path.exists(src_file[0]):
140 bb.note("Generated config file for driver %s" % driver_name) 152 bb.note("Generated config file for driver %s" % driver_name)
141 command = ["install"] + ["-m"] + ["0755"] + [src_file] + [src_dir[0]] 153 command = ["install"] + ["-m"] + ["0755"] + [src_file[0]] + [src_dir[0]]
142 subprocess.run(command, check = True) 154 subprocess.run(command, check = True)
143} 155}
diff --git a/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass
new file mode 100644
index 00000000..85b753a5
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass
@@ -0,0 +1,31 @@
1#
2# Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6# This bbclass is inherited by esw application recipes. This class provides
7# common code for elf name, bitbake install and deploy task functionality for
8# multiconfig target images.
9
10inherit deploy image-artifact-names
11
12APP_IMAGE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}"
13
14ESW_EXECUTABLE_NAME ?= ""
15
16do_install() {
17 install -d ${D}/${base_libdir}/firmware
18 # Note that we have to make the ELF executable for it to be stripped
19 install -m 0755 ${B}/${ESW_EXECUTABLE_NAME}* ${D}/${base_libdir}/firmware
20}
21
22do_deploy() {
23 # We need to deploy the stripped elf, hence why not doing it from ${D}
24 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf
25 ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf
26 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin
27 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin
28 ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin
29}
30
31addtask deploy before do_build after do_package
diff --git a/meta-xilinx-standalone-experimental/classes/esw_examples.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass
index 43e78191..9a94f3cd 100644
--- a/meta-xilinx-standalone-experimental/classes/esw_examples.bbclass
+++ b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass
@@ -7,6 +7,7 @@ do_configure:prepend() {
7 cd ${S} 7 cd ${S}
8 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} 8 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
9 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ 9 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
10 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
10 ) 11 )
11} 12}
12 13
diff --git a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc b/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc
deleted file mode 100644
index a9192f62..00000000
--- a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc
+++ /dev/null
@@ -1,11 +0,0 @@
1# The format of this file must be compatible with
2# meta-xilinx/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass
3
4# Make it clear decoupling is 'experimental' in the version
5ESW_VER = "2023_sdt_experimental"
6
7REPO = "git://github.com/Xilinx/embeddedsw-experimental-dt-support.git;protocol=https"
8
9ESW_BRANCH[2023_sdt_experimental] = "xlnx_rel_v2023.2_sdt"
10ESW_REV[2023_sdt_experimental] = "742a608800e7621fb7c376daf5124333b5826d6d"
11LIC_FILES_CHKSUM[xlnx_rel_v2023.2_sdt] = 'ce611484168a6000bd35df68fc4f4290'
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb
new file mode 100644
index 00000000..4287bb0a
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb
@@ -0,0 +1,29 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/ddr_self_refresh/src/"
4
5DEPENDS += "libxil xiltimer xilpm"
6
7ESW_EXECUTABLE_NAME = "ddr_self_refresh"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25
26addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
27do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
28
29FILES:${PN} = "${base_libdir}/firmware/ddr_self_refresh*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_2024.1.bb
index d62779ae..2c70796a 100644
--- a/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_2024.1.bb
@@ -1,11 +1,9 @@
1inherit esw deploy 1inherit esw deploy python3native
2 2
3ESW_COMPONENT_SRC = "/lib/sw_apps/empty_application/src/" 3ESW_COMPONENT_SRC = "/lib/sw_apps/empty_application/src/"
4 4
5DEPENDS += "libxil xiltimer" 5DEPENDS += "libxil xiltimer"
6 6
7inherit python3native
8
9do_configure:prepend() { 7do_configure:prepend() {
10 ( 8 (
11 cd ${S} 9 cd ${S}
@@ -24,7 +22,7 @@ EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
24 22
25inherit image-artifact-names 23inherit image-artifact-names
26 24
27CUSTOM_APP_BASE_NAME ?= "${CUSTOM_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" 25CUSTOM_APP_BASE_NAME ?= "${CUSTOM_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}"
28 26
29ESW_COMPONENT ??= "empty_application.elf" 27ESW_COMPONENT ??= "empty_application.elf"
30 28
@@ -38,8 +36,8 @@ do_install() {
38 36
39do_deploy() { 37do_deploy() {
40 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.elf 38 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.elf
41 ln -sf ${CUSTOM_APP_BASE_NAME}.elf ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}.elf 39 ln -sf ${CUSTOM_APP_BASE_NAME}.elf ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.elf
42 install -m 0644 ${B}/empty_application.bin ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.bin 40 install -m 0644 ${B}/empty_application.bin ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.bin
43 ln -sf ${CUSTOM_APP_BASE_NAME}.bin ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}.bin 41 ln -sf ${CUSTOM_APP_BASE_NAME}.bin ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.bin
44} 42}
45addtask deploy before do_build after do_install 43addtask deploy before do_build after do_install
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb
new file mode 100644
index 00000000..97d2ba0a
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb
@@ -0,0 +1,19 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_hello_world/src/"
4
5DEPENDS += "libxil xilstandalone freertos10-xilinx xiltimer"
6
7ESW_EXECUTABLE_NAME = "freertos_hello_world"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
15 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
16 )
17}
18
19FILES:${PN} = "${base_libdir}/firmware/freertos_hello_world*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb
deleted file mode 100644
index 8106684b..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb
+++ /dev/null
@@ -1,39 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_hello_world/src/"
4
5DEPENDS += "libxil xilstandalone freertos10-xilinx xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
12 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
13 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
14 )
15}
16
17do_install() {
18 install -d ${D}/${base_libdir}/firmware
19 # Note that we have to make the ELF executable for it to be stripped
20 install -m 0755 ${B}/freertos_hello_world* ${D}/${base_libdir}/firmware
21}
22
23inherit image-artifact-names
24
25FREERTOS_HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
26
27do_deploy() {
28
29 # We need to deploy the stripped elf, hence why not doing it from ${D}
30 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.elf
31 ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
32 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin
33 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.bin
34 ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
35}
36
37addtask deploy before do_build after do_package
38
39FILES:${PN} = "${base_libdir}/firmware/freertos_hello_world*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb
new file mode 100644
index 00000000..58d5b9c7
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_echo_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7ESW_EXECUTABLE_NAME = "freertos_lwip_echo_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
15 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_echo*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb
deleted file mode 100644
index f7eae1dc..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_echo_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
12 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
13 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/freertos_lwip_echo* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34FREERTOS_LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.elf
40 ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.bin
43 ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_echo*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb
new file mode 100644
index 00000000..5c00254c
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7ESW_EXECUTABLE_NAME = "freertos_lwip_tcp_perf_client"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
15 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb
deleted file mode 100644
index 51b89b8e..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
12 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
13 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/freertos_lwip_tcp_perf_client* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf
40 ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin
43 ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb
new file mode 100644
index 00000000..910a6fa2
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7ESW_EXECUTABLE_NAME = "freertos_lwip_tcp_perf_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
15 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb
deleted file mode 100644
index 606fd01e..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
12 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
13 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/freertos_lwip_tcp_perf_server* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf
40 ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin
43 ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb
new file mode 100644
index 00000000..c20d640d
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7ESW_EXECUTABLE_NAME = "freertos_lwip_udp_perf_client"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb
deleted file mode 100644
index 7f9d86e2..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/freertos_lwip_udp_perf_client* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf
40 ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin
43 ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb
new file mode 100644
index 00000000..194b0565
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7ESW_EXECUTABLE_NAME = "freertos_lwip_udp_perf_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb
deleted file mode 100644
index 4fc02f36..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer freertos10-xilinx"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/freertos_lwip_udp_perf_server* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf
40 ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin
43 ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb
new file mode 100644
index 00000000..ee0afec5
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb
@@ -0,0 +1,22 @@
1inherit esw deploy python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/hello_world/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "hello_world"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19ESW_CUSTOM_LINKER_FILE ?= "None"
20EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
21
22FILES:${PN} = "${base_libdir}/firmware/hello_world*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb
deleted file mode 100644
index 1de5ef8c..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb
+++ /dev/null
@@ -1,44 +0,0 @@
1inherit esw deploy
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/hello_world/src/"
4
5DEPENDS += "libxil xiltimer"
6
7inherit python3native
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_install() {
20 install -d ${D}/${base_libdir}/firmware
21 # Note that we have to make the ELF executable for it to be stripped
22 install -m 0755 ${B}/hello_world* ${D}/${base_libdir}/firmware
23}
24
25inherit image-artifact-names
26
27HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
28
29ESW_CUSTOM_LINKER_FILE ?= "None"
30EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
31
32do_deploy() {
33
34 # We need to deploy the stripped elf, hence why not doing it from ${D}
35 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.elf
36 ln -sf ${HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
37 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin
38 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.bin
39 ln -sf ${HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
40}
41
42addtask deploy before do_build after do_package
43
44FILES:${PN} = "${base_libdir}/firmware/hello_world*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb
new file mode 100644
index 00000000..f3397f7f
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_echo_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7ESW_EXECUTABLE_NAME = "lwip_echo_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/lwip_echo*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb
deleted file mode 100644
index c59d816e..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_echo_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/lwip_echo* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.elf
40 ln -sf ${LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.bin
43 ln -sf ${LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/lwip_echo*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb
new file mode 100644
index 00000000..bc90046e
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7ESW_EXECUTABLE_NAME = "lwip_tcp_perf_client"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb
deleted file mode 100644
index b9834e34..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/lwip_tcp_perf_client* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf
40 ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin
43 ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb
new file mode 100644
index 00000000..5c9cd5fa
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7ESW_EXECUTABLE_NAME = "lwip_tcp_perf_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb
deleted file mode 100644
index 0acc4b8f..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/lwip_tcp_perf_server* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf
40 ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin
43 ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb
new file mode 100644
index 00000000..2855b08c
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7ESW_EXECUTABLE_NAME = "lwip_udp_perf_client"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb
deleted file mode 100644
index 00a9eaa6..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_client/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/lwip_udp_perf_client* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34LWIP_UDP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf
40 ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin
43 ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_client*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb
new file mode 100644
index 00000000..149e7a6c
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7ESW_EXECUTABLE_NAME = "lwip_udp_perf_server"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb
deleted file mode 100644
index 5f54caf9..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
1inherit esw deploy python3native
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_server/src/"
4
5DEPENDS += "libxil lwip xiltimer"
6
7do_configure:prepend() {
8 (
9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
13 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
14 )
15}
16
17do_generate_app_data() {
18 # This script should also not rely on relative paths and such
19 cd ${S}
20 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
21 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
22}
23addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
24do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
25
26do_install() {
27 install -d ${D}/${base_libdir}/firmware
28 # Note that we have to make the ELF executable for it to be stripped
29 install -m 0755 ${B}/lwip_udp_perf_server* ${D}/${base_libdir}/firmware
30}
31
32inherit image-artifact-names
33
34LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
35
36do_deploy() {
37
38 # We need to deploy the stripped elf, hence why not doing it from ${D}
39 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf
40 ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
41 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin
42 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin
43 ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
44}
45
46addtask deploy before do_build after do_package
47
48FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_server*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb
new file mode 100644
index 00000000..8420171b
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb
@@ -0,0 +1,19 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/memory_tests/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "memory_tests"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} memtest
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19FILES:${PN} = "${base_libdir}/firmware/memory_tests*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb
deleted file mode 100644
index 1ece5a8c..00000000
--- a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb
+++ /dev/null
@@ -1,41 +0,0 @@
1inherit esw deploy
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/memory_tests/src/"
4
5DEPENDS += "libxil xiltimer"
6
7inherit python3native
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} memtest
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_install() {
20 install -d ${D}/${base_libdir}/firmware
21 # Note that we have to make the ELF executable for it to be stripped
22 install -m 0755 ${B}/memory_tests* ${D}/${base_libdir}/firmware
23}
24
25inherit image-artifact-names
26
27MEMORY_TESTS_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
28
29do_deploy() {
30
31 # We need to deploy the stripped elf, hence why not doing it from ${D}
32 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.elf ${DEPLOYDIR}/${MEMORY_TESTS_BASE_NAME}.elf
33 ln -sf ${MEMORY_TESTS_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf
34 ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.elf ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.bin
35 install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.bin ${DEPLOYDIR}/${MEMORY_TESTS_BASE_NAME}.bin
36 ln -sf ${MEMORY_TESTS_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin
37}
38
39addtask deploy before do_build after do_package
40
41FILES:${PN} = "${base_libdir}/firmware/memory_tests*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb
new file mode 100644
index 00000000..58f08bf2
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb
@@ -0,0 +1,6 @@
1require openamp-fw.inc
2
3PROVIDES:append:armv7r = " openamp-fw-echo-testd "
4
5OPENAMP_FW_SRC_NAME = "rpmsg-echo.out"
6OPENAMP_FW_NAME = "image_echo_test"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb
new file mode 100644
index 00000000..c8d4382d
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb
@@ -0,0 +1,6 @@
1require openamp-fw.inc
2
3PROVIDES:append:armv7r = " openamp-fw-mat-muld "
4
5OPENAMP_FW_SRC_NAME = "matrix_multiplyd.out"
6OPENAMP_FW_NAME = "image_matrix_multiply"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb
new file mode 100644
index 00000000..4efdb4c6
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb
@@ -0,0 +1,9 @@
1require openamp-fw.inc
2
3PROVIDES:append:armv7r = " openamp-fw-rpc-demo "
4
5OPENAMP_FW_SRC_NAME = "rpc_demo.out"
6OPENAMP_FW_NAME = "image_rpc_demo"
7OPENAMP_WITH_PROXY = "ON"
8
9# NOTE: BSP should have flag ESW_CFLAGS:append = " -DUNDEFINE_FILE_OPS=1 "
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc
new file mode 100644
index 00000000..398f8dce
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc
@@ -0,0 +1,27 @@
1LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
2LICENSE = "MIT"
3INSANE_SKIP:${PN} = "arch"
4
5FW_LIB_DIR = "/lib/firmware"
6
7OPENAMP_FW_SRC_NAME ?= "rpmsg-echo.out"
8OPENAMP_FW_NAME ?= "image_echo_test"
9
10FW_MACHINE:zynqmp = "cortexr5-0-zynqmp"
11FW_MACHINE:versal = "cortexr5-0-versal"
12FW_MACHINE:versal-net = "cortexr52-0-versal-net"
13FW_OS ?= "baremetal"
14
15OPENAMP_FW_DEPLOY_DIR ?= "${MC_TMPDIR_PREFIX}-${FW_MACHINE}-${FW_OS}/deploy/images/${MACHINE}"
16DEPENDS = " open-amp-xlnx "
17do_install[mcdepends] += "mc::${FW_MACHINE}-${FW_OS}:open-amp-xlnx:do_deploy"
18do_install() {
19 install -d ${D}${FW_LIB_DIR}
20 src=${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME}
21 dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME}
22 install -m 0644 ${src} ${dest}
23}
24
25do_compile[noexec] = "1"
26
27FILES:${PN} = "/lib/firmware/${OPENAMP_FW_NAME}"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_2024.1.bb
index b6b15d5a..d2fb106a 100644
--- a/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_2024.1.bb
@@ -1,10 +1,10 @@
1inherit esw deploy 1inherit esw python3native esw_apps_common
2 2
3ESW_COMPONENT_SRC = "/lib/sw_apps/peripheral_tests/src/" 3ESW_COMPONENT_SRC = "/lib/sw_apps/peripheral_tests/src/"
4 4
5DEPENDS += "libxil xiltimer" 5DEPENDS += "libxil xiltimer"
6 6
7inherit python3native 7ESW_EXECUTABLE_NAME = "peripheral_tests"
8 8
9do_configure:prepend() { 9do_configure:prepend() {
10 ( 10 (
@@ -37,16 +37,8 @@ python do_generate_app_data() {
37addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot 37addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
38do_prepare_recipe_sysroot[rdeptask] = "do_unpack" 38do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
39 39
40PERIPHERAL_TEST_APP_IMAGE_NAME ??= "${BPN}"
41
42inherit image-artifact-names
43
44PERIPHERAL_TEST_BASE_NAME ?= "${PERIPHERAL_TEST_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
45
46ESW_COMPONENT ??= "peripheral_tests.elf"
47
48do_compile:append() { 40do_compile:append() {
49 ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/peripheral_tests.bin 41 ${OBJCOPY} -O binary ${B}/${ESW_EXECUTABLE_NAME}.elf ${B}${ESW_EXECUTABLE_NAME}.bin
50} 42}
51 43
52do_install() { 44do_install() {
@@ -54,9 +46,8 @@ do_install() {
54} 46}
55 47
56do_deploy() { 48do_deploy() {
57 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PERIPHERAL_TEST_BASE_NAME}.elf 49 install -Dm 0644 ${B}/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf
58 ln -sf ${PERIPHERAL_TEST_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf 50 ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf
59 install -m 0644 ${B}/peripheral_tests.bin ${DEPLOYDIR}/${PERIPHERAL_TEST_BASE_NAME}.bin 51 install -m 0644 ${B}/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin
60 ln -sf ${PERIPHERAL_TEST_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin 52 ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin
61} 53}
62addtask deploy before do_build after do_install
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb b/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb
new file mode 100644
index 00000000..5def36c3
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb
@@ -0,0 +1,11 @@
1SUMMARY = "Sample recipe to package and deploy baremetal or freertos elf or bin to linux rootfs"
2LICENSE = "CLOSED"
3
4inherit fw-package
5
6FW_NAME = "hello-world"
7
8TARGET_MC = "cortexr5-0-zynqmp-baremetal"
9
10FW_MCDEPENDS := "${@bb.utils.contains('BBMULTICONFIG', '${TARGET_MC}', 'mc::${TARGET_MC}:${FW_NAME}:do_deploy', '', d)}"
11FW_DEPLOY_DIR := "${@bb.utils.contains('BBMULTICONFIG', '${TARGET_MC}', '${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb
new file mode 100644
index 00000000..03ada8c1
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb
@@ -0,0 +1,22 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/srec_bootloader/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "srec_bootloader"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19ESW_CUSTOM_LINKER_FILE ?= "None"
20EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
21
22FILES:${PN} = "${base_libdir}/firmware/srec_bootloader*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb
new file mode 100644
index 00000000..e6f29570
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb
@@ -0,0 +1,22 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/srec_spi_bootloader/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "srec_spi_bootloader"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19ESW_CUSTOM_LINKER_FILE ?= "None"
20EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
21
22FILES:${PN} = "${base_libdir}/firmware/srec_spi_bootloader*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb
new file mode 100644
index 00000000..8e0b0c06
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/zynq_dram_test/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "zynq_dram_test"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/zynq_dram*"
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb
new file mode 100644
index 00000000..25215801
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb
@@ -0,0 +1,28 @@
1inherit esw python3native esw_apps_common
2
3ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_dram_test/src/"
4
5DEPENDS += "libxil xiltimer"
6
7ESW_EXECUTABLE_NAME = "zynqmp_dram_test"
8
9do_configure:prepend() {
10 (
11 cd ${S}
12 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
13 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
14 cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files
15 install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC}
16 )
17}
18
19do_generate_app_data() {
20 # This script should also not rely on relative paths and such
21 cd ${S}
22 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
23 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
24}
25addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot
26do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
27
28FILES:${PN} = "${base_libdir}/firmware/zynqmp_dram*"
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_2024.1.bb
index e6cf1d8b..f99db010 100644
--- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_2024.1.bb
@@ -1,9 +1,6 @@
1# Can't depend on esw since this is needed for setup! 1# Can't depend on esw since this is needed for setup!
2inherit xlnx-embeddedsw 2inherit xlnx-embeddedsw
3 3
4# We need to override the inherit
5require conf/dtb-embeddedsw.inc
6
7S = "${WORKDIR}/git" 4S = "${WORKDIR}/git"
8B = "${WORKDIR}/build" 5B = "${WORKDIR}/build"
9 6
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bbappend
index d40f3cdb..d40f3cdb 100644
--- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bbappend
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_2024.1.bbappend
index cc6d757f..cc6d757f 100644
--- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_git.bbappend
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_2024.1.bbappend
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bbappend
index b5908d46..b5908d46 100644
--- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_git.bbappend
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bbappend
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_2024.1.bbappend
index c4953ce7..c4953ce7 100644
--- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_git.bbappend
+++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_2024.1.bbappend
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup
deleted file mode 100644
index 0a5736d8..00000000
--- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup
+++ /dev/null
@@ -1,102 +0,0 @@
1Document Version: 20230112
2
3The Yocto Project setup for the System Device Tree workflow is as follows.
4Be sure to read everything below, as the steps will be updated in the future
5if the setup script changes.
6
7The steps in this document expect that you have already built the setup
8(meta-xilinx-setup) SDK, and installed it.
9
10* Run the setup script
11
12The setup environment should be run in a new shell (not the build shell)
13to ensure that you do not contaminate the environment for your build.
14
15We will assume below that the directory "prestep" was used for the SDK,
16however you may use any path you wish.
17
18Source the SDK environment file
19 $ . <build>/prestep/environment-setup-x86_64-petalinux-linux
20
21Run the script from the same directory as this README
22 $ <build>/prestep/dt-processor.sh -c <conf> -s <dtb> -l conf/local.conf
23
24Note: The -l option will automatically add the necessary parameters to the
25local.conf file. If you need to re-run this comment, you just clear the
26parameters from the end of the file. Without the -l option the items are
27printed to the screen and must be manually added to your conf/local.conf
28
29For example, zynqmp:
30 $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/zcu102-sdt/system-top.dts -l conf/local.conf
31
32The following will be written to the end of the conf/local.conf file:
33
34 # Each multiconfig will define it's own TMPDIR, this is the new default based
35 # on BASE_TMPDIR for the Linux build
36 TMPDIR = "${BASE_TMPDIR}/tmp"
37
38 # Use the newly generated MACHINE
39 MACHINE = "xlnx-zynqmp-zcu102-rev1-0"
40
41 # All of the TMPDIRs must be in a common parent directory. This is defined
42 # as BASE_TMPDIR.
43 # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp
44 BASE_TMPDIR ?= "${TOPDIR}"
45
46 # The following is the full set of multiconfigs for this configuration
47 # A large list can cause a slow parse.
48 BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal cortexa53-0-zynqmp-baremetal cortexa53-0-zynqmp-freertos cortexa53-1-zynqmp-baremetal cortexa53-1-zynqmp-freertos cortexa53-2-zynqmp-baremetal cortexa53-2-zynqmp-freertos cortexa53-3-zynqmp-baremetal cortexa53-3-zynqmp-freertos cortexr5-0-zynqmp-fsbl-baremetal cortexr5-0-zynqmp-baremetal cortexr5-0-zynqmp-freertos cortexr5-1-zynqmp-baremetal cortexr5-1-zynqmp-freertos microblaze-0-pmu"
49 # Alternatively trim the list to the minimum
50 #BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal microblaze-0-pmu"
51
52
53For example, versal:
54 $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/vmk180-sdt/system-top.dts -l conf/local.conf
55
56The following will be written to the end of the conf/local.conf file:
57
58 # Each multiconfig will define it's own TMPDIR, this is the new default based
59 # on BASE_TMPDIR for the Linux build
60 TMPDIR = "${BASE_TMPDIR}/tmp"
61
62 # Use the newly generated MACHINE
63 MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva"
64
65 # All of the TMPDIRs must be in a common parent directory. This is defined
66 # as BASE_TMPDIR.
67 # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp
68 BASE_TMPDIR ?= "${TOPDIR}"
69
70 # The following is the full set of multiconfigs for this configuration
71 # A large list can cause a slow parse.
72 BBMULTICONFIG = " cortexa72-0-versal-baremetal cortexa72-0-versal-freertos cortexa72-1-versal-baremetal cortexa72-1-versal-freertos microblaze-0-pmc microblaze-0-psm cortexr5-0-versal-baremetal cortexr5-0-versal-freertos cortexr5-1-versal-baremetal cortexr5-1-versal-freertos"
73 # Alternatively trim the list to the minimum
74 #BBMULTICONFIG = " microblaze-0-pmc microblaze-0-psm"
75
76
77You can now EXIT THE NEW SHELL return the build environment for the remaining steps.
78
79* Bitbake Performance Note
80
81Each BBMULTICONFIG value requires all of the recipes to be parsed for that
82configuration. Thus each multiconfig will add more parsing time. A long list
83can lead to a very slow parse (many minutes). To speed up parsing, it is
84suggested that you trim this down to only the configurations you require.
85A minimum configuration is included with the generated configuration.
86
87* Build your project
88
89You should now be able to build your project normally. See the Yocto Project
90documentation if you have questions on how to work with the multiconfig
91recipes. The following is a simple build for testing.
92
93In the original build shell
94Build your Linux sytem:
95 $ bitbake petalinux-image-minimal
96
97The output will be in tmp/deploy/images/...
98
99If the system is QEMU capable execute QEMU using:
100 $ runqemu nographic slirp core-image-minimal
101
102To terminate qemu, usually the command is ctrl-a x
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh
deleted file mode 100755
index 1c754689..00000000
--- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh
+++ /dev/null
@@ -1,1260 +0,0 @@
1#! /bin/bash
2
3# Copyright (c) 2021-2022 Xilinx Inc
4# Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.
5#
6# Permission is hereby granted, free of charge, to any person obtaining a copy
7# of this software and associated documentation files (the "Software"), to deal
8# in the Software without restriction, including without limitation the rights
9# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10# copies of the Software, and to permit persons to whom the Software is
11# furnished to do so, subject to the following conditions:
12#
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the Software.
15#
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22# THE SOFTWARE.
23
24# This script configures the Yocto Project build system for use with the System
25# Device Tree workflow when building for a Xilinx FPGA, such as the ZynqMP or
26# Versal.
27
28error() { echo "ERROR: $1" >&2; exit 1; }
29
30warn() { echo "WARNING: $1"; }
31
32info() { echo "INFO: $1"; }
33
34usage() {
35 cat <<EOF
36$0
37 -c <config_dir> Location of the build conf directory
38 -s <system_dts> Path to system dts
39 [-d <domain_file>] Path to domain file (.yml/.dts)
40 [-o <overlay_dts>] Generate overlay dts
41 [-e <external_fpga>] Apply a partial overlay
42 [-m <machine_conf>] The name of the machine .conf to generate
43 [-D <dts_path>] Absolute path or subdirectory of conf/dts to place DTS files in (usually auto detected from DTS)
44 [-t <machine>] Machine type: zynqmp or versal (usually auto detected)
45 [-v <soc_variant>] SOC Variant: cg, dr, eg, ev, ai-prime, premium (usually auto detected)
46 [-r <require_machine>] This machine will be required, instead of the generic machine if defined
47 [-O <overrides>] Optional, can add additional overrides to the generated machine
48 [-p <psu_init_path>] Path to psu_init files, defaults to system_dts path
49 [-i <pdi_path>] Path to the pdi file
50 [-l <config_file>] write local.conf changes to this file
51 [-P <petalinux_schema>] Path to petalinux schema file
52
53EOF
54 exit
55}
56
57parse_args() {
58 [ $# -eq 0 ] && usage
59 [ $1 = "--help" ] && usage
60
61 while getopts ":c:s:d:o:e:m:D:l:hP:p:i:t:v:r:O:" opt; do
62 case ${opt} in
63 c) config_dir=$OPTARG ;;
64 s) system_dts=$OPTARG ;;
65 o) overlay_dts=$OPTARG ;;
66 d) domain_file=$OPTARG ;;
67 e) external_fpga=$OPTARG ;;
68 m) mach_conf=$OPTARG ; mach_conf=${mach_conf%%.conf} ;;
69 D) dts_path=$OPTARG ;;
70 t) machine=$OPTARG ;;
71 v) soc_variant=$OPTARG ;;
72 r) incmachine=$OPTARG ;;
73 O) overrides=$OPTARG ;;
74 p) psu_init_path=$OPTARG ;;
75 i) pdi_path=$OPTARG ;;
76 l) localconf=$OPTARG ;;
77 P) petalinux_schema=$OPTARG ;;
78 h) usage ;;
79 :) error "Missing argument for -$OPTARG" ;;
80 \?) error "Invalid option -$OPTARG" ;;
81 esac
82 done
83
84 [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c"
85 [ -z "${system_dts}" ] && error "You must specify the path to the system device tree with -s"
86 [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}"
87 [ -f "${system_dts}" ] || error "Unable to find: ${system_dts}"
88 system_dts=$(realpath ${system_dts})
89 if [ -z "$psu_init_path" ]; then
90 psu_init_path=$(dirname ${system_dts})
91 else
92 psu_init_path=$(realpath ${psu_init_path})
93 fi
94 if [ -z "$pdi_path" ]; then
95 pdi_path=$(dirname ${system_dts})
96 else
97 pdi_path=$(realpath ${pdi_path})
98 fi
99 if [ -n "$domain_file" ]; then
100 domain_file=$(realpath ${domain_file})
101 fi
102
103}
104
105detect_machine() {
106 if [ -z "${machine}" ]; then
107 if [ -n "${deviceid}" ]; then
108 case ${deviceid} in
109 # ZynqMP variants
110 xczu*cg)
111 machine="zynqmp"
112 soc_variant="cg" ;;
113 xczu*dr)
114 machine="zynqmp"
115 soc_variant="dr" ;;
116 xczu*eg)
117 machine="zynqmp"
118 soc_variant="eg" ;;
119 xczu*ev)
120 machine="zynqmp"
121 soc_variant="ev" ;;
122 # Versal variants
123 xcvm*)
124 machine="versal"
125 soc_variant="prime" ;;
126 xcvc*)
127 machine="versal"
128 soc_variant="ai-core" ;;
129 xcve*)
130 machine="versal"
131 soc_variant="ai-edge" ;;
132 xcvn*)
133 machine="versal"
134 soc_variant="net" ;;
135 xcvp*)
136 machine="versal"
137 soc_variant="premium" ;;
138 xcvh*)
139 machine="versal"
140 soc_variant="hbm" ;;
141 # Special Case Starter Kit SOMs
142 xck26)
143 if [ -z "${incmachine}" ]; then
144 incmachine="k26-smk.conf"
145 fi
146 machine="zynqmp"
147 soc_variant="ev" ;;
148 xck24)
149 if [ -z "${incmachine}" ]; then
150 incmachine="k24-smk.conf"
151 fi
152 machine="zynqmp"
153 soc_variant="eg" ;;
154 esac
155 else
156 # Identify the system type first using PSM/PMC/PMU
157 while read -r cpu core domain cpu_name os_hint; do
158 case ${cpu} in
159 pmu-microblaze)
160 machine="zynqmp" ;;
161 pmc-microblaze | psm-microblaze)
162 machine="versal" ;;
163 esac
164 done <${cpulist}
165 fi
166 fi
167
168 # Machine not provided and we cannot identify..
169 [ -z ${machine} ] && \
170 error "Unable to autodetect machine type, use -t to specify the machine."
171
172 case ${machine} in
173 zynqmp | versal) : ;;
174 *) error "Invalid machine type ${machine}; please choose zynqmp or versal"
175 esac
176
177 [ -z ${soc_variant} ] && \
178 warn "Unable to autodetect soc variant, use -v to specify a variant."
179}
180
181dump_cpus() {
182 prefix="$1"
183 while read -r cpu core domain cpu_name os_hint; do
184 case ${cpu} in
185 \#*) ;;
186 \[*) ;;
187 pmu-microblaze) echo "${prefix}zynqmp-pmu ${cpu_name}" ;;
188 pmc-microblaze) echo "${prefix}versal-plm ${cpu_name}" ;;
189 psm-microblaze) echo "${prefix}versal-psm ${cpu_name}" ;;
190 xlnx,microblaze) echo "${prefix}microblaze ${core} ${cpu_name}";;
191 arm,*) echo "${prefix}${cpu/,/ } ${core} ${cpu_name}";;
192 *) echo "${prefix}${cpu} ${core} ${cpu_name}";;
193 esac
194 done <${cpulist}
195}
196
197cortex_a53_linux() {
198 info "cortex-a53 for Linux [ $1 ]"
199
200 if [ "$1" = "None" ]; then
201 dts_file="cortexa53-${machine}-linux.dts"
202 system_conf=${dts_file}
203 conf_file=""
204 else
205 mc_name=cortexa53-${machine}-$1-linux
206 dts_file="${mc_name}.dts"
207 multiconf="${multiconf} ${mc_name}"
208 conf_file=multiconfig/${mc_name}.conf
209 fi
210
211 # Check if it is overlay dts otherwise just create linux dts
212 (
213 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
214 if [ "${overlay_dts}" = "true" ]; then
215 if [ "${external_fpga}" = "true" ]; then
216 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt ${machine} full \
217 || error "lopper failed"
218 else
219 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt ${machine} partial \
220 || error "lopper failed"
221 fi
222 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed"
223 elif [ -n "${domain_file}" ]; then
224 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
225 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" \
226 -i "${lops_dir}/lop-domain-linux-a53.dts" \
227 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
228 "${system_dts}" "${dts_file}" \
229 || error "lopper failed"
230 else
231 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
232 -i "${lops_dir}/lop-domain-linux-a53.dts" \
233 -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \
234 "${system_dts}" "${dts_file}" \
235 || error "lopper failed"
236 fi
237 rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb lop-domain-linux-a53-prune.dts.dtb
238 )
239
240 if [ -z "${conf_file}" ]; then
241 return $?
242 fi
243
244 ## Generate a multiconfig
245 cat <<EOF >"${conf_file}"
246CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
247
248TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
249EOF
250}
251
252a53_fsbl_done=0
253cortex_a53_baremetal() {
254 if [ "$1" = "fsbl" ]; then
255 [ ${a53_fsbl_done} = 1 ] && return
256 info "cortex-a53 FSBL baremetal configuration"
257 else
258 info "cortex-a53 baremetal configuration for core $2 [ $1 ]"
259 fi
260
261 suffix=""; lto="-nolto"
262 if [ "$1" != "None" ]; then
263 suffix="-$1"; lto=""
264 fi
265
266 mc_name="cortexa53-$2-${machine}${suffix}-baremetal"
267 dts_file="${mc_name}.dts"
268 multiconf="${multiconf} ${mc_name}"
269 conf_file="multiconfig/${mc_name}.conf"
270 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
271 features="machine/include/${mach_conf}/${mc_name}-features.conf"
272 yocto_distro="xilinx-standalone${lto}"
273 if [ "$1" = "fsbl" ]; then
274 fsbl_mcdepends="mc::${mc_name}:fsbl-firmware:do_deploy"
275 fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}"
276 multiconf_min="${multiconf_min} ${mc_name}"
277 a53_fsbl_done=1
278 fi
279
280 # Build device tree
281 (
282 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
283 if [ -n "${domain_file}" ]; then
284 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
285 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \
286 || error "lopper failed"
287 else
288 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
289 "${system_dts}" "${dts_file}" || error "lopper failed"
290 fi
291 rm -f lop-a53-imux.dts.dtb
292 )
293
294 # Build baremetal multiconfig
295 if [ -n "${domain_file}" ]; then
296 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
297 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
298 || error "lopper failed"
299 else
300 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
301 || error "lopper failed"
302 fi
303
304 mv libxil.conf "${libxil}"
305 mv distro.conf "${features}"
306 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
307
308 if [ "$1" = "fsbl" ]; then
309 if [ ! -e "${psu_init_path}/psu_init.c" ]; then
310 warn "Warning: Unable to find psu_init.c in ${psu_init_path}"
311 fi
312 if [ ! -e "${psu_init_path}/psu_init.h" ]; then
313 warn "Warning: Unable to find psu_init.h in ${psu_init_path}"
314 fi
315
316 cat <<EOF >"${conf_file}"
317PSU_INIT_PATH = "${psu_init_path}"
318EOF
319 else
320 cat /dev/null >"${conf_file}"
321 fi
322 cat <<EOF >>"${conf_file}"
323CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
324
325ESW_MACHINE = "$3"
326DEFAULTTUNE = "cortexa53"
327
328TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
329
330DISTRO = "${yocto_distro}"
331EOF
332}
333
334cortex_a53_freertos() {
335 info "cortex-a53 FreeRTOS configuration for core $2 [ $1 ]"
336
337 suffix=""
338 [ "$1" != "None" ] && suffix="-$1"
339
340 mc_name="cortexa53-$2-${machine}${suffix}-freertos"
341 dts_file="${mc_name}.dts"
342 multiconf="${multiconf} ${mc_name}"
343 conf_file="multiconfig/${mc_name}.conf"
344 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
345 features="machine/include/${mach_conf}/${mc_name}-features.conf"
346
347 # Build device tree
348 (
349 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
350 if [ -n "${domain_file}" ]; then
351 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
352 -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \
353 || error "lopper failed"
354 else
355 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \
356 "${system_dts}" "${dts_file}" || error "lopper failed"
357 fi
358 rm -f lop-a53-imux.dts.dtb
359 )
360
361 # Build baremetal multiconfig
362 if [ -n "${domain_file}" ]; then
363 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
364 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
365 else
366 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
367 || error "lopper failed"
368 fi
369
370 mv libxil.conf "${libxil}"
371 mv distro.conf "${features}"
372 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
373
374 cat <<EOF >"${conf_file}"
375CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
376
377ESW_MACHINE = "$3"
378DEFAULTTUNE = "cortexa53"
379
380TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
381
382DISTRO = "xilinx-freertos"
383EOF
384}
385
386cortex_a72_linux() {
387 info "cortex-a72 for Linux [ $1 ]"
388
389 # Find the first file ending in .pdi
390 full_pdi_path=$(ls ${pdi_path}/*.pdi 2>/dev/null | head -n 1)
391 if [ -z "${full_pdi_path}" ]; then
392 error "Unable to find a pdi file in ${pdi_path}, use the -i option to point to the directory containing a .pdi file"
393 full_pdi_path="__PATH TO PDI FILE HERE__"
394 elif [ "${full_pdi_path}" != "$(ls ${pdi_path}/*.pdi 2>/dev/null)" ]; then
395 warn "Warning: multiple PDI files found, using first found $(basename ${full_pdi_path})."
396 fi
397
398 if [ "$1" = "None" ]; then
399 dts_file="cortexa72-${machine}-linux.dts"
400 system_conf=${dts_file}
401 conf_file=""
402 else
403 mc_name="cortexa72-${machine}-$1-linux"
404 dts_file="${mc_name}.dts"
405 multiconf="${multiconf} ${mc_name}"
406 conf_file=multiconfig/${mc_name}.conf
407 fi
408
409 (
410 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
411 # Check if it is overlay dts otherwise just create linux dts
412 if [ "${overlay_dts}" = "true" ]; then
413 # As there is no partial support on Versal, As per fpga manager implementation there is
414 # a flag "external_fpga" which says apply overlay without loading the bit file.
415 if [ "${external_fpga}" = "true" ]; then
416 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt \
417 ${machine} full external_fpga || error "lopper failed"
418 else
419 # If there is no external_fpga flag, then the default is full
420 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt \
421 ${machine} full || error "lopper failed"
422 fi
423 dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed"
424 elif [ -n "${domain_file}" ]; then
425 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
426 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" \
427 -i "${lops_dir}/lop-domain-a72.dts" \
428 -i "${lops_dir}/lop-domain-a72-prune.dts" \
429 "${system_dts}" "${dts_file}" \
430 || error "lopper failed"
431 else
432 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
433 -i "${lops_dir}/lop-domain-a72.dts" \
434 -i "${lops_dir}/lop-domain-a72-prune.dts" \
435 "${system_dts}" "${dts_file}" || error "lopper failed"
436 fi
437 rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb lop-domain-a72-prune.dts.dtb
438 )
439
440 if [ -z "${conf_file}" ]; then
441 return $?
442 fi
443
444 ## Generate a multiconfig
445 cat <<EOF >"${conf_file}"
446CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
447
448TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
449EOF
450}
451
452cortex_a72_baremetal() {
453 info "cortex-a72 baremetal configuration for core $2 [ $1 ]"
454
455 suffix=""
456 [ "$1" != "None" ] && suffix="-$1"
457
458 mc_name="cortexa72-$2-${machine}${suffix}-baremetal"
459 dts_file="${mc_name}.dts"
460 multiconf="${multiconf} ${mc_name}"
461 conf_file="multiconfig/${mc_name}.conf"
462 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
463 features="machine/include/${mach_conf}/${mc_name}-features.conf"
464
465 # Build device tree
466 (
467 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
468 if [ -n "${domain_file}" ]; then
469 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
470 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \
471 || error "lopper failed"
472 else
473 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
474 "${system_dts}" "${dts_file}" || error "lopper failed"
475 fi
476 rm -f lop-a72-imux.dts.dtb
477 )
478
479 # Build baremetal multiconfig
480 if [ -n "${domain_file}" ]; then
481 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
482 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
483 else
484 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
485 || error "lopper failed"
486 fi
487
488 mv libxil.conf "${libxil}"
489 mv distro.conf "${features}"
490 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
491
492 cat <<EOF >"${conf_file}"
493CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
494
495ESW_MACHINE = "$3"
496DEFAULTTUNE = "cortexa72"
497
498TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
499
500DISTRO = "xilinx-standalone-nolto"
501EOF
502}
503
504cortex_a72_freertos() {
505 info "cortex-a72 FreeRTOS configuration for core $2 [ $1 ]"
506
507 suffix=""
508 [ "$1" != "None" ] && suffix="-$1"
509
510 mc_name="cortexa72-$2-${machine}${suffix}-freertos"
511 dts_file="${mc_name}.dts"
512 multiconf="${multiconf} ${mc_name}"
513 conf_file="multiconfig/${mc_name}.conf"
514 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
515 features="machine/include/${mach_conf}/${mc_name}-features.conf"
516
517 # Build device tree
518 (
519 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
520 if [ -n "${domain_file}" ]; then
521 LOPPER_DTC_FLAGS="-b 0 -@" lopper -f --enhanced -x '*.yaml' \
522 -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \
523 || error "lopper failed"
524 else
525 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \
526 "${system_dts}" "${dts_file}" || error "lopper failed"
527 fi
528 rm -f lop-a72-imux.dts.dtb
529 )
530
531 # Build baremetal multiconfig
532 if [ -n "${domain_file}" ]; then
533 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
534 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
535 else
536 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
537 || error "lopper failed"
538 fi
539
540 mv libxil.conf "${libxil}"
541 mv distro.conf "${features}"
542 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
543
544 cat <<EOF >"${conf_file}"
545CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
546
547ESW_MACHINE = "$3"
548DEFAULTTUNE = "cortexa72"
549
550TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
551
552DISTRO = "xilinx-freertos"
553EOF
554}
555
556r5_fsbl_done=0
557cortex_r5_baremetal() {
558 if [ "$1" = "fsbl" ]; then
559 [ ${r5_fsbl_done} = 1 ] && return
560 info "cortex-r5 FSBL baremetal configuration"
561 else
562 info "cortex-r5 baremetal configuration for core $2 [ $1 ]"
563 fi
564
565 suffix=""; lto="-nolto"
566 if [ "$1" != "None" ]; then
567 suffix="-$1"; lto=""
568 fi
569
570 mc_name="cortexr5-$2-${machine}${suffix}-baremetal"
571 dts_file="${mc_name}.dts"
572 multiconf="${multiconf} ${mc_name}"
573 conf_file="multiconfig/${mc_name}.conf"
574 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
575 features="machine/include/${mach_conf}/${mc_name}-features.conf"
576 yocto_distro="xilinx-standalone${lto}"
577
578 if [ "$1" = "fsbl" ]; then
579 r5fsbl_mcdepends="mc::${mc_name}:fsbl-firmware:do_deploy"
580 r5fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}"
581 r5_fsbl_done=1
582 fi
583
584 # Build device tree
585 (
586 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
587 if [ -n "$domain_file" ]; then
588 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
589 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \
590 || error "lopper failed"
591 else
592 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \
593 "${system_dts}" "${dts_file}" || error "lopper failed"
594 fi
595 rm -f lop-r5-imux.dts.dtb
596 )
597
598 # Build baremetal multiconfig
599 if [ -n "${domain_file}" ]; then
600 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
601 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
602 else
603 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
604 || error "lopper failed"
605 fi
606
607 mv libxil.conf "${libxil}"
608 mv distro.conf "${features}"
609 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
610
611 if [ "$1" = "fsbl" ]; then
612 if [ ! -e "${psu_init_path}/psu_init.c" ]; then
613 warn "Warning: Unable to find psu_init.c in ${psu_init_path}"
614 fi
615 if [ ! -e "${psu_init_path}/psu_init.h" ]; then
616 warn "Warning: Unable to find psu_init.h in ${psu_init_path}"
617 fi
618
619 cat <<EOF >"${conf_file}"
620PSU_INIT_PATH = "${psu_init_path}"
621EOF
622 else
623 cat /dev/null >"${conf_file}"
624 fi
625 cat <<EOF >>"${conf_file}"
626CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
627
628ESW_MACHINE = "$3"
629DEFAULTTUNE = "cortexr5"
630
631TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
632
633DISTRO = "$yocto_distro"
634EOF
635}
636
637cortex_r5_freertos() {
638 info "cortex-r5 FreeRTOS configuration for core $2 [ $1 ]"
639
640 suffix=""
641 [ "$1" != "None" ] && suffix="-$1"
642
643 mc_name="cortexr5-$2-${machine}${suffix}-freertos"
644 dts_file="${mc_name}.dts"
645 multiconf="${multiconf} ${mc_name}"
646 conf_file="multiconfig/${mc_name}.conf"
647 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
648 features="machine/include/${mach_conf}/${mc_name}-features.conf"
649
650 # Build device tree
651 (
652 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
653 if [ -n "$domain_file" ]; then
654 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \
655 -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \
656 || error "lopper failed"
657 else
658 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \
659 "${system_dts}" "${dts_file}" || error "lopper failed"
660 fi
661 rm -f lop-r5-imux.dts.dtb
662 )
663
664 # Build baremetal multiconfig
665 if [ -n "${domain_file}" ]; then
666 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
667 -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed"
668 else
669 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \
670 || error "lopper failed"
671 fi
672
673 mv libxil.conf "${libxil}"
674 mv distro.conf "${features}"
675 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
676
677 cat <<EOF >"${conf_file}"
678CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
679
680ESW_MACHINE = "$3"
681DEFAULTTUNE = "cortexr5"
682
683TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
684
685DISTRO = "xilinx-freertos"
686EOF
687}
688
689# Generate microblaze tunings
690microblaze_done=0
691process_microblaze() {
692 [ ${microblaze_done} = 1 ] && return
693
694 info "Generating microblaze processor tunes"
695
696 mkdir -p machine/include/${mach_conf}
697 (
698 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
699 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dts}" \
700 || error "lopper failed"
701 rm -f lop-microblaze-yocto.dts.dtb
702 ) >machine/include/${mach_conf}/microblaze.inc
703
704 echo "require conf/machine/include/xilinx-microblaze.inc" >> machine/include/${mach_conf}/microblaze.inc
705
706 microblaze_done=1
707}
708
709# pmu-microblaze is ALWAYS baremetal, no domain
710pmu-microblaze() {
711 info "Microblaze ZynqMP PMU"
712
713 process_microblaze
714
715 mc_name="microblaze-0-pmu"
716 dts_file="${mc_name}.dts"
717 multiconf="${multiconf} ${mc_name}"
718 multiconf_min="${multiconf_min} ${mc_name}"
719 conf_file="multiconfig/${mc_name}.conf"
720 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
721 features="machine/include/${mach_conf}/${mc_name}-features.conf"
722
723 pmu_mcdepends="mc::${mc_name}:pmu-firmware:do_deploy"
724 pmu_firmware_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}"
725
726 # Build device tree
727 (
728 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
729 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
730 )
731
732 # Build baremetal multiconfig
733 if [ -n "${domain_file}" ]; then
734 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
735 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
736 else
737 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
738 || error "lopper failed"
739 fi
740
741 mv libxil.conf "${libxil}"
742 mv distro.conf "${features}"
743 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
744
745 cat <<EOF >"${conf_file}"
746CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
747
748ESW_MACHINE = "$1"
749
750DEFAULTTUNE = "microblaze-pmu"
751
752TARGET_CFLAGS += "-DPSU_PMU=1U"
753
754TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
755
756DISTRO = "xilinx-standalone"
757EOF
758}
759
760# pmc-microblaze is ALWAYS baremetal, no domain
761pmc-microblaze() {
762 info "Microblaze Versal PMC"
763
764 process_microblaze
765
766 mc_name="microblaze-0-pmc"
767 dts_file="${mc_name}.dts"
768 multiconf="${multiconf} ${mc_name}"
769 multiconf_min="${multiconf_min} ${mc_name}"
770 conf_file="multiconfig/${mc_name}.conf"
771 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
772 features="machine/include/${mach_conf}/${mc_name}-features.conf"
773
774 plm_mcdepends="mc::${mc_name}:plm-firmware:do_deploy"
775 plm_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}"
776
777 # Build device tree
778 (
779 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
780 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
781 )
782
783 # Build baremetal multiconfig
784 if [ -n "${domain_file}" ]; then
785 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
786 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
787 else
788 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
789 || error "lopper failed"
790 fi
791
792 mv libxil.conf "${libxil}"
793 mv distro.conf "${features}"
794 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
795
796 cat <<EOF >"${conf_file}"
797CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
798
799ESW_MACHINE = "$1"
800
801DEFAULTTUNE = "microblaze-pmc"
802
803TARGET_CFLAGS += "-DVERSAL_PLM=1"
804
805TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
806
807DISTRO = "xilinx-standalone"
808EOF
809}
810
811# psm-microblaze is ALWAYS baremetal, no domain
812psm-microblaze() {
813 info "Microblaze Versal PSM"
814
815 process_microblaze
816
817 mc_name="microblaze-0-psm"
818 dts_file="${mc_name}.dts"
819 multiconf="${multiconf} ${mc_name}"
820 multiconf_min="${multiconf_min} ${mc_name}"
821 conf_file="multiconfig/${mc_name}.conf"
822 libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf"
823 features="machine/include/${mach_conf}/${mc_name}-features.conf"
824
825 psm_mcdepends="mc::${mc_name}:psm-firmware:do_deploy"
826 psm_firmware_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}"
827
828 # Build device tree
829 (
830 cd ${dts_path} || error "Unable to cd to ${dts_path} dir"
831 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed"
832 )
833
834 # Build baremetal multiconfig
835 if [ -n "${domain_file}" ]; then
836 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \
837 -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed"
838 else
839 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \
840 || error "lopper failed"
841 fi
842
843 mv libxil.conf "${libxil}"
844 mv distro.conf "${features}"
845 sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES,"
846
847 cat <<EOF >"${conf_file}"
848CONFIG_DTFILE = "${dts_file_path}/${dts_file}"
849
850ESW_MACHINE = "$1"
851
852DEFAULTTUNE = "microblaze-psm"
853
854TARGET_CFLAGS += "-DVERSAL_psm=1"
855
856TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}"
857
858DISTRO = "xilinx-standalone"
859EOF
860}
861
862generate_machine() {
863 info "Generating machine conf file"
864 conf_file="machine/${mach_conf}.conf"
865
866 # Machine include file
867 if [ -z ${incmachine} ]; then
868 if [ -n ${soc_variant} ]; then
869 incmachine="${machine}-${soc_variant}-generic.conf"
870 else
871 incmachine="${machine}-generic.conf"
872 fi
873 fi
874
875 mkdir -p machine
876 # Generate header
877 cat <<EOF >"${conf_file}"
878#@TYPE: Machine
879#@NAME: ${mach_conf}
880#@DESCRIPTION: ${model}
881
882#### Preamble
883MACHINEOVERRIDES =. "\${@['', '${mach_conf}:']['${mach_conf}' != '\${MACHINE}']}"
884#### Regular settings follow
885
886EOF
887
888 if [ -n "${overrides}" ]; then
889 cat <<EOF >>"${conf_file}"
890MACHINEOVERRIDES .= ":${overrides}"
891
892EOF
893 fi
894
895 if [ "${machine}" == "zynqmp" ]; then
896 cat <<EOF >>"${conf_file}"
897TUNEFILE[microblaze-pmu] = "conf/machine/include/${mach_conf}/microblaze.inc"
898EOF
899 elif [ "${machine}" == "versal" ]; then
900 cat <<EOF >>"${conf_file}"
901TUNEFILE[microblaze-pmc] = "conf/machine/include/${mach_conf}/microblaze.inc"
902TUNEFILE[microblaze-psm] = "conf/machine/include/${mach_conf}/microblaze.inc"
903EOF
904 fi
905
906 sysdt_path=$(dirname ${system_dts})
907 sysdt_base=$(basename ${system_dts})
908 cat <<EOF >>"${conf_file}"
909
910# Set the default (linux) domain device tree
911CONFIG_DTFILE ?= "${dts_file_path}/${system_conf}"
912CONFIG_DTFILE[vardepsexclude] += "TOPDIR"
913
914require conf/machine/${incmachine}
915
916# System Device Tree does not use HDF_MACHINE
917HDF_MACHINE = ""
918
919# Set the system device trees
920SYSTEM_DTFILE_DIR = "${sysdt_path}"
921SYSTEM_DTFILE = "\${SYSTEM_DTFILE_DIR}/${sysdt_base}"
922SYSTEM_DTFILE[vardepsexclude] += "SYSTEM_DTFILE_DIR"
923
924# Load the dynamic machine features
925include conf/machine/include/${mach_conf}/\${BB_CURRENT_MC}-features.conf
926LIBXIL_CONFIG = "conf/machine/include/${mach_conf}/\${BB_CURRENT_MC}-libxil.conf"
927
928EOF
929
930 if [ -n "${fsbl_mcdepends}" ]; then
931 cat <<EOF >>"${conf_file}"
932# First Stage Boot Loader
933FSBL_DEPENDS = ""
934FSBL_MCDEPENDS = "${fsbl_mcdepends}"
935FSBL_DEPLOY_DIR = "${fsbl_deploy_dir}"
936
937EOF
938 fi
939 if [ -n "${r5fsbl_mcdepends}" ]; then
940 cat <<EOF >>"${conf_file}"
941# Cortex-R5 First Stage Boot Loader
942R5FSBL_DEPENDS = ""
943R5FSBL_MCDEPENDS = "${r5fsbl_mcdepends}"
944R5FSBL_DEPLOY_DIR = "${r5fsbl_deploy_dir}"
945
946EOF
947 fi
948 if [ -n "${pmu_mcdepends}" ]; then
949 cat <<EOF >>"${conf_file}"
950# PMU Firware
951PMU_DEPENDS = ""
952PMU_MCDEPENDS = "${pmu_mcdepends}"
953PMU_FIRMWARE_DEPLOY_DIR = "${pmu_firmware_deploy_dir}"
954
955EOF
956 fi
957 if [ -n "${plm_mcdepends}" ]; then
958 cat <<EOF >>"${conf_file}"
959# Platform Loader and Manager
960PLM_DEPENDS = ""
961PLM_MCDEPENDS = "${plm_mcdepends}"
962PLM_DEPLOY_DIR = "${plm_deploy_dir}"
963
964EOF
965 fi
966 if [ -n "${psm_mcdepends}" ]; then
967 cat <<EOF >>"${conf_file}"
968# PSM Firmware
969PSM_DEPENDS = ""
970PSM_MCDEPENDS = "${psm_mcdepends}"
971PSM_FIRMWARE_DEPLOY_DIR = "${psm_firmware_deploy_dir}"
972
973EOF
974 fi
975
976 if [ -n "${full_pdi_path}" ]; then
977 pdi_path_dir=$(dirname ${full_pdi_path})
978 pdi_path_base=$(basename ${full_pdi_path})
979 cat <<EOF >>"${conf_file}"
980# Versal PDI
981PDI_PATH_DIR = "${pdi_path_dir}"
982PDI_PATH = "\${PDI_PATH_DIR}/${pdi_path_base}"
983PDI_PATH[vardepsexclude] += "PDI_PATH_DIR"
984
985EOF
986 fi
987
988 cat <<EOF >>"${conf_file}"
989# Enable the correct version of the firmware components
990PREFERRED_VERSION_fsbl-firmware = "2023_sdt_experimental%"
991PREFERRED_VERSION_pmu-firmware = "2023_sdt_experimental%"
992PREFERRED_VERSION_plm-firmware = "2023_sdt_experimental%"
993PREFERRED_VERSION_psm-firmware = "2023_sdt_experimental%"
994
995# Exclude BASE_TMPDIR from hash calculations
996BB_HASHEXCLUDE_COMMON:append = " BASE_TMPDIR"
997
998# Update bootbin to use proper device tree
999BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}"
1000# Remap boot files to ensure the right device tree is listed first
1001IMAGE_BOOT_FILES =+ "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}"
1002
1003#### No additional settings should be after the Postamble
1004#### Postamble
1005PACKAGE_EXTRA_ARCHS:append = "\${@['', ' ${mach_conf//-/_}']['${mach_conf}' != "\${MACHINE}"]}"
1006EOF
1007}
1008
1009parse_cpus() {
1010 gen_linux_dts="None"
1011 while read -r cpu core domain cpu_name os_hint; do
1012 # Skip commented lines and WARNINGs
1013 case ${cpu} in
1014 \#* | \[WARNING\]:) continue ;;
1015 esac
1016
1017 case ${cpu} in
1018
1019 arm,cortex-a53)
1020 # We need a base cortex_a53_baremetal for the FSBL
1021 if [ "${core}" == 0 ]; then
1022 cortex_a53_baremetal fsbl ${core} ${cpu_name}
1023 fi
1024 if [ "${os_hint}" == "None" ]; then
1025 if [ "${gen_linux_dts}" == "None" ]; then
1026 cortex_a53_linux "${domain}"
1027 gen_linux_dts="True"
1028 fi
1029 cortex_a53_baremetal "${domain}" ${core} ${cpu_name}
1030 cortex_a53_freertos "${domain}" ${core} ${cpu_name}
1031 else
1032 case "${os_hint}" in
1033 linux*)
1034 if [ "${gen_linux_dts}" == "None" ]; then
1035 cortex_a53_linux "${domain}"
1036 gen_linux_dts="True"
1037 fi
1038 ;;
1039 baremetal*)
1040 cortex_a53_baremetal "${domain}" ${core} ${cpu_name};;
1041 freertos*)
1042 cortex_a53_freertos "${domain}" ${core} ${cpu_name};;
1043 *)
1044 warn "cortex-a53 for unknown OS (${os_hint}), parsing baremetal. ${domain}"
1045 cortex_a53_baremetal "${domain}"
1046 esac
1047 fi
1048 ;;
1049
1050 arm,cortex-a72)
1051 if [ "${os_hint}" == "None" ]; then
1052 if [ "${gen_linux_dts}" == "None" ]; then
1053 cortex_a72_linux "${domain}"
1054 gen_linux_dts="True"
1055 fi
1056 cortex_a72_baremetal "${domain}" ${core} ${cpu_name}
1057 cortex_a72_freertos "${domain}" ${core} ${cpu_name}
1058 else
1059 case "${os_hint}" in
1060 linux*)
1061 if [ "${gen_linux_dts}" == "None" ]; then
1062 cortex_a72_linux "${domain}"
1063 gen_linux_dts="True"
1064 fi
1065 ;;
1066 baremetal*)
1067 cortex_a72_baremetal "${domain}" ${core} ${cpu_name};;
1068 freertos*)
1069 cortex_a72_freertos "${domain}" ${core} ${cpu_name};;
1070 *)
1071 warn "cortex-a72 for unknown OS (${os_hint}), parsing baremetal. ${domain}"
1072 cortex_a72_baremetal "${domain}"
1073 esac
1074 fi
1075 ;;
1076 arm,cortex-r5)
1077 if [ "${os_hint}" == "None" ]; then
1078 # We need a base cortex_r5_baremetal for the FSBL for ZynqMP platform
1079 [ "${machine}" = "zynqmp" ] && cortex_r5_baremetal fsbl ${core} ${cpu_name}
1080 cortex_r5_baremetal "${domain}" ${core} ${cpu_name}
1081 cortex_r5_freertos "${domain}" ${core} ${cpu_name}
1082 else
1083 case "${os_hint}" in
1084 baremetal*)
1085 cortex_r5_baremetal "${domain}" ${core} ${cpu_name};;
1086 freertos*)
1087 cortex_r5_freertos "${domain}" ${core} ${cpu_name};;
1088 *)
1089 warn "cortex-r5 for unknown OS (${os_hint}), parsing baremetal. ${domain}"
1090 cortex_r5_baremetal "${domain}"
1091 esac
1092 fi
1093 ;;
1094
1095 xlnx,microblaze)
1096 process_microblaze
1097 case "${os_hint}" in
1098 None | baremetal*)
1099 warn "Microblaze for Baremetal ${domain} not yet implemented" ;;
1100 Linux)
1101 warn "Microblaze for Linux ${domain} not yet implemented" ;;
1102 *)
1103 warn "Microblaze for unknown OS (${os_hint}), not yet implemented. ${domain}" ;;
1104 esac
1105 ;;
1106
1107 pmu-microblaze)
1108 pmu-microblaze ${cpu_name};;
1109
1110 pmc-microblaze)
1111 pmc-microblaze ${cpu_name};;
1112
1113 psm-microblaze)
1114 psm-microblaze ${cpu_name};;
1115 *)
1116 warn "Unknown CPU ${cpu}"
1117
1118 esac
1119 done <${cpulist}
1120}
1121
1122gen_local_conf() {
1123 cat << EOF >> $1
1124
1125# Avoid errors in some baremetal configs as these layers may be present
1126# but are not used. Note the following lines are optional and can be
1127# safetly disabled.
1128SKIP_META_VIRT_SANITY_CHECK = "1"
1129SKIP_META_SECURITY_SANITY_CHECK = "1"
1130SKIP_META_TPM_SANITY_CHECK = "1"
1131
1132# Each multiconfig will define it's own TMPDIR, this is the new default based
1133# on BASE_TMPDIR for the Linux build
1134TMPDIR = "\${BASE_TMPDIR}/tmp"
1135
1136# Use the newly generated MACHINE
1137MACHINE = "${mach_conf}"
1138
1139# All of the TMPDIRs must be in a common parent directory. This is defined
1140# as BASE_TMPDIR.
1141# Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp
1142BASE_TMPDIR ?= "\${TOPDIR}"
1143
1144# The following is the full set of multiconfigs for this configuration
1145# A large list can cause a slow parse.
1146#BBMULTICONFIG ?= "${multiconf}"
1147# Alternatively trim the list to the minimum
1148BBMULTICONFIG = "${multiconf_min}"
1149EOF
1150}
1151
1152gen_petalinux_conf() {
1153 cd "${config_dir}" || exit
1154 (
1155 if [ "$machine" == "zynqmp" ]; then
1156 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psu_cortexa53_0 ${petalinux_schema} \
1157 || error "lopper failed"
1158 else
1159 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psv_cortexa72_0 ${petalinux_schema} \
1160 || error "lopper failed"
1161 fi
1162 )
1163}
1164parse_args "$@"
1165
1166lopper=$(command -v lopper)
1167lopper_dir=$(dirname "${lopper}")
1168lops_dir=$(ls -d $(dirname "${lopper_dir}")/lib/python*/site-packages/lopper/lops | head -n 1)
1169embeddedsw=$(dirname "${lopper_dir}")/share/embeddedsw
1170system_conf=""
1171multiconf=""
1172
1173[ -z "${lopper}" ] && error "Unable to find lopper, please source the prestep environment"
1174
1175cpulist=$(mktemp)
1176
1177priordir=$(pwd)
1178cd "${config_dir}" || exit
1179mkdir -p dts multiconfig machine/include
1180# Get mach_conf name and model name
1181(
1182 cd dts || error "Unable to cd to dts dir"
1183 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-machine-name.dts" "${system_dts}" \
1184 /dev/null > ${cpulist} || error "lopper failed"
1185 rm -f "lop-machine-name.dts.dtb"
1186)
1187read local_mach_conf deviceid model < ${cpulist}
1188if [ -z "${mach_conf}" ]; then
1189 mach_conf=${local_mach_conf}
1190fi
1191
1192if [ -z "${dts_path}"]; then
1193 dts_path=${local_mach_conf}
1194fi
1195# Is it relative? If so, relative to conf/dts
1196if [ "${dts_path##/}" = "${dts_path}" ]; then
1197 dts_path="dts/${dts_path}"
1198else
1199 dts_path=$(realpath ${dts_path})
1200fi
1201# Convert the DTS_PATH into something we can put in a config file
1202if [ "${dts_path##/}" = "${dts_path}" ]; then
1203 dts_file_path="\${TOPDIR}/conf/${dts_path}"
1204else
1205 dts_file_path="${dts_path}"
1206fi
1207
1208# Generate CPU list
1209(
1210 cd dts || error "Unable to cd to dts dir"
1211 LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dts}" \
1212 /dev/null > ${cpulist} || error "lopper failed"
1213 rm -f "lop-xilinx-id-cpus.dts.dtb"
1214)
1215
1216detect_machine
1217# Now that we know the machine name, we can create the directory
1218mkdir -p machine/include/${mach_conf}
1219mkdir -p ${dts_path}
1220
1221echo "System Configuration:"
1222echo "MODEL = \"${model}\""
1223echo "MACHINE = \"${mach_conf}\""
1224echo "DEVICE_ID = \"${deviceid}\""
1225echo "SOC_FAMILY = \"${machine}\""
1226echo "SOC_VARIANT = \"${soc_variant}\""
1227echo "CPUs:"
1228dump_cpus " = "
1229echo
1230
1231info "Generating configuration..."
1232parse_cpus
1233
1234generate_machine
1235
1236cd ${priordir}
1237if [ -z "${localconf}" ]; then
1238 echo
1239 echo "To enable this, add the following to your local.conf:"
1240 echo
1241 tmpfile=$(mktemp)
1242 gen_local_conf ${tmpfile}
1243 cat $tmpfile
1244 rm $tmpfile
1245else
1246 echo
1247 echo "Configuration for local.conf written to ${localconf}"
1248 echo
1249 gen_local_conf ${localconf}
1250fi
1251
1252if [ -n "${petalinux_schema}" ]; then
1253 echo
1254 echo "Generating petalinux config file:"
1255 echo
1256 gen_petalinux_conf
1257fi
1258
1259# Cleanup our temp file
1260rm -rf ${cpulist} ${config_dir}/CMakeLists.txt ${config_dir}/DRVLISTConfig.cmake
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb b/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb
deleted file mode 100644
index dc7d647a..00000000
--- a/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb
+++ /dev/null
@@ -1,91 +0,0 @@
1DESCRIPTION = "Xilinx Device Tree based configuration generator"
2LICENSE = "MIT"
3
4SRC_URI += " \
5 file://dt-processor.sh \
6 file://README-setup \
7"
8
9LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
10
11TOOLCHAIN_TARGET_TASK = ""
12
13TOOLCHAIN_HOST_TASK = "\
14 nativesdk-sdk-provides-dummy \
15 nativesdk-lopper \
16 nativesdk-xilinx-lops \
17 nativesdk-esw-conf \
18 "
19
20MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
21PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}"
22PACKAGE_ARCHS = ""
23TARGET_ARCH = "none"
24TARGET_OS = "none"
25
26SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}"
27
28TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-xilinx-nativesdk-prestep-${DISTRO_VERSION}"
29
30SDK_TITLE = "Device Tree setup tools"
31
32RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
33
34EXCLUDE_FROM_WORLD = "1"
35
36inherit populate_sdk
37inherit toolchain-scripts-base
38inherit nopackages
39
40deltask install
41deltask populate_sysroot
42
43do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}"
44
45REAL_MULTIMACH_TARGET_SYS = "none"
46
47# Needed to ensure README-setup and dt-processor.sh are available
48addtask do_populate_sdk after do_unpack
49
50create_sdk_files:append () {
51
52 install -m 0644 ${WORKDIR}/README-setup ${SDK_OUTPUT}/${SDKPATH}/.
53 install -m 0755 ${WORKDIR}/dt-processor.sh ${SDK_OUTPUT}/${SDKPATH}/.
54
55 rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
56 rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
57 rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
58
59 # Generate new (mini) sdk-environment-setup file
60 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
61 touch $script
62 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
63 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
64 echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
65 echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
66
67 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
68
69 cat >> $script <<EOF
70if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
71 for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
72 . \$envfile
73 done
74fi
75# We have to unset this else it can confuse oe-selftest and other tools
76# which may also use the overlapping namespace.
77unset OECORE_NATIVE_SYSROOT
78EOF
79
80 if [ "${SDKMACHINE}" = "i686" ]; then
81 echo 'export NO32LIBS="0"' >>$script
82 echo 'echo "$BB_ENV_PASSTHROUGH_ADDITIONS" | grep -q "NO32LIBS"' >>$script
83 echo '[ $? != 0 ] && export BB_ENV_PASSTHROUGH_ADDITIONS="NO32LIBS $BB_ENV_PASSTHROUGH_ADDITIONS"' >>$script
84 fi
85}
86
87# buildtools-tarball doesn't need config site
88TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
89
90# The recipe doesn't need any default deps
91INHIBIT_DEFAULT_DEPS = "1"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_2024.1.bb
index 7edd2d9d..7edd2d9d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_2024.1.bb
index 1846b291..1846b291 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_2024.1.bb
index 47111dc5..47111dc5 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_2024.1.bb
index 68a26f45..68a26f45 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axidma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axidma_2024.1.bb
index c385d13f..c385d13f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axidma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axidma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_2024.1.bb
index 04c2c151..04c2c151 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_2024.1.bb
index 0b635859..0b635859 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_2024.1.bb
index 4aa716e7..4aa716e7 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_2024.1.bb
index ff2eae91..ff2eae91 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_2024.1.bb
index b34dedb0..b34dedb0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_2024.1.bb
index 2866c02b..2866c02b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_2024.1.bb
index 15268629..15268629 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_2024.1.bb
index a3145467..a3145467 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/bram_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/bram_2024.1.bb
index 3c81c619..3c81c619 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/bram_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/bram_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/can-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/can-example_2024.1.bb
index 115852fa..115852fa 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/can-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/can-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/can_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/can_2024.1.bb
index eb7fc473..eb7fc473 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/can_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/can_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_2024.1.bb
index 84276569..84276569 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canfd_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canfd_2024.1.bb
index 5f2e6ea8..5f2e6ea8 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/canfd_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/canfd_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_2024.1.bb
index 574dc563..574dc563 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canps_2024.1.bb
index c9f61cd2..c9f61cd2 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/canps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/canps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/cframe_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/cframe_2024.1.bb
index 6ffdf85d..6ffdf85d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/cframe_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/cframe_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_2024.1.bb
index 3cb675bc..3cb675bc 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb
new file mode 100644
index 00000000..71ffdc32
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb
@@ -0,0 +1,5 @@
1inherit esw_examples features_check
2
3REQUIRED_MACHINE_FEATURES = "clk-wiz"
4
5ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clk_wiz/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_2024.1.bb
index ae0453a1..ae0453a1 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_2024.1.bb
index f9c5bce6..f9c5bce6 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clockps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clockps_2024.1.bb
index 4bddb2c0..3a464480 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/clockps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/clockps_2024.1.bb
@@ -8,3 +8,6 @@ DEPENDS += "xilstandalone "
8 8
9ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/src/" 9ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/src/"
10ESW_COMPONENT_NAME = "libclockps.a" 10ESW_COMPONENT_NAME = "libclockps.a"
11
12addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
13do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/common_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/common_2024.1.bb
index 541ff225..10635f7f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/common_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/common_2024.1.bb
@@ -13,11 +13,13 @@ PACKAGECONFIG[clockps] = "${RECIPE_SYSROOT}/usr/lib/libclockps.a,,clockps,,"
13PACKAGECONFIG[scugic] = "${RECIPE_SYSROOT}/usr/lib/libscugic.a,,scugic,," 13PACKAGECONFIG[scugic] = "${RECIPE_SYSROOT}/usr/lib/libscugic.a,,scugic,,"
14PACKAGECONFIG[intc] = "${RECIPE_SYSROOT}/usr/lib/libintc.a,,intc,," 14PACKAGECONFIG[intc] = "${RECIPE_SYSROOT}/usr/lib/libintc.a,,intc,,"
15 15
16ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/common/src/" 16ESW_COMPONENT_SRC = "/lib/bsp/standalone/src/common/intr/"
17ESW_COMPONENT_NAME = "libcommon.a" 17ESW_COMPONENT_NAME = "libcommon.a"
18 18
19do_configure:prepend() { 19do_configure:prepend() {
20 (
21 cd ${S}/${ESW_COMPONENT_SRC}/
20 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/intc/src/ 22 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/intc/src/
21 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/scugic/src/ 23 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/scugic/src/
22 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ 24 )
23} 25}
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_2024.1.bb
index 9110b51e..9110b51e 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_2024.1.bb
index 5706967a..5706967a 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/csudma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/csudma_2024.1.bb
index 8283ce8d..8283ce8d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/csudma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/csudma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_2024.1.bb
index 4728b6c5..4728b6c5 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_2024.1.bb
index dd70e09d..dd70e09d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_2024.1.bb
index 4b794d22..4b794d22 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb
new file mode 100644
index 00000000..fd01b757
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeccf"
5
6DEPENDS += " dfeccf"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeccf/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb
new file mode 100644
index 00000000..86a55b9f
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb
@@ -0,0 +1,14 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeccf"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeccf/src/"
11ESW_COMPONENT_NAME = "libdfeccf.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb
new file mode 100644
index 00000000..0f4d45be
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeequ"
5
6DEPENDS += " dfeequ"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeequ/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb
new file mode 100644
index 00000000..8ad43c1b
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb
@@ -0,0 +1,15 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeequ"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal "
9
10
11ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeequ/src/"
12ESW_COMPONENT_NAME = "libdfeequ.a"
13
14addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
15do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb
new file mode 100644
index 00000000..9149e9c4
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "dfemix"
5
6DEPENDS += " dfemix"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfemix/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb
new file mode 100644
index 00000000..31c7b8ed
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb
@@ -0,0 +1,14 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dfemix"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfemix/src/"
11ESW_COMPONENT_NAME = "libdfemix.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb
new file mode 100644
index 00000000..661c2768
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeofdm"
5
6DEPENDS += " dfeofdm"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeofdm/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb
new file mode 100644
index 00000000..a02ceae7
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb
@@ -0,0 +1,14 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeofdm"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeofdm/src/"
11ESW_COMPONENT_NAME = "libdfeofdm.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb
new file mode 100644
index 00000000..10ac2029
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeprach"
5
6DEPENDS += " dfeprach"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeprach/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb
new file mode 100644
index 00000000..0890ff3b
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb
@@ -0,0 +1,14 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dfeprach"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeprach/src/"
11ESW_COMPONENT_NAME = "libdfeprach.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_2024.1.bb
index 974dd48b..974dd48b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_2024.1.bb
index 81f2157b..81f2157b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_2024.1.bb
index 40d08e4b..40d08e4b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_2024.1.bb
index 1dcd8404..1dcd8404 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb
new file mode 100644
index 00000000..ab63d3a1
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dp14"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14/src/"
11ESW_COMPONENT_NAME = "libdp14.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb
new file mode 100644
index 00000000..4e98b2e4
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "dp14rxss"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14rxss/src/"
11ESW_COMPONENT_NAME = "libdp14rxss.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_2024.1.bb
index 3adb88a6..3adb88a6 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_2024.1.bb
index 87cca884..87cca884 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_2024.1.bb
index 6ed717fb..6ed717fb 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_2024.1.bb
index 9ceb477f..9ceb477f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_2024.1.bb
index 2c57eafe..2c57eafe 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emacps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emacps_2024.1.bb
index 8ed85984..8ed85984 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/emacps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/emacps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb
new file mode 100644
index 00000000..0f46f99b
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "emc"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emc/src/"
11ESW_COMPONENT_NAME = "libemc.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_2024.1.bb
index 3f79cfec..3f79cfec 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpio_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpio_2024.1.bb
index 83a746b7..83a746b7 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/gpio_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpio_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_2024.1.bb
index cc2e1703..cc2e1703 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_2024.1.bb
index 4bd63d1e..4bd63d1e 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb
new file mode 100644
index 00000000..37d70f6a
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "hwicap"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hwicap/src/"
11ESW_COMPONENT_NAME = "libhwicap.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb
new file mode 100644
index 00000000..27333e13
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "i2srx"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i2srx/src/"
11ESW_COMPONENT_NAME = "libi2srx.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb
new file mode 100644
index 00000000..ca09a7f0
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "i2stx"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i2stx/src/"
11ESW_COMPONENT_NAME = "libi2stx.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb
new file mode 100644
index 00000000..699b9d97
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb
@@ -0,0 +1,5 @@
1inherit esw_examples features_check
2
3REQUIRED_MACHINE_FEATURES = "i3cpsx"
4
5ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i3cpsx/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb
new file mode 100644
index 00000000..7b88520d
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb
@@ -0,0 +1,13 @@
1inherit features_check
2
3REQUIRED_MACHINE_FEATURES = "i3cpsx"
4
5inherit esw python3native
6
7DEPENDS += "xilstandalone "
8
9ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i3cpsx/src/"
10ESW_COMPONENT_NAME = "libi3cpsx.a"
11
12addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
13do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_2024.1.bb
index b781b82c..b781b82c 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iic_2024.1.bb
index 7011f90b..7011f90b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/iic_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/iic_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_2024.1.bb
index e9df1cbd..e9df1cbd 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iicps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iicps_2024.1.bb
index e96dc2ac..e96dc2ac 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/iicps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/iicps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_2024.1.bb
index 0b4b95a8..0b4b95a8 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/intc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/intc_2024.1.bb
index 331c2e32..331c2e32 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/intc_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/intc_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_2024.1.bb
index 1f625521..1f625521 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_2024.1.bb
index 0b31601d..0b31601d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_2024.1.bb
index 3e2ccc0b..3e2ccc0b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_2024.1.bb
index 6b1c211a..6b1c211a 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_2024.1.bb
index 1fb76b18..1fb76b18 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_2024.1.bb
index 3c4870b4..3c4870b4 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mbox_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mbox_2024.1.bb
index 5c1b8393..5c1b8393 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mbox_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mbox_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_2024.1.bb
index 64979470..64979470 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_2024.1.bb
index f13a7e54..f13a7e54 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_2024.1.bb
index fc0527da..fc0527da 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mutex_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mutex_2024.1.bb
index 98abc948..98abc948 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/mutex_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/mutex_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb
new file mode 100644
index 00000000..ce3f7898
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "nandps"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/nandps/src/"
11ESW_COMPONENT_NAME = "libnandps.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_2024.1.bb
index 8b7a88b5..8b7a88b5 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_2024.1.bb
index 6d2a71c5..6d2a71c5 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_2024.1.bb
index 0ded4fd2..0ded4fd2 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_2024.1.bb
index f0548efc..f0548efc 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_2024.1.bb
index 23895fba..23895fba 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_2024.1.bb
index ccedb1df..ccedb1df 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb
new file mode 100644
index 00000000..12390ae2
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "prc"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/prc/src/"
11ESW_COMPONENT_NAME = "libprc.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb
new file mode 100644
index 00000000..9ea7b2d8
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "prd"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/prd/src/"
11ESW_COMPONENT_NAME = "libprd.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_2024.1.bb
index 674b879a..674b879a 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspips_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspips_2024.1.bb
index fa28d901..fa28d901 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/qspips_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspips_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_2024.1.bb
index 21231450..21231450 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_2024.1.bb
index 5b4b1614..5b4b1614 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_2024.1.bb
index 243393bb..243393bb 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/resetps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/resetps_2024.1.bb
index c753c666..c753c666 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/resetps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/resetps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb
new file mode 100644
index 00000000..973e5177
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb
@@ -0,0 +1,8 @@
1# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
2inherit esw_examples features_check
3
4REQUIRED_MACHINE_FEATURES = "rfdc"
5
6DEPENDS += " rfdc"
7
8ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rfdc/examples/"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb
new file mode 100644
index 00000000..cfc106b6
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "rfdc"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone libmetal"
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rfdc/src/"
11ESW_COMPONENT_NAME = "librfdc.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_2024.1.bb
index ac386c4c..ac386c4c 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_2024.1.bb
index 7b96bf16..7b96bf16 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_2024.1.bb
index cbef3ce9..cbef3ce9 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scugic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scugic_2024.1.bb
index f079354d..f079354d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/scugic_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/scugic_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb
new file mode 100644
index 00000000..9e101058
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "scutimer"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scutimer/src/"
11ESW_COMPONENT_NAME = "libscutimer.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb
new file mode 100644
index 00000000..757a5de1
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "scuwdt"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scuwdt/src/"
11ESW_COMPONENT_NAME = "libscuwdt.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb
new file mode 100644
index 00000000..e4f61219
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "sd-fec"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sd_fec/src/"
11ESW_COMPONENT_NAME = "libsd_fec.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_2024.1.bb
index 550d664b..550d664b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sdps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sdps_2024.1.bb
index 4caf0e63..4caf0e63 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sdps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sdps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb
new file mode 100644
index 00000000..3e564725
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "spi"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spi/src/"
11ESW_COMPONENT_NAME = "libspi.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_2024.1.bb
index 71ead5d3..71ead5d3 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spips_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spips_2024.1.bb
index ca02fda0..ca02fda0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/spips_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/spips_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_2024.1.bb
index 5bc007ad..5bc007ad 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_2024.1.bb
index 5353f6f8..5353f6f8 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_2024.1.bb
index 2c76a978..2c76a978 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_2024.1.bb
index 871a77a3..871a77a3 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_2024.1.bb
index edce2794..edce2794 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_2024.1.bb
index 2c693809..2c693809 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb
new file mode 100644
index 00000000..d8dcff08
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "tft"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tft/src/"
11ESW_COMPONENT_NAME = "libtft.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_2024.1.bb
index dbf3d364..dbf3d364 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_2024.1.bb
index dd91fed7..dd91fed7 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_2024.1.bb
index 8224d6fe..8224d6fe 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_2024.1.bb
index cf94a9d0..cf94a9d0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_2024.1.bb
index 84c5618c..84c5618c 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_2024.1.bb
index 77d000db..77d000db 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb
new file mode 100644
index 00000000..1651ede2
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "trngpsv"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trngpsv/src/"
11ESW_COMPONENT_NAME = "libtrngpsv.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb
new file mode 100644
index 00000000..7699dfe5
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "trngpsx"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trngpsx/src/"
11ESW_COMPONENT_NAME = "libtrngpsx.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_2024.1.bb
index d294c383..d294c383 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_2024.1.bb
index ea520656..ea520656 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_2024.1.bb
index 9aa0f598..9aa0f598 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_2024.1.bb
index 5998e092..5998e092 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_2024.1.bb
index d81ce77b..d81ce77b 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_2024.1.bb
index a08763cb..a08763cb 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_2024.1.bb
index bbff466d..bbff466d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartps_2024.1.bb
index 932be9eb..932be9eb 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_2024.1.bb
index 78f878a6..78f878a6 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_2024.1.bb
index 01e48caa..01e48caa 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_2024.1.bb
index 0d4e113a..0d4e113a 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usb_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usb_2024.1.bb
index 9dac8cba..9dac8cba 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/usb_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/usb_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb
new file mode 100644
index 00000000..c4a2fff0
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "usbps"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usbps/src/"
11ESW_COMPONENT_NAME = "libusbps.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_2024.1.bb
index 4eb9bc93..4eb9bc93 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_2024.1.bb
index 194b1f0f..194b1f0f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_2024.1.bb
index 068a43e9..068a43e9 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_2024.1.bb
index 741fdd91..741fdd91 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_2024.1.bb
index cf2cdf6f..cf2cdf6f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_2024.1.bb
index 79ef55f2..79ef55f2 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_2024.1.bb
index fc13c194..fc13c194 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_2024.1.bb
index 91ee34d8..91ee34d8 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_2024.1.bb
index 87a1be53..87a1be53 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_2024.1.bb
index d88ac592..d88ac592 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_2024.1.bb
index 4d5dcf03..4d5dcf03 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_2024.1.bb
index 8cf95c9d..8cf95c9d 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_2024.1.bb
index 1731f984..1731f984 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb
new file mode 100644
index 00000000..1e592d40
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb
@@ -0,0 +1,11 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmi-common"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmi_common/src/"
11ESW_COMPONENT_NAME = "libv_hdmi_common.a"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb
new file mode 100644
index 00000000..d3d601cb
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmiphy1"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmiphy1/src/"
11ESW_COMPONENT_NAME = "libv_hdmiphy1.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb
new file mode 100644
index 00000000..f2b576cd
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmirx1"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirx1/src/"
11ESW_COMPONENT_NAME = "libv_hdmirx1.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb
new file mode 100644
index 00000000..faf57614
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmirxss1"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirxss1/src/"
11ESW_COMPONENT_NAME = "libv_hdmirxss1.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb
new file mode 100644
index 00000000..7070235e
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmitx1"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitx1/src/"
11ESW_COMPONENT_NAME = "libv_hdmitx1.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb
new file mode 100644
index 00000000..de4f4ad9
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-hdmitxss1"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitxss1/src/"
11ESW_COMPONENT_NAME = "libv_hdmitxss1.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_2024.1.bb
index b239380e..b239380e 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_2024.1.bb
index f5ad5f4e..f5ad5f4e 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_2024.1.bb
index 8bafbf00..8bafbf00 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_2024.1.bb
index acc19bd0..acc19bd0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_2024.1.bb
index 28660316..28660316 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_2024.1.bb
index bd725dbe..bd725dbe 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_2024.1.bb
index 2859de79..2859de79 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_2024.1.bb
index 77cf9189..77cf9189 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_2024.1.bb
index 6ea70db1..6ea70db1 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_2024.1.bb
index 45913cdc..45913cdc 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_2024.1.bb
index 9528d2e0..9528d2e0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb
new file mode 100644
index 00000000..f908ce55
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-warp-filter"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_warp_filter/src/"
11ESW_COMPONENT_NAME = "libv_warp_filter.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb
new file mode 100644
index 00000000..ff04ec35
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "v-warp-init"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_warp_init/src/"
11ESW_COMPONENT_NAME = "libv_warp_init.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/video-common_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/video-common_2024.1.bb
index 278dee8a..278dee8a 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/video-common_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/video-common_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb
new file mode 100644
index 00000000..1a06cf60
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb
@@ -0,0 +1,14 @@
1
2inherit features_check
3
4REQUIRED_MACHINE_FEATURES = "vphy"
5
6inherit esw python3native
7
8DEPENDS += "xilstandalone "
9
10ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/vphy/src/"
11ESW_COMPONENT_NAME = "libvphy.a"
12
13addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot
14do_prepare_recipe_sysroot[rdeptask] = "do_unpack"
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_2024.1.bb
index d9050ec4..d9050ec4 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_2024.1.bb
index 26b2852f..26b2852f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vtc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vtc_2024.1.bb
index a82ae5ee..a82ae5ee 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/vtc_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/vtc_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_2024.1.bb
index 610a7476..610a7476 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_2024.1.bb
index 2c900038..2c900038 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_2024.1.bb
index cad6ca20..cad6ca20 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_2024.1.bb
index 33331c32..33331c32 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_2024.1.bb
index f8878144..f8878144 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_2024.1.bb
index 85800a27..85800a27 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_2024.1.bb
index 26983a8f..26983a8f 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_2024.1.bb
index cab8e9d0..cab8e9d0 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_2024.1.bb
index d6a87183..d6a87183 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_2024.1.bb
index 491eb07c..491eb07c 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_2024.1.bb
index e74e3279..e74e3279 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/zdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/zdma_2024.1.bb
index e987f560..e987f560 100644
--- a/meta-xilinx-standalone-experimental/recipes-drivers/zdma_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-drivers/zdma_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_2024.1.bb
index 22d7955e..22d7955e 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_2024.1.bb
index 2ec1d6cd..2eb08307 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_2024.1.bb
@@ -25,14 +25,10 @@ ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/"
25ESW_COMPONENT_NAME = "libxil.a" 25ESW_COMPONENT_NAME = "libxil.a"
26 26
27DEPENDS += "xilstandalone " 27DEPENDS += "xilstandalone "
28MACHINE_FEATURES:remove = "aiengine dfeccf dfeequ dfemix dfeprach rfdc dfeofdm"
28REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}" 29REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}"
29PACKAGECONFIG ?= "${MACHINE_FEATURES}" 30PACKAGECONFIG ?= "${MACHINE_FEATURES}"
30 31
31do_configure:prepend() {
32 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S}
33 install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/
34}
35
36do_compile() { 32do_compile() {
37 # Combines the .a archives produced by all of the dependent items 33 # Combines the .a archives produced by all of the dependent items
38 cd ${RECIPE_SYSROOT}/usr/lib/ 34 cd ${RECIPE_SYSROOT}/usr/lib/
@@ -48,3 +44,12 @@ do_compile() {
48 ${AR} -M <libxil.mri 44 ${AR} -M <libxil.mri
49 cp libxil.a ${B} 45 cp libxil.a ${B}
50} 46}
47
48do_install() {
49 install -d ${D}${libdir}
50 install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir}
51
52 # Install Spec files for consumers of BSP
53 install -d ${D}${includedir}
54 cp -rf ${SPECFILE_PATH} ${D}${includedir}
55}
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/lwip_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/lwip_2024.1.bb
index 93f0b1e8..e70dfa11 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/lwip_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/lwip_2024.1.bb
@@ -1,17 +1,17 @@
1inherit esw python3native 1inherit esw python3native
2 2
3ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip213/src/" 3ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip220/src/"
4ESW_COMPONENT_NAME = "liblwip213.a" 4ESW_COMPONENT_NAME = "liblwip220.a"
5 5
6DEPENDS += "libxil" 6DEPENDS += "libxil"
7DEPENDS:append:xilinx-freertos = "freertos10-xilinx" 7DEPENDS:append:xilinx-freertos = "freertos10-xilinx"
8 8
9EXTRA_OECMAKE += "-Dlwip213_api_mode=RAW_API" 9EXTRA_OECMAKE += "-Dlwip220_api_mode=RAW_API"
10EXTRA_OECMAKE += "-Dlwip213_dhcp_does_arp_check=ON" 10EXTRA_OECMAKE += "-Dlwip220_dhcp_does_arp_check=ON"
11EXTRA_OECMAKE += "-Dlwip213_dhcp=ON" 11EXTRA_OECMAKE += "-Dlwip220_dhcp=ON"
12EXTRA_OECMAKE += "-Dlwip213_pbuf_pool_size=2048" 12EXTRA_OECMAKE += "-Dlwip220_pbuf_pool_size=2048"
13EXTRA_OECMAKE += "-Dlwip213_ipv6_enable=OFF" 13EXTRA_OECMAKE += "-Dlwip220_ipv6_enable=OFF"
14EXTRA_OECMAKE:append:xilinx-freertos = " -Dlwip213_api_mode=SOCKET_API" 14EXTRA_OECMAKE:append:xilinx-freertos = " -Dlwip220_api_mode=SOCKET_API"
15 15
16do_configure:prepend() { 16do_configure:prepend() {
17 # This script should also not rely on relative paths and such 17 # This script should also not rely on relative paths and such
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_2024.1.bb
index cae39d17..cae39d17 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_2024.1.bb
index b8dc3b33..b8dc3b33 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_2024.1.bb
index a3fb1560..a3fb1560 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_2024.1.bb
index 6eaf40ac..6eaf40ac 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_2024.1.bb
index 11b03c1b..11b03c1b 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_2024.1.bb
index 600369ad..600369ad 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_2024.1.bb
index 77115515..77115515 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb
new file mode 100644
index 00000000..bd001f64
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb
@@ -0,0 +1,33 @@
1inherit esw deploy
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/examples/"
4
5PACKAGECONFIG ??= "client server"
6PACKAGECONFIG[client] ="-DXILNVM_mode="client",,"
7PACKAGECONFIG[server] ="-DXILNVM_mode="server",,"
8
9DEPENDS += "xilnvm"
10
11do_configure:prepend() {
12 (
13 cd ${S}
14 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
15 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
16 )
17}
18
19ESW_CUSTOM_LINKER_FILE ?= "None"
20EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
21
22do_install() {
23 install -d ${D}/${base_libdir}/firmware
24 install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware
25}
26
27do_deploy() {
28 install -d ${DEPLOYDIR}/${BPN}/
29 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/
30}
31addtask deploy before do_build after do_package
32
33FILES:${PN} = "${base_libdir}/firmware/*.elf"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb
new file mode 100644
index 00000000..8aa1250d
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb
@@ -0,0 +1,10 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/src/"
4ESW_COMPONENT_NAME = "libxilnvm.a"
5
6PACKAGECONFIG ??= "client server"
7PACKAGECONFIG[client] ="-DXILNVM_mode="client",,"
8PACKAGECONFIG[server] ="-DXILNVM_mode="server",,"
9
10DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb
deleted file mode 100644
index 9114aa72..00000000
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/src/"
4ESW_COMPONENT_NAME = "libxilnvm.a"
5
6DEPENDS += "libxil xiltimer xilplmi"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_2024.1.bb
index c008b069..c008b069 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb
new file mode 100644
index 00000000..cb3b7831
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb
@@ -0,0 +1,6 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilplmi/src/"
4ESW_COMPONENT_NAME = "libxilplmi.a"
5
6DEPENDS += "xilstandalone libxil cfupmc xiltimer ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb
deleted file mode 100644
index 35a1efb0..00000000
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilplmi/src/"
4ESW_COMPONENT_NAME = "libxilplmi.a"
5
6DEPENDS += "xilstandalone libxil cfupmc"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_2024.1.bb
index 69b505c8..69b505c8 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_2024.1.bb
index ca0abc12..bbe2920b 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_2024.1.bb
@@ -2,7 +2,11 @@ inherit esw deploy
2 2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/examples/" 3ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/examples/"
4 4
5DEPENDS += "xilpuf xilsecure" 5PACKAGECONFIG ??= "client server"
6PACKAGECONFIG[client] ="-DXILPUF_Mode="client",,"
7PACKAGECONFIG[server] ="-DXILPUF_Mode="server",,"
8
9DEPENDS += "xilpuf xilsecure xilmailbox xilnvm xilplmi"
6 10
7do_configure:prepend() { 11do_configure:prepend() {
8 ( 12 (
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_2024.1.bb
index 81bee095..84765a39 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_2024.1.bb
@@ -3,4 +3,8 @@ inherit esw
3ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/" 3ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/"
4ESW_COMPONENT_NAME = "libxilpuf.a" 4ESW_COMPONENT_NAME = "libxilpuf.a"
5 5
6PACKAGECONFIG ??= "client server"
7PACKAGECONFIG[client] ="-DXILPUF_Mode="client",,"
8PACKAGECONFIG[server] ="-DXILPUF_Mode="server",,"
9
6DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}" 10DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb
index 993794b5..a2b4b7a5 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb
@@ -2,6 +2,10 @@ inherit esw deploy
2 2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/examples/" 3ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/examples/"
4 4
5PACKAGECONFIG ??= "client server"
6PACKAGECONFIG[client] ="-DXILSECURE_mode="client",,"
7PACKAGECONFIG[server] ="-DXILSECURE_mode="server",,"
8
5DEPENDS += "xilsecure" 9DEPENDS += "xilsecure"
6 10
7do_configure:prepend() { 11do_configure:prepend() {
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb
new file mode 100644
index 00000000..be22ba90
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb
@@ -0,0 +1,14 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/src/"
4ESW_COMPONENT_NAME = "libxilsecure.a"
5
6PACKAGECONFIG ??= "client server"
7PACKAGECONFIG[client] ="-DXILSECURE_mode="client",,"
8PACKAGECONFIG[server] ="-DXILSECURE_mode="server",,"
9
10DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' or d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''} ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}"
11
12do_install:append() {
13 install -m 0755 ${B}/*.a ${D}${libdir}
14}
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb
deleted file mode 100644
index 0001d3fb..00000000
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb
+++ /dev/null
@@ -1,6 +0,0 @@
1inherit esw
2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/src/"
4ESW_COMPONENT_NAME = "libxilsecure.a"
5
6DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else ''} ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_2024.1.bb
index 3631d7f0..3631d7f0 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey-example_2024.1.bb
index a4a81c8b..a42d6fd2 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey-example_2024.1.bb
@@ -1,29 +1,29 @@
1inherit esw deploy 1inherit esw deploy
2 2
3ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/examples/" 3ESW_COMPONENT_SRC = "/lib/sw_services/xilskey/examples/"
4 4
5DEPENDS += "xilnvm" 5DEPENDS += "xilskey xilsecure"
6 6
7do_configure:prepend() { 7do_configure:prepend() {
8 ( 8 (
9 cd ${S} 9 cd ${S}
10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} 10 lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC}
11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ 11 install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/
12 ) 12 )
13} 13}
14 14
15ESW_CUSTOM_LINKER_FILE ?= "None" 15ESW_CUSTOM_LINKER_FILE ?= "None"
16EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" 16EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}"
17 17
18do_install() { 18do_install() {
19 install -d ${D}/${base_libdir}/firmware 19 install -d ${D}/${base_libdir}/firmware
20 install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware 20 install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware
21} 21}
22 22
23do_deploy() { 23do_deploy() {
24 install -d ${DEPLOYDIR}/${BPN}/ 24 install -d ${DEPLOYDIR}/${BPN}/
25 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ 25 install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/
26} 26}
27addtask deploy before do_build after do_package 27addtask deploy before do_build after do_package
28 28
29FILES:${PN} = "${base_libdir}/firmware/*.elf" 29FILES:${PN} = "${base_libdir}/firmware/*.elf"
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_2024.1.bb
index 84782554..84782554 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_2024.1.bb
index facbfbaa..a4b0037b 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_2024.1.bb
@@ -14,5 +14,8 @@ do_configure:prepend() {
14 install -m 0755 *.c ${S}/${ESW_COMPONENT_SRC} 14 install -m 0755 *.c ${S}/${ESW_COMPONENT_SRC}
15 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} 15 lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S}
16 install -m 0755 StandaloneExample.cmake ${S}/${ESW_COMPONENT_SRC}/common/ 16 install -m 0755 StandaloneExample.cmake ${S}/${ESW_COMPONENT_SRC}/common/
17 LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S}
18 install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/common/
17 ) 19 )
20
18} 21}
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_2024.1.bb
index dd19671d..dd19671d 100644
--- a/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_git.bb
+++ b/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_2024.1.bb
diff --git a/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend b/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend
new file mode 100644
index 00000000..5434c9a5
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend
@@ -0,0 +1 @@
require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx.inc
diff --git a/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend b/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend
new file mode 100644
index 00000000..88b45295
--- /dev/null
+++ b/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend
@@ -0,0 +1 @@
require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx.inc
diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass
index 15b91fdb..1618bbcd 100644
--- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass
+++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass
@@ -3,27 +3,43 @@ ESW_VER ?= "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or 'master'
3 3
4REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" 4REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https"
5 5
6ESW_BRANCH[git] = "master"
6ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update" 7ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update"
7ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" 8ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2"
8ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" 9ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update"
9ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2" 10ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2_update"
11ESW_BRANCH[2024.1] = "xlnx_rel_v2024.1-next"
10BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" 12BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}"
11 13
14ESW_REV[git] = "${AUTOREV}"
12ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01" 15ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01"
13ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" 16ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2"
14ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" 17ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a"
15ESW_REV[2023.2] = "c9a0ee31b2a14cbcfcb56ca369037319b4ad4847" 18ESW_REV[2023.2] = "73f0904e41cc109f18bb19a5329d0e5a66af2434"
16SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'invalid'}" 19ESW_REV[2024.1] = "e367a6b8df2a30b12e5c88157afd98322a06c8a6"
20SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'INVALID'}"
17 21
18EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" 22EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}"
19EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" 23EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}"
20 24
21LICENSE = "MIT" 25LICENSE = "MIT"
26LIC_FILES_CHKSUM[master] = '9fceecdbcad88698f265578f3d4cb26c'
22LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d' 27LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d'
23LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' 28LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290'
24LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' 29LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c'
25LIC_FILES_CHKSUM[xlnx_rel_v2023.2] = '9fceecdbcad88698f265578f3d4cb26c' 30LIC_FILES_CHKSUM[xlnx_rel_v2023.2_update] = '9fceecdbcad88698f265578f3d4cb26c'
31LIC_FILES_CHKSUM[xlnx_rel_v2024.1-next] = '9fceecdbcad88698f265578f3d4cb26c'
26LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" 32LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}"
27 33
28SRC_URI = "${EMBEDDEDSW_SRCURI}" 34SRC_URI = "${EMBEDDEDSW_SRCURI}"
29PV .= "+git${SRCPV}" 35PV .= "+git${SRCPV}"
36
37python() {
38 if d.getVar('BB_NO_NETWORK') == '1':
39 try:
40 # Just evaluating SRCPV / SRCREV can trigger an exception when BB_NO_NETWORK is enabled.
41 var = d.getVar('SRCPV')
42 var = d.getVar('SRCREV')
43 except:
44 raise bb.parse.SkipRecipe('BB_NO_NETWORK is enabled, can not fetch SRCREV (%s)' % d.getVar('SRCREV'))
45}
diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc
index 814cb9cd..4d591707 100644
--- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc
+++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc
@@ -15,6 +15,9 @@ ESW_CFLAGS ?= ""
15 15
16# Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw 16# Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw
17TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}" 17TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}"
18TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr52', ' -DARMR5 -DARMR52', '', d)}"
19TUNE_CCARGS:append:versal = " -Dversal"
20TUNE_CCARGS:append:versal-net = " -DVERSAL_NET"
18 21
19# Make sure all regular recipes are excluded from compatibility 22# Make sure all regular recipes are excluded from compatibility
20# Avoid using this for native, nativesdk or cross recipes 23# Avoid using this for native, nativesdk or cross recipes
@@ -25,9 +28,8 @@ COMPATIBLE_HOST ?= "${COMPATOS}"
25 28
26# Clear defaults 29# Clear defaults
27PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" 30PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
28 31PREFERRED_PROVIDER_libmetal = "libmetal-xlnx"
29PREFERRED_VERSION_libmetal-xlnx = "${@'standalone' if 'xilinx-standalone-exp' in d.getVar('BBFILE_COLLECTIONS').split() else ''}" 32PREFERRED_PROVIDER_open-amp = "open-amp-xlnx"
30PREFERRED_VERSION_open-amp-xlnx = "${@'standalone' if 'xilinx-standalone-exp' in d.getVar('BBFILE_COLLECTIONS').split() else ''}"
31 33
32# Workaround for pulling in nativesdk-mingw-w64-winpthreads 34# Workaround for pulling in nativesdk-mingw-w64-winpthreads
33TOOLCHAIN_HOST_TASK:append:sdkmingw32 = " nativesdk-mingw-w64-winpthreads" 35TOOLCHAIN_HOST_TASK:append:sdkmingw32 = " nativesdk-mingw-w64-winpthreads"
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb
new file mode 100644
index 00000000..8816dc4d
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb
@@ -0,0 +1,11 @@
1require fsbl-firmware.inc
2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4
5SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \
7 file://fsbl-fixups.patch \
8 "
9
10# This version does not build for zynq
11COMPATIBLE_MACHINE:zynq = "none"
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb
new file mode 100644
index 00000000..37861b75
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb
@@ -0,0 +1,29 @@
1require plm-firmware.inc
2
3# Separate build directories for versal and versal-net
4SOC_DIR = "versal"
5SOC_DIR:versal-net = "versal_net"
6B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}"
7
8BSP_DIR ?= "${B}/../../misc/versal_plm_bsp"
9
10FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
11
12SRC_URI += " \
13 file://makefile-skip-copy_bsp.sh.patch \
14 file://0001-versal_fw-Fixup-core-makefiles.patch \
15 "
16
17EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects"
18
19do_configure() {
20 # manually do the copy_bsp step first, so as to be able to fix up use of
21 # mb-* commands
22 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
23}
24
25do_compile() {
26 oe_runmake
27
28 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
29}
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb
new file mode 100644
index 00000000..fe6deddc
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb
@@ -0,0 +1,16 @@
1require pmu-firmware.inc
2
3FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
4
5SRC_URI += " \
6 file://makefile-skip-copy_bsp.sh.patch \
7 file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \
8 "
9
10EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects"
11
12do_compile() {
13 oe_runmake
14
15 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
16}
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb
new file mode 100644
index 00000000..569c5a46
--- /dev/null
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb
@@ -0,0 +1,34 @@
1require psm-firmware.inc
2
3# Separate build directories for versal and versal-net
4SOC_DIR = "versal"
5SOC_DIR:versal-net = "versal_net"
6B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}"
7
8BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp"
9
10FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw"
11
12SRC_URI += " \
13 file://makefile-skip-copy_bsp.sh.patch \
14 file://0001-versal_fw-Fixup-core-makefiles.patch \
15 "
16
17EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra"
18
19# Override default since we're in a subdirectory deeper now...
20do_configure() {
21 # manually do the copy_bsp step first, so as to be able to fix up use of
22 # mb-* commands
23 if [ ${SOC_DIR} != "versal" ]; then
24 ${B}/../../misc/${SOC_DIR}/copy_bsp.sh
25 else
26 ${B}/../../misc/copy_bsp.sh
27 fi
28}
29
30do_compile() {
31 oe_runmake
32
33 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
34}
diff --git a/meta-xilinx-virtualization/COPYING.MIT b/meta-xilinx-virtualization/COPYING.MIT
new file mode 100644
index 00000000..fb950dc6
--- /dev/null
+++ b/meta-xilinx-virtualization/COPYING.MIT
@@ -0,0 +1,17 @@
1Permission is hereby granted, free of charge, to any person obtaining a copy
2of this software and associated documentation files (the "Software"), to deal
3in the Software without restriction, including without limitation the rights
4to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5copies of the Software, and to permit persons to whom the Software is
6furnished to do so, subject to the following conditions:
7
8The above copyright notice and this permission notice shall be included in
9all copies or substantial portions of the Software.
10
11THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17THE SOFTWARE.
diff --git a/meta-xilinx-virtualization/README.md b/meta-xilinx-virtualization/README.md
new file mode 100644
index 00000000..ad6d4ada
--- /dev/null
+++ b/meta-xilinx-virtualization/README.md
@@ -0,0 +1,143 @@
1# meta-xilinx-vendor
2
3This layer enables AMD Xilinx Xen configurations and features for ZynqMP and
4Versal devices and also provides related metadata.
5
6## Xen Build Instructions
7
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
39DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen"
40
41IMAGE_FEATURES += "ssh-server-openssh"
42
43DISTRO_FEATURES:append = " systemd"
44VIRTUAL-RUNTIME_init_manager = "systemd"
45DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
46
47IMAGE_INSTALL:append = " \
48 kernel-module-xen-blkback \
49 kernel-module-xen-gntalloc \
50 kernel-module-xen-gntdev \
51 kernel-module-xen-netback \
52 kernel-module-xen-wdt \
53 xen \
54 xen-tools \
55 xen-tools-xenstat \
56 ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \
57 "
58```
59
606. Continue [Building Instructions](../README.building.md) from step 5.
61
62## Xen Boot Instructions
63
64> **Note:**
65> * This README provides instructions for Xen Dom0 only.
66
671. Follow [Booting Instructions](../README.booting.md) upto step 2.
68
692. Verify Xen Dom0 is up and running on QEMU or target as shown below.
70
71```
72Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0
73
74zynqmp-generic login: root
75root@zynqmp-generic:~# xl list
76Name ID Mem VCPUs State Time(s)
77Domain-0 0 1500 1 r----- 123.5
78root@zynqmp-generic:~# xl info
79host : zynqmp-generic
80release : 6.1.0-xilinx-v2024.1
81version : #1 SMP Thu Dec 21 07:00:11 UTC 2023
82machine : aarch64
83nr_cpus : 4
84max_cpu_id : 3
85nr_nodes : 1
86cores_per_socket : 1
87threads_per_core : 1
88cpu_mhz : 99.990
89hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000
90virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1
91total_memory : 4095
92free_memory : 2529
93sharing_freed_memory : 0
94sharing_used_memory : 0
95outstanding_claims : 0
96free_cpus : 0
97xen_major : 4
98xen_minor : 17
99xen_extra : .0
100xen_version : 4.17.0
101xen_caps : xen-3.0-aarch64 xen-3.0-armv7l
102xen_scheduler : credit2
103xen_pagesize : 4096
104platform_params : virt_start=0x200000
105xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty
106xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native
107cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0
108cc_compile_by : santraju
109cc_compile_domain :
110cc_compile_date : 2023-12-12
111build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285
112xend_config_format : 4
113root@zynqmp-generic:~#
114```
115
116## Dependencies
117
118This layer depends on:
119
120 URI: https://git.yoctoproject.org/poky
121 layers: meta, meta-poky
122 branch: langdale
123
124 URI: https://git.openembedded.org/meta-openembedded
125 layers: meta-oe, meta-python, meta-filesystems, meta-networking.
126 branch: langdale
127
128 URI:
129 https://git.yoctoproject.org/meta-xilinx (official version)
130 https://github.com/Xilinx/meta-xilinx (development and amd xilinx release)
131 layers: meta-xilinx-core, meta-xilinx-standalone
132 branch: langdale or amd xilinx release version (e.g. rel-v2024.1)
133
134 URI: https://git.yoctoproject.org/meta-virtualization
135 branch: langdale
136
137 URI: https://git.yoctoproject.org/meta-security
138 layers: meta-tpm
139 branch: langdale
140
141## References
142
143* https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor
diff --git a/meta-xilinx-virtualization/conf/layer.conf b/meta-xilinx-virtualization/conf/layer.conf
new file mode 100644
index 00000000..5e03cde4
--- /dev/null
+++ b/meta-xilinx-virtualization/conf/layer.conf
@@ -0,0 +1,27 @@
1# We have a conf and classes directory, add to BBPATH
2BBPATH .= ":${LAYERDIR}"
3
4# We have packages directories, add to BBFILES
5BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7
8BBFILE_COLLECTIONS += "xilinx-virtualization"
9BBFILE_PATTERN_xilinx-virtualization = "^${LAYERDIR}/"
10BBFILE_PRIORITY_xilinx-virtualization = "5"
11
12LAYERDEPENDS_xilinx-virtualization = "\
13 xilinx \
14 virtualization-layer \
15 security \
16 tpm-layer \
17 "
18
19LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap"
20
21XILINX_XEN_VERSION[v2022.1] = "4.17-xilinx+git%"
22XILINX_XEN_VERSION[v2022.2] = "4.17-xilinx+git%"
23XILINX_XEN_VERSION[v2023.1] = "4.17-xilinx+git%"
24XILINX_XEN_VERSION[v2023.2] = "4.17-xilinx+git%"
25XILINX_XEN_VERSION[v2024.1] = "4.18-xilinx+git%"
26PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
27PREFERRED_VERSION_xen-tools ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend
new file mode 100644
index 00000000..e84844cf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend
@@ -0,0 +1 @@
require qemu-tpm.inc
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend
new file mode 100644
index 00000000..e84844cf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend
@@ -0,0 +1 @@
require qemu-tpm.inc
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc
new file mode 100644
index 00000000..a582b035
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc
@@ -0,0 +1,4 @@
1PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm', ' tpm', '', d)}"
2
3PACKAGECONFIG[tpm] = "--enable-tpm,--disable-tpm,,swtpm libtpm"
4
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_7.1.inc b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_7.1.inc
new file mode 100644
index 00000000..1210a3de
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_7.1.inc
@@ -0,0 +1,33 @@
1# Xen-4.17 specific changes are only applicable on the target
2SRC_URI_XEN = ""
3SRC_URI_XEN:class-target = " \
4 file://0001-xen-pt-fix-syntax-error-that-causes-FTBFS-in-some-co.patch \
5 file://0001-xen_common-return-error-from-xen_create_ioreq_server.patch \
6 file://0002-xen-mapcache-move-xen-mapcache.c-to-hw-xen.patch \
7 file://0003-hw-i386-xen-rearrange-xen_hvm_init_pc.patch \
8 file://0004-xen-hvm-move-x86-specific-fields-out-of-XenIOState.patch \
9 file://0005-xen-hvm-create-arch_handle_ioreq-and-arch_xen_set_me.patch \
10 file://0006-xen-hvm-move-common-functions-to-hw-xen-xen-hvm-comm.patch \
11 file://0007-xen-skip-ioreq-creation-on-ioreq-registration-failur.patch \
12 file://0008-accel-xen-xen-all-export-xenstore_record_dm_state.patch \
13 file://0009-xen-hvm-enable-xen-hvm-common-build-for-ARM.patch \
14 file://0010-hw-arm-introduce-xenpv-machine.patch \
15 file://0011-meson.build-do-not-set-have_xen_pci_passthrough-for-.patch \
16 file://0012-xen-arm-call-qemu_find_tpm_be-if-CONFIG_TPM.patch \
17 file://0013-arm-xenpv-fix-TPM-address-print-warning.patch \
18 file://0014-xen_arm-Create-virtio-mmio-devices-during-initializa.patch \
19 file://0015-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch \
20 file://0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch \
21 file://0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch \
22 file://0002-xen-add-pseudo-RAM-region-for-grant-mappings.patch \
23 file://0003-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch \
24 file://0004-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch \
25 file://0005-memory-add-MemoryRegion-map-and-unmap-callbacks.patch \
26 file://0006-xen-add-map-and-unmap-callbacks-for-grant-region.patch \
27 file://0007-xen-mapcache-Fix-build-on-Arm.patch \
28 file://0008-hw-arm-Add-grant-mapping.patch \
29 "
30
31FILESEXTRAPATHS:prepend:class-target := "${THISDIR}/qemu-xilinx-7.1:"
32
33SRC_URI .= "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${SRC_URI_XEN}', '', d)}"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc
new file mode 100644
index 00000000..c674dc1a
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc
@@ -0,0 +1,20 @@
1# Xen-4.18 specific changes are only applicable on the target
2SRC_URI_XEN = ""
3SRC_URI_XEN:class-target = " \
4 file://0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch \
5 file://0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch \
6 file://0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch \
7 file://0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch \
8 file://0005-softmmu-physmem-Split-ram_block_add.patch \
9 file://0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch \
10 file://0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch \
11 file://0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch \
12 file://0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch \
13 file://0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch \
14 file://0011-hw-arm-Add-grant-mapping.patch \
15 file://0001-arm-xenpvh-Introduce-virtio-pci-support.patch \
16 "
17
18FILESEXTRAPATHS:prepend:class-target := "${THISDIR}/qemu-xilinx-8.1:"
19
20SRC_URI .= "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${SRC_URI_XEN}', '', d)}"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-pt-fix-syntax-error-that-causes-FTBFS-in-some-co.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-pt-fix-syntax-error-that-causes-FTBFS-in-some-co.patch
new file mode 100644
index 00000000..99eaeeaf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-pt-fix-syntax-error-that-causes-FTBFS-in-some-co.patch
@@ -0,0 +1,40 @@
1From ba24456b93a205b728475d5f0880f3ec495e383a Mon Sep 17 00:00:00 2001
2From: Chuck Zmudzinski <brchuckz@aol.com>
3Date: Mon, 31 Oct 2022 17:35:52 -0400
4Subject: [PATCH] xen/pt: fix syntax error that causes FTBFS in some
5 configurations
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10When Qemu is built with --enable-xen and --disable-xen-pci-passthrough
11and the target os is linux, the build fails with:
12
13meson.build:3477:2: ERROR: File xen_pt_stub.c does not exist.
14
15Fixes: 582ea95f5f93 ("meson: convert hw/xen")
16
17Signed-off-by: Chuck Zmudzinski <brchuckz@aol.com>
18Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
19Message-Id: <5f1342a13c09af77b1a7b0aeaba5955bcea89731.1667242033.git.brchuckz@aol.com>
20Signed-off-by: Laurent Vivier <laurent@vivier.eu>
21---
22 hw/xen/meson.build | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/hw/xen/meson.build b/hw/xen/meson.build
26index 08dc1f6857..ae0ace3046 100644
27--- a/hw/xen/meson.build
28+++ b/hw/xen/meson.build
29@@ -18,7 +18,7 @@ if have_xen_pci_passthrough
30 'xen_pt_msi.c',
31 ))
32 else
33- xen_specific_ss.add('xen_pt_stub.c')
34+ xen_specific_ss.add(files('xen_pt_stub.c'))
35 endif
36
37 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
38--
392.17.0
40
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch
new file mode 100644
index 00000000..71dfb3be
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch
@@ -0,0 +1,51 @@
1From e2b85efc82bc26a838f666c8282528ee38cf6377 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Tue, 16 Mar 2021 14:00:33 +0100
4Subject: [PATCH 1/8] xen: when unplugging emulated devices skip virtio devices
5
6Virtio devices should never be unplugged at boot time, as they are
7similar to pci passthrough devices.
8
9Signed-off-by: Juergen Gross <jgross@suse.com>
10Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
11---
12 hw/i386/xen/xen_platform.c | 9 ++++++++-
13 1 file changed, 8 insertions(+), 1 deletion(-)
14
15diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
16index a64265cca0..39bbb12675 100644
17--- a/hw/i386/xen/xen_platform.c
18+++ b/hw/i386/xen/xen_platform.c
19@@ -30,6 +30,7 @@
20 #include "hw/pci/pci.h"
21 #include "hw/xen/xen_common.h"
22 #include "migration/vmstate.h"
23+#include "hw/virtio/virtio-bus.h"
24 #include "hw/xen/xen-legacy-backend.h"
25 #include "trace.h"
26 #include "sysemu/xen.h"
27@@ -114,7 +115,8 @@ static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
28 /* We have to ignore passthrough devices */
29 if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
30 PCI_CLASS_NETWORK_ETHERNET
31- && strcmp(d->name, "xen-pci-passthrough") != 0) {
32+ && strcmp(d->name, "xen-pci-passthrough") != 0
33+ && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) {
34 object_unparent(OBJECT(d));
35 }
36 }
37@@ -191,6 +193,11 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque)
38 return;
39 }
40
41+ /* Ignore virtio devices */
42+ if (qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) {
43+ return;
44+ }
45+
46 switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) {
47 case PCI_CLASS_STORAGE_IDE:
48 pci_xen_ide_unplug(DEVICE(d), aux);
49--
502.25.1
51
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen_common-return-error-from-xen_create_ioreq_server.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen_common-return-error-from-xen_create_ioreq_server.patch
new file mode 100644
index 00000000..d4349b1d
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0001-xen_common-return-error-from-xen_create_ioreq_server.patch
@@ -0,0 +1,55 @@
1From ef4d512aff004c62d550cdd64329c6c1acd0f217 Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Fri, 1 Jul 2022 18:48:03 -0700
4Subject: [PATCH 01/16] xen_common: return error from xen_create_ioreq_server
5
6Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
7---
8 include/hw/xen/xen_common.h | 12 +++++++-----
9 1 file changed, 7 insertions(+), 5 deletions(-)
10
11diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
12index 77ce17d8a4..c2d2f36bde 100644
13--- a/include/hw/xen/xen_common.h
14+++ b/include/hw/xen/xen_common.h
15@@ -467,8 +467,8 @@ static inline void xen_unmap_pcidev(domid_t dom,
16 {
17 }
18
19-static inline void xen_create_ioreq_server(domid_t dom,
20- ioservid_t *ioservid)
21+static inline int xen_create_ioreq_server(domid_t dom,
22+ ioservid_t *ioservid)
23 {
24 }
25
26@@ -600,8 +600,8 @@ static inline void xen_unmap_pcidev(domid_t dom,
27 PCI_FUNC(pci_dev->devfn));
28 }
29
30-static inline void xen_create_ioreq_server(domid_t dom,
31- ioservid_t *ioservid)
32+static inline int xen_create_ioreq_server(domid_t dom,
33+ ioservid_t *ioservid)
34 {
35 int rc = xendevicemodel_create_ioreq_server(xen_dmod, dom,
36 HVM_IOREQSRV_BUFIOREQ_ATOMIC,
37@@ -609,12 +609,14 @@ static inline void xen_create_ioreq_server(domid_t dom,
38
39 if (rc == 0) {
40 trace_xen_ioreq_server_create(*ioservid);
41- return;
42+ return rc;
43 }
44
45 *ioservid = 0;
46 use_default_ioreq_server = true;
47 trace_xen_default_ioreq_server();
48+
49+ return rc;
50 }
51
52 static inline void xen_destroy_ioreq_server(domid_t dom,
53--
542.17.1
55
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-add-pseudo-RAM-region-for-grant-mappings.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-add-pseudo-RAM-region-for-grant-mappings.patch
new file mode 100644
index 00000000..8facb189
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-add-pseudo-RAM-region-for-grant-mappings.patch
@@ -0,0 +1,252 @@
1From e18daac2f6d3f60c8217f44189a91cf8240a591f Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 11:19:58 +0200
4Subject: [PATCH 2/8] xen: add pseudo RAM region for grant mappings
5
6Add a memory region which can be used to automatically map granted
7memory. It is starting at 0x8000000000000000ULL in order to be able to
8distinguish it from normal RAM.
9
10For this reason the xen.ram memory region is expanded, which has no
11further impact as it is used just as a container of the real RAM
12regions and now the grant region.
13
14Signed-off-by: Juergen Gross <jgross@suse.com>
15Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
16Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
17---
18 hw/i386/xen/xen-hvm.c | 3 ++
19 hw/xen/xen-hvm-common.c | 4 +--
20 hw/xen/xen-mapcache.c | 28 +++++++++++++++
21 include/exec/ram_addr.h | 1 +
22 include/hw/xen/xen-hvm-common.h | 2 ++
23 include/hw/xen/xen_pvdev.h | 3 ++
24 include/sysemu/xen-mapcache.h | 3 ++
25 softmmu/physmem.c | 61 ++++++++++++++++++++-------------
26 8 files changed, 80 insertions(+), 25 deletions(-)
27
28diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
29index 36d87555a9..2dcc2e1179 100644
30--- a/hw/i386/xen/xen-hvm.c
31+++ b/hw/i386/xen/xen-hvm.c
32@@ -171,6 +171,9 @@ static void xen_ram_init(PCMachineState *pcms,
33 x86ms->above_4g_mem_size);
34 memory_region_add_subregion(sysmem, 0x100000000ULL, &ram_hi);
35 }
36+
37+ /* Add grant mappings as a pseudo RAM region. */
38+ ram_grants = *xen_init_grant_ram();
39 }
40
41 static XenPhysmap *get_physmapping(hwaddr start_addr, ram_addr_t size)
42diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
43index 7e7d23397f..abd6e379d3 100644
44--- a/hw/xen/xen-hvm-common.c
45+++ b/hw/xen/xen-hvm-common.c
46@@ -10,7 +10,7 @@
47 #include "hw/boards.h"
48 #include "hw/xen/arch_hvm.h"
49
50-MemoryRegion ram_memory;
51+MemoryRegion ram_memory, ram_grants;
52
53 MemoryListener xen_io_listener = {
54 .name = "xen-io",
55@@ -742,7 +742,7 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr,
56 return;
57 }
58
59- if (mr == &ram_memory) {
60+ if (mr == &ram_memory || mr == &ram_grants) {
61 return;
62 }
63
64diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
65index a2f93096e7..0b75f1633a 100644
66--- a/hw/xen/xen-mapcache.c
67+++ b/hw/xen/xen-mapcache.c
68@@ -14,7 +14,10 @@
69
70 #include <sys/resource.h>
71
72+#include "hw/xen/xen-hvm-common.h"
73 #include "hw/xen/xen-legacy-backend.h"
74+#include "hw/xen/xen_pvdev.h"
75+
76 #include "qemu/bitmap.h"
77
78 #include "sysemu/runstate.h"
79@@ -597,3 +600,28 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
80 mapcache_unlock();
81 return p;
82 }
83+
84+MemoryRegion *xen_init_grant_ram(void)
85+{
86+ RAMBlock *block;
87+
88+ memory_region_init(&ram_grants, NULL, "xen.grants",
89+ XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE);
90+ block = g_malloc0(sizeof(*block));
91+ block->mr = &ram_grants;
92+ block->used_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE;
93+ block->max_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE;
94+ block->fd = -1;
95+ block->page_size = XC_PAGE_SIZE;
96+ block->host = (void *)XEN_GRANT_ADDR_OFF;
97+ block->offset = XEN_GRANT_ADDR_OFF;
98+ block->flags = RAM_PREALLOC;
99+ ram_grants.ram_block = block;
100+ ram_grants.ram = true;
101+ ram_grants.terminates = true;
102+ ram_block_add_list(block);
103+ memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF,
104+ &ram_grants);
105+
106+ return &ram_grants;
107+}
108diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
109index f3e0c78161..e60b055867 100644
110--- a/include/exec/ram_addr.h
111+++ b/include/exec/ram_addr.h
112@@ -137,6 +137,7 @@ void qemu_ram_free(RAMBlock *block);
113 int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp);
114
115 void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length);
116+void ram_block_add_list(RAMBlock *new_block);
117
118 /* Clear whole block of mem */
119 static inline void qemu_ram_block_writeback(RAMBlock *block)
120diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
121index 2979f84ee2..6f7cc05d38 100644
122--- a/include/hw/xen/xen-hvm-common.h
123+++ b/include/hw/xen/xen-hvm-common.h
124@@ -16,6 +16,8 @@
125 #include <xen/hvm/ioreq.h>
126
127 extern MemoryRegion ram_memory;
128+
129+extern MemoryRegion ram_grants;
130 extern MemoryListener xen_io_listener;
131 extern DeviceListener xen_device_listener;
132
133diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
134index 7cd4bc2b82..36cd3ec1d4 100644
135--- a/include/hw/xen/xen_pvdev.h
136+++ b/include/hw/xen/xen_pvdev.h
137@@ -78,4 +78,7 @@ int xen_pv_send_notify(struct XenLegacyDevice *xendev);
138 void xen_pv_printf(struct XenLegacyDevice *xendev, int msg_level,
139 const char *fmt, ...) G_GNUC_PRINTF(3, 4);
140
141+#define XEN_GRANT_ADDR_OFF 0x8000000000000000ULL
142+#define XEN_MAX_VIRTIO_GRANTS 65536
143+
144 #endif /* QEMU_HW_XEN_PVDEV_H */
145diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h
146index c8e7c2f6cf..f4bedb1c11 100644
147--- a/include/sysemu/xen-mapcache.h
148+++ b/include/sysemu/xen-mapcache.h
149@@ -10,6 +10,7 @@
150 #define XEN_MAPCACHE_H
151
152 #include "exec/cpu-common.h"
153+#include "exec/ram_addr.h"
154
155 typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset,
156 ram_addr_t size);
157@@ -25,6 +26,8 @@ void xen_invalidate_map_cache(void);
158 uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
159 hwaddr new_phys_addr,
160 hwaddr size);
161+MemoryRegion *xen_init_grant_ram(void);
162+
163 #else
164
165 static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
166diff --git a/softmmu/physmem.c b/softmmu/physmem.c
167index dc3c3e5f2e..63ba5f7495 100644
168--- a/softmmu/physmem.c
169+++ b/softmmu/physmem.c
170@@ -1971,12 +1971,46 @@ static void dirty_memory_extend(ram_addr_t old_ram_size,
171 }
172 }
173
174+static void ram_block_add_list_locked(RAMBlock *new_block)
175+ {
176+ RAMBlock *block;
177+ RAMBlock *last_block = NULL;
178+
179+ /* Keep the list sorted from biggest to smallest block. Unlike QTAILQ,
180+ * QLIST (which has an RCU-friendly variant) does not have insertion at
181+ * tail, so save the last element in last_block.
182+ */
183+ RAMBLOCK_FOREACH(block) {
184+ last_block = block;
185+ if (block->max_length < new_block->max_length) {
186+ break;
187+ }
188+ }
189+ if (block) {
190+ QLIST_INSERT_BEFORE_RCU(block, new_block, next);
191+ } else if (last_block) {
192+ QLIST_INSERT_AFTER_RCU(last_block, new_block, next);
193+ } else { /* list is empty */
194+ QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next);
195+ }
196+ ram_list.mru_block = NULL;
197+
198+ /* Write list before version */
199+ smp_wmb();
200+ ram_list.version++;
201+}
202+
203+void ram_block_add_list(RAMBlock *new_block)
204+{
205+ qemu_mutex_lock_ramlist();
206+ ram_block_add_list_locked(new_block);
207+ qemu_mutex_unlock_ramlist();
208+}
209+
210 static void ram_block_add(RAMBlock *new_block, Error **errp)
211 {
212 const bool noreserve = qemu_ram_is_noreserve(new_block);
213 const bool shared = qemu_ram_is_shared(new_block);
214- RAMBlock *block;
215- RAMBlock *last_block = NULL;
216 ram_addr_t old_ram_size, new_ram_size;
217 Error *err = NULL;
218
219@@ -2014,28 +2048,9 @@ static void ram_block_add(RAMBlock *new_block, Error **errp)
220 if (new_ram_size > old_ram_size) {
221 dirty_memory_extend(old_ram_size, new_ram_size);
222 }
223- /* Keep the list sorted from biggest to smallest block. Unlike QTAILQ,
224- * QLIST (which has an RCU-friendly variant) does not have insertion at
225- * tail, so save the last element in last_block.
226- */
227- RAMBLOCK_FOREACH(block) {
228- last_block = block;
229- if (block->max_length < new_block->max_length) {
230- break;
231- }
232- }
233- if (block) {
234- QLIST_INSERT_BEFORE_RCU(block, new_block, next);
235- } else if (last_block) {
236- QLIST_INSERT_AFTER_RCU(last_block, new_block, next);
237- } else { /* list is empty */
238- QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next);
239- }
240- ram_list.mru_block = NULL;
241
242- /* Write list before version */
243- smp_wmb();
244- ram_list.version++;
245+ ram_block_add_list_locked(new_block);
246+
247 qemu_mutex_unlock_ramlist();
248
249 cpu_physical_memory_set_dirty_range(new_block->offset,
250--
2512.25.1
252
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-mapcache-move-xen-mapcache.c-to-hw-xen.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-mapcache-move-xen-mapcache.c-to-hw-xen.patch
new file mode 100644
index 00000000..35ca6df4
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0002-xen-mapcache-move-xen-mapcache.c-to-hw-xen.patch
@@ -0,0 +1,88 @@
1From 423468bdb3728154e95af18ef755bc75c5d59a3a Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Thu, 30 Jun 2022 18:19:50 -0700
4Subject: [PATCH 02/16] xen-mapcache: move xen-mapcache.c to hw/xen
5
6xen-mapcache.c contains common functions which are useful for Xen on ARM
7IOREQ handling. Moving it out of i386 to hw/xen for commong access.
8
9Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
10Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
11Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
12---
13 hw/i386/meson.build | 1 +
14 hw/i386/xen/meson.build | 1 -
15 hw/i386/xen/trace-events | 5 -----
16 hw/xen/meson.build | 4 ++++
17 hw/xen/trace-events | 5 +++++
18 hw/{i386 => }/xen/xen-mapcache.c | 0
19 6 files changed, 10 insertions(+), 6 deletions(-)
20 rename hw/{i386 => }/xen/xen-mapcache.c (100%)
21
22diff --git a/hw/i386/meson.build b/hw/i386/meson.build
23index 213e2e82b3..cfdbfdcbcb 100644
24--- a/hw/i386/meson.build
25+++ b/hw/i386/meson.build
26@@ -33,5 +33,6 @@ subdir('kvm')
27 subdir('xen')
28
29 i386_ss.add_all(xenpv_ss)
30+i386_ss.add_all(xen_ss)
31
32 hw_arch += {'i386': i386_ss}
33diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build
34index be84130300..2fcc46e6ca 100644
35--- a/hw/i386/xen/meson.build
36+++ b/hw/i386/xen/meson.build
37@@ -1,6 +1,5 @@
38 i386_ss.add(when: 'CONFIG_XEN', if_true: files(
39 'xen-hvm.c',
40- 'xen-mapcache.c',
41 'xen_apic.c',
42 'xen_platform.c',
43 'xen_pvdevice.c',
44diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events
45index 5d6be61090..a0c89d91c4 100644
46--- a/hw/i386/xen/trace-events
47+++ b/hw/i386/xen/trace-events
48@@ -21,8 +21,3 @@ xen_map_resource_ioreq(uint32_t id, void *addr) "id: %u addr: %p"
49 cpu_ioreq_config_read(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
50 cpu_ioreq_config_write(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
51
52-# xen-mapcache.c
53-xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64
54-xen_remap_bucket(uint64_t index) "index 0x%"PRIx64
55-xen_map_cache_return(void* ptr) "%p"
56-
57diff --git a/hw/xen/meson.build b/hw/xen/meson.build
58index ae0ace3046..19d0637c46 100644
59--- a/hw/xen/meson.build
60+++ b/hw/xen/meson.build
61@@ -22,3 +22,7 @@ else
62 endif
63
64 specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
65+
66+xen_ss = ss.source_set()
67+
68+xen_ss.add(when: 'CONFIG_XEN', if_true: files('xen-mapcache.c'))
69diff --git a/hw/xen/trace-events b/hw/xen/trace-events
70index 3da3fd8348..2c8f238f42 100644
71--- a/hw/xen/trace-events
72+++ b/hw/xen/trace-events
73@@ -41,3 +41,8 @@ xs_node_vprintf(char *path, char *value) "%s %s"
74 xs_node_vscanf(char *path, char *value) "%s %s"
75 xs_node_watch(char *path) "%s"
76 xs_node_unwatch(char *path) "%s"
77+
78+# xen-mapcache.c
79+xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64
80+xen_remap_bucket(uint64_t index) "index 0x%"PRIx64
81+xen_map_cache_return(void* ptr) "%p"
82diff --git a/hw/i386/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
83similarity index 100%
84rename from hw/i386/xen/xen-mapcache.c
85rename to hw/xen/xen-mapcache.c
86--
872.17.1
88
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-hw-i386-xen-rearrange-xen_hvm_init_pc.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-hw-i386-xen-rearrange-xen_hvm_init_pc.patch
new file mode 100644
index 00000000..1113cf39
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-hw-i386-xen-rearrange-xen_hvm_init_pc.patch
@@ -0,0 +1,106 @@
1From 4472924c800e9dbf46e4c2432565d3e406b35d27 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 1 Jul 2022 16:32:33 -0700
4Subject: [PATCH 03/16] hw/i386/xen: rearrange xen_hvm_init_pc
5
6Move references to:
7- xen_get_vmport_regs_pfn
8- xen_suspend_notifier
9- xen_wakeup_notifier
10- xen_ram_init
11
12towards the end of the function. This is done to keep the the common
13ioreq functions in one place which will be moved to new function in next
14patch in order to make it useful to ARM machines also.
15
16Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
17Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
18Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
19---
20 hw/i386/xen/xen-hvm.c | 49 ++++++++++++++++++++++---------------------
21 1 file changed, 25 insertions(+), 24 deletions(-)
22
23diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
24index e4293d6d66..b27484ad22 100644
25--- a/hw/i386/xen/xen-hvm.c
26+++ b/hw/i386/xen/xen-hvm.c
27@@ -1416,12 +1416,6 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
28 state->exit.notify = xen_exit_notifier;
29 qemu_add_exit_notifier(&state->exit);
30
31- state->suspend.notify = xen_suspend_notifier;
32- qemu_register_suspend_notifier(&state->suspend);
33-
34- state->wakeup.notify = xen_wakeup_notifier;
35- qemu_register_wakeup_notifier(&state->wakeup);
36-
37 /*
38 * Register wake-up support in QMP query-current-machine API
39 */
40@@ -1432,23 +1426,6 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
41 goto err;
42 }
43
44- rc = xen_get_vmport_regs_pfn(xen_xc, xen_domid, &ioreq_pfn);
45- if (!rc) {
46- DPRINTF("shared vmport page at pfn %lx\n", ioreq_pfn);
47- state->shared_vmport_page =
48- xenforeignmemory_map(xen_fmem, xen_domid, PROT_READ|PROT_WRITE,
49- 1, &ioreq_pfn, NULL);
50- if (state->shared_vmport_page == NULL) {
51- error_report("map shared vmport IO page returned error %d handle=%p",
52- errno, xen_xc);
53- goto err;
54- }
55- } else if (rc != -ENOSYS) {
56- error_report("get vmport regs pfn returned error %d, rc=%d",
57- errno, rc);
58- goto err;
59- }
60-
61 /* Note: cpus is empty at this point in init */
62 state->cpu_by_vcpu_id = g_new0(CPUState *, max_cpus);
63
64@@ -1486,7 +1463,6 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
65 #else
66 xen_map_cache_init(NULL, state);
67 #endif
68- xen_ram_init(pcms, ms->ram_size, ram_memory);
69
70 qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
71
72@@ -1513,6 +1489,31 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
73 QLIST_INIT(&xen_physmap);
74 xen_read_physmap(state);
75
76+ state->suspend.notify = xen_suspend_notifier;
77+ qemu_register_suspend_notifier(&state->suspend);
78+
79+ state->wakeup.notify = xen_wakeup_notifier;
80+ qemu_register_wakeup_notifier(&state->wakeup);
81+
82+ rc = xen_get_vmport_regs_pfn(xen_xc, xen_domid, &ioreq_pfn);
83+ if (!rc) {
84+ DPRINTF("shared vmport page at pfn %lx\n", ioreq_pfn);
85+ state->shared_vmport_page =
86+ xenforeignmemory_map(xen_fmem, xen_domid, PROT_READ|PROT_WRITE,
87+ 1, &ioreq_pfn, NULL);
88+ if (state->shared_vmport_page == NULL) {
89+ error_report("map shared vmport IO page returned error %d handle=%p",
90+ errno, xen_xc);
91+ goto err;
92+ }
93+ } else if (rc != -ENOSYS) {
94+ error_report("get vmport regs pfn returned error %d, rc=%d",
95+ errno, rc);
96+ goto err;
97+ }
98+
99+ xen_ram_init(pcms, ms->ram_size, ram_memory);
100+
101 /* Disable ACPI build because Xen handles it */
102 pcms->acpi_build_enabled = false;
103
104--
1052.17.1
106
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch
new file mode 100644
index 00000000..bff815bc
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0003-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch
@@ -0,0 +1,113 @@
1From cb4be1f7185c5974523c764f3f6efe3af6633d71 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 11:54:48 +0200
4Subject: [PATCH 3/8] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()
5
6qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so
7modify qemu_ram_ptr_length() a little bit and use it for
8qemu_map_ram_ptr(), too.
9
10Signed-off-by: Juergen Gross <jgross@suse.com>
11Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
12---
13 softmmu/physmem.c | 56 ++++++++++++++++++-----------------------------
14 1 file changed, 21 insertions(+), 35 deletions(-)
15
16diff --git a/softmmu/physmem.c b/softmmu/physmem.c
17index 63ba5f7495..439a53a1be 100644
18--- a/softmmu/physmem.c
19+++ b/softmmu/physmem.c
20@@ -2306,38 +2306,7 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
21 }
22 #endif /* !_WIN32 */
23
24-/* Return a host pointer to ram allocated with qemu_ram_alloc.
25- * This should not be used for general purpose DMA. Use address_space_map
26- * or address_space_rw instead. For local memory (e.g. video ram) that the
27- * device owns, use memory_region_get_ram_ptr.
28- *
29- * Called within RCU critical section.
30- */
31-void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
32-{
33- RAMBlock *block = ram_block;
34-
35- if (block == NULL) {
36- block = qemu_get_ram_block(addr);
37- addr -= block->offset;
38- }
39-
40- if (xen_enabled() && block->host == NULL) {
41- /* We need to check if the requested address is in the RAM
42- * because we don't want to map the entire memory in QEMU.
43- * In that case just map until the end of the page.
44- */
45- if (block->offset == 0) {
46- return xen_map_cache(addr, 0, 0, false);
47- }
48-
49- block->host = xen_map_cache(block->offset, block->max_length, 1, false);
50- }
51- return ramblock_ptr(block, addr);
52-}
53-
54-/* Return a host pointer to guest's ram. Similar to qemu_map_ram_ptr
55- * but takes a size argument.
56+/* Return a host pointer to guest's ram.
57 *
58 * Called within RCU critical section.
59 */
60@@ -2345,7 +2314,9 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
61 hwaddr *size, bool lock)
62 {
63 RAMBlock *block = ram_block;
64- if (*size == 0) {
65+ hwaddr len = 0;
66+
67+ if (size && *size == 0) {
68 return NULL;
69 }
70
71@@ -2353,7 +2324,10 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
72 block = qemu_get_ram_block(addr);
73 addr -= block->offset;
74 }
75- *size = MIN(*size, block->max_length - addr);
76+ if (size) {
77+ *size = MIN(*size, block->max_length - addr);
78+ len = *size;
79+ }
80
81 if (xen_enabled() && block->host == NULL) {
82 /* We need to check if the requested address is in the RAM
83@@ -2361,7 +2335,7 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
84 * In that case just map the requested area.
85 */
86 if (block->offset == 0) {
87- return xen_map_cache(addr, *size, lock, lock);
88+ return xen_map_cache(addr, len, lock, lock);
89 }
90
91 block->host = xen_map_cache(block->offset, block->max_length, 1, lock);
92@@ -2370,6 +2344,18 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
93 return ramblock_ptr(block, addr);
94 }
95
96+/* Return a host pointer to ram allocated with qemu_ram_alloc.
97+ * This should not be used for general purpose DMA. Use address_space_map
98+ * or address_space_rw instead. For local memory (e.g. video ram) that the
99+ * device owns, use memory_region_get_ram_ptr.
100+ *
101+ * Called within RCU critical section.
102+ */
103+void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
104+{
105+ return qemu_ram_ptr_length(ram_block, addr, NULL, false);
106+}
107+
108 /* Return the offset of a hostpointer within a ramblock */
109 ram_addr_t qemu_ram_block_host_offset(RAMBlock *rb, void *host)
110 {
111--
1122.25.1
113
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-hvm-move-x86-specific-fields-out-of-XenIOState.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-hvm-move-x86-specific-fields-out-of-XenIOState.patch
new file mode 100644
index 00000000..4337e0c8
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-hvm-move-x86-specific-fields-out-of-XenIOState.patch
@@ -0,0 +1,180 @@
1From 2a01fa06d267f68148d3a6df50675edfe090601a Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Fri, 1 Jul 2022 18:16:52 -0700
4Subject: [PATCH 04/16] xen-hvm: move x86-specific fields out of XenIOState
5
6Move:
7- shared_vmport_page
8- log_for_dirtybit
9- dirty_bitmap
10- suspend
11- wakeup
12
13out of XenIOState as they are only used on x86, especially the ones
14related to dirty logging.
15
16Remove free_phys_offset that was unused.
17
18Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
19---
20 hw/i386/xen/xen-hvm.c | 58 ++++++++++++++++++++-----------------------
21 1 file changed, 27 insertions(+), 31 deletions(-)
22
23diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
24index b27484ad22..225cfdf8b7 100644
25--- a/hw/i386/xen/xen-hvm.c
26+++ b/hw/i386/xen/xen-hvm.c
27@@ -73,6 +73,7 @@ struct shared_vmport_iopage {
28 };
29 typedef struct shared_vmport_iopage shared_vmport_iopage_t;
30 #endif
31+static shared_vmport_iopage_t *shared_vmport_page;
32
33 static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i)
34 {
35@@ -95,6 +96,11 @@ typedef struct XenPhysmap {
36 } XenPhysmap;
37
38 static QLIST_HEAD(, XenPhysmap) xen_physmap;
39+static const XenPhysmap *log_for_dirtybit = NULL;
40+/* Buffer used by xen_sync_dirty_bitmap */
41+static unsigned long *dirty_bitmap = NULL;
42+static Notifier suspend;
43+static Notifier wakeup;
44
45 typedef struct XenPciDevice {
46 PCIDevice *pci_dev;
47@@ -105,7 +111,6 @@ typedef struct XenPciDevice {
48 typedef struct XenIOState {
49 ioservid_t ioservid;
50 shared_iopage_t *shared_page;
51- shared_vmport_iopage_t *shared_vmport_page;
52 buffered_iopage_t *buffered_io_page;
53 xenforeignmemory_resource_handle *fres;
54 QEMUTimer *buffered_io_timer;
55@@ -125,14 +130,8 @@ typedef struct XenIOState {
56 MemoryListener io_listener;
57 QLIST_HEAD(, XenPciDevice) dev_list;
58 DeviceListener device_listener;
59- hwaddr free_phys_offset;
60- const XenPhysmap *log_for_dirtybit;
61- /* Buffer used by xen_sync_dirty_bitmap */
62- unsigned long *dirty_bitmap;
63
64 Notifier exit;
65- Notifier suspend;
66- Notifier wakeup;
67 } XenIOState;
68
69 /* Xen specific function for piix pci */
70@@ -462,10 +461,10 @@ static int xen_remove_from_physmap(XenIOState *state,
71 }
72
73 QLIST_REMOVE(physmap, list);
74- if (state->log_for_dirtybit == physmap) {
75- state->log_for_dirtybit = NULL;
76- g_free(state->dirty_bitmap);
77- state->dirty_bitmap = NULL;
78+ if (log_for_dirtybit == physmap) {
79+ log_for_dirtybit = NULL;
80+ g_free(dirty_bitmap);
81+ dirty_bitmap = NULL;
82 }
83 g_free(physmap);
84
85@@ -626,16 +625,16 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
86 return;
87 }
88
89- if (state->log_for_dirtybit == NULL) {
90- state->log_for_dirtybit = physmap;
91- state->dirty_bitmap = g_new(unsigned long, bitmap_size);
92- } else if (state->log_for_dirtybit != physmap) {
93+ if (log_for_dirtybit == NULL) {
94+ log_for_dirtybit = physmap;
95+ dirty_bitmap = g_new(unsigned long, bitmap_size);
96+ } else if (log_for_dirtybit != physmap) {
97 /* Only one range for dirty bitmap can be tracked. */
98 return;
99 }
100
101 rc = xen_track_dirty_vram(xen_domid, start_addr >> TARGET_PAGE_BITS,
102- npages, state->dirty_bitmap);
103+ npages, dirty_bitmap);
104 if (rc < 0) {
105 #ifndef ENODATA
106 #define ENODATA ENOENT
107@@ -650,7 +649,7 @@ static void xen_sync_dirty_bitmap(XenIOState *state,
108 }
109
110 for (i = 0; i < bitmap_size; i++) {
111- unsigned long map = state->dirty_bitmap[i];
112+ unsigned long map = dirty_bitmap[i];
113 while (map != 0) {
114 j = ctzl(map);
115 map &= ~(1ul << j);
116@@ -676,12 +675,10 @@ static void xen_log_start(MemoryListener *listener,
117 static void xen_log_stop(MemoryListener *listener, MemoryRegionSection *section,
118 int old, int new)
119 {
120- XenIOState *state = container_of(listener, XenIOState, memory_listener);
121-
122 if (old & ~new & (1 << DIRTY_MEMORY_VGA)) {
123- state->log_for_dirtybit = NULL;
124- g_free(state->dirty_bitmap);
125- state->dirty_bitmap = NULL;
126+ log_for_dirtybit = NULL;
127+ g_free(dirty_bitmap);
128+ dirty_bitmap = NULL;
129 /* Disable dirty bit tracking */
130 xen_track_dirty_vram(xen_domid, 0, 0, NULL);
131 }
132@@ -1021,9 +1018,9 @@ static void handle_vmport_ioreq(XenIOState *state, ioreq_t *req)
133 {
134 vmware_regs_t *vmport_regs;
135
136- assert(state->shared_vmport_page);
137+ assert(shared_vmport_page);
138 vmport_regs =
139- &state->shared_vmport_page->vcpu_vmport_regs[state->send_vcpu];
140+ &shared_vmport_page->vcpu_vmport_regs[state->send_vcpu];
141 QEMU_BUILD_BUG_ON(sizeof(*req) < sizeof(*vmport_regs));
142
143 current_cpu = state->cpu_by_vcpu_id[state->send_vcpu];
144@@ -1468,7 +1465,6 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
145
146 state->memory_listener = xen_memory_listener;
147 memory_listener_register(&state->memory_listener, &address_space_memory);
148- state->log_for_dirtybit = NULL;
149
150 state->io_listener = xen_io_listener;
151 memory_listener_register(&state->io_listener, &address_space_io);
152@@ -1489,19 +1485,19 @@ void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
153 QLIST_INIT(&xen_physmap);
154 xen_read_physmap(state);
155
156- state->suspend.notify = xen_suspend_notifier;
157- qemu_register_suspend_notifier(&state->suspend);
158+ suspend.notify = xen_suspend_notifier;
159+ qemu_register_suspend_notifier(&suspend);
160
161- state->wakeup.notify = xen_wakeup_notifier;
162- qemu_register_wakeup_notifier(&state->wakeup);
163+ wakeup.notify = xen_wakeup_notifier;
164+ qemu_register_wakeup_notifier(&wakeup);
165
166 rc = xen_get_vmport_regs_pfn(xen_xc, xen_domid, &ioreq_pfn);
167 if (!rc) {
168 DPRINTF("shared vmport page at pfn %lx\n", ioreq_pfn);
169- state->shared_vmport_page =
170+ shared_vmport_page =
171 xenforeignmemory_map(xen_fmem, xen_domid, PROT_READ|PROT_WRITE,
172 1, &ioreq_pfn, NULL);
173- if (state->shared_vmport_page == NULL) {
174+ if (shared_vmport_page == NULL) {
175 error_report("map shared vmport IO page returned error %d handle=%p",
176 errno, xen_xc);
177 goto err;
178--
1792.17.1
180
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch
new file mode 100644
index 00000000..25dc0ae0
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0004-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch
@@ -0,0 +1,49 @@
1From 7dfa8828bd2e61fc5bf2bf6294aad16b2bf4ff8a Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 13:31:32 +0200
4Subject: [PATCH 4/8] xen: let xen_ram_addr_from_mapcache() return -1 in case
5 of not found entry
6
7Today xen_ram_addr_from_mapcache() will either abort() or return 0 in
8case it can't find a matching entry for a pointer value. Both cases
9are bad, so change that to return an invalid address instead.
10
11Signed-off-by: Juergen Gross <jgross@suse.com>
12Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
13---
14 hw/xen/xen-mapcache.c | 12 +++---------
15 1 file changed, 3 insertions(+), 9 deletions(-)
16
17diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
18index 0b75f1633a..e53e7221f1 100644
19--- a/hw/xen/xen-mapcache.c
20+++ b/hw/xen/xen-mapcache.c
21@@ -405,13 +405,8 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
22 }
23 }
24 if (!found) {
25- fprintf(stderr, "%s, could not find %p\n", __func__, ptr);
26- QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) {
27- DPRINTF(" "TARGET_FMT_plx" -> %p is present\n", reventry->paddr_index,
28- reventry->vaddr_req);
29- }
30- abort();
31- return 0;
32+ mapcache_unlock();
33+ return RAM_ADDR_INVALID;
34 }
35
36 entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
37@@ -419,8 +414,7 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
38 entry = entry->next;
39 }
40 if (!entry) {
41- DPRINTF("Trying to find address %p that is not in the mapcache!\n", ptr);
42- raddr = 0;
43+ raddr = RAM_ADDR_INVALID;
44 } else {
45 raddr = (reventry->paddr_index << MCACHE_BUCKET_SHIFT) +
46 ((unsigned long) ptr - (unsigned long) entry->vaddr_base);
47--
482.25.1
49
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-memory-add-MemoryRegion-map-and-unmap-callbacks.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-memory-add-MemoryRegion-map-and-unmap-callbacks.patch
new file mode 100644
index 00000000..db6d8fe5
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-memory-add-MemoryRegion-map-and-unmap-callbacks.patch
@@ -0,0 +1,150 @@
1From bd32a130ca633eae7cf0f4ff0fa856004d413df0 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 27 May 2021 15:27:55 +0200
4Subject: [PATCH 5/8] memory: add MemoryRegion map and unmap callbacks
5
6In order to support mapping and unmapping guest memory dynamically to
7and from qemu during address_space_[un]map() operations add the map()
8and unmap() callbacks to MemoryRegionOps.
9
10Those will be used e.g. for Xen grant mappings when performing guest
11I/Os.
12
13Signed-off-by: Juergen Gross <jgross@suse.com>
14Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
15Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
16---
17 include/exec/memory.h | 19 +++++++++++++++++
18 softmmu/physmem.c | 47 +++++++++++++++++++++++++++++++++----------
19 2 files changed, 55 insertions(+), 11 deletions(-)
20
21diff --git a/include/exec/memory.h b/include/exec/memory.h
22index bfb1de8eea..19e2aac694 100644
23--- a/include/exec/memory.h
24+++ b/include/exec/memory.h
25@@ -245,6 +245,25 @@ struct MemoryRegionOps {
26 unsigned size,
27 MemTxAttrs attrs);
28
29+ /* Dynamically create mapping. @addr is the guest address to map; @plen
30+ * is the pointer to the usable length of the buffer.
31+ * @mr contents can be changed in case a new memory region is created for
32+ * the mapping.
33+ * Returns the buffer address for accessing the data. */
34+ void *(*map)(MemoryRegion **mr,
35+ hwaddr addr,
36+ hwaddr *plen,
37+ bool is_write,
38+ MemTxAttrs attrs);
39+
40+ /* Unmap an area obtained via map() before. */
41+ void (*unmap)(MemoryRegion *mr,
42+ void *buffer,
43+ ram_addr_t addr,
44+ hwaddr len,
45+ bool is_write,
46+ hwaddr access_len);
47+
48 enum device_endian endianness;
49 /* Guest-visible constraints: */
50 struct {
51diff --git a/softmmu/physmem.c b/softmmu/physmem.c
52index 439a53a1be..2038240311 100644
53--- a/softmmu/physmem.c
54+++ b/softmmu/physmem.c
55@@ -3237,7 +3237,7 @@ void *address_space_map(AddressSpace *as,
56 hwaddr len = *plen;
57 hwaddr l, xlat;
58 MemoryRegion *mr;
59- void *ptr;
60+ void *ptr = NULL;
61 FlatView *fv;
62
63 if (len == 0) {
64@@ -3273,10 +3273,17 @@ void *address_space_map(AddressSpace *as,
65
66
67 memory_region_ref(mr);
68+
69+ if (mr->ops && mr->ops->map) {
70+ ptr = mr->ops->map(&mr, addr, plen, is_write, attrs);
71+ }
72+
73 *plen = flatview_extend_translation(fv, addr, len, mr, xlat,
74 l, is_write, attrs);
75 fuzz_dma_read_cb(addr, *plen, mr);
76- ptr = qemu_ram_ptr_length(mr->ram_block, xlat, plen, true);
77+ if (ptr == NULL) {
78+ ptr = qemu_ram_ptr_length(mr->ram_block, xlat, plen, true);
79+ }
80
81 return ptr;
82 }
83@@ -3294,11 +3301,16 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
84
85 mr = memory_region_from_host(buffer, &addr1);
86 assert(mr != NULL);
87- if (is_write) {
88- invalidate_and_set_dirty(mr, addr1, access_len);
89- }
90- if (xen_enabled()) {
91- xen_invalidate_map_cache_entry(buffer);
92+
93+ if (mr->ops && mr->ops->unmap) {
94+ mr->ops->unmap(mr, buffer, addr1, len, is_write, access_len);
95+ } else {
96+ if (is_write) {
97+ invalidate_and_set_dirty(mr, addr1, access_len);
98+ }
99+ if (xen_enabled()) {
100+ xen_invalidate_map_cache_entry(buffer);
101+ }
102 }
103 memory_region_unref(mr);
104 return;
105@@ -3370,10 +3382,17 @@ int64_t address_space_cache_init(MemoryRegionCache *cache,
106 * doing this if we found actual RAM, which behaves the same
107 * regardless of attributes; so UNSPECIFIED is fine.
108 */
109+ if (mr->ops && mr->ops->map) {
110+ cache->ptr = mr->ops->map(&mr, addr, &l, is_write,
111+ MEMTXATTRS_UNSPECIFIED);
112+ }
113+
114 l = flatview_extend_translation(cache->fv, addr, len, mr,
115 cache->xlat, l, is_write,
116 MEMTXATTRS_UNSPECIFIED);
117- cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l, true);
118+ if (!cache->ptr) {
119+ cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l, true);
120+ }
121 } else {
122 cache->ptr = NULL;
123 }
124@@ -3395,14 +3414,20 @@ void address_space_cache_invalidate(MemoryRegionCache *cache,
125
126 void address_space_cache_destroy(MemoryRegionCache *cache)
127 {
128- if (!cache->mrs.mr) {
129+ MemoryRegion *mr = cache->mrs.mr;
130+
131+ if (!mr) {
132 return;
133 }
134
135- if (xen_enabled()) {
136+ if (mr->ops && mr->ops->unmap) {
137+ mr->ops->unmap(mr, cache->ptr, cache->xlat, cache->len,
138+ cache->is_write, cache->len);
139+ } else if (xen_enabled()) {
140 xen_invalidate_map_cache_entry(cache->ptr);
141 }
142- memory_region_unref(cache->mrs.mr);
143+
144+ memory_region_unref(mr);
145 flatview_unref(cache->fv);
146 cache->mrs.mr = NULL;
147 cache->fv = NULL;
148--
1492.25.1
150
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-xen-hvm-create-arch_handle_ioreq-and-arch_xen_set_me.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-xen-hvm-create-arch_handle_ioreq-and-arch_xen_set_me.patch
new file mode 100644
index 00000000..6b56a39e
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0005-xen-hvm-create-arch_handle_ioreq-and-arch_xen_set_me.patch
@@ -0,0 +1,192 @@
1From c38436434fc888ba8844d99eab451f9b734e5e5b Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Fri, 1 Jul 2022 19:34:39 -0700
4Subject: [PATCH 05/16] xen-hvm: create arch_handle_ioreq and
5 arch_xen_set_memory
6
7In preparation to moving most of xen-hvm code to an arch-neutral
8location, move the x86-specific portion of xen_set_memory to
9arch_xen_set_memory.
10
11Also move handle_vmport_ioreq to arch_handle_ioreq.
12
13Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
14Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
15Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
16---
17 hw/i386/xen/xen-hvm.c | 98 ++++++++++++++++++++--------------
18 include/hw/i386/xen_arch_hvm.h | 10 ++++
19 include/hw/xen/arch_hvm.h | 3 ++
20 3 files changed, 71 insertions(+), 40 deletions(-)
21 create mode 100644 include/hw/i386/xen_arch_hvm.h
22 create mode 100644 include/hw/xen/arch_hvm.h
23
24diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
25index 225cfdf8b7..178f0c68fc 100644
26--- a/hw/i386/xen/xen-hvm.c
27+++ b/hw/i386/xen/xen-hvm.c
28@@ -134,6 +134,8 @@ typedef struct XenIOState {
29 Notifier exit;
30 } XenIOState;
31
32+#include "hw/xen/arch_hvm.h"
33+
34 /* Xen specific function for piix pci */
35
36 int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num)
37@@ -476,10 +478,6 @@ static void xen_set_memory(struct MemoryListener *listener,
38 bool add)
39 {
40 XenIOState *state = container_of(listener, XenIOState, memory_listener);
41- hwaddr start_addr = section->offset_within_address_space;
42- ram_addr_t size = int128_get64(section->size);
43- bool log_dirty = memory_region_is_logging(section->mr, DIRTY_MEMORY_VGA);
44- hvmmem_type_t mem_type;
45
46 if (section->mr == &ram_memory) {
47 return;
48@@ -492,38 +490,7 @@ static void xen_set_memory(struct MemoryListener *listener,
49 section);
50 }
51 }
52-
53- if (!memory_region_is_ram(section->mr)) {
54- return;
55- }
56-
57- if (log_dirty != add) {
58- return;
59- }
60-
61- trace_xen_client_set_memory(start_addr, size, log_dirty);
62-
63- start_addr &= TARGET_PAGE_MASK;
64- size = TARGET_PAGE_ALIGN(size);
65-
66- if (add) {
67- if (!memory_region_is_rom(section->mr)) {
68- xen_add_to_physmap(state, start_addr, size,
69- section->mr, section->offset_within_region);
70- } else {
71- mem_type = HVMMEM_ram_ro;
72- if (xen_set_mem_type(xen_domid, mem_type,
73- start_addr >> TARGET_PAGE_BITS,
74- size >> TARGET_PAGE_BITS)) {
75- DPRINTF("xen_set_mem_type error, addr: "TARGET_FMT_plx"\n",
76- start_addr);
77- }
78- }
79- } else {
80- if (xen_remove_from_physmap(state, start_addr, size) < 0) {
81- DPRINTF("physmapping does not exist at "TARGET_FMT_plx"\n", start_addr);
82- }
83- }
84+ arch_xen_set_memory(state, section, add);
85 }
86
87 static void xen_region_add(MemoryListener *listener,
88@@ -1051,9 +1018,6 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req)
89 case IOREQ_TYPE_COPY:
90 cpu_ioreq_move(req);
91 break;
92- case IOREQ_TYPE_VMWARE_PORT:
93- handle_vmport_ioreq(state, req);
94- break;
95 case IOREQ_TYPE_TIMEOFFSET:
96 break;
97 case IOREQ_TYPE_INVALIDATE:
98@@ -1063,7 +1027,7 @@ static void handle_ioreq(XenIOState *state, ioreq_t *req)
99 cpu_ioreq_config(state, req);
100 break;
101 default:
102- hw_error("Invalid ioreq type 0x%x\n", req->type);
103+ arch_handle_ioreq(state, req);
104 }
105 if (req->dir == IOREQ_READ) {
106 trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr,
107@@ -1604,3 +1568,57 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
108 memory_global_dirty_log_stop(GLOBAL_DIRTY_MIGRATION);
109 }
110 }
111+
112+void arch_xen_set_memory(XenIOState *state,MemoryRegionSection *section,
113+ bool add)
114+{
115+ hwaddr start_addr = section->offset_within_address_space;
116+ ram_addr_t size = int128_get64(section->size);
117+ bool log_dirty = memory_region_is_logging(section->mr, DIRTY_MEMORY_VGA);
118+ hvmmem_type_t mem_type;
119+
120+ if (!memory_region_is_ram(section->mr)) {
121+ return;
122+ }
123+
124+ if (log_dirty != add) {
125+ return;
126+ }
127+
128+ trace_xen_client_set_memory(start_addr, size, log_dirty);
129+
130+ start_addr &= TARGET_PAGE_MASK;
131+ size = TARGET_PAGE_ALIGN(size);
132+
133+ if (add) {
134+ if (!memory_region_is_rom(section->mr)) {
135+ xen_add_to_physmap(state, start_addr, size,
136+ section->mr, section->offset_within_region);
137+ } else {
138+ mem_type = HVMMEM_ram_ro;
139+ if (xen_set_mem_type(xen_domid, mem_type,
140+ start_addr >> TARGET_PAGE_BITS,
141+ size >> TARGET_PAGE_BITS)) {
142+ DPRINTF("xen_set_mem_type error, addr: "TARGET_FMT_plx"\n",
143+ start_addr);
144+ }
145+ }
146+ } else {
147+ if (xen_remove_from_physmap(state, start_addr, size) < 0) {
148+ DPRINTF("physmapping does not exist at "TARGET_FMT_plx"\n", start_addr);
149+ }
150+ }
151+}
152+
153+void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
154+{
155+ switch (req->type) {
156+ case IOREQ_TYPE_VMWARE_PORT:
157+ handle_vmport_ioreq(state, req);
158+ break;
159+ default:
160+ hw_error("Invalid ioreq type 0x%x\n", req->type);
161+ }
162+
163+ return;
164+}
165diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h
166new file mode 100644
167index 0000000000..1b2c71ba4f
168--- /dev/null
169+++ b/include/hw/i386/xen_arch_hvm.h
170@@ -0,0 +1,10 @@
171+#ifndef HW_XEN_ARCH_I386_HVM_H
172+#define HW_XEN_ARCH_I386_HVM_H
173+
174+#include <xen/hvm/ioreq.h>
175+
176+void arch_handle_ioreq(XenIOState *state, ioreq_t *req);
177+void arch_xen_set_memory(XenIOState *state,
178+ MemoryRegionSection *section,
179+ bool add);
180+#endif
181diff --git a/include/hw/xen/arch_hvm.h b/include/hw/xen/arch_hvm.h
182new file mode 100644
183index 0000000000..26674648d8
184--- /dev/null
185+++ b/include/hw/xen/arch_hvm.h
186@@ -0,0 +1,3 @@
187+#if defined(TARGET_I386) || defined(TARGET_X86_64)
188+#include "hw/i386/xen_arch_hvm.h"
189+#endif
190--
1912.17.1
192
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-add-map-and-unmap-callbacks-for-grant-region.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-add-map-and-unmap-callbacks-for-grant-region.patch
new file mode 100644
index 00000000..87bbc3c6
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-add-map-and-unmap-callbacks-for-grant-region.patch
@@ -0,0 +1,255 @@
1From ef94d70d4a22c5282d6955a7ed066ef502e99829 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Fri, 26 Aug 2022 13:57:06 +0200
4Subject: [PATCH 6/8] xen: add map and unmap callbacks for grant region
5
6Add the callbacks for mapping/unmapping guest memory via grants to the
7special grant memory region.
8
9Signed-off-by: Juergen Gross <jgross@suse.com>
10Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
11Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
12Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
13---
14 hw/xen/xen-mapcache.c | 167 +++++++++++++++++++++++++++++++++++++++++-
15 softmmu/physmem.c | 11 ++-
16 2 files changed, 173 insertions(+), 5 deletions(-)
17
18diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
19index e53e7221f1..f81b75d216 100644
20--- a/hw/xen/xen-mapcache.c
21+++ b/hw/xen/xen-mapcache.c
22@@ -9,6 +9,8 @@
23 */
24
25 #include "qemu/osdep.h"
26+#include "qemu/queue.h"
27+#include "qemu/thread.h"
28 #include "qemu/units.h"
29 #include "qemu/error-report.h"
30
31@@ -24,6 +26,8 @@
32 #include "sysemu/xen-mapcache.h"
33 #include "trace.h"
34
35+#include <xenevtchn.h>
36+#include <xengnttab.h>
37
38 //#define MAPCACHE_DEBUG
39
40@@ -386,7 +390,7 @@ uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size,
41 return p;
42 }
43
44-ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
45+static ram_addr_t xen_ram_addr_from_mapcache_try(void *ptr)
46 {
47 MapCacheEntry *entry = NULL;
48 MapCacheRev *reventry;
49@@ -595,10 +599,170 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
50 return p;
51 }
52
53+struct XENMappedGrantRegion {
54+ void *addr;
55+ unsigned int pages;
56+ unsigned int refs;
57+ unsigned int prot;
58+ uint32_t idx;
59+ QLIST_ENTRY(XENMappedGrantRegion) list;
60+};
61+
62+static xengnttab_handle *xen_region_gnttabdev;
63+static QLIST_HEAD(GrantRegionList, XENMappedGrantRegion) xen_grant_mappings =
64+ QLIST_HEAD_INITIALIZER(xen_grant_mappings);
65+static QemuMutex xen_map_mutex;
66+
67+static void *xen_map_grant_dyn(MemoryRegion **mr, hwaddr addr, hwaddr *plen,
68+ bool is_write, MemTxAttrs attrs)
69+{
70+ unsigned int page_off = addr & (XC_PAGE_SIZE - 1);
71+ unsigned int i;
72+ unsigned int nrefs = (page_off + *plen + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
73+ uint32_t ref = (addr - XEN_GRANT_ADDR_OFF) >> XC_PAGE_SHIFT;
74+ uint32_t *refs;
75+ unsigned int prot = PROT_READ;
76+ struct XENMappedGrantRegion *mgr = NULL;
77+
78+ if (is_write) {
79+ prot |= PROT_WRITE;
80+ }
81+
82+ qemu_mutex_lock(&xen_map_mutex);
83+
84+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
85+ if (mgr->idx == ref &&
86+ mgr->pages == nrefs &&
87+ (mgr->prot & prot) == prot) {
88+ break;
89+ }
90+ }
91+ if (!mgr) {
92+ mgr = g_new(struct XENMappedGrantRegion, 1);
93+
94+ if (nrefs == 1) {
95+ refs = &ref;
96+ } else {
97+ refs = g_new(uint32_t, nrefs);
98+ for (i = 0; i < nrefs; i++) {
99+ refs[i] = ref + i;
100+ }
101+ }
102+ mgr->addr = xengnttab_map_domain_grant_refs(xen_region_gnttabdev, nrefs,
103+ xen_domid, refs, prot);
104+ if (mgr->addr) {
105+ mgr->pages = nrefs;
106+ mgr->refs = 1;
107+ mgr->prot = prot;
108+ mgr->idx = ref;
109+
110+ QLIST_INSERT_HEAD(&xen_grant_mappings, mgr, list);
111+ } else {
112+ g_free(mgr);
113+ mgr = NULL;
114+ }
115+ } else {
116+ mgr->refs++;
117+ }
118+
119+ qemu_mutex_unlock(&xen_map_mutex);
120+
121+ if (nrefs > 1) {
122+ g_free(refs);
123+ }
124+
125+ return mgr ? mgr->addr + page_off : NULL;
126+}
127+
128+static void xen_unmap_grant_dyn(MemoryRegion *mr, void *buffer, ram_addr_t addr,
129+ hwaddr len, bool is_write, hwaddr access_len)
130+{
131+ unsigned int page_off = (unsigned long)buffer & (XC_PAGE_SIZE - 1);
132+ unsigned int nrefs = (page_off + len + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
133+ unsigned int prot = PROT_READ;
134+ struct XENMappedGrantRegion *mgr = NULL;
135+
136+ if (is_write) {
137+ prot |= PROT_WRITE;
138+ }
139+
140+ qemu_mutex_lock(&xen_map_mutex);
141+
142+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
143+ if (mgr->addr == buffer - page_off &&
144+ mgr->pages == nrefs &&
145+ (mgr->prot & prot) == prot) {
146+ break;
147+ }
148+ }
149+ if (mgr) {
150+ mgr->refs--;
151+ if (!mgr->refs) {
152+ xengnttab_unmap(xen_region_gnttabdev, mgr->addr, nrefs);
153+
154+ QLIST_REMOVE(mgr, list);
155+ g_free(mgr);
156+ }
157+ } else {
158+ error_report("xen_unmap_grant_dyn() trying to unmap unknown buffer");
159+ }
160+
161+ qemu_mutex_unlock(&xen_map_mutex);
162+}
163+
164+static ram_addr_t xen_ram_addr_from_grant_cache(void *ptr)
165+{
166+ unsigned int page_off = (unsigned long)ptr & (XC_PAGE_SIZE - 1);
167+ struct XENMappedGrantRegion *mgr = NULL;
168+ ram_addr_t raddr = RAM_ADDR_INVALID;
169+
170+ qemu_mutex_lock(&xen_map_mutex);
171+
172+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
173+ if (mgr->addr == ptr - page_off) {
174+ break;
175+ }
176+ }
177+
178+ if (mgr) {
179+ raddr = (mgr->idx << XC_PAGE_SHIFT) + page_off + XEN_GRANT_ADDR_OFF;
180+ }
181+
182+ qemu_mutex_unlock(&xen_map_mutex);
183+
184+ return raddr;
185+}
186+
187+ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
188+{
189+ ram_addr_t raddr;
190+
191+ raddr = xen_ram_addr_from_mapcache_try(ptr);
192+ if (raddr == RAM_ADDR_INVALID) {
193+ raddr = xen_ram_addr_from_grant_cache(ptr);
194+ }
195+
196+ return raddr;
197+}
198+
199+static const struct MemoryRegionOps xen_grant_mr_ops = {
200+ .map = xen_map_grant_dyn,
201+ .unmap = xen_unmap_grant_dyn,
202+ .endianness = DEVICE_LITTLE_ENDIAN,
203+};
204+
205 MemoryRegion *xen_init_grant_ram(void)
206 {
207 RAMBlock *block;
208
209+ qemu_mutex_init(&xen_map_mutex);
210+
211+ xen_region_gnttabdev = xengnttab_open(NULL, 0);
212+ if (xen_region_gnttabdev == NULL) {
213+ fprintf(stderr, "can't open gnttab device\n");
214+ return NULL;
215+ }
216+
217 memory_region_init(&ram_grants, NULL, "xen.grants",
218 XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE);
219 block = g_malloc0(sizeof(*block));
220@@ -613,6 +777,7 @@ MemoryRegion *xen_init_grant_ram(void)
221 ram_grants.ram_block = block;
222 ram_grants.ram = true;
223 ram_grants.terminates = true;
224+ ram_grants.ops = &xen_grant_mr_ops;
225 ram_block_add_list(block);
226 memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF,
227 &ram_grants);
228diff --git a/softmmu/physmem.c b/softmmu/physmem.c
229index 2038240311..6b2a02fc87 100644
230--- a/softmmu/physmem.c
231+++ b/softmmu/physmem.c
232@@ -2391,13 +2391,16 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
233
234 if (xen_enabled()) {
235 ram_addr_t ram_addr;
236+
237 RCU_READ_LOCK_GUARD();
238 ram_addr = xen_ram_addr_from_mapcache(ptr);
239- block = qemu_get_ram_block(ram_addr);
240- if (block) {
241- *offset = ram_addr - block->offset;
242+ if (ram_addr != RAM_ADDR_INVALID) {
243+ block = qemu_get_ram_block(ram_addr);
244+ if (block) {
245+ *offset = ram_addr - block->offset;
246+ }
247+ return block;
248 }
249- return block;
250 }
251
252 RCU_READ_LOCK_GUARD();
253--
2542.25.1
255
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-hvm-move-common-functions-to-hw-xen-xen-hvm-comm.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-hvm-move-common-functions-to-hw-xen-xen-hvm-comm.patch
new file mode 100644
index 00000000..7df302a2
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0006-xen-hvm-move-common-functions-to-hw-xen-xen-hvm-comm.patch
@@ -0,0 +1,2094 @@
1From 87d362e72e65b604da7554657204344a6540d88c Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 1 Jul 2022 15:59:47 -0700
4Subject: [PATCH 06/16] xen-hvm: move common functions to
5 hw/xen/xen-hvm-common.c
6
7Extract common functionalities from xen-hvm.c and move them to
8hw/xen/xen-hvm-common.c. These common functions are useful for creating
9an IOREQ server.
10
11Moved the common usable IOREQ creation part to a new function
12xen_register_ioreq() which can be used by both x86 and ARM machines.
13
14NOTE: This patch will break the build as the patch only involves moving
15of functions. Build fixes will be in the next patch.
16
17Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
18Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
19Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
20---
21 hw/i386/xen/trace-events | 14 -
22 hw/i386/xen/xen-hvm.c | 927 +-------------------------------
23 hw/xen/meson.build | 5 +-
24 hw/xen/trace-events | 14 +
25 hw/xen/xen-hvm-common.c | 861 +++++++++++++++++++++++++++++
26 include/hw/i386/xen_arch_hvm.h | 1 +
27 include/hw/xen/xen-hvm-common.h | 98 ++++
28 7 files changed, 986 insertions(+), 934 deletions(-)
29 create mode 100644 hw/xen/xen-hvm-common.c
30 create mode 100644 include/hw/xen/xen-hvm-common.h
31
32diff --git a/hw/i386/xen/trace-events b/hw/i386/xen/trace-events
33index a0c89d91c4..5d0a8d6dcf 100644
34--- a/hw/i386/xen/trace-events
35+++ b/hw/i386/xen/trace-events
36@@ -7,17 +7,3 @@ xen_platform_log(char *s) "xen platform: %s"
37 xen_pv_mmio_read(uint64_t addr) "WARNING: read from Xen PV Device MMIO space (address 0x%"PRIx64")"
38 xen_pv_mmio_write(uint64_t addr) "WARNING: write to Xen PV Device MMIO space (address 0x%"PRIx64")"
39
40-# xen-hvm.c
41-xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: 0x%lx, size 0x%lx"
42-xen_client_set_memory(uint64_t start_addr, unsigned long size, bool log_dirty) "0x%"PRIx64" size 0x%lx, log_dirty %i"
43-handle_ioreq(void *req, uint32_t type, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p type=%d dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
44-handle_ioreq_read(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p read type=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
45-handle_ioreq_write(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p write type=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
46-cpu_ioreq_pio(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p pio dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
47-cpu_ioreq_pio_read_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio read reg data=0x%"PRIx64" port=0x%"PRIx64" size=%d"
48-cpu_ioreq_pio_write_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio write reg data=0x%"PRIx64" port=0x%"PRIx64" size=%d"
49-cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p copy dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
50-xen_map_resource_ioreq(uint32_t id, void *addr) "id: %u addr: %p"
51-cpu_ioreq_config_read(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
52-cpu_ioreq_config_write(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
53-
54diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
55index 178f0c68fc..36d87555a9 100644
56--- a/hw/i386/xen/xen-hvm.c
57+++ b/hw/i386/xen/xen-hvm.c
58@@ -10,43 +10,21 @@
59
60 #include "qemu/osdep.h"
61 #include "qemu/units.h"
62+#include "qapi/error.h"
63+#include "qapi/qapi-commands-migration.h"
64+#include "trace.h"
65
66-#include "cpu.h"
67-#include "hw/pci/pci.h"
68-#include "hw/pci/pci_host.h"
69 #include "hw/i386/pc.h"
70 #include "hw/irq.h"
71-#include "hw/hw.h"
72 #include "hw/i386/apic-msidef.h"
73-#include "hw/xen/xen_common.h"
74-#include "hw/xen/xen-legacy-backend.h"
75-#include "hw/xen/xen-bus.h"
76 #include "hw/xen/xen-x86.h"
77-#include "qapi/error.h"
78-#include "qapi/qapi-commands-migration.h"
79-#include "qemu/error-report.h"
80-#include "qemu/main-loop.h"
81 #include "qemu/range.h"
82-#include "sysemu/runstate.h"
83-#include "sysemu/sysemu.h"
84-#include "sysemu/xen.h"
85-#include "sysemu/xen-mapcache.h"
86-#include "trace.h"
87
88-#include <xen/hvm/ioreq.h>
89+#include "hw/xen/xen-hvm-common.h"
90+#include "hw/xen/arch_hvm.h"
91 #include <xen/hvm/e820.h>
92
93-//#define DEBUG_XEN_HVM
94-
95-#ifdef DEBUG_XEN_HVM
96-#define DPRINTF(fmt, ...) \
97- do { fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); } while (0)
98-#else
99-#define DPRINTF(fmt, ...) \
100- do { } while (0)
101-#endif
102-
103-static MemoryRegion ram_memory, ram_640k, ram_lo, ram_hi;
104+static MemoryRegion ram_640k, ram_lo, ram_hi;
105 static MemoryRegion *framebuffer;
106 static bool xen_in_migration;
107
108@@ -75,25 +53,6 @@ typedef struct shared_vmport_iopage shared_vmport_iopage_t;
109 #endif
110 static shared_vmport_iopage_t *shared_vmport_page;
111
112-static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i)
113-{
114- return shared_page->vcpu_ioreq[i].vp_eport;
115-}
116-static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu)
117-{
118- return &shared_page->vcpu_ioreq[vcpu];
119-}
120-
121-#define BUFFER_IO_MAX_DELAY 100
122-
123-typedef struct XenPhysmap {
124- hwaddr start_addr;
125- ram_addr_t size;
126- const char *name;
127- hwaddr phys_offset;
128-
129- QLIST_ENTRY(XenPhysmap) list;
130-} XenPhysmap;
131
132 static QLIST_HEAD(, XenPhysmap) xen_physmap;
133 static const XenPhysmap *log_for_dirtybit = NULL;
134@@ -102,40 +61,6 @@ static unsigned long *dirty_bitmap = NULL;
135 static Notifier suspend;
136 static Notifier wakeup;
137
138-typedef struct XenPciDevice {
139- PCIDevice *pci_dev;
140- uint32_t sbdf;
141- QLIST_ENTRY(XenPciDevice) entry;
142-} XenPciDevice;
143-
144-typedef struct XenIOState {
145- ioservid_t ioservid;
146- shared_iopage_t *shared_page;
147- buffered_iopage_t *buffered_io_page;
148- xenforeignmemory_resource_handle *fres;
149- QEMUTimer *buffered_io_timer;
150- CPUState **cpu_by_vcpu_id;
151- /* the evtchn port for polling the notification, */
152- evtchn_port_t *ioreq_local_port;
153- /* evtchn remote and local ports for buffered io */
154- evtchn_port_t bufioreq_remote_port;
155- evtchn_port_t bufioreq_local_port;
156- /* the evtchn fd for polling */
157- xenevtchn_handle *xce_handle;
158- /* which vcpu we are serving */
159- int send_vcpu;
160-
161- struct xs_handle *xenstore;
162- MemoryListener memory_listener;
163- MemoryListener io_listener;
164- QLIST_HEAD(, XenPciDevice) dev_list;
165- DeviceListener device_listener;
166-
167- Notifier exit;
168-} XenIOState;
169-
170-#include "hw/xen/arch_hvm.h"
171-
172 /* Xen specific function for piix pci */
173
174 int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num)
175@@ -248,42 +173,6 @@ static void xen_ram_init(PCMachineState *pcms,
176 }
177 }
178
179-void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr,
180- Error **errp)
181-{
182- unsigned long nr_pfn;
183- xen_pfn_t *pfn_list;
184- int i;
185-
186- if (runstate_check(RUN_STATE_INMIGRATE)) {
187- /* RAM already populated in Xen */
188- fprintf(stderr, "%s: do not alloc "RAM_ADDR_FMT
189- " bytes of ram at "RAM_ADDR_FMT" when runstate is INMIGRATE\n",
190- __func__, size, ram_addr);
191- return;
192- }
193-
194- if (mr == &ram_memory) {
195- return;
196- }
197-
198- trace_xen_ram_alloc(ram_addr, size);
199-
200- nr_pfn = size >> TARGET_PAGE_BITS;
201- pfn_list = g_malloc(sizeof (*pfn_list) * nr_pfn);
202-
203- for (i = 0; i < nr_pfn; i++) {
204- pfn_list[i] = (ram_addr >> TARGET_PAGE_BITS) + i;
205- }
206-
207- if (xc_domain_populate_physmap_exact(xen_xc, xen_domid, nr_pfn, 0, 0, pfn_list)) {
208- error_setg(errp, "xen: failed to populate ram at " RAM_ADDR_FMT,
209- ram_addr);
210- }
211-
212- g_free(pfn_list);
213-}
214-
215 static XenPhysmap *get_physmapping(hwaddr start_addr, ram_addr_t size)
216 {
217 XenPhysmap *physmap = NULL;
218@@ -473,109 +362,6 @@ static int xen_remove_from_physmap(XenIOState *state,
219 return 0;
220 }
221
222-static void xen_set_memory(struct MemoryListener *listener,
223- MemoryRegionSection *section,
224- bool add)
225-{
226- XenIOState *state = container_of(listener, XenIOState, memory_listener);
227-
228- if (section->mr == &ram_memory) {
229- return;
230- } else {
231- if (add) {
232- xen_map_memory_section(xen_domid, state->ioservid,
233- section);
234- } else {
235- xen_unmap_memory_section(xen_domid, state->ioservid,
236- section);
237- }
238- }
239- arch_xen_set_memory(state, section, add);
240-}
241-
242-static void xen_region_add(MemoryListener *listener,
243- MemoryRegionSection *section)
244-{
245- memory_region_ref(section->mr);
246- xen_set_memory(listener, section, true);
247-}
248-
249-static void xen_region_del(MemoryListener *listener,
250- MemoryRegionSection *section)
251-{
252- xen_set_memory(listener, section, false);
253- memory_region_unref(section->mr);
254-}
255-
256-static void xen_io_add(MemoryListener *listener,
257- MemoryRegionSection *section)
258-{
259- XenIOState *state = container_of(listener, XenIOState, io_listener);
260- MemoryRegion *mr = section->mr;
261-
262- if (mr->ops == &unassigned_io_ops) {
263- return;
264- }
265-
266- memory_region_ref(mr);
267-
268- xen_map_io_section(xen_domid, state->ioservid, section);
269-}
270-
271-static void xen_io_del(MemoryListener *listener,
272- MemoryRegionSection *section)
273-{
274- XenIOState *state = container_of(listener, XenIOState, io_listener);
275- MemoryRegion *mr = section->mr;
276-
277- if (mr->ops == &unassigned_io_ops) {
278- return;
279- }
280-
281- xen_unmap_io_section(xen_domid, state->ioservid, section);
282-
283- memory_region_unref(mr);
284-}
285-
286-static void xen_device_realize(DeviceListener *listener,
287- DeviceState *dev)
288-{
289- XenIOState *state = container_of(listener, XenIOState, device_listener);
290-
291- if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
292- PCIDevice *pci_dev = PCI_DEVICE(dev);
293- XenPciDevice *xendev = g_new(XenPciDevice, 1);
294-
295- xendev->pci_dev = pci_dev;
296- xendev->sbdf = PCI_BUILD_BDF(pci_dev_bus_num(pci_dev),
297- pci_dev->devfn);
298- QLIST_INSERT_HEAD(&state->dev_list, xendev, entry);
299-
300- xen_map_pcidev(xen_domid, state->ioservid, pci_dev);
301- }
302-}
303-
304-static void xen_device_unrealize(DeviceListener *listener,
305- DeviceState *dev)
306-{
307- XenIOState *state = container_of(listener, XenIOState, device_listener);
308-
309- if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
310- PCIDevice *pci_dev = PCI_DEVICE(dev);
311- XenPciDevice *xendev, *next;
312-
313- xen_unmap_pcidev(xen_domid, state->ioservid, pci_dev);
314-
315- QLIST_FOREACH_SAFE(xendev, &state->dev_list, entry, next) {
316- if (xendev->pci_dev == pci_dev) {
317- QLIST_REMOVE(xendev, entry);
318- g_free(xendev);
319- break;
320- }
321- }
322- }
323-}
324-
325 static void xen_sync_dirty_bitmap(XenIOState *state,
326 hwaddr start_addr,
327 ram_addr_t size)
328@@ -683,277 +469,6 @@ static MemoryListener xen_memory_listener = {
329 .priority = 10,
330 };
331
332-static MemoryListener xen_io_listener = {
333- .name = "xen-io",
334- .region_add = xen_io_add,
335- .region_del = xen_io_del,
336- .priority = 10,
337-};
338-
339-static DeviceListener xen_device_listener = {
340- .realize = xen_device_realize,
341- .unrealize = xen_device_unrealize,
342-};
343-
344-/* get the ioreq packets from share mem */
345-static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu)
346-{
347- ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);
348-
349- if (req->state != STATE_IOREQ_READY) {
350- DPRINTF("I/O request not ready: "
351- "%x, ptr: %x, port: %"PRIx64", "
352- "data: %"PRIx64", count: %u, size: %u\n",
353- req->state, req->data_is_ptr, req->addr,
354- req->data, req->count, req->size);
355- return NULL;
356- }
357-
358- xen_rmb(); /* see IOREQ_READY /then/ read contents of ioreq */
359-
360- req->state = STATE_IOREQ_INPROCESS;
361- return req;
362-}
363-
364-/* use poll to get the port notification */
365-/* ioreq_vec--out,the */
366-/* retval--the number of ioreq packet */
367-static ioreq_t *cpu_get_ioreq(XenIOState *state)
368-{
369- MachineState *ms = MACHINE(qdev_get_machine());
370- unsigned int max_cpus = ms->smp.max_cpus;
371- int i;
372- evtchn_port_t port;
373-
374- port = xenevtchn_pending(state->xce_handle);
375- if (port == state->bufioreq_local_port) {
376- timer_mod(state->buffered_io_timer,
377- BUFFER_IO_MAX_DELAY + qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
378- return NULL;
379- }
380-
381- if (port != -1) {
382- for (i = 0; i < max_cpus; i++) {
383- if (state->ioreq_local_port[i] == port) {
384- break;
385- }
386- }
387-
388- if (i == max_cpus) {
389- hw_error("Fatal error while trying to get io event!\n");
390- }
391-
392- /* unmask the wanted port again */
393- xenevtchn_unmask(state->xce_handle, port);
394-
395- /* get the io packet from shared memory */
396- state->send_vcpu = i;
397- return cpu_get_ioreq_from_shared_memory(state, i);
398- }
399-
400- /* read error or read nothing */
401- return NULL;
402-}
403-
404-static uint32_t do_inp(uint32_t addr, unsigned long size)
405-{
406- switch (size) {
407- case 1:
408- return cpu_inb(addr);
409- case 2:
410- return cpu_inw(addr);
411- case 4:
412- return cpu_inl(addr);
413- default:
414- hw_error("inp: bad size: %04x %lx", addr, size);
415- }
416-}
417-
418-static void do_outp(uint32_t addr,
419- unsigned long size, uint32_t val)
420-{
421- switch (size) {
422- case 1:
423- return cpu_outb(addr, val);
424- case 2:
425- return cpu_outw(addr, val);
426- case 4:
427- return cpu_outl(addr, val);
428- default:
429- hw_error("outp: bad size: %04x %lx", addr, size);
430- }
431-}
432-
433-/*
434- * Helper functions which read/write an object from/to physical guest
435- * memory, as part of the implementation of an ioreq.
436- *
437- * Equivalent to
438- * cpu_physical_memory_rw(addr + (req->df ? -1 : +1) * req->size * i,
439- * val, req->size, 0/1)
440- * except without the integer overflow problems.
441- */
442-static void rw_phys_req_item(hwaddr addr,
443- ioreq_t *req, uint32_t i, void *val, int rw)
444-{
445- /* Do everything unsigned so overflow just results in a truncated result
446- * and accesses to undesired parts of guest memory, which is up
447- * to the guest */
448- hwaddr offset = (hwaddr)req->size * i;
449- if (req->df) {
450- addr -= offset;
451- } else {
452- addr += offset;
453- }
454- cpu_physical_memory_rw(addr, val, req->size, rw);
455-}
456-
457-static inline void read_phys_req_item(hwaddr addr,
458- ioreq_t *req, uint32_t i, void *val)
459-{
460- rw_phys_req_item(addr, req, i, val, 0);
461-}
462-static inline void write_phys_req_item(hwaddr addr,
463- ioreq_t *req, uint32_t i, void *val)
464-{
465- rw_phys_req_item(addr, req, i, val, 1);
466-}
467-
468-
469-static void cpu_ioreq_pio(ioreq_t *req)
470-{
471- uint32_t i;
472-
473- trace_cpu_ioreq_pio(req, req->dir, req->df, req->data_is_ptr, req->addr,
474- req->data, req->count, req->size);
475-
476- if (req->size > sizeof(uint32_t)) {
477- hw_error("PIO: bad size (%u)", req->size);
478- }
479-
480- if (req->dir == IOREQ_READ) {
481- if (!req->data_is_ptr) {
482- req->data = do_inp(req->addr, req->size);
483- trace_cpu_ioreq_pio_read_reg(req, req->data, req->addr,
484- req->size);
485- } else {
486- uint32_t tmp;
487-
488- for (i = 0; i < req->count; i++) {
489- tmp = do_inp(req->addr, req->size);
490- write_phys_req_item(req->data, req, i, &tmp);
491- }
492- }
493- } else if (req->dir == IOREQ_WRITE) {
494- if (!req->data_is_ptr) {
495- trace_cpu_ioreq_pio_write_reg(req, req->data, req->addr,
496- req->size);
497- do_outp(req->addr, req->size, req->data);
498- } else {
499- for (i = 0; i < req->count; i++) {
500- uint32_t tmp = 0;
501-
502- read_phys_req_item(req->data, req, i, &tmp);
503- do_outp(req->addr, req->size, tmp);
504- }
505- }
506- }
507-}
508-
509-static void cpu_ioreq_move(ioreq_t *req)
510-{
511- uint32_t i;
512-
513- trace_cpu_ioreq_move(req, req->dir, req->df, req->data_is_ptr, req->addr,
514- req->data, req->count, req->size);
515-
516- if (req->size > sizeof(req->data)) {
517- hw_error("MMIO: bad size (%u)", req->size);
518- }
519-
520- if (!req->data_is_ptr) {
521- if (req->dir == IOREQ_READ) {
522- for (i = 0; i < req->count; i++) {
523- read_phys_req_item(req->addr, req, i, &req->data);
524- }
525- } else if (req->dir == IOREQ_WRITE) {
526- for (i = 0; i < req->count; i++) {
527- write_phys_req_item(req->addr, req, i, &req->data);
528- }
529- }
530- } else {
531- uint64_t tmp;
532-
533- if (req->dir == IOREQ_READ) {
534- for (i = 0; i < req->count; i++) {
535- read_phys_req_item(req->addr, req, i, &tmp);
536- write_phys_req_item(req->data, req, i, &tmp);
537- }
538- } else if (req->dir == IOREQ_WRITE) {
539- for (i = 0; i < req->count; i++) {
540- read_phys_req_item(req->data, req, i, &tmp);
541- write_phys_req_item(req->addr, req, i, &tmp);
542- }
543- }
544- }
545-}
546-
547-static void cpu_ioreq_config(XenIOState *state, ioreq_t *req)
548-{
549- uint32_t sbdf = req->addr >> 32;
550- uint32_t reg = req->addr;
551- XenPciDevice *xendev;
552-
553- if (req->size != sizeof(uint8_t) && req->size != sizeof(uint16_t) &&
554- req->size != sizeof(uint32_t)) {
555- hw_error("PCI config access: bad size (%u)", req->size);
556- }
557-
558- if (req->count != 1) {
559- hw_error("PCI config access: bad count (%u)", req->count);
560- }
561-
562- QLIST_FOREACH(xendev, &state->dev_list, entry) {
563- if (xendev->sbdf != sbdf) {
564- continue;
565- }
566-
567- if (!req->data_is_ptr) {
568- if (req->dir == IOREQ_READ) {
569- req->data = pci_host_config_read_common(
570- xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
571- req->size);
572- trace_cpu_ioreq_config_read(req, xendev->sbdf, reg,
573- req->size, req->data);
574- } else if (req->dir == IOREQ_WRITE) {
575- trace_cpu_ioreq_config_write(req, xendev->sbdf, reg,
576- req->size, req->data);
577- pci_host_config_write_common(
578- xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
579- req->data, req->size);
580- }
581- } else {
582- uint32_t tmp;
583-
584- if (req->dir == IOREQ_READ) {
585- tmp = pci_host_config_read_common(
586- xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
587- req->size);
588- trace_cpu_ioreq_config_read(req, xendev->sbdf, reg,
589- req->size, tmp);
590- write_phys_req_item(req->data, req, 0, &tmp);
591- } else if (req->dir == IOREQ_WRITE) {
592- read_phys_req_item(req->data, req, 0, &tmp);
593- trace_cpu_ioreq_config_write(req, xendev->sbdf, reg,
594- req->size, tmp);
595- pci_host_config_write_common(
596- xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
597- tmp, req->size);
598- }
599- }
600- }
601-}
602-
603 static void regs_to_cpu(vmware_regs_t *vmport_regs, ioreq_t *req)
604 {
605 X86CPU *cpu;
606@@ -997,223 +512,6 @@ static void handle_vmport_ioreq(XenIOState *state, ioreq_t *req)
607 current_cpu = NULL;
608 }
609
610-static void handle_ioreq(XenIOState *state, ioreq_t *req)
611-{
612- trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr,
613- req->addr, req->data, req->count, req->size);
614-
615- if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
616- (req->size < sizeof (target_ulong))) {
617- req->data &= ((target_ulong) 1 << (8 * req->size)) - 1;
618- }
619-
620- if (req->dir == IOREQ_WRITE)
621- trace_handle_ioreq_write(req, req->type, req->df, req->data_is_ptr,
622- req->addr, req->data, req->count, req->size);
623-
624- switch (req->type) {
625- case IOREQ_TYPE_PIO:
626- cpu_ioreq_pio(req);
627- break;
628- case IOREQ_TYPE_COPY:
629- cpu_ioreq_move(req);
630- break;
631- case IOREQ_TYPE_TIMEOFFSET:
632- break;
633- case IOREQ_TYPE_INVALIDATE:
634- xen_invalidate_map_cache();
635- break;
636- case IOREQ_TYPE_PCI_CONFIG:
637- cpu_ioreq_config(state, req);
638- break;
639- default:
640- arch_handle_ioreq(state, req);
641- }
642- if (req->dir == IOREQ_READ) {
643- trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr,
644- req->addr, req->data, req->count, req->size);
645- }
646-}
647-
648-static bool handle_buffered_iopage(XenIOState *state)
649-{
650- buffered_iopage_t *buf_page = state->buffered_io_page;
651- buf_ioreq_t *buf_req = NULL;
652- bool handled_ioreq = false;
653- ioreq_t req;
654- int qw;
655-
656- if (!buf_page) {
657- return 0;
658- }
659-
660- memset(&req, 0x00, sizeof(req));
661- req.state = STATE_IOREQ_READY;
662- req.count = 1;
663- req.dir = IOREQ_WRITE;
664-
665- for (;;) {
666- uint32_t rdptr = buf_page->read_pointer, wrptr;
667-
668- xen_rmb();
669- wrptr = buf_page->write_pointer;
670- xen_rmb();
671- if (rdptr != buf_page->read_pointer) {
672- continue;
673- }
674- if (rdptr == wrptr) {
675- break;
676- }
677- buf_req = &buf_page->buf_ioreq[rdptr % IOREQ_BUFFER_SLOT_NUM];
678- req.size = 1U << buf_req->size;
679- req.addr = buf_req->addr;
680- req.data = buf_req->data;
681- req.type = buf_req->type;
682- xen_rmb();
683- qw = (req.size == 8);
684- if (qw) {
685- if (rdptr + 1 == wrptr) {
686- hw_error("Incomplete quad word buffered ioreq");
687- }
688- buf_req = &buf_page->buf_ioreq[(rdptr + 1) %
689- IOREQ_BUFFER_SLOT_NUM];
690- req.data |= ((uint64_t)buf_req->data) << 32;
691- xen_rmb();
692- }
693-
694- handle_ioreq(state, &req);
695-
696- /* Only req.data may get updated by handle_ioreq(), albeit even that
697- * should not happen as such data would never make it to the guest (we
698- * can only usefully see writes here after all).
699- */
700- assert(req.state == STATE_IOREQ_READY);
701- assert(req.count == 1);
702- assert(req.dir == IOREQ_WRITE);
703- assert(!req.data_is_ptr);
704-
705- qatomic_add(&buf_page->read_pointer, qw + 1);
706- handled_ioreq = true;
707- }
708-
709- return handled_ioreq;
710-}
711-
712-static void handle_buffered_io(void *opaque)
713-{
714- XenIOState *state = opaque;
715-
716- if (handle_buffered_iopage(state)) {
717- timer_mod(state->buffered_io_timer,
718- BUFFER_IO_MAX_DELAY + qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
719- } else {
720- timer_del(state->buffered_io_timer);
721- xenevtchn_unmask(state->xce_handle, state->bufioreq_local_port);
722- }
723-}
724-
725-static void cpu_handle_ioreq(void *opaque)
726-{
727- XenIOState *state = opaque;
728- ioreq_t *req = cpu_get_ioreq(state);
729-
730- handle_buffered_iopage(state);
731- if (req) {
732- ioreq_t copy = *req;
733-
734- xen_rmb();
735- handle_ioreq(state, &copy);
736- req->data = copy.data;
737-
738- if (req->state != STATE_IOREQ_INPROCESS) {
739- fprintf(stderr, "Badness in I/O request ... not in service?!: "
740- "%x, ptr: %x, port: %"PRIx64", "
741- "data: %"PRIx64", count: %u, size: %u, type: %u\n",
742- req->state, req->data_is_ptr, req->addr,
743- req->data, req->count, req->size, req->type);
744- destroy_hvm_domain(false);
745- return;
746- }
747-
748- xen_wmb(); /* Update ioreq contents /then/ update state. */
749-
750- /*
751- * We do this before we send the response so that the tools
752- * have the opportunity to pick up on the reset before the
753- * guest resumes and does a hlt with interrupts disabled which
754- * causes Xen to powerdown the domain.
755- */
756- if (runstate_is_running()) {
757- ShutdownCause request;
758-
759- if (qemu_shutdown_requested_get()) {
760- destroy_hvm_domain(false);
761- }
762- request = qemu_reset_requested_get();
763- if (request) {
764- qemu_system_reset(request);
765- destroy_hvm_domain(true);
766- }
767- }
768-
769- req->state = STATE_IORESP_READY;
770- xenevtchn_notify(state->xce_handle,
771- state->ioreq_local_port[state->send_vcpu]);
772- }
773-}
774-
775-static void xen_main_loop_prepare(XenIOState *state)
776-{
777- int evtchn_fd = -1;
778-
779- if (state->xce_handle != NULL) {
780- evtchn_fd = xenevtchn_fd(state->xce_handle);
781- }
782-
783- state->buffered_io_timer = timer_new_ms(QEMU_CLOCK_REALTIME, handle_buffered_io,
784- state);
785-
786- if (evtchn_fd != -1) {
787- CPUState *cpu_state;
788-
789- DPRINTF("%s: Init cpu_by_vcpu_id\n", __func__);
790- CPU_FOREACH(cpu_state) {
791- DPRINTF("%s: cpu_by_vcpu_id[%d]=%p\n",
792- __func__, cpu_state->cpu_index, cpu_state);
793- state->cpu_by_vcpu_id[cpu_state->cpu_index] = cpu_state;
794- }
795- qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, state);
796- }
797-}
798-
799-
800-static void xen_hvm_change_state_handler(void *opaque, bool running,
801- RunState rstate)
802-{
803- XenIOState *state = opaque;
804-
805- if (running) {
806- xen_main_loop_prepare(state);
807- }
808-
809- xen_set_ioreq_server_state(xen_domid,
810- state->ioservid,
811- (rstate == RUN_STATE_RUNNING));
812-}
813-
814-static void xen_exit_notifier(Notifier *n, void *data)
815-{
816- XenIOState *state = container_of(n, XenIOState, exit);
817-
818- xen_destroy_ioreq_server(xen_domid, state->ioservid);
819- if (state->fres != NULL) {
820- xenforeignmemory_unmap_resource(xen_fmem, state->fres);
821- }
822-
823- xenevtchn_close(state->xce_handle);
824- xs_daemon_close(state->xenstore);
825-}
826-
827 #ifdef XEN_COMPAT_PHYSMAP
828 static void xen_read_physmap(XenIOState *state)
829 {
830@@ -1273,178 +571,17 @@ static void xen_wakeup_notifier(Notifier *notifier, void *data)
831 xc_set_hvm_param(xen_xc, xen_domid, HVM_PARAM_ACPI_S_STATE, 0);
832 }
833
834-static int xen_map_ioreq_server(XenIOState *state)
835-{
836- void *addr = NULL;
837- xen_pfn_t ioreq_pfn;
838- xen_pfn_t bufioreq_pfn;
839- evtchn_port_t bufioreq_evtchn;
840- int rc;
841-
842- /*
843- * Attempt to map using the resource API and fall back to normal
844- * foreign mapping if this is not supported.
845- */
846- QEMU_BUILD_BUG_ON(XENMEM_resource_ioreq_server_frame_bufioreq != 0);
847- QEMU_BUILD_BUG_ON(XENMEM_resource_ioreq_server_frame_ioreq(0) != 1);
848- state->fres = xenforeignmemory_map_resource(xen_fmem, xen_domid,
849- XENMEM_resource_ioreq_server,
850- state->ioservid, 0, 2,
851- &addr,
852- PROT_READ | PROT_WRITE, 0);
853- if (state->fres != NULL) {
854- trace_xen_map_resource_ioreq(state->ioservid, addr);
855- state->buffered_io_page = addr;
856- state->shared_page = addr + TARGET_PAGE_SIZE;
857- } else if (errno != EOPNOTSUPP) {
858- error_report("failed to map ioreq server resources: error %d handle=%p",
859- errno, xen_xc);
860- return -1;
861- }
862-
863- rc = xen_get_ioreq_server_info(xen_domid, state->ioservid,
864- (state->shared_page == NULL) ?
865- &ioreq_pfn : NULL,
866- (state->buffered_io_page == NULL) ?
867- &bufioreq_pfn : NULL,
868- &bufioreq_evtchn);
869- if (rc < 0) {
870- error_report("failed to get ioreq server info: error %d handle=%p",
871- errno, xen_xc);
872- return rc;
873- }
874-
875- if (state->shared_page == NULL) {
876- DPRINTF("shared page at pfn %lx\n", ioreq_pfn);
877-
878- state->shared_page = xenforeignmemory_map(xen_fmem, xen_domid,
879- PROT_READ | PROT_WRITE,
880- 1, &ioreq_pfn, NULL);
881- if (state->shared_page == NULL) {
882- error_report("map shared IO page returned error %d handle=%p",
883- errno, xen_xc);
884- }
885- }
886-
887- if (state->buffered_io_page == NULL) {
888- DPRINTF("buffered io page at pfn %lx\n", bufioreq_pfn);
889-
890- state->buffered_io_page = xenforeignmemory_map(xen_fmem, xen_domid,
891- PROT_READ | PROT_WRITE,
892- 1, &bufioreq_pfn,
893- NULL);
894- if (state->buffered_io_page == NULL) {
895- error_report("map buffered IO page returned error %d", errno);
896- return -1;
897- }
898- }
899-
900- if (state->shared_page == NULL || state->buffered_io_page == NULL) {
901- return -1;
902- }
903-
904- DPRINTF("buffered io evtchn is %x\n", bufioreq_evtchn);
905-
906- state->bufioreq_remote_port = bufioreq_evtchn;
907-
908- return 0;
909-}
910-
911 void xen_hvm_init_pc(PCMachineState *pcms, MemoryRegion **ram_memory)
912 {
913 MachineState *ms = MACHINE(pcms);
914 unsigned int max_cpus = ms->smp.max_cpus;
915- int i, rc;
916+ int rc;
917 xen_pfn_t ioreq_pfn;
918 XenIOState *state;
919
920 state = g_new0(XenIOState, 1);
921
922- state->xce_handle = xenevtchn_open(NULL, 0);
923- if (state->xce_handle == NULL) {
924- perror("xen: event channel open");
925- goto err;
926- }
927-
928- state->xenstore = xs_daemon_open();
929- if (state->xenstore == NULL) {
930- perror("xen: xenstore open");
931- goto err;
932- }
933-
934- xen_create_ioreq_server(xen_domid, &state->ioservid);
935-
936- state->exit.notify = xen_exit_notifier;
937- qemu_add_exit_notifier(&state->exit);
938-
939- /*
940- * Register wake-up support in QMP query-current-machine API
941- */
942- qemu_register_wakeup_support();
943-
944- rc = xen_map_ioreq_server(state);
945- if (rc < 0) {
946- goto err;
947- }
948-
949- /* Note: cpus is empty at this point in init */
950- state->cpu_by_vcpu_id = g_new0(CPUState *, max_cpus);
951-
952- rc = xen_set_ioreq_server_state(xen_domid, state->ioservid, true);
953- if (rc < 0) {
954- error_report("failed to enable ioreq server info: error %d handle=%p",
955- errno, xen_xc);
956- goto err;
957- }
958-
959- state->ioreq_local_port = g_new0(evtchn_port_t, max_cpus);
960-
961- /* FIXME: how about if we overflow the page here? */
962- for (i = 0; i < max_cpus; i++) {
963- rc = xenevtchn_bind_interdomain(state->xce_handle, xen_domid,
964- xen_vcpu_eport(state->shared_page, i));
965- if (rc == -1) {
966- error_report("shared evtchn %d bind error %d", i, errno);
967- goto err;
968- }
969- state->ioreq_local_port[i] = rc;
970- }
971-
972- rc = xenevtchn_bind_interdomain(state->xce_handle, xen_domid,
973- state->bufioreq_remote_port);
974- if (rc == -1) {
975- error_report("buffered evtchn bind error %d", errno);
976- goto err;
977- }
978- state->bufioreq_local_port = rc;
979-
980- /* Init RAM management */
981-#ifdef XEN_COMPAT_PHYSMAP
982- xen_map_cache_init(xen_phys_offset_to_gaddr, state);
983-#else
984- xen_map_cache_init(NULL, state);
985-#endif
986-
987- qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
988-
989- state->memory_listener = xen_memory_listener;
990- memory_listener_register(&state->memory_listener, &address_space_memory);
991-
992- state->io_listener = xen_io_listener;
993- memory_listener_register(&state->io_listener, &address_space_io);
994-
995- state->device_listener = xen_device_listener;
996- QLIST_INIT(&state->dev_list);
997- device_listener_register(&state->device_listener);
998-
999- xen_bus_init();
1000-
1001- /* Initialize backend core & drivers */
1002- if (xen_be_init() != 0) {
1003- error_report("xen backend core setup failed");
1004- goto err;
1005- }
1006- xen_be_register_common();
1007+ xen_register_ioreq(state, max_cpus, xen_memory_listener);
1008
1009 QLIST_INIT(&xen_physmap);
1010 xen_read_physmap(state);
1011@@ -1484,59 +621,11 @@ err:
1012 exit(1);
1013 }
1014
1015-void destroy_hvm_domain(bool reboot)
1016-{
1017- xc_interface *xc_handle;
1018- int sts;
1019- int rc;
1020-
1021- unsigned int reason = reboot ? SHUTDOWN_reboot : SHUTDOWN_poweroff;
1022-
1023- if (xen_dmod) {
1024- rc = xendevicemodel_shutdown(xen_dmod, xen_domid, reason);
1025- if (!rc) {
1026- return;
1027- }
1028- if (errno != ENOTTY /* old Xen */) {
1029- perror("xendevicemodel_shutdown failed");
1030- }
1031- /* well, try the old thing then */
1032- }
1033-
1034- xc_handle = xc_interface_open(0, 0, 0);
1035- if (xc_handle == NULL) {
1036- fprintf(stderr, "Cannot acquire xenctrl handle\n");
1037- } else {
1038- sts = xc_domain_shutdown(xc_handle, xen_domid, reason);
1039- if (sts != 0) {
1040- fprintf(stderr, "xc_domain_shutdown failed to issue %s, "
1041- "sts %d, %s\n", reboot ? "reboot" : "poweroff",
1042- sts, strerror(errno));
1043- } else {
1044- fprintf(stderr, "Issued domain %d %s\n", xen_domid,
1045- reboot ? "reboot" : "poweroff");
1046- }
1047- xc_interface_close(xc_handle);
1048- }
1049-}
1050-
1051 void xen_register_framebuffer(MemoryRegion *mr)
1052 {
1053 framebuffer = mr;
1054 }
1055
1056-void xen_shutdown_fatal_error(const char *fmt, ...)
1057-{
1058- va_list ap;
1059-
1060- va_start(ap, fmt);
1061- vfprintf(stderr, fmt, ap);
1062- va_end(ap);
1063- fprintf(stderr, "Will destroy the domain.\n");
1064- /* destroy the domain */
1065- qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_ERROR);
1066-}
1067-
1068 void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
1069 {
1070 if (unlikely(xen_in_migration)) {
1071diff --git a/hw/xen/meson.build b/hw/xen/meson.build
1072index 19d0637c46..008e036d63 100644
1073--- a/hw/xen/meson.build
1074+++ b/hw/xen/meson.build
1075@@ -25,4 +25,7 @@ specific_ss.add_all(when: ['CONFIG_XEN', xen], if_true: xen_specific_ss)
1076
1077 xen_ss = ss.source_set()
1078
1079-xen_ss.add(when: 'CONFIG_XEN', if_true: files('xen-mapcache.c'))
1080+xen_ss.add(when: 'CONFIG_XEN', if_true: files(
1081+ 'xen-mapcache.c',
1082+ 'xen-hvm-common.c',
1083+))
1084diff --git a/hw/xen/trace-events b/hw/xen/trace-events
1085index 2c8f238f42..02ca1183da 100644
1086--- a/hw/xen/trace-events
1087+++ b/hw/xen/trace-events
1088@@ -42,6 +42,20 @@ xs_node_vscanf(char *path, char *value) "%s %s"
1089 xs_node_watch(char *path) "%s"
1090 xs_node_unwatch(char *path) "%s"
1091
1092+# xen-hvm.c
1093+xen_ram_alloc(unsigned long ram_addr, unsigned long size) "requested: 0x%lx, size 0x%lx"
1094+xen_client_set_memory(uint64_t start_addr, unsigned long size, bool log_dirty) "0x%"PRIx64" size 0x%lx, log_dirty %i"
1095+handle_ioreq(void *req, uint32_t type, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p type=%d dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
1096+handle_ioreq_read(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p read type=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
1097+handle_ioreq_write(void *req, uint32_t type, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p write type=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
1098+cpu_ioreq_pio(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p pio dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
1099+cpu_ioreq_pio_read_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio read reg data=0x%"PRIx64" port=0x%"PRIx64" size=%d"
1100+cpu_ioreq_pio_write_reg(void *req, uint64_t data, uint64_t addr, uint32_t size) "I/O=%p pio write reg data=0x%"PRIx64" port=0x%"PRIx64" size=%d"
1101+cpu_ioreq_move(void *req, uint32_t dir, uint32_t df, uint32_t data_is_ptr, uint64_t addr, uint64_t data, uint32_t count, uint32_t size) "I/O=%p copy dir=%d df=%d ptr=%d port=0x%"PRIx64" data=0x%"PRIx64" count=%d size=%d"
1102+xen_map_resource_ioreq(uint32_t id, void *addr) "id: %u addr: %p"
1103+cpu_ioreq_config_read(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
1104+cpu_ioreq_config_write(void *req, uint32_t sbdf, uint32_t reg, uint32_t size, uint32_t data) "I/O=%p sbdf=0x%x reg=%u size=%u data=0x%x"
1105+
1106 # xen-mapcache.c
1107 xen_map_cache(uint64_t phys_addr) "want 0x%"PRIx64
1108 xen_remap_bucket(uint64_t index) "index 0x%"PRIx64
1109diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
1110new file mode 100644
1111index 0000000000..67f76f6010
1112--- /dev/null
1113+++ b/hw/xen/xen-hvm-common.c
1114@@ -0,0 +1,861 @@
1115+#include "qemu/osdep.h"
1116+#include "qemu/units.h"
1117+#include "qapi/error.h"
1118+#include "trace.h"
1119+
1120+#include "hw/pci/pci_host.h"
1121+#include "hw/xen/xen-hvm-common.h"
1122+#include "hw/xen/xen-legacy-backend.h"
1123+#include "hw/xen/xen-bus.h"
1124+#include "hw/boards.h"
1125+#include "hw/xen/arch_hvm.h"
1126+
1127+MemoryRegion ram_memory;
1128+
1129+MemoryListener xen_io_listener = {
1130+ .name = "xen-io",
1131+ .region_add = xen_io_add,
1132+ .region_del = xen_io_del,
1133+ .priority = 10,
1134+};
1135+
1136+DeviceListener xen_device_listener = {
1137+ .realize = xen_device_realize,
1138+ .unrealize = xen_device_unrealize,
1139+};
1140+
1141+static void xen_set_memory(struct MemoryListener *listener,
1142+ MemoryRegionSection *section,
1143+ bool add)
1144+{
1145+ XenIOState *state = container_of(listener, XenIOState, memory_listener);
1146+
1147+ if (section->mr == &ram_memory) {
1148+ return;
1149+ } else {
1150+ if (add) {
1151+ xen_map_memory_section(xen_domid, state->ioservid,
1152+ section);
1153+ } else {
1154+ xen_unmap_memory_section(xen_domid, state->ioservid,
1155+ section);
1156+ }
1157+ }
1158+ arch_xen_set_memory(state, section, add);
1159+}
1160+
1161+void xen_region_add(MemoryListener *listener,
1162+ MemoryRegionSection *section)
1163+{
1164+ memory_region_ref(section->mr);
1165+ xen_set_memory(listener, section, true);
1166+}
1167+
1168+void xen_region_del(MemoryListener *listener,
1169+ MemoryRegionSection *section)
1170+{
1171+ xen_set_memory(listener, section, false);
1172+ memory_region_unref(section->mr);
1173+}
1174+
1175+void xen_io_add(MemoryListener *listener,
1176+ MemoryRegionSection *section)
1177+{
1178+ XenIOState *state = container_of(listener, XenIOState, io_listener);
1179+ MemoryRegion *mr = section->mr;
1180+
1181+ if (mr->ops == &unassigned_io_ops) {
1182+ return;
1183+ }
1184+
1185+ memory_region_ref(mr);
1186+
1187+ xen_map_io_section(xen_domid, state->ioservid, section);
1188+}
1189+
1190+void xen_io_del(MemoryListener *listener,
1191+ MemoryRegionSection *section)
1192+{
1193+ XenIOState *state = container_of(listener, XenIOState, io_listener);
1194+ MemoryRegion *mr = section->mr;
1195+
1196+ if (mr->ops == &unassigned_io_ops) {
1197+ return;
1198+ }
1199+
1200+ xen_unmap_io_section(xen_domid, state->ioservid, section);
1201+
1202+ memory_region_unref(mr);
1203+}
1204+
1205+void xen_device_realize(DeviceListener *listener,
1206+ DeviceState *dev)
1207+{
1208+ XenIOState *state = container_of(listener, XenIOState, device_listener);
1209+
1210+ if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
1211+ PCIDevice *pci_dev = PCI_DEVICE(dev);
1212+ XenPciDevice *xendev = g_new(XenPciDevice, 1);
1213+
1214+ xendev->pci_dev = pci_dev;
1215+ xendev->sbdf = PCI_BUILD_BDF(pci_dev_bus_num(pci_dev),
1216+ pci_dev->devfn);
1217+ QLIST_INSERT_HEAD(&state->dev_list, xendev, entry);
1218+
1219+ xen_map_pcidev(xen_domid, state->ioservid, pci_dev);
1220+ }
1221+}
1222+
1223+void xen_device_unrealize(DeviceListener *listener,
1224+ DeviceState *dev)
1225+{
1226+ XenIOState *state = container_of(listener, XenIOState, device_listener);
1227+
1228+ if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
1229+ PCIDevice *pci_dev = PCI_DEVICE(dev);
1230+ XenPciDevice *xendev, *next;
1231+
1232+ xen_unmap_pcidev(xen_domid, state->ioservid, pci_dev);
1233+
1234+ QLIST_FOREACH_SAFE(xendev, &state->dev_list, entry, next) {
1235+ if (xendev->pci_dev == pci_dev) {
1236+ QLIST_REMOVE(xendev, entry);
1237+ g_free(xendev);
1238+ break;
1239+ }
1240+ }
1241+ }
1242+}
1243+
1244+/* get the ioreq packets from share mem */
1245+static ioreq_t *cpu_get_ioreq_from_shared_memory(XenIOState *state, int vcpu)
1246+{
1247+ ioreq_t *req = xen_vcpu_ioreq(state->shared_page, vcpu);
1248+
1249+ if (req->state != STATE_IOREQ_READY) {
1250+ DPRINTF("I/O request not ready: "
1251+ "%x, ptr: %x, port: %"PRIx64", "
1252+ "data: %"PRIx64", count: %u, size: %u\n",
1253+ req->state, req->data_is_ptr, req->addr,
1254+ req->data, req->count, req->size);
1255+ return NULL;
1256+ }
1257+
1258+ xen_rmb(); /* see IOREQ_READY /then/ read contents of ioreq */
1259+
1260+ req->state = STATE_IOREQ_INPROCESS;
1261+ return req;
1262+}
1263+
1264+/* use poll to get the port notification */
1265+/* ioreq_vec--out,the */
1266+/* retval--the number of ioreq packet */
1267+static ioreq_t *cpu_get_ioreq(XenIOState *state)
1268+{
1269+ MachineState *ms = MACHINE(qdev_get_machine());
1270+ unsigned int max_cpus = ms->smp.max_cpus;
1271+ int i;
1272+ evtchn_port_t port;
1273+
1274+ port = xenevtchn_pending(state->xce_handle);
1275+ if (port == state->bufioreq_local_port) {
1276+ timer_mod(state->buffered_io_timer,
1277+ BUFFER_IO_MAX_DELAY + qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
1278+ return NULL;
1279+ }
1280+
1281+ if (port != -1) {
1282+ for (i = 0; i < max_cpus; i++) {
1283+ if (state->ioreq_local_port[i] == port) {
1284+ break;
1285+ }
1286+ }
1287+
1288+ if (i == max_cpus) {
1289+ hw_error("Fatal error while trying to get io event!\n");
1290+ }
1291+
1292+ /* unmask the wanted port again */
1293+ xenevtchn_unmask(state->xce_handle, port);
1294+
1295+ /* get the io packet from shared memory */
1296+ state->send_vcpu = i;
1297+ return cpu_get_ioreq_from_shared_memory(state, i);
1298+ }
1299+
1300+ /* read error or read nothing */
1301+ return NULL;
1302+}
1303+
1304+static uint32_t do_inp(uint32_t addr, unsigned long size)
1305+{
1306+ switch (size) {
1307+ case 1:
1308+ return cpu_inb(addr);
1309+ case 2:
1310+ return cpu_inw(addr);
1311+ case 4:
1312+ return cpu_inl(addr);
1313+ default:
1314+ hw_error("inp: bad size: %04x %lx", addr, size);
1315+ }
1316+}
1317+
1318+static void do_outp(uint32_t addr,
1319+ unsigned long size, uint32_t val)
1320+{
1321+ switch (size) {
1322+ case 1:
1323+ return cpu_outb(addr, val);
1324+ case 2:
1325+ return cpu_outw(addr, val);
1326+ case 4:
1327+ return cpu_outl(addr, val);
1328+ default:
1329+ hw_error("outp: bad size: %04x %lx", addr, size);
1330+ }
1331+}
1332+
1333+/*
1334+ * Helper functions which read/write an object from/to physical guest
1335+ * memory, as part of the implementation of an ioreq.
1336+ *
1337+ * Equivalent to
1338+ * cpu_physical_memory_rw(addr + (req->df ? -1 : +1) * req->size * i,
1339+ * val, req->size, 0/1)
1340+ * except without the integer overflow problems.
1341+ */
1342+static void rw_phys_req_item(hwaddr addr,
1343+ ioreq_t *req, uint32_t i, void *val, int rw)
1344+{
1345+ /* Do everything unsigned so overflow just results in a truncated result
1346+ * and accesses to undesired parts of guest memory, which is up
1347+ * to the guest */
1348+ hwaddr offset = (hwaddr)req->size * i;
1349+ if (req->df) {
1350+ addr -= offset;
1351+ } else {
1352+ addr += offset;
1353+ }
1354+ cpu_physical_memory_rw(addr, val, req->size, rw);
1355+}
1356+
1357+static inline void read_phys_req_item(hwaddr addr,
1358+ ioreq_t *req, uint32_t i, void *val)
1359+{
1360+ rw_phys_req_item(addr, req, i, val, 0);
1361+}
1362+static inline void write_phys_req_item(hwaddr addr,
1363+ ioreq_t *req, uint32_t i, void *val)
1364+{
1365+ rw_phys_req_item(addr, req, i, val, 1);
1366+}
1367+
1368+
1369+void cpu_ioreq_pio(ioreq_t *req)
1370+{
1371+ uint32_t i;
1372+
1373+ trace_cpu_ioreq_pio(req, req->dir, req->df, req->data_is_ptr, req->addr,
1374+ req->data, req->count, req->size);
1375+
1376+ if (req->size > sizeof(uint32_t)) {
1377+ hw_error("PIO: bad size (%u)", req->size);
1378+ }
1379+
1380+ if (req->dir == IOREQ_READ) {
1381+ if (!req->data_is_ptr) {
1382+ req->data = do_inp(req->addr, req->size);
1383+ trace_cpu_ioreq_pio_read_reg(req, req->data, req->addr,
1384+ req->size);
1385+ } else {
1386+ uint32_t tmp;
1387+
1388+ for (i = 0; i < req->count; i++) {
1389+ tmp = do_inp(req->addr, req->size);
1390+ write_phys_req_item(req->data, req, i, &tmp);
1391+ }
1392+ }
1393+ } else if (req->dir == IOREQ_WRITE) {
1394+ if (!req->data_is_ptr) {
1395+ trace_cpu_ioreq_pio_write_reg(req, req->data, req->addr,
1396+ req->size);
1397+ do_outp(req->addr, req->size, req->data);
1398+ } else {
1399+ for (i = 0; i < req->count; i++) {
1400+ uint32_t tmp = 0;
1401+
1402+ read_phys_req_item(req->data, req, i, &tmp);
1403+ do_outp(req->addr, req->size, tmp);
1404+ }
1405+ }
1406+ }
1407+}
1408+
1409+static void cpu_ioreq_move(ioreq_t *req)
1410+{
1411+ uint32_t i;
1412+
1413+ trace_cpu_ioreq_move(req, req->dir, req->df, req->data_is_ptr, req->addr,
1414+ req->data, req->count, req->size);
1415+
1416+ if (req->size > sizeof(req->data)) {
1417+ hw_error("MMIO: bad size (%u)", req->size);
1418+ }
1419+
1420+ if (!req->data_is_ptr) {
1421+ if (req->dir == IOREQ_READ) {
1422+ for (i = 0; i < req->count; i++) {
1423+ read_phys_req_item(req->addr, req, i, &req->data);
1424+ }
1425+ } else if (req->dir == IOREQ_WRITE) {
1426+ for (i = 0; i < req->count; i++) {
1427+ write_phys_req_item(req->addr, req, i, &req->data);
1428+ }
1429+ }
1430+ } else {
1431+ uint64_t tmp;
1432+
1433+ if (req->dir == IOREQ_READ) {
1434+ for (i = 0; i < req->count; i++) {
1435+ read_phys_req_item(req->addr, req, i, &tmp);
1436+ write_phys_req_item(req->data, req, i, &tmp);
1437+ }
1438+ } else if (req->dir == IOREQ_WRITE) {
1439+ for (i = 0; i < req->count; i++) {
1440+ read_phys_req_item(req->data, req, i, &tmp);
1441+ write_phys_req_item(req->addr, req, i, &tmp);
1442+ }
1443+ }
1444+ }
1445+}
1446+
1447+static void cpu_ioreq_config(XenIOState *state, ioreq_t *req)
1448+{
1449+ uint32_t sbdf = req->addr >> 32;
1450+ uint32_t reg = req->addr;
1451+ XenPciDevice *xendev;
1452+
1453+ if (req->size != sizeof(uint8_t) && req->size != sizeof(uint16_t) &&
1454+ req->size != sizeof(uint32_t)) {
1455+ hw_error("PCI config access: bad size (%u)", req->size);
1456+ }
1457+
1458+ if (req->count != 1) {
1459+ hw_error("PCI config access: bad count (%u)", req->count);
1460+ }
1461+
1462+ QLIST_FOREACH(xendev, &state->dev_list, entry) {
1463+ if (xendev->sbdf != sbdf) {
1464+ continue;
1465+ }
1466+
1467+ if (!req->data_is_ptr) {
1468+ if (req->dir == IOREQ_READ) {
1469+ req->data = pci_host_config_read_common(
1470+ xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
1471+ req->size);
1472+ trace_cpu_ioreq_config_read(req, xendev->sbdf, reg,
1473+ req->size, req->data);
1474+ } else if (req->dir == IOREQ_WRITE) {
1475+ trace_cpu_ioreq_config_write(req, xendev->sbdf, reg,
1476+ req->size, req->data);
1477+ pci_host_config_write_common(
1478+ xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
1479+ req->data, req->size);
1480+ }
1481+ } else {
1482+ uint32_t tmp;
1483+
1484+ if (req->dir == IOREQ_READ) {
1485+ tmp = pci_host_config_read_common(
1486+ xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
1487+ req->size);
1488+ trace_cpu_ioreq_config_read(req, xendev->sbdf, reg,
1489+ req->size, tmp);
1490+ write_phys_req_item(req->data, req, 0, &tmp);
1491+ } else if (req->dir == IOREQ_WRITE) {
1492+ read_phys_req_item(req->data, req, 0, &tmp);
1493+ trace_cpu_ioreq_config_write(req, xendev->sbdf, reg,
1494+ req->size, tmp);
1495+ pci_host_config_write_common(
1496+ xendev->pci_dev, reg, PCI_CONFIG_SPACE_SIZE,
1497+ tmp, req->size);
1498+ }
1499+ }
1500+ }
1501+}
1502+
1503+static void handle_ioreq(XenIOState *state, ioreq_t *req)
1504+{
1505+ trace_handle_ioreq(req, req->type, req->dir, req->df, req->data_is_ptr,
1506+ req->addr, req->data, req->count, req->size);
1507+
1508+ if (!req->data_is_ptr && (req->dir == IOREQ_WRITE) &&
1509+ (req->size < sizeof (target_ulong))) {
1510+ req->data &= ((target_ulong) 1 << (8 * req->size)) - 1;
1511+ }
1512+
1513+ if (req->dir == IOREQ_WRITE)
1514+ trace_handle_ioreq_write(req, req->type, req->df, req->data_is_ptr,
1515+ req->addr, req->data, req->count, req->size);
1516+
1517+ switch (req->type) {
1518+ case IOREQ_TYPE_PIO:
1519+ cpu_ioreq_pio(req);
1520+ break;
1521+ case IOREQ_TYPE_COPY:
1522+ cpu_ioreq_move(req);
1523+ break;
1524+ case IOREQ_TYPE_TIMEOFFSET:
1525+ break;
1526+ case IOREQ_TYPE_INVALIDATE:
1527+ xen_invalidate_map_cache();
1528+ break;
1529+ case IOREQ_TYPE_PCI_CONFIG:
1530+ cpu_ioreq_config(state, req);
1531+ break;
1532+ default:
1533+ arch_handle_ioreq(state, req);
1534+ }
1535+ if (req->dir == IOREQ_READ) {
1536+ trace_handle_ioreq_read(req, req->type, req->df, req->data_is_ptr,
1537+ req->addr, req->data, req->count, req->size);
1538+ }
1539+}
1540+
1541+static bool handle_buffered_iopage(XenIOState *state)
1542+{
1543+ buffered_iopage_t *buf_page = state->buffered_io_page;
1544+ buf_ioreq_t *buf_req = NULL;
1545+ bool handled_ioreq = false;
1546+ ioreq_t req;
1547+ int qw;
1548+
1549+ if (!buf_page) {
1550+ return 0;
1551+ }
1552+
1553+ memset(&req, 0x00, sizeof(req));
1554+ req.state = STATE_IOREQ_READY;
1555+ req.count = 1;
1556+ req.dir = IOREQ_WRITE;
1557+
1558+ for (;;) {
1559+ uint32_t rdptr = buf_page->read_pointer, wrptr;
1560+
1561+ xen_rmb();
1562+ wrptr = buf_page->write_pointer;
1563+ xen_rmb();
1564+ if (rdptr != buf_page->read_pointer) {
1565+ continue;
1566+ }
1567+ if (rdptr == wrptr) {
1568+ break;
1569+ }
1570+ buf_req = &buf_page->buf_ioreq[rdptr % IOREQ_BUFFER_SLOT_NUM];
1571+ req.size = 1U << buf_req->size;
1572+ req.addr = buf_req->addr;
1573+ req.data = buf_req->data;
1574+ req.type = buf_req->type;
1575+ xen_rmb();
1576+ qw = (req.size == 8);
1577+ if (qw) {
1578+ if (rdptr + 1 == wrptr) {
1579+ hw_error("Incomplete quad word buffered ioreq");
1580+ }
1581+ buf_req = &buf_page->buf_ioreq[(rdptr + 1) %
1582+ IOREQ_BUFFER_SLOT_NUM];
1583+ req.data |= ((uint64_t)buf_req->data) << 32;
1584+ xen_rmb();
1585+ }
1586+
1587+ handle_ioreq(state, &req);
1588+
1589+ /* Only req.data may get updated by handle_ioreq(), albeit even that
1590+ * should not happen as such data would never make it to the guest (we
1591+ * can only usefully see writes here after all).
1592+ */
1593+ assert(req.state == STATE_IOREQ_READY);
1594+ assert(req.count == 1);
1595+ assert(req.dir == IOREQ_WRITE);
1596+ assert(!req.data_is_ptr);
1597+
1598+ qatomic_add(&buf_page->read_pointer, qw + 1);
1599+ }
1600+
1601+ return handled_ioreq;
1602+}
1603+
1604+static void handle_buffered_io(void *opaque)
1605+{
1606+ XenIOState *state = opaque;
1607+
1608+ if (handle_buffered_iopage(state)) {
1609+ timer_mod(state->buffered_io_timer,
1610+ BUFFER_IO_MAX_DELAY + qemu_clock_get_ms(QEMU_CLOCK_REALTIME));
1611+ } else {
1612+ timer_del(state->buffered_io_timer);
1613+ xenevtchn_unmask(state->xce_handle, state->bufioreq_local_port);
1614+ }
1615+}
1616+
1617+static void cpu_handle_ioreq(void *opaque)
1618+{
1619+ XenIOState *state = opaque;
1620+ ioreq_t *req = cpu_get_ioreq(state);
1621+
1622+ handle_buffered_iopage(state);
1623+ if (req) {
1624+ ioreq_t copy = *req;
1625+
1626+ xen_rmb();
1627+ handle_ioreq(state, &copy);
1628+ req->data = copy.data;
1629+
1630+ if (req->state != STATE_IOREQ_INPROCESS) {
1631+ fprintf(stderr, "Badness in I/O request ... not in service?!: "
1632+ "%x, ptr: %x, port: %"PRIx64", "
1633+ "data: %"PRIx64", count: %u, size: %u, type: %u\n",
1634+ req->state, req->data_is_ptr, req->addr,
1635+ req->data, req->count, req->size, req->type);
1636+ destroy_hvm_domain(false);
1637+ return;
1638+ }
1639+
1640+ xen_wmb(); /* Update ioreq contents /then/ update state. */
1641+
1642+ /*
1643+ * We do this before we send the response so that the tools
1644+ * have the opportunity to pick up on the reset before the
1645+ * guest resumes and does a hlt with interrupts disabled which
1646+ * causes Xen to powerdown the domain.
1647+ */
1648+ if (runstate_is_running()) {
1649+ ShutdownCause request;
1650+
1651+ if (qemu_shutdown_requested_get()) {
1652+ destroy_hvm_domain(false);
1653+ }
1654+ request = qemu_reset_requested_get();
1655+ if (request) {
1656+ qemu_system_reset(request);
1657+ destroy_hvm_domain(true);
1658+ }
1659+ }
1660+
1661+ req->state = STATE_IORESP_READY;
1662+ xenevtchn_notify(state->xce_handle,
1663+ state->ioreq_local_port[state->send_vcpu]);
1664+ }
1665+}
1666+
1667+static void xen_main_loop_prepare(XenIOState *state)
1668+{
1669+ int evtchn_fd = -1;
1670+
1671+ if (state->xce_handle != NULL) {
1672+ evtchn_fd = xenevtchn_fd(state->xce_handle);
1673+ }
1674+
1675+ state->buffered_io_timer = timer_new_ms(QEMU_CLOCK_REALTIME, handle_buffered_io,
1676+ state);
1677+
1678+ if (evtchn_fd != -1) {
1679+ CPUState *cpu_state;
1680+
1681+ DPRINTF("%s: Init cpu_by_vcpu_id\n", __func__);
1682+ CPU_FOREACH(cpu_state) {
1683+ DPRINTF("%s: cpu_by_vcpu_id[%d]=%p\n",
1684+ __func__, cpu_state->cpu_index, cpu_state);
1685+ state->cpu_by_vcpu_id[cpu_state->cpu_index] = cpu_state;
1686+ }
1687+ qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, state);
1688+ }
1689+}
1690+
1691+
1692+void xen_hvm_change_state_handler(void *opaque, bool running,
1693+ RunState rstate)
1694+{
1695+ XenIOState *state = opaque;
1696+
1697+ if (running) {
1698+ xen_main_loop_prepare(state);
1699+ }
1700+
1701+ xen_set_ioreq_server_state(xen_domid,
1702+ state->ioservid,
1703+ (rstate == RUN_STATE_RUNNING));
1704+}
1705+
1706+void xen_exit_notifier(Notifier *n, void *data)
1707+{
1708+ XenIOState *state = container_of(n, XenIOState, exit);
1709+
1710+ xen_destroy_ioreq_server(xen_domid, state->ioservid);
1711+ if (state->fres != NULL) {
1712+ xenforeignmemory_unmap_resource(xen_fmem, state->fres);
1713+ }
1714+
1715+ xenevtchn_close(state->xce_handle);
1716+ xs_daemon_close(state->xenstore);
1717+}
1718+
1719+static int xen_map_ioreq_server(XenIOState *state)
1720+{
1721+ void *addr = NULL;
1722+ xen_pfn_t ioreq_pfn;
1723+ xen_pfn_t bufioreq_pfn;
1724+ evtchn_port_t bufioreq_evtchn;
1725+ int rc;
1726+
1727+ /*
1728+ * Attempt to map using the resource API and fall back to normal
1729+ * foreign mapping if this is not supported.
1730+ */
1731+ QEMU_BUILD_BUG_ON(XENMEM_resource_ioreq_server_frame_bufioreq != 0);
1732+ QEMU_BUILD_BUG_ON(XENMEM_resource_ioreq_server_frame_ioreq(0) != 1);
1733+ state->fres = xenforeignmemory_map_resource(xen_fmem, xen_domid,
1734+ XENMEM_resource_ioreq_server,
1735+ state->ioservid, 0, 2,
1736+ &addr,
1737+ PROT_READ | PROT_WRITE, 0);
1738+ if (state->fres != NULL) {
1739+ trace_xen_map_resource_ioreq(state->ioservid, addr);
1740+ state->buffered_io_page = addr;
1741+ state->shared_page = addr + TARGET_PAGE_SIZE;
1742+ } else if (errno != EOPNOTSUPP) {
1743+ error_report("failed to map ioreq server resources: error %d handle=%p",
1744+ errno, xen_xc);
1745+ return -1;
1746+ }
1747+
1748+ rc = xen_get_ioreq_server_info(xen_domid, state->ioservid,
1749+ (state->shared_page == NULL) ?
1750+ &ioreq_pfn : NULL,
1751+ (state->buffered_io_page == NULL) ?
1752+ &bufioreq_pfn : NULL,
1753+ &bufioreq_evtchn);
1754+ if (rc < 0) {
1755+ error_report("failed to get ioreq server info: error %d handle=%p",
1756+ errno, xen_xc);
1757+ return rc;
1758+ }
1759+
1760+ if (state->shared_page == NULL) {
1761+ DPRINTF("shared page at pfn %lx\n", ioreq_pfn);
1762+
1763+ state->shared_page = xenforeignmemory_map(xen_fmem, xen_domid,
1764+ PROT_READ | PROT_WRITE,
1765+ 1, &ioreq_pfn, NULL);
1766+ if (state->shared_page == NULL) {
1767+ error_report("map shared IO page returned error %d handle=%p",
1768+ errno, xen_xc);
1769+ }
1770+ }
1771+
1772+ if (state->buffered_io_page == NULL) {
1773+ DPRINTF("buffered io page at pfn %lx\n", bufioreq_pfn);
1774+
1775+ state->buffered_io_page = xenforeignmemory_map(xen_fmem, xen_domid,
1776+ PROT_READ | PROT_WRITE,
1777+ 1, &bufioreq_pfn,
1778+ NULL);
1779+ if (state->buffered_io_page == NULL) {
1780+ error_report("map buffered IO page returned error %d", errno);
1781+ return -1;
1782+ }
1783+ }
1784+
1785+ if (state->shared_page == NULL || state->buffered_io_page == NULL) {
1786+ return -1;
1787+ }
1788+
1789+ DPRINTF("buffered io evtchn is %x\n", bufioreq_evtchn);
1790+
1791+ state->bufioreq_remote_port = bufioreq_evtchn;
1792+
1793+ return 0;
1794+}
1795+
1796+void xen_shutdown_fatal_error(const char *fmt, ...)
1797+{
1798+ va_list ap;
1799+
1800+ va_start(ap, fmt);
1801+ vfprintf(stderr, fmt, ap);
1802+ va_end(ap);
1803+ fprintf(stderr, "Will destroy the domain.\n");
1804+ /* destroy the domain */
1805+ qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_ERROR);
1806+}
1807+
1808+void destroy_hvm_domain(bool reboot)
1809+{
1810+ xc_interface *xc_handle;
1811+ int sts;
1812+ int rc;
1813+
1814+ unsigned int reason = reboot ? SHUTDOWN_reboot : SHUTDOWN_poweroff;
1815+
1816+ if (xen_dmod) {
1817+ rc = xendevicemodel_shutdown(xen_dmod, xen_domid, reason);
1818+ if (!rc) {
1819+ return;
1820+ }
1821+ if (errno != ENOTTY /* old Xen */) {
1822+ perror("xendevicemodel_shutdown failed");
1823+ }
1824+ /* well, try the old thing then */
1825+ }
1826+
1827+ xc_handle = xc_interface_open(0, 0, 0);
1828+ if (xc_handle == NULL) {
1829+ fprintf(stderr, "Cannot acquire xenctrl handle\n");
1830+ } else {
1831+ sts = xc_domain_shutdown(xc_handle, xen_domid, reason);
1832+ if (sts != 0) {
1833+ fprintf(stderr, "xc_domain_shutdown failed to issue %s, "
1834+ "sts %d, %s\n", reboot ? "reboot" : "poweroff",
1835+ sts, strerror(errno));
1836+ } else {
1837+ fprintf(stderr, "Issued domain %d %s\n", xen_domid,
1838+ reboot ? "reboot" : "poweroff");
1839+ }
1840+ xc_interface_close(xc_handle);
1841+ }
1842+}
1843+
1844+void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr,
1845+ Error **errp)
1846+{
1847+ unsigned long nr_pfn;
1848+ xen_pfn_t *pfn_list;
1849+ int i;
1850+
1851+ if (runstate_check(RUN_STATE_INMIGRATE)) {
1852+ /* RAM already populated in Xen */
1853+ fprintf(stderr, "%s: do not alloc "RAM_ADDR_FMT
1854+ " bytes of ram at "RAM_ADDR_FMT" when runstate is INMIGRATE\n",
1855+ __func__, size, ram_addr);
1856+ return;
1857+ }
1858+
1859+ if (mr == &ram_memory) {
1860+ return;
1861+ }
1862+
1863+ trace_xen_ram_alloc(ram_addr, size);
1864+
1865+ nr_pfn = size >> TARGET_PAGE_BITS;
1866+ pfn_list = g_malloc(sizeof (*pfn_list) * nr_pfn);
1867+
1868+ for (i = 0; i < nr_pfn; i++) {
1869+ pfn_list[i] = (ram_addr >> TARGET_PAGE_BITS) + i;
1870+ }
1871+
1872+ if (xc_domain_populate_physmap_exact(xen_xc, xen_domid, nr_pfn, 0, 0, pfn_list)) {
1873+ error_setg(errp, "xen: failed to populate ram at " RAM_ADDR_FMT,
1874+ ram_addr);
1875+ }
1876+
1877+ g_free(pfn_list);
1878+}
1879+
1880+void xen_register_ioreq(XenIOState *state, unsigned int max_cpus,
1881+ MemoryListener xen_memory_listener)
1882+{
1883+ int i, rc;
1884+
1885+ state->xce_handle = xenevtchn_open(NULL, 0);
1886+ if (state->xce_handle == NULL) {
1887+ perror("xen: event channel open");
1888+ goto err;
1889+ }
1890+
1891+ state->xenstore = xs_daemon_open();
1892+ if (state->xenstore == NULL) {
1893+ perror("xen: xenstore open");
1894+ goto err;
1895+ }
1896+
1897+ xen_create_ioreq_server(xen_domid, &state->ioservid);
1898+
1899+ state->exit.notify = xen_exit_notifier;
1900+ qemu_add_exit_notifier(&state->exit);
1901+
1902+ /*
1903+ * Register wake-up support in QMP query-current-machine API
1904+ */
1905+ qemu_register_wakeup_support();
1906+
1907+ rc = xen_map_ioreq_server(state);
1908+ if (rc < 0) {
1909+ goto err;
1910+ }
1911+
1912+ /* Note: cpus is empty at this point in init */
1913+ state->cpu_by_vcpu_id = g_new0(CPUState *, max_cpus);
1914+
1915+ rc = xen_set_ioreq_server_state(xen_domid, state->ioservid, true);
1916+ if (rc < 0) {
1917+ error_report("failed to enable ioreq server info: error %d handle=%p",
1918+ errno, xen_xc);
1919+ goto err;
1920+ }
1921+
1922+ state->ioreq_local_port = g_new0(evtchn_port_t, max_cpus);
1923+
1924+ /* FIXME: how about if we overflow the page here? */
1925+ for (i = 0; i < max_cpus; i++) {
1926+ rc = xenevtchn_bind_interdomain(state->xce_handle, xen_domid,
1927+ xen_vcpu_eport(state->shared_page, i));
1928+ if (rc == -1) {
1929+ error_report("shared evtchn %d bind error %d", i, errno);
1930+ goto err;
1931+ }
1932+ state->ioreq_local_port[i] = rc;
1933+ }
1934+
1935+ rc = xenevtchn_bind_interdomain(state->xce_handle, xen_domid,
1936+ state->bufioreq_remote_port);
1937+ if (rc == -1) {
1938+ error_report("buffered evtchn bind error %d", errno);
1939+ goto err;
1940+ }
1941+ state->bufioreq_local_port = rc;
1942+
1943+ /* Init RAM management */
1944+#ifdef XEN_COMPAT_PHYSMAP
1945+ xen_map_cache_init(xen_phys_offset_to_gaddr, state);
1946+#else
1947+ xen_map_cache_init(NULL, state);
1948+#endif
1949+
1950+ qemu_add_vm_change_state_handler(xen_hvm_change_state_handler, state);
1951+
1952+ state->memory_listener = xen_memory_listener;
1953+ memory_listener_register(&state->memory_listener, &address_space_memory);
1954+
1955+ state->io_listener = xen_io_listener;
1956+ memory_listener_register(&state->io_listener, &address_space_io);
1957+
1958+ state->device_listener = xen_device_listener;
1959+ QLIST_INIT(&state->dev_list);
1960+ device_listener_register(&state->device_listener);
1961+
1962+ xen_bus_init();
1963+
1964+ /* Initialize backend core & drivers */
1965+ if (xen_be_init() != 0) {
1966+ error_report("xen backend core setup failed");
1967+ goto err;
1968+ }
1969+ xen_be_register_common();
1970+
1971+ return;
1972+err:
1973+ error_report("xen hardware virtual machine initialisation failed");
1974+ exit(1);
1975+}
1976diff --git a/include/hw/i386/xen_arch_hvm.h b/include/hw/i386/xen_arch_hvm.h
1977index 1b2c71ba4f..1000f8f543 100644
1978--- a/include/hw/i386/xen_arch_hvm.h
1979+++ b/include/hw/i386/xen_arch_hvm.h
1980@@ -2,6 +2,7 @@
1981 #define HW_XEN_ARCH_I386_HVM_H
1982
1983 #include <xen/hvm/ioreq.h>
1984+#include "hw/xen/xen-hvm-common.h"
1985
1986 void arch_handle_ioreq(XenIOState *state, ioreq_t *req);
1987 void arch_xen_set_memory(XenIOState *state,
1988diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
1989new file mode 100644
1990index 0000000000..2979f84ee2
1991--- /dev/null
1992+++ b/include/hw/xen/xen-hvm-common.h
1993@@ -0,0 +1,98 @@
1994+#ifndef HW_XEN_HVM_COMMON_H
1995+#define HW_XEN_HVM_COMMON_H
1996+
1997+#include "qemu/osdep.h"
1998+#include "qemu/units.h"
1999+
2000+#include "cpu.h"
2001+#include "hw/pci/pci.h"
2002+#include "hw/hw.h"
2003+#include "hw/xen/xen_common.h"
2004+#include "sysemu/runstate.h"
2005+#include "sysemu/sysemu.h"
2006+#include "sysemu/xen.h"
2007+#include "sysemu/xen-mapcache.h"
2008+
2009+#include <xen/hvm/ioreq.h>
2010+
2011+extern MemoryRegion ram_memory;
2012+extern MemoryListener xen_io_listener;
2013+extern DeviceListener xen_device_listener;
2014+
2015+//#define DEBUG_XEN_HVM
2016+
2017+#ifdef DEBUG_XEN_HVM
2018+#define DPRINTF(fmt, ...) \
2019+ do { fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); } while (0)
2020+#else
2021+#define DPRINTF(fmt, ...) \
2022+ do { } while (0)
2023+#endif
2024+
2025+static inline uint32_t xen_vcpu_eport(shared_iopage_t *shared_page, int i)
2026+{
2027+ return shared_page->vcpu_ioreq[i].vp_eport;
2028+}
2029+static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu)
2030+{
2031+ return &shared_page->vcpu_ioreq[vcpu];
2032+}
2033+
2034+#define BUFFER_IO_MAX_DELAY 100
2035+
2036+typedef struct XenPhysmap {
2037+ hwaddr start_addr;
2038+ ram_addr_t size;
2039+ const char *name;
2040+ hwaddr phys_offset;
2041+
2042+ QLIST_ENTRY(XenPhysmap) list;
2043+} XenPhysmap;
2044+
2045+typedef struct XenPciDevice {
2046+ PCIDevice *pci_dev;
2047+ uint32_t sbdf;
2048+ QLIST_ENTRY(XenPciDevice) entry;
2049+} XenPciDevice;
2050+
2051+typedef struct XenIOState {
2052+ ioservid_t ioservid;
2053+ shared_iopage_t *shared_page;
2054+ buffered_iopage_t *buffered_io_page;
2055+ xenforeignmemory_resource_handle *fres;
2056+ QEMUTimer *buffered_io_timer;
2057+ CPUState **cpu_by_vcpu_id;
2058+ /* the evtchn port for polling the notification, */
2059+ evtchn_port_t *ioreq_local_port;
2060+ /* evtchn remote and local ports for buffered io */
2061+ evtchn_port_t bufioreq_remote_port;
2062+ evtchn_port_t bufioreq_local_port;
2063+ /* the evtchn fd for polling */
2064+ xenevtchn_handle *xce_handle;
2065+ /* which vcpu we are serving */
2066+ int send_vcpu;
2067+
2068+ struct xs_handle *xenstore;
2069+ MemoryListener memory_listener;
2070+ MemoryListener io_listener;
2071+ QLIST_HEAD(, XenPciDevice) dev_list;
2072+ DeviceListener device_listener;
2073+
2074+ Notifier exit;
2075+} XenIOState;
2076+
2077+void xen_exit_notifier(Notifier *n, void *data);
2078+
2079+void xen_region_add(MemoryListener *listener, MemoryRegionSection *section);
2080+void xen_region_del(MemoryListener *listener, MemoryRegionSection *section);
2081+void xen_io_add(MemoryListener *listener, MemoryRegionSection *section);
2082+void xen_io_del(MemoryListener *listener, MemoryRegionSection *section);
2083+void xen_device_realize(DeviceListener *listener, DeviceState *dev);
2084+void xen_device_unrealize(DeviceListener *listener, DeviceState *dev);
2085+
2086+void xen_hvm_change_state_handler(void *opaque, bool running, RunState rstate);
2087+void xen_register_ioreq(XenIOState *state, unsigned int max_cpus,
2088+ MemoryListener xen_memory_listener);
2089+
2090+void cpu_ioreq_pio(ioreq_t *req);
2091+#endif /* HW_XEN_HVM_COMMON_H */
2092--
20932.17.1
2094
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-mapcache-Fix-build-on-Arm.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-mapcache-Fix-build-on-Arm.patch
new file mode 100644
index 00000000..7ff202ff
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-mapcache-Fix-build-on-Arm.patch
@@ -0,0 +1,37 @@
1From 2aca3ff63a5d5897cd32e0030569623f0c454f2c Mon Sep 17 00:00:00 2001
2From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
3Date: Mon, 19 Sep 2022 21:59:55 +0300
4Subject: [PATCH 7/8] xen-mapcache: Fix build on Arm
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9../hw/xen/xen-mapcache.c: In function ‘xen_map_grant_dyn’:
10../hw/xen/xen-mapcache.c:668:9: error: ‘refs’ may be used uninitialized
11 in this function [-Werror=maybe-uninitialized]
12 668 | g_free(refs);
13 | ^~~~~~~~~~~~
14cc1: all warnings being treated as errors
15
16Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
17Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
18---
19 hw/xen/xen-mapcache.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
23index f81b75d216..6544e331e0 100644
24--- a/hw/xen/xen-mapcache.c
25+++ b/hw/xen/xen-mapcache.c
26@@ -620,7 +620,7 @@ static void *xen_map_grant_dyn(MemoryRegion **mr, hwaddr addr, hwaddr *plen,
27 unsigned int i;
28 unsigned int nrefs = (page_off + *plen + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
29 uint32_t ref = (addr - XEN_GRANT_ADDR_OFF) >> XC_PAGE_SHIFT;
30- uint32_t *refs;
31+ uint32_t *refs = NULL;
32 unsigned int prot = PROT_READ;
33 struct XENMappedGrantRegion *mgr = NULL;
34
35--
362.25.1
37
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-skip-ioreq-creation-on-ioreq-registration-failur.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-skip-ioreq-creation-on-ioreq-registration-failur.patch
new file mode 100644
index 00000000..83a18c08
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0007-xen-skip-ioreq-creation-on-ioreq-registration-failur.patch
@@ -0,0 +1,42 @@
1From fa475ec44fc78ff246e6536c8b9d408abadbb4a4 Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Fri, 1 Jul 2022 18:50:59 -0700
4Subject: [PATCH 07/16] xen: skip ioreq creation on ioreq registration failure
5
6On ARM it is possible to have a functioning xenpv machine with only the
7PV backends and no IOREQ server. If the IOREQ server creation fails
8continue to the PV backends initialization.
9
10Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
11---
12 hw/xen/xen-hvm-common.c | 7 ++++++-
13 1 file changed, 6 insertions(+), 1 deletion(-)
14
15diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
16index 67f76f6010..7e7d23397f 100644
17--- a/hw/xen/xen-hvm-common.c
18+++ b/hw/xen/xen-hvm-common.c
19@@ -780,7 +780,11 @@ void xen_register_ioreq(XenIOState *state, unsigned int max_cpus,
20 goto err;
21 }
22
23- xen_create_ioreq_server(xen_domid, &state->ioservid);
24+ rc = xen_create_ioreq_server(xen_domid, &state->ioservid);
25+ if (rc) {
26+ DPRINTF("xen: failed to create ioreq server\n");
27+ goto no_ioreq;
28+ }
29
30 state->exit.notify = xen_exit_notifier;
31 qemu_add_exit_notifier(&state->exit);
32@@ -845,6 +849,7 @@ void xen_register_ioreq(XenIOState *state, unsigned int max_cpus,
33 QLIST_INIT(&state->dev_list);
34 device_listener_register(&state->device_listener);
35
36+no_ioreq:
37 xen_bus_init();
38
39 /* Initialize backend core & drivers */
40--
412.17.1
42
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-accel-xen-xen-all-export-xenstore_record_dm_state.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-accel-xen-xen-all-export-xenstore_record_dm_state.patch
new file mode 100644
index 00000000..881076fb
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-accel-xen-xen-all-export-xenstore_record_dm_state.patch
@@ -0,0 +1,48 @@
1From 13443fe86bb100849c55b41873f48e0b121c7bc0 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 1 Jul 2022 17:28:14 -0700
4Subject: [PATCH 08/16] accel/xen/xen-all: export xenstore_record_dm_state
5
6Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
7Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
8Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
9---
10 accel/xen/xen-all.c | 2 +-
11 include/hw/xen/xen.h | 2 ++
12 2 files changed, 3 insertions(+), 1 deletion(-)
13
14diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c
15index 69aa7d018b..276625b78b 100644
16--- a/accel/xen/xen-all.c
17+++ b/accel/xen/xen-all.c
18@@ -100,7 +100,7 @@ void xenstore_store_pv_console_info(int i, Chardev *chr)
19 }
20
21
22-static void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
23+void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
24 {
25 char path[50];
26
27diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
28index afdf9c436a..31e9538a5c 100644
29--- a/include/hw/xen/xen.h
30+++ b/include/hw/xen/xen.h
31@@ -9,6 +9,7 @@
32 */
33
34 #include "exec/cpu-common.h"
35+#include <xenstore.h>
36
37 /* xen-machine.c */
38 enum xen_mode {
39@@ -31,5 +32,6 @@ qemu_irq *xen_interrupt_controller_init(void);
40 void xenstore_store_pv_console_info(int i, Chardev *chr);
41
42 void xen_register_framebuffer(struct MemoryRegion *mr);
43+void xenstore_record_dm_state(struct xs_handle *xs, const char *state);
44
45 #endif /* QEMU_HW_XEN_H */
46--
472.17.1
48
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-hw-arm-Add-grant-mapping.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-hw-arm-Add-grant-mapping.patch
new file mode 100644
index 00000000..3b83d229
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0008-hw-arm-Add-grant-mapping.patch
@@ -0,0 +1,39 @@
1From b5e5f60de37bb6f71bc34ecb989c31ef5c834272 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Tue, 31 Jan 2023 21:46:43 +0000
4Subject: [PATCH 8/8] hw: arm: Add grant mapping.
5
6Add support for grant mapping and change qemu machine name to xenpvh.
7
8Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
9Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
10---
11 hw/arm/xen_arm.c | 5 ++++-
12 1 file changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
15index 4ac425a3c5..392bed7367 100644
16--- a/hw/arm/xen_arm.c
17+++ b/hw/arm/xen_arm.c
18@@ -35,7 +35,7 @@
19 #include "sysemu/tpm.h"
20 #include "hw/xen/arch_hvm.h"
21
22-#define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpv")
23+#define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh")
24 OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM)
25
26 static MemoryListener xen_memory_listener = {
27@@ -115,6 +115,9 @@ static void xen_init_ram(MachineState *machine)
28 DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n",
29 GUEST_RAM1_BASE, ram_size[1]);
30 }
31+
32+ DPRINTF("init grant ram mapping for XEN\n");
33+ ram_grants = *xen_init_grant_ram();
34 }
35
36 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
37--
382.25.1
39
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0009-xen-hvm-enable-xen-hvm-common-build-for-ARM.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0009-xen-hvm-enable-xen-hvm-common-build-for-ARM.patch
new file mode 100644
index 00000000..1b1aea76
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0009-xen-hvm-enable-xen-hvm-common-build-for-ARM.patch
@@ -0,0 +1,43 @@
1From 2e6a9f464fd1f247c41ce3666ff3e3f66920d0b7 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 1 Jul 2022 17:28:15 -0700
4Subject: [PATCH 09/16] xen-hvm: enable xen-hvm-common build for ARM
5
6Add CONFIG_XEN for aarch64 device and change xen-hvm-common.c to
7support build for ARM targets.
8
9Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
10Acked-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
11Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
12---
13 hw/arm/meson.build | 1 +
14 meson.build | 2 +-
15 2 files changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/hw/arm/meson.build b/hw/arm/meson.build
18index 92f9f6e000..3aac913bfd 100644
19--- a/hw/arm/meson.build
20+++ b/hw/arm/meson.build
21@@ -62,5 +62,6 @@ arm_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.
22 arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c', 'smmuv3.c'))
23 arm_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c'))
24 arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c'))
25+arm_ss.add_all(xen_ss)
26
27 hw_arch += {'arm': arm_ss}
28diff --git a/meson.build b/meson.build
29index 5c6b5a1c75..b94f0cd76e 100644
30--- a/meson.build
31+++ b/meson.build
32@@ -125,7 +125,7 @@ endif
33 if cpu in ['x86', 'x86_64', 'arm', 'aarch64']
34 # i386 emulator provides xenpv machine type for multiple architectures
35 accelerator_targets += {
36- 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu'],
37+ 'CONFIG_XEN': ['i386-softmmu', 'x86_64-softmmu', 'aarch64-softmmu'],
38 }
39 endif
40 if cpu in ['x86', 'x86_64']
41--
422.17.1
43
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0010-hw-arm-introduce-xenpv-machine.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0010-hw-arm-introduce-xenpv-machine.patch
new file mode 100644
index 00000000..fc979b52
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0010-hw-arm-introduce-xenpv-machine.patch
@@ -0,0 +1,230 @@
1From 5618a18b1f12d567a8ef85240d55b841e18ef472 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 1 Jul 2022 17:28:16 -0700
4Subject: [PATCH 10/16] hw/arm: introduce xenpv machine
5
6Create a new machine xenpv which creates a IOREQ server to connect
7with Xen. It also creates a tpm-tis-device which connects to swtpm to
8support TPM functionalities.
9
10Xen IOREQ connection expect the TARGET_PAGE_SIZE to 4096, and the xenpv
11machine on ARM will have no CPU definitions. We need to define
12TARGET_PAGE_SIZE appropriately ourselves.
13
14Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
15Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
16Reviewed-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
17---
18 hw/arm/meson.build | 1 +
19 hw/arm/xen_arm.c | 156 ++++++++++++++++++++++++++++++++++
20 include/hw/arm/xen_arch_hvm.h | 12 +++
21 include/hw/xen/arch_hvm.h | 2 +
22 4 files changed, 171 insertions(+)
23 create mode 100644 hw/arm/xen_arm.c
24 create mode 100644 include/hw/arm/xen_arch_hvm.h
25
26diff --git a/hw/arm/meson.build b/hw/arm/meson.build
27index 3aac913bfd..0cae024374 100644
28--- a/hw/arm/meson.build
29+++ b/hw/arm/meson.build
30@@ -62,6 +62,7 @@ arm_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.
31 arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c', 'smmuv3.c'))
32 arm_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c'))
33 arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c'))
34+arm_ss.add(when: 'CONFIG_XEN', if_true: files('xen_arm.c'))
35 arm_ss.add_all(xen_ss)
36
37 hw_arch += {'arm': arm_ss}
38diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
39new file mode 100644
40index 0000000000..0922e3db84
41--- /dev/null
42+++ b/hw/arm/xen_arm.c
43@@ -0,0 +1,156 @@
44+/*
45+ * QEMU ARM Xen PV Machine
46+ *
47+ *
48+ * Permission is hereby granted, free of charge, to any person obtaining a copy
49+ * of this software and associated documentation files (the "Software"), to deal
50+ * in the Software without restriction, including without limitation the rights
51+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52+ * copies of the Software, and to permit persons to whom the Software is
53+ * furnished to do so, subject to the following conditions:
54+ *
55+ * The above copyright notice and this permission notice shall be included in
56+ * all copies or substantial portions of the Software.
57+ *
58+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
61+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64+ * THE SOFTWARE.
65+ */
66+
67+#include "qemu/osdep.h"
68+#include "qemu/error-report.h"
69+#include "qapi/qapi-commands-migration.h"
70+#include "hw/boards.h"
71+#include "hw/sysbus.h"
72+#include "sysemu/block-backend.h"
73+#include "sysemu/tpm_backend.h"
74+#include "sysemu/sysemu.h"
75+#include "hw/xen/xen-legacy-backend.h"
76+#include "hw/xen/xen-hvm-common.h"
77+#include "sysemu/tpm.h"
78+#include "hw/xen/arch_hvm.h"
79+
80+#define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpv")
81+OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM)
82+
83+static MemoryListener xen_memory_listener = {
84+ .region_add = xen_region_add,
85+ .region_del = xen_region_del,
86+ .log_start = NULL,
87+ .log_stop = NULL,
88+ .log_sync = NULL,
89+ .log_global_start = NULL,
90+ .log_global_stop = NULL,
91+ .priority = 10,
92+};
93+
94+struct XenArmState {
95+ /*< private >*/
96+ MachineState parent;
97+
98+ XenIOState *state;
99+};
100+
101+void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
102+{
103+ hw_error("Invalid ioreq type 0x%x\n", req->type);
104+
105+ return;
106+}
107+
108+void arch_xen_set_memory(XenIOState *state,MemoryRegionSection *section,
109+ bool add)
110+{
111+}
112+
113+void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length)
114+{
115+}
116+
117+void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
118+{
119+}
120+
121+static int xen_init_ioreq(XenIOState *state, unsigned int max_cpus)
122+{
123+ xen_dmod = xendevicemodel_open(0, 0);
124+ xen_xc = xc_interface_open(0, 0, 0);
125+
126+ if (xen_xc == NULL) {
127+ perror("xen: can't open xen interface\n");
128+ return -1;
129+ }
130+
131+ xen_fmem = xenforeignmemory_open(0, 0);
132+ if (xen_fmem == NULL) {
133+ perror("xen: can't open xen fmem interface\n");
134+ xc_interface_close(xen_xc);
135+ return -1;
136+ }
137+
138+ xen_register_ioreq(state, max_cpus, xen_memory_listener);
139+
140+ xenstore_record_dm_state(xenstore, "running");
141+
142+ return 0;
143+}
144+
145+
146+static void xen_arm_init(MachineState *machine)
147+{
148+ DeviceState *dev;
149+ SysBusDevice *busdev;
150+ Error *errp = NULL;
151+ XenArmState *xam = XEN_ARM(machine);
152+
153+ xam->state = g_new0(XenIOState, 1);
154+
155+ if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
156+ return;
157+ }
158+
159+ TPMBackend *be = qemu_find_tpm_be("tpm0");
160+ if (be == NULL) {
161+ DPRINTF("Couldn't fine the backend for tpm0\n");
162+ return;
163+ }
164+
165+ dev = qdev_new(TYPE_TPM_TIS_SYSBUS);
166+ object_property_set_link(OBJECT(dev), "tpmdev", OBJECT(be), &errp);
167+ object_property_set_str(OBJECT(dev), "tpmdev", be->id, &errp);
168+ busdev = SYS_BUS_DEVICE(dev);
169+ sysbus_realize_and_unref(busdev, &error_fatal);
170+ sysbus_mmio_map(busdev, 0, GUEST_TPM_BASE);
171+
172+ DPRINTF("Connected tpmdev at address 0x%lx\n", GUEST_TPM_BASE);
173+
174+ return;
175+}
176+
177+static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
178+{
179+
180+ MachineClass *mc = MACHINE_CLASS(oc);
181+ mc->desc = "Xen Para-virtualized PC";
182+ mc->init = xen_arm_init;
183+ mc->max_cpus = 1;
184+ machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
185+}
186+
187+static const TypeInfo xen_arm_machine_type = {
188+ .name = TYPE_XEN_ARM,
189+ .parent = TYPE_MACHINE,
190+ .class_init = xen_arm_machine_class_init,
191+ .instance_size = sizeof(XenArmState),
192+};
193+
194+static void xen_arm_machine_register_types(void)
195+{
196+ type_register_static(&xen_arm_machine_type);
197+}
198+
199+type_init(xen_arm_machine_register_types)
200diff --git a/include/hw/arm/xen_arch_hvm.h b/include/hw/arm/xen_arch_hvm.h
201new file mode 100644
202index 0000000000..f645dfec28
203--- /dev/null
204+++ b/include/hw/arm/xen_arch_hvm.h
205@@ -0,0 +1,12 @@
206+#ifndef HW_XEN_ARCH_ARM_HVM_H
207+#define HW_XEN_ARCH_ARM_HVM_H
208+
209+#include <xen/hvm/ioreq.h>
210+void arch_handle_ioreq(XenIOState *state, ioreq_t *req);
211+void arch_xen_set_memory(XenIOState *state,
212+ MemoryRegionSection *section,
213+ bool add);
214+
215+#undef TARGET_PAGE_SIZE
216+#define TARGET_PAGE_SIZE 4096
217+#endif
218diff --git a/include/hw/xen/arch_hvm.h b/include/hw/xen/arch_hvm.h
219index 26674648d8..c7c515220d 100644
220--- a/include/hw/xen/arch_hvm.h
221+++ b/include/hw/xen/arch_hvm.h
222@@ -1,3 +1,5 @@
223 #if defined(TARGET_I386) || defined(TARGET_X86_64)
224 #include "hw/i386/xen_arch_hvm.h"
225+#elif defined(TARGET_ARM) || defined(TARGET_ARM_64)
226+#include "hw/arm/xen_arch_hvm.h"
227 #endif
228--
2292.17.1
230
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0011-meson.build-do-not-set-have_xen_pci_passthrough-for-.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0011-meson.build-do-not-set-have_xen_pci_passthrough-for-.patch
new file mode 100644
index 00000000..dad3029f
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0011-meson.build-do-not-set-have_xen_pci_passthrough-for-.patch
@@ -0,0 +1,33 @@
1From f4ff3490639dea08fb70ec69d60fe73ef479073b Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Thu, 7 Jul 2022 14:03:41 -0700
4Subject: [PATCH 11/16] meson.build: do not set have_xen_pci_passthrough for
5 aarch64 targets
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10have_xen_pci_passthrough is only used for Xen x86 VMs.
11
12Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
13Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
14---
15 meson.build | 2 ++
16 1 file changed, 2 insertions(+)
17
18diff --git a/meson.build b/meson.build
19index b94f0cd76e..a4965251ab 100644
20--- a/meson.build
21+++ b/meson.build
22@@ -1469,6 +1469,8 @@ have_xen_pci_passthrough = get_option('xen_pci_passthrough') \
23 error_message: 'Xen PCI passthrough requested but Xen not enabled') \
24 .require(targetos == 'linux',
25 error_message: 'Xen PCI passthrough not available on this platform') \
26+ .require(cpu == 'x86' or cpu == 'x86_64',
27+ error_message: 'Xen PCI passthrough not available on this platform') \
28 .allowed()
29
30
31--
322.17.1
33
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0012-xen-arm-call-qemu_find_tpm_be-if-CONFIG_TPM.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0012-xen-arm-call-qemu_find_tpm_be-if-CONFIG_TPM.patch
new file mode 100644
index 00000000..f80a0873
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0012-xen-arm-call-qemu_find_tpm_be-if-CONFIG_TPM.patch
@@ -0,0 +1,72 @@
1From a26982a55fa5f47116b344ca5d411f00c3a2b422 Mon Sep 17 00:00:00 2001
2From: Stefano Stabellini <stefano.stabellini@amd.com>
3Date: Thu, 7 Jul 2022 14:35:33 -0700
4Subject: [PATCH 12/16] xen-arm: call qemu_find_tpm_be if CONFIG_TPM
5
6qemu_find_tpm_be is only availablen when CONFIG_TPM is enabled.
7So #ifdef the call to make sure the code builds correctly even when
8CONFIG_TPM is not enabled.
9
10Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
11---
12 hw/arm/xen_arm.c | 28 +++++++++++++++++-----------
13 1 file changed, 17 insertions(+), 11 deletions(-)
14
15diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
16index 0922e3db84..f248b5744a 100644
17--- a/hw/arm/xen_arm.c
18+++ b/hw/arm/xen_arm.c
19@@ -99,26 +99,18 @@ static int xen_init_ioreq(XenIOState *state, unsigned int max_cpus)
20 return 0;
21 }
22
23-
24-static void xen_arm_init(MachineState *machine)
25+static void xen_enable_tpm(void)
26 {
27+#ifdef CONFIG_TPM
28+ Error *errp = NULL;
29 DeviceState *dev;
30 SysBusDevice *busdev;
31- Error *errp = NULL;
32- XenArmState *xam = XEN_ARM(machine);
33-
34- xam->state = g_new0(XenIOState, 1);
35-
36- if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
37- return;
38- }
39
40 TPMBackend *be = qemu_find_tpm_be("tpm0");
41 if (be == NULL) {
42 DPRINTF("Couldn't fine the backend for tpm0\n");
43 return;
44 }
45-
46 dev = qdev_new(TYPE_TPM_TIS_SYSBUS);
47 object_property_set_link(OBJECT(dev), "tpmdev", OBJECT(be), &errp);
48 object_property_set_str(OBJECT(dev), "tpmdev", be->id, &errp);
49@@ -127,6 +119,20 @@ static void xen_arm_init(MachineState *machine)
50 sysbus_mmio_map(busdev, 0, GUEST_TPM_BASE);
51
52 DPRINTF("Connected tpmdev at address 0x%lx\n", GUEST_TPM_BASE);
53+#endif
54+}
55+
56+static void xen_arm_init(MachineState *machine)
57+{
58+ XenArmState *xam = XEN_ARM(machine);
59+
60+ xam->state = g_new0(XenIOState, 1);
61+
62+ if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
63+ return;
64+ }
65+
66+ xen_enable_tpm();
67
68 return;
69 }
70--
712.17.1
72
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0013-arm-xenpv-fix-TPM-address-print-warning.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0013-arm-xenpv-fix-TPM-address-print-warning.patch
new file mode 100644
index 00000000..1aa09efb
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0013-arm-xenpv-fix-TPM-address-print-warning.patch
@@ -0,0 +1,27 @@
1From c5b128668d9cd1e1cb4da80d5bc8aaebc6ff2e19 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Fri, 23 Dec 2022 00:06:29 +0000
4Subject: [PATCH 13/16] arm: xenpv: fix TPM address print warning
5
6Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
7Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
8---
9 hw/arm/xen_arm.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
13index f248b5744a..153cedfeb4 100644
14--- a/hw/arm/xen_arm.c
15+++ b/hw/arm/xen_arm.c
16@@ -118,7 +118,7 @@ static void xen_enable_tpm(void)
17 sysbus_realize_and_unref(busdev, &error_fatal);
18 sysbus_mmio_map(busdev, 0, GUEST_TPM_BASE);
19
20- DPRINTF("Connected tpmdev at address 0x%lx\n", GUEST_TPM_BASE);
21+ DPRINTF("Connected tpmdev at address 0x%llx\n", GUEST_TPM_BASE);
22 #endif
23 }
24
25--
262.17.1
27
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0014-xen_arm-Create-virtio-mmio-devices-during-initializa.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0014-xen_arm-Create-virtio-mmio-devices-during-initializa.patch
new file mode 100644
index 00000000..a6925acf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0014-xen_arm-Create-virtio-mmio-devices-during-initializa.patch
@@ -0,0 +1,83 @@
1From 3dc39d71c3652bea37dc955d5dbf8cd391d2aed0 Mon Sep 17 00:00:00 2001
2From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
3Date: Sat, 30 Jul 2022 17:51:19 +0300
4Subject: [PATCH 14/16] xen_arm: Create virtio-mmio devices during
5 initialization
6
7In order to use virtio backends we need to allocate virtio-mmio
8parameters (irq and base) and register corresponding buses.
9
10Use the constants defined in public header arch-arm.h to be
11aligned with the toolstack. So the number of current supported
12virtio-mmio devices is 10.
13
14For the interrupts triggering use already existing on Arm
15device-model hypercall.
16
17The toolstack should then insert the same amount of device nodes
18into guest device-tree.
19
20Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
21Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
22Reviewed-by: Stefano Stabellini <stefano.stabellini@amd.com>
23---
24 hw/arm/xen_arm.c | 29 +++++++++++++++++++++++++++++
25 1 file changed, 29 insertions(+)
26
27diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
28index 153cedfeb4..2012ee7aff 100644
29--- a/hw/arm/xen_arm.c
30+++ b/hw/arm/xen_arm.c
31@@ -25,6 +25,7 @@
32 #include "qemu/error-report.h"
33 #include "qapi/qapi-commands-migration.h"
34 #include "hw/boards.h"
35+#include "hw/irq.h"
36 #include "hw/sysbus.h"
37 #include "sysemu/block-backend.h"
38 #include "sysemu/tpm_backend.h"
39@@ -55,6 +56,32 @@ struct XenArmState {
40 XenIOState *state;
41 };
42
43+#define VIRTIO_MMIO_DEV_SIZE 0x200
44+
45+#define NR_VIRTIO_MMIO_DEVICES \
46+ (GUEST_VIRTIO_MMIO_SPI_LAST - GUEST_VIRTIO_MMIO_SPI_FIRST)
47+
48+static void xen_set_irq(void *opaque, int irq, int level)
49+{
50+ xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level);
51+}
52+
53+static void xen_create_virtio_mmio_devices(XenArmState *xam)
54+{
55+ int i;
56+
57+ for (i = 0; i < NR_VIRTIO_MMIO_DEVICES; i++) {
58+ hwaddr base = GUEST_VIRTIO_MMIO_BASE + i * VIRTIO_MMIO_DEV_SIZE;
59+ qemu_irq irq = qemu_allocate_irq(xen_set_irq, NULL,
60+ GUEST_VIRTIO_MMIO_SPI_FIRST + i);
61+
62+ sysbus_create_simple("virtio-mmio", base, irq);
63+
64+ DPRINTF("Created virtio-mmio device %d: irq %d base 0x%lx\n",
65+ i, GUEST_VIRTIO_MMIO_SPI_FIRST + i, base);
66+ }
67+}
68+
69 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
70 {
71 hw_error("Invalid ioreq type 0x%x\n", req->type);
72@@ -132,6 +159,8 @@ static void xen_arm_init(MachineState *machine)
73 return;
74 }
75
76+ xen_create_virtio_mmio_devices(xam);
77+
78 xen_enable_tpm();
79
80 return;
81--
822.17.1
83
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0015-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0015-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch
new file mode 100644
index 00000000..7c2b272d
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0015-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch
@@ -0,0 +1,105 @@
1From a284a53c5374e19ac37b884f2dd50293e7c8070e Mon Sep 17 00:00:00 2001
2From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
3Date: Sat, 30 Jul 2022 17:18:06 +0300
4Subject: [PATCH 15/16] xen_arm: Initialize RAM and add hi/low memory regions
5
6In order to use virtio backends we need to initialize RAM for the
7xen-mapcache (which is responsible for mapping guest memory using foreign
8mapping) to work. Calculate and add hi/low memory regions based on
9machine->ram_size.
10
11Use the constants defined in public header arch-arm.h to be aligned with the
12toolstack.
13
14The toolstack should then pass real ram_size using "-m" arg.
15If "-m" is not given, create a QEMU machine without IOREQ, TPM and VIRTIO to
16keep it usable for /etc/init.d/xencommons.
17
18Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
19Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
20Reviewed-by: Stefano Stabellini <stefano.stabellini@amd.com>
21---
22 hw/arm/xen_arm.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
23 1 file changed, 46 insertions(+)
24
25diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
26index 2012ee7aff..fde919df29 100644
27--- a/hw/arm/xen_arm.c
28+++ b/hw/arm/xen_arm.c
29@@ -56,6 +56,8 @@ struct XenArmState {
30 XenIOState *state;
31 };
32
33+static MemoryRegion ram_lo, ram_hi;
34+
35 #define VIRTIO_MMIO_DEV_SIZE 0x200
36
37 #define NR_VIRTIO_MMIO_DEVICES \
38@@ -82,6 +84,39 @@ static void xen_create_virtio_mmio_devices(XenArmState *xam)
39 }
40 }
41
42+static void xen_init_ram(MachineState *machine)
43+{
44+ MemoryRegion *sysmem = get_system_memory();
45+ ram_addr_t block_len, ram_size[GUEST_RAM_BANKS];
46+
47+ if (machine->ram_size <= GUEST_RAM0_SIZE) {
48+ ram_size[0] = machine->ram_size;
49+ ram_size[1] = 0;
50+ block_len = GUEST_RAM0_BASE + ram_size[0];
51+ } else {
52+ ram_size[0] = GUEST_RAM0_SIZE;
53+ ram_size[1] = machine->ram_size - GUEST_RAM0_SIZE;
54+ block_len = GUEST_RAM1_BASE + ram_size[1];
55+ }
56+
57+ memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
58+ &error_fatal);
59+
60+ memory_region_init_alias(&ram_lo, NULL, "xen.ram.lo", &ram_memory,
61+ GUEST_RAM0_BASE, ram_size[0]);
62+ memory_region_add_subregion(sysmem, GUEST_RAM0_BASE, &ram_lo);
63+ DPRINTF("Initialized region xen.ram.lo: base 0x%llx size 0x%lx\n",
64+ GUEST_RAM0_BASE, ram_size[0]);
65+
66+ if (ram_size[1] > 0) {
67+ memory_region_init_alias(&ram_hi, NULL, "xen.ram.hi", &ram_memory,
68+ GUEST_RAM1_BASE, ram_size[1]);
69+ memory_region_add_subregion(sysmem, GUEST_RAM1_BASE, &ram_hi);
70+ DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n",
71+ GUEST_RAM1_BASE, ram_size[1]);
72+ }
73+}
74+
75 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
76 {
77 hw_error("Invalid ioreq type 0x%x\n", req->type);
78@@ -155,6 +190,14 @@ static void xen_arm_init(MachineState *machine)
79
80 xam->state = g_new0(XenIOState, 1);
81
82+ if (machine->ram_size == 0) {
83+ DPRINTF("ram_size not specified. QEMU machine will be started without"
84+ " TPM, IOREQ and Virtio-MMIO backends\n");
85+ return;
86+ }
87+
88+ xen_init_ram(machine);
89+
90 if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
91 return;
92 }
93@@ -173,6 +216,9 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
94 mc->desc = "Xen Para-virtualized PC";
95 mc->init = xen_arm_init;
96 mc->max_cpus = 1;
97+ /* Set explicitly here to make sure that real ram_size is passed */
98+ mc->default_ram_size = 0;
99+
100 machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
101 }
102
103--
1042.17.1
105
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch
new file mode 100644
index 00000000..14f2e240
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-7.1/0016-xen_arm-Add-accel-xen-and-drop-extra-interface-openi.patch
@@ -0,0 +1,79 @@
1From a730d5ea4a0445a8c694b56583dd06bd000fae74 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Wed, 4 Jan 2023 23:05:25 +0000
4Subject: [PATCH 16/16] xen_arm: Add "accel = xen" and drop extra interface
5 openings
6
7In order to use virtio backends we need to make sure that Xen accelerator
8is enabled (xen_enabled() returns true) as the memory/cache systems
9check for xen_enabled() to perform specific actions. Without that
10the xen-mapcache (which is needed for mapping guest memory) is not in use.
11
12Also drop extra interface opening as this is already done in xen-all.c
13(so drop xen_init_ioreq() completely) and skip virtio/tpm initialization
14if device emulation is not available.
15
16Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
17Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
18Reviewed-by: Stefano Stabellini <stefano.stabellini@amd.com>
19---
20 hw/arm/xen_arm.c | 29 ++---------------------------
21 1 file changed, 2 insertions(+), 27 deletions(-)
22
23diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
24index fde919df29..4ac425a3c5 100644
25--- a/hw/arm/xen_arm.c
26+++ b/hw/arm/xen_arm.c
27@@ -137,30 +137,6 @@ void qmp_xen_set_global_dirty_log(bool enable, Error **errp)
28 {
29 }
30
31-static int xen_init_ioreq(XenIOState *state, unsigned int max_cpus)
32-{
33- xen_dmod = xendevicemodel_open(0, 0);
34- xen_xc = xc_interface_open(0, 0, 0);
35-
36- if (xen_xc == NULL) {
37- perror("xen: can't open xen interface\n");
38- return -1;
39- }
40-
41- xen_fmem = xenforeignmemory_open(0, 0);
42- if (xen_fmem == NULL) {
43- perror("xen: can't open xen fmem interface\n");
44- xc_interface_close(xen_xc);
45- return -1;
46- }
47-
48- xen_register_ioreq(state, max_cpus, xen_memory_listener);
49-
50- xenstore_record_dm_state(xenstore, "running");
51-
52- return 0;
53-}
54-
55 static void xen_enable_tpm(void)
56 {
57 #ifdef CONFIG_TPM
58@@ -198,9 +174,7 @@ static void xen_arm_init(MachineState *machine)
59
60 xen_init_ram(machine);
61
62- if (xen_init_ioreq(xam->state, machine->smp.cpus)) {
63- return;
64- }
65+ xen_register_ioreq(xam->state, machine->smp.cpus, xen_memory_listener);
66
67 xen_create_virtio_mmio_devices(xam);
68
69@@ -218,6 +192,7 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
70 mc->max_cpus = 1;
71 /* Set explicitly here to make sure that real ram_size is passed */
72 mc->default_ram_size = 0;
73+ mc->default_machine_opts = "accel=xen";
74
75 machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
76 }
77--
782.17.1
79
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch
new file mode 100644
index 00000000..6e3b40f7
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch
@@ -0,0 +1,353 @@
1From 3104d411ee36487ea409ba5a1b474989326f70f2 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Wed, 15 Nov 2023 14:19:31 -0800
4Subject: [PATCH] arm: xenpvh: Introduce virtio-pci support
5
6The bridge is needed for virtio-pci support, as QEMU can emulate the
7whole bridge with any virtio-pci devices connected to it.
8
9NOTE: A few xen-hvm-common.c and xen_native.h changes are cherry-picked from
10EPAM QEMU patches for xen-arm. This was done to keep least diff with upstream.
11
12Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
13Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
14Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
15---
16 hw/arm/xen_arm.c | 271 ++++++++++++++++++++++++++++++++++++
17 include/hw/xen/xen_native.h | 3 +
18 2 files changed, 274 insertions(+)
19
20diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
21index 1587e2a43b..a7c5b20777 100644
22--- a/hw/arm/xen_arm.c
23+++ b/hw/arm/xen_arm.c
24@@ -34,6 +34,7 @@
25 #include "hw/xen/xen-hvm-common.h"
26 #include "sysemu/tpm.h"
27 #include "hw/xen/arch_hvm.h"
28+#include "hw/pci-host/gpex.h"
29
30 #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh")
31 OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM)
32@@ -57,6 +58,9 @@ struct XenArmState {
33
34 struct {
35 uint64_t tpm_base_addr;
36+ MemMapEntry pcie_mmio;
37+ MemMapEntry pcie_ecam;
38+ MemMapEntry pcie_mmio_high;
39 } cfg;
40 };
41
42@@ -132,6 +136,80 @@ static void xen_init_ram(MachineState *machine)
43 ram_grants = *xen_init_grant_ram();
44 }
45
46+static bool xen_validate_pcie_config(XenArmState *xam)
47+{
48+ if (xam->cfg.pcie_ecam.base == 0 &&
49+ xam->cfg.pcie_ecam.size == 0 &&
50+ xam->cfg.pcie_mmio.base == 0 &&
51+ xam->cfg.pcie_mmio.size == 0 &&
52+ xam->cfg.pcie_mmio_high.base == 0 &&
53+ xam->cfg.pcie_mmio_high.size == 0) {
54+ /* It's okay, user just don't want PCIe brige */
55+ return false;
56+ }
57+
58+ if (xam->cfg.pcie_ecam.base == 0 ||
59+ xam->cfg.pcie_ecam.size == 0 ||
60+ xam->cfg.pcie_mmio.base == 0 ||
61+ xam->cfg.pcie_mmio.size == 0 ||
62+ xam->cfg.pcie_mmio_high.base == 0 ||
63+ xam->cfg.pcie_mmio_high.size == 0) {
64+ /* User provided some PCIe options, but not all of them */
65+ error_printf("Incomplete PCIe bridge configuration\n");
66+ exit(1);
67+ }
68+
69+ return true;
70+}
71+
72+static void xen_create_pcie(XenArmState *xam)
73+{
74+ MemoryRegion *mmio_alias, *mmio_alias_high, *mmio_reg;
75+ MemoryRegion *ecam_alias, *ecam_reg;
76+ DeviceState *dev;
77+ int i;
78+
79+ dev = qdev_new(TYPE_GPEX_HOST);
80+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
81+
82+ /* Map ECAM space */
83+ ecam_alias = g_new0(MemoryRegion, 1);
84+ ecam_reg = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0);
85+ memory_region_init_alias(ecam_alias, OBJECT(dev), "pcie-ecam",
86+ ecam_reg, 0, xam->cfg.pcie_ecam.size);
87+ memory_region_add_subregion(get_system_memory(), xam->cfg.pcie_ecam.base,
88+ ecam_alias);
89+
90+ /* Map the MMIO space */
91+ mmio_alias = g_new0(MemoryRegion, 1);
92+ mmio_reg = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 1);
93+ memory_region_init_alias(mmio_alias, OBJECT(dev), "pcie-mmio",
94+ mmio_reg,
95+ xam->cfg.pcie_mmio.base,
96+ xam->cfg.pcie_mmio.size);
97+ memory_region_add_subregion(get_system_memory(), xam->cfg.pcie_mmio.base,
98+ mmio_alias);
99+
100+ /* Map the MMIO_HIGH space */
101+ mmio_alias_high = g_new0(MemoryRegion, 1);
102+ memory_region_init_alias(mmio_alias_high, OBJECT(dev), "pcie-mmio-high",
103+ mmio_reg,
104+ xam->cfg.pcie_mmio_high.base,
105+ xam->cfg.pcie_mmio_high.size);
106+ memory_region_add_subregion(get_system_memory(),
107+ xam->cfg.pcie_mmio_high.base,
108+ mmio_alias_high);
109+
110+ /* Legacy PCI interrupts (#INTA - #INTD) */
111+ for (i = 0; i < GPEX_NUM_IRQS; i++) {
112+ qemu_irq irq = qemu_allocate_irq(xen_set_irq, NULL,
113+ GUEST_VIRTIO_PCI_SPI_FIRST + i);
114+
115+ sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, irq);
116+ gpex_set_irq_num(GPEX_HOST(dev), i, GUEST_VIRTIO_PCI_SPI_FIRST + i);
117+ }
118+}
119+
120 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
121 {
122 hw_error("Invalid ioreq type 0x%x\n", req->type);
123@@ -193,6 +271,13 @@ static void xen_arm_init(MachineState *machine)
124
125 xen_create_virtio_mmio_devices(xam);
126
127+ if (xen_validate_pcie_config(xam)) {
128+ xen_create_pcie(xam);
129+ } else {
130+ DPRINTF("PCIe host bridge is not configured,"
131+ " only virtio-mmio can be used\n");
132+ }
133+
134 #ifdef CONFIG_TPM
135 if (xam->cfg.tpm_base_addr) {
136 xen_enable_tpm(xam);
137@@ -228,6 +313,150 @@ static void xen_arm_set_tpm_base_addr(Object *obj, Visitor *v,
138 }
139 #endif
140
141+static void xen_arm_get_pcie_ecam_base_addr(Object *obj, Visitor *v,
142+ const char *name, void *opaque,
143+ Error **errp)
144+{
145+ XenArmState *xam = XEN_ARM(obj);
146+ uint64_t value = xam->cfg.pcie_ecam.base;
147+
148+ visit_type_uint64(v, name, &value, errp);
149+}
150+
151+static void xen_arm_set_pcie_ecam_base_addr(Object *obj, Visitor *v,
152+ const char *name, void *opaque,
153+ Error **errp)
154+{
155+ XenArmState *xam = XEN_ARM(obj);
156+ uint64_t value;
157+
158+ if (!visit_type_uint64(v, name, &value, errp)) {
159+ return;
160+ }
161+
162+ xam->cfg.pcie_ecam.base = value;
163+}
164+
165+static void xen_arm_get_pcie_ecam_size(Object *obj, Visitor *v,
166+ const char *name, void *opaque,
167+ Error **errp)
168+{
169+ XenArmState *xam = XEN_ARM(obj);
170+ uint64_t value = xam->cfg.pcie_ecam.size;
171+
172+ visit_type_uint64(v, name, &value, errp);
173+}
174+
175+static void xen_arm_set_pcie_ecam_size(Object *obj, Visitor *v,
176+ const char *name, void *opaque,
177+ Error **errp)
178+{
179+ XenArmState *xam = XEN_ARM(obj);
180+ uint64_t value;
181+
182+ if (!visit_type_uint64(v, name, &value, errp)) {
183+ return;
184+ }
185+
186+ xam->cfg.pcie_ecam.size = value;
187+}
188+
189+static void xen_arm_get_pcie_mmio_base_addr(Object *obj, Visitor *v,
190+ const char *name, void *opaque,
191+ Error **errp)
192+{
193+ XenArmState *xam = XEN_ARM(obj);
194+ uint64_t value = xam->cfg.pcie_mmio.base;
195+
196+ visit_type_uint64(v, name, &value, errp);
197+}
198+
199+static void xen_arm_set_pcie_mmio_base_addr(Object *obj, Visitor *v,
200+ const char *name, void *opaque,
201+ Error **errp)
202+{
203+ XenArmState *xam = XEN_ARM(obj);
204+ uint64_t value;
205+
206+ if (!visit_type_uint64(v, name, &value, errp)) {
207+ return;
208+ }
209+
210+ xam->cfg.pcie_mmio.base = value;
211+}
212+
213+static void xen_arm_get_pcie_mmio_size(Object *obj, Visitor *v,
214+ const char *name, void *opaque,
215+ Error **errp)
216+{
217+ XenArmState *xam = XEN_ARM(obj);
218+ uint64_t value = xam->cfg.pcie_mmio.size;
219+
220+ visit_type_uint64(v, name, &value, errp);
221+}
222+
223+static void xen_arm_set_pcie_mmio_size(Object *obj, Visitor *v,
224+ const char *name, void *opaque,
225+ Error **errp)
226+{
227+ XenArmState *xam = XEN_ARM(obj);
228+ uint64_t value;
229+
230+ if (!visit_type_uint64(v, name, &value, errp)) {
231+ return;
232+ }
233+
234+ xam->cfg.pcie_mmio.size = value;
235+}
236+
237+static void xen_arm_get_pcie_prefetch_base_addr(Object *obj, Visitor *v,
238+ const char *name, void *opaque,
239+ Error **errp)
240+{
241+ XenArmState *xam = XEN_ARM(obj);
242+ uint64_t value = xam->cfg.pcie_mmio_high.base;
243+
244+ visit_type_uint64(v, name, &value, errp);
245+}
246+
247+static void xen_arm_set_pcie_prefetch_base_addr(Object *obj, Visitor *v,
248+ const char *name, void *opaque,
249+ Error **errp)
250+{
251+ XenArmState *xam = XEN_ARM(obj);
252+ uint64_t value;
253+
254+ if (!visit_type_uint64(v, name, &value, errp)) {
255+ return;
256+ }
257+
258+ xam->cfg.pcie_mmio_high.base = value;
259+}
260+
261+static void xen_arm_get_pcie_prefetch_size(Object *obj, Visitor *v,
262+ const char *name, void *opaque,
263+ Error **errp)
264+{
265+ XenArmState *xam = XEN_ARM(obj);
266+ uint64_t value = xam->cfg.pcie_mmio_high.size;
267+
268+ visit_type_uint64(v, name, &value, errp);
269+}
270+
271+static void xen_arm_set_pcie_prefetch_size(Object *obj, Visitor *v,
272+ const char *name, void *opaque,
273+ Error **errp)
274+{
275+ XenArmState *xam = XEN_ARM(obj);
276+ uint64_t value;
277+
278+ if (!visit_type_uint64(v, name, &value, errp)) {
279+ return;
280+ }
281+
282+ xam->cfg.pcie_mmio_high.size = value;
283+}
284+
285 static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
286 {
287
288@@ -249,6 +478,48 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
289
290 machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS);
291 #endif
292+
293+ object_class_property_add(oc, "pci-ecam-base-addr", "uint64_t",
294+ xen_arm_get_pcie_ecam_base_addr,
295+ xen_arm_set_pcie_ecam_base_addr,
296+ NULL, NULL);
297+ object_class_property_set_description(oc, "pci-ecam-base-addr",
298+ "Set Base address for PCI ECAM.");
299+
300+ object_class_property_add(oc, "pci-ecam-size", "uint64_t",
301+ xen_arm_get_pcie_ecam_size,
302+ xen_arm_set_pcie_ecam_size,
303+ NULL, NULL);
304+ object_class_property_set_description(oc, "pci-ecam-size",
305+ "Set Size for PCI ECAM.");
306+
307+ object_class_property_add(oc, "pci-mmio-base-addr", "uint64_t",
308+ xen_arm_get_pcie_mmio_base_addr,
309+ xen_arm_set_pcie_mmio_base_addr,
310+ NULL, NULL);
311+ object_class_property_set_description(oc, "pci-mmio-base-addr",
312+ "Set Base address for PCI MMIO.");
313+
314+ object_class_property_add(oc, "pci-mmio-size", "uint64_t",
315+ xen_arm_get_pcie_mmio_size,
316+ xen_arm_set_pcie_mmio_size,
317+ NULL, NULL);
318+ object_class_property_set_description(oc, "pci-mmio-size",
319+ "Set size for PCI MMIO.");
320+
321+ object_class_property_add(oc, "pci-prefetch-base-addr", "uint64_t",
322+ xen_arm_get_pcie_prefetch_base_addr,
323+ xen_arm_set_pcie_prefetch_base_addr,
324+ NULL, NULL);
325+ object_class_property_set_description(oc, "pci-prefetch-base-addr",
326+ "Set Prefetch Base address for PCI.");
327+
328+ object_class_property_add(oc, "pci-prefetch-size", "uint64_t",
329+ xen_arm_get_pcie_prefetch_size,
330+ xen_arm_set_pcie_prefetch_size,
331+ NULL, NULL);
332+ object_class_property_set_description(oc, "pci-prefetch-size",
333+ "Set Prefetch size for PCI.");
334 }
335
336 static const TypeInfo xen_arm_machine_type = {
337diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
338index 6f09c48823..1e81189a27 100644
339--- a/include/hw/xen/xen_native.h
340+++ b/include/hw/xen/xen_native.h
341@@ -539,6 +539,9 @@ static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod,
342 #define GUEST_VIRTIO_MMIO_SPI_LAST 43
343 #endif
344
345+#define GUEST_VIRTIO_PCI_SPI_FIRST 44
346+#define GUEST_VIRTIO_PCI_SPI_LAST 48
347+
348 #if defined(__i386__) || defined(__x86_64__)
349 #define GUEST_RAM_BANKS 2
350 #define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */
351--
3522.30.2
353
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch
new file mode 100644
index 00000000..1757e9e2
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch
@@ -0,0 +1,116 @@
1From b9291457ca2eb4340c71d2eed08fde83916c9fa4 Mon Sep 17 00:00:00 2001
2From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
3Date: Tue, 29 Aug 2023 21:35:17 -0700
4Subject: [PATCH 01/11] xen_arm: Create virtio-mmio devices during
5 initialization
6
7In order to use virtio backends we need to allocate virtio-mmio
8parameters (irq and base) and register corresponding buses.
9
10Use the constants defined in public header arch-arm.h to be
11aligned with the toolstack. So the number of current supported
12virtio-mmio devices is 10.
13
14For the interrupts triggering use already existing on Arm
15device-model hypercall.
16
17The toolstack should then insert the same amount of device nodes
18into guest device-tree.
19
20Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
21Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
22Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
23Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
24---
25 hw/arm/xen_arm.c | 35 +++++++++++++++++++++++++++++++++++
26 include/hw/xen/xen_native.h | 16 ++++++++++++++++
27 2 files changed, 51 insertions(+)
28
29diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
30index 1d3e6d481a..7393b37355 100644
31--- a/hw/arm/xen_arm.c
32+++ b/hw/arm/xen_arm.c
33@@ -26,6 +26,7 @@
34 #include "qapi/qapi-commands-migration.h"
35 #include "qapi/visitor.h"
36 #include "hw/boards.h"
37+#include "hw/irq.h"
38 #include "hw/sysbus.h"
39 #include "sysemu/block-backend.h"
40 #include "sysemu/tpm_backend.h"
41@@ -59,6 +60,38 @@ struct XenArmState {
42 } cfg;
43 };
44
45+/*
46+ * VIRTIO_MMIO_DEV_SIZE is imported from tools/libs/light/libxl_arm.c under Xen
47+ * repository.
48+ *
49+ * Origin: git://xenbits.xen.org/xen.git 2128143c114c
50+ */
51+#define VIRTIO_MMIO_DEV_SIZE 0x200
52+
53+#define NR_VIRTIO_MMIO_DEVICES \
54+ (GUEST_VIRTIO_MMIO_SPI_LAST - GUEST_VIRTIO_MMIO_SPI_FIRST)
55+
56+static void xen_set_irq(void *opaque, int irq, int level)
57+{
58+ xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level);
59+}
60+
61+static void xen_create_virtio_mmio_devices(XenArmState *xam)
62+{
63+ int i;
64+
65+ for (i = 0; i < NR_VIRTIO_MMIO_DEVICES; i++) {
66+ hwaddr base = GUEST_VIRTIO_MMIO_BASE + i * VIRTIO_MMIO_DEV_SIZE;
67+ qemu_irq irq = qemu_allocate_irq(xen_set_irq, NULL,
68+ GUEST_VIRTIO_MMIO_SPI_FIRST + i);
69+
70+ sysbus_create_simple("virtio-mmio", base, irq);
71+
72+ DPRINTF("Created virtio-mmio device %d: irq %d base 0x%lx\n",
73+ i, GUEST_VIRTIO_MMIO_SPI_FIRST + i, base);
74+ }
75+}
76+
77 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
78 {
79 hw_error("Invalid ioreq type 0x%x\n", req->type);
80@@ -110,6 +143,8 @@ static void xen_arm_init(MachineState *machine)
81
82 xen_register_ioreq(xam->state, machine->smp.cpus, &xen_memory_listener);
83
84+ xen_create_virtio_mmio_devices(xam);
85+
86 #ifdef CONFIG_TPM
87 if (xam->cfg.tpm_base_addr) {
88 xen_enable_tpm(xam);
89diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
90index 4dce905fde..a4b1aa9e5d 100644
91--- a/include/hw/xen/xen_native.h
92+++ b/include/hw/xen/xen_native.h
93@@ -523,4 +523,20 @@ static inline int xen_set_ioreq_server_state(domid_t dom,
94 enable);
95 }
96
97+#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500
98+static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod,
99+ domid_t domid, uint32_t irq,
100+ unsigned int level)
101+{
102+ return 0;
103+}
104+#endif
105+
106+#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41700
107+#define GUEST_VIRTIO_MMIO_BASE xen_mk_ullong(0x02000000)
108+#define GUEST_VIRTIO_MMIO_SIZE xen_mk_ullong(0x00100000)
109+#define GUEST_VIRTIO_MMIO_SPI_FIRST 33
110+#define GUEST_VIRTIO_MMIO_SPI_LAST 43
111+#endif
112+
113 #endif /* QEMU_HW_XEN_NATIVE_H */
114--
1152.39.2
116
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch
new file mode 100644
index 00000000..f88db620
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch
@@ -0,0 +1,124 @@
1From 70a74795c5071bf591e6e557b7c8c492ead0e675 Mon Sep 17 00:00:00 2001
2From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
3Date: Tue, 29 Aug 2023 21:35:18 -0700
4Subject: [PATCH 02/11] xen_arm: Initialize RAM and add hi/low memory regions
5
6In order to use virtio backends we need to initialize RAM for the
7xen-mapcache (which is responsible for mapping guest memory using foreign
8mapping) to work. Calculate and add hi/low memory regions based on
9machine->ram_size.
10
11Use the constants defined in public header arch-arm.h to be aligned with the xen
12toolstack.
13
14While using this machine, the toolstack should then pass real ram_size using
15"-m" arg. If "-m" is not given, create a QEMU machine without IOREQ and other
16emulated devices like TPM and VIRTIO. This is done to keep this QEMU machine
17usable for /etc/init.d/xencommons.
18
19Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
20Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
21Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
22Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
23---
24 hw/arm/xen_arm.c | 45 +++++++++++++++++++++++++++++++++++++
25 include/hw/xen/xen_native.h | 8 +++++++
26 2 files changed, 53 insertions(+)
27
28diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
29index 7393b37355..f83b983ec5 100644
30--- a/hw/arm/xen_arm.c
31+++ b/hw/arm/xen_arm.c
32@@ -60,6 +60,8 @@ struct XenArmState {
33 } cfg;
34 };
35
36+static MemoryRegion ram_lo, ram_hi;
37+
38 /*
39 * VIRTIO_MMIO_DEV_SIZE is imported from tools/libs/light/libxl_arm.c under Xen
40 * repository.
41@@ -92,6 +94,39 @@ static void xen_create_virtio_mmio_devices(XenArmState *xam)
42 }
43 }
44
45+static void xen_init_ram(MachineState *machine)
46+{
47+ MemoryRegion *sysmem = get_system_memory();
48+ ram_addr_t block_len, ram_size[GUEST_RAM_BANKS];
49+
50+ if (machine->ram_size <= GUEST_RAM0_SIZE) {
51+ ram_size[0] = machine->ram_size;
52+ ram_size[1] = 0;
53+ block_len = GUEST_RAM0_BASE + ram_size[0];
54+ } else {
55+ ram_size[0] = GUEST_RAM0_SIZE;
56+ ram_size[1] = machine->ram_size - GUEST_RAM0_SIZE;
57+ block_len = GUEST_RAM1_BASE + ram_size[1];
58+ }
59+
60+ memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len,
61+ &error_fatal);
62+
63+ memory_region_init_alias(&ram_lo, NULL, "xen.ram.lo", &ram_memory,
64+ GUEST_RAM0_BASE, ram_size[0]);
65+ memory_region_add_subregion(sysmem, GUEST_RAM0_BASE, &ram_lo);
66+ DPRINTF("Initialized region xen.ram.lo: base 0x%llx size 0x%lx\n",
67+ GUEST_RAM0_BASE, ram_size[0]);
68+
69+ if (ram_size[1] > 0) {
70+ memory_region_init_alias(&ram_hi, NULL, "xen.ram.hi", &ram_memory,
71+ GUEST_RAM1_BASE, ram_size[1]);
72+ memory_region_add_subregion(sysmem, GUEST_RAM1_BASE, &ram_hi);
73+ DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n",
74+ GUEST_RAM1_BASE, ram_size[1]);
75+ }
76+}
77+
78 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
79 {
80 hw_error("Invalid ioreq type 0x%x\n", req->type);
81@@ -141,6 +176,14 @@ static void xen_arm_init(MachineState *machine)
82
83 xam->state = g_new0(XenIOState, 1);
84
85+ if (machine->ram_size == 0) {
86+ DPRINTF("ram_size not specified. QEMU machine started without IOREQ"
87+ "(no emulated devices including Virtio)\n");
88+ return;
89+ }
90+
91+ xen_init_ram(machine);
92+
93 xen_register_ioreq(xam->state, machine->smp.cpus, &xen_memory_listener);
94
95 xen_create_virtio_mmio_devices(xam);
96@@ -188,6 +231,8 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data)
97 mc->init = xen_arm_init;
98 mc->max_cpus = 1;
99 mc->default_machine_opts = "accel=xen";
100+ /* Set explicitly here to make sure that real ram_size is passed */
101+ mc->default_ram_size = 0;
102
103 #ifdef CONFIG_TPM
104 object_class_property_add(oc, "tpm-base-addr", "uint64_t",
105diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
106index a4b1aa9e5d..5d2718261f 100644
107--- a/include/hw/xen/xen_native.h
108+++ b/include/hw/xen/xen_native.h
109@@ -539,4 +539,12 @@ static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod,
110 #define GUEST_VIRTIO_MMIO_SPI_LAST 43
111 #endif
112
113+#if defined(__i386__) || defined(__x86_64__)
114+#define GUEST_RAM_BANKS 2
115+#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */
116+#define GUEST_RAM0_SIZE 0xc0000000ULL
117+#define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */
118+#define GUEST_RAM1_SIZE 0xfe00000000ULL
119+#endif
120+
121 #endif /* QEMU_HW_XEN_NATIVE_H */
122--
1232.39.2
124
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch
new file mode 100644
index 00000000..c6945d54
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch
@@ -0,0 +1,55 @@
1From 14b9dbd7f0261ae7a36bef251924ba211beef17a Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Wed, 1 Nov 2023 14:07:23 -0700
4Subject: [PATCH 03/11] Xen: Fix xen_set_irq() and
5 xendevicemodel_set_irq_level()
6
7Remove '=' from 'if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500'.
8Because xendevicemodel_set_irq_level() was introduced in 4.15 version.
9
10Also, update xendevicemodel_set_irq_level() to return -1 for older versions.
11
12Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
13Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
14---
15 hw/arm/xen_arm.c | 4 +++-
16 include/hw/xen/xen_native.h | 4 ++--
17 2 files changed, 5 insertions(+), 3 deletions(-)
18
19diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
20index f83b983ec5..a5631529d0 100644
21--- a/hw/arm/xen_arm.c
22+++ b/hw/arm/xen_arm.c
23@@ -75,7 +75,9 @@ static MemoryRegion ram_lo, ram_hi;
24
25 static void xen_set_irq(void *opaque, int irq, int level)
26 {
27- xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level);
28+ if (xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level)) {
29+ error_report("xendevicemodel_set_irq_level failed");
30+ }
31 }
32
33 static void xen_create_virtio_mmio_devices(XenArmState *xam)
34diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h
35index 5d2718261f..6f09c48823 100644
36--- a/include/hw/xen/xen_native.h
37+++ b/include/hw/xen/xen_native.h
38@@ -523,12 +523,12 @@ static inline int xen_set_ioreq_server_state(domid_t dom,
39 enable);
40 }
41
42-#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500
43+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41500
44 static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod,
45 domid_t domid, uint32_t irq,
46 unsigned int level)
47 {
48- return 0;
49+ return -1;
50 }
51 #endif
52
53--
542.39.2
55
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch
new file mode 100644
index 00000000..da2f042b
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch
@@ -0,0 +1,70 @@
1From 02507086b3ad9beb9c669aae54fcb4857cd61ef8 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Tue, 16 Mar 2021 14:00:33 +0100
4Subject: [PATCH 04/11] xen: when unplugging emulated devices skip virtio
5 devices
6
7Virtio devices should never be unplugged at boot time, as they are
8similar to pci passthrough devices.
9
10Signed-off-by: Juergen Gross <jgross@suse.com>
11Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
12---
13 docs/system/i386/xen.rst | 3 ---
14 hw/i386/xen/xen_platform.c | 10 ++++++++--
15 2 files changed, 8 insertions(+), 5 deletions(-)
16
17diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst
18index f06765e88c..b86d57af6e 100644
19--- a/docs/system/i386/xen.rst
20+++ b/docs/system/i386/xen.rst
21@@ -52,9 +52,6 @@ It is necessary to use the pc machine type, as the q35 machine uses AHCI instead
22 of legacy IDE, and AHCI disks are not unplugged through the Xen PV unplug
23 mechanism.
24
25-VirtIO devices can also be used; Linux guests may need to be dissuaded from
26-umplugging them by adding 'xen_emul_unplug=never' on their command line.
27-
28 Properties
29 ----------
30
31diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c
32index 17457ff3de..0187b73eeb 100644
33--- a/hw/i386/xen/xen_platform.c
34+++ b/hw/i386/xen/xen_platform.c
35@@ -28,6 +28,7 @@
36 #include "hw/ide/pci.h"
37 #include "hw/pci/pci.h"
38 #include "migration/vmstate.h"
39+#include "hw/virtio/virtio-bus.h"
40 #include "net/net.h"
41 #include "trace.h"
42 #include "sysemu/xen.h"
43@@ -129,10 +130,11 @@ static bool pci_device_is_passthrough(PCIDevice *d)
44
45 static void unplug_nic(PCIBus *b, PCIDevice *d, void *o)
46 {
47- /* We have to ignore passthrough devices */
48+ /* We have to ignore passthrough devices and virtio devices. */
49 if (pci_get_word(d->config + PCI_CLASS_DEVICE) ==
50 PCI_CLASS_NETWORK_ETHERNET
51- && !pci_device_is_passthrough(d)) {
52+ && !pci_device_is_passthrough(d)
53+ && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) {
54 object_unparent(OBJECT(d));
55 }
56 }
57@@ -208,6 +210,10 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque)
58 /* We have to ignore passthrough devices */
59 if (pci_device_is_passthrough(d))
60 return;
61+ /* Ignore virtio devices */
62+ if (qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) {
63+ return;
64+ }
65
66 switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) {
67 case PCI_CLASS_STORAGE_IDE:
68--
692.39.2
70
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch
new file mode 100644
index 00000000..3c39dd19
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch
@@ -0,0 +1,117 @@
1From d4774a0e5e1ebed605c5d49e81433fd371d0b680 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Tue, 17 Oct 2023 20:22:26 +0000
4Subject: [PATCH 05/11] softmmu: physmem: Split ram_block_add()
5
6Extract ram block list update to a new function ram_block_add_list(). This is
7done to support grant mappings which adds a memory region for granted memory and
8updates the ram_block list.
9
10Signed-off-by: Juergen Gross <jgross@suse.com>
11Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
12Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
13---
14 include/exec/ram_addr.h | 1 +
15 softmmu/physmem.c | 62 ++++++++++++++++++++++++++---------------
16 2 files changed, 40 insertions(+), 23 deletions(-)
17
18diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
19index 9f2e3893f5..76fa360463 100644
20--- a/include/exec/ram_addr.h
21+++ b/include/exec/ram_addr.h
22@@ -139,6 +139,7 @@ void qemu_ram_free(RAMBlock *block);
23 int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp);
24
25 void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length);
26+void ram_block_add_list(RAMBlock *new_block);
27
28 /* Clear whole block of mem */
29 static inline void qemu_ram_block_writeback(RAMBlock *block)
30diff --git a/softmmu/physmem.c b/softmmu/physmem.c
31index 3df73542e1..f73629733e 100644
32--- a/softmmu/physmem.c
33+++ b/softmmu/physmem.c
34@@ -1786,12 +1786,47 @@ static void dirty_memory_extend(ram_addr_t old_ram_size,
35 }
36 }
37
38+static void ram_block_add_list_locked(RAMBlock *new_block)
39+ {
40+ RAMBlock *block;
41+ RAMBlock *last_block = NULL;
42+
43+ /*
44+ * Keep the list sorted from biggest to smallest block. Unlike QTAILQ,
45+ * QLIST (which has an RCU-friendly variant) does not have insertion at
46+ * tail, so save the last element in last_block.
47+ */
48+ RAMBLOCK_FOREACH(block) {
49+ last_block = block;
50+ if (block->max_length < new_block->max_length) {
51+ break;
52+ }
53+ }
54+ if (block) {
55+ QLIST_INSERT_BEFORE_RCU(block, new_block, next);
56+ } else if (last_block) {
57+ QLIST_INSERT_AFTER_RCU(last_block, new_block, next);
58+ } else { /* list is empty */
59+ QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next);
60+ }
61+ ram_list.mru_block = NULL;
62+
63+ /* Write list before version */
64+ smp_wmb();
65+ ram_list.version++;
66+}
67+
68+void ram_block_add_list(RAMBlock *new_block)
69+{
70+ qemu_mutex_lock_ramlist();
71+ ram_block_add_list_locked(new_block);
72+ qemu_mutex_unlock_ramlist();
73+}
74+
75 static void ram_block_add(RAMBlock *new_block, Error **errp)
76 {
77 const bool noreserve = qemu_ram_is_noreserve(new_block);
78 const bool shared = qemu_ram_is_shared(new_block);
79- RAMBlock *block;
80- RAMBlock *last_block = NULL;
81 ram_addr_t old_ram_size, new_ram_size;
82 Error *err = NULL;
83
84@@ -1829,28 +1864,9 @@ static void ram_block_add(RAMBlock *new_block, Error **errp)
85 if (new_ram_size > old_ram_size) {
86 dirty_memory_extend(old_ram_size, new_ram_size);
87 }
88- /* Keep the list sorted from biggest to smallest block. Unlike QTAILQ,
89- * QLIST (which has an RCU-friendly variant) does not have insertion at
90- * tail, so save the last element in last_block.
91- */
92- RAMBLOCK_FOREACH(block) {
93- last_block = block;
94- if (block->max_length < new_block->max_length) {
95- break;
96- }
97- }
98- if (block) {
99- QLIST_INSERT_BEFORE_RCU(block, new_block, next);
100- } else if (last_block) {
101- QLIST_INSERT_AFTER_RCU(last_block, new_block, next);
102- } else { /* list is empty */
103- QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next);
104- }
105- ram_list.mru_block = NULL;
106+
107+ ram_block_add_list_locked(new_block);
108
109- /* Write list before version */
110- smp_wmb();
111- ram_list.version++;
112 qemu_mutex_unlock_ramlist();
113
114 cpu_physical_memory_set_dirty_range(new_block->offset,
115--
1162.39.2
117
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch
new file mode 100644
index 00000000..a43748fe
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch
@@ -0,0 +1,153 @@
1From 637d10471fef76a7ab0e8f5631ea3c85ff5ce9db Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 11:19:58 +0200
4Subject: [PATCH 06/11] xen: add pseudo RAM region for grant mappings
5
6Add a memory region which can be used to automatically map granted
7memory. It is starting at 0x8000000000000000ULL in order to be able to
8distinguish it from normal RAM.
9
10For this reason the xen.ram memory region is expanded, which has no
11further impact as it is used just as a container of the real RAM
12regions and now the grant region.
13
14Signed-off-by: Juergen Gross <jgross@suse.com>
15Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
16Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
17---
18 hw/i386/xen/xen-hvm.c | 3 +++
19 hw/xen/xen-hvm-common.c | 4 ++--
20 hw/xen/xen-mapcache.c | 27 +++++++++++++++++++++++++++
21 include/hw/xen/xen-hvm-common.h | 2 ++
22 include/hw/xen/xen_pvdev.h | 3 +++
23 include/sysemu/xen-mapcache.h | 3 +++
24 6 files changed, 40 insertions(+), 2 deletions(-)
25
26diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c
27index f42621e674..67a55558a6 100644
28--- a/hw/i386/xen/xen-hvm.c
29+++ b/hw/i386/xen/xen-hvm.c
30@@ -172,6 +172,9 @@ static void xen_ram_init(PCMachineState *pcms,
31 x86ms->above_4g_mem_size);
32 memory_region_add_subregion(sysmem, 0x100000000ULL, &ram_hi);
33 }
34+
35+ /* Add grant mappings as a pseudo RAM region. */
36+ ram_grants = *xen_init_grant_ram();
37 }
38
39 static XenPhysmap *get_physmapping(hwaddr start_addr, ram_addr_t size)
40diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
41index 565dc39c8f..b7255977a5 100644
42--- a/hw/xen/xen-hvm-common.c
43+++ b/hw/xen/xen-hvm-common.c
44@@ -9,7 +9,7 @@
45 #include "hw/boards.h"
46 #include "hw/xen/arch_hvm.h"
47
48-MemoryRegion ram_memory;
49+MemoryRegion ram_memory, ram_grants;
50
51 void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr,
52 Error **errp)
53@@ -26,7 +26,7 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr,
54 return;
55 }
56
57- if (mr == &ram_memory) {
58+ if (mr == &ram_memory || mr == &ram_grants) {
59 return;
60 }
61
62diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
63index f7d974677d..8115c44c00 100644
64--- a/hw/xen/xen-mapcache.c
65+++ b/hw/xen/xen-mapcache.c
66@@ -14,7 +14,9 @@
67
68 #include <sys/resource.h>
69
70+#include "hw/xen/xen-hvm-common.h"
71 #include "hw/xen/xen_native.h"
72+#include "hw/xen/xen_pvdev.h"
73 #include "qemu/bitmap.h"
74
75 #include "sysemu/runstate.h"
76@@ -597,3 +599,28 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
77 mapcache_unlock();
78 return p;
79 }
80+
81+MemoryRegion *xen_init_grant_ram(void)
82+{
83+ RAMBlock *block;
84+
85+ memory_region_init(&ram_grants, NULL, "xen.grants",
86+ XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE);
87+ block = g_malloc0(sizeof(*block));
88+ block->mr = &ram_grants;
89+ block->used_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE;
90+ block->max_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE;
91+ block->fd = -1;
92+ block->page_size = XC_PAGE_SIZE;
93+ block->host = (void *)XEN_GRANT_ADDR_OFF;
94+ block->offset = XEN_GRANT_ADDR_OFF;
95+ block->flags = RAM_PREALLOC;
96+ ram_grants.ram_block = block;
97+ ram_grants.ram = true;
98+ ram_grants.terminates = true;
99+ ram_block_add_list(block);
100+ memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF,
101+ &ram_grants);
102+
103+ return &ram_grants;
104+}
105diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h
106index 4e9904f1a6..0d300ba898 100644
107--- a/include/hw/xen/xen-hvm-common.h
108+++ b/include/hw/xen/xen-hvm-common.h
109@@ -17,6 +17,8 @@
110 #include <xen/hvm/ioreq.h>
111
112 extern MemoryRegion ram_memory;
113+
114+extern MemoryRegion ram_grants;
115 extern MemoryListener xen_io_listener;
116 extern DeviceListener xen_device_listener;
117
118diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
119index ddad4b9f36..0f1b5edfa9 100644
120--- a/include/hw/xen/xen_pvdev.h
121+++ b/include/hw/xen/xen_pvdev.h
122@@ -80,4 +80,7 @@ int xen_pv_send_notify(struct XenLegacyDevice *xendev);
123 void xen_pv_printf(struct XenLegacyDevice *xendev, int msg_level,
124 const char *fmt, ...) G_GNUC_PRINTF(3, 4);
125
126+#define XEN_GRANT_ADDR_OFF 0x8000000000000000ULL
127+#define XEN_MAX_VIRTIO_GRANTS 65536
128+
129 #endif /* QEMU_HW_XEN_PVDEV_H */
130diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h
131index c8e7c2f6cf..f4bedb1c11 100644
132--- a/include/sysemu/xen-mapcache.h
133+++ b/include/sysemu/xen-mapcache.h
134@@ -10,6 +10,7 @@
135 #define XEN_MAPCACHE_H
136
137 #include "exec/cpu-common.h"
138+#include "exec/ram_addr.h"
139
140 typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset,
141 ram_addr_t size);
142@@ -25,6 +26,8 @@ void xen_invalidate_map_cache(void);
143 uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
144 hwaddr new_phys_addr,
145 hwaddr size);
146+MemoryRegion *xen_init_grant_ram(void);
147+
148 #else
149
150 static inline void xen_map_cache_init(phys_offset_to_gaddr_t f,
151--
1522.39.2
153
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch
new file mode 100644
index 00000000..ee400e2c
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch
@@ -0,0 +1,117 @@
1From 82139e7e4bdcf5ca51b2ac90c63e4af699e3eb6f Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 11:54:48 +0200
4Subject: [PATCH 07/11] softmmu: let qemu_map_ram_ptr() use
5 qemu_ram_ptr_length()
6
7qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so
8modify qemu_ram_ptr_length() a little bit and use it for
9qemu_map_ram_ptr(), too.
10
11Signed-off-by: Juergen Gross <jgross@suse.com>
12Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
13Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
14---
15 softmmu/physmem.c | 58 +++++++++++++++++++----------------------------
16 1 file changed, 23 insertions(+), 35 deletions(-)
17
18diff --git a/softmmu/physmem.c b/softmmu/physmem.c
19index f73629733e..a934e44fe7 100644
20--- a/softmmu/physmem.c
21+++ b/softmmu/physmem.c
22@@ -2123,38 +2123,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length)
23 }
24 #endif /* !_WIN32 */
25
26-/* Return a host pointer to ram allocated with qemu_ram_alloc.
27- * This should not be used for general purpose DMA. Use address_space_map
28- * or address_space_rw instead. For local memory (e.g. video ram) that the
29- * device owns, use memory_region_get_ram_ptr.
30- *
31- * Called within RCU critical section.
32- */
33-void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
34-{
35- RAMBlock *block = ram_block;
36-
37- if (block == NULL) {
38- block = qemu_get_ram_block(addr);
39- addr -= block->offset;
40- }
41-
42- if (xen_enabled() && block->host == NULL) {
43- /* We need to check if the requested address is in the RAM
44- * because we don't want to map the entire memory in QEMU.
45- * In that case just map until the end of the page.
46- */
47- if (block->offset == 0) {
48- return xen_map_cache(addr, 0, 0, false);
49- }
50-
51- block->host = xen_map_cache(block->offset, block->max_length, 1, false);
52- }
53- return ramblock_ptr(block, addr);
54-}
55-
56-/* Return a host pointer to guest's ram. Similar to qemu_map_ram_ptr
57- * but takes a size argument.
58+/*
59+ * Return a host pointer to guest's ram.
60 *
61 * Called within RCU critical section.
62 */
63@@ -2162,7 +2132,9 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
64 hwaddr *size, bool lock)
65 {
66 RAMBlock *block = ram_block;
67- if (*size == 0) {
68+ hwaddr len = 0;
69+
70+ if (size && *size == 0) {
71 return NULL;
72 }
73
74@@ -2170,7 +2142,10 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
75 block = qemu_get_ram_block(addr);
76 addr -= block->offset;
77 }
78- *size = MIN(*size, block->max_length - addr);
79+ if (size) {
80+ *size = MIN(*size, block->max_length - addr);
81+ len = *size;
82+ }
83
84 if (xen_enabled() && block->host == NULL) {
85 /* We need to check if the requested address is in the RAM
86@@ -2178,7 +2153,7 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
87 * In that case just map the requested area.
88 */
89 if (block->offset == 0) {
90- return xen_map_cache(addr, *size, lock, lock);
91+ return xen_map_cache(addr, len, lock, lock);
92 }
93
94 block->host = xen_map_cache(block->offset, block->max_length, 1, lock);
95@@ -2187,6 +2162,19 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr,
96 return ramblock_ptr(block, addr);
97 }
98
99+/*
100+ * Return a host pointer to ram allocated with qemu_ram_alloc.
101+ * This should not be used for general purpose DMA. Use address_space_map
102+ * or address_space_rw instead. For local memory (e.g. video ram) that the
103+ * device owns, use memory_region_get_ram_ptr.
104+ *
105+ * Called within RCU critical section.
106+ */
107+void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr)
108+{
109+ return qemu_ram_ptr_length(ram_block, addr, NULL, false);
110+}
111+
112 /* Return the offset of a hostpointer within a ramblock */
113 ram_addr_t qemu_ram_block_host_offset(RAMBlock *rb, void *host)
114 {
115--
1162.39.2
117
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch
new file mode 100644
index 00000000..c1e9abd9
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch
@@ -0,0 +1,49 @@
1From 857bcafe8beb5a0cd78c070f432108049661a56d Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 20 May 2021 13:31:32 +0200
4Subject: [PATCH 08/11] xen: let xen_ram_addr_from_mapcache() return -1 in case
5 of not found entry
6
7Today xen_ram_addr_from_mapcache() will either abort() or return 0 in
8case it can't find a matching entry for a pointer value. Both cases
9are bad, so change that to return an invalid address instead.
10
11Signed-off-by: Juergen Gross <jgross@suse.com>
12Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
13---
14 hw/xen/xen-mapcache.c | 12 +++---------
15 1 file changed, 3 insertions(+), 9 deletions(-)
16
17diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
18index 8115c44c00..8a61c7dde6 100644
19--- a/hw/xen/xen-mapcache.c
20+++ b/hw/xen/xen-mapcache.c
21@@ -404,13 +404,8 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
22 }
23 }
24 if (!found) {
25- fprintf(stderr, "%s, could not find %p\n", __func__, ptr);
26- QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) {
27- DPRINTF(" "HWADDR_FMT_plx" -> %p is present\n", reventry->paddr_index,
28- reventry->vaddr_req);
29- }
30- abort();
31- return 0;
32+ mapcache_unlock();
33+ return RAM_ADDR_INVALID;
34 }
35
36 entry = &mapcache->entry[paddr_index % mapcache->nr_buckets];
37@@ -418,8 +413,7 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
38 entry = entry->next;
39 }
40 if (!entry) {
41- DPRINTF("Trying to find address %p that is not in the mapcache!\n", ptr);
42- raddr = 0;
43+ raddr = RAM_ADDR_INVALID;
44 } else {
45 raddr = (reventry->paddr_index << MCACHE_BUCKET_SHIFT) +
46 ((unsigned long) ptr - (unsigned long) entry->vaddr_base);
47--
482.39.2
49
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch
new file mode 100644
index 00000000..fa18ef16
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch
@@ -0,0 +1,155 @@
1From 364a11be6274336ec9b0f06f3272f964d27c9349 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Thu, 27 May 2021 15:27:55 +0200
4Subject: [PATCH 09/11] memory: add MemoryRegion map and unmap callbacks
5
6In order to support mapping and unmapping guest memory dynamically to
7and from qemu during address_space_[un]map() operations add the map()
8and unmap() callbacks to MemoryRegionOps.
9
10Those will be used e.g. for Xen grant mappings when performing guest
11I/Os.
12
13Signed-off-by: Juergen Gross <jgross@suse.com>
14Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
15---
16 include/exec/memory.h | 21 ++++++++++++++++++
17 softmmu/physmem.c | 50 +++++++++++++++++++++++++++++++++----------
18 2 files changed, 60 insertions(+), 11 deletions(-)
19
20diff --git a/include/exec/memory.h b/include/exec/memory.h
21index 68284428f8..55414417ab 100644
22--- a/include/exec/memory.h
23+++ b/include/exec/memory.h
24@@ -274,6 +274,27 @@ struct MemoryRegionOps {
25 unsigned size,
26 MemTxAttrs attrs);
27
28+ /*
29+ * Dynamically create mapping. @addr is the guest address to map; @plen
30+ * is the pointer to the usable length of the buffer.
31+ * @mr contents can be changed in case a new memory region is created for
32+ * the mapping.
33+ * Returns the buffer address for accessing the data.
34+ */
35+ void *(*map)(MemoryRegion **mr,
36+ hwaddr addr,
37+ hwaddr *plen,
38+ bool is_write,
39+ MemTxAttrs attrs);
40+
41+ /* Unmap an area obtained via map() before. */
42+ void (*unmap)(MemoryRegion *mr,
43+ void *buffer,
44+ ram_addr_t addr,
45+ hwaddr len,
46+ bool is_write,
47+ hwaddr access_len);
48+
49 enum device_endian endianness;
50 /* Guest-visible constraints: */
51 struct {
52diff --git a/softmmu/physmem.c b/softmmu/physmem.c
53index a934e44fe7..a1e2030424 100644
54--- a/softmmu/physmem.c
55+++ b/softmmu/physmem.c
56@@ -3070,6 +3070,7 @@ void *address_space_map(AddressSpace *as,
57 hwaddr len = *plen;
58 hwaddr l, xlat;
59 MemoryRegion *mr;
60+ void *ptr = NULL;
61 FlatView *fv;
62
63 if (len == 0) {
64@@ -3103,12 +3104,20 @@ void *address_space_map(AddressSpace *as,
65 return bounce.buffer;
66 }
67
68-
69 memory_region_ref(mr);
70+
71+ if (mr->ops && mr->ops->map) {
72+ ptr = mr->ops->map(&mr, addr, plen, is_write, attrs);
73+ }
74+
75 *plen = flatview_extend_translation(fv, addr, len, mr, xlat,
76 l, is_write, attrs);
77 fuzz_dma_read_cb(addr, *plen, mr);
78- return qemu_ram_ptr_length(mr->ram_block, xlat, plen, true);
79+ if (ptr == NULL) {
80+ ptr = qemu_ram_ptr_length(mr->ram_block, xlat, plen, true);
81+ }
82+
83+ return ptr;
84 }
85
86 /* Unmaps a memory region previously mapped by address_space_map().
87@@ -3124,11 +3133,16 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
88
89 mr = memory_region_from_host(buffer, &addr1);
90 assert(mr != NULL);
91- if (is_write) {
92- invalidate_and_set_dirty(mr, addr1, access_len);
93- }
94- if (xen_enabled()) {
95- xen_invalidate_map_cache_entry(buffer);
96+
97+ if (mr->ops && mr->ops->unmap) {
98+ mr->ops->unmap(mr, buffer, addr1, len, is_write, access_len);
99+ } else {
100+ if (is_write) {
101+ invalidate_and_set_dirty(mr, addr1, access_len);
102+ }
103+ if (xen_enabled()) {
104+ xen_invalidate_map_cache_entry(buffer);
105+ }
106 }
107 memory_region_unref(mr);
108 return;
109@@ -3201,10 +3215,18 @@ int64_t address_space_cache_init(MemoryRegionCache *cache,
110 * doing this if we found actual RAM, which behaves the same
111 * regardless of attributes; so UNSPECIFIED is fine.
112 */
113+ if (mr->ops && mr->ops->map) {
114+ cache->ptr = mr->ops->map(&mr, addr, &l, is_write,
115+ MEMTXATTRS_UNSPECIFIED);
116+ }
117+
118 l = flatview_extend_translation(cache->fv, addr, len, mr,
119 cache->xlat, l, is_write,
120 MEMTXATTRS_UNSPECIFIED);
121- cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l, true);
122+ if (!cache->ptr) {
123+ cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l,
124+ true);
125+ }
126 } else {
127 cache->ptr = NULL;
128 }
129@@ -3226,14 +3248,20 @@ void address_space_cache_invalidate(MemoryRegionCache *cache,
130
131 void address_space_cache_destroy(MemoryRegionCache *cache)
132 {
133- if (!cache->mrs.mr) {
134+ MemoryRegion *mr = cache->mrs.mr;
135+
136+ if (!mr) {
137 return;
138 }
139
140- if (xen_enabled()) {
141+ if (mr->ops && mr->ops->unmap) {
142+ mr->ops->unmap(mr, cache->ptr, cache->xlat, cache->len,
143+ cache->is_write, cache->len);
144+ } else if (xen_enabled()) {
145 xen_invalidate_map_cache_entry(cache->ptr);
146 }
147- memory_region_unref(cache->mrs.mr);
148+
149+ memory_region_unref(mr);
150 flatview_unref(cache->fv);
151 cache->mrs.mr = NULL;
152 cache->fv = NULL;
153--
1542.39.2
155
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch
new file mode 100644
index 00000000..48dcf7d7
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch
@@ -0,0 +1,262 @@
1From 90496d4c71e3b9334aebca118661bf72631ed0f0 Mon Sep 17 00:00:00 2001
2From: Juergen Gross <jgross@suse.com>
3Date: Fri, 26 Aug 2022 13:57:06 +0200
4Subject: [PATCH 10/11] xen: add map and unmap callbacks for grant region
5
6Add the callbacks for mapping/unmapping guest memory via grants to the
7special grant memory region.
8
9Signed-off-by: Juergen Gross <jgross@suse.com>
10Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
11---
12 hw/xen/xen-mapcache.c | 176 +++++++++++++++++++++++++++++++++++++++++-
13 softmmu/physmem.c | 11 ++-
14 2 files changed, 182 insertions(+), 5 deletions(-)
15
16diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c
17index 8a61c7dde6..e071328fc5 100644
18--- a/hw/xen/xen-mapcache.c
19+++ b/hw/xen/xen-mapcache.c
20@@ -9,6 +9,8 @@
21 */
22
23 #include "qemu/osdep.h"
24+#include "qemu/queue.h"
25+#include "qemu/thread.h"
26 #include "qemu/units.h"
27 #include "qemu/error-report.h"
28
29@@ -23,6 +25,8 @@
30 #include "sysemu/xen-mapcache.h"
31 #include "trace.h"
32
33+#include <xenevtchn.h>
34+#include <xengnttab.h>
35
36 //#define MAPCACHE_DEBUG
37
38@@ -385,7 +389,7 @@ uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size,
39 return p;
40 }
41
42-ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
43+static ram_addr_t xen_ram_addr_from_mapcache_try(void *ptr)
44 {
45 MapCacheEntry *entry = NULL;
46 MapCacheRev *reventry;
47@@ -594,10 +598,179 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr,
48 return p;
49 }
50
51+struct XENMappedGrantRegion {
52+ void *addr;
53+ unsigned int pages;
54+ unsigned int refs;
55+ unsigned int prot;
56+ uint32_t idx;
57+ QLIST_ENTRY(XENMappedGrantRegion) list;
58+};
59+
60+static xengnttab_handle *xen_region_gnttabdev;
61+static QLIST_HEAD(GrantRegionList, XENMappedGrantRegion) xen_grant_mappings =
62+ QLIST_HEAD_INITIALIZER(xen_grant_mappings);
63+static QemuMutex xen_map_mutex;
64+
65+static void *xen_map_grant_dyn(MemoryRegion **mr, hwaddr addr, hwaddr *plen,
66+ bool is_write, MemTxAttrs attrs)
67+{
68+ unsigned int page_off = addr & (XC_PAGE_SIZE - 1);
69+ unsigned int i;
70+ unsigned int total_grants = 0;
71+ unsigned int nrefs = (page_off + *plen + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
72+ uint32_t ref = (addr - XEN_GRANT_ADDR_OFF) >> XC_PAGE_SHIFT;
73+ uint32_t *refs = NULL;
74+ unsigned int prot = PROT_READ;
75+ struct XENMappedGrantRegion *mgr = NULL;
76+
77+ if (is_write) {
78+ prot |= PROT_WRITE;
79+ }
80+
81+ qemu_mutex_lock(&xen_map_mutex);
82+
83+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
84+ if (mgr->idx == ref &&
85+ mgr->pages == nrefs &&
86+ (mgr->prot & prot) == prot) {
87+ break;
88+ }
89+
90+ total_grants += mgr->pages;
91+ }
92+
93+ if (!mgr) {
94+ if (nrefs + total_grants >= XEN_MAX_VIRTIO_GRANTS) {
95+ qemu_mutex_unlock(&xen_map_mutex);
96+ return NULL;
97+ }
98+
99+ mgr = g_new(struct XENMappedGrantRegion, 1);
100+
101+ if (nrefs == 1) {
102+ refs = &ref;
103+ } else {
104+ refs = g_new(uint32_t, nrefs);
105+ for (i = 0; i < nrefs; i++) {
106+ refs[i] = ref + i;
107+ }
108+ }
109+ mgr->addr = xengnttab_map_domain_grant_refs(xen_region_gnttabdev, nrefs,
110+ xen_domid, refs, prot);
111+ if (mgr->addr) {
112+ mgr->pages = nrefs;
113+ mgr->refs = 1;
114+ mgr->prot = prot;
115+ mgr->idx = ref;
116+
117+ QLIST_INSERT_HEAD(&xen_grant_mappings, mgr, list);
118+ } else {
119+ g_free(mgr);
120+ mgr = NULL;
121+ }
122+ } else {
123+ mgr->refs++;
124+ }
125+
126+ qemu_mutex_unlock(&xen_map_mutex);
127+
128+ if (nrefs > 1) {
129+ g_free(refs);
130+ }
131+
132+ return mgr ? mgr->addr + page_off : NULL;
133+}
134+
135+static void xen_unmap_grant_dyn(MemoryRegion *mr, void *buffer, ram_addr_t addr,
136+ hwaddr len, bool is_write, hwaddr access_len)
137+{
138+ unsigned int page_off = (unsigned long)buffer & (XC_PAGE_SIZE - 1);
139+ unsigned int nrefs = (page_off + len + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
140+ unsigned int prot = PROT_READ;
141+ struct XENMappedGrantRegion *mgr = NULL;
142+
143+ if (is_write) {
144+ prot |= PROT_WRITE;
145+ }
146+
147+ qemu_mutex_lock(&xen_map_mutex);
148+
149+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
150+ if (mgr->addr == buffer - page_off &&
151+ mgr->pages == nrefs &&
152+ (mgr->prot & prot) == prot) {
153+ break;
154+ }
155+ }
156+ if (mgr) {
157+ mgr->refs--;
158+ if (!mgr->refs) {
159+ xengnttab_unmap(xen_region_gnttabdev, mgr->addr, nrefs);
160+
161+ QLIST_REMOVE(mgr, list);
162+ g_free(mgr);
163+ }
164+ } else {
165+ error_report("xen_unmap_grant_dyn() trying to unmap unknown buffer");
166+ }
167+
168+ qemu_mutex_unlock(&xen_map_mutex);
169+}
170+
171+static ram_addr_t xen_ram_addr_from_grant_cache(void *ptr)
172+{
173+ unsigned int page_off = (unsigned long)ptr & (XC_PAGE_SIZE - 1);
174+ struct XENMappedGrantRegion *mgr = NULL;
175+ ram_addr_t raddr = RAM_ADDR_INVALID;
176+
177+ qemu_mutex_lock(&xen_map_mutex);
178+
179+ QLIST_FOREACH(mgr, &xen_grant_mappings, list) {
180+ if (mgr->addr == ptr - page_off) {
181+ break;
182+ }
183+ }
184+
185+ if (mgr) {
186+ raddr = (mgr->idx << XC_PAGE_SHIFT) + page_off + XEN_GRANT_ADDR_OFF;
187+ }
188+
189+ qemu_mutex_unlock(&xen_map_mutex);
190+
191+ return raddr;
192+}
193+
194+ram_addr_t xen_ram_addr_from_mapcache(void *ptr)
195+{
196+ ram_addr_t raddr;
197+
198+ raddr = xen_ram_addr_from_mapcache_try(ptr);
199+ if (raddr == RAM_ADDR_INVALID) {
200+ raddr = xen_ram_addr_from_grant_cache(ptr);
201+ }
202+
203+ return raddr;
204+}
205+
206+static const struct MemoryRegionOps xen_grant_mr_ops = {
207+ .map = xen_map_grant_dyn,
208+ .unmap = xen_unmap_grant_dyn,
209+ .endianness = DEVICE_LITTLE_ENDIAN,
210+};
211+
212 MemoryRegion *xen_init_grant_ram(void)
213 {
214 RAMBlock *block;
215
216+ qemu_mutex_init(&xen_map_mutex);
217+
218+ xen_region_gnttabdev = xengnttab_open(NULL, 0);
219+ if (xen_region_gnttabdev == NULL) {
220+ fprintf(stderr, "can't open gnttab device\n");
221+ return NULL;
222+ }
223+
224 memory_region_init(&ram_grants, NULL, "xen.grants",
225 XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE);
226 block = g_malloc0(sizeof(*block));
227@@ -612,6 +785,7 @@ MemoryRegion *xen_init_grant_ram(void)
228 ram_grants.ram_block = block;
229 ram_grants.ram = true;
230 ram_grants.terminates = true;
231+ ram_grants.ops = &xen_grant_mr_ops;
232 ram_block_add_list(block);
233 memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF,
234 &ram_grants);
235diff --git a/softmmu/physmem.c b/softmmu/physmem.c
236index a1e2030424..e1057304f1 100644
237--- a/softmmu/physmem.c
238+++ b/softmmu/physmem.c
239@@ -2210,13 +2210,16 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
240
241 if (xen_enabled()) {
242 ram_addr_t ram_addr;
243+
244 RCU_READ_LOCK_GUARD();
245 ram_addr = xen_ram_addr_from_mapcache(ptr);
246- block = qemu_get_ram_block(ram_addr);
247- if (block) {
248- *offset = ram_addr - block->offset;
249+ if (ram_addr != RAM_ADDR_INVALID) {
250+ block = qemu_get_ram_block(ram_addr);
251+ if (block) {
252+ *offset = ram_addr - block->offset;
253+ }
254+ return block;
255 }
256- return block;
257 }
258
259 RCU_READ_LOCK_GUARD();
260--
2612.39.2
262
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch
new file mode 100644
index 00000000..fb5450e6
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch
@@ -0,0 +1,30 @@
1From b1eaba758a9000061fc53a934c348d6ef8dcdf64 Mon Sep 17 00:00:00 2001
2From: Vikram Garhwal <vikram.garhwal@amd.com>
3Date: Tue, 31 Jan 2023 21:46:43 +0000
4Subject: [PATCH 11/11] hw: arm: Add grant mapping.
5
6Enable grant ram mapping support for Xenpvh machine on ARM.
7
8Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
9Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
10---
11 hw/arm/xen_arm.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
15index a5631529d0..1587e2a43b 100644
16--- a/hw/arm/xen_arm.c
17+++ b/hw/arm/xen_arm.c
18@@ -127,6 +127,9 @@ static void xen_init_ram(MachineState *machine)
19 DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n",
20 GUEST_RAM1_BASE, ram_size[1]);
21 }
22+
23+ DPRINTF("init grant ram mapping for XEN\n");
24+ ram_grants = *xen_init_grant_ram();
25 }
26
27 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
28--
292.39.2
30
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend
new file mode 100644
index 00000000..e84844cf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend
@@ -0,0 +1 @@
require qemu-tpm.inc
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend
new file mode 100644
index 00000000..e84844cf
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend
@@ -0,0 +1 @@
require qemu-tpm.inc
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend
new file mode 100644
index 00000000..5cb9f0d0
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend
@@ -0,0 +1,5 @@
1require qemu-tpm.inc
2require qemu-xen_7.1.inc
3
4# We do not want QEMU, on the target to be configured with OpenGL
5PACKAGECONFIG:remove:class-target = "virglrenderer epoxy gtk+"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend
new file mode 100644
index 00000000..2f8e55aa
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend
@@ -0,0 +1,5 @@
1require qemu-tpm.inc
2require qemu-xen_8.1.inc
3
4# We do not want QEMU, on the target to be configured with OpenGL
5PACKAGECONFIG:remove:class-target:petalinux = "virglrenderer epoxy gtk+"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_7.1%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_7.1%.bbappend
new file mode 100644
index 00000000..5cb9f0d0
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_7.1%.bbappend
@@ -0,0 +1,5 @@
1require qemu-tpm.inc
2require qemu-xen_7.1.inc
3
4# We do not want QEMU, on the target to be configured with OpenGL
5PACKAGECONFIG:remove:class-target = "virglrenderer epoxy gtk+"
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend
new file mode 100644
index 00000000..95b1902b
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend
@@ -0,0 +1,5 @@
1require qemu-tpm.inc
2require qemu-xen_8.1.inc
3
4# We do not want QEMU, on the target to be configured with OpenGL
5PACKAGECONFIG:remove:class-target = "virglrenderer epoxy gtk+"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch
new file mode 100644
index 00000000..135860ab
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch
@@ -0,0 +1,57 @@
1From b300c18ab899b3c899e5405c96c20a32e51d77c8 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@windriver.com>
3Date: Mon, 2 Jul 2018 23:10:28 -0400
4Subject: [PATCH] xen: Fix menuconfig and add support for config fragments and
5
6Upstream-Status: Xen: Inappropriate [oe specific, cross compile issue]
7Upstream-Status: Kernel: Pending
8Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
9commit e6972e689a980ab28637e94e48c77eeace6abde5
10
11 xen/kconfig,menuconfig,mconf-cfg: Allow specification of ncurses location
12
13 In some cross build environments such as the Yocto Project build
14 environment it provides an ncurses library that is compiled
15 differently than the host's version. This causes display corruption
16 problems when the host's curses includes are used instead of the
17 includes from the provided compiler are overridden. There is a second
18 case where there is no curses libraries at all on the host system and
19 menuconfig will just fail entirely.
20
21 The solution is simply to allow an override variable in
22 check-lxdialog.sh for environments such as the Yocto Project. Adding
23 a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing
24 compiling and linking against the right headers and libraries.
25
26 Change-Id: Ibe8dfafc90655e3be2671dbbb0cb7f5631fc4d44
27 Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
28 cc: Michal Marek <mmarek@suse.cz>
29 cc: linux-kbuild@vger.kernel.org
30 Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
31
32---
33 xen/tools/kconfig/mconf-cfg.sh | 8 ++++++++
34 1 file changed, 8 insertions(+)
35 mode change 100755 => 100644 xen/tools/kconfig/mconf-cfg.sh
36
37diff --git a/xen/tools/kconfig/mconf-cfg.sh b/xen/tools/kconfig/mconf-cfg.sh
38old mode 100755
39new mode 100644
40index c812872d7f..56eb4fc79f
41--- a/xen/tools/kconfig/mconf-cfg.sh
42+++ b/xen/tools/kconfig/mconf-cfg.sh
43@@ -4,6 +4,14 @@
44 PKG="ncursesw"
45 PKG2="ncurses"
46
47+if [ "$CROSS_CURSES_LIB" != "" ]; then
48+ echo libs=\'$CROSS_CURSES_LIB\'
49+ if [ x"$CROSS_CURSES_INC" != x ]; then
50+ echo cflags=\'$CROSS_CURSES_INC\'
51+ fi
52+ exit 0
53+fi
54+
55 if [ -n "$(command -v pkg-config)" ]; then
56 if pkg-config --exists $PKG; then
57 echo cflags=\"$(pkg-config --cflags $PKG)\"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
new file mode 100644
index 00000000..35cd9a81
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
@@ -0,0 +1,73 @@
1From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001
2Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com>
3From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
4Date: Fri, 19 Oct 2018 11:01:37 +0200
5Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args
6
7Upstream-Status: Xen: Inappropriate [oe specific, python install issues]
8
9Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
10as well as other parameters set by the OpenEmbedded build system.
11This is especially useful when the target libdir is not the default one
12(/usr/lib), but for example /usr/lib64.
13
14Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
15
16Forward-ported to Xen 4.12.0
17Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
18
19Modified to support pygrub installation with python 3
20Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
21
22Forward-ported to Xen 4.14.0
23Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
24
25Forward-ported to Xen 4.15.0
26Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
27
28---
29 tools/pygrub/Makefile | 7 +++++--
30 tools/python/Makefile | 2 +-
31 2 files changed, 6 insertions(+), 3 deletions(-)
32
33diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
34index 37b2146214..ffb9270065 100644
35--- a/tools/pygrub/Makefile
36+++ b/tools/pygrub/Makefile
37@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
38 all: build
39 .PHONY: build
40 build:
41- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
42+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
43
44 .PHONY: install
45 install: all
46@@ -18,7 +18,10 @@ install: all
47 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
48 LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
49 --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
50- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
51+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
52+ $(DISTUTILS_INSTALL_ARGS)
53+ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
54+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
55 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
56 "`readlink -f $(DESTDIR)/$(bindir)`" != \
57 "`readlink -f $(LIBEXEC_BIN)`" ]; then \
58diff --git a/tools/python/Makefile b/tools/python/Makefile
59index cc76423647..5cb11ae453 100644
60--- a/tools/python/Makefile
61+++ b/tools/python/Makefile
62@@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
63 SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \
64 SHLIB_libxenguest="$(SHLIB_libxenguest)" \
65 SHLIB_libxenstore="$(SHLIB_libxenstore)" \
66- $(PYTHON) setup.py
67+ $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS)
68
69 .PHONY: build
70 build:
71--
722.17.1
73
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch
new file mode 100644
index 00000000..7ac1a399
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Pending
2
3diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
4index 4963bc89c6..c1c05eb421 100644
5--- a/tools/pygrub/Makefile
6+++ b/tools/pygrub/Makefile
7@@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
8 all: build
9 .PHONY: build
10 build:
11- $(setup.py) build
12+ $(setup.py) build $(DISTUTILS_BUILD_ARGS)
13
14 .PHONY: install
15 install: all
16 $(INSTALL_DIR) $(DESTDIR)/$(bindir)
17 $(INSTALL_DIR) $(DESTDIR)/$(LIBEXEC_BIN)
18 $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
19- --root="$(DESTDIR)" --force
20+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
21 $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
22 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
23 "`readlink -f $(DESTDIR)/$(bindir)`" != \
24diff --git a/tools/python/Makefile b/tools/python/Makefile
25index 437431c48e..0a99c2067e 100644
26--- a/tools/python/Makefile
27+++ b/tools/python/Makefile
28@@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
29
30 .PHONY: build
31 build:
32- $(setup.py) build
33+ $(setup.py) build $(DISTUTILS_BUILD_ARGS)
34
35 .PHONY: install
36 install:
37 $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
38 $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
39- --root="$(DESTDIR)" --force
40+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
41 $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
42 $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
43
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch
new file mode 100644
index 00000000..fa2a82ff
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch
@@ -0,0 +1,54 @@
1From mboxrd@z Thu Jan 1 00:00:00 1970
2From: Anthony PERARD <anthony.perard@citrix.com>
3Subject: [XEN PATCH] build: fix building flask headers before descending in flask/ss/
4Date: Fri, 20 Jan 2023 13:36:26 +0000
5Message-ID: <20230120133626.55680-1-anthony.perard@citrix.com>
6X-Mailer: git-send-email 2.30.2
7MIME-Version: 1.0
8Content-Transfer-Encoding: 8bit
9Content-Type: text/plain
10
11Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't
12work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk.
13So, make is allow to try to build objects in "xsm/flask/ss/" before
14generating the headers.
15
16Adding a prerequisite on "$(obj)/ss" instead will fix the issue has
17that the target used to run make in this subdirectory.
18
19Unfortunatly, that target is also used when running `make clean`, so
20we need to ignore it in this case. $(MAKECMDGOALS) can't be used in
21this case as it is empty, but we can guess which operation is done by
22looking at the list of loaded makefiles.
23
24Upstream-Status: backport [https://lore.kernel.org/xen-devel/20230120133626.55680-1-anthony.perard@citrix.com/T/#u]
25
26Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use obj=$subdir")
27Reported-by: "Daniel P. Smith" <dpsmith@apertussolutions.com>
28Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
29---
30 xen/xsm/flask/Makefile | 6 +++++-
31 1 file changed, 5 insertions(+), 1 deletion(-)
32
33diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile
34index d25312f4fa..2d24346ee3 100644
35--- a/xen/xsm/flask/Makefile
36+++ b/xen/xsm/flask/Makefile
37@@ -16,7 +16,11 @@ FLASK_H_FILES := flask.h class_to_string.h initial_sid_to_string.h
38 AV_H_FILES := av_perm_to_string.h av_permissions.h
39 ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES))
40
41-$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(ALL_H_FILES))
42+# Adding prerequisite to descending into ss/ folder only when not running `make
43+# clean`.
44+ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),)
45+$(addprefix $(obj)/,$(obj-y)) $(obj)/ss: $(addprefix $(obj)/,$(ALL_H_FILES))
46+endif
47 extra-y += $(ALL_H_FILES)
48
49 mkflask := $(srcdir)/policy/mkflask.sh
50--
51Anthony PERARD
52
53
54
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc
new file mode 100644
index 00000000..fb0093e3
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-arch.inc
@@ -0,0 +1,18 @@
1
2valid_xen_archs = " \
3 x86_64 x86_32 \
4 arm32 arm64 \
5 "
6
7def map_xen_arch(a, d):
8 import re
9 valid_archs = d.getVar('valid_xen_archs').split()
10
11 if re.match("i.86", a): return "x86_32"
12 elif re.match("x86.64", a): return "x86_64"
13 elif re.match("arm.*", a): return "arm32"
14 elif re.match("aarch64.*", a): return "arm64"
15 elif a in valid_archs: return a
16 else:
17 return "INVALID"
18
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc
new file mode 100644
index 00000000..ad9d5fdb
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-blktap.inc
@@ -0,0 +1,76 @@
1# The Xen block tap components are packaged separately here to support
2# the option to build them in a separate recipe from xen-tools.
3
4BLKTAP_PACKAGES ?= " \
5 ${PN}-blktap \
6 ${PN}-libblktap \
7 ${PN}-libblktapctl \
8 ${PN}-libblktapctl-dev \
9 ${PN}-libblktap-dev \
10 ${PN}-libvhd \
11 ${PN}-libvhd-dev \
12 ${PN}-blktap-staticdev \
13 "
14
15BLKTAP_PROVIDES ?= " \
16 virtual/blktap \
17 virtual/libblktap \
18 virtual/libblktapctl \
19 virtual/libvhd \
20 "
21
22BLKTAP_RRECOMMENDS ?= " \
23 virtual/blktap \
24 virtual/libblktap \
25 virtual/libblktapctl \
26 virtual/libvhd \
27 "
28
29RPROVIDES:${PN}-blktap = "virtual/blktap"
30RPROVIDES:${PN}-libblktap = "virtual/libblktap"
31RPROVIDES:${PN}-libblktapctl = "virtual/libblktapctl"
32RPROVIDES:${PN}-libvhd = "virtual/libvhd"
33
34FILES:${PN}-blktap-staticdev += "\
35 ${libdir}/libblktapctl.a \
36 ${libdir}/libvhd.a \
37 ${libdir}/libblktap.a \
38 "
39
40FILES:${PN}-libblktapctl = "${libdir}/libblktapctl.so.*"
41FILES:${PN}-libblktapctl-dev = " \
42 ${libdir}/libblktapctl.so \
43 ${libdir}/pkgconfig/xenblktapctl.pc \
44 ${datadir}/pkgconfig/xenblktapctl.pc \
45 "
46
47FILES:${PN}-libvhd = "${libdir}/libvhd.so.*"
48FILES:${PN}-libvhd-dev = " \
49 ${libdir}/libvhd.so \
50 ${libdir}/pkgconfig/vhd.pc \
51 ${datadir}/pkgconfig/vhd.pc \
52 "
53
54FILES:${PN}-libblktap = "${libdir}/libblktap.so.*"
55FILES:${PN}-libblktap-dev = " \
56 ${libdir}/libblktap.so \
57 ${libdir}/pkgconfig/blktap.pc \
58 ${datadir}/pkgconfig/blktap.pc \
59 "
60
61FILES:${PN}-blktap = "\
62 ${sbindir}/blktapctrl \
63 ${sbindir}/img2qcow \
64 ${sbindir}/lock-util \
65 ${sbindir}/qcow2raw \
66 ${sbindir}/qcow-create \
67 ${sbindir}/tap-ctl \
68 ${sbindir}/tapdisk \
69 ${sbindir}/tapdisk2 \
70 ${sbindir}/tapdisk-client \
71 ${sbindir}/tapdisk-diff \
72 ${sbindir}/tapdisk-stream \
73 ${sbindir}/td-util \
74 ${sbindir}/vhd-update \
75 ${sbindir}/vhd-util \
76 "
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc
new file mode 100644
index 00000000..6f3d24d0
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-hypervisor.inc
@@ -0,0 +1,117 @@
1SUMMARY = "Xen hypervisor"
2DESCRIPTION = "The Xen hypervisor"
3
4# This recipe is for just the Xen hypervisor.
5# Separate recipes are used to build Xen and its components:
6# this allows for varying the target architecture or toolchain used
7# to build the different components. eg. 32-bit tools and a 64-bit hypervisor.
8
9# The Xen hypervisor has a narrower compatible platform range than the Xen tools
10COMPATIBLE_HOST = '(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux-gnueabi'
11
12inherit deploy python3native cml1
13
14PACKAGES = " \
15 ${PN} \
16 ${PN}-dbg \
17 ${PN}-efi \
18 "
19
20FILES:${PN} = " \
21 /boot/xen-* \
22 /boot/xen \
23 /boot/xen-*.gz \
24 /boot/xen.gz \
25 /boot/xen-syms-* \
26 "
27
28FILES:${PN}-dbg += "${libdir}/debug/*"
29
30FILES:${PN}-efi = " \
31 /boot/xen.efi \
32 ${exec_prefix}/lib64/efi/xen* \
33 "
34
35do_configure() {
36 do_configure_common
37
38 # Handle the config fragments
39 cfgs="${@' '.join(find_cfgs(d))}"
40 if [ -n "${cfgs}" ]; then
41 # If .config is not present generate one in order
42 # to use the merge_config.sh
43 if [ ! -f "${S}/xen/.config" ] ; then
44 oe_runmake -C ${S}/xen defconfig
45 fi
46 ${S}/xen/tools/kconfig/merge_config.sh -m -O \
47 ${S}/xen ${S}/xen/.config "${cfgs}"
48 fi
49}
50
51# The hypervisor binary for arm must not be built with the hard floating point
52# ABI. Override CC and CPP when invoking make so that they do not contain
53# TUNE_CCARGS.
54EXTRA_OEMAKE:arm += "CC='${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} \
55 ${CC_REPRODUCIBLE_OPTIONS}' \
56 CPP='${CCACHE}${HOST_PREFIX}gcc -E ${TOOLCHAIN_OPTIONS} \
57 ${CC_REPRODUCIBLE_OPTIONS}'"
58
59do_compile() {
60 oe_runmake xen PYTHON="${PYTHON}" \
61 EXTRA_CFLAGS_XEN_CORE="${EXTRA_CFLAGS_XEN_CORE}"
62}
63
64do_install() {
65 oe_runmake DESTDIR="${D}" install-xen
66}
67# The do_install also ships files in /boot and /usr/lib64
68SYSROOT_DIRS += "/boot ${exec_prefix}/lib64"
69
70do_deploy() {
71 install -d ${DEPLOYDIR}
72
73 if [ -f ${B}/xen/xen ]; then
74 install -m 0644 ${B}/xen/xen ${DEPLOYDIR}/xen-${MACHINE}
75 fi
76
77 if [ -f ${B}/xen/xen.gz ]; then
78 install -m 0644 ${B}/xen/xen.gz ${DEPLOYDIR}/xen-${MACHINE}.gz
79 fi
80
81 if [ -f ${B}/xen/xen.efi ]; then
82 install -m 0644 ${B}/xen/xen.efi ${DEPLOYDIR}/xen-${MACHINE}.efi
83 fi
84}
85# Scheduling the do_deploy task:
86# - deploy copies files from ${B} that are written during do_compile so must
87# at least run afer that task has completed
88# - the hypervisor binaries may be included in the image filesystem, so we
89# must ensure that the binaries deployed match what is staged in the sysroot:
90# so do_deploy must run after do_populate_sysroot and after do_compile is
91# also needed for when having rm_work and bitbake needs to re-run do_deploy,
92# we ensure that the ${B} is re-generated, otherwise the deploy-xen will be
93# empty
94# - add the task before do_build to ensure that deployment has completed when
95# the recipe build done stamp is written
96addtask deploy after do_compile do_populate_sysroot before do_build
97# To ensure that a deployed hypervisor has matching tools, add a dependency to
98# make sure that the tools have built and been staged:
99do_deploy[depends] += "xen-tools:do_populate_sysroot"
100# Also ensure anything that the tools recipe needs to deploy, such as a
101# XSM policy file, has been deployed first:
102do_deploy[depends] += "xen-tools:do_deploy"
103
104# Enable use of menuconfig directly from bitbake and also within the devshell
105do_devshell[depends] += "ncurses-native:do_populate_sysroot"
106
107# Pass the native library path for kconfig build when running the do_menuconfig
108# task
109CROSS_CURSES_LIB += "-L${STAGING_LIBDIR_NATIVE}"
110
111# Specify the root dir of the .config file for do_menuconfig and do_diffconfig
112# tasks
113KCONFIG_CONFIG_ROOTDIR = "${S}/xen"
114
115# Xen is setting all CC flags on its own. Make sure that they are not modified
116# for aarch64, e.g. with architecture-specific optimizations.
117TUNE_CCARGS:aarch64=""
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc
new file mode 100644
index 00000000..e7bc8d7e
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc
@@ -0,0 +1,25 @@
1# Only include the sysvinit scripts if sysvinit is enabled.
2do_install:append () {
3 if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then
4 sed -i -e '1c#!/usr/bin/env python3' ${D}/usr/lib/xen/bin/pygrub
5 fi
6
7 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit', '', d)}" != 'sysvinit' ]; then
8 rm -f ${D}/etc/init.d/xendomains
9 rm -f ${D}/etc/init.d/xencommons
10 rm -f ${D}/etc/init.d/xendriverdomain
11 rm -f ${D}/etc/init.d/xen-watchdog
12 fi
13}
14
15# If we're in a hybrid configuration, we want to stop the system from
16# running any Xen sysvinit scripts
17# This has a side effect of, on a hybrid system, if the init manager is
18# sysvinit, the user will need to manually enable Xen.
19INHIBIT_UPDATERCD_BBCLASS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '', d)}"
20
21FILES:${PN} += " \
22 ${libdir}/xen/bin/init-dom0less \
23 ${libdir}/xen/bin/get_overlay \
24 ${libdir}/xen/bin/get_overlay.sh \
25 "
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc
new file mode 100644
index 00000000..f770eec2
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools.inc
@@ -0,0 +1,861 @@
1SUMMARY = "Xen hypervisor tools"
2DESCRIPTION = "Tools and utility software for the Xen hypervisor"
3
4COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux-gnueabi'
5
6inherit setuptools3 update-rc.d systemd deploy
7require xen-blktap.inc
8
9RDEPENDS:${PN} = "\
10 bash perl xz \
11 ${PN}-console \
12 ${PN}-libxenguest \
13 ${PN}-libxenlight \
14 ${PN}-libxenvchan \
15 ${PN}-libxenctrl \
16 ${PN}-libxlutil \
17 ${PN}-libxenstat \
18 ${PN}-libxenstore \
19 ${PN}-libfsimage \
20 ${PN}-fsimage \
21 ${PN}-scripts-block \
22 ${PN}-scripts-network \
23 ${PN}-xen-watchdog \
24 ${PN}-xencommons \
25 ${PN}-xendomains \
26 ${PN}-xenstore \
27 virtual/xenstored \
28 ${PN}-xl \
29 "
30
31RDEPENDS:${PN}-dev = ""
32
33RRECOMMENDS:${PN} = " \
34 qemu \
35 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'seabios ipxe vgabios', '', d)} \
36 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \
37 ${PN}-flask \
38 ${PN}-hvmloader \
39 ${PN}-libxenhypfs \
40 ${PN}-shim \
41 ${PN}-ucode \
42 ${PN}-vchan \
43 ${PN}-xenpaging \
44 ${PN}-xenhypfs \
45 "
46
47RDEPENDS:${PN}-devd = " \
48 ${PN}-xl \
49 "
50
51RDEPENDS:${PN}-fsimage = " \
52 libext2fs \
53 "
54
55RDEPENDS:${PN}-misc = " \
56 perl \
57 python3 \
58 ${PN}-xencov \
59 "
60
61RSUGGESTS:${PN}-misc = " \
62 ${PN}-xencons \
63 ${PN}-xenpvnetboot \
64 "
65
66RDEPENDS:${PN}-python = " \
67 python3 \
68 "
69
70RDEPENDS:${PN}-pygrub = " \
71 python3 \
72 ${PN}-python \
73 "
74
75RDEPENDS:${PN}-remus = "bash"
76
77RDEPENDS:${PN}-scripts-block = "\
78 bash \
79 ${PN}-scripts-common \
80 ${PN}-volatiles \
81 "
82
83RDEPENDS:${PN}-scripts-common = "bash"
84
85RDEPENDS:${PN}-scripts-network = "\
86 bash \
87 bridge-utils \
88 ${PN}-scripts-common \
89 ${PN}-volatiles \
90 "
91
92RRECOMMENDS:${PN}-scripts-network = "\
93 ifupdown \
94 "
95
96RSUGGESTS:${PN}-xencov = "${PN}-xencov-split"
97
98RDEPENDS:${PN}-xencommons = "\
99 bash \
100 util-linux-prlimit \
101 ${PN}-console \
102 ${PN}-xenstore \
103 virtual/xenstored \
104 ${PN}-xl \
105 ${PN}-scripts-common \
106 "
107
108RDEPENDS:${PN}-xendomains = "\
109 bash \
110 ${PN}-console \
111 ${PN}-scripts-block \
112 ${PN}-scripts-common \
113 virtual/xenstored \
114 "
115
116RDEPENDS:${PN}-xenhypfs = " \
117 ${PN}-libxenhypfs \
118 "
119
120RDEPENDS:${PN}-xl = "libgcc"
121
122RDEPENDS:${PN}-xenmon = " \
123 python3 \
124 "
125
126RSUGGESTS:${PN}-xentrace = "${PN}-xentrace-format"
127
128RDEPENDS:${PN}-xen-watchdog = "bash"
129
130PACKAGES = " \
131 ${PN} \
132 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_PACKAGES}', d)} \
133 ${PN}-console \
134 ${PN}-cpuid \
135 ${PN}-dbg \
136 ${PN}-dev \
137 ${PN}-devd \
138 ${PN}-doc \
139 ${PN}-flask \
140 ${PN}-flask-tools \
141 ${PN}-fsimage \
142 ${PN}-gdbsx \
143 ${PN}-hvmloader \
144 ${PN}-init-xenstore-dom \
145 ${PN}-kdd \
146 ${PN}-libfsimage \
147 ${PN}-libfsimage-dev \
148 ${PN}-libxencall \
149 ${PN}-libxencall-dev \
150 ${PN}-libxenctrl \
151 ${PN}-libxenctrl-dev \
152 ${PN}-libxendevicemodel \
153 ${PN}-libxendevicemodel-dev \
154 ${PN}-libxenevtchn \
155 ${PN}-libxenevtchn-dev \
156 ${PN}-libxenforeignmemory \
157 ${PN}-libxenforeignmemory-dev \
158 ${PN}-libxengnttab \
159 ${PN}-libxengnttab-dev \
160 ${PN}-libxenguest \
161 ${PN}-libxenguest-dev \
162 ${PN}-libxenhypfs \
163 ${PN}-libxenhypfs-dev \
164 ${PN}-libxenlight \
165 ${PN}-libxenlight-dev \
166 ${PN}-libxenstat \
167 ${PN}-libxenstat-dev \
168 ${PN}-libxenstore \
169 ${PN}-libxenstore-dev \
170 ${PN}-libxentoolcore \
171 ${PN}-libxentoolcore-dev \
172 ${PN}-libxentoollog \
173 ${PN}-libxentoollog-dev \
174 ${PN}-libxenvchan \
175 ${PN}-libxenvchan-dev \
176 ${PN}-libxlutil \
177 ${PN}-libxlutil-dev \
178 ${PN}-livepatch \
179 ${PN}-misc \
180 ${PN}-pygrub \
181 ${PN}-python \
182 ${PN}-remus \
183 ${PN}-scripts-block \
184 ${PN}-scripts-common \
185 ${PN}-scripts-network \
186 ${PN}-shim \
187 ${PN}-staticdev \
188 ${PN}-ucode \
189 ${PN}-vchan \
190 ${PN}-volatiles \
191 ${PN}-xcutils \
192 ${PN}-xencommons \
193 ${PN}-xencov \
194 ${PN}-xend \
195 ${PN}-xend-examples \
196 ${PN}-xendomains \
197 ${PN}-xenhypfs \
198 ${PN}-xenmon \
199 ${PN}-xenpaging \
200 ${PN}-xenpmd \
201 ${PN}-xenstat \
202 ${PN}-xenstore \
203 ${PN}-xenstored \
204 ${PN}-xentrace \
205 ${PN}-xen-watchdog \
206 ${PN}-xl \
207 ${PN}-xl-examples \
208 ${PN}-xm \
209 ${PN}-xm-examples \
210 ${PN}-xen-access \
211 ${PN}-xen-memshare \
212 ${PN}-test \
213 ${PN}-xen-vmtrace \
214 ${PN}-xen-mceinj \
215 "
216
217PROVIDES =+ " \
218 virtual/xenstored \
219 ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_PROVIDES}', d)} \
220 "
221
222# There are multiple implementations of the XenStore daemon, so we use a
223# virtual package to allow for substitution.
224RPROVIDES:${PN}-xenstored = "virtual/xenstored"
225
226FILES:${PN}-dbg += "\
227 ${libdir}/xen/bin/.debug \
228 ${nonarch_libdir}/${PYTHON_DIR}/site-packages/.debug \
229 ${nonarch_libdir}/${PYTHON_DIR}/site-packages/xen/lowlevel/.debug \
230 ${libdir}/fs/xfs/.debug \
231 ${libdir}/fs/ufs/.debug \
232 ${libdir}/fs/ext2fs-lib/.debug \
233 ${libdir}/fs/fat/.debug \
234 ${libdir}/fs/zfs/.debug \
235 ${libdir}/fs/reiserfs/.debug \
236 ${libdir}/fs/iso9660/.debug \
237 ${libdir}/fs/**/.debug \
238 ${sbindir}/.debug \
239 ${libdir}exec/.debug \
240 ${libdir}/xen/libexec/.debug \
241 ${bindir}/.debug \
242 ${nonarch_libdir}/${PYTHON_DIR}/dist-packages/.debug \
243 ${nonarch_libdir}/${PYTHON_DIR}/dist-packages/xen/lowlevel/.debug \
244 "
245
246FILES:${PN}-dev = "\
247 ${includedir} \
248 "
249
250FILES:${PN}-doc = "\
251 ${sysconfdir}/xen/README \
252 ${sysconfdir}/xen/README.incompatibilities \
253 ${datadir}/doc \
254 ${datadir}/man \
255 "
256
257FILES:${PN}-staticdev += "\
258 ${libdir}/libxenguest.a \
259 ${libdir}/libxenlight.a \
260 ${libdir}/libxenvchan.a \
261 ${libdir}/libxenctrl.a \
262 ${libdir}/libxlutil.a \
263 ${libdir}/libxenstat.a \
264 ${libdir}/libxenstore.a \
265 "
266
267FILES:${PN}-libxencall = "${libdir}/libxencall.so.*"
268FILES:${PN}-libxencall-dev = " \
269 ${libdir}/libxencall.so \
270 ${libdir}/pkgconfig/xencall.pc \
271 ${datadir}/pkgconfig/xencall.pc \
272 "
273
274FILES:${PN}-libxenctrl = "${libdir}/libxenctrl.so.*"
275FILES:${PN}-libxenctrl-dev = " \
276 ${libdir}/libxenctrl.so \
277 ${libdir}/pkgconfig/xencontrol.pc \
278 ${datadir}/pkgconfig/xencontrol.pc \
279 "
280
281FILES:${PN}-libxendevicemodel = "${libdir}/libxendevicemodel.so.*"
282FILES:${PN}-libxendevicemodel-dev = " \
283 ${libdir}/libxendevicemodel.so \
284 ${libdir}/pkgconfig/xendevicemodel.pc \
285 ${datadir}/pkgconfig/xendevicemodel.pc \
286 "
287
288FILES:${PN}-libxenevtchn = "${libdir}/libxenevtchn.so.*"
289FILES:${PN}-libxenevtchn-dev = " \
290 ${libdir}/libxenevtchn.so \
291 ${libdir}/pkgconfig/xenevtchn.pc \
292 ${datadir}/pkgconfig/xenevtchn.pc \
293 "
294
295FILES:${PN}-libxenforeignmemory = "${libdir}/libxenforeignmemory.so.*"
296FILES:${PN}-libxenforeignmemory-dev = " \
297 ${libdir}/libxenforeignmemory.so \
298 ${libdir}/pkgconfig/xenforeignmemory.pc \
299 ${datadir}/pkgconfig/xenforeignmemory.pc \
300 "
301
302FILES:${PN}-libxengnttab = "${libdir}/libxengnttab.so.*"
303FILES:${PN}-libxengnttab-dev = " \
304 ${libdir}/libxengnttab.so \
305 ${libdir}/pkgconfig/xengnttab.pc \
306 ${datadir}/pkgconfig/xengnttab.pc \
307 "
308
309FILES:${PN}-libxenguest = "${libdir}/libxenguest.so.*"
310FILES:${PN}-libxenguest-dev = " \
311 ${libdir}/libxenguest.so \
312 ${libdir}/pkgconfig/xenguest.pc \
313 ${datadir}/pkgconfig/xenguest.pc \
314 "
315
316FILES:${PN}-libxenhypfs = "${libdir}/libxenhypfs.so.*"
317FILES:${PN}-libxenhypfs-dev = " \
318 ${libdir}/libxenhypfs.so \
319 ${libdir}/pkgconfig/xenhypfs.pc \
320 "
321
322FILES:${PN}-libxenlight = "${libdir}/libxenlight.so.*"
323FILES:${PN}-libxenlight-dev = " \
324 ${libdir}/libxenlight.so \
325 ${libdir}/pkgconfig/xenlight.pc \
326 ${datadir}/pkgconfig/xenlight.pc \
327 "
328
329FILES:${PN}-libxenstat = "${libdir}/libxenstat.so.*"
330FILES:${PN}-libxenstat-dev = " \
331 ${libdir}/libxenstat.so \
332 ${libdir}/pkgconfig/xenstat.pc \
333 ${datadir}/pkgconfig/xenstat.pc \
334 "
335
336FILES:${PN}-libxenstore = "${libdir}/libxenstore.so.*"
337FILES:${PN}-libxenstore-dev = " \
338 ${libdir}/libxenstore.so \
339 ${libdir}/pkgconfig/xenstore.pc \
340 ${datadir}/pkgconfig/xenstore.pc \
341 "
342
343FILES:${PN}-libxentoolcore = "${libdir}/libxentoolcore.so.*"
344FILES:${PN}-libxentoolcore-dev = " \
345 ${libdir}/libxentoolcore.so \
346 ${libdir}/pkgconfig/xentoolcore.pc \
347 ${datadir}/pkgconfig/xentoolcore.pc \
348 "
349
350FILES:${PN}-libxentoollog = "${libdir}/libxentoollog.so.*"
351FILES:${PN}-libxentoollog-dev = " \
352 ${libdir}/libxentoollog.so \
353 ${libdir}/pkgconfig/xentoollog.pc \
354 ${datadir}/pkgconfig/xentoollog.pc \
355 "
356
357FILES:${PN}-libxenvchan = "${libdir}/libxenvchan.so.*"
358FILES:${PN}-libxenvchan-dev = " \
359 ${libdir}/libxenvchan.so \
360 ${libdir}/pkgconfig/xenvchan.pc \
361 ${datadir}/pkgconfig/xenvchan.pc \
362 "
363
364FILES:${PN}-libxlutil = "${libdir}/libxlutil.so.*"
365FILES:${PN}-libxlutil-dev = " \
366 ${libdir}/libxlutil.so \
367 ${libdir}/pkgconfig/xlutil.pc \
368 ${datadir}/pkgconfig/xlutil.pc \
369 "
370FILES:${PN}-libvhd = "${libdir}/libvhd.so.*"
371FILES:${PN}-libvhd-dev = " \
372 ${libdir}/libvhd.so \
373 ${libdir}/pkgconfig/vhd.pc \
374 ${datadir}/pkgconfig/vhd.pc \
375 "
376
377FILES:${PN}-libfsimage = " \
378 ${libdir}/libfsimage.so.* \
379 ${libdir}/libxenfsimage.so.* \
380 "
381
382FILES:${PN}-libfsimage-dev = " \
383 ${libdir}/libfsimage.so \
384 ${libdir}/libxenfsimage.so \
385 ${libdir}/pkgconfig/fsimage.pc \
386 ${datadir}/pkgconfig/fsimage.pc \
387 ${libdir}/pkgconfig/xenfsimage.pc \
388 ${datadir}/pkgconfig/xenfsimage.pc \
389 "
390
391FILES:${PN}-fsimage = " \
392 ${libdir}/fs/**/[a-z]*fsimage.so \
393 ${libdir}/xenfsimage/**/fsimage.so \
394 "
395
396FILES:${PN}-init-xenstore-dom = "${libdir}/xen/bin/init-xenstore-domain"
397
398FILES:${PN} = "\
399 ${sysconfdir}/xen/auto \
400 ${sysconfdir}/xen/cpupool \
401 ${localstatedir}/xen/dump \
402 "
403
404FILES:${PN}-console = "\
405 ${libdir}/xen/bin/xenconsole \
406 ${sbindir}/xenconsoled \
407 "
408
409FILES:${PN}-cpuid = "\
410 ${bindir}/xen-cpuid \
411 "
412
413FILES:${PN}-devd = "\
414 ${sysconfdir}/init.d/xendriverdomain \
415 ${systemd_unitdir}/system/xendriverdomain.service \
416 "
417
418FILES:${PN}-flask = "\
419 /boot/xenpolicy-* \
420 "
421
422FILES:${PN}-flask-tools = "\
423 ${sbindir}/flask-get-bool \
424 ${sbindir}/flask-getenforce \
425 ${sbindir}/flask-label-pci \
426 ${sbindir}/flask-loadpolicy \
427 ${sbindir}/flask-set-bool \
428 ${sbindir}/flask-setenforce \
429 "
430
431FILES:${PN}-gdbsx = "\
432 ${sbindir}/gdbsx \
433 "
434
435INSANE_SKIP:${PN}-hvmloader = "arch"
436FILES:${PN}-hvmloader = "\
437 ${libdir}/xen/boot/hvmloader \
438 "
439
440FILES:${PN}-kdd = "\
441 ${sbindir}/kdd \
442 ${sbindir}/xen-kdd \
443 "
444
445FILES:${PN}-livepatch += " \
446 ${sbindir}/xen-livepatch \
447 "
448
449FILES:${PN}-misc = "\
450 ${bindir}/xen-detect \
451 ${libdir}/xen/bin/depriv-fd-checker \
452 ${sbindir}/gtracestat \
453 ${sbindir}/gtraceview \
454 ${sbindir}/xen-bugtool \
455 ${sbindir}/xenperf \
456 ${sbindir}/xenpm \
457 ${sbindir}/xsview \
458 ${sbindir}/xen-diag \
459 ${sbindir}/xen-tmem-list-parse \
460 ${sbindir}/xen-python-path \
461 ${sbindir}/xen-ringwatch \
462 ${sbindir}/xen-hptool \
463 ${sbindir}/xen-hvmcrash \
464 ${sbindir}/xen-hvmctx \
465 ${sbindir}/xenlockprof \
466 ${sbindir}/xen-lowmemd \
467 ${sbindir}/xen-mfndump \
468 ${libdir}/xen/bin/verify-stream-v2 \
469 ${libdir}/xen/bin/convert-legacy-stream \
470 "
471
472FILES:${PN}-pygrub = "\
473 ${bindir}/pygrub \
474 ${libdir}/xen/bin/pygrub \
475 "
476
477# Depending on the version of Xen libdir or nonarch libdir is used
478FILES:${PN}-python = "\
479 ${libdir}/${PYTHON_DIR} \
480 ${nonarch_libdir}/${PYTHON_DIR} \
481 "
482
483FILES:${PN}-remus = "\
484 ${sysconfdir}/xen/scripts/remus-netbuf-setup \
485 "
486
487FILES:${PN}-scripts-network = " \
488 ${sysconfdir}/xen/scripts/colo-proxy-setup \
489 ${sysconfdir}/xen/scripts/network-bridge \
490 ${sysconfdir}/xen/scripts/network-nat \
491 ${sysconfdir}/xen/scripts/network-route \
492 ${sysconfdir}/xen/scripts/qemu-ifup \
493 ${sysconfdir}/xen/scripts/vif2 \
494 ${sysconfdir}/xen/scripts/vif-bridge \
495 ${sysconfdir}/xen/scripts/vif-common.sh \
496 ${sysconfdir}/xen/scripts/vif-nat \
497 ${sysconfdir}/xen/scripts/vif-openvswitch \
498 ${sysconfdir}/xen/scripts/vif-route \
499 ${sysconfdir}/xen/scripts/vif-setup \
500 "
501
502FILES:${PN}-scripts-block = " \
503 ${sysconfdir}/xen/scripts/blktap \
504 ${sysconfdir}/xen/scripts/block \
505 ${sysconfdir}/xen/scripts/block-common.sh \
506 ${sysconfdir}/xen/scripts/block-dummy \
507 ${sysconfdir}/xen/scripts/block-enbd \
508 ${sysconfdir}/xen/scripts/block-iscsi \
509 ${sysconfdir}/xen/scripts/block-nbd \
510 ${sysconfdir}/xen/scripts/block-drbd-probe \
511 ${sysconfdir}/xen/scripts/block-tap \
512 ${sysconfdir}/xen/scripts/vscsi \
513 "
514
515FILES:${PN}-scripts-common = " \
516 ${sysconfdir}/xen/scripts/external-device-migrate \
517 ${sysconfdir}/xen/scripts/hotplugpath.sh \
518 ${sysconfdir}/xen/scripts/locking.sh \
519 ${sysconfdir}/xen/scripts/logging.sh \
520 ${sysconfdir}/xen/scripts/xen-hotplug-cleanup \
521 ${sysconfdir}/xen/scripts/xen-hotplug-common.sh \
522 ${sysconfdir}/xen/scripts/xen-network-common.sh \
523 ${sysconfdir}/xen/scripts/xen-script-common.sh \
524 "
525
526INSANE_SKIP:${PN}-shim = "arch"
527FILES:${PN}-shim = " \
528 ${libdir}/xen/boot/xen-shim \
529 "
530
531FILES:${PN}-ucode = "\
532 ${sbindir}/xen-ucode \
533 "
534
535FILES:${PN}-vchan = "\
536 ${bindir}/vchan-socket-proxy \
537 "
538
539FILES:${PN}-volatiles = "\
540 ${sysconfdir}/default/volatiles/99_xen \
541 ${sysconfdir}/tmpfiles.d/xen.conf \
542 "
543
544FILES:${PN}-xcutils = "\
545 ${libdir}/xen/bin/lsevtchn \
546 ${libdir}/xen/bin/readnotes \
547 ${libdir}/xen/bin/xc_restore \
548 ${libdir}/xen/bin/xc_save \
549 "
550
551FILES:${PN}-xencov = "\
552 ${sbindir}/xencov \
553 "
554
555FILES:${PN}-xend-examples = "\
556 ${sysconfdir}/xen/xend-config.sxp \
557 ${sysconfdir}/xen/xend-pci-permissive.sxp \
558 ${sysconfdir}/xen/xend-pci-quirks.sxp \
559 "
560
561FILES:${PN}-xenhypfs = "\
562 ${sbindir}/xenhypfs \
563 "
564
565FILES:${PN}-xenpaging = "\
566 ${libdir}/xen/bin/xenpaging \
567 ${localstatedir}/lib/xen/xenpaging \
568 "
569
570FILES:${PN}-xenpmd = "\
571 ${sbindir}/xenpmd \
572 "
573
574FILES:${PN}-xenstat = "\
575 ${sbindir}/xentop \
576 "
577
578FILES:${PN}-xenstore = "\
579 ${bindir}/xenstore \
580 ${bindir}/xenstore-chmod \
581 ${bindir}/xenstore-control \
582 ${bindir}/xenstore-exists \
583 ${bindir}/xenstore-list \
584 ${bindir}/xenstore-ls \
585 ${bindir}/xenstore-read \
586 ${bindir}/xenstore-rm \
587 ${bindir}/xenstore-watch \
588 ${bindir}/xenstore-write \
589 "
590
591FILES:${PN}-xenstored = "\
592 ${sbindir}/xenstored \
593 ${localstatedir}/lib/xenstored \
594 "
595
596FILES:${PN}-xentrace = "\
597 ${bindir}/xentrace \
598 ${bindir}/xentrace_setsize \
599 ${libdir}/xen/bin/xenctx \
600 ${bindir}/xenalyze \
601 ${sbindir}/xentrace \
602 ${sbindir}/xentrace_setsize \
603 ${sbindir}/xentrace_setmask \
604 "
605
606FILES:${PN}-xen-watchdog = "\
607 ${sbindir}/xenwatchdogd \
608 ${sysconfdir}/init.d/xen-watchdog \
609 ${systemd_unitdir}/system/xen-watchdog.service \
610 "
611
612FILES:${PN}-xl = "\
613 ${sysconfdir}/bash_completion.d/xl.sh \
614 ${sysconfdir}/bash_completion.d/xl \
615 ${sysconfdir}/xen/xl.conf \
616 ${libdir}/xen/bin/libxl-save-helper \
617 ${sbindir}/xl \
618 ${libdir}/xen/bin/xen-init-dom0 \
619 ${libdir}/xen/bin/init-dom0less \
620 "
621
622FILES:${PN}-xl-examples = "\
623 ${sysconfdir}/xen/xlexample.hvm \
624 ${sysconfdir}/xen/xlexample.pvlinux \
625 ${sysconfdir}/xen/xlexample.pvhlinux \
626 "
627
628FILES:${PN}-xm-examples = "\
629 ${sysconfdir}/xen/xmexample1 \
630 ${sysconfdir}/xen/xmexample2 \
631 ${sysconfdir}/xen/xmexample3 \
632 ${sysconfdir}/xen/xmexample.hvm \
633 ${sysconfdir}/xen/xmexample.hvm-stubdom \
634 ${sysconfdir}/xen/xmexample.nbd \
635 ${sysconfdir}/xen/xmexample.pv-grub \
636 ${sysconfdir}/xen/xmexample.vti \
637 "
638
639FILES:${PN}-xenmon = "\
640 ${sbindir}/xenbaked \
641 ${sbindir}/xenmon.py \
642 ${sbindir}/xenmon \
643 "
644
645FILES:${PN}-xm = "\
646 ${sysconfdir}/xen/xm-config.xml \
647 ${datadir}/xen/create.dtd \
648 ${sbindir}/xm \
649 "
650
651FILES:${PN}-xencommons += "\
652 ${nonarch_libdir}/modules-load.d/xen.conf \
653 ${sysconfdir}/default/xencommons \
654 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '${sysconfdir}/init.d/xencommons', d)} \
655 ${sysconfdir}/xen/scripts/launch-xenstore \
656 ${systemd_unitdir}/system/proc-xen.mount \
657 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service', '', d)} \
658 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xenconsoled.service', '', d)} \
659 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xen-init-dom0.service', '', d)} \
660 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/xenstored.service', '', d)} \
661 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/var-lib-xenstored.mount', '', d)} \
662 ${localstatedir} \
663 "
664
665FILES:${PN}-xend += " \
666 ${sysconfdir}/init.d/xend \
667 ${sbindir}/xend \
668 "
669
670FILES:${PN}-xendomains += "\
671 ${libdir}/xen/bin/xendomains \
672 ${sysconfdir}/default/xendomains \
673 ${sysconfdir}/init.d/xendomains \
674 ${sysconfdir}/sysconfig/xendomains \
675 ${systemd_unitdir}/system/xendomains.service \
676 "
677FILES:${PN}-xen-access += "\
678 ${sbindir}/xen-access \
679 "
680
681FILES:${PN}-xen-memshare += "\
682 ${sbindir}/xen-memshare \
683 "
684
685# memshare is only built for x86, so allow empty package for other archs
686ALLOW_EMPTY:${PN}-xen-memshare = "1"
687
688FILES:${PN}-test += "\
689 ${libdir}/xen/bin/test-xenstore \
690 ${libdir}/xen/bin/test-resource \
691 ${libdir}/xen/bin/test-cpu-policy \
692 ${libdir}/xen/bin/test-tsx \
693 ${libdir}/xen/bin/test-paging-mempool \
694 "
695
696# test-xenstore and test-resource currently only exist in 4.16
697# test-cpu-policy and test-tsx only exist in 4.16 for x86
698ALLOW_EMPTY:${PN}-test = "1"
699
700FILES:${PN}-xen-mceinj +="\
701 ${sbindir}/xen-mceinj \
702 "
703
704# xen-mceinj is only built for x86 4.16, so allow empty package
705ALLOW_EMPTY:${PN}-xen-mceinj = "1"
706
707FILES:${PN}-xen-vmtrace +="\
708 ${sbindir}/xen-vmtrace \
709 "
710
711# xen-vmtrace is only built for x86 4.16, so allow empty package
712ALLOW_EMPTY:${PN}-xen-vmtrace = "1"
713
714INSANE_SKIP:${PN} = "already-stripped"
715
716# configure init.d scripts
717INITSCRIPT_PACKAGES = "${PN}-xend ${PN}-xen-watchdog ${PN}-xendomains ${PN}-devd"
718INITSCRIPT_PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', '${PN}-xencommons', d)}"
719INITSCRIPT_NAME:${PN}-xencommons = "xencommons"
720INITSCRIPT_PARAMS:${PN}-xencommons = "defaults 80"
721INITSCRIPT_NAME:${PN}-xen-watchdog = "xen-watchdog"
722INITSCRIPT_PARAMS:${PN}-xen-watchdog = "defaults 81"
723INITSCRIPT_NAME:${PN}-xend = "xend"
724INITSCRIPT_PARAMS:${PN}-xend = "defaults 82"
725INITSCRIPT_NAME:${PN}-xendomains = "xendomains"
726INITSCRIPT_PARAMS:${PN}-xendomains = "defaults 83"
727INITSCRIPT_NAME:${PN}-devd = "xendriverdomain"
728INITSCRIPT_PARAMS:${PN}-devd = "defaults 82"
729
730# systemd packages
731SYSTEMD_PACKAGES = "${PN}-xen-watchdog ${PN}-xencommons ${PN}-xendomains ${PN}-devd"
732SYSTEMD_SERVICE:${PN}-devd = "xendriverdomain.service"
733SYSTEMD_SERVICE:${PN}-xen-watchdog = "xen-watchdog.service"
734SYSTEMD_SERVICE:${PN}-xencommons = " \
735 proc-xen.mount \
736 xen-qemu-dom0-disk-backend.service \
737 xenconsoled.service \
738 xen-init-dom0.service \
739 xenstored.service \
740 "
741SYSTEMD_SERVICE:${PN}-xendomains = "xendomains.service"
742
743QEMU_ARCH = "i386"
744QEMU_ARCH:aarch64 = "aarch64"
745
746EXTRA_OECONF += " \
747 --with-systemd=${systemd_unitdir}/system \
748 --with-initddir=${INIT_D_DIR} \
749 --with-sysconfig-leaf-dir=default \
750 --with-system-qemu=${bindir}/qemu-system-${QEMU_ARCH} \
751 "
752
753do_configure() {
754 do_configure_common
755}
756
757do_compile() {
758 cd ${S}
759 oe_runmake tools PYTHON="${PYTHON}" \
760 EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}"
761}
762
763do_install() {
764 cd ${S}
765 oe_runmake DESTDIR="${D}" install-tools
766
767 # Remove unported python 2 scripts -- see the separate xen-python2 recipe
768 rm -f ${D}${bindir}/xentrace_format \
769 ${D}${bindir}/xencons \
770 ${D}${bindir}/xencov_split \
771 ${D}${libdir}/xen/bin/xenpvnetboot
772
773 # remove installed volatiles
774 rm -rf ${D}${base_prefix}/run \
775 ${D}${localstatedir}/run \
776 ${D}${localstatedir}/lock \
777 ${D}${localstatedir}/log \
778 ${D}${localstatedir}/volatile \
779 ${D}${localstatedir}/lib/xen
780
781 VOLATILE_DIRS=" \
782 ${base_prefix}/run/xenstored \
783 ${base_prefix}/run/xend \
784 ${base_prefix}/run/xend/boot \
785 ${base_prefix}/run/xen \
786 ${localstatedir}/log/xen \
787 ${localstatedir}/lock/xen \
788 ${localstatedir}/lock/subsys \
789 ${localstatedir}/lib/xen \
790 "
791
792 # install volatiles using populate_volatiles mechanism
793 install -d ${D}${sysconfdir}/default/volatiles
794 for i in $VOLATILE_DIRS; do
795 echo "d root root 0755 $i none" >> ${D}${sysconfdir}/default/volatiles/99_xen
796 done
797
798 # workaround for xendomains script which searchs sysconfig if directory exists
799 install -d ${D}${sysconfdir}/sysconfig
800 ln -sf ${sysconfdir}/default/xendomains ${D}${sysconfdir}/sysconfig/xendomains
801
802 # systemd
803 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
804 # install volatiles using systemd tmpfiles.d
805 install -d ${D}${sysconfdir}/tmpfiles.d
806 for i in $VOLATILE_DIRS; do
807 echo "d $i 0755 root root - -" >> ${D}${sysconfdir}/tmpfiles.d/xen.conf
808 done
809 fi
810
811 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
812 sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \
813 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
814 fi
815
816 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
817 rm -f ${D}/${sysconfdir}/init.d/xencommons
818 else
819 # fixup default path to qemu-system-i386
820 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons
821
822 # remove the uncondiontally installed systemd service files
823 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
824 rm -f ${D}/${systemd_unitdir}/system/xenconsoled.service
825 rm -f ${D}/${systemd_unitdir}/system/xen-init-dom0.service
826 rm -f ${D}/${systemd_unitdir}/system/xenstored.service
827 rm -f ${D}/${systemd_unitdir}/system/var-lib-xenstored.mount
828 fi
829}
830
831pkg_postinst:${PN}-volatiles() {
832 if [ -z "$D" ]; then
833 if command -v systemd-tmpfiles >/dev/null; then
834 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/xen.conf
835 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
836 ${sysconfdir}/init.d/populate-volatile.sh update
837 fi
838 fi
839}
840
841do_deploy() {
842 XEN_FULLVERSION=$(oe_runmake -C ${S}/xen xenversion --no-print-directory)
843 FLASK_POLICY_FILE="xenpolicy-${XEN_FULLVERSION}"
844
845 install -d ${DEPLOYDIR}
846
847 # Install the flask policy in the deploy directory if it exists
848 if [ -f ${D}/boot/${FLASK_POLICY_FILE} ]; then
849 install -m 0644 ${D}/boot/${FLASK_POLICY_FILE} ${DEPLOYDIR}
850 ln -sf ${FLASK_POLICY_FILE} ${DEPLOYDIR}/xenpolicy-${MACHINE}
851 fi
852}
853# Scheduling the do_deploy task:
854# - deploy copies files from ${D} that are written during do_install so must run
855# after that task
856# - the tools binaries are included in the image filesystem, so we must ensure
857# that the binaries deployed match what is staged in the sysroot:
858# so do_deploy must run after do_populate_sysroot
859# - add the task before do_build to ensure that deployment has completed when
860# the recipe build done stamp is written
861addtask deploy after do_install do_populate_sysroot before do_build
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb
new file mode 100644
index 00000000..acc9184b
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bb
@@ -0,0 +1,18 @@
1# xen 4.17.0 release sha
2SRCREV ?= "11560248ffda3f00f20bbdf3ae088af474f7f2a3"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.17"
6XEN_BRANCH ?= "stable-${XEN_REL}"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \
11 "
12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14
15S = "${WORKDIR}/git"
16
17require xen.inc
18require xen-tools.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bbappend
new file mode 100644
index 00000000..d033e1d2
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.17.bbappend
@@ -0,0 +1,2 @@
1require xen-xilinx_4.17.inc
2require xen-tools-xilinx.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bb
new file mode 100644
index 00000000..8baa2f53
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bb
@@ -0,0 +1,18 @@
1# tag: RELEASE-4.18.0
2SRCREV ?= "d75f1e9b74314cea91ce435730d4e3539ecca77d"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.18"
6XEN_BRANCH ?= "stable-4.18"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch \
11 "
12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14
15S = "${WORKDIR}/git"
16
17require xen.inc
18require xen-tools.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend
new file mode 100644
index 00000000..86702979
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend
@@ -0,0 +1,2 @@
1require xen-xilinx_4.18.inc
2require xen-tools-xilinx.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.17.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.17.inc
new file mode 100644
index 00000000..d7810b27
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.17.inc
@@ -0,0 +1,7 @@
1SRCREV = "38eebc6e5c6f7aa9180672a56d33217bf1ef1ca6"
2XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https"
3XEN_BRANCH = "xlnx_rebase_4.17"
4
5PV .= "-xilinx+git${SRCPV}"
6
7DEFAULT_PREFERENCE = "+1"
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
new file mode 100644
index 00000000..2290a418
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc
@@ -0,0 +1,7 @@
1SRCREV = "7cb7aac7f570757b67bcd43aec67e0cda9f58b14"
2XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https"
3XEN_BRANCH = "xlnx_rebase_4.18"
4
5PV .= "-xilinx+git${SRCPV}"
6
7DEFAULT_PREFERENCE = "+1"
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen.inc
new file mode 100644
index 00000000..5937763a
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen.inc
@@ -0,0 +1,233 @@
1HOMEPAGE = "http://xen.org"
2LICENSE = "GPL-2.0-only"
3SECTION = "console/tools"
4
5inherit autotools-brokensep pkgconfig
6
7require xen-arch.inc
8
9PACKAGECONFIG ??= " \
10 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
11 "
12
13PACKAGECONFIG[lzo] = ",,lzo"
14PACKAGECONFIG[xsm] = "--enable-xsmpolicy,--disable-xsmpolicy,checkpolicy-native,"
15PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd,"
16PACKAGECONFIG[externalblktap] = ",,,"
17
18DEPENDS = " \
19 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', 'dev86-native', '', d)} \
20 bison-native \
21 flex-native \
22 file-native \
23 gettext-native \
24 acpica-native \
25 ncurses-native \
26 util-linux-native \
27 xz-native \
28 bridge-utils \
29 curl \
30 dtc \
31 gettext \
32 glib-2.0 \
33 gnutls \
34 iproute2 \
35 libnl \
36 ncurses \
37 openssl \
38 pciutils \
39 pixman \
40 procps \
41 python3 \
42 libaio \
43 util-linux \
44 xz \
45 yajl \
46 zlib \
47 gnu-efi \
48 "
49
50#### REQUIRED ENVIRONMENT VARIABLES ####
51export BUILD_SYS
52export HOST_SYS
53export STAGING_INCDIR
54export STAGING_LIBDIR
55
56# specify xen hypervisor to build/target
57export XEN_TARGET_ARCH = "${@map_xen_arch(d.getVar('TARGET_ARCH'), d)}"
58export XEN_COMPILE_ARCH = "${@map_xen_arch(d.getVar('BUILD_ARCH'), d)}"
59
60python () {
61 if d.getVar('XEN_TARGET_ARCH') == 'INVALID':
62 raise bb.parse.SkipPackage('Cannot map `%s` to a xen architecture' % d.getVar('TARGET_ARCH'))
63}
64
65# Yocto appends ${PN} to libexecdir by default and Xen appends 'xen' as well
66# the result is a nested xen/xen/ so let's avoid that by shunning Yocto's
67# extra ${PN} appended.
68libexecdir = "${libdir}"
69
70# hardcoded as Linux, as the only compatible hosts are Linux.
71export XEN_OS = "Linux"
72
73# this is used for the header (#!${bindir}/python) of the install python scripts
74export PYTHONPATH="${bindir}/env python3"
75export ac_cv_path_PYTHONPATH="${bindir}/env python3"
76export DISTUTILS_BUILD_ARGS
77export DISTUTILS_INSTALL_ARGS
78
79# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
80export HOSTCC="${BUILD_CC}"
81export HOSTCXX="${BUILD_CXX}"
82
83# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
84export CROSS_COMPILE="${TARGET_PREFIX}"
85
86# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
87export LDFLAGS=""
88
89# No additional C flags for the main hypervisor build
90EXTRA_CFLAGS_XEN_CORE ?= ""
91# Add prefix maps to support buildpaths QA test and reproducibility
92DEBUG_PREFIX_MAP:append = " \
93 -ffile-prefix-map=${S}=${PN}-source \
94 -fdebug-prefix-map=${WORKDIR}=${PN} \
95 "
96
97# - The Xen tools build for x86 systems with HVM-mode enabled includes hvmloader
98# which fails to build when "-m64" is included in flags set via the
99# EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that.
100TUNE_CCARGS:x86-64=""
101
102# - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the
103# optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared
104# within the build because compilation fails with the compiler stating
105# "_FORTIFY_SOURCE requires compiling with optimization (-O)".
106# - Move HOST_CC_ARCH into the Xen-provided CFLAGS variables and keep
107# TOOLCHAIN_OPTIONS set via CC: this enables hvmloader to be built correctly.
108# It must not be compiled with SSE compiler options enabled and the Xen build
109# explicitly clears CFLAGS to ensure that, so such options must not be passed
110# in via the tool variable. hvmloader is required to run HVM-mode guest VMs.
111CC="${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
112EXTRA_CFLAGS_XEN_TOOLS="${HOST_CC_ARCH} ${CFLAGS}"
113# 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed
114# in CC to ensure that configure can compile binaries for the right arch.
115CC:arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
116
117# There are no Xen-provided variables for C++, so append to the tool variables:
118CPP:append = " ${CPPFLAGS}"
119CXX:append = " ${CXXFLAGS}"
120
121EXTRA_OECONF += " \
122 --exec-prefix=${prefix} \
123 --prefix=${prefix} \
124 --host=${HOST_SYS} \
125 --disable-stubdom \
126 --disable-ioemu-stubdom \
127 --disable-pv-grub \
128 --disable-xenstore-stubdom \
129 --disable-rombios \
130 --disable-ocamltools \
131 --disable-qemu-traditional \
132 ${@bb.utils.contains('XEN_TARGET_ARCH', 'x86_64', \
133 '--enable-pvshim --with-system-seabios="/usr/share/firmware/bios.bin"', \
134 '--disable-pvshim --disable-seabios', d)} \
135 "
136
137EXTRA_OEMAKE += "STDVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.8a.bin"
138EXTRA_OEMAKE += "CIRRUSVGA_ROM=${STAGING_DIR_HOST}/usr/share/firmware/vgabios-0.8a.cirrus.bin"
139EXTRA_OEMAKE += "SEABIOS_ROM=${STAGING_DIR_HOST}/usr/share/firmware/bios.bin"
140EXTRA_OEMAKE += "ETHERBOOT_ROMS=${STAGING_DIR_HOST}/usr/share/firmware/rtl8139.rom"
141
142# prevent the Xen build scripts from fetching things during the build
143# all dependencies should be reflected in the Yocto recipe
144EXTRA_OEMAKE += "WGET=/bin/false"
145EXTRA_OEMAKE += "GIT=/bin/false"
146
147# Improve build reproducibility: provide values for build variables.
148def get_build_time_vars(d):
149 source_date_epoch = d.getVar('SOURCE_DATE_EPOCH')
150 if source_date_epoch is not None:
151 import datetime
152 utc_datetime = datetime.datetime.utcfromtimestamp(float(source_date_epoch))
153 return " XEN_BUILD_DATE=" + utc_datetime.strftime("%Y-%m-%d") + \
154 " XEN_BUILD_TIME=" + utc_datetime.strftime("%H:%M:%S")
155 return ""
156EXTRA_OEMAKE += "${@['', 'XEN_WHOAMI=${PF} XEN_DOMAIN=${DISTRO} XEN_BUILD_HOST=${PN}-buildhost'] \
157 [d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1']}${@get_build_time_vars(d)}"
158
159# Improve build reproducibility: compiler flags to remove filesystem differences.
160CC_REPRODUCIBLE_OPTIONS = "${@['', '-gno-record-gcc-switches'] \
161 [d.getVar('BUILD_REPRODUCIBLE_BINARIES') == '1']}"
162
163# check for XSM in package config to allow XSM_ENABLE to be set
164python () {
165 pkgconfig = d.getVar('PACKAGECONFIG')
166 if ('xsm') in pkgconfig.split():
167 d.setVar('XSM_ENABLED', '1')
168 else:
169 d.setVar('XSM_ENABLED', '0')
170}
171
172do_post_patch() {
173 # fixup AS/CC/CCP/etc variable within StdGNU.mk
174 for i in LD CC CPP CXX; do
175 sed -i "s/^\($i\s\s*\).*=/\1?=/" ${S}/config/StdGNU.mk
176 done
177 # fixup environment passing in some makefiles
178 sed -i 's#\(\w*\)=\(\$.\w*.\)#\1="\2"#' ${S}/tools/firmware/Makefile
179
180 # libsystemd-daemon -> libsystemd for newer systemd versions
181 sed -i 's#libsystemd-daemon#libsystemd#' ${S}/tools/configure
182
183 # Improve build reproducibility: disable insertion of the build timestamp
184 # into the x86 EFI hypervisor binary.
185 # binutils should allow a user-supplied timestamp or use SOURCE_DATE_EPOCH
186 # for PE but currently does not.
187 if [ "${BUILD_REPRODUCIBLE_BINARIES}" = "1" ] ; then
188 sed '/^EFI_LDFLAGS = /{a EFI_LDFLAGS += --no-insert-timestamp
189}' -i "${S}/xen/arch/x86/Makefile"
190 fi
191}
192
193addtask post_patch after do_patch before do_configure
194
195# Allow all hypervisor settings in a defconfig
196EXTRA_OEMAKE += "XEN_CONFIG_EXPERT=y"
197# Build release versions always. Technically since we track release
198# tarballs this always happens but occasionally people pull in patches
199# from staging that reverts this
200EXTRA_OEMAKE += "debug=n"
201
202do_configure_common() {
203 cd ${S}
204
205 #./configure --enable-xsmpolicy does not set XSM_ENABLE must be done manually
206 if [ "${XSM_ENABLED}" = "1" ]; then
207 echo "XSM_ENABLE := y" > ${S}/.config
208 fi
209
210 if [ -f "${WORKDIR}/defconfig" ]; then
211 cp "${WORKDIR}/defconfig" "${S}/xen/.config" || \
212 bbfatal "Unable to copy defconfig to .config"
213 fi
214
215 unset CFLAGS
216
217 # do configure
218 oe_runconf EXTRA_CFLAGS_XEN_CORE="${EXTRA_CFLAGS_XEN_CORE}" \
219 EXTRA_CFLAGS_XEN_TOOLS="${EXTRA_CFLAGS_XEN_TOOLS}" \
220 PYTHON="${PYTHON}"
221}
222
223do_compile:prepend() {
224 # workaround for build bug when CFLAGS is exported
225 # https://www.mail-archive.com/xen-devel@lists.xen.org/msg67822.html
226 unset CFLAGS
227}
228
229do_install:prepend() {
230 # CFLAGS is used to set PY_CFLAGS which affects the pygrub install
231 # so also need to unset CFLAGS here:
232 unset CFLAGS
233}
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb
new file mode 100644
index 00000000..41cf2a15
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bb
@@ -0,0 +1,19 @@
1# xen 4.17.0 release sha
2SRCREV ?= "11560248ffda3f00f20bbdf3ae088af474f7f2a3"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.17"
6XEN_BRANCH ?= "stable-${XEN_REL}"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
11 file://xen-flask-race-fix.patch \
12 "
13
14LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
15
16S = "${WORKDIR}/git"
17
18require xen.inc
19require xen-hypervisor.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bbappend
new file mode 100644
index 00000000..a569a96d
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.17.bbappend
@@ -0,0 +1,20 @@
1require xen-xilinx_4.17.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
4
5RDEPENDS:${PN}-efi += "bash python3"
6
7do_deploy:append() {
8 # Mimic older behavior for compatibility
9 if [ -f ${DEPLOYDIR}/xen-${MACHINE} ]; then
10 ln -s xen-${MACHINE} ${DEPLOYDIR}/xen
11 fi
12
13 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.gz ]; then
14 ln -s xen-${MACHINE}.gz ${DEPLOYDIR}/xen.gz
15 fi
16
17 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.efi ]; then
18 ln -s xen-${MACHINE}.efi ${DEPLOYDIR}/xen.efi
19 fi
20}
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bb b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bb
new file mode 100644
index 00000000..daa27b5b
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bb
@@ -0,0 +1,18 @@
1# tag: RELEASE-4.18.0
2SRCREV ?= "7cb7aac7f570757b67bcd43aec67e0cda9f58b14"
3
4XEN_URI ?= "git://xenbits.xen.org/xen.git"
5XEN_REL ?= "4.18"
6XEN_BRANCH ?= "stable-4.18"
7
8SRC_URI = " \
9 ${XEN_URI};branch=${XEN_BRANCH} \
10 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
11 "
12
13LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
14
15S = "${WORKDIR}/git"
16
17require xen.inc
18require xen-hypervisor.inc
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend
new file mode 100644
index 00000000..e2c75566
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend
@@ -0,0 +1,20 @@
1require xen-xilinx_4.18.inc
2
3FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
4
5RDEPENDS:${PN}-efi += "bash python3"
6
7do_deploy:append() {
8 # Mimic older behavior for compatibility
9 if [ -f ${DEPLOYDIR}/xen-${MACHINE} ]; then
10 ln -s xen-${MACHINE} ${DEPLOYDIR}/xen
11 fi
12
13 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.gz ]; then
14 ln -s xen-${MACHINE}.gz ${DEPLOYDIR}/xen.gz
15 fi
16
17 if [ -f ${DEPLOYDIR}/xen-${MACHINE}.efi ]; then
18 ln -s xen-${MACHINE}.efi ${DEPLOYDIR}/xen.efi
19 fi
20}
diff --git a/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
new file mode 100644
index 00000000..298b1dc8
--- /dev/null
+++ b/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend
@@ -0,0 +1,8 @@
1# See meta-virtualization recipes-graphics/xorg-xserver/xserver-xorg_xen.inc
2
3# We want the configuration to remain optimized, if a user wants the removal
4# behavior, then they can set one of the below using 'glamor' as in the
5# xserver-xorg_xen.inc file.
6XEN_REMOVED_OPENGL_PKGCONFIGS:zynqmp ?= ""
7XEN_REMOVED_OPENGL_PKGCONFIGS:versal ?= ""
8