summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core')
-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.bbclass320
-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/dfx_user_dts.bbclass267
-rw-r--r--meta-xilinx-core/classes/fpgamanager_custom.bbclass24
-rw-r--r--meta-xilinx-core/conf/layer.conf8
-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.inc7
-rw-r--r--meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf6
-rw-r--r--meta-xilinx-core/conf/machine/versal-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/versal-hbm-generic.conf6
-rw-r--r--meta-xilinx-core/conf/machine/versal-net-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/versal-prime-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_%.bbappend4
-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-package-split.inc46
-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_8.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.bbappend5
m---------meta-xilinx-core/gen-machine-conf0
-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.bb3
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb48
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc11
-rw-r--r--meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb35
-rw-r--r--meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.1.bb8
-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.01-xilinx-v2024.1.bb21
-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.inc17
-rw-r--r--meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc4
-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-scr/boot.cmd.ubifs4
-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.01-xilinx-v2024.1.bb4
-rw-r--r--meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb18
-rw-r--r--meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.1.bb (renamed from meta-xilinx-core/recipes-devtools/bootgen/bootgen_2023.2.bb)4
-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/libgles/libmali-xlnx_r9p0-01rel0.bb2
-rw-r--r--meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch (renamed from meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.1.0-and-current-i2c-probing.patch)139
-rw-r--r--meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb (renamed from meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.1.60.bb)6
-rw-r--r--meta-xilinx-core/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch129
-rw-r--r--meta-xilinx-core/recipes-kernel/dtc/python3-dtc_1.6.1.bb26
-rw-r--r--meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch (renamed from meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch)23
-rw-r--r--meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.10.bb (renamed from meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb)6
-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_6.6.10-v2024.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/0001-Current-gcc-requires-cstdint-for-C-types.patch55
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch52
-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.bb (renamed from meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.2.bb)7
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2023.2.bb)10
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2023.2.bb)8
-rw-r--r--meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20240216-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20230530-xilinx-v2023.2.bb)6
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/files/0001-include-libapp-Parser.h-Add-cstdint.patch27
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb)11
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.79-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.73-xilinx-v2023.2.bb)16
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2023.2.bb)19
-rw-r--r--meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.1.bb (renamed from meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20230127-xilinx-v2023.2.bb)14
-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_202410.2.17.0.bb29
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt-202210.2.13.479/xrt-cstdint.patch145
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt-202220.2.14.0/xrt-cstdint.patch146
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc13
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch32
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt_202210.2.13.479.bb2
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt_202220.2.14.0.bb2
-rw-r--r--meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb57
-rw-r--r--meta-xilinx-core/recipes-xrt/zocl/kernel-module-zocl_202410.2.17.0.bb27
111 files changed, 4352 insertions, 1169 deletions
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-recipe/dfx_user_dts.bbclass b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass
new file mode 100644
index 00000000..188d594b
--- /dev/null
+++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass
@@ -0,0 +1,320 @@
1#
2# Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved.
3#
4# SPDX-License-Identifier: MIT
5#
6# This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes.
7# dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static
8# and DFx RP xsa outside of yocto.
9
10inherit devicetree
11
12DEPENDS = "dtc-native bootgen-native"
13
14# recipes that inherit from this class need to use an appropriate machine
15# override for COMPATIBLE_MACHINE to build successfully; don't allow building
16# for microblaze MACHINE
17COMPATIBLE_MACHINE ?= "^$"
18COMPATIBLE_MACHINE:microblaze = "^$"
19
20PACKAGE_ARCH = "${MACHINE_ARCH}"
21
22PROVIDES = ""
23
24do_fetch[cleandirs] = "${B}"
25
26DT_PADDING_SIZE = "0x1000"
27BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}"
28
29S ?= "${WORKDIR}"
30FW_DIR ?= ""
31DTSI_PATH ?= ""
32DTBO_PATH ?= ""
33BIT_PATH ?= ""
34BIN_PATH ?= ""
35PDI_PATH ?= ""
36JSON_PATH ?= ""
37XCl_PATH ?= ""
38DT_FILES_PATH = "${S}/${DTSI_PATH}"
39FIRMWARE_NAME_DT_FILE ?= ""
40USER_DTS_FILE ?= ""
41
42FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property"
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"
50
51python() {
52 import re
53 soc_family = d.getVar("SOC_FAMILY")
54 if "git://" in d.getVar("SRC_URI") or "https://" in d.getVar("SRC_URI"):
55 d.setVar("S",'${WORKDIR}/git/'+d.getVar("FW_DIR"))
56 else:
57 dtsi_found = False
58 dtbo_found = False
59 bit_found = False
60 bin_found = False
61 pdi_found = False
62
63 # Required Inputs
64 for s in d.getVar("SRC_URI").split():
65 if s.endswith(('.dtsi', '.dts')):
66 dtsi_found = True
67 d.setVar("DTSI_PATH",os.path.dirname(s.lstrip('file://')))
68 if s.endswith('.dtbo'):
69 if dtbo_found:
70 bb.warn("More then one '.dtbo' file specified in SRC_URI.")
71 dtbo_found = True
72 d.setVar("DTBO_PATH",os.path.dirname(s.lstrip('file://')))
73 if soc_family == "zynq" or soc_family == "zynqmp":
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://')))
90
91 # Optional input
92 if s.endswith('.json'):
93 d.setVar("JSON_PATH",os.path.dirname(s.lstrip('file://')))
94
95 if s.endswith('.xclbin'):
96 d.setVar("XCL_PATH",os.path.dirname(s.lstrip('file://')))
97
98 # Check for valid combination of input files in SRC_URI
99 # Skip recipe if any of the below conditions are not satisfied.
100 # 1. At least one bit or bin or pdi should exists.
101 # 2. More than one dtbo.
102 # 3. More than one bit or bin or pdi.
103 # 4. More than one dts and zero dtsi.
104 # 5. More than one dtsi and zero dts
105 # 6. Both bit and bin exists.
106 # 7. Both bit or bin and pdi exits.
107 # 8. Both dts or dtsi and dtbo exists.
108 if bit_found or bin_found or pdi_found:
109 bb.debug(2, "dtsi or dtbo or bitstream or pdi found in SRC_URI")
110 if bit_found and pdi_found :
111 raise bb.parse.SkipRecipe("Both '.bit' and '.pdi' file found in SRC_URI, this is invalid use case.")
112
113 if bin_found and pdi_found :
114 raise bb.parse.SkipRecipe("Both '.bin' and '.pdi' file found in SRC_URI, this is invalid use case.")
115
116 if bit_found and bin_found:
117 raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.")
118
119 if dtsi_found and dtbo_found:
120 raise bb.parse.SkipRecipe("Both '.dts or dtsi' and '.dtbo' file found in SRC_URI, either .dts/dtsi or .dtbo file is supported but not both.")
121 else:
122 raise bb.parse.SkipRecipe("Need one '.bit' or '.bin' or '.pdi' file added to SRC_URI.")
123
124 # Check for valid combination of dtsi and dts files in SRC_URI
125 # Following file combinations are not supported use case.
126 # 1. More than one '.dtsi' and zero '.dts' file.
127 # 2. More than one '.dts' and zero or more than one '.dtsi'file .
128 pattern_dts = re.compile(r'[.]+dts\b')
129 pattern_dtsi = re.compile(r'[.]+dtsi\b')
130 dts_count = len([*re.finditer(pattern_dts, d.getVar('SRC_URI'))])
131 dtsi_count = len([*re.finditer(pattern_dtsi, d.getVar("SRC_URI"))])
132
133 if dtsi_count > 1 and dts_count == 0:
134 raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case")
135 elif dts_count > 1:
136 raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case")
137}
138
139# Function to search for dt firmware-name property in dts or dtsi file.
140python find_firmware_file() {
141 import glob
142 pattern_fw = 'firmware-name'
143 search_count = 0
144 for dt_files in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True):
145 with open(dt_files, "r") as f:
146 current_fd = f.read()
147 if pattern_fw in current_fd:
148 search_count += 1
149 if search_count > 1:
150 bb.error("firmware-name dt property found in more than one dt files! Please fix the dts or dtsi file.")
151 break
152 else:
153 d.setVar('FIRMWARE_NAME_DT_FILE', os.path.basename(dt_files))
154}
155
156do_configure[prefuncs] += "find_firmware_file"
157
158python do_configure() {
159 import glob, re, shutil
160 soc_family = d.getVar("SOC_FAMILY")
161
162 if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d):
163 bb.warn("Using dfx_user_dts.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled")
164
165 # Renaming firmware-name using $PN as bitstream/PDI will be renamed using
166 # $PN when generating the bin/pdi file.
167 if os.path.isfile(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')):
168 orig_dtsi = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0]
169 new_dtsi = d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/pl.dtsi_firmwarename'
170 with open(new_dtsi, 'w') as newdtsi:
171 with open(orig_dtsi) as olddtsi:
172 for line in olddtsi:
173 if soc_family == 'zynq' or soc_family == 'zynqmp':
174 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bin\"',line))
175 else:
176 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line))
177 shutil.move(new_dtsi,orig_dtsi)
178}
179
180do_compile[prefuncs] += "find_firmware_file"
181
182python devicetree_do_compile:append() {
183 import glob, subprocess, shutil
184 soc_family = d.getVar("SOC_FAMILY")
185
186 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
187 bin_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('BIN_PATH') or '') + '/*.bin'),recursive=True) if os.path.isfile(f))
188 bit_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit'),recursive=True) if os.path.isfile(f))
189 # Skip devicetree do_compile task if input file is dtbo or bin in SRC_URI
190 if not dtbo_count and not bin_count and bit_count:
191 # Convert .bit to .bin format only if dtsi is input.
192 # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit
193 # or .bin format and corresponding file name. Hence we are not doing .bin
194 # conversion.
195 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')):
196 pn = d.getVar('PN')
197 biffile = pn + '.bif'
198 with open(biffile, 'w') as f:
199 f.write('all:\n{\n\t' + glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}')
200
201 bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split()
202 bootgenargs += ["-image", biffile, "-o", pn + ".bin"]
203 subprocess.run(bootgenargs, check = True)
204
205 # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag,
206 # to convert bit file to bin format, "-o" option will not be effective
207 # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bin
208 # file, Hence we need to rename this file from <bit_file_name>.bin to
209 # ${PN}.bin which matches the firmware name in dtbo and move
210 # ${PN}.bin to ${B} directory.
211 if soc_family == 'zynq':
212 src_bitbin_file = glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bin')[0]
213 dst_bitbin_file = d.getVar('B') + '/' + pn + '.bin'
214 shutil.move(src_bitbin_file, dst_bitbin_file)
215
216 if not os.path.isfile(pn + ".bin"):
217 bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \
218 "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bin'))
219}
220
221# If user inputs both dtsi and dts files then device-tree will generate dtbo
222# files for each dt file, Hence to package the firmware pick the right user dt
223# overlay file.
224python find_user_dts_overlay_file() {
225 import glob
226 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTBO_PATH') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
227 dts_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dts'),recursive=True) if os.path.isfile(f))
228 dtsi_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dtsi'),recursive=True) if os.path.isfile(f))
229 # Set USER_DTS_FILE if input file is dts/dtsi in SRC_URI else skip operation.
230 if not dtbo_count and dts_count or dtsi_count:
231 if dtsi_count == 1 and dts_count == 0:
232 dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0]
233 elif dtsi_count >=0 and dts_count == 1:
234 dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dts')[0]
235 else:
236 dts_file = ''
237
238 d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0])
239 elif dtbo_count:
240 bb.debug(2, "Firmware recipe input file is dtbo in SRC_URI")
241 else:
242 bb.debug(2, "Firmware recipe input file is bit/bin/pdi in SRC_URI")
243}
244
245do_install[prefuncs] += "find_user_dts_overlay_file"
246
247do_install() {
248 install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
249
250 # Install dtbo
251 # In case of dtbo as input, dtbo will be copied from directly from ${S}
252 # In case of dtsi as input, dtbo will be copied from directly from ${B}
253 # If more than one dtbo file is found then fatal the task.
254 # If no dtbo file is found add warning message as in some use case if IP
255 # doesn't have any driver then user can load pdi/bit/bin file.
256 if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then
257 install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
258 elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then
259 bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)"
260 elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
261 install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo
262 else
263 bbnote "A dtbo ending '.dtbo' expected but not found in ${S} or ${B}, This means firmware can be loaded without dtbo dependency."
264 fi
265
266 # Install bit or bin if soc family is zynq-7000 or zynqmp.
267 # In case of dtbo as input or no dtbo exists in ${B}, then .bit or .bin will
268 # be copied from directly from ${S} without renaming the .bit/.bin name to
269 # ${PN}.bit/${PN}.bin.
270 # if more than one .bit/.bin file is found then fatal the task.
271 # if no .bit/.bin file is found then fatal the task.
272 if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then
273 if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then
274 bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)"
275 elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then
276 bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)"
277 elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then
278 install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
279 elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then
280 install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
281 elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
282 install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin
283 else
284 bbfatal "A bitstream file with '.bit' or '.bin' expected but not found"
285 fi
286 fi
287
288 # Install pdi if soc family is versal or new silicon.
289 # In case of dtbo as input or no dtbo exists in ${B}, then .pdi will be copied
290 # from directly from ${S} without renaming the pdi name to ${PN}.pdi
291 # if more than one .pdi file is found then fail the task.
292 # In case of Versal DFx Static, only static dtbo can be loaded as BOOT.bin
293 # already contains static pdi. bbclass is not smart enough to determine
294 # whether it is static pdi or not, hence change fatal to warn if no PDI is found.
295 if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then
296 if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then
297 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
298 elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then
299 bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)"
300 elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then
301 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi
302 else
303 bbwarn "A PDI file with '.pdi' expected but not found"
304 fi
305 fi
306
307 # Install xclbin
308 if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then
309 install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin
310 fi
311
312 # Install shell.json or accel.json
313 if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then
314 install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
315 fi
316}
317
318do_deploy[noexec] = "1"
319
320FILES:${PN} += "${nonarch_base_libdir}/firmware/xilinx/${PN}"
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/dfx_user_dts.bbclass b/meta-xilinx-core/classes/dfx_user_dts.bbclass
deleted file mode 100644
index 4404aa05..00000000
--- a/meta-xilinx-core/classes/dfx_user_dts.bbclass
+++ /dev/null
@@ -1,267 +0,0 @@
1# 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
3# and DFx RP xsa outside of yocto.
4
5inherit devicetree
6
7DEPENDS = "dtc-native bootgen-native"
8
9# recipes that inherit from this class need to use an appropriate machine
10# override for COMPATIBLE_MACHINE to build successfully; don't allow building
11# for microblaze MACHINE
12COMPATIBLE_MACHINE ?= "^$"
13COMPATIBLE_MACHINE:microblaze = "^$"
14
15PACKAGE_ARCH = "${MACHINE_ARCH}"
16
17PROVIDES = ""
18
19do_fetch[cleandirs] = "${B}"
20
21DT_PADDING_SIZE = "0x1000"
22BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}"
23
24S ?= "${WORKDIR}"
25FW_DIR ?= ""
26DTSI_PATH ?= ""
27DTBO_PATH ?= ""
28DT_FILES_PATH = "${S}/${DTSI_PATH}"
29FIRMWARE_NAME_DT_FILE ?= ""
30USER_DTS_FILE ?= ""
31
32FIRMWARE_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"
34
35python() {
36 import re
37 soc_family = d.getVar("SOC_FAMILY")
38 if "git://" in d.getVar("SRC_URI") or "https://" in d.getVar("SRC_URI"):
39 d.setVar("S",'${WORKDIR}/git/'+d.getVar("FW_DIR"))
40 else:
41 dtsi_found = False
42 dtbo_found = False
43 bit_found = False
44 bin_found = False
45 pdi_found = False
46
47 # Required Inputs
48 if '.dtsi' in d.getVar("SRC_URI") or '.dts' in d.getVar("SRC_URI"):
49 dtsi_found = True
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://')))
51
52 if '.dtbo' in d.getVar("SRC_URI"):
53 dtbo_found = True
54 d.setVar("DTBO_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtbo' in a][0].lstrip('file://')))
55
56 if '.bit' in d.getVar("SRC_URI") and soc_family != "versal":
57 bit_found = True
58 d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bit' in a][0].lstrip('file://')))
59
60 if '.bin' in d.getVar("SRC_URI") and soc_family != "versal":
61 bin_found = True
62 d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bin' in a][0].lstrip('file://')))
63
64 if '.pdi' in d.getVar("SRC_URI") and soc_family == "versal":
65 pdi_found = True
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
68 # Check for valid combination of input files in SRC_URI
69 if dtsi_found or dtbo_found:
70 bb.debug(2, "dtsi or dtbo found in SRC_URI")
71 if bit_found or pdi_found or bin_found:
72 bb.debug(2, "bitstream or pdi found in SRC_URI")
73 elif 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.")
75 else:
76 raise bb.parse.SkipRecipe("Need one '.bit' or one '.pdi' file added to SRC_URI ")
77 else:
78 raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ")
79
80 # Check for valid combination of dtsi and dts files in SRC_URI
81 # Following file combinations are not supported use case.
82 # 1. More than one '.dtsi' and zero '.dts' file.
83 # 2. More than one '.dts' and zero or more than one '.dtsi'file .
84 pattern_dts = re.compile(r'[.]+dts\b')
85 pattern_dtsi = re.compile(r'[.]+dtsi\b')
86 dts_count = len([*re.finditer(pattern_dts, d.getVar('SRC_URI'))])
87 dtsi_count = len([*re.finditer(pattern_dtsi, d.getVar("SRC_URI"))])
88
89 if dtsi_count > 1 and dts_count == 0:
90 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:
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")
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}
101
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.
109python find_firmware_file() {
110 import glob
111 pattern_fw = 'firmware-name'
112 search_count = 0
113 for dt_files in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True):
114 with open(dt_files, "r") as f:
115 current_fd = f.read()
116 if pattern_fw in current_fd:
117 search_count += 1
118 if search_count > 1:
119 bb.error("firmware-name dt property found in more than one dt files! Please fix the dts or dtsi file.")
120 break
121 else:
122 d.setVar('FIRMWARE_NAME_DT_FILE', os.path.basename(dt_files))
123}
124
125do_configure[prefuncs] += "find_firmware_file"
126
127python do_configure() {
128 import glob, re, shutil
129 soc_family = d.getVar("SOC_FAMILY")
130
131 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")
133
134 # Renaming firmware-name using $PN as bitstream/PDI will be renamed using
135 # $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')):
137 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'
139 with open(new_dtsi, 'w') as newdtsi:
140 with open(orig_dtsi) as olddtsi:
141 for line in olddtsi:
142 if soc_family == 'versal':
143 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line))
144 else:
145 newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bit.bin\"',line))
146 shutil.move(new_dtsi,orig_dtsi)
147}
148
149do_compile[prefuncs] += "find_firmware_file"
150
151python devicetree_do_compile:append() {
152 import glob, subprocess, shutil
153 soc_family = d.getVar("SOC_FAMILY")
154
155 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
156
157 # Skip devicetree do_compile task if input file is dtbo in SRC_URI
158 if not dtbo_count:
159 # Convert .bit to bit.bin format only if dtsi is input.
160 # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit or
161 # .bit.bin format and corresponding file name. Hence we are not doing
162 # bit.bin conversion.
163 if soc_family != 'versal' and glob.glob(d.getVar('S') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')):
164 pn = d.getVar('PN')
165 biffile = pn + '.bif'
166
167 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}')
169
170 bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split()
171 bootgenargs += ["-image", biffile, "-o", pn + ".bit.bin"]
172 subprocess.run(bootgenargs, check = True)
173
174 # 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
176 # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bit.bin
177 # file, Hence we need to rename this file from <bit_file_name>.bit.bin to
178 # ${PN}.bit.bin which matches the firmware name in dtbo and move
179 # ${PN}.bit.bin to ${B} directory.
180 if soc_family == 'zynq':
181 src_bitbin_file = glob.glob(d.getVar('S') + (d.getVar('BIT_PATH') or '') + '/*.bit.bin')[0]
182 dst_bitbin_file = d.getVar('B') + '/' + pn + '.bit.bin'
183 shutil.move(src_bitbin_file, dst_bitbin_file)
184
185 if not os.path.isfile(pn + ".bit.bin"):
186 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'))
188}
189
190# If user inputs both dtsi and dts files then device-tree will generate dtbo
191# files for each dt file, Hence to package the firmware pick the right user dt
192# overlay file.
193python find_user_dts_overlay_file() {
194 import glob
195 dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f))
196 # Skip if input file is dtbo in SRC_URI
197 if not dtbo_count:
198 dts_count = get_dt_count(d, 'dts')
199 dtsi_count = get_dt_count(d, 'dtsi')
200 if dtsi_count == 1 and dts_count == 0:
201 dts_file =glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0]
202 elif dtsi_count >=0 and dts_count == 1:
203 dts_file = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dts')[0]
204
205 d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0])
206}
207
208do_install[prefuncs] += "find_user_dts_overlay_file"
209
210do_install() {
211 install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
212
213 # 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}
215 if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then
216 install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
217 elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then
218 bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)"
219 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
221 else
222 bbfatal "A dtbo ending '.dtbo' expected but not found"
223 fi
224
225 if [ "${SOC_FAMILY}" == "versal" ]; then
226 # In case of dtbo as input, pdi will be copied from directly from ${S}
227 # without renaming the pdi name to ${PN}.pdi
228 if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then
229 install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/
230 elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then
231 bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)"
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
242 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
244 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
246 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
248 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
250 install -Dm 0644 ${B}/${PN}.bit.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bit.bin
251 else
252 bbfatal "A bitstream file with '.bit' or '.bin' expected but not found"
253 fi
254 fi
255
256 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
258 fi
259
260 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}/
262 fi
263}
264
265do_deploy[noexec] = "1"
266
267FILES:${PN} += "${nonarch_base_libdir}/firmware/xilinx/${PN}"
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 b140fce4..f0a233cf 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
@@ -54,12 +54,14 @@ XILINX_ATF_VERSION[v2022.1] = "2.6-xilinx-v2022.1%"
54XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%" 54XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%"
55XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" 55XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%"
56XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" 56XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%"
57XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%"
57PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 58PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
58 59
59XILINX_UBOOT_VERSION[v2022.1] = "1:2021.01-xilinx-v2022.1%" 60XILINX_UBOOT_VERSION[v2022.1] = "1:2021.01-xilinx-v2022.1%"
60XILINX_UBOOT_VERSION[v2022.2] = "1:2022.01-xilinx-v2022.2%" 61XILINX_UBOOT_VERSION[v2022.2] = "1:2022.01-xilinx-v2022.2%"
61XILINX_UBOOT_VERSION[v2023.1] = "1:2023.01-xilinx-v2023.1%" 62XILINX_UBOOT_VERSION[v2023.1] = "1:2023.01-xilinx-v2023.1%"
62XILINX_UBOOT_VERSION[v2023.2] = "1:2023.01-xilinx-v2023.2%" 63XILINX_UBOOT_VERSION[v2023.2] = "1:2023.01-xilinx-v2023.2%"
64XILINX_UBOOT_VERSION[v2024.1] = "1:2024.01-xilinx-v2024.1%"
63 65
64PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 66PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
65PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 67PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
@@ -68,6 +70,7 @@ XILINX_LINUX_VERSION[v2022.1] = "5.15.19%"
68XILINX_LINUX_VERSION[v2022.2] = "5.15.36%" 70XILINX_LINUX_VERSION[v2022.2] = "5.15.36%"
69XILINX_LINUX_VERSION[v2023.1] = "6.1.30%" 71XILINX_LINUX_VERSION[v2023.1] = "6.1.30%"
70XILINX_LINUX_VERSION[v2023.2] = "6.1.60%" 72XILINX_LINUX_VERSION[v2023.2] = "6.1.60%"
73XILINX_LINUX_VERSION[v2024.1] = "6.6.10%"
71PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 74PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
72 75
73# XRT/ZOCL 76# XRT/ZOCL
@@ -75,6 +78,7 @@ XRT_ZOCL_VERSION[v2022.1] = "202210.2.13.479"
75XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0" 78XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0"
76XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" 79XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0"
77XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" 80XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0"
81XRT_ZOCL_VERSION[v2024.1] = "202410.2.17.0"
78PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 82PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
79PREFERRED_VERSION_kernel-module-zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 83PREFERRED_VERSION_kernel-module-zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
80 84
@@ -83,12 +87,14 @@ AIEFAL_VERSION[v2022.1] = "1.4"
83AIEFAL_VERSION[v2022.2] = "1.4" 87AIEFAL_VERSION[v2022.2] = "1.4"
84AIEFAL_VERSION[v2023.1] = "1.5" 88AIEFAL_VERSION[v2023.1] = "1.5"
85AIEFAL_VERSION[v2023.2] = "1.5" 89AIEFAL_VERSION[v2023.2] = "1.5"
90AIEFAL_VERSION[v2024.1] = "1.6"
86PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 91PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
87 92
88AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3" 93AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3"
89AI_ENGINE_DRIVER_VERSION[v2022.2] = "3.3" 94AI_ENGINE_DRIVER_VERSION[v2022.2] = "3.3"
90AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" 95AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4"
91AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" 96AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4"
97AI_ENGINE_DRIVER_VERSION[v2024.1] = "3.5"
92PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" 98PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
93 99
94# Add support to eSDK for gen-machine-conf if it exists 100# 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..1837da26 100644
--- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
+++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc
@@ -23,13 +23,16 @@ PREFERRED_PROVIDER_u-boot-tools ??= "u-boot-tools-xlnx"
23PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" 23PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native"
24PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" 24PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx"
25 25
26# Libmetal and OpenAMP Configuration
27PREFERRED_PROVIDER_libmetal ?= "libmetal-xlnx"
28PREFERRED_PROVIDER_open-amp ?= "open-amp-xlnx"
29
26do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" 30do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}"
27 31
28UBOOT_SUFFIX ?= "bin" 32UBOOT_SUFFIX ?= "bin"
29 33
30UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" 34UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}"
31UBOOT_ELF ?= "u-boot" 35UBOOT_ELF ?= "u-boot.elf"
32UBOOT_ELF:aarch64 ?= "u-boot.elf"
33 36
34# libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 37# libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400
35# lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 38# lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400
diff --git a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf
index bf5523ed..1028ac04 100644
--- a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf
@@ -6,6 +6,12 @@ require conf/machine/versal-generic.conf
6 6
7SOC_VARIANT = "ai-edge" 7SOC_VARIANT = "ai-edge"
8 8
9# VEK280 board has 12GB memory only but default versal-generic has QB_MEM set to
10# 8G, Hence we need set 12G in QB_MEM.
11QB_MEM = "-m 12G"
12
13QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb"
14
9#### No additional settings should be after the Postamble 15#### No additional settings should be after the Postamble
10#### Postamble 16#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_edge_generic']['versal-ai-edge-generic' != "${MACHINE}"]}" 17PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_edge_generic']['versal-ai-edge-generic' != "${MACHINE}"]}"
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf
index 2f35ba24..3582944b 100644
--- a/meta-xilinx-core/conf/machine/versal-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-generic.conf
@@ -84,7 +84,7 @@ QB_KERNEL_CMDLINE_APPEND ?= ""
84 84
85QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" 85QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"
86QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" 86QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"
87QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" 87QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"
88 88
89# Four total serial ports defined in this model (according to the dts) 89# Four total serial ports defined in this model (according to the dts)
90# 90#
diff --git a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf
index 23fffcb9..3e72da60 100644
--- a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf
@@ -6,6 +6,12 @@ require conf/machine/versal-generic.conf
6 6
7SOC_VARIANT = "hbm" 7SOC_VARIANT = "hbm"
8 8
9# VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G,
10# Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM
11QB_MEM = "-m 32G"
12
13QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb"
14
9#### No additional settings should be after the Postamble 15#### No additional settings should be after the Postamble
10#### Postamble 16#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_hbm_generic']['versal-hbm-generic' != "${MACHINE}"]}" 17PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_hbm_generic']['versal-hbm-generic' != "${MACHINE}"]}"
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/conf/machine/versal-prime-generic.conf b/meta-xilinx-core/conf/machine/versal-prime-generic.conf
index 94e9b05e..206f0e2a 100644
--- a/meta-xilinx-core/conf/machine/versal-prime-generic.conf
+++ b/meta-xilinx-core/conf/machine/versal-prime-generic.conf
@@ -6,6 +6,8 @@ require conf/machine/versal-generic.conf
6 6
7SOC_VARIANT = "prime" 7SOC_VARIANT = "prime"
8 8
9QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vmk180.dtb"
10
9#### No additional settings should be after the Postamble 11#### No additional settings should be after the Postamble
10#### Postamble 12#### Postamble
11PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_prime_generic']['versal-prime-generic' != "${MACHINE}"]}" 13PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_prime_generic']['versal-prime-generic' != "${MACHINE}"]}"
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..a03912d7
--- /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 = "xlnx_rel_v2024.1"
4LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4"
5PV = "${SRCBRANCH}+git"
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..94535abc
--- /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 = "dbf0857389190f4c4cedfb77bd1f9bdd7ab404f3"
3BRANCH = "xlnx_rel_v2024.1"
4LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505"
5PV = "${SRCBRANCH}+git"
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_%.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.bbappend
index 2b96f152..e0de911f 100644
--- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.bbappend
+++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.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-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-package-split.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc
deleted file mode 100644
index 2c73d931..00000000
--- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc
+++ /dev/null
@@ -1,46 +0,0 @@
1PACKAGES:prepend:class-target = "${PN}-x86_64 \
2 ${PN}-aarch64 \
3 ${PN}-arm \
4 ${PN}-i386 \
5 ${PN}-system-i386 \
6 ${PN}-microblaze \
7 ${PN}-support \
8 ${PN}-keymaps \
9 ${PN}-firmware \
10 "
11
12FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64"
13RDEPENDS:${PN}-x86_64:append:class-target = "${PN}"
14INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps"
15
16FILES:${PN}-i386:class-target = "${bindir}/qemu-i386"
17RDEPENDS:${PN}-i386:append:class-target = "${PN}"
18INSANE_SKIP:${PN}-i386:class-target = "file-rdeps"
19
20FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386"
21RDEPENDS:${PN}-system-i386:append:class-target = "${PN}"
22INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps"
23
24FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64"
25RDEPENDS:${PN}-aarch64:append:class-target = "${PN}"
26INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps"
27
28FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm"
29RDEPENDS:${PN}-arm:append:class-target = "${PN}"
30INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
31
32FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*"
33RDEPENDS:${PN}-microblaze:append:class-target = "${PN}"
34INSANE_SKIP:${PN}-arm:class-target = "file-rdeps"
35
36FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*"
37RDEPENDS:${PN}-support:class-target = "${PN} bash"
38
39FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*"
40RDEPENDS:${PN}-firmware:class-target = "${PN}"
41INSANE_SKIP:${PN}-firmware:class-target = "arch"
42
43FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*"
44RDEPENDS:${PN}-keymaps:class-target = "${PN}"
45
46PACKAGECONFIG: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_8.1%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_8.1%.bbappend
new file mode 100644
index 00000000..74aa15fb
--- /dev/null
+++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_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-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..8a2b7a46 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=v0.2024.x;protocol=https"
2SRCREV = "807435ae6fa0a07e8c84b458d138f3f54614eb5c" 2SRCREV = "4fb08575157d7712e0cd50e9e9c07620bc9f8b4b"
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/gen-machine-conf b/meta-xilinx-core/gen-machine-conf
Subproject 911941fc094dc0073c2f01a2b94de3cc6e993fe Subproject e3968c5d6b1d02b2c1fa51de838f0757bca1c16
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
index f053a9bd..1f1d0606 100644
--- 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
@@ -6,7 +6,7 @@ SUMMARY = "Image update is used to update alternate image on compatible firmware
6LICENSE = "MIT" 6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b" 7LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b"
8 8
9BRANCH = "master" 9BRANCH = "xlnx_rel_v2024.1"
10SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https" 10SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https"
11SRCREV = "a68308f329578d3585fd335071a9184aa7f46d2e" 11SRCREV = "a68308f329578d3585fd335071a9184aa7f46d2e"
12 12
@@ -16,6 +16,7 @@ S = "${WORKDIR}/git"
16 16
17COMPATIBLE_MACHINE = "^$" 17COMPATIBLE_MACHINE = "^$"
18COMPATIBLE_MACHINE:zynqmp = "zynqmp" 18COMPATIBLE_MACHINE:zynqmp = "zynqmp"
19COMPATIBLE_MACHINE:versal = "versal"
19 20
20PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" 21PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}"
21 22
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb
new file mode 100644
index 00000000..075fd94c
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb
@@ -0,0 +1,48 @@
1SUMMARY = "Xilinx AI Engine runtime"
2DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP"
3
4require aie-rt-2024.inc
5
6SECTION = "libs"
7
8AIEDIR ?= "${S}/driver"
9S = "${WORKDIR}/git"
10I = "${AIEDIR}/include"
11
12COMPATIBLE_MACHINE = "^$"
13COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
14COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}"
15
16IOBACKENDS ?= "Linux"
17
18DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}"
19RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}"
20
21PROVIDES = "libxaiengine"
22RPROVIDES:${PN} = "libxaiengine"
23
24# The makefile isn't ready for parallel execution at the moment
25PARALLEL_MAKE = "-j 1"
26
27CFLAGS += "-Wall -Wextra"
28CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}"
29CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}"
30EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'"
31
32
33do_compile(){
34 oe_runmake
35}
36
37do_install(){
38 install -d ${D}${includedir}
39 install ${I}/*.h ${D}${includedir}/
40 install -d ${D}${includedir}/xaiengine
41 install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/
42 install -d ${D}${libdir}
43 cp -dr ${AIEDIR}/src/*.so* ${D}${libdir}
44}
45
46PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}"
47PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}"
48
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc
new file mode 100644
index 00000000..98b3a049
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc
@@ -0,0 +1,11 @@
1SECTION = "libs"
2
3REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https"
4
5BRANCH ?= "xlnx_rel_v2024.1"
6SRCREV ?= "56af0110186dfd546c58d96ff1d2f4f2d91f7724"
7
8LICENSE = "BSD-3-Clause"
9LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897"
10
11SRC_URI = "${REPO};branch=${BRANCH}"
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb
new file mode 100644
index 00000000..5c479d05
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb
@@ -0,0 +1,35 @@
1SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)"
2DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP"
3
4require aie-rt-2024.inc
5
6SECTION = "devel"
7
8XAIEFAL_DIR ?= "fal"
9S = "${WORKDIR}/git"
10
11COMPATIBLE_MACHINE = "^$"
12COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core"
13COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}"
14
15IOBACKENDS ?= "Linux"
16
17PROVIDES = "aiefal"
18ALLOW_EMPTY:${PN} = "1"
19
20inherit pkgconfig cmake
21
22DEPENDS = "libxaiengine"
23
24OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}"
25
26EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON "
27EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}"
28
29FILES:${PN}-demos = " \
30 ${bindir}/* \
31"
32
33PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}"
34PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}"
35
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.1.bb
new file mode 100644
index 00000000..fee8e069
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.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/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb
index 26a10677..9367fa2c 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..28f997f2
--- /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 = "xlnx_rel_v2024.1"
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..42e67ce6
--- /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 ?= "xlnx_rel_v2024.1"
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_2024.01-xilinx-v2024.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.1.bb
new file mode 100644
index 00000000..590d1755
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.1.bb
@@ -0,0 +1,21 @@
1require u-boot-tools-xlnx.inc
2require u-boot-xlnx-2024.1.inc
3
4# MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct
5# bmp_logo.h
6SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"'
7
8# Default do_compile fails with:
9# | error: object directory ../downloads/git2/github.com.Xilinx.u-boot-xlnx.git/objects does not exist; check .git/objects/info/alternates.
10# The regular workaround of calling 'git diff' seems to be problematic.
11do_compile () {
12 oe_runmake -C ${S} tools-only_defconfig O=${B}
13
14 # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and
15 # generating it requires bin2header tool, which for target build
16 # is built with target tools and thus cannot be executed on host.
17 sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config
18
19 oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B}
20}
21
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-2024.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc
new file mode 100644
index 00000000..425bb029
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc
@@ -0,0 +1,17 @@
1UBRANCH = "xlnx_rebase_v2024.01"
2
3SRCREV = "fbed1010e50d75e7d25acc1c2d09e1c34cb7e882"
4
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
7
8# u-boot-xlnx has support for these
9HAS_PLATFORM_INIT ?= " \
10 xilinx_zynqmp_virt_config \
11 xilinx_zynq_virt_defconfig \
12 xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
13 "
14
15DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native"
16
17FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2024.01:"
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 1f6781b6..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
@@ -2,5 +2,5 @@ SRC_URI += " \
2 file://microblaze-generic.cfg \ 2 file://microblaze-generic.cfg \
3 " 3 "
4 4
5# Disable buildpaths QA check warnings for u-boot-xlnx.elf. 5# Disable buildpaths and arch QA check warnings for u-boot-xlnx.elf.
6INSANE_SKIP:${PN}-elf += "buildpaths" 6INSANE_SKIP:${PN}-elf += "buildpaths arch"
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 ac391c3c..985ca427 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-scr/boot.cmd.ubifs b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs
index dca974ab..fde094cf 100644
--- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs
@@ -7,6 +7,10 @@
7 7
8for boot_target in ${boot_targets}; 8for boot_target in ${boot_targets};
9do 9do
10 echo "Trying to load boot images from ${boot_target}"
11 if test "${boot_target}" = "jtag" ; then
12 @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@
13 fi
10 if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then 14 if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then
11 ubifsls @@FIT_IMAGE@@ 15 ubifsls @@FIT_IMAGE@@
12 if test $? = 0; then 16 if test $? = 0; then
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_2024.01-xilinx-v2024.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.1.bb
new file mode 100644
index 00000000..718ad9d4
--- /dev/null
+++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.1.bb
@@ -0,0 +1,4 @@
1
2require u-boot-xlnx.inc
3require u-boot-spl-zynq-init.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/bootgen/bootgen_2023.2.bb b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.1.bb
index 03f323e1..3c68f10d 100644
--- a/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2023.2.bb
+++ b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.1.bb
@@ -10,8 +10,8 @@ DEPENDS += "openssl"
10RDEPENDS:${PN} += "openssl" 10RDEPENDS:${PN} += "openssl"
11 11
12REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" 12REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https"
13BRANCH = "xlnx_rel_v2023.2" 13BRANCH = "xlnx_rel_v2024.1"
14SRCREV = "8e6702bb5064b806e45028486de7376962470a36" 14SRCREV = "92e09bf37ea17d7b1f0e102a2548f27fb768651c"
15 15
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = "${REPO};${BRANCHARG}" 17SRC_URI = "${REPO};${BRANCHARG}"
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/libgles/libmali-xlnx_r9p0-01rel0.bb b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb
index 4ee36018..7f5fba0b 100644
--- a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb
+++ b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb
@@ -13,7 +13,7 @@ PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm"
13FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 13FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
14 14
15REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https" 15REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https"
16BRANCH ?= "xlnx_rel_v2023.2" 16BRANCH ?= "xlnx_rel_v2024.1"
17SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" 17SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e"
18BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 18BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
19 19
diff --git a/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.1.0-and-current-i2c-probing.patch b/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch
index 8ac3abc2..dde59936 100644
--- a/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.1.0-and-current-i2c-probing.patch
+++ b/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch
@@ -1,21 +1,21 @@
1From acda49e5baee80e8b06f7019e57e9aace4f7f923 Mon Sep 17 00:00:00 2001 1From adc957ce85d431da42dc42ed4074322d6c94932f Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com> 2From: Mark Hatle <mark.hatle@amd.com>
3Date: Thu, 16 May 2024 20:31:29 -0600 3Date: Thu, 16 May 2024 20:31:29 -0600
4Subject: [PATCH] Support both pre 6.1.0 and current i2c probing 4Subject: [PATCH] Support both pre 6.4.0 and current i2c probing
5 5
6Signed-off-by: Mark Hatle <mark.hatle@amd.com> 6Signed-off-by: Mark Hatle <mark.hatle@amd.com>
7--- 7---
8 dp/xfmc/dp141.c | 8 ++++++++ 8 dp/xfmc/dp141.c | 13 +++++++++++++
9 dp/xfmc/fmc.c | 8 ++++++++ 9 dp/xfmc/fmc.c | 13 +++++++++++++
10 dp/xfmc/fmc64.c | 9 +++++++++ 10 dp/xfmc/fmc64.c | 14 ++++++++++++++
11 dp/xfmc/fmc65.c | 8 ++++++++ 11 dp/xfmc/fmc65.c | 13 +++++++++++++
12 dp/xfmc/idt.c | 16 ++++++++++++---- 12 dp/xfmc/idt.c | 21 +++++++++++++++++----
13 dp/xfmc/mcdp6000.c | 8 ++++++++ 13 dp/xfmc/mcdp6000.c | 13 +++++++++++++
14 dp/xfmc/tipower.c | 8 ++++++++ 14 dp/xfmc/tipower.c | 13 +++++++++++++
15 7 files changed, 61 insertions(+), 4 deletions(-) 15 7 files changed, 96 insertions(+), 4 deletions(-)
16 16
17diff --git a/dp/xfmc/dp141.c b/dp/xfmc/dp141.c 17diff --git a/dp/xfmc/dp141.c b/dp/xfmc/dp141.c
18index 002afe8..29e6c61 100755 18index dfdb6f4..5fddd2b
19--- a/dp/xfmc/dp141.c 19--- a/dp/xfmc/dp141.c
20+++ b/dp/xfmc/dp141.c 20+++ b/dp/xfmc/dp141.c
21@@ -14,6 +14,7 @@ 21@@ -14,6 +14,7 @@
@@ -26,7 +26,20 @@ index 002afe8..29e6c61 100755
26 26
27 /**************************** Type Definitions *******************************/ 27 /**************************** Type Definitions *******************************/
28 28
29@@ -135,9 +136,16 @@ err_regmap: 29@@ -105,7 +106,12 @@ static const struct i2c_device_id dp141_id[] = {
30 };
31 MODULE_DEVICE_TABLE(i2c, dp141_id);
32
33+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
34 static int dp141_probe(struct i2c_client *client)
35+#else
36+static int dp141_probe(struct i2c_client *client,
37+ const struct i2c_device_id *id)
38+#endif
39 {
40 int ret;
41
42@@ -134,9 +140,16 @@ err_regmap:
30 return ret; 43 return ret;
31 } 44 }
32 45
@@ -44,7 +57,7 @@ index 002afe8..29e6c61 100755
44 static struct i2c_driver dp141_i2c_driver = { 57 static struct i2c_driver dp141_i2c_driver = {
45 .driver = { 58 .driver = {
46diff --git a/dp/xfmc/fmc.c b/dp/xfmc/fmc.c 59diff --git a/dp/xfmc/fmc.c b/dp/xfmc/fmc.c
47index 16767c7..9be45d9 100755 60index 3447785..2ed136c
48--- a/dp/xfmc/fmc.c 61--- a/dp/xfmc/fmc.c
49+++ b/dp/xfmc/fmc.c 62+++ b/dp/xfmc/fmc.c
50@@ -14,6 +14,7 @@ 63@@ -14,6 +14,7 @@
@@ -55,7 +68,20 @@ index 16767c7..9be45d9 100755
55 68
56 /**************************** Type Definitions *******************************/ 69 /**************************** Type Definitions *******************************/
57 70
58@@ -122,9 +123,16 @@ err_regmap: 71@@ -93,7 +94,12 @@ static const struct i2c_device_id fmc_id[] = {
72 };
73 MODULE_DEVICE_TABLE(i2c, fmc_id);
74
75+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
76 static int fmc_probe(struct i2c_client *client)
77+#else
78+static int fmc_probe(struct i2c_client *client,
79+ const struct i2c_device_id *id)
80+#endif
81 {
82 int ret;
83
84@@ -121,9 +127,16 @@ err_regmap:
59 return ret; 85 return ret;
60 } 86 }
61 87
@@ -73,7 +99,7 @@ index 16767c7..9be45d9 100755
73 static struct i2c_driver fmc_i2c_driver = { 99 static struct i2c_driver fmc_i2c_driver = {
74 .driver = { 100 .driver = {
75diff --git a/dp/xfmc/fmc64.c b/dp/xfmc/fmc64.c 101diff --git a/dp/xfmc/fmc64.c b/dp/xfmc/fmc64.c
76index 2d06327..c677072 100755 102index 6f5562c..a0bad7a
77--- a/dp/xfmc/fmc64.c 103--- a/dp/xfmc/fmc64.c
78+++ b/dp/xfmc/fmc64.c 104+++ b/dp/xfmc/fmc64.c
79@@ -14,6 +14,8 @@ 105@@ -14,6 +14,8 @@
@@ -85,7 +111,20 @@ index 2d06327..c677072 100755
85 /**************************** Type Definitions *******************************/ 111 /**************************** Type Definitions *******************************/
86 static const struct regmap_config fmc64_regmap_config = { 112 static const struct regmap_config fmc64_regmap_config = {
87 .reg_bits = 16, 113 .reg_bits = 16,
88@@ -119,9 +121,16 @@ err_regmap: 114@@ -89,7 +91,12 @@ static const struct i2c_device_id fmc64_id[] = {
115 };
116 MODULE_DEVICE_TABLE(i2c, fmc64_id);
117
118+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
119 static int fmc64_probe(struct i2c_client *client)
120+#else
121+static int fmc64_probe(struct i2c_client *client,
122+ const struct i2c_device_id *id)
123+#endif
124 {
125 int ret;
126
127@@ -118,9 +125,16 @@ err_regmap:
89 return ret; 128 return ret;
90 } 129 }
91 130
@@ -103,7 +142,7 @@ index 2d06327..c677072 100755
103 static struct i2c_driver fmc64_i2c_driver = { 142 static struct i2c_driver fmc64_i2c_driver = {
104 .driver = { 143 .driver = {
105diff --git a/dp/xfmc/fmc65.c b/dp/xfmc/fmc65.c 144diff --git a/dp/xfmc/fmc65.c b/dp/xfmc/fmc65.c
106index 5eb6c81..6927f05 100755 145index 9f091f9..ce7f884
107--- a/dp/xfmc/fmc65.c 146--- a/dp/xfmc/fmc65.c
108+++ b/dp/xfmc/fmc65.c 147+++ b/dp/xfmc/fmc65.c
109@@ -14,6 +14,7 @@ 148@@ -14,6 +14,7 @@
@@ -114,7 +153,20 @@ index 5eb6c81..6927f05 100755
114 153
115 /**************************** Type Definitions *******************************/ 154 /**************************** Type Definitions *******************************/
116 155
117@@ -121,9 +122,16 @@ err_regmap: 156@@ -91,7 +92,12 @@ static const struct i2c_device_id fmc65_id[] = {
157 };
158 MODULE_DEVICE_TABLE(i2c, fmc65_id);
159
160+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
161 static int fmc65_probe(struct i2c_client *client)
162+#else
163+static int fmc65_probe(struct i2c_client *client,
164+ const struct i2c_device_id *id)
165+#endif
166 {
167 int ret;
168
169@@ -120,9 +126,16 @@ err_regmap:
118 return ret; 170 return ret;
119 } 171 }
120 172
@@ -132,7 +184,7 @@ index 5eb6c81..6927f05 100755
132 static struct i2c_driver fmc65_i2c_driver = { 184 static struct i2c_driver fmc65_i2c_driver = {
133 .driver = { 185 .driver = {
134diff --git a/dp/xfmc/idt.c b/dp/xfmc/idt.c 186diff --git a/dp/xfmc/idt.c b/dp/xfmc/idt.c
135index 84ba521..458d685 100755 187index 348c863..f332277
136--- a/dp/xfmc/idt.c 188--- a/dp/xfmc/idt.c
137+++ b/dp/xfmc/idt.c 189+++ b/dp/xfmc/idt.c
138@@ -17,6 +17,7 @@ 190@@ -17,6 +17,7 @@
@@ -172,7 +224,20 @@ index 84ba521..458d685 100755
172 if (ret) 224 if (ret)
173 dev_dbg(&idt->client->dev, 225 dev_dbg(&idt->client->dev,
174 "IDT_8T49N24x_enable 1 I2C progmming failed\n"); 226 "IDT_8T49N24x_enable 1 I2C progmming failed\n");
175@@ -518,9 +519,16 @@ err_regmap: 227@@ -489,7 +490,12 @@ static const struct i2c_device_id idt_id[] = {
228 };
229 MODULE_DEVICE_TABLE(i2c, idt_id);
230
231+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
232 static int idt_probe(struct i2c_client *client)
233+#else
234+static int idt_probe(struct i2c_client *client,
235+ const struct i2c_device_id *id)
236+#endif
237 {
238 int ret;
239
240@@ -517,9 +523,16 @@ err_regmap:
176 return ret; 241 return ret;
177 } 242 }
178 243
@@ -190,7 +255,7 @@ index 84ba521..458d685 100755
190 static struct i2c_driver idt_i2c_driver = { 255 static struct i2c_driver idt_i2c_driver = {
191 .driver = { 256 .driver = {
192diff --git a/dp/xfmc/mcdp6000.c b/dp/xfmc/mcdp6000.c 257diff --git a/dp/xfmc/mcdp6000.c b/dp/xfmc/mcdp6000.c
193index d14a75d..60a1fdf 100755 258index 5a7c5b2..f13979b
194--- a/dp/xfmc/mcdp6000.c 259--- a/dp/xfmc/mcdp6000.c
195+++ b/dp/xfmc/mcdp6000.c 260+++ b/dp/xfmc/mcdp6000.c
196@@ -14,6 +14,7 @@ 261@@ -14,6 +14,7 @@
@@ -201,7 +266,20 @@ index d14a75d..60a1fdf 100755
201 266
202 #define SWAP_BYTES(u32Value) ((u32Value & 0x000000FF) << 24)\ 267 #define SWAP_BYTES(u32Value) ((u32Value & 0x000000FF) << 24)\
203 |((u32Value & 0x0000FF00) << 8) \ 268 |((u32Value & 0x0000FF00) << 8) \
204@@ -394,9 +395,16 @@ err_regmap: 269@@ -363,7 +364,12 @@ static const struct i2c_device_id mcdp6000_id[] = {
270 };
271 MODULE_DEVICE_TABLE(i2c, mcdp6000_id);
272
273+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
274 static int mcdp6000_probe(struct i2c_client *client)
275+#else
276+static int mcdp6000_probe(struct i2c_client *client,
277+ const struct i2c_device_id *id)
278+#endif
279 {
280 int ret;
281
282@@ -393,9 +399,16 @@ err_regmap:
205 return ret; 283 return ret;
206 } 284 }
207 285
@@ -219,7 +297,7 @@ index d14a75d..60a1fdf 100755
219 static struct i2c_driver mcdp6000_i2c_driver = { 297 static struct i2c_driver mcdp6000_i2c_driver = {
220 .driver = { 298 .driver = {
221diff --git a/dp/xfmc/tipower.c b/dp/xfmc/tipower.c 299diff --git a/dp/xfmc/tipower.c b/dp/xfmc/tipower.c
222index d3536ab..ce00fff 100755 300index 46c3de1..6d247a8
223--- a/dp/xfmc/tipower.c 301--- a/dp/xfmc/tipower.c
224+++ b/dp/xfmc/tipower.c 302+++ b/dp/xfmc/tipower.c
225@@ -14,6 +14,7 @@ 303@@ -14,6 +14,7 @@
@@ -230,7 +308,20 @@ index d3536ab..ce00fff 100755
230 308
231 /**************************** Type Definitions *******************************/ 309 /**************************** Type Definitions *******************************/
232 310
233@@ -163,9 +164,16 @@ err_regmap: 311@@ -131,7 +132,12 @@ static const struct i2c_device_id tipower_id[] = {
312 };
313 MODULE_DEVICE_TABLE(i2c, tipower_id);
314
315+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
316 static int tipower_probe(struct i2c_client *client)
317+#else
318+static int tipower_probe(struct i2c_client *client,
319+ const struct i2c_device_id *id)
320+#endif
321 {
322 int ret;
323
324@@ -162,9 +168,16 @@ err_regmap:
234 return ret; 325 return ret;
235 } 326 }
236 327
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.1.60.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb
index 067f5af6..3aaac030 100644
--- a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.1.60.bb
+++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb
@@ -8,14 +8,14 @@ PV .= "+git"
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10 10
11BRANCH ?= "xlnx_rel_v2023.2" 11BRANCH ?= "xlnx_rel_v2024.1"
12REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" 12REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https"
13SRCREV ?= "5b0969ac09f301c33bccc140c8f60e832f5cf222" 13SRCREV ?= "e20942b256e6fb18eaef919c7441f65ad8afcf43"
14 14
15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
16SRC_URI = "${REPO};${BRANCHARG}" 16SRC_URI = "${REPO};${BRANCHARG}"
17 17
18SRC_URI += "file://0001-Support-both-pre-6.1.0-and-current-i2c-probing.patch" 18SRC_URI += "file://0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch"
19 19
20inherit module 20inherit module
21 21
diff --git a/meta-xilinx-core/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch b/meta-xilinx-core/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch
deleted file mode 100644
index cf4739eb..00000000
--- a/meta-xilinx-core/recipes-kernel/dtc/python3-dtc/0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch
+++ /dev/null
@@ -1,129 +0,0 @@
1From 4d4703e0199fb3556c37694e4d951785abca22fd Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Wed, 19 Jan 2022 12:46:42 -0500
4Subject: [PATCH] Revert "libfdt: overlay: make overlay_get_target() public"
5
6This reverts commit 45f3d1a095dd3440578d5c6313eba555a791f3fb.
7---
8 libfdt/fdt_overlay.c | 29 ++++++++++++++++++++++-------
9 libfdt/libfdt.h | 18 ------------------
10 libfdt/version.lds | 1 -
11 3 files changed, 22 insertions(+), 26 deletions(-)
12
13diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
14index 5c0c398..d217e79 100644
15--- a/libfdt/fdt_overlay.c
16+++ b/libfdt/fdt_overlay.c
17@@ -40,22 +40,37 @@ static uint32_t overlay_get_target_phandle(const void *fdto, int fragment)
18 return fdt32_to_cpu(*val);
19 }
20
21-int fdt_overlay_target_offset(const void *fdt, const void *fdto,
22- int fragment_offset, char const **pathp)
23+/**
24+ * overlay_get_target - retrieves the offset of a fragment's target
25+ * @fdt: Base device tree blob
26+ * @fdto: Device tree overlay blob
27+ * @fragment: node offset of the fragment in the overlay
28+ * @pathp: pointer which receives the path of the target (or NULL)
29+ *
30+ * overlay_get_target() retrieves the target offset in the base
31+ * device tree of a fragment, no matter how the actual targeting is
32+ * done (through a phandle or a path)
33+ *
34+ * returns:
35+ * the targeted node offset in the base device tree
36+ * Negative error code on error
37+ */
38+static int overlay_get_target(const void *fdt, const void *fdto,
39+ int fragment, char const **pathp)
40 {
41 uint32_t phandle;
42 const char *path = NULL;
43 int path_len = 0, ret;
44
45 /* Try first to do a phandle based lookup */
46- phandle = overlay_get_target_phandle(fdto, fragment_offset);
47+ phandle = overlay_get_target_phandle(fdto, fragment);
48 if (phandle == (uint32_t)-1)
49 return -FDT_ERR_BADPHANDLE;
50
51 /* no phandle, try path */
52 if (!phandle) {
53 /* And then a path based lookup */
54- path = fdt_getprop(fdto, fragment_offset, "target-path", &path_len);
55+ path = fdt_getprop(fdto, fragment, "target-path", &path_len);
56 if (path)
57 ret = fdt_path_offset(fdt, path);
58 else
59@@ -621,7 +636,7 @@ static int overlay_merge(void *fdt, void *fdto)
60 if (overlay < 0)
61 return overlay;
62
63- target = fdt_overlay_target_offset(fdt, fdto, fragment, NULL);
64+ target = overlay_get_target(fdt, fdto, fragment, NULL);
65 if (target < 0)
66 return target;
67
68@@ -764,7 +779,7 @@ static int overlay_symbol_update(void *fdt, void *fdto)
69 return -FDT_ERR_BADOVERLAY;
70
71 /* get the target of the fragment */
72- ret = fdt_overlay_target_offset(fdt, fdto, fragment, &target_path);
73+ ret = overlay_get_target(fdt, fdto, fragment, &target_path);
74 if (ret < 0)
75 return ret;
76 target = ret;
77@@ -786,7 +801,7 @@ static int overlay_symbol_update(void *fdt, void *fdto)
78
79 if (!target_path) {
80 /* again in case setprop_placeholder changed it */
81- ret = fdt_overlay_target_offset(fdt, fdto, fragment, &target_path);
82+ ret = overlay_get_target(fdt, fdto, fragment, &target_path);
83 if (ret < 0)
84 return ret;
85 target = ret;
86diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
87index a7f432c..7f117e8 100644
88--- a/libfdt/libfdt.h
89+++ b/libfdt/libfdt.h
90@@ -2116,24 +2116,6 @@ int fdt_del_node(void *fdt, int nodeoffset);
91 */
92 int fdt_overlay_apply(void *fdt, void *fdto);
93
94-/**
95- * fdt_overlay_target_offset - retrieves the offset of a fragment's target
96- * @fdt: Base device tree blob
97- * @fdto: Device tree overlay blob
98- * @fragment_offset: node offset of the fragment in the overlay
99- * @pathp: pointer which receives the path of the target (or NULL)
100- *
101- * fdt_overlay_target_offset() retrieves the target offset in the base
102- * device tree of a fragment, no matter how the actual targeting is
103- * done (through a phandle or a path)
104- *
105- * returns:
106- * the targeted node offset in the base device tree
107- * Negative error code on error
108- */
109-int fdt_overlay_target_offset(const void *fdt, const void *fdto,
110- int fragment_offset, char const **pathp);
111-
112 /**********************************************************************/
113 /* Debugging / informational functions */
114 /**********************************************************************/
115diff --git a/libfdt/version.lds b/libfdt/version.lds
116index cbce5d4..7ab85f1 100644
117--- a/libfdt/version.lds
118+++ b/libfdt/version.lds
119@@ -77,7 +77,6 @@ LIBFDT_1.2 {
120 fdt_appendprop_addrrange;
121 fdt_setprop_inplace_namelen_partial;
122 fdt_create_with_flags;
123- fdt_overlay_target_offset;
124 local:
125 *;
126 };
127--
1282.19.1
129
diff --git a/meta-xilinx-core/recipes-kernel/dtc/python3-dtc_1.6.1.bb b/meta-xilinx-core/recipes-kernel/dtc/python3-dtc_1.6.1.bb
deleted file mode 100644
index 95ab0be4..00000000
--- a/meta-xilinx-core/recipes-kernel/dtc/python3-dtc_1.6.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1SUMMARY = "Python Library for the Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "A python library for the Device Tree Compiler, a tool used to manipulate Device Tree files which contain a data structure for describing hardware."
4SECTION = "bootloader"
5LICENSE = "GPL-2.0-only | BSD-2-Clause"
6
7DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native libyaml dtc"
8
9SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=master \
10 file://0001-Revert-libfdt-overlay-make-overlay_get_target-public.patch \
11 "
12
13UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
14
15LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90"
16
17SRCREV = "c001fc01a43e7a06447c06ea3d50bd60641322b8"
18
19PV = "1.6.1+git"
20S = "${WORKDIR}/git"
21
22PYPA_WHEEL = "${S}/dist/libfdt-1.6.2*.whl"
23
24inherit setuptools3 pkgconfig
25
26BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch
index 1321a0a4..9bdbfc94 100644
--- a/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.1.0-and-current-kernels.patch
+++ b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch
@@ -5,9 +5,9 @@ Subject: [PATCH] Support both pre 6.4.0 and current kernels
5 5
6Signed-off-by: Mark Hatle <mark.hatle@amd.com> 6Signed-off-by: Mark Hatle <mark.hatle@amd.com>
7--- 7---
8 hdmi/xilinx_drm_hdmi.c | 3 +++ 8 hdmi/xilinx_drm_hdmi.c | 3 +++
9 misc/dp159.c | 9 +++++++++ 9 misc/dp159.c | 14 ++++++++++++++
10 2 files changed, 12 insertions(+) 10 2 files changed, 17 insertions(+)
11 11
12diff --git a/hdmi/xilinx_drm_hdmi.c b/hdmi/xilinx_drm_hdmi.c 12diff --git a/hdmi/xilinx_drm_hdmi.c b/hdmi/xilinx_drm_hdmi.c
13index 104fc3d..6ebbdca 100644 13index 104fc3d..6ebbdca 100644
@@ -32,7 +32,7 @@ index 104fc3d..6ebbdca 100644
32 #include <linux/clk.h> 32 #include <linux/clk.h>
33 #include <linux/delay.h> 33 #include <linux/delay.h>
34diff --git a/misc/dp159.c b/misc/dp159.c 34diff --git a/misc/dp159.c b/misc/dp159.c
35index 0a923d6..23a92e6 100644 35index 73e886f..d2c60d9 100644
36--- a/misc/dp159.c 36--- a/misc/dp159.c
37+++ b/misc/dp159.c 37+++ b/misc/dp159.c
38@@ -28,6 +28,7 @@ 38@@ -28,6 +28,7 @@
@@ -43,7 +43,20 @@ index 0a923d6..23a92e6 100644
43 43
44 MODULE_DESCRIPTION("i2c device driver for dp159 redriver and retimer"); 44 MODULE_DESCRIPTION("i2c device driver for dp159 redriver and retimer");
45 MODULE_AUTHOR("Leon Woestenberg"); 45 MODULE_AUTHOR("Leon Woestenberg");
46@@ -192,12 +193,20 @@ static int dp159_probe(struct i2c_client *client, 46@@ -133,7 +134,12 @@ struct clk_ops clk_tx_rate_ops = {
47 .round_rate = &clk_tx_round_rate,
48 };
49
50+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 4, 0)
51 static int dp159_probe(struct i2c_client *client)
52+#else
53+static int dp159_probe(struct i2c_client *client,
54+ const struct i2c_device_id *id)
55+#endif
56 {
57 struct clk_tx_linerate *clk_tx;
58 struct clk *clk;
59@@ -191,12 +197,20 @@ static int dp159_probe(struct i2c_client *client)
47 return 0; 60 return 0;
48 } 61 }
49 62
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.10.bb
index cb33380b..7e25fe1f 100644
--- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.1.60.bb
+++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.10.bb
@@ -8,14 +8,14 @@ PV .= "+git"
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10 10
11BRANCH ?= "xlnx_rel_v2023.2" 11BRANCH ?= "xlnx_rel_v2024.1"
12REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" 12REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https"
13SRCREV = "82209b0021a7b5d7ef71a859eed4bafeb541ed08" 13SRCREV = "edd297762e0bac3f4c5b64ef67244968e22020e2"
14 14
15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
16SRC_URI = "${REPO};${BRANCHARG}" 16SRC_URI = "${REPO};${BRANCHARG}"
17 17
18SRC_URI += "file://0001-Support-both-pre-6.1.0-and-current-kernels.patch" 18SRC_URI += "file://0001-Support-both-pre-6.4.0-and-current-kernels.patch"
19 19
20inherit module 20inherit module
21 21
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_6.6.10-v2024.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb
new file mode 100644
index 00000000..71ac690e
--- /dev/null
+++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.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 = "3af4295e00efdced3e8c6973606a7de55f6bf7dc"
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/0001-Current-gcc-requires-cstdint-for-C-types.patch b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Current-gcc-requires-cstdint-for-C-types.patch
deleted file mode 100644
index defe14dc..00000000
--- a/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Current-gcc-requires-cstdint-for-C-types.patch
+++ /dev/null
@@ -1,55 +0,0 @@
1From 2316632e8f3eefc21bc4f9cb97be4603b4c14719 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Thu, 28 Sep 2023 12:24:04 -0600
4Subject: [PATCH] Current gcc requires cstdint for C types
5
6Add #include <cstdint> to resolve the issues similar to the following:
7
8 module/module_structs.h:259:3: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
9 module/module_structs.h:260:3: error: 'uint16_t' does not name a type
10
11Signed-off-by: Mark Hatle <mark.hatle@amd.com>
12---
13 exe_omx/encoder/EncCmdMngr.h | 1 +
14 module/module_structs.h | 1 +
15 utility/processor_fifo.h | 1 +
16 3 files changed, 3 insertions(+)
17
18diff --git a/exe_omx/encoder/EncCmdMngr.h b/exe_omx/encoder/EncCmdMngr.h
19index 6dacd68..cd3d0a6 100644
20--- a/exe_omx/encoder/EncCmdMngr.h
21+++ b/exe_omx/encoder/EncCmdMngr.h
22@@ -7,6 +7,7 @@
23 #include <iostream>
24 #include <string>
25 #include <vector>
26+#include <cstdint>
27
28 #include "ICommandsSender.h"
29
30diff --git a/module/module_structs.h b/module/module_structs.h
31index 7151b86..37ff8ac 100644
32--- a/module/module_structs.h
33+++ b/module/module_structs.h
34@@ -6,6 +6,7 @@
35 #include "module_enums.h"
36 #include <string>
37 #include <vector>
38+#include <cstdint>
39
40 template<typename T>
41 struct InputOutput
42diff --git a/utility/processor_fifo.h b/utility/processor_fifo.h
43index 1c62ba4..3c9cd86 100644
44--- a/utility/processor_fifo.h
45+++ b/utility/processor_fifo.h
46@@ -6,6 +6,7 @@
47 #include <utility/locked_queue.h>
48 #include <thread>
49 #include <functional>
50+#include <string>
51
52 #if defined __linux__
53 #include <sys/prctl.h>
54--
552.34.1
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch
deleted file mode 100644
index 788edd03..00000000
--- a/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From b58c0a7dd0eeb16b2251edfad3b4763ce5653ea2 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Thu, 28 Sep 2023 12:04:34 -0600
4Subject: [PATCH] Support updated gcc, add cstdint where necessary
5
6With the latest gcc, cstdint is now needs to be explicitly included, otherwise
7errors similar to the following will occur:
8
9 include/lib_app/Parser.h:413:36: error: 'uint32_t' has not been declared
10 413 | static void resetFlag(T* bitfield, uint32_t uFlag)
11 | ^~~~~~~~
12 include/lib_app/Parser.h: In function 'void resetFlag(T*, int)':
13 include/lib_app/Parser.h:415:20: error: 'uint32_t' was not declared in this scope
14 415 | *bitfield = (T)((uint32_t)*bitfield & ~uFlag);
15 | ^~~~~~~~
16 include/lib_app/Parser.h:18:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
17 17 | #include <iomanip>
18 +++ |+#include <cstdint>
19 18 |
20
21Signed-off-by: Mark Hatle <mark.hatle@amd.com>
22---
23 exe_encoder/EncCmdMngr.h | 1 +
24 include/lib_app/Parser.h | 1 +
25 2 files changed, 2 insertions(+)
26
27diff --git a/exe_encoder/EncCmdMngr.h b/exe_encoder/EncCmdMngr.h
28index 6dacd68..cd3d0a6 100644
29--- a/exe_encoder/EncCmdMngr.h
30+++ b/exe_encoder/EncCmdMngr.h
31@@ -7,6 +7,7 @@
32 #include <iostream>
33 #include <string>
34 #include <vector>
35+#include <cstdint>
36
37 #include "ICommandsSender.h"
38
39diff --git a/include/lib_app/Parser.h b/include/lib_app/Parser.h
40index efb7f94..66d5164 100644
41--- a/include/lib_app/Parser.h
42+++ b/include/lib_app/Parser.h
43@@ -15,6 +15,7 @@
44 #include <sstream>
45 #include <vector>
46 #include <iomanip>
47+#include <cstdint>
48
49 std::deque<Token> toReversePolish(std::deque<Token>& tokens);
50 std::string parseString(std::deque<Token>& tokens);
51--
522.34.1
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_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb
index ba4b9479..2d3c3a89 100644
--- a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb
@@ -1,17 +1,18 @@
1SUMMARY = "Linux kernel module for Video Code Unit" 1SUMMARY = "Linux kernel module for Video Code Unit"
2DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" 2DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices"
3SECTION = "kernel/modules" 3SECTION = "kernel/modules"
4LICENSE = "GPL-2.0-only" 4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" 5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a"
6 6
7PV .= "+git" 7PV .= "+git"
8 8
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10
10FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 11FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
11 12
12BRANCH = "xlnx_rel_v2023.2" 13BRANCH = "xlnx_rel_v2024.1"
13REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" 14REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https"
14SRCREV = "689c8d823b383e2a8a5249be49de627f866cfaf2" 15SRCREV = "91d19a16308a438596138d30d8174e148fc45584"
15 16
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 17BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = " \ 18SRC_URI = " \
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2024.1.bb
index 7b320c6a..c968af52 100644
--- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-ctrlsw_1.0.79-xilinx-v2024.1.bb
@@ -1,24 +1,20 @@
1SUMMARY = "Control Software for VCU" 1SUMMARY = "Control Software for VCU"
2DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" 2DESCRIPTION = "Control software libraries, test applications and headers provider for VCU"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ef69c2bb405668101824f0b644631e2e" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5 5
6# Recipe has been renamed 6# Recipe has been renamed
7PROVIDES += "libvcu-xlnx" 7PROVIDES += "libvcu-xlnx"
8 8
9PV .= "+git" 9PV .= "+git"
10 10
11BRANCH ?= "xlnx_rel_v2023.2" 11BRANCH ?= "xlnx_rel_v2024.1"
12REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" 12REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https"
13SRCREV = "84b0856cad7844d69f57ac4d9447c20930875475" 13SRCREV = "940f9fa933402de6f959911c236f36add5dd3a40"
14 14
15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
16SRC_URI = "${REPO};${BRANCHARG}" 16SRC_URI = "${REPO};${BRANCHARG}"
17 17
18SRC_URI += "file://0001-Support-updated-gcc-add-cstdint-where-necessary.patch"
19
20PACKAGE_ARCH = "${MACHINE_ARCH}"
21
22S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
23 19
24inherit features_check 20inherit features_check
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.1.bb
index becb73b7..92ef7301 100644
--- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.1.bb
@@ -1,7 +1,7 @@
1SUMMARY = "OpenMAX Integration layer for VCU" 1SUMMARY = "OpenMAX Integration layer for VCU"
2DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" 2DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ef69c2bb405668101824f0b644631e2e" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5 5
6# Recipe has been renamed 6# Recipe has been renamed
7PROVIDES += "libomxil-xlnx" 7PROVIDES += "libomxil-xlnx"
@@ -9,15 +9,13 @@ PROVIDES += "libomxil-xlnx"
9# Version from core/core_version.mk 9# Version from core/core_version.mk
10PV .= "+git" 10PV .= "+git"
11 11
12BRANCH ?= "xlnx_rel_v2023.2" 12BRANCH ?= "xlnx_rel_v2024.1"
13REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" 13REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https"
14SRCREV = "3a04b5adc661a0eced626c1373dbbfe699ae6fe0" 14SRCREV = "dc34204543b89997577bd2c9757b3c218e6caccc"
15 15
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = "${REPO};${BRANCHARG}" 17SRC_URI = "${REPO};${BRANCHARG}"
18 18
19SRC_URI += "file://0001-Current-gcc-requires-cstdint-for-C-types.patch"
20
21S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"
22 20
23inherit features_check 21inherit features_check
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20230530-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20240216-xilinx-v2024.1.bb
index ccd58f31..f500ec36 100644
--- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20230530-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_20240216-xilinx-v2024.1.bb
@@ -1,15 +1,15 @@
1SUMMARY = "Firmware for VCU" 1SUMMARY = "Firmware for VCU"
2DESCRIPTION = "Firmware binaries provider for VCU" 2DESCRIPTION = "Firmware binaries provider for VCU"
3LICENSE = "Proprietary" 3LICENSE = "Proprietary"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=52eb1e8f27e0e189b175c7d75f028cc6" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9bef8aa9d1eba8aca1b7dffdef500262"
5 5
6PV .= "+git" 6PV .= "+git"
7 7
8S = "${WORKDIR}/git" 8S = "${WORKDIR}/git"
9 9
10BRANCH ?= "xlnx_rel_v2023.2" 10BRANCH ?= "xlnx_rel_v2024.1"
11REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" 11REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https"
12SRCREV = "f4ab98d26aa3e244a487f518f5a76071137c8402" 12SRCREV = "6ee1998c53817ab0c137b8b99089337d5caba62c"
13 13
14BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 14BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
15SRC_URI = "${REPO};${BRANCHARG}" 15SRC_URI = "${REPO};${BRANCHARG}"
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/files/0001-include-libapp-Parser.h-Add-cstdint.patch b/meta-xilinx-core/recipes-multimedia/vdu/files/0001-include-libapp-Parser.h-Add-cstdint.patch
deleted file mode 100644
index 04d59c60..00000000
--- a/meta-xilinx-core/recipes-multimedia/vdu/files/0001-include-libapp-Parser.h-Add-cstdint.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From 79eddc5c5474c9b61bf6b2e648eba8bca61469b9 Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Thu, 25 Jan 2024 12:30:24 -0700
4Subject: [PATCH] include/libapp/Parser.h: Add cstdint
5
6Resolves usages of unit32_t being undefined
7
8Signed-off-by: Mark Hatle <mark.hatle@amd.com>
9---
10 include/lib_app/Parser.h | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/include/lib_app/Parser.h b/include/lib_app/Parser.h
14index 976a835..6fa63ce 100644
15--- a/include/lib_app/Parser.h
16+++ b/include/lib_app/Parser.h
17@@ -35,6 +35,7 @@
18 #include <sstream>
19 #include <vector>
20 #include <iomanip>
21+#include <cstdint>
22
23 std::deque<Token> toReversePolish(std::deque<Token>& tokens);
24 std::string parseString(std::deque<Token>& tokens);
25--
262.34.1
27
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_2024.1.bb
index 8b20baba..7f5fc367 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb
@@ -1,7 +1,7 @@
1SUMMARY = "Linux kernel module for Video Decode Unit" 1SUMMARY = "Linux kernel module for Video Decode Unit"
2DESCRIPTION = "Out-of-tree VDU decoder common kernel modules" 2DESCRIPTION = "Out-of-tree VDU decoder common kernel modules"
3SECTION = "kernel/modules" 3SECTION = "kernel/modules"
4LICENSE = "GPLv2" 4LICENSE = "GPL-2.0-or-later"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" 5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a"
6 6
7PV .= "+git" 7PV .= "+git"
@@ -9,13 +9,12 @@ PV .= "+git"
9S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
10FILESEXTRAPATHS:prepend := "${THISDIR}/files:" 10FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
11 11
12BRANCH = "xlnx_rel_v2023.2" 12BRANCH ?= "xlnx_rel_v2024.1"
13REPO = "git://github.com/Xilinx/vdu-modules.git;protocol=https" 13REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https"
14SRCREV = "4d5134f54006f904f0b28f00e05dd3febd5fcfd3" 14SRCREV ?= "25773344ce1e539e7136c5a30cdee98a6cf490a8"
15 15
16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 16BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
17SRC_URI = " \ 17SRC_URI = "${REPO};${BRANCHARG} \
18 ${REPO};${BRANCHARG} \
19 file://99-vdu-enc-dec.rules \ 18 file://99-vdu-enc-dec.rules \
20" 19"
21 20
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.73-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.79-xilinx-v2024.1.bb
index a3c1fc4d..7dfaf20b 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.73-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_1.0.79-xilinx-v2024.1.bb
@@ -1,20 +1,19 @@
1SUMMARY = "Control Software for VDU" 1SUMMARY = "Control Software for VDU"
2DESCRIPTION = "Control software libraries, test applications and headers provider for VDU" 2DESCRIPTION = "Control software libraries, test applications and headers provider for VDU"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5 5
6PV .= "+git" 6PV .= "+git"
7 7
8BRANCH ?= "xlnx_rel_v2023.2" 8BRANCH ?= "xlnx_rel_v2024.1"
9REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" 9REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https"
10SRCREV ?= "1beb8f247d01b1a728faea36ce8f7847c895482f" 10SRCREV ?= "fb8730a808b707bfb86d3d64881899214a951ff6"
11 11
12BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 12BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
13SRC_URI = "${REPO};${BRANCHARG} \ 13SRC_URI = "${REPO};${BRANCHARG}"
14 file://0001-include-libapp-Parser.h-Add-cstdint.patch \
15 "
16 14
17S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
16B = "${S}"
18 17
19inherit autotools features_check 18inherit autotools features_check
20 19
@@ -24,6 +23,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
24 23
25RDEPENDS:${PN} = "kernel-module-vdu" 24RDEPENDS:${PN} = "kernel-module-vdu"
26 25
26do_compile[dirs] = "${S}"
27do_install[dirs] = "${S}"
28
27EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" 29EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'"
28EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}" 30EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}"
29 31
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.1.bb
index df39c41f..6f09b8eb 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.1.bb
@@ -1,19 +1,19 @@
1SUMMARY = "OpenMAX Integration layer for VDU" 1SUMMARY = "OpenMAX Integration layer for VDU"
2DESCRIPTION = "OMX IL Libraries,test application and headers for VDU" 2DESCRIPTION = "OMX IL Libraries,test application and headers for VDU"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd"
5 5
6PV .= "+git" 6PV .= "+git${SRCPV}"
7 7
8BRANCH ?= "xlnx_rel_v2023.2" 8BRANCH ?= "xlnx_rel_v2024.1"
9REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" 9REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https"
10SRCREV ?= "811eefac953fd5e098c69cada97a0dd35f5e9015" 10SRCREV ?= "af9c6e8935799f4dcd579b0164dd05eb039b569d"
11 11
12BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 12BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
13SRC_URI = "${REPO};${BRANCHARG} \ 13SRC_URI = "${REPO};${BRANCHARG}"
14 file://0001-libvdu-omxil-Fix-missing-definitions.patch \ 14
15 " 15S = "${WORKDIR}/git"
16S = "${WORKDIR}/git" 16B = "${WORKDIR}/git"
17 17
18inherit autotools features_check 18inherit autotools features_check
19 19
@@ -26,6 +26,9 @@ RDEPENDS:${PN} = "kernel-module-vdu libvdu-ctrlsw"
26 26
27EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include" 27EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include"
28 28
29do_compile[dirs] = "${S}"
30do_install[dirs] = "${S}"
31
29EXTRA_OEMAKE = " \ 32EXTRA_OEMAKE = " \
30 CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ 33 CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \
31 EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ 34 EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20230127-xilinx-v2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.1.bb
index ddc8d9dc..c4330a3c 100644
--- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20230127-xilinx-v2023.2.bb
+++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.1.bb
@@ -1,15 +1,16 @@
1SUMMARY = "Firmware for VDU" 1SUMMARY = "Firmware for VDU"
2DESCRIPTION = "Firmware binaries provider for VDU" 2DESCRIPTION = "Firmware binaries provider for VDU"
3LICENSE = "Proprietary" 3LICENSE = "Proprietary"
4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c5784f63397086d836580d8785d1deb9" 4LIC_FILES_CHKSUM = "file://LICENSE.md;md5=722a9d20bf58ac06585a6d91ee36e60e"
5 5
6PV .= "+git" 6PV .= "+git"
7 7
8S = "${WORKDIR}/git" 8S = "${WORKDIR}/git"
9B = "${S}"
9 10
10BRANCH ?= "xlnx_rel_v2023.2" 11BRANCH ?= "xlnx_rel_v2024.1"
11REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" 12REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https"
12SRCREV ?= "731897772730178f6a4e77eedeb4fb53faa1ab4d" 13SRCREV ?= "724de80630edcb87d865d69f1a6c0dc61c3f9f12"
13 14
14BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" 15BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
15SRC_URI = "${REPO};${BRANCHARG}" 16SRC_URI = "${REPO};${BRANCHARG}"
@@ -20,10 +21,11 @@ REQUIRED_MACHINE_FEATURES = "vdu"
20 21
21PACKAGE_ARCH = "${MACHINE_ARCH}" 22PACKAGE_ARCH = "${MACHINE_ARCH}"
22 23
23do_compile[noexec] = "1"
24
25EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" 24EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware"
26 25
26do_compile[noexec] = "1"
27do_install[dirs] = "${S}"
28
27# Inhibit warnings about files being stripped 29# Inhibit warnings about files being stripped
28INHIBIT_PACKAGE_DEBUG_SPLIT = "1" 30INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
29INHIBIT_PACKAGE_STRIP = "1" 31INHIBIT_PACKAGE_STRIP = "1"
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_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.0.bb
new file mode 100644
index 00000000..37f32a23
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.0.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-${PV}.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-202210.2.13.479/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202210.2.13.479/xrt-cstdint.patch
new file mode 100644
index 00000000..58c3736a
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202210.2.13.479/xrt-cstdint.patch
@@ -0,0 +1,145 @@
1From e60fd92415bc849293944dd8fb7a72241df6055f Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@amd.com>
3Date: Mon, 20 May 2024 19:38:06 -0600
4Subject: [PATCH] Add cstdint as necessary
5
6In GCC 13.1 usage of uint64 and similar will result in an error without
7 #include <cstdint>
8
9Signed-off-by: Mark Hatle <mark.hatle@amd.com>
10---
11 src/runtime_src/core/common/time.h | 1 +
12 src/runtime_src/core/edge/common/aie_parser.h | 1 +
13 src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | 1 +
14 src/runtime_src/core/edge/user/zynq_dev.h | 1 +
15 src/runtime_src/tools/xclbinutil/CBOR.h | 1 +
16 src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | 1 +
17 src/runtime_src/tools/xclbinutil/XclBinSignature.h | 1 +
18 src/runtime_src/xdp/profile/database/events/vtf_event.h | 1 +
19 src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | 1 +
20 src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | 1 +
21 10 files changed, 10 insertions(+)
22
23diff --git a/src/runtime_src/core/common/time.h b/src/runtime_src/core/common/time.h
24index a4a96b11d..585d38756 100644
25--- a/src/runtime_src/core/common/time.h
26+++ b/src/runtime_src/core/common/time.h
27@@ -19,6 +19,7 @@
28
29 #include "core/common/config.h"
30 #include <string>
31+#include <cstdint>
32
33 namespace xrt_core {
34
35diff --git a/src/runtime_src/core/edge/common/aie_parser.h b/src/runtime_src/core/edge/common/aie_parser.h
36index 5bc32a36a..f35e97ecd 100644
37--- a/src/runtime_src/core/edge/common/aie_parser.h
38+++ b/src/runtime_src/core/edge/common/aie_parser.h
39@@ -20,6 +20,7 @@
40 #include <string>
41 #include <vector>
42 #include <unordered_map>
43+#include <cstdint>
44 #include "../user/aie/common_layer/adf_api_config.h"
45
46 namespace xrt_core {
47diff --git a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
48index 196304765..36ce35e80
49--- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
50+++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
51@@ -18,6 +18,7 @@
52
53 #include <string>
54 #include <vector>
55+#include <cstdint>
56
57 namespace adf
58 {
59diff --git a/src/runtime_src/core/edge/user/zynq_dev.h b/src/runtime_src/core/edge/user/zynq_dev.h
60index 6fe36c615..2abd7473b 100644
61--- a/src/runtime_src/core/edge/user/zynq_dev.h
62+++ b/src/runtime_src/core/edge/user/zynq_dev.h
63@@ -19,6 +19,7 @@
64 #include <fstream>
65 #include <string>
66 #include <vector>
67+#include <cstdint>
68
69 class zynq_device {
70 public:
71diff --git a/src/runtime_src/tools/xclbinutil/CBOR.h b/src/runtime_src/tools/xclbinutil/CBOR.h
72index e0f1175cd..d8c97ceb4 100644
73--- a/src/runtime_src/tools/xclbinutil/CBOR.h
74+++ b/src/runtime_src/tools/xclbinutil/CBOR.h
75@@ -22,6 +22,7 @@
76 // #includes here - please keep these to a bare minimum!
77 #include <string>
78 #include <sstream>
79+#include <cstdint>
80
81 // ------------ F O R W A R D - D E C L A R A T I O N S ----------------------
82 // Forward declarations - use these instead whenever possible...
83diff --git a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
84index 1ccd7ffc3..e20ae034a 100644
85--- a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
86+++ b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
87@@ -22,6 +22,7 @@
88 // #includes here - please keep these to a bare minimum!
89 #include <string>
90 #include <sstream>
91+#include <cstdint>
92
93 // ------------ F O R W A R D - D E C L A R A T I O N S ----------------------
94 // Forward declarations - use these instead whenever possible...
95diff --git a/src/runtime_src/tools/xclbinutil/XclBinSignature.h b/src/runtime_src/tools/xclbinutil/XclBinSignature.h
96index b19ab56a4..f1b72d4d2 100644
97--- a/src/runtime_src/tools/xclbinutil/XclBinSignature.h
98+++ b/src/runtime_src/tools/xclbinutil/XclBinSignature.h
99@@ -18,6 +18,7 @@
100 #define __XclBinSignature_h_
101
102 #include <string>
103+#include <cstdint>
104
105 // ----------------------- I N C L U D E S -----------------------------------
106
107diff --git a/src/runtime_src/xdp/profile/database/events/vtf_event.h b/src/runtime_src/xdp/profile/database/events/vtf_event.h
108index 24a755a9a..a46a43e9d 100644
109--- a/src/runtime_src/xdp/profile/database/events/vtf_event.h
110+++ b/src/runtime_src/xdp/profile/database/events/vtf_event.h
111@@ -18,6 +18,7 @@
112 #define VTF_EVENT_DOT_H
113
114 #include <fstream>
115+#include <cstdint>
116
117 #include "xdp/config.h"
118
119diff --git a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
120index f1369fe02..1f7486c7e 100644
121--- a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
122+++ b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
123@@ -18,6 +18,7 @@
124 #define XDP_PROFILE_AIE_TRACE_LOGGER_H
125
126 #include<iostream>
127+#include<cstdint>
128
129 namespace xdp {
130
131diff --git a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
132index a88597464..f392ec0e6 100644
133--- a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
134+++ b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
135@@ -19,6 +19,7 @@
136
137 #include <fstream>
138 #include <string>
139+#include <cstdint>
140
141 #include "xdp/config.h"
142
143--
1442.34.1
145
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202220.2.14.0/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202220.2.14.0/xrt-cstdint.patch
new file mode 100644
index 00000000..5546e0a4
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202220.2.14.0/xrt-cstdint.patch
@@ -0,0 +1,146 @@
1Signed-off-by: Mark Hatle <mark.hatle@amd.com>
2From f97ca31fc1b9aa973a2970e9248bc19f44b6a42f Mon Sep 17 00:00:00 2001
3From: Mark Hatle <mark.hatle@amd.com>
4Date: Mon, 20 May 2024 20:32:42 -0600
5Subject: [PATCH] Add cstdint as necessary
6
7In GCC 13.1 usage of uint64 and similar will result in an error without
8 #include <cstdint>
9
10Signed-off-by: Mark Hatle <mark.hatle@amd.com>
11---
12 src/runtime_src/core/common/time.h | 1 +
13 src/runtime_src/core/edge/common/aie_parser.h | 1 +
14 src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | 1 +
15 src/runtime_src/core/edge/user/zynq_dev.h | 1 +
16 src/runtime_src/tools/xclbinutil/CBOR.h | 1 +
17 src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | 1 +
18 src/runtime_src/tools/xclbinutil/XclBinSignature.h | 1 +
19 src/runtime_src/xdp/profile/database/events/vtf_event.h | 1 +
20 src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | 1 +
21 src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | 1 +
22 10 files changed, 10 insertions(+)
23
24diff --git a/src/runtime_src/core/common/time.h b/src/runtime_src/core/common/time.h
25index a4a96b11d..585d38756 100644
26--- a/src/runtime_src/core/common/time.h
27+++ b/src/runtime_src/core/common/time.h
28@@ -19,6 +19,7 @@
29
30 #include "core/common/config.h"
31 #include <string>
32+#include <cstdint>
33
34 namespace xrt_core {
35
36diff --git a/src/runtime_src/core/edge/common/aie_parser.h b/src/runtime_src/core/edge/common/aie_parser.h
37index 5bc32a36a..f35e97ecd 100644
38--- a/src/runtime_src/core/edge/common/aie_parser.h
39+++ b/src/runtime_src/core/edge/common/aie_parser.h
40@@ -20,6 +20,7 @@
41 #include <string>
42 #include <vector>
43 #include <unordered_map>
44+#include <cstdint>
45 #include "../user/aie/common_layer/adf_api_config.h"
46
47 namespace xrt_core {
48diff --git a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
49index 196304765..36ce35e80 100755
50--- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
51+++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
52@@ -18,6 +18,7 @@
53
54 #include <string>
55 #include <vector>
56+#include <cstdint>
57
58 namespace adf
59 {
60diff --git a/src/runtime_src/core/edge/user/zynq_dev.h b/src/runtime_src/core/edge/user/zynq_dev.h
61index 6fe36c615..2abd7473b 100644
62--- a/src/runtime_src/core/edge/user/zynq_dev.h
63+++ b/src/runtime_src/core/edge/user/zynq_dev.h
64@@ -19,6 +19,7 @@
65 #include <fstream>
66 #include <string>
67 #include <vector>
68+#include <cstdint>
69
70 class zynq_device {
71 public:
72diff --git a/src/runtime_src/tools/xclbinutil/CBOR.h b/src/runtime_src/tools/xclbinutil/CBOR.h
73index 368459f59..acbf6ebae 100644
74--- a/src/runtime_src/tools/xclbinutil/CBOR.h
75+++ b/src/runtime_src/tools/xclbinutil/CBOR.h
76@@ -22,6 +22,7 @@
77 // #includes here - please keep these to a bare minimum!
78 #include <string>
79 #include <sstream>
80+#include <cstdint>
81
82 // ------------ F O R W A R D - D E C L A R A T I O N S ----------------------
83 // Forward declarations - use these instead whenever possible...
84diff --git a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
85index 361015962..2ec16360d 100644
86--- a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
87+++ b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h
88@@ -20,6 +20,7 @@
89 // ----------------------- I N C L U D E S -----------------------------------
90 #include <sstream>
91 #include <string>
92+#include <cstdint>
93
94 // ----------- C L A S S : D T C S t r i n g s B l o c k -------------------
95
96diff --git a/src/runtime_src/tools/xclbinutil/XclBinSignature.h b/src/runtime_src/tools/xclbinutil/XclBinSignature.h
97index b19ab56a4..f1b72d4d2 100644
98--- a/src/runtime_src/tools/xclbinutil/XclBinSignature.h
99+++ b/src/runtime_src/tools/xclbinutil/XclBinSignature.h
100@@ -18,6 +18,7 @@
101 #define __XclBinSignature_h_
102
103 #include <string>
104+#include <cstdint>
105
106 // ----------------------- I N C L U D E S -----------------------------------
107
108diff --git a/src/runtime_src/xdp/profile/database/events/vtf_event.h b/src/runtime_src/xdp/profile/database/events/vtf_event.h
109index 24a755a9a..a46a43e9d 100644
110--- a/src/runtime_src/xdp/profile/database/events/vtf_event.h
111+++ b/src/runtime_src/xdp/profile/database/events/vtf_event.h
112@@ -18,6 +18,7 @@
113 #define VTF_EVENT_DOT_H
114
115 #include <fstream>
116+#include <cstdint>
117
118 #include "xdp/config.h"
119
120diff --git a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
121index 98c57de2e..6f67c43df 100644
122--- a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
123+++ b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h
124@@ -18,6 +18,7 @@
125 #define XDP_PROFILE_AIE_TRACE_LOGGER_H
126
127 #include<iostream>
128+#include<cstdint>
129
130 namespace xdp {
131
132diff --git a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
133index a88597464..f392ec0e6 100644
134--- a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
135+++ b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h
136@@ -19,6 +19,7 @@
137
138 #include <fstream>
139 #include <string>
140+#include <cstdint>
141
142 #include "xdp/config.h"
143
144--
1452.34.1
146
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc
new file mode 100644
index 00000000..852a8de2
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc
@@ -0,0 +1,13 @@
1REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https"
2BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}"
3SRC_URI = "${REPO};${BRANCHARG};name=xrt"
4
5BRANCH= "2024.1"
6SRCREV_xrt = "ec83e2a3348f3e5158f7a91821e9cf4690462681"
7
8SRC_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"
9SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578"
10
11SRC_URI += "git://github.com/serge1/ELFIO.git;branch=main;name=ELFIO;destsuffix=git/src/runtime_src/core/common/elf;protocol=https"
12SRCREV_ELFIO = "a04810f12625207cce72665d783babb80f0175a8"
13SRCREV_FORMAT = "xrt"
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch
new file mode 100644
index 00000000..b83c5ef7
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch
@@ -0,0 +1,32 @@
1Add cstdint as necessary
2
3In GCC 13.1 usage of uint64 and similar will result in an error without
4 #include <cstdint>
5
6Signed-off-by: Mark Hatle <mark.hatle@amd.com>
7
8Index: src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
9===================================================================
10--- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
11+++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h
12@@ -18,6 +18,7 @@
13
14 #include <string>
15 #include <vector>
16+#include <cstdint>
17
18 namespace adf
19 {
20Index: src/runtime_src/core/edge/user/zynq_dev.h
21===================================================================
22--- a/src/runtime_src/core/edge/user/zynq_dev.h
23+++ b/src/runtime_src/core/edge/user/zynq_dev.h
24@@ -19,6 +19,7 @@
25 #include <fstream>
26 #include <string>
27 #include <vector>
28+#include <cstdint>
29
30 class zynq_device {
31 public:
32
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202210.2.13.479.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202210.2.13.479.bb
index 7a06a51c..c42e9a65 100644
--- a/meta-xilinx-core/recipes-xrt/xrt/xrt_202210.2.13.479.bb
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202210.2.13.479.bb
@@ -3,6 +3,8 @@ DESCRIPTION = "Xilinx Runtime User Space Libraries and headers"
3 3
4require xrt-${PV}.inc 4require xrt-${PV}.inc
5 5
6SRC_URI += "file://xrt-cstdint.patch;striplevel=2"
7
6LICENSE = "GPL-2.0-or-later & Apache-2.0" 8LICENSE = "GPL-2.0-or-later & Apache-2.0"
7LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \ 9LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \
8 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ 10 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202220.2.14.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202220.2.14.0.bb
index 402d4ed2..cc5a9ed5 100644
--- a/meta-xilinx-core/recipes-xrt/xrt/xrt_202220.2.14.0.bb
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202220.2.14.0.bb
@@ -3,6 +3,8 @@ DESCRIPTION = "Xilinx Runtime User Space Libraries and headers"
3 3
4require xrt-${PV}.inc 4require xrt-${PV}.inc
5 5
6SRC_URI += "file://xrt-cstdint.patch;striplevel=2"
7
6LICENSE = "GPL-2.0-or-later & Apache-2.0" 8LICENSE = "GPL-2.0-or-later & Apache-2.0"
7LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \ 9LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \
8 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ 10 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb
new file mode 100644
index 00000000..d84d3b85
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb
@@ -0,0 +1,57 @@
1SUMMARY = "Xilinx Runtime(XRT) libraries"
2DESCRIPTION = "Xilinx Runtime User Space Libraries and headers"
3
4require xrt-${PV}.inc
5
6SRC_URI += "file://xrt-cstdint.patch;striplevel=2"
7
8LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT"
9LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \
10 file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \
11 file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
12 file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
13 file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
14 file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 "
15
16COMPATIBLE_MACHINE ?= "^$"
17COMPATIBLE_MACHINE:zynqmp = ".*"
18COMPATIBLE_MACHINE:versal = ".*"
19
20S = "${WORKDIR}/git/src"
21
22inherit cmake pkgconfig
23
24BBCLASSEXTEND = "native nativesdk"
25
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 systemtap libdfx"
28RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem kernel-module-zocl (= ${PV})"
29
30EXTRA_OECMAKE += " \
31 -DCMAKE_BUILD_TYPE=Release \
32 -DCMAKE_EXPORT_COMPILE_COMANDS=ON \
33 -DXRT_LIBDFX=true \
34 "
35
36# Systems with AIE also require libmetal, this is implemented in the dynamic-layers
37# See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend
38# Note: If meta-openamp is not available, AIE will not be enabled.
39
40FILES_SOLIBSDEV = ""
41FILES:${PN} += "\
42 ${libdir}/lib*.so \
43 ${libdir}/lib*.so.* \
44 ${libdir}/ps_kernels_lib \
45 /lib/*.so* \
46 ${datadir}"
47INSANE_SKIP:${PN} += "dev-so"
48
49pkg_postinst_ontarget:${PN}() {
50 #!/bin/sh
51 if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then
52 echo "INFO: Creating ICD entry for Xilinx Platform"
53 mkdir -p /etc/OpenCL/vendors
54 echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd
55 chmod -R 755 /etc/OpenCL
56 fi
57}
diff --git a/meta-xilinx-core/recipes-xrt/zocl/kernel-module-zocl_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/zocl/kernel-module-zocl_202410.2.17.0.bb
new file mode 100644
index 00000000..b91572f9
--- /dev/null
+++ b/meta-xilinx-core/recipes-xrt/zocl/kernel-module-zocl_202410.2.17.0.bb
@@ -0,0 +1,27 @@
1SUMMARY = "Xilinx Runtime(XRT) driver module"
2DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule"
3
4COMPATIBLE_MACHINE:microblaze = "none"
5
6PROVIDES += "zocl"
7
8require recipes-xrt/xrt/xrt-${PV}.inc
9
10LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8"
11LICENSE = "GPL-2.0-or-later & Apache-2.0"
12
13COMPATIBLE_MACHINE ?= "^$"
14COMPATIBLE_MACHINE:zynqmp = ".*"
15COMPATIBLE_MACHINE:versal = ".*"
16
17S = "${WORKDIR}/git/src/runtime_src/core/edge/drm/zocl"
18
19inherit module
20
21pkg_postinst_ontarget:${PN}() {
22 #!/bin/sh
23 echo "Unloading old XRT Linux kernel modules"
24 ( rmmod zocl || true ) > /dev/null 2>&1
25 echo "Loading new XRT Linux kernel modules"
26 modprobe zocl
27}