diff options
Diffstat (limited to 'meta-xilinx-core')
397 files changed, 11249 insertions, 7246 deletions
diff --git a/meta-xilinx-core/README.md b/meta-xilinx-core/README.md index ec5b663b..945a76a7 100644 --- a/meta-xilinx-core/README.md +++ b/meta-xilinx-core/README.md | |||
@@ -10,11 +10,15 @@ This layer depends on: | |||
10 | 10 | ||
11 | URI: https://git.yoctoproject.org/poky | 11 | URI: https://git.yoctoproject.org/poky |
12 | layers: meta, meta-poky | 12 | layers: meta, meta-poky |
13 | branch: langdale | 13 | branch: scarthgap |
14 | 14 | ||
15 | URI: https://git.openembedded.org/meta-openembedded | 15 | URI: https://git.openembedded.org/meta-openembedded |
16 | layers: meta-oe | 16 | layers: meta-oe |
17 | branch: langdale | 17 | branch: scarthgap |
18 | |||
19 | URI: https://git.yoctoproject.org/meta-arm | ||
20 | layers: meta-arm, meta-arm-toolchain | ||
21 | branch: scarthgap | ||
18 | --- | 22 | --- |
19 | 23 | ||
20 | ## Configuring Machines | 24 | ## Configuring Machines |
@@ -36,13 +40,13 @@ Zynqmp-generic requires pmu-firmware. The firmware can be passed directly | |||
36 | as a path to a binary: PMU_FILE, you may use the generic built version | 40 | as a path to a binary: PMU_FILE, you may use the generic built version |
37 | by including meta-xilinx-standalone, the XSCT version by adding | 41 | by including meta-xilinx-standalone, the XSCT version by adding |
38 | meta-xilinx-tools or the DTB workflow version using | 42 | meta-xilinx-tools or the DTB workflow version using |
39 | meta-xilinx-standalone-experimental. | 43 | meta-xilinx-standalone-sdt. |
40 | 44 | ||
41 | Versal-generic requires both PLM and PSM firmware to be specified. They can | 45 | Versal-generic requires both PLM and PSM firmware to be specified. They can |
42 | be specified as a path to a binary using PLM_FILE and PSM_FILE. Or they can | 46 | be specified as a path to a binary using PLM_FILE and PSM_FILE. Or they can |
43 | be generated by including meta-xilinx-standalone, the XSCT version by adding | 47 | be generated by including meta-xilinx-standalone, the XSCT version by adding |
44 | meta-xilinx-tools or the DTB workflow version using | 48 | meta-xilinx-tools or the DTB workflow version using |
45 | meta-xilinx-standalone-experimental. Additionally some configurations may | 49 | meta-xilinx-standalone-sdt. Additionally some configurations may |
46 | require you to specify the path to a PDI file using PDI_PATH. The XSCT | 50 | require you to specify the path to a PDI file using PDI_PATH. The XSCT |
47 | version will extract the PDI automatically. | 51 | version will extract the PDI automatically. |
48 | --- | 52 | --- |
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..5020b02b --- /dev/null +++ b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass | |||
@@ -0,0 +1,140 @@ | |||
1 | # | ||
2 | # Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | QSPI_SIZE ?= "0x2280000" | ||
8 | QSPI_VERSION ?= "" | ||
9 | QSPI_IMAGE_VERSION ?= "" | ||
10 | |||
11 | # Register values | ||
12 | IDN_REG ?= "0x4D554241" | ||
13 | VERSION_REG ?= "0x1" | ||
14 | LENGTH_REG ?= "0x4" | ||
15 | PERSISTENT_REG ?= "0x01010000" | ||
16 | |||
17 | # QSPI Offsets | ||
18 | IMAGE_SELECTOR_OFFSET ?= "0x0" | ||
19 | IMAGE_SELECTOR_BACKUP_OFFSET ?= "0x80000" | ||
20 | PERSISTENT_REG_OFFSET ?= "0x100000" | ||
21 | PERSISTENT_REG_BACKUP_OFFSET ?= "0x120000" | ||
22 | IMAGE_A_OFFSET ?= "0x200000" | ||
23 | IMAGE_A_IMGSEL_OFFSET ?= "0xF00000" | ||
24 | IMAGE_B_OFFSET ?= "0xF80000" | ||
25 | IMAGE_B_IMGSEL_OFFSET ?= "0x1C80000" | ||
26 | IMAGE_RCVRY_OFFSET ?= "0x1E00000" | ||
27 | IMAGE_RCVRY_BACKUP_OFFSET ?= "0x2000000" | ||
28 | VERSION_OFFSET ?= "0x2240000" | ||
29 | CHECKSUM_OFFSET ?= "0x2250000" | ||
30 | |||
31 | def generate_spi_image(d): | ||
32 | |||
33 | import io | ||
34 | import hashlib | ||
35 | import time | ||
36 | |||
37 | qspi_size = int(d.getVar("QSPI_SIZE") or '0', 0) | ||
38 | int(d.getVar("QSPI_SIZE") or '0', 0) | ||
39 | |||
40 | # Register values | ||
41 | idn_reg = int(d.getVar("IDN_REG") or '0', 0) | ||
42 | version_reg = int(d.getVar("VERSION_REG") or '0', 0) | ||
43 | length_reg = int(d.getVar("LENGTH_REG") or '0', 0) | ||
44 | persistent_reg = int(d.getVar("PERSISTENT_REG") or '0', 0) | ||
45 | |||
46 | # QSPI Offsets | ||
47 | image_selector_offset = int(d.getVar("IMAGE_SELECTOR_OFFSET") or '0', 0) | ||
48 | image_selector_backup_offset = int(d.getVar("IMAGE_SELECTOR_BACKUP_OFFSET") or '0', 0) | ||
49 | persistent_reg_offset = int(d.getVar("PERSISTENT_REG_OFFSET") or '0', 0) | ||
50 | persistent_reg_backup_offset = int(d.getVar("PERSISTENT_REG_BACKUP_OFFSET") or '0', 0) | ||
51 | image_a_offset = int(d.getVar("IMAGE_A_OFFSET") or '0', 0) | ||
52 | image_a_imgsel_offset = int(d.getVar("IMAGE_A_IMGSEL_OFFSET") or '0', 0) | ||
53 | image_b_offset = int(d.getVar("IMAGE_B_OFFSET") or '0', 0) | ||
54 | image_b_imgsel_offset = int(d.getVar("IMAGE_B_IMGSEL_OFFSET") or '0', 0) | ||
55 | image_rcvry_offset = int(d.getVar("IMAGE_RCVRY_OFFSET") or '0', 0) | ||
56 | image_rcvry_backup_offset = int(d.getVar("IMAGE_RCVRY_BACKUP_OFFSET") or '0', 0) | ||
57 | version_offset = int(d.getVar("VERSION_OFFSET") or '0', 0) | ||
58 | checksum_offset = int(d.getVar("CHECKSUM_OFFSET") or '0', 0) | ||
59 | |||
60 | # QSPI data | ||
61 | qspi_data = io.BytesIO() | ||
62 | qspi_data.write(b'\xFF' * qspi_size) | ||
63 | |||
64 | # Image Selector - Primary, Backup, Image A and Image B | ||
65 | imgsel_file = d.getVar("DEPLOY_DIR_IMAGE")+"/image-selector-"+d.getVar("MACHINE")+".bin" | ||
66 | try: | ||
67 | with open(imgsel_file, "rb") as il: | ||
68 | imgsel = il.read(-1) | ||
69 | except OSError as err: | ||
70 | bb.fatal("Unable to open imgsel file: " + str(err)) | ||
71 | |||
72 | qspi_data.seek(image_selector_offset) | ||
73 | qspi_data.write(imgsel) | ||
74 | qspi_data.seek(image_selector_backup_offset) | ||
75 | qspi_data.write(imgsel) | ||
76 | qspi_data.seek(image_a_imgsel_offset) | ||
77 | qspi_data.write(imgsel) | ||
78 | qspi_data.seek(image_b_imgsel_offset) | ||
79 | qspi_data.write(imgsel) | ||
80 | |||
81 | # Persistent Registers - Primary and Backup | ||
82 | p_reg = [idn_reg, version_reg, length_reg, persistent_reg, \ | ||
83 | image_a_offset, image_b_offset, image_rcvry_offset] | ||
84 | checksum = 0xffffffff - (0xffffffff & sum(p_reg)) | ||
85 | p_reg.insert(3, checksum) | ||
86 | |||
87 | qspi_data.seek(persistent_reg_offset) | ||
88 | for value in p_reg: | ||
89 | qspi_data.write(value.to_bytes(4, byteorder="little")) | ||
90 | |||
91 | qspi_data.seek(persistent_reg_backup_offset) | ||
92 | for value in p_reg: | ||
93 | qspi_data.write(value.to_bytes(4, byteorder="little")) | ||
94 | |||
95 | # Image A and B - boot.bin | ||
96 | try: | ||
97 | with open(d.getVar("DEPLOY_DIR_IMAGE")+"/boot.bin", "rb") as bo: | ||
98 | bootbin = bo.read(-1) | ||
99 | except OSError as err: | ||
100 | bb.fatal("Unable to open boot.bin file: " + str(err)) | ||
101 | |||
102 | qspi_data.seek(image_a_offset) | ||
103 | qspi_data.write(bootbin) | ||
104 | qspi_data.seek(image_b_offset) | ||
105 | qspi_data.write(bootbin) | ||
106 | |||
107 | # Recovery Image & Recovery Image Backup | ||
108 | imgrcry_file = d.getVar("DEPLOY_DIR_IMAGE")+"/image-recovery-"+d.getVar("MACHINE")+".bin" | ||
109 | try: | ||
110 | with open(imgrcry_file, "rb") as iy: | ||
111 | imgrcry = iy.read(-1) | ||
112 | except OSError as err: | ||
113 | bb.fatal("Unable to open imgrcry file: " + str(err)) | ||
114 | |||
115 | qspi_data.seek(image_rcvry_offset) | ||
116 | qspi_data.write(imgrcry) | ||
117 | qspi_data.seek(image_rcvry_backup_offset) | ||
118 | qspi_data.write(imgrcry) | ||
119 | |||
120 | # Version string and checksum | ||
121 | version = d.getVar('QSPI_IMAGE_VERSION') | ||
122 | qspi_version = f"{version}\x00" | ||
123 | qspi_data.seek(version_offset) | ||
124 | qspi_data.write(qspi_version.encode()) | ||
125 | |||
126 | qspi_sha = hashlib.sha256(qspi_data.getbuffer()) | ||
127 | qspi_data.seek(checksum_offset) | ||
128 | qspi_data.write(qspi_sha.digest()) | ||
129 | |||
130 | # Write the QSPI data to file | ||
131 | with open(d.getVar("B") + "/" + d.getVar("IMAGE_NAME") + ".bin", "wb") as sq: | ||
132 | sq.write(qspi_data.getbuffer()) | ||
133 | |||
134 | do_compile[depends] += "virtual/boot-bin:do_deploy virtual/imgsel:do_deploy virtual/imgrcry:do_deploy" | ||
135 | |||
136 | python amd_spi_image_do_compile() { | ||
137 | generate_spi_image(d) | ||
138 | } | ||
139 | |||
140 | EXPORT_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..a09c0768 --- /dev/null +++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass | |||
@@ -0,0 +1,338 @@ | |||
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 | |||
10 | inherit devicetree | ||
11 | |||
12 | DEPENDS = "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 | ||
17 | COMPATIBLE_MACHINE ?= "^$" | ||
18 | COMPATIBLE_MACHINE:microblaze = "^$" | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | PROVIDES = "" | ||
23 | |||
24 | do_fetch[cleandirs] = "${B}" | ||
25 | |||
26 | DT_PADDING_SIZE = "0x1000" | ||
27 | BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}" | ||
28 | |||
29 | S ?= "${UNPACKDIR}" | ||
30 | FW_DIR ?= "" | ||
31 | DTSI_PATH ?= "" | ||
32 | DTBO_PATH ?= "" | ||
33 | BIT_PATH ?= "" | ||
34 | BIN_PATH ?= "" | ||
35 | PDI_PATH ?= "" | ||
36 | JSON_PATH ?= "" | ||
37 | XCl_PATH ?= "" | ||
38 | DT_FILES_PATH = "${S}/${DTSI_PATH}" | ||
39 | FIRMWARE_NAME_DT_FILE ?= "" | ||
40 | USER_DTS_FILE ?= "" | ||
41 | |||
42 | FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" | ||
43 | USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay" | ||
44 | DTSI_PATH[doc] = "Absolute '.dtsi' or ''.dts' file path as input to SRC_URI" | ||
45 | DTBO_PATH[doc] = "Absolute '.dtbo' file path as input to SRC_URI" | ||
46 | BIT_PATH[doc] = "Absolute '.bit' file path as input to SRC_URI" | ||
47 | BIN_PATH[doc] = "Absolute '.bin' file path as input to SRC_URI" | ||
48 | JSON_PATH[doc] = "Absolute '.json' file path as input to SRC_URI" | ||
49 | XCL_PATH[doc] = "Absolute '.xclbin' file path as input to SRC_URI" | ||
50 | |||
51 | python() { | ||
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",'${UNPACKDIR}/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. | ||
140 | python 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 | |||
156 | do_configure[prefuncs] += "find_firmware_file" | ||
157 | |||
158 | python 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 | |||
180 | do_compile[prefuncs] += "find_firmware_file" | ||
181 | |||
182 | python 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. | ||
224 | python 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 | |||
245 | do_install[prefuncs] += "find_user_dts_overlay_file" | ||
246 | |||
247 | do_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_PATH}/*.dtbo | wc -l` -eq 1 ]; then | ||
259 | install -Dm 0644 ${S}/${DTBO_PATH}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
260 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then | ||
261 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)" | ||
262 | elif [ `ls ${S}/${DTBO_PATH}/*.dtbo | wc -l` -gt 1 ]; then | ||
263 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/${DTBO_PATH}/*.dtbo)" | ||
264 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
265 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo | ||
266 | else | ||
267 | bbnote "A dtbo ending '.dtbo' expected but not found in ${S} or ${B}, This means firmware can be loaded without dtbo dependency." | ||
268 | fi | ||
269 | |||
270 | # Install bit or bin if soc family is zynq-7000 or zynqmp. | ||
271 | # In case of dtbo as input or no dtbo exists in ${B}, then .bit or .bin will | ||
272 | # be copied from directly from ${S} without renaming the .bit/.bin name to | ||
273 | # ${PN}.bit/${PN}.bin. | ||
274 | # if more than one .bit/.bin file is found then fatal the task. | ||
275 | # if no .bit/.bin file is found then fatal the task. | ||
276 | if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then | ||
277 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then | ||
278 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" | ||
279 | elif [ `ls ${S}/${BIT_PATH}/*.bit | wc -l` -gt 1 ]; then | ||
280 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/${BIT_PATH}/*.bit)" | ||
281 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then | ||
282 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" | ||
283 | elif [ `ls ${S}/${BIN_PATH}/*.bin | wc -l` -gt 1 ]; then | ||
284 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/${BIN_PATH}/*.bin)" | ||
285 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
286 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
287 | elif [ `ls ${S}/${BIT_PATH}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
288 | install -Dm 0644 ${S}/${BIT_PATH}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
289 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then | ||
290 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
291 | elif [ `ls ${S}/${BIN_PATH}/*.bin | wc -l` -eq 1 ]; then | ||
292 | install -Dm 0644 ${S}/${BIN_PATH}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
293 | elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
294 | install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin | ||
295 | else | ||
296 | bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" | ||
297 | fi | ||
298 | fi | ||
299 | |||
300 | # Install pdi if soc family is versal or new silicon. | ||
301 | # In case of dtbo as input or no dtbo exists in ${B}, then .pdi will be copied | ||
302 | # from directly from ${S} without renaming the pdi name to ${PN}.pdi | ||
303 | # if more than one .pdi file is found then fail the task. | ||
304 | # In case of Versal DFx Static, only static dtbo can be loaded as BOOT.bin | ||
305 | # already contains static pdi. bbclass is not smart enough to determine | ||
306 | # whether it is static pdi or not, hence change fatal to warn if no PDI is found. | ||
307 | if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then | ||
308 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
309 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
310 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
311 | install -Dm 0644 ${S}/${PDI_PATH}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
312 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | ||
313 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" | ||
314 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -gt 1 ]; then | ||
315 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/${PDI_PATH}/*.pdi)" | ||
316 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
317 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
318 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
319 | install -Dm 0644 ${S}/${PDI_PATH}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
320 | else | ||
321 | bbwarn "A PDI file with '.pdi' expected but not found" | ||
322 | fi | ||
323 | fi | ||
324 | |||
325 | # Install xclbin | ||
326 | if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then | ||
327 | install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin | ||
328 | fi | ||
329 | |||
330 | # Install shell.json or accel.json | ||
331 | if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then | ||
332 | install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
333 | fi | ||
334 | } | ||
335 | |||
336 | do_deploy[noexec] = "1" | ||
337 | |||
338 | FILES:${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 | |||
10 | inherit deploy | ||
11 | |||
12 | INHERIT_DEFAULT_DEPENDS = "1" | ||
13 | |||
14 | # Since we're just copying, we can run any config. | ||
15 | COMPATIBLE_HOST = ".*" | ||
16 | |||
17 | PACKAGE_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. | ||
21 | FW_NAME ??= "" | ||
22 | TARGET_MC ??= "" | ||
23 | FW_DEPENDS ??= "" | ||
24 | FW_MCDEPENDS ??= "" | ||
25 | FW_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
26 | FW_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
27 | FW_IMAGE_NAME ??= "${FW_NAME}-${MACHINE}-${TARGET_MC}" | ||
28 | |||
29 | # Default is for the multilib case (without the extension .elf/.bin) | ||
30 | FW_FILE ??= "${FW_DEPLOY_DIR}/${FW_IMAGE_NAME}" | ||
31 | FW_FILE[vardepsexclude] = "FW_DEPLOY_DIR" | ||
32 | |||
33 | do_fetch[depends] += "${FW_DEPENDS}" | ||
34 | do_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. | ||
38 | DESTDIR ??= "${nonarch_base_libdir}/firmware/xilinx" | ||
39 | SYSROOT_DIRS += "/boot" | ||
40 | |||
41 | INSANE_SKIP:${PN} = "arch" | ||
42 | INSANE_SKIP:${PN}-dbg = "arch" | ||
43 | |||
44 | # Disable buildpaths QA check warnings. | ||
45 | INSANE_SKIP:${PN} += "buildpaths" | ||
46 | |||
47 | do_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! | ||
57 | SHOULD_DEPLOY = "${@'false' if (d.getVar('FW_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
58 | do_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 | |||
66 | FILES:${PN} += "${DESTDIR}/${FW_IMAGE_NAME}*" | ||
67 | |||
68 | def 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 | |||
91 | python() { | ||
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..df7016d4 100644 --- a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass | |||
@@ -23,6 +23,26 @@ QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ | |||
23 | QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ | 23 | QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ |
24 | d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" | 24 | d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" |
25 | 25 | ||
26 | # https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings | ||
27 | # https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes | ||
28 | # https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes | ||
29 | QB_BOOT_MODE ?= "-boot mode=5" | ||
30 | |||
31 | |||
32 | # ZynqMP or Versal SD and eMMC drive index. | ||
33 | # Note: Do not set drive index based on boot mode some boards may have primary | ||
34 | # boot mode as QSPI/OSPI and secondary boot mode as SD/eMMC. | ||
35 | # | ||
36 | # SoC Device Drive Index | ||
37 | # Zynq-7000, ZynqMP, Versal SD0 0 | ||
38 | # ZynqMP, Versal SD1 1 | ||
39 | # ZynqMP, Versal eMMC0(secondary boot only) 2 | ||
40 | # ZynqMP, Versal eMMC1 3 | ||
41 | |||
42 | QB_SD_DRIVE_INDEX ?= "1" | ||
43 | QB_SD_DRIVE_INDEX:zynq ?= "0" | ||
44 | QB_SD_DRIVE_INDEX:versal-net ?= "0" | ||
45 | |||
26 | inherit qemuboot | 46 | inherit qemuboot |
27 | 47 | ||
28 | def qemu_target_binary(data): | 48 | def qemu_target_binary(data): |
@@ -46,11 +66,12 @@ def qemu_add_extra_args(data): | |||
46 | deploy_dir = data.getVar('DEPLOY_DIR_IMAGE') or "" | 66 | deploy_dir = data.getVar('DEPLOY_DIR_IMAGE') or "" |
47 | machine_name = data.getVar('MACHINE') or "" | 67 | machine_name = data.getVar('MACHINE') or "" |
48 | soc_family = data.getVar('SOC_FAMILY') or "" | 68 | soc_family = data.getVar('SOC_FAMILY') or "" |
69 | boot_mode = data.getVar('QB_BOOT_MODE') or "" | ||
49 | qb_extra_args = '' | 70 | qb_extra_args = '' |
50 | # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied | 71 | # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied |
51 | kernel_name = '' | 72 | kernel_name = '' |
52 | bootscr_image = '%s/boot.scr' % deploy_dir | 73 | bootscr_image = '%s/boot.scr' % deploy_dir |
53 | if soc_family in ('zynqmp', 'versal'): | 74 | if soc_family in ('zynqmp', 'versal', 'versal-net'): |
54 | kernel_name = 'Image' | 75 | kernel_name = 'Image' |
55 | bootscr_loadaddr = '0x20000000' | 76 | bootscr_loadaddr = '0x20000000' |
56 | if initramfs_image: | 77 | if initramfs_image: |
@@ -61,11 +82,11 @@ def qemu_add_extra_args(data): | |||
61 | if kernel_name: | 82 | if kernel_name: |
62 | qb_extra_args = ' -device loader,file=%s,addr=%s,force-raw=on' % (kernel_image, kernel_loadaddr) | 83 | qb_extra_args = ' -device loader,file=%s,addr=%s,force-raw=on' % (kernel_image, kernel_loadaddr) |
63 | qb_extra_args += ' -device loader,file=%s,addr=%s,force-raw=on' % (bootscr_image, bootscr_loadaddr) | 84 | qb_extra_args += ' -device loader,file=%s,addr=%s,force-raw=on' % (bootscr_image, bootscr_loadaddr) |
64 | if soc_family == 'versal': | 85 | if soc_family in ('versal', 'versal-net'): |
65 | qb_extra_args += ' -boot mode=5' | 86 | qb_extra_args += ' %s' % boot_mode |
66 | else: | 87 | else: |
67 | if soc_family in ('zynqmp', 'versal'): | 88 | if soc_family in ('zynqmp', 'versal', 'versal-net'): |
68 | qb_extra_args = ' -boot mode=5' | 89 | qb_extra_args = ' %s' % boot_mode |
69 | return qb_extra_args | 90 | return qb_extra_args |
70 | 91 | ||
71 | def qemu_rootfs_params(data, param): | 92 | def qemu_rootfs_params(data, param): |
@@ -73,9 +94,9 @@ def qemu_rootfs_params(data, param): | |||
73 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | 94 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" |
74 | soc_family = data.getVar('SOC_FAMILY') or "" | 95 | soc_family = data.getVar('SOC_FAMILY') or "" |
75 | tune_features = (data.getVar('TUNE_FEATURES') or []).split() | 96 | tune_features = (data.getVar('TUNE_FEATURES') or []).split() |
97 | sd_index = data.getVar('QB_SD_DRIVE_INDEX') or "" | ||
76 | if 'microblaze' in tune_features: | 98 | if 'microblaze' in tune_features: |
77 | soc_family = 'microblaze' | 99 | soc_family = 'microblaze' |
78 | soc_variant = data.getVar('SOC_VARIANT') or "" | ||
79 | 100 | ||
80 | if param == 'rootfs': | 101 | if param == 'rootfs': |
81 | return 'none' if bundle_image == "1" else '' | 102 | return 'none' if bundle_image == "1" else '' |
@@ -85,7 +106,8 @@ def qemu_rootfs_params(data, param): | |||
85 | "microblaze": "cpio.gz", | 106 | "microblaze": "cpio.gz", |
86 | "zynq": "cpio.gz", | 107 | "zynq": "cpio.gz", |
87 | "zynqmp": "cpio.gz.u-boot", | 108 | "zynqmp": "cpio.gz.u-boot", |
88 | "versal": "cpio.gz.u-boot.qemu-sd-fatimg" | 109 | "versal": "cpio.gz.u-boot.qemu-sd-fatimg", |
110 | "versal-net": "cpio.gz.u-boot.qemu-sd-fatimg" | ||
89 | } | 111 | } |
90 | if not initramfs_image: | 112 | if not initramfs_image: |
91 | image_fs = data.getVar('IMAGE_FSTYPES') | 113 | image_fs = data.getVar('IMAGE_FSTYPES') |
@@ -96,12 +118,6 @@ def qemu_rootfs_params(data, param): | |||
96 | return fstype_dict[soc_family] | 118 | return fstype_dict[soc_family] |
97 | 119 | ||
98 | elif param == 'rootfs-opt': | 120 | elif param == 'rootfs-opt': |
99 | sd_index = "1" | ||
100 | if soc_family == 'zynq': | ||
101 | sd_index = "0" | ||
102 | if soc_family == 'versal' and soc_variant == 'net': | ||
103 | sd_index = "0" | ||
104 | |||
105 | # Device is using a disk | 121 | # Device is using a disk |
106 | if not initramfs_image: | 122 | if not initramfs_image: |
107 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) | 123 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) |
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 | |||
5 | inherit devicetree | ||
6 | |||
7 | DEPENDS = "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 | ||
12 | COMPATIBLE_MACHINE ?= "^$" | ||
13 | COMPATIBLE_MACHINE:microblaze = "^$" | ||
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | |||
17 | PROVIDES = "" | ||
18 | |||
19 | do_fetch[cleandirs] = "${B}" | ||
20 | |||
21 | DT_PADDING_SIZE = "0x1000" | ||
22 | BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}" | ||
23 | |||
24 | S ?= "${WORKDIR}" | ||
25 | FW_DIR ?= "" | ||
26 | DTSI_PATH ?= "" | ||
27 | DTBO_PATH ?= "" | ||
28 | DT_FILES_PATH = "${S}/${DTSI_PATH}" | ||
29 | FIRMWARE_NAME_DT_FILE ?= "" | ||
30 | USER_DTS_FILE ?= "" | ||
31 | |||
32 | FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" | ||
33 | USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay" | ||
34 | |||
35 | python() { | ||
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. | ||
103 | def 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. | ||
109 | python 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 | |||
125 | do_configure[prefuncs] += "find_firmware_file" | ||
126 | |||
127 | python 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 | |||
149 | do_compile[prefuncs] += "find_firmware_file" | ||
150 | |||
151 | python 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. | ||
193 | python 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 | |||
208 | do_install[prefuncs] += "find_user_dts_overlay_file" | ||
209 | |||
210 | do_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 | |||
265 | do_deploy[noexec] = "1" | ||
266 | |||
267 | FILES:${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 | |||
7 | inherit dfx_user_dts | ||
8 | |||
9 | python 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 | |||
24 | do_install[postfuncs] += "fpgamanager_warn_msg" \ No newline at end of file | ||
diff --git a/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass b/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass index b4de5ee1..71b8b9b8 100644 --- a/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass +++ b/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass | |||
@@ -39,18 +39,18 @@ CONVERSION_CMD:qemu-sd-fatimg () { | |||
39 | parted -s ${QEMU_IMG} set 1 boot on | 39 | parted -s ${QEMU_IMG} set 1 boot on |
40 | parted ${QEMU_IMG} print | 40 | parted ${QEMU_IMG} print |
41 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${QEMU_IMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') | 41 | BOOT_BLOCKS=$(LC_ALL=C parted -s ${QEMU_IMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') |
42 | rm -f ${WORKDIR}/${BOOT_VOLUME_ID}.img | 42 | rm -f ${BOOT_VOLUME_ID}.img |
43 | mkfs.vfat -n "${BOOT_VOLUME_ID}" -S 512 -C ${WORKDIR}/${BOOT_VOLUME_ID}.img $BOOT_BLOCKS | 43 | mkfs.vfat -n "${BOOT_VOLUME_ID}" -S 512 -C ${BOOT_VOLUME_ID}.img $BOOT_BLOCKS |
44 | if [ -e ${DEPLOY_DIR_IMAGE}/boot.bin ]; then | 44 | if [ -e ${DEPLOY_DIR_IMAGE}/boot.bin ]; then |
45 | mcopy -i ${WORKDIR}/${BOOT_VOLUME_ID}.img -s ${DEPLOY_DIR_IMAGE}/boot.bin ::/ | 45 | mcopy -i ${BOOT_VOLUME_ID}.img -s ${DEPLOY_DIR_IMAGE}/boot.bin ::/ |
46 | fi | 46 | fi |
47 | if [ -e ${DEPLOY_DIR_IMAGE}/boot.scr ]; then | 47 | if [ -e ${DEPLOY_DIR_IMAGE}/boot.scr ]; then |
48 | mcopy -i ${WORKDIR}/${BOOT_VOLUME_ID}.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::/ | 48 | mcopy -i ${BOOT_VOLUME_ID}.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::/ |
49 | fi | 49 | fi |
50 | if [ ${INITRAMFS_IMAGE} = ${IMAGE_BASENAME} ] && [ x"${INITRAMFS_IMAGE_BUNDLE}" != "x1" ]; then | 50 | if [ ${INITRAMFS_IMAGE} = ${IMAGE_BASENAME} ] && [ x"${INITRAMFS_IMAGE_BUNDLE}" != "x1" ]; then |
51 | mcopy -i ${WORKDIR}/${BOOT_VOLUME_ID}.img -s ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ::rootfs.cpio.gz.u-boot | 51 | mcopy -i ${BOOT_VOLUME_ID}.img -s ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ::rootfs.cpio.gz.u-boot |
52 | fi | 52 | fi |
53 | dd if=${WORKDIR}/${BOOT_VOLUME_ID}.img of=${QEMU_IMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ALIGNMENT} \* 1024) | 53 | dd if=${BOOT_VOLUME_ID}.img of=${QEMU_IMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ALIGNMENT} \* 1024) |
54 | } | 54 | } |
55 | 55 | ||
56 | CONVERSION_DEPENDS_qemu-sd = "qemu-system-native" | 56 | CONVERSION_DEPENDS_qemu-sd = "qemu-system-native" |
diff --git a/meta-xilinx-core/classes/xilinx-deprecated.bbclass b/meta-xilinx-core/classes/xilinx-deprecated.bbclass index 1aee2fe1..788b963e 100644 --- a/meta-xilinx-core/classes/xilinx-deprecated.bbclass +++ b/meta-xilinx-core/classes/xilinx-deprecated.bbclass | |||
@@ -9,10 +9,15 @@ python xilinx_deprecated_config_eventhandler () { | |||
9 | if d.getVar('BOARD') or d.getVar('BOARD_VARIANT'): | 9 | if d.getVar('BOARD') or d.getVar('BOARD_VARIANT'): |
10 | bb.error("Deprecated BOARD (%s) or BOARD_VARIANT (%s) is being used, they are no longer supported and are ignored." % (d.getVar('BOARD'), d.getVar('BOARD_VARIANT'))) | 10 | bb.error("Deprecated BOARD (%s) or BOARD_VARIANT (%s) is being used, they are no longer supported and are ignored." % (d.getVar('BOARD'), d.getVar('BOARD_VARIANT'))) |
11 | 11 | ||
12 | # Check for 'generic' machines, warn the user this isn't what they want | ||
13 | if d.getVar('MACHINE').endswith('-generic'): | ||
14 | bb.warn('The %s machine is intended to be included by other machines, it should not be used by itself. For a non-machine, SoC specific filesystem, please use one of the common machines defined in meta-xilinx-core.' % d.getVar('MACHINE')) | ||
15 | |||
12 | msg_list = d.getVarFlags('XILINX_DEPRECATED') or [] | 16 | msg_list = d.getVarFlags('XILINX_DEPRECATED') or [] |
13 | for msg_source in msg_list: | 17 | for msg_source in msg_list: |
14 | if msg_source == "doc": | 18 | if msg_source == "doc": |
15 | continue | 19 | continue |
16 | msg = d.getVarFlag('XILINX_DEPRECATED', msg_source) or "" | 20 | msg = d.getVarFlag('XILINX_DEPRECATED', msg_source) or "" |
17 | bb.warn('%s: %s' % (msg_source, msg)) | 21 | if msg: |
22 | bb.warn('%s: %s' % (msg_source, msg)) | ||
18 | } | 23 | } |
diff --git a/meta-xilinx-core/classes/xilinx-vars.bbclass b/meta-xilinx-core/classes/xilinx-vars.bbclass index 51d3cd87..e19918ca 100644 --- a/meta-xilinx-core/classes/xilinx-vars.bbclass +++ b/meta-xilinx-core/classes/xilinx-vars.bbclass | |||
@@ -6,15 +6,6 @@ xilinx_variables_config_eventhandler[eventmask] = "bb.event.ConfigParsed" | |||
6 | # It's up to the base sytem to define the variables being used here, we're | 6 | # It's up to the base sytem to define the variables being used here, we're |
7 | # only going to check them. | 7 | # only going to check them. |
8 | python xilinx_variables_config_eventhandler () { | 8 | python xilinx_variables_config_eventhandler () { |
9 | # Verify HDF_MACHINE | ||
10 | hdf_prior = d.getVar('HDF_MACHINE_PRIOR') | ||
11 | hdf_final = d.getVar('HDF_MACHINE') | ||
12 | |||
13 | if hdf_prior and hdf_prior != hdf_final: | ||
14 | bb.fatal("HDF_MACHINE is set to %s, it appears you intended %s. " \ | ||
15 | "This is usually as a result of specifying it in the local.conf or before the 'require' in the machine .conf file. " \ | ||
16 | "See meta-xilinx-core/conf/machine/README." % (hdf_final, hdf_prior)) | ||
17 | |||
18 | # Verify DEFAULTTUNE | 9 | # Verify DEFAULTTUNE |
19 | tune_prior = d.getVar('DEFAULTTUNE_PRIOR') | 10 | tune_prior = d.getVar('DEFAULTTUNE_PRIOR') |
20 | tune_final = d.getVar('DEFAULTTUNE') | 11 | tune_final = d.getVar('DEFAULTTUNE') |
@@ -26,7 +17,7 @@ python xilinx_variables_config_eventhandler () { | |||
26 | 17 | ||
27 | # Verify 'xilinx' is in LICENSE_FLAGS_ACCEPTED | 18 | # Verify 'xilinx' is in LICENSE_FLAGS_ACCEPTED |
28 | license_flags = d.getVar('LICENSE_FLAGS_ACCEPTED') or "" | 19 | license_flags = d.getVar('LICENSE_FLAGS_ACCEPTED') or "" |
29 | if 'xilinx' not in license_flags.split(): | 20 | if all(license not in license_flags.split() for license in ['xilinx', 'xilinx_pmu-rom-native']) : |
30 | bb.warn("The ZynqMP pmu-rom is not enabled, qemu may not be able to emulate a ZynqMP system without it. " \ | 21 | bb.warn("The ZynqMP pmu-rom is not enabled, qemu may not be able to emulate a ZynqMP system without it. " \ |
31 | "To enable this you must add 'xilinx' to the LICENSE_FLAGS_ACCEPTED to indicate you accept the software license.") | 22 | "To enable this you must add 'xilinx' to the LICENSE_FLAGS_ACCEPTED to indicate you accept the software license.") |
32 | } | 23 | } |
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index 49ed6ac8..5007761f 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -22,10 +22,10 @@ xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bb \ | |||
22 | xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bbappend \ | 22 | xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bbappend \ |
23 | " | 23 | " |
24 | 24 | ||
25 | LAYERDEPENDS_xilinx = "core" | 25 | LAYERDEPENDS_xilinx = "core meta-arm" |
26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" | 26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" |
27 | 27 | ||
28 | LAYERSERIES_COMPAT_xilinx = "nanbield" | 28 | LAYERSERIES_COMPAT_xilinx = "styhead walnascar" |
29 | 29 | ||
30 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | 30 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ |
31 | *->xrt \ | 31 | *->xrt \ |
@@ -42,18 +42,9 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | |||
42 | *->xserver-xorg \ | 42 | *->xserver-xorg \ |
43 | " | 43 | " |
44 | 44 | ||
45 | XILINX_RELEASE_VERSION ??= "v2023.2" | 45 | XILINX_RELEASE_VERSION ??= "v2024.2" |
46 | 46 | ||
47 | BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" | 47 | BUILDCFG_VARS:append = " XILINX_RELEASE_VERSION" |
48 | |||
49 | XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%" | ||
50 | XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" | ||
51 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" | ||
52 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" | ||
53 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
54 | PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
55 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
56 | PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%" | ||
57 | 48 | ||
58 | DEFAULT_XILINX_QEMU = "qemu-xilinx" | 49 | DEFAULT_XILINX_QEMU = "qemu-xilinx" |
59 | DEFAULT_XILINX_QEMU:arm = "qemu" | 50 | DEFAULT_XILINX_QEMU:arm = "qemu" |
@@ -61,20 +52,50 @@ PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}" | |||
61 | 52 | ||
62 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" | 53 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" |
63 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" | 54 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" |
64 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 55 | XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%" |
56 | XILINX_ATF_VERSION[v2024.2] = "2.10-xilinx-v2024.2%" | ||
57 | PREFERRED_VERSION_virtual/arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
58 | |||
59 | # The name of the software has changed to match upstream ARM | ||
60 | XILINX_ATF_PROVIDERS[v2024.2] = "trusted-firmware-a" | ||
61 | PREFERRED_PROVIDER_virtual/arm-trusted-firmware = "${@d.getVarFlag('XILINX_ATF_PROVIDERS', d.getVar('XILINX_RELEASE_VERSION')) or 'arm-trusted-firmware'}" | ||
65 | 62 | ||
66 | XILINX_UBOOT_VERSION[v2023.1] = "v2023.01-xilinx-v2023.1%" | 63 | |
67 | XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%" | 64 | XILINX_UBOOT_VERSION[v2023.1] = "1:2023.01-xilinx-v2023.1%" |
65 | XILINX_UBOOT_VERSION[v2023.2] = "1:2023.01-xilinx-v2023.2%" | ||
66 | XILINX_UBOOT_VERSION[v2024.1] = "1:2024.01-xilinx-v2024.1%" | ||
67 | XILINX_UBOOT_VERSION[v2024.2] = "1:2024.01-xilinx-v2024.2%" | ||
68 | 68 | ||
69 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 69 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
70 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 70 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
71 | 71 | ||
72 | XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" | 72 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30%" |
73 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" | 73 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60%" |
74 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" | 74 | XILINX_LINUX_VERSION[v2024.1] = "6.6.10%" |
75 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" | 75 | XILINX_LINUX_VERSION[v2024.2] = "6.6.40%" |
76 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 76 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
77 | 77 | ||
78 | # XRT/ZOCL | ||
79 | XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" | ||
80 | XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" | ||
81 | XRT_ZOCL_VERSION[v2024.1] = "202410.2.17.319" | ||
82 | XRT_ZOCL_VERSION[v2024.2] = "202420.2.18.0" | ||
83 | PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
84 | PREFERRED_VERSION_zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
85 | |||
86 | # AI-Engine | ||
87 | AIEFAL_VERSION[v2023.1] = "1.5" | ||
88 | AIEFAL_VERSION[v2023.2] = "1.5" | ||
89 | AIEFAL_VERSION[v2024.1] = "1.6" | ||
90 | AIEFAL_VERSION[v2024.2] = "1.7" | ||
91 | PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
92 | |||
93 | AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" | ||
94 | AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" | ||
95 | AI_ENGINE_DRIVER_VERSION[v2024.1] = "3.5" | ||
96 | AI_ENGINE_DRIVER_VERSION[v2024.2] = "3.6" | ||
97 | PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
98 | |||
78 | # Add support to eSDK for gen-machine-conf if it exists | 99 | # Add support to eSDK for gen-machine-conf if it exists |
79 | PLNX_SCRIPTS_PATH = "${LAYERDIR}/gen-machine-conf/gen-machine-scripts" | 100 | PLNX_SCRIPTS_PATH = "${LAYERDIR}/gen-machine-conf/gen-machine-scripts" |
80 | BB_HASHEXCLUDE_COMMON:append = " PLNX_SCRIPTS_PATH" | 101 | BB_HASHEXCLUDE_COMMON:append = " PLNX_SCRIPTS_PATH" |
diff --git a/meta-xilinx-core/conf/machine/README b/meta-xilinx-core/conf/machine/README index de8cf58d..5db8fa8f 100644 --- a/meta-xilinx-core/conf/machine/README +++ b/meta-xilinx-core/conf/machine/README | |||
@@ -44,7 +44,6 @@ MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}" | |||
44 | 44 | ||
45 | require conf/machine/zynqmp-generic.conf | 45 | require conf/machine/zynqmp-generic.conf |
46 | 46 | ||
47 | HDF_MACHINE = "zcu102-zynqmp" | ||
48 | MACHINE_FEATURES += "pci" | 47 | MACHINE_FEATURES += "pci" |
49 | 48 | ||
50 | #### No additional settings should be after the Postamble | 49 | #### No additional settings should be after the Postamble |
@@ -67,7 +66,6 @@ DEFAULTTUNE ?= "aarch64" | |||
67 | 66 | ||
68 | require conf/machine/zynqmp-generic.conf | 67 | require conf/machine/zynqmp-generic.conf |
69 | 68 | ||
70 | HDF_MACHINE = "zcu102-zynqmp" | ||
71 | MACHINE_FEATURES += "pci" | 69 | MACHINE_FEATURES += "pci" |
72 | 70 | ||
73 | #### No additional settings should be after the Postamble | 71 | #### No additional settings should be after the Postamble |
@@ -88,7 +86,6 @@ TUNE_FEATURES:tune-microblaze ?= "microblaze v8.50 barrel-shift reorder pattern- | |||
88 | 86 | ||
89 | require conf/machine/microblaze-generic.conf | 87 | require conf/machine/microblaze-generic.conf |
90 | 88 | ||
91 | HDF_MACHINE = "ml605" | ||
92 | SERIAL_CONSOLE = "115200,ttyUL0" | 89 | SERIAL_CONSOLE = "115200,ttyUL0" |
93 | 90 | ||
94 | #### No additional settings should be after the Postamble | 91 | #### No additional settings should be after the Postamble |
@@ -132,8 +129,6 @@ easiy make a local change, if allowed by the machine .conf: | |||
132 | 129 | ||
133 | UBOOT_MACHINE - The defconfig for u-boot. (Note, this may be an error TBD). | 130 | UBOOT_MACHINE - The defconfig for u-boot. (Note, this may be an error TBD). |
134 | 131 | ||
135 | SOC_VARIANT - See include/soc-*.inc (Note, most machines this is fixed). | ||
136 | |||
137 | 132 | ||
138 | The following variables must be set AFTER the 'require' line, using '=' | 133 | The following variables must be set AFTER the 'require' line, using '=' |
139 | or '+='/'=+' as required. Using ':append', ':prepend', or ':remove' will | 134 | or '+='/'=+' as required. Using ':append', ':prepend', or ':remove' will |
@@ -151,12 +146,17 @@ local.conf | |||
151 | System wide setting: | 146 | System wide setting: |
152 | TUNE_FEATURES:tune-<tune> - Specific tune features | 147 | TUNE_FEATURES:tune-<tune> - Specific tune features |
153 | 148 | ||
149 | XILINX_WITH_ESW = "xsct" or "sdt" - Specify xsct or sdt workflow | ||
150 | |||
154 | external-hdf recipe from meta-xilinx-tools: | 151 | external-hdf recipe from meta-xilinx-tools: |
155 | HDF_MACHINE - Machine to load from reference defign xsa using hdf-examples recipe | 152 | XILINX_XSCT_VERSION - Version of the XSCT tool and associated ESW software |
156 | HDF_EXT - Only ".xsa" externsion is supported, legacy variable. | 153 | HDF_URI - URL for the .xsa file |
157 | HDF_BASE - Download protocol (file://, git://, http:// or https://) protocol if | 154 | HDF_URI[sha256sum] - sha256sum of the .xsa |
158 | not using the default external-hdf repository. | 155 | |
159 | HDF_PATH - Path to the repository or XSA file | 156 | sdt-artifacts recipe from meta-xilinx-standalone-sdt: |
157 | SDT_URI - URI for the system device tree artifacts (usually a tarball) | ||
158 | SDT_URI[sha256sum] - sha256sum of the SDT artifacts file | ||
159 | SDT_URI[S] - the 'S' (source) directory where the artifacts are extracted | ||
160 | 160 | ||
161 | fs-boot recipe from meta-xilinx-tools: | 161 | fs-boot recipe from meta-xilinx-tools: |
162 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot - YAML based uart stdin configuration for | 162 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot - YAML based uart stdin configuration for |
@@ -210,15 +210,3 @@ HAS_PLATFORM_INIT - List of defconfig files available for u-boot only for SPL bo | |||
210 | u-boot-xlnx-scr recipe from meta-xilinx-core: | 210 | u-boot-xlnx-scr recipe from meta-xilinx-core: |
211 | DDR_BASEADDR - Base address for DDR used for loading the images from u-boot env. | 211 | DDR_BASEADDR - Base address for DDR used for loading the images from u-boot env. |
212 | SKIP_APPEND_BASEADDR - Skip appending ${DDR_BASEADDR} for image offsets. | 212 | SKIP_APPEND_BASEADDR - Skip appending ${DDR_BASEADDR} for image offsets. |
213 | |||
214 | Varibable set after required inclusion file: | ||
215 | Varibables that does not intend to change must be set before required inclusion | ||
216 | file. | ||
217 | |||
218 | external-hdf recipe from meta-xilinx-tools: | ||
219 | HDF_MACHINE - Used by the recipe to find the correct XSA | ||
220 | HDF_EXT - only xsa is supported, legacy variable | ||
221 | HDF_BASE - protocol if not using the default external-hdf repository | ||
222 | HDF_PATH - path to the repository or XSA file | ||
223 | |||
224 | ...and more... | ||
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..cf890a51 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | # HDF_MACHINE should be set _AFTER_ this has been loaded | ||
2 | HDF_MACHINE_PRIOR := "${HDF_MACHINE}" | ||
3 | INHERIT += "xilinx-vars" | 1 | INHERIT += "xilinx-vars" |
4 | INHERIT += "xilinx-deprecated" | 2 | INHERIT += "xilinx-deprecated" |
5 | 3 | ||
@@ -14,7 +12,7 @@ IMAGE_FSTYPES ?= "tar.gz cpio cpio.gz cpio.gz.u-boot" | |||
14 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" | 12 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" |
15 | 13 | ||
16 | # Device tree Configuration | 14 | # Device tree Configuration |
17 | PREFERRED_PROVIDER_virtual/dtb ??= "device-tree" | 15 | PREFERRED_PROVIDER_virtual/dtb ??= "${@'device-tree' if d.getVar('XILINX_WITH_ESW') else ''}" |
18 | 16 | ||
19 | # U-Boot Configuration | 17 | # U-Boot Configuration |
20 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" | 18 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" |
@@ -23,31 +21,14 @@ PREFERRED_PROVIDER_u-boot-tools ??= "u-boot-tools-xlnx" | |||
23 | PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" | 21 | PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" |
24 | PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" | 22 | PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" |
25 | 23 | ||
26 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" | 24 | # Libmetal and OpenAMP Configuration |
25 | PREFERRED_PROVIDER_libmetal ?= "libmetal-xlnx" | ||
26 | PREFERRED_PROVIDER_open-amp ?= "open-amp-xlnx" | ||
27 | 27 | ||
28 | UBOOT_SUFFIX ?= "bin" | 28 | UBOOT_SUFFIX ?= "bin" |
29 | 29 | ||
30 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" | 30 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" |
31 | UBOOT_ELF ?= "u-boot" | 31 | UBOOT_ELF ?= "u-boot.elf" |
32 | UBOOT_ELF:aarch64 ?= "u-boot.elf" | ||
33 | |||
34 | # libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 | ||
35 | # lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 | ||
36 | # default mesa because otherwise | ||
37 | def xlnx_is_libmali_enabled(d): | ||
38 | if bb.utils.contains('MACHINE_FEATURES', 'mali400', '1', '', d) == '1': | ||
39 | if bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '', d) == '1': | ||
40 | return True | ||
41 | return False | ||
42 | |||
43 | # libmali requires certain preferred providers to be selected | ||
44 | PREFERRED_PROVIDER_virtual/egl ?= "${@'libmali-xlnx' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
45 | PREFERRED_PROVIDER_virtual/libgl ?= "${@'mesa-gl' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
46 | PREFERRED_PROVIDER_virtual/libgles1 ?= "${@'libmali-xlnx' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
47 | PREFERRED_PROVIDER_virtual/libgles2 ?= "${@'libmali-xlnx' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
48 | PREFERRED_PROVIDER_virtual/libgles3 ?= "${@'NOT_SUPPORTED' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
49 | PREFERRED_PROVIDER_virtual/libgbm ?= "${@'libmali-xlnx' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
50 | PREFERRED_PROVIDER_virtual/mesa ?= "${@'mesa-gl' if xlnx_is_libmali_enabled(d) else 'mesa'}" | ||
51 | 32 | ||
52 | XSERVER ?= " \ | 33 | XSERVER ?= " \ |
53 | xserver-xorg \ | 34 | xserver-xorg \ |
@@ -76,12 +57,9 @@ WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.bi | |||
76 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' virtual/dtb', '', d)}" | 57 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' virtual/dtb', '', d)}" |
77 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" | 58 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" |
78 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" | 59 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" |
79 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'atf-uboot.ub', ' arm-trusted-firmware', '', d)}" | ||
80 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' virtual/kernel', '', d)}" | 60 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' virtual/kernel', '', d)}" |
81 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' virtual/kernel', '', d)}" | 61 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' virtual/kernel', '', d)}" |
82 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' virtual/kernel', '', d)}" | 62 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' virtual/kernel', '', d)}" |
83 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.bin', ' virtual/bootloader', '', d)}" | ||
84 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.elf', ' virtual/bootloader', '', d)}" | ||
85 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', '${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot', ' ${INITRAMFS_IMAGE}', '', d)}" | 63 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', '${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot', ' ${INITRAMFS_IMAGE}', '', d)}" |
86 | 64 | ||
87 | # Automatically add IMAGE_BOOT_FILES to /boot via packages | 65 | # Automatically add IMAGE_BOOT_FILES to /boot via packages |
@@ -89,9 +67,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INST | |||
89 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' ${PREFERRED_PROVIDER_virtual/dtb}', '', d)}" | 67 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' ${PREFERRED_PROVIDER_virtual/dtb}', '', d)}" |
90 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" | 68 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" |
91 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" | 69 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" |
92 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'atf-uboot.ub', ' arm-trusted-firmware', '', d)}" | ||
93 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.bin', ' ${PREFERRED_PROVIDER_virtual/bootloader}-bin', '', d)}" | ||
94 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.elf', ' ${PREFERRED_PROVIDER_virtual/bootloader}-elf', '', d)}" | ||
95 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' kernel-image-image', '', d)}" | 70 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' kernel-image-image', '', d)}" |
96 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' kernel-image-uimage', '', d)}" | 71 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' kernel-image-uimage', '', d)}" |
97 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' kernel-image-zimage', '', d)}" | 72 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' kernel-image-zimage', '', d)}" |
@@ -105,6 +80,17 @@ IMAGE_BOOT_FILES ?= "${@get_default_image_boot_files(d)}" | |||
105 | def get_default_image_boot_files(d): | 80 | def get_default_image_boot_files(d): |
106 | files = [] | 81 | files = [] |
107 | 82 | ||
83 | esw_type = d.getVar('XILINX_WITH_ESW') or '' | ||
84 | if esw_type: | ||
85 | if 'zynq' in d.getVar('OVERRIDES').split(':'): | ||
86 | files.append('boot.bin') | ||
87 | if 'zynqmp' in d.getVar('OVERRIDES').split(':'): | ||
88 | files.append('boot.bin') | ||
89 | if 'versal' in d.getVar('OVERRIDES').split(':'): | ||
90 | files.append('boot.bin') | ||
91 | if 'versal-net' in d.getVar('OVERRIDES').split(':'): | ||
92 | files.append('boot.bin') | ||
93 | |||
108 | # kernel images | 94 | # kernel images |
109 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) | 95 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) |
110 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) | 96 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) |
@@ -118,6 +104,7 @@ def get_default_image_boot_files(d): | |||
118 | 104 | ||
119 | # device trees (device-tree only), these are first as they are likely desired over the kernel ones | 105 | # device trees (device-tree only), these are first as they are likely desired over the kernel ones |
120 | if "device-tree" in (d.getVar("PREFERRED_PROVIDER_virtual/dtb") or ""): | 106 | if "device-tree" in (d.getVar("PREFERRED_PROVIDER_virtual/dtb") or ""): |
107 | files.append("system.dtb") | ||
121 | files.append("devicetree/*.dtb;devicetree/") | 108 | files.append("devicetree/*.dtb;devicetree/") |
122 | files.append("devicetree/*.dtbo;devicetree/") | 109 | files.append("devicetree/*.dtbo;devicetree/") |
123 | 110 | ||
@@ -130,6 +117,34 @@ def get_default_image_boot_files(d): | |||
130 | 117 | ||
131 | return " ".join(files) | 118 | return " ".join(files) |
132 | 119 | ||
120 | EXTRA_IMAGEDEPENDS += "${@get_default_extra_imagedepends(d)}" | ||
121 | |||
122 | def get_default_extra_imagedepends(d): | ||
123 | depends = [] | ||
124 | |||
125 | # Add firmware dependencies | ||
126 | esw_type = d.getVar('XILINX_WITH_ESW') or '' | ||
127 | if esw_type: | ||
128 | depends.append('libyaml-native') | ||
129 | depends.append('python3-cython-native') | ||
130 | depends.append('python3-pyyaml-native') | ||
131 | if 'microblaze' in d.getVar('OVERRIDES').split(':'): | ||
132 | depends.append('virtual/bitstream') | ||
133 | if 'zynq' in d.getVar('OVERRIDES').split(':'): | ||
134 | depends.append('virtual/boot-bin') | ||
135 | if 'zynqmp' in d.getVar('OVERRIDES').split(':'): | ||
136 | depends.append('virtual/boot-bin') | ||
137 | if 'versal' in d.getVar('OVERRIDES').split(':'): | ||
138 | depends.append('virtual/boot-bin') | ||
139 | depends.append('virtual/cdo') | ||
140 | if 'versal-net' in d.getVar('OVERRIDES').split(':'): | ||
141 | depends.append('virtual/boot-bin') | ||
142 | depends.append('virtual/cdo') | ||
143 | |||
144 | return " ".join(depends) | ||
145 | |||
146 | |||
147 | |||
133 | XSERVER_EXT ?= "" | 148 | XSERVER_EXT ?= "" |
134 | 149 | ||
135 | FPGA_MNGR_RECONFIG_ENABLE ?= "1" | 150 | FPGA_MNGR_RECONFIG_ENABLE ?= "1" |
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc index c450b542..e75f556b 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc | |||
@@ -9,7 +9,7 @@ PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" | |||
9 | MACHINEOVERRIDES =. "qemuboot-xilinx:" | 9 | MACHINEOVERRIDES =. "qemuboot-xilinx:" |
10 | 10 | ||
11 | # depend on qemu-helper-native, which will depend on QEMU | 11 | # depend on qemu-helper-native, which will depend on QEMU |
12 | EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" | 12 | EXTRA_IMAGEDEPENDS += "qemu-devicetrees-native qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" |
13 | 13 | ||
14 | # Use the xilinx specific version for these users | 14 | # Use the xilinx specific version for these users |
15 | IMAGE_CLASSES += "qemuboot-xilinx" | 15 | IMAGE_CLASSES += "qemuboot-xilinx" |
@@ -21,5 +21,5 @@ IMAGE_CLASSES += "qemuboot-xilinx" | |||
21 | # QB_XILINX_SERIAL that will allow us to define serial ports for qemu | 21 | # QB_XILINX_SERIAL that will allow us to define serial ports for qemu |
22 | # emulated boards that may not match the standard Linux behavior. | 22 | # emulated boards that may not match the standard Linux behavior. |
23 | # | 23 | # |
24 | QB_XILINX_SERIAL ?= "" | 24 | QB_XILINX_SERIAL ??= "" |
25 | QB_OPT_APPEND += "${QB_XILINX_SERIAL}" | 25 | QB_OPT_APPEND += "${QB_XILINX_SERIAL} -nodefaults" |
diff --git a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc index b3216426..197a998d 100644 --- a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc +++ b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc | |||
@@ -7,6 +7,7 @@ TUNEFILE[cortexr5hf] = "conf/machine/include/arm/armv7r/tune-cortexr5.inc" | |||
7 | TUNEFILE[cortexr52] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" | 7 | TUNEFILE[cortexr52] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" |
8 | TUNEFILE[cortexr52hf] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" | 8 | TUNEFILE[cortexr52hf] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" |
9 | TUNEFILE[cortexa9thf-neon] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" | 9 | TUNEFILE[cortexa9thf-neon] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" |
10 | TUNEFILE[cortexa9] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" | ||
10 | TUNEFILE[armv8a] = "conf/machine/include/arm/arch-armv8a.inc" | 11 | TUNEFILE[armv8a] = "conf/machine/include/arm/arch-armv8a.inc" |
11 | TUNEFILE[cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa53.inc" | 12 | TUNEFILE[cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa53.inc" |
12 | TUNEFILE[cortexa72] = "conf/machine/include/arm/armv8a/tune-cortexa72.inc" | 13 | TUNEFILE[cortexa72] = "conf/machine/include/arm/armv8a/tune-cortexa72.inc" |
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal-net.inc b/meta-xilinx-core/conf/machine/include/soc-versal-net.inc new file mode 100644 index 00000000..f7898e0d --- /dev/null +++ b/meta-xilinx-core/conf/machine/include/soc-versal-net.inc | |||
@@ -0,0 +1,24 @@ | |||
1 | DEFAULTTUNE ?= "cortexa72-cortexa53" | ||
2 | SOC_FAMILY ?= "versal-net" | ||
3 | |||
4 | require conf/machine/include/soc-family.inc | ||
5 | require soc-tune-include.inc | ||
6 | |||
7 | # Linux Configuration | ||
8 | KERNEL_IMAGETYPE ?= "Image" | ||
9 | |||
10 | UBOOT_ELF ?= "u-boot.elf" | ||
11 | |||
12 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | ||
13 | # The Linux compatible plm/psm-firmware though requires meta-xilinx-tools | ||
14 | PLM_DEPENDS ??= "" | ||
15 | PLM_MCDEPENDS ??= "" | ||
16 | PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
17 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" | ||
18 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
19 | |||
20 | PSM_DEPENDS ??= "" | ||
21 | PSM_MCDEPENDS ??= "" | ||
22 | PSM_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
23 | PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" | ||
24 | PSM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal.inc b/meta-xilinx-core/conf/machine/include/soc-versal.inc index dcf3796e..1fcb412a 100644 --- a/meta-xilinx-core/conf/machine/include/soc-versal.inc +++ b/meta-xilinx-core/conf/machine/include/soc-versal.inc | |||
@@ -1,24 +1,20 @@ | |||
1 | DEFAULTTUNE ?= "cortexa72-cortexa53" | 1 | DEFAULTTUNE ?= "cortexa72-cortexa53" |
2 | SOC_FAMILY ?= "versal" | 2 | SOC_FAMILY ?= "versal" |
3 | 3 | ||
4 | # Available SOC_VARIANT's for versal: | 4 | # Available MACHINE_FETURES for versal processors: |
5 | # "prime" - Versal deafult Prime Devices | 5 | # prime - (none) |
6 | # "premium" - Versal Premium Devices | 6 | # premium - aie |
7 | # "hbm" - Versal HMB Devices | 7 | # hbm - (none) |
8 | # "ai-core" - Versal AI-core Devices | 8 | # ai-core - aie, vdu |
9 | # "ai-edge" - Versal AI-Edge Devices | 9 | # ai-edge - aie, vdu |
10 | # "net" - Versal Net Devices | 10 | # net - none |
11 | 11 | ||
12 | SOC_VARIANT ?= "prime" | 12 | require conf/machine/include/soc-family.inc |
13 | |||
14 | require xilinx-soc-family.inc | ||
15 | require soc-tune-include.inc | 13 | require soc-tune-include.inc |
16 | 14 | ||
17 | # Linux Configuration | 15 | # Linux Configuration |
18 | KERNEL_IMAGETYPE ?= "Image" | 16 | KERNEL_IMAGETYPE ?= "Image" |
19 | 17 | ||
20 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | ||
21 | |||
22 | UBOOT_ELF ?= "u-boot.elf" | 18 | UBOOT_ELF ?= "u-boot.elf" |
23 | 19 | ||
24 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | 20 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version |
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynq.inc b/meta-xilinx-core/conf/machine/include/soc-zynq.inc index eea02a6c..587a0d5a 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynq.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynq.inc | |||
@@ -1,28 +1,11 @@ | |||
1 | DEFAULTTUNE ?= "cortexa9thf-neon" | 1 | DEFAULTTUNE ?= "cortexa9thf-neon" |
2 | SOC_FAMILY ?= "zynq" | 2 | SOC_FAMILY ?= "zynq" |
3 | 3 | ||
4 | # Available SOC_VARIANT's for zynq: | 4 | require conf/machine/include/soc-family.inc |
5 | # 7zs - Zynq-7000 Single A9 Core | ||
6 | # 7z - Zynq-7000 Dual A9 Core | ||
7 | |||
8 | SOC_VARIANT ?= "7z" | ||
9 | |||
10 | require xilinx-soc-family.inc | ||
11 | require soc-tune-include.inc | 5 | require soc-tune-include.inc |
12 | 6 | ||
13 | # Linux Configuration | 7 | # Linux Configuration |
14 | KERNEL_IMAGETYPE ?= "uImage" | 8 | KERNEL_IMAGETYPE ?= "uImage" |
15 | KERNEL_IMAGETYPES += "zImage" | 9 | KERNEL_IMAGETYPES += "zImage" |
16 | 10 | ||
17 | # WIC Specific dependencies | ||
18 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin" | ||
19 | |||
20 | UBOOT_ELF ?= "u-boot.elf" | 11 | UBOOT_ELF ?= "u-boot.elf" |
21 | |||
22 | # Default, if multiconfig is off, the fsbl is in the regular deploydir, otherwise | ||
23 | # it is located under a multiconfig specific deploydir | ||
24 | FSBL_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '', 'fsbl-firmware:do_deploy', d)}" | ||
25 | FSBL_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'mc::fsbl-fw:fsbl-firmware:do_deploy', '', d)}" | ||
26 | FSBL_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
27 | FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
28 | FSBL_IMAGE_NAME ?= "fsbl-${MACHINE}" | ||
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc index 95ac54e2..aee5c19c 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc | |||
@@ -1,27 +1,13 @@ | |||
1 | DEFAULTTUNE ?= "cortexa72-cortexa53" | 1 | DEFAULTTUNE ?= "cortexa72-cortexa53" |
2 | SOC_FAMILY ?= "zynqmp" | 2 | SOC_FAMILY ?= "zynqmp" |
3 | 3 | ||
4 | # Available SOC_VARIANT's for zynqmp: | 4 | # Available MACHINE_FETURES for zynqmp processors: |
5 | # "cg" - Zynq UltraScale+ CG Devices (default lowest common denominator) | 5 | # zynqmp-cg - (none) |
6 | # "eg" - Zynq UltraScale+ EG Devices | 6 | # zynqmp-eg - mali400 |
7 | # "ev" - Zynq UltraScale+ EV Devices | 7 | # zynqmp-ev - mali400, vcu |
8 | # "dr" - Zynq UltraScale+ DR Devices | 8 | # zynqmp-dr - rfsoc |
9 | |||
10 | SOC_VARIANT ?= "cg" | ||
11 | |||
12 | # Add VCU feature on "ev" devices | ||
13 | VCU_MACHINE_FEATURE = "" | ||
14 | VCU_MACHINE_FEATURE:zynqmp-ev = " vcu" | ||
15 | MACHINE_FEATURES .= "${VCU_MACHINE_FEATURE}" | ||
16 | |||
17 | # Add mali400 a.k.a Mali Utgard, "ev" and "eg" devices | ||
18 | MALI_MACHINE_FEATURE = "" | ||
19 | MALI_MACHINE_FEATURE:zynqmp-eg = " mali400" | ||
20 | MALI_MACHINE_FEATURE:zynqmp-ev = " mali400" | ||
21 | MACHINE_FEATURES .= "${MALI_MACHINE_FEATURE}" | ||
22 | |||
23 | require xilinx-soc-family.inc | ||
24 | 9 | ||
10 | require conf/machine/include/soc-family.inc | ||
25 | require soc-tune-include.inc | 11 | require soc-tune-include.inc |
26 | 12 | ||
27 | # Linux Configuration | 13 | # Linux Configuration |
@@ -30,8 +16,6 @@ KERNEL_IMAGETYPE ?= "Image" | |||
30 | # Support multilib on zynqmp | 16 | # Support multilib on zynqmp |
31 | DEFAULTTUNE:virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" | 17 | DEFAULTTUNE:virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" |
32 | 18 | ||
33 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | ||
34 | |||
35 | UBOOT_SUFFIX ?= "bin" | 19 | UBOOT_SUFFIX ?= "bin" |
36 | 20 | ||
37 | XSERVER_EXT:zynqmp ?= "xf86-video-armsoc" | 21 | XSERVER_EXT:zynqmp ?= "xf86-video-armsoc" |
diff --git a/meta-xilinx-core/conf/machine/include/xilinx-soc-family.inc b/meta-xilinx-core/conf/machine/include/xilinx-soc-family.inc deleted file mode 100644 index dd54f5c6..00000000 --- a/meta-xilinx-core/conf/machine/include/xilinx-soc-family.inc +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | SOC_VARIANT ??= "" | ||
2 | MACHINEOVERRIDES =. "${@['', '${SOC_FAMILY}-${SOC_VARIANT}:']['${SOC_VARIANT}' != '']}" | ||
3 | |||
4 | require conf/machine/include/soc-family.inc | ||
5 | |||
6 | SOC_FAMILY_ARCH ?= "${SOC_FAMILY}" | ||
7 | SOC_VARIANT_ARCH ?= "${@['${SOC_FAMILY}-${SOC_VARIANT}','${SOC_FAMILY}'][d.getVar('SOC_VARIANT')=='']}" | ||
8 | |||
9 | PACKAGE_EXTRA_ARCHS:append = " ${SOC_FAMILY_ARCH}" | ||
10 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${SOC_VARIANT_ARCH}'][d.getVar('SOC_VARIANT_ARCH') != d.getVar('SOC_FAMILY_ARCH')]}" | ||
diff --git a/meta-xilinx-core/conf/machine/microblaze-generic.conf b/meta-xilinx-core/conf/machine/microblaze-generic.conf index 8fb40070..39059511 100644 --- a/meta-xilinx-core/conf/machine/microblaze-generic.conf +++ b/meta-xilinx-core/conf/machine/microblaze-generic.conf | |||
@@ -2,11 +2,6 @@ | |||
2 | #@NAME: microblaze-generic | 2 | #@NAME: microblaze-generic |
3 | #@DESCRIPTION: Machine configuration for the microblaze-generic devices | 3 | #@DESCRIPTION: Machine configuration for the microblaze-generic devices |
4 | 4 | ||
5 | # Deprecated board config | ||
6 | USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | ||
7 | require ${USE_BOARD} | ||
8 | unset USE_BOARD | ||
9 | |||
10 | #### Preamble | 5 | #### Preamble |
11 | MACHINEOVERRIDES =. "${@['', 'microblaze-generic:']['microblaze-generic' != '${MACHINE}']}" | 6 | MACHINEOVERRIDES =. "${@['', 'microblaze-generic:']['microblaze-generic' != '${MACHINE}']}" |
12 | #### Regular settings follow | 7 | #### Regular settings follow |
@@ -19,21 +14,6 @@ DEFAULTTUNE ?= "microblaze" | |||
19 | # defined before calling the required inclusion file else pre-expansion value | 14 | # defined before calling the required inclusion file else pre-expansion value |
20 | # defined in local.conf without machine override will not be reflected. | 15 | # defined in local.conf without machine override will not be reflected. |
21 | 16 | ||
22 | # Yocto Microblaze device-tree variables | ||
23 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "DDR4_0" | ||
25 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
26 | DTC_FLAGS:pn-device-tree ?= "" | ||
27 | XSCTH_PROC:pn-device-tree ?= "microblaze_0" | ||
28 | YAML_DT_BOARD_FLAGS ?= "{BOARD kcu105}" | ||
29 | |||
30 | # Yocto Microblaze FS-Boot variables | ||
31 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
32 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
33 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "DDR4_0" | ||
34 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
35 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
36 | |||
37 | # Yocto Microblaze u-boot-xlnx variables | 17 | # Yocto Microblaze u-boot-xlnx variables |
38 | UBOOT_MACHINE ?= "microblaze-generic_defconfig" | 18 | UBOOT_MACHINE ?= "microblaze-generic_defconfig" |
39 | UBOOT_INITIAL_ENV = "" | 19 | UBOOT_INITIAL_ENV = "" |
@@ -46,7 +26,6 @@ KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}" | |||
46 | 26 | ||
47 | # Microblaze Serial Console settings | 27 | # Microblaze Serial Console settings |
48 | SERIAL_CONSOLES ?= "115200;ttyUL0" | 28 | SERIAL_CONSOLES ?= "115200;ttyUL0" |
49 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
50 | 29 | ||
51 | require conf/machine/include/soc-tune-include.inc | 30 | require conf/machine/include/soc-tune-include.inc |
52 | require conf/machine/include/machine-xilinx-default.inc | 31 | require conf/machine/include/machine-xilinx-default.inc |
@@ -60,27 +39,12 @@ MB_MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH'), d.getVar('TUNE_PKGARCH') + '-ge | |||
60 | 39 | ||
61 | MACHINE_ARCH = "${@['${MB_MACHINE_ARCH}', '${DEF_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" | 40 | MACHINE_ARCH = "${@['${MB_MACHINE_ARCH}', '${DEF_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" |
62 | 41 | ||
63 | # microblaze-generic.conf uses kcu105-microblazeel xsa as reference input. | ||
64 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
65 | # local.conf. | ||
66 | HDF_MACHINE = "kcu105-microblazeel" | ||
67 | |||
68 | MACHINE_FEATURES = "" | 42 | MACHINE_FEATURES = "" |
69 | 43 | ||
70 | KERNEL_IMAGETYPE ?= "linux.bin.ub" | 44 | KERNEL_IMAGETYPE ?= "linux.bin.ub" |
71 | KERNEL_IMAGETYPES = "" | 45 | KERNEL_IMAGETYPES = "" |
72 | 46 | ||
73 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
74 | |||
75 | IMAGE_BOOT_FILES += " \ | ||
76 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
77 | " | ||
78 | |||
79 | EXTRA_IMAGEDEPENDS += " \ | 47 | EXTRA_IMAGEDEPENDS += " \ |
80 | libyaml-native \ | ||
81 | python3-cython-native \ | ||
82 | python3-pyyaml-native \ | ||
83 | virtual/bitstream \ | ||
84 | virtual/bootloader \ | 48 | virtual/bootloader \ |
85 | virtual/elfrealloc \ | 49 | virtual/elfrealloc \ |
86 | u-boot-xlnx-scr \ | 50 | u-boot-xlnx-scr \ |
@@ -89,9 +53,9 @@ EXTRA_IMAGEDEPENDS += " \ | |||
89 | IMAGE_FSTYPES += "cpio.gz" | 53 | IMAGE_FSTYPES += "cpio.gz" |
90 | 54 | ||
91 | # Microblaze QEMU Configurations | 55 | # Microblaze QEMU Configurations |
92 | QB_MEM = "-m 2G" | 56 | QB_MEM ?= "-m 2G" |
93 | QB_KERNEL_CMDLINE_APPEND = "console=ttyUL0,115200 root=/dev/ram0 rw" | 57 | QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" |
94 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 58 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" |
95 | 59 | ||
96 | # This will work with the default runqemu, as the first serial port is the | 60 | # This will work with the default runqemu, as the first serial port is the |
97 | # correct console | 61 | # correct console |
@@ -99,13 +63,8 @@ QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | |||
99 | # One total serial port defined in this model (according to the generated dts) | 63 | # One total serial port defined in this model (according to the generated dts) |
100 | # | 64 | # |
101 | # hw serial0 axi_uartlite_0 (40600000) - linux serial0 (ttyUL0) | 65 | # hw serial0 axi_uartlite_0 (40600000) - linux serial0 (ttyUL0) |
102 | QB_XILINX_SERIAL = "" | 66 | QB_XILINX_SERIAL ?= "" |
103 | 67 | ||
104 | #### No additional settings should be after the Postamble | 68 | #### No additional settings should be after the Postamble |
105 | #### Postamble | 69 | #### Postamble |
106 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${MB_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" | 70 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${MB_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" |
107 | |||
108 | # Deprecated board config | ||
109 | USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | ||
110 | require ${USE_BOARD} | ||
111 | unset USE_BOARD | ||
diff --git a/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf index 34f57691..3b7218c1 100644 --- a/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-ai-core-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'versal-ai-core-generic:']['versal-ai-core-generic' | |||
4 | 4 | ||
5 | require conf/machine/versal-generic.conf | 5 | require conf/machine/versal-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "ai-core" | 7 | MACHINE_FEATURES += "aie vdu" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
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..0d7f3223 100644 --- a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf | |||
@@ -4,7 +4,13 @@ MACHINEOVERRIDES =. "${@['', 'versal-ai-edge-generic:']['versal-ai-edge-generic' | |||
4 | 4 | ||
5 | require conf/machine/versal-generic.conf | 5 | require conf/machine/versal-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "ai-edge" | 7 | MACHINE_FEATURES += "aie vdu" |
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. | ||
11 | QB_MEM ?= "-m 12G" | ||
12 | |||
13 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb" | ||
8 | 14 | ||
9 | #### No additional settings should be after the Postamble | 15 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 16 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-common.conf b/meta-xilinx-core/conf/machine/versal-common.conf new file mode 100644 index 00000000..bc530d63 --- /dev/null +++ b/meta-xilinx-core/conf/machine/versal-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: versal-common | ||
3 | #@DESCRIPTION: Machine configuration for a common Versal filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'versal-common:']['versal-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa72" | ||
10 | |||
11 | require conf/machine/versal-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "aie vdu" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_common']['versal-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf index 2f35ba24..9aa47892 100644 --- a/meta-xilinx-core/conf/machine/versal-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-generic.conf | |||
@@ -10,12 +10,6 @@ MACHINEOVERRIDES =. "${@['', 'versal-generic:']['versal-generic' != '${MACHINE}' | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto Versal device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
15 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
16 | DTC_FLAGS:pn-device-tree = "-@" | ||
17 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vck190-reva-x-ebm-01-reva}" | ||
18 | |||
19 | # Yocto Versal u-boot-xlnx variables | 13 | # Yocto Versal u-boot-xlnx variables |
20 | UBOOT_MACHINE ?= "xilinx_versal_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_versal_virt_defconfig" |
21 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
@@ -23,68 +17,44 @@ BOOTMODE ?= "generic.root" | |||
23 | # Yocto Versal arm-trusted-firmware(TF-A) variables | 17 | # Yocto Versal arm-trusted-firmware(TF-A) variables |
24 | TFA_BL33_LOAD ?= "0x8000000" | 18 | TFA_BL33_LOAD ?= "0x8000000" |
25 | 19 | ||
26 | # Yocto Versal PLM variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
29 | |||
30 | # Yocto Versal KERNEL Variables | 20 | # Yocto Versal KERNEL Variables |
31 | UBOOT_ENTRYPOINT ?= "0x200000" | 21 | UBOOT_ENTRYPOINT ?= "0x200000" |
32 | UBOOT_LOADADDRESS ?= "0x200000" | 22 | UBOOT_LOADADDRESS ?= "0x200000" |
33 | 23 | ||
34 | # Versal Serial Console | 24 | # Versal Serial Console |
35 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | 25 | SERIAL_CONSOLES ?= "115200;ttyAMA0" |
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | 26 | ||
38 | require conf/machine/include/soc-versal.inc | 27 | require conf/machine/include/soc-versal.inc |
39 | require conf/machine/include/machine-xilinx-default.inc | 28 | require conf/machine/include/machine-xilinx-default.inc |
40 | require conf/machine/include/machine-xilinx-qemu.inc | 29 | require conf/machine/include/machine-xilinx-qemu.inc |
41 | 30 | ||
42 | # versal-generic.conf uses vck190-versal xsa as reference input. | ||
43 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
44 | # local.conf. | ||
45 | HDF_MACHINE = "vck190-versal" | ||
46 | |||
47 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" | 31 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" |
48 | 32 | ||
49 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
50 | |||
51 | # Default SD image build onfiguration, use qemu-sd to pad | 33 | # Default SD image build onfiguration, use qemu-sd to pad |
52 | IMAGE_CLASSES += "image-types-xilinx-qemu" | 34 | IMAGE_CLASSES += "image-types-xilinx-qemu" |
53 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 35 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
54 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" | 36 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" |
55 | 37 | ||
56 | EXTRA_IMAGEDEPENDS += " \ | 38 | EXTRA_IMAGEDEPENDS += " \ |
57 | libyaml-native \ | ||
58 | python3-cython-native \ | ||
59 | python3-pyyaml-native \ | ||
60 | arm-trusted-firmware \ | ||
61 | virtual/boot-bin \ | ||
62 | virtual/bootloader \ | ||
63 | virtual/psm-firmware \ | ||
64 | virtual/plm \ | ||
65 | u-boot-xlnx-scr \ | 39 | u-boot-xlnx-scr \ |
66 | qemu-devicetrees:do_deploy \ | ||
67 | virtual/cdo:do_deploy \ | ||
68 | " | 40 | " |
69 | 41 | ||
70 | IMAGE_BOOT_FILES += " \ | 42 | IMAGE_BOOT_FILES += " \ |
71 | boot.bin \ | ||
72 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
73 | Image \ | 43 | Image \ |
74 | boot.scr \ | 44 | boot.scr \ |
75 | " | 45 | " |
76 | 46 | ||
77 | # Versal QEMU Configurations | 47 | # Versal QEMU Configurations |
78 | # This machine has a QEMU model, runqemu setup: | 48 | # This machine has a QEMU model, runqemu setup: |
79 | QB_MEM = "-m 8G" | 49 | QB_MEM ?= "-m 8G" |
80 | QB_DEFAULT_KERNEL = "none" | 50 | QB_DEFAULT_KERNEL ?= "none" |
81 | # Iteration appears to be eth0 then eth1 | 51 | # Iteration appears to be eth0 then eth1 |
82 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@ -net nic" | 52 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@ -net nic" |
83 | QB_KERNEL_CMDLINE_APPEND ?= "" | 53 | QB_KERNEL_CMDLINE_APPEND ?= "" |
84 | 54 | ||
85 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 55 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
86 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" | 56 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" |
87 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" | 57 | QEMU_HW_DTB_PMC ?= "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" |
88 | 58 | ||
89 | # Four total serial ports defined in this model (according to the dts) | 59 | # Four total serial ports defined in this model (according to the dts) |
90 | # | 60 | # |
@@ -93,26 +63,34 @@ QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" | |||
93 | # hw serial2 pl011 (ff000000) - linux serial0 (ttyAMA0) | 63 | # hw serial2 pl011 (ff000000) - linux serial0 (ttyAMA0) |
94 | # hw serial3 pl011 (ff010000) - linux serial1 (ttyAMA1) (disabled) | 64 | # hw serial3 pl011 (ff010000) - linux serial1 (ttyAMA1) (disabled) |
95 | # ? dcc ? - linux serial2 (????) | 65 | # ? dcc ? - linux serial2 (????) |
96 | QB_XILINX_SERIAL = "-serial null -serial null -serial mon:stdio -serial null" | 66 | QB_XILINX_SERIAL ?= "-serial null -serial null -serial mon:stdio -serial null" |
67 | |||
68 | QB_OSPI_FILE ??= "" | ||
97 | 69 | ||
98 | QB_OPT_APPEND += " \ | 70 | QB_OPT_APPEND += " \ |
99 | -hw-dtb ${QEMU_HW_DTB_PS} \ | 71 | -hw-dtb ${QEMU_HW_DTB_PS} \ |
100 | ${@qemu_add_extra_args(d)} \ | 72 | ${@qemu_add_extra_args(d)} \ |
73 | ${@'-bootbin ${QB_OSPI_FILE}' if d.getVar('QB_OSPI_FILE') != '' else ''} \ | ||
101 | " | 74 | " |
102 | 75 | ||
103 | # PLM instance args | 76 | # PLM instance args |
104 | QB_PLM_OPT = " \ | 77 | QB_PLM_OPT = " \ |
105 | -M microblaze-fdt \ | 78 | -M microblaze-fdt \ |
106 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw \ | ||
107 | -device loader,addr=0xf0000000,data=0xba020004,data-len=4 \ | 79 | -device loader,addr=0xf0000000,data=0xba020004,data-len=4 \ |
108 | -device loader,addr=0xf0000004,data=0xb800fffc,data-len=4 \ | 80 | -device loader,addr=0xf0000004,data=0xb800fffc,data-len=4 \ |
109 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ | ||
110 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ | ||
111 | -device loader,addr=0xF1110624,data=0x0,data-len=4 \ | 81 | -device loader,addr=0xF1110624,data=0x0,data-len=4 \ |
112 | -device loader,addr=0xF1110620,data=0x1,data-len=4 \ | 82 | -device loader,addr=0xF1110620,data=0x1,data-len=4 \ |
113 | -hw-dtb ${QEMU_HW_DTB_PMC} \ | 83 | -hw-dtb ${QEMU_HW_DTB_PMC} \ |
114 | -display none \ | 84 | -display none \ |
115 | " | 85 | " |
86 | |||
87 | QB_FW_FILES = " \ | ||
88 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw \ | ||
89 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ | ||
90 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ | ||
91 | " | ||
92 | QB_PLM_OPT += "${@d.getVar('QB_FW_FILES') if d.getVar('QB_OSPI_FILE') == '' else ''}" | ||
93 | |||
116 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" | 94 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" |
117 | 95 | ||
118 | #### No additional settings should be after the Postamble | 96 | #### No additional settings should be after the Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf index 23fffcb9..805df7fc 100644 --- a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf | |||
@@ -4,7 +4,11 @@ MACHINEOVERRIDES =. "${@['', 'versal-hbm-generic:']['versal-hbm-generic' != '${M | |||
4 | 4 | ||
5 | require conf/machine/versal-generic.conf | 5 | require conf/machine/versal-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "hbm" | 7 | # VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G, |
8 | # Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM | ||
9 | QB_MEM ?= "-m 32G" | ||
10 | |||
11 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb" | ||
8 | 12 | ||
9 | #### No additional settings should be after the Postamble | 13 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 14 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-net-common.conf b/meta-xilinx-core/conf/machine/versal-net-common.conf new file mode 100644 index 00000000..efde0bbb --- /dev/null +++ b/meta-xilinx-core/conf/machine/versal-net-common.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: versal-net-common | ||
3 | #@DESCRIPTION: Machine configuration for a common versal-net filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'versal-net-common:']['versal-net-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa78" | ||
10 | |||
11 | require conf/machine/versal-net-generic.conf | ||
12 | |||
13 | #### No additional settings should be after the Postamble | ||
14 | #### Postamble | ||
15 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_net_common']['versal-net-common' != "${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..b26fb5e1 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 @@ | |||
1 | XILINX_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 |
@@ -8,32 +6,55 @@ XILINX_DEPRECATED[versal-net] = "Versal-net is not supported in 2023.2" | |||
8 | MACHINEOVERRIDES =. "${@['', 'versal-net-generic:']['versal-net-generic' != '${MACHINE}']}" | 6 | MACHINEOVERRIDES =. "${@['', 'versal-net-generic:']['versal-net-generic' != '${MACHINE}']}" |
9 | #### Regular settings follow | 7 | #### Regular settings follow |
10 | 8 | ||
11 | # Must be set first, or versal-generic will set it | 9 | # Variables that changes based on hw design or board specific requirement must be |
10 | # defined before calling the required inclusion file else pre-expansion value | ||
11 | # defined in local.conf without machine override will not be reflected. | ||
12 | |||
13 | # Yocto Versal u-boot-xlnx variables | ||
12 | UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig" |
15 | BOOTMODE ?= "generic.root" | ||
13 | 16 | ||
14 | # Yocto Versal Net device-tree variables | 17 | # Yocto Versal arm-trusted-firmware(TF-A) variables |
15 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | 18 | TFA_BL33_LOAD ?= "0x8000000" |
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-net-ipp-rev1.9}" | ||
17 | 19 | ||
18 | # Yocto Versal Net PLM variables | 20 | # Yocto Versal KERNEL Variables |
19 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | 21 | UBOOT_ENTRYPOINT ?= "0x200000" |
20 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | 22 | UBOOT_LOADADDRESS ?= "0x200000" |
21 | 23 | ||
22 | # Versal Serial Console | 24 | # Versal Serial Console |
23 | SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1" | 25 | SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1" |
24 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
25 | 26 | ||
26 | require conf/machine/versal-generic.conf | 27 | require conf/machine/include/soc-versal-net.inc |
28 | require conf/machine/include/machine-xilinx-default.inc | ||
29 | require conf/machine/include/machine-xilinx-qemu.inc | ||
30 | |||
31 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" | ||
27 | 32 | ||
28 | SOC_VARIANT = "net" | 33 | # Default SD image build onfiguration, use qemu-sd to pad |
34 | IMAGE_CLASSES += "image-types-xilinx-qemu" | ||
35 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | ||
36 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" | ||
29 | 37 | ||
30 | # versal-generic.conf uses vck190-versal xsa as reference input. | 38 | EXTRA_IMAGEDEPENDS += " \ |
31 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | 39 | u-boot-xlnx-scr \ |
32 | # local.conf. | 40 | " |
33 | HDF_MACHINE = "versal-net-generic" | ||
34 | 41 | ||
35 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-net-psx-spp-1.4.dtb" | 42 | IMAGE_BOOT_FILES += " \ |
36 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" | 43 | Image \ |
44 | boot.scr \ | ||
45 | " | ||
46 | |||
47 | # Versal QEMU Configurations | ||
48 | # This machine has a QEMU model, runqemu setup: | ||
49 | QB_MEM ?= "-m 8G" | ||
50 | QB_DEFAULT_KERNEL ?= "none" | ||
51 | # Iteration appears to be eth0 then eth1 | ||
52 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@ -net nic" | ||
53 | QB_KERNEL_CMDLINE_APPEND ?= "" | ||
54 | |||
55 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | ||
56 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-net-psx-spp-1.4.dtb" | ||
57 | QEMU_HW_DTB_PMC ?= "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" | ||
37 | 58 | ||
38 | # Four total serial ports defined in this model (according to the dts) | 59 | # Four total serial ports defined in this model (according to the dts) |
39 | # | 60 | # |
@@ -41,9 +62,36 @@ QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" | |||
41 | # hw serial1 xps-uartlite (0xf0310000) - | 62 | # hw serial1 xps-uartlite (0xf0310000) - |
42 | # hw serial2 pl011 (0xf1920000) - linux serial0 (ttyAMA0) | 63 | # hw serial2 pl011 (0xf1920000) - linux serial0 (ttyAMA0) |
43 | # hw serial3 pl011 (0xf1930000) - linux serial1 (ttyAMA1) | 64 | # hw serial3 pl011 (0xf1930000) - linux serial1 (ttyAMA1) |
44 | QB_XILINX_SERIAL = "-serial null -serial null -serial mon:stdio -serial null" | 65 | QB_XILINX_SERIAL ?= "-serial null -serial null -serial mon:stdio -serial null" |
66 | |||
67 | QB_OSPI_FILE ??= "" | ||
68 | |||
69 | QB_OPT_APPEND += " \ | ||
70 | -hw-dtb ${QEMU_HW_DTB_PS} \ | ||
71 | ${@qemu_add_extra_args(d)} \ | ||
72 | ${@'-bootbin ${QB_OSPI_FILE}' if d.getVar('QB_OSPI_FILE') != '' else ''} \ | ||
73 | " | ||
74 | |||
75 | # PLM instance args | ||
76 | QB_PLM_OPT = " \ | ||
77 | -M microblaze-fdt \ | ||
78 | -device loader,addr=0xf0000000,data=0xba020004,data-len=4 \ | ||
79 | -device loader,addr=0xf0000004,data=0xb800fffc,data-len=4 \ | ||
80 | -device loader,addr=0xF1110624,data=0x0,data-len=4 \ | ||
81 | -device loader,addr=0xF1110620,data=0x1,data-len=4 \ | ||
82 | -hw-dtb ${QEMU_HW_DTB_PMC} \ | ||
83 | -display none \ | ||
84 | " | ||
85 | |||
86 | QB_FW_FILES = " \ | ||
87 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw=on \ | ||
88 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw=on \ | ||
89 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ | ||
90 | " | ||
91 | QB_PLM_OPT += "${@d.getVar('QB_FW_FILES') if d.getVar('QB_OSPI_FILE') == '' else ''}" | ||
92 | |||
93 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" | ||
45 | 94 | ||
46 | #### No additional settings should be after the Postamble | 95 | #### No additional settings should be after the Postamble |
47 | #### Postamble | 96 | #### Postamble |
48 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_net_generic']['versal-net-generic' != "${MACHINE}"]}" | 97 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_net_generic']['versal-net-generic' != "${MACHINE}"]}" |
49 | |||
diff --git a/meta-xilinx-core/conf/machine/versal-premium-generic.conf b/meta-xilinx-core/conf/machine/versal-premium-generic.conf index d785edff..357e852d 100644 --- a/meta-xilinx-core/conf/machine/versal-premium-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-premium-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'versal-premium-generic:']['versal-premium-generic' | |||
4 | 4 | ||
5 | require conf/machine/versal-generic.conf | 5 | require conf/machine/versal-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "premium" | 7 | MACHINE_FEATURES += "aie" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-prime-generic.conf b/meta-xilinx-core/conf/machine/versal-prime-generic.conf index 94e9b05e..edce3577 100644 --- a/meta-xilinx-core/conf/machine/versal-prime-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-prime-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'versal-prime-generic:']['versal-prime-generic' != | |||
4 | 4 | ||
5 | require conf/machine/versal-generic.conf | 5 | require conf/machine/versal-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "prime" | 7 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vmk180.dtb" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/zynq-common.conf b/meta-xilinx-core/conf/machine/zynq-common.conf new file mode 100644 index 00000000..f54b6e5b --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynq-common.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynq-common | ||
3 | #@DESCRIPTION: Machine configuration for a common Zynq7 filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynq-common:']['zynq-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa9thf-neon" | ||
10 | |||
11 | require conf/machine/zynq-generic.conf | ||
12 | |||
13 | #### No additional settings should be after the Postamble | ||
14 | #### Postamble | ||
15 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynq_common']['zynq-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf index 3dea2012..8442e4e3 100644 --- a/meta-xilinx-core/conf/machine/zynq-generic.conf +++ b/meta-xilinx-core/conf/machine/zynq-generic.conf | |||
@@ -10,21 +10,10 @@ MACHINEOVERRIDES =. "${@['', 'zynq-generic:']['zynq-generic' != '${MACHINE}']}" | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto Zynq-7000 device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0" | ||
16 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
17 | DTC_FLAGS:pn-device-tree = "-@" | ||
18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zc702}" | ||
19 | |||
20 | # Yocto Zynq-7000 u-boot-xlnx variables | 13 | # Yocto Zynq-7000 u-boot-xlnx variables |
21 | UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig" |
22 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
23 | 16 | ||
24 | # Yocto Zynq-7000 FSBL variables | ||
25 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1" | ||
26 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1" | ||
27 | |||
28 | # Yocto KERNEL Variables | 17 | # Yocto KERNEL Variables |
29 | UBOOT_ENTRYPOINT ?= "0x200000" | 18 | UBOOT_ENTRYPOINT ?= "0x200000" |
30 | UBOOT_LOADADDRESS ?= "0x200000" | 19 | UBOOT_LOADADDRESS ?= "0x200000" |
@@ -32,34 +21,18 @@ KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}" | |||
32 | 21 | ||
33 | # Zynq-7000 Serial Console settings | 22 | # Zynq-7000 Serial Console settings |
34 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 23 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
35 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
36 | 24 | ||
37 | require conf/machine/include/soc-zynq.inc | 25 | require conf/machine/include/soc-zynq.inc |
38 | require conf/machine/include/machine-xilinx-default.inc | 26 | require conf/machine/include/machine-xilinx-default.inc |
39 | require conf/machine/include/machine-xilinx-qemu.inc | 27 | require conf/machine/include/machine-xilinx-qemu.inc |
40 | 28 | ||
41 | # zynq-generic.conf uses zc702-zynq7 xsa as reference input. | ||
42 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
43 | # local.conf. | ||
44 | HDF_MACHINE = "zc702-zynq7" | ||
45 | |||
46 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" | 29 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" |
47 | 30 | ||
48 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
49 | |||
50 | EXTRA_IMAGEDEPENDS += " \ | 31 | EXTRA_IMAGEDEPENDS += " \ |
51 | libyaml-native \ | ||
52 | python3-cython-native \ | ||
53 | python3-pyyaml-native \ | ||
54 | virtual/fsbl \ | ||
55 | virtual/boot-bin \ | ||
56 | virtual/bootloader \ | ||
57 | u-boot-xlnx-scr \ | 32 | u-boot-xlnx-scr \ |
58 | " | 33 | " |
59 | 34 | ||
60 | IMAGE_BOOT_FILES += " \ | 35 | IMAGE_BOOT_FILES += " \ |
61 | boot.bin \ | ||
62 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
63 | boot.scr \ | 36 | boot.scr \ |
64 | uImage \ | 37 | uImage \ |
65 | " | 38 | " |
@@ -70,10 +43,10 @@ IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' | |||
70 | 43 | ||
71 | # Zynq-7000 QEMU Configurations | 44 | # Zynq-7000 QEMU Configurations |
72 | # This machine has a QEMU model, runqemu setup: | 45 | # This machine has a QEMU model, runqemu setup: |
73 | QB_MEM = "-m 1024" | 46 | QB_MEM ?= "-m 1024" |
74 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 47 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" |
75 | 48 | ||
76 | QB_KERNEL_ROOT = "/dev/mmcblk0p2" | 49 | QB_KERNEL_ROOT ?= "/dev/mmcblk0p2" |
77 | 50 | ||
78 | # Side effect of not-enabled serial port is we have to lock | 51 | # Side effect of not-enabled serial port is we have to lock |
79 | # the second (console) to mon:stdio. | 52 | # the second (console) to mon:stdio. |
@@ -82,7 +55,7 @@ QB_KERNEL_ROOT = "/dev/mmcblk0p2" | |||
82 | # | 55 | # |
83 | # hw uart0 xuartps (e0000000) - | 56 | # hw uart0 xuartps (e0000000) - |
84 | # hw uart1 xuartps (e0001000) - linux serial0 (ttyPS0) | 57 | # hw uart1 xuartps (e0001000) - linux serial0 (ttyPS0) |
85 | QB_XILINX_SERIAL = "-serial null -serial mon:stdio" | 58 | QB_XILINX_SERIAL ?= "-serial null -serial mon:stdio" |
86 | 59 | ||
87 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) | 60 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) |
88 | QB_OPT_APPEND += " \ | 61 | QB_OPT_APPEND += " \ |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf index 38c9126f..44169186 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-cg-generic.conf | |||
@@ -4,8 +4,6 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-cg-generic:']['zynqmp-cg-generic' != '${MAC | |||
4 | 4 | ||
5 | require conf/machine/zynqmp-generic.conf | 5 | require conf/machine/zynqmp-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "cg" | ||
8 | |||
9 | #### No additional settings should be after the Postamble | 7 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 8 | #### Postamble |
11 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_cg_generic']['zynqmp-cg-generic' != "${MACHINE}"]}" | 9 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_cg_generic']['zynqmp-cg-generic' != "${MACHINE}"]}" |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-common.conf b/meta-xilinx-core/conf/machine/zynqmp-common.conf new file mode 100644 index 00000000..e2e112f9 --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynqmp-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynqmp-common | ||
3 | #@DESCRIPTION: Machine configuration for a common ZynqMP (MPSOC) filesystem devices w/o mali400 | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynqmp-common:']['zynqmp-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa53" | ||
10 | |||
11 | require conf/machine/zynqmp-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "vcu rfsoc" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_common']['zynqmp-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf index fbe445aa..316175af 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-dr-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-dr-generic:']['zynqmp-dr-generic' != '${MAC | |||
4 | 4 | ||
5 | require conf/machine/zynqmp-generic.conf | 5 | require conf/machine/zynqmp-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "dr" | 7 | MACHINE_FEATURES += "rfsoc" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf index 33375b46..239ded34 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-eg-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-eg-generic:']['zynqmp-eg-generic' != '${MAC | |||
4 | 4 | ||
5 | require conf/machine/zynqmp-generic.conf | 5 | require conf/machine/zynqmp-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "eg" | 7 | MACHINE_FEATURES += "mali400" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf index f2ffe40f..31d94f63 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-ev-generic.conf | |||
@@ -4,7 +4,7 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-ev-generic:']['zynqmp-ev-generic' != '${MAC | |||
4 | 4 | ||
5 | require conf/machine/zynqmp-generic.conf | 5 | require conf/machine/zynqmp-generic.conf |
6 | 6 | ||
7 | SOC_VARIANT = "ev" | 7 | MACHINE_FEATURES += "mali400 vcu" |
8 | 8 | ||
9 | #### No additional settings should be after the Postamble | 9 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 10 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf index 055c7e5b..15a48102 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf | |||
@@ -10,13 +10,6 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}' | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
17 | DTC_FLAGS:pn-device-tree = "-@" | ||
18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu102-rev1.0}" | ||
19 | |||
20 | # Yocto ZynqMP u-boot-xlnx variables | 13 | # Yocto ZynqMP u-boot-xlnx variables |
21 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" |
22 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
@@ -30,31 +23,17 @@ SPL_BINARY ?= "" | |||
30 | # Yocto ZynqMP arm-trusted-firmware(TF-A) variables | 23 | # Yocto ZynqMP arm-trusted-firmware(TF-A) variables |
31 | TFA_BL33_LOAD ?= "0x8000000" | 24 | TFA_BL33_LOAD ?= "0x8000000" |
32 | 25 | ||
33 | # Yocto ZynqMP PMUFW variables | ||
34 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
35 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
36 | |||
37 | # Yocto ZynqMP FSBL variables | ||
38 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
39 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
40 | |||
41 | # Yocto ZynqMP KERNEL Variables | 26 | # Yocto ZynqMP KERNEL Variables |
42 | UBOOT_ENTRYPOINT ?= "0x200000" | 27 | UBOOT_ENTRYPOINT ?= "0x200000" |
43 | UBOOT_LOADADDRESS ?= "0x200000" | 28 | UBOOT_LOADADDRESS ?= "0x200000" |
44 | 29 | ||
45 | # ZynqMP Serial Console | 30 | # ZynqMP Serial Console |
46 | SERIAL_CONSOLES ?= "115200;ttyPS0 115200;ttyPS1" | 31 | SERIAL_CONSOLES ?= "115200;ttyPS0 115200;ttyPS1" |
47 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
48 | 32 | ||
49 | require conf/machine/include/soc-zynqmp.inc | 33 | require conf/machine/include/soc-zynqmp.inc |
50 | require conf/machine/include/machine-xilinx-default.inc | 34 | require conf/machine/include/machine-xilinx-default.inc |
51 | require conf/machine/include/machine-xilinx-qemu.inc | 35 | require conf/machine/include/machine-xilinx-qemu.inc |
52 | 36 | ||
53 | # zynqmp-generic.conf uses zcu102-zynqmp xsa as reference input. | ||
54 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
55 | # local.conf. | ||
56 | HDF_MACHINE = "zcu102-zynqmp" | ||
57 | |||
58 | # Machine features must result in a superset | 37 | # Machine features must result in a superset |
59 | # Basic features: | 38 | # Basic features: |
60 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" | 39 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" |
@@ -64,40 +43,28 @@ IMAGE_CLASSES += "image-types-xilinx-qemu" | |||
64 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 43 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
65 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" | 44 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" |
66 | 45 | ||
67 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
68 | |||
69 | EXTRA_IMAGEDEPENDS += " \ | 46 | EXTRA_IMAGEDEPENDS += " \ |
70 | libyaml-native \ | ||
71 | python3-cython-native \ | ||
72 | python3-pyyaml-native \ | ||
73 | virtual/fsbl \ | ||
74 | virtual/pmu-firmware \ | ||
75 | arm-trusted-firmware \ | ||
76 | virtual/boot-bin \ | ||
77 | virtual/bootloader \ | 47 | virtual/bootloader \ |
78 | qemu-devicetrees:do_deploy \ | ||
79 | u-boot-xlnx-uenv \ | 48 | u-boot-xlnx-uenv \ |
80 | u-boot-xlnx-scr \ | 49 | u-boot-xlnx-scr \ |
81 | " | 50 | " |
82 | 51 | ||
83 | IMAGE_BOOT_FILES += " \ | 52 | IMAGE_BOOT_FILES += " \ |
84 | boot.bin \ | ||
85 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
86 | boot.scr \ | 53 | boot.scr \ |
87 | Image \ | 54 | Image \ |
88 | " | 55 | " |
89 | 56 | ||
90 | # ZynqMP QEMU Configurations | 57 | # ZynqMP QEMU Configurations |
91 | # This machine has a QEMU model, runqemu setup: | 58 | # This machine has a QEMU model, runqemu setup: |
92 | QB_MEM = "-m 4096" | 59 | QB_MEM ?= "-m 4096" |
93 | # Iteration appears to be eth3, eth2, eth1, eth0 | 60 | # Iteration appears to be eth3, eth2, eth1, eth0 |
94 | QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" | 61 | QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" |
95 | 62 | ||
96 | # Set variables for QEMU DTB PATH, PS DTB and PMU DTB for zynqmp_generic, this | 63 | # Set variables for QEMU DTB PATH, PS DTB and PMU DTB for zynqmp_generic, this |
97 | # allows user to use different QEMU HW DTB to match their board. | 64 | # allows user to use different QEMU HW DTB to match their board. |
98 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 65 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
99 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/zcu102-arm.dtb" | 66 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/zcu102-arm.dtb" |
100 | QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb" | 67 | QEMU_HW_DTB_PMU ?= "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb" |
101 | 68 | ||
102 | # Two total serial ports defined in this model (according to the dts) | 69 | # Two total serial ports defined in this model (according to the dts) |
103 | # | 70 | # |
@@ -150,7 +117,7 @@ QB_PMU_OPT = " \ | |||
150 | -display none \ | 117 | -display none \ |
151 | -hw-dtb ${QEMU_HW_DTB_PMU} \ | 118 | -hw-dtb ${QEMU_HW_DTB_PMU} \ |
152 | -kernel ${PMU_ROM} \ | 119 | -kernel ${PMU_ROM} \ |
153 | -device loader,file=${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf \ | 120 | -device loader,file=${DEPLOY_DIR_IMAGE}/${PMU_FIRMWARE_IMAGE_NAME}.elf \ |
154 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ | 121 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ |
155 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ | 122 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ |
156 | " | 123 | " |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf b/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf new file mode 100644 index 00000000..7b5dc68c --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynqmp-mali-common | ||
3 | #@DESCRIPTION: Machine configuration for a common ZynqMP (MPSOC) filesystem devices w/ mali400 | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynqmp-mali-common:']['zynqmp-mali-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa53" | ||
10 | |||
11 | require conf/machine/zynqmp-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "mali400 vcu" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_mali_common']['zynqmp-mali-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend index 7dcee565..7959d9db 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend | |||
@@ -1,21 +1,21 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
2 | 2 | ||
3 | # openamp.dtsi is in the WORKDIR | 3 | # openamp.dtsi is in the UNPACKDIR |
4 | DT_INCLUDE:append = " ${WORKDIR}" | 4 | DT_INCLUDE:append = " ${UNPACKDIR}" |
5 | 5 | ||
6 | do_configure[vardeps] += "ENABLE_OPENAMP_DTSI OPENAMP_EXTRA_OVERLAYS" | 6 | do_configure[vardeps] += "ENABLE_OPENAMP_DTSI OPENAMP_EXTRA_DT_INCLUDE_FILES" |
7 | 7 | ||
8 | OPENAMP_EXTRA_OVERLAYS:zynq = "zynq-openamp.dtsi" | 8 | OPENAMP_EXTRA_DT_INCLUDE_FILES ?= "" |
9 | OPENAMP_EXTRA_OVERLAYS:zynqmp = "zynqmp-openamp.dtsi" | 9 | OPENAMP_EXTRA_DT_INCLUDE_FILES:zynqmp = "zynqmp-openamp.dtsi" |
10 | OPENAMP_EXTRA_OVERLAYS:versal = "versal-openamp.dtsi" | 10 | OPENAMP_EXTRA_DT_INCLUDE_FILES:versal = "versal-openamp.dtsi" |
11 | OPENAMP_EXTRA_OVERLAYS:versal-net = "versal-net-openamp.dtsi" | 11 | OPENAMP_EXTRA_DT_INCLUDE_FILES:versal-net = "versal-net-openamp.dtsi" |
12 | 12 | ||
13 | def set_openamp_extra_overlays(d): | 13 | def set_openamp_extra_dt_include_files(d): |
14 | distro_features = d.getVar('DISTRO_FEATURES', True) | 14 | distro_features = d.getVar('DISTRO_FEATURES', True) |
15 | enable_openamp_dtsi = d.getVar('ENABLE_OPENAMP_DTSI') | 15 | enable_openamp_dtsi = d.getVar('ENABLE_OPENAMP_DTSI') |
16 | if 'openamp' in distro_features and enable_openamp_dtsi == '1': | 16 | if 'openamp' in distro_features and enable_openamp_dtsi == '1': |
17 | return ' ${OPENAMP_EXTRA_OVERLAYS}' | 17 | return ' ${OPENAMP_EXTRA_DT_INCLUDE_FILES}' |
18 | else: | 18 | else: |
19 | return '' | 19 | return '' |
20 | 20 | ||
21 | EXTRA_OVERLAYS:append = "${@set_openamp_extra_overlays(d)}" | 21 | EXTRA_DT_INCLUDE_FILES:append = "${@set_openamp_extra_dt_include_files(d)}" |
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..a1c939eb 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 { |
@@ -35,7 +53,7 @@ | |||
35 | reg = <0x0 0xeba00000 0x0 0x10000>; | 53 | reg = <0x0 0xeba00000 0x0 0x10000>; |
36 | status = "okay"; | 54 | status = "okay"; |
37 | compatible = "mmio-sram"; | 55 | compatible = "mmio-sram"; |
38 | power-domain = <&versal_net_firmware 0x183180cb>; | 56 | power-domains = <&versal_net_firmware 0x183180cb>; |
39 | }; | 57 | }; |
40 | 58 | ||
41 | tcm_0b: tcm_0b@eba10000 { | 59 | tcm_0b: tcm_0b@eba10000 { |
@@ -43,7 +61,7 @@ | |||
43 | reg = <0x0 0xeba10000 0x0 0x8000>; | 61 | reg = <0x0 0xeba10000 0x0 0x8000>; |
44 | status = "okay"; | 62 | status = "okay"; |
45 | compatible = "mmio-sram"; | 63 | compatible = "mmio-sram"; |
46 | power-domain = <&versal_net_firmware 0x183180cc>; | 64 | power-domains = <&versal_net_firmware 0x183180cc>; |
47 | }; | 65 | }; |
48 | 66 | ||
49 | tcm_0c: tcm_0b@eba20000 { | 67 | tcm_0c: tcm_0b@eba20000 { |
@@ -51,7 +69,31 @@ | |||
51 | reg = <0x0 0xeba20000 0x0 0x8000>; | 69 | reg = <0x0 0xeba20000 0x0 0x8000>; |
52 | status = "okay"; | 70 | status = "okay"; |
53 | compatible = "mmio-sram"; | 71 | compatible = "mmio-sram"; |
54 | power-domain = <&versal_net_firmware 0x183180cd>; | 72 | power-domains = <&versal_net_firmware 0x183180cd>; |
73 | }; | ||
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-domains = <&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-domains = <&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-domains = <&versal_net_firmware 0x183180d0>; | ||
55 | }; | 97 | }; |
56 | 98 | ||
57 | r52ss { | 99 | r52ss { |
@@ -68,11 +110,22 @@ | |||
68 | ranges; | 110 | ranges; |
69 | sram = <&tcm_0a>, <&tcm_0b>, <&tcm_0c>; | 111 | sram = <&tcm_0a>, <&tcm_0b>, <&tcm_0c>; |
70 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 112 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
71 | power-domain = <&versal_net_firmware 0x181100BF>; | 113 | power-domains = <&versal_net_firmware 0x181100BF>; |
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-domains = <&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/versal-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi index 01e337c7..b21b4096 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi | |||
@@ -52,7 +52,7 @@ | |||
52 | reg = <0x0 0xffe00000 0x0 0x10000>; | 52 | reg = <0x0 0xffe00000 0x0 0x10000>; |
53 | status = "okay"; | 53 | status = "okay"; |
54 | compatible = "mmio-sram"; | 54 | compatible = "mmio-sram"; |
55 | power-domain = <&versal_firmware 0x1831800b>; | 55 | power-domains = <&versal_firmware 0x1831800b>; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | tcm_0b: tcm_0b@ffe20000 { | 58 | tcm_0b: tcm_0b@ffe20000 { |
@@ -60,7 +60,7 @@ | |||
60 | reg = <0x0 0xffe20000 0x0 0x10000>; | 60 | reg = <0x0 0xffe20000 0x0 0x10000>; |
61 | status = "okay"; | 61 | status = "okay"; |
62 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
63 | power-domain = <&versal_firmware 0x1831800c>; | 63 | power-domains = <&versal_firmware 0x1831800c>; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | tcm_1a: tcm_1a@ffe90000 { | 66 | tcm_1a: tcm_1a@ffe90000 { |
@@ -68,7 +68,7 @@ | |||
68 | reg = <0x0 0xffe90000 0x0 0x10000>; | 68 | reg = <0x0 0xffe90000 0x0 0x10000>; |
69 | status = "okay"; | 69 | status = "okay"; |
70 | compatible = "mmio-sram"; | 70 | compatible = "mmio-sram"; |
71 | power-domain = <&versal_firmware 0x1831800d>; | 71 | power-domains = <&versal_firmware 0x1831800d>; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | tcm_1b: tcm_1b@ffeb0000 { | 74 | tcm_1b: tcm_1b@ffeb0000 { |
@@ -76,7 +76,7 @@ | |||
76 | reg = <0x0 0xffeb0000 0x0 0x10000>; | 76 | reg = <0x0 0xffeb0000 0x0 0x10000>; |
77 | status = "okay"; | 77 | status = "okay"; |
78 | compatible = "mmio-sram"; | 78 | compatible = "mmio-sram"; |
79 | power-domain = <&versal_firmware 0x1831800e>; | 79 | power-domains = <&versal_firmware 0x1831800e>; |
80 | }; | 80 | }; |
81 | 81 | ||
82 | rf5ss@ff9a0000 { | 82 | rf5ss@ff9a0000 { |
@@ -94,7 +94,7 @@ | |||
94 | ranges; | 94 | ranges; |
95 | sram = <&tcm_0a>, <&tcm_0b>; | 95 | sram = <&tcm_0a>, <&tcm_0b>; |
96 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 96 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
97 | power-domain = <&versal_firmware 0x18110005>; | 97 | power-domains = <&versal_firmware 0x18110005>; |
98 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 98 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
99 | mbox-names = "tx", "rx"; | 99 | mbox-names = "tx", "rx"; |
100 | }; | 100 | }; |
@@ -105,7 +105,7 @@ | |||
105 | ranges; | 105 | ranges; |
106 | sram = <&tcm_1a>, <&tcm_1b>; | 106 | sram = <&tcm_1a>, <&tcm_1b>; |
107 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | 107 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; |
108 | power-domain = <&versal_firmware 0x18110006>; | 108 | power-domains = <&versal_firmware 0x18110006>; |
109 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | 109 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; |
110 | mbox-names = "tx", "rx"; | 110 | mbox-names = "tx", "rx"; |
111 | }; | 111 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts deleted file mode 100644 index b5d238ff..00000000 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-License-Identifier: MIT | ||
3 | * | ||
4 | * dts overlay file for Zynq OpenAMP | ||
5 | * | ||
6 | * Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /dts-v1/; | ||
11 | /plugin/; | ||
12 | |||
13 | #include "zynq-openamp.dtsi" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi deleted file mode 100644 index 0e822202..00000000 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-License-Identifier: MIT | ||
3 | * | ||
4 | * dts file for Zynq OpenAMP | ||
5 | * | ||
6 | * Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | &{/} { | ||
11 | reserved-memory { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <1>; | ||
14 | ranges; | ||
15 | vdev0vring0: vdev0vring0@3e800000 { | ||
16 | no-map; | ||
17 | compatible = "shared-dma-pool"; | ||
18 | reg = <0x3e800000 0x4000>; | ||
19 | }; | ||
20 | vdev0vring1: vdev0vring1@3e804000 { | ||
21 | no-map; | ||
22 | compatible = "shared-dma-pool"; | ||
23 | reg = <0x3e804000 0x4000>; | ||
24 | }; | ||
25 | vdev0buffer: vdev0buffer@3e808000 { | ||
26 | no-map; | ||
27 | compatible = "shared-dma-pool"; | ||
28 | reg = <0x3e808000 0x100000>; | ||
29 | }; | ||
30 | rproc_0_reserved: rproc@3e000000 { | ||
31 | no-map; | ||
32 | compatible = "shared-dma-pool"; | ||
33 | reg = <0x3e000000 0x800000>; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | remoteproc0: remoteproc@0 { | ||
38 | compatible = "xlnx,zynq_remoteproc"; | ||
39 | firmware = "firmware"; | ||
40 | memory-region = <&rproc_0_reserved>, <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>; | ||
41 | interrupt-parent = <&intc>; | ||
42 | }; | ||
43 | }; | ||
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..1ad51fef 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 { |
@@ -35,7 +52,7 @@ | |||
35 | reg = <0x0 0xffe00000 0x0 0x10000>; | 52 | reg = <0x0 0xffe00000 0x0 0x10000>; |
36 | status = "okay"; | 53 | status = "okay"; |
37 | compatible = "mmio-sram"; | 54 | compatible = "mmio-sram"; |
38 | power-domain = <&zynqmp_firmware 15>; | 55 | power-domains = <&zynqmp_firmware 15>; |
39 | }; | 56 | }; |
40 | 57 | ||
41 | tcm_0b: tcm_0b@ffe20000 { | 58 | tcm_0b: tcm_0b@ffe20000 { |
@@ -43,9 +60,23 @@ | |||
43 | reg = <0x0 0xffe20000 0x0 0x10000>; | 60 | reg = <0x0 0xffe20000 0x0 0x10000>; |
44 | status = "okay"; | 61 | status = "okay"; |
45 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
46 | power-domain = <&zynqmp_firmware 16>; | 63 | power-domains = <&zynqmp_firmware 16>; |
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-domains = <&zynqmp_firmware 17>; | ||
47 | }; | 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-domains = <&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>; |
@@ -61,10 +92,22 @@ | |||
61 | ranges; | 92 | ranges; |
62 | sram = <&tcm_0a>, <&tcm_0b>; | 93 | sram = <&tcm_0a>, <&tcm_0b>; |
63 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 94 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
64 | power-domain = <&zynqmp_firmware 7>; | 95 | power-domains = <&zynqmp_firmware 7>; |
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-domains = <&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-bsp/device-tree/open-amp-device-tree.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb index 9f481fec..92b0227b 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb | |||
@@ -5,8 +5,6 @@ LICENSE = "MIT" | |||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
6 | 6 | ||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | file://zynq-openamp.dtsi \ | ||
9 | file://zynq-openamp-overlay.dts \ | ||
10 | file://zynqmp-openamp.dtsi \ | 8 | file://zynqmp-openamp.dtsi \ |
11 | file://zynqmp-openamp-overlay.dts \ | 9 | file://zynqmp-openamp-overlay.dts \ |
12 | file://versal-openamp.dtsi \ | 10 | file://versal-openamp.dtsi \ |
@@ -18,7 +16,6 @@ SRC_URI = " \ | |||
18 | # We don't have anything to include from the kernel | 16 | # We don't have anything to include from the kernel |
19 | KERNEL_INCLUDE = "" | 17 | KERNEL_INCLUDE = "" |
20 | 18 | ||
21 | COMPATIBLE_MACHINE:zynq = "${MACHINE}" | ||
22 | COMPATIBLE_MACHINE:zynqmp = "${MACHINE}" | 19 | COMPATIBLE_MACHINE:zynqmp = "${MACHINE}" |
23 | COMPATIBLE_MACHINE:versal = "${MACHINE}" | 20 | COMPATIBLE_MACHINE:versal = "${MACHINE}" |
24 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" | 21 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" |
@@ -32,7 +29,7 @@ PROVIDES:remove = "virtual/dtb" | |||
32 | 29 | ||
33 | DEPENDS += "python3-dtc-native" | 30 | DEPENDS += "python3-dtc-native" |
34 | 31 | ||
35 | S = "${WORKDIR}/source" | 32 | S = "${UNPACKDIR}/source" |
36 | 33 | ||
37 | # Set a default so something resolves | 34 | # Set a default so something resolves |
38 | SOC_FAMILY ??= "SOC_FAMILY" | 35 | SOC_FAMILY ??= "SOC_FAMILY" |
@@ -40,12 +37,12 @@ SOC_FAMILY ??= "SOC_FAMILY" | |||
40 | do_configure:prepend() { | 37 | do_configure:prepend() { |
41 | mkdir -p source | 38 | mkdir -p source |
42 | 39 | ||
43 | if [ -e ${WORKDIR}/${MACHINE}-openamp-overlay.dts ]; then | 40 | if [ -e ${UNPACKDIR}/${MACHINE}-openamp-overlay.dts ]; then |
44 | install ${WORKDIR}/${MACHINE}-openamp.dtsi ${WORKDIR}/source/. || : | 41 | install ${UNPACKDIR}/${MACHINE}-openamp.dtsi ${UNPACKDIR}/source/. || : |
45 | install ${WORKDIR}/${MACHINE}-openamp-overlay.dts ${WORKDIR}/source/openamp.dts | 42 | install ${UNPACKDIR}/${MACHINE}-openamp-overlay.dts ${UNPACKDIR}/source/openamp.dts |
46 | elif [ -e ${WORKDIR}/${SOC_FAMILY}-openamp-overlay.dts ]; then | 43 | elif [ -e ${UNPACKDIR}/${SOC_FAMILY}-openamp-overlay.dts ]; then |
47 | install ${WORKDIR}/${SOC_FAMILY}-openamp.dtsi ${WORKDIR}/source/. || : | 44 | install ${UNPACKDIR}/${SOC_FAMILY}-openamp.dtsi ${UNPACKDIR}/source/. || : |
48 | install ${WORKDIR}/${SOC_FAMILY}-openamp-overlay.dts ${WORKDIR}/source/openamp.dts | 45 | install ${UNPACKDIR}/${SOC_FAMILY}-openamp-overlay.dts ${UNPACKDIR}/source/openamp.dts |
49 | else | 46 | else |
50 | bbfatal "${MACHINE}-openamp-overlay.dts or ${SOC_FAMILY}-openamp-overlay.dts file is not available. Cannot automatically add OpenAMP dtbo file." | 47 | bbfatal "${MACHINE}-openamp-overlay.dts or ${SOC_FAMILY}-openamp-overlay.dts file is not available. Cannot automatically add OpenAMP dtbo file." |
51 | fi | 48 | fi |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb new file mode 100644 index 00000000..13992ebc --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | DESCRIPTION = "OpenAMP supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
4 | |||
5 | # We don't support Zynq | ||
6 | COMPATIBLE_MACHINE:zynq = "$^" | ||
7 | |||
8 | inherit packagegroup features_check | ||
9 | |||
10 | REQUIRED_DISTRO_FEATURES = "openamp" | ||
11 | |||
12 | PACKAGES = "\ | ||
13 | packagegroup-openamp-echo-test \ | ||
14 | packagegroup-openamp-matrix-mul \ | ||
15 | packagegroup-openamp-rpc-demo \ | ||
16 | packagegroup-openamp \ | ||
17 | " | ||
18 | |||
19 | RDEPENDS:${PN}-echo-test = "rpmsg-echo-test" | ||
20 | RDEPENDS:${PN}-echo-test:append:zcu102-zynqmp = " openamp-fw-echo-testd" | ||
21 | |||
22 | RDEPENDS:${PN}-matrix-mul = "rpmsg-mat-mul" | ||
23 | RDEPENDS:${PN}-matrix-mul:append:zcu102-zynqmp = " openamp-fw-mat-muld" | ||
24 | |||
25 | RDEPENDS:${PN}-rpc-demo = "rpmsg-proxy-app" | ||
26 | RDEPENDS:${PN}-rpc-demo:append:zcu102-zynqmp = " openamp-fw-rpc-demo" | ||
27 | |||
28 | RDEPENDS:${PN}:append = " ${@'open-amp-device-tree' if d.getVar('ENABLE_OPENAMP_DTSI') != '1' else ''}" | ||
29 | |||
30 | RDEPENDS:${PN}:append = " \ | ||
31 | libmetal \ | ||
32 | libmetal-demos \ | ||
33 | open-amp \ | ||
34 | open-amp-demos \ | ||
35 | packagegroup-openamp-echo-test \ | ||
36 | packagegroup-openamp-matrix-mul \ | ||
37 | packagegroup-openamp-rpc-demo \ | ||
38 | " | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2023.2.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb index 5618ae88..9ca9cbc1 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2023.2.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb | |||
@@ -1,12 +1,13 @@ | |||
1 | SRCBRANCH ?= "2023.2" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "00fd771adc7adaed664ed6c5bc3d48d25856fe5c" | 2 | SRCREV = "9e9997221ddd335c31cf881edf7026c762024a58" |
3 | BRANCH = "xlnx_rel_v2023.2" | 3 | BRANCH = "xlnx_rel_v2024.1" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" |
5 | PV = "${SRCBRANCH}+git${SRCPV}" | 5 | PV .= "+git" |
6 | 6 | ||
7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" | 7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" |
8 | 8 | ||
9 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/libmetal/libmetal.inc | 9 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/libmetal/libmetal.inc |
10 | include ${LAYER_PATH_openamp-layer}/vendor/xilinx/recipes-openamp/libmetal/libmetal-xlnx.inc | ||
10 | 11 | ||
11 | RPROVIDES:${PN}-dbg += "libmetal-dbg" | 12 | RPROVIDES:${PN}-dbg += "libmetal-dbg" |
12 | RPROVIDES:${PN}-dev += "libmetal-dev" | 13 | RPROVIDES:${PN}-dev += "libmetal-dev" |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2023.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.2.bb index 30ca3501..bcde904d 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2023.1.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.2.bb | |||
@@ -1,12 +1,13 @@ | |||
1 | SRCBRANCH ?= "2023.1" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "be635252271de342014a146825870b64bd41d6eb" | 2 | SRCREV = "e2fdb4fecbebe41b4cd1c0b4fbfa3496bcded485" |
3 | BRANCH = "xlnx_rel_v2023.1" | 3 | BRANCH = "xlnx_rel_v2024.2" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" |
5 | PV = "${SRCBRANCH}+git${SRCPV}" | 5 | PV .= "+git" |
6 | 6 | ||
7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" | 7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" |
8 | 8 | ||
9 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/libmetal/libmetal.inc | 9 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/libmetal/libmetal.inc |
10 | include ${LAYER_PATH_openamp-layer}/vendor/xilinx/recipes-openamp/libmetal/libmetal-xlnx.inc | ||
10 | 11 | ||
11 | RPROVIDES:${PN}-dbg += "libmetal-dbg" | 12 | RPROVIDES:${PN}-dbg += "libmetal-dbg" |
12 | RPROVIDES:${PN}-dev += "libmetal-dev" | 13 | RPROVIDES:${PN}-dev += "libmetal-dev" |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend new file mode 100644 index 00000000..33cd55c1 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | # Prevents parse failrues on zynq | ||
2 | |||
3 | COMPATIBLE_MACHINE:zynq = "^$" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2023.2.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb index 8c6b4431..29d4bc4f 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2023.2.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SRCBRANCH ?= "2023.2" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "73a546f2b5faffe71680b1e5389f3328be60773f" | 2 | SRCREV = "699ad2c5b9236d61aae1b89e2857361db1bfeb95" |
3 | BRANCH = "xlnx_rel_v2023.2" | 3 | BRANCH = "xlnx_rel_v2024.1" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" |
5 | PV = "${SRCBRANCH}+git${SRCPV}" | 5 | PV .= "+git" |
6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" | 6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" |
7 | 7 | ||
8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc | 8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2023.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.2.bb index e295b869..06c2ecbc 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2023.1.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.2.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | SRCBRANCH ?= "2023.1" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "c8aaf2f26d5493f492f0af09dd558d45908636da" | 2 | SRCREV = "47caef116ccbf5d5a9778082a98fe8f3710b549c" |
3 | BRANCH = "xlnx_rel_v2023.1" | 3 | BRANCH = "xlnx_rel_v2024.2" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" |
5 | PV = "${SRCBRANCH}+git${SRCPV}" | 5 | PV .= "+git" |
6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" | 6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" |
7 | 7 | ||
8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc | 8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend new file mode 100644 index 00000000..a7ab6bb8 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For versal devices with the ai-engine | ||
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal libmetal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
9 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend new file mode 100644 index 00000000..a7ab6bb8 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For versal devices with the ai-engine | ||
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal libmetal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
9 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend new file mode 100644 index 00000000..0e7f3693 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For versal devices with the ai-engine | ||
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend deleted file mode 100644 index 2b96f152..00000000 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For vck190 kind of devices | ||
3 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
4 | EXTRA_OECMAKE:append:versal-ai-core = " -DXRT_AIE_BUILD=true" | ||
5 | TARGET_CXXFLAGS:append:versal-ai-core = " -DXRT_ENABLE_AIE" | ||
6 | DEPENDS:append:versal-ai-core = " libmetal libxaiengine aiefal" | ||
7 | RDEPENDS:${PN}:append:versal-ai-core = " libxaiengine aiefal" | ||
8 | |||
9 | # For vek280 kind of devices | ||
10 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
11 | EXTRA_OECMAKE:append:versal-ai-edge = " -DXRT_AIE_BUILD=true" | ||
12 | TARGET_CXXFLAGS:append:versal-ai-edge = " -DXRT_ENABLE_AIE" | ||
13 | DEPENDS:append:versal-ai-edge = " libmetal libxaiengine aiefal" | ||
14 | RDEPENDS:${PN}:append:versal-ai-edge = " libxaiengine aiefal" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend index 81aa8e9e..0c305c78 100644 --- a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/glmark2_%.bbappend | |||
@@ -9,11 +9,3 @@ SRC_URI:append = " \ | |||
9 | PACKAGECONFIG[fbdev-glesv2] = ",,virtual/libgles2 virtual/egl" | 9 | PACKAGECONFIG[fbdev-glesv2] = ",,virtual/libgles2 virtual/egl" |
10 | 10 | ||
11 | EXTRA_OECONF:append = "${@bb.utils.contains('DISTRO_FEATURES', 'fbdev', ' --with-flavors=fbdev-glesv2', '', d)}" | 11 | EXTRA_OECONF:append = "${@bb.utils.contains('DISTRO_FEATURES', 'fbdev', ' --with-flavors=fbdev-glesv2', '', d)}" |
12 | |||
13 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
14 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
15 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
16 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
17 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
18 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
19 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch new file mode 100644 index 00000000..3fa4d6ec --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch | |||
@@ -0,0 +1,1058 @@ | |||
1 | From 015f8a54f7e5a754e1cefba1aa7b1f6992a8aa9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Tue, 16 Jul 2024 19:48:47 +0000 | ||
4 | Subject: [PATCH] xf86-video-armosc: Accelerate picture composition | ||
5 | |||
6 | Introduce Repulsion - simplistic GPU accelerated compositor to back RandR | ||
7 | display manipulation features. This library is inspired by Glamor extension | ||
8 | https://www.freedesktop.org/wiki/Software/Glamor/. Unfortunately Glamor | ||
9 | doesn't work as is on ARM Mali-400 MP due to the lack of required features | ||
10 | and several bugs in Mali EGL/GLES implementation. | ||
11 | |||
12 | Install and manage picture compositor hooks. | ||
13 | |||
14 | Provide access to dma-buf fd from ARSOC buffer object. | ||
15 | |||
16 | Attach shadow buffer object to corresponding pixmap. | ||
17 | |||
18 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
19 | --- | ||
20 | src/Makefile.am | 3 +- | ||
21 | src/armsoc_driver.c | 145 ++++++++++ | ||
22 | src/armsoc_driver.h | 7 + | ||
23 | src/armsoc_dumb.c | 8 + | ||
24 | src/armsoc_dumb.h | 1 + | ||
25 | src/armsoc_exa.c | 18 +- | ||
26 | src/armsoc_repulsion.c | 624 +++++++++++++++++++++++++++++++++++++++++ | ||
27 | src/armsoc_repulsion.h | 67 +++++ | ||
28 | 8 files changed, 867 insertions(+), 6 deletions(-) | ||
29 | create mode 100644 src/armsoc_repulsion.c | ||
30 | create mode 100644 src/armsoc_repulsion.h | ||
31 | |||
32 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
33 | index db5f110..cd4f795 100644 | ||
34 | --- a/src/Makefile.am | ||
35 | +++ b/src/Makefile.am | ||
36 | @@ -38,7 +38,7 @@ ERROR_CFLAGS = -Werror -Wall -Wdeclaration-after-statement -Wvla \ | ||
37 | AM_CFLAGS = @XORG_CFLAGS@ $(ERROR_CFLAGS) | ||
38 | armsoc_drv_la_LTLIBRARIES = armsoc_drv.la | ||
39 | armsoc_drv_la_LDFLAGS = -module -avoid-version -no-undefined | ||
40 | -armsoc_drv_la_LIBADD = @XORG_LIBS@ | ||
41 | +armsoc_drv_la_LIBADD = -lMali @XORG_LIBS@ | ||
42 | armsoc_drv_ladir = @moduledir@/drivers | ||
43 | DRMMODE_SRCS = drmmode_exynos/drmmode_exynos.c \ | ||
44 | drmmode_pl111/drmmode_pl111.c \ | ||
45 | @@ -54,4 +54,5 @@ armsoc_drv_la_SOURCES = \ | ||
46 | armsoc_dri2.c \ | ||
47 | armsoc_driver.c \ | ||
48 | armsoc_dumb.c \ | ||
49 | + armsoc_repulsion.c \ | ||
50 | $(DRMMODE_SRCS) | ||
51 | diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c | ||
52 | index a4a1ba3..f5b8f21 100644 | ||
53 | --- a/src/armsoc_driver.c | ||
54 | +++ b/src/armsoc_driver.c | ||
55 | @@ -42,6 +42,7 @@ | ||
56 | #include <pixman.h> | ||
57 | |||
58 | #include "armsoc_driver.h" | ||
59 | +#include "armsoc_repulsion.h" | ||
60 | |||
61 | #include "micmap.h" | ||
62 | |||
63 | @@ -971,6 +972,138 @@ ARMSOCAccelInit(ScreenPtr pScreen) | ||
64 | pARMSOC->dri = FALSE; | ||
65 | } | ||
66 | |||
67 | +#define ARMSOC_ACCEL_MIN_DIMS 200 | ||
68 | + | ||
69 | +/** | ||
70 | + * Classify compositor input to figure out if we can accelerate composition | ||
71 | + */ | ||
72 | +static Bool | ||
73 | +ARMSOCCanAccelerateComposition(CARD8 op, | ||
74 | + PicturePtr src, | ||
75 | + PicturePtr mask, | ||
76 | + PicturePtr dest, | ||
77 | + CARD16 width, | ||
78 | + CARD16 height) | ||
79 | +{ | ||
80 | + /* We only support source to destination pixmap copy */ | ||
81 | + if (op != PictOpSrc) | ||
82 | + return FALSE; | ||
83 | + | ||
84 | + /* | ||
85 | + * Don't accelerate small picture compositions, e.g. toolbars, cursor, | ||
86 | + * icons, etc. | ||
87 | + */ | ||
88 | + if (width < ARMSOC_ACCEL_MIN_DIMS || height < ARMSOC_ACCEL_MIN_DIMS) | ||
89 | + return FALSE; | ||
90 | + | ||
91 | + /* Check source picture */ | ||
92 | + if (!src || !src->pDrawable) | ||
93 | + return FALSE; | ||
94 | + | ||
95 | + /* Check destination picture constraints */ | ||
96 | + if (!dest || !dest->pDrawable || dest->pDrawable->type != DRAWABLE_PIXMAP) | ||
97 | + return FALSE; | ||
98 | + | ||
99 | + /* We don't support masking */ | ||
100 | + if (mask) | ||
101 | + return FALSE; | ||
102 | + | ||
103 | + /* | ||
104 | + * We expect source transform to be assigned, otherwise there is not much | ||
105 | + * to accelerate | ||
106 | + */ | ||
107 | + if (!src->transform) | ||
108 | + return FALSE; | ||
109 | + | ||
110 | + /* We expect buffer object to be assigned to source */ | ||
111 | + if (!draw2pix(src->pDrawable)) | ||
112 | + return FALSE; | ||
113 | + | ||
114 | + /* We expect buffer object to be assigned to destination */ | ||
115 | + if (!draw2pix(dest->pDrawable)) | ||
116 | + return FALSE; | ||
117 | + | ||
118 | + return TRUE; | ||
119 | +} | ||
120 | + | ||
121 | +/** | ||
122 | + * This callback will be invoked every time xserver needs to combine 2 | ||
123 | + * pictures. Our special interest is the case when we need to blit draw buffer | ||
124 | + * into shadow buffer while performing rotation or reflection. Without | ||
125 | + * acceleration such composition will end up in tons of matrix multiplications | ||
126 | + * for every pixel, which is obviously very slow. Here we need to detect such | ||
127 | + * cases and accelerate the composition on the GPU. | ||
128 | + */ | ||
129 | +static void | ||
130 | +ARMSOCComposite(CARD8 op, | ||
131 | + PicturePtr src, | ||
132 | + PicturePtr mask, | ||
133 | + PicturePtr dest, | ||
134 | + INT16 x_src, | ||
135 | + INT16 y_src, | ||
136 | + INT16 x_mask, | ||
137 | + INT16 y_mask, | ||
138 | + INT16 x_dest, | ||
139 | + INT16 y_dest, | ||
140 | + CARD16 width, | ||
141 | + CARD16 height) | ||
142 | +{ | ||
143 | + ScreenPtr pScreen = dest->pDrawable->pScreen; | ||
144 | + PictureScreenPtr ps = GetPictureScreen(pScreen); | ||
145 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
146 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
147 | + struct armsoc_bo *src_bo = NULL, *dest_bo = NULL; | ||
148 | + float xform_matrix[3][3] = {}; | ||
149 | + | ||
150 | + Bool can_accelerate = | ||
151 | + ARMSOCCanAccelerateComposition(op, src, mask, dest, width, height); | ||
152 | + | ||
153 | + | ||
154 | + if (can_accelerate) { | ||
155 | + /* Transpose, scale & adjust transformation matrix */ | ||
156 | + int x, y; | ||
157 | + for (y = 0; y < 3; ++y) | ||
158 | + for (x = 0; x < 3; ++x) | ||
159 | + xform_matrix[x][y] = | ||
160 | + (float)src->transform->matrix[y][x] / 65536.f; | ||
161 | + /* | ||
162 | + * TODO: Figure out coordinate system where these sins make sence, | ||
163 | + * insted of just reversing them | ||
164 | + */ | ||
165 | + xform_matrix[0][1] = -xform_matrix[0][1]; | ||
166 | + xform_matrix[1][0] = -xform_matrix[1][0]; | ||
167 | + } | ||
168 | + | ||
169 | + /* Extract source buffer object */ | ||
170 | + if (can_accelerate) { | ||
171 | + PixmapPtr pm = draw2pix(src->pDrawable); | ||
172 | + src_bo = ARMSOCPixmapBo(pm); | ||
173 | + } | ||
174 | + | ||
175 | + /* Extract destination buffer object */ | ||
176 | + if (can_accelerate) { | ||
177 | + PixmapPtr pm = draw2pix(dest->pDrawable); | ||
178 | + dest_bo = ARMSOCPixmapBo(pm); | ||
179 | + } | ||
180 | + | ||
181 | + if (can_accelerate && | ||
182 | + armsoc_repulsion_composite(pARMSOC->repulsion, | ||
183 | + src_bo, | ||
184 | + dest_bo, | ||
185 | + xform_matrix)) { | ||
186 | + } else { | ||
187 | + /* Fallback to saved compositor if accelerated composition fails */ | ||
188 | + pARMSOC->composite_proc(op, src, mask, dest, | ||
189 | + x_src, y_src, x_mask, y_mask, | ||
190 | + x_dest, y_dest, width, height); | ||
191 | + } | ||
192 | + | ||
193 | + if (ps->Composite != ARMSOCComposite) { | ||
194 | + pARMSOC->composite_proc = ps->Composite; | ||
195 | + ps->Composite = ARMSOCComposite; | ||
196 | + } | ||
197 | +} | ||
198 | + | ||
199 | /** | ||
200 | * The driver's ScreenInit() function, called at the start of each server | ||
201 | * generation. Fill in pScreen, map the frame buffer, save state, | ||
202 | @@ -986,6 +1119,7 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
203 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
204 | VisualPtr visual; | ||
205 | xf86CrtcConfigPtr xf86_config; | ||
206 | + PictureScreenPtr ps; | ||
207 | int j; | ||
208 | const char *fbdev; | ||
209 | int depth; | ||
210 | @@ -1174,6 +1308,13 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
211 | pARMSOC->lockFD = -1; | ||
212 | } | ||
213 | |||
214 | + pARMSOC->repulsion = armsoc_repulsion_init(); | ||
215 | + | ||
216 | + ps = GetPictureScreen(pScreen); | ||
217 | + pARMSOC->composite_proc = ps->Composite; | ||
218 | + | ||
219 | + ps->Composite = ARMSOCComposite; | ||
220 | + | ||
221 | TRACE_EXIT(); | ||
222 | return TRUE; | ||
223 | |||
224 | @@ -1250,6 +1391,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL) | ||
225 | |||
226 | TRACE_ENTER(); | ||
227 | |||
228 | + armsoc_repulsion_release(pARMSOC->repulsion); | ||
229 | + | ||
230 | drmmode_screen_fini(pScrn); | ||
231 | drmmode_cursor_fini(pScreen); | ||
232 | |||
233 | @@ -1294,6 +1437,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL) | ||
234 | pARMSOC->lockFD = -1; | ||
235 | } | ||
236 | |||
237 | + armsoc_repulsion_release(pARMSOC->repulsion); | ||
238 | + | ||
239 | TRACE_EXIT(); | ||
240 | |||
241 | return ret; | ||
242 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
243 | index eae76ca..20b0f80 100644 | ||
244 | --- a/src/armsoc_driver.h | ||
245 | +++ b/src/armsoc_driver.h | ||
246 | @@ -38,6 +38,7 @@ | ||
247 | #include "xf86drm.h" | ||
248 | #include <errno.h> | ||
249 | #include "armsoc_exa.h" | ||
250 | +#include "armsoc_repulsion.h" | ||
251 | |||
252 | /* Apparently not used by X server */ | ||
253 | #define ARMSOC_VERSION 1000 | ||
254 | @@ -183,6 +184,12 @@ struct ARMSOCRec { | ||
255 | /* Size of the swap chain. Set to 1 if DRI2SwapLimit unsupported, | ||
256 | * driNumBufs if early display enabled, otherwise driNumBufs-1 */ | ||
257 | unsigned int swap_chain_size; | ||
258 | + | ||
259 | + /* GPU accelerated picture compositor, AKA Repulsion */ | ||
260 | + struct ARMSOCRepulsion *repulsion; | ||
261 | + | ||
262 | + /* SW (pixman based) picture compositor fallback */ | ||
263 | + CompositeProcPtr composite_proc; | ||
264 | }; | ||
265 | |||
266 | /* | ||
267 | diff --git a/src/armsoc_dumb.c b/src/armsoc_dumb.c | ||
268 | index 7e6dbd9..3c16ed2 100644 | ||
269 | --- a/src/armsoc_dumb.c | ||
270 | +++ b/src/armsoc_dumb.c | ||
271 | @@ -130,6 +130,14 @@ int armsoc_bo_has_dmabuf(struct armsoc_bo *bo) | ||
272 | return bo->dmabuf >= 0; | ||
273 | } | ||
274 | |||
275 | +int armsoc_bo_get_dmabuf(struct armsoc_bo *bo) | ||
276 | +{ | ||
277 | + if (!armsoc_bo_has_dmabuf(bo)) | ||
278 | + armsoc_bo_set_dmabuf(bo); | ||
279 | + | ||
280 | + return bo->dmabuf; | ||
281 | +} | ||
282 | + | ||
283 | struct armsoc_bo *armsoc_bo_new_with_dim(struct armsoc_device *dev, | ||
284 | uint32_t width, uint32_t height, uint8_t depth, | ||
285 | uint8_t bpp, enum armsoc_buf_type buf_type) | ||
286 | diff --git a/src/armsoc_dumb.h b/src/armsoc_dumb.h | ||
287 | index a299ccf..3b687c7 100644 | ||
288 | --- a/src/armsoc_dumb.h | ||
289 | +++ b/src/armsoc_dumb.h | ||
290 | @@ -89,6 +89,7 @@ void armsoc_bo_unreference(struct armsoc_bo *bo); | ||
291 | int armsoc_bo_set_dmabuf(struct armsoc_bo *bo); | ||
292 | void armsoc_bo_clear_dmabuf(struct armsoc_bo *bo); | ||
293 | int armsoc_bo_has_dmabuf(struct armsoc_bo *bo); | ||
294 | +int armsoc_bo_get_dmabuf(struct armsoc_bo *bo); | ||
295 | int armsoc_bo_clear(struct armsoc_bo *bo); | ||
296 | int armsoc_bo_rm_fb(struct armsoc_bo *bo); | ||
297 | int armsoc_bo_resize(struct armsoc_bo *bo, uint32_t new_width, | ||
298 | diff --git a/src/armsoc_exa.c b/src/armsoc_exa.c | ||
299 | index a310727..7edf0ac 100644 | ||
300 | --- a/src/armsoc_exa.c | ||
301 | +++ b/src/armsoc_exa.c | ||
302 | @@ -161,10 +161,16 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
303 | ScrnInfoPtr pScrn = pix2scrn(pPixmap); | ||
304 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
305 | enum armsoc_buf_type buf_type = ARMSOC_BO_NON_SCANOUT; | ||
306 | + struct armsoc_bo *fb_bo = NULL; | ||
307 | |||
308 | /* Only modify specified fields, keeping all others intact. */ | ||
309 | - if (pPixData) | ||
310 | + if (pPixData) { | ||
311 | pPixmap->devPrivate.ptr = pPixData; | ||
312 | + if (pARMSOC->shadow && pPixData == armsoc_bo_map(pARMSOC->shadow)) | ||
313 | + fb_bo = pARMSOC->shadow; | ||
314 | + else if (pPixData == armsoc_bo_map(pARMSOC->scanout)) | ||
315 | + fb_bo = pARMSOC->scanout; | ||
316 | + } | ||
317 | |||
318 | if (devKind > 0) | ||
319 | pPixmap->devKind = devKind; | ||
320 | @@ -173,7 +179,7 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
321 | * We can't accelerate this pixmap, and don't ever want to | ||
322 | * see it again.. | ||
323 | */ | ||
324 | - if (pPixData && pPixData != armsoc_bo_map(pARMSOC->scanout)) { | ||
325 | + if (pPixData && fb_bo && pPixData != armsoc_bo_map(fb_bo)) { | ||
326 | /* scratch-pixmap (see GetScratchPixmapHeader()) gets recycled, | ||
327 | * so could have a previous bo! | ||
328 | * Pixmap drops ref on its old bo */ | ||
329 | @@ -185,10 +191,10 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
330 | } | ||
331 | |||
332 | /* Replacing the pixmap's current bo with the scanout bo */ | ||
333 | - if (pPixData == armsoc_bo_map(pARMSOC->scanout) && priv->bo != pARMSOC->scanout) { | ||
334 | + if (fb_bo && pPixData == armsoc_bo_map(fb_bo) && priv->bo != fb_bo) { | ||
335 | struct armsoc_bo *old_bo = priv->bo; | ||
336 | |||
337 | - priv->bo = pARMSOC->scanout; | ||
338 | + priv->bo = fb_bo; | ||
339 | /* pixmap takes a ref on its new bo */ | ||
340 | armsoc_bo_reference(priv->bo); | ||
341 | |||
342 | @@ -225,7 +231,9 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
343 | if (!pPixmap->drawable.width || !pPixmap->drawable.height) | ||
344 | return TRUE; | ||
345 | |||
346 | - assert(priv->bo); | ||
347 | + if(!priv->bo) | ||
348 | + return FALSE; | ||
349 | + | ||
350 | if (armsoc_bo_width(priv->bo) != pPixmap->drawable.width || | ||
351 | armsoc_bo_height(priv->bo) != pPixmap->drawable.height || | ||
352 | armsoc_bo_bpp(priv->bo) != pPixmap->drawable.bitsPerPixel) { | ||
353 | diff --git a/src/armsoc_repulsion.c b/src/armsoc_repulsion.c | ||
354 | new file mode 100644 | ||
355 | index 0000000..1a7c0cd | ||
356 | --- /dev/null | ||
357 | +++ b/src/armsoc_repulsion.c | ||
358 | @@ -0,0 +1,624 @@ | ||
359 | +/* | ||
360 | + * Copyright (C) 2024 AMD, Inc. | ||
361 | + * | ||
362 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
363 | + * copy of this software and associated documentation files (the "Software"), | ||
364 | + * to deal in the Software without restriction, including without limitation | ||
365 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
366 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
367 | + * Software is furnished to do so, subject to the following conditions: | ||
368 | + * | ||
369 | + * The above copyright notice and this permission notice (including the next | ||
370 | + * paragraph) shall be included in all copies or substantial portions of the | ||
371 | + * Software. | ||
372 | + * | ||
373 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
374 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
375 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
376 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
377 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
378 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
379 | + * SOFTWARE. | ||
380 | + * | ||
381 | + * Author: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
382 | + * | ||
383 | + */ | ||
384 | + | ||
385 | +#include "armsoc_repulsion.h" | ||
386 | + | ||
387 | +#include <stdlib.h> | ||
388 | +#include <drm_fourcc.h> | ||
389 | + | ||
390 | +#define EGL_GL_PROTOTYPES 1 | ||
391 | +#include <EGL/egl.h> | ||
392 | +#define EGL_EGLEXT_PROTOTYPES 1 | ||
393 | +#include <EGL/eglext.h> | ||
394 | +#include <GLES2/gl2.h> | ||
395 | +#define GL_GLEXT_PROTOTYPES 1 | ||
396 | +#include <GLES2/gl2ext.h> | ||
397 | + | ||
398 | +#include <xf86.h> | ||
399 | + | ||
400 | +/* ----------------------------------------------------------------------------- | ||
401 | + * Utilities | ||
402 | + */ | ||
403 | + | ||
404 | +#define INFO_LOG(fmt, ...) \ | ||
405 | +do { xf86DrvMsg(0, X_INFO, fmt "\n", ##__VA_ARGS__); } while (0) | ||
406 | + | ||
407 | +#define WARN_LOG(fmt, ...) \ | ||
408 | +do { xf86DrvMsg(0, X_WARNING, "WARNING: " fmt "\n", ##__VA_ARGS__); } while (0) | ||
409 | + | ||
410 | +#define ERROR_LOG(fmt, ...) \ | ||
411 | +do { xf86DrvMsg(0, X_ERROR, "ERROR: " fmt "\n", ##__VA_ARGS__); } while (0) | ||
412 | + | ||
413 | +/** | ||
414 | + * struct RepulsiveVertex - vertex data used for rendering | ||
415 | + * @pos: vertex position in the screen coordinate space | ||
416 | + * @uv: texture coordinate bound to this vertex | ||
417 | + */ | ||
418 | +struct RepulsiveVertex { | ||
419 | + GLfloat pos[3]; | ||
420 | + GLfloat uv[2]; | ||
421 | +}; | ||
422 | + | ||
423 | +/** | ||
424 | + * struct ARMSOCRepulsion - GPU acceleration data | ||
425 | + * @egl: EGL specific bits | ||
426 | + * @egl.display: EGL display connection | ||
427 | + * @egl.context: EGL context | ||
428 | + * @egl.surface: primary EGL surface | ||
429 | + * @gles: OpenGL ES related bits | ||
430 | + * @gles.vbo: Vertex buffer object | ||
431 | + * @gles.ibo: Index buffer object | ||
432 | + * @gles.texture: External texture object | ||
433 | + * @gles.proj_location: Shader location for projection matrix | ||
434 | + * @gles.xform_location: Shader location for transformation matrix | ||
435 | + * @gles.vertices: Array of vertices used in rendering | ||
436 | + */ | ||
437 | +struct ARMSOCRepulsion { | ||
438 | + struct { | ||
439 | + EGLDisplay display; | ||
440 | + EGLContext context; | ||
441 | + EGLSurface surface; | ||
442 | + } egl; | ||
443 | + struct { | ||
444 | + GLuint vbo; | ||
445 | + GLuint ibo; | ||
446 | + GLuint texture; | ||
447 | + GLuint program; | ||
448 | + GLint proj_location; | ||
449 | + GLint xform_location; | ||
450 | + struct RepulsiveVertex vertices[4]; | ||
451 | + } gles; | ||
452 | +}; | ||
453 | + | ||
454 | +/* ----------------------------------------------------------------------------- | ||
455 | + * GLES2 Functions | ||
456 | + */ | ||
457 | + | ||
458 | +static const char *vertex_shader = " \ | ||
459 | +precision highp float; \ | ||
460 | + \ | ||
461 | +uniform mat3 u_projection; \ | ||
462 | +uniform mat3 u_transform; \ | ||
463 | +attribute vec3 a_position; \ | ||
464 | +attribute vec2 a_texcoord; \ | ||
465 | + \ | ||
466 | +varying vec2 v_texcoord; \ | ||
467 | + \ | ||
468 | +void main() \ | ||
469 | +{ \ | ||
470 | + gl_Position.xyz = u_transform * u_projection * a_position; \ | ||
471 | + gl_Position.w = 1.0; \ | ||
472 | + v_texcoord = a_texcoord; \ | ||
473 | +} \ | ||
474 | +"; | ||
475 | + | ||
476 | +static const char *fragment_shader = " \ | ||
477 | +#extension GL_OES_EGL_image_external : require\n \ | ||
478 | +precision highp float; \ | ||
479 | + \ | ||
480 | +uniform samplerExternalOES texture; \ | ||
481 | +varying vec2 v_texcoord; \ | ||
482 | + \ | ||
483 | +void main() \ | ||
484 | +{ \ | ||
485 | + gl_FragColor = texture2D(texture, v_texcoord); \ | ||
486 | +} \ | ||
487 | +"; | ||
488 | + | ||
489 | +#define SHADER_POSITION_ATTR_SLOT 0 | ||
490 | +#define SHADER_TEX_COOR_ATTR_SLOT 1 | ||
491 | + | ||
492 | +static void armsoc_repulsion_gles_log(GLenum source, GLenum type, GLuint id, | ||
493 | + GLenum severity, GLsizei length, | ||
494 | + const GLchar *message, const void *data) | ||
495 | +{ | ||
496 | + switch (severity) { | ||
497 | + case GL_DEBUG_SEVERITY_HIGH_KHR: | ||
498 | + ERROR_LOG("GLES2: %s", message); | ||
499 | + break; | ||
500 | + case GL_DEBUG_SEVERITY_MEDIUM_KHR: | ||
501 | + WARN_LOG("GLES2: %s", message); | ||
502 | + break; | ||
503 | + default: | ||
504 | + INFO_LOG("GLES2: %s", message); | ||
505 | + }; | ||
506 | +} | ||
507 | + | ||
508 | +static const char* gles_error_str(GLenum err) | ||
509 | +{ | ||
510 | + switch (err) { | ||
511 | + case GL_NO_ERROR: return "no error"; | ||
512 | + case GL_INVALID_ENUM: return "invalid enum"; | ||
513 | + case GL_INVALID_VALUE: return "invalid value"; | ||
514 | + case GL_INVALID_OPERATION: return "invalid operation"; | ||
515 | + case GL_OUT_OF_MEMORY: return "out of memory"; | ||
516 | + case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid fb operation"; | ||
517 | + default: return "unknowm error"; | ||
518 | + } | ||
519 | +}; | ||
520 | + | ||
521 | +static int armsoc_repulsion_compile_shader(struct ARMSOCRepulsion *repulsion) | ||
522 | +{ | ||
523 | + GLuint vs, fs; | ||
524 | + GLint status, texture; | ||
525 | + GLenum err; | ||
526 | + | ||
527 | + vs = glCreateShader(GL_VERTEX_SHADER); | ||
528 | + if (!vs) { | ||
529 | + err = glGetError(); | ||
530 | + return err == GL_NO_ERROR ? -1 : err; | ||
531 | + } | ||
532 | + glShaderSource(vs, 1, &vertex_shader, NULL); | ||
533 | + glCompileShader(vs); | ||
534 | + glGetShaderiv(vs, GL_COMPILE_STATUS, &status); | ||
535 | + if (status == GL_FALSE) { | ||
536 | + GLint max_len = 1024; | ||
537 | + GLchar err_log[1024]; | ||
538 | + glGetShaderInfoLog(vs, max_len, &max_len, &err_log[0]); | ||
539 | + ERROR_LOG("VS: %s", err_log); | ||
540 | + err = glGetError(); | ||
541 | + return err == GL_NO_ERROR ? -1 : err; | ||
542 | + } | ||
543 | + | ||
544 | + fs = glCreateShader(GL_FRAGMENT_SHADER); | ||
545 | + if (!fs) { | ||
546 | + err = glGetError(); | ||
547 | + return err == GL_NO_ERROR ? -1 : err; | ||
548 | + } | ||
549 | + glShaderSource(fs, 1, &fragment_shader, NULL); | ||
550 | + glCompileShader(fs); | ||
551 | + glGetShaderiv(fs, GL_COMPILE_STATUS, &status); | ||
552 | + if (status == GL_FALSE) { | ||
553 | + err = glGetError(); | ||
554 | + return err == GL_NO_ERROR ? -1 : err; | ||
555 | + } | ||
556 | + | ||
557 | + repulsion->gles.program = glCreateProgram(); | ||
558 | + if (!repulsion->gles.program) { | ||
559 | + err = glGetError(); | ||
560 | + return err == GL_NO_ERROR ? -1 : err; | ||
561 | + } | ||
562 | + glAttachShader(repulsion->gles.program, vs); | ||
563 | + glAttachShader(repulsion->gles.program, fs); | ||
564 | + glBindAttribLocation(repulsion->gles.program, SHADER_POSITION_ATTR_SLOT, | ||
565 | + "a_position"); | ||
566 | + glBindAttribLocation(repulsion->gles.program, SHADER_TEX_COOR_ATTR_SLOT, | ||
567 | + "a_texcoord"); | ||
568 | + glLinkProgram(repulsion->gles.program); | ||
569 | + glDetachShader(repulsion->gles.program, vs); | ||
570 | + glDetachShader(repulsion->gles.program, fs); | ||
571 | + glGetProgramiv(repulsion->gles.program, GL_LINK_STATUS, &status); | ||
572 | + if (status == GL_FALSE) { | ||
573 | + err = glGetError(); | ||
574 | + return err == GL_NO_ERROR ? -1 : err; | ||
575 | + } | ||
576 | + glUseProgram(repulsion->gles.program); | ||
577 | + glEnableVertexAttribArray(SHADER_POSITION_ATTR_SLOT); | ||
578 | + glEnableVertexAttribArray(SHADER_TEX_COOR_ATTR_SLOT); | ||
579 | + | ||
580 | + repulsion->gles.proj_location = | ||
581 | + glGetUniformLocation(repulsion->gles.program, "u_projection"); | ||
582 | + repulsion->gles.xform_location = | ||
583 | + glGetUniformLocation(repulsion->gles.program, "u_transform"); | ||
584 | + | ||
585 | + texture = glGetUniformLocation(repulsion->gles.program, "texture"); | ||
586 | + glUniform1i(texture, 0); | ||
587 | + glActiveTexture(GL_TEXTURE0); | ||
588 | + | ||
589 | + return GL_NO_ERROR; | ||
590 | +} | ||
591 | + | ||
592 | +static int armsoc_repulsion_create_vbo(struct ARMSOCRepulsion *repulsion) | ||
593 | +{ | ||
594 | + glGenBuffers(1, &repulsion->gles.vbo); | ||
595 | + glBindBuffer(GL_ARRAY_BUFFER, repulsion->gles.vbo); | ||
596 | + | ||
597 | + return GL_NO_ERROR; | ||
598 | +} | ||
599 | + | ||
600 | +static int armsoc_repulsion_create_ibo(struct ARMSOCRepulsion *repulsion) | ||
601 | +{ | ||
602 | + static const GLushort indices[] = {0, 1, 2, 0, 2, 3}; | ||
603 | + | ||
604 | + glGenBuffers(1, &repulsion->gles.ibo); | ||
605 | + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, repulsion->gles.ibo); | ||
606 | + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, | ||
607 | + GL_STATIC_DRAW); | ||
608 | + | ||
609 | + return GL_NO_ERROR; | ||
610 | +} | ||
611 | + | ||
612 | +static int armsoc_repulsion_create_texture(struct ARMSOCRepulsion *repulsion) | ||
613 | +{ | ||
614 | + glGenTextures(1, &repulsion->gles.texture); | ||
615 | + glBindTexture(GL_TEXTURE_EXTERNAL_OES, repulsion->gles.texture); | ||
616 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | ||
617 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | ||
618 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, | ||
619 | + GL_CLAMP_TO_EDGE); | ||
620 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, | ||
621 | + GL_CLAMP_TO_EDGE); | ||
622 | + | ||
623 | + return GL_NO_ERROR; | ||
624 | +} | ||
625 | + | ||
626 | +static int armsoc_repulsion_init_gles(struct ARMSOCRepulsion *repulsion) | ||
627 | +{ | ||
628 | + int rc; | ||
629 | + | ||
630 | + glEnable(GL_DEBUG_OUTPUT_KHR); | ||
631 | + glDebugMessageCallbackKHR(armsoc_repulsion_gles_log, repulsion); | ||
632 | + | ||
633 | + rc = armsoc_repulsion_compile_shader(repulsion); | ||
634 | + if (rc != GL_NO_ERROR) { | ||
635 | + ERROR_LOG("Failed to compile shader: 0x%04x (%s)", | ||
636 | + rc, gles_error_str(rc)); | ||
637 | + return rc; | ||
638 | + } | ||
639 | + | ||
640 | + rc = armsoc_repulsion_create_vbo(repulsion); | ||
641 | + if (rc != GL_NO_ERROR) { | ||
642 | + ERROR_LOG("Failed to create vertex buffer: 0x%04x (%s)", | ||
643 | + rc, gles_error_str(rc)); | ||
644 | + return rc; | ||
645 | + } | ||
646 | + | ||
647 | + rc = armsoc_repulsion_create_ibo(repulsion); | ||
648 | + if (rc != GL_NO_ERROR) { | ||
649 | + ERROR_LOG("Failed to create index buffer: 0x%04x (%s)", | ||
650 | + rc, gles_error_str(rc)); | ||
651 | + return rc; | ||
652 | + } | ||
653 | + | ||
654 | + rc = armsoc_repulsion_create_texture(repulsion); | ||
655 | + if (rc != GL_NO_ERROR) { | ||
656 | + ERROR_LOG("Failed to create texture: 0x%04x (%s)", | ||
657 | + rc, gles_error_str(rc)); | ||
658 | + return rc; | ||
659 | + } | ||
660 | + | ||
661 | + return GL_NO_ERROR; | ||
662 | +} | ||
663 | + | ||
664 | +static void armsoc_repulsion_release_texture(struct ARMSOCRepulsion *repulsion) | ||
665 | +{ | ||
666 | + glDeleteTextures(1, &repulsion->gles.texture); | ||
667 | +} | ||
668 | + | ||
669 | +static void armsoc_repulsion_release_ibo(struct ARMSOCRepulsion *repulsion) | ||
670 | +{ | ||
671 | + glDeleteBuffers(1, &repulsion->gles.ibo); | ||
672 | +} | ||
673 | + | ||
674 | +static void armsoc_repulsion_release_vbo(struct ARMSOCRepulsion *repulsion) | ||
675 | +{ | ||
676 | + glDeleteBuffers(1, &repulsion->gles.vbo); | ||
677 | +} | ||
678 | + | ||
679 | +static void armsoc_repulsion_release_shader(struct ARMSOCRepulsion *repulsion) | ||
680 | +{ | ||
681 | + glDeleteProgram(repulsion->gles.program); | ||
682 | +} | ||
683 | + | ||
684 | +static void armsoc_repulsion_release_gles(struct ARMSOCRepulsion *repulsion) | ||
685 | +{ | ||
686 | + armsoc_repulsion_release_texture(repulsion); | ||
687 | + armsoc_repulsion_release_ibo(repulsion); | ||
688 | + armsoc_repulsion_release_vbo(repulsion); | ||
689 | + armsoc_repulsion_release_shader(repulsion); | ||
690 | +} | ||
691 | + | ||
692 | +/* ----------------------------------------------------------------------------- | ||
693 | + * EGL Functions | ||
694 | + */ | ||
695 | + | ||
696 | +static const char* egl_error_str(EGLint err) | ||
697 | +{ | ||
698 | + switch (err) { | ||
699 | + case EGL_SUCCESS: return "no error"; | ||
700 | + case EGL_NOT_INITIALIZED: return "not initialized"; | ||
701 | + case EGL_BAD_ACCESS: return "bad access"; | ||
702 | + case EGL_BAD_ALLOC: return "bad alloc"; | ||
703 | + case EGL_BAD_CONFIG: return "bad config"; | ||
704 | + case EGL_BAD_CONTEXT: return "bad context"; | ||
705 | + case EGL_BAD_CURRENT_SURFACE: return "bad current surface"; | ||
706 | + case EGL_BAD_DISPLAY: return "bad display"; | ||
707 | + case EGL_BAD_MATCH: return "bad match"; | ||
708 | + case EGL_BAD_NATIVE_PIXMAP: return "bad native pixmap"; | ||
709 | + case EGL_BAD_NATIVE_WINDOW: return "bad native window"; | ||
710 | + case EGL_BAD_PARAMETER: return "bad parameter"; | ||
711 | + case EGL_BAD_SURFACE: return "bad surface"; | ||
712 | + case EGL_CONTEXT_LOST: return "context lost"; | ||
713 | + default: return "unknowm error"; | ||
714 | + } | ||
715 | +}; | ||
716 | + | ||
717 | +static int armsoc_repulsion_init_egl(struct ARMSOCRepulsion *repulsion) | ||
718 | +{ | ||
719 | + static const EGLint config_attrs[] = { | ||
720 | + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | ||
721 | + EGL_CONFORMANT, EGL_OPENGL_ES2_BIT, | ||
722 | + EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, | ||
723 | + EGL_DEPTH_SIZE, 8, | ||
724 | + EGL_RED_SIZE, 8, | ||
725 | + EGL_GREEN_SIZE, 8, | ||
726 | + EGL_BLUE_SIZE, 8, | ||
727 | + EGL_ALPHA_SIZE, 8, | ||
728 | + EGL_NONE | ||
729 | + }; | ||
730 | + static const EGLint context_attrs[] = { | ||
731 | + EGL_CONTEXT_CLIENT_VERSION, 2, | ||
732 | + EGL_NONE | ||
733 | + }; | ||
734 | + EGLint count; | ||
735 | + EGLConfig config; | ||
736 | + | ||
737 | + repulsion->egl.display = eglGetDisplay(EGL_DEFAULT_DISPLAY); | ||
738 | + if (repulsion->egl.display == EGL_NO_DISPLAY) | ||
739 | + return eglGetError(); | ||
740 | + | ||
741 | + if(!eglInitialize(repulsion->egl.display, NULL, NULL)) | ||
742 | + return eglGetError(); | ||
743 | + | ||
744 | + if (!eglChooseConfig(repulsion->egl.display, config_attrs, &config, 1, | ||
745 | + &count)) | ||
746 | + return eglGetError(); | ||
747 | + | ||
748 | + if (!eglBindAPI(EGL_OPENGL_ES_API)) | ||
749 | + return eglGetError(); | ||
750 | + | ||
751 | + repulsion->egl.context = eglCreateContext(repulsion->egl.display, config, | ||
752 | + EGL_NO_CONTEXT, context_attrs); | ||
753 | + if (repulsion->egl.context == EGL_NO_CONTEXT) | ||
754 | + return eglGetError(); | ||
755 | + | ||
756 | + repulsion->egl.surface = eglCreatePbufferSurface(repulsion->egl.display, | ||
757 | + config, NULL); | ||
758 | + if (repulsion->egl.surface == EGL_NO_SURFACE) | ||
759 | + return eglGetError(); | ||
760 | + | ||
761 | + if (!eglMakeCurrent(repulsion->egl.display, repulsion->egl.surface, | ||
762 | + repulsion->egl.surface, repulsion->egl.context)) | ||
763 | + return eglGetError(); | ||
764 | + | ||
765 | + if (!eglSwapInterval(repulsion->egl.display, 0)) | ||
766 | + return eglGetError(); | ||
767 | + | ||
768 | + return EGL_SUCCESS; | ||
769 | +} | ||
770 | + | ||
771 | +static void armsoc_repulsion_release_egl(struct ARMSOCRepulsion *repulsion) | ||
772 | +{ | ||
773 | + if (repulsion->egl.surface != EGL_NO_SURFACE) | ||
774 | + eglDestroySurface(repulsion->egl.display, repulsion->egl.surface); | ||
775 | + | ||
776 | + if (repulsion->egl.context) | ||
777 | + eglDestroyContext(repulsion->egl.display, repulsion->egl.context); | ||
778 | + | ||
779 | + if (repulsion->egl.display) | ||
780 | + eglTerminate(repulsion->egl.display); | ||
781 | + | ||
782 | + repulsion->egl.display = EGL_NO_DISPLAY; | ||
783 | +} | ||
784 | + | ||
785 | +static EGLint armsoc_repulsion_guess_bo_format(struct armsoc_bo *bo) | ||
786 | +{ | ||
787 | + switch(armsoc_bo_bpp(bo)) { | ||
788 | + case 16: | ||
789 | + return DRM_FORMAT_RGB565; | ||
790 | + case 32: | ||
791 | + return DRM_FORMAT_ARGB8888; | ||
792 | + default: | ||
793 | + return 0; | ||
794 | + } | ||
795 | +} | ||
796 | + | ||
797 | +static EGLImageKHR | ||
798 | +armsoc_repulsion_create_egl_image(struct ARMSOCRepulsion *repulsion, | ||
799 | + struct armsoc_bo *bo) | ||
800 | +{ | ||
801 | + const EGLint attributes[] = { | ||
802 | + EGL_WIDTH, armsoc_bo_width(bo), | ||
803 | + EGL_HEIGHT, armsoc_bo_height(bo), | ||
804 | + EGL_LINUX_DRM_FOURCC_EXT, armsoc_repulsion_guess_bo_format(bo), | ||
805 | + EGL_DMA_BUF_PLANE0_FD_EXT, armsoc_bo_get_dmabuf(bo), | ||
806 | + EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, | ||
807 | + EGL_DMA_BUF_PLANE0_PITCH_EXT, armsoc_bo_pitch(bo), | ||
808 | + EGL_NONE | ||
809 | + }; | ||
810 | + | ||
811 | + return eglCreateImageKHR(repulsion->egl.display, EGL_NO_CONTEXT, | ||
812 | + EGL_LINUX_DMA_BUF_EXT, NULL, attributes); | ||
813 | +} | ||
814 | + | ||
815 | +static void | ||
816 | +armsoc_repulsion_destroy_egl_image(struct ARMSOCRepulsion *repulsion, | ||
817 | + EGLImageKHR img) | ||
818 | +{ | ||
819 | + eglDestroyImageKHR(repulsion->egl.display, img); | ||
820 | +} | ||
821 | + | ||
822 | +/* ----------------------------------------------------------------------------- | ||
823 | + * Repulsion API | ||
824 | + */ | ||
825 | + | ||
826 | +bool armsoc_repulsion_composite(struct ARMSOCRepulsion *repulsion, | ||
827 | + struct armsoc_bo *src, | ||
828 | + struct armsoc_bo *dest, | ||
829 | + float xform_matrix[3][3]) | ||
830 | +{ | ||
831 | + GLuint tex, fbo; | ||
832 | + GLenum status; | ||
833 | + EGLImageKHR dest_img, src_img; | ||
834 | + GLsizei width, height; | ||
835 | + static GLfloat proj_matrix[3][3] = { | ||
836 | + { 2.f, 0.f, 0.f }, | ||
837 | + { 0.f, 2.f, 0.f }, | ||
838 | + { -1.f, -1.f, 0.f }, | ||
839 | + }; | ||
840 | + | ||
841 | + if (!repulsion || !src || !dest) | ||
842 | + return false; | ||
843 | + | ||
844 | + dest_img = armsoc_repulsion_create_egl_image(repulsion, dest); | ||
845 | + if (dest_img == EGL_NO_IMAGE_KHR) { | ||
846 | + EGLint err = eglGetError(); | ||
847 | + ERROR_LOG("Failed to create dest EGL image: 0x%04x (%s)", | ||
848 | + err, egl_error_str(err)); | ||
849 | + return false; | ||
850 | + } | ||
851 | + src_img = armsoc_repulsion_create_egl_image(repulsion, src); | ||
852 | + if (src_img == EGL_NO_IMAGE_KHR) { | ||
853 | + EGLint err = eglGetError(); | ||
854 | + ERROR_LOG("Failed to create src EGL image: 0x%04x (%s)", | ||
855 | + err, egl_error_str(err)); | ||
856 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
857 | + return false; | ||
858 | + } | ||
859 | + | ||
860 | + glGenTextures(1, &tex); | ||
861 | + glBindTexture(GL_TEXTURE_2D, tex); | ||
862 | + glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, dest_img); | ||
863 | + | ||
864 | + glGenFramebuffers(1, &fbo); | ||
865 | + glBindFramebuffer(GL_FRAMEBUFFER, fbo); | ||
866 | + | ||
867 | + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | ||
868 | + GL_TEXTURE_2D, tex, 0); | ||
869 | + | ||
870 | + status = glCheckFramebufferStatus(GL_FRAMEBUFFER); | ||
871 | + if (status != GL_FRAMEBUFFER_COMPLETE) { | ||
872 | + ERROR_LOG("Failed to complete framebuffer"); | ||
873 | + glDeleteFramebuffers(1, &fbo); | ||
874 | + glDeleteTextures(1, &tex); | ||
875 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
876 | + armsoc_repulsion_destroy_egl_image(repulsion, src_img); | ||
877 | + return false; | ||
878 | + } | ||
879 | + | ||
880 | + width = armsoc_bo_width(dest); | ||
881 | + height = armsoc_bo_height(dest); | ||
882 | + proj_matrix[0][0] = 2.f / width; | ||
883 | + proj_matrix[1][1] = 2.f / height; | ||
884 | + | ||
885 | + glUniformMatrix3fv(repulsion->gles.proj_location, 1, false, | ||
886 | + &proj_matrix[0][0]); | ||
887 | + | ||
888 | + glUniformMatrix3fv(repulsion->gles.xform_location, 1, false, | ||
889 | + &xform_matrix[0][0]); | ||
890 | + | ||
891 | + glViewport(0, 0, width, height); | ||
892 | + | ||
893 | + glClearColor(0.f, 0.f, 1.f, 1.f); | ||
894 | + glClear(GL_COLOR_BUFFER_BIT); | ||
895 | + | ||
896 | + glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, src_img); | ||
897 | + | ||
898 | + repulsion->gles.vertices[0].pos[0] = 0.f; | ||
899 | + repulsion->gles.vertices[0].pos[1] = height; | ||
900 | + repulsion->gles.vertices[0].pos[2] = 1.f; | ||
901 | + repulsion->gles.vertices[0].uv[0] = 0.f; | ||
902 | + repulsion->gles.vertices[0].uv[1] = 1.f; | ||
903 | + | ||
904 | + repulsion->gles.vertices[1].pos[0] = 0.f; | ||
905 | + repulsion->gles.vertices[1].pos[1] = 0.f; | ||
906 | + repulsion->gles.vertices[1].pos[2] = 1.f; | ||
907 | + repulsion->gles.vertices[1].uv[0] = 0.f; | ||
908 | + repulsion->gles.vertices[1].uv[1] = 0.f; | ||
909 | + | ||
910 | + repulsion->gles.vertices[2].pos[0] = width; | ||
911 | + repulsion->gles.vertices[2].pos[1] = 0.f; | ||
912 | + repulsion->gles.vertices[2].pos[2] = 1.f; | ||
913 | + repulsion->gles.vertices[2].uv[0] = 1.f; | ||
914 | + repulsion->gles.vertices[2].uv[1] = 0.f; | ||
915 | + | ||
916 | + repulsion->gles.vertices[3].pos[0] = width; | ||
917 | + repulsion->gles.vertices[3].pos[1] = height; | ||
918 | + repulsion->gles.vertices[3].pos[2] = 1.f; | ||
919 | + repulsion->gles.vertices[3].uv[0] = 1.f; | ||
920 | + repulsion->gles.vertices[3].uv[1] = 1.f; | ||
921 | + | ||
922 | + glBufferData(GL_ARRAY_BUFFER, sizeof(repulsion->gles.vertices), | ||
923 | + repulsion->gles.vertices, GL_STATIC_DRAW); | ||
924 | + | ||
925 | + glVertexAttribPointer(SHADER_POSITION_ATTR_SLOT, 3, GL_FLOAT, GL_FALSE, | ||
926 | + sizeof(*repulsion->gles.vertices), (const void *)(0)); | ||
927 | + glVertexAttribPointer(SHADER_TEX_COOR_ATTR_SLOT, 2, GL_FLOAT, GL_FALSE, | ||
928 | + sizeof(*repulsion->gles.vertices), | ||
929 | + (const void *)(sizeof(repulsion->gles.vertices->pos))); | ||
930 | + | ||
931 | + glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); | ||
932 | + | ||
933 | + glFinish(); | ||
934 | + | ||
935 | + glBindFramebuffer(GL_FRAMEBUFFER, 0); | ||
936 | + glDeleteFramebuffers(1, &fbo); | ||
937 | + glDeleteTextures(1, &tex); | ||
938 | + | ||
939 | + armsoc_repulsion_destroy_egl_image(repulsion, src_img); | ||
940 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
941 | + | ||
942 | + return true; | ||
943 | +} | ||
944 | + | ||
945 | +struct ARMSOCRepulsion *armsoc_repulsion_init(void) | ||
946 | +{ | ||
947 | + int rc; | ||
948 | + struct ARMSOCRepulsion *repulsion = calloc(1, sizeof(*repulsion)); | ||
949 | + if (!repulsion) { | ||
950 | + ERROR_LOG("Out of memory"); | ||
951 | + return NULL; | ||
952 | + } | ||
953 | + | ||
954 | + rc = armsoc_repulsion_init_egl(repulsion); | ||
955 | + if (rc != EGL_SUCCESS) { | ||
956 | + ERROR_LOG("Failed to initialize EGL: 0x%04x (%s)", | ||
957 | + rc, egl_error_str(rc)); | ||
958 | + armsoc_repulsion_release(repulsion); | ||
959 | + return NULL; | ||
960 | + } | ||
961 | + | ||
962 | + rc = armsoc_repulsion_init_gles(repulsion); | ||
963 | + if (rc != GL_NO_ERROR) { | ||
964 | + ERROR_LOG("Failed to initialize GLES: 0x%04x (%s)", | ||
965 | + rc, gles_error_str(rc)); | ||
966 | + armsoc_repulsion_release(repulsion); | ||
967 | + return NULL; | ||
968 | + } | ||
969 | + | ||
970 | + INFO_LOG("Repulsion initialized"); | ||
971 | + | ||
972 | + return repulsion; | ||
973 | +} | ||
974 | + | ||
975 | +void armsoc_repulsion_release(struct ARMSOCRepulsion *repulsion) | ||
976 | +{ | ||
977 | + if (!repulsion) | ||
978 | + return; | ||
979 | + armsoc_repulsion_release_gles(repulsion); | ||
980 | + armsoc_repulsion_release_egl(repulsion); | ||
981 | + free(repulsion); | ||
982 | +} | ||
983 | diff --git a/src/armsoc_repulsion.h b/src/armsoc_repulsion.h | ||
984 | new file mode 100644 | ||
985 | index 0000000..b5e57df | ||
986 | --- /dev/null | ||
987 | +++ b/src/armsoc_repulsion.h | ||
988 | @@ -0,0 +1,67 @@ | ||
989 | +/* | ||
990 | + * Copyright (C) 2024 AMD, Inc. | ||
991 | + * | ||
992 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
993 | + * copy of this software and associated documentation files (the "Software"), | ||
994 | + * to deal in the Software without restriction, including without limitation | ||
995 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
996 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
997 | + * Software is furnished to do so, subject to the following conditions: | ||
998 | + * | ||
999 | + * The above copyright notice and this permission notice (including the next | ||
1000 | + * paragraph) shall be included in all copies or substantial portions of the | ||
1001 | + * Software. | ||
1002 | + * | ||
1003 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
1004 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
1005 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
1006 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
1007 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
1008 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
1009 | + * SOFTWARE. | ||
1010 | + * | ||
1011 | + * Author: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
1012 | + * | ||
1013 | + */ | ||
1014 | + | ||
1015 | +#ifndef ARMSOC_REPULSION_H_ | ||
1016 | +#define ARMSOC_REPULSION_H_ | ||
1017 | + | ||
1018 | +#include <stdbool.h> | ||
1019 | +#include "armsoc_dumb.h" | ||
1020 | + | ||
1021 | +struct ARMSOCRepulsion; | ||
1022 | + | ||
1023 | +/** | ||
1024 | + * Initialize armsoc repulsion compositor. | ||
1025 | + * | ||
1026 | + * Return: pointer to new ARMSOCRepulsion object on success, NULL otherwise. | ||
1027 | + */ | ||
1028 | +struct ARMSOCRepulsion *armsoc_repulsion_init(void); | ||
1029 | + | ||
1030 | +/** | ||
1031 | + * Release armsoc repulsion compositor and free all resources. | ||
1032 | + * @repulsion: pointer to previously allocated ARMSOCRepulsion object. | ||
1033 | + */ | ||
1034 | +void armsoc_repulsion_release(struct ARMSOCRepulsion *repulsion); | ||
1035 | + | ||
1036 | +/** | ||
1037 | + * Perform 2 image composition. | ||
1038 | + * @repulsion: pointer to ARMSOCRepulsion object. | ||
1039 | + * @src: source buffer object. | ||
1040 | + * @dest: destination buffer object. | ||
1041 | + * @xform_matrix: transformation matrix to apply to source image before copying | ||
1042 | + * it into destination. | ||
1043 | + * | ||
1044 | + * This function performs GPU accelerated copy of @src buffer into @dest buffer | ||
1045 | + * while applying linear transformation. | ||
1046 | + * | ||
1047 | + * Return: pointer to new ARMSOCRepulsion object on success, NULL otherwise. | ||
1048 | + */ | ||
1049 | +bool armsoc_repulsion_composite(struct ARMSOCRepulsion *repulsion, | ||
1050 | + struct armsoc_bo *src, | ||
1051 | + struct armsoc_bo *dest, | ||
1052 | + float xform_matrix[3][3]); | ||
1053 | + | ||
1054 | + | ||
1055 | +#endif // ARMSOC_REPULSION_H_ | ||
1056 | -- | ||
1057 | 2.25.1 | ||
1058 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch new file mode 100644 index 00000000..9cc186de --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 83047c38b0a9e8cc535eba580ca28497f1bee544 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Fri, 19 Jul 2024 14:10:22 -0700 | ||
4 | Subject: [PATCH] xf86-video-armosc: Option to control acceleration | ||
5 | |||
6 | Add xorg config option to enable / disable GPU accelerated picture | ||
7 | composition. Enable acceleration by default. | ||
8 | |||
9 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
10 | --- | ||
11 | man/armsoc.man | 6 ++++++ | ||
12 | src/armsoc_driver.c | 20 +++++++++++++++----- | ||
13 | src/armsoc_driver.h | 3 +++ | ||
14 | 3 files changed, 24 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/man/armsoc.man b/man/armsoc.man | ||
17 | index d85c2fa..cdeb19e 100644 | ||
18 | --- a/man/armsoc.man | ||
19 | +++ b/man/armsoc.man | ||
20 | @@ -69,6 +69,12 @@ Default: NULL | ||
21 | Use the umplock module for cross-process access synchronization. It should be only enabled for Mali400 | ||
22 | .IP | ||
23 | Default: Umplock is Disabled | ||
24 | +.TP | ||
25 | +.BI "Option \*qAccelerateComposition\*q \*q" boolean \*q | ||
26 | +Accelerate picture composition on GPU. | ||
27 | +.IP | ||
28 | +Default: Accelerated composition is Enabled | ||
29 | + | ||
30 | |||
31 | .SH DRM DEVICE SELECTION | ||
32 | |||
33 | diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c | ||
34 | index f5b8f21..15cc620 100644 | ||
35 | --- a/src/armsoc_driver.c | ||
36 | +++ b/src/armsoc_driver.c | ||
37 | @@ -110,6 +110,7 @@ enum { | ||
38 | OPTION_DRI_NUM_BUF, | ||
39 | OPTION_INIT_FROM_FBDEV, | ||
40 | OPTION_UMP_LOCK, | ||
41 | + OPTION_ACCELERATE_COMPOSITION, | ||
42 | }; | ||
43 | |||
44 | /** Supported options. */ | ||
45 | @@ -122,6 +123,8 @@ static const OptionInfoRec ARMSOCOptions[] = { | ||
46 | { OPTION_DRI_NUM_BUF, "DRI2MaxBuffers", OPTV_INTEGER, {-1}, FALSE }, | ||
47 | { OPTION_INIT_FROM_FBDEV, "InitFromFBDev", OPTV_STRING, {0}, FALSE }, | ||
48 | { OPTION_UMP_LOCK, "UMP_LOCK", OPTV_BOOLEAN, {0}, FALSE }, | ||
49 | + { OPTION_ACCELERATE_COMPOSITION, "AccelerateComposition", OPTV_BOOLEAN, | ||
50 | + {0}, FALSE }, | ||
51 | { -1, NULL, OPTV_NONE, {0}, FALSE } | ||
52 | }; | ||
53 | |||
54 | @@ -871,6 +874,10 @@ ARMSOCPreInit(ScrnInfoPtr pScrn, int flags) | ||
55 | armsocDebug = xf86ReturnOptValBool(pARMSOC->pOptionInfo, | ||
56 | OPTION_DEBUG, FALSE); | ||
57 | |||
58 | + /* Should we enable GPU accelerated picture composition? */ | ||
59 | + pARMSOC->enable_repulsion = xf86ReturnOptValBool(pARMSOC->pOptionInfo, | ||
60 | + OPTION_ACCELERATE_COMPOSITION, TRUE); | ||
61 | + | ||
62 | if (!xf86GetOptValInteger(pARMSOC->pOptionInfo, OPTION_DRI_NUM_BUF, | ||
63 | &driNumBufs)) { | ||
64 | /* Default to double buffering */ | ||
65 | @@ -1119,7 +1126,6 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
66 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
67 | VisualPtr visual; | ||
68 | xf86CrtcConfigPtr xf86_config; | ||
69 | - PictureScreenPtr ps; | ||
70 | int j; | ||
71 | const char *fbdev; | ||
72 | int depth; | ||
73 | @@ -1308,12 +1314,16 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
74 | pARMSOC->lockFD = -1; | ||
75 | } | ||
76 | |||
77 | - pARMSOC->repulsion = armsoc_repulsion_init(); | ||
78 | + if (pARMSOC->enable_repulsion) { | ||
79 | + PictureScreenPtr ps; | ||
80 | + | ||
81 | + pARMSOC->repulsion = armsoc_repulsion_init(); | ||
82 | |||
83 | - ps = GetPictureScreen(pScreen); | ||
84 | - pARMSOC->composite_proc = ps->Composite; | ||
85 | + ps = GetPictureScreen(pScreen); | ||
86 | + pARMSOC->composite_proc = ps->Composite; | ||
87 | |||
88 | - ps->Composite = ARMSOCComposite; | ||
89 | + ps->Composite = ARMSOCComposite; | ||
90 | + } | ||
91 | |||
92 | TRACE_EXIT(); | ||
93 | return TRUE; | ||
94 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
95 | index 20b0f80..27e978e 100644 | ||
96 | --- a/src/armsoc_driver.h | ||
97 | +++ b/src/armsoc_driver.h | ||
98 | @@ -185,6 +185,9 @@ struct ARMSOCRec { | ||
99 | * driNumBufs if early display enabled, otherwise driNumBufs-1 */ | ||
100 | unsigned int swap_chain_size; | ||
101 | |||
102 | + /* Enable GPU accelerated picture compositor? */ | ||
103 | + Bool enable_repulsion; | ||
104 | + | ||
105 | /* GPU accelerated picture compositor, AKA Repulsion */ | ||
106 | struct ARMSOCRepulsion *repulsion; | ||
107 | |||
108 | -- | ||
109 | 2.25.1 | ||
110 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch new file mode 100644 index 00000000..8a1a8ca7 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch | |||
@@ -0,0 +1,141 @@ | |||
1 | From 8c62932a848c3c9eef8b663a24d90026687d5b02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Thu, 13 Jun 2024 17:37:46 -0700 | ||
4 | Subject: [PATCH] xf86-video-armsoc: Add shadow buffer hooks | ||
5 | |||
6 | Add shadow buffer management callbacks. These callbacks are required for | ||
7 | RandR extension to operate. Implement the shadow buffer as a dumb DRM | ||
8 | framebuffer. Use the shadow buffer as page flip souce. Fix armsoc_dri2.c | ||
9 | file mode (drop exec bits). | ||
10 | |||
11 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
12 | --- | ||
13 | src/armsoc_dri2.c | 3 ++ | ||
14 | src/armsoc_driver.h | 3 ++ | ||
15 | src/drmmode_display.c | 65 +++++++++++++++++++++++++++++++++++++++++++ | ||
16 | 3 files changed, 71 insertions(+) | ||
17 | mode change 100755 => 100644 src/armsoc_dri2.c | ||
18 | |||
19 | diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c | ||
20 | old mode 100755 | ||
21 | new mode 100644 | ||
22 | index dc502e4..af5d074 | ||
23 | --- a/src/armsoc_dri2.c | ||
24 | +++ b/src/armsoc_dri2.c | ||
25 | @@ -853,6 +853,9 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw, | ||
26 | (armsoc_bo_height(src_bo) == armsoc_bo_height(dst_bo)); | ||
27 | |||
28 | if (do_flip) { | ||
29 | + if (pARMSOC->shadow) | ||
30 | + src_fb_id = armsoc_bo_get_fb(pARMSOC->shadow); | ||
31 | + | ||
32 | DEBUG_MSG("FLIPPING: FB%d -> FB%d", src_fb_id, dst_fb_id); | ||
33 | cmd->type = DRI2_FLIP_COMPLETE; | ||
34 | |||
35 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
36 | index ef2836f..eae76ca 100644 | ||
37 | --- a/src/armsoc_driver.h | ||
38 | +++ b/src/armsoc_driver.h | ||
39 | @@ -149,6 +149,9 @@ struct ARMSOCRec { | ||
40 | /** Scan-out buffer. */ | ||
41 | struct armsoc_bo *scanout; | ||
42 | |||
43 | + /** Rotation shadow buffer */ | ||
44 | + struct armsoc_bo *shadow; | ||
45 | + | ||
46 | /** Pointer to the options for this screen. */ | ||
47 | OptionInfoPtr pOptionInfo; | ||
48 | |||
49 | diff --git a/src/drmmode_display.c b/src/drmmode_display.c | ||
50 | index 39fa75c..f054b3a 100644 | ||
51 | --- a/src/drmmode_display.c | ||
52 | +++ b/src/drmmode_display.c | ||
53 | @@ -333,6 +333,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, | ||
54 | goto cleanup; | ||
55 | } | ||
56 | |||
57 | + if (pARMSOC->shadow) | ||
58 | + fb_id = armsoc_bo_get_fb(pARMSOC->shadow); | ||
59 | + | ||
60 | if (crtc->funcs->gamma_set) | ||
61 | crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, | ||
62 | crtc->gamma_blue, crtc->gamma_size); | ||
63 | @@ -860,6 +863,65 @@ drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | +static void* | ||
68 | +drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height) | ||
69 | +{ | ||
70 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
71 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
72 | + struct armsoc_bo *bo; | ||
73 | + int ret; | ||
74 | + | ||
75 | + bo = armsoc_bo_new_with_dim(pARMSOC->dev, width, height, | ||
76 | + pScrn->bitsPerPixel, pScrn->bitsPerPixel, ARMSOC_BO_SCANOUT); | ||
77 | + if (!bo) | ||
78 | + return NULL; | ||
79 | + | ||
80 | + /* We will use this bo as a scanout, so add it as a framebuffer */ | ||
81 | + ret = armsoc_bo_add_fb(bo); | ||
82 | + if (ret) { | ||
83 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
84 | + "failed to add framebuffer: %s\n", strerror(-ret)); | ||
85 | + armsoc_bo_unreference(bo); | ||
86 | + return NULL; | ||
87 | + } | ||
88 | + | ||
89 | + pARMSOC->shadow = bo; | ||
90 | + | ||
91 | + return bo; | ||
92 | +} | ||
93 | + | ||
94 | +static PixmapPtr | ||
95 | +drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) | ||
96 | +{ | ||
97 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
98 | + ScreenPtr pScreen = pScrn->pScreen; | ||
99 | + struct armsoc_bo *bo = data; | ||
100 | + PixmapPtr pixmap; | ||
101 | + | ||
102 | + pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, armsoc_bo_depth(bo), 0); | ||
103 | + if (!pixmap) { | ||
104 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to create pixmap.\n"); | ||
105 | + return NULL; | ||
106 | + } | ||
107 | + (*pScreen->ModifyPixmapHeader)(pixmap, armsoc_bo_width(bo), | ||
108 | + armsoc_bo_height(bo), armsoc_bo_depth(bo), armsoc_bo_bpp(bo), | ||
109 | + armsoc_bo_pitch(bo), armsoc_bo_map(bo)); | ||
110 | + | ||
111 | + return pixmap; | ||
112 | +} | ||
113 | + | ||
114 | +static void | ||
115 | +drmmode_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data) | ||
116 | +{ | ||
117 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
118 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
119 | + struct armsoc_bo *bo = data; | ||
120 | + | ||
121 | + armsoc_bo_unreference(bo); | ||
122 | + | ||
123 | + pARMSOC->shadow = NULL; | ||
124 | +} | ||
125 | + | ||
126 | static const xf86CrtcFuncsRec drmmode_crtc_funcs = { | ||
127 | .dpms = drmmode_crtc_dpms, | ||
128 | .set_mode_major = drmmode_set_mode_major, | ||
129 | @@ -870,6 +932,9 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = { | ||
130 | #if 1 == ARMSOC_SUPPORT_GAMMA | ||
131 | .gamma_set = drmmode_gamma_set, | ||
132 | #endif | ||
133 | + .shadow_allocate = drmmode_shadow_allocate, | ||
134 | + .shadow_create = drmmode_shadow_create, | ||
135 | + .shadow_destroy = drmmode_shadow_destroy, | ||
136 | }; | ||
137 | |||
138 | |||
139 | -- | ||
140 | 2.25.1 | ||
141 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend index f7b52f58..9f8af267 100644 --- a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend | |||
@@ -2,4 +2,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/xf86-video-armsoc:" | |||
2 | 2 | ||
3 | SRC_URI:append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ | 3 | SRC_URI:append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ |
4 | file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \ | 4 | file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \ |
5 | " | 5 | file://0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch \ |
6 | " | ||
7 | EXTRA_MALI400_SRC = " file://0001-xf86-video-armosc-Accelerate-picture-composition.patch \ | ||
8 | file://0001-xf86-video-armosc-Option-to-control-acceleration.patch \ | ||
9 | " | ||
10 | SRC_URI:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${EXTRA_MALI400_SRC}', '', d)}" | ||
11 | |||
12 | DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' libmali-xlnx', '', d)}" | ||
13 | |||
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 | ||
3 | python split_qemu_packages () { | ||
4 | print( "meta-virtualization: vmsplit: inhibiting core qemu package split" ) | ||
5 | } | ||
6 | |||
7 | PACKAGES: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 | |||
18 | FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" | ||
19 | RDEPENDS:${PN}-x86_64:append:class-target = " ${PN}" | ||
20 | RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-system-x86_64" | ||
21 | RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-user-x86_64" | ||
22 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-x86_64" | ||
23 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-x86_64" | ||
24 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" | ||
25 | |||
26 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" | ||
27 | RDEPENDS:${PN}-i386:append:class-target = " ${PN}" | ||
28 | RPROVIDES:${PN}-i386:append:class-target = " ${PN}-user-i386" | ||
29 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-i386" | ||
30 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" | ||
31 | |||
32 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" | ||
33 | RDEPENDS:${PN}-system-i386:append:class-target = " ${PN}" | ||
34 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-system-i386" | ||
35 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" | ||
36 | |||
37 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" | ||
38 | RDEPENDS:${PN}-aarch64:append:class-target = " ${PN}" | ||
39 | RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-system-aarch64" | ||
40 | RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-user-aarch64" | ||
41 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-aarch64" | ||
42 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-aarch64" | ||
43 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" | ||
44 | |||
45 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" | ||
46 | RDEPENDS:${PN}-arm:append:class-target = " ${PN}" | ||
47 | RPROVIDES:${PN}-arm:append:class-target = " ${PN}-system-arm" | ||
48 | RPROVIDES:${PN}-arm:append:class-target = " ${PN}-user-arm" | ||
49 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-arm" | ||
50 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-arm" | ||
51 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
52 | |||
53 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" | ||
54 | RDEPENDS:${PN}-microblaze:append:class-target = " ${PN}" | ||
55 | RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-system-microblaze" | ||
56 | RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-user-microblaze" | ||
57 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-microblaze" | ||
58 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-microblaze" | ||
59 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
60 | |||
61 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" | ||
62 | RDEPENDS:${PN}-support:class-target = "${PN} bash" | ||
63 | |||
64 | FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*" | ||
65 | RDEPENDS:${PN}-firmware:class-target = "${PN}" | ||
66 | INSANE_SKIP:${PN}-firmware:class-target = "arch" | ||
67 | |||
68 | FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*" | ||
69 | RDEPENDS:${PN}-keymaps:class-target = "${PN}" | ||
70 | |||
71 | PACKAGECONFIG: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 @@ | |||
1 | PACKAGES: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 | |||
12 | FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" | ||
13 | RDEPENDS:${PN}-x86_64:append:class-target = "${PN}" | ||
14 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" | ||
15 | |||
16 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" | ||
17 | RDEPENDS:${PN}-i386:append:class-target = "${PN}" | ||
18 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" | ||
19 | |||
20 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" | ||
21 | RDEPENDS:${PN}-system-i386:append:class-target = "${PN}" | ||
22 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" | ||
23 | |||
24 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" | ||
25 | RDEPENDS:${PN}-aarch64:append:class-target = "${PN}" | ||
26 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" | ||
27 | |||
28 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" | ||
29 | RDEPENDS:${PN}-arm:append:class-target = "${PN}" | ||
30 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
31 | |||
32 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" | ||
33 | RDEPENDS:${PN}-microblaze:append:class-target = "${PN}" | ||
34 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
35 | |||
36 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" | ||
37 | RDEPENDS:${PN}-support:class-target = "${PN} bash" | ||
38 | |||
39 | FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*" | ||
40 | RDEPENDS:${PN}-firmware:class-target = "${PN}" | ||
41 | INSANE_SKIP:${PN}-firmware:class-target = "arch" | ||
42 | |||
43 | FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*" | ||
44 | RDEPENDS:${PN}-keymaps:class-target = "${PN}" | ||
45 | |||
46 | PACKAGECONFIG: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 @@ | |||
1 | require ${@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/0001-fixup-duplicates.patch b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper/0001-fixup-duplicates.patch new file mode 100644 index 00000000..41815392 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper/0001-fixup-duplicates.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | Prevent duplicate and conflicting entries in generated files | ||
2 | |||
3 | Generated xparameters.h file could end up with conflicting entries between | ||
4 | "Canonical definitions" and regular "definitions" for various peripherals. | ||
5 | |||
6 | This would result in numerous compilation warnings, and if the conflicting | ||
7 | entry was used could result in the wrong value. | ||
8 | |||
9 | Also fix the comments to match the generated defines, the wrong entry name | ||
10 | could have previously been used. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | |||
16 | diff --git a/lopper/assists/baremetal_xparameters_xlnx.py b/lopper/assists/baremetal_xparameters_xlnx.py | ||
17 | index 661979d..2b84a64 100644 | ||
18 | --- a/lopper/assists/baremetal_xparameters_xlnx.py | ||
19 | +++ b/lopper/assists/baremetal_xparameters_xlnx.py | ||
20 | @@ -340,7 +340,7 @@ def xlnx_generate_xparams(tgt_node, sdt, options): | ||
21 | canondef_dict.update({prop:hex(prop_val[0])}) | ||
22 | plat.buf(f'\n#define XPAR_{label_name}_{prop.upper()} {hex(prop_val[0])}') | ||
23 | |||
24 | - plat.buf(f'\n\n/* Canonical definitions for peripheral {label_name} */') | ||
25 | + plat.buf(f'\n\n/* Canonical definitions for peripheral {canonical_name}_{index} */') | ||
26 | for prop,val in sorted(canondef_dict.items(), key=lambda e: e[0][0], reverse=False): | ||
27 | if prop == "FABRIC": | ||
28 | plat.buf(f'\n#define XPAR_FABRIC_{canonical_name}_{index}_INTR {val}') | ||
29 | @@ -359,7 +359,9 @@ def xlnx_generate_xparams(tgt_node, sdt, options): | ||
30 | node_list = bm_config.get_mapped_nodes(sdt, node_list, options) | ||
31 | |||
32 | node_ip_count_dict = {} | ||
33 | + label_dict = {} | ||
34 | for node in node_list: | ||
35 | + canonical_dict = {} | ||
36 | try: | ||
37 | label_name = bm_config.get_label(sdt, symbol_node, node) | ||
38 | if label_name != None: | ||
39 | @@ -367,6 +369,14 @@ def xlnx_generate_xparams(tgt_node, sdt, options): | ||
40 | else: | ||
41 | continue | ||
42 | val = bm_config.scan_reg_size(node, node['reg'].value, 0) | ||
43 | + | ||
44 | + if label_name in label_dict: | ||
45 | + if label_dict[label_name]['BASEADDR'] != val[0] or \ | ||
46 | + label_dict[label_name]['HIGHADDR'] != val[0] + val[1] - 1: | ||
47 | + raise KeyError("Duplicate definition for {label_name}") | ||
48 | + else: | ||
49 | + label_dict[label_name] = { 'BASEADDR' : val[0] , 'HIGHADDR' : val[0] + val[1] - 1 } | ||
50 | + | ||
51 | plat.buf(f'\n/* Definitions for peripheral {label_name} */') | ||
52 | plat.buf(f'\n#define XPAR_{label_name}_BASEADDR {hex(val[0])}\n') | ||
53 | plat.buf(f'#define XPAR_{label_name}_HIGHADDR {hex(val[0] + val[1] - 1)}\n') | ||
54 | @@ -379,12 +389,28 @@ def xlnx_generate_xparams(tgt_node, sdt, options): | ||
55 | |||
56 | canonical_name = node_ip_name.upper().replace("-", "_") | ||
57 | |||
58 | - plat.buf(f'\n/* Canonical definitions for peripheral {label_name} */') | ||
59 | - plat.buf(f'\n#define XPAR_{canonical_name}_{node_ip_count_dict[node_ip_name]}_BASEADDR {hex(val[0])}\n') | ||
60 | - plat.buf(f'#define XPAR_{canonical_name}_{node_ip_count_dict[node_ip_name]}_HIGHADDR {hex(val[0] + val[1] - 1)}\n') | ||
61 | + if (f'{canonical_name}_{node_ip_count_dict[node_ip_name]}') in canonical_dict: | ||
62 | + if canonical_dict[(f'{canonical_name}_{node_ip_count_dict[node_ip_name]}')]['BASEADDR'] != val[0] or \ | ||
63 | + canonical_dict[(f'{canonical_name}_{node_ip_count_dict[node_ip_name]}')]['HIGHADDR'] != val[0] + val[1] - 1: | ||
64 | + raise KeyError("Duplicate definition for {canonical_name}") | ||
65 | + else: | ||
66 | + canonical_dict[(f'{canonical_name}_{node_ip_count_dict[node_ip_name]}')] = { 'BASEADDR' : val[0] , 'HIGHADDR' : val[0] + val[1] - 1 } | ||
67 | except KeyError: | ||
68 | pass | ||
69 | |||
70 | + # Filter out anything already defined | ||
71 | + for canonical_name in canonical_dict: | ||
72 | + baseaddr = canonical_dict[canonical_name]['BASEADDR'] | ||
73 | + highaddr = canonical_dict[canonical_name]['HIGHADDR'] | ||
74 | + | ||
75 | + if canonical_name in label_dict: | ||
76 | + # Already defined ... skip | ||
77 | + continue | ||
78 | + | ||
79 | + plat.buf(f'\n/* Canonical definitions for peripheral {canonical_name} */') | ||
80 | + plat.buf(f'\n#define XPAR_{canonical_name}_BASEADDR {hex(baseaddr)}\n') | ||
81 | + plat.buf(f'#define XPAR_{canonical_name}_HIGHADDR {hex(highaddr)}\n') | ||
82 | + | ||
83 | # Define for Board | ||
84 | if sdt.tree[tgt_node].propval('board') != ['']: | ||
85 | board = sdt.tree[tgt_node].propval('board', list)[0] | ||
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..26eda3fe 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,13 +1,16 @@ | |||
1 | SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=master;protocol=https" | 1 | SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=master;protocol=https" |
2 | SRCREV = "807435ae6fa0a07e8c84b458d138f3f54614eb5c" | 2 | SRCREV = "c0facd087263a24a83f7fad917884348db03175d" |
3 | |||
4 | SRC_URI += "file://0001-fixup-duplicates.patch" | ||
3 | 5 | ||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" | 6 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" |
5 | 7 | ||
6 | BASEVERSION = "1.1.0" | 8 | BASEVERSION = "1.2.0" |
7 | 9 | ||
8 | RDEPENDS:${PN} += " \ | 10 | RDEPENDS:${PN} += " \ |
9 | python3-ruamel-yaml \ | 11 | python3-ruamel-yaml \ |
10 | python3-anytree \ | 12 | python3-anytree \ |
11 | python3-six \ | 13 | python3-six \ |
12 | python3-pyyaml \ | 14 | python3-pyyaml \ |
15 | python3-packaging \ | ||
13 | " | 16 | " |
diff --git a/meta-xilinx-core/gen-machine-conf b/meta-xilinx-core/gen-machine-conf | |||
Subproject 911941fc094dc0073c2f01a2b94de3cc6e993fe | Subproject 3e691e28bf47876fb7e0c4be3c62be6b9d46bf8 | ||
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..2d8a7d8f --- /dev/null +++ b/meta-xilinx-core/lib/devtool/boot-jtag.py | |||
@@ -0,0 +1,274 @@ | |||
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 | |||
10 | import os | ||
11 | import glob | ||
12 | import logging | ||
13 | from devtool import setup_tinfoil | ||
14 | |||
15 | logger = logging.getLogger('devtool') | ||
16 | |||
17 | def bootjtag(args, config, basepath, workspace): | ||
18 | """Entry point for the devtool 'boot-jtag' subcommand""" | ||
19 | |||
20 | if not args.image: | ||
21 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') | ||
22 | return | ||
23 | |||
24 | tinfoil = setup_tinfoil(basepath=basepath) | ||
25 | # Get required boot variables | ||
26 | try: | ||
27 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') | ||
28 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') | ||
29 | machine = rd.getVar('MACHINE') | ||
30 | arch = rd.getVar('TARGET_ARCH') | ||
31 | soc = rd.getVar("SOC_FAMILY") | ||
32 | ddr_base_addr = rd.getVar('DDR_BASEADDR') | ||
33 | kernel_img_name = rd.getVar('KERNEL_IMAGE') | ||
34 | kernel_load_addr = rd.getVar('KERNEL_LOAD_ADDRESS') | ||
35 | dtb_load_addr = rd.getVar('DEVICETREE_ADDRESS') | ||
36 | rootfs_load_addr = rd.getVar('RAMDISK_IMAGE_ADDRESS') | ||
37 | machine_features = rd.getVar('MACHINE_FEATURES') | ||
38 | boot_mode = rd.getVar('BOOTMODE') | ||
39 | image_name_suffix = rd.getVar('IMAGE_NAME_SUFFIX') | ||
40 | finally: | ||
41 | tinfoil.shutdown() | ||
42 | |||
43 | if not args.hw_server: | ||
44 | 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)) | ||
45 | |||
46 | print("INFO: HW_SERVER Connected to: " + str(args.hw_server)) | ||
47 | print("INFO: Using DISTRO IMAGE: " + str(args.image)) | ||
48 | |||
49 | # Use arch for MB and SOC Family other devices. | ||
50 | if arch == 'microblazeel': | ||
51 | print("INFO: ARCH: " + arch) | ||
52 | else: | ||
53 | print("INFO: SOC FAMILY: " + soc) | ||
54 | |||
55 | # Load Address of boot.scr in DDR(Except for QSPI/OSPI/NAND boot) | ||
56 | # MB = (DDR base address + DDR Size) - 0xe00000 | ||
57 | # Zynq 7000 = DDR base address + 0x3000000 | ||
58 | # ZynqMP = DDR base address + 0x20000000 | ||
59 | # Versal & Versal-net = DDR base address + 0x20000000 | ||
60 | if arch == 'microblazeel': | ||
61 | # Assuming DDR size is 2GB | ||
62 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x80000000 - 0xe00000) | ||
63 | elif soc == 'zynq': | ||
64 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x3000000) | ||
65 | else: | ||
66 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x20000000) | ||
67 | |||
68 | print("INFO: MACHINE: " + machine) | ||
69 | |||
70 | if arch != 'microblazeel': | ||
71 | if "fpga-overaly" in machine_features: | ||
72 | 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.") | ||
73 | else: | ||
74 | print("INFO: fpga-overlay MACHINE_FEATURES is not enabled, Hence PL bitstream or PDI will be loaded at initial boot.") | ||
75 | |||
76 | #dictionary with all required artifacts | ||
77 | data = {} | ||
78 | |||
79 | # For MB, Zynq 7000 and ZynqMP. | ||
80 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
81 | if not "fpga-overaly" in machine_features: | ||
82 | data['bit'] = glob.glob(os.path.join(deploy_dir, '*' + machine + '.bit'))[0] | ||
83 | data['uboot'] = os.path.join(deploy_dir, 'u-boot.elf') | ||
84 | data['dtb'] = os.path.join(deploy_dir, machine + '-system.dtb') | ||
85 | |||
86 | if soc == 'zynq' or soc == 'zynqmp': | ||
87 | data['fsbl'] = os.path.join(deploy_dir, 'fsbl-' + machine + '.elf') | ||
88 | |||
89 | if soc == 'zynqmp': | ||
90 | data['atf'] = os.path.join(deploy_dir, 'arm-trusted-firmware.elf') | ||
91 | data['pmufw'] = os.path.join(deploy_dir, 'pmu-firmware-' + machine + '.elf') | ||
92 | |||
93 | if soc in ('versal', 'versal-net'): | ||
94 | data['bootbin'] = os.path.join(deploy_dir, 'boot.bin') | ||
95 | |||
96 | data['bootscr'] = os.path.join(deploy_dir, 'boot.scr') | ||
97 | data['kernel'] = os.path.join(deploy_dir, kernel_img_name) | ||
98 | |||
99 | if not args.norootfs: | ||
100 | data['rfs'] = os.path.join(deploy_dir, args.image + '-' + machine + image_name_suffix + '.cpio.gz.u-boot') | ||
101 | |||
102 | # Check if all the required boot images exists | ||
103 | for key in data: | ||
104 | if not os.path.isfile(data[key]): | ||
105 | print('INFO:' + key + ' does not exist.') | ||
106 | print('INFO: Please make sure you have run: \n\'MACHINE=' + machine + ' devtool build-image ' + args.image + '\'') | ||
107 | return | ||
108 | |||
109 | # Enable verbose mode | ||
110 | if args.verbose: | ||
111 | print("The following artifacts are being loaded:") | ||
112 | for key in data: | ||
113 | print('INFO: ' + key + ": " + data[key]) | ||
114 | |||
115 | # Start writing xsdb script | ||
116 | lines = [] | ||
117 | lines.append('# Run \'xsdb ' + deploy_dir + '/boot-jtag.tcl\' to execute this script.') | ||
118 | lines.append('connect -url ' + args.hw_server) | ||
119 | |||
120 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
121 | lines.append('for {set i 0} {$i < 20} {incr i} {') | ||
122 | lines.append(' if { [ta] != "" } break;') | ||
123 | lines.append(' after 50') | ||
124 | lines.append('}') | ||
125 | if not "fpga-overaly" in machine_features: | ||
126 | lines.append('') | ||
127 | lines.append('puts stderr "INFO: Configuring the PL ..."') | ||
128 | lines.append('puts stderr "INFO: Downloading bitstream: ' + data['bit'] + '"') | ||
129 | lines.append('fpga -no-revision-check \"' + data['bit'] + '\"') | ||
130 | |||
131 | if soc == 'zynqmp': | ||
132 | # Disable Security gates to view PMU MB target | ||
133 | lines.append('') | ||
134 | lines.append('targets -set -nocase -filter {name =~ \"*PSU*\"}') | ||
135 | |||
136 | # By default, JTAG security gates are enabled. This disables security gates for DAP, PLTAP and PMU. | ||
137 | lines.append('mask_write 0xFFCA0038 0x1C0 0x1C0') | ||
138 | lines.append('targets -set -nocase -filter {name =~ \"*MicroBlaze PMU*\"}') | ||
139 | lines.append('') | ||
140 | |||
141 | # Check if the target is already stopped or cannot be stopped. | ||
142 | lines.append('catch {stop}; after 1000') | ||
143 | lines.append('') | ||
144 | |||
145 | # Download the pmufw.elf and run PMUFW | ||
146 | lines.append('puts stderr "INFO: Downloading PMUFW ELF file: ' + data['pmufw'] + '"') | ||
147 | lines.append('dow \"' + data['pmufw'] + '\"') | ||
148 | lines.append('con') | ||
149 | |||
150 | # Select A53 Core 0 to load and run FSBL | ||
151 | lines.append('targets -set -nocase -filter {name =~ \"*A53*#0\"}') | ||
152 | |||
153 | # Reset A53, If the reset is being triggered after powering on the device, | ||
154 | # write bootloop at reset vector address (0xffff0000), or use | ||
155 | # -clear-registers option, to avoid unpredictable behavior. | ||
156 | # Further warnings will be suppressed | ||
157 | lines.append('rst -processor -clear-registers') | ||
158 | lines.append('') | ||
159 | elif soc == 'versal': | ||
160 | # Download boot.bin to versal device | ||
161 | lines.append('targets -set -nocase -filter {name =~ \"*PMC*\"}') | ||
162 | lines.append('puts stderr "INFO: Downloading BOOT bin file: ' + data['bootbin'] + '"') | ||
163 | lines.append('device program \"' + data['bootbin'] + '\"') | ||
164 | lines.append('') | ||
165 | lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}') | ||
166 | lines.append('stop') | ||
167 | lines.append('') | ||
168 | lines.append('targets -set -nocase -filter {name =~ \"*Versal*\"}') | ||
169 | elif soc == 'versal-net': | ||
170 | # Download boot.bin to versal device | ||
171 | lines.append('targets -set -nocase -filter {name =~ \"*PMC*\"}') | ||
172 | lines.append('puts stderr "INFO: Downloading BOOT bin file: ' + data['bootbin'] + '"') | ||
173 | lines.append('device program \"' + data['bootbin'] + '\"') | ||
174 | lines.append('') | ||
175 | lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}') | ||
176 | lines.append('stop') | ||
177 | lines.append('') | ||
178 | lines.append('targets -set -nocase -filter {name =~ \"*Versal*\"}') | ||
179 | elif soc == 'zynq': | ||
180 | lines.append('targets -set -nocase -filter {name =~ \"arm*#0\"}') | ||
181 | # Check if the target is already stopped or cannot be stopped. | ||
182 | lines.append('catch {stop}; after 1000') | ||
183 | lines.append('') | ||
184 | else: | ||
185 | lines.append('targets -set -nocase -filter {name =~ \"microblaze*#0\"}') | ||
186 | # Check if the target is already stopped or cannot be stopped. | ||
187 | lines.append('catch {stop}; after 1000') | ||
188 | lines.append('') | ||
189 | |||
190 | |||
191 | if soc == 'zynq' or soc == 'zynqmp': | ||
192 | # Download FSBL for Zynq 7000 and ZynqMP | ||
193 | lines.append('puts stderr "INFO: Downloading FSBL ELF file: ' + data['fsbl'] + '"') | ||
194 | lines.append('dow \"' + data['fsbl'] + '\"') | ||
195 | lines.append('con') | ||
196 | lines.append('after 4000; stop') | ||
197 | lines.append('') | ||
198 | |||
199 | # Download U-boot and DTB for MB, Zynq 7000 and ZynqMP | ||
200 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
201 | lines.append('puts stderr "INFO: Downloading U-boot ELF file: ' + data['uboot'] + '"') | ||
202 | lines.append('dow \"' + data['uboot'] + '\"') | ||
203 | lines.append('') | ||
204 | # For MB and Zynq 7000 we need to connect and stop before loading | ||
205 | # kernel images | ||
206 | if soc != 'zynqmp': | ||
207 | lines.append('con') | ||
208 | lines.append('after 1000; stop') | ||
209 | lines.append('puts stderr "INFO: Downloading DTB file: ' + data['dtb'] + ' at ' + dtb_load_addr + '"') | ||
210 | lines.append('dow -data \"' + data['dtb'] + '\" ' + dtb_load_addr) | ||
211 | lines.append('') | ||
212 | |||
213 | # Download Trusted Firmware-A(TF-A) for ZynqMP | ||
214 | # Note: TF-A elf should be loaded after u-boot elf in JTAG boot mode else | ||
215 | # TF-A elf will not be loaded. | ||
216 | if soc == 'zynqmp': | ||
217 | lines.append('puts stderr "INFO: Downloading Trusted Firmware-A(TF-A) ELF file: ' + data['atf'] + '"') | ||
218 | lines.append('dow \"' + data['atf'] + '\"') | ||
219 | lines.append('') | ||
220 | |||
221 | # If BOOTMODE is xen then boot till u-boot only. | ||
222 | # Download Kernel Image for all architecture | ||
223 | if boot_mode != 'xen': | ||
224 | lines.append('puts stderr "INFO: Downloading Kernel Image file: ' + data['kernel'] + ' at ' + kernel_load_addr + '"') | ||
225 | lines.append('dow -data \"' + data['kernel'] + '\" ' + kernel_load_addr) | ||
226 | lines.append('') | ||
227 | |||
228 | # Download Rootfs | ||
229 | if not args.norootfs and boot_mode != 'xen': | ||
230 | lines.append('puts stderr "INFO: Downloading Rootfs file: ' + data['rfs'] + ' at ' + rootfs_load_addr + '"') | ||
231 | lines.append('dow -data \"' + data['rfs'] + '\" ' + rootfs_load_addr) | ||
232 | lines.append('') | ||
233 | |||
234 | lines.append('puts stderr "INFO: Downloading U-boot boot script: ' + data['bootscr'] + ' at ' + bootscr_addr + '"') | ||
235 | lines.append('dow -data \"' + data['bootscr'] + '\" ' + bootscr_addr) | ||
236 | lines.append('') | ||
237 | |||
238 | # Select A72 Core 0 to load and run Versal images | ||
239 | if soc == 'versal': | ||
240 | lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}') | ||
241 | |||
242 | if soc == 'versal-net': | ||
243 | lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}') | ||
244 | |||
245 | lines.append('con') | ||
246 | lines.append('exit\n') | ||
247 | |||
248 | script = os.path.join(deploy_dir, "boot-jtag.tcl") | ||
249 | with open(script, "w") as f: | ||
250 | f.write('\n'.join(lines)) | ||
251 | |||
252 | print('INFO: HW JTAG boot tcl script written to '+ script + "\n" \ | ||
253 | + 'INFO: User can run \'xsdb ' + script + '\' to execute.') | ||
254 | |||
255 | return 0 | ||
256 | |||
257 | def register_commands(subparsers, context): | ||
258 | """Register devtool subcommands from this plugin""" | ||
259 | parser_bootjtag = subparsers.add_parser('boot-jtag', | ||
260 | help='Script to deploy target images on HW via JTAG boot mode.', | ||
261 | description='Script to deploy target images on HW via JTAG boot mode. \ | ||
262 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') | ||
263 | required = parser_bootjtag.add_argument_group('required arguments') | ||
264 | required.add_argument('--image', | ||
265 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') | ||
266 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', | ||
267 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ | ||
268 | Example: --hw_server TCP:puffball12:3121') | ||
269 | |||
270 | parser_bootjtag.add_argument('-v', '--verbose', | ||
271 | help='verbose mode', action="store_true") | ||
272 | parser_bootjtag.add_argument('-n', '--norootfs', | ||
273 | help='Don\'t include rootfs', action='store_true') | ||
274 | parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True) | ||
diff --git a/meta-xilinx-core/recipes-apps/image-update/image-update_1.3.bb b/meta-xilinx-core/recipes-apps/image-update/image-update_1.3.bb new file mode 100644 index 00000000..7c402e15 --- /dev/null +++ b/meta-xilinx-core/recipes-apps/image-update/image-update_1.3.bb | |||
@@ -0,0 +1,30 @@ | |||
1 | DESCRIPTION = "Image update is used to update alternate images on compatible firmware." | ||
2 | SUMMARY = "Image update is used to update alternate image on compatible firmware. \ | ||
3 | If the current image is ImageA, ImageB will get updated and vice versa. \ | ||
4 | Usage: image_update <Input Image File>" | ||
5 | |||
6 | LICENSE = "MIT" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b" | ||
8 | |||
9 | BRANCH = "master" | ||
10 | SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https" | ||
11 | SRCREV = "1bd7d7405b484d808176c6e711691a846c18b4f0" | ||
12 | |||
13 | RDEPENDS:${PN} += "freeipmi" | ||
14 | |||
15 | S = "${UNPACKDIR}/git" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
21 | |||
22 | PACKAGE_ARCH:zynqmp = "${MACHINE_ARCH}" | ||
23 | |||
24 | # Force the make system to use the flags we want! | ||
25 | EXTRA_OEMAKE = 'CC="${CC} ${TARGET_CFLAGS} ${TARGET_LDFLAGS}" all' | ||
26 | |||
27 | do_install () { | ||
28 | install -d ${D}${bindir} | ||
29 | install -m 0755 ${S}/image_update ${D}${bindir}/ | ||
30 | } | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/python-async.inc b/meta-xilinx-core/recipes-apps/raft/python-async.inc new file mode 100644 index 00000000..fde86460 --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/python-async.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | SUMMARY = "Python framework to process interdependent tasks in a pool of workers" | ||
2 | HOMEPAGE = "http://github.com/gitpython-developers/async" | ||
3 | SECTION = "devel/python" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e" | ||
6 | |||
7 | inherit pypi | ||
8 | |||
9 | SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b" | ||
10 | SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051" | ||
11 | |||
12 | RDEPENDS:${PN} += "${PYTHON_PN}-threading" | ||
13 | |||
14 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb b/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb new file mode 100644 index 00000000..0da5fdec --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | inherit setuptools3 | ||
2 | require python-async.inc | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb b/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb new file mode 100644 index 00000000..89a8b5a5 --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb | |||
@@ -0,0 +1,65 @@ | |||
1 | SUMMARY = "RAFT python application" | ||
2 | LICENSE = "MIT & BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = " \ | ||
4 | file://LICENSE;md5=cc21c526211d34984839aa67dd16f172 \ | ||
5 | file://docs/LICENSE;md5=d8f0ffdbc8d019bc821a5a07bdca1406 \ | ||
6 | " | ||
7 | BRANCH = "2024.1" | ||
8 | SRC_URI = "git://github.com/Xilinx/RAFT;protocol=https;branch=${BRANCH}" | ||
9 | SRCREV = "87ea8f4c5ac52fcbc465f41e681fc77aaee9a285" | ||
10 | |||
11 | inherit update-rc.d systemd | ||
12 | |||
13 | S = "${UNPACKDIR}/git" | ||
14 | COMPATIBLE_MACHINE = "^$" | ||
15 | COMPATIBLE_MACHINE:zcu208-zynqmp = "${MACHINE}" | ||
16 | COMPATIBLE_MACHINE:zcu216-zynqmp = "${MACHINE}" | ||
17 | COMPATIBLE_MACHINE:system-controller = "${MACHINE}" | ||
18 | |||
19 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
20 | |||
21 | INITSCRIPT_NAME = "raft-startup" | ||
22 | INITSCRIPT_PARAMS = "start 99 S ." | ||
23 | |||
24 | SYSTEMD_PACKAGES = "${PN}" | ||
25 | SYSTEMD_SERVICE:${PN} = "raft-startup.service" | ||
26 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
27 | |||
28 | DEPENDS += "libmetal" | ||
29 | |||
30 | RDEPENDS:${PN} += "\ | ||
31 | python3 \ | ||
32 | python3-pyro4 \ | ||
33 | python3-cffi \ | ||
34 | python3-serpent \ | ||
35 | bash \ | ||
36 | " | ||
37 | |||
38 | PACKAGECONFIG[raftnotebooks] = "enabled,disabled,,packagegroup-xilinx-jupyter" | ||
39 | PACKAGECONFIG[raftstartup] = "enabled,disabled,,librfdc librfclk libmetal" | ||
40 | PACKAGECONFIG[raftstartupsc] = "enabled,disabled,,python3-psutil python3-periphery" | ||
41 | |||
42 | do_install() { | ||
43 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
44 | SYSCONFDIR=${D}${sysconfdir}/init.d/ | ||
45 | else | ||
46 | SYSCONFDIR='' | ||
47 | fi | ||
48 | oe_runmake install DESTDIR=${D}\ | ||
49 | NOTEBOOKS=${@bb.utils.contains('PACKAGECONFIG','raftnotebooks','enabled','', d)}\ | ||
50 | STARTUPSC=${@bb.utils.contains('PACKAGECONFIG','raftstartupsc','enabled','',d)}\ | ||
51 | STARTUP=${@bb.utils.contains('PACKAGECONFIG','raftstartup','enabled','',d)}\ | ||
52 | BINDIR=${D}${bindir}\ | ||
53 | SYSTEM_UNIT_DIR=${D}${systemd_system_unitdir}\ | ||
54 | SYSCONF_DIR=${SYSCONFDIR} | ||
55 | } | ||
56 | |||
57 | PACKAGECONFIG:append:zcu208-zynqmp = "raftnotebooks raftstartup" | ||
58 | PACKAGECONFIG:append:zcu216-zynqmp = "raftnotebooks raftstartup" | ||
59 | PACKAGECONFIG:append:system-controller = "raftstartupsc" | ||
60 | |||
61 | FILES:${PN} += " \ | ||
62 | ${datadir}/raft/* \ | ||
63 | ${datadir}/notebooks \ | ||
64 | ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/*', '', d)} \ | ||
65 | " | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb index f86c5985..88d4995f 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb | |||
@@ -1,18 +1,19 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | 1 | SUMMARY = "Xilinx AI Engine runtime" |
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | 2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt-2022.inc | 4 | require aie-rt-2023.inc |
5 | 5 | ||
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | 7 | ||
8 | AIEDIR ?= "${S}/driver" | 8 | AIEDIR ?= "${S}/driver" |
9 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
10 | I = "${AIEDIR}/include" | 10 | I = "${AIEDIR}/include" |
11 | 11 | ||
12 | COMPATIBLE_MACHINE = "^$" | 12 | inherit features_check |
13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | 13 | |
14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 14 | REQUIRED_MACHINE_FEATURES = "aie" |
15 | PV = "3.3" | 15 | |
16 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | 17 | ||
17 | IOBACKENDS ?= "Linux" | 18 | IOBACKENDS ?= "Linux" |
18 | 19 | ||
@@ -43,7 +44,3 @@ do_install(){ | |||
43 | install -d ${D}${libdir} | 44 | install -d ${D}${libdir} |
44 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | 45 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} |
45 | } | 46 | } |
46 | |||
47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
48 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.3.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb index 6a4fd880..0710a2bb 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.3.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb | |||
@@ -1,18 +1,19 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | 1 | SUMMARY = "Xilinx AI Engine runtime" |
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | 2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt.inc | 4 | require aie-rt-2024.inc |
5 | 5 | ||
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | 7 | ||
8 | AIEDIR ?= "${S}/driver" | 8 | AIEDIR ?= "${S}/driver" |
9 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
10 | I = "${AIEDIR}/include" | 10 | I = "${AIEDIR}/include" |
11 | 11 | ||
12 | COMPATIBLE_MACHINE = "^$" | 12 | inherit features_check |
13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | 13 | |
14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 14 | REQUIRED_MACHINE_FEATURES = "aie" |
15 | PV = "3.3" | 15 | |
16 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | 17 | ||
17 | IOBACKENDS ?= "Linux" | 18 | IOBACKENDS ?= "Linux" |
18 | 19 | ||
@@ -25,7 +26,7 @@ RPROVIDES:${PN} = "libxaiengine" | |||
25 | # The makefile isn't ready for parallel execution at the moment | 26 | # The makefile isn't ready for parallel execution at the moment |
26 | PARALLEL_MAKE = "-j 1" | 27 | PARALLEL_MAKE = "-j 1" |
27 | 28 | ||
28 | CFLAGS += "-Wall -Wextra -fno-thread-jumps -fno-tree-pre" | 29 | CFLAGS += "-Wall -Wextra" |
29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | 30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" |
30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | 31 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" |
31 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | 32 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" |
@@ -43,5 +44,3 @@ do_install(){ | |||
43 | install -d ${D}${libdir} | 44 | install -d ${D}${libdir} |
44 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | 45 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} |
45 | } | 46 | } |
46 | |||
47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb new file mode 100644 index 00000000..5e825c0a --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | ||
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.2.inc | ||
5 | |||
6 | SECTION = "libs" | ||
7 | |||
8 | AIEDIR ?= "${S}/driver" | ||
9 | S = "${UNPACKDIR}/git" | ||
10 | I = "${AIEDIR}/include" | ||
11 | |||
12 | IOBACKENDS ?= "Linux" | ||
13 | |||
14 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
15 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
16 | |||
17 | PROVIDES = "libxaiengine" | ||
18 | RPROVIDES:${PN} = "libxaiengine" | ||
19 | |||
20 | # The makefile isn't ready for parallel execution at the moment | ||
21 | PARALLEL_MAKE = "-j 1" | ||
22 | |||
23 | CFLAGS += "-Wall -Wextra" | ||
24 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
25 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
26 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
27 | |||
28 | |||
29 | do_compile(){ | ||
30 | oe_runmake | ||
31 | } | ||
32 | |||
33 | do_install(){ | ||
34 | install -d ${D}${includedir} | ||
35 | install ${I}/*.h ${D}${includedir}/ | ||
36 | install -d ${D}${includedir}/xaiengine | ||
37 | install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/ | ||
38 | install -d ${D}${libdir} | ||
39 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | ||
40 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.inc deleted file mode 100644 index 85121654..00000000 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.inc +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | SECTION = "libs" | ||
2 | |||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
4 | |||
5 | BRANCH ?= "xlnx_rel_v2022.2" | ||
6 | SRCREV ?= "ae24c8ede049906323510693f37e6167a963fd0e" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=b81abf1f508952331dd7d2ab36408f5b" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2023.inc index 11059465..11059465 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2023.inc | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc new file mode 100644 index 00000000..9ccc7621 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | SECTION = "libs" | ||
2 | |||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
4 | |||
5 | BRANCH ?= "xlnx_rel_v2024.2" | ||
6 | SRCREV ?= "8845d962e5b30b576c87dcf6635fb84a90ef1e36" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
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 @@ | |||
1 | SECTION = "libs" | ||
2 | |||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
4 | |||
5 | BRANCH ?= "xlnx_rel_v2024.1" | ||
6 | SRCREV ?= "56af0110186dfd546c58d96ff1d2f4f2d91f7724" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb index 2c6c9cd1..ab65f319 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb | |||
@@ -1,16 +1,18 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | 1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" |
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | 2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt-2022.inc | 4 | require aie-rt-2023.inc |
5 | 5 | ||
6 | SECTION = "devel" | 6 | SECTION = "devel" |
7 | 7 | ||
8 | XAIEFAL_DIR ?= "fal" | 8 | XAIEFAL_DIR ?= "fal" |
9 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
10 | 10 | ||
11 | COMPATIBLE_MACHINE = "^$" | 11 | inherit features_check |
12 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | 12 | |
13 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 13 | REQUIRED_MACHINE_FEATURES = "aie" |
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | 16 | ||
15 | IOBACKENDS ?= "Linux" | 17 | IOBACKENDS ?= "Linux" |
16 | 18 | ||
@@ -29,7 +31,3 @@ EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == | |||
29 | FILES:${PN}-demos = " \ | 31 | FILES:${PN}-demos = " \ |
30 | ${bindir}/* \ | 32 | ${bindir}/* \ |
31 | " | 33 | " |
32 | |||
33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
34 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb index 641c39a9..11c88d34 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.4.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb | |||
@@ -1,16 +1,18 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | 1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" |
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | 2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt.inc | 4 | require aie-rt-2024.inc |
5 | 5 | ||
6 | SECTION = "devel" | 6 | SECTION = "devel" |
7 | 7 | ||
8 | XAIEFAL_DIR ?= "fal" | 8 | XAIEFAL_DIR ?= "fal" |
9 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
10 | 10 | ||
11 | COMPATIBLE_MACHINE = "^$" | 11 | inherit features_check |
12 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | 12 | |
13 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 13 | REQUIRED_MACHINE_FEATURES = "aie" |
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | 16 | ||
15 | IOBACKENDS ?= "Linux" | 17 | IOBACKENDS ?= "Linux" |
16 | 18 | ||
@@ -23,11 +25,9 @@ DEPENDS = "libxaiengine" | |||
23 | 25 | ||
24 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | 26 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" |
25 | 27 | ||
26 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF " | 28 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON " |
27 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | 29 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" |
28 | 30 | ||
29 | FILES:${PN}-demos = " \ | 31 | FILES:${PN}-demos = " \ |
30 | ${bindir}/* \ | 32 | ${bindir}/* \ |
31 | " | 33 | " |
32 | |||
33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb new file mode 100644 index 00000000..ef9ff673 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | ||
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.2.inc | ||
5 | |||
6 | SECTION = "devel" | ||
7 | |||
8 | XAIEFAL_DIR ?= "fal" | ||
9 | S = "${UNPACKDIR}/git" | ||
10 | |||
11 | IOBACKENDS ?= "Linux" | ||
12 | |||
13 | PROVIDES = "aiefal" | ||
14 | ALLOW_EMPTY:${PN} = "1" | ||
15 | |||
16 | inherit pkgconfig cmake | ||
17 | |||
18 | DEPENDS = "libxaiengine" | ||
19 | |||
20 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
21 | |||
22 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON " | ||
23 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
24 | |||
25 | FILES:${PN}-demos = " \ | ||
26 | ${bindir}/* \ | ||
27 | " | ||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc index 9249060c..09f83809 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc | |||
@@ -9,14 +9,12 @@ inherit deploy | |||
9 | 9 | ||
10 | DEPENDS += "u-boot-mkimage-native" | 10 | DEPENDS += "u-boot-mkimage-native" |
11 | 11 | ||
12 | S = "${WORKDIR}/git" | 12 | S = "${UNPACKDIR}/git" |
13 | B = "${WORKDIR}/build" | 13 | B = "${WORKDIR}/build" |
14 | 14 | ||
15 | SYSROOT_DIRS += "/boot" | 15 | SYSROOT_DIRS += "/boot" |
16 | 16 | ||
17 | ATF_VERSION ?= "2.2" | 17 | PV .= "+git" |
18 | ATF_VERSION_EXTENSION ?= "-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}" | ||
19 | PV = "${ATF_VERSION}${ATF_VERSION_EXTENSION}+git${SRCPV}" | ||
20 | 18 | ||
21 | BRANCH ?= "" | 19 | BRANCH ?= "" |
22 | REPO ?= "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" | 20 | REPO ?= "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" |
@@ -30,6 +28,7 @@ ATF_BASE_NAME ?= "${PN}-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" | |||
30 | COMPATIBLE_MACHINE ?= "^$" | 28 | COMPATIBLE_MACHINE ?= "^$" |
31 | COMPATIBLE_MACHINE:zynqmp = ".*" | 29 | COMPATIBLE_MACHINE:zynqmp = ".*" |
32 | COMPATIBLE_MACHINE:versal = ".*" | 30 | COMPATIBLE_MACHINE:versal = ".*" |
31 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
33 | 32 | ||
34 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 33 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
35 | 34 | ||
@@ -49,10 +48,12 @@ LD[unexport] = "1" | |||
49 | ATF_CONSOLE_DEFAULT = "" | 48 | ATF_CONSOLE_DEFAULT = "" |
50 | ATF_CONSOLE_DEFAULT:zynqmp = "cadence" | 49 | ATF_CONSOLE_DEFAULT:zynqmp = "cadence" |
51 | ATF_CONSOLE_DEFAULT:versal = "pl011" | 50 | ATF_CONSOLE_DEFAULT:versal = "pl011" |
51 | ATF_CONSOLE_DEFAULT:versal-net = "pl011" | ||
52 | ATF_CONSOLE ?= "${ATF_CONSOLE_DEFAULT}" | 52 | ATF_CONSOLE ?= "${ATF_CONSOLE_DEFAULT}" |
53 | 53 | ||
54 | DEBUG_ATF_DEFAULT = "" | 54 | DEBUG_ATF_DEFAULT = "" |
55 | DEBUG_ATF_DEFAULT:versal = "1" | 55 | DEBUG_ATF_DEFAULT:versal = "1" |
56 | DEBUG_ATF_DEFAULT:versal-net = "1" | ||
56 | DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}" | 57 | DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}" |
57 | 58 | ||
58 | EXTRA_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${ATF_CONSOLE}' if d.getVar('ATF_CONSOLE', True) != '' else ''}" | 59 | EXTRA_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${ATF_CONSOLE}' if d.getVar('ATF_CONSOLE', True) != '' else ''}" |
@@ -74,9 +75,6 @@ EXTRA_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.get | |||
74 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | 75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" |
75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | 76 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" |
76 | 77 | ||
77 | ATF_PROVENCORE = "SPD=pncd SPD_PNCD_NS_IRQ=51 ZYNQMP_BL32_MEM_BASE=0x70000000 ZYNQMP_BL32_MEM_SIZE=0x0FF00000" | ||
78 | EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' ${ATF_PROVENCORE}', '', d)}" | ||
79 | |||
80 | TFA_BL33_LOAD ?= "" | 78 | TFA_BL33_LOAD ?= "" |
81 | EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" | 79 | EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" |
82 | 80 | ||
@@ -127,3 +125,20 @@ FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub" | |||
127 | 125 | ||
128 | # Disable buildpaths QA check warnings for Versal. | 126 | # Disable buildpaths QA check warnings for Versal. |
129 | INSANE_SKIP:${PN}:append:versal = " buildpaths" | 127 | INSANE_SKIP:${PN}:append:versal = " buildpaths" |
128 | INSANE_SKIP:${PN}:append:versal-net = " buildpaths" | ||
129 | |||
130 | python() { | ||
131 | soc_family = d.getVar('SOC_FAMILY') | ||
132 | atf_console = d.getVar('ATF_CONSOLE') | ||
133 | |||
134 | # See plat/xilinx/<soc_family>/platform.mk | ||
135 | if soc_family and soc_family == "zynqmp": | ||
136 | if not atf_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]: | ||
137 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (atf_console)) | ||
138 | elif soc_family and soc_family == "versal": | ||
139 | if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
140 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console)) | ||
141 | elif soc_family and soc_family == "versal-net": | ||
142 | if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
143 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console)) | ||
144 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.1.bb index f02bb879..683af4cf 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.1.bb +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.10-xilinx-v2024.1.bb | |||
@@ -1,6 +1,5 @@ | |||
1 | ATF_VERSION = "2.6" | 1 | SRCREV = "4f82b6134e7b43722616c855e5016d42a3ea26d2" |
2 | SRCREV = "67ca59c67f542322554d78820bf9ddaa736d6a84" | 2 | BRANCH = "xlnx_rebase_v2.10" |
3 | BRANCH = "xlnx_rebase_v2.6" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | 3 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" |
5 | 4 | ||
6 | 5 | ||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.8-xilinx-v2023.1.bb index 2bcbe7d4..0246e2ff 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.8-xilinx-v2023.1.bb | |||
@@ -1,4 +1,3 @@ | |||
1 | ATF_VERSION = "2.8" | ||
2 | SRCREV = "c9b71dc96f3f18ca94cad590612aae3224c8c84d" | 1 | SRCREV = "c9b71dc96f3f18ca94cad590612aae3224c8c84d" |
3 | BRANCH = "xlnx_rebase_v2.8" | 2 | BRANCH = "xlnx_rebase_v2.8" |
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | 3 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" |
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.2.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.8-xilinx-v2023.2.bb index 6ebd6cb5..e160f57c 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.2.bb +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.8-xilinx-v2023.2.bb | |||
@@ -1,4 +1,3 @@ | |||
1 | ATF_VERSION = "2.8" | ||
2 | SRCREV = "6be857cb66300fb21e3f61308e4197911c8ac30d" | 1 | SRCREV = "6be857cb66300fb21e3f61308e4197911c8ac30d" |
3 | BRANCH = "xlnx_rebase_v2.8" | 2 | BRANCH = "xlnx_rebase_v2.8" |
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | 3 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" |
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb deleted file mode 100644 index 5ef2e6ac..00000000 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | ATF_VERSION = "2.6" | ||
2 | SRCREV = "0897efd45ccad29a3dbab610578c70e3a52b2caa" | ||
3 | BRANCH = "xlnx_rebase_v2.6" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | |||
7 | include arm-trusted-firmware.inc | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb index deb8bb3d..28958c36 100644 --- a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb | |||
@@ -4,9 +4,12 @@ LICENSE = "CLOSED" | |||
4 | 4 | ||
5 | PROVIDES = "virtual/base-pdi" | 5 | PROVIDES = "virtual/base-pdi" |
6 | 6 | ||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
7 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
8 | COMPATIBLE_MACHINE:microblaze = ".*" | 10 | COMPATIBLE_MACHINE:microblaze = ".*" |
9 | COMPATIBLE_MACHINE:versal = ".*" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
12 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
10 | 13 | ||
11 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" | 14 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" |
12 | 15 | ||
@@ -15,6 +18,8 @@ do_compile[noexec] = "1" | |||
15 | PDI_PATH ?= "" | 18 | PDI_PATH ?= "" |
16 | SRC_URI += "${@['file://'+d.getVar('PDI_PATH'),''][d.getVar('PDI_PATH') == '']}" | 19 | SRC_URI += "${@['file://'+d.getVar('PDI_PATH'),''][d.getVar('PDI_PATH') == '']}" |
17 | 20 | ||
21 | S = "${UNPACKDIR}" | ||
22 | |||
18 | python() { | 23 | python() { |
19 | if d.getVar('PDI_SKIP_CHECK') != "1" and not d.getVar('PDI_PATH'): | 24 | if d.getVar('PDI_SKIP_CHECK') != "1" and not d.getVar('PDI_PATH'): |
20 | raise bb.parse.SkipRecipe("PDI_PATH is not configured with the base design pdi") | 25 | raise bb.parse.SkipRecipe("PDI_PATH is not configured with the base design pdi") |
@@ -24,9 +29,9 @@ python() { | |||
24 | #will need to bbappend to this in meta-xilinx-tools to use xsct to extract pdi from xsa and install | 29 | #will need to bbappend to this in meta-xilinx-tools to use xsct to extract pdi from xsa and install |
25 | do_install() { | 30 | do_install() { |
26 | 31 | ||
27 | if [ -f ${WORKDIR}/${PDI_PATH} ];then | 32 | if [ -f ${S}/${PDI_PATH} ];then |
28 | install -d ${D}/boot | 33 | install -d ${D}/boot |
29 | install -m 0644 ${WORKDIR}/${PDI_PATH} ${D}/boot/base-design.pdi | 34 | install -m 0644 ${S}/${PDI_PATH} ${D}/boot/base-design.pdi |
30 | else | 35 | else |
31 | bbfatal "No base pdi supplied" | 36 | bbfatal "No base pdi supplied" |
32 | fi | 37 | fi |
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb deleted file mode 100644 index f61761f4..00000000 --- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | # We never want to prefer this over another provider | ||
9 | DEFAULT_PREFERENCE = "-1" | ||
10 | |||
11 | PROVIDES = "virtual/bitstream" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "$^" | ||
14 | COMPATIBLE_MACHINE:zynq = ".*" | ||
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
16 | |||
17 | # Since we're just copying, we can run any config | ||
18 | COMPATIBLE_HOST = ".*" | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | # Path where the bitstream can be found | ||
23 | BITSTREAM_PATH ?= "" | ||
24 | |||
25 | inherit deploy | ||
26 | |||
27 | do_install() { | ||
28 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
29 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/. | ||
34 | } | ||
35 | |||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
38 | do_deploy() { | ||
39 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
40 | if ${SHOULD_DEPLOY}; then | ||
41 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/. | ||
42 | fi | ||
43 | } | ||
44 | |||
45 | def check_bitstream_vars(d): | ||
46 | # If BITSTREAM_PATH is not defined, we error and instruct the user | ||
47 | # Don't cache this, as the items on disk can change! | ||
48 | d.setVar('BB_DONT_CACHE', '1') | ||
49 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
50 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README.") | ||
51 | |||
52 | if not d.getVar('BITSTREAM_PATH'): | ||
53 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
54 | |||
55 | python() { | ||
56 | # Need to allow bbappends to change the check | ||
57 | check_bitstream_vars(d) | ||
58 | } | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb new file mode 100644 index 00000000..97965279 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb | |||
@@ -0,0 +1,76 @@ | |||
1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | BITSTREAM_PATH_DEPENDS ??= "" | ||
9 | DEPENDS += "${BITSTREAM_PATH_DEPENDS}" | ||
10 | |||
11 | # We never want to prefer this over another provider | ||
12 | DEFAULT_PREFERENCE = "-1" | ||
13 | |||
14 | PROVIDES = "virtual/bitstream" | ||
15 | |||
16 | COMPATIBLE_MACHINE = "$^" | ||
17 | COMPATIBLE_MACHINE:zynq = ".*" | ||
18 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
19 | |||
20 | # Since we're just copying, we can run any config | ||
21 | COMPATIBLE_HOST = ".*" | ||
22 | |||
23 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
24 | |||
25 | # Path where the bitstream can be found | ||
26 | BITSTREAM_PATH ?= "" | ||
27 | |||
28 | inherit deploy | ||
29 | |||
30 | BITSTREAM_NAME ?= "download" | ||
31 | BITSTREAM_NAME:microblaze ?= "system" | ||
32 | |||
33 | BITSTREAM_BASE_NAME ?= "${BITSTREAM_NAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
34 | |||
35 | SYSROOT_DIRS += "/boot/bitstream" | ||
36 | |||
37 | do_install() { | ||
38 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
39 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
40 | exit 1 | ||
41 | fi | ||
42 | install -d ${D}/boot/bitstream/ | ||
43 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/bitstream/${BITSTREAM_BASE_NAME}.bit | ||
44 | } | ||
45 | |||
46 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
47 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
48 | do_deploy() { | ||
49 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
50 | if ${SHOULD_DEPLOY}; then | ||
51 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/${BITSTREAM_BASE_NAME}.bit | ||
52 | fi | ||
53 | } | ||
54 | |||
55 | addtask deploy before do_build after do_install | ||
56 | |||
57 | FILES:${PN} += "/boot/bitstream/*.bit" | ||
58 | |||
59 | def check_bitstream_vars(d): | ||
60 | # Assuming if BITSTREAM_PATH_DEPENDS exists, that the file will be available later. | ||
61 | if not d.getVar('BITSTREAM_PATH_DEPENDS'): | ||
62 | # Don't cache this, as the items on disk can change! | ||
63 | d.setVar('BB_DONT_CACHE', '1') | ||
64 | |||
65 | # If BITSTREAM_PATH is not found or defined, we error and instruct the user | ||
66 | if not d.getVar('BITSTREAM_PATH'): | ||
67 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
68 | |||
69 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
70 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README." % d.getVar('BITSTREAM_PATH')) | ||
71 | |||
72 | python() { | ||
73 | # Need to allow bbappends to change the check | ||
74 | check_bitstream_vars(d) | ||
75 | } | ||
76 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb new file mode 100644 index 00000000..f4a96f41 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | DESCRIPTION = "Bootbin version string file" | ||
2 | SUMMARY = "The BIF file for bootbin requires a version file in a specific format" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "^$" | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | BOOTBIN_VER_MAIN ?= "" | ||
11 | |||
12 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" | ||
13 | BOOTBIN_VER_MAX_LEN = "36" | ||
14 | |||
15 | BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | ||
16 | |||
17 | inherit deploy image-artifact-names | ||
18 | |||
19 | IMAGE_NAME_SUFFIX = "" | ||
20 | |||
21 | python do_configure() { | ||
22 | |||
23 | if not 'version' in locals(): | ||
24 | version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN") | ||
25 | version += d.getVar("IMAGE_VERSION_SUFFIX") | ||
26 | |||
27 | if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")): | ||
28 | bb.fatal("version string too long") | ||
29 | |||
30 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: | ||
31 | f.write(version.encode("utf-8").hex()) | ||
32 | |||
33 | with open(d.expand("${B}/${BOOTBIN_MANIFEST_FILE}"), "w") as f: | ||
34 | f.write("* %s\n" % d.getVar('PN')) | ||
35 | f.write("VERSION: %s\n" % version) | ||
36 | f.write("PV: %s\n" % d.getVar('PV')) | ||
37 | f.write("XILINX_VER_MAIN: %s\n" % d.getVar('XILINX_VER_MAIN')) | ||
38 | f.write("XILINX_VER_UPDATE: %s\n" % d.getVar('XILINX_VER_UPDATE')) | ||
39 | f.write("XILINX_VER_BUILD: %s\n\n" % d.getVar('XILINX_VER_BUILD')) | ||
40 | } | ||
41 | |||
42 | do_install() { | ||
43 | install -d ${D}/boot | ||
44 | install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${D}/boot/ | ||
45 | } | ||
46 | |||
47 | do_deploy() { | ||
48 | install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.txt | ||
49 | ln -s ${IMAGE_NAME}.txt ${DEPLOYDIR}/${IMAGE_LINK_NAME}.txt | ||
50 | install -m 0644 ${B}/${BOOTBIN_MANIFEST_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.manifest | ||
51 | ln -s ${IMAGE_NAME}.manifest ${DEPLOYDIR}/${IMAGE_LINK_NAME}.manifest | ||
52 | } | ||
53 | |||
54 | addtask deploy after do_compile | ||
55 | |||
56 | SYSROOT_DIRS += "/boot" | ||
57 | FILES:${PN} += "/boot/${BOOTBIN_VER_FILE}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb new file mode 100644 index 00000000..765d35e8 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | DESCRIPTION = "Bootbin version file - text format" | ||
2 | SUMMARY = "The BIF file for bootbin requires a version file in a text format" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "^$" | ||
7 | |||
8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
9 | |||
10 | BOOTBIN_VER_MAIN ?= "" | ||
11 | BOOTBIN_VER_SUFFIX ?= "${@(d.getVar('XILINX_VER_BUILD') or '')[:8] if d.getVar('XILINX_VER_UPDATE') != 'release' and not d.getVar('XILINX_VER_UPDATE').startswith('update') else ''}" | ||
12 | BOOTBIN_VER_FILE = "bootbin-version-string.txt" | ||
13 | |||
14 | #BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | ||
15 | |||
16 | inherit deploy image-artifact-names | ||
17 | |||
18 | IMAGE_NAME_SUFFIX = "" | ||
19 | |||
20 | python do_configure() { | ||
21 | |||
22 | if not 'version' in locals(): | ||
23 | version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN") | ||
24 | version += d.getVar("IMAGE_VERSION_SUFFIX") | ||
25 | |||
26 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: | ||
27 | f.write(version) | ||
28 | } | ||
29 | |||
30 | do_deploy() { | ||
31 | install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.txt | ||
32 | ln -s ${IMAGE_NAME}.txt ${DEPLOYDIR}/${IMAGE_LINK_NAME}.txt | ||
33 | # install -m 0644 ${B}/${BOOTBIN_MANIFEST_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.manifest | ||
34 | # ln -s ${IMAGE_NAME}.manifest ${DEPLOYDIR}/${IMAGE_LINK_NAME}.manifest | ||
35 | } | ||
36 | |||
37 | addtask deploy after do_compile | ||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal-net.inc b/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal-net.inc new file mode 100644 index 00000000..46191720 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal-net.inc | |||
@@ -0,0 +1 @@ | |||
require machine-xilinx-versal.inc | |||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal.inc b/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal.inc index fff2c7a3..cd6adcef 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal.inc +++ b/meta-xilinx-core/recipes-bsp/bootbin/machine-xilinx-versal.inc | |||
@@ -4,6 +4,9 @@ BOOTGEN_EXTRA_ARGS += "-dump bh" | |||
4 | # specify BIF common attribute for FSBL | 4 | # specify BIF common attribute for FSBL |
5 | BIF_COMMON_ATTR ?= "" | 5 | BIF_COMMON_ATTR ?= "" |
6 | 6 | ||
7 | # specify BIF optional attributes | ||
8 | BIF_OPTIONAL_DATA ?= "" | ||
9 | |||
7 | #specify BIF partition attributes required for BOOT.bin | 10 | #specify BIF partition attributes required for BOOT.bin |
8 | BIF_FSBL_ATTR ??= "base-pdi plmfw psmfw" | 11 | BIF_FSBL_ATTR ??= "base-pdi plmfw psmfw" |
9 | BIF_ATF_ATTR ??= "arm-trusted-firmware" | 12 | BIF_ATF_ATTR ??= "arm-trusted-firmware" |
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb index 4c8bfa0e..2cf4606d 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb | |||
@@ -7,6 +7,8 @@ LICENSE = "BSD" | |||
7 | 7 | ||
8 | include machine-xilinx-${SOC_FAMILY}.inc | 8 | include machine-xilinx-${SOC_FAMILY}.inc |
9 | 9 | ||
10 | BOOTBIN_INCLUDE ?= "" | ||
11 | |||
10 | inherit deploy | 12 | inherit deploy |
11 | 13 | ||
12 | # Don't allow building for microblaze MACHINE | 14 | # Don't allow building for microblaze MACHINE |
@@ -14,13 +16,15 @@ COMPATIBLE_MACHINE ?= "^$" | |||
14 | COMPATIBLE_MACHINE:zynq = ".*" | 16 | COMPATIBLE_MACHINE:zynq = ".*" |
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | 17 | COMPATIBLE_MACHINE:zynqmp = ".*" |
16 | COMPATIBLE_MACHINE:versal = ".*" | 18 | COMPATIBLE_MACHINE:versal = ".*" |
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
17 | 20 | ||
18 | PROVIDES = "virtual/boot-bin" | 21 | PROVIDES = "virtual/boot-bin" |
19 | 22 | ||
20 | DEPENDS += "bootgen-native" | 23 | DEPENDS += "bootgen-native u-boot-xlnx-scr" |
21 | 24 | ||
22 | # There is no bitstream recipe, so really depend on virtual/bitstream | 25 | # There is no bitstream recipe, so really depend on virtual/bitstream |
23 | DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream')}" | 26 | # We need to refer to virtual/arm-trusted-firmware and not arm-trusted-firmware as there may be multiple providers |
27 | DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream').replace('arm-trusted-firmware', 'virtual/arm-trusted-firmware')}" | ||
24 | 28 | ||
25 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 29 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
26 | 30 | ||
@@ -36,13 +40,27 @@ SRC_URI += "${@('file://' + d.getVar("BIF_FILE_PATH")) if d.getVar("BIF_FILE_PAT | |||
36 | # zynqmp : zynqmp | 40 | # zynqmp : zynqmp |
37 | # versal : versal | 41 | # versal : versal |
38 | # versal-net : versalnet | 42 | # versal-net : versalnet |
39 | BOOTGEN_ARCH_DEFAULT = "${SOC_FAMILY}" | 43 | BOOTGEN_ARCH_DEFAULT = "undefined" |
40 | BOOTGEN_ARCH_DEFAULT:versal-net = "${SOC_FAMILY}${SOC_VARIANT}" | 44 | BOOTGEN_ARCH_DEFAULT:zynq = "zynq" |
45 | BOOTGEN_ARCH_DEFAULT:zynqmp = "zynqmp" | ||
46 | BOOTGEN_ARCH_DEFAULT:versal = "versal" | ||
47 | BOOTGEN_ARCH_DEFAULT:versal-net = "versalnet" | ||
41 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" | 48 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" |
42 | BOOTGEN_EXTRA_ARGS ?= "" | 49 | BOOTGEN_EXTRA_ARGS ?= "" |
43 | 50 | ||
51 | QEMU_FLASH_TYPE ?= "qspi" | ||
52 | BOOTSCR_DEP = '' | ||
53 | BOOTSCR_DEP:versal = 'u-boot-xlnx-scr:do_deploy' | ||
54 | BOOTSCR_DEP:versal-net = 'u-boot-xlnx-scr:do_deploy' | ||
55 | |||
56 | BIF_BITSTREAM_ATTR ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', '', 'bitstream', d)}" | ||
57 | |||
58 | S = "${UNPACKDIR}" | ||
59 | |||
44 | do_patch[noexec] = "1" | 60 | do_patch[noexec] = "1" |
45 | 61 | ||
62 | do_compile[depends] .= " ${BOOTSCR_DEP}" | ||
63 | |||
46 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | 64 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): |
47 | arch = d.getVar("SOC_FAMILY") | 65 | arch = d.getVar("SOC_FAMILY") |
48 | bb.error("create_bif function not defined for arch: %s" % (arch)) | 66 | bb.error("create_bif function not defined for arch: %s" % (arch)) |
@@ -125,13 +143,17 @@ python do_configure() { | |||
125 | biffd.write("the_ROM_image:\n") | 143 | biffd.write("the_ROM_image:\n") |
126 | biffd.write("{\n") | 144 | biffd.write("{\n") |
127 | 145 | ||
146 | if d.getVar("BIF_OPTIONAL_DATA"): | ||
147 | opt_data = d.getVar("BIF_OPTIONAL_DATA") or "" | ||
148 | biffd.write("\toptionaldata { %s }\n" % opt_data) | ||
149 | |||
128 | arch = d.getVar("SOC_FAMILY") | 150 | arch = d.getVar("SOC_FAMILY") |
129 | bifattr = (d.getVar("BIF_COMMON_ATTR") or "").split() | 151 | bifattr = (d.getVar("BIF_COMMON_ATTR") or "").split() |
130 | if bifattr: | 152 | if bifattr: |
131 | attrflags = d.getVarFlags("BIF_COMMON_ATTR") or {} | 153 | attrflags = d.getVarFlags("BIF_COMMON_ATTR") or {} |
132 | if arch in ['zynq', 'zynqmp']: | 154 | if arch in ['zynq', 'zynqmp']: |
133 | create_zynq_bif(bifattr, attrflags,'','', 1, biffd, d) | 155 | create_zynq_bif(bifattr, attrflags,'','', 1, biffd, d) |
134 | elif arch in ['versal']: | 156 | elif arch in ['versal', 'versal-net']: |
135 | create_versal_bif(bifattr, attrflags,'','', 1, biffd, d) | 157 | create_versal_bif(bifattr, attrflags,'','', 1, biffd, d) |
136 | else: | 158 | else: |
137 | create_bif(bifattr, attrflags,'','', 1, biffd, d) | 159 | create_bif(bifattr, attrflags,'','', 1, biffd, d) |
@@ -143,7 +165,7 @@ python do_configure() { | |||
143 | ids = d.getVarFlags("BIF_PARTITION_ID") or {} | 165 | ids = d.getVarFlags("BIF_PARTITION_ID") or {} |
144 | if arch in ['zynq', 'zynqmp']: | 166 | if arch in ['zynq', 'zynqmp']: |
145 | create_zynq_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | 167 | create_zynq_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) |
146 | elif arch in ['versal']: | 168 | elif arch in ['versal', 'versal-net']: |
147 | create_versal_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | 169 | create_versal_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) |
148 | else: | 170 | else: |
149 | create_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) | 171 | create_bif(bifpartition, attrflags, attrimage, ids, 0, biffd, d) |
@@ -158,10 +180,10 @@ do_configure[vardeps] += "BIF_PARTITION_ATTR BIF_PARTITION_IMAGE BIF_COMMON_ATTR | |||
158 | do_configure[vardeps] += "BIF_FSBL_ATTR BIF_BITSTREAM_ATTR BIF_ATF_ATTR BIF_DEVICETREE_ATTR BIF_SSBL_ATTR" | 180 | do_configure[vardeps] += "BIF_FSBL_ATTR BIF_BITSTREAM_ATTR BIF_ATF_ATTR BIF_DEVICETREE_ATTR BIF_SSBL_ATTR" |
159 | 181 | ||
160 | do_compile() { | 182 | do_compile() { |
161 | cd ${WORKDIR} | 183 | cd ${S} |
162 | rm -f ${B}/BOOT.bin | 184 | rm -f ${B}/BOOT.bin |
163 | if [ "${BIF_FILE_PATH}" != "${B}/bootgen.bif" ];then | 185 | if [ "${BIF_FILE_PATH}" != "${B}/bootgen.bif" ];then |
164 | BIF_FILE_PATH="${WORKDIR}${BIF_FILE_PATH}" | 186 | BIF_FILE_PATH="${@os.path.join(d.getVar('S'), d.getVar('BIF_FILE_PATH'))}" |
165 | fi | 187 | fi |
166 | bootgen -image ${BIF_FILE_PATH} -arch ${BOOTGEN_ARCH} ${BOOTGEN_EXTRA_ARGS} -w -o ${B}/BOOT.bin | 188 | bootgen -image ${BIF_FILE_PATH} -arch ${BOOTGEN_ARCH} ${BOOTGEN_EXTRA_ARGS} -w -o ${B}/BOOT.bin |
167 | if [ ! -e ${B}/BOOT.bin ]; then | 189 | if [ ! -e ${B}/BOOT.bin ]; then |
@@ -169,6 +191,18 @@ do_compile() { | |||
169 | fi | 191 | fi |
170 | } | 192 | } |
171 | 193 | ||
194 | do_compile:append:versal() { | ||
195 | dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin | ||
196 | dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc | ||
197 | dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc | ||
198 | } | ||
199 | |||
200 | do_compile:append:versal-net() { | ||
201 | dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin | ||
202 | dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc | ||
203 | dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc | ||
204 | } | ||
205 | |||
172 | do_install() { | 206 | do_install() { |
173 | install -d ${D}/boot | 207 | install -d ${D}/boot |
174 | install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin | 208 | install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin |
@@ -176,7 +210,7 @@ do_install() { | |||
176 | 210 | ||
177 | inherit image-artifact-names | 211 | inherit image-artifact-names |
178 | 212 | ||
179 | QEMUQSPI_BASE_NAME ?= "QEMU_qspi-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 213 | QEMU_FLASH_IMAGE_NAME ?= "qemu-${QEMU_FLASH_TYPE}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
180 | 214 | ||
181 | BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 215 | BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
182 | 216 | ||
@@ -191,6 +225,18 @@ do_deploy:append:versal () { | |||
191 | 225 | ||
192 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin | 226 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin |
193 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin | 227 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin |
228 | |||
229 | install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin | ||
230 | ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin | ||
231 | } | ||
232 | |||
233 | do_deploy:append:versal-net () { | ||
234 | |||
235 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin | ||
236 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin | ||
237 | |||
238 | install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin | ||
239 | ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin | ||
194 | } | 240 | } |
195 | 241 | ||
196 | FILES:${PN} += "/boot/BOOT.bin" | 242 | FILES:${PN} += "/boot/BOOT.bin" |
diff --git a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb deleted file mode 100644 index fdf28f41..00000000 --- a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | SUMMARY = "Building and installing bootgen" | ||
2 | DESCRIPTION = "Building and installing bootgen, a Xilinx tool that lets you stitch binary files together and generate device boot images" | ||
3 | |||
4 | LICENSE = "Apache-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | DEPENDS += "openssl" | ||
10 | RDEPENDS:${PN} += "openssl" | ||
11 | |||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | ||
13 | BRANCH ?= "xlnx_rel_v2022.2" | ||
14 | SRCREV = "cf4ba93b99644dc4429ef633471a639e1382f0e7" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | EXTRA_OEMAKE += 'CROSS_COMPILER="${CXX}" -C ${S}' | ||
20 | CXXFLAGS:append = " -std=c++0x" | ||
21 | |||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${bindir} | ||
26 | install -Dm 0755 ${S}/bootgen ${D}${bindir} | ||
27 | } | ||
28 | |||
29 | FILES:${PN} = "${bindir}/bootgen" | ||
30 | |||
31 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.1.bb b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.1.bb deleted file mode 100644 index a934230d..00000000 --- a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.1.bb +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | SUMMARY = "Building and installing bootgen" | ||
2 | DESCRIPTION = "Building and installing bootgen, a Xilinx tool that lets you stitch binary files together and generate device boot images" | ||
3 | |||
4 | LICENSE = "Apache-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | DEPENDS += "openssl" | ||
10 | RDEPENDS:${PN} += "openssl" | ||
11 | |||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | ||
13 | BRANCH = "xlnx_rel_v2023.1" | ||
14 | SRCREV = "4f1e1caf2c09cdeacc35cbeedaf2550c6e44c7fd" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | EXTRA_OEMAKE += 'CROSS_COMPILER="${CXX}" -C ${S}' | ||
20 | CXXFLAGS:append = " -std=c++0x" | ||
21 | |||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${bindir} | ||
26 | install -Dm 0755 ${S}/bootgen ${D}${bindir} | ||
27 | } | ||
28 | |||
29 | FILES:${PN} = "${bindir}/bootgen" | ||
30 | |||
31 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb index 8b1e52ac..17d8af8c 100644 --- a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb | |||
@@ -12,6 +12,7 @@ do_compile[depends] += "virtual/boot-bin:do_deploy" | |||
12 | 12 | ||
13 | COMPATIBLE_MACHINE = "^$" | 13 | COMPATIBLE_MACHINE = "^$" |
14 | COMPATIBLE_MACHINE:versal = "versal" | 14 | COMPATIBLE_MACHINE:versal = "versal" |
15 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
15 | 16 | ||
16 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" | 17 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" |
17 | 18 | ||
@@ -36,4 +37,4 @@ do_deploy() { | |||
36 | install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin | 37 | install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin |
37 | } | 38 | } |
38 | 39 | ||
39 | addtask do_deploy after do_compile | 40 | addtask deploy before do_build after do_install |
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 8d7211f5..0fc20298 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,10 @@ inherit devicetree image-artifact-names | |||
23 | SYSTEM_DTFILE ??= "" | 23 | SYSTEM_DTFILE ??= "" |
24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" | 24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" |
25 | 25 | ||
26 | BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" | 26 | SYSTEM_DTFILE_DEPENDS ??= "" |
27 | DEPENDS += "${SYSTEM_DTFILE_DEPENDS}" | ||
28 | |||
29 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" | ||
27 | 30 | ||
28 | EXTRA_DT_FILES ?= "" | 31 | EXTRA_DT_FILES ?= "" |
29 | EXTRA_DTFILE_PREFIX ?= "system-top" | 32 | EXTRA_DTFILE_PREFIX ?= "system-top" |
@@ -31,12 +34,12 @@ EXTRA_DTFILES_BUNDLE ?= "" | |||
31 | UBOOT_DT_FILES ?= "" | 34 | UBOOT_DT_FILES ?= "" |
32 | UBOOT_DTFILE_PREFIX ?= "system-top" | 35 | UBOOT_DTFILE_PREFIX ?= "system-top" |
33 | UBOOT_DTFILES_BUNDLE ?= "" | 36 | UBOOT_DTFILES_BUNDLE ?= "" |
34 | EXTRA_OVERLAYS ?= "" | 37 | EXTRA_DT_INCLUDE_FILES ?= "" |
35 | 38 | ||
36 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" | 39 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" |
37 | CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" | 40 | CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" |
38 | EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" | 41 | EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" |
39 | EXTRA_OVERLAYS[doc] = "Add extra files to DT_FILES_PATH and adds a #include for each to the BASE_DTS, it access 1..n dtsi files and adds to SRC_URI" | 42 | EXTRA_DT_INCLUDE_FILES[doc] = "Add extra files to DT_FILES_PATH and adds a #include for each to the BASE_DTS, it access 1..n dtsi files and adds to SRC_URI" |
40 | 43 | ||
41 | # There should only be ONE CONFIG_DTFILE listed | 44 | # There should only be ONE CONFIG_DTFILE listed |
42 | # These need to be passed in from global, not from a bbappend | 45 | # These need to be passed in from global, not from a bbappend |
@@ -44,11 +47,12 @@ FILESEXTRAPATHS:prepend := "${@'%s:' % os.path.dirname(d.getVar('CONFIG_DTFILE') | |||
44 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" | 47 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" |
45 | 48 | ||
46 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" | 49 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" |
47 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_OVERLAYS') or "").split()])}" | 50 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_INCLUDE_FILES') or "").split()])}" |
48 | 51 | ||
49 | COMPATIBLE_MACHINE:zynq = ".*" | 52 | COMPATIBLE_MACHINE:zynq = ".*" |
50 | COMPATIBLE_MACHINE:zynqmp = ".*" | 53 | COMPATIBLE_MACHINE:zynqmp = ".*" |
51 | COMPATIBLE_MACHINE:versal = ".*" | 54 | COMPATIBLE_MACHINE:versal = ".*" |
55 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
52 | 56 | ||
53 | DEPENDS += "python3-dtc-native" | 57 | DEPENDS += "python3-dtc-native" |
54 | 58 | ||
@@ -61,7 +65,7 @@ DTB_FILE_NAME ?= "${BASE_DTS}.dtb" | |||
61 | 65 | ||
62 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" | 66 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" |
63 | 67 | ||
64 | # Copy the EXTRA_DT_FILES and EXTRA_OVERLAYS files in prepend operation so that | 68 | # Copy the EXTRA_DT_FILES and EXTRA_DT_INCLUDE_FILES files in prepend operation so that |
65 | # it can be preprocessed. | 69 | # it can be preprocessed. |
66 | do_configure:prepend () { | 70 | do_configure:prepend () { |
67 | # Create DT_FILES_PATH directory if doesn't exist during prepend operation. | 71 | # Create DT_FILES_PATH directory if doesn't exist during prepend operation. |
@@ -69,20 +73,20 @@ do_configure:prepend () { | |||
69 | mkdir -p ${DT_FILES_PATH} | 73 | mkdir -p ${DT_FILES_PATH} |
70 | fi | 74 | fi |
71 | 75 | ||
72 | for f in ${EXTRA_DT_FILES} ${EXTRA_OVERLAYS}; do | 76 | for f in ${EXTRA_DT_FILES} ${EXTRA_DT_INCLUDE_FILES}; do |
73 | if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then | 77 | if [ "$(realpath ${UNPACKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then |
74 | cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ | 78 | cp ${UNPACKDIR}/${f} ${DT_FILES_PATH}/ |
75 | fi | 79 | fi |
76 | done | 80 | done |
77 | } | 81 | } |
78 | 82 | ||
79 | do_configure:append () { | 83 | do_configure:append () { |
80 | for f in ${EXTRA_OVERLAYS}; do | 84 | for f in ${EXTRA_DT_INCLUDE_FILES}; do |
81 | if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then | 85 | if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then |
82 | if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then | 86 | if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then |
83 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" | 87 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" |
84 | else | 88 | else |
85 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts" | 89 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must set a valid CONFIG_DTFILE or use system-top.dts" |
86 | fi | 90 | fi |
87 | exit 1 | 91 | exit 1 |
88 | fi | 92 | fi |
@@ -130,7 +134,7 @@ devicetree_do_install:append() { | |||
130 | fi | 134 | fi |
131 | if [ -e "${D}/boot/devicetree/${DTB_FILE_NAME}" ]; then | 135 | if [ -e "${D}/boot/devicetree/${DTB_FILE_NAME}" ]; then |
132 | # We need the output to be system.dtb for WIC setup to match XSCT flow | 136 | # We need the output to be system.dtb for WIC setup to match XSCT flow |
133 | ln -sf devicetree/${DTB_FILE_NAME} ${D}/boot/system.dtb | 137 | cp ${D}/boot/devicetree/${DTB_FILE_NAME} ${D}/boot/system.dtb |
134 | else | 138 | else |
135 | bberror "Expected filename ${DTB_FILE_NAME} doesn't exist in ${DEPLOYDIR}/devicetree" | 139 | bberror "Expected filename ${DTB_FILE_NAME} doesn't exist in ${DEPLOYDIR}/devicetree" |
136 | fi | 140 | fi |
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb index b4de4fe6..9e0f07ac 100644 --- a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb | |||
@@ -17,8 +17,9 @@ SOVERSION = "${SOMAJOR}.${SOMINOR}" | |||
17 | COMPATIBLE_MACHINE = "^$" | 17 | COMPATIBLE_MACHINE = "^$" |
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
19 | COMPATIBLE_MACHINE:versal = "versal" | 19 | COMPATIBLE_MACHINE:versal = "versal" |
20 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
20 | 21 | ||
21 | S = "${WORKDIR}/git" | 22 | S = "${UNPACKDIR}/git" |
22 | 23 | ||
23 | inherit cmake update-rc.d systemd | 24 | inherit cmake update-rc.d systemd |
24 | 25 | ||
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.1.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.1.bb index a4149d39..2699a55d 100644 --- a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.1.bb | |||
@@ -17,8 +17,9 @@ SOVERSION = "${SOMAJOR}.${SOMINOR}" | |||
17 | COMPATIBLE_MACHINE = "^$" | 17 | COMPATIBLE_MACHINE = "^$" |
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
19 | COMPATIBLE_MACHINE:versal = "versal" | 19 | COMPATIBLE_MACHINE:versal = "versal" |
20 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
20 | 21 | ||
21 | S = "${WORKDIR}/git" | 22 | S = "${UNPACKDIR}/git" |
22 | 23 | ||
23 | inherit cmake update-rc.d systemd | 24 | inherit cmake update-rc.d systemd |
24 | 25 | ||
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb index 0d24c9fc..da2f3e26 100644 --- a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2023.2.bb | |||
@@ -9,7 +9,7 @@ BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != ' | |||
9 | SRC_URI = "${REPO};${BRANCHARG}" | 9 | SRC_URI = "${REPO};${BRANCHARG}" |
10 | 10 | ||
11 | BRANCH = "xlnx_rel_v2023.2" | 11 | BRANCH = "xlnx_rel_v2023.2" |
12 | SRCREV = "4dbd33accb043bd92ecbec2a3507f85a22045c51" | 12 | SRCREV = "898fe38023d15d54402c788bcbca67a29eb2dc3d" |
13 | SOMAJOR = "1" | 13 | SOMAJOR = "1" |
14 | SOMINOR = "0" | 14 | SOMINOR = "0" |
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | 15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" |
@@ -17,12 +17,13 @@ SOVERSION = "${SOMAJOR}.${SOMINOR}" | |||
17 | COMPATIBLE_MACHINE = "^$" | 17 | COMPATIBLE_MACHINE = "^$" |
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
19 | COMPATIBLE_MACHINE:versal = "versal" | 19 | COMPATIBLE_MACHINE:versal = "versal" |
20 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
20 | 21 | ||
21 | S = "${WORKDIR}/git" | 22 | S = "${UNPACKDIR}/git" |
22 | 23 | ||
23 | inherit cmake update-rc.d systemd | 24 | inherit cmake update-rc.d systemd |
24 | 25 | ||
25 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm" | 26 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" |
26 | RDEPENDS:${PN} += " freeipmi" | 27 | RDEPENDS:${PN} += " freeipmi" |
27 | EXTRA_OECMAKE += " \ | 28 | EXTRA_OECMAKE += " \ |
28 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | 29 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ |
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..261156f9 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb | |||
@@ -0,0 +1,73 @@ | |||
1 | SUMMARY = "Xilinx dfx-mgr libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e" | ||
6 | |||
7 | REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https" | ||
8 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
9 | SRC_URI = "${REPO};${BRANCHARG}" | ||
10 | |||
11 | BRANCH = "xlnx_rel_v2024.1" | ||
12 | SRCREV = "ec70363a2a878737057995f922a9460d18aafa26" | ||
13 | SOMAJOR = "1" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
21 | |||
22 | S = "${UNPACKDIR}/git" | ||
23 | |||
24 | inherit cmake update-rc.d systemd | ||
25 | |||
26 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" | ||
27 | RDEPENDS:${PN} += " freeipmi" | ||
28 | EXTRA_OECMAKE += " \ | ||
29 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
30 | " | ||
31 | |||
32 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
33 | INITSCRIPT_PARAMS = "start 99 S ." | ||
34 | |||
35 | SYSTEMD_PACKAGES="${PN}" | ||
36 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
37 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
38 | |||
39 | |||
40 | do_install(){ | ||
41 | install -d ${D}${bindir} | ||
42 | install -d ${D}${libdir} | ||
43 | install -d ${D}${includedir} | ||
44 | install -d ${D}${base_libdir}/firmware/xilinx | ||
45 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
46 | |||
47 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
48 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
49 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
50 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
51 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
52 | |||
53 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
54 | |||
55 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
56 | |||
57 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
58 | install -d ${D}${sysconfdir}/init.d/ | ||
59 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
60 | fi | ||
61 | |||
62 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
63 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
64 | |||
65 | install -d ${D}${systemd_system_unitdir} | ||
66 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
67 | } | ||
68 | |||
69 | PACKAGES =+ "libdfx-mgr" | ||
70 | |||
71 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
72 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
73 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb new file mode 100644 index 00000000..8f634398 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "Xilinx dfx-mgr libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e" | ||
6 | |||
7 | REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https" | ||
8 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
9 | SRC_URI = "${REPO};${BRANCHARG}" | ||
10 | |||
11 | BRANCH = "xlnx_rel_v2024.2" | ||
12 | SRCREV = "839e8e646c54a63326e36c48a7bd879f5e8efa31" | ||
13 | SOMAJOR = "2" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
20 | COMPATIBLE_MACHINE:versal = ".*" | ||
21 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
22 | |||
23 | S = "${UNPACKDIR}/git" | ||
24 | |||
25 | inherit cmake update-rc.d systemd | ||
26 | |||
27 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" | ||
28 | RDEPENDS:${PN} += " freeipmi" | ||
29 | EXTRA_OECMAKE += " \ | ||
30 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
31 | " | ||
32 | |||
33 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
34 | INITSCRIPT_PARAMS = "start 99 S ." | ||
35 | |||
36 | SYSTEMD_PACKAGES="${PN}" | ||
37 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
38 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
39 | |||
40 | |||
41 | do_install(){ | ||
42 | install -d ${D}${bindir} | ||
43 | install -d ${D}${libdir} | ||
44 | install -d ${D}${includedir} | ||
45 | install -d ${D}${base_libdir}/firmware/xilinx | ||
46 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
47 | |||
48 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
49 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
50 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
51 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
52 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
53 | |||
54 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
55 | |||
56 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
57 | |||
58 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
59 | install -d ${D}${sysconfdir}/init.d/ | ||
60 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
61 | fi | ||
62 | |||
63 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
64 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
65 | |||
66 | install -d ${D}${systemd_system_unitdir} | ||
67 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
68 | } | ||
69 | |||
70 | PACKAGES =+ "libdfx-mgr" | ||
71 | |||
72 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
73 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
74 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb index a704d3b5..ca18672b 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/fsbl.bb | |||
@@ -4,7 +4,7 @@ LICENSE = "CLOSED" | |||
4 | 4 | ||
5 | PROVIDES = "virtual/fsbl" | 5 | PROVIDES = "virtual/fsbl" |
6 | 6 | ||
7 | INHERIT_DEFAULT_DEPENDS = "1" | 7 | INHIBIT_DEFAULT_DEPS = "1" |
8 | 8 | ||
9 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
10 | COMPATIBLE_MACHINE:zynq = "zynq" | 10 | COMPATIBLE_MACHINE:zynq = "zynq" |
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb new file mode 100644 index 00000000..e87e8793 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb | |||
@@ -0,0 +1,69 @@ | |||
1 | DESCRIPTION = "Image Recovery" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/imgrcry" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | COMPATIBLE_MACHINE = "^$" | ||
10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
11 | |||
12 | # Since we're just copying, we can run any config | ||
13 | COMPATIBLE_HOST = ".*" | ||
14 | |||
15 | # Default expects the user to provide the imagerecovery in the deploy | ||
16 | # directory, named "image-recovery-${MACHINE}.bin" and "image-recovery-${MACHINE}.bin" | ||
17 | # A machine, multiconfig, or local.conf should override this | ||
18 | IMGRCRY_DEPENDS ??= "" | ||
19 | IMGRCRY_MCDEPENDS ??= "" | ||
20 | IMGRCRY_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
21 | IMGRCRY_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
22 | IMGRCRY_IMAGE_NAME ??= "image-recovery-${MACHINE}" | ||
23 | |||
24 | # Default is for the multilib case (without the extension .bin) | ||
25 | IMGRCRY_FILE ??= "${IMGRCRY_DEPLOY_DIR}/${IMGRCRY_IMAGE_NAME}" | ||
26 | IMGRCRY_FILE[vardepsexclude] = "IMGRCRY_DEPLOY_DIR" | ||
27 | |||
28 | do_fetch[depends] += "${IMGRCRY_DEPENDS}" | ||
29 | do_fetch[mcdepends] += "${IMGRCRY_MCDEPENDS}" | ||
30 | |||
31 | inherit deploy | ||
32 | |||
33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGRCRY_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
35 | do_deploy() { | ||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | if ${SHOULD_DEPLOY}; then | ||
38 | install -Dm 0644 ${IMGRCRY_FILE}.bin ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.bin | ||
39 | install -Dm 0644 ${IMGRCRY_FILE}.elf ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.elf | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | addtask deploy before do_build after do_install | ||
44 | |||
45 | INSANE_SKIP:${PN} = "arch" | ||
46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
50 | |||
51 | def check_imgrcry_variables(d): | ||
52 | # If both are blank, the user MUST pass in the path to the firmware! | ||
53 | if not d.getVar('IMGRCRY_DEPENDS') and not d.getVar('IMGRCRY_MCDEPENDS'): | ||
54 | # Don't cache this, as the items on disk can change! | ||
55 | d.setVar('BB_DONT_CACHE', '1') | ||
56 | |||
57 | if not os.path.exists(d.getVar('IMGRCRY_FILE') + ".bin"): | ||
58 | if not d.getVar('WITHIN_EXT_SDK'): | ||
59 | raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGRCRY_FILE to the path with a precompiled IMGRCRY binary." % d.getVar('IMGRCRY_FILE')) | ||
60 | else: | ||
61 | # We found the file, so be sure to track it | ||
62 | d.setVar('SRC_URI', 'file://${IMGRCRY_FILE}.bin') | ||
63 | d.setVarFlag('do_install', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
64 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
65 | |||
66 | python() { | ||
67 | # Need to allow bbappends to change the check | ||
68 | check_imgrcry_variables(d) | ||
69 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb new file mode 100644 index 00000000..0c0f1549 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | DESCRIPTION = "Image Selector" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/imgsel" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | COMPATIBLE_MACHINE = "^$" | ||
10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
11 | |||
12 | # Since we're just copying, we can run any config | ||
13 | COMPATIBLE_HOST = ".*" | ||
14 | |||
15 | # Default expects the user to provide the imageselector in the deploy | ||
16 | # directory, named "image-selector-${MACHINE}.bin" and "image-selector-${MACHINE}.bin" | ||
17 | # A machine, multiconfig, or local.conf should override this | ||
18 | IMGSEL_DEPENDS ??= "" | ||
19 | IMGSEL_MCDEPENDS ??= "" | ||
20 | IMGSEL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
21 | IMGSEL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
22 | IMGSEL_IMAGE_NAME ??= "image-selector-${MACHINE}" | ||
23 | |||
24 | # Default is for the multilib case (without the extension .bin) | ||
25 | IMGSEL_FILE ??= "${IMGSEL_DEPLOY_DIR}/${IMGSEL_IMAGE_NAME}" | ||
26 | IMGSEL_FILE[vardepsexclude] = "IMGSEL_DEPLOY_DIR" | ||
27 | |||
28 | do_fetch[depends] += "${IMGSEL_DEPENDS}" | ||
29 | do_fetch[mcdepends] += "${IMGSEL_MCDEPENDS}" | ||
30 | |||
31 | inherit deploy | ||
32 | |||
33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGSEL_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
35 | do_deploy() { | ||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | if ${SHOULD_DEPLOY}; then | ||
38 | install -Dm 0644 ${IMGSEL_FILE}.bin ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.bin | ||
39 | install -Dm 0644 ${IMGSEL_FILE}.elf ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.elf | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | addtask deploy before do_build after do_install | ||
44 | |||
45 | INSANE_SKIP:${PN} = "arch" | ||
46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
50 | |||
51 | #SYSROOT_DIRS += "/boot" | ||
52 | #FILES:${PN} = "/boot/${PN}.bin" | ||
53 | |||
54 | def check_imgsel_variables(d): | ||
55 | # If both are blank, the user MUST pass in the path to the firmware! | ||
56 | if not d.getVar('IMGSEL_DEPENDS') and not d.getVar('IMGSEL_MCDEPENDS'): | ||
57 | # Don't cache this, as the items on disk can change! | ||
58 | d.setVar('BB_DONT_CACHE', '1') | ||
59 | |||
60 | if not os.path.exists(d.getVar('IMGSEL_FILE') + ".bin"): | ||
61 | if not d.getVar('WITHIN_EXT_SDK'): | ||
62 | raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGSEL_FILE to the path with a precompiled IMGSEL binary." % d.getVar('IMGSEL_FILE')) | ||
63 | else: | ||
64 | # We found the file, so be sure to track it | ||
65 | d.setVar('SRC_URI', 'file://${IMGSEL_FILE}.bin') | ||
66 | d.setVarFlag('do_install', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
67 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
68 | |||
69 | python() { | ||
70 | # Need to allow bbappends to change the check | ||
71 | check_imgsel_variables(d) | ||
72 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb index d398ca88..80063f85 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb | |||
@@ -5,10 +5,11 @@ LICENSE = "CLOSED" | |||
5 | 5 | ||
6 | PROVIDES = "virtual/plm" | 6 | PROVIDES = "virtual/plm" |
7 | 7 | ||
8 | INHERIT_DEFAULT_DEPENDS = "1" | 8 | INHIBIT_DEFAULT_DEPS = "1" |
9 | 9 | ||
10 | COMPATIBLE_MACHINE = "^$" | 10 | COMPATIBLE_MACHINE = "^$" |
11 | COMPATIBLE_MACHINE:versal = ".*" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
12 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
12 | 13 | ||
13 | # Since we're just copying, we can run any config | 14 | # Since we're just copying, we can run any config |
14 | COMPATIBLE_HOST = ".*" | 15 | COMPATIBLE_HOST = ".*" |
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb index 913e9088..344a6f7a 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb | |||
@@ -4,7 +4,7 @@ LICENSE = "CLOSED" | |||
4 | 4 | ||
5 | PROVIDES = "virtual/pmu-firmware" | 5 | PROVIDES = "virtual/pmu-firmware" |
6 | 6 | ||
7 | INHERIT_DEFAULT_DEPENDS = "1" | 7 | INHIBIT_DEFAULT_DEPS = "1" |
8 | 8 | ||
9 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
10 | COMPATIBLE_MACHINE:zynqmp = ".*" | 10 | COMPATIBLE_MACHINE:zynqmp = ".*" |
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb index 27f921b9..3fa6d98c 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb | |||
@@ -5,10 +5,11 @@ LICENSE = "CLOSED" | |||
5 | 5 | ||
6 | PROVIDES = "virtual/psm-firmware" | 6 | PROVIDES = "virtual/psm-firmware" |
7 | 7 | ||
8 | INHERIT_DEFAULT_DEPENDS = "1" | 8 | INHIBIT_DEFAULT_DEPS = "1" |
9 | 9 | ||
10 | COMPATIBLE_MACHINE = "^$" | 10 | COMPATIBLE_MACHINE = "^$" |
11 | COMPATIBLE_MACHINE:versal = ".*" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
12 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
12 | 13 | ||
13 | # Since we're just copying, we can run any config | 14 | # Since we're just copying, we can run any config |
14 | COMPATIBLE_HOST = ".*" | 15 | COMPATIBLE_HOST = ".*" |
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 | ||
78 | static 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 | |||
78 | void print_usage(char *prg) | 92 | void 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..f7eaa111 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,12 +1,12 @@ | |||
1 | SUMMARY = "Install user script to support fpga-manager" | 1 | SUMMARY = "Install user script to support fpga-manager" |
2 | DESCRIPTION = "Install user script that loads and unloads overlays using kernel fpga-manager" | 2 | DESCRIPTION = "Install user script that loads and unloads overlays using kernel fpga-manager" |
3 | LICENSE = "Proprietary" | 3 | LICENSE = "Proprietary" |
4 | LIC_FILES_CHKSUM = "file://${WORKDIR}/fpgautil.c;beginline=1;endline=24;md5=0c02eabf57dba52842c5df9b96bccfae" | 4 | LIC_FILES_CHKSUM = "file://fpgautil.c;beginline=1;endline=24;md5=0dbf04c2c1026b3d120136e728b7a09f" |
5 | 5 | ||
6 | SRC_URI = "\ | 6 | SRC_URI = "\ |
7 | file://fpgautil.c \ | 7 | file://fpgautil.c \ |
8 | " | 8 | " |
9 | S = "${WORKDIR}" | 9 | S = "${UNPACKDIR}" |
10 | 10 | ||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 11 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
12 | 12 | ||
diff --git a/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb index 2114eafd..af786e7e 100644 --- a/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb +++ b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb | |||
@@ -18,18 +18,18 @@ do_install[vardepsexclude] += "DEPLOY_DIR_IMAGE" | |||
18 | do_install[depends] += "${INITRAMFS_IMAGE}:do_image_complete" | 18 | do_install[depends] += "${INITRAMFS_IMAGE}:do_image_complete" |
19 | do_install[cleandirs] = "${D}" | 19 | do_install[cleandirs] = "${D}" |
20 | do_install() { | 20 | do_install() { |
21 | if [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot ]; then | 21 | if [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ]; then |
22 | install -d ${D}/boot/ | 22 | install -d ${D}/boot/ |
23 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot ${D}/boot/. | 23 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ${D}/boot/. |
24 | else | 24 | else |
25 | bbfatal "Unable to find expected initramfs: ${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot" | 25 | bbfatal "Unable to find expected initramfs: ${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot" |
26 | fi | 26 | fi |
27 | } | 27 | } |
28 | 28 | ||
29 | PACKAGES = "${PACKAGE_BEFORE_PN} ${PN}" | 29 | PACKAGES = "${PACKAGE_BEFORE_PN} ${PN}" |
30 | 30 | ||
31 | RPROVIDES:${PN} = "initramdisk" | 31 | RPROVIDES:${PN} = "initramdisk" |
32 | FILES:${PN} = "/boot/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot" | 32 | FILES:${PN} = "/boot/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot" |
33 | 33 | ||
34 | python() { | 34 | python() { |
35 | if not d.getVar('INITRAMFS_IMAGE'): | 35 | if not d.getVar('INITRAMFS_IMAGE'): |
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb index 2c180561..7727b93d 100644 --- a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb | |||
@@ -13,8 +13,9 @@ SRCREV = "f2b7bbca9d6936141024becfb92266600eeefc2b" | |||
13 | COMPATIBLE_MACHINE = "^$" | 13 | COMPATIBLE_MACHINE = "^$" |
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
15 | COMPATIBLE_MACHINE:versal = "versal" | 15 | COMPATIBLE_MACHINE:versal = "versal" |
16 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
16 | 17 | ||
17 | S = "${WORKDIR}/git" | 18 | S = "${UNPACKDIR}/git" |
18 | 19 | ||
19 | inherit cmake | 20 | inherit cmake |
20 | 21 | ||
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.1.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.1.bb index 287246c2..e64687f5 100644 --- a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.1.bb | |||
@@ -13,8 +13,9 @@ SRCREV = "52c1d83c72a2b2e85d256411a199ed1baed12ae1" | |||
13 | COMPATIBLE_MACHINE = "^$" | 13 | COMPATIBLE_MACHINE = "^$" |
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
15 | COMPATIBLE_MACHINE:versal = "versal" | 15 | COMPATIBLE_MACHINE:versal = "versal" |
16 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
16 | 17 | ||
17 | S = "${WORKDIR}/git" | 18 | S = "${UNPACKDIR}/git" |
18 | 19 | ||
19 | inherit cmake | 20 | inherit cmake |
20 | 21 | ||
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb index b3ccb884..06d991df 100644 --- a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2023.2.bb | |||
@@ -13,8 +13,9 @@ SRCREV = "52c1d83c72a2b2e85d256411a199ed1baed12ae1" | |||
13 | COMPATIBLE_MACHINE = "^$" | 13 | COMPATIBLE_MACHINE = "^$" |
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
15 | COMPATIBLE_MACHINE:versal = "versal" | 15 | COMPATIBLE_MACHINE:versal = "versal" |
16 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
16 | 17 | ||
17 | S = "${WORKDIR}/git" | 18 | S = "${UNPACKDIR}/git" |
18 | 19 | ||
19 | inherit cmake | 20 | inherit cmake |
20 | 21 | ||
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..9eea4fbe --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Xilinx libdfx library" | ||
2 | DESCRIPTION = "Xilinx libdfx Library and headers" | ||
3 | |||
4 | LICENSE = "MIT & GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7" | ||
6 | |||
7 | BRANCH ?= "xlnx_rel_v2024.1" | ||
8 | REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https" | ||
9 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
10 | SRC_URI = "${REPO};${BRANCHARG}" | ||
11 | SRCREV = "c8275891ead62b3dfce68c00cf466715f0ac75f1" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
15 | COMPATIBLE_MACHINE:versal = "versal" | ||
16 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
17 | |||
18 | S = "${UNPACKDIR}/git" | ||
19 | |||
20 | inherit cmake | ||
21 | |||
22 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
23 | # so updates will work properly. | ||
24 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb new file mode 100644 index 00000000..fcea2da7 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Xilinx libdfx library" | ||
2 | DESCRIPTION = "Xilinx libdfx Library and headers" | ||
3 | |||
4 | LICENSE = "MIT & GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7" | ||
6 | |||
7 | BRANCH ?= "xlnx_rel_v2024.2" | ||
8 | REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https" | ||
9 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
10 | SRC_URI = "${REPO};${BRANCHARG}" | ||
11 | SRCREV = "af8d735fae286e7bc94c830a86c960598a4ac014" | ||
12 | |||
13 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
14 | COMPATIBLE_MACHINE = "^$" | ||
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
16 | COMPATIBLE_MACHINE:versal = ".*" | ||
17 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
18 | |||
19 | S = "${UNPACKDIR}/git" | ||
20 | |||
21 | inherit cmake | ||
22 | |||
23 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
24 | # so updates will work properly. | ||
25 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/platform-init/platform-init.bb b/meta-xilinx-core/recipes-bsp/platform-init/platform-init.bb index 75c83ee8..a9c10d47 100644 --- a/meta-xilinx-core/recipes-bsp/platform-init/platform-init.bb +++ b/meta-xilinx-core/recipes-bsp/platform-init/platform-init.bb | |||
@@ -18,7 +18,7 @@ PROVIDES += "virtual/xilinx-platform-init" | |||
18 | 18 | ||
19 | SRC_URI = "${@" ".join(["file://%s" % f for f in (d.getVar('PLATFORM_INIT_FILES') or "").split()])}" | 19 | SRC_URI = "${@" ".join(["file://%s" % f for f in (d.getVar('PLATFORM_INIT_FILES') or "").split()])}" |
20 | 20 | ||
21 | S = "${WORKDIR}" | 21 | S = "${UNPACKDIR}" |
22 | 22 | ||
23 | SYSROOT_DIRS += "${PLATFORM_INIT_DIR}" | 23 | SYSROOT_DIRS += "${PLATFORM_INIT_DIR}" |
24 | 24 | ||
diff --git a/meta-xilinx-core/recipes-bsp/pmu-firmware/pmu-rom-native.bb b/meta-xilinx-core/recipes-bsp/pmu-firmware/pmu-rom-native.bb index 44ad9368..2d36b4a8 100644 --- a/meta-xilinx-core/recipes-bsp/pmu-firmware/pmu-rom-native.bb +++ b/meta-xilinx-core/recipes-bsp/pmu-firmware/pmu-rom-native.bb | |||
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://PMU_ROM-LICENSE.txt;md5=d43d49bc1eb1c907fc6f4ea75abaf | |||
10 | SRC_URI = "https://www.xilinx.com/bin/public/openDownload?filename=PMU_ROM.tar.gz" | 10 | SRC_URI = "https://www.xilinx.com/bin/public/openDownload?filename=PMU_ROM.tar.gz" |
11 | SRC_URI[sha256sum] = "f9a450ef960979463ea0a87a35fafb4a5b62d3a741de30cbcef04c8edc22a7cf" | 11 | SRC_URI[sha256sum] = "f9a450ef960979463ea0a87a35fafb4a5b62d3a741de30cbcef04c8edc22a7cf" |
12 | 12 | ||
13 | S = "${WORKDIR}/PMU_ROM" | 13 | S = "${UNPACKDIR}/PMU_ROM" |
14 | 14 | ||
15 | inherit deploy native | 15 | inherit deploy native |
16 | 16 | ||
diff --git a/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb new file mode 100644 index 00000000..e6ba4938 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb | |||
@@ -0,0 +1,154 @@ | |||
1 | require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | ||
2 | |||
3 | DEPENDS:remove:zynqmp:qemuall = " optee-os" | ||
4 | DEPENDS:remove:versal:qemuall = " optee-os" | ||
5 | DEPENDS:remove:versal-net:qemuall = " optee-os" | ||
6 | |||
7 | # Xilinx TF-A v2.10 | ||
8 | SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" | ||
9 | SRCREV_tfa = "14cea4616b6edaceabb607c7c92332436a1699e5" | ||
10 | SRCBRANCH = "xlnx_rebase_v2.10" | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde" | ||
13 | |||
14 | # mbedtls-3.4.1 is not enabled in this configuration | ||
15 | |||
16 | # The following are Xilinx specific settings | ||
17 | PROVIDES = "virtual/arm-trusted-firmware" | ||
18 | |||
19 | COMPATIBLE_MACHINE ?= "^$" | ||
20 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
21 | COMPATIBLE_MACHINE:versal = ".*" | ||
22 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
23 | |||
24 | ### Platform Settings | ||
25 | TFA_PLATFORM:zynqmp = "zynqmp" | ||
26 | TFA_PLATFORM:versal = "versal" | ||
27 | TFA_PLATFORM:versal-net = "versal_net" | ||
28 | |||
29 | |||
30 | ### Console settings | ||
31 | TFA_CONSOLE_DEFAULT = "" | ||
32 | TFA_CONSOLE_DEFAULT:zynqmp = "cadence" | ||
33 | TFA_CONSOLE_DEFAULT:versal = "pl011" | ||
34 | TFA_CONSOLE_DEFAULT:versal-net = "pl011" | ||
35 | |||
36 | # Use old name for compatibility | ||
37 | ATF_CONSOLE ?= "${TFA_CONSOLE_DEFAULT}" | ||
38 | |||
39 | # Old name to new name | ||
40 | TFA_CONSOLE ?= "${ATF_CONSOLE}" | ||
41 | |||
42 | TFA_CONSOLE_OEMAKE = "" | ||
43 | TFA_CONSOLE_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
44 | TFA_CONSOLE_OEMAKE:append:versal = "${@' VERSAL_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
45 | TFA_CONSOLE_OEMAKE:append:versal-net = "${@' VERSAL_NET_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
46 | |||
47 | EXTRA_OEMAKE += "${TFA_CONSOLE_OEMAKE}" | ||
48 | |||
49 | |||
50 | ### Debug settings | ||
51 | DEBUG_ATF_DEFAULT = "" | ||
52 | DEBUG_ATF_DEFAULT:versal = "1" | ||
53 | DEBUG_ATF_DEFAULT:versal-net = "1" | ||
54 | DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}" | ||
55 | |||
56 | # Translate old to new name | ||
57 | TFA_DEBUG = "${DEBUG_ATF}" | ||
58 | |||
59 | |||
60 | ### Mem Settings | ||
61 | ATF_MEM_BASE ?= "" | ||
62 | ATF_MEM_SIZE ?= "" | ||
63 | |||
64 | TFA_MEM_BASE ?= "${ATF_MEM_BASE}" | ||
65 | TFA_MEM_SIZE ?= "${ATF_MEM_SIZE}" | ||
66 | |||
67 | TFA_MEM_OEMAKE = "" | ||
68 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
69 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
70 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
71 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
72 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
73 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
74 | |||
75 | EXTRA_OEMAKE += "${TFA_MEM_OEMAKE}" | ||
76 | |||
77 | |||
78 | ### Preloaded Base | ||
79 | TFA_BL33_LOAD ?= "" | ||
80 | EXTRA_OEMAKE += "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" | ||
81 | |||
82 | |||
83 | # Workaround for bl31.elf has a LOAD segment with RWX permissions | ||
84 | EXTRA_OEMAKE += ' TF_LDFLAGS="--no-warn-rwx-segments --fatal-warnings -O1 --gc-sections"' | ||
85 | |||
86 | # We use bl31 | ||
87 | TFA_BUILD_TARGET = "bl31" | ||
88 | TFA_INSTALL_TARGET = "bl31" | ||
89 | |||
90 | inherit image-artifact-names | ||
91 | |||
92 | # arm-trusted-firmware instead of ${PN} for compatibility | ||
93 | ATF_BASE_NAME ?= "arm-trusted-firmware-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" | ||
94 | |||
95 | do_install:append() { | ||
96 | # The first TFA_INSTALL_TARGET found will be copied as the standard boot firmware | ||
97 | for atfbin in ${TFA_INSTALL_TARGET} ; do | ||
98 | install -d ${D}/boot | ||
99 | if [ -e ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ]; then | ||
100 | ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ${D}/boot/${ATF_BASE_NAME}.elf | ||
101 | ln -sf ${ATF_BASE_NAME}.elf ${D}/boot/arm-trusted-firmware.elf | ||
102 | ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.bin | ||
103 | ln -sf ${ATF_BASE_NAME}.bin ${D}/boot/arm-trusted-firmware.bin | ||
104 | |||
105 | # Get the entry point address from the elf. | ||
106 | BL31_BASE_ADDR=$(${READELF} -h ${D}/boot/${ATF_BASE_NAME}.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') | ||
107 | mkimage -A arm64 -O arm-trusted-firmware -T kernel -C none \ | ||
108 | -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ | ||
109 | -d ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.ub | ||
110 | ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/arm-trusted-firmware.ub | ||
111 | ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/atf-uboot.ub | ||
112 | break | ||
113 | fi | ||
114 | done | ||
115 | } | ||
116 | |||
117 | inherit deploy | ||
118 | |||
119 | DEPENDS += "u-boot-mkimage-native" | ||
120 | |||
121 | do_deploy() { | ||
122 | # Copy the /boot items to deploy | ||
123 | install -d ${DEPLOYDIR} | ||
124 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.elf ${DEPLOYDIR}/${ATF_BASE_NAME}.elf | ||
125 | ln -sf ${ATF_BASE_NAME}.elf ${DEPLOYDIR}/arm-trusted-firmware.elf | ||
126 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.bin ${DEPLOYDIR}/${ATF_BASE_NAME}.bin | ||
127 | ln -sf ${ATF_BASE_NAME}.bin ${DEPLOYDIR}/arm-trusted-firmware.bin | ||
128 | |||
129 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.ub ${DEPLOYDIR}/${ATF_BASE_NAME}.ub | ||
130 | ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/arm-trusted-firmware.ub | ||
131 | ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/atf-uboot.ub | ||
132 | } | ||
133 | |||
134 | addtask deploy before do_build after do_compile | ||
135 | |||
136 | SYSROOT_DIRS += "/boot" | ||
137 | FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub" | ||
138 | RPROVIDES:${PN} += "arm-trusted-firmware" | ||
139 | |||
140 | python() { | ||
141 | soc_family = d.getVar('SOC_FAMILY') | ||
142 | tfa_console = d.getVar('TFA_CONSOLE') | ||
143 | |||
144 | # See plat/xilinx/<soc_family>/platform.mk | ||
145 | if soc_family and soc_family == "zynqmp": | ||
146 | if not tfa_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]: | ||
147 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (tfa_console)) | ||
148 | elif soc_family and soc_family == "versal": | ||
149 | if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
150 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console)) | ||
151 | elif soc_family and soc_family == "versal-net": | ||
152 | if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
153 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console)) | ||
154 | } | ||
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 @@ | |||
1 | From 8127b19aa42ccfb3faae1173a12b3eb0cebf8941 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Robinson <pbrobinson@gmail.com> | ||
3 | Date: Thu, 30 Jan 2020 09:37:15 +0000 | ||
4 | Subject: [PATCH] Remove redundant YYLOC global declaration | ||
5 | |||
6 | Same as the upstream fix for building dtc with gcc 10. | ||
7 | |||
8 | Signed-off-by: Peter Robinson <pbrobinson@gmail.com> | ||
9 | State: upstream (e33a814e772cdc36436c8c188d8c42d019fda639) | ||
10 | --- | ||
11 | scripts/dtc/dtc-lexer.l | 1 - | ||
12 | 1 file changed, 1 deletion(-) | ||
13 | |||
14 | diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l | ||
15 | index 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 | -- | ||
27 | 2.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. |
4 | python () { | 4 | python () { |
5 | if bb.data.inherits_class('native', d): | 5 | if bb.data.inherits_class('native', d): |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.01-xilinx-v2023.1.bb index fe5ecf79..fe5ecf79 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.01-xilinx-v2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.01-xilinx-v2023.2.bb index 43fec635..43fec635 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.2.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.01-xilinx-v2023.2.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.1.bb index 44636872..590d1755 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.1.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | require u-boot-tools-xlnx.inc | 1 | require u-boot-tools-xlnx.inc |
2 | require u-boot-xlnx-2022.2.inc | 2 | require u-boot-xlnx-2024.1.inc |
3 | 3 | ||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | 4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct |
5 | # bmp_logo.h | 5 | # bmp_logo.h |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb index eaf8d4ce..4214fdd9 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | require u-boot-tools-xlnx.inc | 1 | require u-boot-tools-xlnx.inc |
2 | require u-boot-xlnx-2022.1.inc | 2 | require u-boot-xlnx-2024.2.inc |
3 | 3 | ||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | 4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct |
5 | # bmp_logo.h | 5 | # bmp_logo.h |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic-top.h b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic-top.h deleted file mode 100644 index 08c1c16c..00000000 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic-top.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * This file is use for addition u-boot configurations for microblaze. | ||
3 | */ | ||
4 | #include <configs/microblaze-generic.h> | ||
5 | |||
6 | /* Core microblaze boot configurations */ | ||
7 | #define XILINX_USE_DCACHE 1 | ||
8 | #define CONFIG_CMD_IRQ | ||
9 | #define CONFIG_DCACHE | ||
10 | #define CONFIG_ICACHE \ No newline at end of file | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic.cfg b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg index 0f784f73..033fb197 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2021.01/microblaze-generic.cfg +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg | |||
@@ -17,9 +17,9 @@ | |||
17 | # Definitions for Generic Microbalze machine. | 17 | # Definitions for Generic Microbalze machine. |
18 | # | 18 | # |
19 | CONFIG_BOOTDELAY=4 | 19 | CONFIG_BOOTDELAY=4 |
20 | CONFIG_SYS_TEXT_BASE=0x80100000 | 20 | CONFIG_TEXT_BASE=0x80100000 |
21 | CONFIG_SYS_PROMPT="U-Boot>" | 21 | CONFIG_SYS_PROMPT="U-Boot>" |
22 | CONFIG_SYS_CONFIG_NAME="microblaze-generic-top" | 22 | CONFIG_SYS_CONFIG_NAME="microblaze-generic" |
23 | CONFIG_BOOT_SCRIPT_OFFSET=0x1F00000 | 23 | CONFIG_BOOT_SCRIPT_OFFSET=0x1F00000 |
24 | # CONFIG_SYS_NS16550 is not set | 24 | # CONFIG_SYS_NS16550 is not set |
25 | # CONFIG_SYS_FLASH_USE_BUFFER_WRITE is not set | 25 | # CONFIG_SYS_FLASH_USE_BUFFER_WRITE is not set |
@@ -79,3 +79,5 @@ CONFIG_SPI_FLASH_ISSI=y | |||
79 | # CONFIG_CMD_EEPROM is not set | 79 | # CONFIG_CMD_EEPROM is not set |
80 | # CONFIG_SYS_I2C_EEPROM_ADDR is not set | 80 | # CONFIG_SYS_I2C_EEPROM_ADDR is not set |
81 | # CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW is not set | 81 | # CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW is not set |
82 | CONFIG_DCACHE=y | ||
83 | CONFIG_ICACHE=y | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc index 72f43f71..1fd191f0 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | UBOOT_VERSION = "v2023.01" | ||
2 | |||
3 | UBRANCH = "xlnx_rebase_v2023.01_update" | 1 | UBRANCH = "xlnx_rebase_v2023.01_update" |
4 | 2 | ||
5 | SRCREV = "1689570b68dd3827e527a520805aa0bb7f58ee09" | 3 | SRCREV = "1689570b68dd3827e527a520805aa0bb7f58ee09" |
@@ -15,3 +13,5 @@ HAS_PLATFORM_INIT ?= " \ | |||
15 | " | 13 | " |
16 | 14 | ||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | 15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" |
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2023.01:" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc index 0cfbd846..3c8d1ed6 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc | |||
@@ -1,8 +1,6 @@ | |||
1 | UBOOT_VERSION = "v2023.01" | ||
2 | |||
3 | UBRANCH = "xlnx_rebase_v2023.01" | 1 | UBRANCH = "xlnx_rebase_v2023.01" |
4 | 2 | ||
5 | SRCREV = "0fc19cad5a07a09958443e7a5b6f11e420ef195c" | 3 | SRCREV = "2b54ad6f1d278c419b927d10db2edf323d844578" |
6 | 4 | ||
7 | LICENSE = "GPL-2.0-or-later" | 5 | LICENSE = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | 6 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" |
@@ -15,3 +13,11 @@ HAS_PLATFORM_INIT ?= " \ | |||
15 | " | 13 | " |
16 | 14 | ||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | 15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" |
16 | |||
17 | SRC_URI:append:microblaze = " file://microblaze-generic-top.h" | ||
18 | |||
19 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2023.01:" | ||
20 | |||
21 | do_configure:prepend:microblaze () { | ||
22 | install ${UNPACKDIR}/microblaze-generic-top.h ${S}/include/configs/ | ||
23 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc index 6415861d..425bb029 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc | |||
@@ -1,8 +1,6 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | 1 | UBRANCH = "xlnx_rebase_v2024.01" |
2 | 2 | ||
3 | UBRANCH ?= "xlnx_rebase_v2022.01" | 3 | SRCREV = "fbed1010e50d75e7d25acc1c2d09e1c34cb7e882" |
4 | |||
5 | SRCREV = "b31476685debf5512ed0d4e8000fa5167a22f530" | ||
6 | 4 | ||
7 | LICENSE = "GPL-2.0-or-later" | 5 | LICENSE = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | 6 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" |
@@ -15,3 +13,5 @@ HAS_PLATFORM_INIT ?= " \ | |||
15 | " | 13 | " |
16 | 14 | ||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | 15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" |
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2024.01:" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc index a0c0b50d..feb9bbcd 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc | |||
@@ -1,8 +1,6 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | 1 | UBRANCH = "xlnx_rebase_v2024.01" |
2 | 2 | ||
3 | UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update" | 3 | SRCREV = "7f6ec94aac7eacfec07bd45c83a6d17df4b7d383" |
4 | |||
5 | SRCREV = "91ad7924e7f59584d597353e1bb86794341e0a7e" | ||
6 | 4 | ||
7 | LICENSE = "GPL-2.0-or-later" | 5 | LICENSE = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | 6 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" |
@@ -15,3 +13,5 @@ HAS_PLATFORM_INIT ?= " \ | |||
15 | " | 13 | " |
16 | 14 | ||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | 15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" |
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2024.01:" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc index bbf4125f..7eac6bfd 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc | |||
@@ -9,7 +9,6 @@ IMPORT_CC_DTBS ?= "" | |||
9 | CC_DTBS_DUP ?= "" | 9 | CC_DTBS_DUP ?= "" |
10 | IMPORT_CC_UBOOT_DTBS ?= "" | 10 | IMPORT_CC_UBOOT_DTBS ?= "" |
11 | 11 | ||
12 | DEPENDS:append:eval-brd-sc-zynqmp = " uboot-device-tree" | ||
13 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" | 12 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" |
14 | 13 | ||
15 | # Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' | 14 | # Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc index b447c92a..387367c6 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-common.inc | |||
@@ -1,6 +1,4 @@ | |||
1 | # Use the name of the .bb for the extension | 1 | PV .= "+git" |
2 | UBOOT_VERSION_EXTENSION ?= "-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}" | ||
3 | PV = "${UBOOT_VERSION}${UBOOT_VERSION_EXTENSION}+git${SRCPV}" | ||
4 | 2 | ||
5 | UBOOTURI ?= "git://github.com/Xilinx/u-boot-xlnx.git;protocol=https" | 3 | UBOOTURI ?= "git://github.com/Xilinx/u-boot-xlnx.git;protocol=https" |
6 | UBRANCH ?= "" | 4 | UBRANCH ?= "" |
@@ -8,11 +6,9 @@ UBRANCHARG = "${@['nobranch=1', 'branch=${UBRANCH}'][d.getVar('UBRANCH', True) ! | |||
8 | 6 | ||
9 | SRC_URI = "${UBOOTURI};${UBRANCHARG}" | 7 | SRC_URI = "${UBOOTURI};${UBRANCHARG}" |
10 | 8 | ||
11 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
12 | B = "${WORKDIR}/build" | 10 | B = "${WORKDIR}/build" |
13 | 11 | ||
14 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-${UBOOT_VERSION}:" | ||
15 | |||
16 | UBOOT_MB_INC = "" | 12 | UBOOT_MB_INC = "" |
17 | UBOOT_MB_INC:microblaze = "u-boot-xlnx-microblaze.inc" | 13 | UBOOT_MB_INC:microblaze = "u-boot-xlnx-microblaze.inc" |
18 | require ${UBOOT_MB_INC} | 14 | require ${UBOOT_MB_INC} |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-dev.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-dev.bb index c0005bc5..31cb420d 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-dev.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-dev.bb | |||
@@ -15,5 +15,5 @@ LIC_FILES_CHKSUM = "file://README;beginline=1;endline=6;md5=157ab8408beab40cd8ce | |||
15 | SRCREV_DEFAULT = "aebea9d20a5aa32857f320c07ca8f9fd1b3dec1f" | 15 | SRCREV_DEFAULT = "aebea9d20a5aa32857f320c07ca8f9fd1b3dec1f" |
16 | SRCREV ?= "${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/bootloader", "u-boot-xlnx-dev", "${AUTOREV}", "${SRCREV_DEFAULT}", d)}" | 16 | SRCREV ?= "${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/bootloader", "u-boot-xlnx-dev", "${AUTOREV}", "${SRCREV_DEFAULT}", d)}" |
17 | 17 | ||
18 | PV = "${UBRANCH}-xilinx-dev+git${SRCPV}" | 18 | PV = "${UBRANCH}-xilinx-dev+git" |
19 | 19 | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc index 2ef7b9cf..57c00c6e 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc | |||
@@ -1,11 +1,6 @@ | |||
1 | SRC_URI += " \ | 1 | SRC_URI += " \ |
2 | file://microblaze-generic.cfg \ | 2 | file://microblaze-generic.cfg \ |
3 | file://microblaze-generic-top.h \ | ||
4 | " | 3 | " |
5 | 4 | ||
6 | do_configure:prepend () { | 5 | # Disable buildpaths and arch QA check warnings for u-boot-xlnx.elf. |
7 | install ${WORKDIR}/microblaze-generic-top.h ${S}/include/configs/ | 6 | INSANE_SKIP:${PN}-elf += "buildpaths arch" |
8 | } | ||
9 | |||
10 | # Disable buildpaths QA check warnings for u-boot-xlnx.elf. | ||
11 | INSANE_SKIP:${PN}-elf += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb index 6410fc25..a8dfa57e 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 | |||
@@ -4,6 +4,8 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
4 | 4 | ||
5 | DEPENDS = "u-boot-mkimage-native" | 5 | DEPENDS = "u-boot-mkimage-native" |
6 | 6 | ||
7 | S = "${UNPACKDIR}" | ||
8 | |||
7 | inherit deploy image-wic-utils | 9 | inherit deploy image-wic-utils |
8 | 10 | ||
9 | INHIBIT_DEFAULT_DEPS = "1" | 11 | INHIBIT_DEFAULT_DEPS = "1" |
@@ -12,6 +14,7 @@ COMPATIBLE_MACHINE ?= "^$" | |||
12 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
13 | COMPATIBLE_MACHINE:zynq = "zynq" | 15 | COMPATIBLE_MACHINE:zynq = "zynq" |
14 | COMPATIBLE_MACHINE:versal = "versal" | 16 | COMPATIBLE_MACHINE:versal = "versal" |
17 | COMPATIBLE_MACHINE:versal-net = "versal" | ||
15 | COMPATIBLE_MACHINE:microblaze = "microblaze" | 18 | COMPATIBLE_MACHINE:microblaze = "microblaze" |
16 | 19 | ||
17 | KERNELDT = "${@os.path.basename(d.getVar('KERNEL_DEVICETREE').split(' ')[0]) if d.getVar('KERNEL_DEVICETREE') else ''}" | 20 | KERNELDT = "${@os.path.basename(d.getVar('KERNEL_DEVICETREE').split(' ')[0]) if d.getVar('KERNEL_DEVICETREE') else ''}" |
@@ -25,6 +28,7 @@ PXERAMDISK_IMAGE ?= "${@'${RAMDISK_IMAGE1}' if d.getVar('INITRAMFS_IMAGE') and d | |||
25 | KERNEL_BOOTCMD:zynqmp ?= "booti" | 28 | KERNEL_BOOTCMD:zynqmp ?= "booti" |
26 | KERNEL_BOOTCMD:zynq ?= "bootm" | 29 | KERNEL_BOOTCMD:zynq ?= "bootm" |
27 | KERNEL_BOOTCMD:versal ?= "booti" | 30 | KERNEL_BOOTCMD:versal ?= "booti" |
31 | KERNEL_BOOTCMD:versal-net ?= "booti" | ||
28 | KERNEL_BOOTCMD:microblaze ?= "bootm" | 32 | KERNEL_BOOTCMD:microblaze ?= "bootm" |
29 | 33 | ||
30 | BOOTMODE ??= "generic" | 34 | BOOTMODE ??= "generic" |
@@ -37,6 +41,9 @@ DDR_BASEADDR ?= "0x0" | |||
37 | DDR_BASEADDR:microblaze ?= "0x80000000" | 41 | DDR_BASEADDR:microblaze ?= "0x80000000" |
38 | PRE_BOOTENV ?= "" | 42 | PRE_BOOTENV ?= "" |
39 | 43 | ||
44 | # Set debfault SD boot device to mmc 0 interface | ||
45 | SDBOOTDEV ?= "0" | ||
46 | |||
40 | SRC_URI = " \ | 47 | SRC_URI = " \ |
41 | file://boot.cmd.sd.zynq \ | 48 | file://boot.cmd.sd.zynq \ |
42 | file://boot.cmd.sd.zynqmp \ | 49 | file://boot.cmd.sd.zynqmp \ |
@@ -56,6 +63,7 @@ UENV_TEXTFILE ?= "uEnv.txt" | |||
56 | UENV_MMC_OFFSET:zynqmp ??= "0x200000" | 63 | UENV_MMC_OFFSET:zynqmp ??= "0x200000" |
57 | UENV_MMC_OFFSET:zynq ??= "0x2080000" | 64 | UENV_MMC_OFFSET:zynq ??= "0x2080000" |
58 | UENV_MMC_OFFSET:versal ??= "0x200000" | 65 | UENV_MMC_OFFSET:versal ??= "0x200000" |
66 | UENV_MMC_OFFSET:versal-net ??= "0x200000" | ||
59 | UENV_MMC_OFFSET:microblaze ??= "0x0" | 67 | UENV_MMC_OFFSET:microblaze ??= "0x0" |
60 | 68 | ||
61 | UENV_MMC_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('UENV_MMC_OFFSET'))}" | 69 | UENV_MMC_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('UENV_MMC_OFFSET'))}" |
@@ -65,17 +73,20 @@ UBOOTPXE_CONFIG ?= "pxelinux.cfg" | |||
65 | UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}" | 73 | UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}" |
66 | 74 | ||
67 | DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}" | 75 | DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}" |
76 | DEVICETREE_ADDRESS_SD ?= "${DEVICETREE_ADDRESS}" | ||
68 | 77 | ||
69 | DEVICETREE_OFFSET:microblaze ??= "0x1e00000" | 78 | DEVICETREE_OFFSET:microblaze ??= "0x1e00000" |
70 | DEVICETREE_OFFSET:zynqmp ??= "0x100000" | 79 | DEVICETREE_OFFSET:zynqmp ??= "0x100000" |
71 | DEVICETREE_OFFSET:zynq ??= "0x100000" | 80 | DEVICETREE_OFFSET:zynq ??= "0x100000" |
72 | DEVICETREE_OFFSET:versal ??= "0x1000" | 81 | DEVICETREE_OFFSET:versal ??= "0x1000" |
82 | DEVICETREE_OFFSET:versal-net ??= "0x1000" | ||
73 | 83 | ||
74 | DEVICETREE_OVERLAY_OFFSET:microblaze ??= "0x1e00000" | 84 | DEVICETREE_OVERLAY_OFFSET:microblaze ??= "0x1e00000" |
75 | DEVICETREE_OVERLAY_OFFSET:zynqmp ??= "0x100000" | 85 | DEVICETREE_OVERLAY_OFFSET:zynqmp ??= "0x100000" |
76 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" | 86 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" |
77 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" | 87 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" |
78 | DEVICETREE_OVERLAY_PADSIZE ??= "0xf00000" | 88 | DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" |
89 | DEVICETREE_OVERLAY_PADSIZE ??= "0x1f00000" | ||
79 | 90 | ||
80 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ | 91 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ |
81 | + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" | 92 | + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" |
@@ -86,6 +97,7 @@ KERNEL_OFFSET:microblaze ??= "0x0" | |||
86 | KERNEL_OFFSET:zynqmp ??= "0x200000" | 97 | KERNEL_OFFSET:zynqmp ??= "0x200000" |
87 | KERNEL_OFFSET:zynq ??= "0x200000" | 98 | KERNEL_OFFSET:zynq ??= "0x200000" |
88 | KERNEL_OFFSET:versal ??= "0x200000" | 99 | KERNEL_OFFSET:versal ??= "0x200000" |
100 | KERNEL_OFFSET:versal-net ??= "0x200000" | ||
89 | 101 | ||
90 | KERNEL_IMAGE ?= "${KERNEL_IMAGETYPE}" | 102 | KERNEL_IMAGE ?= "${KERNEL_IMAGETYPE}" |
91 | 103 | ||
@@ -95,6 +107,7 @@ RAMDISK_OFFSET:microblaze ??= "0x2e00000" | |||
95 | RAMDISK_OFFSET:zynq ??= "0x4000000" | 107 | RAMDISK_OFFSET:zynq ??= "0x4000000" |
96 | RAMDISK_OFFSET:zynqmp ??= "0x4000000" | 108 | RAMDISK_OFFSET:zynqmp ??= "0x4000000" |
97 | RAMDISK_OFFSET:versal ??= "0x4000000" | 109 | RAMDISK_OFFSET:versal ??= "0x4000000" |
110 | RAMDISK_OFFSET:versal-net ??= "0x4000000" | ||
98 | 111 | ||
99 | FIT_IMAGE_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('FIT_IMAGE_OFFSET'))}" | 112 | FIT_IMAGE_LOAD_ADDRESS ?= "${@append_baseaddr(d,d.getVar('FIT_IMAGE_OFFSET'))}" |
100 | FIT_IMAGE_OFFSET ??= "0x10000000" | 113 | FIT_IMAGE_OFFSET ??= "0x10000000" |
@@ -140,18 +153,25 @@ QSPI_RAMDISK_SIZE:zynqmpdr ??= "0x1D00000" | |||
140 | ## For versal | 153 | ## For versal |
141 | ## Load boot.scr at 0x7F80000 -> 127MB of QSPI/NAND Memory | 154 | ## Load boot.scr at 0x7F80000 -> 127MB of QSPI/NAND Memory |
142 | QSPI_KERNEL_OFFSET:versal ??= "0xF00000" | 155 | QSPI_KERNEL_OFFSET:versal ??= "0xF00000" |
156 | QSPI_KERNEL_OFFSET:versal-net ??= "0xF00000" | ||
143 | QSPI_RAMDISK_OFFSET:versal ??= "0x2E00000" | 157 | QSPI_RAMDISK_OFFSET:versal ??= "0x2E00000" |
158 | QSPI_RAMDISK_OFFSET:versal-net ??= "0x2E00000" | ||
144 | 159 | ||
145 | NAND_KERNEL_OFFSET:versal ??= "0x4100000" | 160 | NAND_KERNEL_OFFSET:versal ??= "0x4100000" |
161 | NAND_KERNEL_OFFSET:versal-net ??= "0x4100000" | ||
146 | NAND_RAMDISK_OFFSET:versal ??= "0x8200000" | 162 | NAND_RAMDISK_OFFSET:versal ??= "0x8200000" |
163 | NAND_RAMDISK_OFFSET:versal-net ??= "0x8200000" | ||
147 | 164 | ||
148 | QSPI_KERNEL_SIZE:versal ??= "0x1D00000" | 165 | QSPI_KERNEL_SIZE:versal ??= "0x1D00000" |
166 | QSPI_KERNEL_SIZE:versal-net ??= "0x1D00000" | ||
149 | QSPI_RAMDISK_SIZE:versal ??= "0x4000000" | 167 | QSPI_RAMDISK_SIZE:versal ??= "0x4000000" |
168 | QSPI_RAMDISK_SIZE:versal-net ??= "0x4000000" | ||
150 | 169 | ||
151 | QSPI_KERNEL_IMAGE:microblaze ?= "image.ub" | 170 | QSPI_KERNEL_IMAGE:microblaze ?= "image.ub" |
152 | QSPI_KERNEL_IMAGE:zynq ?= "image.ub" | 171 | QSPI_KERNEL_IMAGE:zynq ?= "image.ub" |
153 | QSPI_KERNEL_IMAGE:zynqmp ?= "image.ub" | 172 | QSPI_KERNEL_IMAGE:zynqmp ?= "image.ub" |
154 | QSPI_KERNEL_IMAGE:versal ?= "image.ub" | 173 | QSPI_KERNEL_IMAGE:versal ?= "image.ub" |
174 | QSPI_KERNEL_IMAGE:versal-net ?= "image.ub" | ||
155 | 175 | ||
156 | NAND_KERNEL_IMAGE ?= "image.ub" | 176 | NAND_KERNEL_IMAGE ?= "image.ub" |
157 | 177 | ||
@@ -214,6 +234,7 @@ do_compile() { | |||
214 | -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \ | 234 | -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \ |
215 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ | 235 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ |
216 | -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \ | 236 | -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \ |
237 | -e 's/@@DEVICETREE_ADDRESS_SD@@/${DEVICETREE_ADDRESS_SD}/' \ | ||
217 | -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \ | 238 | -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \ |
218 | -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \ | 239 | -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \ |
219 | -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \ | 240 | -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \ |
@@ -249,23 +270,24 @@ do_compile() { | |||
249 | -e 's:@@KERNEL_ROOT_RAMDISK@@:${KERNEL_ROOT_RAMDISK}:' \ | 270 | -e 's:@@KERNEL_ROOT_RAMDISK@@:${KERNEL_ROOT_RAMDISK}:' \ |
250 | -e 's:@@KERNEL_COMMAND_APPEND@@:${KERNEL_COMMAND_APPEND}:' \ | 271 | -e 's:@@KERNEL_COMMAND_APPEND@@:${KERNEL_COMMAND_APPEND}:' \ |
251 | ${SCRIPT_SED_ADDENDUM} \ | 272 | ${SCRIPT_SED_ADDENDUM} \ |
252 | "${WORKDIR}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > "${WORKDIR}/boot.cmd" | 273 | "${S}/boot.cmd.${BOOTMODE}${BOOTFILE_EXT}" > boot.cmd |
253 | 274 | ||
254 | mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr | 275 | mkimage -A arm -T script -C none -n "Boot script" -d boot.cmd boot.scr |
255 | 276 | ||
256 | sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ | 277 | sed -e 's/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \ |
257 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ | 278 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ |
258 | -e 's/@@RAMDISK_IMAGE@@/${PXERAMDISK_IMAGE}/' \ | 279 | -e 's/@@RAMDISK_IMAGE@@/${PXERAMDISK_IMAGE}/' \ |
259 | "${WORKDIR}/pxeboot.pxe" > "pxeboot.pxe" | 280 | "${S}/pxeboot.pxe" > "pxeboot.pxe" |
260 | } | 281 | } |
261 | 282 | ||
262 | do_install() { | 283 | do_install() { |
263 | install -d ${D}/boot | 284 | install -d ${D}/boot |
264 | install -m 0644 boot.scr ${D}/boot/${UBOOTSCR_BASE_NAME}.scr | 285 | install -m 0644 boot.scr ${D}/boot/${UBOOTSCR_BASE_NAME}.scr |
265 | ln -sf ${UBOOTSCR_BASE_NAME}.scr ${D}/boot/boot.scr | 286 | install -m 0644 boot.scr ${D}/boot/ |
266 | install -d ${D}/boot/pxeboot/${UBOOTPXE_CONFIG_NAME} | 287 | install -d ${D}/boot/pxeboot/${UBOOTPXE_CONFIG_NAME} |
267 | install -m 0644 pxeboot.pxe ${D}/boot/pxeboot/${UBOOTPXE_CONFIG_NAME}/default | 288 | install -m 0644 pxeboot.pxe ${D}/boot/pxeboot/${UBOOTPXE_CONFIG_NAME}/default |
268 | ln -sf pxeboot/${UBOOTPXE_CONFIG_NAME} ${D}/boot/${UBOOTPXE_CONFIG} | 289 | install -d ${D}/boot/${UBOOTPXE_CONFIG}/ |
290 | install -m 0644 pxeboot.pxe ${D}/boot/${UBOOTPXE_CONFIG}/default | ||
269 | } | 291 | } |
270 | 292 | ||
271 | FILES:${PN} = "/boot/*" | 293 | FILES:${PN} = "/boot/*" |
@@ -273,10 +295,11 @@ FILES:${PN} = "/boot/*" | |||
273 | do_deploy() { | 295 | do_deploy() { |
274 | install -d ${DEPLOYDIR} | 296 | install -d ${DEPLOYDIR} |
275 | install -m 0644 boot.scr ${DEPLOYDIR}/${UBOOTSCR_BASE_NAME}.scr | 297 | install -m 0644 boot.scr ${DEPLOYDIR}/${UBOOTSCR_BASE_NAME}.scr |
276 | ln -sf ${UBOOTSCR_BASE_NAME}.scr ${DEPLOYDIR}/boot.scr | 298 | install -m 0644 boot.scr ${DEPLOYDIR}/ |
277 | install -d ${DEPLOYDIR}/pxeboot/${UBOOTPXE_CONFIG_NAME} | 299 | install -d ${DEPLOYDIR}/pxeboot/${UBOOTPXE_CONFIG_NAME} |
278 | install -m 0644 pxeboot.pxe ${DEPLOYDIR}/pxeboot/${UBOOTPXE_CONFIG_NAME}/default | 300 | install -m 0644 pxeboot.pxe ${DEPLOYDIR}/pxeboot/${UBOOTPXE_CONFIG_NAME}/default |
279 | ln -sf pxeboot/${UBOOTPXE_CONFIG_NAME} ${DEPLOYDIR}/${UBOOTPXE_CONFIG} | 301 | install -d ${DEPLOYDIR}/${UBOOTPXE_CONFIG}/ |
302 | install -m 0644 pxeboot.pxe ${DEPLOYDIR}/${UBOOTPXE_CONFIG}/default | ||
280 | } | 303 | } |
281 | 304 | ||
282 | addtask do_deploy after do_compile before do_build | 305 | addtask do_deploy after do_compile before do_build |
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..f60a1ea9 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 | |||
@@ -13,7 +13,6 @@ rootfs_name=@@RAMDISK_IMAGE@@ | |||
13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' | 13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' |
14 | setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi' | 14 | setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi' |
15 | 15 | ||
16 | |||
17 | for boot_target in ${boot_targets}; | 16 | for boot_target in ${boot_targets}; |
18 | do | 17 | do |
19 | echo "Trying to load boot images from ${boot_target}" | 18 | echo "Trying to load boot images from ${boot_target}" |
@@ -39,25 +38,25 @@ do | |||
39 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; | 38 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; |
40 | fi | 39 | fi |
41 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | 40 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then |
42 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | 41 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS_SD@@ system.dtb; |
43 | setenv fdtcontroladdr @@DEVICETREE_ADDRESS@@ | 42 | setenv fdtcontroladdr @@DEVICETREE_ADDRESS_SD@@ |
44 | fi | 43 | fi |
45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then | 44 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then |
46 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; | 45 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; |
47 | fdt addr @@DEVICETREE_ADDRESS@@ | 46 | fdt addr @@DEVICETREE_ADDRESS_SD@@ |
48 | fdt resize 8192 | 47 | fdt resize 8192 |
49 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ | 48 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ |
50 | fi | 49 | fi |
51 | run update_bootargs | 50 | run update_bootargs |
52 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | 51 | 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}; | 52 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
54 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 53 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@ |
55 | fi | 54 | fi |
56 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then | 55 | 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}; | 56 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; |
58 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 57 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@ |
59 | fi | 58 | fi |
60 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | 59 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS_SD@@ |
61 | fi | 60 | fi |
62 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | 61 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then |
63 | sf probe 0 0 0; | 62 | sf probe 0 0 0; |
@@ -83,4 +82,15 @@ do | |||
83 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 82 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
84 | echo "Booting using Separate images failed" | 83 | echo "Booting using Separate images failed" |
85 | fi | 84 | fi |
85 | if test "${boot_target}" = "nor" || test "${boot_target}" = "nor0"; then | ||
86 | cp.b @@QSPI_FIT_IMAGE_OFFSET@@ @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_SIZE@@ | ||
87 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
88 | echo "Booting using Fit image failed" | ||
89 | |||
90 | cp.b @@QSPI_KERNEL_OFFSET@@ @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_SIZE@@ | ||
91 | cp.b @@QSPI_RAMDISK_OFFSET@@ @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_SIZE@@ | ||
92 | run update_bootargs | ||
93 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | ||
94 | echo "Booting using Separate images failed" | ||
95 | fi | ||
86 | done | 96 | done |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root index ed12f941..a3ec1286 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root | |||
@@ -9,6 +9,7 @@ ramdisk_name=@@RAMDISK_IMAGE1@@ | |||
9 | rootfs_name=@@RAMDISK_IMAGE@@ | 9 | rootfs_name=@@RAMDISK_IMAGE@@ |
10 | @@PRE_BOOTENV@@ | 10 | @@PRE_BOOTENV@@ |
11 | 11 | ||
12 | |||
12 | for boot_target in ${boot_targets}; | 13 | for boot_target in ${boot_targets}; |
13 | do | 14 | do |
14 | echo "Trying to load boot images from ${boot_target}" | 15 | echo "Trying to load boot images from ${boot_target}" |
@@ -43,17 +44,17 @@ do | |||
43 | fi | 44 | fi |
44 | echo "Checking for /${kernel_name}" | 45 | echo "Checking for /${kernel_name}" |
45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then | 46 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then |
46 | echo "Loading ${kernel_name}"; | 47 | echo "Loading ${kernel_name} at @@KERNEL_LOAD_ADDRESS@@"; |
47 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; | 48 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; |
48 | fi | 49 | fi |
49 | echo "Checking for /system.dtb" | 50 | echo "Checking for /system.dtb" |
50 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | 51 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then |
51 | echo "Loading system.dtb"; | 52 | echo "Loading system.dtb at @@DEVICETREE_ADDRESS@@"; |
52 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | 53 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; |
53 | fi | 54 | fi |
54 | echo "Checking for /devicetree/openamp.dtbo" | 55 | echo "Checking for /devicetree/openamp.dtbo" |
55 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then | 56 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then |
56 | echo "Loading and merging openamp.dtbo into device tree"; | 57 | echo "Loading and merging openamp.dtbo into device tree at @@DEVICETREE_OVERLAY_ADDRESS@@"; |
57 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; | 58 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; |
58 | fdt addr @@DEVICETREE_ADDRESS@@ | 59 | fdt addr @@DEVICETREE_ADDRESS@@ |
59 | fdt resize 8192 | 60 | fdt resize 8192 |
@@ -61,7 +62,7 @@ do | |||
61 | fi | 62 | fi |
62 | echo "Checking for /${ramdisk_name}" | 63 | echo "Checking for /${ramdisk_name}" |
63 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | 64 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then |
64 | echo "Loading ${ramdisk_name}"; | 65 | echo "Loading ${ramdisk_name} at @@RAMDISK_IMAGE_ADDRESS@@"; |
65 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | 66 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
66 | fdt addr @@DEVICETREE_ADDRESS@@ | 67 | fdt addr @@DEVICETREE_ADDRESS@@ |
67 | fdt get value bootargs /chosen bootargs | 68 | fdt get value bootargs /chosen bootargs |
@@ -70,7 +71,7 @@ do | |||
70 | fi | 71 | fi |
71 | echo "Checking for /${rootfs_name}" | 72 | echo "Checking for /${rootfs_name}" |
72 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then | 73 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then |
73 | echo "Loading ${rootfs_name}"; | 74 | echo "Loading ${rootfs_name} at @@RAMDISK_IMAGE_ADDRESS@@"; |
74 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; | 75 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; |
75 | fdt addr @@DEVICETREE_ADDRESS@@ | 76 | fdt addr @@DEVICETREE_ADDRESS@@ |
76 | fdt get value bootargs /chosen bootargs | 77 | fdt get value bootargs /chosen bootargs |
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 | ||
3 | setenv sdbootdev @@SDBOOTDEV@@ | 3 | setenv sdbootdev @@SDBOOTDEV@@ |
4 | setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon clk_ignore_unused | 4 | setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon |
5 | fatload mmc $sdbootdev @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@ | 5 | fatload mmc $sdbootdev @@DEVICETREE_ADDRESS@@ @@DEVICE_TREE_NAME@@ |
6 | fatload mmc $sdbootdev:$partid @@KERNEL_LOAD_ADDRESS@@ @@KERNEL_IMAGETYPE@@ | 6 | fatload 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 | ||
3 | setenv sdbootdev @@SDBOOTDEV@@ | 3 | setenv sdbootdev @@SDBOOTDEV@@ |
4 | setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon clk_ignore_unused | 4 | setenv bootargs $bootargs root=/dev/mmcblk${sdbootdev}p2 rw rootwait earlycon |
5 | if test -n "@@BITSTREAM@@"; then | 5 | if 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} |
7 | fi | 7 | fi |
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 | ||
8 | for boot_target in ${boot_targets}; | 8 | for boot_target in ${boot_targets}; |
9 | do | 9 | do |
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..53355f28 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 | |||
@@ -16,7 +16,7 @@ def remove_task_from_depends(d): | |||
16 | extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or '' | 16 | extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or '' |
17 | uenv_depends = '' | 17 | uenv_depends = '' |
18 | for imagedepend in extra_imagedepends.split(): | 18 | for imagedepend in extra_imagedepends.split(): |
19 | if imagedepend == d.getVar("BPN"): | 19 | if imagedepend == d.getVar("BPN") or '': |
20 | continue | 20 | continue |
21 | elif ':' in imagedepend: | 21 | elif ':' in imagedepend: |
22 | uenv_depends += ' %s' % imagedepend.split(':')[0] | 22 | uenv_depends += ' %s' % imagedepend.split(':')[0] |
@@ -25,16 +25,16 @@ def remove_task_from_depends(d): | |||
25 | return uenv_depends | 25 | return uenv_depends |
26 | 26 | ||
27 | def uboot_boot_cmd(d): | 27 | def uboot_boot_cmd(d): |
28 | if d.getVar("KERNEL_IMAGETYPE") in ["uImage", "fitImage"]: | 28 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["uImage", "fitImage"]: |
29 | return "bootm" | 29 | return "bootm" |
30 | if d.getVar("KERNEL_IMAGETYPE") in ["zImage"]: | 30 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["zImage"]: |
31 | return "bootz" | 31 | return "bootz" |
32 | if d.getVar("KERNEL_IMAGETYPE") in ["Image"]: | 32 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["Image"]: |
33 | return "booti" | 33 | return "booti" |
34 | raise bb.parse.SkipRecipe("Unsupport kernel image type") | 34 | raise bb.parse.SkipRecipe("Unsupport kernel image type") |
35 | 35 | ||
36 | def get_sdbootdev(d): | 36 | def get_sdbootdev(d): |
37 | if d.getVar("SOC_FAMILY") in ["zynqmp"]: | 37 | if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]: |
38 | return "${devnum}" | 38 | return "${devnum}" |
39 | else: | 39 | else: |
40 | return "0" | 40 | return "0" |
@@ -43,24 +43,24 @@ def uenv_populate(d): | |||
43 | # populate the environment values | 43 | # populate the environment values |
44 | env = {} | 44 | env = {} |
45 | 45 | ||
46 | env["machine_name"] = d.getVar("MACHINE") | 46 | env["machine_name"] = d.getVar("MACHINE") or '' |
47 | 47 | ||
48 | env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") | 48 | env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") or '' |
49 | env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") | 49 | env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") or '' |
50 | 50 | ||
51 | env["devicetree_image"] = boot_files_dtb_filepath(d) | 51 | env["devicetree_image"] = boot_files_dtb_filepath(d) |
52 | env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") | 52 | env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") or '' |
53 | env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") | 53 | env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") or '' |
54 | 54 | ||
55 | env["bootargs"] = d.getVar("KERNEL_BOOTARGS") | 55 | env["bootargs"] = d.getVar("KERNEL_BOOTARGS") or '' |
56 | 56 | ||
57 | env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}" | 57 | env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}" |
58 | env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}" | 58 | env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}" |
59 | env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi" | 59 | env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi" |
60 | env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}" | 60 | env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}" |
61 | 61 | ||
62 | if d.getVar("SOC_FAMILY") in ["zynqmp"]: | 62 | if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]: |
63 | env["bootkernel"] = "setenv bootargs " + d.getVar("KERNEL_BOOTARGS") + " ; " + env["bootkernel"] | 63 | env["bootkernel"] = "setenv bootargs " + (d.getVar("KERNEL_BOOTARGS") or '') + " ; " + env["bootkernel"] |
64 | 64 | ||
65 | # default uenvcmd does not load bitstream | 65 | # default uenvcmd does not load bitstream |
66 | env["uenvcmd"] = "run bootkernel" | 66 | env["uenvcmd"] = "run bootkernel" |
@@ -83,17 +83,18 @@ 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 |
85 | KERNEL_BOOTARGS:zynq = "earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait" | 85 | KERNEL_BOOTARGS:zynq = "earlyprintk console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootwait" |
86 | KERNEL_BOOTARGS:zynqmp = "earlycon clk_ignore_unused root=/dev/mmcblk${devnum}p2 rw rootwait" | 86 | KERNEL_BOOTARGS:zynqmp = "earlycon root=/dev/mmcblk${devnum}p2 rw rootwait" |
87 | 87 | ||
88 | KERNEL_LOAD_ADDRESS:zynq = "0x2080000" | 88 | KERNEL_LOAD_ADDRESS:zynq = "0x2080000" |
89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" | 89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" |
90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" | 90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" |
91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" | 91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" |
92 | DEVICETREE_OVERLAY_LOAD_ADDRESS = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | 92 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynq = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" |
93 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynqmp = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | ||
93 | 94 | ||
94 | python do_compile() { | 95 | python do_compile() { |
95 | env = uenv_populate(d) | 96 | env = uenv_populate(d) |
96 | with open(d.expand("${WORKDIR}/uEnv.txt"), "w") as f: | 97 | with open(d.expand("uEnv.txt"), "w") as f: |
97 | for k, v in env.items(): | 98 | for k, v in env.items(): |
98 | f.write("{0}={1}\n".format(k, v)) | 99 | f.write("{0}={1}\n".format(k, v)) |
99 | } | 100 | } |
@@ -101,11 +102,11 @@ python do_compile() { | |||
101 | FILES:${PN} += "/boot/uEnv.txt" | 102 | FILES:${PN} += "/boot/uEnv.txt" |
102 | 103 | ||
103 | do_install() { | 104 | do_install() { |
104 | install -Dm 0644 ${WORKDIR}/uEnv.txt ${D}/boot/uEnv.txt | 105 | install -Dm 0644 uEnv.txt ${D}/boot/uEnv.txt |
105 | } | 106 | } |
106 | 107 | ||
107 | do_deploy() { | 108 | do_deploy() { |
108 | install -Dm 0644 ${WORKDIR}/uEnv.txt ${DEPLOYDIR}/uEnv.txt | 109 | install -Dm 0644 uEnv.txt ${DEPLOYDIR}/uEnv.txt |
109 | } | 110 | } |
110 | addtask do_deploy after do_compile before do_build | 111 | addtask do_deploy after do_compile before do_build |
111 | 112 | ||
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..e2ee2c3f 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 | ||
8 | SYSROOT_DIRS += "/boot" | 8 | SYSROOT_DIRS += "/boot" |
9 | 9 | ||
10 | BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" | 10 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" |
11 | DTB_PATH ?= "boot/devicetree/" | 11 | DTB_PATH ?= "boot/devicetree/" |
12 | DTB_FILE_NAME ?= "" | 12 | DTB_FILE_NAME ?= "" |
13 | 13 | ||
@@ -75,7 +75,7 @@ do_deploy:prepend() { | |||
75 | fi | 75 | fi |
76 | 76 | ||
77 | # In ZynqMP u-boot.dtb is generated by default but not for versal, Hence manually deploy. | 77 | # In ZynqMP u-boot.dtb is generated by default but not for versal, Hence manually deploy. |
78 | if [ "${SOC_FAMILY}" == "versal" ]; then | 78 | if [ "${SOC_FAMILY}" == "versal" -o "${SOC_FAMILY}" == "versal-net" ]; then |
79 | if [ -f ${B}/arch/arm/dts/${UBOOT_USER_SPECIFIED_DTS}.dtb ]; then | 79 | if [ -f ${B}/arch/arm/dts/${UBOOT_USER_SPECIFIED_DTS}.dtb ]; then |
80 | install -Dm 0644 ${B}/arch/arm/dts/${UBOOT_USER_SPECIFIED_DTS}.dtb ${DEPLOYDIR}/u-boot.dtb | 80 | install -Dm 0644 ${B}/arch/arm/dts/${UBOOT_USER_SPECIFIED_DTS}.dtb ${DEPLOYDIR}/u-boot.dtb |
81 | fi | 81 | fi |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.01-xilinx-v2023.1.bb index fd76bc51..fd76bc51 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.01-xilinx-v2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.01-xilinx-v2023.2.bb index 22075424..22075424 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.2.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.01-xilinx-v2023.2.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.1.bb index c1c45e56..718ad9d4 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.1.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | 1 | ||
2 | require u-boot-xlnx.inc | 2 | require u-boot-xlnx.inc |
3 | require u-boot-spl-zynq-init.inc | 3 | require u-boot-spl-zynq-init.inc |
4 | require u-boot-xlnx-2022.1.inc | 4 | require u-boot-xlnx-2024.1.inc |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb index b10f321b..bcadf1e4 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | 1 | ||
2 | require u-boot-xlnx.inc | 2 | require u-boot-xlnx.inc |
3 | require u-boot-spl-zynq-init.inc | 3 | require u-boot-spl-zynq-init.inc |
4 | require u-boot-xlnx-2022.2.inc | 4 | require u-boot-xlnx-2024.2.inc |
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc deleted file mode 100644 index b1bcc143..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | SUMMARY = "TCP / IP networking and traffic control utilities" | ||
2 | DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ | ||
3 | TCP / IP networking and traffic control in Linux. Of the utilities ip \ | ||
4 | and tc are the most important. ip controls IPv4 and IPv6 \ | ||
5 | configuration and tc stands for traffic control." | ||
6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "GPL-2.0-or-later" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" | ||
11 | |||
12 | DEPENDS = "flex-native bison-native iptables libcap" | ||
13 | |||
14 | inherit update-alternatives bash-completion pkgconfig | ||
15 | |||
16 | CLEANBROKEN = "1" | ||
17 | |||
18 | PACKAGECONFIG ??= "tipc elf devlink" | ||
19 | PACKAGECONFIG[tipc] = ",,libmnl," | ||
20 | PACKAGECONFIG[elf] = ",,elfutils," | ||
21 | PACKAGECONFIG[devlink] = ",,libmnl," | ||
22 | PACKAGECONFIG[rdma] = ",,libmnl," | ||
23 | |||
24 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" | ||
25 | |||
26 | EXTRA_OEMAKE = "\ | ||
27 | CC='${CC}' \ | ||
28 | KERNEL_INCLUDE=${STAGING_INCDIR} \ | ||
29 | DOCDIR=${docdir}/iproute2 \ | ||
30 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ | ||
31 | SBINDIR='${base_sbindir}' \ | ||
32 | LIBDIR='${libdir}' \ | ||
33 | " | ||
34 | |||
35 | do_configure:append () { | ||
36 | sh configure ${STAGING_INCDIR} | ||
37 | # Explicitly disable ATM support | ||
38 | sed -i -e '/TC_CONFIG_ATM/d' config.mk | ||
39 | } | ||
40 | |||
41 | do_install () { | ||
42 | oe_runmake DESTDIR=${D} install | ||
43 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 | ||
44 | install -d ${D}${datadir} | ||
45 | mv ${D}/share/* ${D}${datadir}/ || true | ||
46 | rm ${D}/share -rf || true | ||
47 | } | ||
48 | |||
49 | # The .so files in iproute2-tc are modules, not traditional libraries | ||
50 | INSANE_SKIP:${PN}-tc = "dev-so" | ||
51 | |||
52 | IPROUTE2_PACKAGES =+ "\ | ||
53 | ${PN}-devlink \ | ||
54 | ${PN}-genl \ | ||
55 | ${PN}-ifstat \ | ||
56 | ${PN}-ip \ | ||
57 | ${PN}-lnstat \ | ||
58 | ${PN}-nstat \ | ||
59 | ${PN}-rtacct \ | ||
60 | ${PN}-ss \ | ||
61 | ${PN}-tc \ | ||
62 | ${PN}-tipc \ | ||
63 | ${PN}-rdma \ | ||
64 | " | ||
65 | |||
66 | PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" | ||
67 | RDEPENDS:${PN} += "${PN}-ip" | ||
68 | |||
69 | FILES:${PN}-tc = "${base_sbindir}/tc* \ | ||
70 | ${libdir}/tc/*.so" | ||
71 | FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ | ||
72 | ${base_sbindir}/ctstat \ | ||
73 | ${base_sbindir}/rtstat" | ||
74 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" | ||
75 | FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" | ||
76 | FILES:${PN}-genl = "${base_sbindir}/genl" | ||
77 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" | ||
78 | FILES:${PN}-nstat = "${base_sbindir}/nstat" | ||
79 | FILES:${PN}-ss = "${base_sbindir}/ss" | ||
80 | FILES:${PN}-tipc = "${base_sbindir}/tipc" | ||
81 | FILES:${PN}-devlink = "${base_sbindir}/devlink" | ||
82 | FILES:${PN}-rdma = "${base_sbindir}/rdma" | ||
83 | |||
84 | ALTERNATIVE:${PN}-ip = "ip" | ||
85 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" | ||
86 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" | ||
87 | ALTERNATIVE_PRIORITY = "100" | ||
88 | |||
89 | ALTERNATIVE:${PN}-tc = "tc" | ||
90 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" | ||
91 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" | ||
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch deleted file mode 100644 index 74e3de1c..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001 | ||
2 | From: Baruch Siach <baruch@tkos.co.il> | ||
3 | Date: Thu, 22 Dec 2016 15:26:30 +0200 | ||
4 | Subject: [PATCH] libc-compat.h: add musl workaround | ||
5 | |||
6 | The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and | ||
7 | __USE_MISC) to solve conflicts with libc provided headers. This patch makes | ||
8 | libc-compat.h work for musl libc as well. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Taken From: | ||
13 | https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch | ||
14 | |||
15 | Signed-off-by: Baruch Siach <baruch@tkos.co.il> | ||
16 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
17 | |||
18 | --- | ||
19 | include/uapi/linux/libc-compat.h | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h | ||
23 | index a159991..22198fa 100644 | ||
24 | --- a/include/uapi/linux/libc-compat.h | ||
25 | +++ b/include/uapi/linux/libc-compat.h | ||
26 | @@ -50,10 +50,12 @@ | ||
27 | #define _LIBC_COMPAT_H | ||
28 | |||
29 | /* We have included glibc headers... */ | ||
30 | -#if defined(__GLIBC__) | ||
31 | +#if 1 | ||
32 | +#define __USE_MISC | ||
33 | |||
34 | /* Coordinate with glibc net/if.h header. */ | ||
35 | #if defined(_NET_IF_H) && defined(__USE_MISC) | ||
36 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 | ||
37 | |||
38 | /* GLIBC headers included first so don't define anything | ||
39 | * that would already be defined. */ | ||
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb deleted file mode 100644 index 99a74339..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | require iproute2.inc | ||
2 | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ | ||
4 | file://0001-libc-compat.h-add-musl-workaround.patch \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[sha256sum] = "38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff" | ||
8 | |||
9 | # CFLAGS are computed in Makefile and reference CCOPTS | ||
10 | # | ||
11 | EXTRA_OEMAKE:append = " CCOPTS='${CFLAGS}'" | ||
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend b/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend index fd3a3c11..8901a611 100644 --- a/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend +++ b/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend | |||
@@ -3,3 +3,4 @@ QB_MEM:microblaze = "-m 2G" | |||
3 | QB_MEM:zynq = "-m 1G" | 3 | QB_MEM:zynq = "-m 1G" |
4 | QB_MEM:zynqmp = "-m 4G" | 4 | QB_MEM:zynqmp = "-m 4G" |
5 | QB_MEM:versal = "-m 16G" | 5 | QB_MEM:versal = "-m 16G" |
6 | QB_MEM:versal-net = "-m 16G" | ||
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbppend b/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbppend deleted file mode 100644 index fd3a3c11..00000000 --- a/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbppend +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # Minimum board memory required for each type | ||
2 | QB_MEM:microblaze = "-m 2G" | ||
3 | QB_MEM:zynq = "-m 1G" | ||
4 | QB_MEM:zynqmp = "-m 4G" | ||
5 | QB_MEM:versal = "-m 16G" | ||
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest-fast.bbappend b/meta-xilinx-core/recipes-core/images/core-image-ptest-fast.bbappend index e748c9e4..e7133ca9 100644 --- a/meta-xilinx-core/recipes-core/images/core-image-ptest-fast.bbappend +++ b/meta-xilinx-core/recipes-core/images/core-image-ptest-fast.bbappend | |||
@@ -3,6 +3,7 @@ QB_MEM:microblaze = "-m 2G" | |||
3 | QB_MEM:zynq = "-m 1G" | 3 | QB_MEM:zynq = "-m 1G" |
4 | QB_MEM:zynqmp = "-m 4G" | 4 | QB_MEM:zynqmp = "-m 4G" |
5 | QB_MEM:versal = "-m 16G" | 5 | QB_MEM:versal = "-m 16G" |
6 | QB_MEM:versal-net = "-m 16G" | ||
6 | 7 | ||
7 | # Zynq can't build qemu-xilinx or it's ptests | 8 | # Zynq can't build qemu-xilinx or it's ptests |
8 | PTESTS_FAST:remove:zynq = "qemu-ptest" | 9 | PTESTS_FAST:remove:zynq = "qemu-ptest" |
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend b/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend index fd3a3c11..8901a611 100644 --- a/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend +++ b/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend | |||
@@ -3,3 +3,4 @@ QB_MEM:microblaze = "-m 2G" | |||
3 | QB_MEM:zynq = "-m 1G" | 3 | QB_MEM:zynq = "-m 1G" |
4 | QB_MEM:zynqmp = "-m 4G" | 4 | QB_MEM:zynqmp = "-m 4G" |
5 | QB_MEM:versal = "-m 16G" | 5 | QB_MEM:versal = "-m 16G" |
6 | QB_MEM:versal-net = "-m 16G" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-lmsensors.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-lmsensors.bb new file mode 100644 index 00000000..d6df0b13 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-lmsensors.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "PetaLinux packages that provides tools and drivers for monitoring temperatures, voltage" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | LMSENSORS_PACKAGES = " \ | ||
8 | lmsensors-sensors \ | ||
9 | lmsensors-libsensors \ | ||
10 | lmsensors-sensorsdetect \ | ||
11 | " | ||
12 | |||
13 | RDEPENDS:${PN} = "${LMSENSORS_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb new file mode 100644 index 00000000..9378e372 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "Packages to extend network stack" | ||
2 | |||
3 | inherit packagegroup | ||
4 | |||
5 | NETWORKING_STACK_PACKAGES = " \ | ||
6 | ethtool \ | ||
7 | phytool \ | ||
8 | netcat \ | ||
9 | net-tools \ | ||
10 | dnsmasq \ | ||
11 | iproute2 \ | ||
12 | iptables \ | ||
13 | rpcbind \ | ||
14 | iperf2 \ | ||
15 | iperf3 \ | ||
16 | " | ||
17 | |||
18 | RDEPENDS:${PN} = "${NETWORKING_STACK_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb new file mode 100644 index 00000000..2742b99e --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "PetaLinux opencv supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | OPENCV_PACKAGES = " \ | ||
8 | opencv \ | ||
9 | libopencv-core \ | ||
10 | libopencv-highgui \ | ||
11 | libopencv-imgproc \ | ||
12 | libopencv-objdetect \ | ||
13 | libopencv-ml \ | ||
14 | libopencv-calib3d \ | ||
15 | libopencv-ccalib \ | ||
16 | " | ||
17 | |||
18 | RDEPENDS:${PN} = "${OPENCV_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb new file mode 100644 index 00000000..45862a87 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "ASLA supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | ALSA_PACKAGES = " \ | ||
8 | libasound \ | ||
9 | alsa-plugins \ | ||
10 | alsa-tools \ | ||
11 | alsa-utils \ | ||
12 | alsa-utils-scripts \ | ||
13 | sox \ | ||
14 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)} \ | ||
15 | " | ||
16 | RDEPENDS:${PN} = "${ALSA_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb new file mode 100644 index 00000000..90131e32 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "Packages for Benchmarks" | ||
2 | |||
3 | inherit packagegroup | ||
4 | |||
5 | BENCHMARKS_EXTRAS = " \ | ||
6 | hdparm \ | ||
7 | iotop \ | ||
8 | nicstat \ | ||
9 | lmbench \ | ||
10 | iptraf \ | ||
11 | net-snmp \ | ||
12 | lsof \ | ||
13 | babeltrace \ | ||
14 | sysstat \ | ||
15 | dool \ | ||
16 | dhrystone \ | ||
17 | linpack \ | ||
18 | whetstone \ | ||
19 | iperf3 \ | ||
20 | " | ||
21 | RDEPENDS:${PN} = "${BENCHMARKS_EXTRAS}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb new file mode 100644 index 00000000..26aa26a2 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "GStreamer packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | GSTREAMER_PACKAGES = " \ | ||
8 | gstreamer1.0 \ | ||
9 | gstreamer1.0-python \ | ||
10 | gstreamer1.0-meta-base \ | ||
11 | gstreamer1.0-plugins-base \ | ||
12 | gstreamer1.0-plugins-good \ | ||
13 | gstreamer1.0-plugins-bad \ | ||
14 | gstreamer1.0-rtsp-server \ | ||
15 | gst-shark \ | ||
16 | gstd \ | ||
17 | gst-perf \ | ||
18 | gstreamer1.0-omx \ | ||
19 | " | ||
20 | |||
21 | RDEPENDS:${PN} = "${GSTREAMER_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.2.bb b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.2.bb index 03f323e1..0a929ca9 100644 --- a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_2023.2.bb +++ b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.2.bb | |||
@@ -4,14 +4,14 @@ DESCRIPTION = "Building and installing bootgen, a Xilinx tool that lets you stit | |||
4 | LICENSE = "Apache-2.0" | 4 | LICENSE = "Apache-2.0" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" |
6 | 6 | ||
7 | S = "${WORKDIR}/git" | 7 | S = "${UNPACKDIR}/git" |
8 | 8 | ||
9 | DEPENDS += "openssl" | 9 | DEPENDS += "openssl" |
10 | RDEPENDS:${PN} += "openssl" | 10 | RDEPENDS:${PN} += "openssl" |
11 | 11 | ||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | 12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" |
13 | BRANCH = "xlnx_rel_v2023.2" | 13 | BRANCH = "xlnx_rel_v2024.2" |
14 | SRCREV = "8e6702bb5064b806e45028486de7376962470a36" | 14 | SRCREV = "6f448fece5d999985128fd454ae047e065a5e45d" |
15 | 15 | ||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
17 | SRC_URI = "${REPO};${BRANCHARG}" | 17 | SRC_URI = "${REPO};${BRANCHARG}" |
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-anytree_2.8.0.bb b/meta-xilinx-core/recipes-devtools/python/python3-anytree_2.8.0.bb index 8bd6e6bc..20210be9 100644 --- a/meta-xilinx-core/recipes-devtools/python/python3-anytree_2.8.0.bb +++ b/meta-xilinx-core/recipes-devtools/python/python3-anytree_2.8.0.bb | |||
@@ -10,7 +10,7 @@ DEPENDS += "python3-six" | |||
10 | SRC_URI = "git://github.com/c0fec0de/anytree.git;branch=2.x.x;protocol=https" | 10 | SRC_URI = "git://github.com/c0fec0de/anytree.git;branch=2.x.x;protocol=https" |
11 | SRCREV = "75c0198636f8997967ba00df5077cd21350f68ce" | 11 | SRCREV = "75c0198636f8997967ba00df5077cd21350f68ce" |
12 | 12 | ||
13 | S = "${WORKDIR}/git" | 13 | S = "${UNPACKDIR}/git" |
14 | 14 | ||
15 | inherit setuptools3 | 15 | inherit setuptools3 |
16 | 16 | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb new file mode 100644 index 00000000..75295dec --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Interactive plots and applications in the browser from Python" | ||
2 | HOMEPAGE = "https://bokeh.org" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4d2241e774601133cb2c58ae1277f9a5" | ||
5 | |||
6 | DEPENDS += " \ | ||
7 | python3-colorama-native \ | ||
8 | python3-setuptools-git-versioning-native \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[sha256sum] = "21dbe86842b24d83c73a1aef2de346a1a7c11c437015d6e9d180a1637e6e8197" | ||
12 | |||
13 | inherit pypi python_setuptools_build_meta | ||
14 | |||
15 | RDEPENDS:${PN} = " \ | ||
16 | python3-colorama \ | ||
17 | python3-contourpy \ | ||
18 | python3-jinja2 \ | ||
19 | python3-numpy \ | ||
20 | python3-packaging \ | ||
21 | python3-pandas \ | ||
22 | python3-pillow \ | ||
23 | python3-pyyaml \ | ||
24 | python3-tornado \ | ||
25 | python3-typing-extensions \ | ||
26 | python3-xyzservices \ | ||
27 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb new file mode 100644 index 00000000..5f21b002 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Python library for calculating contours of 2D quadrilateral grids" | ||
2 | HOMEPAGE = "https://github.com/contourpy/contourpy" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a051d5dfc6ccbc7bbe3e626d65156784" | ||
5 | |||
6 | DEPENDS += " \ | ||
7 | meson-native \ | ||
8 | python3-pybind11-native \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[sha256sum] = "4d8908b3bee1c889e547867ca4cdc54e5ab6be6d3e078556814a22457f49423c" | ||
12 | |||
13 | inherit pypi python_mesonpy | ||
14 | |||
15 | RDEPENDS:${PN} = "python3-numpy" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb new file mode 100644 index 00000000..33987e68 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "Web mercator XYZ tile utilities" | ||
2 | HOMEPAGE = "https://github.com/mapbox/mercantile" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=11e1a3a1ec3801b170b9152c135e8f74 \ | ||
5 | file://docs/license.rst;md5=083a4719b463be5b728fd0e3f47db7e7" | ||
6 | |||
7 | SRC_URI[sha256sum] = "fa3c6db15daffd58454ac198b31887519a19caccee3f9d63d17ae7ff61b3b56b" | ||
8 | |||
9 | inherit pypi setuptools3 | ||
10 | |||
11 | RDEPENDS:${PN} += " \ | ||
12 | python3-click \ | ||
13 | python3-core \ | ||
14 | python3-json \ | ||
15 | python3-logging \ | ||
16 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb new file mode 100644 index 00000000..3c03069b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | SUMMARY = "Seamless operability between C++11 and Python" | ||
2 | LICENSE = "BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f" | ||
4 | |||
5 | SRC_URI[sha256sum] = "65be498b1cac516161add1508e65375674916bebf2570d057dc9c3c7bcbbc7b0" | ||
6 | |||
7 | inherit pypi python_setuptools_build_meta | ||
8 | |||
9 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb b/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb new file mode 100644 index 00000000..53f04b77 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Use git repo data for building a version number according PEP-440" | ||
2 | HOMEPAGE = "https://setuptools-git-versioning.readthedocs.io" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=92e79e3a844e66731724600f3ac9c0d8" | ||
5 | |||
6 | SRC_URI[sha256sum] = "85b5fbe7bda8e9c24bbd9e587a9d4b91129417f4dd3e11e3c0d5f3f835fc4d4d" | ||
7 | |||
8 | inherit pypi setuptools3 | ||
9 | |||
10 | RDEPENDS:${PN} += " \ | ||
11 | python3-core \ | ||
12 | python3-datetime \ | ||
13 | python3-logging \ | ||
14 | python3-packaging \ | ||
15 | python3-pprint \ | ||
16 | python3-setuptools \ | ||
17 | python3-tomllib \ | ||
18 | " | ||
19 | |||
20 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb b/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb new file mode 100644 index 00000000..3e9b7ee1 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Source of XYZ tiles providers" | ||
2 | HOMEPAGE = "https://github.com/geopandas/xyzservices" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6a3e440ffacb99f21fa410467c048574" | ||
5 | |||
6 | DEPENDS += "python3-setuptools-scm-native" | ||
7 | |||
8 | SRC_URI[sha256sum] = "58c1bdab4257d2551b9ef91cd48571f77b7c4d2bc45bf5e3c05ac97b3a4d7282" | ||
9 | |||
10 | inherit pypi python_setuptools_build_meta | ||
11 | |||
12 | FILES:${PN} += "${prefix}" | ||
13 | |||
14 | RDEPENDS:${PN} += " \ | ||
15 | python3-core \ | ||
16 | python3-json \ | ||
17 | python3-mercantile \ | ||
18 | python3-netclient \ | ||
19 | python3-requests \ | ||
20 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch index 370e694b..77b13aa2 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch +++ b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | |||
@@ -5,66 +5,147 @@ import os | |||
5 | import subprocess | 5 | import subprocess |
6 | import sys | 6 | import sys |
7 | import tempfile | 7 | import tempfile |
8 | import re | ||
8 | import shutil | 9 | import shutil |
9 | 10 | ||
10 | binpath = os.path.dirname(os.path.abspath(__file__)) | 11 | binpath = os.path.dirname(os.path.abspath(__file__)) |
11 | mach_path = tempfile.mkdtemp() | 12 | mach_path = tempfile.mkdtemp() |
12 | 13 | ||
13 | |||
14 | # Separate PMU and APU arguments | 14 | # Separate PMU and APU arguments |
15 | APU_args = sys.argv[1:] | 15 | APU_args = sys.argv[1:] |
16 | mbtype='' | 16 | PMU_args = [] |
17 | PLM_args = [] | ||
18 | bootbin_arg = None | ||
17 | 19 | ||
18 | if '-pmu-args' in APU_args: | 20 | if '-pmu-args' in APU_args: |
19 | MB_args = APU_args[APU_args.index('-pmu-args')+1] | 21 | pmu_args_idx = APU_args.index('-pmu-args') |
20 | APU_args.remove('-pmu-args') | 22 | PMU_args = APU_args[pmu_args_idx+1].split() |
21 | APU_args.remove(MB_args) | 23 | del APU_args[pmu_args_idx:pmu_args_idx+2] |
22 | MB_args = MB_args.split() | 24 | |
23 | PMU_rom = MB_args[MB_args.index('-kernel')+1] | 25 | if '-plm-args' in APU_args: |
24 | mbtype='PMU' | 26 | plm_args_idx = APU_args.index('-plm-args') |
25 | elif '-plm-args' in APU_args: | 27 | PLM_args = APU_args[plm_args_idx+1].split() |
26 | MB_args = APU_args[APU_args.index('-plm-args')+1] | 28 | del APU_args[plm_args_idx:plm_args_idx+2] |
27 | APU_args.remove('-plm-args') | 29 | |
28 | APU_args.remove(MB_args) | 30 | if '-bootbin' in APU_args: |
29 | MB_args = MB_args.split() | 31 | bootbin_args_idx = APU_args.index('-bootbin') |
30 | mbtype='PLM' | 32 | bootbin_arg = APU_args[bootbin_args_idx+1] |
31 | elif '--help' in APU_args: | 33 | del APU_args[bootbin_args_idx:bootbin_args_idx+2] |
32 | mbtype='help' | 34 | |
33 | else: | 35 | if PMU_args and PLM_args: |
34 | error_msg = '\nMultiarch not setup properly.' | 36 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") |
35 | sys.exit(error_msg) | 37 | |
36 | 38 | help_options = ['-h', '-help', '--help'] | |
37 | error_msg = None | 39 | def help(status): |
38 | if (mbtype == 'PMU' and os.path.exists(PMU_rom)) or mbtype == 'PLM': | 40 | print("AMD FPGA QEMU multiarch wrapper\nVersion 2024.2\n\nUsage:") |
39 | 41 | print(f" {sys.argv[0]} <APU options> [-pmu-args <pmu options>]") | |
40 | # We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly | 42 | print(f" {sys.argv[0]} <APU options> [-plm-args <plm options>]\n") |
41 | tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s] | 43 | if status == 0: |
42 | 44 | print(f"\n") | |
43 | #NEED TO FIX for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream | 45 | if set(PMU_args).intersection(set(help_options)): |
44 | # We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is | 46 | print(f"PMU Options:\n") |
45 | if len(tcp_serial_ports) == 2: | 47 | pmu_args_s = ' '.join(PMU_args) |
46 | APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]] | 48 | help_cmd = f'{binpath}/qemu-system-microblazeel {pmu_args_s}' |
47 | 49 | elif set(PLM_args).intersection(set(help_options)): | |
48 | mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(MB_args) + ' -machine-path ' + mach_path | 50 | print(f"PLM Options:\n") |
49 | apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path | 51 | plm_args_s = ' '.join(PLM_args) |
50 | 52 | help_cmd = f'{binpath}/qemu-system-microblazeel {plm_args_s}' | |
51 | # Debug prints | 53 | else: |
52 | print('\n%s instance cmd: %s\n' % (mbtype, mb_cmd)) | 54 | if not set(APU_args).intersection(set(help_options)): |
53 | print('APU instance cmd: %s\n' % apu_cmd) | 55 | APU_args.append('-help') |
54 | 56 | print(f"APU Options:\n") | |
55 | 57 | print(f" -bootbin <boot.bin> - Use a boot.bin instead of individual firmware, device trees and bootloader\n") | |
56 | # Invoke QEMU pmu instance | 58 | apu_args_s = ' '.join(APU_args) |
57 | process_pmu = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE) | 59 | help_cmd = f'{binpath}/qemu-system-aarch64 {apu_args_s}' |
58 | 60 | ||
59 | # Invoke QEMU APU instance | 61 | print(f"{help_cmd}\n") |
62 | process = subprocess.Popen(help_cmd, shell=True, stderr=subprocess.PIPE) | ||
63 | status = process.wait() | ||
64 | sys.exit(status) | ||
65 | |||
66 | if set(APU_args).intersection(set(help_options)) or set(PMU_args).intersection(set(help_options)) or set(PLM_args).intersection(set(help_options)): | ||
67 | help(0) | ||
68 | |||
69 | if not PMU_args and not PLM_args: | ||
70 | help(1) | ||
71 | |||
72 | if PMU_args: | ||
73 | try: | ||
74 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | ||
75 | except: | ||
76 | PMU_rom = "" | ||
77 | |||
78 | if not os.path.exists(PMU_rom): | ||
79 | sys.exit(f'\nERROR: Missing PMU ROM: {PMU_rom}' | ||
80 | '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n') | ||
81 | |||
82 | if bootbin_arg: | ||
83 | if not os.path.isfile(bootbin_arg): | ||
84 | print(f"\nERROR: bootbin file not found at {bootbin_arg}" | ||
85 | " Please build and ospi_image or set QB_OSPI_BIN variable to prebuilt file\n") | ||
86 | sys.exit(1) | ||
87 | |||
88 | shutil.copyfile(bootbin_arg, f'{mach_path}/boot.bin') | ||
89 | |||
90 | bootgen_command = [f'{binpath}/bootgen', '-arch', 'versal', '-dump', 'boot.bin'] | ||
91 | subprocess.run(bootgen_command + ['bh'], check=True, cwd=mach_path, stdout=subprocess.DEVNULL) | ||
92 | subprocess.run(bootgen_command + ['plm'], check=True, cwd=mach_path, stdout=subprocess.DEVNULL) | ||
93 | subprocess.run(bootgen_command + ['pmc_cdo'], check=True, cwd=mach_path, stdout=subprocess.DEVNULL) | ||
94 | |||
95 | bootgen_command = f"{binpath}/bootgen -arch versal -read {bootbin_arg}" | ||
96 | result = subprocess.check_output(bootgen_command.split()) | ||
97 | bootgen_output = result.decode().splitlines() | ||
98 | |||
99 | for i, l in enumerate(bootgen_output): | ||
100 | if 'PARTITION HEADER TABLE (pmc_subsys.0.0)' in l: | ||
101 | plm_line = bootgen_output[i+4] | ||
102 | if 'BOOT HEADER' in l: | ||
103 | pmc_line = bootgen_output[i+6] | ||
104 | |||
105 | plm_load_addr = re.search(r"exec_addr_lo \(0x10\) : (0x\w*)\s*", plm_line).group(1) | ||
106 | pmc_load_addr = re.search(r"pmccdo_load_addr \(0x20\) : (0x\w*)", pmc_line).group(1) | ||
107 | |||
108 | PLM_args.append(f"-device loader,file={mach_path}/boot_bh.bin,addr=0xF201E000,force-raw=on") | ||
109 | PLM_args.append(f"-device loader,file={mach_path}/pmc_cdo.bin,addr={pmc_load_addr},force-raw=on") | ||
110 | PLM_args.append(f"-device loader,file={mach_path}/plm.bin,addr={plm_load_addr},force-raw=on") | ||
111 | PLM_args.append(f"-device loader,addr={plm_load_addr},cpu-num=1") | ||
112 | |||
113 | # We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output | ||
114 | tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s] | ||
115 | |||
116 | #FIXME for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream | ||
117 | # We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is | ||
118 | if len(tcp_serial_ports) == 2: | ||
119 | APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]] | ||
120 | |||
121 | mb_cmd = "" | ||
122 | if PMU_args: | ||
123 | pmu_args_s = ' '.join(PMU_args) | ||
124 | mb_cmd = f'{binpath}/qemu-system-microblazeel {pmu_args_s} -machine-path {mach_path}' | ||
125 | print(f"PMU instance cmd: {mb_cmd}\n") | ||
126 | |||
127 | if PLM_args: | ||
128 | plm_args_s = ' '.join(PLM_args) | ||
129 | mb_cmd = f'{binpath}/qemu-system-microblazeel {plm_args_s} -machine-path {mach_path}' | ||
130 | print(f"PLM instance cmd: {mb_cmd}\n") | ||
131 | |||
132 | apu_args_s = ' '.join(APU_args) | ||
133 | apu_cmd = f'{binpath}/qemu-system-aarch64 {apu_args_s} -machine-path {mach_path}' | ||
134 | print(f"APU instance cmd: {apu_cmd}\n") | ||
135 | |||
136 | if mb_cmd: | ||
137 | process_mb = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE) | ||
138 | |||
139 | if apu_cmd: | ||
60 | process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE) | 140 | process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE) |
61 | if process_apu.wait(): | ||
62 | error_msg = '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode() | ||
63 | 141 | ||
64 | else: | 142 | error_msg = "" |
65 | if mbtype == 'PMU': | 143 | if apu_cmd and process_apu.wait(): |
66 | error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom | 144 | # We only check for failures on the MB instance if APU fails |
67 | error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n' | 145 | error_msg += '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode() |
146 | |||
147 | if mb_cmd and process_mb.wait(): | ||
148 | error_msg += '\nQEMU MB instance failed:\n%s' % process_mb.stderr.read().decode() | ||
68 | 149 | ||
69 | shutil.rmtree(mach_path) | 150 | shutil.rmtree(mach_path) |
70 | sys.exit(error_msg) | 151 | sys.exit(error_msg) |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/flashstrip_1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/flashstrip_1.0.bb index e1dcc5ae..9f08a1f4 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/flashstrip_1.0.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/flashstrip_1.0.bb | |||
@@ -4,6 +4,7 @@ DESCRIPTION = "Building and installing flash strip utility" | |||
4 | LICENSE = "MIT" | 4 | LICENSE = "MIT" |
5 | LIC_FILES_CHKSUM = "file://../flash_stripe.c;beginline=1;endline=23;md5=abb859d98b7c4eede655e1b71824125a" | 5 | LIC_FILES_CHKSUM = "file://../flash_stripe.c;beginline=1;endline=23;md5=abb859d98b7c4eede655e1b71824125a" |
6 | 6 | ||
7 | S = "${UNPACKDIR}" | ||
7 | B = "${WORKDIR}/build" | 8 | B = "${WORKDIR}/build" |
8 | 9 | ||
9 | SRC_URI += "file://flash_stripe.c" | 10 | SRC_URI += "file://flash_stripe.c" |
@@ -11,10 +12,10 @@ SRC_URI += "file://flash_stripe.c" | |||
11 | TARGET_CC_ARCH += "${LDFLAGS}" | 12 | TARGET_CC_ARCH += "${LDFLAGS}" |
12 | 13 | ||
13 | do_compile() { | 14 | do_compile() { |
14 | ${CC} ${WORKDIR}/flash_stripe.c -o flash_strip | 15 | ${CC} ${S}/flash_stripe.c -o flash_strip |
15 | ${CC} ${WORKDIR}/flash_stripe.c -o flash_unstrip | 16 | ${CC} ${S}/flash_stripe.c -o flash_unstrip |
16 | ${CC} ${WORKDIR}/flash_stripe.c -o flash_strip_bw -DFLASH_STRIPE_BW | 17 | ${CC} ${S}/flash_stripe.c -o flash_strip_bw -DFLASH_STRIPE_BW |
17 | ${CC} ${WORKDIR}/flash_stripe.c -o flash_unstrip_bw -DUNSTRIP -DFLASH_STRIPE_BW | 18 | ${CC} ${S}/flash_stripe.c -o flash_unstrip_bw -DUNSTRIP -DFLASH_STRIPE_BW |
18 | } | 19 | } |
19 | 20 | ||
20 | do_install() { | 21 | do_install() { |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc new file mode 100644 index 00000000..29b12354 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc | |||
@@ -0,0 +1,290 @@ | |||
1 | SUMMARY = "Fast open source processor emulator" | ||
2 | DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \ | ||
3 | machine's processor through dynamic binary translation and provides a set \ | ||
4 | of different hardware and device models for the machine, enabling it to run \ | ||
5 | a variety of guest operating systems" | ||
6 | HOMEPAGE = "http://qemu.org" | ||
7 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" | ||
8 | |||
9 | DEPENDS += "bison-native meson-native ninja-native" | ||
10 | |||
11 | RDEPENDS:${PN}-ptest = "bash" | ||
12 | |||
13 | require qemu-targets-8.1.inc | ||
14 | # https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36 means | ||
15 | # we need a full python3-native setup | ||
16 | inherit pkgconfig ptest update-rc.d systemd python3native | ||
17 | |||
18 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
19 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | ||
20 | |||
21 | SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | ||
22 | file://powerpc_rom.bin \ | ||
23 | file://run-ptest \ | ||
24 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | ||
25 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ | ||
26 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | ||
27 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ | ||
28 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ | ||
29 | file://0007-qemu-Determinism-fixes.patch \ | ||
30 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
31 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | ||
32 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | ||
33 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ | ||
34 | file://fixedmeson.patch \ | ||
35 | file://fixmips.patch \ | ||
36 | file://no-pip.patch \ | ||
37 | file://qemu-guest-agent.init \ | ||
38 | file://qemu-guest-agent.udev \ | ||
39 | " | ||
40 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | ||
41 | |||
42 | |||
43 | SRC_URI[sha256sum] = "541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087" | ||
44 | |||
45 | SRC_URI:append:class-target = " file://cross.patch" | ||
46 | SRC_URI:append:class-nativesdk = " file://cross.patch" | ||
47 | |||
48 | CVE_STATUS[CVE-2017-5957] = "cpe-incorrect: Applies against virglrender < 0.6.0 and not qemu itself" | ||
49 | |||
50 | CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default." | ||
51 | |||
52 | # https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11 | ||
53 | CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were determined to not constitute a vulnerability." | ||
54 | |||
55 | # As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664 | ||
56 | # https://bugzilla.redhat.com/show_bug.cgi?id=2167423 | ||
57 | CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on Windows" | ||
58 | |||
59 | # As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387 | ||
60 | CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue." | ||
61 | |||
62 | COMPATIBLE_HOST:mipsarchn32 = "null" | ||
63 | COMPATIBLE_HOST:mipsarchn64 = "null" | ||
64 | COMPATIBLE_HOST:riscv32 = "null" | ||
65 | |||
66 | # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html | ||
67 | # upstream states qemu doesn't work without optimization | ||
68 | DEBUG_BUILD = "0" | ||
69 | |||
70 | do_install:append() { | ||
71 | # Prevent QA warnings about installed ${localstatedir}/run | ||
72 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | ||
73 | } | ||
74 | |||
75 | do_install_ptest() { | ||
76 | cp -rL ${B}/tests ${D}${PTEST_PATH} | ||
77 | find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {} | ||
78 | |||
79 | # Don't check the file genreated by configure | ||
80 | sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh | ||
81 | |||
82 | # Strip the paths from the QEMU variable, we can use PATH | ||
83 | makfiles=$(find ${D}${PTEST_PATH} -name "*.mak") | ||
84 | sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles | ||
85 | |||
86 | # Strip compiler flags as they break reproducibility | ||
87 | sed -i -e "s,^CC=.*,CC=gcc," \ | ||
88 | -e "s,^CCAS=.*,CCAS=gcc," \ | ||
89 | -e "s,^LD=.*,LD=ld," $makfiles | ||
90 | |||
91 | # Update SRC_PATH variable to the right place on target | ||
92 | sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles | ||
93 | |||
94 | # https://gitlab.com/qemu-project/qemu/-/issues/1403 | ||
95 | rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command | ||
96 | } | ||
97 | |||
98 | # QEMU_TARGETS is overridable variable | ||
99 | QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc ppc64 ppc64le riscv32 riscv64 sh4 x86_64" | ||
100 | |||
101 | EXTRA_OECONF = " \ | ||
102 | --prefix=${prefix} \ | ||
103 | --bindir=${bindir} \ | ||
104 | --includedir=${includedir} \ | ||
105 | --libdir=${libdir} \ | ||
106 | --mandir=${mandir} \ | ||
107 | --datadir=${datadir} \ | ||
108 | --docdir=${docdir}/${BPN} \ | ||
109 | --sysconfdir=${sysconfdir} \ | ||
110 | --libexecdir=${libexecdir} \ | ||
111 | --localstatedir=${localstatedir} \ | ||
112 | --with-suffix=${BPN} \ | ||
113 | --disable-strip \ | ||
114 | --disable-werror \ | ||
115 | --extra-cflags='${CFLAGS}' \ | ||
116 | --extra-ldflags='${LDFLAGS}' \ | ||
117 | --disable-download \ | ||
118 | --disable-docs \ | ||
119 | --host-cc='${BUILD_CC}' \ | ||
120 | ${PACKAGECONFIG_CONFARGS} \ | ||
121 | " | ||
122 | |||
123 | EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}" | ||
124 | EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}" | ||
125 | |||
126 | B = "${WORKDIR}/build" | ||
127 | |||
128 | #EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3" | ||
129 | |||
130 | do_configure:prepend:class-native() { | ||
131 | # Append build host pkg-config paths for native target since the host may provide sdl | ||
132 | BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "") | ||
133 | if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then | ||
134 | export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH | ||
135 | fi | ||
136 | } | ||
137 | |||
138 | do_configure() { | ||
139 | export PKG_CONFIG=pkg-config | ||
140 | ${S}/configure ${EXTRA_OECONF} | ||
141 | } | ||
142 | do_configure[cleandirs] += "${B}" | ||
143 | |||
144 | do_install () { | ||
145 | export STRIP="" | ||
146 | oe_runmake 'DESTDIR=${D}' install | ||
147 | |||
148 | # If we built the guest agent, also install startup/udev rules | ||
149 | if [ -e "${D}${bindir}/qemu-ga" ]; then | ||
150 | install -d ${D}${sysconfdir}/init.d/ | ||
151 | install -m 0755 ${UNPACKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
152 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
153 | |||
154 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
155 | install -m 0644 ${UNPACKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules | ||
156 | |||
157 | install -d ${D}${systemd_unitdir}/system/ | ||
158 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system | ||
159 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service | ||
160 | fi | ||
161 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text | ||
162 | rm ${D}${datadir}/qemu/s390-netboot.img -f | ||
163 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] | ||
164 | rm ${D}${datadir}/qemu/s390-ccw.img -f | ||
165 | } | ||
166 | |||
167 | # The following fragment will create a wrapper for qemu-mips user emulation | ||
168 | # binary in order to work around a segmentation fault issue. Basically, by | ||
169 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. | ||
170 | # This will trigger a MMU access fault in the virtual CPU. With this change, | ||
171 | # the qemu-mips works fine. | ||
172 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! | ||
173 | do_install:append() { | ||
174 | if [ -e "${D}/${bindir}/qemu-mips" ]; then | ||
175 | create_wrapper ${D}/${bindir}/qemu-mips \ | ||
176 | QEMU_RESERVED_VA=0x0 | ||
177 | fi | ||
178 | } | ||
179 | # END of qemu-mips workaround | ||
180 | |||
181 | # Disable kvm/virgl/mesa on targets that do not support it | ||
182 | PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+" | ||
183 | PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie" | ||
184 | |||
185 | PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" | ||
186 | PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" | ||
187 | PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr --enable-cap-ng,--disable-virtfs,libcap-ng attr," | ||
188 | PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio," | ||
189 | PACKAGECONFIG[uring] = "--enable-linux-io-uring,--disable-linux-io-uring,liburing" | ||
190 | PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore xen-tools-libxenctrl xen-tools-libxenguest" | ||
191 | PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl," | ||
192 | PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg," | ||
193 | PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl," | ||
194 | PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss," | ||
195 | PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses," | ||
196 | PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native" | ||
197 | PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native" | ||
198 | PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng," | ||
199 | PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh," | ||
200 | PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," | ||
201 | PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle" | ||
202 | PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1" | ||
203 | PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc" | ||
204 | PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib" | ||
205 | PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy" | ||
206 | PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo" | ||
207 | PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl" | ||
208 | PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl" | ||
209 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls" | ||
210 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | ||
211 | PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi" | ||
212 | PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm" | ||
213 | PACKAGECONFIG[virglrenderer] = "--enable-virglrenderer,--disable-virglrenderer,virglrenderer" | ||
214 | # spice will be in meta-networking layer | ||
215 | PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice" | ||
216 | # usbredir will be in meta-networking layer | ||
217 | PACKAGECONFIG[dbus-display] = "--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus" | ||
218 | PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir" | ||
219 | PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy" | ||
220 | PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs" | ||
221 | PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon" | ||
222 | PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev" | ||
223 | PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," | ||
224 | PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" | ||
225 | PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," | ||
226 | PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust," | ||
227 | PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," | ||
228 | PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" | ||
229 | # libnfs is currently provided by meta-kodi | ||
230 | PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs" | ||
231 | PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk" | ||
232 | PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio" | ||
233 | PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux" | ||
234 | PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf" | ||
235 | PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone" | ||
236 | PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma" | ||
237 | PACKAGECONFIG[vde] = "--enable-vde,--disable-vde" | ||
238 | PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse --disable-fuse-lseek,fuse3" | ||
239 | PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp" | ||
240 | PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi" | ||
241 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack," | ||
242 | PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils" | ||
243 | PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire" | ||
244 | PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio" | ||
245 | |||
246 | INSANE_SKIP:${PN}-common = "arch" | ||
247 | |||
248 | FILES:${PN} += "${datadir}/icons" | ||
249 | |||
250 | # For user who want to install all arch packages | ||
251 | PACKAGES =+ "${PN}-common" | ||
252 | RDEPENDS:${PN} += "${PN}-common" | ||
253 | |||
254 | ALLOW_EMPTY:${PN} = "1" | ||
255 | FILES:${PN} = "" | ||
256 | |||
257 | FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* ${localstatedir}" | ||
258 | |||
259 | PACKAGES_DYNAMIC += "^${PN}-user-.* ^${PN}-system-.*" | ||
260 | |||
261 | PACKAGESPLITFUNCS =+ "split_qemu_packages" | ||
262 | |||
263 | python split_qemu_packages () { | ||
264 | archdir = d.expand('${bindir}/') | ||
265 | subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') | ||
266 | |||
267 | subpackages += do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True, extra_depends='${PN}-common') | ||
268 | if subpackages: | ||
269 | d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages)) | ||
270 | mipspackage = d.getVar('PN') + "-user-mips" | ||
271 | if mipspackage in ' '.join(subpackages): | ||
272 | d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') | ||
273 | } | ||
274 | |||
275 | # Put the guest agent in a separate package | ||
276 | PACKAGES =+ "${PN}-guest-agent" | ||
277 | SUMMARY:${PN}-guest-agent = "QEMU guest agent" | ||
278 | FILES:${PN}-guest-agent += " \ | ||
279 | ${bindir}/qemu-ga \ | ||
280 | ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \ | ||
281 | ${sysconfdir}/init.d/qemu-guest-agent \ | ||
282 | ${systemd_unitdir}/system/qemu-guest-agent.service \ | ||
283 | " | ||
284 | |||
285 | INITSCRIPT_PACKAGES = "${PN}-guest-agent" | ||
286 | INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent" | ||
287 | INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults" | ||
288 | |||
289 | SYSTEMD_PACKAGES = "${PN}-guest-agent" | ||
290 | SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch new file mode 100644 index 00000000..ff7f64ad --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 84986d94277de2ac853cb613c37dbafe485f0981 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
3 | Date: Fri, 6 Oct 2023 18:41:14 +0300 | ||
4 | Subject: [PATCH 1/2] python: rename QEMUMonitorProtocol.cmd() to cmd_raw() | ||
5 | |||
6 | Having cmd() and command() methods in one class doesn't look good. | ||
7 | Rename cmd() to cmd_raw(), to show its meaning better. | ||
8 | |||
9 | We also want to rename command() to cmd() in future, so this commit is | ||
10 | a necessary step. | ||
11 | |||
12 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
13 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
14 | Message-id: 20231006154125.1068348-5-vsementsov@yandex-team.ru | ||
15 | Signed-off-by: John Snow <jsnow@redhat.com> | ||
16 | |||
17 | Upstream-Status: Backport (37274707f6f3868fae7e0055d9a703006fc142d0) | ||
18 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
19 | --- | ||
20 | python/qemu/machine/machine.py | 2 +- | ||
21 | python/qemu/qmp/legacy.py | 8 ++------ | ||
22 | tests/qemu-iotests/iotests.py | 2 +- | ||
23 | 3 files changed, 4 insertions(+), 8 deletions(-) | ||
24 | |||
25 | diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py | ||
26 | index c16a0b6fed..82fa8cdddf 100644 | ||
27 | --- a/python/qemu/machine/machine.py | ||
28 | +++ b/python/qemu/machine/machine.py | ||
29 | @@ -686,7 +686,7 @@ def qmp(self, cmd: str, | ||
30 | conv_keys = True | ||
31 | |||
32 | qmp_args = self._qmp_args(conv_keys, args) | ||
33 | - ret = self._qmp.cmd(cmd, args=qmp_args) | ||
34 | + ret = self._qmp.cmd_raw(cmd, args=qmp_args) | ||
35 | if cmd == 'quit' and 'error' not in ret and 'return' in ret: | ||
36 | self._quit_issued = True | ||
37 | return ret | ||
38 | diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py | ||
39 | index e1e9383978..e5fa1ce9c4 100644 | ||
40 | --- a/python/qemu/qmp/legacy.py | ||
41 | +++ b/python/qemu/qmp/legacy.py | ||
42 | @@ -194,21 +194,17 @@ def cmd_obj(self, qmp_cmd: QMPMessage) -> QMPMessage: | ||
43 | ) | ||
44 | ) | ||
45 | |||
46 | - def cmd(self, name: str, | ||
47 | - args: Optional[Dict[str, object]] = None, | ||
48 | - cmd_id: Optional[object] = None) -> QMPMessage: | ||
49 | + def cmd_raw(self, name: str, | ||
50 | + args: Optional[Dict[str, object]] = None) -> QMPMessage: | ||
51 | """ | ||
52 | Build a QMP command and send it to the QMP Monitor. | ||
53 | |||
54 | :param name: command name (string) | ||
55 | :param args: command arguments (dict) | ||
56 | - :param cmd_id: command id (dict, list, string or int) | ||
57 | """ | ||
58 | qmp_cmd: QMPMessage = {'execute': name} | ||
59 | if args: | ||
60 | qmp_cmd['arguments'] = args | ||
61 | - if cmd_id: | ||
62 | - qmp_cmd['id'] = cmd_id | ||
63 | return self.cmd_obj(qmp_cmd) | ||
64 | |||
65 | def command(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
66 | diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py | ||
67 | index ef66fbd62b..8ffd9fb660 100644 | ||
68 | --- a/tests/qemu-iotests/iotests.py | ||
69 | +++ b/tests/qemu-iotests/iotests.py | ||
70 | @@ -460,7 +460,7 @@ def __init__(self, *args: str, instance_id: str = 'a', qmp: bool = False): | ||
71 | def qmp(self, cmd: str, args: Optional[Dict[str, object]] = None) \ | ||
72 | -> QMPMessage: | ||
73 | assert self._qmp is not None | ||
74 | - return self._qmp.cmd(cmd, args) | ||
75 | + return self._qmp.cmd_raw(cmd, args) | ||
76 | |||
77 | def get_qmp(self) -> QEMUMonitorProtocol: | ||
78 | assert self._qmp is not None | ||
79 | -- | ||
80 | 2.34.1 | ||
81 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch index 6fb160e6..c6550801 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch | |||
@@ -18,11 +18,11 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com> | |||
18 | hw/mips/malta.c | 2 +- | 18 | hw/mips/malta.c | 2 +- |
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 20 | ||
21 | diff --git a/hw/mips/malta.c b/hw/mips/malta.c | 21 | Index: qemu-8.0.0/hw/mips/malta.c |
22 | index 628851172..12d37f35d 100644 | 22 | =================================================================== |
23 | --- a/hw/mips/malta.c | 23 | --- qemu-8.0.0.orig/hw/mips/malta.c |
24 | +++ b/hw/mips/malta.c | 24 | +++ qemu-8.0.0/hw/mips/malta.c |
25 | @@ -61,7 +61,7 @@ | 25 | @@ -64,7 +64,7 @@ |
26 | #define ENVP_PADDR 0x2000 | 26 | #define ENVP_PADDR 0x2000 |
27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) | 27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) |
28 | #define ENVP_NB_ENTRIES 16 | 28 | #define ENVP_NB_ENTRIES 16 |
@@ -31,6 +31,3 @@ index 628851172..12d37f35d 100644 | |||
31 | 31 | ||
32 | /* Hardware addresses */ | 32 | /* Hardware addresses */ |
33 | #define FLASH_ADDRESS 0x1e000000ULL | 33 | #define FLASH_ADDRESS 0x1e000000ULL |
34 | -- | ||
35 | 2.30.2 | ||
36 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch new file mode 100644 index 00000000..ceae67be --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch | |||
@@ -0,0 +1,355 @@ | |||
1 | From 71f14902256e3c3529710b713e1ea43100bf4c40 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 17 Dec 2022 08:37:46 -0800 | ||
4 | Subject: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and | ||
5 | macros | ||
6 | |||
7 | Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions | ||
8 | anf macros behave same as their 64 suffixed counterparts. This also | ||
9 | helps in compiling with latest musl C library, where these macros and | ||
10 | functions are no more available under _GNU_SOURCE feature macro | ||
11 | |||
12 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg02841.html] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Cc: Laurent Vivier <laurent@vivier.eu> | ||
15 | --- | ||
16 | linux-user/syscall.c | 153 +++++++++++-------------------------------- | ||
17 | 1 file changed, 39 insertions(+), 114 deletions(-) | ||
18 | |||
19 | Index: qemu-8.0.0/linux-user/syscall.c | ||
20 | =================================================================== | ||
21 | --- qemu-8.0.0.orig/linux-user/syscall.c | ||
22 | +++ qemu-8.0.0/linux-user/syscall.c | ||
23 | @@ -761,8 +761,8 @@ safe_syscall6(ssize_t, copy_file_range, | ||
24 | */ | ||
25 | #define safe_ioctl(...) safe_syscall(__NR_ioctl, __VA_ARGS__) | ||
26 | /* Similarly for fcntl. Note that callers must always: | ||
27 | - * pass the F_GETLK64 etc constants rather than the unsuffixed F_GETLK | ||
28 | - * use the flock64 struct rather than unsuffixed flock | ||
29 | + * pass the F_GETLK etc constants rather than the unsuffixed F_GETLK | ||
30 | + * use the flock struct rather than unsuffixed flock | ||
31 | * This will then work and use a 64-bit offset for both 32-bit and 64-bit hosts. | ||
32 | */ | ||
33 | #ifdef __NR_fcntl64 | ||
34 | @@ -6813,13 +6813,13 @@ static int target_to_host_fcntl_cmd(int | ||
35 | ret = cmd; | ||
36 | break; | ||
37 | case TARGET_F_GETLK: | ||
38 | - ret = F_GETLK64; | ||
39 | + ret = F_GETLK; | ||
40 | break; | ||
41 | case TARGET_F_SETLK: | ||
42 | - ret = F_SETLK64; | ||
43 | + ret = F_SETLK; | ||
44 | break; | ||
45 | case TARGET_F_SETLKW: | ||
46 | - ret = F_SETLKW64; | ||
47 | + ret = F_SETLKW; | ||
48 | break; | ||
49 | case TARGET_F_GETOWN: | ||
50 | ret = F_GETOWN; | ||
51 | @@ -6833,17 +6833,6 @@ static int target_to_host_fcntl_cmd(int | ||
52 | case TARGET_F_SETSIG: | ||
53 | ret = F_SETSIG; | ||
54 | break; | ||
55 | -#if TARGET_ABI_BITS == 32 | ||
56 | - case TARGET_F_GETLK64: | ||
57 | - ret = F_GETLK64; | ||
58 | - break; | ||
59 | - case TARGET_F_SETLK64: | ||
60 | - ret = F_SETLK64; | ||
61 | - break; | ||
62 | - case TARGET_F_SETLKW64: | ||
63 | - ret = F_SETLKW64; | ||
64 | - break; | ||
65 | -#endif | ||
66 | case TARGET_F_SETLEASE: | ||
67 | ret = F_SETLEASE; | ||
68 | break; | ||
69 | @@ -6895,8 +6884,8 @@ static int target_to_host_fcntl_cmd(int | ||
70 | * them to 5, 6 and 7 before making the syscall(). Since we make the | ||
71 | * syscall directly, adjust to what is supported by the kernel. | ||
72 | */ | ||
73 | - if (ret >= F_GETLK64 && ret <= F_SETLKW64) { | ||
74 | - ret -= F_GETLK64 - 5; | ||
75 | + if (ret >= F_GETLK && ret <= F_SETLKW) { | ||
76 | + ret -= F_GETLK - 5; | ||
77 | } | ||
78 | #endif | ||
79 | |||
80 | @@ -6929,55 +6918,11 @@ static int host_to_target_flock(int type | ||
81 | return type; | ||
82 | } | ||
83 | |||
84 | -static inline abi_long copy_from_user_flock(struct flock64 *fl, | ||
85 | - abi_ulong target_flock_addr) | ||
86 | -{ | ||
87 | - struct target_flock *target_fl; | ||
88 | - int l_type; | ||
89 | - | ||
90 | - if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
91 | - return -TARGET_EFAULT; | ||
92 | - } | ||
93 | - | ||
94 | - __get_user(l_type, &target_fl->l_type); | ||
95 | - l_type = target_to_host_flock(l_type); | ||
96 | - if (l_type < 0) { | ||
97 | - return l_type; | ||
98 | - } | ||
99 | - fl->l_type = l_type; | ||
100 | - __get_user(fl->l_whence, &target_fl->l_whence); | ||
101 | - __get_user(fl->l_start, &target_fl->l_start); | ||
102 | - __get_user(fl->l_len, &target_fl->l_len); | ||
103 | - __get_user(fl->l_pid, &target_fl->l_pid); | ||
104 | - unlock_user_struct(target_fl, target_flock_addr, 0); | ||
105 | - return 0; | ||
106 | -} | ||
107 | - | ||
108 | -static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr, | ||
109 | - const struct flock64 *fl) | ||
110 | -{ | ||
111 | - struct target_flock *target_fl; | ||
112 | - short l_type; | ||
113 | - | ||
114 | - if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
115 | - return -TARGET_EFAULT; | ||
116 | - } | ||
117 | - | ||
118 | - l_type = host_to_target_flock(fl->l_type); | ||
119 | - __put_user(l_type, &target_fl->l_type); | ||
120 | - __put_user(fl->l_whence, &target_fl->l_whence); | ||
121 | - __put_user(fl->l_start, &target_fl->l_start); | ||
122 | - __put_user(fl->l_len, &target_fl->l_len); | ||
123 | - __put_user(fl->l_pid, &target_fl->l_pid); | ||
124 | - unlock_user_struct(target_fl, target_flock_addr, 1); | ||
125 | - return 0; | ||
126 | -} | ||
127 | - | ||
128 | -typedef abi_long from_flock64_fn(struct flock64 *fl, abi_ulong target_addr); | ||
129 | -typedef abi_long to_flock64_fn(abi_ulong target_addr, const struct flock64 *fl); | ||
130 | +typedef abi_long from_flock_fn(struct flock *fl, abi_ulong target_addr); | ||
131 | +typedef abi_long to_flock_fn(abi_ulong target_addr, const struct flock *fl); | ||
132 | |||
133 | #if defined(TARGET_ARM) && TARGET_ABI_BITS == 32 | ||
134 | -struct target_oabi_flock64 { | ||
135 | +struct target_oabi_flock { | ||
136 | abi_short l_type; | ||
137 | abi_short l_whence; | ||
138 | abi_llong l_start; | ||
139 | @@ -6985,10 +6930,10 @@ struct target_oabi_flock64 { | ||
140 | abi_int l_pid; | ||
141 | } QEMU_PACKED; | ||
142 | |||
143 | -static inline abi_long copy_from_user_oabi_flock64(struct flock64 *fl, | ||
144 | +static inline abi_long copy_from_user_oabi_flock(struct flock *fl, | ||
145 | abi_ulong target_flock_addr) | ||
146 | { | ||
147 | - struct target_oabi_flock64 *target_fl; | ||
148 | + struct target_oabi_flock *target_fl; | ||
149 | int l_type; | ||
150 | |||
151 | if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
152 | @@ -7009,10 +6954,10 @@ static inline abi_long copy_from_user_oa | ||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | -static inline abi_long copy_to_user_oabi_flock64(abi_ulong target_flock_addr, | ||
157 | - const struct flock64 *fl) | ||
158 | +static inline abi_long copy_to_user_oabi_flock(abi_ulong target_flock_addr, | ||
159 | + const struct flock *fl) | ||
160 | { | ||
161 | - struct target_oabi_flock64 *target_fl; | ||
162 | + struct target_oabi_flock *target_fl; | ||
163 | short l_type; | ||
164 | |||
165 | if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
166 | @@ -7030,10 +6975,10 @@ static inline abi_long copy_to_user_oabi | ||
167 | } | ||
168 | #endif | ||
169 | |||
170 | -static inline abi_long copy_from_user_flock64(struct flock64 *fl, | ||
171 | +static inline abi_long copy_from_user_flock(struct flock *fl, | ||
172 | abi_ulong target_flock_addr) | ||
173 | { | ||
174 | - struct target_flock64 *target_fl; | ||
175 | + struct target_flock *target_fl; | ||
176 | int l_type; | ||
177 | |||
178 | if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
179 | @@ -7054,10 +6999,10 @@ static inline abi_long copy_from_user_fl | ||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | -static inline abi_long copy_to_user_flock64(abi_ulong target_flock_addr, | ||
184 | - const struct flock64 *fl) | ||
185 | +static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr, | ||
186 | + const struct flock *fl) | ||
187 | { | ||
188 | - struct target_flock64 *target_fl; | ||
189 | + struct target_flock *target_fl; | ||
190 | short l_type; | ||
191 | |||
192 | if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
193 | @@ -7076,7 +7021,7 @@ static inline abi_long copy_to_user_floc | ||
194 | |||
195 | static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) | ||
196 | { | ||
197 | - struct flock64 fl64; | ||
198 | + struct flock fl64; | ||
199 | #ifdef F_GETOWN_EX | ||
200 | struct f_owner_ex fox; | ||
201 | struct target_f_owner_ex *target_fox; | ||
202 | @@ -7089,6 +7034,7 @@ static abi_long do_fcntl(int fd, int cmd | ||
203 | |||
204 | switch(cmd) { | ||
205 | case TARGET_F_GETLK: | ||
206 | + case TARGET_F_OFD_GETLK: | ||
207 | ret = copy_from_user_flock(&fl64, arg); | ||
208 | if (ret) { | ||
209 | return ret; | ||
210 | @@ -7098,32 +7044,11 @@ static abi_long do_fcntl(int fd, int cmd | ||
211 | ret = copy_to_user_flock(arg, &fl64); | ||
212 | } | ||
213 | break; | ||
214 | - | ||
215 | case TARGET_F_SETLK: | ||
216 | case TARGET_F_SETLKW: | ||
217 | - ret = copy_from_user_flock(&fl64, arg); | ||
218 | - if (ret) { | ||
219 | - return ret; | ||
220 | - } | ||
221 | - ret = get_errno(safe_fcntl(fd, host_cmd, &fl64)); | ||
222 | - break; | ||
223 | - | ||
224 | - case TARGET_F_GETLK64: | ||
225 | - case TARGET_F_OFD_GETLK: | ||
226 | - ret = copy_from_user_flock64(&fl64, arg); | ||
227 | - if (ret) { | ||
228 | - return ret; | ||
229 | - } | ||
230 | - ret = get_errno(safe_fcntl(fd, host_cmd, &fl64)); | ||
231 | - if (ret == 0) { | ||
232 | - ret = copy_to_user_flock64(arg, &fl64); | ||
233 | - } | ||
234 | - break; | ||
235 | - case TARGET_F_SETLK64: | ||
236 | - case TARGET_F_SETLKW64: | ||
237 | case TARGET_F_OFD_SETLK: | ||
238 | case TARGET_F_OFD_SETLKW: | ||
239 | - ret = copy_from_user_flock64(&fl64, arg); | ||
240 | + ret = copy_from_user_flock(&fl64, arg); | ||
241 | if (ret) { | ||
242 | return ret; | ||
243 | } | ||
244 | @@ -7348,7 +7273,7 @@ static inline abi_long target_truncate64 | ||
245 | arg2 = arg3; | ||
246 | arg3 = arg4; | ||
247 | } | ||
248 | - return get_errno(truncate64(arg1, target_offset64(arg2, arg3))); | ||
249 | + return get_errno(truncate(arg1, target_offset64(arg2, arg3))); | ||
250 | } | ||
251 | #endif | ||
252 | |||
253 | @@ -7362,7 +7287,7 @@ static inline abi_long target_ftruncate6 | ||
254 | arg2 = arg3; | ||
255 | arg3 = arg4; | ||
256 | } | ||
257 | - return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3))); | ||
258 | + return get_errno(ftruncate(arg1, target_offset64(arg2, arg3))); | ||
259 | } | ||
260 | #endif | ||
261 | |||
262 | @@ -8598,7 +8523,7 @@ static int do_getdents(abi_long dirfd, a | ||
263 | void *tdirp; | ||
264 | int hlen, hoff, toff; | ||
265 | int hreclen, treclen; | ||
266 | - off64_t prev_diroff = 0; | ||
267 | + off_t prev_diroff = 0; | ||
268 | |||
269 | hdirp = g_try_malloc(count); | ||
270 | if (!hdirp) { | ||
271 | @@ -8651,7 +8576,7 @@ static int do_getdents(abi_long dirfd, a | ||
272 | * Return what we have, resetting the file pointer to the | ||
273 | * location of the first record not returned. | ||
274 | */ | ||
275 | - lseek64(dirfd, prev_diroff, SEEK_SET); | ||
276 | + lseek(dirfd, prev_diroff, SEEK_SET); | ||
277 | break; | ||
278 | } | ||
279 | |||
280 | @@ -8685,7 +8610,7 @@ static int do_getdents64(abi_long dirfd, | ||
281 | void *tdirp; | ||
282 | int hlen, hoff, toff; | ||
283 | int hreclen, treclen; | ||
284 | - off64_t prev_diroff = 0; | ||
285 | + off_t prev_diroff = 0; | ||
286 | |||
287 | hdirp = g_try_malloc(count); | ||
288 | if (!hdirp) { | ||
289 | @@ -8727,7 +8652,7 @@ static int do_getdents64(abi_long dirfd, | ||
290 | * Return what we have, resetting the file pointer to the | ||
291 | * location of the first record not returned. | ||
292 | */ | ||
293 | - lseek64(dirfd, prev_diroff, SEEK_SET); | ||
294 | + lseek(dirfd, prev_diroff, SEEK_SET); | ||
295 | break; | ||
296 | } | ||
297 | |||
298 | @@ -11158,7 +11083,7 @@ static abi_long do_syscall1(CPUArchState | ||
299 | return -TARGET_EFAULT; | ||
300 | } | ||
301 | } | ||
302 | - ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
303 | + ret = get_errno(pread(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
304 | unlock_user(p, arg2, ret); | ||
305 | return ret; | ||
306 | case TARGET_NR_pwrite64: | ||
307 | @@ -11175,7 +11100,7 @@ static abi_long do_syscall1(CPUArchState | ||
308 | return -TARGET_EFAULT; | ||
309 | } | ||
310 | } | ||
311 | - ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
312 | + ret = get_errno(pwrite(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
313 | unlock_user(p, arg2, 0); | ||
314 | return ret; | ||
315 | #endif | ||
316 | @@ -11998,14 +11923,14 @@ static abi_long do_syscall1(CPUArchState | ||
317 | case TARGET_NR_fcntl64: | ||
318 | { | ||
319 | int cmd; | ||
320 | - struct flock64 fl; | ||
321 | - from_flock64_fn *copyfrom = copy_from_user_flock64; | ||
322 | - to_flock64_fn *copyto = copy_to_user_flock64; | ||
323 | + struct flock fl; | ||
324 | + from_flock_fn *copyfrom = copy_from_user_flock; | ||
325 | + to_flock_fn *copyto = copy_to_user_flock; | ||
326 | |||
327 | #ifdef TARGET_ARM | ||
328 | if (!cpu_env->eabi) { | ||
329 | - copyfrom = copy_from_user_oabi_flock64; | ||
330 | - copyto = copy_to_user_oabi_flock64; | ||
331 | + copyfrom = copy_from_user_oabi_flock; | ||
332 | + copyto = copy_to_user_oabi_flock; | ||
333 | } | ||
334 | #endif | ||
335 | |||
336 | @@ -12015,7 +11940,7 @@ static abi_long do_syscall1(CPUArchState | ||
337 | } | ||
338 | |||
339 | switch(arg2) { | ||
340 | - case TARGET_F_GETLK64: | ||
341 | + case TARGET_F_GETLK: | ||
342 | ret = copyfrom(&fl, arg3); | ||
343 | if (ret) { | ||
344 | break; | ||
345 | @@ -12026,8 +11951,8 @@ static abi_long do_syscall1(CPUArchState | ||
346 | } | ||
347 | break; | ||
348 | |||
349 | - case TARGET_F_SETLK64: | ||
350 | - case TARGET_F_SETLKW64: | ||
351 | + case TARGET_F_SETLK: | ||
352 | + case TARGET_F_SETLKW: | ||
353 | ret = copyfrom(&fl, arg3); | ||
354 | if (ret) { | ||
355 | break; | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch new file mode 100644 index 00000000..7bd7ee5f --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch | |||
@@ -0,0 +1,1011 @@ | |||
1 | From a7037d9661d40351b15d8c8bf209b512a7b5047e Mon Sep 17 00:00:00 2001 | ||
2 | From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
3 | Date: Fri, 6 Oct 2023 18:41:15 +0300 | ||
4 | Subject: [PATCH 2/2] python/qemu: rename command() to cmd() | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Use a shorter name. We are going to move in iotests from qmp() to | ||
10 | command() where possible. But command() is longer than qmp() and don't | ||
11 | look better. Let's rename. | ||
12 | |||
13 | You can simply grep for '\.command(' and for 'def command(' to check | ||
14 | that everything is updated (command() in tests/docker/docker.py is | ||
15 | unrelated). | ||
16 | |||
17 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
18 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
19 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
20 | Reviewed-by: Cédric Le Goater <clg@kaod.org> | ||
21 | Reviewed-by: Juan Quintela <quintela@redhat.com> | ||
22 | Message-id: 20231006154125.1068348-6-vsementsov@yandex-team.ru | ||
23 | [vsementsov: also update three occurrences in | ||
24 | tests/avocado/machine_aspeed.py and keep r-b] | ||
25 | Signed-off-by: John Snow <jsnow@redhat.com> | ||
26 | |||
27 | Upstream-Status: Backport (684750ab4f8a3ad69512b71532408be3ac2547d4) | ||
28 | |||
29 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
30 | --- | ||
31 | docs/devel/testing.rst | 10 +- | ||
32 | python/qemu/machine/machine.py | 8 +- | ||
33 | python/qemu/qmp/legacy.py | 2 +- | ||
34 | python/qemu/qmp/qmp_shell.py | 11 +- | ||
35 | python/qemu/utils/qemu_ga_client.py | 2 +- | ||
36 | python/qemu/utils/qom.py | 8 +- | ||
37 | python/qemu/utils/qom_common.py | 2 +- | ||
38 | python/qemu/utils/qom_fuse.py | 6 +- | ||
39 | scripts/cpu-x86-uarch-abi.py | 4 +- | ||
40 | scripts/device-crash-test | 8 +- | ||
41 | scripts/render_block_graph.py | 8 +- | ||
42 | tests/avocado/avocado_qemu/__init__.py | 4 +- | ||
43 | tests/avocado/cpu_queries.py | 5 +- | ||
44 | tests/avocado/hotplug_cpu.py | 10 +- | ||
45 | tests/avocado/info_usernet.py | 4 +- | ||
46 | tests/avocado/machine_arm_integratorcp.py | 6 +- | ||
47 | tests/avocado/machine_aspeed.py | 12 +- | ||
48 | tests/avocado/machine_m68k_nextcube.py | 4 +- | ||
49 | tests/avocado/machine_mips_malta.py | 6 +- | ||
50 | tests/avocado/machine_s390_ccw_virtio.py | 28 ++-- | ||
51 | tests/avocado/migration.py | 10 +- | ||
52 | tests/avocado/pc_cpu_hotplug_props.py | 2 +- | ||
53 | tests/avocado/version.py | 4 +- | ||
54 | tests/avocado/virtio_check_params.py | 6 +- | ||
55 | tests/avocado/virtio_version.py | 5 +- | ||
56 | tests/avocado/x86_cpu_model_versions.py | 13 +- | ||
57 | tests/migration/guestperf/engine.py | 150 +++++++++++----------- | ||
58 | tests/qemu-iotests/256 | 34 ++--- | ||
59 | tests/qemu-iotests/257 | 36 +++--- | ||
60 | 29 files changed, 207 insertions(+), 201 deletions(-) | ||
61 | |||
62 | diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst | ||
63 | index b6ad21bed1..dddf1d6140 100644 | ||
64 | --- a/docs/devel/testing.rst | ||
65 | +++ b/docs/devel/testing.rst | ||
66 | @@ -1014,8 +1014,8 @@ class. Here's a simple usage example: | ||
67 | """ | ||
68 | def test_qmp_human_info_version(self): | ||
69 | self.vm.launch() | ||
70 | - res = self.vm.command('human-monitor-command', | ||
71 | - command_line='info version') | ||
72 | + res = self.vm.cmd('human-monitor-command', | ||
73 | + command_line='info version') | ||
74 | self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)') | ||
75 | |||
76 | To execute your test, run: | ||
77 | @@ -1065,15 +1065,15 @@ and hypothetical example follows: | ||
78 | first_machine.launch() | ||
79 | second_machine.launch() | ||
80 | |||
81 | - first_res = first_machine.command( | ||
82 | + first_res = first_machine.cmd( | ||
83 | 'human-monitor-command', | ||
84 | command_line='info version') | ||
85 | |||
86 | - second_res = second_machine.command( | ||
87 | + second_res = second_machine.cmd( | ||
88 | 'human-monitor-command', | ||
89 | command_line='info version') | ||
90 | |||
91 | - third_res = self.get_vm(name='third_machine').command( | ||
92 | + third_res = self.get_vm(name='third_machine').cmd( | ||
93 | 'human-monitor-command', | ||
94 | command_line='info version') | ||
95 | |||
96 | diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py | ||
97 | index 82fa8cdddf..0c48b76731 100644 | ||
98 | --- a/python/qemu/machine/machine.py | ||
99 | +++ b/python/qemu/machine/machine.py | ||
100 | @@ -691,16 +691,16 @@ def qmp(self, cmd: str, | ||
101 | self._quit_issued = True | ||
102 | return ret | ||
103 | |||
104 | - def command(self, cmd: str, | ||
105 | - conv_keys: bool = True, | ||
106 | - **args: Any) -> QMPReturnValue: | ||
107 | + def cmd(self, cmd: str, | ||
108 | + conv_keys: bool = True, | ||
109 | + **args: Any) -> QMPReturnValue: | ||
110 | """ | ||
111 | Invoke a QMP command. | ||
112 | On success return the response dict. | ||
113 | On failure raise an exception. | ||
114 | """ | ||
115 | qmp_args = self._qmp_args(conv_keys, args) | ||
116 | - ret = self._qmp.command(cmd, **qmp_args) | ||
117 | + ret = self._qmp.cmd(cmd, **qmp_args) | ||
118 | if cmd == 'quit': | ||
119 | self._quit_issued = True | ||
120 | return ret | ||
121 | diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py | ||
122 | index e5fa1ce9c4..22a2b5616e 100644 | ||
123 | --- a/python/qemu/qmp/legacy.py | ||
124 | +++ b/python/qemu/qmp/legacy.py | ||
125 | @@ -207,7 +207,7 @@ def cmd_raw(self, name: str, | ||
126 | qmp_cmd['arguments'] = args | ||
127 | return self.cmd_obj(qmp_cmd) | ||
128 | |||
129 | - def command(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
130 | + def cmd(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
131 | """ | ||
132 | Build and send a QMP command to the monitor, report errors if any | ||
133 | """ | ||
134 | diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py | ||
135 | index 619ab42ced..08240c16f8 100644 | ||
136 | --- a/python/qemu/qmp/qmp_shell.py | ||
137 | +++ b/python/qemu/qmp/qmp_shell.py | ||
138 | @@ -194,11 +194,12 @@ def close(self) -> None: | ||
139 | super().close() | ||
140 | |||
141 | def _fill_completion(self) -> None: | ||
142 | - cmds = self.cmd('query-commands') | ||
143 | - if 'error' in cmds: | ||
144 | - return | ||
145 | - for cmd in cmds['return']: | ||
146 | - self._completer.append(cmd['name']) | ||
147 | + try: | ||
148 | + cmds = cast(List[Dict[str, str]], self.cmd('query-commands')) | ||
149 | + for cmd in cmds: | ||
150 | + self._completer.append(cmd['name']) | ||
151 | + except ExecuteError: | ||
152 | + pass | ||
153 | |||
154 | def _completer_setup(self) -> None: | ||
155 | self._completer = QMPCompleter() | ||
156 | diff --git a/python/qemu/utils/qemu_ga_client.py b/python/qemu/utils/qemu_ga_client.py | ||
157 | index d8411bb2d0..9a665e6e99 100644 | ||
158 | --- a/python/qemu/utils/qemu_ga_client.py | ||
159 | +++ b/python/qemu/utils/qemu_ga_client.py | ||
160 | @@ -64,7 +64,7 @@ | ||
161 | class QemuGuestAgent(QEMUMonitorProtocol): | ||
162 | def __getattr__(self, name: str) -> Callable[..., Any]: | ||
163 | def wrapper(**kwds: object) -> object: | ||
164 | - return self.command('guest-' + name.replace('_', '-'), **kwds) | ||
165 | + return self.cmd('guest-' + name.replace('_', '-'), **kwds) | ||
166 | return wrapper | ||
167 | |||
168 | |||
169 | diff --git a/python/qemu/utils/qom.py b/python/qemu/utils/qom.py | ||
170 | index bcf192f477..426a0f245f 100644 | ||
171 | --- a/python/qemu/utils/qom.py | ||
172 | +++ b/python/qemu/utils/qom.py | ||
173 | @@ -84,7 +84,7 @@ def __init__(self, args: argparse.Namespace): | ||
174 | self.value = args.value | ||
175 | |||
176 | def run(self) -> int: | ||
177 | - rsp = self.qmp.command( | ||
178 | + rsp = self.qmp.cmd( | ||
179 | 'qom-set', | ||
180 | path=self.path, | ||
181 | property=self.prop, | ||
182 | @@ -129,7 +129,7 @@ def __init__(self, args: argparse.Namespace): | ||
183 | self.prop = tmp[1] | ||
184 | |||
185 | def run(self) -> int: | ||
186 | - rsp = self.qmp.command( | ||
187 | + rsp = self.qmp.cmd( | ||
188 | 'qom-get', | ||
189 | path=self.path, | ||
190 | property=self.prop | ||
191 | @@ -231,8 +231,8 @@ def _list_node(self, path: str) -> None: | ||
192 | if item.child: | ||
193 | continue | ||
194 | try: | ||
195 | - rsp = self.qmp.command('qom-get', path=path, | ||
196 | - property=item.name) | ||
197 | + rsp = self.qmp.cmd('qom-get', path=path, | ||
198 | + property=item.name) | ||
199 | print(f" {item.name}: {rsp} ({item.type})") | ||
200 | except ExecuteError as err: | ||
201 | print(f" {item.name}: <EXCEPTION: {err!s}> ({item.type})") | ||
202 | diff --git a/python/qemu/utils/qom_common.py b/python/qemu/utils/qom_common.py | ||
203 | index 80da1b2304..dd2c8b1908 100644 | ||
204 | --- a/python/qemu/utils/qom_common.py | ||
205 | +++ b/python/qemu/utils/qom_common.py | ||
206 | @@ -140,7 +140,7 @@ def qom_list(self, path: str) -> List[ObjectPropertyInfo]: | ||
207 | """ | ||
208 | :return: a strongly typed list from the 'qom-list' command. | ||
209 | """ | ||
210 | - rsp = self.qmp.command('qom-list', path=path) | ||
211 | + rsp = self.qmp.cmd('qom-list', path=path) | ||
212 | # qom-list returns List[ObjectPropertyInfo] | ||
213 | assert isinstance(rsp, list) | ||
214 | return [ObjectPropertyInfo.make(x) for x in rsp] | ||
215 | diff --git a/python/qemu/utils/qom_fuse.py b/python/qemu/utils/qom_fuse.py | ||
216 | index 8dcd59fcde..cf7e344bd5 100644 | ||
217 | --- a/python/qemu/utils/qom_fuse.py | ||
218 | +++ b/python/qemu/utils/qom_fuse.py | ||
219 | @@ -137,7 +137,7 @@ def read(self, path: str, size: int, offset: int, fh: IO[bytes]) -> bytes: | ||
220 | if path == '': | ||
221 | path = '/' | ||
222 | try: | ||
223 | - data = str(self.qmp.command('qom-get', path=path, property=prop)) | ||
224 | + data = str(self.qmp.cmd('qom-get', path=path, property=prop)) | ||
225 | data += '\n' # make values shell friendly | ||
226 | except ExecuteError as err: | ||
227 | raise FuseOSError(EPERM) from err | ||
228 | @@ -152,8 +152,8 @@ def readlink(self, path: str) -> Union[bool, str]: | ||
229 | return False | ||
230 | path, prop = path.rsplit('/', 1) | ||
231 | prefix = '/'.join(['..'] * (len(path.split('/')) - 1)) | ||
232 | - return prefix + str(self.qmp.command('qom-get', path=path, | ||
233 | - property=prop)) | ||
234 | + return prefix + str(self.qmp.cmd('qom-get', path=path, | ||
235 | + property=prop)) | ||
236 | |||
237 | def getattr(self, path: str, | ||
238 | fh: Optional[IO[bytes]] = None) -> Mapping[str, object]: | ||
239 | diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py | ||
240 | index 82ff07582f..379a3c64bd 100644 | ||
241 | --- a/scripts/cpu-x86-uarch-abi.py | ||
242 | +++ b/scripts/cpu-x86-uarch-abi.py | ||
243 | @@ -94,8 +94,8 @@ | ||
244 | |||
245 | for name in sorted(names): | ||
246 | cpu = shell.cmd("query-cpu-model-expansion", | ||
247 | - { "type": "static", | ||
248 | - "model": { "name": name }}) | ||
249 | + { "type": "static", | ||
250 | + "model": { "name": name }}) | ||
251 | |||
252 | got = {} | ||
253 | for (feature, present) in cpu["return"]["model"]["props"].items(): | ||
254 | diff --git a/scripts/device-crash-test b/scripts/device-crash-test | ||
255 | index b74d887331..9bf9d0d6e6 100755 | ||
256 | --- a/scripts/device-crash-test | ||
257 | +++ b/scripts/device-crash-test | ||
258 | @@ -269,14 +269,14 @@ def formatTestCase(t): | ||
259 | |||
260 | def qomListTypeNames(vm, **kwargs): | ||
261 | """Run qom-list-types QMP command, return type names""" | ||
262 | - types = vm.command('qom-list-types', **kwargs) | ||
263 | + types = vm.cmd('qom-list-types', **kwargs) | ||
264 | return [t['name'] for t in types] | ||
265 | |||
266 | |||
267 | def infoQDM(vm): | ||
268 | """Parse 'info qdm' output""" | ||
269 | args = {'command-line': 'info qdm'} | ||
270 | - devhelp = vm.command('human-monitor-command', **args) | ||
271 | + devhelp = vm.cmd('human-monitor-command', **args) | ||
272 | for l in devhelp.split('\n'): | ||
273 | l = l.strip() | ||
274 | if l == '' or l.endswith(':'): | ||
275 | @@ -304,9 +304,9 @@ class QemuBinaryInfo(object): | ||
276 | # there's no way to query DeviceClass::user_creatable using QMP, | ||
277 | # so use 'info qdm': | ||
278 | self.no_user_devs = set([d['name'] for d in infoQDM(vm, ) if d['no-user']]) | ||
279 | - self.machines = list(m['name'] for m in vm.command('query-machines')) | ||
280 | + self.machines = list(m['name'] for m in vm.cmd('query-machines')) | ||
281 | self.user_devs = self.alldevs.difference(self.no_user_devs) | ||
282 | - self.kvm_available = vm.command('query-kvm')['enabled'] | ||
283 | + self.kvm_available = vm.cmd('query-kvm')['enabled'] | ||
284 | finally: | ||
285 | vm.shutdown() | ||
286 | |||
287 | diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py | ||
288 | index 8f731a5cfe..3e1a2e3fa7 100755 | ||
289 | --- a/scripts/render_block_graph.py | ||
290 | +++ b/scripts/render_block_graph.py | ||
291 | @@ -43,13 +43,13 @@ def render_block_graph(qmp, filename, format='png'): | ||
292 | representation in @format into "@filename.@format" | ||
293 | ''' | ||
294 | |||
295 | - bds_nodes = qmp.command('query-named-block-nodes') | ||
296 | + bds_nodes = qmp.cmd('query-named-block-nodes') | ||
297 | bds_nodes = {n['node-name']: n for n in bds_nodes} | ||
298 | |||
299 | - job_nodes = qmp.command('query-block-jobs') | ||
300 | + job_nodes = qmp.cmd('query-block-jobs') | ||
301 | job_nodes = {n['device']: n for n in job_nodes} | ||
302 | |||
303 | - block_graph = qmp.command('x-debug-query-block-graph') | ||
304 | + block_graph = qmp.cmd('x-debug-query-block-graph') | ||
305 | |||
306 | graph = Digraph(comment='Block Nodes Graph') | ||
307 | graph.format = format | ||
308 | @@ -94,7 +94,7 @@ class LibvirtGuest(): | ||
309 | def __init__(self, name): | ||
310 | self.name = name | ||
311 | |||
312 | - def command(self, cmd): | ||
313 | + def cmd(self, cmd): | ||
314 | # only supports qmp commands without parameters | ||
315 | m = {'execute': cmd} | ||
316 | ar = ['virsh', 'qemu-monitor-command', self.name, json.dumps(m)] | ||
317 | diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py | ||
318 | index 33090903f1..1a4d40a46f 100644 | ||
319 | --- a/tests/avocado/avocado_qemu/__init__.py | ||
320 | +++ b/tests/avocado/avocado_qemu/__init__.py | ||
321 | @@ -408,8 +408,8 @@ class LinuxSSHMixIn: | ||
322 | |||
323 | def ssh_connect(self, username, credential, credential_is_key=True): | ||
324 | self.ssh_logger = logging.getLogger('ssh') | ||
325 | - res = self.vm.command('human-monitor-command', | ||
326 | - command_line='info usernet') | ||
327 | + res = self.vm.cmd('human-monitor-command', | ||
328 | + command_line='info usernet') | ||
329 | port = get_info_usernet_hostfwd_port(res) | ||
330 | self.assertIsNotNone(port) | ||
331 | self.assertGreater(port, 0) | ||
332 | diff --git a/tests/avocado/cpu_queries.py b/tests/avocado/cpu_queries.py | ||
333 | index cf69f69b11..86c2d5c92d 100644 | ||
334 | --- a/tests/avocado/cpu_queries.py | ||
335 | +++ b/tests/avocado/cpu_queries.py | ||
336 | @@ -23,12 +23,13 @@ def test(self): | ||
337 | self.vm.add_args('-S') | ||
338 | self.vm.launch() | ||
339 | |||
340 | - cpus = self.vm.command('query-cpu-definitions') | ||
341 | + cpus = self.vm.cmd('query-cpu-definitions') | ||
342 | for c in cpus: | ||
343 | self.log.info("Checking CPU: %s", c) | ||
344 | self.assertNotIn('', c['unavailable-features'], c['name']) | ||
345 | |||
346 | for c in cpus: | ||
347 | model = {'name': c['name']} | ||
348 | - e = self.vm.command('query-cpu-model-expansion', model=model, type='full') | ||
349 | + e = self.vm.cmd('query-cpu-model-expansion', model=model, | ||
350 | + type='full') | ||
351 | self.assertEquals(e['model']['name'], c['name']) | ||
352 | diff --git a/tests/avocado/hotplug_cpu.py b/tests/avocado/hotplug_cpu.py | ||
353 | index 6374bf1b54..292bb43e4d 100644 | ||
354 | --- a/tests/avocado/hotplug_cpu.py | ||
355 | +++ b/tests/avocado/hotplug_cpu.py | ||
356 | @@ -29,9 +29,9 @@ def test(self): | ||
357 | with self.assertRaises(AssertionError): | ||
358 | self.ssh_command('test -e /sys/devices/system/cpu/cpu1') | ||
359 | |||
360 | - self.vm.command('device_add', | ||
361 | - driver='Haswell-x86_64-cpu', | ||
362 | - socket_id=0, | ||
363 | - core_id=1, | ||
364 | - thread_id=0) | ||
365 | + self.vm.cmd('device_add', | ||
366 | + driver='Haswell-x86_64-cpu', | ||
367 | + socket_id=0, | ||
368 | + core_id=1, | ||
369 | + thread_id=0) | ||
370 | self.ssh_command('test -e /sys/devices/system/cpu/cpu1') | ||
371 | diff --git a/tests/avocado/info_usernet.py b/tests/avocado/info_usernet.py | ||
372 | index fdc4d90c42..e1aa7a6e0a 100644 | ||
373 | --- a/tests/avocado/info_usernet.py | ||
374 | +++ b/tests/avocado/info_usernet.py | ||
375 | @@ -22,8 +22,8 @@ def test_hostfwd(self): | ||
376 | self.require_netdev('user') | ||
377 | self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22') | ||
378 | self.vm.launch() | ||
379 | - res = self.vm.command('human-monitor-command', | ||
380 | - command_line='info usernet') | ||
381 | + res = self.vm.cmd('human-monitor-command', | ||
382 | + command_line='info usernet') | ||
383 | port = get_info_usernet_hostfwd_port(res) | ||
384 | self.assertIsNotNone(port, | ||
385 | ('"info usernet" output content does not seem to ' | ||
386 | diff --git a/tests/avocado/machine_arm_integratorcp.py b/tests/avocado/machine_arm_integratorcp.py | ||
387 | index 1ffe1073ef..87f5cf3953 100644 | ||
388 | --- a/tests/avocado/machine_arm_integratorcp.py | ||
389 | +++ b/tests/avocado/machine_arm_integratorcp.py | ||
390 | @@ -81,9 +81,9 @@ def test_framebuffer_tux_logo(self): | ||
391 | self.boot_integratorcp() | ||
392 | framebuffer_ready = 'Console: switching to colour frame buffer device' | ||
393 | wait_for_console_pattern(self, framebuffer_ready) | ||
394 | - self.vm.command('human-monitor-command', command_line='stop') | ||
395 | - self.vm.command('human-monitor-command', | ||
396 | - command_line='screendump %s' % screendump_path) | ||
397 | + self.vm.cmd('human-monitor-command', command_line='stop') | ||
398 | + self.vm.cmd('human-monitor-command', | ||
399 | + command_line='screendump %s' % screendump_path) | ||
400 | logger = logging.getLogger('framebuffer') | ||
401 | |||
402 | cpu_count = 1 | ||
403 | diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py | ||
404 | index 724ee72c02..68619bbbdc 100644 | ||
405 | --- a/tests/avocado/machine_aspeed.py | ||
406 | +++ b/tests/avocado/machine_aspeed.py | ||
407 | @@ -181,8 +181,8 @@ def test_arm_ast2500_evb_buildroot(self): | ||
408 | 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); | ||
409 | exec_command_and_wait_for_pattern(self, | ||
410 | 'cat /sys/class/hwmon/hwmon1/temp1_input', '0') | ||
411 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
412 | - property='temperature', value=18000); | ||
413 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
414 | + property='temperature', value=18000); | ||
415 | exec_command_and_wait_for_pattern(self, | ||
416 | 'cat /sys/class/hwmon/hwmon1/temp1_input', '18000') | ||
417 | |||
418 | @@ -213,8 +213,8 @@ def test_arm_ast2600_evb_buildroot(self): | ||
419 | 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); | ||
420 | exec_command_and_wait_for_pattern(self, | ||
421 | 'cat /sys/class/hwmon/hwmon0/temp1_input', '0') | ||
422 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
423 | - property='temperature', value=18000); | ||
424 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
425 | + property='temperature', value=18000); | ||
426 | exec_command_and_wait_for_pattern(self, | ||
427 | 'cat /sys/class/hwmon/hwmon0/temp1_input', '18000') | ||
428 | |||
429 | @@ -357,8 +357,8 @@ def test_arm_ast2600_evb_sdk(self): | ||
430 | 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); | ||
431 | self.ssh_command_output_contains( | ||
432 | 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') | ||
433 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
434 | - property='temperature', value=18000); | ||
435 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
436 | + property='temperature', value=18000); | ||
437 | self.ssh_command_output_contains( | ||
438 | 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') | ||
439 | |||
440 | diff --git a/tests/avocado/machine_m68k_nextcube.py b/tests/avocado/machine_m68k_nextcube.py | ||
441 | index 6790e7d9cd..d6da2fbb01 100644 | ||
442 | --- a/tests/avocado/machine_m68k_nextcube.py | ||
443 | +++ b/tests/avocado/machine_m68k_nextcube.py | ||
444 | @@ -43,8 +43,8 @@ def check_bootrom_framebuffer(self, screenshot_path): | ||
445 | # 'displaysurface_create 1120x832' trace-event. | ||
446 | time.sleep(2) | ||
447 | |||
448 | - self.vm.command('human-monitor-command', | ||
449 | - command_line='screendump %s' % screenshot_path) | ||
450 | + self.vm.cmd('human-monitor-command', | ||
451 | + command_line='screendump %s' % screenshot_path) | ||
452 | |||
453 | @skipUnless(PIL_AVAILABLE, 'Python PIL not installed') | ||
454 | def test_bootrom_framebuffer_size(self): | ||
455 | diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py | ||
456 | index 92233451c5..9bd54518bf 100644 | ||
457 | --- a/tests/avocado/machine_mips_malta.py | ||
458 | +++ b/tests/avocado/machine_mips_malta.py | ||
459 | @@ -71,9 +71,9 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): | ||
460 | framebuffer_ready = 'Console: switching to colour frame buffer device' | ||
461 | wait_for_console_pattern(self, framebuffer_ready, | ||
462 | failure_message='Kernel panic - not syncing') | ||
463 | - self.vm.command('human-monitor-command', command_line='stop') | ||
464 | - self.vm.command('human-monitor-command', | ||
465 | - command_line='screendump %s' % screendump_path) | ||
466 | + self.vm.cmd('human-monitor-command', command_line='stop') | ||
467 | + self.vm.cmd('human-monitor-command', | ||
468 | + command_line='screendump %s' % screendump_path) | ||
469 | logger = logging.getLogger('framebuffer') | ||
470 | |||
471 | match_threshold = 0.95 | ||
472 | diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py | ||
473 | index e7a2a20ba6..e1f493bc44 100644 | ||
474 | --- a/tests/avocado/machine_s390_ccw_virtio.py | ||
475 | +++ b/tests/avocado/machine_s390_ccw_virtio.py | ||
476 | @@ -107,10 +107,10 @@ def test_s390x_devices(self): | ||
477 | 'dd if=/dev/hwrng of=/dev/null bs=1k count=10', | ||
478 | '10+0 records out') | ||
479 | self.clear_guest_dmesg() | ||
480 | - self.vm.command('device_del', id='rn1') | ||
481 | + self.vm.cmd('device_del', id='rn1') | ||
482 | self.wait_for_crw_reports() | ||
483 | self.clear_guest_dmesg() | ||
484 | - self.vm.command('device_del', id='rn2') | ||
485 | + self.vm.cmd('device_del', id='rn2') | ||
486 | self.wait_for_crw_reports() | ||
487 | exec_command_and_wait_for_pattern(self, | ||
488 | 'dd if=/dev/hwrng of=/dev/null bs=1k count=10', | ||
489 | @@ -132,8 +132,8 @@ def test_s390x_devices(self): | ||
490 | '0x0000000c') | ||
491 | # add another device | ||
492 | self.clear_guest_dmesg() | ||
493 | - self.vm.command('device_add', driver='virtio-net-ccw', | ||
494 | - devno='fe.0.4711', id='net_4711') | ||
495 | + self.vm.cmd('device_add', driver='virtio-net-ccw', | ||
496 | + devno='fe.0.4711', id='net_4711') | ||
497 | self.wait_for_crw_reports() | ||
498 | exec_command_and_wait_for_pattern(self, 'for i in 1 2 3 4 5 6 7 ; do ' | ||
499 | 'if [ -e /sys/bus/ccw/devices/*4711 ]; then break; fi ;' | ||
500 | @@ -141,7 +141,7 @@ def test_s390x_devices(self): | ||
501 | '0.0.4711') | ||
502 | # and detach it again | ||
503 | self.clear_guest_dmesg() | ||
504 | - self.vm.command('device_del', id='net_4711') | ||
505 | + self.vm.cmd('device_del', id='net_4711') | ||
506 | self.vm.event_wait(name='DEVICE_DELETED', | ||
507 | match={'data': {'device': 'net_4711'}}) | ||
508 | self.wait_for_crw_reports() | ||
509 | @@ -151,10 +151,10 @@ def test_s390x_devices(self): | ||
510 | # test the virtio-balloon device | ||
511 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
512 | 'MemTotal: 115640 kB') | ||
513 | - self.vm.command('human-monitor-command', command_line='balloon 96') | ||
514 | + self.vm.cmd('human-monitor-command', command_line='balloon 96') | ||
515 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
516 | 'MemTotal: 82872 kB') | ||
517 | - self.vm.command('human-monitor-command', command_line='balloon 128') | ||
518 | + self.vm.cmd('human-monitor-command', command_line='balloon 128') | ||
519 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
520 | 'MemTotal: 115640 kB') | ||
521 | |||
522 | @@ -245,7 +245,7 @@ def test_s390x_fedora(self): | ||
523 | '12+0 records out') | ||
524 | with tempfile.NamedTemporaryFile(suffix='.ppm', | ||
525 | prefix='qemu-scrdump-') as ppmfile: | ||
526 | - self.vm.command('screendump', filename=ppmfile.name) | ||
527 | + self.vm.cmd('screendump', filename=ppmfile.name) | ||
528 | ppmfile.seek(0) | ||
529 | line = ppmfile.readline() | ||
530 | self.assertEqual(line, b"P6\n") | ||
531 | @@ -261,16 +261,16 @@ def test_s390x_fedora(self): | ||
532 | # Hot-plug a virtio-crypto device and see whether it gets accepted | ||
533 | self.log.info("Test hot-plug virtio-crypto device") | ||
534 | self.clear_guest_dmesg() | ||
535 | - self.vm.command('object-add', qom_type='cryptodev-backend-builtin', | ||
536 | - id='cbe0') | ||
537 | - self.vm.command('device_add', driver='virtio-crypto-ccw', id='crypdev0', | ||
538 | - cryptodev='cbe0', devno='fe.0.2342') | ||
539 | + self.vm.cmd('object-add', qom_type='cryptodev-backend-builtin', | ||
540 | + id='cbe0') | ||
541 | + self.vm.cmd('device_add', driver='virtio-crypto-ccw', id='crypdev0', | ||
542 | + cryptodev='cbe0', devno='fe.0.2342') | ||
543 | exec_command_and_wait_for_pattern(self, | ||
544 | 'while ! (dmesg -c | grep Accelerator.device) ; do' | ||
545 | ' sleep 1 ; done', 'Accelerator device is ready') | ||
546 | exec_command_and_wait_for_pattern(self, 'lscss', '0.0.2342') | ||
547 | - self.vm.command('device_del', id='crypdev0') | ||
548 | - self.vm.command('object-del', id='cbe0') | ||
549 | + self.vm.cmd('device_del', id='crypdev0') | ||
550 | + self.vm.cmd('object-del', id='cbe0') | ||
551 | exec_command_and_wait_for_pattern(self, | ||
552 | 'while ! (dmesg -c | grep Start.virtcrypto_remove) ; do' | ||
553 | ' sleep 1 ; done', 'Start virtcrypto_remove.') | ||
554 | diff --git a/tests/avocado/migration.py b/tests/avocado/migration.py | ||
555 | index fdc1d234fb..09b62f813e 100644 | ||
556 | --- a/tests/avocado/migration.py | ||
557 | +++ b/tests/avocado/migration.py | ||
558 | @@ -30,7 +30,7 @@ class MigrationTest(QemuSystemTest): | ||
559 | |||
560 | @staticmethod | ||
561 | def migration_finished(vm): | ||
562 | - return vm.command('query-migrate')['status'] in ('completed', 'failed') | ||
563 | + return vm.cmd('query-migrate')['status'] in ('completed', 'failed') | ||
564 | |||
565 | def assert_migration(self, src_vm, dst_vm): | ||
566 | wait.wait_for(self.migration_finished, | ||
567 | @@ -41,10 +41,10 @@ def assert_migration(self, src_vm, dst_vm): | ||
568 | timeout=self.timeout, | ||
569 | step=0.1, | ||
570 | args=(dst_vm,)) | ||
571 | - self.assertEqual(src_vm.command('query-migrate')['status'], 'completed') | ||
572 | - self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed') | ||
573 | - self.assertEqual(dst_vm.command('query-status')['status'], 'running') | ||
574 | - self.assertEqual(src_vm.command('query-status')['status'],'postmigrate') | ||
575 | + self.assertEqual(src_vm.cmd('query-migrate')['status'], 'completed') | ||
576 | + self.assertEqual(dst_vm.cmd('query-migrate')['status'], 'completed') | ||
577 | + self.assertEqual(dst_vm.cmd('query-status')['status'], 'running') | ||
578 | + self.assertEqual(src_vm.cmd('query-status')['status'],'postmigrate') | ||
579 | |||
580 | def do_migrate(self, dest_uri, src_uri=None): | ||
581 | dest_vm = self.get_vm('-incoming', dest_uri) | ||
582 | diff --git a/tests/avocado/pc_cpu_hotplug_props.py b/tests/avocado/pc_cpu_hotplug_props.py | ||
583 | index 52b878188e..b56f51d02a 100644 | ||
584 | --- a/tests/avocado/pc_cpu_hotplug_props.py | ||
585 | +++ b/tests/avocado/pc_cpu_hotplug_props.py | ||
586 | @@ -32,4 +32,4 @@ def test_no_die_id(self): | ||
587 | self.vm.add_args('-smp', '1,sockets=2,cores=2,threads=2,maxcpus=8') | ||
588 | self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0') | ||
589 | self.vm.launch() | ||
590 | - self.assertEquals(len(self.vm.command('query-cpus-fast')), 2) | ||
591 | + self.assertEquals(len(self.vm.cmd('query-cpus-fast')), 2) | ||
592 | diff --git a/tests/avocado/version.py b/tests/avocado/version.py | ||
593 | index dd775955eb..93ffdf3d97 100644 | ||
594 | --- a/tests/avocado/version.py | ||
595 | +++ b/tests/avocado/version.py | ||
596 | @@ -20,6 +20,6 @@ class Version(QemuSystemTest): | ||
597 | def test_qmp_human_info_version(self): | ||
598 | self.vm.add_args('-nodefaults') | ||
599 | self.vm.launch() | ||
600 | - res = self.vm.command('human-monitor-command', | ||
601 | - command_line='info version') | ||
602 | + res = self.vm.cmd('human-monitor-command', | ||
603 | + command_line='info version') | ||
604 | self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)') | ||
605 | diff --git a/tests/avocado/virtio_check_params.py b/tests/avocado/virtio_check_params.py | ||
606 | index 4093da8a67..f4314ef824 100644 | ||
607 | --- a/tests/avocado/virtio_check_params.py | ||
608 | +++ b/tests/avocado/virtio_check_params.py | ||
609 | @@ -51,8 +51,8 @@ def query_virtqueue(self, vm, dev_type_name): | ||
610 | error = None | ||
611 | props = None | ||
612 | |||
613 | - output = vm.command('human-monitor-command', | ||
614 | - command_line = 'info qtree') | ||
615 | + output = vm.cmd('human-monitor-command', | ||
616 | + command_line = 'info qtree') | ||
617 | props_list = DEV_TYPES[dev_type_name].values(); | ||
618 | pattern = self.make_pattern(props_list) | ||
619 | res = re.findall(pattern, output) | ||
620 | @@ -121,7 +121,7 @@ def test_machine_types(self): | ||
621 | # collect all machine types except 'none', 'isapc', 'microvm' | ||
622 | with QEMUMachine(self.qemu_bin) as vm: | ||
623 | vm.launch() | ||
624 | - machines = [m['name'] for m in vm.command('query-machines')] | ||
625 | + machines = [m['name'] for m in vm.cmd('query-machines')] | ||
626 | vm.shutdown() | ||
627 | machines.remove('none') | ||
628 | machines.remove('isapc') | ||
629 | diff --git a/tests/avocado/virtio_version.py b/tests/avocado/virtio_version.py | ||
630 | index c84e48813a..afe5e828b5 100644 | ||
631 | --- a/tests/avocado/virtio_version.py | ||
632 | +++ b/tests/avocado/virtio_version.py | ||
633 | @@ -48,7 +48,8 @@ def pci_modern_device_id(virtio_devid): | ||
634 | return virtio_devid + 0x1040 | ||
635 | |||
636 | def devtype_implements(vm, devtype, implements): | ||
637 | - return devtype in [d['name'] for d in vm.command('qom-list-types', implements=implements)] | ||
638 | + return devtype in [d['name'] for d in | ||
639 | + vm.cmd('qom-list-types', implements=implements)] | ||
640 | |||
641 | def get_pci_interfaces(vm, devtype): | ||
642 | interfaces = ('pci-express-device', 'conventional-pci-device') | ||
643 | @@ -78,7 +79,7 @@ def run_device(self, devtype, opts=None, machine='pc'): | ||
644 | vm.add_args('-S') | ||
645 | vm.launch() | ||
646 | |||
647 | - pcibuses = vm.command('query-pci') | ||
648 | + pcibuses = vm.cmd('query-pci') | ||
649 | alldevs = [dev for bus in pcibuses for dev in bus['devices']] | ||
650 | devfortest = [dev for dev in alldevs | ||
651 | if dev['qdev_id'] == 'devfortest'] | ||
652 | diff --git a/tests/avocado/x86_cpu_model_versions.py b/tests/avocado/x86_cpu_model_versions.py | ||
653 | index a6edf74c1c..9e07b8a55d 100644 | ||
654 | --- a/tests/avocado/x86_cpu_model_versions.py | ||
655 | +++ b/tests/avocado/x86_cpu_model_versions.py | ||
656 | @@ -84,7 +84,8 @@ def test_4_0_alias_compatibility(self): | ||
657 | # with older QEMU versions that didn't have the versioned CPU model | ||
658 | self.vm.add_args('-S') | ||
659 | self.vm.launch() | ||
660 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
661 | + cpus = dict((m['name'], m) for m in | ||
662 | + self.vm.cmd('query-cpu-definitions')) | ||
663 | |||
664 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
665 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
666 | @@ -115,7 +116,8 @@ def test_4_1_alias(self): | ||
667 | self.vm.add_args('-S') | ||
668 | self.vm.launch() | ||
669 | |||
670 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
671 | + cpus = dict((m['name'], m) for m in | ||
672 | + self.vm.cmd('query-cpu-definitions')) | ||
673 | |||
674 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
675 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
676 | @@ -220,7 +222,8 @@ def test_none_alias(self): | ||
677 | self.vm.add_args('-S') | ||
678 | self.vm.launch() | ||
679 | |||
680 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
681 | + cpus = dict((m['name'], m) for m in | ||
682 | + self.vm.cmd('query-cpu-definitions')) | ||
683 | |||
684 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
685 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
686 | @@ -246,8 +249,8 @@ class CascadelakeArchCapabilities(avocado_qemu.QemuSystemTest): | ||
687 | :avocado: tags=arch:x86_64 | ||
688 | """ | ||
689 | def get_cpu_prop(self, prop): | ||
690 | - cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path') | ||
691 | - return self.vm.command('qom-get', path=cpu_path, property=prop) | ||
692 | + cpu_path = self.vm.cmd('query-cpus-fast')[0].get('qom-path') | ||
693 | + return self.vm.cmd('qom-get', path=cpu_path, property=prop) | ||
694 | |||
695 | def test_4_1(self): | ||
696 | """ | ||
697 | diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py | ||
698 | index e69d16a62c..da96ca034a 100644 | ||
699 | --- a/tests/migration/guestperf/engine.py | ||
700 | +++ b/tests/migration/guestperf/engine.py | ||
701 | @@ -77,7 +77,7 @@ def _cpu_timing(self, pid): | ||
702 | return TimingRecord(pid, now, 1000 * (stime + utime) / jiffies_per_sec) | ||
703 | |||
704 | def _migrate_progress(self, vm): | ||
705 | - info = vm.command("query-migrate") | ||
706 | + info = vm.cmd("query-migrate") | ||
707 | |||
708 | if "ram" not in info: | ||
709 | info["ram"] = {} | ||
710 | @@ -109,7 +109,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
711 | src_vcpu_time = [] | ||
712 | src_pid = src.get_pid() | ||
713 | |||
714 | - vcpus = src.command("query-cpus-fast") | ||
715 | + vcpus = src.cmd("query-cpus-fast") | ||
716 | src_threads = [] | ||
717 | for vcpu in vcpus: | ||
718 | src_threads.append(vcpu["thread-id"]) | ||
719 | @@ -128,82 +128,82 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
720 | if self._verbose: | ||
721 | print("Starting migration") | ||
722 | if scenario._auto_converge: | ||
723 | - resp = src.command("migrate-set-capabilities", | ||
724 | - capabilities = [ | ||
725 | - { "capability": "auto-converge", | ||
726 | - "state": True } | ||
727 | - ]) | ||
728 | - resp = src.command("migrate-set-parameters", | ||
729 | - cpu_throttle_increment=scenario._auto_converge_step) | ||
730 | + resp = src.cmd("migrate-set-capabilities", | ||
731 | + capabilities = [ | ||
732 | + { "capability": "auto-converge", | ||
733 | + "state": True } | ||
734 | + ]) | ||
735 | + resp = src.cmd("migrate-set-parameters", | ||
736 | + cpu_throttle_increment=scenario._auto_converge_step) | ||
737 | |||
738 | if scenario._post_copy: | ||
739 | - resp = src.command("migrate-set-capabilities", | ||
740 | - capabilities = [ | ||
741 | - { "capability": "postcopy-ram", | ||
742 | - "state": True } | ||
743 | - ]) | ||
744 | - resp = dst.command("migrate-set-capabilities", | ||
745 | - capabilities = [ | ||
746 | - { "capability": "postcopy-ram", | ||
747 | - "state": True } | ||
748 | - ]) | ||
749 | - | ||
750 | - resp = src.command("migrate-set-parameters", | ||
751 | - max_bandwidth=scenario._bandwidth * 1024 * 1024) | ||
752 | - | ||
753 | - resp = src.command("migrate-set-parameters", | ||
754 | - downtime_limit=scenario._downtime) | ||
755 | + resp = src.cmd("migrate-set-capabilities", | ||
756 | + capabilities = [ | ||
757 | + { "capability": "postcopy-ram", | ||
758 | + "state": True } | ||
759 | + ]) | ||
760 | + resp = dst.cmd("migrate-set-capabilities", | ||
761 | + capabilities = [ | ||
762 | + { "capability": "postcopy-ram", | ||
763 | + "state": True } | ||
764 | + ]) | ||
765 | + | ||
766 | + resp = src.cmd("migrate-set-parameters", | ||
767 | + max_bandwidth=scenario._bandwidth * 1024 * 1024) | ||
768 | + | ||
769 | + resp = src.cmd("migrate-set-parameters", | ||
770 | + downtime_limit=scenario._downtime) | ||
771 | |||
772 | if scenario._compression_mt: | ||
773 | - resp = src.command("migrate-set-capabilities", | ||
774 | - capabilities = [ | ||
775 | - { "capability": "compress", | ||
776 | - "state": True } | ||
777 | - ]) | ||
778 | - resp = src.command("migrate-set-parameters", | ||
779 | - compress_threads=scenario._compression_mt_threads) | ||
780 | - resp = dst.command("migrate-set-capabilities", | ||
781 | - capabilities = [ | ||
782 | - { "capability": "compress", | ||
783 | - "state": True } | ||
784 | - ]) | ||
785 | - resp = dst.command("migrate-set-parameters", | ||
786 | - decompress_threads=scenario._compression_mt_threads) | ||
787 | + resp = src.cmd("migrate-set-capabilities", | ||
788 | + capabilities = [ | ||
789 | + { "capability": "compress", | ||
790 | + "state": True } | ||
791 | + ]) | ||
792 | + resp = src.cmd("migrate-set-parameters", | ||
793 | + compress_threads=scenario._compression_mt_threads) | ||
794 | + resp = dst.cmd("migrate-set-capabilities", | ||
795 | + capabilities = [ | ||
796 | + { "capability": "compress", | ||
797 | + "state": True } | ||
798 | + ]) | ||
799 | + resp = dst.cmd("migrate-set-parameters", | ||
800 | + decompress_threads=scenario._compression_mt_threads) | ||
801 | |||
802 | if scenario._compression_xbzrle: | ||
803 | - resp = src.command("migrate-set-capabilities", | ||
804 | - capabilities = [ | ||
805 | - { "capability": "xbzrle", | ||
806 | - "state": True } | ||
807 | - ]) | ||
808 | - resp = dst.command("migrate-set-capabilities", | ||
809 | - capabilities = [ | ||
810 | - { "capability": "xbzrle", | ||
811 | - "state": True } | ||
812 | - ]) | ||
813 | - resp = src.command("migrate-set-parameters", | ||
814 | - xbzrle_cache_size=( | ||
815 | - hardware._mem * | ||
816 | - 1024 * 1024 * 1024 / 100 * | ||
817 | - scenario._compression_xbzrle_cache)) | ||
818 | + resp = src.cmd("migrate-set-capabilities", | ||
819 | + capabilities = [ | ||
820 | + { "capability": "xbzrle", | ||
821 | + "state": True } | ||
822 | + ]) | ||
823 | + resp = dst.cmd("migrate-set-capabilities", | ||
824 | + capabilities = [ | ||
825 | + { "capability": "xbzrle", | ||
826 | + "state": True } | ||
827 | + ]) | ||
828 | + resp = src.cmd("migrate-set-parameters", | ||
829 | + xbzrle_cache_size=( | ||
830 | + hardware._mem * | ||
831 | + 1024 * 1024 * 1024 / 100 * | ||
832 | + scenario._compression_xbzrle_cache)) | ||
833 | |||
834 | if scenario._multifd: | ||
835 | - resp = src.command("migrate-set-capabilities", | ||
836 | - capabilities = [ | ||
837 | - { "capability": "multifd", | ||
838 | - "state": True } | ||
839 | - ]) | ||
840 | - resp = src.command("migrate-set-parameters", | ||
841 | - multifd_channels=scenario._multifd_channels) | ||
842 | - resp = dst.command("migrate-set-capabilities", | ||
843 | - capabilities = [ | ||
844 | - { "capability": "multifd", | ||
845 | - "state": True } | ||
846 | - ]) | ||
847 | - resp = dst.command("migrate-set-parameters", | ||
848 | - multifd_channels=scenario._multifd_channels) | ||
849 | - | ||
850 | - resp = src.command("migrate", uri=connect_uri) | ||
851 | + resp = src.cmd("migrate-set-capabilities", | ||
852 | + capabilities = [ | ||
853 | + { "capability": "multifd", | ||
854 | + "state": True } | ||
855 | + ]) | ||
856 | + resp = src.cmd("migrate-set-parameters", | ||
857 | + multifd_channels=scenario._multifd_channels) | ||
858 | + resp = dst.cmd("migrate-set-capabilities", | ||
859 | + capabilities = [ | ||
860 | + { "capability": "multifd", | ||
861 | + "state": True } | ||
862 | + ]) | ||
863 | + resp = dst.cmd("migrate-set-parameters", | ||
864 | + multifd_channels=scenario._multifd_channels) | ||
865 | + | ||
866 | + resp = src.cmd("migrate", uri=connect_uri) | ||
867 | |||
868 | post_copy = False | ||
869 | paused = False | ||
870 | @@ -228,7 +228,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
871 | |||
872 | if progress._status in ("completed", "failed", "cancelled"): | ||
873 | if progress._status == "completed" and paused: | ||
874 | - dst.command("cont") | ||
875 | + dst.cmd("cont") | ||
876 | if progress_history[-1] != progress: | ||
877 | progress_history.append(progress) | ||
878 | |||
879 | @@ -256,13 +256,13 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
880 | if progress._ram._iterations > scenario._max_iters: | ||
881 | if self._verbose: | ||
882 | print("No completion after %d iterations over RAM" % scenario._max_iters) | ||
883 | - src.command("migrate_cancel") | ||
884 | + src.cmd("migrate_cancel") | ||
885 | continue | ||
886 | |||
887 | if time.time() > (start + scenario._max_time): | ||
888 | if self._verbose: | ||
889 | print("No completion after %d seconds" % scenario._max_time) | ||
890 | - src.command("migrate_cancel") | ||
891 | + src.cmd("migrate_cancel") | ||
892 | continue | ||
893 | |||
894 | if (scenario._post_copy and | ||
895 | @@ -270,7 +270,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
896 | not post_copy): | ||
897 | if self._verbose: | ||
898 | print("Switching to post-copy after %d iterations" % scenario._post_copy_iters) | ||
899 | - resp = src.command("migrate-start-postcopy") | ||
900 | + resp = src.cmd("migrate-start-postcopy") | ||
901 | post_copy = True | ||
902 | |||
903 | if (scenario._pause and | ||
904 | @@ -278,7 +278,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
905 | not paused): | ||
906 | if self._verbose: | ||
907 | print("Pausing VM after %d iterations" % scenario._pause_iters) | ||
908 | - resp = src.command("stop") | ||
909 | + resp = src.cmd("stop") | ||
910 | paused = True | ||
911 | |||
912 | def _is_ppc64le(self): | ||
913 | diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 | ||
914 | index d7e67f4a05..f34af6cef7 100755 | ||
915 | --- a/tests/qemu-iotests/256 | ||
916 | +++ b/tests/qemu-iotests/256 | ||
917 | @@ -40,25 +40,25 @@ with iotests.FilePath('img0') as img0_path, \ | ||
918 | def create_target(filepath, name, size): | ||
919 | basename = os.path.basename(filepath) | ||
920 | nodename = "file_{}".format(basename) | ||
921 | - log(vm.command('blockdev-create', job_id='job1', | ||
922 | - options={ | ||
923 | - 'driver': 'file', | ||
924 | - 'filename': filepath, | ||
925 | - 'size': 0, | ||
926 | - })) | ||
927 | + log(vm.cmd('blockdev-create', job_id='job1', | ||
928 | + options={ | ||
929 | + 'driver': 'file', | ||
930 | + 'filename': filepath, | ||
931 | + 'size': 0, | ||
932 | + })) | ||
933 | vm.run_job('job1') | ||
934 | - log(vm.command('blockdev-add', driver='file', | ||
935 | - node_name=nodename, filename=filepath)) | ||
936 | - log(vm.command('blockdev-create', job_id='job2', | ||
937 | - options={ | ||
938 | - 'driver': iotests.imgfmt, | ||
939 | - 'file': nodename, | ||
940 | - 'size': size, | ||
941 | - })) | ||
942 | + log(vm.cmd('blockdev-add', driver='file', | ||
943 | + node_name=nodename, filename=filepath)) | ||
944 | + log(vm.cmd('blockdev-create', job_id='job2', | ||
945 | + options={ | ||
946 | + 'driver': iotests.imgfmt, | ||
947 | + 'file': nodename, | ||
948 | + 'size': size, | ||
949 | + })) | ||
950 | vm.run_job('job2') | ||
951 | - log(vm.command('blockdev-add', driver=iotests.imgfmt, | ||
952 | - node_name=name, | ||
953 | - file=nodename)) | ||
954 | + log(vm.cmd('blockdev-add', driver=iotests.imgfmt, | ||
955 | + node_name=name, | ||
956 | + file=nodename)) | ||
957 | |||
958 | log('--- Preparing images & VM ---\n') | ||
959 | vm.add_object('iothread,id=iothread0') | ||
960 | diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 | ||
961 | index e7e7a2317e..7d3720b8e5 100755 | ||
962 | --- a/tests/qemu-iotests/257 | ||
963 | +++ b/tests/qemu-iotests/257 | ||
964 | @@ -160,26 +160,26 @@ class Drive: | ||
965 | file_node_name = "file_{}".format(basename) | ||
966 | vm = self.vm | ||
967 | |||
968 | - log(vm.command('blockdev-create', job_id='bdc-file-job', | ||
969 | - options={ | ||
970 | - 'driver': 'file', | ||
971 | - 'filename': self.path, | ||
972 | - 'size': 0, | ||
973 | - })) | ||
974 | + log(vm.cmd('blockdev-create', job_id='bdc-file-job', | ||
975 | + options={ | ||
976 | + 'driver': 'file', | ||
977 | + 'filename': self.path, | ||
978 | + 'size': 0, | ||
979 | + })) | ||
980 | vm.run_job('bdc-file-job') | ||
981 | - log(vm.command('blockdev-add', driver='file', | ||
982 | - node_name=file_node_name, filename=self.path)) | ||
983 | - | ||
984 | - log(vm.command('blockdev-create', job_id='bdc-fmt-job', | ||
985 | - options={ | ||
986 | - 'driver': fmt, | ||
987 | - 'file': file_node_name, | ||
988 | - 'size': size, | ||
989 | - })) | ||
990 | + log(vm.cmd('blockdev-add', driver='file', | ||
991 | + node_name=file_node_name, filename=self.path)) | ||
992 | + | ||
993 | + log(vm.cmd('blockdev-create', job_id='bdc-fmt-job', | ||
994 | + options={ | ||
995 | + 'driver': fmt, | ||
996 | + 'file': file_node_name, | ||
997 | + 'size': size, | ||
998 | + })) | ||
999 | vm.run_job('bdc-fmt-job') | ||
1000 | - log(vm.command('blockdev-add', driver=fmt, | ||
1001 | - node_name=name, | ||
1002 | - file=file_node_name)) | ||
1003 | + log(vm.cmd('blockdev-add', driver=fmt, | ||
1004 | + node_name=name, | ||
1005 | + file=file_node_name)) | ||
1006 | self.fmt = fmt | ||
1007 | self.size = size | ||
1008 | self.node = name | ||
1009 | -- | ||
1010 | 2.34.1 | ||
1011 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch index f350ffce..e85f8202 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
29 | hw/intc/apic.c | 2 +- | 29 | hw/intc/apic.c | 2 +- |
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | 30 | 1 file changed, 1 insertion(+), 1 deletion(-) |
31 | 31 | ||
32 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c | 32 | Index: qemu-8.0.0/hw/intc/apic.c |
33 | index 3df11c34d..9506c88ce 100644 | 33 | =================================================================== |
34 | --- a/hw/intc/apic.c | 34 | --- qemu-8.0.0.orig/hw/intc/apic.c |
35 | +++ b/hw/intc/apic.c | 35 | +++ qemu-8.0.0/hw/intc/apic.c |
36 | @@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev) | 36 | @@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de |
37 | APICCommonState *s = APIC(dev); | 37 | APICCommonState *s = APIC(dev); |
38 | uint32_t lvt0; | 38 | uint32_t lvt0; |
39 | 39 | ||
@@ -42,6 +42,3 @@ index 3df11c34d..9506c88ce 100644 | |||
42 | return -1; | 42 | return -1; |
43 | 43 | ||
44 | lvt0 = s->lvt[APIC_LVT_LINT0]; | 44 | lvt0 = s->lvt[APIC_LVT_LINT0]; |
45 | -- | ||
46 | 2.30.2 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch index 6faebd4e..f981a64a 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | |||
@@ -14,19 +14,16 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
14 | meson.build | 2 +- | 14 | meson.build | 2 +- |
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/meson.build b/meson.build | 17 | Index: qemu-8.1.0/meson.build |
18 | index 861de93c4..d45ff2d7c 100644 | 18 | =================================================================== |
19 | --- a/meson.build | 19 | --- qemu-8.1.0.orig/meson.build |
20 | +++ b/meson.build | 20 | +++ qemu-8.1.0/meson.build |
21 | @@ -1063,7 +1063,7 @@ endif | 21 | @@ -1481,7 +1481,7 @@ endif |
22 | if not gnutls_crypto.found() | 22 | if not gnutls_crypto.found() |
23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() | 23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() |
24 | gcrypt = dependency('libgcrypt', version: '>=1.8', | 24 | gcrypt = dependency('libgcrypt', version: '>=1.8', |
25 | - method: 'config-tool', | 25 | - method: 'config-tool', |
26 | + method: 'pkg-config', | 26 | + method: 'pkg-config', |
27 | required: get_option('gcrypt'), | 27 | required: get_option('gcrypt')) |
28 | kwargs: static_kwargs) | ||
29 | # Debian has removed -lgpg-error from libgcrypt-config | 28 | # Debian has removed -lgpg-error from libgcrypt-config |
30 | -- | 29 | # as it "spreads unnecessary dependencies" which in |
31 | 2.30.2 | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch index 3f3c39f9..38aa4c3b 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch | |||
@@ -16,11 +16,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | |||
16 | linux-user/syscall.c | 2 ++ | 16 | linux-user/syscall.c | 2 ++ |
17 | 1 file changed, 2 insertions(+) | 17 | 1 file changed, 2 insertions(+) |
18 | 18 | ||
19 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c | 19 | Index: qemu-8.0.0/linux-user/syscall.c |
20 | index f65045efe..340e0c6f0 100644 | 20 | =================================================================== |
21 | --- a/linux-user/syscall.c | 21 | --- qemu-8.0.0.orig/linux-user/syscall.c |
22 | +++ b/linux-user/syscall.c | 22 | +++ qemu-8.0.0/linux-user/syscall.c |
23 | @@ -113,7 +113,9 @@ | 23 | @@ -115,7 +115,9 @@ |
24 | #include <linux/blkpg.h> | 24 | #include <linux/blkpg.h> |
25 | #include <netpacket/packet.h> | 25 | #include <netpacket/packet.h> |
26 | #include <linux/netlink.h> | 26 | #include <linux/netlink.h> |
@@ -30,6 +30,3 @@ index f65045efe..340e0c6f0 100644 | |||
30 | #include <linux/rtc.h> | 30 | #include <linux/rtc.h> |
31 | #include <sound/asound.h> | 31 | #include <sound/asound.h> |
32 | #ifdef HAVE_BTRFS_H | 32 | #ifdef HAVE_BTRFS_H |
33 | -- | ||
34 | 2.30.2 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch index 75c03693..5d1d7c68 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch | |||
@@ -23,11 +23,11 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org | |||
23 | linux-user/mmap.c | 10 +++++++--- | 23 | linux-user/mmap.c | 10 +++++++--- |
24 | 1 file changed, 7 insertions(+), 3 deletions(-) | 24 | 1 file changed, 7 insertions(+), 3 deletions(-) |
25 | 25 | ||
26 | diff --git a/linux-user/mmap.c b/linux-user/mmap.c | 26 | Index: qemu-8.0.0/linux-user/mmap.c |
27 | index c125031b9..e651834a5 100644 | 27 | =================================================================== |
28 | --- a/linux-user/mmap.c | 28 | --- qemu-8.0.0.orig/linux-user/mmap.c |
29 | +++ b/linux-user/mmap.c | 29 | +++ qemu-8.0.0/linux-user/mmap.c |
30 | @@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, | 30 | @@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add |
31 | int prot; | 31 | int prot; |
32 | void *host_addr; | 32 | void *host_addr; |
33 | 33 | ||
@@ -47,6 +47,3 @@ index c125031b9..e651834a5 100644 | |||
47 | return -1; | 47 | return -1; |
48 | } | 48 | } |
49 | 49 | ||
50 | -- | ||
51 | 2.30.2 | ||
52 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch index 0d7dae36..d3f965e0 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch | |||
@@ -16,10 +16,10 @@ RP 2021/3/1 | |||
16 | scripts/decodetree.py | 2 +- | 16 | scripts/decodetree.py | 2 +- |
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/scripts/decodetree.py b/scripts/decodetree.py | 19 | Index: qemu-8.0.0/scripts/decodetree.py |
20 | index a03dc6b5e..4ea24c1f3 100644 | 20 | =================================================================== |
21 | --- a/scripts/decodetree.py | 21 | --- qemu-8.0.0.orig/scripts/decodetree.py |
22 | +++ b/scripts/decodetree.py | 22 | +++ qemu-8.0.0/scripts/decodetree.py |
23 | @@ -1328,7 +1328,7 @@ def main(): | 23 | @@ -1328,7 +1328,7 @@ def main(): |
24 | toppat = ExcMultiPattern(0) | 24 | toppat = ExcMultiPattern(0) |
25 | 25 | ||
@@ -29,6 +29,3 @@ index a03dc6b5e..4ea24c1f3 100644 | |||
29 | f = open(filename, 'rt', encoding='utf-8') | 29 | f = open(filename, 'rt', encoding='utf-8') |
30 | parse_file(f, toppat) | 30 | parse_file(f, toppat) |
31 | f.close() | 31 | f.close() |
32 | -- | ||
33 | 2.30.2 | ||
34 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch index 43d3c7cf..a84364cc 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch | |||
@@ -17,22 +17,25 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
17 | tests/unit/meson.build | 4 ++-- | 17 | tests/unit/meson.build | 4 ++-- |
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | 18 | 1 file changed, 2 insertions(+), 2 deletions(-) |
19 | 19 | ||
20 | diff --git a/tests/unit/meson.build b/tests/unit/meson.build | 20 | Index: qemu-8.0.0/tests/unit/meson.build |
21 | index 96b295263..e4c3246dc 100644 | 21 | =================================================================== |
22 | --- a/tests/unit/meson.build | 22 | --- qemu-8.0.0.orig/tests/unit/meson.build |
23 | +++ b/tests/unit/meson.build | 23 | +++ qemu-8.0.0/tests/unit/meson.build |
24 | @@ -44,9 +44,9 @@ tests = { | 24 | @@ -46,7 +46,7 @@ tests = { |
25 | 'test-keyval': [testqapi], | 25 | 'test-keyval': [testqapi], |
26 | 'test-logging': [], | 26 | 'test-logging': [], |
27 | 'test-uuid': [], | 27 | 'test-uuid': [], |
28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], | 28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], |
29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], | 29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], |
30 | 'test-qapi-util': [], | 30 | 'test-qapi-util': [], |
31 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], | 31 | 'test-interval-tree': [], |
32 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | 32 | 'test-xs-node': [qom], |
33 | } | 33 | @@ -136,7 +136,7 @@ if have_system |
34 | 34 | 'test-util-sockets': ['socket-helpers.c'], | |
35 | if have_system or have_tools | 35 | 'test-base64': [], |
36 | -- | 36 | 'test-bufferiszero': [], |
37 | 2.30.2 | 37 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], |
38 | 38 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | |
39 | 'test-vmstate': [migration, io], | ||
40 | 'test-yank': ['socket-helpers.c', qom, io, chardev] | ||
41 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch index 23d0a698..4de6cc24 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | |||
@@ -18,10 +18,10 @@ Cc: Michael S. Tsirkin <mst@redhat.com> | |||
18 | util/mmap-alloc.c | 10 +++++++--- | 18 | util/mmap-alloc.c | 10 +++++++--- |
19 | 1 file changed, 7 insertions(+), 3 deletions(-) | 19 | 1 file changed, 7 insertions(+), 3 deletions(-) |
20 | 20 | ||
21 | diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c | 21 | Index: qemu-8.0.0/util/mmap-alloc.c |
22 | index 893d86435..86d3cda24 100644 | 22 | =================================================================== |
23 | --- a/util/mmap-alloc.c | 23 | --- qemu-8.0.0.orig/util/mmap-alloc.c |
24 | +++ b/util/mmap-alloc.c | 24 | +++ qemu-8.0.0/util/mmap-alloc.c |
25 | @@ -10,14 +10,18 @@ | 25 | @@ -10,14 +10,18 @@ |
26 | * later. See the COPYING file in the top-level directory. | 26 | * later. See the COPYING file in the top-level directory. |
27 | */ | 27 | */ |
@@ -44,6 +44,3 @@ index 893d86435..86d3cda24 100644 | |||
44 | #include "qemu/mmap-alloc.h" | 44 | #include "qemu/mmap-alloc.h" |
45 | #include "qemu/host-utils.h" | 45 | #include "qemu/host-utils.h" |
46 | #include "qemu/cutils.h" | 46 | #include "qemu/cutils.h" |
47 | -- | ||
48 | 2.30.2 | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch index 810c74fa..6caf35b6 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch | |||
@@ -21,13 +21,13 @@ Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | |||
21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ | 21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ |
22 | 1 file changed, 6 insertions(+) | 22 | 1 file changed, 6 insertions(+) |
23 | 23 | ||
24 | diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c | 24 | Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c |
25 | index da7ddfa548..89db963c46 100644 | 25 | =================================================================== |
26 | --- a/hw/rdma/vmw/pvrdma_cmd.c | 26 | --- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c |
27 | +++ b/hw/rdma/vmw/pvrdma_cmd.c | 27 | +++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c |
28 | @@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) | 28 | @@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) |
29 | 29 | goto out; | |
30 | dsr_info = &dev->dsr_info; | 30 | } |
31 | 31 | ||
32 | + if (!dsr_info->dsr) { | 32 | + if (!dsr_info->dsr) { |
33 | + /* Buggy or malicious guest driver */ | 33 | + /* Buggy or malicious guest driver */ |
@@ -38,6 +38,3 @@ index da7ddfa548..89db963c46 100644 | |||
38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / | 38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / |
39 | sizeof(struct cmd_handler)) { | 39 | sizeof(struct cmd_handler)) { |
40 | rdma_error_report("Unsupported command"); | 40 | rdma_error_report("Unsupported command"); |
41 | -- | ||
42 | 2.34.1 | ||
43 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch index ca2ad361..112eb925 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch | |||
@@ -14,19 +14,19 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | |||
14 | configure | 4 ---- | 14 | configure | 4 ---- |
15 | 1 file changed, 4 deletions(-) | 15 | 1 file changed, 4 deletions(-) |
16 | 16 | ||
17 | Index: qemu-7.1.0/configure | 17 | Index: qemu-8.0.0/configure |
18 | =================================================================== | 18 | =================================================================== |
19 | --- qemu-7.1.0.orig/configure | 19 | --- qemu-8.0.0.orig/configure |
20 | +++ qemu-7.1.0/configure | 20 | +++ qemu-8.0.0/configure |
21 | @@ -2710,7 +2710,6 @@ if test "$skip_meson" = no; then | 21 | @@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then |
22 | echo "strip = [$(meson_quote $strip)]" >> $cross | ||
23 | echo "widl = [$(meson_quote $widl)]" >> $cross | 22 | echo "widl = [$(meson_quote $widl)]" >> $cross |
24 | echo "windres = [$(meson_quote $windres)]" >> $cross | 23 | echo "windres = [$(meson_quote $windres)]" >> $cross |
24 | echo "windmc = [$(meson_quote $windmc)]" >> $cross | ||
25 | - if test "$cross_compile" = "yes"; then | 25 | - if test "$cross_compile" = "yes"; then |
26 | cross_arg="--cross-file config-meson.cross" | 26 | cross_arg="--cross-file config-meson.cross" |
27 | echo "[host_machine]" >> $cross | 27 | echo "[host_machine]" >> $cross |
28 | echo "system = '$targetos'" >> $cross | 28 | echo "system = '$targetos'" >> $cross |
29 | @@ -2728,9 +2727,6 @@ if test "$skip_meson" = no; then | 29 | @@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then |
30 | else | 30 | else |
31 | echo "endian = 'little'" >> $cross | 31 | echo "endian = 'little'" >> $cross |
32 | fi | 32 | fi |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch new file mode 100644 index 00000000..0cbaea07 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [workaround, would need a real fix for upstream] | ||
2 | |||
3 | Index: qemu-8.1.0/configure | ||
4 | =================================================================== | ||
5 | --- qemu-8.1.0.orig/configure | ||
6 | +++ qemu-8.1.0/configure | ||
7 | @@ -1032,12 +1032,7 @@ then | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | -# At this point, we expect Meson to be installed and available. | ||
12 | -# We expect mkvenv or pip to have created pyvenv/bin/meson for us. | ||
13 | -# We ignore PATH completely here: we want to use the venv's Meson | ||
14 | -# *exclusively*. | ||
15 | - | ||
16 | -meson="$(cd pyvenv/bin; pwd)/meson" | ||
17 | +meson=`which meson` | ||
18 | |||
19 | # Conditionally ensure Sphinx is installed. | ||
20 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch new file mode 100644 index 00000000..01546d10 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Patch to fix mips boot hangs where virtio appears broken. Patch under discussion upstream. | ||
2 | Regression is introduced by other fixes to 8.1.0 to get x86 boots working. | ||
3 | |||
4 | Upstream-Status: Pending [https://lore.kernel.org/qemu-devel/6c956b90-5a13-db96-9c02-9834a512fe6f@linaro.org/] | ||
5 | |||
6 | Index: qemu-8.1.0/softmmu/physmem.c | ||
7 | =================================================================== | ||
8 | --- qemu-8.1.0.orig/softmmu/physmem.c | ||
9 | +++ qemu-8.1.0/softmmu/physmem.c | ||
10 | @@ -2517,7 +2517,7 @@ static void tcg_commit(MemoryListener *l | ||
11 | * That said, the listener is also called during realize, before | ||
12 | * all of the tcg machinery for run-on is initialized: thus halt_cond. | ||
13 | */ | ||
14 | - if (cpu->halt_cond) { | ||
15 | + if (cpu->halt_cond && !qemu_cpu_is_self(cpu)) { | ||
16 | async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas)); | ||
17 | } else { | ||
18 | tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas)); | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch new file mode 100644 index 00000000..09e13e8b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | qemu: Ensure pip and the python venv aren't used for meson | ||
2 | |||
3 | Qemu wants to use a supported python version and a specific meson version | ||
4 | to "help" users and uses pip and creates a venv to do this. This is a nightmare | ||
5 | for us. Our versions stay up to date and should be supported so we don't | ||
6 | really need/want this wrapping. Tweak things to disable it. | ||
7 | |||
8 | There was breakage from the wrapper shown by: | ||
9 | |||
10 | bitbake qemu-system-native | ||
11 | <add DISTRO_FEATURES:remove = "opengl" to local.conf> | ||
12 | bitbake qemu-system-native -c configure | ||
13 | |||
14 | which would crash. The issue is the change in configuration removes pieces | ||
15 | from the sysroot but pyc files remainm as do pieces of pip which causes | ||
16 | problems. | ||
17 | |||
18 | Ideally we'd convince upstream to allow some way to disable the venv on | ||
19 | the understanding that if/when it breaks, we keep the pieces. The patch | ||
20 | as it stands is a workaround. | ||
21 | |||
22 | Upstream-Status: Inappropriate [oe specific] | ||
23 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
24 | |||
25 | Index: qemu-8.1.2/configure | ||
26 | =================================================================== | ||
27 | --- qemu-8.1.2.orig/configure | ||
28 | +++ qemu-8.1.2/configure | ||
29 | @@ -1009,7 +1009,7 @@ python="$(command -v "$python")" | ||
30 | echo "python determined to be '$python'" | ||
31 | echo "python version: $($python --version)" | ||
32 | |||
33 | -python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)" | ||
34 | +python=python3 | ||
35 | if test "$?" -ne 0 ; then | ||
36 | error_exit "python venv creation failed" | ||
37 | fi | ||
38 | @@ -1017,6 +1017,7 @@ fi | ||
39 | # Suppress writing compiled files | ||
40 | python="$python -B" | ||
41 | mkvenv="$python ${source_path}/python/scripts/mkvenv.py" | ||
42 | +mkvenv=true | ||
43 | |||
44 | mkvenv_flags="" | ||
45 | if test "$download" = "enabled" ; then | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin index c4044296..c4044296 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin | |||
Binary files differ | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init new file mode 100644 index 00000000..5ebaadde --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init | |||
@@ -0,0 +1,75 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | # Initially written by: Michael Tokarev <mjt@tls.msk.ru> | ||
3 | # For QEMU Debian downstream package | ||
4 | |||
5 | set -e | ||
6 | |||
7 | . /etc/init.d/functions | ||
8 | |||
9 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
10 | DESC="QEMU Guest Agent" | ||
11 | NAME=qemu-ga | ||
12 | DAEMON=@bindir@/$NAME | ||
13 | PIDFILE=/var/run/$NAME.pid | ||
14 | |||
15 | # config | ||
16 | DAEMON_ARGS="" | ||
17 | # default transport | ||
18 | TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0 | ||
19 | NO_START=0 | ||
20 | |||
21 | test ! -r /etc/default/qemu-guest-agent || . /etc/default/qemu-guest-agent | ||
22 | test "$NO_START" = "0" || exit 0 | ||
23 | test -x "$DAEMON" || exit 0 | ||
24 | |||
25 | # | ||
26 | # Function that checks whenever system has necessary environment | ||
27 | # It also splits $TRANSPORT into $method and $path | ||
28 | # | ||
29 | do_check_transport() { | ||
30 | method=${TRANSPORT%%:*}; | ||
31 | path=${TRANSPORT#*:} | ||
32 | case "$method" in | ||
33 | virtio-serial | isa-serial) | ||
34 | if [ ! -e "$path" ]; then | ||
35 | echo "$NAME: transport endpoint not found, not starting" | ||
36 | return 1 | ||
37 | fi | ||
38 | ;; | ||
39 | esac | ||
40 | } | ||
41 | |||
42 | case "$1" in | ||
43 | start) | ||
44 | do_check_transport || exit 0 | ||
45 | echo -n "Starting $DESC: " | ||
46 | start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \ | ||
47 | $DAEMON_ARGS -d -m "$method" -p "$path" | ||
48 | echo "$NAME." | ||
49 | ;; | ||
50 | stop) | ||
51 | echo -n "Stopping $DESC: " | ||
52 | start-stop-daemon -K -x "$DAEMON" -p $PIDFILE | ||
53 | echo "$NAME." | ||
54 | ;; | ||
55 | status) | ||
56 | status "$DAEMON" | ||
57 | exit $? | ||
58 | ;; | ||
59 | restart|force-reload) | ||
60 | do_check_transport || exit 0 | ||
61 | echo -n "Restarting $DESC: " | ||
62 | start-stop-daemon -K -x "$DAEMON" -p $PIDFILE | ||
63 | sleep 1 | ||
64 | start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \ | ||
65 | $DAEMON_ARGS -d -m "$method" -p "$path" | ||
66 | echo "$NAME." | ||
67 | ;; | ||
68 | *) | ||
69 | N=/etc/init.d/$NAME | ||
70 | echo "Usage: $N {start|stop|status|restart|force-reload}" >&2 | ||
71 | exit 1 | ||
72 | ;; | ||
73 | esac | ||
74 | |||
75 | exit 0 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev new file mode 100644 index 00000000..47097057 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev | |||
@@ -0,0 +1,2 @@ | |||
1 | SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ | ||
2 | TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest index f9a4e8fb..f9a4e8fb 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc index b08b414f..5f180a35 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc | |||
@@ -7,19 +7,19 @@ inherit deploy | |||
7 | 7 | ||
8 | LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=27;md5=7348b6cbcae69912cb1dee68d6c68d99" | 8 | LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=27;md5=7348b6cbcae69912cb1dee68d6c68d99" |
9 | 9 | ||
10 | PV = "xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | 10 | PV .= "+git" |
11 | 11 | ||
12 | REPO ?= "git://github.com/Xilinx/qemu-devicetrees.git;protocol=https" | 12 | REPO ?= "git://github.com/Xilinx/qemu-devicetrees.git;protocol=https" |
13 | 13 | ||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
15 | SRC_URI = "${REPO};${BRANCHARG}" | 15 | SRC_URI = "${REPO};${BRANCHARG}" |
16 | 16 | ||
17 | S = "${WORKDIR}/git" | 17 | SRC_URI += "file://0001-versal-Reorder-serial-ports.patch" |
18 | SRC_URI += "file://0001-versal-net-Reorder-serial-port.patch" | ||
18 | 19 | ||
19 | # Don't need to do anything | 20 | S = "${UNPACKDIR}/git" |
20 | do_install() { | 21 | |
21 | : | 22 | do_install[noexec] = '1' |
22 | } | ||
23 | 23 | ||
24 | do_deploy() { | 24 | do_deploy() { |
25 | # single-arch dtbs | 25 | # single-arch dtbs |
@@ -33,4 +33,7 @@ do_deploy() { | |||
33 | done | 33 | done |
34 | } | 34 | } |
35 | 35 | ||
36 | addtask deploy after do_install | 36 | addtask deploy after do_install before do_build |
37 | |||
38 | COMPATIBLE_HOST:class-target = "none" | ||
39 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch new file mode 100644 index 00000000..aaaa640a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch | |||
@@ -0,0 +1,1468 @@ | |||
1 | From 2da2588a1dda1fd7fd2f6fc89db13cc5694d793e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Sat, 24 Aug 2024 11:23:18 -0600 | ||
4 | Subject: [PATCH] versal: Reorder serial ports | ||
5 | |||
6 | This change affects the order of the serial ports when calling qemu. | ||
7 | Previously the serial ports 0 & 1 were the PMC (firmware) uartlite, | ||
8 | while the standard serial pors were 2 & 3. Reverse this order to | ||
9 | ensure that the first two serial ports are the ones used by Linux. | ||
10 | |||
11 | Upstream-Status: Inappropriate [not a real board] | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | --- | ||
15 | board-versal-pmc-virt-alt.dts | 230 ++++++++++++++++ | ||
16 | board-versal-ps-vck190-alt.dts | 58 ++++ | ||
17 | board-versal-ps-virt-alt.dts | 354 +++++++++++++++++++++++++ | ||
18 | versal-pmc-alt.dtsi | 40 +++ | ||
19 | versal-pmc-ppu-alt.dtsi | 252 ++++++++++++++++++ | ||
20 | versal-ps-iou-alt.dtsi | 467 +++++++++++++++++++++++++++++++++ | ||
21 | 6 files changed, 1401 insertions(+) | ||
22 | create mode 100644 board-versal-pmc-virt-alt.dts | ||
23 | create mode 100644 board-versal-ps-vck190-alt.dts | ||
24 | create mode 100644 board-versal-ps-virt-alt.dts | ||
25 | create mode 100644 versal-pmc-alt.dtsi | ||
26 | create mode 100644 versal-pmc-ppu-alt.dtsi | ||
27 | create mode 100644 versal-ps-iou-alt.dtsi | ||
28 | |||
29 | diff --git a/board-versal-pmc-virt-alt.dts b/board-versal-pmc-virt-alt.dts | ||
30 | new file mode 100644 | ||
31 | index 00000000..52d23c83 | ||
32 | --- /dev/null | ||
33 | +++ b/board-versal-pmc-virt-alt.dts | ||
34 | @@ -0,0 +1,230 @@ | ||
35 | +/* | ||
36 | + * Versal Virtual PMC board device tree | ||
37 | + * | ||
38 | + * Copyright (c) 2016, Xilinx Inc | ||
39 | + * All rights reserved. | ||
40 | + * | ||
41 | + * Redistribution and use in source and binary forms, with or without | ||
42 | + * modification, are permitted provided that the following conditions are met: | ||
43 | + * * Redistributions of source code must retain the above copyright | ||
44 | + * notice, this list of conditions and the following disclaimer. | ||
45 | + * * Redistributions in binary form must reproduce the above copyright | ||
46 | + * notice, this list of conditions and the following disclaimer in the | ||
47 | + * documentation and/or other materials provided with the distribution. | ||
48 | + * * Neither the name of the <organization> nor the | ||
49 | + * names of its contributors may be used to endorse or promote products | ||
50 | + * derived from this software without specific prior written permission. | ||
51 | + * | ||
52 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
53 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
54 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
55 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
56 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
57 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
58 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
59 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
60 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
61 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
62 | + */ | ||
63 | + | ||
64 | +/dts-v1/; | ||
65 | + | ||
66 | +#ifndef VERSAL_NPI_OVERRIDE | ||
67 | + #include "versal-npi-memmap.dtsh" | ||
68 | +#endif | ||
69 | + | ||
70 | +#define VERSAL_NPI_GENERIC | ||
71 | + | ||
72 | +#include "versal.dtsh" | ||
73 | + | ||
74 | +#ifndef MULTI_ARCH | ||
75 | +#include "versal-pmc-alt.dtsi" | ||
76 | +#include "versal-psm.dtsi" | ||
77 | +#include "versal-ddrmc.dtsi" | ||
78 | +#include "versal-ps-iou-alt.dtsi" | ||
79 | +#include "versal-pmc-ppu-cpus.dtsi" | ||
80 | +#include "versal-psm-cpu.dtsi" | ||
81 | + | ||
82 | +/ { | ||
83 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
84 | + MEM_REGION(ddr, 0x0, MM_TOP_DDR, 0x00000000, MM_TOP_DDR_SIZE, &ddr_mem) // 2 GB | ||
85 | + MEM_SPEC(ddr_2, MM_TOP_DDR_2_H, MM_TOP_DDR_2_L, MM_TOP_DDR_2, | ||
86 | + MM_TOP_DDR_2_SIZE_H, MM_TOP_DDR_2_SIZE_L, &ddr_2_mem) // 32 GB | ||
87 | + | ||
88 | + /* Dummy APUs. */ | ||
89 | + cpu0: apu@0 { | ||
90 | + }; | ||
91 | + cpu1: apu@1 { | ||
92 | + }; | ||
93 | + rpu_cpu0: rpu_cpu0 { | ||
94 | + }; | ||
95 | + rpu_cpu1: rpu_cpu1 { | ||
96 | + }; | ||
97 | +#ifndef HAVE_DDRMC_CPUS | ||
98 | + ddrmc_ub0: ddrmc_ub@0 { | ||
99 | + #interrupt-cells = <1>; | ||
100 | + interrupt-controller; | ||
101 | + }; | ||
102 | + ddrmc_ub1: ddrmc_ub@1 { | ||
103 | + #interrupt-cells = <1>; | ||
104 | + interrupt-controller; | ||
105 | + }; | ||
106 | +#endif | ||
107 | + /* Dummy GIC. */ | ||
108 | + gic: apu_gic@0 { | ||
109 | + #interrupt-cells = <3>; | ||
110 | + interrupt-controller; | ||
111 | + }; | ||
112 | +}; | ||
113 | + | ||
114 | +&pmc_qspi_0 { | ||
115 | + SPI_FLASH(qspi_flash_lcs_lb,"m25qu02gcbb", 0x02000000, 0x0 0x0) | ||
116 | + SPI_FLASH(qspi_flash_lcs_ub,"m25qu02gcbb", 0x02000000, 0x2 0x1) | ||
117 | + SPI_FLASH(qspi_flash_ucs_lb,"m25qu02gcbb", 0x02000000, 0x1 0x0) | ||
118 | + SPI_FLASH(qspi_flash_ucs_ub,"m25qu02gcbb", 0x02000000, 0x3 0x1) | ||
119 | +}; | ||
120 | + | ||
121 | +&ospi { | ||
122 | + SPI_FLASH(ospi_flash_lcs_lb, "mt35xu01gbba", 0x02000000, 0x0 0x0) | ||
123 | + SPI_FLASH(ospi_flash_lcs_ub, "mt35xu01gbba", 0x02000000, 0x1 0x0) | ||
124 | + SPI_FLASH(ospi_flash_ucs_lb, "mt35xu01gbba", 0x02000000, 0x2 0x0) | ||
125 | + SPI_FLASH(ospi_flash_ucs_ub, "mt35xu01gbba", 0x02000000, 0x3 0x0) | ||
126 | +}; | ||
127 | + | ||
128 | +#else | ||
129 | +#include "versal-icnt.dtsi" | ||
130 | +#include "versal-rams.dtsi" | ||
131 | +#include "versal-pmc-ppu-cpus.dtsi" | ||
132 | +#include "versal-psm-cpu.dtsi" | ||
133 | + | ||
134 | +/ { | ||
135 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
136 | + MEM_REGION(ddr, 0x0, 0x00000000, 0x00000000, 0x80000000, &ddr_mem) | ||
137 | + | ||
138 | + ps_pmc_rp: ps_pmc_rp@0 { | ||
139 | + doc-name = "Remote-port PMC-PS"; | ||
140 | + compatible = "remote-port"; | ||
141 | + chrdev-id = "ps-pmc-rp"; | ||
142 | + }; | ||
143 | + rp_pmc_ppu0: rp_pmc_ppu0@0 { | ||
144 | + compatible = "remote-port-gpio"; | ||
145 | + remote-ports = <&ps_pmc_rp 1>; | ||
146 | + interrupts-extended = < &pmc_ppu0 0 >; | ||
147 | + }; | ||
148 | + rp_pmc_ppu1: rp_pmc_ppu1@0 { | ||
149 | + compatible = "remote-port-gpio"; | ||
150 | + remote-ports = <&ps_pmc_rp 2>; | ||
151 | + interrupts-extended = < &pmc_ppu1 0 >; | ||
152 | + }; | ||
153 | + pmc_global: rp_pmc_global@0 { | ||
154 | + compatible = "remote-port-gpio"; | ||
155 | + remote-ports = <&ps_pmc_rp 3>; | ||
156 | + #gpio-cells = <1>; | ||
157 | + num-gpios = <16>; | ||
158 | + }; | ||
159 | + lmb_pmc_ppu0: lmb_pmc_ppu0@0 { | ||
160 | + rp_lmb_pmc_ppu0@0 { | ||
161 | + compatible = "remote-port-memory-master"; | ||
162 | + remote-ports = <&ps_pmc_rp 4>; | ||
163 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
164 | + }; | ||
165 | + }; | ||
166 | + lmb_pmc_ppu1: lmb_pmc_ppu1@0 { | ||
167 | + rp_lmb_pmc_ppu1@0 { | ||
168 | + compatible = "remote-port-memory-master"; | ||
169 | + remote-ports = <&ps_pmc_rp 5>; | ||
170 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
171 | + }; | ||
172 | + }; | ||
173 | + crl: crl@MM_CRL { | ||
174 | + compatible = "remote-port-gpio"; | ||
175 | + remote-ports = <&ps_pmc_rp 6>; | ||
176 | + #gpio-cells = <1>; | ||
177 | + num-gpios = <35>; | ||
178 | + }; | ||
179 | + pmc_clk_rst: pmc_clk_rst@0 { | ||
180 | + compatible = "remote-port-gpio"; | ||
181 | + remote-ports = <&ps_pmc_rp 7>; | ||
182 | + #gpio-cells = <1>; | ||
183 | + num-gpios = <30>; | ||
184 | + }; | ||
185 | + rp_psm0: rp_psm0@0 { | ||
186 | + compatible = "remote-port-gpio"; | ||
187 | + remote-ports = <&ps_pmc_rp 8>; | ||
188 | + interrupts-extended = < &psm0 0 >; | ||
189 | + }; | ||
190 | +#ifdef MM_NPI_DDRMC_MAIN_0 | ||
191 | + rp_ddrmc_ub0: rp_ddrmc_ub@0 { | ||
192 | + compatible = "remote-port-gpio"; | ||
193 | + remote-ports = <&ps_pmc_rp 9>; | ||
194 | +# ifdef HAVE_DDRMC_CPUS | ||
195 | + interrupts-extended = < &ddrmc_ub0 0 >; | ||
196 | +# endif | ||
197 | + }; | ||
198 | + | ||
199 | + npi_ddrmc_ub0: rp_npi_ddrmc_ub@0 { | ||
200 | + compatible = "remote-port-gpio"; | ||
201 | + remote-ports = <&ps_pmc_rp 11>; | ||
202 | + #gpio-cells = <1>; | ||
203 | + }; | ||
204 | +#endif | ||
205 | +#ifdef MM_NPI_DDRMC_MAIN_1 | ||
206 | + rp_ddrmc_ub1: rp_ddrmc_ub@1 { | ||
207 | + compatible = "remote-port-gpio"; | ||
208 | + remote-ports = <&ps_pmc_rp 10>; | ||
209 | + # ifdef HAVE_DDRMC_CPUS | ||
210 | + interrupts-extended = < &ddrmc_ub1 0 >; | ||
211 | + # endif | ||
212 | + }; | ||
213 | + | ||
214 | + npi_ddrmc_ub1: rp_npi_ddrmc_ub@1 { | ||
215 | + compatible = "remote-port-gpio"; | ||
216 | + remote-ports = <&ps_pmc_rp 12>; | ||
217 | + #gpio-cells = <1>; | ||
218 | + }; | ||
219 | +#endif | ||
220 | + lmb_psm: lmb_psm@0 { | ||
221 | + rp_lmb_psm@0 { | ||
222 | + compatible = "remote-port-memory-master"; | ||
223 | + remote-ports = <&ps_pmc_rp 13>; | ||
224 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
225 | + }; | ||
226 | + }; | ||
227 | + | ||
228 | + /* Dummy stub to avoid ifdefs in the interrupt-map. */ | ||
229 | + pmc_gic_proxy: pmc_gic_proxy { | ||
230 | + doc-ignore = <1>; | ||
231 | + #interrupt-cells = <3>; | ||
232 | + interrupt-controller; | ||
233 | + }; | ||
234 | + psm_gic_proxy: psm_gic_proxy { | ||
235 | + doc-ignore = <1>; | ||
236 | + #interrupt-cells = <3>; | ||
237 | + interrupt-controller; | ||
238 | + }; | ||
239 | + psm0_io_intc: psm0_io_intc { | ||
240 | + doc-ignore = <1>; | ||
241 | + #interrupt-cells = <1>; | ||
242 | + interrupt-controller; | ||
243 | + }; | ||
244 | + pmc_ppu1_io_intc: pmc_ppu1_io_intc { | ||
245 | + doc-ignore = <1>; | ||
246 | + #interrupt-cells = <1>; | ||
247 | + interrupt-controller; | ||
248 | + }; | ||
249 | +}; | ||
250 | +#endif | ||
251 | + | ||
252 | +/ { | ||
253 | + /* | ||
254 | + * FIXME: This legacy hook will reset the entire PMC instance | ||
255 | + * meaning PSM and PMC MicroBlazes for multi-arch and all | ||
256 | + * devices for single-arch. | ||
257 | + * Once the CPU reset infrastructure is improved, we should | ||
258 | + * remove this. | ||
259 | + */ | ||
260 | + pmc_reset: pmc_reset@ { | ||
261 | + compatible = "qemu,reset-device"; | ||
262 | + gpios = <&pmc_clk_rst CRP_RST_PS_PMC_SRST>; | ||
263 | + }; | ||
264 | +}; | ||
265 | diff --git a/board-versal-ps-vck190-alt.dts b/board-versal-ps-vck190-alt.dts | ||
266 | new file mode 100644 | ||
267 | index 00000000..b61d3d5c | ||
268 | --- /dev/null | ||
269 | +++ b/board-versal-ps-vck190-alt.dts | ||
270 | @@ -0,0 +1,58 @@ | ||
271 | +/* | ||
272 | + * Versal Virtual vck190 board device tree | ||
273 | + * | ||
274 | + * Copyright (c) 2020, Xilinx Inc | ||
275 | + * All rights reserved. | ||
276 | + * | ||
277 | + * Redistribution and use in source and binary forms, with or without | ||
278 | + * modification, are permitted provided that the following conditions are met: | ||
279 | + * * Redistributions of source code must retain the above copyright | ||
280 | + * notice, this list of conditions and the following disclaimer. | ||
281 | + * * Redistributions in binary form must reproduce the above copyright | ||
282 | + * notice, this list of conditions and the following disclaimer in the | ||
283 | + * documentation and/or other materials provided with the distribution. | ||
284 | + * * Neither the name of the <organization> nor the | ||
285 | + * names of its contributors may be used to endorse or promote products | ||
286 | + * derived from this software without specific prior written permission. | ||
287 | + * | ||
288 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
289 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
290 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
291 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
292 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
293 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
294 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
295 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
296 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
297 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
298 | + */ | ||
299 | +#include "board-versal-ps-virt-alt.dts" | ||
300 | +#include "versal-silicon-freq.dtsi" | ||
301 | + | ||
302 | +/{ | ||
303 | + MEM_REGION64(ddr_3, MM_TOP_DDR_CH1_H, MM_TOP_DDR_CH1_L, MM_TOP_DDR_CH1, | ||
304 | + 0x2, 0x0, &ddr_3_mem) // 8 GB | ||
305 | +}; | ||
306 | + | ||
307 | +&ps_i2c1 { | ||
308 | + i2cswitch@74 { | ||
309 | + #address-cells = <1>; | ||
310 | + #size-cells = <0>; | ||
311 | + compatible = "nxp,pca9548"; | ||
312 | + reg = <0x74>; | ||
313 | + chip-enable = <0x1>; | ||
314 | + i2c@0 { | ||
315 | + #address-cells = <1>; | ||
316 | + #size-cells = <0>; | ||
317 | + reg = <0>; | ||
318 | + eeprom@54 { | ||
319 | + compatible = "at,24c08"; | ||
320 | + reg = <0x54>; | ||
321 | + }; | ||
322 | + }; | ||
323 | + }; | ||
324 | +}; | ||
325 | + | ||
326 | +&ospi_flash_lcs_lb { | ||
327 | + compatible = "mt35xu02gbba"; | ||
328 | +}; | ||
329 | diff --git a/board-versal-ps-virt-alt.dts b/board-versal-ps-virt-alt.dts | ||
330 | new file mode 100644 | ||
331 | index 00000000..7585d196 | ||
332 | --- /dev/null | ||
333 | +++ b/board-versal-ps-virt-alt.dts | ||
334 | @@ -0,0 +1,354 @@ | ||
335 | +/* | ||
336 | + * Versal Virtual PS board device tree | ||
337 | + * | ||
338 | + * Copyright (c) 2016-2022, Xilinx Inc. | ||
339 | + * Copyright (C) 2022-2024, Advanced Micro Devices, Inc. | ||
340 | + * All rights reserved. | ||
341 | + * | ||
342 | + * Redistribution and use in source and binary forms, with or without | ||
343 | + * modification, are permitted provided that the following conditions are met: | ||
344 | + * * Redistributions of source code must retain the above copyright | ||
345 | + * notice, this list of conditions and the following disclaimer. | ||
346 | + * * Redistributions in binary form must reproduce the above copyright | ||
347 | + * notice, this list of conditions and the following disclaimer in the | ||
348 | + * documentation and/or other materials provided with the distribution. | ||
349 | + * * Neither the name of the <organization> nor the | ||
350 | + * names of its contributors may be used to endorse or promote products | ||
351 | + * derived from this software without specific prior written permission. | ||
352 | + * | ||
353 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
354 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
355 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
356 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
357 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
358 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
359 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
360 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
361 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
362 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
363 | + */ | ||
364 | +#ifndef __BOARD_VERSAL_PS_VIRT__ | ||
365 | +#define __BOARD_VERSAL_PS_VIRT__ | ||
366 | + | ||
367 | +/dts-v1/; | ||
368 | +#ifndef VERSAL_NPI_OVERRIDE | ||
369 | + #include "versal-npi-memmap.dtsh" | ||
370 | +#endif | ||
371 | + | ||
372 | +#ifndef NUM_APUS | ||
373 | +/* Base platform has 2 APUs. */ | ||
374 | +#define NUM_APUS 2 | ||
375 | +#endif | ||
376 | + | ||
377 | +#define HAS_SMMU | ||
378 | +#define HAVE_APU_GIC | ||
379 | + | ||
380 | +#ifndef RPU_GIC_INTERRUPT_TARGET_STEM | ||
381 | +#ifdef MULTI_ARCH | ||
382 | + #define RPU_GIC_INTERRUPT_TARGET_STEM rpu_intc_redirect_ | ||
383 | +#else | ||
384 | + #define RPU_GIC_INTERRUPT_TARGET_STEM rpu_cpu | ||
385 | +#endif | ||
386 | +#endif | ||
387 | + | ||
388 | +#define VERSAL_NPI_GENERIC | ||
389 | + | ||
390 | +#include "versal.dtsh" | ||
391 | + | ||
392 | +#include "versal-pmc.dtsi" | ||
393 | +#include "versal-psm.dtsi" | ||
394 | +#include "versal-ddrmc.dtsi" | ||
395 | +#ifdef VERSAL_PSX | ||
396 | +#include "versal-psx-apu.dtsi" | ||
397 | +#else | ||
398 | +#include "versal-ps-apu.dtsi" | ||
399 | +#include "versal-ps-rpu.dtsi" | ||
400 | +#include "versal-boot-init.dtsi" | ||
401 | +#endif | ||
402 | +#include "versal-ps-iou-alt.dtsi" | ||
403 | +#include "versal-virtio-mmio.dtsi" | ||
404 | +#include "versal-boot-init.dtsi" | ||
405 | +#include "versal-gty.dtsi" | ||
406 | +#include "versal-silicon-freq.dtsi" | ||
407 | + | ||
408 | +/ { | ||
409 | +#ifdef MULTI_ARCH | ||
410 | + ps_pmc_rp: ps_pmc_rp@0 { | ||
411 | + doc-status = "complete"; | ||
412 | + doc-name = "Remote-port PMC"; | ||
413 | + doc-subdtb = "board-versal-pmc-virt.dtb"; | ||
414 | + compatible = "remote-port"; | ||
415 | + chrdev-id = "ps-pmc-rp"; | ||
416 | + }; | ||
417 | + pmc_ppu0: rp_pmc_ppu0@0 { | ||
418 | + compatible = "remote-port-gpio"; | ||
419 | + remote-ports = <&ps_pmc_rp 1>; | ||
420 | + #interrupt-cells = <1>; | ||
421 | + interrupt-controller; | ||
422 | + }; | ||
423 | + pmc_ppu1: rp_pmc_ppu1@0 { | ||
424 | + compatible = "remote-port-gpio"; | ||
425 | + remote-ports = <&ps_pmc_rp 2>; | ||
426 | + #interrupt-cells = <1>; | ||
427 | + interrupt-controller; | ||
428 | + }; | ||
429 | + rp_pmc_global: rp_pmc_global@0 { | ||
430 | + compatible = "remote-port-gpio"; | ||
431 | + remote-ports = <&ps_pmc_rp 3>; | ||
432 | + gpio-controller; | ||
433 | + #gpio-cells = <1>; | ||
434 | + num-gpios = <16>; | ||
435 | + | ||
436 | + /* We only need to proxy GPIO 1 and 2 (PPU1 RST and WAKE). */ | ||
437 | + gpios = < &dummy1 0 | ||
438 | + &pmc_global 1 | ||
439 | + &pmc_global 2 >; | ||
440 | + }; | ||
441 | + rp_lmb_pmc_ppu0: rp_lmb_pmc_ppu0@0 { | ||
442 | + compatible = "remote-port-memory-slave"; | ||
443 | + remote-ports = <&ps_pmc_rp 4>; | ||
444 | + mr = <&lmb_pmc_ppu0>; | ||
445 | + }; | ||
446 | + rp_lmb_pmc_ppu1: rp_lmb_pmc_ppu1@0 { | ||
447 | + compatible = "remote-port-memory-slave"; | ||
448 | + remote-ports = <&ps_pmc_rp 5>; | ||
449 | + mr = <&lmb_pmc_ppu1>; | ||
450 | + }; | ||
451 | + rp_crl: rp_crl@0 { | ||
452 | + compatible = "remote-port-gpio"; | ||
453 | + remote-ports = <&ps_pmc_rp 6>; | ||
454 | + gpio-controller; | ||
455 | + #gpio-cells = <1>; | ||
456 | + num-gpios = <35>; | ||
457 | + | ||
458 | + gpios = < | ||
459 | + &crl 0 | ||
460 | + &crl 1 | ||
461 | + &crl 2 | ||
462 | + &crl 3 | ||
463 | + &crl 4 | ||
464 | + &crl 5 | ||
465 | + &crl 6 | ||
466 | + &crl 7 | ||
467 | + &crl 8 | ||
468 | + &crl 9 | ||
469 | + &crl 10 | ||
470 | + &crl 11 | ||
471 | + &crl 12 | ||
472 | + &crl 13 | ||
473 | + &crl 14 | ||
474 | + &crl 15 | ||
475 | + &crl 16 | ||
476 | + &crl 17 | ||
477 | + &crl 18 | ||
478 | + &crl 19 | ||
479 | + &crl 20 | ||
480 | + &crl 21 | ||
481 | + &crl 22 | ||
482 | + &crl 23 | ||
483 | + &crl 24 | ||
484 | + &crl 25 | ||
485 | + &crl 26 | ||
486 | + &crl 27 | ||
487 | + &crl 28 | ||
488 | + &crl 29 | ||
489 | + &crl 30 | ||
490 | + &crl 31 | ||
491 | + &dummy1 0 | ||
492 | + &dummy1 0 | ||
493 | + &crl 34 >; | ||
494 | + }; | ||
495 | + rp_pmc_clk_rst: rp_pmc_clk_rst@0 { | ||
496 | + compatible = "remote-port-gpio"; | ||
497 | + remote-ports = <&ps_pmc_rp 7>; | ||
498 | + gpio-controller; | ||
499 | + #gpio-cells = <1>; | ||
500 | + num-gpios = <30>; | ||
501 | + | ||
502 | + gpios = < &pmc_clk_rst 0 &pmc_clk_rst 1 | ||
503 | + &pmc_clk_rst 2 &pmc_clk_rst 3 | ||
504 | + &pmc_clk_rst 4 &pmc_clk_rst 5 | ||
505 | + &pmc_clk_rst 6 &pmc_clk_rst 7 | ||
506 | + &pmc_clk_rst 8 &pmc_clk_rst 9 | ||
507 | + &pmc_clk_rst 10 &pmc_clk_rst 11 | ||
508 | + &pmc_clk_rst 12 &pmc_clk_rst 13 | ||
509 | + &pmc_clk_rst 14 &pmc_clk_rst 15 | ||
510 | + &pmc_clk_rst 16 &pmc_clk_rst 17 | ||
511 | + &pmc_clk_rst 18 &pmc_clk_rst 19 | ||
512 | + &pmc_clk_rst 20 &pmc_clk_rst 21 | ||
513 | + &pmc_clk_rst 22 &pmc_clk_rst 23 | ||
514 | + &pmc_clk_rst 24 &pmc_clk_rst 25 | ||
515 | + &pmc_clk_rst 26 &pmc_clk_rst 27 | ||
516 | + &pmc_clk_rst 28 &pmc_clk_rst 29 | ||
517 | + >; | ||
518 | + }; | ||
519 | + psm0: rp_psm0@0 { | ||
520 | + compatible = "remote-port-gpio"; | ||
521 | + remote-ports = <&ps_pmc_rp 8>; | ||
522 | + #interrupt-cells = <1>; | ||
523 | + interrupt-controller; | ||
524 | + }; | ||
525 | +#ifdef MM_NPI_DDRMC_MAIN_0 | ||
526 | + ddrmc_ub0: rp_ddrmc@0 { | ||
527 | + compatible = "remote-port-gpio"; | ||
528 | + remote-ports = <&ps_pmc_rp 9>; | ||
529 | + #interrupt-cells = <1>; | ||
530 | + interrupt-controller; | ||
531 | + }; | ||
532 | + rp_npi_ddrmc_ub0: rp_npi_ddrmc_ub@0 { | ||
533 | + compatible = "remote-port-gpio"; | ||
534 | + remote-ports = <&ps_pmc_rp 11>; | ||
535 | + gpios = < &npi_ddrmc_ub0 0 >; | ||
536 | + }; | ||
537 | +#endif | ||
538 | +#ifdef MM_NPI_DDRMC_MAIN_1 | ||
539 | + ddrmc_ub1: rp_ddrmc@1 { | ||
540 | + compatible = "remote-port-gpio"; | ||
541 | + remote-ports = <&ps_pmc_rp 10>; | ||
542 | + #interrupt-cells = <1>; | ||
543 | + interrupt-controller; | ||
544 | + }; | ||
545 | + rp_npi_ddrmc_ub1: rp_npi_ddrmc_ub@1 { | ||
546 | + compatible = "remote-port-gpio"; | ||
547 | + remote-ports = <&ps_pmc_rp 12>; | ||
548 | + gpios = < &npi_ddrmc_ub1 0 >; | ||
549 | + }; | ||
550 | +#endif | ||
551 | + rp_lmb_psm: rp_lmb_psm@0 { | ||
552 | + compatible = "remote-port-memory-slave"; | ||
553 | + remote-ports = <&ps_pmc_rp 13>; | ||
554 | + mr = <&lmb_psm>; | ||
555 | + }; | ||
556 | + | ||
557 | +#define RPU_INTC_REDIRECT(NCPU, PSMOUT, RPUN) \ | ||
558 | +glue(rpu_intc_redirect_, NCPU): glue(rpu_intc_redirect, NCPU)@NCPU { \ | ||
559 | + #interrupt-cells = <1>; \ | ||
560 | + compatible = "xlnx,zynqmp-intc-redirect"; \ | ||
561 | + interrupt-controller; \ | ||
562 | + interrupts-extended = <glue(&rpu_cpu,NCPU) 0>; \ | ||
563 | + gpios = <&psm_global PSMOUT &rpu_ctrl RPUN>; \ | ||
564 | +}; | ||
565 | + | ||
566 | + amba_rpu: amba_rpu@0 { | ||
567 | + RPU_INTC_REDIRECT(0, 4, 6) | ||
568 | + RPU_INTC_REDIRECT(1, 5, 7) | ||
569 | + }; | ||
570 | + | ||
571 | +#else | ||
572 | + /* Single ARCH PS board has no PPU MicroBlazes. */ | ||
573 | + pmc_ppu0: dummy_ppu0@0 { | ||
574 | + #interrupt-cells = <1>; | ||
575 | + }; | ||
576 | + pmc_ppu1: dummy_ppu1@0 { | ||
577 | + #interrupt-cells = <1>; | ||
578 | + }; | ||
579 | + psm0: dummy_ppu0@0 { | ||
580 | + #interrupt-cells = <1>; | ||
581 | + }; | ||
582 | + ddrmc_ub0: dummy_ddrmc0@0 { | ||
583 | + #interrupt-cells = <1>; | ||
584 | + }; | ||
585 | + ddrmc_ub1: dummy_ddrmc1@0 { | ||
586 | + #interrupt-cells = <1>; | ||
587 | + }; | ||
588 | +#endif | ||
589 | + | ||
590 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
591 | + MEM_REGION(ddr, 0x0, MM_TOP_DDR, 0x00000000, MM_TOP_DDR_SIZE, &ddr_mem) // 2 GB | ||
592 | + MEM_SPEC(ddr_2, MM_TOP_DDR_2_H, MM_TOP_DDR_2_L, MM_TOP_DDR_2, | ||
593 | + MM_TOP_DDR_2_SIZE_H, MM_TOP_DDR_2_SIZE_L, &ddr_2_mem) // 32 GB | ||
594 | + mdio0: mdio { | ||
595 | + #address-cells = <1>; | ||
596 | + #size-cells = <0>; | ||
597 | + #priority-cells = <0>; | ||
598 | + compatible="mdio"; | ||
599 | + phy0: phy@1 { | ||
600 | + compatible = "dp83867"; | ||
601 | + device_type = "ethernet-phy"; | ||
602 | + reg = <1>; | ||
603 | + }; | ||
604 | + phy1: phy@2 { | ||
605 | + compatible = "88e1118r"; | ||
606 | + device_type = "ethernet-phy"; | ||
607 | + reg = <2>; | ||
608 | + }; | ||
609 | + }; | ||
610 | +}; | ||
611 | + | ||
612 | +/* | ||
613 | + * One flash for each SPI-master to match prebuilt system.dtb in BSP | ||
614 | + * xilinx-versal-virt-2019.1 | ||
615 | + */ | ||
616 | +#define BDEV_SPI_FLASH(_NAME, _COMPAT, _SIZEM, _REGVAL) \ | ||
617 | +_NAME: _NAME@0 { \ | ||
618 | + #address-cells = <1>; \ | ||
619 | + #size-cells = <1>; \ | ||
620 | + #priority-cells = <0>; \ | ||
621 | + #bus-cells = <1>; \ | ||
622 | + compatible = _COMPAT, "st,m25p80"; \ | ||
623 | + spi-max-frequency = <50000000>; \ | ||
624 | + reg = <_REGVAL>; \ | ||
625 | + blockdev-node-name = #_NAME; \ | ||
626 | + _NAME@0x00000000 { \ | ||
627 | + label = #_NAME; \ | ||
628 | + reg = <0x00000000 _SIZEM>; \ | ||
629 | + }; \ | ||
630 | +}; | ||
631 | + | ||
632 | +&spi0 { | ||
633 | + BDEV_SPI_FLASH(spi0_flash0, "m25p80", 0x00100000, 0x0 0x0) | ||
634 | +}; | ||
635 | + | ||
636 | +&spi1 { | ||
637 | + BDEV_SPI_FLASH(spi1_flash0, "m25p80", 0x00100000, 0x0 0x0) | ||
638 | +}; | ||
639 | + | ||
640 | +/* | ||
641 | + * Use 2Gbit QSPI flashes to allow verification of Image-searching | ||
642 | + * in ROM upto 256MB. | ||
643 | + */ | ||
644 | +#define DI_SPI_FLASH(_DI, _NAME, _COMPAT, _SIZEM, _REGVAL) \ | ||
645 | +_NAME: _NAME@0 { \ | ||
646 | + #address-cells = <1>; \ | ||
647 | + #size-cells = <1>; \ | ||
648 | + #priority-cells = <0>; \ | ||
649 | + #bus-cells = <1>; \ | ||
650 | + compatible = _COMPAT, "st,m25p80"; \ | ||
651 | + spi-max-frequency = <50000000>; \ | ||
652 | + reg = <_REGVAL>; \ | ||
653 | + drive-index = <_DI>; \ | ||
654 | + _NAME@0x00000000 { \ | ||
655 | + label = #_NAME; \ | ||
656 | + reg = <0x00000000 _SIZEM>; \ | ||
657 | + }; \ | ||
658 | +}; | ||
659 | + | ||
660 | +&pmc_qspi_0 { | ||
661 | + DI_SPI_FLASH(0, qspi_flash_lcs_lb, "m25qu02gcbb", 0x02000000, 0x0 0x0) | ||
662 | + DI_SPI_FLASH(1, qspi_flash_lcs_ub, "m25qu02gcbb", 0x02000000, 0x2 0x1) | ||
663 | + DI_SPI_FLASH(2, qspi_flash_ucs_lb, "m25qu02gcbb", 0x02000000, 0x1 0x0) | ||
664 | + DI_SPI_FLASH(3, qspi_flash_ucs_ub, "m25qu02gcbb", 0x02000000, 0x3 0x1) | ||
665 | +}; | ||
666 | + | ||
667 | +&ospi { | ||
668 | + DI_SPI_FLASH(4, ospi_flash_lcs_lb, "mt35xu01gbba", 0x02000000, 0x0 0x0) | ||
669 | + DI_SPI_FLASH(5, ospi_flash_lcs_ub, "mt35xu01gbba", 0x02000000, 0x1 0x0) | ||
670 | + DI_SPI_FLASH(6, ospi_flash_ucs_lb, "mt35xu01gbba", 0x02000000, 0x2 0x0) | ||
671 | + DI_SPI_FLASH(7, ospi_flash_ucs_ub, "mt35xu01gbba", 0x02000000, 0x3 0x0) | ||
672 | +}; | ||
673 | + | ||
674 | +&gem0 { | ||
675 | + mdio = <&mdio0>; | ||
676 | +}; | ||
677 | + | ||
678 | +&gem1 { | ||
679 | + mdio = <&mdio0>; | ||
680 | +}; | ||
681 | + | ||
682 | +&pmc_tap { | ||
683 | + /* | ||
684 | + * Default device: xcvc1902 | ||
685 | + */ | ||
686 | + idcode = <0x14CA8093>; | ||
687 | +}; | ||
688 | +#endif | ||
689 | diff --git a/versal-pmc-alt.dtsi b/versal-pmc-alt.dtsi | ||
690 | new file mode 100644 | ||
691 | index 00000000..8236911b | ||
692 | --- /dev/null | ||
693 | +++ b/versal-pmc-alt.dtsi | ||
694 | @@ -0,0 +1,40 @@ | ||
695 | +/* | ||
696 | + * Versal PMC | ||
697 | + * | ||
698 | + * Copyright (c) 2016, Xilinx Inc. | ||
699 | + * All rights reserved. | ||
700 | + * | ||
701 | + * Redistribution and use in source and binary forms, with or without | ||
702 | + * modification, are permitted provided that the following conditions are met: | ||
703 | + * * Redistributions of source code must retain the above copyright | ||
704 | + * notice, this list of conditions and the following disclaimer. | ||
705 | + * * Redistributions in binary form must reproduce the above copyright | ||
706 | + * notice, this list of conditions and the following disclaimer in the | ||
707 | + * documentation and/or other materials provided with the distribution. | ||
708 | + * * Neither the name of the <organization> nor the | ||
709 | + * names of its contributors may be used to endorse or promote products | ||
710 | + * derived from this software without specific prior written permission. | ||
711 | + * | ||
712 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
713 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
714 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
715 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
716 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
717 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
718 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
719 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
720 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
721 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
722 | + */ | ||
723 | + | ||
724 | +#include "versal.dtsh" | ||
725 | + | ||
726 | +#include "versal-icnt.dtsi" | ||
727 | +#include "versal-rams.dtsi" | ||
728 | +#include "versal-pmc-ppu-alt.dtsi" | ||
729 | +#include "versal-pmc-iou.dtsi" | ||
730 | +#include "versal-pmc-sys.dtsi" | ||
731 | +#include "versal-pmc-sec.dtsi" | ||
732 | +#include "versal-pmc-npi.dtsi" | ||
733 | +#include "versal-pmc-pl.dtsi" | ||
734 | +#include "versal-pmc-bat.dtsi" | ||
735 | diff --git a/versal-pmc-ppu-alt.dtsi b/versal-pmc-ppu-alt.dtsi | ||
736 | new file mode 100644 | ||
737 | index 00000000..726413f4 | ||
738 | --- /dev/null | ||
739 | +++ b/versal-pmc-ppu-alt.dtsi | ||
740 | @@ -0,0 +1,252 @@ | ||
741 | +/* | ||
742 | + * Versal PMC PPU block | ||
743 | + * | ||
744 | + * Copyright (c) 2016, Xilinx Inc. | ||
745 | + * All rights reserved. | ||
746 | + * | ||
747 | + * Redistribution and use in source and binary forms, with or without | ||
748 | + * modification, are permitted provided that the following conditions are met: | ||
749 | + * * Redistributions of source code must retain the above copyright | ||
750 | + * notice, this list of conditions and the following disclaimer. | ||
751 | + * * Redistributions in binary form must reproduce the above copyright | ||
752 | + * notice, this list of conditions and the following disclaimer in the | ||
753 | + * documentation and/or other materials provided with the distribution. | ||
754 | + * * Neither the name of the <organization> nor the | ||
755 | + * names of its contributors may be used to endorse or promote products | ||
756 | + * derived from this software without specific prior written permission. | ||
757 | + * | ||
758 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
759 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
760 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
761 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
762 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
763 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
764 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
765 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
766 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
767 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
768 | + */ | ||
769 | + | ||
770 | +#include "versal.dtsh" | ||
771 | + | ||
772 | +#define CREATE_PPU_IOMOD(X) \ | ||
773 | + pmc_ppu ## X ## _io_module: io-module@00 { \ | ||
774 | + doc-status = "complete"; \ | ||
775 | + #address-cells = <2>; \ | ||
776 | + #size-cells = <1>; \ | ||
777 | + #priority-cells = <0>; \ | ||
778 | + compatible = "xlnx,iomodule-1.02.a", "syscon", "simple-bus"; \ | ||
779 | + container = <&lmb_pmc_ppu ## X>; \ | ||
780 | + priority = <0xffffffff>; \ | ||
781 | + xlnx,freq = <0x47868c0>; \ | ||
782 | + xlnx,instance = "iomodule_1"; \ | ||
783 | + xlnx,io-mask = <0xfffe0000>; \ | ||
784 | + xlnx,lmb-awidth = <0x20>; \ | ||
785 | + xlnx,lmb-dwidth = <0x20>; \ | ||
786 | + xlnx,mask = <0xffffff80>; \ | ||
787 | + xlnx,use-io-bus = <0x1>; \ | ||
788 | + \ | ||
789 | + pmc_ppu ## X ## _io_intc: pmc_ppu ## X ## _intc@0C { \ | ||
790 | + #interrupt-cells = <1>; \ | ||
791 | + compatible = "xlnx,io-intc-1.02.a", "xlnx,io_intc"; \ | ||
792 | + interrupt-controller ; \ | ||
793 | + interrupts-extended = <&pmc_ppu ## X 0>; \ | ||
794 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(0C) 0x4 0x0 MM_PMC_PPU ## X ## _IOM(30) 0x10 0x0 MM_PMC_PPU ## X ## _IOM(80) 0x7C>; \ | ||
795 | + xlnx,intc-addr-width = <0x20>; \ | ||
796 | + xlnx,intc-base-vectors = <0x0>; \ | ||
797 | + xlnx,intc-has-fast = <0x0>; \ | ||
798 | + xlnx,intc-intr-size = <0x10>; \ | ||
799 | + xlnx,intc-level-edge = <0x0>; \ | ||
800 | + xlnx,intc-positive = <0xffff>; \ | ||
801 | + xlnx,intc-use-ext-intr = <0x1>; \ | ||
802 | + }; \ | ||
803 | + \ | ||
804 | + pmc_ppu ## X ## _io_gpi1: pmc_ppu ## X ## _gpi@20 { \ | ||
805 | + #gpio-cells = <1>; \ | ||
806 | + gpio-controller; \ | ||
807 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
808 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
809 | + interrupts = <11>; \ | ||
810 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(20) 0x4>; \ | ||
811 | + xlnx,gpi-interrupt = <0x1>; \ | ||
812 | + xlnx,gpi-size = <0x20>; \ | ||
813 | + xlnx,use-gpi = <0x1>; \ | ||
814 | + }; \ | ||
815 | + pmc_ppu ## X ## _io_gpi2: pmc_ppu ## X ## _gpi@24 { \ | ||
816 | + #gpio-cells = <1>; \ | ||
817 | + gpio-controller; \ | ||
818 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
819 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
820 | + interrupts = <12>; \ | ||
821 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(24) 0x4>; \ | ||
822 | + xlnx,gpi-interrupt = <0x1>; \ | ||
823 | + xlnx,gpi-size = <0x20>; \ | ||
824 | + xlnx,use-gpi = <0x1>; \ | ||
825 | + }; \ | ||
826 | + pmc_ppu ## X ## _io_gpi3: pmc_ppu ## X ## _gpi@28 { \ | ||
827 | + #gpio-cells = <1>; \ | ||
828 | + gpio-controller; \ | ||
829 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
830 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
831 | + interrupts = <13>; \ | ||
832 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(28) 0x4>; \ | ||
833 | + xlnx,gpi-interrupt = <0x1>; \ | ||
834 | + xlnx,gpi-size = <0x20>; \ | ||
835 | + xlnx,use-gpi = <0x1>; \ | ||
836 | + }; \ | ||
837 | + pmc_ppu ## X ## _io_gpi4: pmc_ppu ## X ## _gpi@2c { \ | ||
838 | + #gpio-cells = <1>; \ | ||
839 | + gpio-controller; \ | ||
840 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
841 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
842 | + interrupts = <14>; \ | ||
843 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(2c) 0x4>; \ | ||
844 | + xlnx,gpi-interrupt = <0x1>; \ | ||
845 | + xlnx,gpi-size = <0x20>; \ | ||
846 | + xlnx,use-gpi = <0x1>; \ | ||
847 | + }; \ | ||
848 | + \ | ||
849 | + pmc_ppu ## X ## _io_gpo1: pmc_ppu ## X ## _gpo@10 { \ | ||
850 | + #gpio-cells = <1>; \ | ||
851 | + gpio-controller; \ | ||
852 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
853 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(10) 0x4>; \ | ||
854 | + xlnx,gpo-init = <0x0>; \ | ||
855 | + xlnx,gpo-size = <0x9>; \ | ||
856 | + xlnx,use-gpo = <0x1>; \ | ||
857 | + }; \ | ||
858 | + pmc_ppu ## X ## _io_gpo2: pmc_ppu ## X ## _gpo@14 { \ | ||
859 | + #gpio-cells = <1>; \ | ||
860 | + gpio-controller; \ | ||
861 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
862 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(14) 0x4>; \ | ||
863 | + xlnx,gpo-init = <0x0>; \ | ||
864 | + xlnx,gpo-size = <0x20>; \ | ||
865 | + xlnx,use-gpo = <0x1>; \ | ||
866 | + }; \ | ||
867 | + pmc_ppu ## X ## _io_gpo3: pmc_ppu ## X ## _gpo@18 { \ | ||
868 | + #gpio-cells = <1>; \ | ||
869 | + gpio-controller; \ | ||
870 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
871 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(18) 0x4>; \ | ||
872 | + xlnx,gpo-init = <0x0>; \ | ||
873 | + xlnx,gpo-size = <0x20>; \ | ||
874 | + xlnx,use-gpo = <0x1>; \ | ||
875 | + }; \ | ||
876 | + pmc_ppu ## X ## _io_gpo4: pmc_ppu ## X ## _gpo@1c { \ | ||
877 | + #gpio-cells = <1>; \ | ||
878 | + gpio-controller; \ | ||
879 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
880 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(1c) 0x4>; \ | ||
881 | + xlnx,gpo-init = <0x0>; \ | ||
882 | + xlnx,gpo-size = <0x20>; \ | ||
883 | + xlnx,use-gpo = <0x1>; \ | ||
884 | + }; \ | ||
885 | + \ | ||
886 | + pmc_ppu ## X ## _io_pit1: pmc_ppu ## X ## _pit@40 { \ | ||
887 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
888 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
889 | + interrupts = <3>; \ | ||
890 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(40) 0xc>; \ | ||
891 | + xlnx,pit-interrupt = <0x1>; \ | ||
892 | + xlnx,pit-prescaler = <0x9>; \ | ||
893 | + xlnx,pit-readable = <0x1>; \ | ||
894 | + xlnx,pit-size = <0x20>; \ | ||
895 | + xlnx,use-pit = <0x1>; \ | ||
896 | + frequency = <460000000>; \ | ||
897 | + gpios = <&pmc_ppu ## X ## _io_gpo1 1 &pmc_ppu ## X ## _io_pit2 0>; \ | ||
898 | + gpio-names = "ps_config","ps_hit_in"; \ | ||
899 | + gpio-controller; \ | ||
900 | + #gpio-cells = <1>; \ | ||
901 | + }; \ | ||
902 | + pmc_ppu ## X ## _io_pit2: pmc_ppu ## X ## _pit@50 { \ | ||
903 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
904 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
905 | + interrupts = <4>; \ | ||
906 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(50) 0xc>; \ | ||
907 | + xlnx,pit-interrupt = <0x1>; \ | ||
908 | + xlnx,pit-prescaler = <0x9>; \ | ||
909 | + xlnx,pit-readable = <0x1>; \ | ||
910 | + xlnx,pit-size = <0x20>; \ | ||
911 | + xlnx,use-pit = <0x1>; \ | ||
912 | + frequency = <460000000>; \ | ||
913 | + gpio-controller; \ | ||
914 | + #gpio-cells = <1>; \ | ||
915 | + }; \ | ||
916 | + pmc_ppu ## X ## _io_pit3: pmc_ppu ## X ## _pit@60 { \ | ||
917 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
918 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
919 | + interrupts = <5>; \ | ||
920 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(60) 0xc>; \ | ||
921 | + xlnx,pit-interrupt = <0x1>; \ | ||
922 | + xlnx,pit-prescaler = <0x9>; \ | ||
923 | + xlnx,pit-readable = <0x1>; \ | ||
924 | + xlnx,pit-size = <0x20>; \ | ||
925 | + xlnx,use-pit = <0x1>; \ | ||
926 | + frequency = <460000000>; \ | ||
927 | + gpios = <&pmc_ppu ## X ## _io_gpo1 6 &pmc_ppu ## X ## _io_pit4 0>; \ | ||
928 | + gpio-names = "ps_config","ps_hit_in"; \ | ||
929 | + gpio-controller; \ | ||
930 | + #gpio-cells = <1>; \ | ||
931 | + }; \ | ||
932 | + pmc_ppu ## X ## _io_pit4: pmc_ppu ## X ## _pit@70 { \ | ||
933 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
934 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
935 | + interrupts = <6>; \ | ||
936 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(70) 0xc>; \ | ||
937 | + xlnx,pit-interrupt = <0x1>; \ | ||
938 | + xlnx,pit-prescaler = <0x9>; \ | ||
939 | + xlnx,pit-readable = <0x1>; \ | ||
940 | + xlnx,pit-size = <0x20>; \ | ||
941 | + xlnx,use-pit = <0x1>; \ | ||
942 | + frequency = <460000000>; \ | ||
943 | + gpio-controller; \ | ||
944 | + #gpio-cells = <1>; \ | ||
945 | + }; \ | ||
946 | + } | ||
947 | + | ||
948 | +/ { | ||
949 | + /* MDM UARTs. We put them here for instantiation ordering purposes | ||
950 | + * making sure that -serial command line options refer to these | ||
951 | + * first. | ||
952 | + */ | ||
953 | + ppu0_mdm_uart@MM_PMC_PPU0_MDM_HSD { | ||
954 | + doc-status = "complete"; | ||
955 | + compatible = "xlnx,xps-uartlite"; | ||
956 | + reg-extended = <&lmb_pmc_ppu0 0x0 MM_PMC_PPU0_MDM_HSD 0x0 0x10 0x1>; | ||
957 | + chardev = "serial2"; | ||
958 | + }; | ||
959 | + | ||
960 | + ppu1_mdm_uart@MM_PMC_PPU1_MDM_HSD { | ||
961 | + doc-status = "complete"; | ||
962 | + compatible = "xlnx,xps-uartlite"; | ||
963 | + reg-extended = <&lmb_pmc_ppu1 0x0 MM_PMC_PPU1_MDM_HSD 0x0 0x10 0x1>; | ||
964 | + chardev = "serial3"; | ||
965 | + }; | ||
966 | +}; | ||
967 | + | ||
968 | +&lmb_pmc_ppu0 { | ||
969 | + doc-name = "LMB PPU0"; | ||
970 | + doc-status = "complete"; | ||
971 | + CREATE_PPU_IOMOD(0); | ||
972 | +}; | ||
973 | + | ||
974 | +&lmb_pmc_ppu1 { | ||
975 | + doc-name = "LMB PPU1"; | ||
976 | + doc-status = "complete"; | ||
977 | + CREATE_PPU_IOMOD(1); | ||
978 | +}; | ||
979 | + | ||
980 | +&amba_pmc_ppu { | ||
981 | + pmc_gic_proxy: pmc_gic_proxy@0 { | ||
982 | + doc-status = "complete"; | ||
983 | + #interrupt-cells = <3>; | ||
984 | + interrupt-controller; | ||
985 | + | ||
986 | + compatible = "xlnx,zynqmp-gicp"; | ||
987 | + reg = <0x0 MM_PMC_GIC_PROXY 0x0 MM_PMC_GIC_PROXY_SIZE 0x0>; | ||
988 | + interrupt-parent = <&pmc_ppu1_io_intc>; | ||
989 | + interrupts = <IRQ_PPU1_INTC_PMC_GICP>; | ||
990 | + }; | ||
991 | +}; | ||
992 | + | ||
993 | diff --git a/versal-ps-iou-alt.dtsi b/versal-ps-iou-alt.dtsi | ||
994 | new file mode 100644 | ||
995 | index 00000000..a6c22b86 | ||
996 | --- /dev/null | ||
997 | +++ b/versal-ps-iou-alt.dtsi | ||
998 | @@ -0,0 +1,467 @@ | ||
999 | +/* | ||
1000 | + * Versal PS IOU | ||
1001 | + * | ||
1002 | + * Copyright (C) 2016-2022, Xilinx, Inc. | ||
1003 | + * Copyright (C) 2023, Advanced Micro Devices, Inc. | ||
1004 | + * All rights reserved. | ||
1005 | + * | ||
1006 | + * Redistribution and use in source and binary forms, with or without | ||
1007 | + * modification, are permitted provided that the following conditions are met: | ||
1008 | + * * Redistributions of source code must retain the above copyright | ||
1009 | + * notice, this list of conditions and the following disclaimer. | ||
1010 | + * * Redistributions in binary form must reproduce the above copyright | ||
1011 | + * notice, this list of conditions and the following disclaimer in the | ||
1012 | + * documentation and/or other materials provided with the distribution. | ||
1013 | + * * Neither the name of the <organization> nor the | ||
1014 | + * names of its contributors may be used to endorse or promote products | ||
1015 | + * derived from this software without specific prior written permission. | ||
1016 | + * | ||
1017 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
1018 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
1019 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
1020 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
1021 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
1022 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
1023 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
1024 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
1025 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
1026 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
1027 | + */ | ||
1028 | + | ||
1029 | +#include "versal.dtsh" | ||
1030 | + | ||
1031 | +#define GEM(g_name, g_base, g_size, g_dma, g_irq, rst_idx, pwr_idx) \ | ||
1032 | +g_name: ethernet@g_base { \ | ||
1033 | + #address-cells = <1>; \ | ||
1034 | + #size-cells = <0>; \ | ||
1035 | + #priority-cells = <0>; \ | ||
1036 | + compatible = "cdns,gem"; \ | ||
1037 | + interrupts = <g_irq g_irq>; \ | ||
1038 | + dma = <g_dma>; \ | ||
1039 | + memattr = <& ## g_name ## _memattr_smid>; \ | ||
1040 | + memattr-write = <& ## g_name ## _w_memattr_smid>; \ | ||
1041 | + reg = <0x0 g_base 0x0 g_size 0x0>; \ | ||
1042 | + num-priority-queues = <2>; \ | ||
1043 | + reset-gpios = <&crl rst_idx>; \ | ||
1044 | + power-gpios = <&psm_local pwr_idx>; \ | ||
1045 | +} | ||
1046 | + | ||
1047 | +// FIXME: Add support for SMIDs | ||
1048 | +#define ZDMA_CHANNEL(zname, zdomain, zbase, zirq, zbuswidth, zdma, mid, num) \ | ||
1049 | +zname ## _mattr: zname ## mattr { \ | ||
1050 | + compatible = "qemu:memory-transaction-attr"; \ | ||
1051 | + requester-id = <mid>; \ | ||
1052 | +}; \ | ||
1053 | + \ | ||
1054 | +zname: dma-controller@zbase { \ | ||
1055 | + compatible = "xlnx,zdma"; \ | ||
1056 | + reg = <0x0 zbase 0x0 MM_ADMA_CH0_SIZE 0x0>; \ | ||
1057 | + bus-width = <zbuswidth>; \ | ||
1058 | + has-parity = <1>; \ | ||
1059 | + interrupts = <zirq>; \ | ||
1060 | + #stream-id-cells = <0x1>; \ | ||
1061 | + dma = <zdma>; \ | ||
1062 | + memattr = <& ## zname ## _mattr>; \ | ||
1063 | + reset-gpios = < &crl CRL_RST_ADMA >; \ | ||
1064 | + #gpio-cells = <1>; \ | ||
1065 | + gpio-names = "memattr-secure"; \ | ||
1066 | + gpios = <&lpd_slcr_secure num>; \ | ||
1067 | +} | ||
1068 | + | ||
1069 | +/* | ||
1070 | + * Our XRAM model only has the correctable interrupt line. | ||
1071 | + * All instances connect to a single line in the GIC. | ||
1072 | + * | ||
1073 | + * To support shared memories for co-sim, we provide the | ||
1074 | + * actual RAMs externally and not from the XRAMC model. | ||
1075 | + */ | ||
1076 | +#define XRAM_CTRL(n) xram_ctrl_ ## n { \ | ||
1077 | + compatible = "xlnx,versal-xramc"; \ | ||
1078 | + reg = <0x0 (MM_XRAM + 0x## n ##0000) 0 0x10000 0x0 >; \ | ||
1079 | + interrupts = <XRAM_IRQ_0>; \ | ||
1080 | + alloc-ram = <0>; \ | ||
1081 | +} | ||
1082 | + | ||
1083 | +&amba_fpd { | ||
1084 | +#ifdef MM_FPD_FPD_APU | ||
1085 | + apu_ctrl: apu_ctrl@MM_FPD_FPD_APU { | ||
1086 | + compatible = "xlnx,versal-apu-ctrl"; | ||
1087 | + reg = <0x0 MM_FPD_FPD_APU 0x0 MM_FPD_FPD_APU_SIZE 0x0>; | ||
1088 | + cpu0 = <&cpu0>; | ||
1089 | + cpu1 = <&cpu1>; | ||
1090 | + #gpio-cells = <1>; | ||
1091 | + }; | ||
1092 | +#endif | ||
1093 | + | ||
1094 | + afi_fm@MM_FPD_FPD_AFIFM0 { | ||
1095 | + compatible = "xlnx,versal-afi-fm"; | ||
1096 | + reg = <0x0 MM_FPD_FPD_AFIFM0 0x0 MM_FPD_FPD_AFIFM0_SIZE 0x0>; | ||
1097 | + }; | ||
1098 | + | ||
1099 | + afi_fm@MM_FPD_FPD_AFIFM2 { | ||
1100 | + compatible = "xlnx,versal-afi-fm"; | ||
1101 | + reg = <0x0 MM_FPD_FPD_AFIFM2 0x0 MM_FPD_FPD_AFIFM2_SIZE 0x0>; | ||
1102 | + }; | ||
1103 | + | ||
1104 | +#ifdef MM_FPD_FPD_GPCCI | ||
1105 | + cci_reg@MM_FPD_FPD_GPCCI { | ||
1106 | + compatible = "xlnx,cci_reg"; | ||
1107 | + reg = <0x0 MM_FPD_FPD_GPCCI 0x0 MM_FPD_FPD_MAINCCI_SIZE 0x0>; | ||
1108 | + }; | ||
1109 | +#endif | ||
1110 | + | ||
1111 | +#ifdef MM_FPD_FPD_MAINCCI | ||
1112 | + cci500@MM_FPD_FPD_MAINCCI { | ||
1113 | + compatible = "xlnx,cci500"; | ||
1114 | + reg = <0x0 MM_FPD_FPD_MAINCCI 0x0 MM_FPD_FPD_MAINCCI_SIZE 0x0>; | ||
1115 | + }; | ||
1116 | +#endif | ||
1117 | + | ||
1118 | + cpm_crcpm@MM_CPM_CPM_CRCPM { | ||
1119 | + compatible = "xlnx,versal_cpm_crcpm"; | ||
1120 | + reg = <0x0 MM_CPM_CPM_CRCPM 0x0 MM_CPM_CPM_CRCPM_SIZE 0x0>; | ||
1121 | + }; | ||
1122 | + | ||
1123 | + cpm_pcsr@MM_CPM_CPM_PCSR { | ||
1124 | + compatible = "xlnx,versal_cpm_pcsr"; | ||
1125 | + reg = <0x0 MM_CPM_CPM_PCSR 0x0 MM_CPM_CPM_PCSR_SIZE 0x0>; | ||
1126 | + }; | ||
1127 | + | ||
1128 | + cpm_slcr_secure@MM_CPM_CPM_SLCR_SECURE { | ||
1129 | + compatible = "xlnx.cpm_slcr_secure"; | ||
1130 | + reg = <0x0 MM_CPM_CPM_SLCR_SECURE 0x0 MM_CPM_CPM_SLCR_SECURE_SIZE 0x0>; | ||
1131 | + }; | ||
1132 | + | ||
1133 | + fpd_slcr@MM_FPD_FPD_SLCR { | ||
1134 | + compatible = "xlnx,versal-fpd-slcr"; | ||
1135 | + interrupts = <SLCR_FPD_APB_IRQ_0>; | ||
1136 | + reg = <0x0 MM_FPD_FPD_SLCR 0x0 MM_FPD_FPD_SLCR_SIZE 0x0>; | ||
1137 | + }; | ||
1138 | + | ||
1139 | + fpd_slcr_secure@MM_FPD_FPD_SLCR { | ||
1140 | + compatible = "xlnx,versal-fpd-slcr-secure"; | ||
1141 | + interrupts = <SLCR_SECURE_FPD_APB_IRQ_0>; | ||
1142 | + reg = <0x0 MM_FPD_FPD_SLCR_SECURE 0x0 MM_FPD_FPD_SLCR_SECURE_SIZE 0x0>; | ||
1143 | + }; | ||
1144 | + | ||
1145 | +#ifdef MM_FPD_FPD_WWDT | ||
1146 | + wwdt0: watchdog@MM_FPD_FPD_WWDT { | ||
1147 | + compatible = "xlnx,versal-wwdt"; | ||
1148 | + reg = <0x0 MM_FPD_FPD_WWDT 0x0 MM_FPD_FPD_WWDT_SIZE 0x0>; | ||
1149 | + /* IRQ order must match the QEMU model */ | ||
1150 | + interrupts = <FP_WDT_IRQ_0 | ||
1151 | + FPD_WWDT_RST_PENDING_IRQ_0 | ||
1152 | + FPD_GWDT_WS0_IRQ_0 | ||
1153 | + FPD_GWDT_WS1_IRQ_0>; | ||
1154 | + pclk = <100000000>; | ||
1155 | + reset-gpios = <&crf 27>; | ||
1156 | + }; | ||
1157 | +#endif | ||
1158 | +#ifdef MM_FPD_INTFPD_CONFIG | ||
1159 | + intfpd: intfpd@MM_FPD_INTFPD_CONFIG { | ||
1160 | + compatible = "xlnx-intfpd-config"; | ||
1161 | + reg = <0x0 MM_FPD_INTFPD_CONFIG 0x0 MM_FPD_INTFPD_CONFIG_SIZE 0x0>; | ||
1162 | + interrupts = < | ||
1163 | + #if FPD_APB_INT_IRQ_0 | ||
1164 | + FPD_APB_INT_IRQ_0 | ||
1165 | + #elif INT_FPD_IRQ_0 | ||
1166 | + INT_FPD_IRQ_0 | ||
1167 | + #endif | ||
1168 | + >; | ||
1169 | + }; | ||
1170 | +#endif | ||
1171 | +}; | ||
1172 | + | ||
1173 | +&amba_lpd { | ||
1174 | + GEM(gem0, MM_GEM0, MM_GEM0_SIZE, &smmu_tbu0, GEM0_IRQ_0, CRL_RST_GEM0, PLR_PWR_GEM0); | ||
1175 | + GEM(gem1, MM_GEM1, MM_GEM1_SIZE, &smmu_tbu0, GEM1_IRQ_0, CRL_RST_GEM1, PLR_PWR_GEM1); | ||
1176 | + | ||
1177 | + serial0: serial@MM_UART0 { | ||
1178 | + compatible = "pl011"; | ||
1179 | + interrupts = <UART0_IRQ_0>; | ||
1180 | + reg = <0x0 MM_UART0 0x0 MM_UART0_SIZE 0x0 >; | ||
1181 | + reset-gpios = < &crl CRL_RST_UART0 >; | ||
1182 | + chardev = "serial0"; | ||
1183 | + }; | ||
1184 | + serial1: serial@MM_UART1 { | ||
1185 | + compatible = "pl011"; | ||
1186 | + interrupts = <UART1_IRQ_0>; | ||
1187 | + reg = <0x0 MM_UART1 0x0 MM_UART1_SIZE 0x0 >; | ||
1188 | + reset-gpios = < &crl CRL_RST_UART1 >; | ||
1189 | + chardev = "serial1"; | ||
1190 | + }; | ||
1191 | + | ||
1192 | + canfdbus0: canfdbus@0 { | ||
1193 | + compatible = "can-bus"; | ||
1194 | + }; | ||
1195 | + | ||
1196 | + can0: can@MM_CANFD0 { | ||
1197 | + compatible = "xlnx,versal-canfd"; | ||
1198 | + rx-fifo0 = <0x40>; | ||
1199 | + rx-fifo1 = <0x40>; | ||
1200 | + enable-rx-fifo1 = <0x1>; | ||
1201 | + canfdbus = <&canfdbus0>; | ||
1202 | + interrupts = <CAN0_IRQ_0>; | ||
1203 | + reg = <0x0 MM_CANFD0 0x0 MM_CANFD0_SIZE 0x0>; | ||
1204 | + reset-gpios = <&crl CRL_RST_CAN0>; | ||
1205 | + }; | ||
1206 | + can1: can@MM_CANFD1 { | ||
1207 | + compatible = "xlnx,versal-canfd"; | ||
1208 | + rx-fifo0 = <0x40>; | ||
1209 | + rx-fifo1 = <0x40>; | ||
1210 | + enable-rx-fifo1 = <0x1>; | ||
1211 | + canfdbus = <&canfdbus0>; | ||
1212 | + interrupts = <CAN1_IRQ_0>; | ||
1213 | + reg = <0x0 MM_CANFD1 0x0 MM_CANFD1_SIZE 0x0>; | ||
1214 | + reset-gpios = <&crl CRL_RST_CAN1>; | ||
1215 | + }; | ||
1216 | + | ||
1217 | + crl: crl@MM_CRL { | ||
1218 | + compatible = "xlnx,versal-crl"; | ||
1219 | + reg = <0x0 MM_CRL 0x0 MM_CRL_SIZE 0x0>; | ||
1220 | + gpio-controller; | ||
1221 | + #gpio-cells = <1>; | ||
1222 | + }; | ||
1223 | + | ||
1224 | + lpd_iou_slcr: slcr@MM_LPD_IOU_SLCR { | ||
1225 | + compatible = "xlnx,versal-lpd-iou-slcr"; | ||
1226 | + reg = <0x0 MM_LPD_IOU_SLCR 0x0 MM_LPD_IOU_SLCR_SIZE 0x0>; | ||
1227 | + }; | ||
1228 | + | ||
1229 | +#ifdef MM_RPU | ||
1230 | + rpu_ctrl: rpu_ctrl@MM_RPU { | ||
1231 | + compatible = "xlnx,versal-rpu"; | ||
1232 | + reg-extended = <&amba_lpd 0x0 MM_RPU 0x0 MM_RPU_SIZE 0x0 | ||
1233 | + &amba_r5_0 0x0 0x0 0x0 0x80000 0x0 | ||
1234 | + &amba 0x0 MM_R5_0_ATCM 0x0 0x60000 0x0 | ||
1235 | + &amba_r5_1 0x0 0x0 0x0 0x80000 0x0 | ||
1236 | + &amba 0x0 0xFFE90000 0x0 0x50000 0x0>; | ||
1237 | + rpu0 = <&rpu_cpu0>; | ||
1238 | + rpu1 = <&rpu_cpu1>; | ||
1239 | + | ||
1240 | + gpio-controller; | ||
1241 | + #gpio-cells = <1>; | ||
1242 | + | ||
1243 | + gpios = < &crl CRL_RST_CPU_R5_0 &crl CRL_RST_CPU_R5_1 | ||
1244 | + &psm_local 42 &psm_local 43 | ||
1245 | + >; | ||
1246 | + }; | ||
1247 | +#endif | ||
1248 | + | ||
1249 | + ipi: ipi@MM_IPI { | ||
1250 | + compatible = "xlnx,versal-ipi"; | ||
1251 | + reg = <0x0 MM_IPI 0x0 MM_IPI_SIZE 0x0>; | ||
1252 | + | ||
1253 | + /* Interrupt ordering here needs to match | ||
1254 | + * QEMU's sysbus-irq output order. */ | ||
1255 | + interrupts = <IPI_PSM_IRQ_0 | ||
1256 | + IPI_PMC_IRQ_0 | ||
1257 | + IPI0_IRQ_0 IPI1_IRQ_0 | ||
1258 | + IPI2_IRQ_0 IPI3_IRQ_0 | ||
1259 | + IPI4_IRQ_0 IPI5_IRQ_0 | ||
1260 | + IPI6_IRQ_0 | ||
1261 | + IPI_PMC_NOBUF_IRQ_0 | ||
1262 | + IPI_APB_IRQ_0>; | ||
1263 | + reset-gpios = <&crl CRL_RST_IPI>; | ||
1264 | + }; | ||
1265 | + | ||
1266 | + spi0: spi@MM_SPI0 { | ||
1267 | + compatible = "cdns,spi-r1p6"; | ||
1268 | + interrupts = <SPI0_IRQ_0>; | ||
1269 | + num-ss-bits = <4>; | ||
1270 | + reg = <0x0 MM_SPI0 0x0 MM_SPI0_SIZE 0x0 >; | ||
1271 | + | ||
1272 | + #address-cells = <1>; /* For child; must match SPI_FLASH() */ | ||
1273 | + #size-cells = <0>; | ||
1274 | + #bus-cells = <1>; | ||
1275 | + reset-gpios = <&crl CRL_RST_SPI0>; | ||
1276 | + }; | ||
1277 | + spi1: spi@MM_SPI1 { | ||
1278 | + compatible = "cdns,spi-r1p6"; | ||
1279 | + interrupts = <SPI1_IRQ_0>; | ||
1280 | + num-ss-bits = <4>; | ||
1281 | + reg = <0x0 MM_SPI1 0x0 MM_SPI1_SIZE 0x0 >; | ||
1282 | + | ||
1283 | + #address-cells = <1>; /* For child; must match SPI_FLASH() */ | ||
1284 | + #size-cells = <0>; | ||
1285 | + #bus-cells = <1>; | ||
1286 | + reset-gpios = <&crl CRL_RST_SPI1>; | ||
1287 | + }; | ||
1288 | + | ||
1289 | + dwc3_0: usb2@USB2_0_XHCI { | ||
1290 | + compatible = "usb_dwc3"; | ||
1291 | + reg = <0x0 MM_USB_DWC3_0 0x0 MM_USB_DWC3_0_SIZE 0x0 0x0 MM_USB_XHCI 0x0 MM_USB_XHCI_SIZE 0x0>; | ||
1292 | + interrupts = <USB2_IRQ_0 USB2_IRQ_1 USB2_IRQ_2 USB2_IRQ_3>; | ||
1293 | + dma = <&smmu_tbu0>; | ||
1294 | + memattr = <&usb0_memattr>; | ||
1295 | + reset-gpios = <&crl CRL_RST_USB0>; | ||
1296 | + intrs = <4>; | ||
1297 | + slots = <2>; | ||
1298 | + }; | ||
1299 | + | ||
1300 | + ttc0: timer@MM_TTC0 { | ||
1301 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1302 | + interrupts = <TTC0_IRQ_0 TTC0_IRQ_1 TTC0_IRQ_2>; | ||
1303 | + reg = <0x0 MM_TTC0 0x0 MM_TTC0_SIZE 0x0>; | ||
1304 | + width = <32>; | ||
1305 | + reset-gpios = < &crl CRL_RST_TTC0 >; | ||
1306 | + }; | ||
1307 | + ttc1: timer@MM_TTC1 { | ||
1308 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1309 | + interrupts = <TTC1_IRQ_0 TTC1_IRQ_1 TTC1_IRQ_2>; | ||
1310 | + reg = <0x0 MM_TTC1 0x0 MM_TTC1_SIZE 0x0>; | ||
1311 | + width = <32>; | ||
1312 | + reset-gpios = < &crl CRL_RST_TTC1 >; | ||
1313 | + }; | ||
1314 | + ttc2: timer@MM_TTC2 { | ||
1315 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1316 | + interrupts = <TTC2_IRQ_0 TTC2_IRQ_1 TTC2_IRQ_2>; | ||
1317 | + reg = <0x0 MM_TTC2 0x0 MM_TTC2_SIZE 0x0>; | ||
1318 | + width = <32>; | ||
1319 | + reset-gpios = < &crl CRL_RST_TTC2 >; | ||
1320 | + }; | ||
1321 | + ttc3: timer@MM_TTC3 { | ||
1322 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1323 | + interrupts = <TTC3_IRQ_0 TTC3_IRQ_1 TTC3_IRQ_2>; | ||
1324 | + reg = <0x0 MM_TTC3 0x0 MM_TTC3_SIZE 0x0>; | ||
1325 | + width = <32>; | ||
1326 | + reset-gpios = < &crl CRL_RST_TTC3 >; | ||
1327 | + }; | ||
1328 | + | ||
1329 | + ZDMA_CHANNEL(adma0, adma, MM_ADMA_CH0, ADMA_IRQ_0, 128, &smmu_tbu0, SMID_DMA0_CH0, 0x0); | ||
1330 | + ZDMA_CHANNEL(adma1, adma, MM_ADMA_CH1, ADMA_IRQ_1, 128, &smmu_tbu0, SMID_DMA0_CH1, 0x1); | ||
1331 | + ZDMA_CHANNEL(adma2, adma, MM_ADMA_CH2, ADMA_IRQ_2, 128, &smmu_tbu0, SMID_DMA0_CH2, 0x2); | ||
1332 | + ZDMA_CHANNEL(adma3, adma, MM_ADMA_CH3, ADMA_IRQ_3, 128, &smmu_tbu0, SMID_DMA0_CH3, 0x3); | ||
1333 | + ZDMA_CHANNEL(adma4, adma, MM_ADMA_CH4, ADMA_IRQ_4, 128, &smmu_tbu0, SMID_DMA0_CH4, 0x4); | ||
1334 | + ZDMA_CHANNEL(adma5, adma, MM_ADMA_CH5, ADMA_IRQ_5, 128, &smmu_tbu0, SMID_DMA0_CH5, 0x5); | ||
1335 | + ZDMA_CHANNEL(adma6, adma, MM_ADMA_CH6, ADMA_IRQ_6, 128, &smmu_tbu0, SMID_DMA0_CH6, 0x6); | ||
1336 | + ZDMA_CHANNEL(adma7, adma, MM_ADMA_CH7, ADMA_IRQ_7, 128, &smmu_tbu0, SMID_DMA0_CH7, 0x7); | ||
1337 | + | ||
1338 | + afi_fm@MM_LPD_AFIFM4 { | ||
1339 | + compatible = "xlnx,versal-afi-fm"; | ||
1340 | + reg = <0x0 MM_LPD_AFIFM4 0x0 MM_LPD_AFIFM4_SIZE 0x0>; | ||
1341 | + }; | ||
1342 | + | ||
1343 | + lpd_i2c_wrapper { | ||
1344 | +#ifdef MM_PS_I2C0 | ||
1345 | + ps_i2c0: ps_i2c0@MM_PS_I2C0 { | ||
1346 | + #address-cells = <1>; | ||
1347 | + #size-cells = <0>; | ||
1348 | + compatible = "xlnx,ps7-i2c-1.00.a", "cdns,i2c-r1p10"; | ||
1349 | + interrupts = <I2C0_IRQ_0>; | ||
1350 | + reg-extended = <&amba_lpd 0x0 MM_PS_I2C0 0x0 MM_PS_I2C0_SIZE 0x0>; | ||
1351 | + reset-gpios = <&crl CRL_RST_I2C0>; | ||
1352 | + }; | ||
1353 | + ps_i2c1: ps_i2c0@MM_PS_I2C1 { | ||
1354 | + #address-cells = <1>; | ||
1355 | + #size-cells = <0>; | ||
1356 | + compatible = "xlnx,ps7-i2c-1.00.a", "cdns,i2c-r1p10"; | ||
1357 | + interrupts = <I2C1_IRQ_0>; | ||
1358 | + reg-extended = <&amba_lpd 0x0 MM_PS_I2C1 0x0 MM_PS_I2C1_SIZE 0x0>; | ||
1359 | + reset-gpios = <&crl CRL_RST_I2C1>; | ||
1360 | + }; | ||
1361 | +#endif | ||
1362 | + }; | ||
1363 | + | ||
1364 | + ocm_ctrl0: ocm_ctrl@OCM { | ||
1365 | + compatible = "xlnx,zynqmp-ocmc"; | ||
1366 | + interrupts = <OCMINTR_IRQ_0>; | ||
1367 | + memsize = <MM_OCM_MEM_SIZE>; | ||
1368 | + reg = <0x0 MM_OCM 0x0 MM_OCM_SIZE 0x0>; | ||
1369 | + reset-gpios = <&crl CRL_RST_OCM>; | ||
1370 | + }; | ||
1371 | + | ||
1372 | +#ifdef MM_XRAM_SLCR | ||
1373 | + xram_slcr@MM_XRAM_SLCR { | ||
1374 | + compatible = "xlnx,xram_slcr"; | ||
1375 | + reg = <0x0 MM_XRAM_SLCR 0x0 MM_XRAM_SLCR_SIZE 0x0>; | ||
1376 | + }; | ||
1377 | +#endif | ||
1378 | + | ||
1379 | + lpd_slcr@MM_LPD_SLCR { | ||
1380 | + compatible = "xlnx,versal-lpd-slcr"; | ||
1381 | + reg = <0x0 MM_LPD_SLCR 0x0 MM_LPD_SLCR_SIZE 0x0>; | ||
1382 | + }; | ||
1383 | + | ||
1384 | + lpd_slcr_secure: lpd_slcr_secure@MM_LPD_SLCR_SECURE { | ||
1385 | + compatible = "xlnx,versal-lpd-slcr-secure"; | ||
1386 | + reg = <0x0 MM_LPD_SLCR_SECURE 0x0 MM_LPD_SLCR_SECURE_SIZE 0x0>; | ||
1387 | + gpio-controller; | ||
1388 | + #gpio-cells = <1>; | ||
1389 | + }; | ||
1390 | + | ||
1391 | + lpd_iou_slcr_secure: lpd_iou_slcr_secure@MM_LPD_IOU_SECURE_SLCR { | ||
1392 | + compatible = "xlnx,versal-lpd-iou-slcr-secure"; | ||
1393 | + reg = <0x0 MM_LPD_IOU_SECURE_SLCR 0x0 MM_LPD_IOU_SECURE_SLCR_SIZE 0x0>; | ||
1394 | + memattr-gem0 = <&gem0_memattr_smid>; | ||
1395 | + memattr-write-gem0 = <&gem0_w_memattr_smid>; | ||
1396 | + memattr-gem1 = <&gem1_memattr_smid>; | ||
1397 | + memattr-write-gem1 = <&gem1_w_memattr_smid>; | ||
1398 | + }; | ||
1399 | + | ||
1400 | +#ifdef MM_WWDT | ||
1401 | + lpd_wwdt: wwdt@MM_WWDT { | ||
1402 | + compatible = "xlnx,versal-wwdt"; | ||
1403 | + reg = <0x0 MM_WWDT 0x0 MM_WWDT_SIZE 0x0>; | ||
1404 | + /* IRQ order must match the QEMU model */ | ||
1405 | + interrupts = <WWDT_IRQ_0 | ||
1406 | + WWDT_RST_PENDING_IRQ_0 | ||
1407 | + GWDT_WS0_IRQ_0 | ||
1408 | + GWDT_WS1_IRQ_0>; | ||
1409 | + pclk = <100000000>; | ||
1410 | + reset-gpios = <&crl CRL_RST_SWDT>; | ||
1411 | + }; | ||
1412 | +#endif | ||
1413 | + | ||
1414 | + lpd_gpio: lpd_gpio@MM_PS_GPIO { | ||
1415 | + #gpio-cells = <1>; | ||
1416 | + compatible = "xlnx,zynqmp-gpio"; | ||
1417 | + gpio-controller; | ||
1418 | + interrupts = <GPIO_IRQ_0>; | ||
1419 | + reg = <0x0 MM_PS_GPIO 0x0 MM_PS_GPIO_SIZE 0x0>; | ||
1420 | + reset-gpios = < &crl CRL_RST_GPIO >; | ||
1421 | + }; | ||
1422 | +#ifdef MM_INTLPD_CONFIG | ||
1423 | + intlpd: intlpd@MM_INTLPD_CONFIG { | ||
1424 | + compatible = "xlnx-intlpd-config"; | ||
1425 | + reg = <0x0 MM_INTLPD_CONFIG 0x0 MM_INTLPD_CONFIG_SIZE 0x0>; | ||
1426 | + interrupts = <INT_LPD_IRQ_0>; | ||
1427 | + }; | ||
1428 | +#endif | ||
1429 | +}; | ||
1430 | + | ||
1431 | +&amba_xram { | ||
1432 | + XRAM_CTRL(0); | ||
1433 | + XRAM_CTRL(1); | ||
1434 | + XRAM_CTRL(2); | ||
1435 | + XRAM_CTRL(3); | ||
1436 | +}; | ||
1437 | + | ||
1438 | +&amba_root { | ||
1439 | + /* These devices need to be created before the CPUs. */ | ||
1440 | + crf: crf@MM_FPD_CRF { | ||
1441 | + compatible = "xlnx,versal-crf"; | ||
1442 | + reg-extended = <&amba_fpd 0x0 MM_FPD_CRF 0x0 MM_FPD_CRF_SIZE 0x0>; | ||
1443 | + gpio-controller; | ||
1444 | + #gpio-cells = <1>; | ||
1445 | + }; | ||
1446 | +}; | ||
1447 | + | ||
1448 | +/ { | ||
1449 | + /* Reset domains. */ | ||
1450 | + lpd_reset_domain@0 { | ||
1451 | + compatible = "qemu,reset-domain"; | ||
1452 | + mr0 = <&amba_lpd>; | ||
1453 | + reset-gpios = < &pmc_clk_rst CRP_RST_PS_PS_SRST | ||
1454 | + &pmc_clk_rst CRP_RST_PS_PS_POR >; | ||
1455 | + }; | ||
1456 | + | ||
1457 | + fpd_reset_domain@0 { | ||
1458 | + compatible = "qemu,reset-domain"; | ||
1459 | + mr0 = <&amba_fpd>; | ||
1460 | + reset-gpios = < &pmc_clk_rst CRP_RST_PS_PS_SRST | ||
1461 | + &pmc_clk_rst CRP_RST_PS_PS_POR | ||
1462 | + &crl CRL_RST_FPD_POR | ||
1463 | + &crl CRL_RST_FPD_SRST >; | ||
1464 | + }; | ||
1465 | +}; | ||
1466 | -- | ||
1467 | 2.34.1 | ||
1468 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch new file mode 100644 index 00000000..20f02fde --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch | |||
@@ -0,0 +1,293 @@ | |||
1 | From 58fdfde013dfabf3a9f2c83525c00a6f057768f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 4 Oct 2024 15:49:46 -0600 | ||
4 | Subject: [PATCH] versal-net: Reorder serial port | ||
5 | |||
6 | This commit requires the corresponding "versal: Reorder serial ports" | ||
7 | |||
8 | This change affects the order of the serial ports when calling qemu. | ||
9 | Previously the serial ports 0 & 1 were the PMC (firmware) uartlite, | ||
10 | while the standard serial pors were 2 & 3. Reverse this order to | ||
11 | ensure that the first two serial ports are the ones used by Linux. | ||
12 | |||
13 | Upstream-Status: Inappropriate [not a real board] | ||
14 | |||
15 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
16 | --- | ||
17 | board-versal-net-psx-spp-1.4-alt.dts | 36 ++++++++ | ||
18 | board-versal-net-psx-virt-alt.dts | 130 +++++++++++++++++++++++++++ | ||
19 | board-versal-pmx-virt-alt.dts | 82 +++++++++++++++++ | ||
20 | 3 files changed, 248 insertions(+) | ||
21 | create mode 100644 board-versal-net-psx-spp-1.4-alt.dts | ||
22 | create mode 100644 board-versal-net-psx-virt-alt.dts | ||
23 | create mode 100644 board-versal-pmx-virt-alt.dts | ||
24 | |||
25 | diff --git a/board-versal-net-psx-spp-1.4-alt.dts b/board-versal-net-psx-spp-1.4-alt.dts | ||
26 | new file mode 100644 | ||
27 | index 00000000..770a388e | ||
28 | --- /dev/null | ||
29 | +++ b/board-versal-net-psx-spp-1.4-alt.dts | ||
30 | @@ -0,0 +1,36 @@ | ||
31 | +/* | ||
32 | + * Versal Net PSX device tree. | ||
33 | + * | ||
34 | + * Copyright (c) 2022, Xilinx Inc | ||
35 | + * All rights reserved. | ||
36 | + * | ||
37 | + * Redistribution and use in source and binary forms, with or without | ||
38 | + * modification, are permitted provided that the following conditions are met: | ||
39 | + * * Redistributions of source code must retain the above copyright | ||
40 | + * notice, this list of conditions and the following disclaimer. | ||
41 | + * * Redistributions in binary form must reproduce the above copyright | ||
42 | + * notice, this list of conditions and the following disclaimer in the | ||
43 | + * documentation and/or other materials provided with the distribution. | ||
44 | + * * Neither the name of the <organization> nor the | ||
45 | + * names of its contributors may be used to endorse or promote products | ||
46 | + * derived from this software without specific prior written permission. | ||
47 | + * | ||
48 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
49 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
50 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
51 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
52 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
53 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
54 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
55 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
56 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
57 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
58 | + */ | ||
59 | + | ||
60 | +#define VERSAL_NET_APU_CPU_FREQ 100000000 | ||
61 | + | ||
62 | +#include "board-versal-net-psx-virt-alt.dts" | ||
63 | + | ||
64 | +&pmc_tap { | ||
65 | + platform-ver = <0x5>; | ||
66 | +}; | ||
67 | diff --git a/board-versal-net-psx-virt-alt.dts b/board-versal-net-psx-virt-alt.dts | ||
68 | new file mode 100644 | ||
69 | index 00000000..7ee4ad9d | ||
70 | --- /dev/null | ||
71 | +++ b/board-versal-net-psx-virt-alt.dts | ||
72 | @@ -0,0 +1,130 @@ | ||
73 | +/* | ||
74 | + * Versal-Net Virtual PSX board device tree. | ||
75 | + * | ||
76 | + * Copyright (c) 2021-2022, Xilinx Inc. | ||
77 | + * Copyright (C) 2022-2024, Advanced Micro Devices, Inc. | ||
78 | + * All rights reserved. | ||
79 | + * | ||
80 | + * Redistribution and use in source and binary forms, with or without | ||
81 | + * modification, are permitted provided that the following conditions are met: | ||
82 | + * * Redistributions of source code must retain the above copyright | ||
83 | + * notice, this list of conditions and the following disclaimer. | ||
84 | + * * Redistributions in binary form must reproduce the above copyright | ||
85 | + * notice, this list of conditions and the following disclaimer in the | ||
86 | + * documentation and/or other materials provided with the distribution. | ||
87 | + * * Neither the name of the <organization> nor the | ||
88 | + * names of its contributors may be used to endorse or promote products | ||
89 | + * derived from this software without specific prior written permission. | ||
90 | + * | ||
91 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
92 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
93 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
94 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
95 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
96 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
97 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
98 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
99 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
100 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
101 | + */ | ||
102 | + | ||
103 | +#ifndef NUM_APUS | ||
104 | +#define NUM_APUS 16 | ||
105 | +#endif | ||
106 | +#define VERSAL_NET_APU_CPU_FREQ 100000000 | ||
107 | + | ||
108 | +#define NUM_APUS_PER_CLUSTER 4 | ||
109 | + | ||
110 | +#define VERSAL_NPI_GENERIC | ||
111 | +#define VERSAL_PSX | ||
112 | +#define VERSAL_NET | ||
113 | +#define VERSAL_NPI_OVERRIDE | ||
114 | + | ||
115 | +/* TODO: Add GIC interrupt redirection support. */ | ||
116 | +#define RPU_GIC_INTERRUPT_TARGET_STEM rpu_cpu | ||
117 | + | ||
118 | +#define APU_CPU_MODEL "cortex-a78-arm-cpu" | ||
119 | +#define RPU_CPU_MODEL "cortex-r52-arm-cpu" | ||
120 | + | ||
121 | +#include "include/versal-net/npi-memmap.dtsh" | ||
122 | +#include "include/versal-net/fpd-memmap.dtsh" | ||
123 | +#include "board-versal-ps-virt-alt.dts" | ||
124 | +#include "versal-psx.dtsi" | ||
125 | +#include "versal-net-psmx.dtsi" | ||
126 | +#include "versal-psx-rpu.dtsi" | ||
127 | +#include "versal-net-boot-init.dtsi" | ||
128 | +#include "versal-net-hnic.dtsi" | ||
129 | +#include "versal-pmx-shared-overlay.dtsi" | ||
130 | +#include "versal-pmx-system-overlay.dtsi" | ||
131 | +#include "versal-psx-shared-overlay.dtsi" | ||
132 | + | ||
133 | +#ifndef VERSAL_NET_APU_CPU_FREQ | ||
134 | + #define VERSAL_NET_APU_CPU_FREQ 2720000 | ||
135 | +#endif | ||
136 | + | ||
137 | +#define SET_CPU_FREQ(n, f) \ | ||
138 | +&cpu ## n { \ | ||
139 | + generic-timer-frequency = <f>; \ | ||
140 | +} | ||
141 | + | ||
142 | +SET_CPU_FREQ(0, VERSAL_NET_APU_CPU_FREQ); | ||
143 | +SET_CPU_FREQ(1, VERSAL_NET_APU_CPU_FREQ); | ||
144 | +SET_CPU_FREQ(2, VERSAL_NET_APU_CPU_FREQ); | ||
145 | +SET_CPU_FREQ(3, VERSAL_NET_APU_CPU_FREQ); | ||
146 | +SET_CPU_FREQ(4, VERSAL_NET_APU_CPU_FREQ); | ||
147 | +SET_CPU_FREQ(5, VERSAL_NET_APU_CPU_FREQ); | ||
148 | +SET_CPU_FREQ(6, VERSAL_NET_APU_CPU_FREQ); | ||
149 | +SET_CPU_FREQ(7, VERSAL_NET_APU_CPU_FREQ); | ||
150 | +#if (NUM_APUS >= 16) | ||
151 | +SET_CPU_FREQ(8, VERSAL_NET_APU_CPU_FREQ); | ||
152 | +SET_CPU_FREQ(9, VERSAL_NET_APU_CPU_FREQ); | ||
153 | +SET_CPU_FREQ(10,VERSAL_NET_APU_CPU_FREQ); | ||
154 | +SET_CPU_FREQ(11,VERSAL_NET_APU_CPU_FREQ); | ||
155 | +SET_CPU_FREQ(12,VERSAL_NET_APU_CPU_FREQ); | ||
156 | +SET_CPU_FREQ(13,VERSAL_NET_APU_CPU_FREQ); | ||
157 | +SET_CPU_FREQ(14,VERSAL_NET_APU_CPU_FREQ); | ||
158 | +SET_CPU_FREQ(15,VERSAL_NET_APU_CPU_FREQ); | ||
159 | +#endif | ||
160 | +#if (NUM_APUS >= 32) | ||
161 | +SET_CPU_FREQ(16, VERSAL_NET_APU_CPU_FREQ); | ||
162 | +SET_CPU_FREQ(17, VERSAL_NET_APU_CPU_FREQ); | ||
163 | +SET_CPU_FREQ(18, VERSAL_NET_APU_CPU_FREQ); | ||
164 | +SET_CPU_FREQ(19, VERSAL_NET_APU_CPU_FREQ); | ||
165 | +SET_CPU_FREQ(20, VERSAL_NET_APU_CPU_FREQ); | ||
166 | +SET_CPU_FREQ(21, VERSAL_NET_APU_CPU_FREQ); | ||
167 | +SET_CPU_FREQ(22, VERSAL_NET_APU_CPU_FREQ); | ||
168 | +SET_CPU_FREQ(23, VERSAL_NET_APU_CPU_FREQ); | ||
169 | +SET_CPU_FREQ(24, VERSAL_NET_APU_CPU_FREQ); | ||
170 | +SET_CPU_FREQ(25, VERSAL_NET_APU_CPU_FREQ); | ||
171 | +SET_CPU_FREQ(26, VERSAL_NET_APU_CPU_FREQ); | ||
172 | +SET_CPU_FREQ(27, VERSAL_NET_APU_CPU_FREQ); | ||
173 | +SET_CPU_FREQ(28, VERSAL_NET_APU_CPU_FREQ); | ||
174 | +SET_CPU_FREQ(29, VERSAL_NET_APU_CPU_FREQ); | ||
175 | +SET_CPU_FREQ(30, VERSAL_NET_APU_CPU_FREQ); | ||
176 | +SET_CPU_FREQ(31, VERSAL_NET_APU_CPU_FREQ); | ||
177 | +#endif | ||
178 | + | ||
179 | +&rpu_ctrl_a { | ||
180 | + tcm-mr = <&s_axi_tcm_a>; | ||
181 | +}; | ||
182 | +&rpu_ctrl_a0 { | ||
183 | + core = <&rpu_cpu0>; | ||
184 | +}; | ||
185 | +&rpu_ctrl_a1 { | ||
186 | + core = <&rpu_cpu1>; | ||
187 | +}; | ||
188 | + | ||
189 | +&rpu_ctrl_b { | ||
190 | + tcm-mr = <&s_axi_tcm_b>; | ||
191 | +}; | ||
192 | +&rpu_ctrl_b0 { | ||
193 | + core = <&rpu_cpu2>; | ||
194 | +}; | ||
195 | +&rpu_ctrl_b1 { | ||
196 | + core = <&rpu_cpu3>; | ||
197 | +}; | ||
198 | + | ||
199 | +&pmc_tap { | ||
200 | + idcode = <0x14D80093>; | ||
201 | + platform-ver = <0x5>; | ||
202 | +}; | ||
203 | diff --git a/board-versal-pmx-virt-alt.dts b/board-versal-pmx-virt-alt.dts | ||
204 | new file mode 100644 | ||
205 | index 00000000..7a4679d0 | ||
206 | --- /dev/null | ||
207 | +++ b/board-versal-pmx-virt-alt.dts | ||
208 | @@ -0,0 +1,82 @@ | ||
209 | +/* | ||
210 | + * Versal Virtual PMC board device tree | ||
211 | + * | ||
212 | + * Copyright (c) 2016, Xilinx Inc | ||
213 | + * All rights reserved. | ||
214 | + * | ||
215 | + * Redistribution and use in source and binary forms, with or without | ||
216 | + * modification, are permitted provided that the following conditions are met: | ||
217 | + * * Redistributions of source code must retain the above copyright | ||
218 | + * notice, this list of conditions and the following disclaimer. | ||
219 | + * * Redistributions in binary form must reproduce the above copyright | ||
220 | + * notice, this list of conditions and the following disclaimer in the | ||
221 | + * documentation and/or other materials provided with the distribution. | ||
222 | + * * Neither the name of the <organization> nor the | ||
223 | + * names of its contributors may be used to endorse or promote products | ||
224 | + * derived from this software without specific prior written permission. | ||
225 | + * | ||
226 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
227 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
228 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
229 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
230 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
231 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
232 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
233 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
234 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
235 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
236 | + */ | ||
237 | + | ||
238 | +#define VERSAL_PMX | ||
239 | +#define VERSAL_NET | ||
240 | +#define NUM_APUS 16 | ||
241 | +#define NUM_APUS_PER_CLUSTER 4 | ||
242 | +#define VERSAL_NPI_OVERRIDE | ||
243 | + | ||
244 | +#include "include/versal-net/npi-memmap.dtsh" | ||
245 | +#include "include/versal-net/fpd-memmap.dtsh" | ||
246 | +#include "board-versal-pmc-virt-alt.dts" | ||
247 | +#include "versal-pmx-shared-overlay.dtsi" | ||
248 | + | ||
249 | +#ifndef MULTI_ARCH | ||
250 | +/* | ||
251 | + * The single-arch setup has the entire system except | ||
252 | + * the ARM cores. So we need to add the missing dummy | ||
253 | + * ARM cores (pmc-virt.dts already has 0 - 1) and include | ||
254 | + * the PSX and PMX system overlays. | ||
255 | + */ | ||
256 | +#include "versal-pmx-system-overlay.dtsi" | ||
257 | +#include "versal-psx.dtsi" | ||
258 | +#include "versal-psx-shared-overlay.dtsi" | ||
259 | +#include "versal-net-psmx.dtsi" | ||
260 | + | ||
261 | +/ { | ||
262 | + /* Dummy APUs. */ | ||
263 | + cpu2: apu@2 { }; | ||
264 | + cpu3: apu@3 { }; | ||
265 | + cpu4: apu@4 { }; | ||
266 | + cpu5: apu@5 { }; | ||
267 | + cpu6: apu@6 { }; | ||
268 | + cpu7: apu@7 { }; | ||
269 | +#if (NUM_APUS >= 16) | ||
270 | + cpu8: apu@8 { }; | ||
271 | + cpu9: apu@9 { }; | ||
272 | + cpu10: apu@10 { }; | ||
273 | + cpu11: apu@11 { }; | ||
274 | + cpu12: apu@12 { }; | ||
275 | + cpu13: apu@13 { }; | ||
276 | + cpu14: apu@14 { }; | ||
277 | + cpu15: apu@15 { }; | ||
278 | +#endif | ||
279 | + /* Dummy GICs. */ | ||
280 | + rpu_gic_a: rpu_gic_a@0 { | ||
281 | + gpio_controller ; | ||
282 | + #gpio-cells = <1>; | ||
283 | + }; | ||
284 | + | ||
285 | + rpu_gic_b: rpu_gic_b@0 { | ||
286 | + gpio_controller ; | ||
287 | + #gpio-cells = <1>; | ||
288 | + }; | ||
289 | +}; | ||
290 | +#endif | ||
291 | -- | ||
292 | 2.34.1 | ||
293 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb deleted file mode 100644 index 7c734cd6..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.1" | ||
5 | SRCREV ?= "0499324af1178057c3730b0989c8fb5c5bbc4cf8" | ||
6 | |||
7 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
8 | SRC_URI:append = " file://0001-Makefile-Use-python3-instead-of-python.patch" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb deleted file mode 100644 index 6675ba3e..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.2" | ||
5 | SRCREV ?= "cf5d357e16c13ac447861f908e83951ffb7b4301" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb deleted file mode 100644 index dc1feda4..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2023.1" | ||
5 | SRCREV ?= "56538937584f527fb408347c3b430142e74723e8" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb deleted file mode 100644 index d41743c1..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2023.2" | ||
5 | SRCREV ?= "d1013382d9a5ef816cd020e7840813b7a2d65c51" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.2.bb new file mode 100644 index 00000000..5780aed1 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2024.2" | ||
5 | SRCREV ?= "a6eeb7ec0fdb765ab0057d95eb6201d97359eff9" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc new file mode 100644 index 00000000..22fa9685 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | require qemu-8.1.inc | ||
2 | |||
3 | inherit native | ||
4 | |||
5 | EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" | ||
6 | |||
7 | LDFLAGS:append = " -fuse-ld=bfd" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc new file mode 100644 index 00000000..24f9a039 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | # possible arch values are: | ||
2 | # aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze | ||
3 | # mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb | ||
4 | # riscv32 riscv64 sparc sparc32 sparc32plus | ||
5 | |||
6 | def get_qemu_target_list(d): | ||
7 | import bb | ||
8 | archs = d.getVar('QEMU_TARGETS').split() | ||
9 | tos = d.getVar('HOST_OS') | ||
10 | softmmuonly = "" | ||
11 | for arch in ['ppcemb', 'lm32']: | ||
12 | if arch in archs: | ||
13 | softmmuonly += arch + "-softmmu," | ||
14 | archs.remove(arch) | ||
15 | linuxuseronly = "" | ||
16 | for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']: | ||
17 | if arch in archs: | ||
18 | linuxuseronly += arch + "-linux-user," | ||
19 | archs.remove(arch) | ||
20 | if 'linux' not in tos: | ||
21 | return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',') | ||
22 | return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',') | ||
23 | |||
24 | def get_qemu_usermode_target_list(d): | ||
25 | return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(','))) | ||
26 | |||
27 | def get_qemu_system_target_list(d): | ||
28 | return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(','))) | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc deleted file mode 100644 index bb8fac70..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc deleted file mode 100644 index bb8fac70..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc deleted file mode 100644 index 06ac05a1..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | XILINX_QEMU_VERSION = "v7.1.0" | ||
2 | BRANCH = "xlnx_rel_v2023.1" | ||
3 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc deleted file mode 100644 index db6e1528..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | XILINX_QEMU_VERSION = "v7.1.0" | ||
2 | BRANCH = "xlnx_rel_v2023.2" | ||
3 | SRCREV = "23b643ba1683a47ef49447a45643fe2172d6f8ca" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch deleted file mode 100644 index 6c85a77b..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | CVE: CVE-2022-2962 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From 5c5c50b0a73d78ffe18336c9996fef5eae9bbbb0 Mon Sep 17 00:00:00 2001 | ||
6 | From: Zheyu Ma <zheyuma97@gmail.com> | ||
7 | Date: Sun, 21 Aug 2022 20:43:43 +0800 | ||
8 | Subject: [PATCH] net: tulip: Restrict DMA engine to memories | ||
9 | |||
10 | The DMA engine is started by I/O access and then itself accesses the | ||
11 | I/O registers, triggering a reentrancy bug. | ||
12 | |||
13 | The following log can reveal it: | ||
14 | ==5637==ERROR: AddressSanitizer: stack-overflow | ||
15 | #0 0x5595435f6078 in tulip_xmit_list_update qemu/hw/net/tulip.c:673 | ||
16 | #1 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
17 | #2 0x559544637f86 in memory_region_write_accessor qemu/softmmu/memory.c:492:5 | ||
18 | #3 0x5595446379fa in access_with_adjusted_size qemu/softmmu/memory.c:554:18 | ||
19 | #4 0x5595446372fa in memory_region_dispatch_write qemu/softmmu/memory.c | ||
20 | #5 0x55954468b74c in flatview_write_continue qemu/softmmu/physmem.c:2825:23 | ||
21 | #6 0x559544683662 in flatview_write qemu/softmmu/physmem.c:2867:12 | ||
22 | #7 0x5595446833f3 in address_space_write qemu/softmmu/physmem.c:2963:18 | ||
23 | #8 0x5595435fb082 in dma_memory_rw_relaxed qemu/include/sysemu/dma.h:87:12 | ||
24 | #9 0x5595435fb082 in dma_memory_rw qemu/include/sysemu/dma.h:130:12 | ||
25 | #10 0x5595435fb082 in dma_memory_write qemu/include/sysemu/dma.h:171:12 | ||
26 | #11 0x5595435fb082 in stl_le_dma qemu/include/sysemu/dma.h:272:1 | ||
27 | #12 0x5595435fb082 in stl_le_pci_dma qemu/include/hw/pci/pci.h:910:1 | ||
28 | #13 0x5595435fb082 in tulip_desc_write qemu/hw/net/tulip.c:101:9 | ||
29 | #14 0x5595435f7e3d in tulip_xmit_list_update qemu/hw/net/tulip.c:706:9 | ||
30 | #15 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
31 | |||
32 | Fix this bug by restricting the DMA engine to memories regions. | ||
33 | |||
34 | Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> | ||
35 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
36 | --- | ||
37 | hw/net/tulip.c | 4 ++-- | ||
38 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
39 | |||
40 | diff --git a/hw/net/tulip.c b/hw/net/tulip.c | ||
41 | index 097e905bec..b9e42c322a 100644 | ||
42 | --- a/hw/net/tulip.c | ||
43 | +++ b/hw/net/tulip.c | ||
44 | @@ -70,7 +70,7 @@ static const VMStateDescription vmstate_pci_tulip = { | ||
45 | static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
46 | struct tulip_descriptor *desc) | ||
47 | { | ||
48 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
49 | + const MemTxAttrs attrs = { .memory = true }; | ||
50 | |||
51 | if (s->csr[0] & CSR0_DBO) { | ||
52 | ldl_be_pci_dma(&s->dev, p, &desc->status, attrs); | ||
53 | @@ -88,7 +88,7 @@ static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
54 | static void tulip_desc_write(TULIPState *s, hwaddr p, | ||
55 | struct tulip_descriptor *desc) | ||
56 | { | ||
57 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
58 | + const MemTxAttrs attrs = { .memory = true }; | ||
59 | |||
60 | if (s->csr[0] & CSR0_DBO) { | ||
61 | stl_be_pci_dma(&s->dev, p, desc->status, attrs); | ||
62 | -- | ||
63 | 2.34.1 | ||
64 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch deleted file mode 100644 index 63a99c96..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch +++ /dev/null | |||
@@ -1,246 +0,0 @@ | |||
1 | From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
3 | Date: Thu, 21 Dec 2017 11:35:16 -0800 | ||
4 | Subject: [PATCH 02/12] chardev: connect socket to a spawned command | ||
5 | |||
6 | The command is started in a shell (sh -c) with stdin connect to QEMU | ||
7 | via a Unix domain stream socket. QEMU then exchanges data via its own | ||
8 | end of the socket, just like it normally does. | ||
9 | |||
10 | "-chardev socket" supports some ways of connecting via protocols like | ||
11 | telnet, but that is only a subset of the functionality supported by | ||
12 | tools socat. To use socat instead, for example to connect via a socks | ||
13 | proxy, use: | ||
14 | |||
15 | -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \ | ||
16 | -device usb-serial,chardev=socat | ||
17 | |||
18 | Beware that commas in the command must be escaped as double commas. | ||
19 | |||
20 | Or interactively in the console: | ||
21 | (qemu) chardev-add socket,id=cat,cmd=cat | ||
22 | (qemu) device_add usb-serial,chardev=cat | ||
23 | ^ac | ||
24 | # cat >/dev/ttyUSB0 | ||
25 | hello | ||
26 | hello | ||
27 | |||
28 | Another usage is starting swtpm from inside QEMU. swtpm will | ||
29 | automatically shut down once it looses the connection to the parent | ||
30 | QEMU, so there is no risk of lingering processes: | ||
31 | |||
32 | -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \ | ||
33 | -tpmdev emulator,id=tpm0,chardev=chrtpm0 \ | ||
34 | -device tpm-tis,tpmdev=tpm0 | ||
35 | |||
36 | The patch was discussed upstream, but QEMU developers believe that the | ||
37 | code calling QEMU should be responsible for managing additional | ||
38 | processes. In OE-core, that would imply enhancing runqemu and | ||
39 | oeqa. This patch is a simpler solution. | ||
40 | |||
41 | Because it is not going upstream, the patch was written so that it is | ||
42 | as simple as possible. | ||
43 | |||
44 | Upstream-Status: Inappropriate [embedded specific] | ||
45 | |||
46 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | ||
47 | |||
48 | --- | ||
49 | chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++ | ||
50 | chardev/char.c | 3 ++ | ||
51 | qapi/char.json | 5 +++ | ||
52 | 3 files changed, 108 insertions(+) | ||
53 | |||
54 | diff --git a/chardev/char-socket.c b/chardev/char-socket.c | ||
55 | index fab2d791d..c79641f24 100644 | ||
56 | --- a/chardev/char-socket.c | ||
57 | +++ b/chardev/char-socket.c | ||
58 | @@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock, | ||
59 | return true; | ||
60 | } | ||
61 | |||
62 | +#ifndef _WIN32 | ||
63 | +static void chardev_open_socket_cmd(Chardev *chr, | ||
64 | + const char *cmd, | ||
65 | + Error **errp) | ||
66 | +{ | ||
67 | + int fds[2] = { -1, -1 }; | ||
68 | + QIOChannelSocket *sioc = NULL; | ||
69 | + pid_t pid = -1; | ||
70 | + const char *argv[] = { "/bin/sh", "-c", cmd, NULL }; | ||
71 | + | ||
72 | + /* | ||
73 | + * We need a Unix domain socket for commands like swtpm and a single | ||
74 | + * connection, therefore we cannot use qio_channel_command_new_spawn() | ||
75 | + * without patching it first. Duplicating the functionality is easier. | ||
76 | + */ | ||
77 | + if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) { | ||
78 | + error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)"); | ||
79 | + goto error; | ||
80 | + } | ||
81 | + | ||
82 | + pid = qemu_fork(errp); | ||
83 | + if (pid < 0) { | ||
84 | + goto error; | ||
85 | + } | ||
86 | + | ||
87 | + if (!pid) { | ||
88 | + /* child */ | ||
89 | + dup2(fds[1], STDIN_FILENO); | ||
90 | + execv(argv[0], (char * const *)argv); | ||
91 | + _exit(1); | ||
92 | + } | ||
93 | + | ||
94 | + /* | ||
95 | + * Hand over our end of the socket pair to the qio channel. | ||
96 | + * | ||
97 | + * We don't reap the child because it is expected to keep | ||
98 | + * running. We also don't support the "reconnect" option for the | ||
99 | + * same reason. | ||
100 | + */ | ||
101 | + sioc = qio_channel_socket_new_fd(fds[0], errp); | ||
102 | + if (!sioc) { | ||
103 | + goto error; | ||
104 | + } | ||
105 | + fds[0] = -1; | ||
106 | + | ||
107 | + g_free(chr->filename); | ||
108 | + chr->filename = g_strdup_printf("cmd:%s", cmd); | ||
109 | + tcp_chr_new_client(chr, sioc); | ||
110 | + | ||
111 | + error: | ||
112 | + if (fds[0] >= 0) { | ||
113 | + close(fds[0]); | ||
114 | + } | ||
115 | + if (fds[1] >= 0) { | ||
116 | + close(fds[1]); | ||
117 | + } | ||
118 | + if (sioc) { | ||
119 | + object_unref(OBJECT(sioc)); | ||
120 | + } | ||
121 | +} | ||
122 | +#endif | ||
123 | |||
124 | static void qmp_chardev_open_socket(Chardev *chr, | ||
125 | ChardevBackend *backend, | ||
126 | @@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
127 | { | ||
128 | SocketChardev *s = SOCKET_CHARDEV(chr); | ||
129 | ChardevSocket *sock = backend->u.socket.data; | ||
130 | +#ifndef _WIN32 | ||
131 | + const char *cmd = sock->cmd; | ||
132 | +#endif | ||
133 | bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; | ||
134 | bool is_listen = sock->has_server ? sock->server : true; | ||
135 | bool is_telnet = sock->has_telnet ? sock->telnet : false; | ||
136 | @@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
137 | |||
138 | update_disconnected_filename(s); | ||
139 | |||
140 | +#ifndef _WIN32 | ||
141 | + if (cmd) { | ||
142 | + chardev_open_socket_cmd(chr, cmd, errp); | ||
143 | + | ||
144 | + /* everything ready (or failed permanently) before we return */ | ||
145 | + *be_opened = true; | ||
146 | + } else | ||
147 | +#endif | ||
148 | if (s->is_listen) { | ||
149 | if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270, | ||
150 | is_waitconnect, errp) < 0) { | ||
151 | @@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
152 | const char *host = qemu_opt_get(opts, "host"); | ||
153 | const char *port = qemu_opt_get(opts, "port"); | ||
154 | const char *fd = qemu_opt_get(opts, "fd"); | ||
155 | +#ifndef _WIN32 | ||
156 | + const char *cmd = qemu_opt_get(opts, "cmd"); | ||
157 | +#endif | ||
158 | #ifdef CONFIG_LINUX | ||
159 | bool tight = qemu_opt_get_bool(opts, "tight", true); | ||
160 | bool abstract = qemu_opt_get_bool(opts, "abstract", false); | ||
161 | @@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
162 | SocketAddressLegacy *addr; | ||
163 | ChardevSocket *sock; | ||
164 | |||
165 | +#ifndef _WIN32 | ||
166 | + if (cmd) { | ||
167 | + /* | ||
168 | + * Here we have to ensure that no options are set which are incompatible with | ||
169 | + * spawning a command, otherwise unmodified code that doesn't know about | ||
170 | + * command spawning (like socket_reconnect_timeout()) might get called. | ||
171 | + */ | ||
172 | + if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) { | ||
173 | + error_setg(errp, "chardev: socket: cmd does not support any additional options"); | ||
174 | + return; | ||
175 | + } | ||
176 | + } else | ||
177 | +#endif | ||
178 | + | ||
179 | if ((!!path + !!fd + !!host) > 1) { | ||
180 | error_setg(errp, | ||
181 | "None or one of 'path', 'fd' or 'host' option required."); | ||
182 | @@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
183 | sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds")); | ||
184 | sock->has_tls_authz = qemu_opt_get(opts, "tls-authz"); | ||
185 | sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz")); | ||
186 | +#ifndef _WIN32 | ||
187 | + sock->cmd = g_strdup(cmd); | ||
188 | +#endif | ||
189 | |||
190 | addr = g_new0(SocketAddressLegacy, 1); | ||
191 | +#ifndef _WIN32 | ||
192 | + if (path || cmd) { | ||
193 | +#else | ||
194 | if (path) { | ||
195 | +#endif | ||
196 | UnixSocketAddress *q_unix; | ||
197 | addr->type = SOCKET_ADDRESS_TYPE_UNIX; | ||
198 | q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1); | ||
199 | +#ifndef _WIN32 | ||
200 | + q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path); | ||
201 | +#else | ||
202 | q_unix->path = g_strdup(path); | ||
203 | +#endif | ||
204 | #ifdef CONFIG_LINUX | ||
205 | q_unix->has_tight = true; | ||
206 | q_unix->tight = tight; | ||
207 | diff --git a/chardev/char.c b/chardev/char.c | ||
208 | index 0169d8dde..ce9a21f41 100644 | ||
209 | --- a/chardev/char.c | ||
210 | +++ b/chardev/char.c | ||
211 | @@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = { | ||
212 | },{ | ||
213 | .name = "path", | ||
214 | .type = QEMU_OPT_STRING, | ||
215 | + },{ | ||
216 | + .name = "cmd", | ||
217 | + .type = QEMU_OPT_STRING, | ||
218 | },{ | ||
219 | .name = "host", | ||
220 | .type = QEMU_OPT_STRING, | ||
221 | diff --git a/qapi/char.json b/qapi/char.json | ||
222 | index 7b4215157..37feabdac 100644 | ||
223 | --- a/qapi/char.json | ||
224 | +++ b/qapi/char.json | ||
225 | @@ -250,6 +250,10 @@ | ||
226 | # | ||
227 | # @addr: socket address to listen on (server=true) | ||
228 | # or connect to (server=false) | ||
229 | +# @cmd: command to run via "sh -c" with stdin as one end of | ||
230 | +# a AF_UNIX SOCK_DSTREAM socket pair. The other end | ||
231 | +# is used by the chardev. Either an addr or a cmd can | ||
232 | +# be specified, but not both. | ||
233 | # @tls-creds: the ID of the TLS credentials object (since 2.6) | ||
234 | # @tls-authz: the ID of the QAuthZ authorization object against which | ||
235 | # the client's x509 distinguished name will be validated. This | ||
236 | @@ -276,6 +280,7 @@ | ||
237 | ## | ||
238 | { 'struct': 'ChardevSocket', | ||
239 | 'data': { 'addr': 'SocketAddressLegacy', | ||
240 | + '*cmd': 'str', | ||
241 | '*tls-creds': 'str', | ||
242 | '*tls-authz' : 'str', | ||
243 | '*server': 'bool', | ||
244 | -- | ||
245 | 2.30.2 | ||
246 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch deleted file mode 100644 index 3b4a6694..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | CVE: CVE-2022-3165 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From d307040b18bfcb1393b910f1bae753d5c12a4dc7 Mon Sep 17 00:00:00 2001 | ||
6 | From: Mauro Matteo Cascella <mcascell@redhat.com> | ||
7 | Date: Sun, 25 Sep 2022 22:45:11 +0200 | ||
8 | Subject: [PATCH] ui/vnc-clipboard: fix integer underflow in | ||
9 | vnc_client_cut_text_ext | ||
10 | |||
11 | Extended ClientCutText messages start with a 4-byte header. If len < 4, | ||
12 | an integer underflow occurs in vnc_client_cut_text_ext. The result is | ||
13 | used to decompress data in a while loop in inflate_buffer, leading to | ||
14 | CPU consumption and denial of service. Prevent this by checking dlen in | ||
15 | protocol_client_msg. | ||
16 | |||
17 | Fixes: CVE-2022-3165 | ||
18 | Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support") | ||
19 | Reported-by: TangPeng <tangpeng@qianxin.com> | ||
20 | Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> | ||
21 | Message-Id: <20220925204511.1103214-1-mcascell@redhat.com> | ||
22 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
23 | --- | ||
24 | ui/vnc.c | 11 ++++++++--- | ||
25 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/ui/vnc.c b/ui/vnc.c | ||
28 | index 6a05d06147..acb3629cd8 100644 | ||
29 | --- a/ui/vnc.c | ||
30 | +++ b/ui/vnc.c | ||
31 | @@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
32 | if (len == 1) { | ||
33 | return 8; | ||
34 | } | ||
35 | + uint32_t dlen = abs(read_s32(data, 4)); | ||
36 | if (len == 8) { | ||
37 | - uint32_t dlen = abs(read_s32(data, 4)); | ||
38 | if (dlen > (1 << 20)) { | ||
39 | error_report("vnc: client_cut_text msg payload has %u bytes" | ||
40 | " which exceeds our limit of 1MB.", dlen); | ||
41 | @@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
42 | } | ||
43 | |||
44 | if (read_s32(data, 4) < 0) { | ||
45 | - vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)), | ||
46 | - read_u32(data, 8), data + 12); | ||
47 | + if (dlen < 4) { | ||
48 | + error_report("vnc: malformed payload (header less than 4 bytes)" | ||
49 | + " in extended clipboard pseudo-encoding."); | ||
50 | + vnc_client_error(vs); | ||
51 | + break; | ||
52 | + } | ||
53 | + vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12); | ||
54 | break; | ||
55 | } | ||
56 | vnc_client_cut_text(vs, read_u32(data, 4), data + 8); | ||
57 | -- | ||
58 | GitLab | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch deleted file mode 100644 index 071691f8..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP | ||
2 | |||
3 | SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark | ||
4 | it with ARM_CP_EL3_NO_EL2_KEEP. | ||
5 | |||
6 | Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL") | ||
7 | Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
8 | |||
9 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04515.html] | ||
10 | |||
11 | --- | ||
12 | target/arm/helper.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | Index: qemu-7.1.0/target/arm/helper.c | ||
16 | =================================================================== | ||
17 | --- qemu-7.1.0.orig/target/arm/helper.c | ||
18 | +++ qemu-7.1.0/target/arm/helper.c | ||
19 | @@ -4971,7 +4971,7 @@ static const ARMCPRegInfo v8_cp_reginfo[ | ||
20 | .fieldoffset = offsetof(CPUARMState, sp_el[0]) }, | ||
21 | { .name = "SP_EL1", .state = ARM_CP_STATE_AA64, | ||
22 | .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0, | ||
23 | - .access = PL2_RW, .type = ARM_CP_ALIAS, | ||
24 | + .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP, | ||
25 | .fieldoffset = offsetof(CPUARMState, sp_el[1]) }, | ||
26 | { .name = "SPSel", .state = ARM_CP_STATE_AA64, | ||
27 | .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0, | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch deleted file mode 100644 index abad1cfe..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | Avoid conflicts between sys/mount.h and linux/mount.h that are seen | ||
2 | with glibc 2.36 | ||
3 | |||
4 | Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- a/linux-user/syscall.c | ||
9 | +++ b/linux-user/syscall.c | ||
10 | @@ -95,7 +95,25 @@ | ||
11 | #include <linux/soundcard.h> | ||
12 | #include <linux/kd.h> | ||
13 | #include <linux/mtio.h> | ||
14 | + | ||
15 | +#ifdef HAVE_SYS_MOUNT_FSCONFIG | ||
16 | +/* | ||
17 | + * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, | ||
18 | + * which in turn prevents use of linux/fs.h. So we have to | ||
19 | + * define the constants ourselves for now. | ||
20 | + */ | ||
21 | +#define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
22 | +#define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
23 | +#define FS_IOC_GETVERSION _IOR('v', 1, long) | ||
24 | +#define FS_IOC_SETVERSION _IOW('v', 2, long) | ||
25 | +#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) | ||
26 | +#define FS_IOC32_GETFLAGS _IOR('f', 1, int) | ||
27 | +#define FS_IOC32_SETFLAGS _IOW('f', 2, int) | ||
28 | +#define FS_IOC32_GETVERSION _IOR('v', 1, int) | ||
29 | +#define FS_IOC32_SETVERSION _IOW('v', 2, int) | ||
30 | +#else | ||
31 | #include <linux/fs.h> | ||
32 | +#endif | ||
33 | #include <linux/fd.h> | ||
34 | #if defined(CONFIG_FIEMAP) | ||
35 | #include <linux/fiemap.h> | ||
36 | --- a/meson.build | ||
37 | +++ b/meson.build | ||
38 | @@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET', | ||
39 | cc.has_header_symbol('getopt.h', 'optreset')) | ||
40 | config_host_data.set('HAVE_IPPROTO_MPTCP', | ||
41 | cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) | ||
42 | +config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', | ||
43 | + cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) | ||
44 | |||
45 | # has_member | ||
46 | config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc deleted file mode 100644 index 4b0aceb8..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | SUMMARY = "Xilinx's fork of a fast open source processor emulator" | ||
2 | HOMEPAGE = "https://github.com/xilinx/qemu/" | ||
3 | |||
4 | # This qemu fork is NOT compatible with running on a 32-bit system | ||
5 | # See: https://github.com/Xilinx/qemu/issues/35 | ||
6 | COMPATIBLE_HOST:arm = "null" | ||
7 | |||
8 | # x86_64 is needed to build nativesdks | ||
9 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel x86_64" | ||
10 | |||
11 | LIC_FILES_CHKSUM = " \ | ||
12 | file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
13 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \ | ||
14 | " | ||
15 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" | ||
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-7.1.0:" | ||
18 | |||
19 | PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
20 | REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" | ||
21 | |||
22 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
23 | SRC_URI = "${REPO};${BRANCHARG}" | ||
24 | |||
25 | FILESEXTRAPATHS:append := ":${COREBASE}/meta/recipes-devtools/qemu/qemu" | ||
26 | |||
27 | SRC_URI += "\ | ||
28 | file://powerpc_rom.bin \ | ||
29 | file://run-ptest \ | ||
30 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | ||
31 | file://0002-chardev-connect-socket-to-a-spawned-command.patch \ | ||
32 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ | ||
33 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | ||
34 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ | ||
35 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ | ||
36 | file://0007-qemu-Determinism-fixes.patch \ | ||
37 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
38 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | ||
39 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | ||
40 | file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \ | ||
41 | file://arm-cpreg-fix.patch \ | ||
42 | file://CVE-2022-3165.patch \ | ||
43 | file://qemu-guest-agent.init \ | ||
44 | file://qemu-guest-agent.udev \ | ||
45 | " | ||
46 | |||
47 | # Workaround for 8.2 patch that doesn't apply | ||
48 | SRC_URI:remove = "file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch" | ||
49 | SRC_URI:remove = "file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch" | ||
50 | |||
51 | S = "${WORKDIR}/git" | ||
52 | |||
53 | PACKAGECONFIG ??= " \ | ||
54 | fdt sdl kvm gcrypt pie slirp \ | ||
55 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ | ||
56 | ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ | ||
57 | " | ||
58 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp" | ||
59 | |||
60 | # Disable this | ||
61 | PACKAGECONFIG[debuginfo] = "" | ||
62 | PACKAGECONFIG[pipewire] = "" | ||
63 | PACKAGECONFIG[sndio] = "" | ||
64 | |||
65 | DISABLE_STATIC:pn-${PN} = "" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc new file mode 100644 index 00000000..5416f128 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc | |||
@@ -0,0 +1,89 @@ | |||
1 | SUMMARY = "Xilinx's fork of a fast open source processor emulator" | ||
2 | HOMEPAGE = "https://github.com/xilinx/qemu/" | ||
3 | |||
4 | # This qemu fork is NOT compatible with running on a 32-bit system | ||
5 | # See: https://github.com/Xilinx/qemu/issues/35 | ||
6 | COMPATIBLE_HOST:arm = "null" | ||
7 | |||
8 | # x86_64 is needed to build nativesdks | ||
9 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64" | ||
10 | |||
11 | BRANCH = "xlnx_rel_v2024.2" | ||
12 | SRCREV = "01482fa113dcbfa785feb7d513df50d15ec4c5df" | ||
13 | |||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | ||
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-8.1.0:" | ||
18 | |||
19 | PV .= "+git" | ||
20 | REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" | ||
21 | |||
22 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
23 | SRC_URI = "${REPO};${BRANCHARG};name=qemu" | ||
24 | SRCREV_qemu = "${SRCREV}" | ||
25 | SRCREV_FORMAT = "qemu" | ||
26 | |||
27 | FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1" | ||
28 | |||
29 | # Deal with the broken --disable-download | ||
30 | SRCREV_berkeley-softfloat-3 = "b64af41c3276f97f0e181920400ee056b9c88037" | ||
31 | SRCREV_berkeley-testfloat-3 = "40619cbb3bf32872df8c53cc457039229428a263" | ||
32 | SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81" | ||
33 | SRCREV_keycodemapdb = "f5772a62ec52591ff6870b7e8ef32482371f22c6" | ||
34 | SRCREV_libvfio-user = "0b28d205572c80b568a1003db2c8f37ca333e4d7" | ||
35 | SRCREV_slirp = "26be815b86e8d49add8c9a8b320239b9594ff03d" | ||
36 | SRC_URI += "\ | ||
37 | git://gitlab.com/qemu-project/berkeley-softfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-softfloat-3;name=berkeley-softfloat-3 \ | ||
38 | git://gitlab.com/qemu-project/berkeley-testfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-testfloat-3;name=berkeley-testfloat-3 \ | ||
39 | git://gitlab.com/qemu-project/dtc.git;protocol=https;nobranch=1;destsuffix=git/subprojects/dtc;name=dtc \ | ||
40 | git://gitlab.com/qemu-project/keycodemapdb.git;protocol=https;nobranch=1;destsuffix=git/subprojects/keycodemapdb;name=keycodemapdb \ | ||
41 | git://gitlab.com/qemu-project/libvfio-user.git;protocol=https;nobranch=1;destsuffix=git/subprojects/libvfio-user;name=libvfio-user \ | ||
42 | git://gitlab.freedesktop.org/slirp/libslirp;protocol=https;nobranch=1;destsuffix=git/subprojects/slirp;name=slirp \ | ||
43 | " | ||
44 | |||
45 | # Configure meson for disable-download | ||
46 | do_configure:prepend() { | ||
47 | cp ${S}/subprojects/packagefiles/berkeley-softfloat-3/* ${S}/subprojects/berkeley-softfloat-3/. | ||
48 | cp ${S}/subprojects/packagefiles/berkeley-testfloat-3/* ${S}/subprojects/berkeley-testfloat-3/. | ||
49 | } | ||
50 | |||
51 | |||
52 | # Keep this in sync with the main YP QEMU integration | ||
53 | SRC_URI += "\ | ||
54 | file://powerpc_rom.bin \ | ||
55 | file://run-ptest \ | ||
56 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | ||
57 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ | ||
58 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | ||
59 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ | ||
60 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ | ||
61 | file://0007-qemu-Determinism-fixes.patch \ | ||
62 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
63 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | ||
64 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | ||
65 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ | ||
66 | file://fixedmeson.patch \ | ||
67 | file://no-pip.patch \ | ||
68 | file://qemu-guest-agent.init \ | ||
69 | file://qemu-guest-agent.udev \ | ||
70 | " | ||
71 | |||
72 | # Patch doesn't apply to 8.1.0 | ||
73 | # file://fixmips.patch | ||
74 | |||
75 | # Additional patches to match Scarthgap, which requires a slightly newer qmp interface | ||
76 | SRC_URI += "\ | ||
77 | file://0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch \ | ||
78 | file://0002-python-qemu-rename-command-to-cmd.patch \ | ||
79 | " | ||
80 | |||
81 | |||
82 | S = "${UNPACKDIR}/git" | ||
83 | |||
84 | # Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc | ||
85 | DISABLE_STATIC:pn-qemu-xilinx = "" | ||
86 | DISABLE_STATIC:pn-qemu-xilinx-native = "" | ||
87 | DISABLE_STATIC:pn-nativesdk-qemu-xilinx = "" | ||
88 | DISABLE_STATIC:pn-qemu-xilinx-system-native = "" | ||
89 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-multiarch-helper-native_1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-multiarch-helper-native_1.0.bb index 1eec0163..52c0da6a 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-multiarch-helper-native_1.0.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-multiarch-helper-native_1.0.bb | |||
@@ -15,6 +15,6 @@ do_compile[noexec] = "1" | |||
15 | SYSROOT_DIRS += "${bindir}/qemu-xilinx" | 15 | SYSROOT_DIRS += "${bindir}/qemu-xilinx" |
16 | 16 | ||
17 | do_install() { | 17 | do_install() { |
18 | install -Dm 0755 ${WORKDIR}/qemu-system-aarch64-multiarch ${D}${bindir}/qemu-system-aarch64-multiarch | 18 | install -Dm 0755 ${UNPACKDIR}/qemu-system-aarch64-multiarch ${D}${bindir}/qemu-system-aarch64-multiarch |
19 | } | 19 | } |
20 | 20 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc deleted file mode 100644 index e664a580..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | require recipes-devtools/qemu/qemu-native.inc | ||
2 | require qemu-xilinx-7.1.inc | ||
3 | |||
4 | DEPENDS = "glib-2.0-native zlib-native ninja-native meson-native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc new file mode 100644 index 00000000..ad00453f --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc | |||
@@ -0,0 +1,2 @@ | |||
1 | require qemu-native-8.1.inc | ||
2 | require qemu-xilinx-8.1.inc | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb deleted file mode 100644 index bfdb916d..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb deleted file mode 100644 index f91eb891..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb deleted file mode 100644 index a19b2cc3..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2023.1.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb deleted file mode 100644 index 78ffedca..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2023.2.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_8.1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_8.1.0.bb new file mode 100644 index 00000000..49ffbe6e --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_8.1.0.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | BPN = "qemu-xilinx" | ||
2 | |||
3 | DEPENDS += "glib-2.0-native zlib-native" | ||
4 | |||
5 | require qemu-xilinx-native-8.1.inc | ||
6 | require qemu-native-alt.inc | ||
7 | |||
8 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent" | ||
9 | |||
10 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend index 7c152d60..45bbccdf 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend | |||
@@ -1,5 +1,5 @@ | |||
1 | # Automatically enable pmu-rom-native for ZynqMP support | 1 | # Automatically enable pmu-rom-native for ZynqMP support |
2 | PMU_ROM_DEP[vardepsexclude] = "LICENSE_FLAGS_ACCEPTED" | 2 | PMU_ROM_DEP[vardepsexclude] = "LICENSE_FLAGS_ACCEPTED" |
3 | PMU_ROM_DEP = "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "xilinx", " pmu-rom-native", "", d)}" | 3 | PMU_ROM_DEP = "${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "xilinx xilinx_pmu-rom-native", " pmu-rom-native", "", d)}" |
4 | 4 | ||
5 | DEPENDS .= "${PMU_ROM_DEP}" | 5 | DEPENDS .= "${PMU_ROM_DEP}" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb deleted file mode 100644 index ba733ede..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.1.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb deleted file mode 100644 index 17386afe..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.2.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb deleted file mode 100644 index 3264c260..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2023.1.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb deleted file mode 100644 index fdf3be2e..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2023.2.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_8.1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_8.1.0.bb new file mode 100644 index 00000000..1e626ffe --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_8.1.0.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | BPN = "qemu-xilinx" | ||
2 | |||
3 | require qemu-system-native-alt.inc | ||
4 | require qemu-xilinx-native-8.1.inc | ||
5 | |||
6 | # As some of the files installed by qemu-native and qemu-system-native | ||
7 | # are the same, we depend on qemu-native to get the full installation set | ||
8 | # and avoid file clashes | ||
9 | DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native" | ||
10 | |||
11 | DEPENDS += "qemu-xilinx-multiarch-helper-native bootgen-native" | ||
12 | |||
13 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
14 | |||
15 | PACKAGECONFIG ??= "fdt alsa kvm pie slirp png gcrypt \ | ||
16 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
17 | " | ||
18 | |||
19 | # Handle distros such as CentOS 5 32-bit that do not have kvm support | ||
20 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
21 | |||
22 | do_install:append() { | ||
23 | install -Dm 0755 ${UNPACKDIR}/powerpc_rom.bin ${D}${datadir}/qemu-xilinx | ||
24 | |||
25 | # The following is also installed by qemu-native | ||
26 | rm -f ${D}${datadir}/qemu-xilinx/trace-events-all | ||
27 | rm -rf ${D}${datadir}/qemu-xilinx/keymaps | ||
28 | rm -rf ${D}${datadir}/icons/ | ||
29 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
30 | |||
31 | # Install qmp.py to be used with testimage | ||
32 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
33 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
34 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb deleted file mode 100644 index 96b26101..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | |||
26 | EXTRA_OECONF:append = "\ | ||
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | |||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
35 | |||
36 | do_install:append:class-nativesdk() { | ||
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb deleted file mode 100644 index c6e91fdd..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
9 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
10 | |||
11 | BBCLASSEXTEND = "nativesdk" | ||
12 | |||
13 | RDEPENDS:${PN}:class-target += "bash" | ||
14 | |||
15 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
16 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
17 | |||
18 | # Latest poky has changed the defaults, restore them to something compatible | ||
19 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
20 | EXTRA_OECONF:remove = "--disable-download" | ||
21 | EXTRA_OECONF:remove = "--disable-docs" | ||
22 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
23 | |||
24 | EXTRA_OECONF:append = "\ | ||
25 | --with-git=/bin/false \ | ||
26 | --with-git-submodules=ignore \ | ||
27 | --meson=meson \ | ||
28 | " | ||
29 | |||
30 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
31 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
32 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
33 | |||
34 | do_install:append:class-nativesdk() { | ||
35 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
36 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb deleted file mode 100644 index fca09883..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-xilinx-2023.1.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | |||
26 | EXTRA_OECONF:append = "\ | ||
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | |||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
35 | |||
36 | do_install:append:class-nativesdk() { | ||
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb deleted file mode 100644 index 070ae65f..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-xilinx-2023.2.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | |||
26 | EXTRA_OECONF:append = "\ | ||
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | |||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
35 | |||
36 | do_install:append:class-nativesdk() { | ||
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_8.1.0.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_8.1.0.bb new file mode 100644 index 00000000..4679174b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_8.1.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | BBCLASSEXTEND = "nativesdk" | ||
2 | |||
3 | require qemu-8.1.inc | ||
4 | require qemu-xilinx-8.1.inc | ||
5 | require qemu-alt.inc | ||
6 | |||
7 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" | ||
8 | |||
9 | DEPENDS:append:libc-musl = " libucontext" | ||
10 | |||
11 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | ||
12 | |||
13 | RDEPENDS:${PN}-common:class-target += "bash" | ||
14 | |||
15 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
16 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
17 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
18 | |||
19 | PACKAGECONFIG ??= " \ | ||
20 | fdt sdl kvm pie slirp gcrypt \ | ||
21 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ | ||
22 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
23 | ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ | ||
24 | " | ||
25 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp gcrypt \ | ||
26 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
27 | " | ||
28 | # ppc32 hosts are no longer supported in qemu | ||
29 | COMPATIBLE_HOST:powerpc = "null" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend index 04c89b83..9140060e 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_%.bbappend | |||
@@ -1,8 +1 @@ | |||
1 | require qemu-alt.inc | require qemu-alt.inc | |
2 | |||
3 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
4 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
5 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
6 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
7 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
8 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb new file mode 100644 index 00000000..4722e1f5 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | BBCLASSEXTEND = "nativesdk" | ||
2 | |||
3 | FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1" | ||
4 | |||
5 | require qemu-8.1.inc | ||
6 | |||
7 | DEPENDS += "glib-2.0 zlib pixman" | ||
8 | |||
9 | DEPENDS:append:libc-musl = " libucontext" | ||
10 | |||
11 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | ||
12 | |||
13 | RDEPENDS:${PN}-common:class-target += "bash" | ||
14 | |||
15 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
16 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
17 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
18 | |||
19 | PACKAGECONFIG ??= " \ | ||
20 | fdt sdl kvm pie slirp \ | ||
21 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ | ||
22 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
23 | ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ | ||
24 | " | ||
25 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \ | ||
26 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
27 | " | ||
28 | # ppc32 hosts are no longer supported in qemu | ||
29 | COMPATIBLE_HOST:powerpc = "null" | ||
diff --git a/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend b/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend new file mode 100644 index 00000000..d0bbaa0a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # On a Zynq system hardware breakpoints are limited, so used software | ||
2 | CFLAGS:append:zynq = " -DENABLE_HardwareBreakpoints=0" | ||
diff --git a/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend b/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend deleted file mode 100644 index 03823f6e..00000000 --- a/meta-xilinx-core/recipes-gnome/gtk+/gtk+3_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
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 @@ | |||
1 | From 7edb14622061e87bb4810fb648017b43e767d4c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 12:59:36 -0700 | ||
4 | Subject: [PATCH 1/5] [PATCH] libdrm: Update drm header file with XV15 and XV20 | ||
5 | |||
6 | This patch updates drm header file with YUV 420 and | ||
7 | YUV422 10 bit formats. | ||
8 | |||
9 | Signed-off-by: Satish Kumar Nagireddy <satish.nagireddy.nagireddy@xilinx.com> | ||
10 | Upstream-Status: Pending | ||
11 | Signed-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 | |||
16 | diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h | ||
17 | index 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 | -- | ||
36 | 2.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 @@ | |||
1 | From d159e3f782d33988e52db462948e2e0eab2b9a03 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
3 | Date: Thu, 17 Mar 2022 08:21:41 -0700 | ||
4 | Subject: [PATCH] headers: Sync with HDR from v5.15 | ||
5 | |||
6 | Sync drm_mode.h with linux-xlnx/include/uapi/drm/drm_mode.h for HDR | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-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 | |||
15 | diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h | ||
16 | index 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 | -- | ||
206 | 2.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 @@ | |||
1 | From de3fffbf7af9d28b5f9d9e118de448a54e2628dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Anil Kumar Mamidala <anil.mamidala@xilinx.com> | ||
3 | Date: Wed, 27 Oct 2021 16:04:47 +0530 | ||
4 | Subject: [PATCH] modetest: Add YUV444 and X403 format support for modetest | ||
5 | |||
6 | Add YUV44 8-bit and X403 10-bit formats support to modetest | ||
7 | for generating color bar pattern. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-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 | |||
19 | Index: 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: | ||
37 | Index: 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; | ||
106 | Index: 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) }, | ||
121 | Index: 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 @@ | |||
1 | From ab7aa7563e3b044f84f123f0ed59b370ff0af3f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
3 | Date: Mon, 24 Feb 2020 03:35:58 -0800 | ||
4 | Subject: [PATCH 2/5] modetest: call drmModeCrtcSetGamma() only if | ||
5 | add_property_optional returns true | ||
6 | |||
7 | gamma is a optional property then also it prints error message, so | ||
8 | set gamma only if add_property_optional() returns true. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
13 | --- | ||
14 | tests/modetest/modetest.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c | ||
18 | index 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 | -- | ||
31 | 2.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 @@ | |||
1 | From adc82a4820253ed3f42bf3af9003aa33636e6f89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anil Kumar M <amamidal@xilinx.com> | ||
3 | Date: Fri, 10 Apr 2020 21:35:47 +0530 | ||
4 | Subject: [PATCH 3/5] modetest: Add semiplanar 10bit pattern support for | ||
5 | modetest | ||
6 | |||
7 | Add XV15 and XV20 10 bit semiplanar formats support for | ||
8 | generating color bar pattern while running modetest command. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-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 | |||
19 | Index: 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; | ||
96 | Index: 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: | ||
590 | Index: 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 @@ | |||
1 | From ede95ded932a8f722f339fa345c098c705f40f08 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anil Kumar M <amamidal@xilinx.com> | ||
3 | Date: Wed, 16 Sep 2020 22:42:47 +0530 | ||
4 | Subject: [PATCH 4/5] modetest: fix smpte colour pattern issue for XV20 and | ||
5 | XV15 formats | ||
6 | |||
7 | Fix smpte colour issue for XV15 and XV20 formats. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Anil Kumar M <amamidal@xilinx.com> | ||
12 | --- | ||
13 | tests/util/pattern.c | 8 ++++---- | ||
14 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
15 | |||
16 | diff --git a/tests/util/pattern.c b/tests/util/pattern.c | ||
17 | index 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 | -- | ||
37 | 2.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 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
2 | |||
3 | |||
4 | SRC_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/libepoxy/libepoxy_%.bbappend b/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend deleted file mode 100644 index 03823f6e..00000000 --- a/meta-xilinx-core/recipes-graphics/libepoxy/libepoxy_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/files/egl.pc b/meta-xilinx-core/recipes-graphics/libgles/files/egl.pc deleted file mode 100644 index 65c4c1f3..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/files/egl.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: egl | ||
7 | Description: MALI EGL library | ||
8 | Requires.private: | ||
9 | Version: 17.3 | ||
10 | Libs: -L${libdir} -lEGL | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/files/gbm.pc b/meta-xilinx-core/recipes-graphics/libgles/files/gbm.pc deleted file mode 100644 index c40b5f4f..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/files/gbm.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: gbm | ||
7 | Description: MALI gbm library | ||
8 | Requires.private: | ||
9 | Version: 17.3 | ||
10 | Libs: -L${libdir} -lgbm | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/files/glesv1.pc b/meta-xilinx-core/recipes-graphics/libgles/files/glesv1.pc deleted file mode 100644 index 39467f33..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/files/glesv1.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: glesv1 | ||
7 | Description: MALI OpenGL ES 1.1 library | ||
8 | Requires.private: | ||
9 | Version: 17.3 | ||
10 | Libs: -L${libdir} -lGLESv1_CM | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/files/glesv1_cm.pc b/meta-xilinx-core/recipes-graphics/libgles/files/glesv1_cm.pc deleted file mode 100644 index 1547b4c8..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/files/glesv1_cm.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: gles_cm | ||
7 | Description: Mali OpenGL ES 1.1 CM library | ||
8 | Requires.private: | ||
9 | Version: 17.3 | ||
10 | Libs: -L${libdir} -lGLESv1_CM | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/files/glesv2.pc b/meta-xilinx-core/recipes-graphics/libgles/files/glesv2.pc deleted file mode 100644 index a0a84f23..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/files/glesv2.pc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | prefix=/usr | ||
2 | exec_prefix=${prefix} | ||
3 | libdir=/usr/lib | ||
4 | includedir=/usr/include | ||
5 | |||
6 | Name: glesv2 | ||
7 | Description: MALI OpenGL ES 2.0 library | ||
8 | Requires.private: | ||
9 | Version: 17.3 | ||
10 | Libs: -L${libdir} -lGLESv2 | ||
11 | Libs.private: -lm -lpthread -ldl | ||
12 | Cflags: -I${includedir} | ||
diff --git a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb deleted file mode 100644 index db99c4d7..00000000 --- a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb +++ /dev/null | |||
@@ -1,200 +0,0 @@ | |||
1 | DESCRIPTION = "libGLES for ZynqMP with Mali 400" | ||
2 | |||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://EULA;md5=82e466d0ed92c5a15f568dbe6b31089c" | ||
5 | |||
6 | inherit features_check update-alternatives | ||
7 | |||
8 | ANY_OF_DISTRO_FEATURES = "x11 fbdev wayland" | ||
9 | REQUIRED_MACHINE_FEATURES = "mali400" | ||
10 | |||
11 | PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm" | ||
12 | |||
13 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
14 | |||
15 | REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https" | ||
16 | BRANCH ?= "xlnx_rel_v2023.2" | ||
17 | SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" | ||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | |||
20 | PV = "r9p0-01rel0" | ||
21 | SRC_URI = " \ | ||
22 | ${REPO};${BRANCHARG} \ | ||
23 | file://egl.pc \ | ||
24 | file://glesv1_cm.pc \ | ||
25 | file://glesv1.pc \ | ||
26 | file://glesv2.pc \ | ||
27 | file://gbm.pc \ | ||
28 | " | ||
29 | |||
30 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | # If were switching at runtime, we would need all RDEPENDS needed for all backends available | ||
35 | X11RDEPENDS = "libxdamage libxext libx11 libdrm libxfixes" | ||
36 | X11DEPENDS = "libxdamage libxext virtual/libx11 libdrm libxfixes" | ||
37 | |||
38 | # Don't install runtime dependencies for other backends unless the DISTRO supports it | ||
39 | RDEPENDS:${PN} = " \ | ||
40 | kernel-module-mali \ | ||
41 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11RDEPENDS}', '', d)} \ | ||
42 | " | ||
43 | |||
44 | # We dont build anything but we want to avoid QA warning build-deps | ||
45 | DEPENDS = "\ | ||
46 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ | ||
47 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland libdrm', '', d)} \ | ||
48 | " | ||
49 | |||
50 | |||
51 | # x11 is default, set to "fbdev" , "wayland", or "headless" if required | ||
52 | MALI_BACKEND_DEFAULT ?= "x11" | ||
53 | |||
54 | USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}" | ||
55 | USE_FB = "${@bb.utils.contains("DISTRO_FEATURES", "fbdev", "yes", "no", d)}" | ||
56 | USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" | ||
57 | |||
58 | MONOLITHIC_LIBMALI = "libMali.so.9.0" | ||
59 | |||
60 | do_install() { | ||
61 | #Identify the ARCH type | ||
62 | ${TARGET_PREFIX}gcc --version > ARCH_PLATFORM | ||
63 | if grep -q aarch64 "ARCH_PLATFORM"; then | ||
64 | ARCH_PLATFORM_DIR=aarch64-linux-gnu | ||
65 | else | ||
66 | ARCH_PLATFORM_DIR=arm-linux-gnueabihf | ||
67 | fi | ||
68 | |||
69 | # install headers | ||
70 | install -d -m 0655 ${D}${includedir}/EGL | ||
71 | install -m 0644 ${S}/${PV}/glesHeaders/EGL/*.h ${D}${includedir}/EGL/ | ||
72 | install -d -m 0655 ${D}${includedir}/GLES | ||
73 | install -m 0644 ${S}/${PV}/glesHeaders/GLES/*.h ${D}${includedir}/GLES/ | ||
74 | install -d -m 0655 ${D}${includedir}/GLES2 | ||
75 | install -m 0644 ${S}/${PV}/glesHeaders/GLES2/*.h ${D}${includedir}/GLES2/ | ||
76 | install -d -m 0655 ${D}${includedir}/KHR | ||
77 | install -m 0644 ${S}/${PV}/glesHeaders/KHR/*.h ${D}${includedir}/KHR/ | ||
78 | |||
79 | install -d ${D}${libdir}/pkgconfig | ||
80 | install -m 0644 ${WORKDIR}/egl.pc ${D}${libdir}/pkgconfig/egl.pc | ||
81 | install -m 0644 ${WORKDIR}/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc | ||
82 | install -m 0644 ${WORKDIR}/glesv1.pc ${D}${libdir}/pkgconfig/glesv1.pc | ||
83 | install -m 0644 ${WORKDIR}/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc | ||
84 | |||
85 | install -d ${D}${libdir} | ||
86 | install -d ${D}${includedir} | ||
87 | |||
88 | cp -a --no-preserve=ownership ${S}/${PV}/${ARCH_PLATFORM_DIR}/common/*.so* ${D}${libdir} | ||
89 | |||
90 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/headless/${MONOLITHIC_LIBMALI} | ||
91 | ln -snf headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | ||
92 | |||
93 | if [ "${USE_FB}" = "yes" ]; then | ||
94 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/fbdev/${MONOLITHIC_LIBMALI} | ||
95 | if [ "${MALI_BACKEND_DEFAULT}" = "fbdev" ]; then | ||
96 | ln -snf fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | ||
97 | fi | ||
98 | fi | ||
99 | if [ "${USE_X11}" = "yes" ]; then | ||
100 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/x11/${MONOLITHIC_LIBMALI} ${D}${libdir}/x11/${MONOLITHIC_LIBMALI} | ||
101 | if [ "${MALI_BACKEND_DEFAULT}" = "x11" ]; then | ||
102 | ln -snf x11/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | ||
103 | fi | ||
104 | else | ||
105 | # We cant rely on the fact that all apps will use pkgconfig correctly | ||
106 | sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if (1)/' ${D}${includedir}/EGL/eglplatform.h | ||
107 | fi | ||
108 | if [ "${USE_WL}" = "yes" ]; then | ||
109 | install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/ | ||
110 | install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc | ||
111 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/wayland/${MONOLITHIC_LIBMALI} | ||
112 | if [ "${MALI_BACKEND_DEFAULT}" = "wayland" ]; then | ||
113 | ln -snf wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | ||
114 | fi | ||
115 | fi | ||
116 | } | ||
117 | |||
118 | |||
119 | # We need separate packages to provide multiple alternatives, at this point we install | ||
120 | # everything on the default one but that can be split if necessary | ||
121 | PACKAGES += "${@bb.utils.contains("DISTRO_FEATURES", "x11", "${PN}-x11", "", d)}" | ||
122 | PACKAGES += "${@bb.utils.contains("DISTRO_FEATURES", "fbdev", "${PN}-fbdev", "", d)}" | ||
123 | PACKAGES += "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "${PN}-wayland", "", d)}" | ||
124 | PACKAGES += "${PN}-headless" | ||
125 | |||
126 | # This is default/common for all alternatives | ||
127 | ALTERNATIVE_LINK_NAME[libmali-xlnx] = "${libdir}/${MONOLITHIC_LIBMALI}" | ||
128 | |||
129 | |||
130 | # Declare alternatives and corresponding library location | ||
131 | ALTERNATIVE:${PN}-x11 = "libmali-xlnx" | ||
132 | ALTERNATIVE_TARGET_libmali-xlnx-x11[libmali-xlnx] = "${libdir}/x11/${MONOLITHIC_LIBMALI}" | ||
133 | |||
134 | ALTERNATIVE:${PN}-fbdev = "libmali-xlnx" | ||
135 | ALTERNATIVE_TARGET_libmali-xlnx-fbdev[libmali-xlnx] = "${libdir}/fbdev/${MONOLITHIC_LIBMALI}" | ||
136 | |||
137 | ALTERNATIVE:${PN}-wayland = "libmali-xlnx" | ||
138 | ALTERNATIVE_TARGET_libmali-xlnx-wayland[libmali-xlnx] = "${libdir}/wayland/${MONOLITHIC_LIBMALI}" | ||
139 | |||
140 | ALTERNATIVE:${PN}-headless = "libmali-xlnx" | ||
141 | ALTERNATIVE_TARGET_libmali-xlnx-headless[libmali-xlnx] = "${libdir}/headless/${MONOLITHIC_LIBMALI}" | ||
142 | |||
143 | # Set priorities according to what we prveiously defined | ||
144 | ALTERNATIVE_PRIORITY_libmali-xlnx-x11[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "x11", "20", "10", d)}" | ||
145 | ALTERNATIVE_PRIORITY_libmali-xlnx-fbdev[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "fbdev", "20", "10", d)}" | ||
146 | ALTERNATIVE_PRIORITY_libmali-xlnx-wayland[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "wayland", "20", "10", d)}" | ||
147 | |||
148 | # If misconfigured, fallback to headless | ||
149 | ALTERNATIVE_PRIORITY_libmali-xlnx-headless[libmali-xlnx] = "${@bb.utils.contains("MALI_BACKEND_DEFAULT", "headless", "20", "15", d)}" | ||
150 | |||
151 | |||
152 | # Package gets renamed on the debian class, but we want to keep -xlnx | ||
153 | DEBIAN_NOAUTONAME:libmali-xlnx = "1" | ||
154 | |||
155 | # Update alternatives will actually have separate postinst scripts (one for each package) | ||
156 | # This wont work for us, so we create a common postinst script and we pass that as the general | ||
157 | # libmali-xlnx postinst script, but we defer execution to run on first boot (pkg_postinst_ontarget). | ||
158 | # This will avoid ldconfig removing the symbolic links when creating the root filesystem. | ||
159 | python populate_packages_updatealternatives:append () { | ||
160 | # We need to remove the 'fake' libmali-xlnx before creating any links | ||
161 | libdir = d.getVar('libdir') | ||
162 | common_postinst = "#!/bin/sh\nrm " + libdir + "/${MONOLITHIC_LIBMALI}\n" | ||
163 | for pkg in (d.getVar('PACKAGES') or "").split(): | ||
164 | # Not all packages provide an alternative (e.g. ${PN}-lic) | ||
165 | postinst = d.getVar('pkg_postinst:%s' % pkg) | ||
166 | if postinst: | ||
167 | old_postinst = postinst | ||
168 | new_postinst = postinst.replace('#!/bin/sh','') | ||
169 | common_postinst += new_postinst | ||
170 | d.setVar('pkg_postinst_ontarget:%s' % 'libmali-xlnx', common_postinst) | ||
171 | } | ||
172 | |||
173 | |||
174 | # Inhibit warnings about files being stripped | ||
175 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
176 | INHIBIT_PACKAGE_STRIP = "1" | ||
177 | INHIBIT_SYSROOT_STRIP = "1" | ||
178 | |||
179 | RREPLACES:${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm" | ||
180 | RPROVIDES:${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm" | ||
181 | RCONFLICTS:${PN} = "libegl libgles1 libglesv1-cm1 libgles2 libglesv2-2 libgbm" | ||
182 | |||
183 | # These libraries shouldn't get installed in world builds unless something | ||
184 | # explicitly depends upon them. | ||
185 | EXCLUDE_FROM_WORLD = "1" | ||
186 | FILES:${PN} += "${libdir}/*" | ||
187 | |||
188 | do_package:append() { | ||
189 | |||
190 | shlibswork_dir = d.getVar('SHLIBSWORKDIR') | ||
191 | pkg_filename = d.getVar('PN') + ".list" | ||
192 | shlibs_file = os.path.join(shlibswork_dir, pkg_filename) | ||
193 | lines = "" | ||
194 | with open(shlibs_file, "r") as f: | ||
195 | lines = f.readlines() | ||
196 | with open(shlibs_file, "w") as f: | ||
197 | for line in lines: | ||
198 | if d.getVar('MALI_BACKEND_DEFAULT') in line.strip("\n"): | ||
199 | f.write(line) | ||
200 | } | ||
diff --git a/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend b/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend deleted file mode 100644 index e824a179..00000000 --- a/meta-xilinx-core/recipes-graphics/libglu/libglu_%.bbappend +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # OpenGL comes from libmali, adjust parameters | ||
2 | MALI_DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', ' virtual/libgles2', '', d)}" | ||
3 | DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' ${MALI_DEPENDS}', '', d)}" | ||
4 | |||
5 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
6 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
7 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
8 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
9 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
10 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
11 | |||
diff --git a/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend b/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend deleted file mode 100644 index 03823f6e..00000000 --- a/meta-xilinx-core/recipes-graphics/libsdl2/libsdl2_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb deleted file mode 100644 index 268759c2..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | SUMMARY = "A Mali 400 Linux Kernel module" | ||
2 | SECTION = "kernel/modules" | ||
3 | |||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = " \ | ||
6 | file://linux/license/gpl/mali_kernel_license.h;md5=f5af2d61f4c1eb262cb6a557aaa1070a \ | ||
7 | " | ||
8 | |||
9 | PV = "r9p0-01rel0" | ||
10 | |||
11 | SRC_URI = " \ | ||
12 | https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-utgard-gpu/DX910-SW-99002-${PV}.tgz \ | ||
13 | file://0001-Change-Makefile-to-be-compatible-with-Yocto.patch \ | ||
14 | file://0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch \ | ||
15 | file://0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch \ | ||
16 | file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \ | ||
17 | file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ | ||
18 | file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch \ | ||
19 | file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ | ||
20 | file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ | ||
21 | file://0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch\ | ||
22 | file://0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch\ | ||
23 | file://0014-linux-mali_-timer-Get-rid-of-init_timer.patch\ | ||
24 | file://0015-fix-driver-failed-to-check-map-error.patch \ | ||
25 | file://0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch \ | ||
26 | file://0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch \ | ||
27 | file://0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch \ | ||
28 | file://0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch \ | ||
29 | file://0020-Fix-ioremap_nocache-deprecation-in-kernel-5.6.patch \ | ||
30 | file://0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch \ | ||
31 | file://0022-Set-HAVE_UNLOCKED_IOCTL-default-to-true.patch \ | ||
32 | file://0023-Use-PTR_ERR_OR_ZERO-instead-of-PTR_RET.patch \ | ||
33 | file://0024-Use-community-device-tree-names.patch \ | ||
34 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ | ||
35 | file://0026-Fix-gpu-driver-probe-failure.patch \ | ||
36 | file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ | ||
37 | " | ||
38 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" | ||
39 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" | ||
40 | |||
41 | inherit features_check module | ||
42 | |||
43 | PARALLEL_MAKE = "-j 1" | ||
44 | |||
45 | S = "${WORKDIR}/DX910-SW-99002-${PV}/driver/src/devicedrv/mali" | ||
46 | |||
47 | REQUIRED_MACHINE_FEATURES = "mali400" | ||
48 | |||
49 | EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \ | ||
50 | ARCH="${ARCH}" \ | ||
51 | BUILD=release \ | ||
52 | MALI_PLATFORM="arm" \ | ||
53 | USING_DT=1 \ | ||
54 | MALI_SHARED_INTERRUPTS=1 \ | ||
55 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
56 | MALI_QUIET=1 \ | ||
57 | ' | ||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch deleted file mode 100644 index 3c82f602..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0001-Change-Makefile-to-be-compatible-with-Yocto.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 6d283b9aa3f7fb761da4cb076b47a62275fc4caa Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Tue, 21 Nov 2017 03:57:25 -0800 | ||
4 | Subject: [PATCH 1/9] Change Makefile to be compatible with Yocto | ||
5 | |||
6 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | ||
7 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
8 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
9 | Upstream Status: Inappropriate [Xilinx specific] | ||
10 | --- | ||
11 | driver/src/devicedrv/mali/Makefile | 11 +++++++++-- | ||
12 | 1 file changed, 9 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile | ||
15 | index 5a259fe..a6dd94c 100644 | ||
16 | --- Makefile | ||
17 | +++ b/Makefile | ||
18 | @@ -89,7 +89,11 @@ endif | ||
19 | # Define host system directory | ||
20 | KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build | ||
21 | |||
22 | -include $(KDIR)/.config | ||
23 | +ifeq ($(O),) | ||
24 | + -include $(KDIR)/.config | ||
25 | +else | ||
26 | + -include $(O)/.config | ||
27 | +endif | ||
28 | |||
29 | ifeq ($(ARCH), arm) | ||
30 | # when compiling for ARM we're cross compiling | ||
31 | @@ -204,9 +208,12 @@ EXTRA_DEFINES += -DMALI_MEM_SWAP_TRACKING=1 | ||
32 | endif | ||
33 | |||
34 | all: $(UMP_SYMVERS_FILE) | ||
35 | - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules | ||
36 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules | ||
37 | @rm $(FILES_PREFIX)__malidrv_build_info.c $(FILES_PREFIX)__malidrv_build_info.o | ||
38 | |||
39 | +modules_install: | ||
40 | + $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules_install | ||
41 | + | ||
42 | clean: | ||
43 | $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean | ||
44 | |||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch deleted file mode 100644 index 0a7b6736..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From f27aab2b0e4d5dea9b5a0e4648c142257940c428 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | ||
3 | Date: Thu, 25 Jun 2015 17:14:42 -0700 | ||
4 | Subject: [PATCH 2/9] staging: mali: r8p0-01rel0: Add the ZYNQ/ZYNQMP platform | ||
5 | |||
6 | Add the number of PP cores that is required for Zynq/ZynqMP configuration. | ||
7 | |||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
9 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
10 | Upstream Status: Inappropriate [Xilinx specific] | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/platform/arm/arm.c | 10 ++++++++++ | ||
13 | 1 file changed, 10 insertions(+) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | ||
16 | index 4e09aca..fac99bc 100644 | ||
17 | --- platform/arm/arm.c | ||
18 | +++ b/platform/arm/arm.c | ||
19 | @@ -261,6 +261,10 @@ static struct mali_gpu_device_data mali_gpu_data = { | ||
20 | .dedicated_mem_start = 0x80000000, /* Physical start address (use 0xD0000000 for old indirect setup) */ | ||
21 | .dedicated_mem_size = 0x10000000, /* 256MB */ | ||
22 | #endif | ||
23 | +#if defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP) | ||
24 | + .fb_start = 0x00000000, | ||
25 | + .fb_size = 0xfffff000, | ||
26 | +#else | ||
27 | #if defined(CONFIG_ARM64) | ||
28 | /* Some framebuffer drivers get the framebuffer dynamically, such as through GEM, | ||
29 | * in which the memory resource can't be predicted in advance. | ||
30 | @@ -271,6 +275,7 @@ static struct mali_gpu_device_data mali_gpu_data = { | ||
31 | .fb_start = 0xe0000000, | ||
32 | .fb_size = 0x01000000, | ||
33 | #endif | ||
34 | +#endif /* !defined(CONFIG_ARCH_ZYNQ) && !defined(CONFIG_ARCH_ZYNQMP) */ | ||
35 | .control_interval = 1000, /* 1000ms */ | ||
36 | .utilization_callback = mali_gpu_utilization_callback, | ||
37 | .get_clock_info = NULL, | ||
38 | @@ -505,6 +510,11 @@ int mali_platform_device_init(struct platform_device *device) | ||
39 | mali_write_phys(0xC0010020, 0xA); /* Enable direct memory mapping for FPGA */ | ||
40 | } | ||
41 | } | ||
42 | +#elif defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP) | ||
43 | + | ||
44 | + MALI_DEBUG_PRINT(4, ("Registering Zynq/ZynqMP Mali-400 device\n")); | ||
45 | + num_pp_cores = 2; | ||
46 | + | ||
47 | #endif | ||
48 | |||
49 | /* After kernel 3.15 device tree will default set dev | ||
50 | -- | ||
51 | 2.7.4 | ||
52 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch deleted file mode 100644 index 98aa6ac9..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From d6e44bbf8d1377f78481f611dec237e8d24baf74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Tue, 21 Nov 2017 04:00:27 -0800 | ||
4 | Subject: [PATCH 3/9] staging: mali: r8p0-01rel0: Remove unused trace macros | ||
5 | |||
6 | TRACE_SYSTEM_STRING is not need in each trace file anymore. | ||
7 | |||
8 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
10 | Upstream Status: Pending | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/linux/mali_linux_trace.h | 2 -- | ||
13 | 1 file changed, 2 deletions(-) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/linux/mali_linux_trace.h b/driver/src/devicedrv/mali/linux/mali_linux_trace.h | ||
16 | index 7f0b19d..33cb1ca 100644 | ||
17 | --- linux/mali_linux_trace.h | ||
18 | +++ b/linux/mali_linux_trace.h | ||
19 | @@ -13,13 +13,11 @@ | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | -#include <linux/stringify.h> | ||
24 | #include <linux/tracepoint.h> | ||
25 | |||
26 | #undef TRACE_SYSTEM | ||
27 | #define TRACE_SYSTEM mali | ||
28 | #ifndef TRACEPOINTS_ENABLED | ||
29 | -#define TRACE_SYSTEM_STRING __stringfy(TRACE_SYSTEM) | ||
30 | #endif | ||
31 | #define TRACE_INCLUDE_PATH . | ||
32 | #define TRACE_INCLUDE_FILE mali_linux_trace | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch deleted file mode 100644 index c5c49679..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 2f5e8944357f43fbde4cb642c6ee4a699c88efb5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hyun Kwon <hyun.kwon@xilinx.com> | ||
3 | Date: Wed, 29 Jun 2016 09:14:37 -0700 | ||
4 | Subject: [PATCH 4/9] staging: mali: r8p0-01rel0: Don't include | ||
5 | mali_read_phys() for zynq/zynqmp | ||
6 | |||
7 | mali_read_phys() is not used with CONFIG_ARCH_ZYNQ and CONFIG_ARCH_ZYNQMP. | ||
8 | |||
9 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
10 | Upstream Status: Inappropriate [Xilinx specific] | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/platform/arm/arm.c | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | ||
16 | index fac99bc..62f9be6 100644 | ||
17 | --- platform/arm/arm.c | ||
18 | +++ b/platform/arm/arm.c | ||
19 | @@ -38,7 +38,9 @@ | ||
20 | static int mali_core_scaling_enable = 0; | ||
21 | |||
22 | void mali_gpu_utilization_callback(struct mali_gpu_utilization_data *data); | ||
23 | +#if !(defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP)) | ||
24 | static u32 mali_read_phys(u32 phys_addr); | ||
25 | +#endif | ||
26 | #if defined(CONFIG_ARCH_REALVIEW) | ||
27 | static void mali_write_phys(u32 phys_addr, u32 value); | ||
28 | #endif | ||
29 | @@ -578,6 +580,7 @@ int mali_platform_device_deinit(struct platform_device *device) | ||
30 | |||
31 | #endif /* CONFIG_MALI_DT */ | ||
32 | |||
33 | +#if !(defined(CONFIG_ARCH_ZYNQ) || defined(CONFIG_ARCH_ZYNQMP)) | ||
34 | static u32 mali_read_phys(u32 phys_addr) | ||
35 | { | ||
36 | u32 phys_addr_page = phys_addr & 0xFFFFE000; | ||
37 | @@ -592,6 +595,7 @@ static u32 mali_read_phys(u32 phys_addr) | ||
38 | |||
39 | return ret; | ||
40 | } | ||
41 | +#endif | ||
42 | |||
43 | #if defined(CONFIG_ARCH_REALVIEW) | ||
44 | static void mali_write_phys(u32 phys_addr, u32 value) | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch deleted file mode 100644 index 3d784604..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | From e67e20ec6ff0c9720d87844270421453c738066a Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Thu, 16 Feb 2017 12:15:58 -0800 | ||
4 | Subject: [PATCH 5/9] linux/mali_kernel_linux.c: Handle clock when probed and | ||
5 | removed | ||
6 | |||
7 | This patch will handle the clock through clock | ||
8 | specifier for GPU PP0 and PP1. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
11 | Upstream Status: Inappropriate [Xilinx specific] | ||
12 | --- | ||
13 | .../src/devicedrv/mali/linux/mali_kernel_linux.c | 40 +++++++++++++++++++++- | ||
14 | 1 file changed, 39 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c | ||
17 | index d7893a3..f15fb56 100644 | ||
18 | --- linux/mali_kernel_linux.c | ||
19 | +++ b/linux/mali_kernel_linux.c | ||
20 | @@ -45,6 +45,14 @@ | ||
21 | #if defined(CONFIG_MALI400_INTERNAL_PROFILING) | ||
22 | #include "mali_profiling_internal.h" | ||
23 | #endif | ||
24 | + | ||
25 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
26 | +/* Initialize variables for clocks */ | ||
27 | +struct clk *clk_gpu; | ||
28 | +struct clk *clk_gpu_pp0; | ||
29 | +struct clk *clk_gpu_pp1; | ||
30 | +#endif | ||
31 | + | ||
32 | #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS) | ||
33 | #include "mali_osk_profiling.h" | ||
34 | #include "mali_dvfs_policy.h" | ||
35 | @@ -580,7 +588,23 @@ static int mali_probe(struct platform_device *pdev) | ||
36 | } | ||
37 | #endif | ||
38 | |||
39 | - | ||
40 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
41 | + /* Initialize clocks for GPU and PP */ | ||
42 | + clk_gpu = devm_clk_get(&pdev->dev, "gpu"); | ||
43 | + if (IS_ERR(clk_gpu)) | ||
44 | + return PTR_ERR(clk_gpu); | ||
45 | + clk_prepare_enable(clk_gpu); | ||
46 | + | ||
47 | + clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0"); | ||
48 | + if (IS_ERR(clk_gpu_pp0)) | ||
49 | + return PTR_ERR(clk_gpu_pp0); | ||
50 | + clk_prepare_enable(clk_gpu_pp0); | ||
51 | + | ||
52 | + clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1"); | ||
53 | + if (IS_ERR(clk_gpu_pp1)) | ||
54 | + return PTR_ERR(clk_gpu_pp1); | ||
55 | + clk_prepare_enable(clk_gpu_pp1); | ||
56 | +#endif | ||
57 | if (_MALI_OSK_ERR_OK == _mali_osk_wq_init()) { | ||
58 | /* Initialize the Mali GPU HW specified by pdev */ | ||
59 | if (_MALI_OSK_ERR_OK == mali_initialize_subsystems()) { | ||
60 | @@ -608,6 +632,12 @@ static int mali_probe(struct platform_device *pdev) | ||
61 | _mali_osk_wq_term(); | ||
62 | } | ||
63 | |||
64 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
65 | + clk_disable_unprepare(clk_gpu); | ||
66 | + clk_disable_unprepare(clk_gpu_pp0); | ||
67 | + clk_disable_unprepare(clk_gpu_pp1); | ||
68 | +#endif | ||
69 | + | ||
70 | #ifdef CONFIG_MALI_DEVFREQ | ||
71 | mali_devfreq_term(mdev); | ||
72 | devfreq_init_failed: | ||
73 | @@ -673,6 +703,14 @@ static int mali_remove(struct platform_device *pdev) | ||
74 | mali_platform_device_deinit(mali_platform_device); | ||
75 | #endif | ||
76 | mali_platform_device = NULL; | ||
77 | + | ||
78 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
79 | + /* Remove clock */ | ||
80 | + clk_disable_unprepare(clk_gpu); | ||
81 | + clk_disable_unprepare(clk_gpu_pp0); | ||
82 | + clk_disable_unprepare(clk_gpu_pp1); | ||
83 | +#endif | ||
84 | + | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | -- | ||
89 | 2.7.4 | ||
90 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch deleted file mode 100644 index 3e1745fd..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From ed7242238151c12029c566d1974058c579d8ae3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Wed, 25 Jan 2017 10:00:33 -0800 | ||
4 | Subject: [PATCH 6/9] arm.c: global variable dma_ops is removed from the kernel | ||
5 | 4.7 | ||
6 | |||
7 | Refer kernel commit 1dccb598df549d892b6450c261da54cdd7af44b4, the global | ||
8 | dma_ops variable and the special-casing for ACPI is removed , and just | ||
9 | returns the dma ops that got set for the device, or the dummy_dma_ops | ||
10 | if none were present. | ||
11 | |||
12 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
13 | Upstream Status: Pending | ||
14 | --- | ||
15 | driver/src/devicedrv/mali/platform/arm/arm.c | 3 ++- | ||
16 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/driver/src/devicedrv/mali/platform/arm/arm.c b/driver/src/devicedrv/mali/platform/arm/arm.c | ||
19 | index 62f9be6..57ca989 100644 | ||
20 | --- platform/arm/arm.c | ||
21 | +++ b/platform/arm/arm.c | ||
22 | @@ -529,8 +529,9 @@ int mali_platform_device_init(struct platform_device *device) | ||
23 | */ | ||
24 | if (!device->dev.dma_mask) | ||
25 | device->dev.dma_mask = &device->dev.coherent_dma_mask; | ||
26 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)) | ||
27 | device->dev.archdata.dma_ops = dma_ops; | ||
28 | - | ||
29 | +#endif | ||
30 | err = platform_device_add_data(device, &mali_gpu_data, sizeof(mali_gpu_data)); | ||
31 | |||
32 | if (0 == err) { | ||
33 | -- | ||
34 | 2.7.4 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch deleted file mode 100644 index 98a86c88..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 58e2c55176f1a146781430b2a570c8ce5f80d426 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Mon, 28 Aug 2017 09:40:37 -0700 | ||
4 | Subject: [PATCH] common/mali_pm.c: Add PM runtime barrier after removing | ||
5 | suspend | ||
6 | |||
7 | Runtime PM suspend "put" results in addition of PM suspend | ||
8 | API in work queue. This barrier API will remove it from | ||
9 | the work queue. | ||
10 | |||
11 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
12 | Upstream-Status: Pending | ||
13 | --- | ||
14 | driver/src/devicedrv/mali/common/mali_pm.c | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/driver/src/devicedrv/mali/common/mali_pm.c b/driver/src/devicedrv/mali/common/mali_pm.c | ||
18 | index 858c689..62a1e5f 100644 | ||
19 | --- common/mali_pm.c | ||
20 | +++ b/common/mali_pm.c | ||
21 | @@ -301,6 +301,7 @@ void mali_pm_init_end(void) | ||
22 | } | ||
23 | |||
24 | _mali_osk_pm_dev_ref_put(); | ||
25 | + _mali_osk_pm_dev_barrier(); | ||
26 | } | ||
27 | |||
28 | void mali_pm_update_sync(void) | ||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch deleted file mode 100644 index 38ab4042..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | From aeff13ad9e9ef73172a9325f669aefd3c0403dbb Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
3 | Date: Wed, 21 Feb 2018 16:52:15 -0800 | ||
4 | Subject: [PATCH] linux/mali_kernel_linux.c: Enable/disable clock for runtime | ||
5 | resume/suspend | ||
6 | |||
7 | Enable/Disable the clock for GP,PP0 and PP1 during runtime | ||
8 | resume/suspend. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> | ||
11 | Reviewed-by: Hyun Kwon <hyunk@xilinx.com> | ||
12 | Upstream Status: Inappropriate [Xilinx specific] | ||
13 | --- | ||
14 | .../src/devicedrv/mali/linux/mali_kernel_linux.c | 65 ++++++++++++++++++---- | ||
15 | 1 file changed, 54 insertions(+), 11 deletions(-) | ||
16 | |||
17 | diff --git a/driver/src/devicedrv/mali/linux/mali_kernel_linux.c b/driver/src/devicedrv/mali/linux/mali_kernel_linux.c | ||
18 | index f15fb56..e61f33b 100644 | ||
19 | --- linux/mali_kernel_linux.c | ||
20 | +++ b/linux/mali_kernel_linux.c | ||
21 | @@ -51,6 +51,7 @@ | ||
22 | struct clk *clk_gpu; | ||
23 | struct clk *clk_gpu_pp0; | ||
24 | struct clk *clk_gpu_pp1; | ||
25 | +mali_bool clk_enabled; | ||
26 | #endif | ||
27 | |||
28 | #if defined(CONFIG_MALI400_PROFILING) && defined(CONFIG_MALI_DVFS) | ||
29 | @@ -281,6 +282,46 @@ struct file_operations mali_fops = { | ||
30 | .mmap = mali_mmap | ||
31 | }; | ||
32 | |||
33 | +static int mali_enable_clk(void) | ||
34 | +{ | ||
35 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
36 | + int err = 0; | ||
37 | + | ||
38 | + if (clk_enabled) | ||
39 | + return 0; | ||
40 | + | ||
41 | + clk_enabled = MALI_TRUE; | ||
42 | + err = clk_prepare_enable(clk_gpu); | ||
43 | + if (err) { | ||
44 | + MALI_PRINT_ERROR(("Could not enable clock for GP\n\r")); | ||
45 | + return err; | ||
46 | + } | ||
47 | + err = clk_prepare_enable(clk_gpu_pp0); | ||
48 | + if (err) { | ||
49 | + MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r")); | ||
50 | + return err; | ||
51 | + } | ||
52 | + err = clk_prepare_enable(clk_gpu_pp1); | ||
53 | + if (err) { | ||
54 | + MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r")); | ||
55 | + return err; | ||
56 | + } | ||
57 | +#endif | ||
58 | + return 0; | ||
59 | +} | ||
60 | + | ||
61 | +static void mali_disable_clk(void) | ||
62 | +{ | ||
63 | +#if defined(CONFIG_ARCH_ZYNQMP) | ||
64 | + if (clk_enabled) { | ||
65 | + clk_enabled = MALI_FALSE; | ||
66 | + clk_disable_unprepare(clk_gpu); | ||
67 | + clk_disable_unprepare(clk_gpu_pp0); | ||
68 | + clk_disable_unprepare(clk_gpu_pp1); | ||
69 | + } | ||
70 | +#endif | ||
71 | +} | ||
72 | + | ||
73 | #if MALI_ENABLE_CPU_CYCLES | ||
74 | void mali_init_cpu_time_counters(int reset, int enable_divide_by_64) | ||
75 | { | ||
76 | @@ -593,18 +634,19 @@ static int mali_probe(struct platform_device *pdev) | ||
77 | clk_gpu = devm_clk_get(&pdev->dev, "gpu"); | ||
78 | if (IS_ERR(clk_gpu)) | ||
79 | return PTR_ERR(clk_gpu); | ||
80 | - clk_prepare_enable(clk_gpu); | ||
81 | |||
82 | clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0"); | ||
83 | if (IS_ERR(clk_gpu_pp0)) | ||
84 | return PTR_ERR(clk_gpu_pp0); | ||
85 | - clk_prepare_enable(clk_gpu_pp0); | ||
86 | |||
87 | clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1"); | ||
88 | if (IS_ERR(clk_gpu_pp1)) | ||
89 | return PTR_ERR(clk_gpu_pp1); | ||
90 | - clk_prepare_enable(clk_gpu_pp1); | ||
91 | #endif | ||
92 | + | ||
93 | + err = mali_enable_clk(); | ||
94 | + if (err) | ||
95 | + return err; | ||
96 | if (_MALI_OSK_ERR_OK == _mali_osk_wq_init()) { | ||
97 | /* Initialize the Mali GPU HW specified by pdev */ | ||
98 | if (_MALI_OSK_ERR_OK == mali_initialize_subsystems()) { | ||
99 | @@ -632,11 +674,6 @@ static int mali_probe(struct platform_device *pdev) | ||
100 | _mali_osk_wq_term(); | ||
101 | } | ||
102 | |||
103 | -#if defined(CONFIG_ARCH_ZYNQMP) | ||
104 | - clk_disable_unprepare(clk_gpu); | ||
105 | - clk_disable_unprepare(clk_gpu_pp0); | ||
106 | - clk_disable_unprepare(clk_gpu_pp1); | ||
107 | -#endif | ||
108 | |||
109 | #ifdef CONFIG_MALI_DEVFREQ | ||
110 | mali_devfreq_term(mdev); | ||
111 | @@ -644,6 +681,7 @@ devfreq_init_failed: | ||
112 | mali_pm_metrics_term(mdev); | ||
113 | pm_metrics_init_failed: | ||
114 | clk_disable_unprepare(mdev->clock); | ||
115 | + mali_disable_clk(); | ||
116 | clock_prepare_failed: | ||
117 | clk_put(mdev->clock); | ||
118 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)) && defined(CONFIG_OF) \ | ||
119 | @@ -706,9 +744,7 @@ static int mali_remove(struct platform_device *pdev) | ||
120 | |||
121 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
122 | /* Remove clock */ | ||
123 | - clk_disable_unprepare(clk_gpu); | ||
124 | - clk_disable_unprepare(clk_gpu_pp0); | ||
125 | - clk_disable_unprepare(clk_gpu_pp1); | ||
126 | + mali_disable_clk(); | ||
127 | #endif | ||
128 | |||
129 | return 0; | ||
130 | @@ -816,6 +852,8 @@ static int mali_driver_runtime_suspend(struct device *dev) | ||
131 | devfreq_suspend_device(mdev->devfreq); | ||
132 | #endif | ||
133 | |||
134 | + mali_disable_clk(); | ||
135 | + | ||
136 | return 0; | ||
137 | } else { | ||
138 | return -EBUSY; | ||
139 | @@ -824,6 +862,11 @@ static int mali_driver_runtime_suspend(struct device *dev) | ||
140 | |||
141 | static int mali_driver_runtime_resume(struct device *dev) | ||
142 | { | ||
143 | + int err ; | ||
144 | + | ||
145 | + err = mali_enable_clk(); | ||
146 | + if (err) | ||
147 | + return err; | ||
148 | #ifdef CONFIG_MALI_DEVFREQ | ||
149 | struct mali_device *mdev = dev_get_drvdata(dev); | ||
150 | if (!mdev) | ||
151 | -- | ||
152 | 2.7.4 | ||
153 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch deleted file mode 100644 index 24f0a22c..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 779b1883d56804ecd08fe7f57d6c01e3db4e893b Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Wed, 5 Dec 2018 18:07:29 -0800 | ||
4 | Subject: [PATCH 1/3] linux: mali_memory_os_alloc: Remove __GFP_COLD | ||
5 | |||
6 | The support for Cache hot and cold pages are removed from the kernel. | ||
7 | For more information refer kernel commit 453f85d43fa9ee243f0fc3ac4e1be45615301e3f | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
10 | Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
11 | Upstream Status: Pending | ||
12 | --- | ||
13 | driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | 4 +++- | ||
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | ||
17 | index 1602371..830e8c6 100644 | ||
18 | --- linux/mali_memory_os_alloc.c | ||
19 | +++ b/linux/mali_memory_os_alloc.c | ||
20 | @@ -202,7 +202,9 @@ int mali_mem_os_alloc_pages(mali_mem_os_mem *os_mem, u32 size) | ||
21 | /* Allocate new pages, if needed. */ | ||
22 | for (i = 0; i < remaining; i++) { | ||
23 | dma_addr_t dma_addr; | ||
24 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) | ||
26 | + gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN; | ||
27 | +#elif LINUX_VERSION_CODE == KERNEL_VERSION(4, 14, 0) | ||
28 | gfp_t flags = __GFP_ZERO | __GFP_RETRY_MAYFAIL | __GFP_NOWARN | __GFP_COLD; | ||
29 | #else | ||
30 | gfp_t flags = __GFP_ZERO | __GFP_REPEAT | __GFP_NOWARN | __GFP_COLD; | ||
31 | -- | ||
32 | 2.7.4 | ||
33 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch deleted file mode 100644 index c28a83f4..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From d20b6eb3e48e56558488dbdda98875b1aed0c29f Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Wed, 5 Dec 2018 18:13:28 -0800 | ||
4 | Subject: [PATCH 2/3] linux: mali_memory_secure: Add header file dma-direct.h | ||
5 | |||
6 | Add dma-direct.h header, as API dma_to_phys is defined here. | ||
7 | refer kernel commit ea8c64ace86647260ec4255f483e5844d62af2df | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
10 | Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
11 | Upstream Status: Pending | ||
12 | --- | ||
13 | driver/src/devicedrv/mali/linux/mali_memory_secure.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c | ||
17 | index 2836b1b..4f55fa5 100644 | ||
18 | --- linux/mali_memory_secure.c | ||
19 | +++ b/linux/mali_memory_secure.c | ||
20 | @@ -13,7 +13,11 @@ | ||
21 | #include "mali_memory_secure.h" | ||
22 | #include "mali_osk.h" | ||
23 | #include <linux/mutex.h> | ||
24 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) | ||
25 | +#include <linux/dma-direct.h> | ||
26 | +#else | ||
27 | #include <linux/dma-mapping.h> | ||
28 | +#endif | ||
29 | #include <linux/dma-buf.h> | ||
30 | |||
31 | _mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd) | ||
32 | -- | ||
33 | 2.7.4 | ||
34 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch deleted file mode 100644 index a7c1d5cc..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0014-linux-mali_-timer-Get-rid-of-init_timer.patch +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | From b6936450484b5aa9dd2438367a907af020341d1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Thu, 6 Dec 2018 13:30:44 -0800 | ||
4 | Subject: [PATCH 3/3] linux: mali_*timer: Get rid of init_timer | ||
5 | |||
6 | kernel 4.19 got rid of ancient init_timer. Hence, replace it with | ||
7 | timer_setup API. For more information refer kernel commit | ||
8 | 7eeb6b893bd28c68b6d664de1d3120e49b855cdb | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> | ||
12 | Upstream Status: Pending | ||
13 | --- | ||
14 | driver/src/devicedrv/mali/common/mali_control_timer.c | 6 ++++++ | ||
15 | driver/src/devicedrv/mali/common/mali_group.c | 6 ++++++ | ||
16 | driver/src/devicedrv/mali/common/mali_osk.h | 15 ++++++++++++++- | ||
17 | driver/src/devicedrv/mali/linux/mali_osk_timers.c | 15 ++++++++++++++- | ||
18 | 4 files changed, 40 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/driver/src/devicedrv/mali/common/mali_control_timer.c b/driver/src/devicedrv/mali/common/mali_control_timer.c | ||
21 | index 1296ffe..d24b934 100644 | ||
22 | --- common/mali_control_timer.c | ||
23 | +++ b/common/mali_control_timer.c | ||
24 | @@ -65,11 +65,17 @@ _mali_osk_errcode_t mali_control_timer_init(void) | ||
25 | } | ||
26 | } | ||
27 | |||
28 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
29 | + mali_control_timer = _mali_osk_timer_init(mali_control_timer_callback); | ||
30 | +#else | ||
31 | mali_control_timer = _mali_osk_timer_init(); | ||
32 | +#endif | ||
33 | if (NULL == mali_control_timer) { | ||
34 | return _MALI_OSK_ERR_FAULT; | ||
35 | } | ||
36 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
37 | _mali_osk_timer_setcallback(mali_control_timer, mali_control_timer_callback, NULL); | ||
38 | +#endif | ||
39 | |||
40 | return _MALI_OSK_ERR_OK; | ||
41 | } | ||
42 | diff --git a/driver/src/devicedrv/mali/common/mali_group.c b/driver/src/devicedrv/mali/common/mali_group.c | ||
43 | index 5c7b3f4..1702e9a 100644 | ||
44 | --- common/mali_group.c | ||
45 | +++ b/common/mali_group.c | ||
46 | @@ -65,9 +65,15 @@ struct mali_group *mali_group_create(struct mali_l2_cache_core *core, | ||
47 | |||
48 | group = _mali_osk_calloc(1, sizeof(struct mali_group)); | ||
49 | if (NULL != group) { | ||
50 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
51 | + group->timeout_timer = _mali_osk_timer_init(mali_group_timeout); | ||
52 | +#else | ||
53 | group->timeout_timer = _mali_osk_timer_init(); | ||
54 | +#endif | ||
55 | if (NULL != group->timeout_timer) { | ||
56 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
57 | _mali_osk_timer_setcallback(group->timeout_timer, mali_group_timeout, (void *)group); | ||
58 | +#endif | ||
59 | |||
60 | group->l2_cache_core[0] = core; | ||
61 | _mali_osk_list_init(&group->group_list); | ||
62 | diff --git a/driver/src/devicedrv/mali/common/mali_osk.h b/driver/src/devicedrv/mali/common/mali_osk.h | ||
63 | index a501778..fe93d79 100644 | ||
64 | --- common/mali_osk.h | ||
65 | +++ b/common/mali_osk.h | ||
66 | @@ -947,7 +947,17 @@ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue(_mali_osk_notification_ | ||
67 | * asked for. | ||
68 | * | ||
69 | * @{ */ | ||
70 | - | ||
71 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
72 | +/** @brief Initialize a timer | ||
73 | + * | ||
74 | + * Allocates resources for a new timer, and initializes them. This does not | ||
75 | + * start the timer. | ||
76 | + * | ||
77 | + * @param callback Function to call when timer expires | ||
78 | + * @return a pointer to the allocated timer object, or NULL on failure. | ||
79 | + */ | ||
80 | +_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback); | ||
81 | +#else | ||
82 | /** @brief Initialize a timer | ||
83 | * | ||
84 | * Allocates resources for a new timer, and initializes them. This does not | ||
85 | @@ -956,6 +966,7 @@ _mali_osk_errcode_t _mali_osk_notification_queue_dequeue(_mali_osk_notification_ | ||
86 | * @return a pointer to the allocated timer object, or NULL on failure. | ||
87 | */ | ||
88 | _mali_osk_timer_t *_mali_osk_timer_init(void); | ||
89 | +#endif | ||
90 | |||
91 | /** @brief Start a timer | ||
92 | * | ||
93 | @@ -1034,6 +1045,7 @@ void _mali_osk_timer_del_async(_mali_osk_timer_t *tim); | ||
94 | */ | ||
95 | mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim); | ||
96 | |||
97 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
98 | /** @brief Set a timer's callback parameters. | ||
99 | * | ||
100 | * This must be called at least once before a timer is started/modified. | ||
101 | @@ -1047,6 +1059,7 @@ mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim); | ||
102 | * @param data Function-specific data to supply to the function on expiry. | ||
103 | */ | ||
104 | void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data); | ||
105 | +#endif | ||
106 | |||
107 | /** @brief Terminate a timer, and deallocate resources. | ||
108 | * | ||
109 | diff --git a/driver/src/devicedrv/mali/linux/mali_osk_timers.c b/driver/src/devicedrv/mali/linux/mali_osk_timers.c | ||
110 | index e5d7238..f9b5a86 100644 | ||
111 | --- linux/mali_osk_timers.c | ||
112 | +++ b/linux/mali_osk_timers.c | ||
113 | @@ -21,13 +21,24 @@ | ||
114 | struct _mali_osk_timer_t_struct { | ||
115 | struct timer_list timer; | ||
116 | }; | ||
117 | - | ||
118 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
119 | +typedef void (*timer_timeout_function_t)(struct timer_list *); | ||
120 | +#else | ||
121 | typedef void (*timer_timeout_function_t)(unsigned long); | ||
122 | +#endif | ||
123 | |||
124 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
125 | +_mali_osk_timer_t *_mali_osk_timer_init(_mali_osk_timer_callback_t callback) | ||
126 | +#else | ||
127 | _mali_osk_timer_t *_mali_osk_timer_init(void) | ||
128 | +#endif | ||
129 | { | ||
130 | _mali_osk_timer_t *t = (_mali_osk_timer_t *)kmalloc(sizeof(_mali_osk_timer_t), GFP_KERNEL); | ||
131 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) | ||
132 | + if (NULL != t) timer_setup(&t->timer, (timer_timeout_function_t)callback, 0); | ||
133 | +#else | ||
134 | if (NULL != t) init_timer(&t->timer); | ||
135 | +#endif | ||
136 | return t; | ||
137 | } | ||
138 | |||
139 | @@ -62,12 +73,14 @@ mali_bool _mali_osk_timer_pending(_mali_osk_timer_t *tim) | ||
140 | return 1 == timer_pending(&(tim->timer)); | ||
141 | } | ||
142 | |||
143 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
144 | void _mali_osk_timer_setcallback(_mali_osk_timer_t *tim, _mali_osk_timer_callback_t callback, void *data) | ||
145 | { | ||
146 | MALI_DEBUG_ASSERT_POINTER(tim); | ||
147 | tim->timer.data = (unsigned long)data; | ||
148 | tim->timer.function = (timer_timeout_function_t)callback; | ||
149 | } | ||
150 | +#endif | ||
151 | |||
152 | void _mali_osk_timer_term(_mali_osk_timer_t *tim) | ||
153 | { | ||
154 | -- | ||
155 | 2.7.4 | ||
156 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch deleted file mode 100644 index 5363c37e..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0015-fix-driver-failed-to-check-map-error.patch +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Index: mali/linux/mali_memory_os_alloc.c | ||
2 | =================================================================== | ||
3 | --- mali.orig/linux/mali_memory_os_alloc.c | ||
4 | +++ mali/linux/mali_memory_os_alloc.c | ||
5 | @@ -239,8 +239,10 @@ int mali_mem_os_alloc_pages(mali_mem_os_ | ||
6 | /* Ensure page is flushed from CPU caches. */ | ||
7 | dma_addr = dma_map_page(&mali_platform_device->dev, new_page, | ||
8 | 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
9 | - dma_unmap_page(&mali_platform_device->dev, dma_addr, | ||
10 | - _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
11 | + err = dma_mapping_error(&mali_platform_device->dev, dma_addr); | ||
12 | + if (likely(!err)) | ||
13 | + dma_unmap_page(&mali_platform_device->dev, dma_addr, | ||
14 | + _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
15 | dma_addr = dma_map_page(&mali_platform_device->dev, new_page, | ||
16 | 0, _MALI_OSK_MALI_PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
17 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch deleted file mode 100644 index dc8bbebf..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 8cf1dd43f3f25cb4afb84dfc3b0e7c02bc8f7f0c Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Mon, 24 Feb 2020 18:19:37 -0800 | ||
4 | Subject: [LINUX][rel-v2020.1][PATCH v1 1/3] mali_memory_secure: Kernel 5.0 | ||
5 | onwards 'access_ok' API does not take 'type' as input parameter | ||
6 | |||
7 | 'access_ok' no longer needs 'type' as input paramter from kernel 5.0 | ||
8 | onwards. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/linux/mali_ukk_mem.c | 9 +++++++++ | ||
13 | 1 file changed, 9 insertions(+) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/linux/mali_ukk_mem.c b/driver/src/devicedrv/mali/linux/mali_ukk_mem.c | ||
16 | index 4ec57dc..270bb6d 100644 | ||
17 | --- linux/mali_ukk_mem.c | ||
18 | +++ b/linux/mali_ukk_mem.c | ||
19 | @@ -207,8 +207,13 @@ int mem_write_safe_wrapper(struct mali_session_data *session_data, _mali_uk_mem_ | ||
20 | kargs.ctx = (uintptr_t)session_data; | ||
21 | |||
22 | /* Check if we can access the buffers */ | ||
23 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) | ||
24 | + if (!access_ok((const void __user *)kargs.dest, kargs.size) | ||
25 | + || !access_ok((const void __user *)kargs.src, kargs.size)) { | ||
26 | +#else | ||
27 | if (!access_ok(VERIFY_WRITE, kargs.dest, kargs.size) | ||
28 | || !access_ok(VERIFY_READ, kargs.src, kargs.size)) { | ||
29 | +#endif | ||
30 | return -EINVAL; | ||
31 | } | ||
32 | |||
33 | @@ -266,7 +271,11 @@ int mem_dump_mmu_page_table_wrapper(struct mali_session_data *session_data, _mal | ||
34 | goto err_exit; | ||
35 | |||
36 | user_buffer = (void __user *)(uintptr_t)kargs.buffer; | ||
37 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) | ||
38 | + if (!access_ok(user_buffer, kargs.size)) | ||
39 | +#else | ||
40 | if (!access_ok(VERIFY_WRITE, user_buffer, kargs.size)) | ||
41 | +#endif | ||
42 | goto err_exit; | ||
43 | |||
44 | /* allocate temporary buffer (kernel side) to store mmu page table info */ | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch deleted file mode 100644 index 9c4bbee9..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | From 953cab73b8bc487da330aa454abd7f8c7466737e Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Mon, 24 Feb 2020 18:32:16 -0800 | ||
4 | Subject: [LINUX][rel-v2020.1][PATCH v1 2/3] Support for vm_insert_pfn | ||
5 | deprecated from kernel 4.20 | ||
6 | |||
7 | From kernel 4.20 onwards, support for vm_insert_pfn is deprecated. | ||
8 | Hence, replace the same with vmf_insert_pfn. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | --- | ||
12 | .../devicedrv/mali/linux/mali_memory_block_alloc.c | 6 +++++- | ||
13 | driver/src/devicedrv/mali/linux/mali_memory_cow.c | 14 ++++++++++++-- | ||
14 | .../src/devicedrv/mali/linux/mali_memory_os_alloc.c | 20 +++++++++++++++++--- | ||
15 | driver/src/devicedrv/mali/linux/mali_memory_secure.c | 7 ++++++- | ||
16 | 4 files changed, 40 insertions(+), 7 deletions(-) | ||
17 | |||
18 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_block_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_block_alloc.c | ||
19 | index 0c5b6c3..e528699 100644 | ||
20 | --- linux/mali_memory_block_alloc.c | ||
21 | +++ b/linux/mali_memory_block_alloc.c | ||
22 | @@ -309,9 +309,13 @@ int mali_mem_block_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *v | ||
23 | |||
24 | list_for_each_entry(m_page, &block_mem->pfns, list) { | ||
25 | MALI_DEBUG_ASSERT(m_page->type == MALI_PAGE_NODE_BLOCK); | ||
26 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
27 | + ret = vmf_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page)); | ||
28 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
29 | +#else | ||
30 | ret = vm_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page)); | ||
31 | - | ||
32 | if (unlikely(0 != ret)) { | ||
33 | +#endif | ||
34 | return -EFAULT; | ||
35 | } | ||
36 | addr += _MALI_OSK_MALI_PAGE_SIZE; | ||
37 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_cow.c b/driver/src/devicedrv/mali/linux/mali_memory_cow.c | ||
38 | index f1d44fe..1dae1d6 100644 | ||
39 | --- linux/mali_memory_cow.c | ||
40 | +++ b/linux/mali_memory_cow.c | ||
41 | @@ -532,9 +532,14 @@ int mali_mem_cow_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *vma | ||
42 | * flush which makes it way slower than remap_pfn_range or vm_insert_pfn. | ||
43 | ret = vm_insert_page(vma, addr, page); | ||
44 | */ | ||
45 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
46 | + ret = vmf_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page)); | ||
47 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
48 | +#else | ||
49 | ret = vm_insert_pfn(vma, addr, _mali_page_node_get_pfn(m_page)); | ||
50 | - | ||
51 | if (unlikely(0 != ret)) { | ||
52 | +#endif | ||
53 | + | ||
54 | return ret; | ||
55 | } | ||
56 | addr += _MALI_OSK_MALI_PAGE_SIZE; | ||
57 | @@ -569,9 +574,14 @@ _mali_osk_errcode_t mali_mem_cow_cpu_map_pages_locked(mali_mem_backend *mem_bken | ||
58 | |||
59 | list_for_each_entry(m_page, &cow->pages, list) { | ||
60 | if ((count >= offset) && (count < offset + num)) { | ||
61 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
62 | + ret = vmf_insert_pfn(vma, vaddr, _mali_page_node_get_pfn(m_page)); | ||
63 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
64 | +#else | ||
65 | ret = vm_insert_pfn(vma, vaddr, _mali_page_node_get_pfn(m_page)); | ||
66 | - | ||
67 | if (unlikely(0 != ret)) { | ||
68 | +#endif | ||
69 | + | ||
70 | if (count == offset) { | ||
71 | return _MALI_OSK_ERR_FAULT; | ||
72 | } else { | ||
73 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c b/driver/src/devicedrv/mali/linux/mali_memory_os_alloc.c | ||
74 | index 3fb6f05..7de3920 100644 | ||
75 | --- linux/mali_memory_os_alloc.c | ||
76 | +++ b/linux/mali_memory_os_alloc.c | ||
77 | @@ -378,9 +378,14 @@ int mali_mem_os_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct *vma) | ||
78 | ret = vm_insert_page(vma, addr, page); | ||
79 | */ | ||
80 | page = m_page->page; | ||
81 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
82 | + ret = vmf_insert_pfn(vma, addr, page_to_pfn(page)); | ||
83 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
84 | +#else | ||
85 | ret = vm_insert_pfn(vma, addr, page_to_pfn(page)); | ||
86 | - | ||
87 | if (unlikely(0 != ret)) { | ||
88 | +#endif | ||
89 | + | ||
90 | return -EFAULT; | ||
91 | } | ||
92 | addr += _MALI_OSK_MALI_PAGE_SIZE; | ||
93 | @@ -416,9 +421,13 @@ _mali_osk_errcode_t mali_mem_os_resize_cpu_map_locked(mali_mem_backend *mem_bken | ||
94 | |||
95 | vm_end -= _MALI_OSK_MALI_PAGE_SIZE; | ||
96 | if (mapping_page_num > 0) { | ||
97 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
98 | + ret = vmf_insert_pfn(vma, vm_end, page_to_pfn(m_page->page)); | ||
99 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
100 | +#else | ||
101 | ret = vm_insert_pfn(vma, vm_end, page_to_pfn(m_page->page)); | ||
102 | - | ||
103 | if (unlikely(0 != ret)) { | ||
104 | +#endif | ||
105 | /*will return -EBUSY If the page has already been mapped into table, but it's OK*/ | ||
106 | if (-EBUSY == ret) { | ||
107 | break; | ||
108 | @@ -439,9 +448,14 @@ _mali_osk_errcode_t mali_mem_os_resize_cpu_map_locked(mali_mem_backend *mem_bken | ||
109 | list_for_each_entry(m_page, &os_mem->pages, list) { | ||
110 | if (count >= offset) { | ||
111 | |||
112 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
113 | + ret = vmf_insert_pfn(vma, vstart, page_to_pfn(m_page->page)); | ||
114 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
115 | +#else | ||
116 | ret = vm_insert_pfn(vma, vstart, page_to_pfn(m_page->page)); | ||
117 | - | ||
118 | if (unlikely(0 != ret)) { | ||
119 | +#endif | ||
120 | + | ||
121 | /*will return -EBUSY If the page has already been mapped into table, but it's OK*/ | ||
122 | if (-EBUSY == ret) { | ||
123 | break; | ||
124 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c | ||
125 | index 5546304..cebd1c8 100644 | ||
126 | --- linux/mali_memory_secure.c | ||
127 | +++ b/linux/mali_memory_secure.c | ||
128 | @@ -132,9 +132,14 @@ int mali_mem_secure_cpu_map(mali_mem_backend *mem_bkend, struct vm_area_struct * | ||
129 | MALI_DEBUG_ASSERT(0 == size % _MALI_OSK_MALI_PAGE_SIZE); | ||
130 | |||
131 | for (j = 0; j < size / _MALI_OSK_MALI_PAGE_SIZE; j++) { | ||
132 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
133 | + ret = vmf_insert_pfn(vma, addr, PFN_DOWN(phys)); | ||
134 | + if (unlikely(VM_FAULT_ERROR & ret)) { | ||
135 | +#else | ||
136 | ret = vm_insert_pfn(vma, addr, PFN_DOWN(phys)); | ||
137 | - | ||
138 | if (unlikely(0 != ret)) { | ||
139 | +#endif | ||
140 | + | ||
141 | return -EFAULT; | ||
142 | } | ||
143 | addr += _MALI_OSK_MALI_PAGE_SIZE; | ||
144 | -- | ||
145 | 2.7.4 | ||
146 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch deleted file mode 100644 index 9797db62..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From ad5c569f0cc40698699fc2f2c1db3ceb9f8b8f35 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Tue, 25 Feb 2020 11:36:01 -0800 | ||
4 | Subject: [LINUX][rel-v2020.1][PATCH v1 3/3] Change return type to vm_fault_t | ||
5 | for fault handler | ||
6 | |||
7 | From kernel 4.17 onwards the return type of fault handler for | ||
8 | vm_operations is of type 'vm_fault_t'. | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | --- | ||
12 | driver/src/devicedrv/mali/linux/mali_memory.c | 4 +++- | ||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/driver/src/devicedrv/mali/linux/mali_memory.c b/driver/src/devicedrv/mali/linux/mali_memory.c | ||
16 | index c0f0982..2b2b209 100644 | ||
17 | --- linux/mali_memory.c | ||
18 | +++ b/linux/mali_memory.c | ||
19 | @@ -70,7 +70,9 @@ static void mali_mem_vma_close(struct vm_area_struct *vma) | ||
20 | } | ||
21 | } | ||
22 | |||
23 | -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) | ||
24 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) | ||
25 | +static vm_fault_t mali_mem_vma_fault(struct vm_fault *vmf) | ||
26 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) | ||
27 | static int mali_mem_vma_fault(struct vm_fault *vmf) | ||
28 | #else | ||
29 | static int mali_mem_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | ||
30 | -- | ||
31 | 2.7.4 | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch deleted file mode 100644 index 154bb673..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From c6a6b39cea3fdfd91cae7f2a4ef6f36d2c55fdd6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Tue, 25 Feb 2020 15:17:17 -0800 | ||
4 | Subject: [LINUX][rel-v2020.1][PATCH v1] "get_monotonic_boottime(&ts)" | ||
5 | deprecated from kernel 4.20 onwards | ||
6 | |||
7 | As "get_monotonic_boottime(&ts)" is deprecated, replace the same with | ||
8 | "ktime_get_boottime_ts64(&ts)". Refer kernel commit ID | ||
9 | 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 | ||
10 | |||
11 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
12 | --- | ||
13 | driver/src/devicedrv/mali/linux/mali_osk_time.c | 6 ++++++ | ||
14 | 1 file changed, 6 insertions(+) | ||
15 | |||
16 | diff --git a/driver/src/devicedrv/mali/linux/mali_osk_time.c b/driver/src/devicedrv/mali/linux/mali_osk_time.c | ||
17 | index 03046a5..bfcbf7f 100644 | ||
18 | --- linux/mali_osk_time.c | ||
19 | +++ b/linux/mali_osk_time.c | ||
20 | @@ -53,7 +53,13 @@ u64 _mali_osk_time_get_ns(void) | ||
21 | |||
22 | u64 _mali_osk_boot_time_get_ns(void) | ||
23 | { | ||
24 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) | ||
25 | + struct timespec64 tsval; | ||
26 | + ktime_get_boottime_ts64(&tsval); | ||
27 | + return (u64)timespec64_to_ns(&tsval); | ||
28 | +#else | ||
29 | struct timespec tsval; | ||
30 | get_monotonic_boottime(&tsval); | ||
31 | return (u64)timespec_to_ns(&tsval); | ||
32 | +#endif | ||
33 | } | ||
34 | -- | ||
35 | 2.7.4 | ||
36 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0020-Fix-ioremap_nocache-deprecation-in-kernel-5.6.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0020-Fix-ioremap_nocache-deprecation-in-kernel-5.6.patch deleted file mode 100644 index ff86091f..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0020-Fix-ioremap_nocache-deprecation-in-kernel-5.6.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From cbc2351e8acf7ed38f6d965e5ea21620e45eda30 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dylan Yip <dylan.yip@xilinx.com> | ||
3 | Date: Tue, 9 Feb 2021 10:05:41 -0800 | ||
4 | Subject: [PATCH 20/23] Fix ioremap_nocache() deprecation in kernel 5.6 | ||
5 | |||
6 | As of commit 4bdc0d676a643140 ("remove ioremap_nocache and | ||
7 | devm_ioremap_nocache") from kernel 5.6, ioremap_nocache has been | ||
8 | removed because ioremap is already non-cached by default. So replace all | ||
9 | calls with ioremap. | ||
10 | |||
11 | Signed-off-by: Dylan Yip <dylan.yip@xilinx.com> | ||
12 | --- | ||
13 | linux/mali_memory_cow.c | 4 ++++ | ||
14 | linux/mali_osk_low_level_mem.c | 4 ++++ | ||
15 | platform/arm/arm.c | 12 ++++++++++++ | ||
16 | 3 files changed, 20 insertions(+) | ||
17 | |||
18 | diff --git a/linux/mali_memory_cow.c b/linux/mali_memory_cow.c | ||
19 | index 1dae1d6..6fadd42 100644 | ||
20 | --- a/linux/mali_memory_cow.c | ||
21 | +++ b/linux/mali_memory_cow.c | ||
22 | @@ -693,7 +693,11 @@ void _mali_mem_cow_copy_page(mali_page_node *src_node, mali_page_node *dst_node) | ||
23 | /* | ||
24 | * use ioremap to map src for BLOCK memory | ||
25 | */ | ||
26 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
27 | + src = ioremap(_mali_page_node_get_dma_addr(src_node), _MALI_OSK_MALI_PAGE_SIZE); | ||
28 | +#else | ||
29 | src = ioremap_nocache(_mali_page_node_get_dma_addr(src_node), _MALI_OSK_MALI_PAGE_SIZE); | ||
30 | +#endif | ||
31 | memcpy(dst, src , _MALI_OSK_MALI_PAGE_SIZE); | ||
32 | iounmap(src); | ||
33 | } | ||
34 | diff --git a/linux/mali_osk_low_level_mem.c b/linux/mali_osk_low_level_mem.c | ||
35 | index 84f93d9..5a0a725 100644 | ||
36 | --- a/linux/mali_osk_low_level_mem.c | ||
37 | +++ b/linux/mali_osk_low_level_mem.c | ||
38 | @@ -33,7 +33,11 @@ void _mali_osk_write_mem_barrier(void) | ||
39 | |||
40 | mali_io_address _mali_osk_mem_mapioregion(uintptr_t phys, u32 size, const char *description) | ||
41 | { | ||
42 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
43 | + return (mali_io_address)ioremap(phys, size); | ||
44 | +#else | ||
45 | return (mali_io_address)ioremap_nocache(phys, size); | ||
46 | +#endif | ||
47 | } | ||
48 | |||
49 | void _mali_osk_mem_unmapioregion(uintptr_t phys, u32 size, mali_io_address virt) | ||
50 | diff --git a/platform/arm/arm.c b/platform/arm/arm.c | ||
51 | index b2fb746..e468263 100644 | ||
52 | --- a/platform/arm/arm.c | ||
53 | +++ b/platform/arm/arm.c | ||
54 | @@ -98,7 +98,11 @@ static int mali_secure_mode_init_juno(void) | ||
55 | |||
56 | MALI_DEBUG_ASSERT(NULL == secure_mode_mapped_addr); | ||
57 | |||
58 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
59 | + secure_mode_mapped_addr = ioremap(phys_addr_page, map_size); | ||
60 | +#else | ||
61 | secure_mode_mapped_addr = ioremap_nocache(phys_addr_page, map_size); | ||
62 | +#endif | ||
63 | if (NULL != secure_mode_mapped_addr) { | ||
64 | return mali_gpu_reset_and_secure_mode_disable_juno(); | ||
65 | } | ||
66 | @@ -588,7 +592,11 @@ static u32 mali_read_phys(u32 phys_addr) | ||
67 | u32 phys_offset = phys_addr & 0x00001FFF; | ||
68 | u32 map_size = phys_offset + sizeof(u32); | ||
69 | u32 ret = 0xDEADBEEF; | ||
70 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
71 | + void *mem_mapped = ioremap(phys_addr_page, map_size); | ||
72 | +#else | ||
73 | void *mem_mapped = ioremap_nocache(phys_addr_page, map_size); | ||
74 | +#endif | ||
75 | if (NULL != mem_mapped) { | ||
76 | ret = (u32)ioread32(((u8 *)mem_mapped) + phys_offset); | ||
77 | iounmap(mem_mapped); | ||
78 | @@ -604,7 +612,11 @@ static void mali_write_phys(u32 phys_addr, u32 value) | ||
79 | u32 phys_addr_page = phys_addr & 0xFFFFE000; | ||
80 | u32 phys_offset = phys_addr & 0x00001FFF; | ||
81 | u32 map_size = phys_offset + sizeof(u32); | ||
82 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
83 | + void *mem_mapped = ioremap(phys_addr_page, map_size); | ||
84 | +#else | ||
85 | void *mem_mapped = ioremap_nocache(phys_addr_page, map_size); | ||
86 | +#endif | ||
87 | if (NULL != mem_mapped) { | ||
88 | iowrite32(value, ((u8 *)mem_mapped) + phys_offset); | ||
89 | iounmap(mem_mapped); | ||
90 | -- | ||
91 | 2.17.1 | ||
92 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch deleted file mode 100644 index adef8e18..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From bc0f85271681532c7e394229f0155366d1de8779 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dylan Yip <dylan.yip@xilinx.com> | ||
3 | Date: Mon, 8 Feb 2021 23:47:01 -0800 | ||
4 | Subject: [PATCH 21/23] Use updated timekeeping functions in kernel 5.6 | ||
5 | |||
6 | As of commit 412c53a680a9 ("y2038: remove unused time32 interfaces"), 32 | ||
7 | bit timekeeping functions like getnstimeofday() have been removed. So | ||
8 | use the 64 bit replacements. | ||
9 | |||
10 | Signed-off-by: Dylan Yip <dylan.yip@xilinx.com> | ||
11 | --- | ||
12 | linux/mali_osk_time.c | 6 ++++++ | ||
13 | 1 file changed, 6 insertions(+) | ||
14 | |||
15 | diff --git a/linux/mali_osk_time.c b/linux/mali_osk_time.c | ||
16 | index bfcbf7f..583d82b 100644 | ||
17 | --- a/linux/mali_osk_time.c | ||
18 | +++ b/linux/mali_osk_time.c | ||
19 | @@ -46,9 +46,15 @@ void _mali_osk_time_ubusydelay(u32 usecs) | ||
20 | |||
21 | u64 _mali_osk_time_get_ns(void) | ||
22 | { | ||
23 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
24 | + struct timespec64 tsval; | ||
25 | + ktime_get_real_ts64(&tsval); | ||
26 | + return (u64)timespec64_to_ns(&tsval); | ||
27 | +#else | ||
28 | struct timespec tsval; | ||
29 | getnstimeofday(&tsval); | ||
30 | return (u64)timespec_to_ns(&tsval); | ||
31 | +#endif | ||
32 | } | ||
33 | |||
34 | u64 _mali_osk_boot_time_get_ns(void) | ||
35 | -- | ||
36 | 2.17.1 | ||
37 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0022-Set-HAVE_UNLOCKED_IOCTL-default-to-true.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0022-Set-HAVE_UNLOCKED_IOCTL-default-to-true.patch deleted file mode 100644 index 181df7b7..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0022-Set-HAVE_UNLOCKED_IOCTL-default-to-true.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From d17933b6909cc29103befc2ef4e6cf413d9e8fb6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dylan Yip <dylan.yip@xilinx.com> | ||
3 | Date: Tue, 9 Feb 2021 08:58:44 -0800 | ||
4 | Subject: [PATCH 22/23] Set HAVE_UNLOCKED_IOCTL default to true | ||
5 | |||
6 | As of commit b19dd42faf41 ("bkl: Remove locked .ioctl file operation") | ||
7 | of kernel 2.6, the ioctl operation has been replaced with | ||
8 | unlocked_ioctl. Since this change has been around for almost 10 years, | ||
9 | go ahead and set the default HAVE_UNLOCKED_IOCTL to be true. | ||
10 | |||
11 | Signed-off-by: Dylan Yip <dylan.yip@xilinx.com> | ||
12 | --- | ||
13 | Kbuild | 2 ++ | ||
14 | 1 file changed, 2 insertions(+) | ||
15 | |||
16 | diff --git a/Kbuild b/Kbuild | ||
17 | index 02c3f3d..8c6e6e0 100644 | ||
18 | --- a/Kbuild | ||
19 | +++ b/Kbuild | ||
20 | @@ -21,6 +21,7 @@ MALI_PP_SCHEDULER_KEEP_SUB_JOB_STARTS_ALIGNED ?= 0 | ||
21 | MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS ?= 0 | ||
22 | MALI_UPPER_HALF_SCHEDULING ?= 1 | ||
23 | MALI_ENABLE_CPU_CYCLES ?= 0 | ||
24 | +HAVE_UNLOCKED_IOCTL ?= 1 | ||
25 | |||
26 | # For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases: | ||
27 | # The ARM proprietary product will only include the license/proprietary directory | ||
28 | @@ -179,6 +180,7 @@ ccflags-y += -DMALI_STATE_TRACKING=1 | ||
29 | ccflags-y += -DMALI_OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) | ||
30 | ccflags-y += -DUSING_GPU_UTILIZATION=$(USING_GPU_UTILIZATION) | ||
31 | ccflags-y += -DMALI_ENABLE_CPU_CYCLES=$(MALI_ENABLE_CPU_CYCLES) | ||
32 | +ccflags-y += -DHAVE_UNLOCKED_IOCTL=$(HAVE_UNLOCKED_IOCTL) | ||
33 | |||
34 | ifeq ($(MALI_UPPER_HALF_SCHEDULING),1) | ||
35 | ccflags-y += -DMALI_UPPER_HALF_SCHEDULING | ||
36 | -- | ||
37 | 2.17.1 | ||
38 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0023-Use-PTR_ERR_OR_ZERO-instead-of-PTR_RET.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0023-Use-PTR_ERR_OR_ZERO-instead-of-PTR_RET.patch deleted file mode 100644 index bab2bd37..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0023-Use-PTR_ERR_OR_ZERO-instead-of-PTR_RET.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From e2b52e358e0e030d3881ef80ef09de3662b41210 Mon Sep 17 00:00:00 2001 | ||
2 | From: Dylan Yip <dylan.yip@xilinx.com> | ||
3 | Date: Tue, 9 Feb 2021 09:48:01 -0800 | ||
4 | Subject: [PATCH 23/23] Use PTR_ERR_OR_ZERO instead of PTR_RET | ||
5 | |||
6 | As of commit fad7c9020948 ("err.h: remove deprecated PTR_RET for good") | ||
7 | in kernel 5.7, PTR_RET has been removed and replaced with | ||
8 | PTR_ERR_OR_ZERO. So use this API instead. | ||
9 | |||
10 | Signed-off-by: Dylan Yip <dylan.yip@xilinx.com> | ||
11 | --- | ||
12 | linux/mali_memory_dma_buf.c | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | diff --git a/linux/mali_memory_dma_buf.c b/linux/mali_memory_dma_buf.c | ||
16 | index 905cd8b..fcdcaac 100644 | ||
17 | --- a/linux/mali_memory_dma_buf.c | ||
18 | +++ b/linux/mali_memory_dma_buf.c | ||
19 | @@ -281,7 +281,11 @@ int mali_dma_buf_get_size(struct mali_session_data *session, _mali_uk_dma_buf_ge | ||
20 | buf = dma_buf_get(fd); | ||
21 | if (IS_ERR_OR_NULL(buf)) { | ||
22 | MALI_DEBUG_PRINT_ERROR(("Failed to get dma-buf from fd: %d\n", fd)); | ||
23 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0) | ||
24 | + return PTR_ERR_OR_ZERO(buf); | ||
25 | +#else | ||
26 | return PTR_RET(buf); | ||
27 | +#endif | ||
28 | } | ||
29 | |||
30 | if (0 != put_user(buf->size, &user_arg->size)) { | ||
31 | -- | ||
32 | 2.17.1 | ||
33 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0024-Use-community-device-tree-names.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0024-Use-community-device-tree-names.patch deleted file mode 100644 index 5b3eeedc..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0024-Use-community-device-tree-names.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | Use the community device-tree names | ||
2 | |||
3 | The community LIMA driver uses a series of names that are different then | ||
4 | the legacy Xilinx names. Moves from the legacy names to the more standard | ||
5 | names. | ||
6 | |||
7 | This will allow us to have a single device tree that works with both the | ||
8 | mali driver, as well as the lima driver. | ||
9 | |||
10 | Interrupt-names: | ||
11 | IRQGP -> gp | ||
12 | IRQGPMMU -> gpmmu | ||
13 | IRQPP0 -> pp0 | ||
14 | IRQPPMMU0 -> ppmmu0 | ||
15 | IRQPP1 -> pp1 | ||
16 | IRQPPMMU1 -> ppmmu1 | ||
17 | ... | ||
18 | |||
19 | Clock-names: | ||
20 | gpu_pp0 -> core | ||
21 | gpu_pp1 -> bus | ||
22 | |||
23 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
24 | |||
25 | diff -ur a/linux/mali_kernel_linux.c b/linux/mali_kernel_linux.c | ||
26 | --- a/linux/mali_kernel_linux.c 2018-09-17 04:04:48.000000000 -0700 | ||
27 | +++ b/linux/mali_kernel_linux.c 2022-10-24 14:01:54.614376177 -0700 | ||
28 | @@ -635,11 +635,11 @@ | ||
29 | if (IS_ERR(clk_gpu)) | ||
30 | return PTR_ERR(clk_gpu); | ||
31 | |||
32 | - clk_gpu_pp0 = devm_clk_get(&pdev->dev, "gpu_pp0"); | ||
33 | + clk_gpu_pp0 = devm_clk_get(&pdev->dev, "core"); | ||
34 | if (IS_ERR(clk_gpu_pp0)) | ||
35 | return PTR_ERR(clk_gpu_pp0); | ||
36 | |||
37 | - clk_gpu_pp1 = devm_clk_get(&pdev->dev, "gpu_pp1"); | ||
38 | + clk_gpu_pp1 = devm_clk_get(&pdev->dev, "bus"); | ||
39 | if (IS_ERR(clk_gpu_pp1)) | ||
40 | return PTR_ERR(clk_gpu_pp1); | ||
41 | #endif | ||
42 | diff -ur a/linux/mali_osk_mali.c b/linux/mali_osk_mali.c | ||
43 | --- a/linux/mali_osk_mali.c 2018-09-12 23:52:20.000000000 -0700 | ||
44 | +++ b/linux/mali_osk_mali.c 2022-10-24 14:00:28.470380512 -0700 | ||
45 | @@ -72,26 +72,26 @@ | ||
46 | #define MALI_OSK_RESOURCE_DMA_LOCATION 26 | ||
47 | |||
48 | static _mali_osk_resource_t mali_osk_resource_bank[MALI_OSK_MAX_RESOURCE_NUMBER] = { | ||
49 | - {.description = "Mali_GP", .base = MALI_OFFSET_GP, .irq_name = "IRQGP",}, | ||
50 | - {.description = "Mali_GP_MMU", .base = MALI_OFFSET_GP_MMU, .irq_name = "IRQGPMMU",}, | ||
51 | - {.description = "Mali_PP0", .base = MALI_OFFSET_PP0, .irq_name = "IRQPP0",}, | ||
52 | - {.description = "Mali_PP0_MMU", .base = MALI_OFFSET_PP0_MMU, .irq_name = "IRQPPMMU0",}, | ||
53 | - {.description = "Mali_PP1", .base = MALI_OFFSET_PP1, .irq_name = "IRQPP1",}, | ||
54 | - {.description = "Mali_PP1_MMU", .base = MALI_OFFSET_PP1_MMU, .irq_name = "IRQPPMMU1",}, | ||
55 | - {.description = "Mali_PP2", .base = MALI_OFFSET_PP2, .irq_name = "IRQPP2",}, | ||
56 | - {.description = "Mali_PP2_MMU", .base = MALI_OFFSET_PP2_MMU, .irq_name = "IRQPPMMU2",}, | ||
57 | - {.description = "Mali_PP3", .base = MALI_OFFSET_PP3, .irq_name = "IRQPP3",}, | ||
58 | - {.description = "Mali_PP3_MMU", .base = MALI_OFFSET_PP3_MMU, .irq_name = "IRQPPMMU3",}, | ||
59 | - {.description = "Mali_PP4", .base = MALI_OFFSET_PP4, .irq_name = "IRQPP4",}, | ||
60 | - {.description = "Mali_PP4_MMU", .base = MALI_OFFSET_PP4_MMU, .irq_name = "IRQPPMMU4",}, | ||
61 | - {.description = "Mali_PP5", .base = MALI_OFFSET_PP5, .irq_name = "IRQPP5",}, | ||
62 | - {.description = "Mali_PP5_MMU", .base = MALI_OFFSET_PP5_MMU, .irq_name = "IRQPPMMU5",}, | ||
63 | - {.description = "Mali_PP6", .base = MALI_OFFSET_PP6, .irq_name = "IRQPP6",}, | ||
64 | - {.description = "Mali_PP6_MMU", .base = MALI_OFFSET_PP6_MMU, .irq_name = "IRQPPMMU6",}, | ||
65 | - {.description = "Mali_PP7", .base = MALI_OFFSET_PP7, .irq_name = "IRQPP7",}, | ||
66 | - {.description = "Mali_PP7_MMU", .base = MALI_OFFSET_PP7_MMU, .irq_name = "IRQPPMMU",}, | ||
67 | - {.description = "Mali_PP_Broadcast", .base = MALI_OFFSET_PP_BCAST, .irq_name = "IRQPP",}, | ||
68 | - {.description = "Mali_PMU", .base = MALI_OFFSET_PMU, .irq_name = "IRQPMU",}, | ||
69 | + {.description = "Mali_GP", .base = MALI_OFFSET_GP, .irq_name = "gp",}, | ||
70 | + {.description = "Mali_GP_MMU", .base = MALI_OFFSET_GP_MMU, .irq_name = "gpmmu",}, | ||
71 | + {.description = "Mali_PP0", .base = MALI_OFFSET_PP0, .irq_name = "pp0",}, | ||
72 | + {.description = "Mali_PP0_MMU", .base = MALI_OFFSET_PP0_MMU, .irq_name = "ppmmu0",}, | ||
73 | + {.description = "Mali_PP1", .base = MALI_OFFSET_PP1, .irq_name = "pp1",}, | ||
74 | + {.description = "Mali_PP1_MMU", .base = MALI_OFFSET_PP1_MMU, .irq_name = "ppmmu1",}, | ||
75 | + {.description = "Mali_PP2", .base = MALI_OFFSET_PP2, .irq_name = "pp2",}, | ||
76 | + {.description = "Mali_PP2_MMU", .base = MALI_OFFSET_PP2_MMU, .irq_name = "ppmmu2",}, | ||
77 | + {.description = "Mali_PP3", .base = MALI_OFFSET_PP3, .irq_name = "pp3",}, | ||
78 | + {.description = "Mali_PP3_MMU", .base = MALI_OFFSET_PP3_MMU, .irq_name = "ppmmu3",}, | ||
79 | + {.description = "Mali_PP4", .base = MALI_OFFSET_PP4, .irq_name = "pp4",}, | ||
80 | + {.description = "Mali_PP4_MMU", .base = MALI_OFFSET_PP4_MMU, .irq_name = "ppmmu4",}, | ||
81 | + {.description = "Mali_PP5", .base = MALI_OFFSET_PP5, .irq_name = "pp5",}, | ||
82 | + {.description = "Mali_PP5_MMU", .base = MALI_OFFSET_PP5_MMU, .irq_name = "ppmmu5",}, | ||
83 | + {.description = "Mali_PP6", .base = MALI_OFFSET_PP6, .irq_name = "pp6",}, | ||
84 | + {.description = "Mali_PP6_MMU", .base = MALI_OFFSET_PP6_MMU, .irq_name = "ppmmu6",}, | ||
85 | + {.description = "Mali_PP7", .base = MALI_OFFSET_PP7, .irq_name = "pp7",}, | ||
86 | + {.description = "Mali_PP7_MMU", .base = MALI_OFFSET_PP7_MMU, .irq_name = "ppmmu",}, | ||
87 | + {.description = "Mali_PP_Broadcast", .base = MALI_OFFSET_PP_BCAST, .irq_name = "pp",}, | ||
88 | + {.description = "Mali_PMU", .base = MALI_OFFSET_PMU, .irq_name = "pmu",}, | ||
89 | {.description = "Mali_L2", .base = MALI_OFFSET_L2_RESOURCE0,}, | ||
90 | {.description = "Mali_L2", .base = MALI_OFFSET_L2_RESOURCE1,}, | ||
91 | {.description = "Mali_L2", .base = MALI_OFFSET_L2_RESOURCE2,}, | ||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch deleted file mode 100644 index f3bcd4f1..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | From d4fcb32f8dc85d01c6e0dc8e5d85c7ed43f0866c Mon Sep 17 00:00:00 2001 | ||
2 | From: Yash Ladani <yash.ladani@amd.com> | ||
3 | Date: Tue, 6 Dec 2022 00:52:53 -0800 | ||
4 | Subject: [PATCH] Import DMA_BUF module and update register_shrinker function | ||
5 | for kernel 5.16 or higher | ||
6 | |||
7 | Added MODULE_IMPORT_NS(DMA_BUF) for kernel version 5.16 or higher. | ||
8 | register_shrinker function call now requires two arguments | ||
9 | for kernel 5.16 or higher updated this function call. | ||
10 | |||
11 | Signed-off-by: Yash Ladani <yash.ladani@amd.com> | ||
12 | --- | ||
13 | linux/mali_memory_dma_buf.c | 4 ++++ | ||
14 | linux/mali_memory_os_alloc.c | 5 ++++- | ||
15 | linux/mali_memory_secure.c | 4 ++++ | ||
16 | 3 files changed, 12 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/linux/mali_memory_dma_buf.c b/linux/mali_memory_dma_buf.c | ||
19 | index fcdcaac..72e28a8 100644 | ||
20 | --- a/linux/mali_memory_dma_buf.c | ||
21 | +++ b/linux/mali_memory_dma_buf.c | ||
22 | @@ -34,6 +34,10 @@ | ||
23 | #include "mali_memory_virtual.h" | ||
24 | #include "mali_pp_job.h" | ||
25 | |||
26 | +#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 15, 0) | ||
27 | +MODULE_IMPORT_NS(DMA_BUF); | ||
28 | +#endif | ||
29 | + | ||
30 | /* | ||
31 | * Map DMA buf attachment \a mem into \a session at virtual address \a virt. | ||
32 | */ | ||
33 | diff --git a/linux/mali_memory_os_alloc.c b/linux/mali_memory_os_alloc.c | ||
34 | index 7de3920..5bf08f8 100644 | ||
35 | --- a/linux/mali_memory_os_alloc.c | ||
36 | +++ b/linux/mali_memory_os_alloc.c | ||
37 | @@ -801,8 +801,11 @@ _mali_osk_errcode_t mali_mem_os_init(void) | ||
38 | dma_set_attr(DMA_ATTR_WRITE_COMBINE, &dma_attrs_wc); | ||
39 | #endif | ||
40 | |||
41 | +#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 15, 0) | ||
42 | + register_shrinker(&mali_mem_os_allocator.shrinker, "mali"); | ||
43 | +#else | ||
44 | register_shrinker(&mali_mem_os_allocator.shrinker); | ||
45 | - | ||
46 | +#endif | ||
47 | return _MALI_OSK_ERR_OK; | ||
48 | } | ||
49 | |||
50 | diff --git a/linux/mali_memory_secure.c b/linux/mali_memory_secure.c | ||
51 | index cebd1c8..a9d932f 100644 | ||
52 | --- a/linux/mali_memory_secure.c | ||
53 | +++ b/linux/mali_memory_secure.c | ||
54 | @@ -20,6 +20,10 @@ | ||
55 | #endif | ||
56 | #include <linux/dma-buf.h> | ||
57 | |||
58 | +#if LINUX_VERSION_CODE > KERNEL_VERSION(5, 15, 0) | ||
59 | +MODULE_IMPORT_NS(DMA_BUF); | ||
60 | +#endif | ||
61 | + | ||
62 | _mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd) | ||
63 | { | ||
64 | struct dma_buf *buf; | ||
65 | -- | ||
66 | 2.17.1 | ||
67 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0026-Fix-gpu-driver-probe-failure.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0026-Fix-gpu-driver-probe-failure.patch deleted file mode 100644 index 247c92ff..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0026-Fix-gpu-driver-probe-failure.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From d7a56b7bdf1ea34194fe86639cc318d7a33b9abb Mon Sep 17 00:00:00 2001 | ||
2 | From: Parth Gajjar <parth.gajjar@xilinx.com> | ||
3 | Date: Thu, 12 Jan 2023 06:00:20 -0800 | ||
4 | Subject: [PATCH] Fix gpu driver probe failure | ||
5 | |||
6 | In patch a1a2b7125e1079cfcc13a116aa3af3df2f9e002b | ||
7 | (Drop static setup of IRQ resource from DT core) platform_get_resource() | ||
8 | stopped from returning the IRQ, as all drivers were supposed to have | ||
9 | switched to platform_get_irq(). | ||
10 | Using platform_get_irq_optional() to avoid printing error messages | ||
11 | for interrupts not found. | ||
12 | |||
13 | Signed-off-by: Parth Gajjar <parth.gajjar@xilinx.com> | ||
14 | --- | ||
15 | linux/mali_osk_mali.c | 8 ++++---- | ||
16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/linux/mali_osk_mali.c b/linux/mali_osk_mali.c | ||
19 | index c22758d..3f66132 100644 | ||
20 | --- a/linux/mali_osk_mali.c | ||
21 | +++ b/linux/mali_osk_mali.c | ||
22 | @@ -113,7 +113,7 @@ static int _mali_osk_get_compatible_name(const char **out_string) | ||
23 | _mali_osk_errcode_t _mali_osk_resource_initialize(void) | ||
24 | { | ||
25 | mali_bool mali_is_450 = MALI_FALSE, mali_is_470 = MALI_FALSE; | ||
26 | - int i, pp_core_num = 0, l2_core_num = 0; | ||
27 | + int i, pp_core_num = 0, l2_core_num = 0, irq = 0; | ||
28 | struct resource *res; | ||
29 | const char *compatible_name = NULL; | ||
30 | |||
31 | @@ -128,9 +128,9 @@ _mali_osk_errcode_t _mali_osk_resource_initialize(void) | ||
32 | } | ||
33 | |||
34 | for (i = 0; i < MALI_OSK_RESOURCE_WITH_IRQ_NUMBER; i++) { | ||
35 | - res = platform_get_resource_byname(mali_platform_device, IORESOURCE_IRQ, mali_osk_resource_bank[i].irq_name); | ||
36 | - if (res) { | ||
37 | - mali_osk_resource_bank[i].irq = res->start; | ||
38 | + irq = platform_get_irq_byname_optional(mali_platform_device, mali_osk_resource_bank[i].irq_name); | ||
39 | + if (irq > 0) { | ||
40 | + mali_osk_resource_bank[i].irq = irq; | ||
41 | } else { | ||
42 | mali_osk_resource_bank[i].base = MALI_OSK_INVALID_RESOURCE_ADDRESS; | ||
43 | } | ||
44 | -- | ||
45 | 2.17.1 | ||
46 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch deleted file mode 100644 index 18081dc3..00000000 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | From a64707b7fea40d326c5b18636a41a5994f60048d Mon Sep 17 00:00:00 2001 | ||
2 | From: Parth Gajjar <parth.gajjar@amd.com> | ||
3 | Date: Fri, 24 Feb 2023 05:11:38 -0800 | ||
4 | Subject: [PATCH] Updated clock name and structure to match LIMA driver | ||
5 | |||
6 | Clock-names: | ||
7 | gpu -> bus | ||
8 | gpu_pp0,gpu_pp1 -> core | ||
9 | |||
10 | This will allow us to have a single device tree that works with both the | ||
11 | mali driver, as well as the lima driver. | ||
12 | |||
13 | Signed-off-by: Parth Gajjar <parth.gajjar@amd.com> | ||
14 | --- | ||
15 | linux/mali_kernel_linux.c | 37 +++++++------------ | ||
16 | 1 file changed, 13 insertions(+), 24 deletions(-) | ||
17 | |||
18 | diff --git a/linux/mali_kernel_linux.c b/linux/mali_kernel_linux.c | ||
19 | index ad450b4..050af67 100644 | ||
20 | --- a/linux/mali_kernel_linux.c | ||
21 | +++ b/linux/mali_kernel_linux.c | ||
22 | @@ -48,9 +48,8 @@ | ||
23 | |||
24 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
25 | /* Initialize variables for clocks */ | ||
26 | -struct clk *clk_gpu; | ||
27 | -struct clk *clk_gpu_pp0; | ||
28 | -struct clk *clk_gpu_pp1; | ||
29 | +struct clk *clk_bus; | ||
30 | +struct clk *clk_core; | ||
31 | mali_bool clk_enabled; | ||
32 | #endif | ||
33 | |||
34 | @@ -291,19 +290,14 @@ static int mali_enable_clk(void) | ||
35 | return 0; | ||
36 | |||
37 | clk_enabled = MALI_TRUE; | ||
38 | - err = clk_prepare_enable(clk_gpu); | ||
39 | + err = clk_prepare_enable(clk_bus); | ||
40 | if (err) { | ||
41 | MALI_PRINT_ERROR(("Could not enable clock for GP\n\r")); | ||
42 | return err; | ||
43 | } | ||
44 | - err = clk_prepare_enable(clk_gpu_pp0); | ||
45 | + err = clk_prepare_enable(clk_core); | ||
46 | if (err) { | ||
47 | - MALI_PRINT_ERROR(("Could not enable clock for PP0\n\r")); | ||
48 | - return err; | ||
49 | - } | ||
50 | - err = clk_prepare_enable(clk_gpu_pp1); | ||
51 | - if (err) { | ||
52 | - MALI_PRINT_ERROR(("Could not enable clock for PP1\n\r")); | ||
53 | + MALI_PRINT_ERROR(("Could not enable clock for PP\n\r")); | ||
54 | return err; | ||
55 | } | ||
56 | #endif | ||
57 | @@ -315,9 +309,8 @@ static void mali_disable_clk(void) | ||
58 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
59 | if (clk_enabled) { | ||
60 | clk_enabled = MALI_FALSE; | ||
61 | - clk_disable_unprepare(clk_gpu); | ||
62 | - clk_disable_unprepare(clk_gpu_pp0); | ||
63 | - clk_disable_unprepare(clk_gpu_pp1); | ||
64 | + clk_disable_unprepare(clk_bus); | ||
65 | + clk_disable_unprepare(clk_core); | ||
66 | } | ||
67 | #endif | ||
68 | } | ||
69 | @@ -631,17 +624,13 @@ static int mali_probe(struct platform_device *pdev) | ||
70 | |||
71 | #if defined(CONFIG_ARCH_ZYNQMP) | ||
72 | /* Initialize clocks for GPU and PP */ | ||
73 | - clk_gpu = devm_clk_get(&pdev->dev, "gpu"); | ||
74 | - if (IS_ERR(clk_gpu)) | ||
75 | - return PTR_ERR(clk_gpu); | ||
76 | - | ||
77 | - clk_gpu_pp0 = devm_clk_get(&pdev->dev, "core"); | ||
78 | - if (IS_ERR(clk_gpu_pp0)) | ||
79 | - return PTR_ERR(clk_gpu_pp0); | ||
80 | + clk_bus = devm_clk_get(&pdev->dev, "bus"); | ||
81 | + if (IS_ERR(clk_bus)) | ||
82 | + return PTR_ERR(clk_bus); | ||
83 | |||
84 | - clk_gpu_pp1 = devm_clk_get(&pdev->dev, "bus"); | ||
85 | - if (IS_ERR(clk_gpu_pp1)) | ||
86 | - return PTR_ERR(clk_gpu_pp1); | ||
87 | + clk_core = devm_clk_get(&pdev->dev, "core"); | ||
88 | + if (IS_ERR(clk_core)) | ||
89 | + return PTR_ERR(clk_core); | ||
90 | #endif | ||
91 | |||
92 | err = mali_enable_clk(); | ||
93 | -- | ||
94 | 2.25.1 | ||
95 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch b/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch deleted file mode 100644 index f77f1939..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | DRI: Add xlnx dri | ||
2 | |||
3 | Add the Xilinx dri target | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
8 | |||
9 | Index: mesa-24.0.1/src/gallium/targets/dri/meson.build | ||
10 | =================================================================== | ||
11 | --- mesa-24.0.1.orig/src/gallium/targets/dri/meson.build | ||
12 | +++ mesa-24.0.1/src/gallium/targets/dri/meson.build | ||
13 | @@ -101,6 +101,7 @@ foreach d : [[with_gallium_kmsro, [ | ||
14 | 'stm_dri.so', | ||
15 | 'sun4i-drm_dri.so', | ||
16 | 'udl_dri.so', | ||
17 | + 'xlnx_dri.so', | ||
18 | ]], | ||
19 | [with_gallium_radeonsi, 'radeonsi_dri.so'], | ||
20 | [with_gallium_nouveau, 'nouveau_dri.so'], | ||
21 | Index: mesa-24.0.1/src/gallium/targets/dri/target.c | ||
22 | =================================================================== | ||
23 | --- mesa-24.0.1.orig/src/gallium/targets/dri/target.c | ||
24 | +++ mesa-24.0.1/src/gallium/targets/dri/target.c | ||
25 | @@ -129,6 +129,7 @@ DEFINE_LOADER_DRM_ENTRYPOINT(sti) | ||
26 | DEFINE_LOADER_DRM_ENTRYPOINT(stm) | ||
27 | DEFINE_LOADER_DRM_ENTRYPOINT(sun4i_drm) | ||
28 | DEFINE_LOADER_DRM_ENTRYPOINT(udl) | ||
29 | +DEFINE_LOADER_DRM_ENTRYPOINT(xlnx) | ||
30 | #endif | ||
31 | |||
32 | #if defined(GALLIUM_LIMA) | ||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch deleted file mode 100644 index fdb30564..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 9470d00850e8b622d963d4d9c61ad1e59972310a Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Tue, 28 Jan 2020 16:10:54 -0800 | ||
4 | Subject: [PATCH 1/2] src: egl: eglinfo: Align EXT_platform_device extension | ||
5 | macros with khronos | ||
6 | |||
7 | Although the macro definitions are consistent, using the macros name | ||
8 | defined under khronos makes it backward compatible with older eglext.h | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | Upstream-Status: Inappropriate [Xilinx specific] | ||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | --- | ||
14 | src/egl/opengl/eglinfo.c | 6 +++--- | ||
15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c | ||
18 | index 72fe45a..e8a0225 100644 | ||
19 | --- a/src/egl/opengl/eglinfo.c | ||
20 | +++ b/src/egl/opengl/eglinfo.c | ||
21 | @@ -305,17 +305,17 @@ main(int argc, char *argv[]) | ||
22 | NULL), "Android platform"); | ||
23 | if (strstr(clientext, "EGL_MESA_platform_gbm") || | ||
24 | strstr(clientext, "EGL_KHR_platform_gbm")) | ||
25 | - ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_GBM_MESA, | ||
26 | + ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_GBM_KHR, | ||
27 | EGL_DEFAULT_DISPLAY, | ||
28 | NULL), "GBM platform"); | ||
29 | if (strstr(clientext, "EGL_EXT_platform_wayland") || | ||
30 | strstr(clientext, "EGL_KHR_platform_wayland")) | ||
31 | - ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, | ||
32 | + ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR, | ||
33 | EGL_DEFAULT_DISPLAY, | ||
34 | NULL), "Wayland platform"); | ||
35 | if (strstr(clientext, "EGL_EXT_platform_x11") || | ||
36 | strstr(clientext, "EGL_KHR_platform_x11")) | ||
37 | - ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_X11_EXT, | ||
38 | + ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_X11_KHR, | ||
39 | EGL_DEFAULT_DISPLAY, | ||
40 | NULL), "X11 platform"); | ||
41 | if (strstr(clientext, "EGL_MESA_platform_surfaceless")) | ||
42 | -- | ||
43 | 2.17.1 | ||
44 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch deleted file mode 100644 index 7212ef27..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 040b0b79a8e73a3348ab2e95f817636a7d479f18 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Tue, 28 Jan 2020 16:17:46 -0800 | ||
4 | Subject: [PATCH 2/2] src: egl: eglinfo: Use EGL_PLATFORM_DEVICE_EXT only if | ||
5 | the EGL provider supports it | ||
6 | |||
7 | Compiling against the other EGL provider like mali fails, as they dont | ||
8 | support this macro as one of thier supported platforms | ||
9 | |||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
11 | Upstream-Status: Inappropriate [Xilinx specific] | ||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | --- | ||
14 | src/egl/opengl/eglinfo.c | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | diff --git a/src/egl/opengl/eglinfo.c b/src/egl/opengl/eglinfo.c | ||
18 | index e8a0225..bc0e869 100644 | ||
19 | --- a/src/egl/opengl/eglinfo.c | ||
20 | +++ b/src/egl/opengl/eglinfo.c | ||
21 | @@ -243,6 +243,7 @@ doOneDisplay(EGLDisplay d, const char *name) | ||
22 | static int | ||
23 | doOneDevice(EGLDeviceEXT d, int i) | ||
24 | { | ||
25 | +#ifdef EGL_PLATFORM_DEVICE_EXT | ||
26 | PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplay = | ||
27 | (PFNEGLGETPLATFORMDISPLAYEXTPROC) | ||
28 | eglGetProcAddress("eglGetPlatformDisplayEXT"); | ||
29 | @@ -253,6 +254,9 @@ doOneDevice(EGLDeviceEXT d, int i) | ||
30 | |||
31 | return doOneDisplay(getPlatformDisplay(EGL_PLATFORM_DEVICE_EXT, d, NULL), | ||
32 | "Platform Device"); | ||
33 | +#else | ||
34 | + return 0; | ||
35 | +#endif | ||
36 | } | ||
37 | |||
38 | |||
39 | -- | ||
40 | 2.17.1 | ||
41 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch deleted file mode 100644 index 6cfecb38..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [libmali specific] | ||
2 | |||
3 | Index: mesa-demos-8.5.0/src/egl/opengl/eglinfo.c | ||
4 | =================================================================== | ||
5 | --- mesa-demos-8.5.0.orig/src/egl/opengl/eglinfo.c | ||
6 | +++ mesa-demos-8.5.0/src/egl/opengl/eglinfo.c | ||
7 | @@ -195,6 +195,7 @@ PrintDisplayExtensions(EGLDisplay d) | ||
8 | } | ||
9 | |||
10 | |||
11 | +#ifdef EGL_EXT_device_base | ||
12 | static const char * | ||
13 | PrintDeviceExtensions(EGLDeviceEXT d) | ||
14 | { | ||
15 | @@ -211,7 +212,7 @@ PrintDeviceExtensions(EGLDeviceEXT d) | ||
16 | |||
17 | return PrintExtensions(extensions); | ||
18 | } | ||
19 | - | ||
20 | +#endif | ||
21 | |||
22 | static int | ||
23 | doOneDisplay(EGLDisplay d, const char *name) | ||
24 | @@ -240,6 +241,7 @@ doOneDisplay(EGLDisplay d, const char *n | ||
25 | } | ||
26 | |||
27 | |||
28 | +#ifdef EGL_EXT_device_base | ||
29 | static int | ||
30 | doOneDevice(EGLDeviceEXT d, int i) | ||
31 | { | ||
32 | @@ -258,8 +260,9 @@ doOneDevice(EGLDeviceEXT d, int i) | ||
33 | return 0; | ||
34 | #endif | ||
35 | } | ||
36 | +#endif | ||
37 | |||
38 | - | ||
39 | +#ifdef EGL_EXT_device_base | ||
40 | static int | ||
41 | doDevices(const char *name) | ||
42 | { | ||
43 | @@ -288,7 +291,7 @@ doDevices(const char *name) | ||
44 | |||
45 | return ret; | ||
46 | } | ||
47 | - | ||
48 | +#endif | ||
49 | |||
50 | int | ||
51 | main(int argc, char *argv[]) | ||
52 | @@ -322,13 +325,17 @@ main(int argc, char *argv[]) | ||
53 | ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_X11_KHR, | ||
54 | EGL_DEFAULT_DISPLAY, | ||
55 | NULL), "X11 platform"); | ||
56 | +#ifdef EGL_PLATFORM_SURFACELESS_MESA | ||
57 | if (strstr(clientext, "EGL_MESA_platform_surfaceless")) | ||
58 | ret += doOneDisplay(getPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, | ||
59 | EGL_DEFAULT_DISPLAY, | ||
60 | NULL), "Surfaceless platform"); | ||
61 | +#endif | ||
62 | +#ifdef EGL_EXT_device_base | ||
63 | if (strstr(clientext, "EGL_EXT_device_enumeration") && | ||
64 | strstr(clientext, "EGL_EXT_platform_device")) | ||
65 | ret += doDevices("Device platform"); | ||
66 | +#endif | ||
67 | } | ||
68 | else { | ||
69 | ret = doOneDisplay(eglGetDisplay(EGL_DEFAULT_DISPLAY), "Default display"); | ||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend deleted file mode 100644 index 5c84f56e..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos_%.bbappend +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/mesa-demos:" | ||
2 | |||
3 | SRC_URI += " \ | ||
4 | file://0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch \ | ||
5 | file://0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch \ | ||
6 | file://libmali-egl-workaround.patch \ | ||
7 | " | ||
8 | |||
9 | DEPENDS += "wayland-protocols" | ||
10 | |||
11 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
12 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
13 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
14 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
15 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
16 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend deleted file mode 100644 index a8e18a57..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-gl_%.bbappend +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | PACKAGECONFIG:append = " dri3 gallium" | ||
2 | |||
3 | # If we're using libmali-xlnx, then we need to bring it in for the KHR/khrplatform.h file | ||
4 | DEPENDS .= "${@' libmali-xlnx' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else ''}" | ||
5 | RDEPENDS:libgl-mesa-dev .= "${@' libmali-xlnx-dev' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else ''}" | ||
6 | |||
7 | do_install:append () { | ||
8 | if ${@'true' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else 'false'} ; then | ||
9 | rm -rf ${D}${includedir}/KHR/* | ||
10 | fi | ||
11 | } | ||
12 | |||
13 | # If we require libmali-xlnx, this becomes MACHINE_ARCH specific | ||
14 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
15 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
16 | MALI_PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
17 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
18 | PACKAGE_ARCH = "${@'${MALI_PACKAGE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend b/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend deleted file mode 100644 index 86183f54..00000000 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa_%.bbappend +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
2 | SRC_URI:append:class-target = " file://0001-DRI_Add_xlnx_dri.patch" | ||
3 | |||
4 | # This is not compatible with the mali400 driver, use mesa-gl instead | ||
5 | CONFLICT_DISTRO_FEATURES:class-target = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', bb.utils.contains('DISTRO_FEATURES', 'libmali', 'libmali', '', d), '', d)}" | ||
6 | |||
7 | # Enable lima if not using libmali | ||
8 | PACKAGECONFIG_MALI = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '', 'lima', d)}" | ||
9 | PACKAGECONFIG:append:class-target = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${PACKAGECONFIG_MALI}', '', d)}" | ||
10 | |||
11 | PACKAGE_ARCH_DEFAULT := "${PACKAGE_ARCH}" | ||
12 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
13 | MALI_PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
15 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MALI_PACKAGE_ARCH}', '${PACKAGE_ARCH_DEFAULT}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend b/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend deleted file mode 100644 index 03823f6e..00000000 --- a/meta-xilinx-core/recipes-graphics/virglrenderer/virglrenderer_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch deleted file mode 100644 index de1f3719..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From 3fbb596e53524e78703b76c4fdc33cd6ac62f777 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Fri, 11 Dec 2020 16:21:38 -0800 | ||
4 | Subject: [PATCH] libweston: Remove substitute format for ARGB8888 | ||
5 | |||
6 | Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same | ||
7 | as opaque substitute. | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
10 | Upstream-Status: Inappropriate [Xilinx specific] | ||
11 | |||
12 | Reworked the patch for the newer weston | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | --- | ||
16 | libweston/pixel-formats.c | 1 - | ||
17 | 1 file changed, 1 deletion(-) | ||
18 | |||
19 | Index: weston-13.0.0/libweston/pixel-formats.c | ||
20 | =================================================================== | ||
21 | --- weston-13.0.0.orig/libweston/pixel-formats.c | ||
22 | +++ weston-13.0.0/libweston/pixel-formats.c | ||
23 | @@ -251,7 +251,6 @@ static const struct pixel_format_info pi | ||
24 | { | ||
25 | DRM_FORMAT(ARGB8888), | ||
26 | BITS_RGBA_FIXED(8, 8, 8, 8), | ||
27 | - .opaque_substitute = DRM_FORMAT_XRGB8888, | ||
28 | .addfb_legacy_depth = 32, | ||
29 | .bpp = 32, | ||
30 | GL_INTERNALFORMAT(GL_RGBA8), | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch deleted file mode 100644 index 6b5f53b0..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 3fbb596e53524e78703b76c4fdc33cd6ac62f777 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Fri, 11 Dec 2020 16:21:38 -0800 | ||
4 | Subject: [PATCH] libweston: Remove substitute format for ARGB8888 | ||
5 | |||
6 | Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same | ||
7 | as opaque substitute. | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
10 | Upstream-Status: Inappropriate [Xilinx specific] | ||
11 | --- | ||
12 | libweston/pixel-formats.c | 1 - | ||
13 | 1 file changed, 1 deletion(-) | ||
14 | |||
15 | diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c | ||
16 | index 79dc709..ec2d3b7 100644 | ||
17 | --- a/libweston/pixel-formats.c | ||
18 | +++ b/libweston/pixel-formats.c | ||
19 | @@ -193,7 +193,6 @@ static const struct pixel_format_info pixel_format_table[] = { | ||
20 | { | ||
21 | DRM_FORMAT(ARGB8888), | ||
22 | BITS_RGBA_FIXED(8, 8, 8, 8), | ||
23 | - .opaque_substitute = DRM_FORMAT_XRGB8888, | ||
24 | .depth = 32, | ||
25 | .bpp = 32, | ||
26 | GL_FORMAT(GL_BGRA_EXT), | ||
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/init b/meta-xilinx-core/recipes-graphics/wayland/files/init deleted file mode 100644 index f74ac8b1..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/init +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | ### BEGIN INIT INFO | ||
4 | # Provides: weston | ||
5 | # Required-Start: $local_fs $remote_fs | ||
6 | # Required-Stop: $local_fs $remote_fs | ||
7 | # Default-Start: 2 3 4 5 | ||
8 | # Default-Stop: 0 1 6 | ||
9 | ### END INIT INFO | ||
10 | |||
11 | if test -e /etc/default/weston ; then | ||
12 | . /etc/default/weston | ||
13 | fi | ||
14 | |||
15 | killproc() { | ||
16 | pid=`/bin/pidof $1` | ||
17 | [ "$pid" != "" ] && kill $pid | ||
18 | } | ||
19 | |||
20 | read CMDLINE < /proc/cmdline | ||
21 | for x in $CMDLINE; do | ||
22 | case $x in | ||
23 | weston=false) | ||
24 | echo "Weston disabled" | ||
25 | exit 0; | ||
26 | ;; | ||
27 | esac | ||
28 | done | ||
29 | |||
30 | case "$1" in | ||
31 | start) | ||
32 | . /etc/profile | ||
33 | export HOME=ROOTHOME | ||
34 | |||
35 | weston-start -- --continue-without-input $OPTARGS | ||
36 | ;; | ||
37 | |||
38 | stop) | ||
39 | echo "Stopping Weston" | ||
40 | killproc weston | ||
41 | ;; | ||
42 | |||
43 | restart) | ||
44 | $0 stop | ||
45 | sleep 1 | ||
46 | $0 start | ||
47 | ;; | ||
48 | |||
49 | *) | ||
50 | echo "usage: $0 { start | stop | restart }" | ||
51 | ;; | ||
52 | esac | ||
53 | |||
54 | exit 0 | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/weston.service b/meta-xilinx-core/recipes-graphics/wayland/files/weston.service deleted file mode 100644 index c7583e92..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/files/weston.service +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | # This is a system unit for launching Weston with auto-login as the | ||
2 | # user configured here. | ||
3 | # | ||
4 | # Weston must be built with systemd support, and your weston.ini must load | ||
5 | # the plugin systemd-notify.so. | ||
6 | [Unit] | ||
7 | Description=Weston, a Wayland compositor, as a system service | ||
8 | Documentation=man:weston(1) man:weston.ini(5) | ||
9 | Documentation=http://wayland.freedesktop.org/ | ||
10 | |||
11 | # Make sure we are started after logins are permitted. | ||
12 | Requires=systemd-user-sessions.service | ||
13 | After=systemd-user-sessions.service | ||
14 | |||
15 | # If Plymouth is used, we want to start when it is on its way out. | ||
16 | After=plymouth-quit-wait.service | ||
17 | |||
18 | # D-Bus is necessary for contacting logind. Logind is required. | ||
19 | Wants=dbus.socket | ||
20 | After=dbus.socket | ||
21 | |||
22 | # Ensure the socket is present | ||
23 | Requires=weston.socket | ||
24 | |||
25 | # Since we are part of the graphical session, make sure we are started before | ||
26 | # it is complete. | ||
27 | Before=graphical.target | ||
28 | |||
29 | # Prevent starting on systems without virtual consoles, Weston requires one | ||
30 | # for now. | ||
31 | ConditionPathExists=/dev/tty0 | ||
32 | |||
33 | [Service] | ||
34 | # Requires systemd-notify.so Weston plugin. | ||
35 | Type=notify | ||
36 | EnvironmentFile=/etc/default/weston | ||
37 | ExecStart=/usr/bin/weston --continue-without-input --modules=systemd-notify.so | ||
38 | |||
39 | # Optional watchdog setup | ||
40 | TimeoutStartSec=60 | ||
41 | WatchdogSec=20 | ||
42 | |||
43 | # The user to run Weston as. | ||
44 | User=weston | ||
45 | Group=weston | ||
46 | |||
47 | # Make sure the working directory is the users home directory | ||
48 | WorkingDirectory=/home/weston | ||
49 | |||
50 | # Set up a full user session for the user, required by Weston. | ||
51 | PAMName=weston-autologin | ||
52 | |||
53 | # A virtual terminal is needed. | ||
54 | TTYPath=/dev/tty7 | ||
55 | TTYReset=yes | ||
56 | TTYVHangup=yes | ||
57 | TTYVTDisallocate=yes | ||
58 | |||
59 | # Fail to start if not controlling the tty. | ||
60 | StandardInput=tty-fail | ||
61 | StandardOutput=journal | ||
62 | StandardError=journal | ||
63 | |||
64 | # Log this user with utmp, letting it show up with commands 'w' and 'who'. | ||
65 | UtmpIdentifier=tty7 | ||
66 | UtmpMode=user | ||
67 | |||
68 | [Install] | ||
69 | # Note: If you only want weston to start on-demand, remove this line with a | ||
70 | # service drop file | ||
71 | WantedBy=graphical.target | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston-init.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston-init.bbappend deleted file mode 100644 index f0d64e27..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston-init.bbappend +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | PACKAGECONFIG += "no-idle-timeout" | ||
2 | |||
3 | do_install:append:zynqmp() { | ||
4 | sed -i -e "/^\[core\]/a gbm-format=rgb565" ${D}${sysconfdir}/xdg/weston/weston.ini | ||
5 | } | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston.inc b/meta-xilinx-core/recipes-graphics/wayland/weston.inc deleted file mode 100644 index fadc9486..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston.inc +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | SRC_URI:append:zynqmp = " file://0001-libweston-Remove-substitute-format-for-ARGB8888.patch" | ||
2 | |||
3 | # Due to the SRC_URI zynqmp specific change, this needs to be SOC_FAMILY_ARCH specific | ||
4 | SOC_FAMILY_ARCH ??= "${TUNE_PKGARCH}" | ||
5 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
6 | DEFAULT_PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" | ||
7 | PACKAGE_ARCH = "${DEFAULT_PACKAGE_ARCH}" | ||
8 | |||
9 | |||
10 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
11 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
12 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
13 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
14 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
15 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch deleted file mode 100644 index f8f75894..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Thu, 1 Apr 2021 00:12:00 +0300 | ||
4 | Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down | ||
5 | |||
6 | Tearing down the drm-backend when there are no input devices, would call | ||
7 | for the gbm device destruction before compositor shutdown. The latter | ||
8 | would call into the renderer detroy function and assume that the | ||
9 | EGLDisplay, which was created using the before-mentioned gbm device, is | ||
10 | still available. This patch re-orders the gbm destruction after the | ||
11 | compositor shutdown when no one would make use of it. | ||
12 | |||
13 | Fixes: #314 | ||
14 | |||
15 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
16 | Suggested-by: Daniel Stone <daniel.stone@collabora.com> | ||
17 | |||
18 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] | ||
19 | --- | ||
20 | libweston/backend-drm/drm.c | 8 ++++---- | ||
21 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c | ||
24 | index 2780f3b..fbcfeca 100644 | ||
25 | --- a/libweston/backend-drm/drm.c | ||
26 | +++ b/libweston/backend-drm/drm.c | ||
27 | @@ -3025,10 +3025,6 @@ err_drm_source: | ||
28 | err_udev_input: | ||
29 | udev_input_destroy(&b->input); | ||
30 | err_sprite: | ||
31 | -#ifdef BUILD_DRM_GBM | ||
32 | - if (b->gbm) | ||
33 | - gbm_device_destroy(b->gbm); | ||
34 | -#endif | ||
35 | destroy_sprites(b); | ||
36 | err_udev_dev: | ||
37 | udev_device_unref(drm_device); | ||
38 | @@ -3038,6 +3034,10 @@ err_launcher: | ||
39 | weston_launcher_destroy(compositor->launcher); | ||
40 | err_compositor: | ||
41 | weston_compositor_shutdown(compositor); | ||
42 | +#ifdef BUILD_DRM_GBM | ||
43 | + if (b->gbm) | ||
44 | + gbm_device_destroy(b->gbm); | ||
45 | +#endif | ||
46 | free(b); | ||
47 | return NULL; | ||
48 | } | ||
49 | -- | ||
50 | 2.33.0 | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch deleted file mode 100644 index 06e0f7ba..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 20 Apr 2021 20:42:18 -0700 | ||
4 | Subject: [PATCH] meson.build: fix incorrect header | ||
5 | |||
6 | The wayland.c actually include 'xdg-shell-client-protocol.h' instead of | ||
7 | the server one, so fix it. Otherwise, it's possible to get build failure | ||
8 | due to race condition. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | libweston/backend-wayland/meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build | ||
18 | index 7e82513..29270b5 100644 | ||
19 | --- a/libweston/backend-wayland/meson.build | ||
20 | +++ b/libweston/backend-wayland/meson.build | ||
21 | @@ -10,7 +10,7 @@ srcs_wlwl = [ | ||
22 | fullscreen_shell_unstable_v1_protocol_c, | ||
23 | presentation_time_protocol_c, | ||
24 | presentation_time_server_protocol_h, | ||
25 | - xdg_shell_server_protocol_h, | ||
26 | + xdg_shell_client_protocol_h, | ||
27 | xdg_shell_protocol_c, | ||
28 | ] | ||
29 | |||
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch deleted file mode 100644 index 6fe86ff3..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Denys Dmytriyenko <denys@ti.com> | ||
3 | Date: Tue, 8 Sep 2020 19:37:42 -0400 | ||
4 | Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and | ||
5 | O_CREAT | ||
6 | |||
7 | musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), | ||
8 | O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: | ||
9 | |||
10 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': | ||
11 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] | ||
12 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
13 | | | ^~~~ | ||
14 | | | popen | ||
15 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) | ||
16 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
17 | | | ^~~~~~ | ||
18 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in | ||
19 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) | ||
20 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
21 | | | ^~~~~~~~~ | ||
22 | | ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) | ||
23 | | 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); | ||
24 | | | ^~~~~~~ | ||
25 | |||
26 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] | ||
27 | |||
28 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
29 | --- | ||
30 | tests/weston-test-fixture-compositor.c | 1 + | ||
31 | 1 file changed, 1 insertion(+) | ||
32 | |||
33 | diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c | ||
34 | index 0c9855f..e0e32c9 100644 | ||
35 | --- a/tests/weston-test-fixture-compositor.c | ||
36 | +++ b/tests/weston-test-fixture-compositor.c | ||
37 | @@ -31,6 +31,7 @@ | ||
38 | #include <unistd.h> | ||
39 | #include <sys/file.h> | ||
40 | #include <errno.h> | ||
41 | +#include <fcntl.h> | ||
42 | |||
43 | #include "shared/helpers.h" | ||
44 | #include "weston-test-fixture-compositor.h" | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index f6ebfd8f..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | |||
6 | PAM | ||
7 | |||
8 | weston-launch requires PAM for starting weston as a non-root user. | ||
9 | |||
10 | Since starting weston as root is a valid use case by itself, if | ||
11 | PAM is not available, provide a default version of weston-launch | ||
12 | without non-root-user support. | ||
13 | |||
14 | Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] | ||
15 | |||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
19 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | ||
20 | |||
21 | --- | ||
22 | libweston/meson.build | 16 ++++++++++++---- | ||
23 | libweston/weston-launch.c | 21 +++++++++++++++++++++ | ||
24 | meson_options.txt | 7 +++++++ | ||
25 | 3 files changed, 40 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/libweston/meson.build b/libweston/meson.build | ||
28 | index 08d23ec..cb9fd3f 100644 | ||
29 | --- a/libweston/meson.build | ||
30 | +++ b/libweston/meson.build | ||
31 | @@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( | ||
32 | ) | ||
33 | |||
34 | if get_option('weston-launch') | ||
35 | - dep_pam = cc.find_library('pam') | ||
36 | + deps_weston_launch = [systemd_dep, dep_libdrm] | ||
37 | |||
38 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
39 | - error('pam_open_session not found for weston-launch') | ||
40 | + if get_option('pam') | ||
41 | + dep_pam = cc.find_library('pam') | ||
42 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
43 | + error('pam_open_session not found for weston-launch') | ||
44 | + endif | ||
45 | + | ||
46 | + if dep_pam.found() | ||
47 | + deps_weston_launch += dep_pam | ||
48 | + config_h.set('HAVE_PAM', '1') | ||
49 | + endif | ||
50 | endif | ||
51 | |||
52 | executable( | ||
53 | 'weston-launch', | ||
54 | 'weston-launch.c', | ||
55 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], | ||
56 | + dependencies: deps_weston_launch, | ||
57 | include_directories: common_inc, | ||
58 | install: true | ||
59 | ) | ||
60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
61 | index 521cb2c..2d42d33 100644 | ||
62 | --- a/libweston/weston-launch.c | ||
63 | +++ b/libweston/weston-launch.c | ||
64 | @@ -51,7 +51,9 @@ | ||
65 | |||
66 | #include <pwd.h> | ||
67 | #include <grp.h> | ||
68 | +#ifdef HAVE_PAM | ||
69 | #include <security/pam_appl.h> | ||
70 | +#endif | ||
71 | |||
72 | #ifdef HAVE_SYSTEMD_LOGIN | ||
73 | #include <systemd/sd-login.h> | ||
74 | @@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) | ||
75 | #endif | ||
76 | |||
77 | struct weston_launch { | ||
78 | +#ifdef HAVE_PAM | ||
79 | struct pam_conv pc; | ||
80 | pam_handle_t *ph; | ||
81 | +#endif | ||
82 | int tty; | ||
83 | int ttynr; | ||
84 | int sock[2]; | ||
85 | @@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | +#ifdef HAVE_PAM | ||
90 | static int | ||
91 | pam_conversation_fn(int msg_count, | ||
92 | const struct pam_message **messages, | ||
93 | @@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | +#endif | ||
98 | |||
99 | static int | ||
100 | setup_launcher_socket(struct weston_launch *wl) | ||
101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) | ||
102 | close(wl->signalfd); | ||
103 | close(wl->sock[0]); | ||
104 | |||
105 | +#ifdef HAVE_PAM | ||
106 | if (wl->new_user) { | ||
107 | err = pam_close_session(wl->ph, 0); | ||
108 | if (err) | ||
109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) | ||
110 | err, pam_strerror(wl->ph, err)); | ||
111 | pam_end(wl->ph, err); | ||
112 | } | ||
113 | +#endif | ||
114 | |||
115 | /* | ||
116 | * Get a fresh handle to the tty as the previous one is in | ||
117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
118 | setenv("HOME", wl->pw->pw_dir, 1); | ||
119 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
120 | |||
121 | +#ifdef HAVE_PAM | ||
122 | env = pam_getenvlist(wl->ph); | ||
123 | if (env) { | ||
124 | for (i = 0; env[i]; ++i) { | ||
125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
126 | } | ||
127 | free(env); | ||
128 | } | ||
129 | +#endif | ||
130 | |||
131 | /* | ||
132 | * We open a new session, so it makes sense | ||
133 | @@ -789,8 +799,10 @@ static void | ||
134 | help(const char *name) | ||
135 | { | ||
136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
137 | +#ifdef HAVE_PAM | ||
138 | fprintf(stderr, " -u, --user Start session as specified username,\n" | ||
139 | " e.g. -u joe, requires root.\n"); | ||
140 | +#endif | ||
141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | ||
142 | " e.g. -t /dev/tty4, requires -u option.\n"); | ||
143 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) | ||
145 | int i, c; | ||
146 | char *tty = NULL; | ||
147 | struct option opts[] = { | ||
148 | +#ifdef HAVE_PAM | ||
149 | { "user", required_argument, NULL, 'u' }, | ||
150 | +#endif | ||
151 | { "tty", required_argument, NULL, 't' }, | ||
152 | { "verbose", no_argument, NULL, 'v' }, | ||
153 | { "help", no_argument, NULL, 'h' }, | ||
154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) | ||
155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | ||
156 | switch (c) { | ||
157 | case 'u': | ||
158 | +#ifdef HAVE_PAM | ||
159 | wl.new_user = optarg; | ||
160 | if (getuid() != 0) { | ||
161 | fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); | ||
162 | exit(EXIT_FAILURE); | ||
163 | } | ||
164 | +#else | ||
165 | + fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); | ||
166 | + exit(EXIT_FAILURE); | ||
167 | +#endif | ||
168 | break; | ||
169 | case 't': | ||
170 | tty = optarg; | ||
171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) | ||
172 | if (setup_tty(&wl, tty) < 0) | ||
173 | exit(EXIT_FAILURE); | ||
174 | |||
175 | +#ifdef HAVE_PAM | ||
176 | if (wl.new_user && setup_pam(&wl) < 0) | ||
177 | exit(EXIT_FAILURE); | ||
178 | +#endif | ||
179 | |||
180 | if (setup_launcher_socket(&wl) < 0) | ||
181 | exit(EXIT_FAILURE); | ||
182 | diff --git a/meson_options.txt b/meson_options.txt | ||
183 | index 239bd2d..99e4ec3 100644 | ||
184 | --- a/meson_options.txt | ||
185 | +++ b/meson_options.txt | ||
186 | @@ -73,6 +73,13 @@ option( | ||
187 | ) | ||
188 | |||
189 | option( | ||
190 | + 'pam', | ||
191 | + type: 'boolean', | ||
192 | + value: true, | ||
193 | + description: 'Define if PAM is available' | ||
194 | +) | ||
195 | + | ||
196 | +option( | ||
197 | 'xwayland', | ||
198 | type: 'boolean', | ||
199 | value: true, | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch deleted file mode 100644 index a4444e5d..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | Fix atomic modesetting with musl | ||
2 | |||
3 | atomic modesetting seems to fail with drm weston backend and this patch fixes | ||
4 | it, below errors are seen before weston exits | ||
5 | |||
6 | atomic: couldn't commit new state: Invalid argument | ||
7 | |||
8 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | --- a/libweston/backend-drm/kms.c | ||
12 | +++ b/libweston/backend-drm/kms.c | ||
13 | @@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr | ||
14 | wl_list_for_each(plane, &b->plane_list, link) { | ||
15 | drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", | ||
16 | (unsigned long) plane->plane_id); | ||
17 | - plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
18 | - plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
19 | + //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); | ||
20 | + //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); | ||
21 | } | ||
22 | |||
23 | flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start b/meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start deleted file mode 100644 index a97e7b38..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/systemd-notify.weston-start +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # SPDX-FileCopyrightText: Huawei Inc. | ||
4 | # SPDX-License-Identifier: Apache-2.0 | ||
5 | |||
6 | |||
7 | if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then | ||
8 | add_weston_module "systemd-notify.so" | ||
9 | fi | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop deleted file mode 100644 index 1086ae8b..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/weston.desktop +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | [Desktop Entry] | ||
2 | Encoding=UTF-8 | ||
3 | Type=Application | ||
4 | Name=Weston | ||
5 | Comment=Wayland Compostitor | ||
6 | Exec=weston | ||
7 | Icon=weston | ||
8 | Terminal=false | ||
9 | Categories=Utility; | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png b/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png deleted file mode 100644 index ea8b7e0e..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/weston.png +++ /dev/null | |||
Binary files differ | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start b/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start deleted file mode 100644 index db384b1a..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston/xwayland.weston-start +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if type Xwayland >/dev/null 2>/dev/null; then | ||
4 | mkdir -p /tmp/.X11-unix | ||
5 | fi | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_13.%.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_13.%.bbappend deleted file mode 100644 index 3ee9cafa..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_13.%.bbappend +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend:zynqmp := "${THISDIR}/files:" | ||
2 | |||
3 | require weston.inc | ||
4 | |||
5 | ZYNQMP_WARN_DEFAULT = "0" | ||
6 | ZYNQMP_WARN_DEFAULT:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '0', d)}" | ||
7 | ZYNQMP_WARN = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${ZYNQMP_WARN_DEFAULT}', '0', d)}" | ||
8 | |||
9 | python() { | ||
10 | if d.getVar('ZYNQMP_WARN') == "1": | ||
11 | raise bb.parse.SkipRecipe("Weston %s requires GLES 3 interfaces which are not available when libmali enabled. Use Weston 9.0.0.0 instead." % (d.getVar('PV'))) | ||
12 | } | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb deleted file mode 100644 index a534b1b7..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bb +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | SUMMARY = "Weston, a Wayland compositor" | ||
2 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | ||
3 | HOMEPAGE = "http://wayland.freedesktop.org" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | ||
6 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | ||
7 | |||
8 | # We want this version to be "newer" then 10, only if libmali and mali400 are both enabled | ||
9 | ORIG_PE := "${PE}" | ||
10 | MALI_PE = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '${ORIG_PE}', d)}" | ||
11 | PE = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${MALI_PE}', '${ORIG_PE}', d)}" | ||
12 | |||
13 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | ||
14 | file://weston.png \ | ||
15 | file://weston.desktop \ | ||
16 | file://xwayland.weston-start \ | ||
17 | file://systemd-notify.weston-start \ | ||
18 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | ||
19 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
20 | file://0001-meson.build-fix-incorrect-header.patch \ | ||
21 | file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ | ||
22 | " | ||
23 | |||
24 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | ||
25 | |||
26 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | ||
27 | |||
28 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | ||
29 | |||
30 | inherit meson pkgconfig useradd features_check | ||
31 | # depends on virtual/egl | ||
32 | # weston-init requires pam enabled if started via systemd | ||
33 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
34 | |||
35 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | ||
36 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | ||
37 | |||
38 | LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}" | ||
39 | |||
40 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | ||
41 | |||
42 | EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" | ||
43 | |||
44 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | ||
45 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | ||
46 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | ||
47 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | ||
48 | launch \ | ||
49 | image-jpeg \ | ||
50 | screenshare \ | ||
51 | shell-desktop \ | ||
52 | shell-fullscreen \ | ||
53 | shell-ivi" | ||
54 | |||
55 | # | ||
56 | # Compositor choices | ||
57 | # | ||
58 | # Weston on KMS | ||
59 | PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" | ||
60 | # Weston on Wayland (nested Weston) | ||
61 | PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" | ||
62 | # Weston on X11 | ||
63 | PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" | ||
64 | # Headless Weston | ||
65 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | ||
66 | # Weston on framebuffer | ||
67 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | ||
68 | # Weston on RDP | ||
69 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | ||
70 | # weston-launch | ||
71 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | ||
72 | # VA-API desktop recorder | ||
73 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | ||
74 | # Weston with EGL support | ||
75 | PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" | ||
76 | # Weston with lcms support | ||
77 | PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" | ||
78 | # Weston with webp support | ||
79 | PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" | ||
80 | # Weston with systemd-login support | ||
81 | PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" | ||
82 | # Weston with Xwayland support (requires X11 and Wayland) | ||
83 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | ||
84 | # colord CMS support | ||
85 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | ||
86 | # Clients support | ||
87 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
88 | # Virtual remote output with GStreamer on DRM backend | ||
89 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | ||
90 | # Weston with PAM support | ||
91 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
92 | # Weston with screen-share support | ||
93 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | ||
94 | # Traditional desktop shell | ||
95 | PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" | ||
96 | # Fullscreen shell | ||
97 | PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" | ||
98 | # In-Vehicle Infotainment (IVI) shell | ||
99 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | ||
100 | # JPEG image loading support | ||
101 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | ||
102 | |||
103 | do_install:append() { | ||
104 | # Weston doesn't need the .la files to load modules, so wipe them | ||
105 | rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la | ||
106 | |||
107 | # If X11, ship a desktop file to launch it | ||
108 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then | ||
109 | install -d ${D}${datadir}/applications | ||
110 | install ${WORKDIR}/weston.desktop ${D}${datadir}/applications | ||
111 | |||
112 | install -d ${D}${datadir}/icons/hicolor/48x48/apps | ||
113 | install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps | ||
114 | fi | ||
115 | |||
116 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then | ||
117 | install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland | ||
118 | fi | ||
119 | |||
120 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then | ||
121 | install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify | ||
122 | fi | ||
123 | |||
124 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then | ||
125 | chmod u+s ${D}${bindir}/weston-launch | ||
126 | fi | ||
127 | } | ||
128 | |||
129 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ | ||
130 | libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" | ||
131 | |||
132 | FILES:${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" | ||
133 | FILES:${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" | ||
134 | |||
135 | FILES:libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" | ||
136 | SUMMARY:libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." | ||
137 | |||
138 | FILES:${PN}-examples = "${bindir}/*" | ||
139 | |||
140 | FILES:${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" | ||
141 | RDEPENDS:${PN}-xwayland += "xwayland" | ||
142 | |||
143 | RDEPENDS:${PN} += "xkeyboard-config" | ||
144 | RRECOMMENDS:${PN} = "weston-init liberation-fonts" | ||
145 | RRECOMMENDS:${PN}-dev += "wayland-protocols" | ||
146 | |||
147 | USERADD_PACKAGES = "${PN}" | ||
148 | GROUPADD_PARAM:${PN} = "--system weston-launch" | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend deleted file mode 100644 index 80512ac3..00000000 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend:zynqmp := "${THISDIR}/files/9.0.0:${THISDIR}/files:" | ||
2 | |||
3 | require weston.inc | ||
diff --git a/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in new file mode 100644 index 00000000..ba8c8f21 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in | |||
@@ -0,0 +1,8 @@ | |||
1 | # common environment file for sysvinit and systemd | ||
2 | |||
3 | LD_LIBRARY_PATH=/usr/lib/headless:${LD_LIBRARY_PATH} | ||
4 | XSERVER=/usr/bin/Xorg | ||
5 | DISPLAY=:0 | ||
6 | ARGS=" -br -pn @BLANK_ARGS@ @NO_CURSOR_ARG@ " | ||
7 | HOME=@HOME@ | ||
8 | USER=@USER@ | ||
diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch new file mode 100644 index 00000000..8c086ddb --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From e94754360160cfe4faada7b9a523e57004b39e74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Thu, 15 Aug 2024 15:48:21 -0700 | ||
4 | Subject: [PATCH] xf86Rotate.c: Add required NULL check | ||
5 | |||
6 | Add missing NULL check on BlockHandler callback before invoking it. There | ||
7 | is no guarantee that said callback is always defined. | ||
8 | |||
9 | Fixes xorg crash on startup when screen rotation is specified in the config | ||
10 | file. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
15 | --- | ||
16 | hw/xfree86/modes/xf86Rotate.c | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c | ||
20 | index ea9c43c..43eab53 100644 | ||
21 | --- a/hw/xfree86/modes/xf86Rotate.c | ||
22 | +++ b/hw/xfree86/modes/xf86Rotate.c | ||
23 | @@ -230,7 +230,8 @@ xf86RotateBlockHandler(ScreenPtr pScreen, void *pTimeout) | ||
24 | |||
25 | xf86RotateRedisplay(pScreen); | ||
26 | |||
27 | - (*pScreen->BlockHandler) (pScreen, pTimeout); | ||
28 | + if (pScreen->BlockHandler) | ||
29 | + (*pScreen->BlockHandler) (pScreen, pTimeout); | ||
30 | |||
31 | /* Re-wrap if we still need this hook */ | ||
32 | if (xf86_config->rotation_damage != NULL) { | ||
33 | -- | ||
34 | 2.25.1 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index 460ff581..9431a7be 100644 --- a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend | |||
@@ -1,23 +1,17 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
7 | |||
8 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
9 | 2 | ||
10 | SRC_URI += " \ | 3 | SRC_URI += " \ |
11 | file://monitor-hotplug.sh \ | 4 | file://monitor-hotplug.sh \ |
12 | file://99-monitor-hotplug.rules \ | 5 | file://99-monitor-hotplug.rules \ |
6 | file://0001-xf86Rotate.c-Add-required-NULL-check.patch \ | ||
13 | " | 7 | " |
14 | 8 | ||
15 | do_install:append() { | 9 | do_install:append() { |
16 | install -d ${D}${bindir} | 10 | install -d ${D}${bindir} |
17 | install -m 0755 ${WORKDIR}/monitor-hotplug.sh ${D}${bindir} | 11 | install -m 0755 ${UNPACKDIR}/monitor-hotplug.sh ${D}${bindir} |
18 | 12 | ||
19 | install -d ${D}${sysconfdir}/udev/rules.d | 13 | install -d ${D}${sysconfdir}/udev/rules.d |
20 | install -m 0644 ${WORKDIR}/99-monitor-hotplug.rules ${D}${sysconfdir}/udev/rules.d/99-monitor-hotplug.rules | 14 | install -m 0644 ${UNPACKDIR}/99-monitor-hotplug.rules ${D}${sysconfdir}/udev/rules.d/99-monitor-hotplug.rules |
21 | } | 15 | } |
22 | 16 | ||
23 | FILES:${PN} += "${sysconfdir}/udev/rules.d/*" | 17 | FILES:${PN} += "${sysconfdir}/udev/rules.d/*" |
diff --git a/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend b/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend deleted file mode 100644 index c1005f11..00000000 --- a/meta-xilinx-core/recipes-graphics/xwayland/xwayland_%.bbappend +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
7 | |||
diff --git a/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.4.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 new file mode 100644 index 00000000..dde59936 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/dp/files/0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch | |||
@@ -0,0 +1,343 @@ | |||
1 | From adc957ce85d431da42dc42ed4074322d6c94932f Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 16 May 2024 20:31:29 -0600 | ||
4 | Subject: [PATCH] Support both pre 6.4.0 and current i2c probing | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | --- | ||
8 | dp/xfmc/dp141.c | 13 +++++++++++++ | ||
9 | dp/xfmc/fmc.c | 13 +++++++++++++ | ||
10 | dp/xfmc/fmc64.c | 14 ++++++++++++++ | ||
11 | dp/xfmc/fmc65.c | 13 +++++++++++++ | ||
12 | dp/xfmc/idt.c | 21 +++++++++++++++++---- | ||
13 | dp/xfmc/mcdp6000.c | 13 +++++++++++++ | ||
14 | dp/xfmc/tipower.c | 13 +++++++++++++ | ||
15 | 7 files changed, 96 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/dp/xfmc/dp141.c b/dp/xfmc/dp141.c | ||
18 | index dfdb6f4..5fddd2b | ||
19 | --- a/dp/xfmc/dp141.c | ||
20 | +++ b/dp/xfmc/dp141.c | ||
21 | @@ -14,6 +14,7 @@ | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/regmap.h> | ||
24 | #include <linux/slab.h> | ||
25 | +#include <linux/version.h> | ||
26 | |||
27 | /**************************** Type Definitions *******************************/ | ||
28 | |||
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: | ||
43 | return ret; | ||
44 | } | ||
45 | |||
46 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
47 | static void dp141_remove(struct i2c_client *client) | ||
48 | { | ||
49 | } | ||
50 | +#else | ||
51 | +static int dp141_remove(struct i2c_client *client) | ||
52 | +{ | ||
53 | + return 0; | ||
54 | +} | ||
55 | +#endif | ||
56 | |||
57 | static struct i2c_driver dp141_i2c_driver = { | ||
58 | .driver = { | ||
59 | diff --git a/dp/xfmc/fmc.c b/dp/xfmc/fmc.c | ||
60 | index 3447785..2ed136c | ||
61 | --- a/dp/xfmc/fmc.c | ||
62 | +++ b/dp/xfmc/fmc.c | ||
63 | @@ -14,6 +14,7 @@ | ||
64 | #include <linux/module.h> | ||
65 | #include <linux/regmap.h> | ||
66 | #include <linux/slab.h> | ||
67 | +#include <linux/version.h> | ||
68 | |||
69 | /**************************** Type Definitions *******************************/ | ||
70 | |||
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: | ||
85 | return ret; | ||
86 | } | ||
87 | |||
88 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
89 | static void fmc_remove(struct i2c_client *client) | ||
90 | { | ||
91 | } | ||
92 | +#else | ||
93 | +static int fmc_remove(struct i2c_client *client) | ||
94 | +{ | ||
95 | + return 0; | ||
96 | +} | ||
97 | +#endif | ||
98 | |||
99 | static struct i2c_driver fmc_i2c_driver = { | ||
100 | .driver = { | ||
101 | diff --git a/dp/xfmc/fmc64.c b/dp/xfmc/fmc64.c | ||
102 | index 6f5562c..a0bad7a | ||
103 | --- a/dp/xfmc/fmc64.c | ||
104 | +++ b/dp/xfmc/fmc64.c | ||
105 | @@ -14,6 +14,8 @@ | ||
106 | #include <linux/module.h> | ||
107 | #include <linux/regmap.h> | ||
108 | #include <linux/slab.h> | ||
109 | +#include <linux/version.h> | ||
110 | + | ||
111 | /**************************** Type Definitions *******************************/ | ||
112 | static const struct regmap_config fmc64_regmap_config = { | ||
113 | .reg_bits = 16, | ||
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: | ||
128 | return ret; | ||
129 | } | ||
130 | |||
131 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
132 | static void fmc64_remove(struct i2c_client *client) | ||
133 | { | ||
134 | } | ||
135 | +#else | ||
136 | +static int fmc64_remove(struct i2c_client *client) | ||
137 | +{ | ||
138 | + return 0; | ||
139 | +} | ||
140 | +#endif | ||
141 | |||
142 | static struct i2c_driver fmc64_i2c_driver = { | ||
143 | .driver = { | ||
144 | diff --git a/dp/xfmc/fmc65.c b/dp/xfmc/fmc65.c | ||
145 | index 9f091f9..ce7f884 | ||
146 | --- a/dp/xfmc/fmc65.c | ||
147 | +++ b/dp/xfmc/fmc65.c | ||
148 | @@ -14,6 +14,7 @@ | ||
149 | #include <linux/module.h> | ||
150 | #include <linux/regmap.h> | ||
151 | #include <linux/slab.h> | ||
152 | +#include <linux/version.h> | ||
153 | |||
154 | /**************************** Type Definitions *******************************/ | ||
155 | |||
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: | ||
170 | return ret; | ||
171 | } | ||
172 | |||
173 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
174 | static void fmc65_remove(struct i2c_client *client) | ||
175 | { | ||
176 | } | ||
177 | +#else | ||
178 | +static int fmc65_remove(struct i2c_client *client) | ||
179 | +{ | ||
180 | + return 0; | ||
181 | +} | ||
182 | +#endif | ||
183 | |||
184 | static struct i2c_driver fmc65_i2c_driver = { | ||
185 | .driver = { | ||
186 | diff --git a/dp/xfmc/idt.c b/dp/xfmc/idt.c | ||
187 | index 348c863..f332277 | ||
188 | --- a/dp/xfmc/idt.c | ||
189 | +++ b/dp/xfmc/idt.c | ||
190 | @@ -17,6 +17,7 @@ | ||
191 | #include <linux/of_gpio.h> | ||
192 | #include <linux/regmap.h> | ||
193 | #include <linux/slab.h> | ||
194 | +#include <linux/version.h> | ||
195 | |||
196 | #define IDT_8T49N24X_REVID 0x0 /**< Device Revision */ | ||
197 | #define IDT_8T49N24X_DEVID 0x0607 /**< Device ID Code */ | ||
198 | @@ -38,8 +39,8 @@ | ||
199 | #define IDT_8T49N24X_P_MAX pow(2, 22) //!< Maximum P divider value | ||
200 | #define IDT_8T49N24X_M_MAX pow(2, 24) //!< Maximum M multiplier value | ||
201 | |||
202 | -#define TRUE 1 | ||
203 | -#define FALSE 0 | ||
204 | +#define IDT_TRUE 1 | ||
205 | +#define IDT_FALSE 0 | ||
206 | #define XPAR_IIC_0_BASEADDR 0xA0080000 | ||
207 | #define I2C_IDT8N49_ADDR 0x7C | ||
208 | /* | ||
209 | @@ -455,7 +456,7 @@ int IDT_8T49N24x_Init(void) | ||
210 | int ret = 0; | ||
211 | |||
212 | msleep_range(30); | ||
213 | - ret = idt_enable(FALSE); | ||
214 | + ret = idt_enable(IDT_FALSE); | ||
215 | if (ret) | ||
216 | dev_dbg(&idt->client->dev, | ||
217 | "IDT_8T49N24x_enable 0 I2C progmming failed\n"); | ||
218 | @@ -468,7 +469,7 @@ int IDT_8T49N24x_Init(void) | ||
219 | |||
220 | msleep_range(30); | ||
221 | /* enable DPLL and APLL calibration. */ | ||
222 | - ret = idt_enable(TRUE); | ||
223 | + ret = idt_enable(IDT_TRUE); | ||
224 | if (ret) | ||
225 | dev_dbg(&idt->client->dev, | ||
226 | "IDT_8T49N24x_enable 1 I2C progmming failed\n"); | ||
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: | ||
241 | return ret; | ||
242 | } | ||
243 | |||
244 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
245 | static void idt_remove(struct i2c_client *client) | ||
246 | { | ||
247 | } | ||
248 | +#else | ||
249 | +static int idt_remove(struct i2c_client *client) | ||
250 | +{ | ||
251 | + return 0; | ||
252 | +} | ||
253 | +#endif | ||
254 | |||
255 | static struct i2c_driver idt_i2c_driver = { | ||
256 | .driver = { | ||
257 | diff --git a/dp/xfmc/mcdp6000.c b/dp/xfmc/mcdp6000.c | ||
258 | index 5a7c5b2..f13979b | ||
259 | --- a/dp/xfmc/mcdp6000.c | ||
260 | +++ b/dp/xfmc/mcdp6000.c | ||
261 | @@ -14,6 +14,7 @@ | ||
262 | #include <linux/module.h> | ||
263 | #include <linux/regmap.h> | ||
264 | #include <linux/slab.h> | ||
265 | +#include <linux/version.h> | ||
266 | |||
267 | #define SWAP_BYTES(u32Value) ((u32Value & 0x000000FF) << 24)\ | ||
268 | |((u32Value & 0x0000FF00) << 8) \ | ||
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: | ||
283 | return ret; | ||
284 | } | ||
285 | |||
286 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
287 | static void mcdp6000_remove(struct i2c_client *client) | ||
288 | { | ||
289 | } | ||
290 | +#else | ||
291 | +static int mcdp6000_remove(struct i2c_client *client) | ||
292 | +{ | ||
293 | + return 0; | ||
294 | +} | ||
295 | +#endif | ||
296 | |||
297 | static struct i2c_driver mcdp6000_i2c_driver = { | ||
298 | .driver = { | ||
299 | diff --git a/dp/xfmc/tipower.c b/dp/xfmc/tipower.c | ||
300 | index 46c3de1..6d247a8 | ||
301 | --- a/dp/xfmc/tipower.c | ||
302 | +++ b/dp/xfmc/tipower.c | ||
303 | @@ -14,6 +14,7 @@ | ||
304 | #include <linux/module.h> | ||
305 | #include <linux/regmap.h> | ||
306 | #include <linux/slab.h> | ||
307 | +#include <linux/version.h> | ||
308 | |||
309 | /**************************** Type Definitions *******************************/ | ||
310 | |||
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: | ||
325 | return ret; | ||
326 | } | ||
327 | |||
328 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
329 | static void tipower_remove(struct i2c_client *client) | ||
330 | { | ||
331 | } | ||
332 | +#else | ||
333 | +static int tipower_remove(struct i2c_client *client) | ||
334 | +{ | ||
335 | + return 0; | ||
336 | +} | ||
337 | +#endif | ||
338 | |||
339 | static struct i2c_driver tipower_i2c_driver = { | ||
340 | .driver = { | ||
341 | -- | ||
342 | 2.34.1 | ||
343 | |||
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb deleted file mode 100644 index dda6ec31..00000000 --- a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Xilinx DisplayPort Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree DisplayPort(DP) kernel modules provider for aarch64 devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XLNX_DP_VERSION = "5.10.0" | ||
8 | PV = "${XLNX_DP_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2022.2" | ||
13 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" | ||
14 | SRCREV ?= "c57b2ce95ee6c86f35caecbc7007644ff8f6d337" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2023.1.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2023.1.bb deleted file mode 100644 index 28770994..00000000 --- a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2023.1.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Xilinx DisplayPort Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree DisplayPort(DP) kernel modules provider for aarch64 devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XLNX_DP_VERSION = "6.1.0" | ||
8 | PV = "${XLNX_DP_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2023.1" | ||
13 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" | ||
14 | SRCREV ?= "5b0969ac09f301c33bccc140c8f60e832f5cf222" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2023.2.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb index d1c6bd3d..083604dd 100644 --- a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2023.2.bb +++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb | |||
@@ -4,18 +4,19 @@ SECTION = "kernel/modules" | |||
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" |
6 | 6 | ||
7 | XLNX_DP_VERSION = "6.1.0" | 7 | PV .= "+git" |
8 | PV = "${XLNX_DP_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | 8 | ||
10 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
11 | 10 | ||
12 | BRANCH ?= "xlnx_rel_v2023.2" | 11 | BRANCH ?= "xlnx_rel_v2024.1" |
13 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" | 12 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" |
14 | SRCREV ?= "5b0969ac09f301c33bccc140c8f60e832f5cf222" | 13 | SRCREV ?= "e20942b256e6fb18eaef919c7441f65ad8afcf43" |
15 | 14 | ||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
17 | SRC_URI = "${REPO};${BRANCHARG}" | 16 | SRC_URI = "${REPO};${BRANCHARG}" |
18 | 17 | ||
18 | SRC_URI += "file://0001-Support-both-pre-6.4.0-and-current-i2c-probing.patch" | ||
19 | |||
19 | inherit module | 20 | inherit module |
20 | 21 | ||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | 22 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" |
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 @@ | |||
1 | From 4d4703e0199fb3556c37694e4d951785abca22fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Wed, 19 Jan 2022 12:46:42 -0500 | ||
4 | Subject: [PATCH] Revert "libfdt: overlay: make overlay_get_target() public" | ||
5 | |||
6 | This 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 | |||
13 | diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c | ||
14 | index 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; | ||
86 | diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h | ||
87 | index 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 | /**********************************************************************/ | ||
115 | diff --git a/libfdt/version.lds b/libfdt/version.lds | ||
116 | index 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 | -- | ||
128 | 2.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 a868bd01..00000000 --- a/meta-xilinx-core/recipes-kernel/dtc/python3-dtc_1.6.1.bb +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | SUMMARY = "Python Library for the Device Tree Compiler" | ||
2 | HOMEPAGE = "https://devicetree.org/" | ||
3 | DESCRIPTION = "A python library for the Device Tree Compiler, a tool used to manipulate Device Tree files which contain a data structure for describing hardware." | ||
4 | SECTION = "bootloader" | ||
5 | LICENSE = "GPL-2.0-only | BSD-2-Clause" | ||
6 | |||
7 | DEPENDS = "flex-native bison-native swig-native python3-setuptools-scm-native libyaml dtc" | ||
8 | |||
9 | SRC_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 | |||
13 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | ||
14 | |||
15 | LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90" | ||
16 | |||
17 | SRCREV = "c001fc01a43e7a06447c06ea3d50bd60641322b8" | ||
18 | |||
19 | PV = "1.6.1+git${SRCPV}" | ||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | PYPA_WHEEL = "${S}/dist/libfdt-1.6.2*.whl" | ||
23 | |||
24 | inherit setuptools3 pkgconfig | ||
25 | |||
26 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch new file mode 100644 index 00000000..9bdbfc94 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi/files/0001-Support-both-pre-6.4.0-and-current-kernels.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From e1352e6872edc2b521ad44eb776ce093553192e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 17 May 2024 10:44:37 -0600 | ||
4 | Subject: [PATCH] Support both pre 6.4.0 and current kernels | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | --- | ||
8 | hdmi/xilinx_drm_hdmi.c | 3 +++ | ||
9 | misc/dp159.c | 14 ++++++++++++++ | ||
10 | 2 files changed, 17 insertions(+) | ||
11 | |||
12 | diff --git a/hdmi/xilinx_drm_hdmi.c b/hdmi/xilinx_drm_hdmi.c | ||
13 | index 104fc3d..6ebbdca 100644 | ||
14 | --- a/hdmi/xilinx_drm_hdmi.c | ||
15 | +++ b/hdmi/xilinx_drm_hdmi.c | ||
16 | @@ -17,6 +17,7 @@ | ||
17 | * GNU General Public License for more details. | ||
18 | */ | ||
19 | |||
20 | +#include <linux/version.h> | ||
21 | #include <drm/drm_atomic_helper.h> | ||
22 | #include <drm/drm_connector.h> | ||
23 | #include <drm/drm_crtc.h> | ||
24 | @@ -27,7 +28,9 @@ | ||
25 | #include <drm/drm_of.h> | ||
26 | #include <drm/drm_probe_helper.h> | ||
27 | #include <drm/drm_sysfs.h> | ||
28 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
29 | #include <drm/display/drm_hdmi_helper.h> | ||
30 | +#endif | ||
31 | |||
32 | #include <linux/clk.h> | ||
33 | #include <linux/delay.h> | ||
34 | diff --git a/misc/dp159.c b/misc/dp159.c | ||
35 | index 73e886f..d2c60d9 100644 | ||
36 | --- a/misc/dp159.c | ||
37 | +++ b/misc/dp159.c | ||
38 | @@ -28,6 +28,7 @@ | ||
39 | #include <linux/of.h> | ||
40 | #include <linux/of.h> | ||
41 | #include <linux/clk-provider.h> | ||
42 | +#include <linux/version.h> | ||
43 | |||
44 | MODULE_DESCRIPTION("i2c device driver for dp159 redriver and retimer"); | ||
45 | MODULE_AUTHOR("Leon Woestenberg"); | ||
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) | ||
60 | return 0; | ||
61 | } | ||
62 | |||
63 | + | ||
64 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0) | ||
65 | static void dp159_remove(struct i2c_client *client) | ||
66 | +#else | ||
67 | +static int dp159_remove(struct i2c_client *client) | ||
68 | +#endif | ||
69 | { | ||
70 | struct clk_tx_linerate *clk_tx; | ||
71 | clk_tx = (struct clk_tx_linerate *)i2c_get_clientdata(client); | ||
72 | if (clk_tx) | ||
73 | clk_unregister(clk_tx->clk); | ||
74 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) | ||
75 | + return 0; | ||
76 | +#endif | ||
77 | } | ||
78 | |||
79 | static const struct i2c_device_id dp159_id[] = { | ||
80 | -- | ||
81 | 2.34.1 | ||
82 | |||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb deleted file mode 100644 index c1f66013..00000000 --- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Xilinx HDMI Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree HDMI kernel modules provider for MPSoC EG/EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe" | ||
6 | |||
7 | XLNX_HDMI_VERSION = "5.15.19" | ||
8 | PV = "${XLNX_HDMI_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2022.2" | ||
13 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | ||
14 | SRCREV = "25b6fe7a26a975be15c002b48cfd4c291486491e" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2023.1.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2023.1.bb deleted file mode 100644 index 20acb8b3..00000000 --- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2023.1.bb +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | SUMMARY = "Xilinx HDMI Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree HDMI kernel modules provider for MPSoC EG/EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe" | ||
6 | |||
7 | XLNX_HDMI_VERSION = "6.1" | ||
8 | PV = "${XLNX_HDMI_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2023.1" | ||
13 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | ||
14 | SRCREV = "1c6330f02fea68992e22400fdbc8c0d0e63e2958" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2023.2.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.40.bb index bc89f5f3..a56f90b0 100644 --- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2023.2.bb +++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.40.bb | |||
@@ -4,18 +4,19 @@ SECTION = "kernel/modules" | |||
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe" | 5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe" |
6 | 6 | ||
7 | XLNX_HDMI_VERSION = "6.1" | 7 | PV .= "+git" |
8 | PV = "${XLNX_HDMI_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | 8 | ||
10 | S = "${WORKDIR}/git" | 9 | S = "${UNPACKDIR}/git" |
11 | 10 | ||
12 | BRANCH ?= "xlnx_rel_v2023.2" | 11 | BRANCH ?= "xlnx_rel_v2024.2" |
13 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | 12 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" |
14 | SRCREV = "82209b0021a7b5d7ef71a859eed4bafeb541ed08" | 13 | SRCREV = "4bb89eb3f3062eac8de1aa2b7e64d7f861e18caa" |
15 | 14 | ||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
17 | SRC_URI = "${REPO};${BRANCHARG}" | 16 | SRC_URI = "${REPO};${BRANCHARG}" |
18 | 17 | ||
18 | SRC_URI += "file://0001-Support-both-pre-6.4.0-and-current-kernels.patch" | ||
19 | |||
19 | inherit module | 20 | inherit module |
20 | 21 | ||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | 22 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" |
diff --git a/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb b/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb new file mode 100644 index 00000000..9a266e9c --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Xilinx HDMI 2.1 FMC linux kernel module" | ||
2 | DESCRIPTION = "Out-of-tree HDMI 2.1 FMC kernel modules provider for aarch64 devices" | ||
3 | SECTION = "PETALINUX/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | inherit module | ||
8 | |||
9 | SRC_BRANCH = "master" | ||
10 | INHIBIT_PACKAGE_STRIP = "1" | ||
11 | |||
12 | SRC_URI = "git://github.com/Xilinx/hdmi21-modules.git;protocol=https;branch=${SRC_BRANCH}" | ||
13 | |||
14 | SRCREV = "26a1d40723c58783f7aedba028a208ab9410df5f" | ||
15 | |||
16 | S = "${UNPACKDIR}/git" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
20 | COMPATIBLE_MACHINE:versal = "versal" | ||
21 | |||
22 | # The inherit of module.bbclass will automatically name module packages with | ||
23 | # "kernel-module-" prefix as required by the oe-core build environment. | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb b/meta-xilinx-core/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb index 97740671..76002cb3 100644 --- a/meta-xilinx-core/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb +++ b/meta-xilinx-core/recipes-kernel/linux-firmware/linux-firmware-ti-bt.bb | |||
@@ -14,7 +14,7 @@ NO_GENERIC_LICENSE[Firmware-ti-bt] = "LICENSE.ti-bt" | |||
14 | SRC_URI = "git://git.ti.com/ti-bt/service-packs.git;protocol=https;branch=master" | 14 | SRC_URI = "git://git.ti.com/ti-bt/service-packs.git;protocol=https;branch=master" |
15 | SRCREV = "c290f8af9e388f37e509ecb111a1b64572b7c225" | 15 | SRCREV = "c290f8af9e388f37e509ecb111a1b64572b7c225" |
16 | 16 | ||
17 | S = "${WORKDIR}/git" | 17 | S = "${UNPACKDIR}/git" |
18 | 18 | ||
19 | inherit allarch | 19 | inherit allarch |
20 | 20 | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules.bb b/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules.bb index 611e2e91..8eb742c9 100644 --- a/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules.bb +++ b/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules.bb | |||
@@ -5,10 +5,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
5 | 5 | ||
6 | SRC_URI = "\ | 6 | SRC_URI = "\ |
7 | file://99-aie-device.rules \ | 7 | file://99-aie-device.rules \ |
8 | file://99-mali-device.rules \ | ||
9 | " | 8 | " |
10 | 9 | ||
11 | S = "${WORKDIR}" | 10 | S = "${UNPACKDIR}" |
12 | 11 | ||
13 | inherit useradd | 12 | inherit useradd |
14 | 13 | ||
@@ -17,13 +16,14 @@ COMPATIBLE_MACHINE:zynq = ".*" | |||
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | 16 | COMPATIBLE_MACHINE:zynqmp = ".*" |
18 | COMPATIBLE_MACHINE:microblaze = ".*" | 17 | COMPATIBLE_MACHINE:microblaze = ".*" |
19 | COMPATIBLE_MACHINE:versal = ".*" | 18 | COMPATIBLE_MACHINE:versal = ".*" |
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
20 | 20 | ||
21 | do_configure[noexec] = '1' | 21 | do_configure[noexec] = '1' |
22 | do_compile[noexec] = '1' | 22 | do_compile[noexec] = '1' |
23 | 23 | ||
24 | do_install () { | 24 | do_install () { |
25 | install -d ${D}${sysconfdir}/udev/rules.d | 25 | install -d ${D}${sysconfdir}/udev/rules.d |
26 | for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do | 26 | for rule in $(find ${UNPACKDIR} -maxdepth 1 -type f -name "*.rules"); do |
27 | install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ | 27 | install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ |
28 | done | 28 | done |
29 | } | 29 | } |
diff --git a/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules/99-mali-device.rules b/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules/99-mali-device.rules deleted file mode 100644 index 89ec5f78..00000000 --- a/meta-xilinx-core/recipes-kernel/linux-xlnx-udev-rules/linux-xlnx-udev-rules/99-mali-device.rules +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # Device rules for GPU MALI-400 drivers. | ||
2 | ACTION=="add", SUBSYSTEM=="misc", KERNEL=="mali", MODE="0660", GROUP="video", TAG+="uaccess" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc index 2355d090..3133c485 100644 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | # This version extension should match CONFIG_LOCALVERSION in defconfig | 1 | # This version extension should match CONFIG_LOCALVERSION in defconfig |
2 | LINUX_VERSION_EXTENSION ?= "-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}" | 2 | LINUX_VERSION_EXTENSION ?= "-xilinx" |
3 | PV = "${LINUX_VERSION}${LINUX_VERSION_EXTENSION}+git${SRCPV}" | 3 | PV = "${LINUX_VERSION}+git" |
4 | 4 | ||
5 | # Sources, by default allow for the use of SRCREV pointing to orphaned tags/commits | 5 | # Sources, by default allow for the use of SRCREV pointing to orphaned tags/commits |
6 | KBRANCH ?= "undefined" | 6 | KBRANCH ?= "undefined" |
@@ -27,14 +27,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | |||
27 | 27 | ||
28 | EXTKERNELSRC = "${@'1' if d.getVar('EXTERNALSRC') else ''}" | 28 | EXTKERNELSRC = "${@'1' if d.getVar('EXTERNALSRC') else ''}" |
29 | 29 | ||
30 | # Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${WORKDIR} | 30 | # Force the use of the KBUILD_DEFCONFIG even if some other defconfig was generated in the ${UNPACKDIR} |
31 | do_kernel_metadata:prepend () { | 31 | do_kernel_metadata:prepend () { |
32 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${WORKDIR}/defconfig ] && rm ${WORKDIR}/defconfig | 32 | [ -n "${KBUILD_DEFCONFIG}" ] && [ -e ${UNPACKDIR}/defconfig ] && rm ${UNPACKDIR}/defconfig |
33 | } | 33 | } |
34 | 34 | ||
35 | do_configure:prepend () { | 35 | do_configure:prepend () { |
36 | if [ -n "${KBUILD_DEFCONFIG}" ] && [ -n "${EXTKERNELSRC}" ]; then | 36 | if [ -n "${KBUILD_DEFCONFIG}" ] && [ -n "${EXTKERNELSRC}" ]; then |
37 | cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${WORKDIR}/defconfig | 37 | cp ${S}/arch/${ARCH}/configs/${KBUILD_DEFCONFIG} ${UNPACKDIR}/defconfig |
38 | fi | 38 | fi |
39 | } | 39 | } |
40 | 40 | ||
@@ -46,6 +46,7 @@ COMPATIBLE_MACHINE:zynq = ".*" | |||
46 | COMPATIBLE_MACHINE:zynqmp = ".*" | 46 | COMPATIBLE_MACHINE:zynqmp = ".*" |
47 | COMPATIBLE_MACHINE:microblaze = ".*" | 47 | COMPATIBLE_MACHINE:microblaze = ".*" |
48 | COMPATIBLE_MACHINE:versal = ".*" | 48 | COMPATIBLE_MACHINE:versal = ".*" |
49 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
49 | 50 | ||
50 | # Use DEFCONFIGs for configuring linux-xlnx kernels | 51 | # Use DEFCONFIGs for configuring linux-xlnx kernels |
51 | KCONFIG_MODE ?= "alldefconfig" | 52 | KCONFIG_MODE ?= "alldefconfig" |
@@ -53,15 +54,13 @@ KBUILD_DEFCONFIG:zynqmp ?= "xilinx_defconfig" | |||
53 | KBUILD_DEFCONFIG:zynq ?= "xilinx_zynq_defconfig" | 54 | KBUILD_DEFCONFIG:zynq ?= "xilinx_zynq_defconfig" |
54 | KBUILD_DEFCONFIG:microblaze ?= "mmu_defconfig" | 55 | KBUILD_DEFCONFIG:microblaze ?= "mmu_defconfig" |
55 | KBUILD_DEFCONFIG:versal ?= "xilinx_defconfig" | 56 | KBUILD_DEFCONFIG:versal ?= "xilinx_defconfig" |
57 | KBUILD_DEFCONFIG:versal-net ?= "xilinx_defconfig" | ||
56 | 58 | ||
57 | KERNEL_FEATURES:append:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}" | 59 | KERNEL_FEATURES:append:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)}" |
58 | 60 | ||
59 | KERNEL_FEATURES:append:zynqmp = "${@' features/xilinx/overlay_of/overlay_of.scc' if d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else ''}" | 61 | KERNEL_FEATURES:append:zynqmp = "${@' features/xilinx/overlay_of/overlay_of.scc' if d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else ''}" |
60 | 62 | ||
61 | KERNEL_FEATURES:append:versal = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)} features/xilinx/hdmi-module/hdmi-module.scc" | 63 | KERNEL_FEATURES:append:versal = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)} features/xilinx/hdmi-module/hdmi-module.scc" |
64 | KERNEL_FEATURES:append:versal-net = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' features/xen/xen.scc', '', d)} features/xilinx/hdmi-module/hdmi-module.scc" | ||
62 | 65 | ||
63 | KERNEL_FEATURES:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', ' features/ocicontainer/ocicontainer.scc', '', d)}" | 66 | KERNEL_FEATURES:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'virtualization', ' features/ocicontainer/ocicontainer.scc', '', d)}" |
64 | |||
65 | # Enable DRM_LIMA support if DISTRO_FEATURES != 'libmali' and MACHINE_FEATURES mali400 is enabled | ||
66 | MALI_FEATURE = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '', 'features/drm-lima/drm-lima.scc', d)}" | ||
67 | KERNEL_FEATURES:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' ${MALI_FEATURE}', '', d)}" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg new file mode 100644 index 00000000..b6db5f90 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_SENSORS_TPS53679=m | ||
2 | |||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc new file mode 100644 index 00000000..25ef4034 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | kconf hardware hwmon_modules.cfg | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg new file mode 100644 index 00000000..a5b23e3f --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_VERSAL_SYSMON_I2C=y | |||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc new file mode 100644 index 00000000..c1830956 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | kconf hardware versal-sysmon.cfg | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb deleted file mode 100644 index 41c1ffe2..00000000 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | LINUX_VERSION = "5.15.19" | ||
2 | KBRANCH="xlnx_rebase_v5.15_LTS_2022.1_update" | ||
3 | SRCREV = "75872fda9ad270b611ee6ae2433492da1e22b688" | ||
4 | |||
5 | KCONF_AUDIT_LEVEL="0" | ||
6 | |||
7 | include linux-xlnx.inc | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb deleted file mode 100644 index 260224b8..00000000 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | LINUX_VERSION = "5.15.36" | ||
2 | KBRANCH="xlnx_rebase_v5.15_LTS" | ||
3 | SRCREV = "19984dd147fa7fbb7cb14b17400263ad0925c189" | ||
4 | |||
5 | KCONF_AUDIT_LEVEL="0" | ||
6 | |||
7 | include linux-xlnx.inc | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2023.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.1-v2023.1.bb index d229f21c..d229f21c 100644 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.1-v2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2023.2.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.1-v2023.2.bb index ec5827e6..ec5827e6 100644 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2023.2.bb +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.1-v2023.2.bb | |||
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..4558101a --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | LINUX_VERSION = "6.6.10" | ||
2 | YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=yocto-kmeta" | ||
3 | KBRANCH="xlnx_rebase_v6.6_LTS" | ||
4 | SRCREV = "3af4295e00efdced3e8c6973606a7de55f6bf7dc" | ||
5 | SRCREV_meta = "5d0809d0d939c7738cb6e5391126c73fd0e4e865" | ||
6 | |||
7 | KCONF_AUDIT_LEVEL="0" | ||
8 | |||
9 | include linux-xlnx.inc | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.40-v2024.2.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.40-v2024.2.bb new file mode 100644 index 00000000..e862f747 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.40-v2024.2.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | LINUX_VERSION = "6.6.40" | ||
2 | YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=yocto-kmeta" | ||
3 | KBRANCH="xlnx_rebase_v6.6_LTS" | ||
4 | SRCREV = "2b7f6f70a62a52a467bed030a27c2ada879106e9" | ||
5 | SRCREV_meta = "5d0809d0d939c7738cb6e5391126c73fd0e4e865" | ||
6 | |||
7 | KCONF_AUDIT_LEVEL="0" | ||
8 | |||
9 | include linux-xlnx.inc | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb index 2648c372..c44e8ab1 100644 --- a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb +++ b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops.bb | |||
@@ -13,7 +13,7 @@ SRC_URI = " \ | |||
13 | 13 | ||
14 | LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=10;md5=27139f9b862dc6fe466c7157aba7ed9c" | 14 | LIC_FILES_CHKSUM = "file://lop-microblaze-yocto.dts;endline=10;md5=27139f9b862dc6fe466c7157aba7ed9c" |
15 | 15 | ||
16 | S = "${WORKDIR}" | 16 | S = "${UNPACKDIR}" |
17 | 17 | ||
18 | inherit python3-dir | 18 | inherit python3-dir |
19 | 19 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend deleted file mode 100644 index 03823f6e..00000000 --- a/meta-xilinx-core/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
2 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
3 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
4 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
5 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
6 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
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 @@ | |||
1 | From 2316632e8f3eefc21bc4f9cb97be4603b4c14719 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 28 Sep 2023 12:24:04 -0600 | ||
4 | Subject: [PATCH] Current gcc requires cstdint for C types | ||
5 | |||
6 | Add #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 | |||
11 | Signed-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 | |||
18 | diff --git a/exe_omx/encoder/EncCmdMngr.h b/exe_omx/encoder/EncCmdMngr.h | ||
19 | index 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 | |||
30 | diff --git a/module/module_structs.h b/module/module_structs.h | ||
31 | index 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 | ||
42 | diff --git a/utility/processor_fifo.h b/utility/processor_fifo.h | ||
43 | index 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 | -- | ||
55 | 2.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 @@ | |||
1 | From b58c0a7dd0eeb16b2251edfad3b4763ce5653ea2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 28 Sep 2023 12:04:34 -0600 | ||
4 | Subject: [PATCH] Support updated gcc, add cstdint where necessary | ||
5 | |||
6 | With the latest gcc, cstdint is now needs to be explicitly included, otherwise | ||
7 | errors 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 | |||
21 | Signed-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 | |||
27 | diff --git a/exe_encoder/EncCmdMngr.h b/exe_encoder/EncCmdMngr.h | ||
28 | index 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 | |||
39 | diff --git a/include/lib_app/Parser.h b/include/lib_app/Parser.h | ||
40 | index 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 | -- | ||
52 | 2.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 deleted file mode 100644 index 4643ad37..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # Allegro VCU Encode, Decoder module drivers | ||
2 | SUBSYSTEM=="allegro_encode_class", KERNEL=="allegroIP", MODE="0660", GROUP="video" | ||
3 | SUBSYSTEM=="allegro_decode_class", KERNEL=="allegroDecodeIP", MODE="0660", GROUP="video" | ||
4 | |||
5 | # Xilinx Video DMA driver | ||
6 | SUBSYSTEM=="char", KERNEL=="dmaproxy", MODE="0660", GROUP="video" | ||
7 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb deleted file mode 100644 index 7ef1d5fd..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2022.1" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "9d2657550eccebccce08cacfcdd369367b9f6be4" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb deleted file mode 100644 index b1c96d3c..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2022.2" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "b131e220285e06658b6ab27f9e19b1c592a55f3a" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.1.bb deleted file mode 100644 index 9adfcade..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.1.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2023.1" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "4afe0ab4eb3b7f2d17bcb823dee0caa0f03ab7a0" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
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_2023.2.bb deleted file mode 100644 index e8bd3397..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2023.2.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2023.2" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "689c8d823b383e2a8a5249be49de627f866cfaf2" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb deleted file mode 100644 index 47c521c4..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "b3308c608be7ed9250b9c6732f6e0a02b1a2e985" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | DEPENDS = "libvcu-xlnx" | ||
25 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
26 | |||
27 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
28 | |||
29 | EXTRA_OEMAKE = " \ | ||
30 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
31 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
32 | " | ||
33 | |||
34 | do_install() { | ||
35 | install -d ${D}${libdir} | ||
36 | install -d ${D}${includedir}/vcu-omx-il | ||
37 | |||
38 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
39 | |||
40 | install -Dm 0755 ${S}/bin/omx_decoder ${D}/${bindir}/omx_decoder | ||
41 | install -Dm 0755 ${S}/bin/omx_encoder ${D}/${bindir}/omx_encoder | ||
42 | |||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
46 | } | ||
47 | |||
48 | # These libraries shouldn't get installed in world builds unless something | ||
49 | # explicitly depends upon them. | ||
50 | |||
51 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb deleted file mode 100644 index c5b956bc..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "6752f5da88a8783f689ae762065295b89902d6d4" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | DEPENDS = "libvcu-xlnx" | ||
24 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
25 | |||
26 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
27 | |||
28 | EXTRA_OEMAKE = " \ | ||
29 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
30 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
31 | " | ||
32 | |||
33 | do_install() { | ||
34 | install -d ${D}${libdir} | ||
35 | install -d ${D}${includedir}/vcu-omx-il | ||
36 | |||
37 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
38 | |||
39 | install -Dm 0755 ${S}/bin/omx_decoder ${D}/${bindir}/omx_decoder | ||
40 | install -Dm 0755 ${S}/bin/omx_encoder ${D}/${bindir}/omx_encoder | ||
41 | |||
42 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
45 | } | ||
46 | |||
47 | # These libraries shouldn't get installed in world builds unless something | ||
48 | # explicitly depends upon them. | ||
49 | |||
50 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb deleted file mode 100644 index 75a05fed..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5375796c5ae4ee85ea1f2c1603e58509" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2023.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "4773b372b72b88ccbabc122b023f042fb22a019e" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | SRC_URI += "file://0001-Current-gcc-requires-cstdint-for-C-types.patch" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
23 | |||
24 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
25 | |||
26 | DEPENDS = "libvcu-xlnx" | ||
27 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
28 | |||
29 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
30 | |||
31 | EXTRA_OEMAKE = " \ | ||
32 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
33 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
34 | " | ||
35 | |||
36 | do_install() { | ||
37 | install -d ${D}${libdir} | ||
38 | install -d ${D}${includedir}/vcu-omx-il | ||
39 | |||
40 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
41 | |||
42 | install -Dm 0755 ${S}/bin/omx_decoder ${D}/${bindir}/omx_decoder | ||
43 | install -Dm 0755 ${S}/bin/omx_encoder ${D}/${bindir}/omx_encoder | ||
44 | |||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
46 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
47 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
48 | } | ||
49 | |||
50 | # These libraries shouldn't get installed in world builds unless something | ||
51 | # explicitly depends upon them. | ||
52 | |||
53 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.2.bb deleted file mode 100644 index 0c215605..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.2.bb +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ef69c2bb405668101824f0b644631e2e" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2023.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "3a04b5adc661a0eced626c1373dbbfe699ae6fe0" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | SRC_URI += "file://0001-Current-gcc-requires-cstdint-for-C-types.patch" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
23 | |||
24 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
25 | |||
26 | DEPENDS = "libvcu-xlnx" | ||
27 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
28 | |||
29 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
30 | |||
31 | EXTRA_OEMAKE = " \ | ||
32 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
33 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
34 | " | ||
35 | |||
36 | do_install() { | ||
37 | install -d ${D}${libdir} | ||
38 | install -d ${D}${includedir}/vcu-omx-il | ||
39 | |||
40 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
41 | |||
42 | oe_runmake install INSTALL_PATH=${D}${bindir} | ||
43 | |||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
46 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
47 | } | ||
48 | |||
49 | # These libraries shouldn't get installed in world builds unless something | ||
50 | # explicitly depends upon them. | ||
51 | |||
52 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb deleted file mode 100644 index 71e6e572..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "5bf158af204b181f00ac009c8745557642ecfe5f" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | install -Dm 0755 ${S}/bin/ctrlsw_encoder ${D}/${bindir}/ctrlsw_encoder | ||
33 | install -Dm 0755 ${S}/bin/ctrlsw_decoder ${D}/${bindir}/ctrlsw_decoder | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | # These libraries shouldn't get installed in world builds unless something | ||
41 | # explicitly depends upon them. | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||
44 | |||
45 | # Disable buildpaths QA check warnings. | ||
46 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb deleted file mode 100644 index 130d79bc..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "3c59dede1923a159a8db736ce0b4ab55633a2114" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | install -Dm 0755 ${S}/bin/ctrlsw_encoder ${D}/${bindir}/ctrlsw_encoder | ||
33 | install -Dm 0755 ${S}/bin/ctrlsw_decoder ${D}/${bindir}/ctrlsw_decoder | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | # These libraries shouldn't get installed in world builds unless something | ||
41 | # explicitly depends upon them. | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||
44 | |||
45 | # Disable buildpaths QA check warnings. | ||
46 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb deleted file mode 100644 index 53a03f45..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=5375796c5ae4ee85ea1f2c1603e58509" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2023.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "83aabb84c26667f7d6aee632654c63e504838061" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | SRC_URI += "file://0001-Support-updated-gcc-add-cstdint-where-necessary.patch" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | install -Dm 0755 ${S}/bin/ctrlsw_encoder ${D}/${bindir}/ctrlsw_encoder | ||
33 | install -Dm 0755 ${S}/bin/ctrlsw_decoder ${D}/${bindir}/ctrlsw_decoder | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | # These libraries shouldn't get installed in world builds unless something | ||
41 | # explicitly depends upon them. | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||
44 | |||
45 | # Disable buildpaths QA check warnings. | ||
46 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.2.bb deleted file mode 100644 index a2c7d98c..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.2.bb +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ef69c2bb405668101824f0b644631e2e" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2023.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "84b0856cad7844d69f57ac4d9447c20930875475" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | SRC_URI += "file://0001-Support-updated-gcc-add-cstdint-where-necessary.patch" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include INSTALL_PATH=${D}/${bindir} | ||
33 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
34 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
35 | } | ||
36 | |||
37 | # These libraries shouldn't get installed in world builds unless something | ||
38 | # explicitly depends upon them. | ||
39 | |||
40 | EXCLUDE_FROM_WORLD = "1" | ||
41 | |||
42 | # Disable buildpaths QA check warnings. | ||
43 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb deleted file mode 100644 index c5c2b045..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=63b45903a9a50120df488435f03cf498" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2022.1" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "569f980527fd58f43baf16bd0b294bf8c7cdf963" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | do_install() { | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}/lib/firmware/al5d_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}/lib/firmware/al5d.fw | ||
27 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}/lib/firmware/al5e_b.fw | ||
28 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}/lib/firmware/al5e.fw | ||
29 | } | ||
30 | |||
31 | # Inhibit warnings about files being stripped | ||
32 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
33 | INHIBIT_PACKAGE_STRIP = "1" | ||
34 | FILES:${PN} = "/lib/firmware/*" | ||
35 | |||
36 | # These libraries shouldn't get installed in world builds unless something | ||
37 | # explicitly depends upon them. | ||
38 | EXCLUDE_FROM_WORLD = "1" | ||
39 | |||
40 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb deleted file mode 100644 index 594a94c3..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=63b45903a9a50120df488435f03cf498" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2022.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "3980c778d71fa51a15e89bf70fd8fb28d5cb12e0" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | do_install() { | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}/lib/firmware/al5d_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}/lib/firmware/al5d.fw | ||
27 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}/lib/firmware/al5e_b.fw | ||
28 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}/lib/firmware/al5e.fw | ||
29 | } | ||
30 | |||
31 | # Inhibit warnings about files being stripped | ||
32 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
33 | INHIBIT_PACKAGE_STRIP = "1" | ||
34 | FILES:${PN} = "/lib/firmware/*" | ||
35 | |||
36 | # These libraries shouldn't get installed in world builds unless something | ||
37 | # explicitly depends upon them. | ||
38 | EXCLUDE_FROM_WORLD = "1" | ||
39 | |||
40 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb deleted file mode 100644 index a90d307f..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6da65299754e921b31f03e9b11d77a74" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2023.1" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "c90288595ac9a12ff401de6dfa680b1f9adce5f6" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | do_install() { | ||
23 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}${nonarch_base_libdir}/firmware/al5d_b.fw | ||
24 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}${nonarch_base_libdir}/firmware/al5d.fw | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}${nonarch_base_libdir}/firmware/al5e_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}${nonarch_base_libdir}/firmware/al5e.fw | ||
27 | } | ||
28 | |||
29 | # Inhibit warnings about files being stripped | ||
30 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
31 | INHIBIT_PACKAGE_STRIP = "1" | ||
32 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
33 | |||
34 | # These libraries shouldn't get installed in world builds unless something | ||
35 | # explicitly depends upon them. | ||
36 | EXCLUDE_FROM_WORLD = "1" | ||
37 | |||
38 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.2.bb deleted file mode 100644 index 73fc2201..00000000 --- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=52eb1e8f27e0e189b175c7d75f028cc6" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2023.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "f4ab98d26aa3e244a487f518f5a76071137c8402" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | do_install() { | ||
23 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}${nonarch_base_libdir}/firmware/al5d_b.fw | ||
24 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}${nonarch_base_libdir}/firmware/al5d.fw | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}${nonarch_base_libdir}/firmware/al5e_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}${nonarch_base_libdir}/firmware/al5e.fw | ||
27 | } | ||
28 | |||
29 | # Inhibit warnings about files being stripped | ||
30 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
31 | INHIBIT_PACKAGE_STRIP = "1" | ||
32 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
33 | |||
34 | # These libraries shouldn't get installed in world builds unless something | ||
35 | # explicitly depends upon them. | ||
36 | EXCLUDE_FROM_WORLD = "1" | ||
37 | |||
38 | INSANE_SKIP:${PN} = "ldflags" | ||
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 @@ | |||
1 | From 79eddc5c5474c9b61bf6b2e648eba8bca61469b9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 25 Jan 2024 12:30:24 -0700 | ||
4 | Subject: [PATCH] include/libapp/Parser.h: Add cstdint | ||
5 | |||
6 | Resolves usages of unit32_t being undefined | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | --- | ||
10 | include/lib_app/Parser.h | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/include/lib_app/Parser.h b/include/lib_app/Parser.h | ||
14 | index 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 | -- | ||
26 | 2.34.1 | ||
27 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/files/0001-libvdu-omxil-Fix-missing-definitions.patch b/meta-xilinx-core/recipes-multimedia/vdu/files/0001-libvdu-omxil-Fix-missing-definitions.patch deleted file mode 100644 index db23ed00..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/files/0001-libvdu-omxil-Fix-missing-definitions.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 7fc63cdd6642ea84b78db62fccafc460af0ff23e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 25 Jan 2024 12:50:18 -0700 | ||
4 | Subject: [PATCH] Fix missing definitions | ||
5 | |||
6 | Fix issues such as: | ||
7 | | module/module_structs.h:370:3: error: 'uint8_t' does not name a type | ||
8 | | 370 | uint8_t distributionMaxrgbPercentages[MAX_MAXRGB_PERCENTILES_ST2094_40]; | ||
9 | | | ^~~~~~~ | ||
10 | | module/module_structs.h:370:3: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? | ||
11 | | module/module_structs.h:371:3: error: 'uint32_t' does not name a type | ||
12 | | 371 | uint32_t distributionMaxrgbPercentiles[MAX_MAXRGB_PERCENTILES_ST2094_40]; | ||
13 | | | ^~~~~~~~ | ||
14 | | module/module_structs.h:371:3: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? | ||
15 | |||
16 | and | ||
17 | |||
18 | | ./utility/processor_fifo.h:80:15: error: field 'name_' has incomplete type 'std::string' {aka 'std::__cxx11::basic_string<char>'} | ||
19 | | 80 | std::string name_; | ||
20 | | | ^~~~~ | ||
21 | |||
22 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
23 | --- | ||
24 | module/module_structs.h | 1 + | ||
25 | utility/processor_fifo.h | 1 + | ||
26 | 2 files changed, 2 insertions(+) | ||
27 | |||
28 | diff --git a/module/module_structs.h b/module/module_structs.h | ||
29 | index 75bdff6..594076f 100644 | ||
30 | --- a/module/module_structs.h | ||
31 | +++ b/module/module_structs.h | ||
32 | @@ -27,6 +27,7 @@ | ||
33 | #include "module_enums.h" | ||
34 | #include <string> | ||
35 | #include <vector> | ||
36 | +#include <cstdint> | ||
37 | |||
38 | template<typename T> | ||
39 | struct InputOutput | ||
40 | diff --git a/utility/processor_fifo.h b/utility/processor_fifo.h | ||
41 | index e0dd47c..f047267 100644 | ||
42 | --- a/utility/processor_fifo.h | ||
43 | +++ b/utility/processor_fifo.h | ||
44 | @@ -27,6 +27,7 @@ | ||
45 | #include <utility/locked_queue.h> | ||
46 | #include <thread> | ||
47 | #include <functional> | ||
48 | +#include <string> | ||
49 | |||
50 | #if defined __linux__ | ||
51 | #include <sys/prctl.h> | ||
52 | -- | ||
53 | 2.34.1 | ||
54 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/files/99-vdu-enc-dec.rules b/meta-xilinx-core/recipes-multimedia/vdu/files/99-vdu-enc-dec.rules deleted file mode 100644 index 78bb54f4..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/files/99-vdu-enc-dec.rules +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | # Allegro VDU Encode, Decoder module drivers | ||
2 | SUBSYSTEM=="allegro_decode_class", KERNEL=="allegroDecodeIP[0-4]*", MODE="0660", GROUP="video", TAG+="uaccess" | ||
3 | |||
4 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb deleted file mode 100644 index 9b835490..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Decode Unit" | ||
2 | DESCRIPTION = "Out-of-tree VDU decoder common kernel modules" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VDU_VERSION = "1.0.0" | ||
8 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
9 | PV .= "+git${SRCPV}" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH ?= "xlnx_rel_v2023.1" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https" | ||
16 | SRCREV ?= "82d06e395c93a1e941b83cccbb6f2e4e6d966f1c" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
20 | file://99-vdu-enc-dec.rules \ | ||
21 | " | ||
22 | |||
23 | inherit module features_check | ||
24 | |||
25 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
26 | |||
27 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
28 | |||
29 | RDEPENDS:${PN} = "vdu-firmware" | ||
30 | |||
31 | COMPATIBLE_MACHINE = "^$" | ||
32 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
33 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
34 | |||
35 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
36 | |||
37 | do_install:append() { | ||
38 | install -d ${D}${sysconfdir}/udev/rules.d | ||
39 | install -m 0644 ${WORKDIR}/99-vdu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
40 | } | ||
41 | |||
42 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb deleted file mode 100644 index 1c9ba8ad..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Decode Unit" | ||
2 | DESCRIPTION = "Out-of-tree VDU decoder common kernel modules" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VDU_VERSION = "1.0.0" | ||
8 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
9 | PV .= "+git${SRCPV}" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH ?= "xlnx_rel_v2023.2" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https" | ||
16 | SRCREV ?= "4d5134f54006f904f0b28f00e05dd3febd5fcfd3" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
20 | file://99-vdu-enc-dec.rules \ | ||
21 | " | ||
22 | |||
23 | inherit module features_check | ||
24 | |||
25 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
26 | |||
27 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
28 | |||
29 | RDEPENDS:${PN} = "vdu-firmware" | ||
30 | |||
31 | COMPATIBLE_MACHINE = "^$" | ||
32 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
33 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
34 | |||
35 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
36 | |||
37 | do_install:append() { | ||
38 | install -d ${D}${sysconfdir}/udev/rules.d | ||
39 | install -m 0644 ${WORKDIR}/99-vdu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
40 | } | ||
41 | |||
42 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb deleted file mode 100644 index f9228678..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VDU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VDU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | inherit autotools features_check | ||
11 | |||
12 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
13 | |||
14 | BRANCH ?= "xlnx_rel_v2023.1" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" | ||
16 | SRCREV ?= "06fc18b303b40d4fee7549ad162c22ee1bc31582" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
20 | file://0001-include-libapp-Parser.h-Add-cstdint.patch \ | ||
21 | " | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | COMPATIBLE_MACHINE = "^$" | ||
26 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
27 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
28 | |||
29 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
30 | |||
31 | RDEPENDS:${PN} = "kernel-module-vdu" | ||
32 | |||
33 | do_compile[dirs] = "${S}" | ||
34 | do_install[dirs] = "${S}" | ||
35 | |||
36 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
37 | EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}" | ||
38 | |||
39 | do_install:append() { | ||
40 | |||
41 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
42 | } | ||
43 | |||
44 | # These libraries shouldn't get installed in world builds unless something | ||
45 | # explicitly depends upon them. | ||
46 | |||
47 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb deleted file mode 100644 index f8b36a93..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SUMMARY = "Control Software for VDU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VDU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | inherit autotools features_check | ||
11 | |||
12 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
13 | |||
14 | BRANCH ?= "xlnx_rel_v2023.2" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" | ||
16 | SRCREV ?= "1beb8f247d01b1a728faea36ce8f7847c895482f" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
20 | file://0001-include-libapp-Parser.h-Add-cstdint.patch \ | ||
21 | " | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | COMPATIBLE_MACHINE = "^$" | ||
26 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
27 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
28 | |||
29 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
30 | |||
31 | RDEPENDS:${PN} = "kernel-module-vdu" | ||
32 | |||
33 | do_compile[dirs] = "${S}" | ||
34 | do_install[dirs] = "${S}" | ||
35 | |||
36 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
37 | EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}" | ||
38 | |||
39 | do_install:append() { | ||
40 | |||
41 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
42 | } | ||
43 | |||
44 | # These libraries shouldn't get installed in world builds unless something | ||
45 | # explicitly depends upon them. | ||
46 | |||
47 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb deleted file mode 100644 index b3c02ca2..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VDU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test application and headers for VDU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | BRANCH ?= "xlnx_rel_v2023.1" | ||
11 | REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" | ||
12 | SRCREV ?= "811eefac953fd5e098c69cada97a0dd35f5e9015" | ||
13 | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
15 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
16 | file://0001-libvdu-omxil-Fix-missing-definitions.patch \ | ||
17 | " | ||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit autotools features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
23 | |||
24 | COMPATIBLE_MACHINE = "^$" | ||
25 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
26 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
27 | |||
28 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
29 | |||
30 | DEPENDS = "libvdu-ctrlsw" | ||
31 | RDEPENDS:${PN} = "kernel-module-vdu libvdu-ctrlsw" | ||
32 | |||
33 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include" | ||
34 | |||
35 | do_compile[dirs] = "${S}" | ||
36 | do_install[dirs] = "${S}" | ||
37 | |||
38 | EXTRA_OEMAKE = " \ | ||
39 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
40 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
41 | INSTALL_PATH=${D}${bindir} \ | ||
42 | INCLUDE_INST_PATH=${D}${includedir} \ | ||
43 | " | ||
44 | |||
45 | do_install:append() { | ||
46 | install -d ${D}${libdir} | ||
47 | |||
48 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
49 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
50 | } | ||
51 | |||
52 | # These libraries shouldn't get installed in world builds unless something | ||
53 | # explicitly depends upon them. | ||
54 | |||
55 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb deleted file mode 100644 index 04860b79..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VDU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test application and headers for VDU" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=aaf483d309243c4596f6373eb9c8325f" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | BRANCH ?= "xlnx_rel_v2023.2" | ||
11 | REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" | ||
12 | SRCREV ?= "811eefac953fd5e098c69cada97a0dd35f5e9015" | ||
13 | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
15 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
16 | file://0001-libvdu-omxil-Fix-missing-definitions.patch \ | ||
17 | " | ||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit autotools features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
23 | |||
24 | COMPATIBLE_MACHINE = "^$" | ||
25 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
26 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
27 | |||
28 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
29 | |||
30 | DEPENDS = "libvdu-ctrlsw" | ||
31 | RDEPENDS:${PN} = "kernel-module-vdu libvdu-ctrlsw" | ||
32 | |||
33 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include" | ||
34 | |||
35 | do_compile[dirs] = "${S}" | ||
36 | do_install[dirs] = "${S}" | ||
37 | |||
38 | EXTRA_OEMAKE = " \ | ||
39 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
40 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
41 | INSTALL_PATH=${D}${bindir} \ | ||
42 | INCLUDE_INST_PATH=${D}${includedir} \ | ||
43 | " | ||
44 | |||
45 | do_install:append() { | ||
46 | install -d ${D}${libdir} | ||
47 | |||
48 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
49 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
50 | } | ||
51 | |||
52 | # These libraries shouldn't get installed in world builds unless something | ||
53 | # explicitly depends upon them. | ||
54 | |||
55 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb deleted file mode 100755 index 419dd681..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VDU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VDU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c5784f63397086d836580d8785d1deb9" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | inherit autotools features_check | ||
13 | |||
14 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
15 | |||
16 | BRANCH ?= "xlnx_rel_v2023.1" | ||
17 | REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" | ||
18 | SRCREV ?= "63fe2fce6e46d5bf03e33300a58a37d8568722ee" | ||
19 | |||
20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
21 | SRC_URI = "${REPO};${BRANCHARG}" | ||
22 | |||
23 | COMPATIBLE_MACHINE = "^$" | ||
24 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
25 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
26 | |||
27 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
28 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" | ||
29 | |||
30 | do_compile[noexec] = "1" | ||
31 | do_install[dirs] = "${S}" | ||
32 | |||
33 | # Inhibit warnings about files being stripped | ||
34 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
35 | INHIBIT_PACKAGE_STRIP = "1" | ||
36 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
37 | |||
38 | # These libraries shouldn't get installed in world builds unless something | ||
39 | # explicitly depends upon them. | ||
40 | EXCLUDE_FROM_WORLD = "1" | ||
41 | |||
42 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb deleted file mode 100644 index ade73a4e..00000000 --- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | SUMMARY = "Firmware for VDU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VDU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=c5784f63397086d836580d8785d1deb9" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | inherit autotools features_check | ||
13 | |||
14 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
15 | |||
16 | BRANCH ?= "xlnx_rel_v2023.2" | ||
17 | REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" | ||
18 | SRCREV ?= "731897772730178f6a4e77eedeb4fb53faa1ab4d" | ||
19 | |||
20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
21 | SRC_URI = "${REPO};${BRANCHARG}" | ||
22 | |||
23 | COMPATIBLE_MACHINE = "^$" | ||
24 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
25 | COMPATIBLE_MACHINE:versal-ai-edge = "versal-ai-edge" | ||
26 | |||
27 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
28 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" | ||
29 | |||
30 | do_compile[noexec] = "1" | ||
31 | do_install[dirs] = "${S}" | ||
32 | |||
33 | # Inhibit warnings about files being stripped | ||
34 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
35 | INHIBIT_PACKAGE_STRIP = "1" | ||
36 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
37 | |||
38 | # These libraries shouldn't get installed in world builds unless something | ||
39 | # explicitly depends upon them. | ||
40 | EXCLUDE_FROM_WORLD = "1" | ||
41 | |||
42 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch b/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch deleted file mode 100644 index c7d4aefd..00000000 --- a/meta-xilinx-core/recipes-support/freeipmi/freeipmi/0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch +++ /dev/null | |||
@@ -1,370 +0,0 @@ | |||
1 | From 1128691f6e2709b44eccafb0b303b07da55a814e Mon Sep 17 00:00:00 2001 | ||
2 | From: Christian Kohn <chris.kohn@amd.com> | ||
3 | Date: Mon, 17 Oct 2022 19:28:22 -0700 | ||
4 | Subject: [PATCH] Add initial support for Xilinx OEM FRU records | ||
5 | |||
6 | The supported Xilinx OEM FRU records are MAC_ID and FREE_FORM. This FRU OEM | ||
7 | extension parses these records and prints them with proper formatting. | ||
8 | |||
9 | To 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 | |||
13 | Note: The EEPROM address can vary between different platforms. This is just an | ||
14 | example. | ||
15 | |||
16 | This feature has been tested with the Xilinx Kria KV260 and KR260 Starter Kits. | ||
17 | |||
18 | Signed-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 | |||
32 | diff --git a/ipmi-fru/Makefile.am b/ipmi-fru/Makefile.am | ||
33 | index 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 | |||
45 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
46 | new file mode 100644 | ||
47 | index 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 | +} | ||
222 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.h b/ipmi-fru/ipmi-fru-oem-xilinx.h | ||
223 | new file mode 100644 | ||
224 | index 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 */ | ||
261 | diff --git a/ipmi-fru/ipmi-fru-output.c b/ipmi-fru/ipmi-fru-output.c | ||
262 | index 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) | ||
293 | diff --git a/libfreeipmi/include/freeipmi/freeipmi.h.in b/libfreeipmi/include/freeipmi/freeipmi.h.in | ||
294 | index 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> | ||
305 | diff --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 | ||
306 | new file mode 100644 | ||
307 | index 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 */ | ||
356 | diff --git a/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h b/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h | ||
357 | index 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 | -- | ||
369 | 2.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 @@ | |||
1 | From c578c999b7d9aabbd6e54b0310a609b8f96ae962 Mon Sep 17 00:00:00 2001 | ||
2 | From: Albert Chu <chu11@llnl.gov> | ||
3 | Date: Tue, 8 Nov 2022 16:33:39 -0800 | ||
4 | Subject: [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 | |||
10 | diff --git a/ipmi-fru/ipmi-fru-oem-xilinx.c b/ipmi-fru/ipmi-fru-oem-xilinx.c | ||
11 | index 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 | -- | ||
28 | 2.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 a9d60465..5ac2f4a6 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 | |||
@@ -30,13 +30,11 @@ LIC_FILES_CHKSUM = " \ | |||
30 | 30 | ||
31 | BRANCH ?= "freeipmi-1-6-0-stable" | 31 | BRANCH ?= "freeipmi-1-6-0-stable" |
32 | SRC_URI = " \ | 32 | SRC_URI = " \ |
33 | git://git.savannah.gnu.org/freeipmi.git;iprotocol=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 | " |
37 | SRCREV ?= "1f7eea294c2967802019100b07cf1e44b3160a2b" | 35 | SRCREV ?= "816a69eb15a9034351381211d9cd15de81da10c7" |
38 | 36 | ||
39 | S = "${WORKDIR}/git" | 37 | S = "${UNPACKDIR}/git" |
40 | 38 | ||
41 | inherit autotools-brokensep pkgconfig systemd | 39 | inherit autotools-brokensep pkgconfig systemd |
42 | 40 | ||
diff --git a/meta-xilinx-core/recipes-support/libgpg-error/libgpg-error_%.bbappend b/meta-xilinx-core/recipes-support/libgpg-error/libgpg-error_%.bbappend index f3e920c2..d7d2cb6c 100644 --- a/meta-xilinx-core/recipes-support/libgpg-error/libgpg-error_%.bbappend +++ b/meta-xilinx-core/recipes-support/libgpg-error/libgpg-error_%.bbappend | |||
@@ -3,6 +3,6 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | |||
3 | SRC_URI:append:microblaze = " file://lock-obj-pub.microblazeel-unknown-linux-gnu.h" | 3 | SRC_URI:append:microblaze = " file://lock-obj-pub.microblazeel-unknown-linux-gnu.h" |
4 | 4 | ||
5 | do_configure:append:microblaze () { | 5 | do_configure:append:microblaze () { |
6 | cp ${WORKDIR}/lock-obj-pub.microblazeel-unknown-linux-gnu.h ${S}/src/syscfg/ | 6 | cp ${UNPACKDIR}/lock-obj-pub.microblazeel-unknown-linux-gnu.h ${S}/src/syscfg/ |
7 | } | 7 | } |
8 | 8 | ||
diff --git a/meta-xilinx-core/recipes-utils/mb-realoc/files/mb-realoc b/meta-xilinx-core/recipes-utils/mb-realoc/files/mb-realoc new file mode 100755 index 00000000..158560f1 --- /dev/null +++ b/meta-xilinx-core/recipes-utils/mb-realoc/files/mb-realoc | |||
@@ -0,0 +1,239 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # FILE: | ||
4 | # mb-realoc | ||
5 | # | ||
6 | # DESCRIPTION: | ||
7 | # Takes a fully linked and relocated ELF file, and turns it into an | ||
8 | # executable blob that can be run from any valid memory. The ELF image | ||
9 | # (loadable segments only) is converted to a payload. The blob copies | ||
10 | # the payload to the correct address in memory, and then launches it. | ||
11 | # | ||
12 | # MODIFICATION: | ||
13 | # | ||
14 | # LICENSING: | ||
15 | # Copyright (c) 2013 Xilinx Inc. All rights reserved. | ||
16 | # | ||
17 | |||
18 | |||
19 | # Default values for main variables | ||
20 | BLOB_LOAD_ADDR=0x0 | ||
21 | INFILE="" | ||
22 | BLOBNAME="" | ||
23 | JUMP_OFFSET= | ||
24 | |||
25 | # OTher useful vars | ||
26 | TMP_BINFILE=$$.bin | ||
27 | PAYLOAD_SECTION=.payload | ||
28 | BLOBSTUB=/tmp/blobstub-$$ | ||
29 | |||
30 | function usage { | ||
31 | |||
32 | echo "Generate a PIC executable blob that copies the payload to its linked address and executes it." | ||
33 | # echo "Generate a PIC executable blob that copies the payload to its" | ||
34 | # echo "linked address and executes it. The blob itself may be loaded" | ||
35 | # echo "to any physical address and executed, provided that" | ||
36 | # echo " 1) The payload's linked address is writeable" | ||
37 | # echo " 2) The blob's and payload's addresses don't overlap" | ||
38 | # echo "tGenerates blobname.[srec|elf|bin] files into the working directory" | ||
39 | echo "" | ||
40 | echo "Usage:" | ||
41 | echo " mb-realoc [OPTIONS] -i PAYLOAD.elf -o BLOB_NAME" | ||
42 | echo "" | ||
43 | echo "Required:" | ||
44 | echo " -i, --input PAYLOAD[.elf] the fully relocated ELF file that will be the" | ||
45 | echo " payload." | ||
46 | echo " -o, --output BLOB_NAME basename of the resulting blob files." | ||
47 | echo "" | ||
48 | echo "Optional:" | ||
49 | echo " -h, --help show function usage" | ||
50 | echo " -j, --jump-offset OFFS Offset from load address to jump (auto-detect)" | ||
51 | echo " -l, --load LOAD_ADDR address at which FS-boot will load the stub+payload" | ||
52 | echo "" | ||
53 | } | ||
54 | |||
55 | function parse_args { | ||
56 | |||
57 | args=$(getopt -o "j:hi:l:o:" --long "jump-offset:,help,input:,load:,output" -- "$@") | ||
58 | |||
59 | [ $? -ne 0 ] && usage && exit -1 | ||
60 | |||
61 | eval set -- "${args}" | ||
62 | |||
63 | while true; do | ||
64 | case $1 in | ||
65 | -h | --help) usage; exit 0; ;; | ||
66 | -l | --load) BLOB_LOAD_ADDR=$2; | ||
67 | shift; shift; | ||
68 | ;; | ||
69 | -i | --input) INFILE=$2; | ||
70 | shift; shift; | ||
71 | ;; | ||
72 | -j | --jump-offset) JUMP_OFFSET=$2; | ||
73 | shift; shift; | ||
74 | ;; | ||
75 | -o | --output) BLOBNAME=$2; | ||
76 | shift; shift; | ||
77 | ;; | ||
78 | --) shift; break; ;; | ||
79 | *) usage; exit -1; | ||
80 | ;; | ||
81 | esac | ||
82 | done | ||
83 | |||
84 | [ ! -z "$@" ] && echo "ERROR: Extra parameters: $@" && usage && exit -1 | ||
85 | |||
86 | if [ "${INFILE}" == "" -o "${BLOBNAME}" == "" ]; then | ||
87 | echo "Error: Required parameters not provided" | ||
88 | usage && exit -1 | ||
89 | fi | ||
90 | } | ||
91 | |||
92 | function get_elf_addr_and_size { | ||
93 | |||
94 | # Get load address of payload ELF file | ||
95 | ELF_LMA=0x$(${CROSS_COMPILE}objdump --headers $INFILE | grep -w "\.data" | awk '{print $5}') | ||
96 | |||
97 | # Generate binary image of payload | ||
98 | ${CROSS_COMPILE}objcopy -R .note -R .comment -R .note.gnu.build-id -O binary $INFILE $TMP_BINFILE | ||
99 | |||
100 | # Work out its size | ||
101 | ELF_SIZE=$(${CROSS_COMPILE}size --target binary ${TMP_BINFILE} | grep "${TMP_BINFILE}" | cut -f 4) | ||
102 | |||
103 | } | ||
104 | |||
105 | function get_elf_jump_offset { | ||
106 | entry_point=$(${CROSS_COMPILE}readelf -h ${INFILE} | awk '/Entry point/ {print $4}') | ||
107 | JUMP_OFFSET=$(printf "0x%08x" $((${entry_point} - ${ELF_LMA}))) | ||
108 | } | ||
109 | |||
110 | function create_blobstub:microblaze { | ||
111 | |||
112 | cat > ${BLOBSTUB}.s.in << __eof | ||
113 | /* | ||
114 | // blobstub.s.in | ||
115 | // template for relocatable code blob mechanism | ||
116 | // | ||
117 | // LICENSING: | ||
118 | // Copyright (c) 2013 Xilinx Inc. All rights reserved. | ||
119 | */ | ||
120 | .section .text | ||
121 | |||
122 | .org 0x0 | ||
123 | |||
124 | .globl bootstub | ||
125 | .global _start | ||
126 | .func bootstub | ||
127 | |||
128 | _start: | ||
129 | bootstub: | ||
130 | brlid r5, locator; /* r5 gets address of bootstub */ | ||
131 | nop; | ||
132 | locator: | ||
133 | addi r5, r5, 0x100; /* Shift up to start of payload */ | ||
134 | lwi r6, r5, 0; /* Destination of payload */ | ||
135 | lwi r7, r5, 4; /* Length of payload */ | ||
136 | lwi r9, r5, 8; /* boot offset */ | ||
137 | addi r5, r5, 0xc; /* Start of payload */ | ||
138 | add r4, r6, r0; /* Save payload destination (for jump) */ | ||
139 | |||
140 | addi r7, r7, 0x3; /* Convert length to words */ | ||
141 | srl r7, r7; /* Rounded up */ | ||
142 | srl r7, r7; | ||
143 | |||
144 | or r10, r0, r0; /* Setup r10 for incrementing address offset */ | ||
145 | copyloop: | ||
146 | beqi r7, copy_done; /* Finished copying? */ | ||
147 | lw r8, r5, r10; /* Read word from payload */ | ||
148 | sw r8, r6, r10; /* Write to destination */ | ||
149 | addi r10, r10, 4; /* Increment ptr offset */ | ||
150 | brid copyloop; /* Loop with delay slot */ | ||
151 | addi r7, r7, -1; /* Decrement copy count */ | ||
152 | |||
153 | copy_done: | ||
154 | add r4, r4, r9; /* Apply any boot offset */ | ||
155 | bra r4; /* Launch payload */ | ||
156 | |||
157 | .align 2 | ||
158 | .org 0x100 | ||
159 | payload: | ||
160 | .int @destination@ | ||
161 | .int @bytecount@ | ||
162 | .int @jump_offset@ | ||
163 | |||
164 | .end bootstub | ||
165 | |||
166 | __eof | ||
167 | |||
168 | } | ||
169 | |||
170 | function build_blobstub { | ||
171 | # Substitute address and size of payload into blobstub | ||
172 | # source file | ||
173 | sed -e "s/@destination@/${ELF_LMA}/" \ | ||
174 | -e "s/@bytecount@/${ELF_SIZE}/" \ | ||
175 | -e "s/@jump_offset@/${JUMP_OFFSET}/" ${BLOBSTUB}.s.in > ${BLOBSTUB}.s | ||
176 | |||
177 | # Build the blobstub | ||
178 | ${CROSS_COMPILE}as -o ${BLOBSTUB}.o ${BLOBSTUB}.s | ||
179 | |||
180 | # Remove blobstub assembly file and template | ||
181 | rm ${BLOBSTUB}.s.in | ||
182 | rm ${BLOBSTUB}.s | ||
183 | } | ||
184 | |||
185 | function insert_payload { | ||
186 | |||
187 | # Add the payload in a new section | ||
188 | ${CROSS_COMPILE}objcopy --add-section=${PAYLOAD_SECTION}=${TMP_BINFILE}\ | ||
189 | --adjust-section-vma=${PAYLOAD_SECTION}=0x10C \ | ||
190 | --set-section-flags=${PAYLOAD_SECTION}=alloc,load,data \ | ||
191 | ${BLOBSTUB}.o ${BLOBNAME}.elf | ||
192 | |||
193 | # Remove temporary binary image and blobstub object file | ||
194 | rm ${TMP_BINFILE} | ||
195 | rm ${BLOBSTUB}.o | ||
196 | } | ||
197 | |||
198 | function relocate_blob { | ||
199 | # Relocate the entire package to the desired FS-boot load address | ||
200 | ${CROSS_COMPILE}objcopy --change-addresses=${BLOB_LOAD_ADDR} ${BLOBNAME}.elf | ||
201 | } | ||
202 | |||
203 | function generate_output_files { | ||
204 | ${CROSS_COMPILE}objcopy -O srec ${BLOBNAME}.elf ${BLOBNAME}.srec | ||
205 | ${CROSS_COMPILE}objcopy -O binary ${BLOBNAME}.elf ${BLOBNAME}.bin | ||
206 | } | ||
207 | |||
208 | function xlnx_readelf { | ||
209 | ${CROSS_COMPILE}readelf $@ | ||
210 | } | ||
211 | |||
212 | parse_args "$@" | ||
213 | |||
214 | if [ ! -f $INFILE ]; then | ||
215 | echo "Error: ${INFILE} does not exist" | ||
216 | exit -1; | ||
217 | fi | ||
218 | |||
219 | get_elf_addr_and_size | ||
220 | [ -z "${JUMP_OFFSET}" ] && get_elf_jump_offset | ||
221 | |||
222 | echo "INFO: Payload load address:$ELF_LMA" | ||
223 | echo "INFO: Payload size:$ELF_SIZE" | ||
224 | echo "INFO: Jump offset:$JUMP_OFFSET" | ||
225 | |||
226 | PETALINUX_ARCH=$(xlnx_readelf -e ${INFILE} | grep "Machine:" | awk '{print $2}') | ||
227 | echo "ELF ARCH is ${PETALINUX_ARCH}" | ||
228 | |||
229 | if [ "${PETALINUX_ARCH}" == "Xilinx" ]; then | ||
230 | create_blobstub:microblaze | ||
231 | build_blobstub | ||
232 | insert_payload | ||
233 | relocate_blob | ||
234 | else | ||
235 | echo "Architecture is not Microblaze" | ||
236 | rm ${TMP_BINFILE} | ||
237 | ${CROSS_COMPILE}objcopy $INFILE ${BLOBNAME}.elf | ||
238 | fi | ||
239 | generate_output_files | ||
diff --git a/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb b/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb new file mode 100644 index 00000000..cf0c778d --- /dev/null +++ b/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | DESCRIPTION = "mb-realoc" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/elfrealloc" | ||
6 | |||
7 | inherit deploy | ||
8 | |||
9 | SRC_URI:append = " file://mb-realoc" | ||
10 | |||
11 | PV = "0.1" | ||
12 | |||
13 | ELF_LOAD_ADDR ?= "0" | ||
14 | ELF_JUMP_OFFSET ?= "" | ||
15 | ELF_INFILE ?= "${DEPLOY_DIR_IMAGE}/u-boot.elf" | ||
16 | OUTFILE_NAME ?= "u-boot-s" | ||
17 | S = "${UNPACKDIR}" | ||
18 | B = "${WORKDIR}/build" | ||
19 | |||
20 | PARALLEL_MAKE="" | ||
21 | |||
22 | do_configure[noexec]="1" | ||
23 | do_compile[depends] = "virtual/bootloader:do_deploy" | ||
24 | |||
25 | do_compile() { | ||
26 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
27 | ${S}/mb-realoc -l ${ELF_LOAD_ADDR} -i ${ELF_INFILE} -o ${OUTFILE_NAME} | ||
28 | } | ||
29 | |||
30 | do_install[noexec] = "1" | ||
31 | |||
32 | do_deploy() { | ||
33 | install -d ${DEPLOYDIR} | ||
34 | install -m 0644 ${B}/${OUTFILE_NAME}.bin ${DEPLOYDIR}/${OUTFILE_NAME}.bin | ||
35 | } | ||
36 | |||
37 | addtask deploy after do_compile | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202320.2.16.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202320.2.16.0.bb new file mode 100644 index 00000000..c203aa10 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202320.2.16.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt-202320.2.16.0.inc | ||
5 | |||
6 | FILESEXTRAPATHS:append := ":${THISDIR}/xrt" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_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 | |||
18 | S = "${UNPACKDIR}/git/src" | ||
19 | |||
20 | inherit cmake pkgconfig native | ||
21 | |||
22 | DEPENDS = "libdrm-native ocl-icd-native boost-native rapidjson-native protobuf-native python3-pybind11-native systemtap-native" | ||
23 | |||
24 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMANDS=ON" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${bindir} | ||
28 | install -Dm 0755 ${B}/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.319.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.319.bb new file mode 100644 index 00000000..a5fa0fa9 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.319.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | FILESEXTRAPATHS:append := ":${THISDIR}/xrt" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_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 | |||
18 | S = "${UNPACKDIR}/git/src" | ||
19 | |||
20 | inherit cmake pkgconfig native | ||
21 | |||
22 | DEPENDS = "libdrm-native ocl-icd-native boost-native rapidjson-native protobuf-native python3-pybind11-native systemtap-native" | ||
23 | |||
24 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMANDS=ON" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${bindir} | ||
28 | install -Dm 0755 ${B}/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb new file mode 100644 index 00000000..191de878 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | FILESEXTRAPATHS:append := ":${THISDIR}/xrt" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_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 | |||
18 | S = "${UNPACKDIR}/git/src" | ||
19 | |||
20 | inherit cmake pkgconfig native | ||
21 | |||
22 | DEPENDS = "libdrm-native opencl-headers-native ocl-icd-native boost-native rapidjson-native protobuf-native python3-pybind11-native systemtap-native" | ||
23 | |||
24 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMANDS=ON" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${bindir} | ||
28 | install -Dm 0755 ${B}/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202310.2.15.0.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202310.2.15.0.inc new file mode 100644 index 00000000..2f6a5c6a --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202310.2.15.0.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" | ||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
3 | SRC_URI = "${REPO};${BRANCHARG}" | ||
4 | |||
5 | BRANCH= "2023.1" | ||
6 | SRCREV= "64c933573e7e50a8aba939a74209590c2b739e8b" | ||
7 | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/files/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202310.2.15.0/xrt-cstdint.patch index 67ca68c6..67ca68c6 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/files/xrt-cstdint.patch +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202310.2.15.0/xrt-cstdint.patch | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202320.2.16.0.inc index 14b2b968..0ef2b1e5 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202320.2.16.0.inc | |||
@@ -4,7 +4,6 @@ SRC_URI = "${REPO};${BRANCHARG};name=xrt" | |||
4 | 4 | ||
5 | BRANCH= "2023.2" | 5 | BRANCH= "2023.2" |
6 | SRCREV_xrt = "2865a62b6a417dea523d2d5646154aa94a2cbc28" | 6 | SRCREV_xrt = "2865a62b6a417dea523d2d5646154aa94a2cbc28" |
7 | PV = "202320.2.16.0" | ||
8 | 7 | ||
9 | SRC_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" | 8 | SRC_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" |
10 | SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" | 9 | SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" |
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202320.2.16.0/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202320.2.16.0/xrt-cstdint.patch new file mode 100644 index 00000000..67ca68c6 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202320.2.16.0/xrt-cstdint.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | Add cstdint as necessary | ||
2 | |||
3 | In GCC 13.1 usage of uint64 and similar will result in an error without | ||
4 | #include <cstdint> | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | |||
8 | diff --git a/src/runtime_src/core/common/time.h b/src/runtime_src/core/common/time.h | ||
9 | index a4a96b11d..585d38756 100644 | ||
10 | --- a/src/runtime_src/core/common/time.h | ||
11 | +++ b/src/runtime_src/core/common/time.h | ||
12 | @@ -19,6 +19,7 @@ | ||
13 | |||
14 | #include "core/common/config.h" | ||
15 | #include <string> | ||
16 | +#include <cstdint> | ||
17 | |||
18 | namespace xrt_core { | ||
19 | |||
20 | diff --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 | ||
21 | index 196304765..36ce35e80 | ||
22 | --- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
23 | +++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
24 | @@ -18,6 +18,7 @@ | ||
25 | |||
26 | #include <string> | ||
27 | #include <vector> | ||
28 | +#include <cstdint> | ||
29 | |||
30 | namespace adf | ||
31 | { | ||
32 | diff --git a/src/runtime_src/core/edge/user/zynq_dev.h b/src/runtime_src/core/edge/user/zynq_dev.h | ||
33 | index 6fe36c615..2abd7473b 100644 | ||
34 | --- a/src/runtime_src/core/edge/user/zynq_dev.h | ||
35 | +++ b/src/runtime_src/core/edge/user/zynq_dev.h | ||
36 | @@ -19,6 +19,7 @@ | ||
37 | #include <fstream> | ||
38 | #include <string> | ||
39 | #include <vector> | ||
40 | +#include <cstdint> | ||
41 | |||
42 | class zynq_device { | ||
43 | public: | ||
44 | diff --git a/src/runtime_src/tools/xclbinutil/CBOR.h b/src/runtime_src/tools/xclbinutil/CBOR.h | ||
45 | index 368459f59..acbf6ebae 100644 | ||
46 | --- a/src/runtime_src/tools/xclbinutil/CBOR.h | ||
47 | +++ b/src/runtime_src/tools/xclbinutil/CBOR.h | ||
48 | @@ -22,6 +22,7 @@ | ||
49 | // #includes here - please keep these to a bare minimum! | ||
50 | #include <string> | ||
51 | #include <sstream> | ||
52 | +#include <cstdint> | ||
53 | |||
54 | // ------------ F O R W A R D - D E C L A R A T I O N S ---------------------- | ||
55 | // Forward declarations - use these instead whenever possible... | ||
56 | diff --git a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
57 | index 361015962..1c3bca18d 100644 | ||
58 | --- a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
59 | +++ b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
60 | @@ -19,6 +19,7 @@ | ||
61 | |||
62 | // ----------------------- I N C L U D E S ----------------------------------- | ||
63 | #include <sstream> | ||
64 | +#include <cstdint> | ||
65 | #include <string> | ||
66 | |||
67 | // ----------- C L A S S : D T C S t r i n g s B l o c k ------------------- | ||
68 | diff --git a/src/runtime_src/tools/xclbinutil/XclBinSignature.h b/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
69 | index b19ab56a4..f1b72d4d2 100644 | ||
70 | --- a/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
71 | +++ b/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
72 | @@ -18,6 +18,7 @@ | ||
73 | #define __XclBinSignature_h_ | ||
74 | |||
75 | #include <string> | ||
76 | +#include <cstdint> | ||
77 | |||
78 | // ----------------------- I N C L U D E S ----------------------------------- | ||
79 | |||
80 | diff --git a/src/runtime_src/xdp/profile/database/events/vtf_event.h b/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
81 | index f8d0121db..b5f36554c 100644 | ||
82 | --- a/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
83 | +++ b/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
84 | @@ -19,6 +19,7 @@ | ||
85 | #define VTF_EVENT_DOT_H | ||
86 | |||
87 | #include <fstream> | ||
88 | +#include <cstdint> | ||
89 | |||
90 | #include "xdp/config.h" | ||
91 | |||
92 | diff --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 | ||
93 | index 98c57de2e..6077bd247 100644 | ||
94 | --- a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | ||
95 | +++ b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | ||
96 | @@ -17,7 +17,8 @@ | ||
97 | #ifndef XDP_PROFILE_AIE_TRACE_LOGGER_H | ||
98 | #define XDP_PROFILE_AIE_TRACE_LOGGER_H | ||
99 | |||
100 | -#include<iostream> | ||
101 | +#include <iostream> | ||
102 | +#include <cstdint> | ||
103 | |||
104 | namespace xdp { | ||
105 | |||
106 | diff --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 | ||
107 | index a88597464..f392ec0e6 100644 | ||
108 | --- a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | ||
109 | +++ b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | ||
110 | @@ -19,6 +19,7 @@ | ||
111 | |||
112 | #include <fstream> | ||
113 | #include <string> | ||
114 | +#include <cstdint> | ||
115 | |||
116 | #include "xdp/config.h" | ||
117 | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319.inc new file mode 100644 index 00000000..8041e5be --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319.inc | |||
@@ -0,0 +1,6 @@ | |||
1 | REPO ?= "gitsm://github.com/Xilinx/XRT.git;protocol=https" | ||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
3 | SRC_URI = "${REPO};${BRANCHARG}" | ||
4 | |||
5 | BRANCH= "2024.1" | ||
6 | SRCREV = "2c7ff250504589bd1f934010e37bdcef86afaa54" | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319/xrt-cstdint.patch new file mode 100644 index 00000000..b83c5ef7 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.319/xrt-cstdint.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Add cstdint as necessary | ||
2 | |||
3 | In GCC 13.1 usage of uint64 and similar will result in an error without | ||
4 | #include <cstdint> | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | |||
8 | Index: 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 | { | ||
20 | Index: 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-202420.2.18.0.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202420.2.18.0.inc new file mode 100644 index 00000000..27522dd8 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202420.2.18.0.inc | |||
@@ -0,0 +1,6 @@ | |||
1 | REPO ?= "gitsm://github.com/Xilinx/XRT.git;protocol=https" | ||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
3 | SRC_URI = "${REPO};${BRANCHARG};name=xrt" | ||
4 | |||
5 | BRANCH = "2024.2" | ||
6 | SRCREV_xrt = "d05b18dc38cc6804ecb4b3dbe6de23f158319567" | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb new file mode 100644 index 00000000..8a78d2f9 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
9 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \ | ||
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 | |||
15 | COMPATIBLE_MACHINE ?= "^$" | ||
16 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
17 | COMPATIBLE_MACHINE:versal = ".*" | ||
18 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
19 | |||
20 | S = "${UNPACKDIR}/git/src" | ||
21 | |||
22 | inherit cmake pkgconfig | ||
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
25 | |||
26 | # util-linux is for libuuid-dev. | ||
27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson libdfx" | ||
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | ||
29 | |||
30 | EXTRA_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 | |||
40 | FILES_SOLIBSDEV = "" | ||
41 | FILES:${PN} += "\ | ||
42 | ${libdir}/lib*.so \ | ||
43 | ${libdir}/lib*.so.* \ | ||
44 | ${libdir}/ps_kernels_lib \ | ||
45 | /lib/*.so* \ | ||
46 | ${datadir}" | ||
47 | INSANE_SKIP:${PN} += "dev-so" | ||
48 | |||
49 | pkg_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/xrt/xrt_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb index ef3c7172..abb0190d 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | 1 | SUMMARY = "Xilinx Runtime(XRT) libraries" |
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | 2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" |
3 | 3 | ||
4 | require xrt.inc | 4 | require xrt-${PV}.inc |
5 | 5 | ||
6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" | 6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" |
7 | 7 | ||
@@ -16,32 +16,28 @@ LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | |||
16 | COMPATIBLE_MACHINE ?= "^$" | 16 | COMPATIBLE_MACHINE ?= "^$" |
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | 17 | COMPATIBLE_MACHINE:zynqmp = ".*" |
18 | COMPATIBLE_MACHINE:versal = ".*" | 18 | COMPATIBLE_MACHINE:versal = ".*" |
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
19 | 20 | ||
20 | S = "${WORKDIR}/git/src" | 21 | S = "${UNPACKDIR}/git/src" |
21 | 22 | ||
22 | inherit cmake pkgconfig | 23 | inherit cmake pkgconfig |
23 | 24 | ||
24 | BBCLASSEXTEND = "native nativesdk" | 25 | BBCLASSEXTEND = "native nativesdk" |
25 | 26 | ||
26 | # util-linux is for libuuid-dev. | 27 | # util-linux is for libuuid-dev. |
27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson" | 28 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson libdfx" |
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | 29 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" |
29 | 30 | ||
30 | EXTRA_OECMAKE += " \ | 31 | EXTRA_OECMAKE += " \ |
31 | -DCMAKE_BUILD_TYPE=Release \ | 32 | -DCMAKE_BUILD_TYPE=Release \ |
32 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | 33 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ |
34 | -DXRT_LIBDFX=true \ | ||
33 | " | 35 | " |
34 | 36 | ||
35 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers | 37 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers |
36 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend | 38 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend |
37 | # Note: If meta-openamp is not available, AIE will not be enabled. | 39 | # Note: If meta-openamp is not available, AIE will not be enabled. |
38 | 40 | ||
39 | EXTRA_OECMAKE:append:versal = " -DXRT_LIBDFX=true" | ||
40 | EXTRA_OECMAKE:append:zynqmp = " -DXRT_LIBDFX=true" | ||
41 | DEPENDS:append:versal = " libdfx" | ||
42 | DEPENDS:append:zynqmp = " libdfx" | ||
43 | |||
44 | |||
45 | FILES_SOLIBSDEV = "" | 41 | FILES_SOLIBSDEV = "" |
46 | FILES:${PN} += "\ | 42 | FILES:${PN} += "\ |
47 | ${libdir}/lib*.so \ | 43 | ${libdir}/lib*.so \ |
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb new file mode 100644 index 00000000..c88450c2 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb | |||
@@ -0,0 +1,58 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_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 | |||
16 | COMPATIBLE_MACHINE ?= "^$" | ||
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
18 | COMPATIBLE_MACHINE:versal = ".*" | ||
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
20 | |||
21 | S = "${UNPACKDIR}/git/src" | ||
22 | |||
23 | inherit cmake pkgconfig | ||
24 | |||
25 | BBCLASSEXTEND = "native nativesdk" | ||
26 | |||
27 | # util-linux is for libuuid-dev. | ||
28 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap libdfx" | ||
29 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | ||
30 | |||
31 | EXTRA_OECMAKE += " \ | ||
32 | -DCMAKE_BUILD_TYPE=Release \ | ||
33 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | ||
34 | -DXRT_LIBDFX=true \ | ||
35 | " | ||
36 | |||
37 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers | ||
38 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend | ||
39 | # Note: If meta-openamp is not available, AIE will not be enabled. | ||
40 | |||
41 | FILES_SOLIBSDEV = "" | ||
42 | FILES:${PN} += "\ | ||
43 | ${libdir}/lib*.so \ | ||
44 | ${libdir}/lib*.so.* \ | ||
45 | ${libdir}/ps_kernels_lib \ | ||
46 | /lib/*.so* \ | ||
47 | ${datadir}" | ||
48 | INSANE_SKIP:${PN} += "dev-so" | ||
49 | |||
50 | pkg_postinst_ontarget:${PN}() { | ||
51 | #!/bin/sh | ||
52 | if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then | ||
53 | echo "INFO: Creating ICD entry for Xilinx Platform" | ||
54 | mkdir -p /etc/OpenCL/vendors | ||
55 | echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd | ||
56 | chmod -R 755 /etc/OpenCL | ||
57 | fi | ||
58 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb new file mode 100644 index 00000000..d9a44019 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
7 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | ||
8 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
9 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
11 | file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
12 | file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 " | ||
13 | |||
14 | COMPATIBLE_HOST = "^$" | ||
15 | COMPATIBLE_HOST:aarch64 = ".*" | ||
16 | |||
17 | S = "${UNPACKDIR}/git/src" | ||
18 | |||
19 | inherit cmake pkgconfig | ||
20 | |||
21 | BBCLASSEXTEND = "native nativesdk" | ||
22 | |||
23 | PACKAGECONFIG ??= "aie" | ||
24 | PACKAGECONFIG[aie] = ",,libxaiengine aiefal,libxaiengine aiefal" | ||
25 | |||
26 | # util-linux is for libuuid-dev. | ||
27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap libdfx" | ||
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | ||
29 | |||
30 | EXTRA_OECMAKE += " \ | ||
31 | -DCMAKE_BUILD_TYPE=Release \ | ||
32 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | ||
33 | -DXRT_LIBDFX=true \ | ||
34 | " | ||
35 | |||
36 | EXTRA_OECMAKE .= "${@bb.utils.contains('PACKAGECONFIG', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
37 | TARGET_CXXFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
38 | |||
39 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers | ||
40 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend | ||
41 | # Note: If meta-openamp is not available, AIE will not be enabled. | ||
42 | |||
43 | FILES_SOLIBSDEV = "" | ||
44 | FILES:${PN} += "\ | ||
45 | ${libdir}/lib*.so \ | ||
46 | ${libdir}/lib*.so.* \ | ||
47 | ${libdir}/ps_kernels_lib \ | ||
48 | /lib/*.so* \ | ||
49 | ${datadir}" | ||
50 | INSANE_SKIP:${PN} += "dev-so" | ||
51 | |||
52 | pkg_postinst_ontarget:${PN}() { | ||
53 | #!/bin/sh | ||
54 | if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then | ||
55 | echo "INFO: Creating ICD entry for Xilinx Platform" | ||
56 | mkdir -p /etc/OpenCL/vendors | ||
57 | echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd | ||
58 | chmod -R 755 /etc/OpenCL | ||
59 | fi | ||
60 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/files/0001-Fixed-ZOCL-dtbo-path-len-issue-6966.patch b/meta-xilinx-core/recipes-xrt/zocl/files/0001-Fixed-ZOCL-dtbo-path-len-issue-6966.patch new file mode 100644 index 00000000..0f5fc088 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/files/0001-Fixed-ZOCL-dtbo-path-len-issue-6966.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | From bc19f980cced50fc35f94905f2a99070871b9e93 Mon Sep 17 00:00:00 2001 | ||
2 | From: Saifuddin Kaijar <54270703+saifuddin-xilinx@users.noreply.github.com> | ||
3 | Date: Mon, 29 Aug 2022 10:25:06 +0530 | ||
4 | Subject: [PATCH] Fixed ZOCL dtbo path len issue (#6966) | ||
5 | |||
6 | --- | ||
7 | src/runtime_src/core/edge/drm/zocl/include/zocl_xclbin.h | 3 ++- | ||
8 | src/runtime_src/core/edge/drm/zocl/zocl_xclbin.c | 7 ++++--- | ||
9 | src/runtime_src/core/edge/include/zynq_ioctl.h | 1 + | ||
10 | src/runtime_src/core/edge/user/shim.cpp | 1 + | ||
11 | 4 files changed, 8 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/src/runtime_src/core/edge/drm/zocl/include/zocl_xclbin.h b/src/runtime_src/core/edge/drm/zocl/include/zocl_xclbin.h | ||
14 | index c9c9b4f9e..0335551bc 100644 | ||
15 | --- a/src/runtime_src/core/edge/drm/zocl/include/zocl_xclbin.h | ||
16 | +++ b/src/runtime_src/core/edge/drm/zocl/include/zocl_xclbin.h | ||
17 | @@ -39,6 +39,7 @@ int zocl_xclbin_load_pdi(struct drm_zocl_dev *zdev, void *data, | ||
18 | struct drm_zocl_slot *slot); | ||
19 | int zocl_xclbin_load_pskernel(struct drm_zocl_dev *zdev, void *data); | ||
20 | bool zocl_xclbin_accel_adapter(int kds_mask); | ||
21 | -int zocl_xclbin_set_dtbo_path(struct drm_zocl_slot *slot, char *dtbo_path); | ||
22 | +int zocl_xclbin_set_dtbo_path(struct drm_zocl_slot *slot, char *dtbo_path, | ||
23 | + uint32_t len); | ||
24 | |||
25 | #endif /* _ZOCL_XCLBIN_H_ */ | ||
26 | diff --git a/src/runtime_src/core/edge/drm/zocl/zocl_xclbin.c b/src/runtime_src/core/edge/drm/zocl/zocl_xclbin.c | ||
27 | index 7de733e38..fdedb70d5 100644 | ||
28 | --- a/src/runtime_src/core/edge/drm/zocl/zocl_xclbin.c | ||
29 | +++ b/src/runtime_src/core/edge/drm/zocl/zocl_xclbin.c | ||
30 | @@ -1475,7 +1475,8 @@ zocl_xclbin_read_axlf(struct drm_zocl_dev *zdev, struct drm_zocl_axlf *axlf_obj, | ||
31 | */ | ||
32 | slot->slot_xclbin->zx_refcnt = 0; | ||
33 | if(ZOCL_PLATFORM_ARM64) | ||
34 | - zocl_xclbin_set_dtbo_path(slot, axlf_obj->za_dtbo_path); | ||
35 | + zocl_xclbin_set_dtbo_path(slot, axlf_obj->za_dtbo_path, | ||
36 | + axlf_obj->za_dtbo_path_len); | ||
37 | zocl_xclbin_set_uuid(slot, &axlf_head.m_header.uuid); | ||
38 | |||
39 | /* | ||
40 | @@ -1725,7 +1726,8 @@ zocl_xclbin_fini(struct drm_zocl_dev *zdev, struct drm_zocl_slot *slot) | ||
41 | * @return 0 on success Error code on failure. | ||
42 | */ | ||
43 | int | ||
44 | -zocl_xclbin_set_dtbo_path(struct drm_zocl_slot *slot, char *dtbo_path) | ||
45 | +zocl_xclbin_set_dtbo_path(struct drm_zocl_slot *slot, char *dtbo_path, | ||
46 | + uint32_t len) | ||
47 | { | ||
48 | char *path = slot->slot_xclbin->zx_dtbo_path; | ||
49 | |||
50 | @@ -1735,7 +1737,6 @@ zocl_xclbin_set_dtbo_path(struct drm_zocl_slot *slot, char *dtbo_path) | ||
51 | } | ||
52 | |||
53 | if(dtbo_path) { | ||
54 | - uint32_t len = strlen(dtbo_path); | ||
55 | path = vmalloc(len + 1); | ||
56 | if (!path) | ||
57 | return -ENOMEM; | ||
58 | diff --git a/src/runtime_src/core/edge/include/zynq_ioctl.h b/src/runtime_src/core/edge/include/zynq_ioctl.h | ||
59 | index a45113550..ad9ec86ab 100644 | ||
60 | --- a/src/runtime_src/core/edge/include/zynq_ioctl.h | ||
61 | +++ b/src/runtime_src/core/edge/include/zynq_ioctl.h | ||
62 | @@ -429,6 +429,7 @@ struct drm_zocl_axlf { | ||
63 | char *za_kernels; | ||
64 | uint32_t za_slot_id; | ||
65 | char *za_dtbo_path; | ||
66 | + uint32_t za_dtbo_path_len; | ||
67 | uint8_t hw_gen; | ||
68 | struct drm_zocl_kds kds_cfg; | ||
69 | }; | ||
70 | diff --git a/src/runtime_src/core/edge/user/shim.cpp b/src/runtime_src/core/edge/user/shim.cpp | ||
71 | index 11a8d86c9..058503187 100644 | ||
72 | --- a/src/runtime_src/core/edge/user/shim.cpp | ||
73 | +++ b/src/runtime_src/core/edge/user/shim.cpp | ||
74 | @@ -732,6 +732,7 @@ xclLoadAxlf(const axlf *buffer) | ||
75 | .za_kernels = NULL, | ||
76 | .za_slot_id = 0, // TODO Cleanup: Once uuid interface id available we need to remove this | ||
77 | .za_dtbo_path = const_cast<char *>(dtbo_path.c_str()), | ||
78 | + .za_dtbo_path_len = dtbo_path.length(), | ||
79 | .hw_gen = hw_gen, | ||
80 | }; | ||
81 | |||
82 | -- | ||
83 | 2.17.1 | ||
84 | |||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202310.2.15.0.bb index 6bd579f4..998ff99c 100644 --- a/meta-xilinx-core/recipes-xrt/zocl/zocl_git.bb +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202310.2.15.0.bb | |||
@@ -3,7 +3,7 @@ DESCRIPTION = "Xilinx Runtime driver module provides memory management and compu | |||
3 | 3 | ||
4 | COMPATIBLE_MACHINE:microblaze = "none" | 4 | COMPATIBLE_MACHINE:microblaze = "none" |
5 | 5 | ||
6 | require recipes-xrt/xrt/xrt.inc | 6 | require recipes-xrt/xrt/xrt-${PV}.inc |
7 | 7 | ||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" |
9 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | 9 | LICENSE = "GPL-2.0-or-later & Apache-2.0" |
@@ -11,8 +11,9 @@ LICENSE = "GPL-2.0-or-later & Apache-2.0" | |||
11 | COMPATIBLE_MACHINE ?= "^$" | 11 | COMPATIBLE_MACHINE ?= "^$" |
12 | COMPATIBLE_MACHINE:zynqmp = ".*" | 12 | COMPATIBLE_MACHINE:zynqmp = ".*" |
13 | COMPATIBLE_MACHINE:versal = ".*" | 13 | COMPATIBLE_MACHINE:versal = ".*" |
14 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
14 | 15 | ||
15 | S = "${WORKDIR}/git/src/runtime_src/core/edge/drm/zocl" | 16 | S = "${UNPACKDIR}/git/src/runtime_src/core/edge/drm/zocl" |
16 | 17 | ||
17 | inherit module | 18 | inherit module |
18 | 19 | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_202320.2.16.0.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202320.2.16.0.bb new file mode 100644 index 00000000..998ff99c --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202320.2.16.0.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
3 | |||
4 | COMPATIBLE_MACHINE:microblaze = "none" | ||
5 | |||
6 | require recipes-xrt/xrt/xrt-${PV}.inc | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
9 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
10 | |||
11 | COMPATIBLE_MACHINE ?= "^$" | ||
12 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
13 | COMPATIBLE_MACHINE:versal = ".*" | ||
14 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
15 | |||
16 | S = "${UNPACKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
17 | |||
18 | inherit module | ||
19 | |||
20 | pkg_postinst_ontarget:${PN}() { | ||
21 | #!/bin/sh | ||
22 | echo "Unloading old XRT Linux kernel modules" | ||
23 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
24 | echo "Loading new XRT Linux kernel modules" | ||
25 | modprobe zocl | ||
26 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.319.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.319.bb new file mode 100644 index 00000000..998ff99c --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.319.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
3 | |||
4 | COMPATIBLE_MACHINE:microblaze = "none" | ||
5 | |||
6 | require recipes-xrt/xrt/xrt-${PV}.inc | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
9 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
10 | |||
11 | COMPATIBLE_MACHINE ?= "^$" | ||
12 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
13 | COMPATIBLE_MACHINE:versal = ".*" | ||
14 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
15 | |||
16 | S = "${UNPACKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
17 | |||
18 | inherit module | ||
19 | |||
20 | pkg_postinst_ontarget:${PN}() { | ||
21 | #!/bin/sh | ||
22 | echo "Unloading old XRT Linux kernel modules" | ||
23 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
24 | echo "Loading new XRT Linux kernel modules" | ||
25 | modprobe zocl | ||
26 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb new file mode 100644 index 00000000..9a1e3574 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
3 | |||
4 | COMPATIBLE_MACHINE:microblaze = "none" | ||
5 | |||
6 | PROVIDES += "zocl" | ||
7 | |||
8 | require recipes-xrt/xrt/xrt-${PV}.inc | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
11 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
12 | |||
13 | COMPATIBLE_MACHINE ?= "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
15 | COMPATIBLE_MACHINE:versal = ".*" | ||
16 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
17 | |||
18 | S = "${UNPACKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
19 | |||
20 | inherit module | ||
21 | |||
22 | pkg_postinst_ontarget:${PN}() { | ||
23 | #!/bin/sh | ||
24 | echo "Unloading old XRT Linux kernel modules" | ||
25 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
26 | echo "Loading new XRT Linux kernel modules" | ||
27 | modprobe zocl | ||
28 | } | ||