diff options
Diffstat (limited to 'meta-xilinx-core')
135 files changed, 5493 insertions, 676 deletions
diff --git a/meta-xilinx-core/classes/xilinx-microblaze.bbclass b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass index ed231a3a..ed231a3a 100644 --- a/meta-xilinx-core/classes/xilinx-microblaze.bbclass +++ b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass | |||
diff --git a/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass new file mode 100644 index 00000000..ed4c1f87 --- /dev/null +++ b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass | |||
@@ -0,0 +1,142 @@ | |||
1 | # | ||
2 | # Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | QSPI_SIZE ?= "0x2280000" | ||
8 | |||
9 | # Register values | ||
10 | IDN_REG ?= "0x4D554241" | ||
11 | VERSION_REG ?= "0x1" | ||
12 | LENGTH_REG ?= "0x4" | ||
13 | PERSISTENT_REG ?= "0x01010000" | ||
14 | |||
15 | # QSPI Offsets | ||
16 | IMAGE_SELECTOR_OFFSET ?= "0x0" | ||
17 | IMAGE_SELECTOR_BACKUP_OFFSET ?= "0x80000" | ||
18 | PERSISTENT_REG_OFFSET ?= "0x100000" | ||
19 | PERSISTENT_REG_BACKUP_OFFSET ?= "0x120000" | ||
20 | IMAGE_A_OFFSET ?= "0x200000" | ||
21 | IMAGE_A_IMGSEL_OFFSET ?= "0xF00000" | ||
22 | IMAGE_B_OFFSET ?= "0xF80000" | ||
23 | IMAGE_B_IMGSEL_OFFSET ?= "0x1C80000" | ||
24 | IMAGE_RCVRY_OFFSET ?= "0x1E00000" | ||
25 | IMAGE_RCVRY_BACKUP_OFFSET ?= "0x2000000" | ||
26 | VERSION_OFFSET ?= "0x2240000" | ||
27 | CHECKSUM_OFFSET ?= "0x2250000" | ||
28 | |||
29 | def generate_spi_image(d): | ||
30 | |||
31 | import io | ||
32 | import hashlib | ||
33 | import time | ||
34 | |||
35 | qspi_size = int(d.getVar("QSPI_SIZE") or '0', 0) | ||
36 | int(d.getVar("QSPI_SIZE") or '0', 0) | ||
37 | |||
38 | # Register values | ||
39 | idn_reg = int(d.getVar("IDN_REG") or '0', 0) | ||
40 | version_reg = int(d.getVar("VERSION_REG") or '0', 0) | ||
41 | length_reg = int(d.getVar("LENGTH_REG") or '0', 0) | ||
42 | persistent_reg = int(d.getVar("PERSISTENT_REG") or '0', 0) | ||
43 | |||
44 | # QSPI Offsets | ||
45 | image_selector_offset = int(d.getVar("IMAGE_SELECTOR_OFFSET") or '0', 0) | ||
46 | image_selector_backup_offset = int(d.getVar("IMAGE_SELECTOR_BACKUP_OFFSET") or '0', 0) | ||
47 | persistent_reg_offset = int(d.getVar("PERSISTENT_REG_OFFSET") or '0', 0) | ||
48 | persistent_reg_backup_offset = int(d.getVar("PERSISTENT_REG_BACKUP_OFFSET") or '0', 0) | ||
49 | image_a_offset = int(d.getVar("IMAGE_A_OFFSET") or '0', 0) | ||
50 | image_a_imgsel_offset = int(d.getVar("IMAGE_A_IMGSEL_OFFSET") or '0', 0) | ||
51 | image_b_offset = int(d.getVar("IMAGE_B_OFFSET") or '0', 0) | ||
52 | image_b_imgsel_offset = int(d.getVar("IMAGE_B_IMGSEL_OFFSET") or '0', 0) | ||
53 | image_rcvry_offset = int(d.getVar("IMAGE_RCVRY_OFFSET") or '0', 0) | ||
54 | image_rcvry_backup_offset = int(d.getVar("IMAGE_RCVRY_BACKUP_OFFSET") or '0', 0) | ||
55 | version_offset = int(d.getVar("VERSION_OFFSET") or '0', 0) | ||
56 | checksum_offset = int(d.getVar("CHECKSUM_OFFSET") or '0', 0) | ||
57 | |||
58 | # QSPI data | ||
59 | qspi_data = io.BytesIO() | ||
60 | qspi_data.write(b'\xFF' * qspi_size) | ||
61 | |||
62 | # Image Selector - Primary, Backup, Image A and Image B | ||
63 | imgsel_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgsel-"+d.getVar("MACHINE")+".bin" | ||
64 | try: | ||
65 | with open(imgsel_file, "rb") as il: | ||
66 | imgsel = il.read(-1) | ||
67 | except OSError as err: | ||
68 | bb.fatal("Unable to open imgsel file: " + str(err)) | ||
69 | |||
70 | qspi_data.seek(image_selector_offset) | ||
71 | qspi_data.write(imgsel) | ||
72 | qspi_data.seek(image_selector_backup_offset) | ||
73 | qspi_data.write(imgsel) | ||
74 | qspi_data.seek(image_a_imgsel_offset) | ||
75 | qspi_data.write(imgsel) | ||
76 | qspi_data.seek(image_b_imgsel_offset) | ||
77 | qspi_data.write(imgsel) | ||
78 | |||
79 | # Persistent Registers - Primary and Backup | ||
80 | p_reg = [idn_reg, version_reg, length_reg, persistent_reg, \ | ||
81 | image_a_offset, image_b_offset, image_rcvry_offset] | ||
82 | checksum = 0xffffffff - (0xffffffff & sum(p_reg)) | ||
83 | p_reg.insert(3, checksum) | ||
84 | |||
85 | qspi_data.seek(persistent_reg_offset) | ||
86 | for value in p_reg: | ||
87 | qspi_data.write(value.to_bytes(4, byteorder="little")) | ||
88 | |||
89 | qspi_data.seek(persistent_reg_backup_offset) | ||
90 | for value in p_reg: | ||
91 | qspi_data.write(value.to_bytes(4, byteorder="little")) | ||
92 | |||
93 | # Image A and B - boot.bin | ||
94 | try: | ||
95 | with open(d.getVar("DEPLOY_DIR_IMAGE")+"/boot.bin", "rb") as bo: | ||
96 | bootbin = bo.read(-1) | ||
97 | except OSError as err: | ||
98 | bb.fatal("Unable to open boot.bin file: " + str(err)) | ||
99 | |||
100 | qspi_data.seek(image_a_offset) | ||
101 | qspi_data.write(bootbin) | ||
102 | qspi_data.seek(image_b_offset) | ||
103 | qspi_data.write(bootbin) | ||
104 | |||
105 | # Recovery Image & Recovery Image Backup | ||
106 | imgrcry_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgrcry-"+d.getVar("MACHINE")+".bin" | ||
107 | try: | ||
108 | with open(imgrcry_file, "rb") as iy: | ||
109 | imgrcry = iy.read(-1) | ||
110 | except OSError as err: | ||
111 | bb.fatal("Unable to open imgrcry file: " + str(err)) | ||
112 | |||
113 | qspi_data.seek(image_rcvry_offset) | ||
114 | qspi_data.write(imgrcry) | ||
115 | qspi_data.seek(image_rcvry_backup_offset) | ||
116 | qspi_data.write(imgrcry) | ||
117 | |||
118 | # Version string and checksum | ||
119 | version = d.getVar("QSPI_IMAGE_VERSION") | ||
120 | date = time.strftime("%m%d%H%M") | ||
121 | machine = d.getVar("MACHINE")[:3] | ||
122 | image_name = d.getVar("QSPI_IMAGE_NAME") | ||
123 | |||
124 | qspi_version = f"{image_name}-{machine}-v{version}-{date}\x00" | ||
125 | qspi_data.seek(version_offset) | ||
126 | qspi_data.write(qspi_version.encode()) | ||
127 | |||
128 | qspi_sha = hashlib.sha256(qspi_data.getbuffer()) | ||
129 | qspi_data.seek(checksum_offset) | ||
130 | qspi_data.write(qspi_sha.digest()) | ||
131 | |||
132 | # Write the QSPI data to file | ||
133 | with open(d.getVar("B") + "/" + d.getVar("IMAGE_NAME") + ".bin", "wb") as sq: | ||
134 | sq.write(qspi_data.getbuffer()) | ||
135 | |||
136 | do_compile[depends] += "virtual/boot-bin:do_deploy virtual/imgsel:do_deploy virtual/imgrcry:do_deploy" | ||
137 | |||
138 | python amd_spi_image_do_compile() { | ||
139 | generate_spi_image(d) | ||
140 | } | ||
141 | |||
142 | EXPORT_FUNCTIONS do_compile | ||
diff --git a/meta-xilinx-core/classes/dfx_user_dts.bbclass b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass index 4404aa05..2b699d9d 100644 --- a/meta-xilinx-core/classes/dfx_user_dts.bbclass +++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass | |||
@@ -1,3 +1,8 @@ | |||
1 | # | ||
2 | # Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
1 | # This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes. | 6 | # This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes. |
2 | # dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static | 7 | # dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static |
3 | # and DFx RP xsa outside of yocto. | 8 | # and DFx RP xsa outside of yocto. |
@@ -25,12 +30,23 @@ S ?= "${WORKDIR}" | |||
25 | FW_DIR ?= "" | 30 | FW_DIR ?= "" |
26 | DTSI_PATH ?= "" | 31 | DTSI_PATH ?= "" |
27 | DTBO_PATH ?= "" | 32 | DTBO_PATH ?= "" |
33 | BIT_PATH ?= "" | ||
34 | BIN_PATH ?= "" | ||
35 | PDI_PATH ?= "" | ||
36 | JSON_PATH ?= "" | ||
37 | XCl_PATH ?= "" | ||
28 | DT_FILES_PATH = "${S}/${DTSI_PATH}" | 38 | DT_FILES_PATH = "${S}/${DTSI_PATH}" |
29 | FIRMWARE_NAME_DT_FILE ?= "" | 39 | FIRMWARE_NAME_DT_FILE ?= "" |
30 | USER_DTS_FILE ?= "" | 40 | USER_DTS_FILE ?= "" |
31 | 41 | ||
32 | FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" | 42 | 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" | 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" | ||
34 | 50 | ||
35 | python() { | 51 | python() { |
36 | import re | 52 | import re |
@@ -45,37 +61,59 @@ python() { | |||
45 | pdi_found = False | 61 | pdi_found = False |
46 | 62 | ||
47 | # Required Inputs | 63 | # Required Inputs |
48 | if '.dtsi' in d.getVar("SRC_URI") or '.dts' in d.getVar("SRC_URI"): | 64 | for s in d.getVar("SRC_URI").split(): |
49 | dtsi_found = True | 65 | if s.endswith(('.dtsi', '.dts')): |
50 | d.setVar("DTSI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtsi' in a or '.dts' in a][0].lstrip('file://'))) | 66 | dtsi_found = True |
51 | 67 | d.setVar("DTSI_PATH",os.path.dirname(s.lstrip('file://'))) | |
52 | if '.dtbo' in d.getVar("SRC_URI"): | 68 | if s.endswith('.dtbo'): |
53 | dtbo_found = True | 69 | if dtbo_found: |
54 | d.setVar("DTBO_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtbo' in a][0].lstrip('file://'))) | 70 | bb.warn("More then one '.dtbo' file specified in SRC_URI.") |
55 | 71 | dtbo_found = True | |
56 | if '.bit' in d.getVar("SRC_URI") and soc_family != "versal": | 72 | d.setVar("DTBO_PATH",os.path.dirname(s.lstrip('file://'))) |
57 | bit_found = True | 73 | if soc_family == "zynq" or soc_family == "zynqmp": |
58 | d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bit' in a][0].lstrip('file://'))) | 74 | if s.endswith('.bit'): |
75 | if bit_found: | ||
76 | bb.warn("More then one '.bit' file specified in SRC_URI.") | ||
77 | bit_found = True | ||
78 | d.setVar("BIT_PATH",os.path.dirname(s.lstrip('file://'))) | ||
79 | if s.endswith('.bin'): | ||
80 | if bin_found: | ||
81 | bb.warn("More then one '.bin' file specified in SRC_URI.") | ||
82 | bin_found = True | ||
83 | d.setVar("BIN_PATH",os.path.dirname(s.lstrip('file://'))) | ||
84 | else: | ||
85 | if s.endswith('.pdi'): | ||
86 | if pdi_found: | ||
87 | bb.warn("More then one '.pdi' file specified in SRC_URI.") | ||
88 | pdi_found = True | ||
89 | d.setVar("PDI_PATH",os.path.dirname(s.lstrip('file://'))) | ||
59 | 90 | ||
60 | if '.bin' in d.getVar("SRC_URI") and soc_family != "versal": | 91 | # Optional input |
61 | bin_found = True | 92 | if s.endswith('.json'): |
62 | d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bin' in a][0].lstrip('file://'))) | 93 | d.setVar("JSON_PATH",os.path.dirname(s.lstrip('file://'))) |
63 | 94 | ||
64 | if '.pdi' in d.getVar("SRC_URI") and soc_family == "versal": | 95 | if s.endswith('.xclbin'): |
65 | pdi_found = True | 96 | d.setVar("XCL_PATH",os.path.dirname(s.lstrip('file://'))) |
66 | d.setVar("PDI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.pdi' in a][0].lstrip('file://'))) | ||
67 | 97 | ||
68 | # Check for valid combination of input files in SRC_URI | 98 | # Check for valid combination of input files in SRC_URI |
69 | if dtsi_found or dtbo_found: | 99 | # Skip recipe if any of the below conditions are not satisfied. |
70 | bb.debug(2, "dtsi or dtbo found in SRC_URI") | 100 | # 1. At least one bit or bin or pdi or dts or dtsi or dtbo should exists. |
71 | if bit_found or pdi_found or bin_found: | 101 | # 2. More than one dtbo. |
72 | bb.debug(2, "bitstream or pdi found in SRC_URI") | 102 | # 3. More than one bit or bin or pdi. |
73 | elif bit_found and bin_found: | 103 | # 4. More than one dts and zero dtsi. |
104 | # 5. More than one dtsi and zero dts. | ||
105 | if dtsi_found or dtbo_found or bit_found or bin_found or pdi_found: | ||
106 | bb.debug(2, "dtsi or dtbo or bitstream or pdi found in SRC_URI") | ||
107 | if bit_found and pdi_found : | ||
108 | raise bb.parse.SkipRecipe("Both '.bit' and '.pdi' file found in SRC_URI, this is invalid use case.") | ||
109 | |||
110 | if bin_found and pdi_found : | ||
111 | raise bb.parse.SkipRecipe("Both '.bin' and '.pdi' file found in SRC_URI, this is invalid use case.") | ||
112 | |||
113 | if bit_found and bin_found: | ||
74 | raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.") | 114 | raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.") |
75 | else: | ||
76 | raise bb.parse.SkipRecipe("Need one '.bit' or one '.pdi' file added to SRC_URI ") | ||
77 | else: | 115 | else: |
78 | raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ") | 116 | raise bb.parse.SkipRecipe("Need one '.dtsi' or '.dtbo' or '.bit' or '.bin' or '.pdi' file added to SRC_URI ") |
79 | 117 | ||
80 | # Check for valid combination of dtsi and dts files in SRC_URI | 118 | # Check for valid combination of dtsi and dts files in SRC_URI |
81 | # Following file combinations are not supported use case. | 119 | # Following file combinations are not supported use case. |
@@ -90,27 +128,14 @@ python() { | |||
90 | raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case") | 128 | raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case") |
91 | elif dts_count > 1: | 129 | elif dts_count > 1: |
92 | raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case") | 130 | raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case") |
93 | |||
94 | # Optional input | ||
95 | if '.json' in d.getVar("SRC_URI"): | ||
96 | d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.json' in a][0].lstrip('file://'))) | ||
97 | |||
98 | if '.xclbin' in d.getVar("SRC_URI"): | ||
99 | d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://'))) | ||
100 | } | 131 | } |
101 | 132 | ||
102 | # Function to get dts or dtsi file count. | ||
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. | 133 | # Function to search for dt firmware-name property in dts or dtsi file. |
109 | python find_firmware_file() { | 134 | python find_firmware_file() { |
110 | import glob | 135 | import glob |
111 | pattern_fw = 'firmware-name' | 136 | pattern_fw = 'firmware-name' |
112 | search_count = 0 | 137 | search_count = 0 |
113 | for dt_files in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True): | 138 | for dt_files in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True): |
114 | with open(dt_files, "r") as f: | 139 | with open(dt_files, "r") as f: |
115 | current_fd = f.read() | 140 | current_fd = f.read() |
116 | if pattern_fw in current_fd: | 141 | if pattern_fw in current_fd: |
@@ -129,20 +154,20 @@ python do_configure() { | |||
129 | soc_family = d.getVar("SOC_FAMILY") | 154 | soc_family = d.getVar("SOC_FAMILY") |
130 | 155 | ||
131 | if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d): | 156 | if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d): |
132 | bb.warn("Using fpga-manager.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled") | 157 | bb.warn("Using dfx_user_dts.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled") |
133 | 158 | ||
134 | # Renaming firmware-name using $PN as bitstream/PDI will be renamed using | 159 | # Renaming firmware-name using $PN as bitstream/PDI will be renamed using |
135 | # $PN when generating the bin/pdi file. | 160 | # $PN when generating the bin/pdi file. |
136 | if os.path.isfile(d.getVar('S') + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | 161 | if os.path.isfile(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): |
137 | orig_dtsi = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0] | 162 | orig_dtsi = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0] |
138 | new_dtsi = d.getVar('S') + '/pl.dtsi_firmwarename' | 163 | new_dtsi = d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/pl.dtsi_firmwarename' |
139 | with open(new_dtsi, 'w') as newdtsi: | 164 | with open(new_dtsi, 'w') as newdtsi: |
140 | with open(orig_dtsi) as olddtsi: | 165 | with open(orig_dtsi) as olddtsi: |
141 | for line in olddtsi: | 166 | for line in olddtsi: |
142 | if soc_family == 'versal': | 167 | if soc_family == 'zynq' or soc_family == 'zynqmp': |
143 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line)) | 168 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bin\"',line)) |
144 | else: | 169 | else: |
145 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bit.bin\"',line)) | 170 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line)) |
146 | shutil.move(new_dtsi,orig_dtsi) | 171 | shutil.move(new_dtsi,orig_dtsi) |
147 | } | 172 | } |
148 | 173 | ||
@@ -153,38 +178,37 @@ python devicetree_do_compile:append() { | |||
153 | soc_family = d.getVar("SOC_FAMILY") | 178 | soc_family = d.getVar("SOC_FAMILY") |
154 | 179 | ||
155 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | 180 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) |
156 | 181 | bin_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.bin'),recursive=True) if os.path.isfile(f)) | |
157 | # Skip devicetree do_compile task if input file is dtbo in SRC_URI | 182 | # Skip devicetree do_compile task if input file is dtbo or bin in SRC_URI |
158 | if not dtbo_count: | 183 | if not dtbo_count and not bin_count: |
159 | # Convert .bit to bit.bin format only if dtsi is input. | 184 | # Convert .bit to .bin format only if dtsi is input. |
160 | # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit or | 185 | # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit |
161 | # .bit.bin format and corresponding file name. Hence we are not doing | 186 | # or .bin format and corresponding file name. Hence we are not doing .bin |
162 | # bit.bin conversion. | 187 | # conversion. |
163 | if soc_family != 'versal' and glob.glob(d.getVar('S') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | 188 | if soc_family == 'zynq' or soc_family == 'zynqmp' and glob.glob(d.getVar('S') + '/' +(d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): |
164 | pn = d.getVar('PN') | 189 | pn = d.getVar('PN') |
165 | biffile = pn + '.bif' | 190 | biffile = pn + '.bif' |
166 | |||
167 | with open(biffile, 'w') as f: | 191 | with open(biffile, 'w') as f: |
168 | f.write('all:\n{\n\t' + glob.glob(d.getVar('S')+(d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}') | 192 | f.write('all:\n{\n\t' + glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}') |
169 | 193 | ||
170 | bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split() | 194 | bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split() |
171 | bootgenargs += ["-image", biffile, "-o", pn + ".bit.bin"] | 195 | bootgenargs += ["-image", biffile, "-o", pn + ".bin"] |
172 | subprocess.run(bootgenargs, check = True) | 196 | subprocess.run(bootgenargs, check = True) |
173 | 197 | ||
174 | # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag, | 198 | # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag, |
175 | # to convert bit file to bin format, "-o" option will not be effective | 199 | # to convert bit file to bin format, "-o" option will not be effective |
176 | # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bit.bin | 200 | # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bin |
177 | # file, Hence we need to rename this file from <bit_file_name>.bit.bin to | 201 | # file, Hence we need to rename this file from <bit_file_name>.bin to |
178 | # ${PN}.bit.bin which matches the firmware name in dtbo and move | 202 | # ${PN}.bin which matches the firmware name in dtbo and move |
179 | # ${PN}.bit.bin to ${B} directory. | 203 | # ${PN}.bin to ${B} directory. |
180 | if soc_family == 'zynq': | 204 | if soc_family == 'zynq': |
181 | src_bitbin_file = glob.glob(d.getVar('S') + (d.getVar('BIT_PATH') or '') + '/*.bit.bin')[0] | 205 | src_bitbin_file = glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bin')[0] |
182 | dst_bitbin_file = d.getVar('B') + '/' + pn + '.bit.bin' | 206 | dst_bitbin_file = d.getVar('B') + '/' + pn + '.bin' |
183 | shutil.move(src_bitbin_file, dst_bitbin_file) | 207 | shutil.move(src_bitbin_file, dst_bitbin_file) |
184 | 208 | ||
185 | if not os.path.isfile(pn + ".bit.bin"): | 209 | if not os.path.isfile(pn + ".bin"): |
186 | bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \ | 210 | bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \ |
187 | "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bit.bin')) | 211 | "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bin')) |
188 | } | 212 | } |
189 | 213 | ||
190 | # If user inputs both dtsi and dts files then device-tree will generate dtbo | 214 | # If user inputs both dtsi and dts files then device-tree will generate dtbo |
@@ -192,17 +216,23 @@ python devicetree_do_compile:append() { | |||
192 | # overlay file. | 216 | # overlay file. |
193 | python find_user_dts_overlay_file() { | 217 | python find_user_dts_overlay_file() { |
194 | import glob | 218 | import glob |
195 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | 219 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTBO_PATH') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) |
196 | # Skip if input file is dtbo in SRC_URI | 220 | dts_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dts'),recursive=True) if os.path.isfile(f)) |
197 | if not dtbo_count: | 221 | dtsi_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dtsi'),recursive=True) if os.path.isfile(f)) |
198 | dts_count = get_dt_count(d, 'dts') | 222 | # Set USER_DTS_FILE if input file is dts/dtsi in SRC_URI else skip operation. |
199 | dtsi_count = get_dt_count(d, 'dtsi') | 223 | if not dtbo_count and dts_count or dtsi_count: |
200 | if dtsi_count == 1 and dts_count == 0: | 224 | if dtsi_count == 1 and dts_count == 0: |
201 | dts_file =glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0] | 225 | dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0] |
202 | elif dtsi_count >=0 and dts_count == 1: | 226 | elif dtsi_count >=0 and dts_count == 1: |
203 | dts_file = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dts')[0] | 227 | dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dts')[0] |
228 | else: | ||
229 | dts_file = '' | ||
204 | 230 | ||
205 | d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0]) | 231 | d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0]) |
232 | elif dtbo_count: | ||
233 | bb.debug(2, "Firmware recipe input file is dtbo in SRC_URI") | ||
234 | else: | ||
235 | bb.debug(2, "Firmware recipe input file is bit/bin/pdi in SRC_URI") | ||
206 | } | 236 | } |
207 | 237 | ||
208 | do_install[prefuncs] += "find_user_dts_overlay_file" | 238 | do_install[prefuncs] += "find_user_dts_overlay_file" |
@@ -210,8 +240,12 @@ do_install[prefuncs] += "find_user_dts_overlay_file" | |||
210 | do_install() { | 240 | do_install() { |
211 | install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 241 | install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
212 | 242 | ||
243 | # Install dtbo | ||
213 | # In case of dtbo as input, dtbo will be copied from directly from ${S} | 244 | # In case of dtbo as input, dtbo will be copied from directly from ${S} |
214 | # In case of dtsi as input, dtbo will be copied from directly from ${B} | 245 | # In case of dtsi as input, dtbo will be copied from directly from ${B} |
246 | # If more than one dtbo file is found then fatal the task. | ||
247 | # If no dtbo file is found add warning message as in some use case if IP | ||
248 | # doesn't have any driver then user can load pdi/bit/bin file. | ||
215 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | 249 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then |
216 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 250 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
217 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then | 251 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then |
@@ -219,44 +253,56 @@ do_install() { | |||
219 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 253 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then |
220 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo | 254 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo |
221 | else | 255 | else |
222 | bbfatal "A dtbo ending '.dtbo' expected but not found" | 256 | bbnote "A dtbo ending '.dtbo' expected but not found in ${S} or ${B}, This means firmware can be loaded without dtbo dependency." |
223 | fi | 257 | fi |
224 | 258 | ||
225 | if [ "${SOC_FAMILY}" == "versal" ]; then | 259 | # Install bit or bin if soc family is zynq-7000 or zynqmp. |
226 | # In case of dtbo as input, pdi will be copied from directly from ${S} | 260 | # In case of dtbo as input or no dtbo exists in ${B}, then .bit or .bin will |
227 | # without renaming the pdi name to ${PN}.pdi | 261 | # be copied from directly from ${S} without renaming the .bit/.bin name to |
228 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | 262 | # ${PN}.bit/${PN}.bin. |
229 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 263 | # if more than one .bit/.bin file is found then fatal the task. |
230 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | 264 | # if no .bit/.bin file is found then fatal the task. |
231 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" | 265 | if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then |
232 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
233 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
234 | else | ||
235 | bbfatal "A PDI file with '.pdi' expected but not found" | ||
236 | fi | ||
237 | else | ||
238 | # In case of dtbo as input, .bit or .bin will be copied from directly | ||
239 | # from ${S} without renaming the .bit/.bin name to ${PN}.bit/${PN}.bin | ||
240 | # if more than one .bit/.bin file is found then fail the task. | ||
241 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then | 266 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then |
242 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" | 267 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" |
243 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then | 268 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then |
244 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" | 269 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" |
245 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | 270 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then |
246 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 271 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
247 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | 272 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then |
248 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 273 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
249 | elif [ -f ${B}/${PN}.bit.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 274 | elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then |
250 | install -Dm 0644 ${B}/${PN}.bit.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bit.bin | 275 | install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin |
251 | else | 276 | else |
252 | bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" | 277 | bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" |
253 | fi | 278 | fi |
254 | fi | 279 | fi |
255 | 280 | ||
281 | # Install pdi if soc family is versal or new silicon. | ||
282 | # In case of dtbo as input or no dtbo exists in ${B}, then .pdi will be copied | ||
283 | # from directly from ${S} without renaming the pdi name to ${PN}.pdi | ||
284 | # if more than one .pdi file is found then fail the task. | ||
285 | # In case of Versal DFx Static, only static dtbo can be loaded as BOOT.bin | ||
286 | # already contains static pdi. bbclass is not smart enough to determine | ||
287 | # whether it is static pdi or not, hence change fatal to warn if no PDI is found. | ||
288 | if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then | ||
289 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
290 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
291 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | ||
292 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" | ||
293 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
294 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
295 | else | ||
296 | bbwarn "A PDI file with '.pdi' expected but not found" | ||
297 | fi | ||
298 | fi | ||
299 | |||
300 | # Install xclbin | ||
256 | if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then | 301 | if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then |
257 | install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin | 302 | install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin |
258 | fi | 303 | fi |
259 | 304 | ||
305 | # Install shell.json or accel.json | ||
260 | if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then | 306 | if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then |
261 | install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 307 | install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
262 | fi | 308 | fi |
diff --git a/meta-xilinx-core/classes-recipe/fw-package.bbclass b/meta-xilinx-core/classes-recipe/fw-package.bbclass new file mode 100644 index 00000000..e9847d33 --- /dev/null +++ b/meta-xilinx-core/classes-recipe/fw-package.bbclass | |||
@@ -0,0 +1,94 @@ | |||
1 | # | ||
2 | # Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # This bbclass provides infrastructure to package and deploy firmware baremetal | ||
7 | # or freertos application elf or bin files to linux root filesystem under | ||
8 | # /lib/firmware directory. | ||
9 | |||
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..7466ab5e 100644 --- a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass | |||
diff --git a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass index a778ec7d..a778ec7d 100644 --- a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass +++ b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass | |||
diff --git a/meta-xilinx-core/classes/xilinx-platform-init.bbclass b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass index 99f7863a..99f7863a 100644 --- a/meta-xilinx-core/classes/xilinx-platform-init.bbclass +++ b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass | |||
diff --git a/meta-xilinx-core/classes/fpgamanager_custom.bbclass b/meta-xilinx-core/classes/fpgamanager_custom.bbclass deleted file mode 100644 index 8c8997a1..00000000 --- a/meta-xilinx-core/classes/fpgamanager_custom.bbclass +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # This class inherits dfx_user_dts.bbclass for below use cases. | ||
2 | # Zynq-7000 and ZynqMP: Full bitstream loading. | ||
3 | # ZynqMP: DFx Static and Partial bitstream loading. | ||
4 | # Versal: DFx Static and Parial pdi loading. | ||
5 | # Versal: Full PDI loading. | ||
6 | |||
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/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index b9804261..d6b93f9d 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -42,7 +42,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | |||
42 | *->xserver-xorg \ | 42 | *->xserver-xorg \ |
43 | " | 43 | " |
44 | 44 | ||
45 | XILINX_RELEASE_VERSION ??= "v2023.2" | 45 | XILINX_RELEASE_VERSION ??= "v2024.1" |
46 | 46 | ||
47 | BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" | 47 | BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" |
48 | 48 | ||
@@ -50,6 +50,8 @@ XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%" | |||
50 | XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" | 50 | XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" |
51 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" | 51 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" |
52 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" | 52 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" |
53 | XILINX_QEMU_VERSION[v2024.1] = "v8.1.0-xilinx-v2024.1%" | ||
54 | PREFERRED_VERSION_qemu ?= "${@ '7.1%' if not (d.getVar('XILINX_RELEASE_VERSION') or 'undefined').startswith('v2024') else '8.1%'}" | ||
53 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 55 | 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'}" | 56 | 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'}" | 57 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
@@ -59,12 +61,18 @@ DEFAULT_XILINX_QEMU = "qemu-xilinx" | |||
59 | DEFAULT_XILINX_QEMU:arm = "qemu" | 61 | DEFAULT_XILINX_QEMU:arm = "qemu" |
60 | PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}" | 62 | PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}" |
61 | 63 | ||
64 | XILINX_ATF_VERSION[v2022.1] = "2.6-xilinx-v2022.1%" | ||
65 | XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%" | ||
62 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" | 66 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" |
63 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" | 67 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" |
68 | XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%" | ||
64 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 69 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
65 | 70 | ||
71 | XILINX_UBOOT_VERSION[v2022.1] = "v2021.01-xilinx-v2022.1%" | ||
72 | XILINX_UBOOT_VERSION[v2022.2] = "v2022.01-xilinx-v2022.2%" | ||
66 | XILINX_UBOOT_VERSION[v2023.1] = "v2023.01-xilinx-v2023.1%" | 73 | XILINX_UBOOT_VERSION[v2023.1] = "v2023.01-xilinx-v2023.1%" |
67 | XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%" | 74 | XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%" |
75 | XILINX_UBOOT_VERSION[v2024.1] = "v2024.01-xilinx-v2024.1%" | ||
68 | 76 | ||
69 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 77 | 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'}" | 78 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
@@ -73,6 +81,7 @@ XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" | |||
73 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" | 81 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" |
74 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" | 82 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" |
75 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" | 83 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" |
84 | XILINX_LINUX_VERSION[v2024.1] = "6.6.10-xilinx-v2024.1%" | ||
76 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 85 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
77 | 86 | ||
78 | # Add support to eSDK for gen-machine-conf if it exists | 87 | # Add support to eSDK for gen-machine-conf if it exists |
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc b/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc new file mode 100644 index 00000000..5679b989 --- /dev/null +++ b/meta-xilinx-core/conf/machine/include/arm/armv7r/tune-cortexr5hf.inc | |||
@@ -0,0 +1,6 @@ | |||
1 | include conf/machine/include/arm/armv7r/tune-cortexr5.inc | ||
2 | |||
3 | AVAILTUNES += "cortexr5hf" | ||
4 | ARMPKGARCH:tune-cortexr5hf = "cortexr5" | ||
5 | TUNE_FEATURES:tune-cortexr5hf = "${TUNE_FEATURES:tune-cortexr5} callconvention-hard" | ||
6 | PACKAGE_EXTRA_ARCHS:tune-cortexr5hf = "cortexr5hf-vfpv3d16" | ||
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc b/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc new file mode 100644 index 00000000..8c85d98e --- /dev/null +++ b/meta-xilinx-core/conf/machine/include/arm/armv8-2a/tune-cortexa78.inc | |||
@@ -0,0 +1,16 @@ | |||
1 | # | ||
2 | # Tune Settings for Cortex-A78 | ||
3 | # | ||
4 | DEFAULTTUNE ?= "cortexa78" | ||
5 | |||
6 | TUNEVALID[cortexa78] = "Enable Cortex-A78 specific processor optimizations" | ||
7 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa78', ' -mcpu=cortex-a78', '', d)}" | ||
8 | |||
9 | require conf/machine/include/arm/arch-armv8-2a.inc | ||
10 | |||
11 | # Little Endian base configs | ||
12 | AVAILTUNES += "cortexa78" | ||
13 | ARMPKGARCH:tune-cortexa78 = "cortexa78" | ||
14 | TUNE_FEATURES:tune-cortexa78 = "${TUNE_FEATURES:tune-armv8-2a-crypto} cortexa78" | ||
15 | PACKAGE_EXTRA_ARCHS:tune-cortexa78 = "${PACKAGE_EXTRA_ARCHS:tune-armv8-2a-crypto} cortexa78" | ||
16 | BASE_LIB:tune-cortexa78 = "lib64" | ||
diff --git a/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc b/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc new file mode 100644 index 00000000..42c6fb37 --- /dev/null +++ b/meta-xilinx-core/conf/machine/include/arm/armv8r/tune-cortexr52hf.inc | |||
@@ -0,0 +1,9 @@ | |||
1 | require conf/machine/include/arm/armv8r/tune-cortexr52.inc | ||
2 | |||
3 | # simd is special, we don't pass this to the -mfpu, it's implied | ||
4 | TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }" | ||
5 | |||
6 | AVAILTUNES += "cortexr52hf" | ||
7 | ARMPKGARCH:tune-cortexr52hf = "cortexr52" | ||
8 | TUNE_FEATURES:tune-cortexr52hf = "${TUNE_FEATURES:tune-cortexr52} callconvention-hard" | ||
9 | PACKAGE_EXTRA_ARCHS:tune-cortexr52hf = "cortexr52hf" | ||
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc index e99b1f0e..c732523c 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc | |||
@@ -28,8 +28,7 @@ do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC | |||
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 | 32 | ||
34 | # libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 | 33 | # libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 |
35 | # lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 | 34 | # lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 |
diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf index 9945d301..eb450bbf 100644 --- a/meta-xilinx-core/conf/machine/versal-net-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf | |||
@@ -1,5 +1,3 @@ | |||
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 |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi index 694a2fd0..a918faf2 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi | |||
@@ -28,6 +28,24 @@ | |||
28 | no-map; | 28 | no-map; |
29 | reg = <0x0 0x3ed48000 0x0 0x100000>; | 29 | reg = <0x0 0x3ed48000 0x0 0x100000>; |
30 | }; | 30 | }; |
31 | |||
32 | rproc_1_reserved: rproc@3ef00000 { | ||
33 | no-map; | ||
34 | reg = <0x0 0x3ef00000 0x0 0x40000>; | ||
35 | }; | ||
36 | rpu1vdev0vring0: rpu1vdev0vring0@3ef40000 { | ||
37 | no-map; | ||
38 | reg = <0x0 0x3ef40000 0x0 0x4000>; | ||
39 | }; | ||
40 | rpu1vdev0vring1: rpu1vdev0vring1@3ef44000 { | ||
41 | no-map; | ||
42 | reg = <0x0 0x3ef44000 0x0 0x4000>; | ||
43 | }; | ||
44 | rpu1vdev0buffer: rpu1vdev0buffer@3ef48000 { | ||
45 | no-map; | ||
46 | compatible = "shared-dma-pool"; | ||
47 | reg = <0x0 0x3ef48000 0x0 0x100000>; | ||
48 | }; | ||
31 | }; | 49 | }; |
32 | 50 | ||
33 | tcm_0a: tcm_0a@eba00000 { | 51 | tcm_0a: tcm_0a@eba00000 { |
@@ -54,6 +72,30 @@ | |||
54 | power-domain = <&versal_net_firmware 0x183180cd>; | 72 | power-domain = <&versal_net_firmware 0x183180cd>; |
55 | }; | 73 | }; |
56 | 74 | ||
75 | tcm_1a: tcm_0a@eba40000 { | ||
76 | no-map; | ||
77 | reg = <0x0 0xeba40000 0x0 0x10000>; | ||
78 | status = "okay"; | ||
79 | compatible = "mmio-sram"; | ||
80 | power-domain = <&versal_net_firmware 0x183180ce>; | ||
81 | }; | ||
82 | |||
83 | tcm_1b: tcm_0b@eba50000 { | ||
84 | no-map; | ||
85 | reg = <0x0 0xeba50000 0x0 0x8000>; | ||
86 | status = "okay"; | ||
87 | compatible = "mmio-sram"; | ||
88 | power-domain = <&versal_net_firmware 0x183180cf>; | ||
89 | }; | ||
90 | |||
91 | tcm_1c: tcm_0b@eba60000 { | ||
92 | no-map; | ||
93 | reg = <0x0 0xeba60000 0x0 0x8000>; | ||
94 | status = "okay"; | ||
95 | compatible = "mmio-sram"; | ||
96 | power-domain = <&versal_net_firmware 0x183180d0>; | ||
97 | }; | ||
98 | |||
57 | r52ss { | 99 | r52ss { |
58 | compatible = "xlnx,versal-net-r52-remoteproc"; | 100 | compatible = "xlnx,versal-net-r52-remoteproc"; |
59 | #address-cells = <0x2>; | 101 | #address-cells = <0x2>; |
@@ -72,7 +114,18 @@ | |||
72 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 114 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
73 | mbox-names = "tx", "rx"; | 115 | mbox-names = "tx", "rx"; |
74 | }; | 116 | }; |
75 | }; | 117 | r52_1 { |
118 | compatible = "xilinx,r52"; | ||
119 | #address-cells = <0x2>; | ||
120 | #size-cells = <0x2>; | ||
121 | ranges; | ||
122 | sram = <&tcm_1a>, <&tcm_1b>, <&tcm_1c>; | ||
123 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | ||
124 | power-domain = <&versal_net_firmware 0x181100C0>; | ||
125 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | ||
126 | mbox-names = "tx", "rx"; | ||
127 | }; | ||
128 | }; | ||
76 | 129 | ||
77 | zynqmp_ipi1 { | 130 | zynqmp_ipi1 { |
78 | compatible = "xlnx,zynqmp-ipi-mailbox"; | 131 | compatible = "xlnx,zynqmp-ipi-mailbox"; |
@@ -93,5 +146,15 @@ | |||
93 | #mbox-cells = <0x01>; | 146 | #mbox-cells = <0x01>; |
94 | xlnx,ipi-id = <0x03>; | 147 | xlnx,ipi-id = <0x03>; |
95 | }; | 148 | }; |
149 | /* APU<->RPU1 IPI mailbox controller */ | ||
150 | ipi_mailbox_rpu1: mailbox@eb3f0b00{ | ||
151 | reg = <0xeb3f0b00 0x20 0xeb3f0b20 0x20 0xeb3f0940 0x20 0xeb3f0960 0x20>; | ||
152 | reg-names = "local_request_region", | ||
153 | "local_response_region", | ||
154 | "remote_request_region", | ||
155 | "remote_response_region"; | ||
156 | #mbox-cells = <0x01>; | ||
157 | xlnx,ipi-id = <0x04>; | ||
158 | }; | ||
96 | }; | 159 | }; |
97 | }; | 160 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi index c8a60d81..8ef72656 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi | |||
@@ -28,6 +28,23 @@ | |||
28 | no-map; | 28 | no-map; |
29 | reg = <0x0 0x3ed00000 0x0 0x40000>; | 29 | reg = <0x0 0x3ed00000 0x0 0x40000>; |
30 | }; | 30 | }; |
31 | rpu1vdev0vring0: rpu0vdev0vring0@3ef40000 { | ||
32 | no-map; | ||
33 | reg = <0x0 0x3ef40000 0x0 0x4000>; | ||
34 | }; | ||
35 | rpu1vdev0vring1: rpu0vdev0vring1@3ef44000 { | ||
36 | no-map; | ||
37 | reg = <0x0 0x3ef44000 0x0 0x4000>; | ||
38 | }; | ||
39 | rpu1vdev0buffer: rpu0vdev0buffer@3ef48000 { | ||
40 | no-map; | ||
41 | reg = <0x0 0x3ef48000 0x0 0x100000>; | ||
42 | }; | ||
43 | rproc_1_reserved: rproc@3ef00000 { | ||
44 | no-map; | ||
45 | reg = <0x0 0x3ef00000 0x0 0x40000>; | ||
46 | }; | ||
47 | |||
31 | }; | 48 | }; |
32 | 49 | ||
33 | tcm_0a: tcm_0a@ffe00000 { | 50 | tcm_0a: tcm_0a@ffe00000 { |
@@ -45,7 +62,21 @@ | |||
45 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
46 | power-domain = <&zynqmp_firmware 16>; | 63 | power-domain = <&zynqmp_firmware 16>; |
47 | }; | 64 | }; |
65 | tcm_1a: tcm_0a@ffe90000 { | ||
66 | no-map; | ||
67 | reg = <0x0 0xffe90000 0x0 0x10000>; | ||
68 | status = "okay"; | ||
69 | compatible = "mmio-sram"; | ||
70 | power-domain = <&zynqmp_firmware 17>; | ||
71 | }; | ||
48 | 72 | ||
73 | tcm_1b: tcm_0b@ffeb0000 { | ||
74 | no-map; | ||
75 | reg = <0x0 0xffeb0000 0x0 0x10000>; | ||
76 | status = "okay"; | ||
77 | compatible = "mmio-sram"; | ||
78 | power-domain = <&zynqmp_firmware 18>; | ||
79 | }; | ||
49 | rf5ss@ff9a0000 { | 80 | rf5ss@ff9a0000 { |
50 | compatible = "xlnx,zynqmp-r5-remoteproc"; | 81 | compatible = "xlnx,zynqmp-r5-remoteproc"; |
51 | xlnx,cluster-mode = <1>; | 82 | xlnx,cluster-mode = <1>; |
@@ -65,6 +96,18 @@ | |||
65 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 96 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
66 | mbox-names = "tx", "rx"; | 97 | mbox-names = "tx", "rx"; |
67 | }; | 98 | }; |
99 | r5f_1: r5f@1 { | ||
100 | compatible = "xilinx,r5f"; | ||
101 | #address-cells = <2>; | ||
102 | #size-cells = <2>; | ||
103 | ranges; | ||
104 | sram = <&tcm_1a>, <&tcm_1b>; | ||
105 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | ||
106 | power-domain = <&zynqmp_firmware 8>; | ||
107 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | ||
108 | mbox-names = "tx", "rx"; | ||
109 | }; | ||
110 | |||
68 | }; | 111 | }; |
69 | 112 | ||
70 | zynqmp_ipi1 { | 113 | zynqmp_ipi1 { |
@@ -90,4 +133,26 @@ | |||
90 | xlnx,ipi-id = <1>; | 133 | xlnx,ipi-id = <1>; |
91 | }; | 134 | }; |
92 | }; | 135 | }; |
136 | zynqmp_ipi2 { | ||
137 | compatible = "xlnx,zynqmp-ipi-mailbox"; | ||
138 | interrupt-parent = <&gic>; | ||
139 | interrupts = <0 30 4>; | ||
140 | xlnx,ipi-id = <8>; | ||
141 | #address-cells = <1>; | ||
142 | #size-cells = <1>; | ||
143 | ranges; | ||
144 | /* APU<->RPU1 IPI mailbox controller */ | ||
145 | ipi_mailbox_rpu1: mailbox@ff990800 { | ||
146 | reg = <0xff990800 0x20>, | ||
147 | <0xff990820 0x20>, | ||
148 | <0xff990200 0x20>, | ||
149 | <0xff990220 0x20>; | ||
150 | reg-names = "local_request_region", | ||
151 | "local_response_region", | ||
152 | "remote_request_region", | ||
153 | "remote_response_region"; | ||
154 | #mbox-cells = <1>; | ||
155 | xlnx,ipi-id = <2>; | ||
156 | }; | ||
157 | }; | ||
93 | }; | 158 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb new file mode 100644 index 00000000..ca447615 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SRCBRANCH ?= "2024" | ||
2 | SRCREV = "e2fdb4fecbebe41b4cd1c0b4fbfa3496bcded485" | ||
3 | BRANCH = "2024" | ||
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" | ||
5 | PV = "${SRCBRANCH}+git${SRCPV}" | ||
6 | |||
7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" | ||
8 | |||
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 | ||
11 | |||
12 | RPROVIDES:${PN}-dbg += "libmetal-dbg" | ||
13 | RPROVIDES:${PN}-dev += "libmetal-dev" | ||
14 | RPROVIDES:${PN}-lic += "libmetal-lic" | ||
15 | RPROVIDES:${PN}-src += "libmetal-src" | ||
16 | RPROVIDES:${PN}-staticdev += "libmetal-staticdev" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb new file mode 100644 index 00000000..01df6033 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SRCBRANCH ?= "2024" | ||
2 | SRCREV = "f4a7bc0fca5b14bb8fd185918614bcc78ce93028" | ||
3 | BRANCH = "2024" | ||
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" | ||
5 | PV = "${SRCBRANCH}+git${SRCPV}" | ||
6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" | ||
7 | |||
8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc | ||
9 | require ${LAYER_PATH_openamp-layer}/vendor/xilinx/recipes-openamp/open-amp/open-amp-xlnx.inc | ||
10 | |||
11 | RPROVIDES:${PN}-dbg += "open-amp-dbg" | ||
12 | RPROVIDES:${PN}-dev += "open-amp-dev" | ||
13 | RPROVIDES:${PN}-lic += "open-amp-lic" | ||
14 | RPROVIDES:${PN}-src += "open-amp-src" | ||
15 | RPROVIDES:${PN}-staticdev += "open-amp-staticdev" | ||
16 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend index 2b96f152..e0de911f 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_git.bbappend | |||
@@ -3,12 +3,12 @@ | |||
3 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | 3 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" |
4 | EXTRA_OECMAKE:append:versal-ai-core = " -DXRT_AIE_BUILD=true" | 4 | EXTRA_OECMAKE:append:versal-ai-core = " -DXRT_AIE_BUILD=true" |
5 | TARGET_CXXFLAGS:append:versal-ai-core = " -DXRT_ENABLE_AIE" | 5 | TARGET_CXXFLAGS:append:versal-ai-core = " -DXRT_ENABLE_AIE" |
6 | DEPENDS:append:versal-ai-core = " libmetal libxaiengine aiefal" | 6 | DEPENDS:append:versal-ai-core = " libxaiengine aiefal" |
7 | RDEPENDS:${PN}:append:versal-ai-core = " libxaiengine aiefal" | 7 | RDEPENDS:${PN}:append:versal-ai-core = " libxaiengine aiefal" |
8 | 8 | ||
9 | # For vek280 kind of devices | 9 | # For vek280 kind of devices |
10 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | 10 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" |
11 | EXTRA_OECMAKE:append:versal-ai-edge = " -DXRT_AIE_BUILD=true" | 11 | EXTRA_OECMAKE:append:versal-ai-edge = " -DXRT_AIE_BUILD=true" |
12 | TARGET_CXXFLAGS:append:versal-ai-edge = " -DXRT_ENABLE_AIE" | 12 | TARGET_CXXFLAGS:append:versal-ai-edge = " -DXRT_ENABLE_AIE" |
13 | DEPENDS:append:versal-ai-edge = " libmetal libxaiengine aiefal" | 13 | DEPENDS:append:versal-ai-edge = " libxaiengine aiefal" |
14 | RDEPENDS:${PN}:append:versal-ai-edge = " libxaiengine aiefal" | 14 | RDEPENDS:${PN}:append:versal-ai-edge = " libxaiengine aiefal" |
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-7.1.inc index 2c73d931..d07090bd 100644 --- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-7.1.inc | |||
@@ -10,27 +10,27 @@ PACKAGES:prepend:class-target = "${PN}-x86_64 \ | |||
10 | " | 10 | " |
11 | 11 | ||
12 | FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" | 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}" | 13 | RDEPENDS:${PN}-x86_64:append:class-target = " ${PN}" |
14 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" | 14 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" |
15 | 15 | ||
16 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" | 16 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" |
17 | RDEPENDS:${PN}-i386:append:class-target = "${PN}" | 17 | RDEPENDS:${PN}-i386:append:class-target = " ${PN}" |
18 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" | 18 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" |
19 | 19 | ||
20 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" | 20 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" |
21 | RDEPENDS:${PN}-system-i386:append:class-target = "${PN}" | 21 | RDEPENDS:${PN}-system-i386:append:class-target = " ${PN}" |
22 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" | 22 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" |
23 | 23 | ||
24 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" | 24 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" |
25 | RDEPENDS:${PN}-aarch64:append:class-target = "${PN}" | 25 | RDEPENDS:${PN}-aarch64:append:class-target = " ${PN}" |
26 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" | 26 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" |
27 | 27 | ||
28 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" | 28 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" |
29 | RDEPENDS:${PN}-arm:append:class-target = "${PN}" | 29 | RDEPENDS:${PN}-arm:append:class-target = " ${PN}" |
30 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | 30 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" |
31 | 31 | ||
32 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" | 32 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" |
33 | RDEPENDS:${PN}-microblaze:append:class-target = "${PN}" | 33 | RDEPENDS:${PN}-microblaze:append:class-target = " ${PN}" |
34 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | 34 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" |
35 | 35 | ||
36 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" | 36 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" |
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc new file mode 100644 index 00000000..42f054e6 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc | |||
@@ -0,0 +1,71 @@ | |||
1 | # we have our own package splitting for qemu, inhbit the oe-core | ||
2 | # split by overriding the split function | ||
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_%.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_2023%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend new file mode 100644 index 00000000..c9f04327 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2023%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-7.1.inc', '', d)} | |||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend new file mode 100644 index 00000000..74aa15fb --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-8.1.inc', '', d)} | |||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend new file mode 100644 index 00000000..c9f04327 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_7.1%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-7.1.inc', '', d)} | |||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend new file mode 100644 index 00000000..74aa15fb --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu_8.1%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-xilinx-package-split-8.1.inc', '', d)} | |||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend index 56cb8a45..92af8a7a 100644 --- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend | |||
@@ -1,5 +1,5 @@ | |||
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 = "4b687525d2c4785eedbcbd73431bc6d236cb5bc8" |
3 | 3 | ||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" | 4 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" |
5 | 5 | ||
@@ -10,4 +10,5 @@ RDEPENDS:${PN} += " \ | |||
10 | python3-anytree \ | 10 | python3-anytree \ |
11 | python3-six \ | 11 | python3-six \ |
12 | python3-pyyaml \ | 12 | python3-pyyaml \ |
13 | python3-packaging \ | ||
13 | " | 14 | " |
diff --git a/meta-xilinx-core/lib/devtool/boot-jtag.py b/meta-xilinx-core/lib/devtool/boot-jtag.py new file mode 100644 index 00000000..53d70262 --- /dev/null +++ b/meta-xilinx-core/lib/devtool/boot-jtag.py | |||
@@ -0,0 +1,272 @@ | |||
1 | # Copyright (C) 2021-2022, Xilinx, Inc. All rights reserved. | ||
2 | # Copyright (C) 2022-2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # This script uses devtool and creates a boot-jtag.tcl script in | ||
7 | # ${DEPLOY_DIR_IMAGE} directory. This script is executed by xsdb tool to boot | ||
8 | # yocto generated images on HW via jtag boot mode. | ||
9 | |||
10 | import os | ||
11 | import logging | ||
12 | import argparse | ||
13 | from devtool import setup_tinfoil, parse_recipe, DevtoolError | ||
14 | import yaml | ||
15 | import sys | ||
16 | import glob | ||
17 | |||
18 | logger = logging.getLogger('devtool') | ||
19 | |||
20 | def bootjtag(args, config, basepath, workspace): | ||
21 | """Entry point for the devtool 'boot-jtag' subcommand""" | ||
22 | |||
23 | if not args.image: | ||
24 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') | ||
25 | return | ||
26 | |||
27 | # Get required boot variables | ||
28 | tinfoil = setup_tinfoil(basepath=basepath) | ||
29 | try: | ||
30 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') | ||
31 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') | ||
32 | machine = rd.getVar('MACHINE') | ||
33 | arch = rd.getVar('TARGET_ARCH') | ||
34 | soc = rd.getVar("SOC_FAMILY") | ||
35 | soc_variant = rd.getVar("SOC_VARIANT") | ||
36 | ddr_base_addr = rd.getVar('DDR_BASEADDR') | ||
37 | kernel_img_name = rd.getVar('KERNEL_IMAGE') | ||
38 | kernel_load_addr = rd.getVar('KERNEL_LOAD_ADDRESS') | ||
39 | dtb_load_addr = rd.getVar('DEVICETREE_ADDRESS') | ||
40 | rootfs_load_addr = rd.getVar('RAMDISK_IMAGE_ADDRESS') | ||
41 | machine_features = rd.getVar('MACHINE_FEATURES') | ||
42 | boot_mode = rd.getVar('BOOTMODE') | ||
43 | finally: | ||
44 | tinfoil.shutdown() | ||
45 | |||
46 | if not args.hw_server: | ||
47 | print("\nINFO: --hw_server is null so default URL description of hw_server/TCF agent and port number is set to: " + str(args.hw_server)) | ||
48 | |||
49 | print("INFO: HW_SERVER Connected to: " + str(args.hw_server)) | ||
50 | print("INFO: Using DISTRO IMAGE: " + str(args.image)) | ||
51 | |||
52 | # Use arch for MB and SOC Family other devices. | ||
53 | if arch == 'microblazeel': | ||
54 | print("INFO: ARCH: " + arch) | ||
55 | else: | ||
56 | print("INFO: SOC FAMILY: " + soc) | ||
57 | |||
58 | # Load Address of boot.scr in DDR(Except for QSPI/OSPI/NAND boot) | ||
59 | # MB = (DDR base address + DDR Size) - 0xe00000 | ||
60 | # Zynq 7000 = DDR base address + 0x3000000 | ||
61 | # ZynqMP = DDR base address + 0x20000000 | ||
62 | # Versal = DDR base address + 0x20000000 | ||
63 | if arch == 'microblazeel': | ||
64 | # Assuming DDR size is 2GB | ||
65 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x80000000 - 0xe00000) | ||
66 | elif soc == 'zynq': | ||
67 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x3000000) | ||
68 | else: | ||
69 | bootscr_addr = hex(int(ddr_base_addr, 16) + 0x20000000) | ||
70 | |||
71 | print("INFO: MACHINE: " + machine) | ||
72 | |||
73 | if arch != 'microblazeel': | ||
74 | if "fpga-overaly" in machine_features: | ||
75 | print("INFO: fpga-overlay MACHINE_FEATURES is enabled, Hence PL bitstream or PDI will not be loaded at initial boot, User can load from u-boot or linux.") | ||
76 | else: | ||
77 | print("INFO: fpga-overlay MACHINE_FEATURES is not enabled, Hence PL bitstream or PDI will be loaded at initial boot.") | ||
78 | |||
79 | #dictionary with all required artifacts | ||
80 | data = {} | ||
81 | |||
82 | # For MB, Zynq 7000 and ZynqMP. | ||
83 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
84 | if not "fpga-overaly" in machine_features: | ||
85 | data['bit'] = glob.glob(os.path.join(deploy_dir, '*' + machine + '.bit'))[0] | ||
86 | data['uboot'] = os.path.join(deploy_dir, 'u-boot.elf') | ||
87 | data['dtb'] = os.path.join(deploy_dir, machine + '-system.dtb') | ||
88 | |||
89 | if soc == 'zynq' or soc == 'zynqmp': | ||
90 | data['fsbl'] = os.path.join(deploy_dir, 'fsbl-' + machine + '.elf') | ||
91 | |||
92 | if soc == 'zynqmp': | ||
93 | data['atf'] = os.path.join(deploy_dir, 'arm-trusted-firmware.elf') | ||
94 | data['pmufw'] = os.path.join(deploy_dir, 'pmu-firmware-' + machine + '.elf') | ||
95 | |||
96 | if soc == 'versal': | ||
97 | data['bootbin'] = os.path.join(deploy_dir, 'boot.bin') | ||
98 | |||
99 | data['bootscr'] = os.path.join(deploy_dir, 'boot.scr') | ||
100 | data['kernel'] = os.path.join(deploy_dir, kernel_img_name) | ||
101 | |||
102 | if not args.norootfs: | ||
103 | data['rfs'] = os.path.join(deploy_dir, args.image + '-' + machine + '.cpio.gz.u-boot') | ||
104 | |||
105 | # Check if all the required boot images exists | ||
106 | for key in data: | ||
107 | if not os.path.isfile(data[key]): | ||
108 | print('INFO:' + key + ' does not exist.') | ||
109 | print('INFO: Please make sure you have run: \n\'MACHINE=' + machine + ' devtool build-image ' + args.image + '\'') | ||
110 | return | ||
111 | |||
112 | # Enable verbose mode | ||
113 | if args.verbose: | ||
114 | print("The following artifacts are being loaded:") | ||
115 | for key in data: | ||
116 | print('INFO: ' + key + ": " + data[key]) | ||
117 | |||
118 | # Start writing xsdb script | ||
119 | lines = [] | ||
120 | lines.append('# Run \'xsdb ' + deploy_dir + '/boot-jtag.tcl\' to execute this script.') | ||
121 | lines.append('connect -url ' + args.hw_server) | ||
122 | |||
123 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
124 | lines.append('for {set i 0} {$i < 20} {incr i} {') | ||
125 | lines.append(' if { [ta] != "" } break;') | ||
126 | lines.append(' after 50') | ||
127 | lines.append('}') | ||
128 | if not "fpga-overaly" in machine_features: | ||
129 | lines.append('') | ||
130 | lines.append('puts stderr "INFO: Configuring the PL ..."') | ||
131 | lines.append('puts stderr "INFO: Downloading bitstream: ' + data['bit'] + '"') | ||
132 | lines.append('fpga -no-revision-check \"' + data['bit'] + '\"') | ||
133 | |||
134 | if soc == 'zynqmp': | ||
135 | # Disable Security gates to view PMU MB target | ||
136 | lines.append('') | ||
137 | lines.append('targets -set -nocase -filter {name =~ \"*PSU*\"}') | ||
138 | |||
139 | # By default, JTAG security gates are enabled. This disables security gates for DAP, PLTAP and PMU. | ||
140 | lines.append('mask_write 0xFFCA0038 0x1C0 0x1C0') | ||
141 | lines.append('targets -set -nocase -filter {name =~ \"*MicroBlaze PMU*\"}') | ||
142 | lines.append('') | ||
143 | |||
144 | # Check if the target is already stopped or cannot be stopped. | ||
145 | lines.append('catch {stop}; after 1000') | ||
146 | lines.append('') | ||
147 | |||
148 | # Download the pmufw.elf and run PMUFW | ||
149 | lines.append('puts stderr "INFO: Downloading PMUFW ELF file: ' + data['pmufw'] + '"') | ||
150 | lines.append('dow \"' + data['pmufw'] + '\"') | ||
151 | lines.append('con') | ||
152 | |||
153 | # Select A53 Core 0 to load and run FSBL | ||
154 | lines.append('targets -set -nocase -filter {name =~ \"*A53*#0\"}') | ||
155 | |||
156 | # Reset A53, If the reset is being triggered after powering on the device, | ||
157 | # write bootloop at reset vector address (0xffff0000), or use | ||
158 | # -clear-registers option, to avoid unpredictable behavior. | ||
159 | # Further warnings will be suppressed | ||
160 | lines.append('rst -processor -clear-registers') | ||
161 | lines.append('') | ||
162 | elif soc == 'versal': | ||
163 | # Download boot.bin to versal device | ||
164 | lines.append('targets -set -nocase -filter {name =~ \"*PMC*\"}') | ||
165 | lines.append('puts stderr "INFO: Downloading BOOT bin file: ' + data['bootbin'] + '"') | ||
166 | lines.append('device program \"' + data['bootbin'] + '\"') | ||
167 | lines.append('') | ||
168 | |||
169 | if soc_variant == 'net': | ||
170 | lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}') | ||
171 | else: | ||
172 | lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}') | ||
173 | |||
174 | lines.append('stop') | ||
175 | lines.append('') | ||
176 | lines.append('targets -set -nocase -filter {name =~ \"*Versal*\"}') | ||
177 | elif soc == 'zynq': | ||
178 | lines.append('targets -set -nocase -filter {name =~ \"arm*#0\"}') | ||
179 | # Check if the target is already stopped or cannot be stopped. | ||
180 | lines.append('catch {stop}; after 1000') | ||
181 | lines.append('') | ||
182 | else: | ||
183 | lines.append('targets -set -nocase -filter {name =~ \"microblaze*#0\"}') | ||
184 | # Check if the target is already stopped or cannot be stopped. | ||
185 | lines.append('catch {stop}; after 1000') | ||
186 | lines.append('') | ||
187 | |||
188 | |||
189 | if soc == 'zynq' or soc == 'zynqmp': | ||
190 | # Download FSBL for Zynq 7000 and ZynqMP | ||
191 | lines.append('puts stderr "INFO: Downloading FSBL ELF file: ' + data['fsbl'] + '"') | ||
192 | lines.append('dow \"' + data['fsbl'] + '\"') | ||
193 | lines.append('con') | ||
194 | lines.append('after 4000; stop') | ||
195 | lines.append('') | ||
196 | |||
197 | # Download U-boot and DTB for MB, Zynq 7000 and ZynqMP | ||
198 | if arch == 'microblazeel' or soc == 'zynq' or soc == 'zynqmp': | ||
199 | lines.append('puts stderr "INFO: Downloading U-boot ELF file: ' + data['uboot'] + '"') | ||
200 | lines.append('dow \"' + data['uboot'] + '\"') | ||
201 | lines.append('') | ||
202 | # For MB and Zynq 7000 we need to connect and stop before loading | ||
203 | # kernel images | ||
204 | if soc != 'zynqmp': | ||
205 | lines.append('con') | ||
206 | lines.append('after 1000; stop') | ||
207 | lines.append('puts stderr "INFO: Downloading DTB file: ' + data['dtb'] + ' at ' + dtb_load_addr + '"') | ||
208 | lines.append('dow -data \"' + data['dtb'] + '\" ' + dtb_load_addr) | ||
209 | lines.append('') | ||
210 | |||
211 | # Download Trusted Firmware-A(TF-A) for ZynqMP | ||
212 | # Note: TF-A elf should be loaded after u-boot elf in JTAG boot mode else | ||
213 | # TF-A elf will not be loaded. | ||
214 | if soc == 'zynqmp': | ||
215 | lines.append('puts stderr "INFO: Downloading Trusted Firmware-A(TF-A) ELF file: ' + data['atf'] + '"') | ||
216 | lines.append('dow \"' + data['atf'] + '\"') | ||
217 | lines.append('') | ||
218 | |||
219 | # If BOOTMODE is xen then boot till u-boot only. | ||
220 | # Download Kernel Image for all architecture | ||
221 | if boot_mode != 'xen': | ||
222 | lines.append('puts stderr "INFO: Downloading Kernel Image file: ' + data['kernel'] + ' at ' + kernel_load_addr + '"') | ||
223 | lines.append('dow -data \"' + data['kernel'] + '\" ' + kernel_load_addr) | ||
224 | lines.append('') | ||
225 | |||
226 | # Download Rootfs | ||
227 | if not args.norootfs and boot_mode != 'xen': | ||
228 | lines.append('puts stderr "INFO: Downloading Rootfs file: ' + data['rfs'] + ' at ' + rootfs_load_addr + '"') | ||
229 | lines.append('dow -data \"' + data['rfs'] + '\" ' + rootfs_load_addr) | ||
230 | lines.append('') | ||
231 | |||
232 | lines.append('puts stderr "INFO: Downloading U-boot boot script: ' + data['bootscr'] + ' at ' + bootscr_addr + '"') | ||
233 | lines.append('dow -data \"' + data['bootscr'] + '\" ' + bootscr_addr) | ||
234 | lines.append('') | ||
235 | |||
236 | # Select A72 Core 0 to load and run Versal images | ||
237 | if soc == 'versal': | ||
238 | if soc_variant == 'net': | ||
239 | lines.append('targets -set -nocase -filter {name =~ \"*A78*#0\"}') | ||
240 | else: | ||
241 | lines.append('targets -set -nocase -filter {name =~ \"*A72*#0\"}') | ||
242 | |||
243 | lines.append('con') | ||
244 | lines.append('exit\n') | ||
245 | |||
246 | script = os.path.join(deploy_dir, "boot-jtag.tcl") | ||
247 | with open(script, "w") as f: | ||
248 | f.write('\n'.join(lines)) | ||
249 | |||
250 | print('INFO: HW JTAG boot tcl script written to '+ script + "\n" \ | ||
251 | + 'INFO: User can run \'xsdb ' + script + '\' to execute.') | ||
252 | |||
253 | return 0 | ||
254 | |||
255 | def register_commands(subparsers, context): | ||
256 | """Register devtool subcommands from this plugin""" | ||
257 | parser_bootjtag = subparsers.add_parser('boot-jtag', | ||
258 | help='Script to deploy target images on HW via JTAG boot mode.', | ||
259 | description='Script to deploy target images on HW via JTAG boot mode. \ | ||
260 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') | ||
261 | required = parser_bootjtag.add_argument_group('required arguments') | ||
262 | required.add_argument('--image', | ||
263 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') | ||
264 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', | ||
265 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ | ||
266 | Example: --hw_server TCP:puffball12:3121') | ||
267 | |||
268 | parser_bootjtag.add_argument('-v', '--verbose', | ||
269 | help='verbose mode', action="store_true") | ||
270 | parser_bootjtag.add_argument('-n', '--norootfs', | ||
271 | help='Don\'t include rootfs', action='store_true') | ||
272 | parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True) | ||
diff --git a/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb b/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb new file mode 100644 index 00000000..f7e18273 --- /dev/null +++ b/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb | |||
@@ -0,0 +1,29 @@ | |||
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://${WORKDIR}/git/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 = "a68308f329578d3585fd335071a9184aa7f46d2e" | ||
12 | |||
13 | RDEPENDS:${PN} += "freeipmi" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | |||
21 | PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" | ||
22 | |||
23 | # Force the make system to use the flags we want! | ||
24 | EXTRA_OEMAKE = 'CC="${CC} ${TARGET_CFLAGS} ${TARGET_LDFLAGS}" all' | ||
25 | |||
26 | do_install () { | ||
27 | install -d ${D}${bindir} | ||
28 | install -m 0755 ${S}/image_update ${D}${bindir}/ | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb index f86c5985..f86c5985 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc index 11059465..0541a7a3 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt.inc | |||
@@ -2,8 +2,8 @@ SECTION = "libs" | |||
2 | 2 | ||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | 3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" |
4 | 4 | ||
5 | BRANCH ?= "xlnx_rel_v2023.2" | 5 | BRANCH ?= "main-aie" |
6 | SRCREV ?= "84debe5d22c144fb09269b8410df4cb8a6aa3b2a" | 6 | SRCREV ?= "5621d74d5efa99fdddd9eca47de3294804c62c24" |
7 | 7 | ||
8 | LICENSE = "BSD-3-Clause" | 8 | LICENSE = "BSD-3-Clause" |
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | 9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" |
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb index 2c6c9cd1..2c6c9cd1 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb | |||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb new file mode 100644 index 00000000..fee8e069 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | ATF_VERSION = "2.10" | ||
2 | SRCREV = "4f82b6134e7b43722616c855e5016d42a3ea26d2" | ||
3 | BRANCH = "xlnx_rebase_v2.10" | ||
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/bootbin/bootbin-version-header.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb new file mode 100644 index 00000000..98eebc3e --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb | |||
@@ -0,0 +1,54 @@ | |||
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_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 ''}" | ||
13 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" | ||
14 | BOOTBIN_VER_MAX_LEN = "36" | ||
15 | |||
16 | BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | ||
17 | |||
18 | inherit deploy image-artifact-names | ||
19 | |||
20 | python do_configure() { | ||
21 | if d.getVar("BOOTBIN_VER_SUFFIX"): | ||
22 | version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX") | ||
23 | |||
24 | if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")): | ||
25 | bb.error("version string too long") | ||
26 | |||
27 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: | ||
28 | f.write(version.encode("utf-8").hex()) | ||
29 | |||
30 | with open(d.expand("${B}/${BOOTBIN_MANIFEST_FILE}"), "w") as f: | ||
31 | f.write("* %s\n" % d.getVar('PN')) | ||
32 | f.write("VERSION: %s\n" % version) | ||
33 | f.write("PV: %s\n" % d.getVar('PV')) | ||
34 | f.write("XILINX_VER_MAIN: %s\n" % d.getVar('XILINX_VER_MAIN')) | ||
35 | f.write("XILINX_VER_UPDATE: %s\n" % d.getVar('XILINX_VER_UPDATE')) | ||
36 | f.write("XILINX_VER_BUILD: %s\n\n" % d.getVar('XILINX_VER_BUILD')) | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | install -d ${D}/boot | ||
41 | install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${D}/boot/ | ||
42 | } | ||
43 | |||
44 | do_deploy() { | ||
45 | install -m 0644 ${B}/${BOOTBIN_VER_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.txt | ||
46 | ln -s ${IMAGE_NAME}.txt ${DEPLOYDIR}/${IMAGE_LINK_NAME}.txt | ||
47 | install -m 0644 ${B}/${BOOTBIN_MANIFEST_FILE} ${DEPLOYDIR}/${IMAGE_NAME}.manifest | ||
48 | ln -s ${IMAGE_NAME}.manifest ${DEPLOYDIR}/${IMAGE_LINK_NAME}.manifest | ||
49 | } | ||
50 | |||
51 | addtask deploy after do_compile | ||
52 | |||
53 | SYSROOT_DIRS += "/boot" | ||
54 | FILES:${PN} += "/boot/${BOOTBIN_VER_FILE}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 8d7211f5..1f8ae2e3 100644 --- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb | |||
@@ -23,7 +23,7 @@ inherit devicetree image-artifact-names | |||
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 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" |
27 | 27 | ||
28 | EXTRA_DT_FILES ?= "" | 28 | EXTRA_DT_FILES ?= "" |
29 | EXTRA_DTFILE_PREFIX ?= "system-top" | 29 | EXTRA_DTFILE_PREFIX ?= "system-top" |
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb new file mode 100644 index 00000000..b0acf0ef --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.1.bb | |||
@@ -0,0 +1,72 @@ | |||
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 = "master" | ||
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 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit cmake update-rc.d systemd | ||
24 | |||
25 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" | ||
26 | RDEPENDS:${PN} += " freeipmi" | ||
27 | EXTRA_OECMAKE += " \ | ||
28 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
29 | " | ||
30 | |||
31 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
32 | INITSCRIPT_PARAMS = "start 99 S ." | ||
33 | |||
34 | SYSTEMD_PACKAGES="${PN}" | ||
35 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
36 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
37 | |||
38 | |||
39 | do_install(){ | ||
40 | install -d ${D}${bindir} | ||
41 | install -d ${D}${libdir} | ||
42 | install -d ${D}${includedir} | ||
43 | install -d ${D}${base_libdir}/firmware/xilinx | ||
44 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
45 | |||
46 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
47 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
48 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
49 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
50 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
51 | |||
52 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
53 | |||
54 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
55 | |||
56 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
57 | install -d ${D}${sysconfdir}/init.d/ | ||
58 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
59 | fi | ||
60 | |||
61 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
62 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
63 | |||
64 | install -d ${D}${systemd_system_unitdir} | ||
65 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
66 | } | ||
67 | |||
68 | PACKAGES =+ "libdfx-mgr" | ||
69 | |||
70 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
71 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
72 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c b/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c index 04777a91..281e1828 100644 --- a/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c +++ b/meta-xilinx-core/recipes-bsp/fpga-manager-script/files/fpgautil.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved. | 3 | * Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved. |
4 | * Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved. | 4 | * Copyright (C) 2022-2024 Advanced Micro Devices, Inc. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of | 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of |
7 | * this software and associated documentation files (the "Software"), to deal in | 7 | * this software and associated documentation files (the "Software"), to deal in |
@@ -75,6 +75,20 @@ int fpga_getplatform() | |||
75 | 75 | ||
76 | } | 76 | } |
77 | 77 | ||
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..b9a36d77 100644 --- a/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/fpga-manager-script/fpga-manager-script_1.0.bb | |||
@@ -1,7 +1,7 @@ | |||
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://${WORKDIR}/fpgautil.c;beginline=1;endline=24;md5=0dbf04c2c1026b3d120136e728b7a09f" |
5 | 5 | ||
6 | SRC_URI = "\ | 6 | SRC_URI = "\ |
7 | file://fpgautil.c \ | 7 | file://fpgautil.c \ |
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb new file mode 100644 index 00000000..0cbcaac7 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.1.bb | |||
@@ -0,0 +1,23 @@ | |||
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 ?= "master" | ||
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 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
22 | # so updates will work properly. | ||
23 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch b/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch deleted file mode 100644 index 7091098c..00000000 --- a/meta-xilinx-core/recipes-bsp/u-boot/files/0001-Remove-redundant-YYLOC-global-declaration.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
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_2024.1.bb index fe5ecf79..590d1755 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | require u-boot-tools-xlnx.inc | 1 | require u-boot-tools-xlnx.inc |
2 | require u-boot-xlnx-2023.1.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-v2024.01/microblaze-generic.cfg b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg new file mode 100644 index 00000000..033fb197 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg | |||
@@ -0,0 +1,83 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | #........................................................................ | ||
4 | # WARNING | ||
5 | # | ||
6 | # This file is a u-boot configuration fragment, and not a full u-boot | ||
7 | # configuration file. The final u-boot configuration is made up of | ||
8 | # an assembly of processed fragments, each of which is designed to | ||
9 | # capture a specific part of the final configuration (e.g. platform | ||
10 | # configuration, feature configuration, and board specific hardware | ||
11 | # configuration). For more information on u-boot configuration, please | ||
12 | # refer the product documentation. | ||
13 | # | ||
14 | #....................................................................... | ||
15 | |||
16 | # | ||
17 | # Definitions for Generic Microbalze machine. | ||
18 | # | ||
19 | CONFIG_BOOTDELAY=4 | ||
20 | CONFIG_TEXT_BASE=0x80100000 | ||
21 | CONFIG_SYS_PROMPT="U-Boot>" | ||
22 | CONFIG_SYS_CONFIG_NAME="microblaze-generic" | ||
23 | CONFIG_BOOT_SCRIPT_OFFSET=0x1F00000 | ||
24 | # CONFIG_SYS_NS16550 is not set | ||
25 | # CONFIG_SYS_FLASH_USE_BUFFER_WRITE is not set | ||
26 | # CONFIG_SYS_FLASH_CFI is not set | ||
27 | # CONFIG_FLASH_CFI_DRIVER is not set | ||
28 | # CONFIG_CMD_FLASH is not set | ||
29 | # CONFIG_CMD_IMLS is not set | ||
30 | # CONFIG_MTD_NOR_FLASH is not set | ||
31 | # CONFIG_MTD_DEVICE is not set | ||
32 | # CONFIG_SYS_FLASH_PROTECTION is not set | ||
33 | # CONFIG_SPI_FLASH_SST is not set | ||
34 | # CONFIG_XILINX_EMACLITE is not set | ||
35 | # CONFIG_PHY_VITESSE is not set | ||
36 | # CONFIG_CMD_EXT2 is not set | ||
37 | # CONFIG_CMD_EXT4 is not set | ||
38 | # CONFIG_CMD_EXT4_WRITE is not set | ||
39 | # CONFIG_CMD_FAT is not set | ||
40 | # CONFIG_DOS_PARTITION is not set | ||
41 | # CONFIG_FAT_WRITE is not set | ||
42 | CONFIG_DM=y | ||
43 | CONFIG_SYS_MALLOC_F=y | ||
44 | CONFIG_XILINX_UARTLITE=y | ||
45 | CONFIG_XILINX_AXIEMAC=y | ||
46 | CONFIG_PHY_XILINX=y | ||
47 | CONFIG_PHY_TI=y | ||
48 | CONFIG_NET=y | ||
49 | CONFIG_PHY_GIGE=y | ||
50 | CONFIG_NETDEVICES=y | ||
51 | CONFIG_CMD_NET=y | ||
52 | CONFIG_DM_ETH=y | ||
53 | CONFIG_CMD_PING=y | ||
54 | CONFIG_CMD_DHCP=y | ||
55 | CONFIG_PHYLIB=y | ||
56 | CONFIG_CMD_TFTPPUT=y | ||
57 | CONFIG_CMD_NFS=y | ||
58 | CONFIG_CMD_MII=y | ||
59 | CONFIG_PHY_MARVELL=y | ||
60 | CONFIG_PHY_REALTEK=y | ||
61 | CONFIG_PHY_NATSEMI=y | ||
62 | CONFIG_XILINX_SPI=y | ||
63 | CONFIG_CMD_SPI=y | ||
64 | CONFIG_CMD_SF=y | ||
65 | CONFIG_SPI_FLASH=y | ||
66 | CONFIG_SPI_FLASH_BAR=y | ||
67 | CONFIG_DM_SPI_FLASH=y | ||
68 | CONFIG_DM_SPI=y | ||
69 | CONFIG_SPI_FLASH_SPANSION=y | ||
70 | CONFIG_SPI_FLASH_STMICRO=y | ||
71 | CONFIG_SPI_FLASH_WINBOND=y | ||
72 | CONFIG_SPI_FLASH_MACRONIX=y | ||
73 | CONFIG_SPI=y | ||
74 | CONFIG_SPI_FLASH_ISSI=y | ||
75 | # CONFIG_BOOTARGS is not set | ||
76 | # CONFIG_USE_BOOTARGS is not set | ||
77 | # CONFIG_SPL is not set | ||
78 | # CONFIG_I2C_EEPROM is not set | ||
79 | # CONFIG_CMD_EEPROM is not set | ||
80 | # CONFIG_SYS_I2C_EEPROM_ADDR is not set | ||
81 | # CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW is not set | ||
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-2024.1.inc index 72f43f71..56d65113 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc | |||
@@ -1,8 +1,8 @@ | |||
1 | UBOOT_VERSION = "v2023.01" | 1 | UBOOT_VERSION = "v2024.01" |
2 | 2 | ||
3 | UBRANCH = "xlnx_rebase_v2023.01_update" | 3 | UBRANCH = "xlnx_rebase_v2024.01" |
4 | 4 | ||
5 | SRCREV = "1689570b68dd3827e527a520805aa0bb7f58ee09" | 5 | SRCREV = "19348a61f408d61afd7997adf511895d87b0d3ac" |
6 | 6 | ||
7 | LICENSE = "GPL-2.0-or-later" | 7 | LICENSE = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | 8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc index 2ef7b9cf..57c00c6e 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-microblaze.inc | |||
@@ -1,11 +1,6 @@ | |||
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..c3af0185 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb | |||
@@ -65,6 +65,7 @@ UBOOTPXE_CONFIG ?= "pxelinux.cfg" | |||
65 | UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}" | 65 | UBOOTPXE_CONFIG_NAME = "${UBOOTPXE_CONFIG}${IMAGE_VERSION_SUFFIX}" |
66 | 66 | ||
67 | DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}" | 67 | DEVICETREE_ADDRESS ?= "${@append_baseaddr(d,d.getVar('DEVICETREE_OFFSET'))}" |
68 | DEVICETREE_ADDRESS_SD ?= "${DEVICETREE_ADDRESS}" | ||
68 | 69 | ||
69 | DEVICETREE_OFFSET:microblaze ??= "0x1e00000" | 70 | DEVICETREE_OFFSET:microblaze ??= "0x1e00000" |
70 | DEVICETREE_OFFSET:zynqmp ??= "0x100000" | 71 | DEVICETREE_OFFSET:zynqmp ??= "0x100000" |
@@ -214,6 +215,7 @@ do_compile() { | |||
214 | -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \ | 215 | -e 's/@@KERNEL_LOAD_ADDRESS@@/${KERNEL_LOAD_ADDRESS}/' \ |
215 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ | 216 | -e 's/@@DEVICE_TREE_NAME@@/${DEVICE_TREE_NAME}/' \ |
216 | -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \ | 217 | -e 's/@@DEVICETREE_ADDRESS@@/${DEVICETREE_ADDRESS}/' \ |
218 | -e 's/@@DEVICETREE_ADDRESS_SD@@/${DEVICETREE_ADDRESS_SD}/' \ | ||
217 | -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \ | 219 | -e 's/@@DEVICETREE_OVERLAY_ADDRESS@@/${DEVICETREE_OVERLAY_ADDRESS}/' \ |
218 | -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \ | 220 | -e 's/@@RAMDISK_IMAGE@@/${RAMDISK_IMAGE}/' \ |
219 | -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \ | 221 | -e 's/@@RAMDISK_IMAGE_ADDRESS@@/${RAMDISK_IMAGE_ADDRESS}/' \ |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic index d99932ed..e09bdfa9 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic | |||
@@ -39,25 +39,25 @@ do | |||
39 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; | 39 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; |
40 | fi | 40 | fi |
41 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | 41 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then |
42 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | 42 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS_SD@@ system.dtb; |
43 | setenv fdtcontroladdr @@DEVICETREE_ADDRESS@@ | 43 | setenv fdtcontroladdr @@DEVICETREE_ADDRESS_SD@@ |
44 | fi | 44 | fi |
45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then | 45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then |
46 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; | 46 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; |
47 | fdt addr @@DEVICETREE_ADDRESS@@ | 47 | fdt addr @@DEVICETREE_ADDRESS_SD@@ |
48 | fdt resize 8192 | 48 | fdt resize 8192 |
49 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ | 49 | fdt apply @@DEVICETREE_OVERLAY_ADDRESS@@ |
50 | fi | 50 | fi |
51 | run update_bootargs | 51 | run update_bootargs |
52 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | 52 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then |
53 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | 53 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
54 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 54 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@ |
55 | fi | 55 | fi |
56 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then | 56 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then |
57 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; | 57 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; |
58 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | 58 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS_SD@@ |
59 | fi | 59 | fi |
60 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS@@ | 60 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ - @@DEVICETREE_ADDRESS_SD@@ |
61 | fi | 61 | fi |
62 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | 62 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "xspi1" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then |
63 | sf probe 0 0 0; | 63 | sf probe 0 0 0; |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal index d726187a..36a8f92d 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.sd.versal | |||
@@ -1,7 +1,7 @@ | |||
1 | @@PRE_BOOTENV@@ | 1 | @@PRE_BOOTENV@@ |
2 | 2 | ||
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-uenv.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb index 228396eb..1efc5392 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb | |||
@@ -83,7 +83,7 @@ DEPENDS:append := " virtual/kernel ${@remove_task_from_depends(d)}" | |||
83 | 83 | ||
84 | # bootargs, default to booting with the rootfs device being partition 2 | 84 | # bootargs, default to booting with the rootfs device being partition 2 |
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" |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc index 4c7ea934..bd9711f5 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx.inc | |||
@@ -7,7 +7,7 @@ require u-boot-xlnx-common.inc | |||
7 | 7 | ||
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 | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb index fd76bc51..718ad9d4 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb | |||
@@ -1,4 +1,4 @@ | |||
1 | 1 | ||
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-2023.1.inc | 4 | require u-boot-xlnx-2024.1.inc |
diff --git a/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb b/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb new file mode 100644 index 00000000..334b786b --- /dev/null +++ b/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | SUMMARY = "A general purpose TCP-IP emulator" | ||
2 | DESCRIPTION = "A general purpose TCP-IP emulator used by virtual machine hypervisors to provide virtual networking services." | ||
3 | HOMEPAGE = "https://gitlab.freedesktop.org/slirp/libslirp" | ||
4 | LICENSE = "BSD-3-Clause & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727" | ||
6 | |||
7 | SRC_URI = "git://gitlab.freedesktop.org/slirp/libslirp.git;protocol=https;branch=master" | ||
8 | SRCREV = "3ad1710a96678fe79066b1469cead4058713a1d9" | ||
9 | PV = "4.7.0" | ||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | DEPENDS = " \ | ||
13 | glib-2.0 \ | ||
14 | " | ||
15 | |||
16 | inherit meson pkgconfig | ||
17 | |||
18 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch index 370e694b..1dcac990 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch +++ b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | |||
@@ -13,58 +13,77 @@ mach_path = tempfile.mkdtemp() | |||
13 | 13 | ||
14 | # Separate PMU and APU arguments | 14 | # Separate PMU and APU arguments |
15 | APU_args = sys.argv[1:] | 15 | APU_args = sys.argv[1:] |
16 | mbtype='' | 16 | PMU_args = [] |
17 | PLM_args = [] | ||
17 | 18 | ||
18 | if '-pmu-args' in APU_args: | 19 | if '-pmu-args' in APU_args: |
19 | MB_args = APU_args[APU_args.index('-pmu-args')+1] | 20 | pmu_args_idx = APU_args.index('-pmu-args') |
20 | APU_args.remove('-pmu-args') | 21 | PMU_args = APU_args[pmu_args_idx+1].split() |
21 | APU_args.remove(MB_args) | 22 | del APU_args[pmu_args_idx:pmu_args_idx+2] |
22 | MB_args = MB_args.split() | 23 | |
23 | PMU_rom = MB_args[MB_args.index('-kernel')+1] | 24 | if '-plm-args' in APU_args: |
24 | mbtype='PMU' | 25 | plm_args_idx = APU_args.index('-plm-args') |
25 | elif '-plm-args' in APU_args: | 26 | PLM_args = APU_args[plm_args_idx+1].split() |
26 | MB_args = APU_args[APU_args.index('-plm-args')+1] | 27 | del APU_args[plm_args_idx:plm_args_idx+2] |
27 | APU_args.remove('-plm-args') | 28 | |
28 | APU_args.remove(MB_args) | 29 | if PMU_args and PLM_args: |
29 | MB_args = MB_args.split() | 30 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") |
30 | mbtype='PLM' | 31 | |
31 | elif '--help' in APU_args: | 32 | if ('--help' in APU_args) or (not PMU_args and not PLM_args): |
32 | mbtype='help' | 33 | print("AMD FPGA QEMU multiarch wrapper\n") |
33 | else: | 34 | print("Version 2024.1") |
34 | error_msg = '\nMultiarch not setup properly.' | 35 | print("") |
35 | sys.exit(error_msg) | 36 | print("Usage:") |
36 | 37 | print(" %s <APU options> [-pmu-args <pmu options>]" % (sys.argv[0])) | |
37 | error_msg = None | 38 | print(" %s <APU options> [-plm-args <plm options>]" % (sys.argv[0])) |
38 | if (mbtype == 'PMU' and os.path.exists(PMU_rom)) or mbtype == 'PLM': | 39 | print("") |
39 | 40 | sys.exit(1) | |
40 | # We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly | 41 | |
41 | tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s] | 42 | if PMU_args: |
42 | 43 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | |
43 | #NEED TO FIX for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream | ||
44 | # We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is | ||
45 | if len(tcp_serial_ports) == 2: | ||
46 | APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]] | ||
47 | |||
48 | mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(MB_args) + ' -machine-path ' + mach_path | ||
49 | apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path | ||
50 | |||
51 | # Debug prints | ||
52 | print('\n%s instance cmd: %s\n' % (mbtype, mb_cmd)) | ||
53 | print('APU instance cmd: %s\n' % apu_cmd) | ||
54 | |||
55 | |||
56 | # Invoke QEMU pmu instance | ||
57 | process_pmu = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE) | ||
58 | |||
59 | # Invoke QEMU APU instance | ||
60 | process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE) | ||
61 | if process_apu.wait(): | ||
62 | error_msg = '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode() | ||
63 | 44 | ||
64 | else: | 45 | if not os.path.exists(PMU_rom): |
65 | if mbtype == 'PMU': | ||
66 | error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom | 46 | error_msg = '\nError: Missing PMU ROM: %s' % PMU_rom |
67 | error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n' | 47 | error_msg += '\nSee "meta-xilinx/README.qemu.md" for more information on accquiring the PMU ROM.\n' |
48 | sys.exit(error_msg) | ||
49 | |||
50 | # We need to switch tcp serial arguments (if they exist, e.g. qemurunner) to get the output correctly | ||
51 | tcp_serial_ports = [i for i, s in enumerate(APU_args) if 'tcp:127.0.0.1:' in s] | ||
52 | |||
53 | #NEED TO FIX for next yocto release (dont need to switch ports anymore, they will be provided correctly upstream | ||
54 | # We can only switch these if there are exactly two, otherwise we can't assume what is being executed so we leave it as is | ||
55 | if len(tcp_serial_ports) == 2: | ||
56 | APU_args[tcp_serial_ports[0]],APU_args[tcp_serial_ports[1]] = APU_args[tcp_serial_ports[1]],APU_args[tcp_serial_ports[0]] | ||
57 | |||
58 | mb_cmd = "" | ||
59 | if PMU_args: | ||
60 | mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(PMU_args) + ' -machine-path ' + mach_path | ||
61 | |||
62 | print("PMU instance cmd: %s\n" % mb_cmd) | ||
63 | |||
64 | if PLM_args: | ||
65 | mb_cmd = binpath + '/qemu-system-microblazeel ' + ' '.join(PLM_args) + ' -machine-path ' + mach_path | ||
66 | |||
67 | print("PLM instance cmd: %s\n" % mb_cmd) | ||
68 | |||
69 | apu_cmd = binpath + '/qemu-system-aarch64 ' + ' '.join(APU_args) + ' -machine-path ' + mach_path | ||
70 | |||
71 | print("APU instance cmd: %s\n" % apu_cmd) | ||
72 | |||
73 | |||
74 | if mb_cmd: | ||
75 | process_mb = subprocess.Popen(mb_cmd, shell=True, stderr=subprocess.PIPE) | ||
76 | |||
77 | if apu_cmd: | ||
78 | process_apu = subprocess.Popen(apu_cmd, shell=True, stderr=subprocess.PIPE) | ||
79 | |||
80 | error_msg = "" | ||
81 | if apu_cmd and process_apu.wait(): | ||
82 | # We only check for failures on the MB instance if APU fails | ||
83 | error_msg += '\nQEMU APU instance failed:\n%s' % process_apu.stderr.read().decode() | ||
84 | |||
85 | if mb_cmd and process_mb.wait(): | ||
86 | error_msg += '\nQEMU MB instance failed:\n%s' % process_mb.stderr.read().decode() | ||
68 | 87 | ||
69 | shutil.rmtree(mach_path) | 88 | shutil.rmtree(mach_path) |
70 | sys.exit(error_msg) | 89 | sys.exit(error_msg) |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc new file mode 100644 index 00000000..5154e247 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc | |||
@@ -0,0 +1,290 @@ | |||
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 ${WORKDIR}/qemu-guest-agent.init ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
152 | sed -i 's:@bindir@:${bindir}:' ${D}${sysconfdir}/init.d/qemu-guest-agent | ||
153 | |||
154 | install -d ${D}${sysconfdir}/udev/rules.d/ | ||
155 | install -m 0644 ${WORKDIR}/qemu-guest-agent.udev ${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules | ||
156 | |||
157 | install -d ${D}${systemd_unitdir}/system/ | ||
158 | install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service ${D}${systemd_unitdir}/system | ||
159 | sed -i -e 's,-/usr/bin/,-${bindir}/,g' ${D}${systemd_unitdir}/system/qemu-guest-agent.service | ||
160 | fi | ||
161 | # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text | ||
162 | rm ${D}${datadir}/qemu/s390-netboot.img -f | ||
163 | # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text [textrel] | ||
164 | rm ${D}${datadir}/qemu/s390-ccw.img -f | ||
165 | } | ||
166 | |||
167 | # The following fragment will create a wrapper for qemu-mips user emulation | ||
168 | # binary in order to work around a segmentation fault issue. Basically, by | ||
169 | # default, the reserved virtual address space for 32-on-64 bit is set to 4GB. | ||
170 | # This will trigger a MMU access fault in the virtual CPU. With this change, | ||
171 | # the qemu-mips works fine. | ||
172 | # IMPORTANT: This piece needs to be removed once the root cause is fixed! | ||
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-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch new file mode 100644 index 00000000..c6550801 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From de64af82950a6908f9407dfc92b83c17e2af3eab Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
3 | Date: Fri, 28 Mar 2014 17:42:43 +0800 | ||
4 | Subject: [PATCH 01/12] qemu: Add addition environment space to boot loader | ||
5 | qemu-system-mips | ||
6 | |||
7 | Upstream-Status: Inappropriate - OE uses deep paths | ||
8 | |||
9 | If you create a project with very long directory names like 128 characters | ||
10 | deep and use NFS, the kernel arguments will be truncated. The kernel will | ||
11 | accept longer strings such as 1024 bytes, but the qemu boot loader defaulted | ||
12 | to only 256 bytes. This patch expands the limit. | ||
13 | |||
14 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
15 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
16 | |||
17 | --- | ||
18 | hw/mips/malta.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | Index: qemu-8.0.0/hw/mips/malta.c | ||
22 | =================================================================== | ||
23 | --- qemu-8.0.0.orig/hw/mips/malta.c | ||
24 | +++ qemu-8.0.0/hw/mips/malta.c | ||
25 | @@ -64,7 +64,7 @@ | ||
26 | #define ENVP_PADDR 0x2000 | ||
27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) | ||
28 | #define ENVP_NB_ENTRIES 16 | ||
29 | -#define ENVP_ENTRY_SIZE 256 | ||
30 | +#define ENVP_ENTRY_SIZE 1024 | ||
31 | |||
32 | /* Hardware addresses */ | ||
33 | #define FLASH_ADDRESS 0x1e000000ULL | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch new file mode 100644 index 00000000..ceae67be --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch | |||
@@ -0,0 +1,355 @@ | |||
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/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch new file mode 100644 index 00000000..e85f8202 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From dc2a8ccd440ee3741b61606eafed3f7e092f4312 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Tue, 26 Feb 2013 11:43:28 -0500 | ||
4 | Subject: [PATCH 03/12] apic: fixup fallthrough to PIC | ||
5 | |||
6 | Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC | ||
7 | interrupts through the local APIC if the local APIC config says so.] | ||
8 | missed a check to ensure the local APIC is enabled. Since if the local | ||
9 | APIC is disabled it doesn't matter what the local APIC config says. | ||
10 | |||
11 | If this check isn't done and the guest has disabled the local APIC the | ||
12 | guest will receive a general protection fault, similar to what is seen | ||
13 | here: | ||
14 | |||
15 | https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html | ||
16 | |||
17 | The GPF is caused by an attempt to service interrupt 0xffffffff. This | ||
18 | comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr() | ||
19 | (with the local APIC disabled apic_get_interrupt() returns -1). | ||
20 | apic_accept_pic_intr() returns 0 and thus the interrupt number which | ||
21 | is returned from cpu_get_pic_interrupt(), and which is attempted to be | ||
22 | serviced, is -1. | ||
23 | |||
24 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
25 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html] | ||
26 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
27 | |||
28 | --- | ||
29 | hw/intc/apic.c | 2 +- | ||
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
31 | |||
32 | Index: qemu-8.0.0/hw/intc/apic.c | ||
33 | =================================================================== | ||
34 | --- qemu-8.0.0.orig/hw/intc/apic.c | ||
35 | +++ qemu-8.0.0/hw/intc/apic.c | ||
36 | @@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de | ||
37 | APICCommonState *s = APIC(dev); | ||
38 | uint32_t lvt0; | ||
39 | |||
40 | - if (!s) | ||
41 | + if (!s || !(s->spurious_vec & APIC_SV_ENABLE)) | ||
42 | return -1; | ||
43 | |||
44 | lvt0 = s->lvt[APIC_LVT_LINT0]; | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch new file mode 100644 index 00000000..f981a64a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: He Zhe <zhe.he@windriver.com> | ||
3 | Date: Wed, 28 Aug 2019 19:56:28 +0800 | ||
4 | Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt | ||
5 | |||
6 | libgcrypt may also be controlled by pkg-config, this patch adds pkg-config | ||
7 | handling for libgcrypt. | ||
8 | |||
9 | Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html] | ||
10 | |||
11 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
12 | |||
13 | --- | ||
14 | meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | Index: qemu-8.1.0/meson.build | ||
18 | =================================================================== | ||
19 | --- qemu-8.1.0.orig/meson.build | ||
20 | +++ qemu-8.1.0/meson.build | ||
21 | @@ -1481,7 +1481,7 @@ endif | ||
22 | if not gnutls_crypto.found() | ||
23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() | ||
24 | gcrypt = dependency('libgcrypt', version: '>=1.8', | ||
25 | - method: 'config-tool', | ||
26 | + method: 'pkg-config', | ||
27 | required: get_option('gcrypt')) | ||
28 | # Debian has removed -lgpg-error from libgcrypt-config | ||
29 | # as it "spreads unnecessary dependencies" which in | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch new file mode 100644 index 00000000..38aa4c3b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From f39e7bfc5ed07b5ecaeb705c4eae4855ca120d47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleksiy Obitotskyy <oobitots@cisco.com> | ||
3 | Date: Wed, 25 Mar 2020 21:21:35 +0200 | ||
4 | Subject: [PATCH 05/12] qemu: Do not include file if not exists | ||
5 | |||
6 | Script configure checks for if_alg.h and check failed but | ||
7 | if_alg.h still included. | ||
8 | |||
9 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07188.html] | ||
10 | Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> | ||
11 | |||
12 | [update patch context] | ||
13 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
14 | |||
15 | --- | ||
16 | linux-user/syscall.c | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
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 | @@ -115,7 +115,9 @@ | ||
24 | #include <linux/blkpg.h> | ||
25 | #include <netpacket/packet.h> | ||
26 | #include <linux/netlink.h> | ||
27 | +#if defined(CONFIG_AF_ALG) | ||
28 | #include <linux/if_alg.h> | ||
29 | +#endif | ||
30 | #include <linux/rtc.h> | ||
31 | #include <sound/asound.h> | ||
32 | #ifdef HAVE_BTRFS_H | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch new file mode 100644 index 00000000..5d1d7c68 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 375cae3dd6151ef33cae8f243f6a2c2da6c0c356 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Fri, 8 Jan 2021 17:27:06 +0000 | ||
4 | Subject: [PATCH 06/12] qemu: Add some user space mmap tweaks to address musl | ||
5 | 32 bit | ||
6 | |||
7 | When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an | ||
8 | infinite loop of mremap calls of ever decreasing/increasing addresses. | ||
9 | |||
10 | I suspect something in the musl memory allocation code loops indefinitely | ||
11 | if it only sees ENOMEM and only exits when it hits EFAULT. | ||
12 | |||
13 | According to the docs, trying to mremap outside the address space | ||
14 | can/should return EFAULT and changing this allows the build to succeed. | ||
15 | |||
16 | A better return value for the other cases of invalid addresses is EINVAL | ||
17 | rather than ENOMEM so adjust the other part of the test to this. | ||
18 | |||
19 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html] | ||
20 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org | ||
21 | |||
22 | --- | ||
23 | linux-user/mmap.c | 10 +++++++--- | ||
24 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
25 | |||
26 | Index: qemu-8.0.0/linux-user/mmap.c | ||
27 | =================================================================== | ||
28 | --- qemu-8.0.0.orig/linux-user/mmap.c | ||
29 | +++ qemu-8.0.0/linux-user/mmap.c | ||
30 | @@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add | ||
31 | int prot; | ||
32 | void *host_addr; | ||
33 | |||
34 | - if (!guest_range_valid_untagged(old_addr, old_size) || | ||
35 | - ((flags & MREMAP_FIXED) && | ||
36 | + if (!guest_range_valid_untagged(old_addr, old_size)) { | ||
37 | + errno = EFAULT; | ||
38 | + return -1; | ||
39 | + } | ||
40 | + | ||
41 | + if (((flags & MREMAP_FIXED) && | ||
42 | !guest_range_valid_untagged(new_addr, new_size)) || | ||
43 | ((flags & MREMAP_MAYMOVE) == 0 && | ||
44 | !guest_range_valid_untagged(old_addr, new_size))) { | ||
45 | - errno = ENOMEM; | ||
46 | + errno = EINVAL; | ||
47 | return -1; | ||
48 | } | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch new file mode 100644 index 00000000..d3f965e0 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 50bab5c2605b609ea7ea154f57a9be96d656725a Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Mon, 1 Mar 2021 13:00:47 +0000 | ||
4 | Subject: [PATCH 07/12] qemu: Determinism fixes | ||
5 | |||
6 | When sources are included within debug information, a couple of areas of the | ||
7 | qemu build are not reproducible due to either full buildpaths or timestamps. | ||
8 | |||
9 | Replace the full paths with relative ones. I couldn't figure out how to get | ||
10 | meson to pass relative paths but we can fix that in the script. | ||
11 | |||
12 | Upstream-Status: Pending [some version of all/part of this may be accepted] | ||
13 | RP 2021/3/1 | ||
14 | |||
15 | --- | ||
16 | scripts/decodetree.py | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | Index: qemu-8.0.0/scripts/decodetree.py | ||
20 | =================================================================== | ||
21 | --- qemu-8.0.0.orig/scripts/decodetree.py | ||
22 | +++ qemu-8.0.0/scripts/decodetree.py | ||
23 | @@ -1328,7 +1328,7 @@ def main(): | ||
24 | toppat = ExcMultiPattern(0) | ||
25 | |||
26 | for filename in args: | ||
27 | - input_file = filename | ||
28 | + input_file = os.path.relpath(filename) | ||
29 | f = open(filename, 'rt', encoding='utf-8') | ||
30 | parse_file(f, toppat) | ||
31 | f.close() | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch new file mode 100644 index 00000000..a84364cc --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 14 Jan 2021 06:33:04 +0000 | ||
4 | Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files | ||
5 | |||
6 | Fix error like: | ||
7 | Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long | ||
8 | |||
9 | when build path is too long, use meson.source_root() will make this | ||
10 | filename too long. Fixed by using relative path to refer to files | ||
11 | |||
12 | Upstream-Status: Submitted [send to qemu-devel] | ||
13 | |||
14 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
15 | |||
16 | --- | ||
17 | tests/unit/meson.build | 4 ++-- | ||
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | Index: qemu-8.0.0/tests/unit/meson.build | ||
21 | =================================================================== | ||
22 | --- qemu-8.0.0.orig/tests/unit/meson.build | ||
23 | +++ qemu-8.0.0/tests/unit/meson.build | ||
24 | @@ -46,7 +46,7 @@ tests = { | ||
25 | 'test-keyval': [testqapi], | ||
26 | 'test-logging': [], | ||
27 | 'test-uuid': [], | ||
28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], | ||
29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], | ||
30 | 'test-qapi-util': [], | ||
31 | 'test-interval-tree': [], | ||
32 | 'test-xs-node': [qom], | ||
33 | @@ -136,7 +136,7 @@ if have_system | ||
34 | 'test-util-sockets': ['socket-helpers.c'], | ||
35 | 'test-base64': [], | ||
36 | 'test-bufferiszero': [], | ||
37 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], | ||
38 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | ||
39 | 'test-vmstate': [migration, io], | ||
40 | 'test-yank': ['socket-helpers.c', qom, io, chardev] | ||
41 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch new file mode 100644 index 00000000..4de6cc24 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From ebf4bb2f51da83af0c61480414cfa156f7308b34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 21 Mar 2022 10:09:38 -0700 | ||
4 | Subject: [PATCH 09/12] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux | ||
5 | systems | ||
6 | |||
7 | linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures | ||
8 | which include asm-generic/mman.h and mips/powerpc are not including this | ||
9 | file in linux/mman.h, therefore these should be defined for such | ||
10 | architectures on Linux as well. This fixes build on mips/musl/linux | ||
11 | |||
12 | Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05298.html] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Cc: Zhang Yi <yi.z.zhang@linux.intel.com> | ||
15 | Cc: Michael S. Tsirkin <mst@redhat.com> | ||
16 | |||
17 | --- | ||
18 | util/mmap-alloc.c | 10 +++++++--- | ||
19 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
20 | |||
21 | Index: qemu-8.0.0/util/mmap-alloc.c | ||
22 | =================================================================== | ||
23 | --- qemu-8.0.0.orig/util/mmap-alloc.c | ||
24 | +++ qemu-8.0.0/util/mmap-alloc.c | ||
25 | @@ -10,14 +10,18 @@ | ||
26 | * later. See the COPYING file in the top-level directory. | ||
27 | */ | ||
28 | |||
29 | +#include "qemu/osdep.h" | ||
30 | #ifdef CONFIG_LINUX | ||
31 | #include <linux/mman.h> | ||
32 | -#else /* !CONFIG_LINUX */ | ||
33 | +#endif /* CONFIG_LINUX */ | ||
34 | + | ||
35 | +#ifndef MAP_SYNC | ||
36 | #define MAP_SYNC 0x0 | ||
37 | +#endif /* MAP_SYNC */ | ||
38 | +#ifndef MAP_SHARED_VALIDATE | ||
39 | #define MAP_SHARED_VALIDATE 0x0 | ||
40 | -#endif /* CONFIG_LINUX */ | ||
41 | +#endif /* MAP_SHARED_VALIDATE */ | ||
42 | |||
43 | -#include "qemu/osdep.h" | ||
44 | #include "qemu/mmap-alloc.h" | ||
45 | #include "qemu/host-utils.h" | ||
46 | #include "qemu/cutils.h" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch new file mode 100644 index 00000000..6caf35b6 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | CVE: CVE-2022-1050 | ||
2 | Upstream-Status: Submitted [https://lore.kernel.org/qemu-devel/20220403095234.2210-1-yuval.shaia.ml@gmail.com/] | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From dbdef95c272e8f3ec037c3db4197c66002e30995 Mon Sep 17 00:00:00 2001 | ||
6 | From: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
7 | Date: Sun, 3 Apr 2022 12:52:34 +0300 | ||
8 | Subject: [PATCH] hw/pvrdma: Protect against buggy or malicious guest driver | ||
9 | |||
10 | Guest driver might execute HW commands when shared buffers are not yet | ||
11 | allocated. | ||
12 | This could happen on purpose (malicious guest) or because of some other | ||
13 | guest/host address mapping error. | ||
14 | We need to protect againts such case. | ||
15 | |||
16 | Fixes: CVE-2022-1050 | ||
17 | |||
18 | Reported-by: Raven <wxhusst@gmail.com> | ||
19 | Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
20 | --- | ||
21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ | ||
22 | 1 file changed, 6 insertions(+) | ||
23 | |||
24 | Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c | ||
25 | =================================================================== | ||
26 | --- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c | ||
27 | +++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c | ||
28 | @@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) | ||
29 | goto out; | ||
30 | } | ||
31 | |||
32 | + if (!dsr_info->dsr) { | ||
33 | + /* Buggy or malicious guest driver */ | ||
34 | + rdma_error_report("Exec command without dsr, req or rsp buffers"); | ||
35 | + goto out; | ||
36 | + } | ||
37 | + | ||
38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / | ||
39 | sizeof(struct cmd_handler)) { | ||
40 | rdma_error_report("Unsupported command"); | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch new file mode 100644 index 00000000..112eb925 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 76c3fc4c87231bed32974ebbbdb5079cff45a6b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Tue, 5 Jan 2021 23:00:14 +0000 | ||
4 | Subject: [PATCH 12/12] qemu: Upgrade 5.1.0->5.2.0 | ||
5 | |||
6 | We need to be able to trigger configure's cross code but we don't want | ||
7 | to set cross_prefix as it does other things we don't want. Patch things | ||
8 | so we can do what we need in the target config case. | ||
9 | |||
10 | Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?] | ||
11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
12 | |||
13 | --- | ||
14 | configure | 4 ---- | ||
15 | 1 file changed, 4 deletions(-) | ||
16 | |||
17 | Index: qemu-8.0.0/configure | ||
18 | =================================================================== | ||
19 | --- qemu-8.0.0.orig/configure | ||
20 | +++ qemu-8.0.0/configure | ||
21 | @@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then | ||
22 | echo "widl = [$(meson_quote $widl)]" >> $cross | ||
23 | echo "windres = [$(meson_quote $windres)]" >> $cross | ||
24 | echo "windmc = [$(meson_quote $windmc)]" >> $cross | ||
25 | - if test "$cross_compile" = "yes"; then | ||
26 | cross_arg="--cross-file config-meson.cross" | ||
27 | echo "[host_machine]" >> $cross | ||
28 | echo "system = '$targetos'" >> $cross | ||
29 | @@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then | ||
30 | else | ||
31 | echo "endian = 'little'" >> $cross | ||
32 | fi | ||
33 | - else | ||
34 | - cross_arg="--native-file config-meson.cross" | ||
35 | - fi | ||
36 | mv $cross config-meson.cross | ||
37 | |||
38 | rm -rf meson-private meson-info meson-logs | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch new file mode 100644 index 00000000..0cbaea07 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch | |||
@@ -0,0 +1,20 @@ | |||
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-8.1/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin new file mode 100644 index 00000000..c4044296 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin | |||
Binary files differ | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init new file mode 100644 index 00000000..5ebaadde --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init | |||
@@ -0,0 +1,75 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | # Initially written by: Michael Tokarev <mjt@tls.msk.ru> | ||
3 | # For QEMU Debian downstream package | ||
4 | |||
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-8.1/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest new file mode 100644 index 00000000..f9a4e8fb --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | #This script is used to run qemu test suites | ||
4 | # | ||
5 | |||
6 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
7 | export SRC_PATH=$ptestdir | ||
8 | |||
9 | cd $ptestdir/tests | ||
10 | tests=$(find . -name "test-*" ! -name "*.p") | ||
11 | for f in $tests; do | ||
12 | $f | sed '/^ok/ s/ok/PASS:/g' | ||
13 | done | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb new file mode 100644 index 00000000..c4fc180e --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "master" | ||
5 | SRCREV ?= "c54a1cfb7076aaf8abdfe50e89245b37cdb1c077" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc new file mode 100644 index 00000000..22fa9685 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc | |||
@@ -0,0 +1,7 @@ | |||
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-2024.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc new file mode 100644 index 00000000..ffaf3cdf --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc | |||
@@ -0,0 +1,3 @@ | |||
1 | XILINX_QEMU_VERSION = "v8.1.0" | ||
2 | BRANCH = "master" | ||
3 | SRCREV = "aa05b83770c0cd5a4f7fcbcef7efc806ae2abe9f" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc new file mode 100644 index 00000000..ad2af244 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc | |||
@@ -0,0 +1,79 @@ | |||
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 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
12 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | ||
13 | |||
14 | FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-8.1.0:" | ||
15 | |||
16 | PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
17 | REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" | ||
18 | |||
19 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
20 | SRC_URI = "${REPO};${BRANCHARG};name=qemu" | ||
21 | SRCREV_qemu = "${SRCREV}" | ||
22 | SRCREV_FORMAT = "qemu" | ||
23 | |||
24 | FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1" | ||
25 | |||
26 | # Deal with the broken --disable-download | ||
27 | SRCREV_berkeley-softfloat-3 = "b64af41c3276f97f0e181920400ee056b9c88037" | ||
28 | SRCREV_berkeley-testfloat-3 = "40619cbb3bf32872df8c53cc457039229428a263" | ||
29 | SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81" | ||
30 | SRCREV_keycodemapdb = "f5772a62ec52591ff6870b7e8ef32482371f22c6" | ||
31 | SRCREV_libvfio-user = "0b28d205572c80b568a1003db2c8f37ca333e4d7" | ||
32 | SRCREV_slirp = "26be815b86e8d49add8c9a8b320239b9594ff03d" | ||
33 | SRC_URI += "\ | ||
34 | git://gitlab.com/qemu-project/berkeley-softfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-softfloat-3;name=berkeley-softfloat-3 \ | ||
35 | git://gitlab.com/qemu-project/berkeley-testfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-testfloat-3;name=berkeley-testfloat-3 \ | ||
36 | git://gitlab.com/qemu-project/dtc.git;protocol=https;nobranch=1;destsuffix=git/subprojects/dtc;name=dtc \ | ||
37 | git://gitlab.com/qemu-project/keycodemapdb.git;protocol=https;nobranch=1;destsuffix=git/subprojects/keycodemapdb;name=keycodemapdb \ | ||
38 | git://gitlab.com/qemu-project/libvfio-user.git;protocol=https;nobranch=1;destsuffix=git/subprojects/libvfio-user;name=libvfio-user \ | ||
39 | git://gitlab.freedesktop.org/slirp/libslirp;protocol=https;nobranch=1;destsuffix=git/subprojects/slirp;name=slirp \ | ||
40 | " | ||
41 | |||
42 | # Configure meson for disable-download | ||
43 | do_configure:prepend() { | ||
44 | cp ${S}/subprojects/packagefiles/berkeley-softfloat-3/* ${S}/subprojects/berkeley-softfloat-3/. | ||
45 | cp ${S}/subprojects/packagefiles/berkeley-testfloat-3/* ${S}/subprojects/berkeley-testfloat-3/. | ||
46 | } | ||
47 | |||
48 | |||
49 | # Keep this in sync with the main YP QEMU integration | ||
50 | SRC_URI += "\ | ||
51 | file://powerpc_rom.bin \ | ||
52 | file://run-ptest \ | ||
53 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | ||
54 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ | ||
55 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | ||
56 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ | ||
57 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ | ||
58 | file://0007-qemu-Determinism-fixes.patch \ | ||
59 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
60 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | ||
61 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | ||
62 | file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \ | ||
63 | file://fixedmeson.patch \ | ||
64 | file://no-pip.patch \ | ||
65 | file://qemu-guest-agent.init \ | ||
66 | file://qemu-guest-agent.udev \ | ||
67 | " | ||
68 | |||
69 | # Patch doesn't apply to 8.1.0 | ||
70 | # file://fixmips.patch | ||
71 | |||
72 | S = "${WORKDIR}/git" | ||
73 | |||
74 | # Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc | ||
75 | DISABLE_STATIC:pn-qemu-xilinx = "" | ||
76 | DISABLE_STATIC:pn-qemu-xilinx-native = "" | ||
77 | DISABLE_STATIC:pn-nativesdk-qemu-xilinx = "" | ||
78 | DISABLE_STATIC:pn-qemu-xilinx-system-native = "" | ||
79 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc new file mode 100644 index 00000000..ad00453f --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc | |||
@@ -0,0 +1,2 @@ | |||
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_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb new file mode 100644 index 00000000..5ffdeb98 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | BPN = "qemu-xilinx" | ||
2 | |||
3 | DEPENDS += "glib-2.0-native zlib-native" | ||
4 | |||
5 | require qemu-xilinx-2024.1.inc | ||
6 | require qemu-xilinx-native-8.1.inc | ||
7 | require qemu-native-alt.inc | ||
8 | |||
9 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent" | ||
10 | |||
11 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb new file mode 100644 index 00000000..7e985088 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | BPN = "qemu-xilinx" | ||
2 | |||
3 | require qemu-system-native-alt.inc | ||
4 | require qemu-xilinx-2024.1.inc | ||
5 | require qemu-xilinx-native-8.1.inc | ||
6 | |||
7 | # As some of the files installed by qemu-native and qemu-system-native | ||
8 | # are the same, we depend on qemu-native to get the full installation set | ||
9 | # and avoid file clashes | ||
10 | DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native" | ||
11 | |||
12 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
13 | |||
14 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
15 | |||
16 | PACKAGECONFIG ??= "fdt alsa kvm pie slirp png gcrypt \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
18 | " | ||
19 | |||
20 | # Handle distros such as CentOS 5 32-bit that do not have kvm support | ||
21 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
22 | |||
23 | do_install:append() { | ||
24 | install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu-xilinx | ||
25 | |||
26 | # The following is also installed by qemu-native | ||
27 | rm -f ${D}${datadir}/qemu-xilinx/trace-events-all | ||
28 | rm -rf ${D}${datadir}/qemu-xilinx/keymaps | ||
29 | rm -rf ${D}${datadir}/icons/ | ||
30 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
31 | |||
32 | # Install qmp.py to be used with testimage | ||
33 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
34 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
35 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb new file mode 100644 index 00000000..cff60bd6 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | BBCLASSEXTEND = "nativesdk" | ||
2 | |||
3 | require qemu-xilinx-2024.1.inc | ||
4 | require qemu-8.1.inc | ||
5 | require qemu-xilinx-8.1.inc | ||
6 | require qemu-alt.inc | ||
7 | |||
8 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
9 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
10 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
11 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
12 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
13 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
14 | |||
15 | |||
16 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" | ||
17 | |||
18 | DEPENDS:append:libc-musl = " libucontext" | ||
19 | |||
20 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" | ||
21 | |||
22 | RDEPENDS:${PN}-common:class-target += "bash" | ||
23 | |||
24 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
25 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
26 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
27 | |||
28 | PACKAGECONFIG ??= " \ | ||
29 | fdt sdl kvm pie slirp gcrypt \ | ||
30 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \ | ||
31 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
32 | ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ | ||
33 | " | ||
34 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp gcrypt \ | ||
35 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', '', d)} \ | ||
36 | " | ||
37 | # ppc32 hosts are no longer supported in qemu | ||
38 | COMPATIBLE_HOST:powerpc = "null" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb new file mode 100644 index 00000000..4722e1f5 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb | |||
@@ -0,0 +1,29 @@ | |||
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-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/mali/kernel-module-mali.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb index 268759c2..cd3ba3d1 100644 --- a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali.bb | |||
@@ -34,6 +34,7 @@ SRC_URI = " \ | |||
34 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ | 34 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ |
35 | file://0026-Fix-gpu-driver-probe-failure.patch \ | 35 | file://0026-Fix-gpu-driver-probe-failure.patch \ |
36 | file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ | 36 | file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ |
37 | file://0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch \ | ||
37 | " | 38 | " |
38 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" | 39 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" |
39 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" | 40 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" |
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch new file mode 100644 index 00000000..72275a4c --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From e3e0f5e3fa0ddb396393d444bce6e575f7a16189 Mon Sep 17 00:00:00 2001 | ||
2 | From: Parth Gajjar <parth.gajjar@amd.com> | ||
3 | Date: Thu, 21 Dec 2023 22:41:32 -0800 | ||
4 | Subject: [PATCH] Replace vma->vm_flags direct modifications with modifier | ||
5 | calls | ||
6 | |||
7 | Replace direct modifications to vma->vm_flags with calls to modifier | ||
8 | functions to be able to track flag changes and to keep vma locking | ||
9 | correctness. (Kernel 6.3) | ||
10 | |||
11 | Signed-off-by: Parth Gajjar <parth.gajjar@amd.com> | ||
12 | --- | ||
13 | linux/mali_memory.c | 10 ++++++++++ | ||
14 | linux/mali_memory_cow.c | 13 ++++++++++--- | ||
15 | 2 files changed, 20 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/linux/mali_memory.c b/linux/mali_memory.c | ||
18 | index 2b2b209..c21d0b7 100644 | ||
19 | --- a/linux/mali_memory.c | ||
20 | +++ b/linux/mali_memory.c | ||
21 | @@ -266,11 +266,17 @@ int mali_mmap(struct file *filp, struct vm_area_struct *vma) | ||
22 | * that it's present and can never be paged out (see also previous | ||
23 | * entry) | ||
24 | */ | ||
25 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) | ||
26 | + vm_flags_set(vma, VM_IO | VM_DONTCOPY | VM_PFNMAP); | ||
27 | +#else | ||
28 | vma->vm_flags |= VM_IO; | ||
29 | vma->vm_flags |= VM_DONTCOPY; | ||
30 | vma->vm_flags |= VM_PFNMAP; | ||
31 | +#endif | ||
32 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0) | ||
33 | vma->vm_flags |= VM_RESERVED; | ||
34 | +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) | ||
35 | + vm_flags_set(vma, VM_DONTDUMP | VM_DONTEXPAND); | ||
36 | #else | ||
37 | vma->vm_flags |= VM_DONTDUMP; | ||
38 | vma->vm_flags |= VM_DONTEXPAND; | ||
39 | @@ -288,7 +294,11 @@ int mali_mmap(struct file *filp, struct vm_area_struct *vma) | ||
40 | if (!(vma->vm_flags & VM_WRITE)) { | ||
41 | MALI_DEBUG_PRINT(4, ("mmap allocation with read only !\n")); | ||
42 | /* add VM_WRITE for do_page_fault will check this when a write fault */ | ||
43 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) | ||
44 | + vm_flags_set(vma, VM_WRITE | VM_READ); | ||
45 | +#else | ||
46 | vma->vm_flags |= VM_WRITE | VM_READ; | ||
47 | +#endif | ||
48 | vma->vm_page_prot = PAGE_READONLY; | ||
49 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | ||
50 | mem_bkend->flags |= MALI_MEM_BACKEND_FLAG_COW_CPU_NO_WRITE; | ||
51 | diff --git a/linux/mali_memory_cow.c b/linux/mali_memory_cow.c | ||
52 | index 6fadd42..e631431 100644 | ||
53 | --- a/linux/mali_memory_cow.c | ||
54 | +++ b/linux/mali_memory_cow.c | ||
55 | @@ -391,13 +391,20 @@ _mali_osk_errcode_t mali_memory_cow_modify_range(mali_mem_backend *backend, | ||
56 | } | ||
57 | } else { | ||
58 | /* used to trigger page fault for swappable cowed memory. */ | ||
59 | - alloc->cpu_mapping.vma->vm_flags |= VM_PFNMAP; | ||
60 | - alloc->cpu_mapping.vma->vm_flags |= VM_MIXEDMAP; | ||
61 | - | ||
62 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) | ||
63 | + vm_flags_set(alloc->cpu_mapping.vma, VM_PFNMAP | VM_MIXEDMAP); | ||
64 | +#else | ||
65 | + alloc->cpu_mapping.vma->vm_flags |= VM_PFNMAP; | ||
66 | + alloc->cpu_mapping.vma->vm_flags |= VM_MIXEDMAP; | ||
67 | +#endif | ||
68 | zap_vma_ptes(alloc->cpu_mapping.vma, alloc->cpu_mapping.vma->vm_start + range_start, range_size); | ||
69 | /* delete this flag to let swappble is ummapped regard to stauct page not page frame. */ | ||
70 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0) | ||
71 | + vm_flags_clear(alloc->cpu_mapping.vma, VM_PFNMAP | VM_MIXEDMAP); | ||
72 | +#else | ||
73 | alloc->cpu_mapping.vma->vm_flags &= ~VM_PFNMAP; | ||
74 | alloc->cpu_mapping.vma->vm_flags &= ~VM_MIXEDMAP; | ||
75 | +#endif | ||
76 | } | ||
77 | } | ||
78 | |||
79 | -- | ||
80 | 2.25.1 | ||
81 | |||
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb new file mode 100644 index 00000000..17039abb --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2024.1.bb | |||
@@ -0,0 +1,24 @@ | |||
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 ?= "master" | ||
13 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" | ||
14 | SRCREV ?= "e20942b256e6fb18eaef919c7441f65ad8afcf43" | ||
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_2024.1.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb new file mode 100644 index 00000000..9757ae4b --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2024.1.bb | |||
@@ -0,0 +1,24 @@ | |||
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 ?= "master" | ||
13 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | ||
14 | SRCREV = "edd297762e0bac3f4c5b64ef67244968e22020e2" | ||
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/libtraceevent/libtraceevent/meson.patch b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch new file mode 100644 index 00000000..38b61071 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | Fixes for the Meson build of libtraceevent: | ||
2 | |||
3 | - Make the plugin directory the same as the Makefiles | ||
4 | - Install the plugins as modules not static and versioned shared libraries | ||
5 | - Add an option to disable building the documentation (needs asciidoc and xmlto) | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
9 | |||
10 | diff --git a/meson.build b/meson.build | ||
11 | index b61c873..4bba4d8 100644 | ||
12 | --- a/meson.build | ||
13 | +++ b/meson.build | ||
14 | @@ -25,7 +25,7 @@ htmldir = join_paths(prefixdir, get_option('htmldir')) | ||
15 | libdir = join_paths(prefixdir, get_option('libdir')) | ||
16 | plugindir = get_option('plugindir') | ||
17 | if plugindir == '' | ||
18 | - plugindir = join_paths(libdir, 'libtraceevent/plugins') | ||
19 | + plugindir = join_paths(libdir, 'traceevent/plugins') | ||
20 | endif | ||
21 | |||
22 | add_project_arguments( | ||
23 | @@ -45,10 +45,13 @@ if cunit_dep.found() | ||
24 | subdir('utest') | ||
25 | endif | ||
26 | subdir('samples') | ||
27 | -subdir('Documentation') | ||
28 | |||
29 | -custom_target( | ||
30 | - 'docs', | ||
31 | - output: 'docs', | ||
32 | - depends: [html, man], | ||
33 | - command: ['echo']) | ||
34 | +if get_option('docs') | ||
35 | + subdir('Documentation') | ||
36 | + | ||
37 | + custom_target( | ||
38 | + 'docs', | ||
39 | + output: 'docs', | ||
40 | + depends: [html, man], | ||
41 | + command: ['echo']) | ||
42 | +endif | ||
43 | diff --git a/meson_options.txt b/meson_options.txt | ||
44 | index b2294f6..0611216 100644 | ||
45 | --- a/meson_options.txt | ||
46 | +++ b/meson_options.txt | ||
47 | @@ -4,6 +4,10 @@ | ||
48 | |||
49 | option('plugindir', type : 'string', | ||
50 | description : 'set the plugin dir') | ||
51 | + | ||
52 | +option('docs', type : 'boolean', value: true, | ||
53 | + description : 'build documentation') | ||
54 | + | ||
55 | option('htmldir', type : 'string', value : 'share/doc/libtraceevent-doc', | ||
56 | description : 'directory for HTML documentation') | ||
57 | option('asciidoctor', type : 'boolean', value: false, | ||
58 | diff --git a/plugins/meson.build b/plugins/meson.build | ||
59 | index 74ad664..4919be4 100644 | ||
60 | --- a/plugins/meson.build | ||
61 | +++ b/plugins/meson.build | ||
62 | @@ -19,11 +19,10 @@ plugins = [ | ||
63 | |||
64 | pdeps = [] | ||
65 | foreach plugin : plugins | ||
66 | - pdeps += library( | ||
67 | + pdeps += shared_module( | ||
68 | plugin.replace('.c', ''), | ||
69 | plugin, | ||
70 | name_prefix: '', | ||
71 | - version: library_version, | ||
72 | dependencies: [libtraceevent_dep], | ||
73 | include_directories: [incdir], | ||
74 | install: true, | ||
diff --git a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb new file mode 100644 index 00000000..bee78918 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | # Copyright (C) 2022 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "API to access the kernel tracefs directory" | ||
5 | HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/" | ||
6 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ | ||
8 | file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" | ||
9 | SECTION = "libs" | ||
10 | |||
11 | SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213" | ||
12 | SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \ | ||
13 | file://meson.patch" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit meson pkgconfig | ||
18 | |||
19 | EXTRA_OEMESON = "-Ddocs=false" | ||
20 | |||
21 | PACKAGES += "${PN}-plugins" | ||
22 | |||
23 | FILES:${PN}-plugins += "${libdir}/traceevent/plugins" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg new file mode 100644 index 00000000..a5b23e3f --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.cfg | |||
@@ -0,0 +1 @@ | |||
CONFIG_VERSAL_SYSMON_I2C=y | |||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc new file mode 100644 index 00000000..c1830956 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/versal-sysmon/versal-sysmon.scc | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | kconf hardware versal-sysmon.cfg | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb new file mode 100644 index 00000000..db593947 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb | |||
@@ -0,0 +1,19 @@ | |||
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 = "6737b74785db6341fba18dc6e3d35da9ab8fcfb7" | ||
5 | SRCREV_meta = "5d0809d0d939c7738cb6e5391126c73fd0e4e865" | ||
6 | |||
7 | KCONF_AUDIT_LEVEL="0" | ||
8 | |||
9 | include linux-xlnx.inc | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
12 | |||
13 | # Workaround for: | ||
14 | # rm: cannot remove '.../tmp/work/zynqmp_generic-xilinx-linux/linux-xlnx/6.6.0-xilinx-v2024.1+gitAUTOINC+340eed5001-r0/image/lib/modules/6.6.0-xilinx-v2024.1-g340eed500130/source': No such file or directory | ||
15 | # This will not be required Scarthgap | ||
16 | kernel_do_install:prepend () { | ||
17 | mkdir -p "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}" | ||
18 | touch "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source" | ||
19 | } | ||
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc b/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc new file mode 100644 index 00000000..491f54c3 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | inherit perlnative cpan-base | ||
2 | |||
3 | # Env var which tells perl if it should use host (no) or target (yes) settings | ||
4 | export PERLCONFIGTARGET = "${@is_target(d)}" | ||
5 | export PERL_INC = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}/CORE" | ||
6 | export PERL_LIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}" | ||
7 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" | ||
8 | |||
9 | # The perl symbols CPPSTDIN and CPPRUN embed the sysroot into the | ||
10 | # binaries, work needed to remove this | ||
11 | INSANE_SKIP:${PN}-dbg += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf.bb b/meta-xilinx-core/recipes-kernel/perf/perf.bb new file mode 100644 index 00000000..9164d93a --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/perf/perf.bb | |||
@@ -0,0 +1,414 @@ | |||
1 | SUMMARY = "Performance analysis tools for Linux" | ||
2 | DESCRIPTION = "Performance counters for Linux are a new kernel-based \ | ||
3 | subsystem that provide a framework for all things \ | ||
4 | performance analysis. It covers hardware level \ | ||
5 | (CPU/PMU, Performance Monitoring Unit) features \ | ||
6 | and software features (software counters, tracepoints) \ | ||
7 | as well." | ||
8 | HOMEPAGE = "https://perf.wiki.kernel.org/index.php/Main_Page" | ||
9 | |||
10 | LICENSE = "GPL-2.0-only" | ||
11 | |||
12 | PE = '1' | ||
13 | |||
14 | PACKAGECONFIG ??= "python tui libunwind libtraceevent" | ||
15 | PACKAGECONFIG[dwarf] = ",NO_DWARF=1" | ||
16 | PACKAGECONFIG[perl] = ",NO_LIBPERL=1,perl" | ||
17 | PACKAGECONFIG[python] = ",NO_LIBPYTHON=1,python3 python3-setuptools-native" | ||
18 | # gui support was added with kernel 3.6.35 | ||
19 | # since 3.10 libnewt was replaced by slang | ||
20 | # to cover a wide range of kernel we add both dependencies | ||
21 | PACKAGECONFIG[tui] = ",NO_NEWT=1,libnewt slang" | ||
22 | PACKAGECONFIG[libunwind] = ",NO_LIBUNWIND=1 NO_LIBDW_DWARF_UNWIND=1,libunwind" | ||
23 | PACKAGECONFIG[libnuma] = ",NO_LIBNUMA=1" | ||
24 | PACKAGECONFIG[bfd] = ",NO_LIBBFD=1" | ||
25 | PACKAGECONFIG[systemtap] = ",NO_SDT=1,systemtap" | ||
26 | PACKAGECONFIG[jvmti] = ",NO_JVMTI=1" | ||
27 | # libaudit support would need scripting to be enabled | ||
28 | PACKAGECONFIG[audit] = ",NO_LIBAUDIT=1,audit" | ||
29 | PACKAGECONFIG[manpages] = ",,xmlto-native asciidoc-native" | ||
30 | PACKAGECONFIG[cap] = ",,libcap" | ||
31 | PACKAGECONFIG[libtraceevent] = ",NO_LIBTRACEEVENT=1,libtraceevent" | ||
32 | # jevents requires host python for generating a .c file, but is | ||
33 | # unrelated to the python item. | ||
34 | PACKAGECONFIG[jevents] = ",NO_JEVENTS=1,python3-native" | ||
35 | # Arm CoreSight | ||
36 | PACKAGECONFIG[coresight] = "CORESIGHT=1,,opencsd" | ||
37 | PACKAGECONFIG[pfm4] = ",NO_LIBPFM4=1,libpfm4" | ||
38 | PACKAGECONFIG[babeltrace] = ",NO_LIBBABELTRACE=1,babeltrace" | ||
39 | |||
40 | # libunwind is not yet ported for some architectures | ||
41 | PACKAGECONFIG:remove:arc = "libunwind" | ||
42 | PACKAGECONFIG:remove:riscv32 = "libunwind" | ||
43 | |||
44 | DEPENDS = " \ | ||
45 | virtual/${MLPREFIX}libc \ | ||
46 | ${MLPREFIX}elfutils \ | ||
47 | ${MLPREFIX}binutils \ | ||
48 | bison-native flex-native xz \ | ||
49 | " | ||
50 | |||
51 | do_configure[depends] += "virtual/kernel:do_shared_workdir" | ||
52 | |||
53 | PROVIDES = "virtual/perf" | ||
54 | |||
55 | inherit linux-kernel-base kernel-arch manpages | ||
56 | |||
57 | # needed for building the tools/perf Python bindings | ||
58 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python3targetconfig', '', d)} | ||
59 | inherit python3-dir | ||
60 | export PYTHON_SITEPACKAGES_DIR | ||
61 | |||
62 | #kernel 3.1+ supports WERROR to disable warnings as errors | ||
63 | export WERROR = "0" | ||
64 | |||
65 | do_populate_lic[depends] += "virtual/kernel:do_shared_workdir" | ||
66 | |||
67 | # needed for building the tools/perf Perl binding | ||
68 | include ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perf-perl.inc', '', d)} | ||
69 | |||
70 | inherit kernelsrc | ||
71 | |||
72 | S = "${WORKDIR}/${BP}" | ||
73 | SPDX_S = "${S}/tools/perf" | ||
74 | |||
75 | # The LDFLAGS is required or some old kernels fails due missing | ||
76 | # symbols and this is preferred than requiring patches to every old | ||
77 | # supported kernel. | ||
78 | LDFLAGS="-ldl -lutil" | ||
79 | |||
80 | # Perf's build system adds its own optimization flags for most TUs, | ||
81 | # overriding the flags included here. But for some, perf does not add | ||
82 | # any -O option, so ensure the distro's chosen optimization gets used | ||
83 | # for those. Since ${SELECTED_OPTIMIZATION} always includes | ||
84 | # ${DEBUG_FLAGS} which in turn includes ${DEBUG_PREFIX_MAP}, this also | ||
85 | # ensures perf is built with appropriate -f*-prefix-map options, | ||
86 | # avoiding the 'buildpaths' QA warning. | ||
87 | TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION}" | ||
88 | |||
89 | EXTRA_OEMAKE = '\ | ||
90 | V=1 \ | ||
91 | VF=1 \ | ||
92 | -C ${S}/tools/perf \ | ||
93 | O=${B} \ | ||
94 | CROSS_COMPILE=${TARGET_PREFIX} \ | ||
95 | ARCH=${ARCH} \ | ||
96 | CC="${CC}" \ | ||
97 | CCLD="${CC}" \ | ||
98 | LDSHARED="${CC} -shared" \ | ||
99 | AR="${AR}" \ | ||
100 | LD="${LD}" \ | ||
101 | EXTRA_CFLAGS="-ldw -I${S}" \ | ||
102 | YFLAGS='-y --file-prefix-map=${WORKDIR}=${TARGET_DBGSRC_DIR}' \ | ||
103 | EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \ | ||
104 | perfexecdir=${libexecdir} \ | ||
105 | NO_GTK2=1 \ | ||
106 | ${PACKAGECONFIG_CONFARGS} \ | ||
107 | PKG_CONFIG=pkg-config \ | ||
108 | TMPDIR="${B}" \ | ||
109 | LIBUNWIND_DIR=${STAGING_EXECPREFIXDIR} \ | ||
110 | ' | ||
111 | |||
112 | EXTRA_OEMAKE += "\ | ||
113 | 'DESTDIR=${D}' \ | ||
114 | 'prefix=${prefix}' \ | ||
115 | 'bindir=${bindir}' \ | ||
116 | 'sharedir=${datadir}' \ | ||
117 | 'sysconfdir=${sysconfdir}' \ | ||
118 | 'perfexecdir=${libexecdir}/perf-core' \ | ||
119 | 'ETC_PERFCONFIG=${@os.path.relpath(sysconfdir, prefix)}' \ | ||
120 | 'sharedir=${@os.path.relpath(datadir, prefix)}' \ | ||
121 | 'mandir=${@os.path.relpath(mandir, prefix)}' \ | ||
122 | 'infodir=${@os.path.relpath(infodir, prefix)}' \ | ||
123 | ${@bb.utils.contains('PACKAGECONFIG', 'python', 'PYTHON=python3 PYTHON_CONFIG=python3-config', '', d)} \ | ||
124 | " | ||
125 | |||
126 | # During do_configure, we might run a 'make clean'. That often breaks | ||
127 | # when done in parallel, so disable parallelism for do_configure. Note | ||
128 | # that it has to be done this way rather than by passing -j1, since | ||
129 | # perf's build system by default ignores any -j argument, but does | ||
130 | # honour a JOBS variable. | ||
131 | EXTRA_OEMAKE:append:task-configure = " JOBS=1" | ||
132 | |||
133 | PERF_SRC ?= "Makefile \ | ||
134 | tools/arch \ | ||
135 | tools/build \ | ||
136 | tools/include \ | ||
137 | tools/lib \ | ||
138 | tools/Makefile \ | ||
139 | tools/perf \ | ||
140 | tools/scripts \ | ||
141 | scripts/ \ | ||
142 | arch/arm64/tools \ | ||
143 | arch/${ARCH}/Makefile \ | ||
144 | " | ||
145 | |||
146 | PERF_EXTRA_LDFLAGS = "" | ||
147 | |||
148 | # MIPS N32/N64 | ||
149 | PERF_EXTRA_LDFLAGS:mipsarchn32eb = "-m elf32btsmipn32" | ||
150 | PERF_EXTRA_LDFLAGS:mipsarchn32el = "-m elf32ltsmipn32" | ||
151 | PERF_EXTRA_LDFLAGS:mipsarchn64eb = "-m elf64btsmip" | ||
152 | PERF_EXTRA_LDFLAGS:mipsarchn64el = "-m elf64ltsmip" | ||
153 | |||
154 | do_compile() { | ||
155 | # Linux kernel build system is expected to do the right thing | ||
156 | unset CFLAGS | ||
157 | test -e ${S}/tools/lib/traceevent/plugins/Makefile && \ | ||
158 | sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/lib/traceevent/plugins/Makefile | ||
159 | test -e ${S}/tools/perf/Makefile.config && \ | ||
160 | sed -i -e 's|\$(libdir)/traceevent/plugins|\$(libdir)/traceevent_${KERNEL_VERSION}/plugins|g' ${S}/tools/perf/Makefile.config | ||
161 | oe_runmake all | ||
162 | } | ||
163 | |||
164 | do_install() { | ||
165 | # Linux kernel build system is expected to do the right thing | ||
166 | unset CFLAGS | ||
167 | oe_runmake install | ||
168 | # we are checking for this make target to be compatible with older perf versions | ||
169 | if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)} && grep -q install-python_ext ${S}/tools/perf/Makefile*; then | ||
170 | oe_runmake DESTDIR=${D} install-python_ext | ||
171 | if [ -e ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt ]; then | ||
172 | sed -i -e 's#${WORKDIR}##g' ${D}${libdir}/python*/site-packages/perf-*/SOURCES.txt | ||
173 | fi | ||
174 | fi | ||
175 | } | ||
176 | |||
177 | do_configure[prefuncs] += "copy_perf_source_from_kernel" | ||
178 | python copy_perf_source_from_kernel() { | ||
179 | sources = (d.getVar("PERF_SRC") or "").split() | ||
180 | src_dir = d.getVar("STAGING_KERNEL_DIR") | ||
181 | dest_dir = d.getVar("S") | ||
182 | bb.utils.mkdirhier(dest_dir) | ||
183 | bb.utils.prunedir(dest_dir) | ||
184 | for s in sources: | ||
185 | src = oe.path.join(src_dir, s) | ||
186 | dest = oe.path.join(dest_dir, s) | ||
187 | if not os.path.exists(src): | ||
188 | bb.warn("Path does not exist: %s. Maybe PERF_SRC lists more files than what your kernel version provides and needs." % src) | ||
189 | continue | ||
190 | if os.path.isdir(src): | ||
191 | oe.path.copyhardlinktree(src, dest) | ||
192 | else: | ||
193 | src_path = os.path.dirname(s) | ||
194 | os.makedirs(os.path.join(dest_dir,src_path),exist_ok=True) | ||
195 | bb.utils.copyfile(src, dest) | ||
196 | } | ||
197 | |||
198 | do_configure:prepend () { | ||
199 | # If building a multlib based perf, the incorrect library path will be | ||
200 | # detected by perf, since it triggers via: ifeq ($(ARCH),x86_64). In a 32 bit | ||
201 | # build, with a 64 bit multilib, the arch won't match and the detection of a | ||
202 | # 64 bit build (and library) are not exected. To ensure that libraries are | ||
203 | # installed to the correct location, we can use the weak assignment in the | ||
204 | # config/Makefile. | ||
205 | # | ||
206 | # Also need to relocate .config-detected to $(OUTPUT)/config-detected | ||
207 | # for kernel sources that do not already do this | ||
208 | # as two builds (e.g. perf and lib32-perf from mutlilib can conflict | ||
209 | # with each other if its in the shared source directory | ||
210 | # | ||
211 | if [ -e "${S}/tools/perf/config/Makefile" ]; then | ||
212 | perfconfig="${S}/tools/perf/config/Makefile" | ||
213 | fi | ||
214 | if [ -e "${S}/tools/perf/Makefile.config" ]; then | ||
215 | perfconfig="${S}/tools/perf/Makefile.config" | ||
216 | fi | ||
217 | if [ -n "${perfconfig}" ]; then | ||
218 | # Match $(prefix)/$(lib) and $(prefix)/lib | ||
219 | sed -i -e 's,^libdir = \($(prefix)/.*lib\),libdir ?= \1,' \ | ||
220 | -e 's,^perfexecdir = \(.*\),perfexecdir ?= \1,' \ | ||
221 | -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ | ||
222 | ${perfconfig} | ||
223 | fi | ||
224 | # The man pages installation is "$(INSTALL) -d -m 755 $(DESTDIR)$(man1dir)" | ||
225 | # in ${S}/tools/perf/Documentation/Makefile, if the mandir set to '?=', it | ||
226 | # will use the relative path 'share/man', in the way it will resulting in | ||
227 | # incorrect installation for man pages. | ||
228 | if [ -e "${S}/tools/perf/Documentation/Makefile" ]; then | ||
229 | sed -i 's,^mandir?=,mandir:=,' ${S}/tools/perf/Documentation/Makefile | ||
230 | fi | ||
231 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | ||
232 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ | ||
233 | ${S}/tools/perf/Makefile.perf | ||
234 | sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(PYTHON_SITEPACKAGES_DIR)' --root='\$(DESTDIR)',g" \ | ||
235 | ${S}/tools/perf/Makefile.perf | ||
236 | # backport https://github.com/torvalds/linux/commit/e4ffd066ff440a57097e9140fa9e16ceef905de8 | ||
237 | sed -i -e 's,\($(Q)$(SHELL) .$(arch_errno_tbl).\) $(CC) $(arch_errno_hdr_dir),\1 $(firstword $(CC)) $(arch_errno_hdr_dir),g' \ | ||
238 | ${S}/tools/perf/Makefile.perf | ||
239 | fi | ||
240 | sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \ | ||
241 | ${S}/tools/perf/Makefile* | ||
242 | |||
243 | if [ -e "${S}/tools/build/Makefile.build" ]; then | ||
244 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ | ||
245 | ${S}/tools/build/Makefile.build | ||
246 | fi | ||
247 | |||
248 | # start reproducibility substitutions | ||
249 | if [ -e "${S}/tools/perf/Makefile.config" ]; then | ||
250 | # The following line in the Makefle: | ||
251 | # override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO)) | ||
252 | # "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've | ||
253 | # ensure that the environment is setup and we do not need the full path to be | ||
254 | # captured, since the symbol gets built into the executable, making it not | ||
255 | # reproducible. | ||
256 | sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON_AUTO))),g' \ | ||
257 | ${S}/tools/perf/Makefile.config | ||
258 | # The same line is in older releases, but looking explicitly for Python 2 | ||
259 | sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(PYTHON2)),$(notdir $(call get-executable-or-default\,PYTHON\,$(PYTHON2))),g' \ | ||
260 | ${S}/tools/perf/Makefile.config | ||
261 | |||
262 | # likewise with this substitution. Kernels with commit 18f2967418d031a39 | ||
263 | # [perf tools: Use Python devtools for version autodetection rather than runtime] | ||
264 | # need this substitution for reproducibility. | ||
265 | sed -i -e 's,$(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO))),$(notdir $(call get-executable-or-default\,PYTHON\,$(subst -config\,\,$(PYTHON_AUTO)))),g' \ | ||
266 | ${S}/tools/perf/Makefile.config | ||
267 | |||
268 | # The following line: | ||
269 | # srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))), | ||
270 | # Captures the full src path of perf, which of course makes it not | ||
271 | # reproducible. We really only need the relative location 'tools/perf', so we | ||
272 | # change the Makefile line to remove everything before 'tools/perf' | ||
273 | sed -i -e "s%srcdir_SQ = \$(subst ','\\\'',\$(srcdir))%srcdir_SQ = \$(patsubst \%tools/perf,tools/perf,\$(subst ','\\\'',\$(srcdir)))%g" \ | ||
274 | ${S}/tools/perf/Makefile.config | ||
275 | # Avoid hardcoded path to python-native | ||
276 | sed -i -e 's#\(PYTHON_WORD := \)$(call shell-wordify,$(PYTHON))#\1 python3#g' \ | ||
277 | ${S}/tools/perf/Makefile.config | ||
278 | fi | ||
279 | if [ -e "${S}/tools/perf/tests/Build" ]; then | ||
280 | # OUTPUT is the full path, we have python on the path so we remove it from the | ||
281 | # definition. This is captured in the perf binary, so breaks reproducibility | ||
282 | sed -i -e 's,PYTHONPATH="BUILD_STR($(OUTPUT)python)",PYTHONPATH="BUILD_STR(python)",g' \ | ||
283 | ${S}/tools/perf/tests/Build | ||
284 | fi | ||
285 | if [ -e "${S}/tools/perf/util/Build" ]; then | ||
286 | # To avoid bison generating #ifdefs that have captured paths, we make sure | ||
287 | # all the calls have YFLAGS, which contains prefix mapping information. | ||
288 | sed -i -e 's,$(BISON),$(BISON) $(YFLAGS),g' ${S}/tools/perf/util/Build | ||
289 | fi | ||
290 | if [ -e "${S}/scripts/Makefile.host" ]; then | ||
291 | # To avoid yacc (bison) generating #ifdefs that have captured paths, we make sure | ||
292 | # all the calls have YFLAGS, which contains prefix mapping information. | ||
293 | sed -i -e 's,$(YACC),$(YACC) $(YFLAGS),g' ${S}/scripts/Makefile.host | ||
294 | fi | ||
295 | if [ -e "${S}/tools/perf/pmu-events/Build" ]; then | ||
296 | target='$(OUTPUT)pmu-events/pmu-events.c $(V)' | ||
297 | replacement1='$(OUTPUT)pmu-events/pmu-events.c $(V)\n' | ||
298 | replacement2='\t$(srctree)/sort-pmuevents.py $(OUTPUT)pmu-events/pmu-events.c $(OUTPUT)pmu-events/pmu-events.c.new\n' | ||
299 | replacement3='\tcp $(OUTPUT)pmu-events/pmu-events.c.new $(OUTPUT)pmu-events/pmu-events.c' | ||
300 | sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \ | ||
301 | "${S}/tools/perf/pmu-events/Build" | ||
302 | fi | ||
303 | if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then | ||
304 | sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: e.name)#g" \ | ||
305 | "${S}/tools/perf/pmu-events/jevents.py" | ||
306 | fi | ||
307 | if [ -e "${S}/tools/perf/arch/arm64/Makefile" ]; then | ||
308 | sed -i 's,sysdef := $(srctree)/,sysdef := ,' ${S}/tools/perf/arch/arm64/Makefile | ||
309 | sed -i 's,$(incpath) $(sysdef),$(incpath) $(srctree)/$(sysdef) $(sysdef),' ${S}/tools/perf/arch/arm64/Makefile | ||
310 | fi | ||
311 | if [ -e "${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl" ]; then | ||
312 | if ! grep -q input_rel ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl; then | ||
313 | sed -i 's,input=$4,input=$4\ninput_rel=$5,' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | ||
314 | fi | ||
315 | sed -i 's,#include \\"\$input\\",#include \\"\$input_rel\\",' ${S}/tools/perf/arch/arm64/entry/syscalls/mksyscalltbl | ||
316 | fi | ||
317 | # end reproducibility substitutions | ||
318 | |||
319 | # We need to ensure the --sysroot option in CC is preserved | ||
320 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | ||
321 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/perf/Makefile.perf | ||
322 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/perf/Makefile.perf | ||
323 | sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/perf/Makefile.perf | ||
324 | sed -i 's,PKG_CONFIG = $(CROSS_COMPILE)pkg-config,#PKG_CONFIG,' ${S}/tools/perf/Makefile.perf | ||
325 | fi | ||
326 | if [ -e "${S}/tools/lib/api/Makefile" ]; then | ||
327 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile | ||
328 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile | ||
329 | sed -i 's,LD = $(CROSS_COMPILE)ld,#LD,' ${S}/tools/lib/api/Makefile | ||
330 | fi | ||
331 | if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then | ||
332 | sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile | ||
333 | sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile | ||
334 | fi | ||
335 | if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then | ||
336 | sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile | ||
337 | fi | ||
338 | if [ -e "${S}/tools/build/Makefile.feature" ]; then | ||
339 | sed -i 's,CFLAGS=,CC="\$(CC)" CFLAGS=,' ${S}/tools/build/Makefile.feature | ||
340 | fi | ||
341 | # The libperl feature check produces fatal warnings due to -Werror being | ||
342 | # used, silence enough errors that the check passes. | ||
343 | sed -i 's/\(FLAGS_PERL_EMBED=.*\)/\1 -Wno-error=unused-function -Wno-error=attributes/' ${S}/tools/build/feature/Makefile | ||
344 | |||
345 | # 3.17-rc1+ has a include issue for arm/powerpc. Temporarily sed in the appropriate include | ||
346 | if [ -e "${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c" ]; then | ||
347 | sed -i 's,#include "util/callchain.h",#include "util/callchain.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/$ARCH/util/skip-callchain-idx.c | ||
348 | fi | ||
349 | if [ -e "${S}/tools/perf/arch/arm/util/unwind-libunwind.c" ] && [ -e "${S}/tools/perf/arch/arm/tests/dwarf-unwind.c" ]; then | ||
350 | sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c | ||
351 | sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c | ||
352 | fi | ||
353 | |||
354 | # use /usr/bin/env instead of version specific python | ||
355 | for s in `find ${S}/tools/perf/ -name '*.py'` `find ${S}/scripts/ -name 'bpf_helpers_doc.py'`; do | ||
356 | sed -i -e "s,#!.*python.*,#!${USRBINPATH}/env python3," ${s} | ||
357 | done | ||
358 | |||
359 | # unistd.h can be out of sync between libc-headers and the captured version in the perf source | ||
360 | # so we copy it from the sysroot unistd.h to the perf unistd.h | ||
361 | install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h | ||
362 | install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h | ||
363 | |||
364 | # the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and | ||
365 | # copy for a helper script we need | ||
366 | for p in $(echo ${FILESPATH} | tr ':' '\n'); do | ||
367 | if [ -e $p/sort-pmuevents.py ]; then | ||
368 | cp $p/sort-pmuevents.py ${S} | ||
369 | fi | ||
370 | done | ||
371 | } | ||
372 | |||
373 | python do_package:prepend() { | ||
374 | d.setVar('PKGV', d.getVar("KERNEL_VERSION").split("-")[0]) | ||
375 | } | ||
376 | |||
377 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
378 | |||
379 | |||
380 | PACKAGES =+ "${PN}-archive ${PN}-tests ${PN}-perl ${PN}-python" | ||
381 | |||
382 | RDEPENDS:${PN} += "elfutils bash" | ||
383 | RDEPENDS:${PN}-archive =+ "bash" | ||
384 | RDEPENDS:${PN}-python =+ "bash python3 python3-modules ${@bb.utils.contains('PACKAGECONFIG', 'audit', 'audit-python', '', d)}" | ||
385 | RDEPENDS:${PN}-perl =+ "bash perl perl-modules" | ||
386 | RDEPENDS:${PN}-tests =+ "python3 bash" | ||
387 | |||
388 | RSUGGESTS:${PN} += "${PN}-archive ${PN}-tests \ | ||
389 | ${@bb.utils.contains('PACKAGECONFIG', 'perl', '${PN}-perl', '', d)} \ | ||
390 | ${@bb.utils.contains('PACKAGECONFIG', 'python', '${PN}-python', '', d)} \ | ||
391 | " | ||
392 | FILES_SOLIBSDEV = "" | ||
393 | FILES:${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent* ${libdir}/libperf-jvmti.so" | ||
394 | FILES:${PN}-archive = "${libdir}/perf/perf-core/perf-archive" | ||
395 | FILES:${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests" | ||
396 | FILES:${PN}-python = " \ | ||
397 | ${PYTHON_SITEPACKAGES_DIR} \ | ||
398 | ${libexecdir}/perf-core/scripts/python \ | ||
399 | " | ||
400 | FILES:${PN}-perl = "${libexecdir}/perf-core/scripts/perl" | ||
401 | |||
402 | DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized" | ||
403 | |||
404 | PACKAGESPLITFUNCS =+ "perf_fix_sources" | ||
405 | |||
406 | perf_fix_sources () { | ||
407 | for f in util/parse-events-flex.h util/parse-events-flex.c util/pmu-flex.c \ | ||
408 | util/pmu-flex.h util/expr-flex.h util/expr-flex.c; do | ||
409 | f=${PKGD}${TARGET_DBGSRC_DIR}/$f | ||
410 | if [ -e $f ]; then | ||
411 | sed -i -e 's#${S}/##g' $f | ||
412 | fi | ||
413 | done | ||
414 | } | ||
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py b/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py new file mode 100755 index 00000000..0362f2d8 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py | |||
@@ -0,0 +1,100 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | |||
3 | # perf pmu-events sorting tool | ||
4 | # | ||
5 | # Copyright (C) 2021 Bruce Ashfield | ||
6 | # | ||
7 | # SPDX-License-Identifier: MIT | ||
8 | # | ||
9 | |||
10 | import sys | ||
11 | import os | ||
12 | import re | ||
13 | from collections import OrderedDict | ||
14 | |||
15 | if len(sys.argv) < 2: | ||
16 | print( "[ERROR]: input and output pmu files missing" ) | ||
17 | sys.exit(1) | ||
18 | |||
19 | if len(sys.argv) < 3: | ||
20 | print( "[ERROR]: output pmu file missing" ) | ||
21 | sys.exit(1) | ||
22 | |||
23 | infile = sys.argv[1] | ||
24 | outfile = sys.argv[2] | ||
25 | |||
26 | if not os.path.exists(infile): | ||
27 | print( "ERROR. input file does not exist: %s" % infile ) | ||
28 | sys.exit(1) | ||
29 | |||
30 | if os.path.exists(outfile): | ||
31 | print( "WARNING. output file will be overwritten: %s" % infile ) | ||
32 | |||
33 | with open(infile, 'r') as file: | ||
34 | data = file.read() | ||
35 | |||
36 | preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL ) | ||
37 | |||
38 | preamble = re.search( preamble_regex, data ) | ||
39 | struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) | ||
40 | field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) | ||
41 | cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) | ||
42 | name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) | ||
43 | |||
44 | # create a dictionary structure to store all the structs, their | ||
45 | # types and then their fields. | ||
46 | entry_dict = {} | ||
47 | for struct in re.findall( struct_block_regex, data ): | ||
48 | # print( "struct: %s %s %s" % (struct[0],struct[1],struct[2]) ) | ||
49 | entry_dict[struct[2]] = {} | ||
50 | entry_dict[struct[2]]['type_prefix'] = struct[0] | ||
51 | entry_dict[struct[2]]['type'] = struct[1] | ||
52 | entry_dict[struct[2]]['fields'] = {} | ||
53 | for entry in re.findall( field_regex, struct[3] ): | ||
54 | #print( " entry: %s" % entry ) | ||
55 | cpuid = re.search( cpuid_regex, entry ) | ||
56 | if cpuid: | ||
57 | #print( " cpuid found: %s" % cpuid.group(1) ) | ||
58 | entry_dict[struct[2]]['fields'][cpuid.group(1)] = entry | ||
59 | |||
60 | name = re.search( name_regex, entry ) | ||
61 | if name: | ||
62 | #print( " name found: %s" % name.group(1) ) | ||
63 | entry_dict[struct[2]]['fields'][name.group(1)] = entry | ||
64 | |||
65 | # unmatched entries are most likely array terminators and | ||
66 | # should end up as the last element in the sorted list, which | ||
67 | # is achieved by using '0' as the key | ||
68 | if not cpuid and not name: | ||
69 | entry_dict[struct[2]]['fields']['0'] = entry | ||
70 | |||
71 | # created ordered dictionaries from the captured values. These are ordered by | ||
72 | # a sorted() iteration of the keys. We don't care about the order we read | ||
73 | # things, just the sorted order. Hency why we couldn't create these during | ||
74 | # reading. | ||
75 | # | ||
76 | # yes, there's a more concise way to do this, but our nested dictionaries of | ||
77 | # fields make it complex enough that it becomes unreadable. | ||
78 | entry_dict_sorted = OrderedDict() | ||
79 | for i in sorted(entry_dict.keys()): | ||
80 | entry_dict_sorted[i] = {} | ||
81 | entry_dict_sorted[i]['type_prefix'] = entry_dict[i]['type_prefix'] | ||
82 | entry_dict_sorted[i]['type'] = entry_dict[i]['type'] | ||
83 | entry_dict_sorted[i]['fields'] = {} | ||
84 | for f in sorted(entry_dict[i]['fields'].keys()): | ||
85 | entry_dict_sorted[i]['fields'][f] = entry_dict[i]['fields'][f] | ||
86 | |||
87 | # dump the sorted elements to the outfile | ||
88 | outf = open( outfile, 'w' ) | ||
89 | |||
90 | print( preamble.group(1) ) | ||
91 | outf.write( preamble.group(1) ) | ||
92 | for d in entry_dict_sorted: | ||
93 | outf.write( "%s %s %s[] = {\n" % (entry_dict_sorted[d]['type_prefix'], entry_dict_sorted[d]['type'],d) ) | ||
94 | for f in entry_dict_sorted[d]['fields']: | ||
95 | outf.write( entry_dict_sorted[d]['fields'][f] + '\n' ) | ||
96 | |||
97 | outf.write( "};\n" ) | ||
98 | |||
99 | outf.close() | ||
100 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch new file mode 100644 index 00000000..c7777360 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio/0001-default.pai.in-disable-tsched-system-timer-based-mod.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 059f28d8eae7a1ef237eccbaaa7493480f83b764 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
3 | Date: Fri, 2 Sep 2022 01:56:47 -0700 | ||
4 | Subject: [PATCH] default.pai.in: disable tsched (system-timer based model) | ||
5 | |||
6 | With tsched enabled we see clicking noise on DisplayPort for initial 5 sec | ||
7 | every time audio is played. Disabling the same fixes the issue. | ||
8 | |||
9 | Upstream-Status: Inappropriate [disable feature] | ||
10 | |||
11 | Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
12 | --- | ||
13 | src/daemon/default.pa.in | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in | ||
17 | index a3ddad9..37af3f2 100755 | ||
18 | --- a/src/daemon/default.pa.in | ||
19 | +++ b/src/daemon/default.pa.in | ||
20 | @@ -55,7 +55,7 @@ ifelse(@HAVE_MKFIFO@, 1, [dnl | ||
21 | ### Automatically load driver modules depending on the hardware available | ||
22 | ifelse(@HAVE_UDEV@, 1, [dnl | ||
23 | .ifexists module-udev-detect@PA_SOEXT@ | ||
24 | -load-module module-udev-detect | ||
25 | +load-module module-udev-detect tsched=0 | ||
26 | .else | ||
27 | ], @HAVE_COREAUDIO@, 1, [dnl | ||
28 | .ifexists module-coreaudio-detect@PA_SOEXT@ | ||
29 | -- | ||
30 | 2.17.1 | ||
31 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend new file mode 100644 index 00000000..7aae4a3a --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend | |||
@@ -0,0 +1,7 @@ | |||
1 | # This change appears to only affect ZynqMP configurations | ||
2 | # but needs to be applied generically to all aarch64 since it affects a lot of | ||
3 | # dependencies. | ||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
5 | SRC_URI:append = " \ | ||
6 | file://0001-default.pai.in-disable-tsched-system-timer-based-mod.patch \ | ||
7 | " | ||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch new file mode 100644 index 00000000..fac2d719 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 373923a8cddb0b1854d3040a6ba0cf016a244128 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anil Kumar M <amamidal@xilinx.com> | ||
3 | Date: Mon, 24 Feb 2020 14:45:46 +0530 | ||
4 | Subject: [PATCH] v4l-utils: Add support for new media bus codes | ||
5 | |||
6 | Add new media bus format codes for supporting xilinx | ||
7 | specific formats. | ||
8 | |||
9 | Signed-off-by: Anil Kumar M <amamidal@xilinx.com> | ||
10 | --- | ||
11 | include/linux/media-bus-format.h | 12 ++++++++++++ | ||
12 | utils/media-ctl/libv4l2subdev.c | 11 +++++++++++ | ||
13 | 2 files changed, 23 insertions(+) | ||
14 | |||
15 | diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h | ||
16 | index d6a5a3b..3fb2346 100644 | ||
17 | --- a/include/linux/media-bus-format.h | ||
18 | +++ b/include/linux/media-bus-format.h | ||
19 | @@ -108,6 +108,18 @@ | ||
20 | #define MEDIA_BUS_FMT_YUV16_1X48 0x202a | ||
21 | #define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b | ||
22 | |||
23 | +/* YUV: Xilinx Specific - next is 0x2109 */ | ||
24 | +#define MEDIA_BUS_FMT_VYYUYY8_1X24 0x2100 | ||
25 | +#define MEDIA_BUS_FMT_VYYUYY10_4X20 0x2101 | ||
26 | +#define MEDIA_BUS_FMT_VUY10_1X30 0x2102 | ||
27 | +#define MEDIA_BUS_FMT_UYYVYY12_4X24 0x2103 | ||
28 | +#define MEDIA_BUS_FMT_VUY12_1X36 0x2104 | ||
29 | +#define MEDIA_BUS_FMT_Y16_1X16 0x2105 | ||
30 | +#define MEDIA_BUS_FMT_UYYVYY16_4X32 0x2106 | ||
31 | +#define MEDIA_BUS_FMT_VUY16_1X48 0x2107 | ||
32 | +#define MEDIA_BUS_FMT_UYVY16_2X32 0x2108 | ||
33 | + | ||
34 | + | ||
35 | /* Bayer - next is 0x3021 */ | ||
36 | #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 | ||
37 | #define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 | ||
38 | diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c | ||
39 | index a989efb..a37541f 100644 | ||
40 | --- a/utils/media-ctl/libv4l2subdev.c | ||
41 | +++ b/utils/media-ctl/libv4l2subdev.c | ||
42 | @@ -34,6 +34,17 @@ | ||
43 | |||
44 | #include <linux/v4l2-subdev.h> | ||
45 | |||
46 | +/* YUV: Xilinx Specific - next is 0x2109 */ | ||
47 | +#define MEDIA_BUS_FMT_VYYUYY8_1X24 (0x2100) | ||
48 | +#define MEDIA_BUS_FMT_VYYUYY10_4X20 (0x2101) | ||
49 | +#define MEDIA_BUS_FMT_VUY10_1X30 (0x2102) | ||
50 | +#define MEDIA_BUS_FMT_UYYVYY12_4X24 (0x2103) | ||
51 | +#define MEDIA_BUS_FMT_VUY12_1X36 (0x2104) | ||
52 | +#define MEDIA_BUS_FMT_Y16_1X16 (0x2105) | ||
53 | +#define MEDIA_BUS_FMT_UYYVYY16_4X32 (0x2106) | ||
54 | +#define MEDIA_BUS_FMT_VUY16_1X48 (0x2107) | ||
55 | +#define MEDIA_BUS_FMT_UYVY16_2X32 (0x2108) | ||
56 | + | ||
57 | #include "mediactl.h" | ||
58 | #include "mediactl-priv.h" | ||
59 | #include "tools.h" | ||
60 | -- | ||
61 | 2.7.4 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend b/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend new file mode 100644 index 00000000..3d177bce --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | SRC_URI:append = " file://0001-v4l-utils-Add-support-for-new-media-bus-codes.patch" | ||
2 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch new file mode 100644 index 00000000..42b108fe --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 4d8ac36340423844be76ceb506bc0e4f48772944 Mon Sep 17 00:00:00 2001 | ||
2 | From: Devarsh Thakkar <devarsh.thakkar@xilinx.com> | ||
3 | Date: Tue, 7 Sep 2021 06:08:55 -0700 | ||
4 | Subject: [PATCH 1/2] Add support for 3 planar YUV444P 8bpc | ||
5 | |||
6 | This patch adds support for single contiguous buffer 3 planar YUV444P | ||
7 | 8 bpc format. | ||
8 | |||
9 | Signed-off-by: Devarsh Thakkar <devarsh.thakkar@xilinx.com> | ||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | --- | ||
12 | include/linux/videodev2.h | 1 + | ||
13 | yavta.c | 1 + | ||
14 | 2 files changed, 2 insertions(+) | ||
15 | |||
16 | Index: git/include/linux/videodev2.h | ||
17 | =================================================================== | ||
18 | --- git.orig/include/linux/videodev2.h | ||
19 | +++ git/include/linux/videodev2.h | ||
20 | @@ -545,6 +545,7 @@ struct v4l2_pix_format { | ||
21 | #define V4L2_PIX_FMT_VYUY v4l2_fourcc('V', 'Y', 'U', 'Y') /* 16 YUV 4:2:2 */ | ||
22 | #define V4L2_PIX_FMT_Y41P v4l2_fourcc('Y', '4', '1', 'P') /* 12 YUV 4:1:1 */ | ||
23 | #define V4L2_PIX_FMT_YUV444 v4l2_fourcc('Y', '4', '4', '4') /* 16 xxxxyyyy uuuuvvvv */ | ||
24 | +#define V4L2_PIX_FMT_YUV444P v4l2_fourcc('4', '4', '4', 'P') /* 24 YUV444 planar */ | ||
25 | #define V4L2_PIX_FMT_YUV555 v4l2_fourcc('Y', 'U', 'V', 'O') /* 16 YUV-5-5-5 */ | ||
26 | #define V4L2_PIX_FMT_YUV565 v4l2_fourcc('Y', 'U', 'V', 'P') /* 16 YUV-5-6-5 */ | ||
27 | #define V4L2_PIX_FMT_YUV32 v4l2_fourcc('Y', 'U', 'V', '4') /* 32 YUV-8-8-8-8 */ | ||
28 | Index: git/yavta.c | ||
29 | =================================================================== | ||
30 | --- git.orig/yavta.c | ||
31 | +++ git/yavta.c | ||
32 | @@ -309,6 +309,7 @@ static struct v4l2_format_info { | ||
33 | { "YVYU", V4L2_PIX_FMT_YVYU, 1 }, | ||
34 | { "NV12", V4L2_PIX_FMT_NV12, 1 }, | ||
35 | { "NV12M", V4L2_PIX_FMT_NV12M, 2 }, | ||
36 | + { "YUV444P", V4L2_PIX_FMT_YUV444P, 1 }, | ||
37 | { "NV21", V4L2_PIX_FMT_NV21, 1 }, | ||
38 | { "NV21M", V4L2_PIX_FMT_NV21M, 2 }, | ||
39 | { "NV16", V4L2_PIX_FMT_NV16, 1 }, | ||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch new file mode 100644 index 00000000..5dfbfa2e --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From dedd0eb76ced425610bdd695029489f553923b2e Mon Sep 17 00:00:00 2001 | ||
2 | From: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
3 | Date: Wed, 27 Oct 2021 02:45:39 -0700 | ||
4 | Subject: [PATCH 2/2] Add support 3 planar YUV 444 10bpc pixel format in | ||
5 | contiguous memory | ||
6 | |||
7 | The new format X403 is added to support 3 planar YUV 444 10bpc | ||
8 | 30 bits per sample image data in a single contiguous buffer. | ||
9 | |||
10 | Signed-off-by: Rohit Visavalia <rohit.visavalia@xilinx.com> | ||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | --- | ||
13 | include/linux/videodev2.h | 2 ++ | ||
14 | yavta.c | 1 + | ||
15 | 2 files changed, 3 insertions(+) | ||
16 | |||
17 | Index: git/include/linux/videodev2.h | ||
18 | =================================================================== | ||
19 | --- git.orig/include/linux/videodev2.h | ||
20 | +++ git/include/linux/videodev2.h | ||
21 | @@ -585,6 +585,8 @@ struct v4l2_pix_format { | ||
22 | #define V4L2_PIX_FMT_YUV444M v4l2_fourcc('Y', 'M', '2', '4') /* 24 YUV444 planar */ | ||
23 | #define V4L2_PIX_FMT_YVU444M v4l2_fourcc('Y', 'M', '4', '2') /* 24 YVU444 planar */ | ||
24 | |||
25 | +#define V4L2_PIX_FMT_X403 v4l2_fourcc('X', '4', '0', '3') /* 32 YUV planar 4:4:4 10-bit */ | ||
26 | + | ||
27 | /* Bayer formats - see http://www.siliconimaging.com/RGB%20Bayer.htm */ | ||
28 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B', 'A', '8', '1') /* 8 BGBG.. GRGR.. */ | ||
29 | #define V4L2_PIX_FMT_SGBRG8 v4l2_fourcc('G', 'B', 'R', 'G') /* 8 GBGB.. RGRG.. */ | ||
30 | Index: git/yavta.c | ||
31 | =================================================================== | ||
32 | --- git.orig/yavta.c | ||
33 | +++ git/yavta.c | ||
34 | @@ -324,6 +324,7 @@ static struct v4l2_format_info { | ||
35 | { "YVU420M", V4L2_PIX_FMT_YVU420M, 3 }, | ||
36 | { "YVU422M", V4L2_PIX_FMT_YVU422M, 3 }, | ||
37 | { "YVU444M", V4L2_PIX_FMT_YVU444M, 3 }, | ||
38 | + { "X403", V4L2_PIX_FMT_X403, 1 }, | ||
39 | { "SBGGR8", V4L2_PIX_FMT_SBGGR8, 1 }, | ||
40 | { "SGBRG8", V4L2_PIX_FMT_SGBRG8, 1 }, | ||
41 | { "SGRBG8", V4L2_PIX_FMT_SGRBG8, 1 }, | ||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend new file mode 100644 index 00000000..52eab13d --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | SRC_URI:append = " \ | ||
3 | file://0001-Add-support-for-3-planar-YUV444P-8bpc.patch \ | ||
4 | file://0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch \ | ||
5 | " | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules b/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules index 4643ad37..1e0008a0 100644 --- a/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules +++ b/meta-xilinx-core/recipes-multimedia/vcu/files/99-vcu-enc-dec.rules | |||
@@ -5,3 +5,6 @@ SUBSYSTEM=="allegro_decode_class", KERNEL=="allegroDecodeIP", MODE="0660", GROUP | |||
5 | # Xilinx Video DMA driver | 5 | # Xilinx Video DMA driver |
6 | SUBSYSTEM=="char", KERNEL=="dmaproxy", MODE="0660", GROUP="video" | 6 | SUBSYSTEM=="char", KERNEL=="dmaproxy", MODE="0660", GROUP="video" |
7 | 7 | ||
8 | # Xilinx SyncIP driver | ||
9 | SUBSYSTEM=="xlnxsync", KERNEL=="xlnxsync0", MODE="0660", GROUP="video" | ||
10 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb new file mode 100644 index 00000000..35dffb16 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2024.1.bb | |||
@@ -0,0 +1,39 @@ | |||
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 = "master" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "2ae83fc79f8a2db74be65883583cc6ad32d245e5" | ||
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_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb new file mode 100644 index 00000000..420fdf1d --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2024.1.bb | |||
@@ -0,0 +1,50 @@ | |||
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=002a0a92906100955ea6ed02dcd2c2cd" | ||
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 ?= "master" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "01e45e0ac2f869cd46286307ae94d19010fd46df" | ||
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 | oe_runmake install INSTALL_PATH=${D}${bindir} | ||
41 | |||
42 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
45 | } | ||
46 | |||
47 | # These libraries shouldn't get installed in world builds unless something | ||
48 | # explicitly depends upon them. | ||
49 | |||
50 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb new file mode 100644 index 00000000..ac7e4aa3 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2024.1.bb | |||
@@ -0,0 +1,41 @@ | |||
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=002a0a92906100955ea6ed02dcd2c2cd" | ||
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 ?= "master" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "918ec1e87c67b2746fe0f2bfa9f1503d307b9bc2" | ||
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 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
23 | |||
24 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
29 | |||
30 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include INSTALL_PATH=${D}/${bindir} | ||
31 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
32 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
33 | } | ||
34 | |||
35 | # These libraries shouldn't get installed in world builds unless something | ||
36 | # explicitly depends upon them. | ||
37 | |||
38 | EXCLUDE_FROM_WORLD = "1" | ||
39 | |||
40 | # Disable buildpaths QA check warnings. | ||
41 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb new file mode 100644 index 00000000..cc6cd5bb --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2024.1.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=9bef8aa9d1eba8aca1b7dffdef500262" | ||
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 ?= "master" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "ffe29273f378619a711aa10664612e6c660ee590" | ||
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/kernel-module-vdu_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb index 9b835490..df943bc6 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb | |||
@@ -28,10 +28,6 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | |||
28 | 28 | ||
29 | RDEPENDS:${PN} = "vdu-firmware" | 29 | RDEPENDS:${PN} = "vdu-firmware" |
30 | 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}" | 31 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
36 | 32 | ||
37 | do_install:append() { | 33 | do_install:append() { |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb index 1c9ba8ad..6856ec3a 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.2.bb | |||
@@ -28,10 +28,6 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | |||
28 | 28 | ||
29 | RDEPENDS:${PN} = "vdu-firmware" | 29 | RDEPENDS:${PN} = "vdu-firmware" |
30 | 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}" | 31 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
36 | 32 | ||
37 | do_install:append() { | 33 | do_install:append() { |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb new file mode 100644 index 00000000..0e3afbc1 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2024.1.bb | |||
@@ -0,0 +1,38 @@ | |||
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 ?= "master" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https" | ||
16 | SRCREV ?= "1529b6aaf784fb5e1cafb11c949c3cb3c69d1dfd" | ||
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 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
32 | |||
33 | do_install:append() { | ||
34 | install -d ${D}${sysconfdir}/udev/rules.d | ||
35 | install -m 0644 ${WORKDIR}/99-vdu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
36 | } | ||
37 | |||
38 | 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 index f9228678..c553d99b 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb | |||
@@ -22,10 +22,6 @@ SRC_URI = "${REPO};${BRANCHARG} \ | |||
22 | 22 | ||
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 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}" | 25 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
30 | 26 | ||
31 | RDEPENDS:${PN} = "kernel-module-vdu" | 27 | RDEPENDS:${PN} = "kernel-module-vdu" |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb index f8b36a93..5c47a81e 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.2.bb | |||
@@ -22,10 +22,6 @@ SRC_URI = "${REPO};${BRANCHARG} \ | |||
22 | 22 | ||
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 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}" | 25 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
30 | 26 | ||
31 | RDEPENDS:${PN} = "kernel-module-vdu" | 27 | RDEPENDS:${PN} = "kernel-module-vdu" |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb new file mode 100644 index 00000000..09a06c3e --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2024.1.bb | |||
@@ -0,0 +1,41 @@ | |||
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=002a0a92906100955ea6ed02dcd2c2cd" | ||
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 ?= "master" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" | ||
16 | SRCREV ?= "db37dc935785dff57a52eabc41ac0bf26b0a1707" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG}" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
24 | |||
25 | RDEPENDS:${PN} = "kernel-module-vdu" | ||
26 | |||
27 | do_compile[dirs] = "${S}" | ||
28 | do_install[dirs] = "${S}" | ||
29 | |||
30 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
31 | EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}" | ||
32 | |||
33 | do_install:append() { | ||
34 | |||
35 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
36 | } | ||
37 | |||
38 | # These libraries shouldn't get installed in world builds unless something | ||
39 | # explicitly depends upon them. | ||
40 | |||
41 | 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 index b3c02ca2..f501212d 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb | |||
@@ -21,10 +21,6 @@ inherit autotools features_check | |||
21 | 21 | ||
22 | REQUIRED_MACHINE_FEATURES = "vdu" | 22 | REQUIRED_MACHINE_FEATURES = "vdu" |
23 | 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}" | 24 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
29 | 25 | ||
30 | DEPENDS = "libvdu-ctrlsw" | 26 | DEPENDS = "libvdu-ctrlsw" |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb index 04860b79..fe66c20c 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.2.bb | |||
@@ -21,10 +21,6 @@ inherit autotools features_check | |||
21 | 21 | ||
22 | REQUIRED_MACHINE_FEATURES = "vdu" | 22 | REQUIRED_MACHINE_FEATURES = "vdu" |
23 | 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}" | 24 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
29 | 25 | ||
30 | DEPENDS = "libvdu-ctrlsw" | 26 | DEPENDS = "libvdu-ctrlsw" |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb new file mode 100644 index 00000000..51a03803 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2024.1.bb | |||
@@ -0,0 +1,50 @@ | |||
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=002a0a92906100955ea6ed02dcd2c2cd" | ||
5 | |||
6 | XILINX_VDU_VERSION = "1.0.0" | ||
7 | PV =. "${XILINX_VDU_VERSION}-xilinx-v" | ||
8 | PV .= "+git${SRCPV}" | ||
9 | |||
10 | BRANCH ?= "master" | ||
11 | REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" | ||
12 | SRCREV ?= "a116b0729ace66117ccb7c2aca125c33994b0f41" | ||
13 | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
15 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
16 | " | ||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit autotools features_check | ||
20 | |||
21 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
22 | |||
23 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
24 | |||
25 | DEPENDS = "libvdu-ctrlsw" | ||
26 | RDEPENDS:${PN} = "kernel-module-vdu libvdu-ctrlsw" | ||
27 | |||
28 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include" | ||
29 | |||
30 | do_compile[dirs] = "${S}" | ||
31 | do_install[dirs] = "${S}" | ||
32 | |||
33 | EXTRA_OEMAKE = " \ | ||
34 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
35 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
36 | INSTALL_PATH=${D}${bindir} \ | ||
37 | INCLUDE_INST_PATH=${D}${includedir} \ | ||
38 | " | ||
39 | |||
40 | do_install:append() { | ||
41 | install -d ${D}${libdir} | ||
42 | |||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
45 | } | ||
46 | |||
47 | # These libraries shouldn't get installed in world builds unless something | ||
48 | # explicitly depends upon them. | ||
49 | |||
50 | 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 index 419dd681..bdb4a7be 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.1.bb | |||
@@ -20,10 +20,6 @@ SRCREV ?= "63fe2fce6e46d5bf03e33300a58a37d8568722ee" | |||
20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
21 | SRC_URI = "${REPO};${BRANCHARG}" | 21 | SRC_URI = "${REPO};${BRANCHARG}" |
22 | 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}" | 23 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
28 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" | 24 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" |
29 | 25 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb index ade73a4e..b60b66c2 100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2023.2.bb | |||
@@ -20,10 +20,6 @@ SRCREV ?= "731897772730178f6a4e77eedeb4fb53faa1ab4d" | |||
20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
21 | SRC_URI = "${REPO};${BRANCHARG}" | 21 | SRC_URI = "${REPO};${BRANCHARG}" |
22 | 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}" | 23 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" |
28 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" | 24 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" |
29 | 25 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb new file mode 100644 index 00000000..42806ea4 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vdu/vdu-firmware_2024.1.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "Firmware for VDU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VDU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=722a9d20bf58ac06585a6d91ee36e60e" | ||
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 ?= "master" | ||
17 | REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" | ||
18 | SRCREV ?= "7c4662d0f5b514cbb0b9890bc3011d9450bf3661" | ||
19 | |||
20 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
21 | SRC_URI = "${REPO};${BRANCHARG}" | ||
22 | |||
23 | PACKAGE_ARCH = "${SOC_FAMILY_ARCH}" | ||
24 | EXTRA_OEMAKE +="INSTALL_PATH=${D}/${nonarch_base_libdir}/firmware" | ||
25 | |||
26 | do_compile[noexec] = "1" | ||
27 | do_install[dirs] = "${S}" | ||
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-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 db4f25b4..0da7b6f6 100644 --- a/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb +++ b/meta-xilinx-core/recipes-support/freeipmi/freeipmi_1.6.10.bb | |||
@@ -31,10 +31,8 @@ LIC_FILES_CHKSUM = " \ | |||
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/git/freeipmi.git;protocol=https;branch=${BRANCH} \ | 33 | git://git.savannah.gnu.org/git/freeipmi.git;protocol=https;branch=${BRANCH} \ |
34 | file://0001-Add-initial-support-for-Xilinx-OEM-FRU-records.patch \ | ||
35 | file://0002-ipmi-fru-fix-compilation-for-non-C99-compilation.patch \ | ||
36 | " | 34 | " |
37 | SRCREV ?= "1f7eea294c2967802019100b07cf1e44b3160a2b" | 35 | SRCREV ?= "816a69eb15a9034351381211d9cd15de81da10c7" |
38 | 36 | ||
39 | S = "${WORKDIR}/git" | 37 | S = "${WORKDIR}/git" |
40 | 38 | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb new file mode 100644 index 00000000..e0edbb7b --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_git.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt.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 = "${WORKDIR}/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 ${WORKDIR}/build/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc index 14b2b968..89dc87cc 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt.inc +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt.inc | |||
@@ -2,9 +2,9 @@ REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" | |||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
3 | SRC_URI = "${REPO};${BRANCHARG};name=xrt" | 3 | SRC_URI = "${REPO};${BRANCHARG};name=xrt" |
4 | 4 | ||
5 | BRANCH= "2023.2" | 5 | BRANCH= "master" |
6 | SRCREV_xrt = "2865a62b6a417dea523d2d5646154aa94a2cbc28" | 6 | SRCREV_xrt = "8426f5733c01018acbd8d12745bc9e5ffc4535e6" |
7 | PV = "202320.2.16.0" | 7 | PV = "202320.2.17.0" |
8 | 8 | ||
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" | 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" |
10 | SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" | 10 | SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" |
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch new file mode 100644 index 00000000..f2f63470 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt/disable_aie_profiling.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | diff --git a/src/runtime_src/xdp/profile/plugin/CMakeLists.txt b/src/runtime_src/xdp/profile/plugin/CMakeLists.txt | ||
2 | index 8ef7a2f..9b8baac 100644 | ||
3 | --- a/src/runtime_src/xdp/profile/plugin/CMakeLists.txt | ||
4 | +++ b/src/runtime_src/xdp/profile/plugin/CMakeLists.txt | ||
5 | @@ -33,9 +33,9 @@ if (NOT WIN32) | ||
6 | # ========================================================= | ||
7 | # The plugins to be built on Linux only | ||
8 | # ========================================================= | ||
9 | -add_subdirectory(aie_status) | ||
10 | -add_subdirectory(aie_profile) | ||
11 | -add_subdirectory(aie_trace) | ||
12 | +#add_subdirectory(aie_status) | ||
13 | +#add_subdirectory(aie_profile) | ||
14 | +#add_subdirectory(aie_trace) | ||
15 | add_subdirectory(device_offload/hw_emu) | ||
16 | add_subdirectory(noc) | ||
17 | add_subdirectory(power) | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb index ef3c7172..bd6f3796 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_git.bb | |||
@@ -3,7 +3,7 @@ DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | |||
3 | 3 | ||
4 | require xrt.inc | 4 | require xrt.inc |
5 | 5 | ||
6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" | 6 | SRC_URI += "file://disable_aie_profiling.patch;striplevel=2" |
7 | 7 | ||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | 8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" |
9 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | 9 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ |
@@ -24,7 +24,7 @@ inherit cmake pkgconfig | |||
24 | BBCLASSEXTEND = "native nativesdk" | 24 | BBCLASSEXTEND = "native nativesdk" |
25 | 25 | ||
26 | # util-linux is for libuuid-dev. | 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" | 27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap" |
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | 28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" |
29 | 29 | ||
30 | EXTRA_OECMAKE += " \ | 30 | EXTRA_OECMAKE += " \ |