diff options
496 files changed, 11621 insertions, 5083 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..bee8a64b --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1 @@ | |||
__pycache__ | |||
diff --git a/README.booting.md b/README.booting.md index 0f96a138..a632d7f9 100644 --- a/README.booting.md +++ b/README.booting.md | |||
@@ -5,10 +5,22 @@ AMD Xilinx Devices support different boot modes such as JTAG, SD, eMMC, QSPI etc | |||
5 | ## Booting Images with QEMU | 5 | ## Booting Images with QEMU |
6 | 6 | ||
7 | Once images are built, you can simulate the image using QEMU emulator. | 7 | Once images are built, you can simulate the image using QEMU emulator. |
8 | |||
9 | > **Note:** Use `slirp` option if you don't have sudo permissions and tap devices | ||
10 | are enabled on your build host. | ||
11 | |||
12 | * Without slirp | ||
8 | ``` | 13 | ``` |
9 | $ MACHINE=<target_mahcine_name> runqemu nographic | 14 | $ MACHINE=<target_mahcine_name> runqemu nographic |
10 | ``` | 15 | ``` |
11 | 16 | ||
17 | * With slirp | ||
18 | ``` | ||
19 | $ MACHINE=<target_mahcine_name> runqemu nographic slirp | ||
20 | ``` | ||
21 | |||
22 | > **Note:** To terminate qemu, usually the command is ctrl-a x | ||
23 | |||
12 | ## Booting Images with Hardware | 24 | ## Booting Images with Hardware |
13 | 25 | ||
14 | Follow booting instructions [README](docs) for more details. | 26 | Follow booting instructions [README](docs) for more details. |
diff --git a/README.building.md b/README.building.md index 45deadb9..28ba1b24 100644 --- a/README.building.md +++ b/README.building.md | |||
@@ -17,13 +17,22 @@ $ cd sources | |||
17 | > **Note:** | 17 | > **Note:** |
18 | > * *release_branch:* refers to upstream stable release branch. | 18 | > * *release_branch:* refers to upstream stable release branch. |
19 | > * *rel-version:* refers to amd xilinx release version. | 19 | > * *rel-version:* refers to amd xilinx release version. |
20 | |||
20 | ``` | 21 | ``` |
21 | $ mkdir sources | 22 | $ mkdir sources |
22 | $ git clone -b <release-branch> https://git.yoctoproject.org/poky.git | 23 | $ git clone -b <release-branch> https://git.yoctoproject.org/poky.git |
23 | $ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git | 24 | $ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git |
25 | $ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization | ||
24 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git | 26 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git |
25 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git | 27 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git |
26 | ``` | 28 | ``` |
29 | > **Note:** When meta-xilinx layer is cloned using git tool by default it will | ||
30 | > not clone [gen-machine-conf](https://github.com/Xilinx/gen-machine-conf.git) | ||
31 | > repo as submodules, make sure this repo https://github.com/Xilinx/meta-xilinx.git | ||
32 | > is cloned using `--recurse-submodules` option as shown. | ||
33 | > `$ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules` | ||
34 | > Skip this step if you are using yocto-manifests https://github.com/Xilinx/yocto-manifests | ||
35 | |||
27 | 3. Initialize a build environment using the `oe-init-build-env` script. | 36 | 3. Initialize a build environment using the `oe-init-build-env` script. |
28 | ``` | 37 | ``` |
29 | $ source poky/oe-init-build-env | 38 | $ source poky/oe-init-build-env |
@@ -39,6 +48,7 @@ $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe | |||
39 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python | 48 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python |
40 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems | 49 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems |
41 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking | 50 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking |
51 | $ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization | ||
42 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze | 52 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze |
43 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core | 53 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core |
44 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone | 54 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone |
@@ -55,45 +65,47 @@ $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools | |||
55 | ``` | 65 | ``` |
56 | MACHINE = "<target_machine_name>" | 66 | MACHINE = "<target_machine_name>" |
57 | ``` | 67 | ``` |
58 | Available target machines are: | 68 | * For list of available target machines see meta layer README files. |
59 | 69 | ||
60 | | Device | target machines | | 70 | * [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) |
61 | |------------|---------------------| | 71 | * [meta-kria README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) |
62 | | MicroBlaze | microblaze-generic | | 72 | |
63 | | | ac701-microblazeel | | 73 | 6. For NFS build host system modify the build/conf/local.conf and add TMPDIR |
64 | | | kc705-microblazeel | | 74 | path as shown below. On local storage $TMPDIR will be set to build/tmp |
65 | | | kcu105-microblazeel | | 75 | ``` |
66 | | | vcu118-microblazeel | | 76 | TMPDIR = "/tmp/$USER/yocto/release_version/build" |
67 | | Zynq-7000 | zynq-generic | | 77 | ``` |
68 | | | zc702-zynq7 | | 78 | |
69 | | | zc706-zynq7 | | 79 | 7. Modify the build/conf/local.conf file to add wic image to default target |
70 | | ZynqMP | zynqmp-generic | | 80 | image as shown below. |
71 | | | zcu102-zynqmp | | 81 | ``` |
72 | | | zcu104-zynqmp | | 82 | IMAGE_FSTYPES += "wic" |
73 | | | zcu106-zynqmp | | 83 | WKS_FILES = "xilinx-default-sd.wks" |
74 | | | zcu111-zynqmp | | 84 | ``` |
75 | | | zcu208-zynqmp | | 85 | |
76 | | | zcu216-zynqmp | | 86 | 8. Build the qemu-helper-native package to setup QEMU network tap devices. |
77 | | | zcu670-zynqmp | | 87 | ``` |
78 | | | zcu1275-zynqmp | | 88 | $ bitbake qemu-helper-native |
79 | | | zcu1285-zynqmp | | 89 | ``` |
80 | | | ultra96-zynqmp | | 90 | |
81 | | Versal | versal-generic | | 91 | 9. Manually configure a tap interface for your build system. As root run |
82 | | | versal-net-generic | | 92 | <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a |
83 | | | vck190-versal | | 93 | list of tap devices. Once tap interfaces are successfully create you should |
84 | | | vmk180-versal | | 94 | be able to see all the interfaces by running ifconfig command. |
85 | | | vek280-versal | | 95 | |
86 | | | vpk120-versal | | 96 | ``` |
87 | | | vpk180-versal | | 97 | $ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -u $USER) $(id -g $USER) 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin |
88 | | | vhk158-versal | | 98 | ``` |
89 | 99 | ||
90 | 6. Build an OS image for the target using `bitbake` command. | 100 | 10. Build an OS image for the target using `bitbake` command. |
91 | > **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt | 101 | > **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt |
92 | > for available target image-name. e.g. core-image-minimal | 102 | > for available target image-name. e.g. core-image-minimal or petalinux-image-minimal |
93 | 103 | ||
94 | ``` | 104 | ``` |
95 | $ bitbake <image-name> | 105 | $ bitbake <target-image> |
96 | ``` | 106 | ``` |
97 | 107 | ||
98 | 7. Once complete the images for the target machine will be available in the output | 108 | 7. Once complete the images for the target machine will be available in the output |
99 | directory `${TMPDIR}/deploy/images/${MACHINE}/`. | 109 | directory `${TMPDIR}/deploy/images/${MACHINE}/`. |
110 | |||
111 | 8. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md) | ||
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md index 1ffcc3c8..91c0eda9 100644 --- a/docs/README.booting.microblaze.md +++ b/docs/README.booting.microblaze.md | |||
@@ -4,11 +4,16 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
4 | 4 | ||
5 | * [Setting Up the Target](#setting-up-the-target) | 5 | * [Setting Up the Target](#setting-up-the-target) |
6 | * [Booting from JTAG](#booting-from-jtag) | 6 | * [Booting from JTAG](#booting-from-jtag) |
7 | * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) | 7 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
8 | * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) | 8 | * [Deploying the images to target](#deploying-the-images-to-target) |
9 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | 9 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb) |
12 | * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) | ||
13 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | 17 | ||
13 | ## Setting Up the Target | 18 | ## Setting Up the Target |
14 | 19 | ||
@@ -34,59 +39,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
58 | ``` | ||
59 | $ devtool boot-jtag --help | ||
60 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
61 | ``` | ||
62 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
63 | 3. Execute this script using xsdb tool as shown below. | ||
64 | ``` | ||
65 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl | ||
66 | ``` | ||
67 | |||
68 | #### Manually executing xsdb commands | ||
69 | |||
70 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
46 | ``` | 71 | ``` |
47 | $ xsct | 72 | $ xsdb |
48 | ``` | 73 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | 2. In the XSDB console, connect to the target over JTAG using the connect command. |
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 75 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 76 | connect command returns the channel ID of the connection. |
52 | ``` | 77 | ``` |
53 | xsct% connect | 78 | xsdb% connect |
54 | ``` | 79 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 80 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 81 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 82 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 83 | ``` |
59 | xsct% targets | 84 | xsdb% targets |
60 | ``` | 85 | ``` |
61 | 86 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 87 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 88 | option to select a target instead of selecting the target using its ID. |
64 | 89 | ||
65 | ### Loading Bitstream using XSCT | 90 | ##### Loading Bitstream using XSDB |
66 | 91 | ||
67 | * Download the bitstream for the target using XSCT with the `fpga` command. Microblaze | 92 | * Download the bitstream for the target using XSDB with the `fpga` command. Microblaze |
68 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user | 93 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user |
69 | can use `fpga -no-revision-check` to skip FPGA silicon revision. | 94 | can use `fpga -no-revision-check` to skip FPGA silicon revision. |
70 | 95 | ||
71 | ``` | 96 | ``` |
72 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit | 97 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit |
73 | xsct% after 2000 | 98 | xsdb% after 2000 |
74 | xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} | 99 | xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"} |
75 | xsct% catch {stop} | 100 | xsdb% catch {stop} |
76 | xsct% after 1000 | 101 | xsdb% after 1000 |
77 | ``` | 102 | ``` |
78 | ### Loading U-boot using XSCT | 103 | ##### Loading U-boot using XSDB |
79 | 104 | ||
80 | 1. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be | 105 | 1. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be |
81 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend | 106 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend |
82 | the execution of active target using `stop` command. | 107 | the execution of active target using `stop` command. |
83 | ``` | 108 | ``` |
84 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 109 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
85 | ``` | 110 | ``` |
86 | 2. After loading u-boot.elf resume the execution of active target using the `con` | 111 | 2. After loading u-boot.elf resume the execution of active target using the `con` |
87 | command in XSCT shell. | 112 | command in XSDB shell. |
88 | ``` | 113 | ``` |
89 | xsct% con | 114 | xsdb% con |
90 | ``` | 115 | ``` |
91 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 116 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
92 | ``` | 117 | ``` |
@@ -95,7 +120,7 @@ Hit any key to stop autoboot: 0 | |||
95 | U-Boot> | 120 | U-Boot> |
96 | ``` | 121 | ``` |
97 | 122 | ||
98 | ### Loading Kernel, Device tree, Root Filesystem and U-boot boot script | 123 | ##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script |
99 | 124 | ||
100 | Load the images into the target DDR/MIG load address i.e., | 125 | Load the images into the target DDR/MIG load address i.e., |
101 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) | 126 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) |
@@ -121,48 +146,50 @@ this process can take a long time to execute (more than 10 minutes). If your | |||
121 | system has ethernet it is recommended that you use TFTP to load these images | 146 | system has ethernet it is recommended that you use TFTP to load these images |
122 | using U-Boot. | 147 | using U-Boot. |
123 | 148 | ||
124 | #### Using XSCT | 149 | ###### Using XSDB |
125 | 150 | ||
126 | 1. Suspend the execution of active target using `stop` command in XSCT. | 151 | 1. Suspend the execution of active target using `stop` command in XSDB. |
127 | ``` | 152 | ``` |
128 | xsct% stop | 153 | xsdb% stop |
129 | ``` | 154 | ``` |
130 | 2. Using the `dow` command to load the images into the target DDR/MIG | 155 | 2. Using the `dow` command to load the images into the target DDR/MIG |
131 | load address. | 156 | load address. |
132 | ``` | 157 | ``` |
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 | 158 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 |
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 | 159 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 |
135 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 | 160 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 |
136 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 | 161 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 |
137 | ``` | 162 | ``` |
138 | 163 | ||
139 | #### Using TFTP | 164 | ###### Using TFTP |
140 | 165 | ||
141 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 166 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
167 | so that you can load them from U-Boot. | ||
168 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
142 | ``` | 169 | ``` |
143 | U-Boot> set serverip <server ip> | 170 | U-Boot> set serverip <server ip> |
144 | U-Boot> set ipaddr <board ip> | 171 | U-Boot> set ipaddr <board ip> |
145 | ``` | 172 | ``` |
146 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 173 | 3. Load the images to DDR address. |
147 | ``` | 174 | ``` |
148 | U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub | 175 | U-Boot> tftpboot 0x80000000 linux.bin.ub |
149 | U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb | 176 | U-Boot> tftpboot 0x81e00000 system.dtb |
150 | U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 177 | U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
151 | U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr | 178 | U-Boot> tftpboot 0xff200000 boot.scr |
152 | ``` | 179 | ``` |
153 | 180 | ||
154 | ### Booting Linux | 181 | ##### Booting Linux |
155 | 182 | ||
156 | Once the images are loaded continue the execution. | 183 | Once the images are loaded continue the execution. |
157 | 184 | ||
158 | 1. After loading images resume the execution of active target using the `con` | 185 | 1. After loading images resume the execution of active target using the `con` |
159 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 186 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
160 | ``` | 187 | ``` |
161 | xsct% con | 188 | xsdb% con |
162 | ``` | 189 | ``` |
163 | 2. Terminate xsct shell. | 190 | 2. Terminate xsdb shell. |
164 | ``` | 191 | ``` |
165 | xsct% exit | 192 | xsdb% exit |
166 | ``` | 193 | ``` |
167 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 194 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
168 | ``` | 195 | ``` |
diff --git a/docs/README.booting.storage.md b/docs/README.booting.storage.md index 4d33600d..d9689712 100644 --- a/docs/README.booting.storage.md +++ b/docs/README.booting.storage.md | |||
@@ -22,7 +22,7 @@ This section describes how to manually prepare and populate an SD card image. | |||
22 | There are automation tools in OpenEmbedded that can generate disk images already | 22 | There are automation tools in OpenEmbedded that can generate disk images already |
23 | formatted and prepared such that they can be written directly to a disk. Refer | 23 | formatted and prepared such that they can be written directly to a disk. Refer |
24 | to the Yocto Project Manual for more details: | 24 | to the Yocto Project Manual for more details: |
25 | https://docs.yoctoproject.org/4.1.2/singleindex.html#creating-partitioned-images-using-wic | 25 | https://docs.yoctoproject.org/4.1.4/singleindex.html#creating-partitioned-images-using-wic |
26 | 26 | ||
27 | ## Writing image to SD or eMMC device | 27 | ## Writing image to SD or eMMC device |
28 | 28 | ||
@@ -33,11 +33,17 @@ There are two ways to write the images to SD card or eMMC device. | |||
33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or | 33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or |
34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. | 34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. |
35 | 35 | ||
36 | > **Note:** `<target-image>` refers to core-image-minimal or petalinux-image-minimal | ||
37 | |||
36 | ### Using Wic file | 38 | ### Using Wic file |
37 | 39 | ||
38 | Write wic image file to the SD card or eMMC device. | 40 | Write wic image file to the SD card or eMMC device. Use dd command or balena |
41 | etcher to flash the wic image file to SD card. WIC image will be | ||
42 | build/tmp/deploy/${MACHINE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.wic, See | ||
43 | [Flashing Images Using bmaptool](https://docs.yoctoproject.org/singleindex.html#flashing-images-using-bmaptool) | ||
44 | for fast and easy way to flash the image | ||
39 | ``` | 45 | ``` |
40 | $ sudo dd if=xilinx-default-sd-${DATETIME}-sda.direct of=/dev/mmcblk<devnum> bs=4M | 46 | $ sudo dd if=<target-image>-${MACHINE}-${DATETIME}.rootfs.wic of=/dev/mmcblk<devnum> bs=4M |
41 | ``` | 47 | ``` |
42 | 48 | ||
43 | ### Using Yocto images | 49 | ### Using Yocto images |
@@ -55,22 +61,40 @@ $ sudo lsblk /dev/mmcblk<devnum> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
55 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` | 61 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` |
56 | ``` | 62 | ``` |
57 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. | 63 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. |
64 | |||
65 | * Linux | ||
58 | * boot.bin | 66 | * boot.bin |
59 | * boot.scr | 67 | * boot.scr |
60 | * Image or uImage (For Zynq7000 only) | 68 | * Image or uImage (For Zynq7000 only) |
61 | * system.dtb | 69 | * system.dtb |
62 | * rootfs.cpio.gz.u-boot (If using a ramdisk) | 70 | * rootfs.cpio.gz.u-boot (If using a ramdisk) |
63 | ``` | 71 | ``` |
64 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | 72 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin |
65 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | 73 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr |
66 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | 74 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image |
67 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | 75 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb |
68 | $ cp ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot | 76 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot |
69 | ``` | 77 | ``` |
70 | 4. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | 78 | * Xen |
79 | * boot.bin | ||
80 | * boot.scr | ||
81 | * Image | ||
82 | * xen | ||
83 | * system.dtb | ||
84 | * rootfs.cpio.gz (If using a ramdisk) | ||
85 | ``` | ||
86 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | ||
87 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | ||
88 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | ||
89 | $ cp ${DEPLOY_DIR_IMAGE}/xen /mnt/boot/xen | ||
90 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | ||
91 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz /mnt/boot/rootfs.cpio.gz | ||
92 | ``` | ||
93 | |||
94 | 4. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | ||
71 | card or eMMC device EXT4 partition. | 95 | card or eMMC device EXT4 partition. |
72 | ``` | 96 | ``` |
73 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 97 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
74 | $ sync | 98 | $ sync |
75 | ``` | 99 | ``` |
76 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. | 100 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. |
@@ -97,10 +121,10 @@ $ sudo lsblk /dev/sd<X> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
97 | ``` | 121 | ``` |
98 | $ sudo mount -L root /mnt/rootfs` | 122 | $ sudo mount -L root /mnt/rootfs` |
99 | ``` | 123 | ``` |
100 | 3. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content | 124 | 3. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content |
101 | to the USB or SATA device EXT4 partition. | 125 | to the USB or SATA device EXT4 partition. |
102 | ``` | 126 | ``` |
103 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 127 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
104 | $ sync | 128 | $ sync |
105 | ``` | 129 | ``` |
106 | 4. Unmount the USB or SATA device. | 130 | 4. Unmount the USB or SATA device. |
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md index afdeba2b..25738784 100644 --- a/docs/README.booting.versal.md +++ b/docs/README.booting.versal.md | |||
@@ -5,10 +5,15 @@ modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot.bin using XSDB](#loading-bootbin-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -37,37 +42,61 @@ modes. | |||
37 | 42 | ||
38 | ## Booting from JTAG | 43 | ## Booting from JTAG |
39 | 44 | ||
40 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 45 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
41 | the associated JTAG device drivers. This also requires access to the JTAG interface | 46 | the associated JTAG device drivers. This also requires access to the JTAG interface |
42 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 47 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
43 | modules. | 48 | modules. |
44 | 49 | ||
45 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 50 | ### Sourcing the XSDB tools |
46 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 51 | |
47 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 52 | Source the Vivado or Vitis tools `settings.sh` scripts. |
48 | Xilinx -> XSCT Console. | 53 | |
54 | ### Deploying the images to target | ||
55 | |||
56 | Deploying the images can be done in two methods. | ||
57 | |||
58 | #### Using devtool boot-jtag script | ||
59 | |||
60 | > **Note:** For Xen boot flow boot-jtag script doesn't include loading xen, kernel | ||
61 | > and root filesystem, This step needs to be done manually as mentioned in XSDB | ||
62 | > or TFTP method below. | ||
63 | |||
64 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
65 | ``` | ||
66 | $ devtool boot-jtag --help | ||
67 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
68 | ``` | ||
69 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
70 | 3. Execute this script using xsdb tool as shown below. | ||
49 | ``` | 71 | ``` |
50 | $ xsct | 72 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
51 | ``` | 73 | ``` |
52 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | |
75 | #### Manually executing xsdb commands | ||
76 | |||
77 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
78 | ``` | ||
79 | $ xsdb | ||
80 | ``` | ||
81 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
53 | Optionally user can use `-url` to specify the local/remote hw_server. The | 82 | Optionally user can use `-url` to specify the local/remote hw_server. The |
54 | connect command returns the channel ID of the connection. | 83 | connect command returns the channel ID of the connection. |
55 | ``` | 84 | ``` |
56 | xsct% connect | 85 | xsdb% connect |
57 | ``` | 86 | ``` |
58 | 4. The targets command lists the available targets and allows you to select a | 87 | 3. The targets command lists the available targets and allows you to select a |
59 | target using its ID. The targets are assigned IDs as they are discovered on | 88 | target using its ID. The targets are assigned IDs as they are discovered on |
60 | the JTAG chain, so the IDs can change from session to session. | 89 | the JTAG chain, so the IDs can change from session to session. |
61 | ``` | 90 | ``` |
62 | xsct% targets | 91 | xsdb% targets |
63 | ``` | 92 | ``` |
64 | 93 | ||
65 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 94 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
66 | option to select a target instead of selecting the target using its ID. | 95 | option to select a target instead of selecting the target using its ID. |
67 | 96 | ||
68 | ### Loading boot.bin using XSCT | 97 | ##### Loading boot.bin using XSDB |
69 | 98 | ||
70 | 1. Download the boot.bin for the target using XSCT with the `device program` command. | 99 | 1. Download the boot.bin for the target using XSDB with the `device program` command. |
71 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default | 100 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default |
72 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and | 101 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and |
73 | system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. | 102 | system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. |
@@ -76,15 +105,15 @@ system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file | |||
76 | > u-boot and kernel. | 105 | > u-boot and kernel. |
77 | 106 | ||
78 | ``` | 107 | ``` |
79 | xsct% targets -set -nocase -filter {name =~ "*PMC*"} | 108 | xsdb% targets -set -nocase -filter {name =~ "*PMC*"} |
80 | xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin | 109 | xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin |
81 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | 110 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} |
82 | xsct% stop | 111 | xsdb% stop |
83 | ``` | 112 | ``` |
84 | 2. After loading boot.bin resume the execution of active target using the `con` | 113 | 2. After loading boot.bin resume the execution of active target using the `con` |
85 | command in XSCT shell. | 114 | command in XSDB shell. |
86 | ``` | 115 | ``` |
87 | xsct% con | 116 | xsdb% con |
88 | ``` | 117 | ``` |
89 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 118 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
90 | ``` | 119 | ``` |
@@ -93,20 +122,38 @@ Hit any key to stop autoboot: 0 | |||
93 | U-Boot> | 122 | U-Boot> |
94 | ``` | 123 | ``` |
95 | 124 | ||
96 | ### Loading Kernel, Root Filesystem and U-boot boot script | 125 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
97 | 126 | ||
98 | Load the images into the target DDR/PL DRR load address i.e., | 127 | Load the images into the target DDR/PL DRR load address i.e., |
99 | `DDR base address + <image_offset>`. | 128 | `DDR base address + <image_offset>`. |
100 | 129 | ||
101 | Below example uses base DDR address as 0x0 which matches in vivado address editor. | 130 | Below example uses base DDR address as 0x0 which matches in vivado address editor. |
102 | 131 | ||
132 | 1. **Linux** | ||
133 | |||
103 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | 134 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | |
104 | |--------------------|------------------|--------------|---------------------| | 135 | |--------------------|------------------|--------------|---------------------| |
105 | | Kernel | 0x0 | 0x200000 | 0x200000 | | 136 | | Linux Kernel | 0x0 | 0x200000 | 0x200000 | |
106 | | Device Tree | 0x0 | 0x1000 | 0x1000 | | 137 | | Device Tree Blob | 0x0 | 0x1000 | 0x1000 | |
107 | | Rootfs | 0x0 | 0x4000000 | 0x4000000 | | 138 | | Rootfs | 0x0 | 0x4000000 | 0x4000000 | |
108 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | 139 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | |
109 | 140 | ||
141 | 2. **Xen** | ||
142 | |||
143 | > **Note:** Xen, Rootfs and Device Tree image offset is calculated as shown below. | ||
144 | > * `Xen Rootfs = Base DDR Address + Linux Kernel Image Offset(0xE00000) + Size of Linux Kernel Image` | ||
145 | > * `Xen Kernel = Base DDR Address + Xen Rootfs Image Offset (Ex: 0x2600000) + Size of Xen Rootfs` | ||
146 | > * `Device Tree Blob = Base DDR Address + Xen Kernel Image Offset (Ex: 0xBA00000) + Size of Device Tree Blob` | ||
147 | |||
148 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | ||
149 | |--------------------|------------------|--------------|---------------------| | ||
150 | | Linux Kernel | 0x0 | 0xE00000 | 0xE00000 | | ||
151 | | Xen Rootfs | 0x0 | 0x2600000 | 0x2600000 | | ||
152 | | Xen Kernel | 0x0 | 0xBA00000 | 0xBA00000 | | ||
153 | | Device Tree Blob | 0x0 | 0xC000000 | 0xC000000 | | ||
154 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | ||
155 | |||
156 | |||
110 | > **Note:** | 157 | > **Note:** |
111 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal | 158 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal |
112 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` | 159 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` |
@@ -119,55 +166,101 @@ using U-Boot. | |||
119 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 166 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
120 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 167 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
121 | 168 | ||
122 | #### Using XSCT | 169 | ###### Using XSDB |
123 | 170 | ||
124 | 1. Suspend the execution of active target using `stop` command in XSCT. | 171 | 1. Suspend the execution of active target using `stop` command in XSDB. |
125 | ``` | 172 | ``` |
126 | xsct% stop | 173 | xsdb% stop |
127 | ``` | 174 | ``` |
128 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 175 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
129 | address. | 176 | address. |
130 | ``` | ||
131 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
132 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 | ||
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
135 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
136 | ``` | ||
137 | 177 | ||
138 | #### Using TFTP | 178 | * Linux XSDB |
179 | ``` | ||
180 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
181 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
182 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 | ||
183 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
184 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
185 | ``` | ||
186 | |||
187 | * Xen XSDB | ||
188 | ``` | ||
189 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
190 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0xE00000 | ||
191 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz 0x2600000 | ||
192 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/xen 0xBA00000 | ||
193 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0xC000000 | ||
194 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
195 | ``` | ||
196 | |||
197 | ###### Using TFTP | ||
139 | 198 | ||
140 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 199 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
200 | so that you can load them from U-Boot. | ||
201 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
141 | ``` | 202 | ``` |
142 | Versal> set serverip <server ip> | 203 | Versal> set serverip <server ip> |
143 | Versal> set ipaddr <board ip> | 204 | Versal> set ipaddr <board ip> |
144 | ``` | 205 | ``` |
145 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 206 | 3. Load the images to DDR address. |
146 | ``` | ||
147 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | ||
148 | U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb | ||
149 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
150 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | ||
151 | 207 | ||
152 | ``` | 208 | * Linux TFTP |
153 | ### Booting Linux | 209 | ``` |
210 | U-Boot> tftpboot 0x200000 Image | ||
211 | U-Boot> tftpboot 0x1000 system.dtb | ||
212 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
213 | U-Boot> tftpboot 0x20000000 boot.scr | ||
214 | ``` | ||
215 | |||
216 | * Xen TFTP | ||
217 | ``` | ||
218 | U-Boot> tftpboot 0xE00000 Image | ||
219 | U-Boot> setenv kernel_size 0x$filesize | ||
220 | U-Boot> tftpboot 0x2600000 core-image-minimal-${MACHINE}.cpio.gz | ||
221 | U-Boot> setenv ramdisk_size 0x$filesize | ||
222 | U-Boot> tftpboot 0xBA00000 xen | ||
223 | U-Boot> tftpboot 0xC000000 system.dtb | ||
224 | U-Boot> tftpboot 0x20000000 boot.scr | ||
225 | ``` | ||
226 | |||
227 | ##### Booting Linux | ||
154 | 228 | ||
155 | Once the images are loaded continue the execution. | 229 | Once the images are loaded continue the execution. |
156 | 230 | ||
157 | 1. After loading images resume the execution of active target using the `con` | 231 | 1. After loading images resume the execution of active target using the `con` |
158 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 232 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
159 | ``` | 233 | ``` |
160 | xsct% con | 234 | xsdb% con |
161 | ``` | 235 | ``` |
162 | 2. Terminate xsct shell. | 236 | 2. Terminate xsdb shell. |
163 | ``` | 237 | ``` |
164 | xsct% exit | 238 | xsdb% exit |
165 | ``` | 239 | ``` |
166 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 240 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
241 | |||
242 | * Linux boot | ||
167 | ``` | 243 | ``` |
168 | U-Boot> boot | 244 | U-Boot> boot |
169 | ``` | 245 | ``` |
170 | 246 | ||
247 | * XEN JTAG boot | ||
248 | |||
249 | * XSDB | ||
250 | > **Note:** You need to calculate the Kernel(kernel_size) and ramdisk(ramdisk_size) | ||
251 | > image size manually from `${DEPLOY_DIR_IMAGE}` directory. For example if your | ||
252 | > kernel size is 24269312 bytes you need to convert to hex 0x1725200 and use it. | ||
253 | ``` | ||
254 | U-Boot> setenv kernel_size <filesize> | ||
255 | U-Boot> setenv ramdisk_size <filesize> | ||
256 | U-Boot> boot | ||
257 | ``` | ||
258 | |||
259 | * TFTP | ||
260 | ``` | ||
261 | U-Boot> boot | ||
262 | ``` | ||
263 | |||
171 | ## Booting from SD | 264 | ## Booting from SD |
172 | 265 | ||
173 | 1. Load the SD card into the VCK190 board in the J302 SD slot. | 266 | 1. Load the SD card into the VCK190 board in the J302 SD slot. |
@@ -181,9 +274,9 @@ U-Boot> boot | |||
181 | card (part number: X_EBM-01, REV_A01). | 274 | card (part number: X_EBM-01, REV_A01). |
182 | 2. With the card powered off, install the QSPI daughter card. | 275 | 2. With the card powered off, install the QSPI daughter card. |
183 | 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that | 276 | 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that |
184 | U-Boot is running and also have boot.bin copied to DDR location using XSCT | 277 | U-Boot is running and also have boot.bin copied to DDR location using XSDB |
185 | `dow` or `tftpboot` or `fatload` command. | 278 | `dow` or `tftpboot` or `fatload` command. |
186 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 279 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
187 | 5. After flashing the images, turn off the power switch on the board, and change | 280 | 5. After flashing the images, turn off the power switch on the board, and change |
188 | the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by | 281 | the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by |
189 | setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 282 | setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.booting.zynq.md b/docs/README.booting.zynq.md index a9b6e8f3..28aad78f 100644 --- a/docs/README.booting.zynq.md +++ b/docs/README.booting.zynq.md | |||
@@ -5,10 +5,15 @@ boot modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot components using XSCT](#loading-boot-components-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -35,37 +40,58 @@ boot modes. | |||
35 | --- | 40 | --- |
36 | ## Booting from JTAG | 41 | ## Booting from JTAG |
37 | 42 | ||
38 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 43 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
39 | the associated JTAG device drivers. This also requires access to the JTAG interface | 44 | the associated JTAG device drivers. This also requires access to the JTAG interface |
40 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 45 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
41 | modules. | 46 | modules. |
42 | 47 | ||
43 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 48 | ### Sourcing the XSDB tools |
44 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 49 | |
45 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 50 | Source the Vivado or Vitis tools `settings.sh` scripts. |
46 | Xilinx -> XSCT Console. | 51 | |
52 | ### Deploying the images to target | ||
53 | |||
54 | Deploying the images can be done in two methods. | ||
55 | |||
56 | #### Using devtool boot-jtag script | ||
57 | |||
58 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
59 | ``` | ||
60 | $ devtool boot-jtag --help | ||
61 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
62 | ``` | ||
63 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
64 | 3. Execute this script using xsdb tool as shown below. | ||
47 | ``` | 65 | ``` |
48 | $ xsct | 66 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
49 | ``` | 67 | ``` |
50 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 68 | |
69 | #### Manually executing xsdb commands | ||
70 | |||
71 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
72 | ``` | ||
73 | $ xsdb | ||
74 | ``` | ||
75 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
51 | Optionally user can use `-url` to specify the local/remote hw_server. The | 76 | Optionally user can use `-url` to specify the local/remote hw_server. The |
52 | connect command returns the channel ID of the connection. | 77 | connect command returns the channel ID of the connection. |
53 | ``` | 78 | ``` |
54 | xsct% connect | 79 | xsdb% connect |
55 | ``` | 80 | ``` |
56 | 4. The targets command lists the available targets and allows you to select a | 81 | 3. The targets command lists the available targets and allows you to select a |
57 | target using its ID. The targets are assigned IDs as they are discovered on | 82 | target using its ID. The targets are assigned IDs as they are discovered on |
58 | the JTAG chain, so the IDs can change from session to session. | 83 | the JTAG chain, so the IDs can change from session to session. |
59 | ``` | 84 | ``` |
60 | xsct% targets | 85 | xsdb% targets |
61 | ``` | 86 | ``` |
62 | 87 | ||
63 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 88 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
64 | option to select a target instead of selecting the target using its ID. | 89 | option to select a target instead of selecting the target using its ID. |
90 | |||
65 | --- | 91 | --- |
66 | ### Loading boot components using XSCT | 92 | ##### Loading boot components using XSDB |
67 | 93 | ||
68 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 94 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
69 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 95 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
70 | directory. | 96 | directory. |
71 | 97 | ||
@@ -74,24 +100,24 @@ xsct% targets | |||
74 | 100 | ||
75 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 101 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
76 | ``` | 102 | ``` |
77 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 103 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
78 | ``` | 104 | ``` |
79 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. | 105 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. |
80 | ``` | 106 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "arm*#0"} | 107 | xsdb% targets -set -nocase -filter {name =~ "arm*#0"} |
82 | xsct% catch {stop} | 108 | xsdb% catch {stop} |
83 | ``` | 109 | ``` |
84 | 5. Download and run FSBL from APU Cortex-A9 Core 0 | 110 | 5. Download and run FSBL from APU Cortex-A9 Core 0 |
85 | ``` | 111 | ``` |
86 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf | 112 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf |
87 | xsct% con | 113 | xsdb% con |
88 | ``` | 114 | ``` |
89 | 7. Now download U-boot.elf and Device tree to APU and execute. | 115 | 7. Now download U-boot.elf and Device tree to APU and execute. |
90 | ``` | 116 | ``` |
91 | xsct% stop | 117 | xsdb% stop |
92 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 118 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
93 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 119 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
94 | xsct% con | 120 | xsdb% con |
95 | ``` | 121 | ``` |
96 | 122 | ||
97 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 123 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -101,7 +127,7 @@ Hit any key to stop autoboot: 0 | |||
101 | U-Boot> | 127 | U-Boot> |
102 | ``` | 128 | ``` |
103 | --- | 129 | --- |
104 | ### Loading Kernel, Root Filesystem and U-boot boot script | 130 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
105 | 131 | ||
106 | Load the images into the target DDR load address i.e., | 132 | Load the images into the target DDR load address i.e., |
107 | `DDR base address + <image_offset>`. | 133 | `DDR base address + <image_offset>`. |
@@ -127,53 +153,56 @@ using U-Boot. | |||
127 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 153 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
128 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 154 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
129 | --- | 155 | --- |
130 | #### Using XSCT | 156 | ###### Using XSDB |
131 | 157 | ||
132 | 1. Suspend the execution of active target using `stop` command in XSCT. | 158 | 1. Suspend the execution of active target using `stop` command in XSDB. |
133 | ``` | 159 | ``` |
134 | xsct% stop | 160 | xsdb% stop |
135 | ``` | 161 | ``` |
136 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 162 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
137 | address. | 163 | address. |
138 | ``` | 164 | ``` |
139 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 | 165 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 |
140 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 166 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
141 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | 167 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 |
142 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 | 168 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 |
143 | ``` | 169 | ``` |
144 | --- | 170 | --- |
145 | #### Using TFTP | 171 | ###### Using TFTP |
146 | 172 | ||
147 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 173 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
174 | so that you can load them from U-Boot. | ||
175 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
148 | ``` | 176 | ``` |
149 | Versal> set serverip <server ip> | 177 | Versal> set serverip <server ip> |
150 | Versal> set ipaddr <board ip> | 178 | Versal> set ipaddr <board ip> |
151 | ``` | 179 | ``` |
152 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 180 | 3. Load the images to DDR address. |
153 | ``` | 181 | ``` |
154 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/uImage | 182 | U-Boot> tftpboot 0x200000 uImage |
155 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | 183 | U-Boot> tftpboot 0x100000 system.dtb |
156 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 184 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
157 | U-Boot> tftpboot 0x3000000 ${TFTPDIR}/boot.scr | 185 | U-Boot> tftpboot 0x3000000 boot.scr |
158 | ``` | 186 | ``` |
159 | --- | 187 | --- |
160 | ### Booting Linux | 188 | ##### Booting Linux |
161 | 189 | ||
162 | Once the images are loaded continue the execution. | 190 | Once the images are loaded continue the execution. |
163 | 191 | ||
164 | 1. After loading images resume the execution of active target using the `con` | 192 | 1. After loading images resume the execution of active target using the `con` |
165 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 193 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
166 | ``` | 194 | ``` |
167 | xsct% con | 195 | xsdb% con |
168 | ``` | 196 | ``` |
169 | 2. Terminate xsct shell. | 197 | 2. Terminate xsdb shell. |
170 | ``` | 198 | ``` |
171 | xsct% exit | 199 | xsdb% exit |
172 | ``` | 200 | ``` |
173 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 201 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
174 | ``` | 202 | ``` |
175 | U-Boot> boot | 203 | U-Boot> boot |
176 | ``` | 204 | ``` |
205 | |||
177 | --- | 206 | --- |
178 | ## Booting from SD | 207 | ## Booting from SD |
179 | 208 | ||
@@ -181,14 +210,15 @@ U-Boot> boot | |||
181 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) | 210 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) |
182 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). | 211 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |
183 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. | 212 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. |
213 | |||
184 | --- | 214 | --- |
185 | ## Booting from QSPI | 215 | ## Booting from QSPI |
186 | 216 | ||
187 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot | 217 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot |
188 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 218 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
189 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 219 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
190 | command. | 220 | command. |
191 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 221 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
192 | 3. After flashing the images, turn off the power switch on the board, and change | 222 | 3. After flashing the images, turn off the power switch on the board, and change |
193 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) | 223 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) |
194 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 224 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.booting.zynqmp.md b/docs/README.booting.zynqmp.md index c8f8aa21..44e6f2b7 100644 --- a/docs/README.booting.zynqmp.md +++ b/docs/README.booting.zynqmp.md | |||
@@ -5,10 +5,15 @@ NAND boot modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot components using XSCT](#loading-boot-components-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -34,37 +39,61 @@ NAND boot modes. | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | > **Note:** For Xen boot flow boot-jtag script doesn't include loading xen, kernel | ||
58 | > and root filesystem, This step needs to be done manually as mentioned in XSDB | ||
59 | > or TFTP method below. | ||
60 | |||
61 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
62 | ``` | ||
63 | $ devtool boot-jtag --help | ||
64 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
46 | ``` | 65 | ``` |
47 | $ xsct | 66 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl |
67 | 3. Execute this script using xsdb tool as shown below. | ||
48 | ``` | 68 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 69 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
70 | ``` | ||
71 | |||
72 | #### Manually executing xsdb commands | ||
73 | |||
74 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
75 | ``` | ||
76 | $ xsdb | ||
77 | ``` | ||
78 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 79 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 80 | connect command returns the channel ID of the connection. |
52 | ``` | 81 | ``` |
53 | xsct% connect | 82 | xsdb% connect |
54 | ``` | 83 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 84 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 85 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 86 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 87 | ``` |
59 | xsct% targets | 88 | xsdb% targets |
60 | ``` | 89 | ``` |
61 | 90 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 91 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 92 | option to select a target instead of selecting the target using its ID. |
64 | 93 | ||
65 | ### Loading boot components using XSCT | 94 | ##### Loading boot components using XSDB |
66 | 95 | ||
67 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 96 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
68 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 97 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
69 | directory. | 98 | directory. |
70 | 99 | ||
@@ -73,43 +102,46 @@ xsct% targets | |||
73 | 102 | ||
74 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 103 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
75 | ``` | 104 | ``` |
76 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 105 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
77 | ``` | 106 | ``` |
78 | 3. By default, JTAG security gates are enabled. Disable the security gates for | 107 | 3. By default, JTAG security gates are enabled. Disable the security gates for |
79 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). | 108 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). |
80 | ``` | 109 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "*PSU*"} | 110 | xsdb% targets -set -nocase -filter {name =~ "*PSU*"} |
82 | xsct% mask_write 0xFFCA0038 0x1C0 0x1C0 | 111 | xsdb% mask_write 0xFFCA0038 0x1C0 0x1C0 |
83 | ``` | 112 | ``` |
84 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU | 113 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU |
85 | firmware. | 114 | firmware. |
86 | ``` | 115 | ``` |
87 | xsct% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} | 116 | xsdb% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} |
88 | xsct% catch {stop} | 117 | xsdb% catch {stop} |
89 | xsct% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf | 118 | xsdb% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf |
90 | xsct% con | 119 | xsdb% con |
91 | ``` | 120 | ``` |
92 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, | 121 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, |
93 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores | 122 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores |
94 | are held in reset. You must clear the resets on each core before performing | 123 | are held in reset. You must clear the resets on each core before performing |
95 | debugging on these cores. You can use the `rst` command in XSCT to clear the | 124 | debugging on these cores. You can use the `rst` command in XSDB to clear the |
96 | resets. | 125 | resets. |
97 | ``` | 126 | ``` |
98 | xsct% targets -set -nocase -filter {name =~ "*A53*#0"} | 127 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} |
99 | xsct% rst -processor -clear-registers | 128 | xsdb% rst -processor -clear-registers |
100 | ``` | 129 | ``` |
101 | 6. Download and run FSBL from APU Cortex-A53 Core 0 | 130 | 6. Download and run FSBL from APU Cortex-A53 Core 0 |
102 | ``` | 131 | ``` |
103 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf | 132 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf |
104 | xsct% con | 133 | xsdb% con |
105 | ``` | 134 | ``` |
106 | 7. Now download TF-A, U-boot.elf and Device tree to APU and execute. | 135 | 7. Now download TF-A, U-boot.elf and Device tree blob to APU and execute. |
136 | |||
137 | > **Note:** For Xen boot system.dtb load address will vary, see below table. | ||
138 | |||
107 | ``` | 139 | ``` |
108 | xsct% stop | 140 | xsdb% stop |
109 | xsct% dow ${DEPLOY_DIR_IMAGE}/bl31.elf | 141 | xsdb% dow ${DEPLOY_DIR_IMAGE}/bl31.elf |
110 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 142 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
111 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 143 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
112 | xsct% con | 144 | xsdb% con |
113 | ``` | 145 | ``` |
114 | 146 | ||
115 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 147 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -119,20 +151,37 @@ Hit any key to stop autoboot: 0 | |||
119 | U-Boot> | 151 | U-Boot> |
120 | ``` | 152 | ``` |
121 | 153 | ||
122 | ### Loading Kernel, Root Filesystem and U-boot boot script | 154 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
123 | 155 | ||
124 | Load the images into the target DDR/PL DRR load address i.e., | 156 | Load the images into the target DDR/PL DRR load address i.e., |
125 | `DDR base address + <image_offset>`. | 157 | `DDR base address + <image_offset>`. |
126 | 158 | ||
127 | Below example uses base DDR address as 0x0 which matches in vivado address editor. | 159 | Below example uses base DDR address as 0x0 which matches in vivado address editor. |
128 | 160 | ||
161 | 1. **Linux** | ||
162 | |||
129 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | 163 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | |
130 | |--------------------|------------------|--------------|---------------------| | 164 | |--------------------|------------------|--------------|---------------------| |
131 | | Kernel | 0x0 | 0x200000 | 0x200000 | | 165 | | Linux Kernel | 0x0 | 0x200000 | 0x200000 | |
132 | | Device Tree | 0x0 | 0x1000 | 0x1000 | | 166 | | Device Tree Blob | 0x0 | 0x100000 | 0x100000 | |
133 | | Rootfs | 0x0 | 0x04000000 | 0x4000000 | | 167 | | Rootfs | 0x0 | 0x04000000 | 0x4000000 | |
134 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | 168 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | |
135 | 169 | ||
170 | 2. **Xen** | ||
171 | |||
172 | > **Note:** Xen, Rootfs and Device Tree image offset is calculated as shown below. | ||
173 | > * `Xen Rootfs = Base DDR Address + Linux Kernel Image Offset(0xE00000) + Size of Linux Kernel Image` | ||
174 | > * `Xen Kernel = Base DDR Address + Xen Rootfs Image Offset (Ex: 0x2600000) + Size of Xen Rootfs` | ||
175 | > * `Device Tree Blob = Base DDR Address + Xen Kernel Image Offset (Ex: 0xBA00000) + Size of Device Tree Blob` | ||
176 | |||
177 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | ||
178 | |--------------------|------------------|--------------|---------------------| | ||
179 | | Linux Kernel | 0x0 | 0xE00000 | 0xE00000 | | ||
180 | | Xen Rootfs | 0x0 | 0x2600000 | 0x2600000 | | ||
181 | | Xen Kernel | 0x0 | 0xBA00000 | 0xBA00000 | | ||
182 | | Device Tree Blob | 0x0 | 0xC000000 | 0xC000000 | | ||
183 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | ||
184 | |||
136 | > **Note:** | 185 | > **Note:** |
137 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal | 186 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal |
138 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` | 187 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` |
@@ -145,54 +194,101 @@ using U-Boot. | |||
145 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 194 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
146 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 195 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
147 | 196 | ||
148 | #### Using XSCT | 197 | ###### Using XSDB |
149 | 198 | ||
150 | 1. Suspend the execution of active target using `stop` command in XSCT. | 199 | 1. Suspend the execution of active target using `stop` command in XSDB. |
151 | ``` | 200 | ``` |
152 | xsct% stop | 201 | xsdb% stop |
153 | ``` | 202 | ``` |
154 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 203 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
155 | address. | 204 | address. |
156 | ``` | ||
157 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
158 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | ||
159 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
160 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
161 | ``` | ||
162 | 205 | ||
163 | #### Using TFTP | 206 | * Linux XSDB |
207 | ``` | ||
208 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} | ||
209 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
210 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | ||
211 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
212 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
213 | ``` | ||
164 | 214 | ||
165 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 215 | * Xen XSDB |
166 | ``` | 216 | ``` |
167 | Versal> set serverip <server ip> | 217 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} |
168 | Versal> set ipaddr <board ip> | 218 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0xE00000 |
219 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz 0x2600000 | ||
220 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/xen 0xBA00000 | ||
221 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0xC000000 | ||
222 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
223 | ``` | ||
224 | |||
225 | ###### Using TFTP | ||
226 | |||
227 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory | ||
228 | so that you can load them from U-Boot. | ||
229 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
169 | ``` | 230 | ``` |
170 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 231 | ZynqMP> set serverip <host-server-ip-address> |
232 | ZynqMP> set ipaddr <board-ip-address> | ||
171 | ``` | 233 | ``` |
172 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | 234 | 3. Load the images to DDR address. |
173 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | ||
174 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
175 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | ||
176 | 235 | ||
177 | ``` | 236 | * Linux TFTP |
178 | ### Booting Linux | 237 | ``` |
238 | U-Boot> tftpboot 0x200000 Image | ||
239 | U-Boot> tftpboot 0x100000 system.dtb | ||
240 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
241 | U-Boot> tftpboot 0x20000000 boot.scr | ||
242 | ``` | ||
243 | |||
244 | * Xen TFTP | ||
245 | ``` | ||
246 | U-Boot> tftpboot 0xE00000 Image | ||
247 | U-Boot> setenv kernel_size 0x$filesize | ||
248 | U-Boot> tftpboot 0x2600000 core-image-minimal-${MACHINE}.cpio.gz | ||
249 | U-Boot> setenv ramdisk_size 0x$filesize | ||
250 | U-Boot> tftpboot 0xBA00000 xen | ||
251 | U-Boot> tftpboot 0xC000000 system.dtb | ||
252 | U-Boot> tftpboot 0x20000000 boot.scr | ||
253 | ``` | ||
254 | |||
255 | ##### Booting Linux | ||
179 | 256 | ||
180 | Once the images are loaded continue the execution. | 257 | Once the images are loaded continue the execution. |
181 | 258 | ||
182 | 1. After loading images resume the execution of active target using the `con` | 259 | 1. After loading images resume the execution of active target using the `con` |
183 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 260 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
184 | ``` | 261 | ``` |
185 | xsct% con | 262 | xsdb% con |
186 | ``` | 263 | ``` |
187 | 2. Terminate xsct shell. | 264 | 2. Terminate xsdb shell. |
188 | ``` | 265 | ``` |
189 | xsct% exit | 266 | xsdb% exit |
190 | ``` | 267 | ``` |
191 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 268 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
269 | |||
270 | * Linux boot | ||
192 | ``` | 271 | ``` |
193 | U-Boot> boot | 272 | U-Boot> boot |
194 | ``` | 273 | ``` |
195 | 274 | ||
275 | * XEN JTAG boot | ||
276 | |||
277 | * XSDB | ||
278 | > **Note:** You need to calculate the Kernel(kernel_size) and ramdisk(ramdisk_size) | ||
279 | > image size manually from `${DEPLOY_DIR_IMAGE}` directory. For example if your | ||
280 | > kernel size is 24269312 bytes you need to convert to hex 0x1725200 and use it. | ||
281 | ``` | ||
282 | U-Boot> setenv kernel_size <filesize> | ||
283 | U-Boot> setenv ramdisk_size <filesize> | ||
284 | U-Boot> boot | ||
285 | ``` | ||
286 | |||
287 | * TFTP | ||
288 | ``` | ||
289 | U-Boot> boot | ||
290 | ``` | ||
291 | |||
196 | ## Booting from SD | 292 | ## Booting from SD |
197 | 293 | ||
198 | 1. Load the SD card into the ZCU102 board in the J100 SD slot. | 294 | 1. Load the SD card into the ZCU102 board in the J100 SD slot. |
@@ -204,9 +300,9 @@ U-Boot> boot | |||
204 | 300 | ||
205 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot | 301 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot |
206 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 302 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
207 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 303 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
208 | command. | 304 | command. |
209 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 305 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
210 | 3. After flashing the images, turn off the power switch on the board, and change | 306 | 3. After flashing the images, turn off the power switch on the board, and change |
211 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by | 307 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by |
212 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 308 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.dfx.user.dts.md b/docs/README.dfx.user.dts.md index 69e1e52b..9caf866e 100644 --- a/docs/README.dfx.user.dts.md +++ b/docs/README.dfx.user.dts.md | |||
@@ -16,11 +16,12 @@ following use cases. | |||
16 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for | 16 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for |
17 | > shell.json and accel.json file content. | 17 | > shell.json and accel.json file content. |
18 | 18 | ||
19 | * **Zynq-7000 and ZynqMP**: | 19 | * **Zynq 7000, ZynqMP and Versal**: |
20 | * Design: Vivado flat design. | 20 | * Design: Vivado flat or Segmented Configuration design. |
21 | * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional) | 21 | * Input files to firmware recipes: .bit or .bin or _pld.pdi, .dtsi or dtbo and shell.json (optional) |
22 | * Usage Examples: | 22 | * Usage Examples: |
23 | ``` | 23 | ``` |
24 | # Zynq 7000 or ZynqMP flat design | ||
24 | SRC_URI = " \ | 25 | SRC_URI = " \ |
25 | file://<flat_design_pl>.bit \ | 26 | file://<flat_design_pl>.bit \ |
26 | file://<flat_design_pl>.dtsi \ | 27 | file://<flat_design_pl>.dtsi \ |
@@ -29,6 +30,7 @@ SRC_URI = " \ | |||
29 | ``` | 30 | ``` |
30 | 31 | ||
31 | ``` | 32 | ``` |
33 | # Zynq 7000 or ZynqMP flat design | ||
32 | SRC_URI = " \ | 34 | SRC_URI = " \ |
33 | file://<flat_design_pl>.bit \ | 35 | file://<flat_design_pl>.bit \ |
34 | file://<flat_design_pl>.dtbo \ | 36 | file://<flat_design_pl>.dtbo \ |
@@ -36,9 +38,69 @@ SRC_URI = " \ | |||
36 | " | 38 | " |
37 | ``` | 39 | ``` |
38 | 40 | ||
41 | ``` | ||
42 | # Zynq 7000 or ZynqMP flat design | ||
43 | SRC_URI = " \ | ||
44 | file://<flat_design_pl>.bin \ | ||
45 | file://<flat_design_pl>.dtsi \ | ||
46 | file://shell.json \ | ||
47 | " | ||
48 | ``` | ||
49 | |||
50 | ``` | ||
51 | # Zynq 7000 or ZynqMP flat design | ||
52 | SRC_URI = " \ | ||
53 | file://<flat_design_pl>.bin \ | ||
54 | file://<flat_design_pl>.dtbo \ | ||
55 | file://shell.json \ | ||
56 | " | ||
57 | ``` | ||
58 | |||
59 | ``` | ||
60 | # Zynq 7000 or ZynqMP flat design | ||
61 | SRC_URI = " \ | ||
62 | file://<flat_design_pl>.bit \ | ||
63 | file://shell.json \ | ||
64 | " | ||
65 | ``` | ||
66 | |||
67 | ``` | ||
68 | # Zynq 7000 or ZynqMP flat design | ||
69 | SRC_URI = " \ | ||
70 | file://<flat_design_pl>.bin \ | ||
71 | file://shell.json \ | ||
72 | " | ||
73 | ``` | ||
74 | |||
75 | ``` | ||
76 | # Versal Segmented Configuration design | ||
77 | SRC_URI = " \ | ||
78 | file://<flat_design>_pld.pdi \ | ||
79 | file://<flat_design>_pld.dtsi \ | ||
80 | file://shell.json \ | ||
81 | " | ||
82 | ``` | ||
83 | |||
84 | ``` | ||
85 | # Versal Segmented Configuration design | ||
86 | SRC_URI = " \ | ||
87 | file://<flat_design>_pld.pdi \ | ||
88 | file://<flat_design>_pld.dtbo \ | ||
89 | file://shell.json \ | ||
90 | " | ||
91 | ``` | ||
92 | |||
93 | ``` | ||
94 | # Versal Segmented Configuration design | ||
95 | SRC_URI = " \ | ||
96 | file://<flat_design>_pld.pdi \ | ||
97 | file://shell.json \ | ||
98 | " | ||
99 | ``` | ||
100 | |||
39 | * **ZynqMP and Versal**: | 101 | * **ZynqMP and Versal**: |
40 | * Design: Vivado DFx design. | 102 | * Design: Vivado DFx design. |
41 | * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo | 103 | * Input files to firmware recipes: .bit/bin(ZynqMP) or .pdi(Versal), .dtsi or dtbo |
42 | shell.json or accel.json (optional) and .xclbin (optional). | 104 | shell.json or accel.json (optional) and .xclbin (optional). |
43 | * Usage Examples: | 105 | * Usage Examples: |
44 | 106 | ||
@@ -63,6 +125,44 @@ SRC_URI = " \ | |||
63 | ``` | 125 | ``` |
64 | 126 | ||
65 | ``` | 127 | ``` |
128 | # ZynqMP DFx Static | ||
129 | SRC_URI = " \ | ||
130 | file://<dfx_design_static_pl>.bin \ | ||
131 | file://<dfx_design_static_pl>.dtsi \ | ||
132 | file://shell.json \ | ||
133 | file://<dfx_design_static_pl>.xclbin \ | ||
134 | " | ||
135 | ``` | ||
136 | |||
137 | ``` | ||
138 | # ZynqMP DFx Static | ||
139 | SRC_URI = " \ | ||
140 | file://<dfx_design_static_pl>.bin \ | ||
141 | file://<dfx_design_static_pl>.dtbo \ | ||
142 | file://shell.json \ | ||
143 | file://<dfx_design_static_pl>.xclbin \ | ||
144 | " | ||
145 | ``` | ||
146 | |||
147 | ``` | ||
148 | # ZynqMP DFx Static | ||
149 | SRC_URI = " \ | ||
150 | file://<dfx_design_static_pl>.bit \ | ||
151 | file://shell.json \ | ||
152 | file://<dfx_design_static_pl>.xclbin \ | ||
153 | " | ||
154 | ``` | ||
155 | |||
156 | ``` | ||
157 | # ZynqMP DFx Static | ||
158 | SRC_URI = " \ | ||
159 | file://<dfx_design_static_pl>.bin \ | ||
160 | file://shell.json \ | ||
161 | file://<dfx_design_static_pl>.xclbin \ | ||
162 | " | ||
163 | ``` | ||
164 | |||
165 | ``` | ||
66 | # ZynqMP DFx RP | 166 | # ZynqMP DFx RP |
67 | SRC_URI = " \ | 167 | SRC_URI = " \ |
68 | file://<dfx_design_rp_rm_pl>.bit \ | 168 | file://<dfx_design_rp_rm_pl>.bit \ |
@@ -81,6 +181,45 @@ SRC_URI = " \ | |||
81 | file://<dfx_design_rp_rm_pl>.xclbin \ | 181 | file://<dfx_design_rp_rm_pl>.xclbin \ |
82 | " | 182 | " |
83 | ``` | 183 | ``` |
184 | |||
185 | ``` | ||
186 | # ZynqMP DFx RP | ||
187 | SRC_URI = " \ | ||
188 | file://<dfx_design_rp_rm_pl>.bin \ | ||
189 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
190 | file://accel.json \ | ||
191 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
192 | " | ||
193 | ``` | ||
194 | |||
195 | ``` | ||
196 | # ZynqMP DFx RP | ||
197 | SRC_URI = " \ | ||
198 | file://<dfx_design_rp_rm_pl>.bin \ | ||
199 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
200 | file://accel.json \ | ||
201 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
202 | " | ||
203 | ``` | ||
204 | |||
205 | ``` | ||
206 | # ZynqMP DFx RP | ||
207 | SRC_URI = " \ | ||
208 | file://<dfx_design_rp_rm_pl>.bit \ | ||
209 | file://accel.json \ | ||
210 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
211 | " | ||
212 | ``` | ||
213 | |||
214 | ``` | ||
215 | # ZynqMP DFx RP | ||
216 | SRC_URI = " \ | ||
217 | file://<dfx_design_rp_rm_pl>.bin \ | ||
218 | file://accel.json \ | ||
219 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
220 | " | ||
221 | ``` | ||
222 | |||
84 | ``` | 223 | ``` |
85 | # Versal DFx Static | 224 | # Versal DFx Static |
86 | SRC_URI = " \ | 225 | SRC_URI = " \ |
@@ -102,6 +241,15 @@ SRC_URI = " \ | |||
102 | ``` | 241 | ``` |
103 | 242 | ||
104 | ``` | 243 | ``` |
244 | # Versal DFx Static | ||
245 | SRC_URI = " \ | ||
246 | file://<dfx_design_static_pl>.pdi \ | ||
247 | file://shell.json \ | ||
248 | file://<dfx_design_static_pl>.xclbin \ | ||
249 | " | ||
250 | ``` | ||
251 | |||
252 | ``` | ||
105 | # Versal DFx RP | 253 | # Versal DFx RP |
106 | SRC_URI = " \ | 254 | SRC_URI = " \ |
107 | file://<dfx_design_rp_rm_pl>.pdi \ | 255 | file://<dfx_design_rp_rm_pl>.pdi \ |
@@ -120,16 +268,29 @@ SRC_URI = " \ | |||
120 | file://<dfx_design_rp_rm_pl>.xclbin \ | 268 | file://<dfx_design_rp_rm_pl>.xclbin \ |
121 | " | 269 | " |
122 | ``` | 270 | ``` |
271 | |||
272 | ``` | ||
273 | # Versal DFx RP | ||
274 | SRC_URI = " \ | ||
275 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
276 | file://accel.json \ | ||
277 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
278 | " | ||
279 | ``` | ||
123 | --- | 280 | --- |
124 | 281 | ||
125 | ## How to create a firmware recipe app | 282 | ## How to create a firmware recipe app |
126 | 283 | ||
127 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | 284 | 1. Follow SDT or XSCT Build instructions whichever build method is used but not |
128 | 2. Create recipes-firmware directory in meta layer and copy the .bit/pdi, | 285 | both. |
286 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md) upto step 4. | ||
287 | b. [XSCT Building Instructions](../README.building.md) | ||
288 | upto step 4.b (With SDT overlay). | ||
289 | 2. Create recipes-firmware directory in meta layer and copy the .bit/bin/pdi, | ||
129 | .dtsi/dtbo, .json and .xclbin file to these directories. | 290 | .dtsi/dtbo, .json and .xclbin file to these directories. |
130 | ``` | 291 | ``` |
131 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files | 292 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files |
132 | $ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files | 293 | $ cp -r <path-to-files>/*.{bit or bin or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files |
133 | ``` | 294 | ``` |
134 | 3. Now create the recipes for flat or static or partial firmware using recipetool. | 295 | 3. Now create the recipes for flat or static or partial firmware using recipetool. |
135 | ``` | 296 | ``` |
@@ -144,8 +305,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
144 | inherit dfx_user_dts | 305 | inherit dfx_user_dts |
145 | 306 | ||
146 | SRC_URI = "\ | 307 | SRC_URI = "\ |
147 | file://zcu111-pl-demo.bit \ | 308 | file://shell.json \ |
148 | file://zcu111-pl-demo.dtsi \ | 309 | file://zcu111-pl-demo-user-dts.bit \ |
310 | file://zcu111-pl-demo-user-dts.dtsi \ | ||
149 | " | 311 | " |
150 | 312 | ||
151 | COMPATIBLE_MACHINE ?= "^$" | 313 | COMPATIBLE_MACHINE ?= "^$" |
@@ -153,7 +315,7 @@ COMPATIBLE_MACHINE:zynqmp = "zynqmp" | |||
153 | ``` | 315 | ``` |
154 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to | 316 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to |
155 | local.conf as shown below. | 317 | local.conf as shown below. |
156 | > **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo | 318 | > **Note:** fpga-manager-script provides fpgautil tool to load .bin/pdi and dtbo |
157 | > at runtime linux. | 319 | > at runtime linux. |
158 | ``` | 320 | ``` |
159 | MACHINE_FEATURES += "fpga-overlay" | 321 | MACHINE_FEATURES += "fpga-overlay" |
@@ -162,7 +324,11 @@ IMAGE_INSTALL:append = " \ | |||
162 | fpga-manager-script \ | 324 | fpga-manager-script \ |
163 | " | 325 | " |
164 | ``` | 326 | ``` |
165 | 6. Follow [Building Instructions](../README.building.md) and continue from step 5. | 327 | 6. Follow SDT or XSCT Build instructions whichever build method is used but not |
328 | both. | ||
329 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from step 5. | ||
330 | b. [XSCT Building Instructions](../README.building.md) | ||
331 | and continue from step 5. | ||
166 | 7. Once images are built firmware app files will be installed on target_rootfs. | 332 | 7. Once images are built firmware app files will be installed on target_rootfs. |
167 | ``` | 333 | ``` |
168 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name | 334 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name |
@@ -170,7 +336,7 @@ IMAGE_INSTALL:append = " \ | |||
170 | --- | 336 | --- |
171 | 337 | ||
172 | ## Test Procedure on Target | 338 | ## Test Procedure on Target |
173 | * Once Linux boots on target, use fpgautil command to load .bit or .pdi and | 339 | * Once Linux boots on target, use fpgautil command to load .bin or .pdi and |
174 | corresponding dt overlay as shown below. | 340 | corresponding dt overlay as shown below. |
175 | > **Note:** firmware can be loaded only with sudo or root permissions. | 341 | > **Note:** firmware can be loaded only with sudo or root permissions. |
176 | --- | 342 | --- |
@@ -179,142 +345,188 @@ IMAGE_INSTALL:append = " \ | |||
179 | 345 | ||
180 | * ZynqMP | 346 | * ZynqMP |
181 | ``` | 347 | ``` |
182 | yocto-zynqmp-generic-20231:~$ sudo su | 348 | yocto-zynqmp-generic:~$ cd / |
183 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 349 | yocto-zynqmp-generic:/$ sudo su |
350 | yocto-zynqmp-generic:/# cat /proc/interrupts | ||
184 | CPU0 CPU1 CPU2 CPU3 | 351 | CPU0 CPU1 CPU2 CPU3 |
185 | 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer | 352 | 11: 3399 4404 3273 3113 GICv2 30 Level arch_timer |
186 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 353 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
187 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 354 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
188 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 355 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
189 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 356 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
190 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 357 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
191 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 358 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
192 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 359 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
193 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 360 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
194 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 361 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
195 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 362 | 23: 379 0 0 0 GICv2 53 Level xuartps |
196 | 24: 327 0 0 0 GICv2 53 Level xuartps | 363 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
197 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 364 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
198 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 365 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
199 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 366 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
200 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 367 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
201 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 368 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
202 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 369 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
203 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 370 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
204 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 371 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
205 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 372 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
206 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 373 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
207 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 374 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
208 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 375 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
209 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 376 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
210 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 377 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
211 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 378 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
212 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 379 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
213 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 380 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
214 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 381 | 44: 77 0 0 0 GICv2 95 Level eth0, eth0 |
215 | 45: 76 0 0 0 GICv2 95 Level eth0, eth0 | 382 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
216 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 383 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
217 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 384 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
218 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 385 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
219 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 386 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
220 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 387 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
221 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 388 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
222 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 389 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
223 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 390 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
224 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 391 | IPI0: 73 69 133 115 Rescheduling interrupts |
225 | IPI0: 64 25 87 38 Rescheduling interrupts | 392 | IPI1: 2590 1426 1711 13134 Function call interrupts |
226 | IPI1: 1933 6579 1096 5686 Function call interrupts | ||
227 | IPI2: 0 0 0 0 CPU stop interrupts | 393 | IPI2: 0 0 0 0 CPU stop interrupts |
228 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 394 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
229 | IPI4: 0 0 0 0 Timer broadcast interrupts | 395 | IPI4: 0 0 0 0 Timer broadcast interrupts |
230 | IPI5: 0 0 0 0 IRQ work interrupts | 396 | IPI5: 0 0 0 0 IRQ work interrupts |
231 | IPI6: 0 0 0 0 CPU wake-up interrupts | 397 | IPI6: 0 0 0 0 CPU wake-up interrupts |
232 | Err: 0 | 398 | Err: 0 |
233 | yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/ | 399 | yocto-zynqmp-generic:/# |
400 | yocto-zynqmp-generic:/# tree /lib/firmware/ | ||
234 | /lib/firmware/ | 401 | /lib/firmware/ |
235 | `-- xilinx | 402 | `-- xilinx |
236 | `-- zcu111-pl-demo | 403 | `-- zcu111-pl-demo-user-dts |
237 | |-- zcu111-pl-demo.bit.bin | 404 | |-- shell.json |
238 | `-- zcu111-pl-demo.dtbo | 405 | |-- zcu111-pl-demo-user-dts.bin |
239 | 406 | `-- zcu111-pl-demo-user-dts.dtbo | |
240 | 2 directories, 2 files | 407 | |
241 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo | 408 | 2 directories, 3 files |
242 | [ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager | 409 | yocto-zynqmp-generic:/# |
243 | [ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name | 410 | yocto-zynqmp-generic:/# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.bin -o /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.dtbo |
244 | [ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid | 411 | [ 86.077583] fpga_manager fpga0: writing zcu111-pl-demo-user-dts.bin to Xilinx ZynqMP FPGA Manager |
245 | [ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets | 412 | [ 86.300854] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/firmware-name |
246 | [ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid | 413 | [ 86.311158] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/pid |
247 | [ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 | 414 | [ 86.320571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/resets |
248 | [ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 | 415 | [ 86.330230] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/uid |
249 | [ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 | 416 | [ 86.340074] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 |
250 | [ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 | 417 | [ 86.349574] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 |
251 | [ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 | 418 | [ 86.359510] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 |
252 | [ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 | 419 | [ 86.369526] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 |
253 | [ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | 420 | [ 86.379544] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 |
254 | [ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 | 421 | [ 86.389561] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 |
255 | [ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it! | 422 | [ 86.399588] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 |
256 | [ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it! | 423 | [ 86.409951] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 |
257 | [ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite | 424 | [ 86.439309] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 57, base_baud = 0) is a uartlite |
258 | [ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow! | 425 | [ 86.456365] uartlite a0030000.serial: Runtime PM usage count underflow! |
259 | [ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1 | 426 | [ 86.466353] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input1 |
260 | Time taken to load BIN is 901.000000 Milli Seconds | 427 | Time taken to load BIN is 402.000000 Milli Seconds |
261 | BIN FILE loaded through FPGA manager successfully | 428 | BIN FILE loaded through FPGA manager successfully |
262 | yocto-zynqmp-generic-20231:/home/petalinux# | 429 | yocto-zynqmp-generic:/# |
263 | ``` | 430 | ``` |
264 | * Versal (DFx Static) | 431 | * Versal (DFx Static) |
265 | ``` | 432 | ``` |
266 | yocto-vck190-dfx-2023:~$ sudo su | 433 | yocto-vck190-versal:/$ sudo su |
267 | root@yocto-vck190-dfx-2023:~# | 434 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.pdi -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo |
268 | root@yocto-vck190-dfx-2023:~# fpgautil -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo | 435 | [ 110.575263] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config |
269 | [ 257.555571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config | 436 | [ 110.585557] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid |
270 | [ 257.565879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | 437 | [ 110.594365] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid |
271 | [ 257.574670] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | 438 | [ 110.603307] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 |
272 | [ 257.583599] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 | 439 | [ 110.613152] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 |
273 | [ 257.593434] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 | 440 | [ 110.623007] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 |
274 | [ 257.603268] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 | 441 | [ 110.632849] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 |
275 | [ 257.613100] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 | 442 | [ 110.644516] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 |
276 | [ 257.624762] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 | 443 | [ 110.656351] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 |
277 | [ 257.636589] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 | 444 | [ 110.668188] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 |
278 | [ 257.648415] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 | 445 | [ 110.682762] of-fpga-region fpga:fpga-PR0: FPGA Region probed |
279 | [ 257.663234] of-fpga-region fpga:fpga-PR0: FPGA Region probed | 446 | [ 110.689956] of-fpga-region fpga:fpga-PR1: FPGA Region probed |
280 | [ 257.669135] of-fpga-region fpga:fpga-PR1: FPGA Region probed | 447 | [ 110.695890] of-fpga-region fpga:fpga-PR2: FPGA Region probed |
281 | [ 257.675022] of-fpga-region fpga:fpga-PR2: FPGA Region probed | 448 | Time taken to load BIN is 133.000000 Milli Seconds |
282 | root@yocto-vck190-dfx-2023:~# | 449 | BIN FILE loaded through FPGA manager successfully |
450 | yocto-vck190-versal:/# | ||
283 | ``` | 451 | ``` |
284 | * Versal (DFx RP) | 452 | * Versal (DFx RP) |
285 | ``` | 453 | ``` |
286 | root@yocto-vck190-dfx-2023:~# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 | 454 | yocto-vck190-versal:/$ sudo su |
287 | [ 273.511455] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager | 455 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 |
288 | [284052.461]Loading PDI from DDR | 456 | [ 154.155127] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager |
289 | [284052.566]Monolithic/Master Device | 457 | [173465.709]Loading PDI from DDR |
290 | [284055.847]3.365 ms: PDI initialization time | 458 | [173465.800]Monolithic/Master Device |
291 | [284059.809]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 | 459 | [173469.235]3.520 ms: PDI initialization time |
292 | [284065.432]---Loading Partition#: 0x0, Id: 0x103 | 460 | [173473.045]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 |
293 | [284069.829] 0.033 ms for Partition#: 0x0, Size: 1312 Bytes | 461 | [173478.669]---Loading Partition#: 0x0, Id: 0x103 |
294 | [284074.973]---Loading Partition#: 0x1, Id: 0x105 | 462 | [173483.052] 0.032 ms for Partition#: 0x0, Size: 1264 Bytes |
295 | [284079.344] 0.007 ms for Partition#: 0x1, Size: 160 Bytes | 463 | [173488.219]---Loading Partition#: 0x1, Id: 0x203 |
296 | [284084.430]---Loading Partition#: 0x2, Id: 0x205 | 464 | [173492.599] 0.030 ms for Partition#: 0x1, Size: 672 Bytes |
297 | [284088.844] 0.049 ms for Partition#: 0x2, Size: 960 Bytes | 465 | [173497.682]---Loading Partition#: 0x2, Id: 0x303 |
298 | [284093.887]---Loading Partition#: 0x3, Id: 0x203 | 466 | [173503.193] 1.159 ms for Partition#: 0x2, Size: 204960 Bytes |
299 | [284098.280] 0.030 ms for Partition#: 0x3, Size: 688 Bytes | 467 | [173507.400]---Loading Partition#: 0x3, Id: 0x403 |
300 | [284103.342]---Loading Partition#: 0x4, Id: 0x303 | 468 | [173511.805] 0.054 ms for Partition#: 0x3, Size: 8400 Bytes |
301 | [284108.863] 1.156 ms for Partition#: 0x4, Size: 209440 Bytes | 469 | [173516.979]Subsystem PDI Load: Done |
302 | [284113.052]---Loading Partition#: 0x5, Id: 0x305 | 470 | [ 154.220425] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 |
303 | [284117.712] 0.296 ms for Partition#: 0x5, Size: 3536 Bytes | 471 | [ 154.239592] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input1 |
304 | [284122.594]---Loading Partition#: 0x6, Id: 0x403 | 472 | Time taken to load BIN is 99.000000 Milli Seconds |
305 | [284126.991] 0.034 ms for Partition#: 0x6, Size: 8096 Bytes | ||
306 | [284132.136]---Loading Partition#: 0x7, Id: 0x405 | ||
307 | [284136.507] 0.007 ms for Partition#: 0x7, Size: 160 Bytes | ||
308 | [284141.636]Subsystem PDI Load: Done | ||
309 | [ 273.615503] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
310 | [ 273.627382] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/fpga-bridges | ||
311 | [ 273.636953] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/partial-fpga-config | ||
312 | [ 273.647241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 | ||
313 | [ 273.660826] gpio gpiochip1: (a4010000.gpio): not an immutable chip, please consider fixing it! | ||
314 | [ 273.670490] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input0 | ||
315 | Time taken to load BIN is 171.000000 Milli Seconds | ||
316 | BIN FILE loaded through FPGA manager successfully | 473 | BIN FILE loaded through FPGA manager successfully |
317 | root@yocto-vck190-dfx-2023:~# | 474 | yocto-vck190-versal:/# |
475 | ``` | ||
476 | * Versal (Segmented Configuration) | ||
477 | ``` | ||
478 | yocto-vck190-versal:/$ sudo su | ||
479 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-full/vck190-dfx-full.pdi -o /lib/firmware/xilinx/vck190-dfx-full/vck190-dfx-full.dtbo | ||
480 | [ 642.857986] fpga_manager fpga0: writing vck190-dfx-full.pdi to Xilinx Versal FPGA Manager | ||
481 | [653673.622]Loading PDI from DDR | ||
482 | [653673.713]Monolithic/Master Device | ||
483 | [653677.159]3.531 ms: PDI initialization time | ||
484 | [653680.973]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700001 | ||
485 | [653686.608]---Loading Partition#: 0x0, Id: 0x103 | ||
486 | [653705.058] 14.091 ms for Partition#: 0x0, Size: 22176 Bytes | ||
487 | [653707.626]---Loading Partition#: 0x1, Id: 0x105 | ||
488 | [653712.243] 0.264 ms for Partition#: 0x1, Size: 4784 Bytes | ||
489 | [653717.183]---Loading Partition#: 0x2, Id: 0x205 | ||
490 | [653725.148] 3.608 ms for Partition#: 0x2, Size: 64368 Bytes | ||
491 | [653727.632]---Loading Partition#: 0x3, Id: 0x203 | ||
492 | [653732.018] 0.030 ms for Partition#: 0x3, Size: 672 Bytes | ||
493 | [653737.107]---Loading Partition#: 0x4, Id: 0x303 | ||
494 | [653768.983] 27.516 ms for Partition#: 0x4, Size: 1115456 Bytes | ||
495 | [653771.723]---Loading Partition#: 0x5, Id: 0x305 | ||
496 | [653777.150] 1.068 ms for Partition#: 0x5, Size: 69056 Bytes | ||
497 | [653781.371]---Loading Partition#: 0x6, Id: 0x403 | ||
498 | [653785.892] 0.166 ms for Partition#: 0x6, Size: 242320 Bytes | ||
499 | [653791.103]---Loading Partition#: 0x7, Id: 0x405 | ||
500 | ERR PldMemCtrlrMap: 0x490E | ||
501 | ERR PldInitNode: 0xFFFF | ||
502 | ERR XPm_InitNode: 0xFFFF | ||
503 | ALERT XPm_ProcessCmd: Error 0x15 while processing command 0xC023E | ||
504 | ALERT XPm_ProcessCmd: Err Code: 0x15 | ||
505 | [653811.158]CMD: 0x000C023E execute failed, Processed Cdo Length 0x129C | ||
506 | [653817.390]CMD Payload START, Len:0x00000008 | ||
507 | 0x00000000F20012C0: 0x18700001 0x0000000A 0xF6110000 0x00000002 | ||
508 | 0x00000000F20012CC: 0x00000000 0x00000000 0x80000000 0x00000000 | ||
509 | 0x00000000F20012DC: | ||
510 | [653834.800]CMD Payload END | ||
511 | [653837.277]Error loading PL data: | ||
512 | CFU_ISR: 0x00000000, CFU_STATUS: 0x00002A8C | ||
513 | PMC ERR1: 0x00000000, PMC ERR2: 0x00000000 | ||
514 | [653848.127]PLM Error Status: 0x223E0015 | ||
515 | [65 851.704]XPlm _IpiDispatehHandl0:: Error:hIPI crmmand faileddfor tommanA ID: 0x1000701 | ||
516 | [653859.465]PLM Error Status: 0x27010015 | ||
517 | [ 643.063905] fpga_region region0: failed to load FPGA image | ||
518 | [ 643.069420] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
519 | [ 643.079075] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | ||
520 | [ 643.087857] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | ||
521 | [ 643.096849] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_bram_ctrl_0 | ||
522 | [ 643.107288] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_dip_sw | ||
523 | [ 643.117729] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_led | ||
524 | [ 643.127906] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_pb | ||
525 | [ 643.137996] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | ||
526 | [ 643.178340] 20100000000.serial: ttyUL0 at MMIO 0x20100000000 (irq = 41, base_baud = 0) is a uartlite | ||
527 | [ 643.189536] uartlite 20100000000.serial: Runtime PM usage count underflow! | ||
528 | [ 643.198059] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input0 | ||
529 | yocto-vck190-versal:/# | ||
318 | ``` | 530 | ``` |
319 | --- | 531 | --- |
320 | 532 | ||
@@ -324,148 +536,148 @@ root@yocto-vck190-dfx-2023:~# | |||
324 | * Verify PL GPIO DIP switches and Push buttons are registered. | 536 | * Verify PL GPIO DIP switches and Push buttons are registered. |
325 | * Move the DIP Switches ON/OFF and verify the interrupt counts. | 537 | * Move the DIP Switches ON/OFF and verify the interrupt counts. |
326 | ``` | 538 | ``` |
327 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 539 | yocto-zynqmp-generic:/# cat /proc/interrupts |
328 | CPU0 CPU1 CPU2 CPU3 | 540 | CPU0 CPU1 CPU2 CPU3 |
329 | 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer | 541 | 11: 4254 6509 4214 4236 GICv2 30 Level arch_timer |
330 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 542 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
331 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 543 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
332 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 544 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
333 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 545 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
334 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 546 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
335 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 547 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
336 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 548 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
337 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 549 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
338 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 550 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
339 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 551 | 23: 579 0 0 0 GICv2 53 Level xuartps |
340 | 24: 515 0 0 0 GICv2 53 Level xuartps | 552 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
341 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 553 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
342 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 554 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
343 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 555 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
344 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 556 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
345 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 557 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
346 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 558 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
347 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 559 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
348 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 560 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
349 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 561 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
350 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 562 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
351 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 563 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
352 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 564 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
353 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 565 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
354 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 566 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
355 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 567 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
356 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 568 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
357 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 569 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
358 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 570 | 44: 146 0 0 0 GICv2 95 Level eth0, eth0 |
359 | 45: 110 0 0 0 GICv2 95 Level eth0, eth0 | 571 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
360 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 572 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
361 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 573 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
362 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 574 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
363 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 575 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
364 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 576 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
365 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 577 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
366 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 578 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
367 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 579 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
368 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 580 | 58: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N |
369 | 59: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | 581 | 59: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E |
370 | 60: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | 582 | 60: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S |
371 | 61: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | 583 | 61: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W |
372 | 62: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | 584 | 62: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C |
373 | 63: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | 585 | 63: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 |
374 | 64: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | 586 | 64: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 |
375 | 65: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | 587 | 65: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 |
376 | 66: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | 588 | 66: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 |
377 | 67: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | 589 | 67: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 |
378 | 68: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | 590 | 68: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 |
379 | 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | 591 | 69: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 |
380 | 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | 592 | 70: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 |
381 | 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | 593 | IPI0: 77 79 141 123 Rescheduling interrupts |
382 | IPI0: 64 25 87 38 Rescheduling interrupts | 594 | IPI1: 2621 1536 1782 13236 Function call interrupts |
383 | IPI1: 2066 6747 1212 5791 Function call interrupts | ||
384 | IPI2: 0 0 0 0 CPU stop interrupts | 595 | IPI2: 0 0 0 0 CPU stop interrupts |
385 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 596 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
386 | IPI4: 0 0 0 0 Timer broadcast interrupts | 597 | IPI4: 0 0 0 0 Timer broadcast interrupts |
387 | IPI5: 0 0 0 0 IRQ work interrupts | 598 | IPI5: 0 0 0 0 IRQ work interrupts |
388 | IPI6: 0 0 0 0 CPU wake-up interrupts | 599 | IPI6: 0 0 0 0 CPU wake-up interrupts |
389 | Err: 0 | 600 | Err: 0 |
390 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 601 | yocto-zynqmp-generic:/# |
602 | yocto-zynqmp-generic:/# | ||
603 | yocto-zynqmp-generic:/# cat /proc/interrupts | ||
391 | CPU0 CPU1 CPU2 CPU3 | 604 | CPU0 CPU1 CPU2 CPU3 |
392 | 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer | 605 | 11: 4972 7894 4568 4673 GICv2 30 Level arch_timer |
393 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 606 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
394 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 607 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
395 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 608 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
396 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 609 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
397 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 610 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
398 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 611 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
399 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 612 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
400 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 613 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
401 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 614 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
402 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 615 | 23: 685 0 0 0 GICv2 53 Level xuartps |
403 | 24: 603 0 0 0 GICv2 53 Level xuartps | 616 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
404 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 617 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
405 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 618 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
406 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 619 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
407 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 620 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
408 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 621 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
409 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 622 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
410 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 623 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
411 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 624 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
412 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 625 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
413 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 626 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
414 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 627 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
415 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 628 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
416 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 629 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
417 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 630 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
418 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 631 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
419 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 632 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
420 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 633 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
421 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 634 | 44: 265 0 0 0 GICv2 95 Level eth0, eth0 |
422 | 45: 134 0 0 0 GICv2 95 Level eth0, eth0 | 635 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
423 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 636 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
424 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 637 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
425 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 638 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
426 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 639 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
427 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 640 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
428 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 641 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
429 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 642 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
430 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 643 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
431 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 644 | 58: 12 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N |
432 | 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | 645 | 59: 8 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E |
433 | 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | 646 | 60: 8 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S |
434 | 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | 647 | 61: 8 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W |
435 | 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | 648 | 62: 10 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C |
436 | 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | 649 | 63: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 |
437 | 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | 650 | 64: 4 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 |
438 | 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | 651 | 65: 2 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 |
439 | 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | 652 | 66: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 |
440 | 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | 653 | 67: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 |
441 | 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | 654 | 68: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 |
442 | 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | 655 | 69: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 |
443 | 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | 656 | 70: 4 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 |
444 | 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | 657 | IPI0: 77 79 142 123 Rescheduling interrupts |
445 | IPI0: 64 26 87 38 Rescheduling interrupts | 658 | IPI1: 2641 1596 2011 13239 Function call interrupts |
446 | IPI1: 2163 6791 1243 5866 Function call interrupts | ||
447 | IPI2: 0 0 0 0 CPU stop interrupts | 659 | IPI2: 0 0 0 0 CPU stop interrupts |
448 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 660 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
449 | IPI4: 0 0 0 0 Timer broadcast interrupts | 661 | IPI4: 0 0 0 0 Timer broadcast interrupts |
450 | IPI5: 0 0 0 0 IRQ work interrupts | 662 | IPI5: 0 0 0 0 IRQ work interrupts |
451 | IPI6: 0 0 0 0 CPU wake-up interrupts | 663 | IPI6: 0 0 0 0 CPU wake-up interrupts |
452 | Err: 0 | 664 | Err: 0 |
453 | yocto-zynqmp-generic-20231:/home/petalinux# | 665 | yocto-zynqmp-generic:/# |
454 | ``` | 666 | ``` |
455 | --- | 667 | --- |
456 | 668 | ||
457 | ### Unloading PL bitstream or pdi and dt overlay | 669 | ### Unloading PL bitstream or pdi and dt overlay |
458 | * Zynq or ZynqMP | 670 | * Zynq or ZynqMP |
459 | ``` | 671 | ``` |
460 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R | 672 | yocto-zynqmp-generic:/home/petalinux# fpgautil -R |
461 | ``` | 673 | ``` |
462 | * Versal (DFx RP) | 674 | * Versal (DFx RP) |
463 | ``` | 675 | ``` |
464 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n PR0 | 676 | yocto-vck190-versal:/# fpgautil -R -n PR0 |
465 | ``` | 677 | ``` |
466 | * Versal (DFx Static) | 678 | * Versal (DFx Static) |
467 | ``` | 679 | ``` |
468 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n Full | 680 | yocto-vck190-versal:/# fpgautil -R -n Full |
469 | ``` | 681 | ``` |
470 | --- | 682 | --- |
471 | 683 | ||
diff --git a/docs/README.fpgamanager.custom.md b/docs/README.fpgamanager.custom.md deleted file mode 100644 index dbdf5907..00000000 --- a/docs/README.fpgamanager.custom.md +++ /dev/null | |||
@@ -1,478 +0,0 @@ | |||
1 | # Build Instructions to create firmware recipes using fpgamanager_custom bbclass | ||
2 | |||
3 | * [Introduction](#introduction) | ||
4 | * [How to create a firmware recipe app](#how-to-create-a-firmware-recipe-app) | ||
5 | * [Test Procedure on Target](#test-procedure-on-target) | ||
6 | * [Loading PL bitstream or pdi and dt overlay](#loading-pl-bitstream-or-pdi-and-dt-overlay) | ||
7 | * [Testing PL functionality](#testing-pl-functionality) | ||
8 | * [Unloading PL bitstream or pdi and dt overlay](#unloading-pl-bitstream-or-pdi-and-dt-overlay) | ||
9 | * [References](#references) | ||
10 | |||
11 | > **Note:** This README will be deprecated in 2024.1 release. User sthould start | ||
12 | > using [DFx User DTS README](README.dfx.user.dts.md) | ||
13 | |||
14 | ## Introduction | ||
15 | This readme describes the build instructions to create firmware recipes using | ||
16 | fpgamanager_custom.bbclass for dynamic configuration. This bitbake class supports | ||
17 | following use cases. | ||
18 | |||
19 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for | ||
20 | > shell.json and accel.json file content. | ||
21 | |||
22 | * **Zynq-7000 and ZynqMP**: | ||
23 | * Design: Vivado flat design. | ||
24 | * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional) | ||
25 | * Usage Examples: | ||
26 | ``` | ||
27 | SRC_URI = " \ | ||
28 | file://<flat_design_pl>.bit \ | ||
29 | file://<flat_design_pl>.dtsi \ | ||
30 | file://shell.json \ | ||
31 | " | ||
32 | ``` | ||
33 | |||
34 | ``` | ||
35 | SRC_URI = " \ | ||
36 | file://<flat_design_pl>.bit \ | ||
37 | file://<flat_design_pl>.dtbo \ | ||
38 | file://shell.json \ | ||
39 | " | ||
40 | ``` | ||
41 | |||
42 | * **ZynqMP and Versal**: | ||
43 | * Design: Vivado DFx design. | ||
44 | * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo | ||
45 | shell.json or accel.json (optional) and .xclbin (optional). | ||
46 | * Usage Examples: | ||
47 | |||
48 | ``` | ||
49 | # ZynqMP DFx Static | ||
50 | SRC_URI = " \ | ||
51 | file://<dfx_design_static_pl>.bit \ | ||
52 | file://<dfx_design_static_pl>.dtsi \ | ||
53 | file://shell.json \ | ||
54 | file://<dfx_design_static_pl>.xclbin \ | ||
55 | " | ||
56 | ``` | ||
57 | |||
58 | ``` | ||
59 | # ZynqMP DFx Static | ||
60 | SRC_URI = " \ | ||
61 | file://<dfx_design_static_pl>.bit \ | ||
62 | file://<dfx_design_static_pl>.dtbo \ | ||
63 | file://shell.json \ | ||
64 | file://<dfx_design_static_pl>.xclbin \ | ||
65 | " | ||
66 | ``` | ||
67 | |||
68 | ``` | ||
69 | # ZynqMP DFx RP | ||
70 | SRC_URI = " \ | ||
71 | file://<dfx_design_rp_rm_pl>.bit \ | ||
72 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
73 | file://accel.json \ | ||
74 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
75 | " | ||
76 | ``` | ||
77 | |||
78 | ``` | ||
79 | # ZynqMP DFx RP | ||
80 | SRC_URI = " \ | ||
81 | file://<dfx_design_rp_rm_pl>.bit \ | ||
82 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
83 | file://accel.json \ | ||
84 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
85 | " | ||
86 | ``` | ||
87 | ``` | ||
88 | # Versal DFx Static | ||
89 | SRC_URI = " \ | ||
90 | file://<dfx_design_static_pl>.pdi \ | ||
91 | file://<dfx_design_static_pl>.dtsi \ | ||
92 | file://shell.json \ | ||
93 | file://<dfx_design_static_pl>.xclbin \ | ||
94 | " | ||
95 | ``` | ||
96 | |||
97 | ``` | ||
98 | # Versal DFx Static | ||
99 | SRC_URI = " \ | ||
100 | file://<dfx_design_static_pl>.pdi \ | ||
101 | file://<dfx_design_static_pl>.dtbo \ | ||
102 | file://shell.json \ | ||
103 | file://<dfx_design_static_pl>.xclbin \ | ||
104 | " | ||
105 | ``` | ||
106 | |||
107 | ``` | ||
108 | # Versal DFx RP | ||
109 | SRC_URI = " \ | ||
110 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
111 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
112 | file://accel.json \ | ||
113 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
114 | " | ||
115 | ``` | ||
116 | |||
117 | ``` | ||
118 | # Versal DFx RP | ||
119 | SRC_URI = " \ | ||
120 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
121 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
122 | file://accel.json \ | ||
123 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
124 | " | ||
125 | ``` | ||
126 | --- | ||
127 | |||
128 | ## How to create a firmware recipe app | ||
129 | |||
130 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
131 | 2. Create recipes-firmware directory in meta layer and copy the .bit/pdi, | ||
132 | .dtsi/dtbo, .json and .xclbin file to these directories. | ||
133 | ``` | ||
134 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files | ||
135 | $ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files | ||
136 | ``` | ||
137 | 3. Now create the recipes for flat or static or partial firmware using recipetool. | ||
138 | ``` | ||
139 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-app-name>/firmware-app-name.bb file:///<meta-layer>/recipes-firmware/<firmware-app-name>/files | ||
140 | ``` | ||
141 | 4. Modify the recipe and inherit fpgamanager_custom bbclass as shown below. | ||
142 | ``` | ||
143 | SUMMARY = "Full Bitstream loading zcu111-pl-demo firmware using fpgamanager_custom bbclass" | ||
144 | LICENSE = "MIT" | ||
145 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
146 | |||
147 | inherit fpgamanager_custom | ||
148 | |||
149 | SRC_URI = "\ | ||
150 | file://zcu111-pl-demo.bit \ | ||
151 | file://zcu111-pl-demo.dtsi \ | ||
152 | " | ||
153 | |||
154 | COMPATIBLE_MACHINE ?= "^$" | ||
155 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
156 | ``` | ||
157 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to | ||
158 | local.conf as shown below. | ||
159 | > **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo | ||
160 | > at runtime linux. | ||
161 | ``` | ||
162 | MACHINE_FEATURES += "fpga-overlay" | ||
163 | IMAGE_INSTALL:append = " \ | ||
164 | firmware-app-name \ | ||
165 | fpga-manager-script \ | ||
166 | " | ||
167 | ``` | ||
168 | 6. Follow [Building Instructions](../README.building.md) and continue from step 5. | ||
169 | 7. Once images are built firmware app files will be installed on target_rootfs. | ||
170 | ``` | ||
171 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name | ||
172 | ``` | ||
173 | --- | ||
174 | |||
175 | ## Test Procedure on Target | ||
176 | * Once Linux boots on target, use fpgautil command to load .bit or .pdi and | ||
177 | corresponding dt overlay as shown below. | ||
178 | > **Note:** firmware can be loaded only with sudo or root permissions. | ||
179 | --- | ||
180 | |||
181 | ### Loading PL bitstream or pdi and dt overlay | ||
182 | |||
183 | * ZynqMP | ||
184 | ``` | ||
185 | yocto-zynqmp-generic-20231:~$ sudo su | ||
186 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
187 | CPU0 CPU1 CPU2 CPU3 | ||
188 | 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer | ||
189 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
190 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
191 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
192 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
193 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
194 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
195 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
196 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
197 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
198 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
199 | 24: 327 0 0 0 GICv2 53 Level xuartps | ||
200 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
201 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
202 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
203 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
204 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
205 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
206 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
207 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
208 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
209 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
210 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
211 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
212 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
213 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
214 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
215 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
216 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
217 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
218 | 45: 76 0 0 0 GICv2 95 Level eth0, eth0 | ||
219 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
220 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
221 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
222 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
223 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
224 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
225 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
226 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
227 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
228 | IPI0: 64 25 87 38 Rescheduling interrupts | ||
229 | IPI1: 1933 6579 1096 5686 Function call interrupts | ||
230 | IPI2: 0 0 0 0 CPU stop interrupts | ||
231 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
232 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
233 | IPI5: 0 0 0 0 IRQ work interrupts | ||
234 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
235 | Err: 0 | ||
236 | yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/ | ||
237 | /lib/firmware/ | ||
238 | `-- xilinx | ||
239 | `-- zcu111-pl-demo | ||
240 | |-- zcu111-pl-demo.bit.bin | ||
241 | `-- zcu111-pl-demo.dtbo | ||
242 | |||
243 | 2 directories, 2 files | ||
244 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo | ||
245 | [ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager | ||
246 | [ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name | ||
247 | [ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid | ||
248 | [ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets | ||
249 | [ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid | ||
250 | [ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 | ||
251 | [ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 | ||
252 | [ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 | ||
253 | [ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 | ||
254 | [ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 | ||
255 | [ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 | ||
256 | [ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | ||
257 | [ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 | ||
258 | [ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it! | ||
259 | [ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it! | ||
260 | [ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite | ||
261 | [ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow! | ||
262 | [ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1 | ||
263 | Time taken to load BIN is 901.000000 Milli Seconds | ||
264 | BIN FILE loaded through FPGA manager successfully | ||
265 | yocto-zynqmp-generic-20231:/home/petalinux# | ||
266 | ``` | ||
267 | * Versal (DFx Static) | ||
268 | ``` | ||
269 | yocto-vck190-dfx-2023:~$ sudo su | ||
270 | root@yocto-vck190-dfx-2023:~# | ||
271 | root@yocto-vck190-dfx-2023:~# fpgautil -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo | ||
272 | [ 257.555571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config | ||
273 | [ 257.565879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | ||
274 | [ 257.574670] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | ||
275 | [ 257.583599] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 | ||
276 | [ 257.593434] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 | ||
277 | [ 257.603268] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 | ||
278 | [ 257.613100] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 | ||
279 | [ 257.624762] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 | ||
280 | [ 257.636589] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 | ||
281 | [ 257.648415] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 | ||
282 | [ 257.663234] of-fpga-region fpga:fpga-PR0: FPGA Region probed | ||
283 | [ 257.669135] of-fpga-region fpga:fpga-PR1: FPGA Region probed | ||
284 | [ 257.675022] of-fpga-region fpga:fpga-PR2: FPGA Region probed | ||
285 | root@yocto-vck190-dfx-2023:~# | ||
286 | ``` | ||
287 | * Versal (DFx RP) | ||
288 | ``` | ||
289 | root@yocto-vck190-dfx-2023:~# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 | ||
290 | [ 273.511455] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager | ||
291 | [284052.461]Loading PDI from DDR | ||
292 | [284052.566]Monolithic/Master Device | ||
293 | [284055.847]3.365 ms: PDI initialization time | ||
294 | [284059.809]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 | ||
295 | [284065.432]---Loading Partition#: 0x0, Id: 0x103 | ||
296 | [284069.829] 0.033 ms for Partition#: 0x0, Size: 1312 Bytes | ||
297 | [284074.973]---Loading Partition#: 0x1, Id: 0x105 | ||
298 | [284079.344] 0.007 ms for Partition#: 0x1, Size: 160 Bytes | ||
299 | [284084.430]---Loading Partition#: 0x2, Id: 0x205 | ||
300 | [284088.844] 0.049 ms for Partition#: 0x2, Size: 960 Bytes | ||
301 | [284093.887]---Loading Partition#: 0x3, Id: 0x203 | ||
302 | [284098.280] 0.030 ms for Partition#: 0x3, Size: 688 Bytes | ||
303 | [284103.342]---Loading Partition#: 0x4, Id: 0x303 | ||
304 | [284108.863] 1.156 ms for Partition#: 0x4, Size: 209440 Bytes | ||
305 | [284113.052]---Loading Partition#: 0x5, Id: 0x305 | ||
306 | [284117.712] 0.296 ms for Partition#: 0x5, Size: 3536 Bytes | ||
307 | [284122.594]---Loading Partition#: 0x6, Id: 0x403 | ||
308 | [284126.991] 0.034 ms for Partition#: 0x6, Size: 8096 Bytes | ||
309 | [284132.136]---Loading Partition#: 0x7, Id: 0x405 | ||
310 | [284136.507] 0.007 ms for Partition#: 0x7, Size: 160 Bytes | ||
311 | [284141.636]Subsystem PDI Load: Done | ||
312 | [ 273.615503] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
313 | [ 273.627382] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/fpga-bridges | ||
314 | [ 273.636953] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/partial-fpga-config | ||
315 | [ 273.647241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 | ||
316 | [ 273.660826] gpio gpiochip1: (a4010000.gpio): not an immutable chip, please consider fixing it! | ||
317 | [ 273.670490] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input0 | ||
318 | Time taken to load BIN is 171.000000 Milli Seconds | ||
319 | BIN FILE loaded through FPGA manager successfully | ||
320 | root@yocto-vck190-dfx-2023:~# | ||
321 | ``` | ||
322 | --- | ||
323 | |||
324 | ### Testing PL functionality | ||
325 | |||
326 | * This examples uses PL GPIO DIP switches and Push buttons to capture interrupts. | ||
327 | * Verify PL GPIO DIP switches and Push buttons are registered. | ||
328 | * Move the DIP Switches ON/OFF and verify the interrupt counts. | ||
329 | ``` | ||
330 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
331 | CPU0 CPU1 CPU2 CPU3 | ||
332 | 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer | ||
333 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
334 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
335 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
336 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
337 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
338 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
339 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
340 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
341 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
342 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
343 | 24: 515 0 0 0 GICv2 53 Level xuartps | ||
344 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
345 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
346 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
347 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
348 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
349 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
350 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
351 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
352 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
353 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
354 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
355 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
356 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
357 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
358 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
359 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
360 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
361 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
362 | 45: 110 0 0 0 GICv2 95 Level eth0, eth0 | ||
363 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
364 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
365 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
366 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
367 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
368 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
369 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
370 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
371 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
372 | 59: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | ||
373 | 60: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | ||
374 | 61: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | ||
375 | 62: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | ||
376 | 63: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | ||
377 | 64: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | ||
378 | 65: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | ||
379 | 66: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | ||
380 | 67: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | ||
381 | 68: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | ||
382 | 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | ||
383 | 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | ||
384 | 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | ||
385 | IPI0: 64 25 87 38 Rescheduling interrupts | ||
386 | IPI1: 2066 6747 1212 5791 Function call interrupts | ||
387 | IPI2: 0 0 0 0 CPU stop interrupts | ||
388 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
389 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
390 | IPI5: 0 0 0 0 IRQ work interrupts | ||
391 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
392 | Err: 0 | ||
393 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
394 | CPU0 CPU1 CPU2 CPU3 | ||
395 | 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer | ||
396 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
397 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
398 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
399 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
400 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
401 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
402 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
403 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
404 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
405 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
406 | 24: 603 0 0 0 GICv2 53 Level xuartps | ||
407 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
408 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
409 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
410 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
411 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
412 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
413 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
414 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
415 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
416 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
417 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
418 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
419 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
420 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
421 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
422 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
423 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
424 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
425 | 45: 134 0 0 0 GICv2 95 Level eth0, eth0 | ||
426 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
427 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
428 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
429 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
430 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
431 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
432 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
433 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
434 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
435 | 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | ||
436 | 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | ||
437 | 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | ||
438 | 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | ||
439 | 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | ||
440 | 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | ||
441 | 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | ||
442 | 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | ||
443 | 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | ||
444 | 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | ||
445 | 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | ||
446 | 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | ||
447 | 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | ||
448 | IPI0: 64 26 87 38 Rescheduling interrupts | ||
449 | IPI1: 2163 6791 1243 5866 Function call interrupts | ||
450 | IPI2: 0 0 0 0 CPU stop interrupts | ||
451 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
452 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
453 | IPI5: 0 0 0 0 IRQ work interrupts | ||
454 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
455 | Err: 0 | ||
456 | yocto-zynqmp-generic-20231:/home/petalinux# | ||
457 | ``` | ||
458 | --- | ||
459 | |||
460 | ### Unloading PL bitstream or pdi and dt overlay | ||
461 | * Zynq or ZynqMP | ||
462 | ``` | ||
463 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R | ||
464 | ``` | ||
465 | * Versal (DFx RP) | ||
466 | ``` | ||
467 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n PR0 | ||
468 | ``` | ||
469 | * Versal (DFx Static) | ||
470 | ``` | ||
471 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n Full | ||
472 | ``` | ||
473 | --- | ||
474 | |||
475 | ## References | ||
476 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager | ||
477 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming | ||
478 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1188397412/Solution+Versal+PL+Programming | ||
diff --git a/docs/README.fw.package.md b/docs/README.fw.package.md new file mode 100644 index 00000000..a7e54402 --- /dev/null +++ b/docs/README.fw.package.md | |||
@@ -0,0 +1,61 @@ | |||
1 | # How to package and depoly firmware elf or bin to linux root filesystem | ||
2 | |||
3 | * [Introduction](#introduction) | ||
4 | * [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe) | ||
5 | |||
6 | ## Introduction | ||
7 | This readme describes how to package and deploy firmware baremetal or freertos | ||
8 | application elf or bin files to linux root filesystem under /lib/firmware directory. | ||
9 | Packaging an firmware baremetal or freertos application elf or bin files to linux | ||
10 | root filesystem is not automated from multiconfig baremetal or freertos recipes. | ||
11 | Hence user has to create a linux recipe and inherit fw-package which provides | ||
12 | infrastructure to package and deploy firmware elf or bin files to linux root | ||
13 | filesystem. | ||
14 | |||
15 | ## How to create and install firmware package recipe | ||
16 | |||
17 | 1. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) upto step 4. | ||
18 | |||
19 | 2. Create recipes-firmware directory in distribution meta layer. | ||
20 | ``` | ||
21 | $ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/ | ||
22 | ``` | ||
23 | 3. Now create the recipes firmware package using recipetool. | ||
24 | ``` | ||
25 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb | ||
26 | ``` | ||
27 | 4. Modify the recipe and inherit fw-package bbclass as shown below. | ||
28 | |||
29 | > **Note:** | ||
30 | > * **DESTDIR:** Variable to specify elf or bin directory path. Default is set to | ||
31 | > /lib/firmware directory from fw-package,bbclass and user can | ||
32 | > change this value to /boot directory depending on requirement. | ||
33 | > * **FW_NAME:** Variable to define firmware baremetal or freertos application | ||
34 | > recipe name. | ||
35 | > * **TARGET_MC:** Variable to define one of the multiconfig target name | ||
36 | > (ex: cortexr5-0-zynqmp-baremetal) from the BBMULTICONFIG list | ||
37 | > generated at [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) | ||
38 | > step 4. | ||
39 | |||
40 | ``` | ||
41 | SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" | ||
42 | LICENSE = "CLOSED" | ||
43 | |||
44 | inherit fw-package | ||
45 | |||
46 | FW_NAME = "hello-world" | ||
47 | |||
48 | TARGET_MC = "cortexr5-0-zynqmp-baremetal" | ||
49 | |||
50 | FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy" | ||
51 | FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}" | ||
52 | ``` | ||
53 | 5. Add firmware-package recipe to image to local.conf as shown below. | ||
54 | |||
55 | ``` | ||
56 | IMAGE_INSTALL:append = " \ | ||
57 | firmware-package-name \ | ||
58 | " | ||
59 | ``` | ||
60 | 6. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from | ||
61 | step 5. | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc index 0dbbecad..82867489 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc | |||
@@ -111,4 +111,4 @@ EXTRA_OECONF_PATHS = "\ | |||
111 | " | 111 | " |
112 | 112 | ||
113 | # Is a binutils 2.26 issue, not gcc | 113 | # Is a binutils 2.26 issue, not gcc |
114 | CVE_CHECK_IGNORE += "CVE-2021-37322" | 114 | CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc" |
diff --git a/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf b/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf new file mode 100644 index 00000000..e3df1d26 --- /dev/null +++ b/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf | |||
@@ -0,0 +1,52 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: sp701-microblazeel | ||
3 | #@DESCRIPTION: Machine configuration for the SP701 boards. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'sp701-microblazeel:']['sp701-microblazeel' !='${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | # Variables that changes based on hw design or board specific requirement must be | ||
10 | # defined before calling the required inclusion file else pre-expansion value | ||
11 | # defined in microblazeel-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "MIG_7SERIES_0" | ||
16 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
17 | DTC_FLAGS:pn-device-tree ?= "" | ||
18 | XSCTH_PROC:pn-device-tree ?= "microblaze_0" | ||
19 | YAML_DT_BOARD_FLAGS ?= "{BOARD sp701-rev1.0}" | ||
20 | |||
21 | # Yocto u-boot-xlnx variables | ||
22 | |||
23 | # Yocto FS-Boot variables | ||
24 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
25 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
26 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "MIG_7SERIES_0" | ||
27 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
28 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x80000000" | ||
32 | UBOOT_LOADADDRESS ?= "0x80000000" | ||
33 | |||
34 | # xilinx-sp701 Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyUL0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Set DDR Base address for u-boot-xlnx-scr variables | ||
39 | DDR_BASEADDR ?= "0x80000000" | ||
40 | SKIP_APPEND_BASEADDR ?= "0" | ||
41 | |||
42 | # Required generic machine inclusion | ||
43 | require conf/machine/microblaze-generic.conf | ||
44 | |||
45 | # This machine conf file uses sp701-microblazeel xsa as reference input. | ||
46 | # User can override with kc705 custom xsa using HDF_BASE and HDF_PATH variables | ||
47 | # from local.conf. | ||
48 | HDF_MACHINE = "sp701-microblazeel" | ||
49 | |||
50 | #### No additional settings should be after the Postamble | ||
51 | #### Postamble | ||
52 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' sp701_microblazeel']['sp701-microblazeel' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend index fa4816af..7acda75e 100644 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend +++ b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend | |||
@@ -5,3 +5,5 @@ COMPATIBLE_MACHINE:qemu-zynq7 = ".*" | |||
5 | SRC_URI:append:qemu-zynq7 = " file://qemu-zynq7.dts" | 5 | SRC_URI:append:qemu-zynq7 = " file://qemu-zynq7.dts" |
6 | 6 | ||
7 | EXTRA_OVERLAYS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' pnc.dtsi', '', d)}" | 7 | EXTRA_OVERLAYS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' pnc.dtsi', '', d)}" |
8 | |||
9 | EXTRA_OVERLAYS:append:vek280-versal = " system-vek280.dtsi" | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi b/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi new file mode 100644 index 00000000..0d2ca87d --- /dev/null +++ b/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi | |||
@@ -0,0 +1,20 @@ | |||
1 | / { | ||
2 | /* Reserve the bad block DDR memory for linux to not touch it, refer:CR-1143646 */ | ||
3 | reserved-memory { | ||
4 | #address-cells = <2>; | ||
5 | #size-cells = <2>; | ||
6 | ranges; | ||
7 | pl_ddr: buffer@0 | ||
8 | { | ||
9 | no-map; | ||
10 | reg = <0x08 0x00 0x00 0x80000000>; | ||
11 | }; | ||
12 | |||
13 | lpddr_memory: buffer@1 | ||
14 | { | ||
15 | no-map; | ||
16 | reg = <0x500 0x0 0x2 0x0>; | ||
17 | }; | ||
18 | |||
19 | }; | ||
20 | }; | ||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch new file mode 100644 index 00000000..660bc218 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch | |||
@@ -0,0 +1,305 @@ | |||
1 | From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:14:13 +1000 | ||
4 | Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards | ||
5 | |||
6 | Add the dglnt_encoder driver that enables DRM support for the VGA and | ||
7 | HDMI output ports found on many Digilent boards. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
12 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
13 | --- | ||
14 | .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++ | ||
15 | drivers/gpu/drm/xilinx/Kconfig | 6 + | ||
16 | drivers/gpu/drm/xilinx/Makefile | 1 + | ||
17 | drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++ | ||
18 | 4 files changed, 247 insertions(+) | ||
19 | create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
20 | create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
21 | |||
22 | diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
23 | new file mode 100644 | ||
24 | index 0000000..242b24e | ||
25 | --- /dev/null | ||
26 | +++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
27 | @@ -0,0 +1,23 @@ | ||
28 | +Device-Tree bindings for Digilent DRM Encoder Slave | ||
29 | + | ||
30 | +This driver provides support for VGA and HDMI outputs on Digilent FPGA boards. | ||
31 | +The VGA or HDMI port must be connected to a Xilinx display pipeline via an | ||
32 | +axi2vid IP core. | ||
33 | + | ||
34 | +Required properties: | ||
35 | + - compatible: Should be "digilent,drm-encoder". | ||
36 | + | ||
37 | +Optional properties: | ||
38 | + - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video | ||
39 | + connector. This is used to obtain the supported resolutions | ||
40 | + of an attached monitor. If not defined, then a default | ||
41 | + set of resolutions is used and the display will initialize | ||
42 | + to 720p. Note most VGA connectors on Digilent boards do | ||
43 | + not have the DDC bus routed out. | ||
44 | + | ||
45 | +Example: | ||
46 | + | ||
47 | + encoder_0: digilent_encoder { | ||
48 | + compatible = "digilent,drm-encoder"; | ||
49 | + dglnt,edid-i2c = <&i2c1>; | ||
50 | + }; | ||
51 | diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig | ||
52 | index 57e18a9..d9ecff2 100644 | ||
53 | --- a/drivers/gpu/drm/xilinx/Kconfig | ||
54 | +++ b/drivers/gpu/drm/xilinx/Kconfig | ||
55 | @@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB | ||
56 | help | ||
57 | DRM driver for Xilinx Display Port Subsystem. | ||
58 | |||
59 | +config DRM_DIGILENT_ENCODER | ||
60 | + tristate "Digilent VGA/HDMI DRM Encoder Driver" | ||
61 | + depends on DRM_XILINX | ||
62 | + help | ||
63 | + DRM slave encoder for Video-out on Digilent boards. | ||
64 | + | ||
65 | config DRM_XILINX_DP_SUB_DEBUG_FS | ||
66 | bool "Xilinx DRM DPSUB debugfs" | ||
67 | depends on DEBUG_FS && DRM_XILINX_DP_SUB | ||
68 | diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile | ||
69 | index 19bc154..c2717e40 100644 | ||
70 | --- a/drivers/gpu/drm/xilinx/Makefile | ||
71 | +++ b/drivers/gpu/drm/xilinx/Makefile | ||
72 | @@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \ | ||
73 | xilinx_drm_plane.o | ||
74 | xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o | ||
75 | |||
76 | +obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o | ||
77 | obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o | ||
78 | obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o | ||
79 | obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o | ||
80 | diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
81 | new file mode 100644 | ||
82 | index 0000000..cb9fc7d | ||
83 | --- /dev/null | ||
84 | +++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
85 | @@ -0,0 +1,217 @@ | ||
86 | +/* | ||
87 | + * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards | ||
88 | + * | ||
89 | + * Copyright (C) 2015 Digilent | ||
90 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
91 | + * | ||
92 | + * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat. | ||
93 | + * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc. | ||
94 | + * | ||
95 | + * This software is licensed under the terms of the GNU General Public | ||
96 | + * License version 2, as published by the Free Software Foundation, and | ||
97 | + * may be copied, distributed, and modified under those terms. | ||
98 | + * | ||
99 | + * This program is distributed in the hope that it will be useful, | ||
100 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
101 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
102 | + * GNU General Public License for more details. | ||
103 | + */ | ||
104 | + | ||
105 | +#include <drm/drmP.h> | ||
106 | +#include <drm/drm_edid.h> | ||
107 | +#include <drm/drm_encoder_slave.h> | ||
108 | + | ||
109 | +#include <linux/device.h> | ||
110 | +#include <linux/module.h> | ||
111 | +#include <linux/err.h> | ||
112 | +#include <linux/i2c.h> | ||
113 | +#include <linux/of.h> | ||
114 | +#include <linux/of_platform.h> | ||
115 | +#include <linux/platform_device.h> | ||
116 | + | ||
117 | +#define DGLNT_ENC_MAX_FREQ 150000 | ||
118 | +#define DGLNT_ENC_MAX_H 1920 | ||
119 | +#define DGLNT_ENC_MAX_V 1080 | ||
120 | +#define DGLNT_ENC_PREF_H 1280 | ||
121 | +#define DGLNT_ENC_PREF_V 720 | ||
122 | + | ||
123 | +struct dglnt_encoder { | ||
124 | + struct drm_encoder *encoder; | ||
125 | + struct i2c_adapter *i2c_bus; | ||
126 | + bool i2c_present; | ||
127 | +}; | ||
128 | + | ||
129 | +static inline struct dglnt_encoder *to_dglnt_encoder( | ||
130 | + struct drm_encoder *encoder) | ||
131 | +{ | ||
132 | + return to_encoder_slave(encoder)->slave_priv; | ||
133 | +} | ||
134 | + | ||
135 | +static bool dglnt_mode_fixup(struct drm_encoder *encoder, | ||
136 | + const struct drm_display_mode *mode, | ||
137 | + struct drm_display_mode *adjusted_mode) | ||
138 | +{ | ||
139 | + return true; | ||
140 | +} | ||
141 | + | ||
142 | +static void dglnt_encoder_mode_set(struct drm_encoder *encoder, | ||
143 | + struct drm_display_mode *mode, | ||
144 | + struct drm_display_mode *adjusted_mode) | ||
145 | +{ | ||
146 | +} | ||
147 | + | ||
148 | +static void | ||
149 | +dglnt_encoder_dpms(struct drm_encoder *encoder, int mode) | ||
150 | +{ | ||
151 | +} | ||
152 | + | ||
153 | +static void dglnt_encoder_save(struct drm_encoder *encoder) | ||
154 | +{ | ||
155 | +} | ||
156 | + | ||
157 | +static void dglnt_encoder_restore(struct drm_encoder *encoder) | ||
158 | +{ | ||
159 | +} | ||
160 | + | ||
161 | +static int dglnt_encoder_mode_valid(struct drm_encoder *encoder, | ||
162 | + struct drm_display_mode *mode) | ||
163 | +{ | ||
164 | + if (mode && | ||
165 | + !(mode->flags & ((DRM_MODE_FLAG_INTERLACE | | ||
166 | + DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) && | ||
167 | + (mode->clock <= DGLNT_ENC_MAX_FREQ) && | ||
168 | + (mode->hdisplay <= DGLNT_ENC_MAX_H) && | ||
169 | + (mode->vdisplay <= DGLNT_ENC_MAX_V)) | ||
170 | + return MODE_OK; | ||
171 | + return MODE_BAD; | ||
172 | +} | ||
173 | + | ||
174 | +static int dglnt_encoder_get_modes(struct drm_encoder *encoder, | ||
175 | + struct drm_connector *connector) | ||
176 | +{ | ||
177 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
178 | + struct edid *edid; | ||
179 | + int num_modes = 0; | ||
180 | + | ||
181 | + if (dglnt->i2c_present) { | ||
182 | + edid = drm_get_edid(connector, dglnt->i2c_bus); | ||
183 | + drm_connector_update_edid_property(connector, edid); | ||
184 | + if (edid) { | ||
185 | + num_modes = drm_add_edid_modes(connector, edid); | ||
186 | + kfree(edid); | ||
187 | + } | ||
188 | + } else { | ||
189 | + num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H, | ||
190 | + DGLNT_ENC_MAX_V); | ||
191 | + drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H, | ||
192 | + DGLNT_ENC_PREF_V); | ||
193 | + } | ||
194 | + return num_modes; | ||
195 | +} | ||
196 | + | ||
197 | +static enum drm_connector_status dglnt_encoder_detect( | ||
198 | + struct drm_encoder *encoder, | ||
199 | + struct drm_connector *connector) | ||
200 | +{ | ||
201 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
202 | + | ||
203 | + if (dglnt->i2c_present) { | ||
204 | + if (drm_probe_ddc(dglnt->i2c_bus)) | ||
205 | + return connector_status_connected; | ||
206 | + return connector_status_disconnected; | ||
207 | + } else | ||
208 | + return connector_status_unknown; | ||
209 | +} | ||
210 | + | ||
211 | +static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = { | ||
212 | + .dpms = dglnt_encoder_dpms, | ||
213 | + .save = dglnt_encoder_save, | ||
214 | + .restore = dglnt_encoder_restore, | ||
215 | + .mode_fixup = dglnt_mode_fixup, | ||
216 | + .mode_valid = dglnt_encoder_mode_valid, | ||
217 | + .mode_set = dglnt_encoder_mode_set, | ||
218 | + .detect = dglnt_encoder_detect, | ||
219 | + .get_modes = dglnt_encoder_get_modes, | ||
220 | +}; | ||
221 | + | ||
222 | +static int dglnt_encoder_encoder_init(struct platform_device *pdev, | ||
223 | + struct drm_device *dev, | ||
224 | + struct drm_encoder_slave *encoder) | ||
225 | +{ | ||
226 | + struct dglnt_encoder *dglnt = platform_get_drvdata(pdev); | ||
227 | + struct device_node *sub_node; | ||
228 | + | ||
229 | + encoder->slave_priv = dglnt; | ||
230 | + encoder->slave_funcs = &dglnt_encoder_slave_funcs; | ||
231 | + | ||
232 | + dglnt->encoder = &encoder->base; | ||
233 | + | ||
234 | + /* get i2c adapter for edid */ | ||
235 | + dglnt->i2c_present = false; | ||
236 | + sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0); | ||
237 | + if (sub_node) { | ||
238 | + dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node); | ||
239 | + if (!dglnt->i2c_bus) | ||
240 | + DRM_INFO("failed to get the edid i2c adapter, using default modes\n"); | ||
241 | + else | ||
242 | + dglnt->i2c_present = true; | ||
243 | + of_node_put(sub_node); | ||
244 | + } | ||
245 | + | ||
246 | + return 0; | ||
247 | +} | ||
248 | + | ||
249 | +static int dglnt_encoder_probe(struct platform_device *pdev) | ||
250 | +{ | ||
251 | + struct dglnt_encoder *dglnt; | ||
252 | + | ||
253 | + dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL); | ||
254 | + if (!dglnt) | ||
255 | + return -ENOMEM; | ||
256 | + | ||
257 | + platform_set_drvdata(pdev, dglnt); | ||
258 | + | ||
259 | + return 0; | ||
260 | +} | ||
261 | + | ||
262 | +static int dglnt_encoder_remove(struct platform_device *pdev) | ||
263 | +{ | ||
264 | + return 0; | ||
265 | +} | ||
266 | + | ||
267 | +static const struct of_device_id dglnt_encoder_of_match[] = { | ||
268 | + { .compatible = "digilent,drm-encoder", }, | ||
269 | + { /* end of table */ }, | ||
270 | +}; | ||
271 | +MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match); | ||
272 | + | ||
273 | +static struct drm_platform_encoder_driver dglnt_encoder_driver = { | ||
274 | + .platform_driver = { | ||
275 | + .probe = dglnt_encoder_probe, | ||
276 | + .remove = dglnt_encoder_remove, | ||
277 | + .driver = { | ||
278 | + .owner = THIS_MODULE, | ||
279 | + .name = "dglnt-drm-enc", | ||
280 | + .of_match_table = dglnt_encoder_of_match, | ||
281 | + }, | ||
282 | + }, | ||
283 | + | ||
284 | + .encoder_init = dglnt_encoder_encoder_init, | ||
285 | +}; | ||
286 | + | ||
287 | +static int __init dglnt_encoder_init(void) | ||
288 | +{ | ||
289 | + return platform_driver_register(&dglnt_encoder_driver.platform_driver); | ||
290 | +} | ||
291 | + | ||
292 | +static void __exit dglnt_encoder_exit(void) | ||
293 | +{ | ||
294 | + platform_driver_unregister(&dglnt_encoder_driver.platform_driver); | ||
295 | +} | ||
296 | + | ||
297 | +module_init(dglnt_encoder_init); | ||
298 | +module_exit(dglnt_encoder_exit); | ||
299 | + | ||
300 | +MODULE_AUTHOR("Digilent, Inc."); | ||
301 | +MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards"); | ||
302 | +MODULE_LICENSE("GPL v2"); | ||
303 | -- | ||
304 | 2.7.4 | ||
305 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch new file mode 100644 index 00000000..9b6229db --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch | |||
@@ -0,0 +1,607 @@ | |||
1 | From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:16:06 +1000 | ||
4 | Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core | ||
5 | |||
6 | Add support for the axi_dynclk IP Core available from Digilent. This IP | ||
7 | core dynamically configures the clock resources inside a Xilinx FPGA to | ||
8 | generate a clock with a software programmable frequency. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
13 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
14 | --- | ||
15 | drivers/clk/Kconfig | 8 + | ||
16 | drivers/clk/Makefile | 1 + | ||
17 | drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++ | ||
18 | 3 files changed, 556 insertions(+) | ||
19 | create mode 100644 drivers/clk/clk-dglnt-dynclk.c | ||
20 | |||
21 | diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig | ||
22 | index dccb111100..7fe65a702b 100644 | ||
23 | --- a/drivers/clk/Kconfig | ||
24 | +++ b/drivers/clk/Kconfig | ||
25 | @@ -148,6 +148,14 @@ config CLK_QORIQ | ||
26 | This adds the clock driver support for Freescale QorIQ platforms | ||
27 | using common clock framework. | ||
28 | |||
29 | +config COMMON_CLK_DGLNT_DYNCLK | ||
30 | + tristate "Digilent axi_dynclk Driver" | ||
31 | + depends on ARCH_ZYNQ || MICROBLAZE | ||
32 | + help | ||
33 | + ---help--- | ||
34 | + Support for the Digilent AXI Dynamic Clock core for Xilinx | ||
35 | + FPGAs. | ||
36 | + | ||
37 | config COMMON_CLK_XGENE | ||
38 | bool "Clock driver for APM XGene SoC" | ||
39 | default y | ||
40 | diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile | ||
41 | index 0760449dde..45ce97d053 100644 | ||
42 | --- a/drivers/clk/Makefile | ||
43 | +++ b/drivers/clk/Makefile | ||
44 | @@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o | ||
45 | obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o | ||
46 | obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o | ||
47 | obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o | ||
48 | +obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o | ||
49 | obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o | ||
50 | obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o | ||
51 | obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o | ||
52 | diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c | ||
53 | new file mode 100644 | ||
54 | index 0000000000..496ad5fc90 | ||
55 | --- /dev/null | ||
56 | +++ b/drivers/clk/clk-dglnt-dynclk.c | ||
57 | @@ -0,0 +1,547 @@ | ||
58 | +/* | ||
59 | + * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver | ||
60 | + * | ||
61 | + * Copyright (C) 2015 Digilent | ||
62 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
63 | + * | ||
64 | + * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc. | ||
65 | + * | ||
66 | + * This software is licensed under the terms of the GNU General Public | ||
67 | + * License version 2, as published by the Free Software Foundation, and | ||
68 | + * may be copied, distributed, and modified under those terms. | ||
69 | + * | ||
70 | + * This program is distributed in the hope that it will be useful, | ||
71 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
72 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
73 | + * GNU General Public License for more details. | ||
74 | + */ | ||
75 | + | ||
76 | +#include <linux/platform_device.h> | ||
77 | +#include <linux/clk-provider.h> | ||
78 | +#include <linux/clk.h> | ||
79 | +#include <linux/slab.h> | ||
80 | +#include <linux/io.h> | ||
81 | +#include <linux/of.h> | ||
82 | +#include <linux/module.h> | ||
83 | +#include <linux/err.h> | ||
84 | +#include <linux/kernel.h> | ||
85 | + | ||
86 | +#define CLK_BIT_WEDGE 13 | ||
87 | +#define CLK_BIT_NOCOUNT 12 | ||
88 | + | ||
89 | +/* This value is used to signal an error */ | ||
90 | +#define ERR_CLKCOUNTCALC 0xFFFFFFFF | ||
91 | +#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT) | ||
92 | + | ||
93 | +#define DYNCLK_DIV_1_REGMASK 0x1041 | ||
94 | +/* 25 MHz (125 KHz / 5) */ | ||
95 | +#define DYNCLK_DEFAULT_FREQ 125000 | ||
96 | + | ||
97 | +#define MMCM_FREQ_VCOMIN 600000 | ||
98 | +#define MMCM_FREQ_VCOMAX 1200000 | ||
99 | +#define MMCM_FREQ_PFDMIN 10000 | ||
100 | +#define MMCM_FREQ_PFDMAX 450000 | ||
101 | +#define MMCM_FREQ_OUTMIN 4000 | ||
102 | +#define MMCM_FREQ_OUTMAX 800000 | ||
103 | +#define MMCM_DIV_MAX 106 | ||
104 | +#define MMCM_FB_MIN 2 | ||
105 | +#define MMCM_FB_MAX 64 | ||
106 | +#define MMCM_CLKDIV_MAX 128 | ||
107 | +#define MMCM_CLKDIV_MIN 1 | ||
108 | + | ||
109 | +#define OFST_DISPLAY_CTRL 0x0 | ||
110 | +#define OFST_DISPLAY_STATUS 0x4 | ||
111 | +#define OFST_DISPLAY_CLK_L 0x8 | ||
112 | +#define OFST_DISPLAY_FB_L 0x0C | ||
113 | +#define OFST_DISPLAY_FB_H_CLK_H 0x10 | ||
114 | +#define OFST_DISPLAY_DIV 0x14 | ||
115 | +#define OFST_DISPLAY_LOCK_L 0x18 | ||
116 | +#define OFST_DISPLAY_FLTR_LOCK_H 0x1C | ||
117 | + | ||
118 | +static const u64 lock_lookup[64] = { | ||
119 | + 0b0011000110111110100011111010010000000001, | ||
120 | + 0b0011000110111110100011111010010000000001, | ||
121 | + 0b0100001000111110100011111010010000000001, | ||
122 | + 0b0101101011111110100011111010010000000001, | ||
123 | + 0b0111001110111110100011111010010000000001, | ||
124 | + 0b1000110001111110100011111010010000000001, | ||
125 | + 0b1001110011111110100011111010010000000001, | ||
126 | + 0b1011010110111110100011111010010000000001, | ||
127 | + 0b1100111001111110100011111010010000000001, | ||
128 | + 0b1110011100111110100011111010010000000001, | ||
129 | + 0b1111111111111000010011111010010000000001, | ||
130 | + 0b1111111111110011100111111010010000000001, | ||
131 | + 0b1111111111101110111011111010010000000001, | ||
132 | + 0b1111111111101011110011111010010000000001, | ||
133 | + 0b1111111111101000101011111010010000000001, | ||
134 | + 0b1111111111100111000111111010010000000001, | ||
135 | + 0b1111111111100011111111111010010000000001, | ||
136 | + 0b1111111111100010011011111010010000000001, | ||
137 | + 0b1111111111100000110111111010010000000001, | ||
138 | + 0b1111111111011111010011111010010000000001, | ||
139 | + 0b1111111111011101101111111010010000000001, | ||
140 | + 0b1111111111011100001011111010010000000001, | ||
141 | + 0b1111111111011010100111111010010000000001, | ||
142 | + 0b1111111111011001000011111010010000000001, | ||
143 | + 0b1111111111011001000011111010010000000001, | ||
144 | + 0b1111111111010111011111111010010000000001, | ||
145 | + 0b1111111111010101111011111010010000000001, | ||
146 | + 0b1111111111010101111011111010010000000001, | ||
147 | + 0b1111111111010100010111111010010000000001, | ||
148 | + 0b1111111111010100010111111010010000000001, | ||
149 | + 0b1111111111010010110011111010010000000001, | ||
150 | + 0b1111111111010010110011111010010000000001, | ||
151 | + 0b1111111111010010110011111010010000000001, | ||
152 | + 0b1111111111010001001111111010010000000001, | ||
153 | + 0b1111111111010001001111111010010000000001, | ||
154 | + 0b1111111111010001001111111010010000000001, | ||
155 | + 0b1111111111001111101011111010010000000001, | ||
156 | + 0b1111111111001111101011111010010000000001, | ||
157 | + 0b1111111111001111101011111010010000000001, | ||
158 | + 0b1111111111001111101011111010010000000001, | ||
159 | + 0b1111111111001111101011111010010000000001, | ||
160 | + 0b1111111111001111101011111010010000000001, | ||
161 | + 0b1111111111001111101011111010010000000001, | ||
162 | + 0b1111111111001111101011111010010000000001, | ||
163 | + 0b1111111111001111101011111010010000000001, | ||
164 | + 0b1111111111001111101011111010010000000001, | ||
165 | + 0b1111111111001111101011111010010000000001, | ||
166 | + 0b1111111111001111101011111010010000000001, | ||
167 | + 0b1111111111001111101011111010010000000001, | ||
168 | + 0b1111111111001111101011111010010000000001, | ||
169 | + 0b1111111111001111101011111010010000000001, | ||
170 | + 0b1111111111001111101011111010010000000001, | ||
171 | + 0b1111111111001111101011111010010000000001, | ||
172 | + 0b1111111111001111101011111010010000000001, | ||
173 | + 0b1111111111001111101011111010010000000001, | ||
174 | + 0b1111111111001111101011111010010000000001, | ||
175 | + 0b1111111111001111101011111010010000000001, | ||
176 | + 0b1111111111001111101011111010010000000001, | ||
177 | + 0b1111111111001111101011111010010000000001, | ||
178 | + 0b1111111111001111101011111010010000000001, | ||
179 | + 0b1111111111001111101011111010010000000001, | ||
180 | + 0b1111111111001111101011111010010000000001, | ||
181 | + 0b1111111111001111101011111010010000000001, | ||
182 | + 0b1111111111001111101011111010010000000001 | ||
183 | +}; | ||
184 | + | ||
185 | +static const u32 filter_lookup_low[64] = { | ||
186 | + 0b0001011111, | ||
187 | + 0b0001010111, | ||
188 | + 0b0001111011, | ||
189 | + 0b0001011011, | ||
190 | + 0b0001101011, | ||
191 | + 0b0001110011, | ||
192 | + 0b0001110011, | ||
193 | + 0b0001110011, | ||
194 | + 0b0001110011, | ||
195 | + 0b0001001011, | ||
196 | + 0b0001001011, | ||
197 | + 0b0001001011, | ||
198 | + 0b0010110011, | ||
199 | + 0b0001010011, | ||
200 | + 0b0001010011, | ||
201 | + 0b0001010011, | ||
202 | + 0b0001010011, | ||
203 | + 0b0001010011, | ||
204 | + 0b0001010011, | ||
205 | + 0b0001010011, | ||
206 | + 0b0001010011, | ||
207 | + 0b0001010011, | ||
208 | + 0b0001010011, | ||
209 | + 0b0001100011, | ||
210 | + 0b0001100011, | ||
211 | + 0b0001100011, | ||
212 | + 0b0001100011, | ||
213 | + 0b0001100011, | ||
214 | + 0b0001100011, | ||
215 | + 0b0001100011, | ||
216 | + 0b0001100011, | ||
217 | + 0b0001100011, | ||
218 | + 0b0001100011, | ||
219 | + 0b0001100011, | ||
220 | + 0b0001100011, | ||
221 | + 0b0001100011, | ||
222 | + 0b0001100011, | ||
223 | + 0b0010010011, | ||
224 | + 0b0010010011, | ||
225 | + 0b0010010011, | ||
226 | + 0b0010010011, | ||
227 | + 0b0010010011, | ||
228 | + 0b0010010011, | ||
229 | + 0b0010010011, | ||
230 | + 0b0010010011, | ||
231 | + 0b0010010011, | ||
232 | + 0b0010010011, | ||
233 | + 0b0010100011, | ||
234 | + 0b0010100011, | ||
235 | + 0b0010100011, | ||
236 | + 0b0010100011, | ||
237 | + 0b0010100011, | ||
238 | + 0b0010100011, | ||
239 | + 0b0010100011, | ||
240 | + 0b0010100011, | ||
241 | + 0b0010100011, | ||
242 | + 0b0010100011, | ||
243 | + 0b0010100011, | ||
244 | + 0b0010100011, | ||
245 | + 0b0010100011, | ||
246 | + 0b0010100011, | ||
247 | + 0b0010100011, | ||
248 | + 0b0010100011, | ||
249 | + 0b0010100011 | ||
250 | +}; | ||
251 | + | ||
252 | +struct dglnt_dynclk_reg; | ||
253 | +struct dglnt_dynclk_mode; | ||
254 | +struct dglnt_dynclk; | ||
255 | + | ||
256 | +struct dglnt_dynclk_reg { | ||
257 | + u32 clk0L; | ||
258 | + u32 clkFBL; | ||
259 | + u32 clkFBH_clk0H; | ||
260 | + u32 divclk; | ||
261 | + u32 lockL; | ||
262 | + u32 fltr_lockH; | ||
263 | +}; | ||
264 | + | ||
265 | +struct dglnt_dynclk_mode { | ||
266 | + u32 freq; | ||
267 | + u32 fbmult; | ||
268 | + u32 clkdiv; | ||
269 | + u32 maindiv; | ||
270 | +}; | ||
271 | + | ||
272 | +struct dglnt_dynclk { | ||
273 | + void __iomem *base; | ||
274 | + struct clk_hw clk_hw; | ||
275 | + unsigned long freq; | ||
276 | +}; | ||
277 | + | ||
278 | +u32 dglnt_dynclk_divider(u32 divide) | ||
279 | +{ | ||
280 | + u32 output = 0; | ||
281 | + u32 highTime = 0; | ||
282 | + u32 lowTime = 0; | ||
283 | + | ||
284 | + if ((divide < 1) || (divide > 128)) | ||
285 | + return ERR_CLKDIVIDER; | ||
286 | + | ||
287 | + if (divide == 1) | ||
288 | + return DYNCLK_DIV_1_REGMASK; | ||
289 | + | ||
290 | + highTime = divide / 2; | ||
291 | + /* if divide is odd */ | ||
292 | + if (divide & 0x1) { | ||
293 | + lowTime = highTime + 1; | ||
294 | + output = 1 << CLK_BIT_WEDGE; | ||
295 | + } else { | ||
296 | + lowTime = highTime; | ||
297 | + } | ||
298 | + | ||
299 | + output |= 0x03F & lowTime; | ||
300 | + output |= 0xFC0 & (highTime << 6); | ||
301 | + return output; | ||
302 | +} | ||
303 | + | ||
304 | +u32 dglnt_dynclk_count_calc(u32 divide) | ||
305 | +{ | ||
306 | + u32 output = 0; | ||
307 | + u32 divCalc = 0; | ||
308 | + | ||
309 | + divCalc = dglnt_dynclk_divider(divide); | ||
310 | + if (divCalc == ERR_CLKDIVIDER) | ||
311 | + output = ERR_CLKCOUNTCALC; | ||
312 | + else | ||
313 | + output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000); | ||
314 | + return output; | ||
315 | +} | ||
316 | + | ||
317 | + | ||
318 | +int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues, | ||
319 | + struct dglnt_dynclk_mode *clkParams) | ||
320 | +{ | ||
321 | + if ((clkParams->fbmult < 2) || clkParams->fbmult > 64) | ||
322 | + return -EINVAL; | ||
323 | + | ||
324 | + regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv); | ||
325 | + if (regValues->clk0L == ERR_CLKCOUNTCALC) | ||
326 | + return -EINVAL; | ||
327 | + | ||
328 | + regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult); | ||
329 | + if (regValues->clkFBL == ERR_CLKCOUNTCALC) | ||
330 | + return -EINVAL; | ||
331 | + | ||
332 | + regValues->clkFBH_clk0H = 0; | ||
333 | + | ||
334 | + regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv); | ||
335 | + if (regValues->divclk == ERR_CLKDIVIDER) | ||
336 | + return -EINVAL; | ||
337 | + | ||
338 | + regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] & | ||
339 | + 0xFFFFFFFF); | ||
340 | + | ||
341 | + regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >> | ||
342 | + 32) & 0x000000FF); | ||
343 | + regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] << | ||
344 | + 16) & 0x03FF0000); | ||
345 | + | ||
346 | + return 0; | ||
347 | +} | ||
348 | + | ||
349 | +void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues, | ||
350 | + void __iomem *baseaddr) | ||
351 | +{ | ||
352 | + writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L); | ||
353 | + writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L); | ||
354 | + writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H); | ||
355 | + writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV); | ||
356 | + writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L); | ||
357 | + writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H); | ||
358 | +} | ||
359 | + | ||
360 | +u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq, | ||
361 | + struct dglnt_dynclk_mode *bestPick) | ||
362 | +{ | ||
363 | + u32 bestError = MMCM_FREQ_OUTMAX; | ||
364 | + u32 curError; | ||
365 | + u32 curClkMult; | ||
366 | + u32 curFreq; | ||
367 | + u32 divVal; | ||
368 | + u32 curFb, curClkDiv; | ||
369 | + u32 minFb = 0; | ||
370 | + u32 maxFb = 0; | ||
371 | + u32 curDiv = 1; | ||
372 | + u32 maxDiv; | ||
373 | + bool freq_found = false; | ||
374 | + | ||
375 | + bestPick->freq = 0; | ||
376 | + if (parentFreq == 0) | ||
377 | + return 0; | ||
378 | + | ||
379 | + /* minimum frequency is actually dictated by VCOmin */ | ||
380 | + if (freq < MMCM_FREQ_OUTMIN) | ||
381 | + freq = MMCM_FREQ_OUTMIN; | ||
382 | + if (freq > MMCM_FREQ_OUTMAX) | ||
383 | + freq = MMCM_FREQ_OUTMAX; | ||
384 | + | ||
385 | + if (parentFreq > MMCM_FREQ_PFDMAX) | ||
386 | + curDiv = 2; | ||
387 | + maxDiv = parentFreq / MMCM_FREQ_PFDMIN; | ||
388 | + if (maxDiv > MMCM_DIV_MAX) | ||
389 | + maxDiv = MMCM_DIV_MAX; | ||
390 | + | ||
391 | + while (curDiv <= maxDiv && !freq_found) { | ||
392 | + minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq); | ||
393 | + maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq); | ||
394 | + if (maxFb > MMCM_FB_MAX) | ||
395 | + maxFb = MMCM_FB_MAX; | ||
396 | + if (minFb < MMCM_FB_MIN) | ||
397 | + minFb = MMCM_FB_MIN; | ||
398 | + | ||
399 | + divVal = curDiv * freq; | ||
400 | + /* | ||
401 | + * This multiplier is used to find the best clkDiv value for | ||
402 | + * each FB value | ||
403 | + */ | ||
404 | + curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal; | ||
405 | + | ||
406 | + curFb = minFb; | ||
407 | + while (curFb <= maxFb && !freq_found) { | ||
408 | + curClkDiv = ((curClkMult * curFb) + 500) / 1000; | ||
409 | + if (curClkDiv > MMCM_CLKDIV_MAX) | ||
410 | + curClkDiv = MMCM_CLKDIV_MAX; | ||
411 | + if (curClkDiv < MMCM_CLKDIV_MIN) | ||
412 | + curClkDiv = MMCM_CLKDIV_MIN; | ||
413 | + curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv); | ||
414 | + if (curFreq >= freq) | ||
415 | + curError = curFreq - freq; | ||
416 | + else | ||
417 | + curError = freq - curFreq; | ||
418 | + if (curError < bestError) { | ||
419 | + bestError = curError; | ||
420 | + bestPick->clkdiv = curClkDiv; | ||
421 | + bestPick->fbmult = curFb; | ||
422 | + bestPick->maindiv = curDiv; | ||
423 | + bestPick->freq = curFreq; | ||
424 | + } | ||
425 | + if (!curError) | ||
426 | + freq_found = true; | ||
427 | + curFb++; | ||
428 | + } | ||
429 | + curDiv++; | ||
430 | + } | ||
431 | + return bestPick->freq; | ||
432 | +} | ||
433 | + | ||
434 | +static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw) | ||
435 | +{ | ||
436 | + return container_of(clk_hw, struct dglnt_dynclk, clk_hw); | ||
437 | +} | ||
438 | + | ||
439 | + | ||
440 | +static int dglnt_dynclk_enable(struct clk_hw *clk_hw) | ||
441 | +{ | ||
442 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
443 | + unsigned int clock_state; | ||
444 | + | ||
445 | + if (dglnt_dynclk->freq) { | ||
446 | + writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
447 | + do { | ||
448 | + clock_state = readl(dglnt_dynclk->base + | ||
449 | + OFST_DISPLAY_STATUS); | ||
450 | + } while (!clock_state); | ||
451 | + } | ||
452 | + return 0; | ||
453 | +} | ||
454 | + | ||
455 | +static void dglnt_dynclk_disable(struct clk_hw *clk_hw) | ||
456 | +{ | ||
457 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
458 | + | ||
459 | + writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
460 | +} | ||
461 | + | ||
462 | +static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw, | ||
463 | + unsigned long rate, unsigned long parent_rate) | ||
464 | +{ | ||
465 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
466 | + struct dglnt_dynclk_reg clkReg; | ||
467 | + struct dglnt_dynclk_mode clkMode; | ||
468 | + | ||
469 | + if (parent_rate == 0 || rate == 0) | ||
470 | + return -EINVAL; | ||
471 | + if (rate == dglnt_dynclk->freq) | ||
472 | + return 0; | ||
473 | + | ||
474 | + /* | ||
475 | + * Convert from Hz to KHz, then multiply by five to account for | ||
476 | + * BUFR division | ||
477 | + */ | ||
478 | + rate = (rate + 100) / 200; | ||
479 | + /* convert from Hz to KHz */ | ||
480 | + parent_rate = (parent_rate + 500) / 1000; | ||
481 | + if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode)) | ||
482 | + return -EINVAL; | ||
483 | + | ||
484 | + /* | ||
485 | + * Write to the PLL dynamic configuration registers to configure it | ||
486 | + * with the calculated parameters. | ||
487 | + */ | ||
488 | + dglnt_dynclk_find_reg(&clkReg, &clkMode); | ||
489 | + dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base); | ||
490 | + dglnt_dynclk->freq = clkMode.freq * 200; | ||
491 | + dglnt_dynclk_disable(clk_hw); | ||
492 | + dglnt_dynclk_enable(clk_hw); | ||
493 | + | ||
494 | + return 0; | ||
495 | +} | ||
496 | + | ||
497 | +static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
498 | + unsigned long *parent_rate) | ||
499 | +{ | ||
500 | + struct dglnt_dynclk_mode clkMode; | ||
501 | + | ||
502 | + dglnt_dynclk_find_mode(((rate + 100) / 200), | ||
503 | + ((*parent_rate) + 500) / 1000, &clkMode); | ||
504 | + | ||
505 | + return (clkMode.freq * 200); | ||
506 | +} | ||
507 | + | ||
508 | +static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw, | ||
509 | + unsigned long parent_rate) | ||
510 | +{ | ||
511 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
512 | + | ||
513 | + return dglnt_dynclk->freq; | ||
514 | +} | ||
515 | + | ||
516 | + | ||
517 | +static const struct clk_ops dglnt_dynclk_ops = { | ||
518 | + .recalc_rate = dglnt_dynclk_recalc_rate, | ||
519 | + .round_rate = dglnt_dynclk_round_rate, | ||
520 | + .set_rate = dglnt_dynclk_set_rate, | ||
521 | + .enable = dglnt_dynclk_enable, | ||
522 | + .disable = dglnt_dynclk_disable, | ||
523 | +}; | ||
524 | + | ||
525 | +static const struct of_device_id dglnt_dynclk_ids[] = { | ||
526 | + { .compatible = "digilent,axi-dynclk", }, | ||
527 | + { }, | ||
528 | +}; | ||
529 | +MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids); | ||
530 | + | ||
531 | +static int dglnt_dynclk_probe(struct platform_device *pdev) | ||
532 | +{ | ||
533 | + const struct of_device_id *id; | ||
534 | + struct dglnt_dynclk *dglnt_dynclk; | ||
535 | + struct clk_init_data init; | ||
536 | + const char *parent_name; | ||
537 | + const char *clk_name; | ||
538 | + struct resource *mem; | ||
539 | + struct clk *clk; | ||
540 | + | ||
541 | + if (!pdev->dev.of_node) | ||
542 | + return -ENODEV; | ||
543 | + | ||
544 | + id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node); | ||
545 | + if (!id) | ||
546 | + return -ENODEV; | ||
547 | + | ||
548 | + dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk), | ||
549 | + GFP_KERNEL); | ||
550 | + if (!dglnt_dynclk) | ||
551 | + return -ENOMEM; | ||
552 | + | ||
553 | + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
554 | + dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem); | ||
555 | + if (IS_ERR(dglnt_dynclk->base)) | ||
556 | + return PTR_ERR(dglnt_dynclk->base); | ||
557 | + | ||
558 | + parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0); | ||
559 | + if (!parent_name) | ||
560 | + return -EINVAL; | ||
561 | + | ||
562 | + clk_name = pdev->dev.of_node->name; | ||
563 | + of_property_read_string(pdev->dev.of_node, "clock-output-names", | ||
564 | + &clk_name); | ||
565 | + | ||
566 | + init.name = clk_name; | ||
567 | + init.ops = &dglnt_dynclk_ops; | ||
568 | + init.flags = 0; | ||
569 | + init.parent_names = &parent_name; | ||
570 | + init.num_parents = 1; | ||
571 | + | ||
572 | + dglnt_dynclk->freq = 0; | ||
573 | + dglnt_dynclk_disable(&dglnt_dynclk->clk_hw); | ||
574 | + | ||
575 | + dglnt_dynclk->clk_hw.init = &init; | ||
576 | + clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw); | ||
577 | + if (IS_ERR(clk)) | ||
578 | + return PTR_ERR(clk); | ||
579 | + | ||
580 | + return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, | ||
581 | + clk); | ||
582 | +} | ||
583 | + | ||
584 | +static int dglnt_dynclk_remove(struct platform_device *pdev) | ||
585 | +{ | ||
586 | + of_clk_del_provider(pdev->dev.of_node); | ||
587 | + | ||
588 | + return 0; | ||
589 | +} | ||
590 | + | ||
591 | +static struct platform_driver dglnt_dynclk_driver = { | ||
592 | + .driver = { | ||
593 | + .name = "dglnt-dynclk", | ||
594 | + .owner = THIS_MODULE, | ||
595 | + .of_match_table = dglnt_dynclk_ids, | ||
596 | + }, | ||
597 | + .probe = dglnt_dynclk_probe, | ||
598 | + .remove = dglnt_dynclk_remove, | ||
599 | +}; | ||
600 | +module_platform_driver(dglnt_dynclk_driver); | ||
601 | + | ||
602 | +MODULE_LICENSE("GPL v2"); | ||
603 | +MODULE_AUTHOR("Sam Bobrowicz <sbobrowicz@digilentinc.com>"); | ||
604 | +MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core"); | ||
605 | -- | ||
606 | 2.14.2 | ||
607 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch new file mode 100644 index 00000000..a98d84c5 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Mon, 2 May 2016 23:46:42 +1000 | ||
4 | Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on | ||
5 | |||
6 | Fix the issues where the VTC is reset (losing its timing config). | ||
7 | |||
8 | Also fix the issue where the plane destroys its DMA descriptors and | ||
9 | marks the DMA channels as inactive but never recreates the descriptors | ||
10 | and never updates the active state when turning DPMS back on. | ||
11 | |||
12 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
13 | Upstream-Status: Pending [This is a workaround] | ||
14 | --- | ||
15 | drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 - | ||
16 | drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++- | ||
17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
20 | index 631d35b921..93dbd4b58a 100644 | ||
21 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
22 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
23 | @@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms) | ||
24 | default: | ||
25 | if (crtc->vtc) { | ||
26 | xilinx_vtc_disable(crtc->vtc); | ||
27 | - xilinx_vtc_reset(crtc->vtc); | ||
28 | } | ||
29 | if (crtc->cresample) { | ||
30 | xilinx_cresample_disable(crtc->cresample); | ||
31 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
32 | index 6a248b72d4..d2518a4bdf 100644 | ||
33 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
34 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
35 | @@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
36 | for (i = 0; i < MAX_NUM_SUB_PLANES; i++) { | ||
37 | struct xilinx_drm_plane_dma *dma = &plane->dma[i]; | ||
38 | |||
39 | - if (dma->chan && dma->is_active) { | ||
40 | + if (dma->chan) { | ||
41 | flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; | ||
42 | desc = dmaengine_prep_interleaved_dma(dma->chan, | ||
43 | &dma->xt, | ||
44 | @@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
45 | dmaengine_submit(desc); | ||
46 | |||
47 | dma_async_issue_pending(dma->chan); | ||
48 | + dma->is_active = true; | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | -- | ||
53 | 2.14.2 | ||
54 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg new file mode 100644 index 00000000..f71e53ab --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2024.1/0004-minized-wifi-bluetooth.cfg | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # Bluetooth config | ||
3 | # | ||
4 | CONFIG_BT=y | ||
5 | CONFIG_BT_BREDR=y | ||
6 | CONFIG_BT_HS=y | ||
7 | CONFIG_BT_LE=y | ||
8 | CONFIG_BT_BCM=y | ||
9 | CONFIG_BT_HCIUART=y | ||
10 | CONFIG_BT_HCIUART_H4=y | ||
11 | CONFIG_BT_HCIUART_BCM=y | ||
12 | CONFIG_BT_HIDP=y | ||
13 | CONFIG_CFG80211=y | ||
14 | CONFIG_CFG80211_DEFAULT_PS=y | ||
15 | CONFIG_CFG80211_CRDA_SUPPORT=y | ||
16 | CONFIG_BRCMUTIL=y | ||
17 | CONFIG_BRCMFMAC=y | ||
18 | CONFIG_BRCMFMAC_PROTO_BCDC=y | ||
19 | CONFIG_BRCMFMAC_SDIO=y | ||
20 | CONFIG_CRYPTO_BLKCIPHER=y | ||
21 | CONFIG_CRYPTO_MANAGER=y | ||
22 | CONFIG_CRYPTO_ECB=y | ||
23 | CONFIG_CRYPTO_CMAC=y | ||
24 | CONFIG_CRYPTO_SHA256=y | ||
25 | |||
26 | # | ||
27 | # Regulator config | ||
28 | # | ||
29 | CONFIG_REGMAP_IRQ=y | ||
30 | CONFIG_I2C_XILINX=y | ||
31 | CONFIG_MFD_DA9062=y | ||
32 | CONFIG_REGULATOR_DA9062=y | ||
33 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend new file mode 100644 index 00000000..c789c7a9 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2024.1.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-xlnx/v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}:" | ||
2 | |||
3 | # Note: These patches are very old and doesn't apply on top of 5.x | ||
4 | # kernel. For more details refer README.md file. | ||
5 | |||
6 | #SRC_URI:append:zybo-linux-bd-zynq7 = " \ | ||
7 | # file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \ | ||
8 | # file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \ | ||
9 | # file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \ | ||
10 | # " | ||
11 | |||
12 | SRC_URI:append:minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg" | ||
diff --git a/meta-xilinx-core/classes/xilinx-microblaze.bbclass b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass index ed231a3a..ed231a3a 100644 --- a/meta-xilinx-core/classes/xilinx-microblaze.bbclass +++ b/meta-xilinx-core/classes-global/xilinx-microblaze.bbclass | |||
diff --git a/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass new file mode 100644 index 00000000..ed4c1f87 --- /dev/null +++ b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass | |||
@@ -0,0 +1,142 @@ | |||
1 | # | ||
2 | # Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
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-recipe/dfx_user_dts.bbclass b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass new file mode 100644 index 00000000..188d594b --- /dev/null +++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass | |||
@@ -0,0 +1,320 @@ | |||
1 | # | ||
2 | # Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes. | ||
7 | # dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static | ||
8 | # and DFx RP xsa outside of yocto. | ||
9 | |||
10 | inherit devicetree | ||
11 | |||
12 | DEPENDS = "dtc-native bootgen-native" | ||
13 | |||
14 | # recipes that inherit from this class need to use an appropriate machine | ||
15 | # override for COMPATIBLE_MACHINE to build successfully; don't allow building | ||
16 | # for microblaze MACHINE | ||
17 | COMPATIBLE_MACHINE ?= "^$" | ||
18 | COMPATIBLE_MACHINE:microblaze = "^$" | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | PROVIDES = "" | ||
23 | |||
24 | do_fetch[cleandirs] = "${B}" | ||
25 | |||
26 | DT_PADDING_SIZE = "0x1000" | ||
27 | BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}" | ||
28 | |||
29 | S ?= "${WORKDIR}" | ||
30 | FW_DIR ?= "" | ||
31 | DTSI_PATH ?= "" | ||
32 | DTBO_PATH ?= "" | ||
33 | BIT_PATH ?= "" | ||
34 | BIN_PATH ?= "" | ||
35 | PDI_PATH ?= "" | ||
36 | JSON_PATH ?= "" | ||
37 | XCl_PATH ?= "" | ||
38 | DT_FILES_PATH = "${S}/${DTSI_PATH}" | ||
39 | FIRMWARE_NAME_DT_FILE ?= "" | ||
40 | USER_DTS_FILE ?= "" | ||
41 | |||
42 | FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" | ||
43 | USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay" | ||
44 | DTSI_PATH[doc] = "Absolute '.dtsi' or ''.dts' file path as input to SRC_URI" | ||
45 | DTBO_PATH[doc] = "Absolute '.dtbo' file path as input to SRC_URI" | ||
46 | BIT_PATH[doc] = "Absolute '.bit' file path as input to SRC_URI" | ||
47 | BIN_PATH[doc] = "Absolute '.bin' file path as input to SRC_URI" | ||
48 | JSON_PATH[doc] = "Absolute '.json' file path as input to SRC_URI" | ||
49 | XCL_PATH[doc] = "Absolute '.xclbin' file path as input to SRC_URI" | ||
50 | |||
51 | python() { | ||
52 | import re | ||
53 | soc_family = d.getVar("SOC_FAMILY") | ||
54 | if "git://" in d.getVar("SRC_URI") or "https://" in d.getVar("SRC_URI"): | ||
55 | d.setVar("S",'${WORKDIR}/git/'+d.getVar("FW_DIR")) | ||
56 | else: | ||
57 | dtsi_found = False | ||
58 | dtbo_found = False | ||
59 | bit_found = False | ||
60 | bin_found = False | ||
61 | pdi_found = False | ||
62 | |||
63 | # Required Inputs | ||
64 | for s in d.getVar("SRC_URI").split(): | ||
65 | if s.endswith(('.dtsi', '.dts')): | ||
66 | dtsi_found = True | ||
67 | d.setVar("DTSI_PATH",os.path.dirname(s.lstrip('file://'))) | ||
68 | if s.endswith('.dtbo'): | ||
69 | if dtbo_found: | ||
70 | bb.warn("More then one '.dtbo' file specified in SRC_URI.") | ||
71 | dtbo_found = True | ||
72 | d.setVar("DTBO_PATH",os.path.dirname(s.lstrip('file://'))) | ||
73 | if soc_family == "zynq" or soc_family == "zynqmp": | ||
74 | if s.endswith('.bit'): | ||
75 | if bit_found: | ||
76 | bb.warn("More then one '.bit' file specified in SRC_URI.") | ||
77 | bit_found = True | ||
78 | d.setVar("BIT_PATH",os.path.dirname(s.lstrip('file://'))) | ||
79 | if s.endswith('.bin'): | ||
80 | if bin_found: | ||
81 | bb.warn("More then one '.bin' file specified in SRC_URI.") | ||
82 | bin_found = True | ||
83 | d.setVar("BIN_PATH",os.path.dirname(s.lstrip('file://'))) | ||
84 | else: | ||
85 | if s.endswith('.pdi'): | ||
86 | if pdi_found: | ||
87 | bb.warn("More then one '.pdi' file specified in SRC_URI.") | ||
88 | pdi_found = True | ||
89 | d.setVar("PDI_PATH",os.path.dirname(s.lstrip('file://'))) | ||
90 | |||
91 | # Optional input | ||
92 | if s.endswith('.json'): | ||
93 | d.setVar("JSON_PATH",os.path.dirname(s.lstrip('file://'))) | ||
94 | |||
95 | if s.endswith('.xclbin'): | ||
96 | d.setVar("XCL_PATH",os.path.dirname(s.lstrip('file://'))) | ||
97 | |||
98 | # Check for valid combination of input files in SRC_URI | ||
99 | # Skip recipe if any of the below conditions are not satisfied. | ||
100 | # 1. At least one bit or bin or pdi should exists. | ||
101 | # 2. More than one dtbo. | ||
102 | # 3. More than one bit or bin or pdi. | ||
103 | # 4. More than one dts and zero dtsi. | ||
104 | # 5. More than one dtsi and zero dts | ||
105 | # 6. Both bit and bin exists. | ||
106 | # 7. Both bit or bin and pdi exits. | ||
107 | # 8. Both dts or dtsi and dtbo exists. | ||
108 | if bit_found or bin_found or pdi_found: | ||
109 | bb.debug(2, "dtsi or dtbo or bitstream or pdi found in SRC_URI") | ||
110 | if bit_found and pdi_found : | ||
111 | raise bb.parse.SkipRecipe("Both '.bit' and '.pdi' file found in SRC_URI, this is invalid use case.") | ||
112 | |||
113 | if bin_found and pdi_found : | ||
114 | raise bb.parse.SkipRecipe("Both '.bin' and '.pdi' file found in SRC_URI, this is invalid use case.") | ||
115 | |||
116 | if bit_found and bin_found: | ||
117 | raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.") | ||
118 | |||
119 | if dtsi_found and dtbo_found: | ||
120 | raise bb.parse.SkipRecipe("Both '.dts or dtsi' and '.dtbo' file found in SRC_URI, either .dts/dtsi or .dtbo file is supported but not both.") | ||
121 | else: | ||
122 | raise bb.parse.SkipRecipe("Need one '.bit' or '.bin' or '.pdi' file added to SRC_URI.") | ||
123 | |||
124 | # Check for valid combination of dtsi and dts files in SRC_URI | ||
125 | # Following file combinations are not supported use case. | ||
126 | # 1. More than one '.dtsi' and zero '.dts' file. | ||
127 | # 2. More than one '.dts' and zero or more than one '.dtsi'file . | ||
128 | pattern_dts = re.compile(r'[.]+dts\b') | ||
129 | pattern_dtsi = re.compile(r'[.]+dtsi\b') | ||
130 | dts_count = len([*re.finditer(pattern_dts, d.getVar('SRC_URI'))]) | ||
131 | dtsi_count = len([*re.finditer(pattern_dtsi, d.getVar("SRC_URI"))]) | ||
132 | |||
133 | if dtsi_count > 1 and dts_count == 0: | ||
134 | raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case") | ||
135 | elif dts_count > 1: | ||
136 | raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case") | ||
137 | } | ||
138 | |||
139 | # Function to search for dt firmware-name property in dts or dtsi file. | ||
140 | python find_firmware_file() { | ||
141 | import glob | ||
142 | pattern_fw = 'firmware-name' | ||
143 | search_count = 0 | ||
144 | for dt_files in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True): | ||
145 | with open(dt_files, "r") as f: | ||
146 | current_fd = f.read() | ||
147 | if pattern_fw in current_fd: | ||
148 | search_count += 1 | ||
149 | if search_count > 1: | ||
150 | bb.error("firmware-name dt property found in more than one dt files! Please fix the dts or dtsi file.") | ||
151 | break | ||
152 | else: | ||
153 | d.setVar('FIRMWARE_NAME_DT_FILE', os.path.basename(dt_files)) | ||
154 | } | ||
155 | |||
156 | do_configure[prefuncs] += "find_firmware_file" | ||
157 | |||
158 | python do_configure() { | ||
159 | import glob, re, shutil | ||
160 | soc_family = d.getVar("SOC_FAMILY") | ||
161 | |||
162 | if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d): | ||
163 | bb.warn("Using dfx_user_dts.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled") | ||
164 | |||
165 | # Renaming firmware-name using $PN as bitstream/PDI will be renamed using | ||
166 | # $PN when generating the bin/pdi file. | ||
167 | if os.path.isfile(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | ||
168 | orig_dtsi = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0] | ||
169 | new_dtsi = d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/pl.dtsi_firmwarename' | ||
170 | with open(new_dtsi, 'w') as newdtsi: | ||
171 | with open(orig_dtsi) as olddtsi: | ||
172 | for line in olddtsi: | ||
173 | if soc_family == 'zynq' or soc_family == 'zynqmp': | ||
174 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bin\"',line)) | ||
175 | else: | ||
176 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line)) | ||
177 | shutil.move(new_dtsi,orig_dtsi) | ||
178 | } | ||
179 | |||
180 | do_compile[prefuncs] += "find_firmware_file" | ||
181 | |||
182 | python devicetree_do_compile:append() { | ||
183 | import glob, subprocess, shutil | ||
184 | soc_family = d.getVar("SOC_FAMILY") | ||
185 | |||
186 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | ||
187 | bin_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('BIN_PATH') or '') + '/*.bin'),recursive=True) if os.path.isfile(f)) | ||
188 | bit_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit'),recursive=True) if os.path.isfile(f)) | ||
189 | # Skip devicetree do_compile task if input file is dtbo or bin in SRC_URI | ||
190 | if not dtbo_count and not bin_count and bit_count: | ||
191 | # Convert .bit to .bin format only if dtsi is input. | ||
192 | # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit | ||
193 | # or .bin format and corresponding file name. Hence we are not doing .bin | ||
194 | # conversion. | ||
195 | if soc_family == 'zynq' or soc_family == 'zynqmp' and glob.glob(d.getVar('S') + '/' +(d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | ||
196 | pn = d.getVar('PN') | ||
197 | biffile = pn + '.bif' | ||
198 | with open(biffile, 'w') as f: | ||
199 | f.write('all:\n{\n\t' + glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}') | ||
200 | |||
201 | bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split() | ||
202 | bootgenargs += ["-image", biffile, "-o", pn + ".bin"] | ||
203 | subprocess.run(bootgenargs, check = True) | ||
204 | |||
205 | # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag, | ||
206 | # to convert bit file to bin format, "-o" option will not be effective | ||
207 | # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bin | ||
208 | # file, Hence we need to rename this file from <bit_file_name>.bin to | ||
209 | # ${PN}.bin which matches the firmware name in dtbo and move | ||
210 | # ${PN}.bin to ${B} directory. | ||
211 | if soc_family == 'zynq': | ||
212 | src_bitbin_file = glob.glob(d.getVar('S') + '/' + (d.getVar('BIT_PATH') or '') + '/*.bin')[0] | ||
213 | dst_bitbin_file = d.getVar('B') + '/' + pn + '.bin' | ||
214 | shutil.move(src_bitbin_file, dst_bitbin_file) | ||
215 | |||
216 | if not os.path.isfile(pn + ".bin"): | ||
217 | bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \ | ||
218 | "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bin')) | ||
219 | } | ||
220 | |||
221 | # If user inputs both dtsi and dts files then device-tree will generate dtbo | ||
222 | # files for each dt file, Hence to package the firmware pick the right user dt | ||
223 | # overlay file. | ||
224 | python find_user_dts_overlay_file() { | ||
225 | import glob | ||
226 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTBO_PATH') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | ||
227 | dts_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dts'),recursive=True) if os.path.isfile(f)) | ||
228 | dtsi_count = sum(1 for f in glob.iglob((d.getVar('S') + '/' + d.getVar('DTSI_PATH') + '/*.dtsi'),recursive=True) if os.path.isfile(f)) | ||
229 | # Set USER_DTS_FILE if input file is dts/dtsi in SRC_URI else skip operation. | ||
230 | if not dtbo_count and dts_count or dtsi_count: | ||
231 | if dtsi_count == 1 and dts_count == 0: | ||
232 | dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0] | ||
233 | elif dtsi_count >=0 and dts_count == 1: | ||
234 | dts_file = glob.glob(d.getVar('S') + '/' + (d.getVar('DTSI_PATH') or '') + '/*.dts')[0] | ||
235 | else: | ||
236 | dts_file = '' | ||
237 | |||
238 | d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0]) | ||
239 | elif dtbo_count: | ||
240 | bb.debug(2, "Firmware recipe input file is dtbo in SRC_URI") | ||
241 | else: | ||
242 | bb.debug(2, "Firmware recipe input file is bit/bin/pdi in SRC_URI") | ||
243 | } | ||
244 | |||
245 | do_install[prefuncs] += "find_user_dts_overlay_file" | ||
246 | |||
247 | do_install() { | ||
248 | install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
249 | |||
250 | # Install dtbo | ||
251 | # In case of dtbo as input, dtbo will be copied from directly from ${S} | ||
252 | # In case of dtsi as input, dtbo will be copied from directly from ${B} | ||
253 | # If more than one dtbo file is found then fatal the task. | ||
254 | # If no dtbo file is found add warning message as in some use case if IP | ||
255 | # doesn't have any driver then user can load pdi/bit/bin file. | ||
256 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | ||
257 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
258 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then | ||
259 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)" | ||
260 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
261 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo | ||
262 | else | ||
263 | bbnote "A dtbo ending '.dtbo' expected but not found in ${S} or ${B}, This means firmware can be loaded without dtbo dependency." | ||
264 | fi | ||
265 | |||
266 | # Install bit or bin if soc family is zynq-7000 or zynqmp. | ||
267 | # In case of dtbo as input or no dtbo exists in ${B}, then .bit or .bin will | ||
268 | # be copied from directly from ${S} without renaming the .bit/.bin name to | ||
269 | # ${PN}.bit/${PN}.bin. | ||
270 | # if more than one .bit/.bin file is found then fatal the task. | ||
271 | # if no .bit/.bin file is found then fatal the task. | ||
272 | if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then | ||
273 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then | ||
274 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" | ||
275 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then | ||
276 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" | ||
277 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
278 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
279 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then | ||
280 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
281 | elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
282 | install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin | ||
283 | else | ||
284 | bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" | ||
285 | fi | ||
286 | fi | ||
287 | |||
288 | # Install pdi if soc family is versal or new silicon. | ||
289 | # In case of dtbo as input or no dtbo exists in ${B}, then .pdi will be copied | ||
290 | # from directly from ${S} without renaming the pdi name to ${PN}.pdi | ||
291 | # if more than one .pdi file is found then fail the task. | ||
292 | # In case of Versal DFx Static, only static dtbo can be loaded as BOOT.bin | ||
293 | # already contains static pdi. bbclass is not smart enough to determine | ||
294 | # whether it is static pdi or not, hence change fatal to warn if no PDI is found. | ||
295 | if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then | ||
296 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
297 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
298 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | ||
299 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" | ||
300 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
301 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
302 | else | ||
303 | bbwarn "A PDI file with '.pdi' expected but not found" | ||
304 | fi | ||
305 | fi | ||
306 | |||
307 | # Install xclbin | ||
308 | if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then | ||
309 | install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin | ||
310 | fi | ||
311 | |||
312 | # Install shell.json or accel.json | ||
313 | if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then | ||
314 | install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
315 | fi | ||
316 | } | ||
317 | |||
318 | do_deploy[noexec] = "1" | ||
319 | |||
320 | FILES:${PN} += "${nonarch_base_libdir}/firmware/xilinx/${PN}" | ||
diff --git a/meta-xilinx-core/classes-recipe/fw-package.bbclass b/meta-xilinx-core/classes-recipe/fw-package.bbclass new file mode 100644 index 00000000..e9847d33 --- /dev/null +++ b/meta-xilinx-core/classes-recipe/fw-package.bbclass | |||
@@ -0,0 +1,94 @@ | |||
1 | # | ||
2 | # Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # This bbclass provides infrastructure to package and deploy firmware baremetal | ||
7 | # or freertos application elf or bin files to linux root filesystem under | ||
8 | # /lib/firmware directory. | ||
9 | |||
10 | inherit deploy | ||
11 | |||
12 | INHERIT_DEFAULT_DEPENDS = "1" | ||
13 | |||
14 | # Since we're just copying, we can run any config. | ||
15 | COMPATIBLE_HOST = ".*" | ||
16 | |||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
18 | |||
19 | # Default expects the user to provide the fw app in the deploy directory. | ||
20 | # A machine, multiconfig, or local.conf should override this. | ||
21 | FW_NAME ??= "" | ||
22 | TARGET_MC ??= "" | ||
23 | FW_DEPENDS ??= "" | ||
24 | FW_MCDEPENDS ??= "" | ||
25 | FW_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
26 | FW_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
27 | FW_IMAGE_NAME ??= "${FW_NAME}-${MACHINE}-${TARGET_MC}" | ||
28 | |||
29 | # Default is for the multilib case (without the extension .elf/.bin) | ||
30 | FW_FILE ??= "${FW_DEPLOY_DIR}/${FW_IMAGE_NAME}" | ||
31 | FW_FILE[vardepsexclude] = "FW_DEPLOY_DIR" | ||
32 | |||
33 | do_fetch[depends] += "${FW_DEPENDS}" | ||
34 | do_fetch[mcdepends] += "${FW_MCDEPENDS}" | ||
35 | |||
36 | # Set default destination directory is /lib/firmware, user can change this value | ||
37 | # to /boot directory depending on requirement. | ||
38 | DESTDIR ??= "${nonarch_base_libdir}/firmware/xilinx" | ||
39 | SYSROOT_DIRS += "/boot" | ||
40 | |||
41 | INSANE_SKIP:${PN} = "arch" | ||
42 | INSANE_SKIP:${PN}-dbg = "arch" | ||
43 | |||
44 | # Disable buildpaths QA check warnings. | ||
45 | INSANE_SKIP:${PN} += "buildpaths" | ||
46 | |||
47 | do_install() { | ||
48 | if [ ! -e ${FW_FILE}.elf ]; then | ||
49 | echo "Unable to find FW_FILE (${FW_FILE}.elf)" | ||
50 | exit 1 | ||
51 | fi | ||
52 | |||
53 | install -Dm 0644 ${FW_FILE}.elf ${D}${DESTDIR}/${FW_IMAGE_NAME}.elf | ||
54 | } | ||
55 | |||
56 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
57 | SHOULD_DEPLOY = "${@'false' if (d.getVar('FW_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
58 | do_deploy() { | ||
59 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
60 | if ${SHOULD_DEPLOY}; then | ||
61 | install -Dm 0644 ${FW_FILE}.elf ${DEPLOYDIR}/${FW_IMAGE_NAME}.elf | ||
62 | install -Dm 0644 ${FW_FILE}.bin ${DEPLOYDIR}/${FW_IMAGE_NAME}.bin | ||
63 | fi | ||
64 | } | ||
65 | |||
66 | FILES:${PN} += "${DESTDIR}/${FW_IMAGE_NAME}*" | ||
67 | |||
68 | def check_fw_vars(d): | ||
69 | # If both are blank, the user MUST pass in the path to the firmware! | ||
70 | if not d.getVar('FW_DEPENDS') and not d.getVar('FW_MCDEPENDS'): | ||
71 | # Don't cache this, as the items on disk can change! | ||
72 | d.setVar('BB_DONT_CACHE', '1') | ||
73 | |||
74 | msg = "" | ||
75 | fail = False | ||
76 | if not os.path.exists(d.getVar('FW_FILE') + ".elf"): | ||
77 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('FW_FILE') | ||
78 | fail = True | ||
79 | if not os.path.exists(d.getVar('FW_FILE') + ".bin"): | ||
80 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('FW_FILE') | ||
81 | fail = True | ||
82 | if fail: | ||
83 | if not d.getVar('WITHIN_EXT_SDK'): | ||
84 | raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg) | ||
85 | else: | ||
86 | # We found the file, so be sure to track it | ||
87 | d.setVar('SRC_URI', 'file://${FW_FILE}.elf file://${FW_FILE}.bin') | ||
88 | d.setVarFlag('do_install', 'file-checksums', '${FW_FILE}.elf:True ${FW_FILE}.bin:True') | ||
89 | d.setVarFlag('do_deploy', 'file-checksums', '${FW_FILE}.elf:True ${FW_FILE}.bin:True') | ||
90 | |||
91 | python() { | ||
92 | # Need to allow bbappends to change the check | ||
93 | check_fw_vars(d) | ||
94 | } | ||
diff --git a/meta-xilinx-core/classes/image-wic-utils.bbclass b/meta-xilinx-core/classes-recipe/image-wic-utils.bbclass index 41ad8148..41ad8148 100644 --- a/meta-xilinx-core/classes/image-wic-utils.bbclass +++ b/meta-xilinx-core/classes-recipe/image-wic-utils.bbclass | |||
diff --git a/meta-xilinx-core/classes/kernel-simpleimage.bbclass b/meta-xilinx-core/classes-recipe/kernel-simpleimage.bbclass index 110ee254..110ee254 100644 --- a/meta-xilinx-core/classes/kernel-simpleimage.bbclass +++ b/meta-xilinx-core/classes-recipe/kernel-simpleimage.bbclass | |||
diff --git a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass index 7466ab5e..7466ab5e 100644 --- a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass | |||
diff --git a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass index a778ec7d..a778ec7d 100644 --- a/meta-xilinx-core/classes/xilinx-fetch-restricted.bbclass +++ b/meta-xilinx-core/classes-recipe/xilinx-fetch-restricted.bbclass | |||
diff --git a/meta-xilinx-core/classes/xilinx-platform-init.bbclass b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass index 99f7863a..99f7863a 100644 --- a/meta-xilinx-core/classes/xilinx-platform-init.bbclass +++ b/meta-xilinx-core/classes-recipe/xilinx-platform-init.bbclass | |||
diff --git a/meta-xilinx-core/classes/dfx_user_dts.bbclass b/meta-xilinx-core/classes/dfx_user_dts.bbclass deleted file mode 100644 index 4404aa05..00000000 --- a/meta-xilinx-core/classes/dfx_user_dts.bbclass +++ /dev/null | |||
@@ -1,267 +0,0 @@ | |||
1 | # This bbclass is inherited by flat, DFx Static and DFx RP firmware recipes. | ||
2 | # dfx_user_dts.bbclass expects user to generate pl dtsi for flat, DFx Static | ||
3 | # and DFx RP xsa outside of yocto. | ||
4 | |||
5 | inherit devicetree | ||
6 | |||
7 | DEPENDS = "dtc-native bootgen-native" | ||
8 | |||
9 | # recipes that inherit from this class need to use an appropriate machine | ||
10 | # override for COMPATIBLE_MACHINE to build successfully; don't allow building | ||
11 | # for microblaze MACHINE | ||
12 | COMPATIBLE_MACHINE ?= "^$" | ||
13 | COMPATIBLE_MACHINE:microblaze = "^$" | ||
14 | |||
15 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
16 | |||
17 | PROVIDES = "" | ||
18 | |||
19 | do_fetch[cleandirs] = "${B}" | ||
20 | |||
21 | DT_PADDING_SIZE = "0x1000" | ||
22 | BOOTGEN_FLAGS ?= " -arch ${SOC_FAMILY} -w ${@bb.utils.contains('SOC_FAMILY','zynqmp','','-process_bitstream bin',d)}" | ||
23 | |||
24 | S ?= "${WORKDIR}" | ||
25 | FW_DIR ?= "" | ||
26 | DTSI_PATH ?= "" | ||
27 | DTBO_PATH ?= "" | ||
28 | DT_FILES_PATH = "${S}/${DTSI_PATH}" | ||
29 | FIRMWARE_NAME_DT_FILE ?= "" | ||
30 | USER_DTS_FILE ?= "" | ||
31 | |||
32 | FIRMWARE_NAME_DT_FILE[doc] = "DT file which has firmware-name device-tree property" | ||
33 | USER_DTS_FILE[doc] = "Final DTSI or DTS file which is used for packaging final DT overlay" | ||
34 | |||
35 | python() { | ||
36 | import re | ||
37 | soc_family = d.getVar("SOC_FAMILY") | ||
38 | if "git://" in d.getVar("SRC_URI") or "https://" in d.getVar("SRC_URI"): | ||
39 | d.setVar("S",'${WORKDIR}/git/'+d.getVar("FW_DIR")) | ||
40 | else: | ||
41 | dtsi_found = False | ||
42 | dtbo_found = False | ||
43 | bit_found = False | ||
44 | bin_found = False | ||
45 | pdi_found = False | ||
46 | |||
47 | # Required Inputs | ||
48 | if '.dtsi' in d.getVar("SRC_URI") or '.dts' in d.getVar("SRC_URI"): | ||
49 | dtsi_found = True | ||
50 | d.setVar("DTSI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtsi' in a or '.dts' in a][0].lstrip('file://'))) | ||
51 | |||
52 | if '.dtbo' in d.getVar("SRC_URI"): | ||
53 | dtbo_found = True | ||
54 | d.setVar("DTBO_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.dtbo' in a][0].lstrip('file://'))) | ||
55 | |||
56 | if '.bit' in d.getVar("SRC_URI") and soc_family != "versal": | ||
57 | bit_found = True | ||
58 | d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bit' in a][0].lstrip('file://'))) | ||
59 | |||
60 | if '.bin' in d.getVar("SRC_URI") and soc_family != "versal": | ||
61 | bin_found = True | ||
62 | d.setVar("BIT_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.bin' in a][0].lstrip('file://'))) | ||
63 | |||
64 | if '.pdi' in d.getVar("SRC_URI") and soc_family == "versal": | ||
65 | pdi_found = True | ||
66 | d.setVar("PDI_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.pdi' in a][0].lstrip('file://'))) | ||
67 | |||
68 | # Check for valid combination of input files in SRC_URI | ||
69 | if dtsi_found or dtbo_found: | ||
70 | bb.debug(2, "dtsi or dtbo found in SRC_URI") | ||
71 | if bit_found or pdi_found or bin_found: | ||
72 | bb.debug(2, "bitstream or pdi found in SRC_URI") | ||
73 | elif bit_found and bin_found: | ||
74 | raise bb.parse.SkipRecipe("Both '.bit' and '.bin' file found in SRC_URI, either .bit or .bin file is supported but not both.") | ||
75 | else: | ||
76 | raise bb.parse.SkipRecipe("Need one '.bit' or one '.pdi' file added to SRC_URI ") | ||
77 | else: | ||
78 | raise bb.parse.SkipRecipe("Need one '.dtsi' or one '.dtbo' file added to SRC_URI ") | ||
79 | |||
80 | # Check for valid combination of dtsi and dts files in SRC_URI | ||
81 | # Following file combinations are not supported use case. | ||
82 | # 1. More than one '.dtsi' and zero '.dts' file. | ||
83 | # 2. More than one '.dts' and zero or more than one '.dtsi'file . | ||
84 | pattern_dts = re.compile(r'[.]+dts\b') | ||
85 | pattern_dtsi = re.compile(r'[.]+dtsi\b') | ||
86 | dts_count = len([*re.finditer(pattern_dts, d.getVar('SRC_URI'))]) | ||
87 | dtsi_count = len([*re.finditer(pattern_dtsi, d.getVar("SRC_URI"))]) | ||
88 | |||
89 | if dtsi_count > 1 and dts_count == 0: | ||
90 | raise bb.parse.SkipRecipe("Recipe has more than one '.dtsi' and zero '.dts' found, this is an unsupported use case") | ||
91 | elif dts_count > 1: | ||
92 | raise bb.parse.SkipRecipe("Recipe has more than one '.dts' and zero or more than one '.dtsi' found, this is an unsupported use case") | ||
93 | |||
94 | # Optional input | ||
95 | if '.json' in d.getVar("SRC_URI"): | ||
96 | d.setVar("JSON_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.json' in a][0].lstrip('file://'))) | ||
97 | |||
98 | if '.xclbin' in d.getVar("SRC_URI"): | ||
99 | d.setVar("XCL_PATH",os.path.dirname([a for a in d.getVar('SRC_URI').split() if '.xclbin' in a][0].lstrip('file://'))) | ||
100 | } | ||
101 | |||
102 | # Function to get dts or dtsi file count. | ||
103 | def get_dt_count(d, dt_ext): | ||
104 | import glob | ||
105 | dt_count = sum(1 for f in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.' + dt_ext),recursive=True) if os.path.isfile(f)) | ||
106 | return dt_count | ||
107 | |||
108 | # Function to search for dt firmware-name property in dts or dtsi file. | ||
109 | python find_firmware_file() { | ||
110 | import glob | ||
111 | pattern_fw = 'firmware-name' | ||
112 | search_count = 0 | ||
113 | for dt_files in glob.iglob((d.getVar('S') + (d.getVar('DTSI_PATH')) + '/*.dts*'),recursive=True): | ||
114 | with open(dt_files, "r") as f: | ||
115 | current_fd = f.read() | ||
116 | if pattern_fw in current_fd: | ||
117 | search_count += 1 | ||
118 | if search_count > 1: | ||
119 | bb.error("firmware-name dt property found in more than one dt files! Please fix the dts or dtsi file.") | ||
120 | break | ||
121 | else: | ||
122 | d.setVar('FIRMWARE_NAME_DT_FILE', os.path.basename(dt_files)) | ||
123 | } | ||
124 | |||
125 | do_configure[prefuncs] += "find_firmware_file" | ||
126 | |||
127 | python do_configure() { | ||
128 | import glob, re, shutil | ||
129 | soc_family = d.getVar("SOC_FAMILY") | ||
130 | |||
131 | if bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', False, True, d): | ||
132 | bb.warn("Using fpga-manager.bbclass requires fpga-overlay MACHINE_FEATURE to be enabled") | ||
133 | |||
134 | # Renaming firmware-name using $PN as bitstream/PDI will be renamed using | ||
135 | # $PN when generating the bin/pdi file. | ||
136 | if os.path.isfile(d.getVar('S') + (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | ||
137 | orig_dtsi = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE'))[0] | ||
138 | new_dtsi = d.getVar('S') + '/pl.dtsi_firmwarename' | ||
139 | with open(new_dtsi, 'w') as newdtsi: | ||
140 | with open(orig_dtsi) as olddtsi: | ||
141 | for line in olddtsi: | ||
142 | if soc_family == 'versal': | ||
143 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.pdi\"',line)) | ||
144 | else: | ||
145 | newdtsi.write(re.sub('firmware-name.*\".*\"','firmware-name = \"'+d.getVar('PN')+'.bit.bin\"',line)) | ||
146 | shutil.move(new_dtsi,orig_dtsi) | ||
147 | } | ||
148 | |||
149 | do_compile[prefuncs] += "find_firmware_file" | ||
150 | |||
151 | python devicetree_do_compile:append() { | ||
152 | import glob, subprocess, shutil | ||
153 | soc_family = d.getVar("SOC_FAMILY") | ||
154 | |||
155 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | ||
156 | |||
157 | # Skip devicetree do_compile task if input file is dtbo in SRC_URI | ||
158 | if not dtbo_count: | ||
159 | # Convert .bit to bit.bin format only if dtsi is input. | ||
160 | # In case of dtbo as input, bbclass doesn't know if firmware-name is .bit or | ||
161 | # .bit.bin format and corresponding file name. Hence we are not doing | ||
162 | # bit.bin conversion. | ||
163 | if soc_family != 'versal' and glob.glob(d.getVar('S') + '/' + d.getVar('FIRMWARE_NAME_DT_FILE')): | ||
164 | pn = d.getVar('PN') | ||
165 | biffile = pn + '.bif' | ||
166 | |||
167 | with open(biffile, 'w') as f: | ||
168 | f.write('all:\n{\n\t' + glob.glob(d.getVar('S')+(d.getVar('BIT_PATH') or '') + '/*.bit')[0] + '\n}') | ||
169 | |||
170 | bootgenargs = ["bootgen"] + (d.getVar("BOOTGEN_FLAGS") or "").split() | ||
171 | bootgenargs += ["-image", biffile, "-o", pn + ".bit.bin"] | ||
172 | subprocess.run(bootgenargs, check = True) | ||
173 | |||
174 | # In Zynq7k using both "-process_bitstream bin" and "-o" in bootgen flag, | ||
175 | # to convert bit file to bin format, "-o" option will not be effective | ||
176 | # and generated output file name is ${S}+${BIT_PATH}/<bit_file_name>.bit.bin | ||
177 | # file, Hence we need to rename this file from <bit_file_name>.bit.bin to | ||
178 | # ${PN}.bit.bin which matches the firmware name in dtbo and move | ||
179 | # ${PN}.bit.bin to ${B} directory. | ||
180 | if soc_family == 'zynq': | ||
181 | src_bitbin_file = glob.glob(d.getVar('S') + (d.getVar('BIT_PATH') or '') + '/*.bit.bin')[0] | ||
182 | dst_bitbin_file = d.getVar('B') + '/' + pn + '.bit.bin' | ||
183 | shutil.move(src_bitbin_file, dst_bitbin_file) | ||
184 | |||
185 | if not os.path.isfile(pn + ".bit.bin"): | ||
186 | bb.fatal("Couldn't find %s file, Enable '-log trace' in BOOTGEN_FLAGS" \ | ||
187 | "and check bootgen_log.txt" % (d.getVar('B') + '/' + pn + '.bit.bin')) | ||
188 | } | ||
189 | |||
190 | # If user inputs both dtsi and dts files then device-tree will generate dtbo | ||
191 | # files for each dt file, Hence to package the firmware pick the right user dt | ||
192 | # overlay file. | ||
193 | python find_user_dts_overlay_file() { | ||
194 | import glob | ||
195 | dtbo_count = sum(1 for f in glob.iglob((d.getVar('S') + '/*.dtbo'),recursive=True) if os.path.isfile(f)) | ||
196 | # Skip if input file is dtbo in SRC_URI | ||
197 | if not dtbo_count: | ||
198 | dts_count = get_dt_count(d, 'dts') | ||
199 | dtsi_count = get_dt_count(d, 'dtsi') | ||
200 | if dtsi_count == 1 and dts_count == 0: | ||
201 | dts_file =glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dtsi')[0] | ||
202 | elif dtsi_count >=0 and dts_count == 1: | ||
203 | dts_file = glob.glob(d.getVar('S')+ (d.getVar('DTSI_PATH') or '') + '/*.dts')[0] | ||
204 | |||
205 | d.setVar('USER_DTS_FILE', os.path.splitext(os.path.basename(dts_file))[0]) | ||
206 | } | ||
207 | |||
208 | do_install[prefuncs] += "find_user_dts_overlay_file" | ||
209 | |||
210 | do_install() { | ||
211 | install -d ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
212 | |||
213 | # In case of dtbo as input, dtbo will be copied from directly from ${S} | ||
214 | # In case of dtsi as input, dtbo will be copied from directly from ${B} | ||
215 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | ||
216 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
217 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then | ||
218 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)" | ||
219 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
220 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo | ||
221 | else | ||
222 | bbfatal "A dtbo ending '.dtbo' expected but not found" | ||
223 | fi | ||
224 | |||
225 | if [ "${SOC_FAMILY}" == "versal" ]; then | ||
226 | # In case of dtbo as input, pdi will be copied from directly from ${S} | ||
227 | # without renaming the pdi name to ${PN}.pdi | ||
228 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | ||
229 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
230 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | ||
231 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" | ||
232 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
233 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
234 | else | ||
235 | bbfatal "A PDI file with '.pdi' expected but not found" | ||
236 | fi | ||
237 | else | ||
238 | # In case of dtbo as input, .bit or .bin will be copied from directly | ||
239 | # from ${S} without renaming the .bit/.bin name to ${PN}.bit/${PN}.bin | ||
240 | # if more than one .bit/.bin file is found then fail the task. | ||
241 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then | ||
242 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" | ||
243 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then | ||
244 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" | ||
245 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | ||
246 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
247 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ] && [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | ||
248 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
249 | elif [ -f ${B}/${PN}.bit.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
250 | install -Dm 0644 ${B}/${PN}.bit.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bit.bin | ||
251 | else | ||
252 | bbfatal "A bitstream file with '.bit' or '.bin' expected but not found" | ||
253 | fi | ||
254 | fi | ||
255 | |||
256 | if ls ${S}/${XCL_PATH}/*.xclbin >/dev/null 2>&1; then | ||
257 | install -Dm 0644 ${S}/${XCL_PATH}/*.xclbin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.xclbin | ||
258 | fi | ||
259 | |||
260 | if [ -f ${S}/${JSON_PATH}/shell.json ] || [ -f ${S}/${JSON_PATH}/accel.json ]; then | ||
261 | install -Dm 0644 ${S}/${JSON_PATH}/*.json ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
262 | fi | ||
263 | } | ||
264 | |||
265 | do_deploy[noexec] = "1" | ||
266 | |||
267 | FILES:${PN} += "${nonarch_base_libdir}/firmware/xilinx/${PN}" | ||
diff --git a/meta-xilinx-core/classes/fpgamanager_custom.bbclass b/meta-xilinx-core/classes/fpgamanager_custom.bbclass deleted file mode 100644 index 8c8997a1..00000000 --- a/meta-xilinx-core/classes/fpgamanager_custom.bbclass +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | # This class inherits dfx_user_dts.bbclass for below use cases. | ||
2 | # Zynq-7000 and ZynqMP: Full bitstream loading. | ||
3 | # ZynqMP: DFx Static and Partial bitstream loading. | ||
4 | # Versal: DFx Static and Parial pdi loading. | ||
5 | # Versal: Full PDI loading. | ||
6 | |||
7 | inherit dfx_user_dts | ||
8 | |||
9 | python fpgamanager_warn_msg () { | ||
10 | if not d.getVar("FPGAMANAGER_NO_WARN"): | ||
11 | arch = d.getVar('SOC_FAMILY') | ||
12 | pn = d.getVar('PN') | ||
13 | warn_msg = 'Users should start using dfx_user_dts bbclass for ' | ||
14 | if arch == 'zynq': | ||
15 | warn_msg += 'Zynq-7000 Full bitstream loading use case.' | ||
16 | elif arch == 'zynqmp': | ||
17 | warn_msg += 'ZynqMP Full or DFx Static or DFx Partial bitstream loading use case.' | ||
18 | elif arch == 'versal': | ||
19 | warn_msg += 'Versal DFx Static or DFx Partial or Full PDI loading use case.' | ||
20 | |||
21 | bb.warn("Recipe %s has inherited fpgamanager_custom bbclass which will be deprecated in 2024.1 release. \n%s" % (pn, warn_msg)) | ||
22 | } | ||
23 | |||
24 | do_install[postfuncs] += "fpgamanager_warn_msg" \ No newline at end of file | ||
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index f7310bf1..5f2b17b7 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -42,18 +42,16 @@ 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 | ||
49 | XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%" | 49 | XILINX_QEMU_VERSION[v2024.1] = "v8.1.0-xilinx-v2024.1%" |
50 | XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" | 50 | PREFERRED_VERSION_qemu ?= "${@ '8.1%' if not (d.getVar('XILINX_RELEASE_VERSION') or 'undefined').startswith('v2024') else '8.1%'}" |
51 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" | 51 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'v8.1%'}" |
52 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" | 52 | PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'v8.1%'}" |
53 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 53 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'v8.1%'}" |
54 | PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 54 | PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-v2024.1%" |
55 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
56 | PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%" | ||
57 | 55 | ||
58 | DEFAULT_XILINX_QEMU = "qemu-xilinx" | 56 | DEFAULT_XILINX_QEMU = "qemu-xilinx" |
59 | DEFAULT_XILINX_QEMU:arm = "qemu" | 57 | DEFAULT_XILINX_QEMU:arm = "qemu" |
@@ -63,12 +61,14 @@ XILINX_ATF_VERSION[v2022.1] = "2.6-xilinx-v2022.1%" | |||
63 | XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%" | 61 | XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%" |
64 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" | 62 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" |
65 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" | 63 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" |
64 | XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%" | ||
66 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 65 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
67 | 66 | ||
68 | XILINX_UBOOT_VERSION[v2022.1] = "1:v2021.01-xilinx-v2022.1%" | 67 | XILINX_UBOOT_VERSION[v2022.1] = "1:v2021.01-xilinx-v2022.1%" |
69 | XILINX_UBOOT_VERSION[v2022.2] = "1:v2022.01-xilinx-v2022.2%" | 68 | XILINX_UBOOT_VERSION[v2022.2] = "1:v2022.01-xilinx-v2022.2%" |
70 | XILINX_UBOOT_VERSION[v2023.1] = "1:v2023.01-xilinx-v2023.1%" | 69 | XILINX_UBOOT_VERSION[v2023.1] = "1:v2023.01-xilinx-v2023.1%" |
71 | XILINX_UBOOT_VERSION[v2023.2] = "1:v2023.01-xilinx-v2023.2%" | 70 | XILINX_UBOOT_VERSION[v2023.2] = "1:v2023.01-xilinx-v2023.2%" |
71 | XILINX_UBOOT_VERSION[v2024.1] = "1:v2024.01-xilinx-v2024.1%" | ||
72 | 72 | ||
73 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 73 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
74 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 74 | PREFERRED_VERSION_u-boot-tools-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
@@ -77,6 +77,7 @@ XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" | |||
77 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" | 77 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" |
78 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" | 78 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" |
79 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" | 79 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60-xilinx-v2023.2%" |
80 | XILINX_LINUX_VERSION[v2024.1] = "6.6.10-xilinx-v2024.1%" | ||
80 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 81 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
81 | 82 | ||
82 | # Mali needs to match the kernel version | 83 | # Mali needs to match the kernel version |
@@ -87,6 +88,7 @@ KERNEL_MODULE_DP_VERSION[v2022.1] = "5.10.0+xilinx-v2022.1+git%" | |||
87 | KERNEL_MODULE_DP_VERSION[v2022.2] = "5.10.0+xilinx-v2022.2+git%" | 88 | KERNEL_MODULE_DP_VERSION[v2022.2] = "5.10.0+xilinx-v2022.2+git%" |
88 | KERNEL_MODULE_DP_VERSION[v2023.1] = "6.1.0+xilinx-v2023.1+git%" | 89 | KERNEL_MODULE_DP_VERSION[v2023.1] = "6.1.0+xilinx-v2023.1+git%" |
89 | KERNEL_MODULE_DP_VERSION[v2023.2] = "6.1.0+xilinx-v2023.2+git%" | 90 | KERNEL_MODULE_DP_VERSION[v2023.2] = "6.1.0+xilinx-v2023.2+git%" |
91 | KERNEL_MODULE_DP_VERSION[v2024.1] = "6.1.0+xilinx-v2024.1+git%" | ||
90 | PREFERRED_VERSION_kernel-module-dp ?= "${@d.getVarFlag('KERNEL_MODULE_DP_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 92 | PREFERRED_VERSION_kernel-module-dp ?= "${@d.getVarFlag('KERNEL_MODULE_DP_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
91 | 93 | ||
92 | # HDMI kernel module | 94 | # HDMI kernel module |
@@ -94,6 +96,7 @@ KERNEL_MODULE_HDMI_VERSION[v2022.1] = "5.15.0+xilinx-v2022.1+git%" | |||
94 | KERNEL_MODULE_HDMI_VERSION[v2022.2] = "5.15.19+xilinx-v2022.2+git%" | 96 | KERNEL_MODULE_HDMI_VERSION[v2022.2] = "5.15.19+xilinx-v2022.2+git%" |
95 | KERNEL_MODULE_HDMI_VERSION[v2023.1] = "6.1+xilinx-v2023.1+git%" | 97 | KERNEL_MODULE_HDMI_VERSION[v2023.1] = "6.1+xilinx-v2023.1+git%" |
96 | KERNEL_MODULE_HDMI_VERSION[v2023.2] = "6.1+xilinx-v2023.2+git%" | 98 | KERNEL_MODULE_HDMI_VERSION[v2023.2] = "6.1+xilinx-v2023.2+git%" |
99 | KERNEL_MODULE_HDMI_VERSION[v2024.1] = "6.1+xilinx-v2024.1+git%" | ||
97 | PREFERRED_VERSION_kernel-module-hdmi ?= "${@d.getVarFlag('KERNEL_MODULE_HDMI_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 100 | PREFERRED_VERSION_kernel-module-hdmi ?= "${@d.getVarFlag('KERNEL_MODULE_HDMI_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
98 | 101 | ||
99 | # VCU kernel module | 102 | # VCU kernel module |
@@ -107,6 +110,7 @@ XRT_ZOCL_VERSION[v2022.1] = "202210.2.13.479" | |||
107 | XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0" | 110 | XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0" |
108 | XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" | 111 | XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" |
109 | XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" | 112 | XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" |
113 | XRT_ZOCL_VERSION[v2024.1] = "202410.2.17.0" | ||
110 | PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 114 | PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
111 | PREFERRED_VERSION_zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 115 | PREFERRED_VERSION_zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
112 | 116 | ||
@@ -115,12 +119,14 @@ AIEFAL_VERSION[v2022.1] = "1.4" | |||
115 | AIEFAL_VERSION[v2022.2] = "1.4" | 119 | AIEFAL_VERSION[v2022.2] = "1.4" |
116 | AIEFAL_VERSION[v2023.1] = "1.5" | 120 | AIEFAL_VERSION[v2023.1] = "1.5" |
117 | AIEFAL_VERSION[v2023.2] = "1.5" | 121 | AIEFAL_VERSION[v2023.2] = "1.5" |
122 | AIEFAL_VERSION[v2024.1] = "1.6" | ||
118 | PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 123 | PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
119 | 124 | ||
120 | AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3" | 125 | AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3" |
121 | AI_ENGINE_DRIVER_VERSION[v2022.2] = "3.3" | 126 | AI_ENGINE_DRIVER_VERSION[v2022.2] = "3.3" |
122 | AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" | 127 | AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" |
123 | AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" | 128 | AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" |
129 | AI_ENGINE_DRIVER_VERSION[v2024.1] = "3.5" | ||
124 | PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 130 | PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
125 | 131 | ||
126 | # Add support to eSDK for gen-machine-conf if it exists | 132 | # 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..1837da26 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc | |||
@@ -23,13 +23,16 @@ PREFERRED_PROVIDER_u-boot-tools ??= "u-boot-tools-xlnx" | |||
23 | PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" | 23 | PREFERRED_PROVIDER_u-boot-tools-native ??= "u-boot-tools-xlnx-native" |
24 | PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" | 24 | PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" |
25 | 25 | ||
26 | # Libmetal and OpenAMP Configuration | ||
27 | PREFERRED_PROVIDER_libmetal ?= "libmetal-xlnx" | ||
28 | PREFERRED_PROVIDER_open-amp ?= "open-amp-xlnx" | ||
29 | |||
26 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" | 30 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" |
27 | 31 | ||
28 | UBOOT_SUFFIX ?= "bin" | 32 | UBOOT_SUFFIX ?= "bin" |
29 | 33 | ||
30 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" | 34 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" |
31 | UBOOT_ELF ?= "u-boot" | 35 | UBOOT_ELF ?= "u-boot.elf" |
32 | UBOOT_ELF:aarch64 ?= "u-boot.elf" | ||
33 | 36 | ||
34 | # libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 | 37 | # libmali is selected by DISTRO_FEATURE of libmali & MACHINE_FEATURES of mali400 |
35 | # lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 | 38 | # lima is selected by DISTRO_FEATURE != libmali & MACHINE_FEATURES of mali400 |
diff --git a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf index bf5523ed..1028ac04 100644 --- a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf | |||
@@ -6,6 +6,12 @@ require conf/machine/versal-generic.conf | |||
6 | 6 | ||
7 | SOC_VARIANT = "ai-edge" | 7 | SOC_VARIANT = "ai-edge" |
8 | 8 | ||
9 | # VEK280 board has 12GB memory only but default versal-generic has QB_MEM set to | ||
10 | # 8G, Hence we need set 12G in QB_MEM. | ||
11 | QB_MEM = "-m 12G" | ||
12 | |||
13 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb" | ||
14 | |||
9 | #### No additional settings should be after the Postamble | 15 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 16 | #### Postamble |
11 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_edge_generic']['versal-ai-edge-generic' != "${MACHINE}"]}" | 17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_ai_edge_generic']['versal-ai-edge-generic' != "${MACHINE}"]}" |
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf index 2f35ba24..3582944b 100644 --- a/meta-xilinx-core/conf/machine/versal-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-generic.conf | |||
@@ -84,7 +84,7 @@ QB_KERNEL_CMDLINE_APPEND ?= "" | |||
84 | 84 | ||
85 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 85 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
86 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" | 86 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" |
87 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" | 87 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" |
88 | 88 | ||
89 | # Four total serial ports defined in this model (according to the dts) | 89 | # Four total serial ports defined in this model (according to the dts) |
90 | # | 90 | # |
diff --git a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf index 23fffcb9..3e72da60 100644 --- a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf | |||
@@ -6,6 +6,12 @@ require conf/machine/versal-generic.conf | |||
6 | 6 | ||
7 | SOC_VARIANT = "hbm" | 7 | SOC_VARIANT = "hbm" |
8 | 8 | ||
9 | # VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G, | ||
10 | # Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM | ||
11 | QB_MEM = "-m 32G" | ||
12 | |||
13 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb" | ||
14 | |||
9 | #### No additional settings should be after the Postamble | 15 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 16 | #### Postamble |
11 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_hbm_generic']['versal-hbm-generic' != "${MACHINE}"]}" | 17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_hbm_generic']['versal-hbm-generic' != "${MACHINE}"]}" |
diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf index 9945d301..eb450bbf 100644 --- a/meta-xilinx-core/conf/machine/versal-net-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf | |||
@@ -1,5 +1,3 @@ | |||
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/conf/machine/versal-prime-generic.conf b/meta-xilinx-core/conf/machine/versal-prime-generic.conf index 94e9b05e..206f0e2a 100644 --- a/meta-xilinx-core/conf/machine/versal-prime-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-prime-generic.conf | |||
@@ -6,6 +6,8 @@ require conf/machine/versal-generic.conf | |||
6 | 6 | ||
7 | SOC_VARIANT = "prime" | 7 | SOC_VARIANT = "prime" |
8 | 8 | ||
9 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vmk180.dtb" | ||
10 | |||
9 | #### No additional settings should be after the Postamble | 11 | #### No additional settings should be after the Postamble |
10 | #### Postamble | 12 | #### Postamble |
11 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_prime_generic']['versal-prime-generic' != "${MACHINE}"]}" | 13 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_prime_generic']['versal-prime-generic' != "${MACHINE}"]}" |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi index 694a2fd0..a918faf2 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi | |||
@@ -28,6 +28,24 @@ | |||
28 | no-map; | 28 | no-map; |
29 | reg = <0x0 0x3ed48000 0x0 0x100000>; | 29 | reg = <0x0 0x3ed48000 0x0 0x100000>; |
30 | }; | 30 | }; |
31 | |||
32 | rproc_1_reserved: rproc@3ef00000 { | ||
33 | no-map; | ||
34 | reg = <0x0 0x3ef00000 0x0 0x40000>; | ||
35 | }; | ||
36 | rpu1vdev0vring0: rpu1vdev0vring0@3ef40000 { | ||
37 | no-map; | ||
38 | reg = <0x0 0x3ef40000 0x0 0x4000>; | ||
39 | }; | ||
40 | rpu1vdev0vring1: rpu1vdev0vring1@3ef44000 { | ||
41 | no-map; | ||
42 | reg = <0x0 0x3ef44000 0x0 0x4000>; | ||
43 | }; | ||
44 | rpu1vdev0buffer: rpu1vdev0buffer@3ef48000 { | ||
45 | no-map; | ||
46 | compatible = "shared-dma-pool"; | ||
47 | reg = <0x0 0x3ef48000 0x0 0x100000>; | ||
48 | }; | ||
31 | }; | 49 | }; |
32 | 50 | ||
33 | tcm_0a: tcm_0a@eba00000 { | 51 | tcm_0a: tcm_0a@eba00000 { |
@@ -54,6 +72,30 @@ | |||
54 | power-domain = <&versal_net_firmware 0x183180cd>; | 72 | power-domain = <&versal_net_firmware 0x183180cd>; |
55 | }; | 73 | }; |
56 | 74 | ||
75 | tcm_1a: tcm_0a@eba40000 { | ||
76 | no-map; | ||
77 | reg = <0x0 0xeba40000 0x0 0x10000>; | ||
78 | status = "okay"; | ||
79 | compatible = "mmio-sram"; | ||
80 | power-domain = <&versal_net_firmware 0x183180ce>; | ||
81 | }; | ||
82 | |||
83 | tcm_1b: tcm_0b@eba50000 { | ||
84 | no-map; | ||
85 | reg = <0x0 0xeba50000 0x0 0x8000>; | ||
86 | status = "okay"; | ||
87 | compatible = "mmio-sram"; | ||
88 | power-domain = <&versal_net_firmware 0x183180cf>; | ||
89 | }; | ||
90 | |||
91 | tcm_1c: tcm_0b@eba60000 { | ||
92 | no-map; | ||
93 | reg = <0x0 0xeba60000 0x0 0x8000>; | ||
94 | status = "okay"; | ||
95 | compatible = "mmio-sram"; | ||
96 | power-domain = <&versal_net_firmware 0x183180d0>; | ||
97 | }; | ||
98 | |||
57 | r52ss { | 99 | r52ss { |
58 | compatible = "xlnx,versal-net-r52-remoteproc"; | 100 | compatible = "xlnx,versal-net-r52-remoteproc"; |
59 | #address-cells = <0x2>; | 101 | #address-cells = <0x2>; |
@@ -72,7 +114,18 @@ | |||
72 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 114 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
73 | mbox-names = "tx", "rx"; | 115 | mbox-names = "tx", "rx"; |
74 | }; | 116 | }; |
75 | }; | 117 | r52_1 { |
118 | compatible = "xilinx,r52"; | ||
119 | #address-cells = <0x2>; | ||
120 | #size-cells = <0x2>; | ||
121 | ranges; | ||
122 | sram = <&tcm_1a>, <&tcm_1b>, <&tcm_1c>; | ||
123 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | ||
124 | power-domain = <&versal_net_firmware 0x181100C0>; | ||
125 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | ||
126 | mbox-names = "tx", "rx"; | ||
127 | }; | ||
128 | }; | ||
76 | 129 | ||
77 | zynqmp_ipi1 { | 130 | zynqmp_ipi1 { |
78 | compatible = "xlnx,zynqmp-ipi-mailbox"; | 131 | compatible = "xlnx,zynqmp-ipi-mailbox"; |
@@ -93,5 +146,15 @@ | |||
93 | #mbox-cells = <0x01>; | 146 | #mbox-cells = <0x01>; |
94 | xlnx,ipi-id = <0x03>; | 147 | xlnx,ipi-id = <0x03>; |
95 | }; | 148 | }; |
149 | /* APU<->RPU1 IPI mailbox controller */ | ||
150 | ipi_mailbox_rpu1: mailbox@eb3f0b00{ | ||
151 | reg = <0xeb3f0b00 0x20 0xeb3f0b20 0x20 0xeb3f0940 0x20 0xeb3f0960 0x20>; | ||
152 | reg-names = "local_request_region", | ||
153 | "local_response_region", | ||
154 | "remote_request_region", | ||
155 | "remote_response_region"; | ||
156 | #mbox-cells = <0x01>; | ||
157 | xlnx,ipi-id = <0x04>; | ||
158 | }; | ||
96 | }; | 159 | }; |
97 | }; | 160 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi index c8a60d81..8ef72656 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi | |||
@@ -28,6 +28,23 @@ | |||
28 | no-map; | 28 | no-map; |
29 | reg = <0x0 0x3ed00000 0x0 0x40000>; | 29 | reg = <0x0 0x3ed00000 0x0 0x40000>; |
30 | }; | 30 | }; |
31 | rpu1vdev0vring0: rpu0vdev0vring0@3ef40000 { | ||
32 | no-map; | ||
33 | reg = <0x0 0x3ef40000 0x0 0x4000>; | ||
34 | }; | ||
35 | rpu1vdev0vring1: rpu0vdev0vring1@3ef44000 { | ||
36 | no-map; | ||
37 | reg = <0x0 0x3ef44000 0x0 0x4000>; | ||
38 | }; | ||
39 | rpu1vdev0buffer: rpu0vdev0buffer@3ef48000 { | ||
40 | no-map; | ||
41 | reg = <0x0 0x3ef48000 0x0 0x100000>; | ||
42 | }; | ||
43 | rproc_1_reserved: rproc@3ef00000 { | ||
44 | no-map; | ||
45 | reg = <0x0 0x3ef00000 0x0 0x40000>; | ||
46 | }; | ||
47 | |||
31 | }; | 48 | }; |
32 | 49 | ||
33 | tcm_0a: tcm_0a@ffe00000 { | 50 | tcm_0a: tcm_0a@ffe00000 { |
@@ -45,7 +62,21 @@ | |||
45 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
46 | power-domain = <&zynqmp_firmware 16>; | 63 | power-domain = <&zynqmp_firmware 16>; |
47 | }; | 64 | }; |
65 | tcm_1a: tcm_0a@ffe90000 { | ||
66 | no-map; | ||
67 | reg = <0x0 0xffe90000 0x0 0x10000>; | ||
68 | status = "okay"; | ||
69 | compatible = "mmio-sram"; | ||
70 | power-domain = <&zynqmp_firmware 17>; | ||
71 | }; | ||
48 | 72 | ||
73 | tcm_1b: tcm_0b@ffeb0000 { | ||
74 | no-map; | ||
75 | reg = <0x0 0xffeb0000 0x0 0x10000>; | ||
76 | status = "okay"; | ||
77 | compatible = "mmio-sram"; | ||
78 | power-domain = <&zynqmp_firmware 18>; | ||
79 | }; | ||
49 | rf5ss@ff9a0000 { | 80 | rf5ss@ff9a0000 { |
50 | compatible = "xlnx,zynqmp-r5-remoteproc"; | 81 | compatible = "xlnx,zynqmp-r5-remoteproc"; |
51 | xlnx,cluster-mode = <1>; | 82 | xlnx,cluster-mode = <1>; |
@@ -65,6 +96,18 @@ | |||
65 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 96 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
66 | mbox-names = "tx", "rx"; | 97 | mbox-names = "tx", "rx"; |
67 | }; | 98 | }; |
99 | r5f_1: r5f@1 { | ||
100 | compatible = "xilinx,r5f"; | ||
101 | #address-cells = <2>; | ||
102 | #size-cells = <2>; | ||
103 | ranges; | ||
104 | sram = <&tcm_1a>, <&tcm_1b>; | ||
105 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | ||
106 | power-domain = <&zynqmp_firmware 8>; | ||
107 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | ||
108 | mbox-names = "tx", "rx"; | ||
109 | }; | ||
110 | |||
68 | }; | 111 | }; |
69 | 112 | ||
70 | zynqmp_ipi1 { | 113 | zynqmp_ipi1 { |
@@ -90,4 +133,26 @@ | |||
90 | xlnx,ipi-id = <1>; | 133 | xlnx,ipi-id = <1>; |
91 | }; | 134 | }; |
92 | }; | 135 | }; |
136 | zynqmp_ipi2 { | ||
137 | compatible = "xlnx,zynqmp-ipi-mailbox"; | ||
138 | interrupt-parent = <&gic>; | ||
139 | interrupts = <0 30 4>; | ||
140 | xlnx,ipi-id = <8>; | ||
141 | #address-cells = <1>; | ||
142 | #size-cells = <1>; | ||
143 | ranges; | ||
144 | /* APU<->RPU1 IPI mailbox controller */ | ||
145 | ipi_mailbox_rpu1: mailbox@ff990800 { | ||
146 | reg = <0xff990800 0x20>, | ||
147 | <0xff990820 0x20>, | ||
148 | <0xff990200 0x20>, | ||
149 | <0xff990220 0x20>; | ||
150 | reg-names = "local_request_region", | ||
151 | "local_response_region", | ||
152 | "remote_request_region", | ||
153 | "remote_response_region"; | ||
154 | #mbox-cells = <1>; | ||
155 | xlnx,ipi-id = <2>; | ||
156 | }; | ||
157 | }; | ||
93 | }; | 158 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb new file mode 100644 index 00000000..b33d5064 --- /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 = "xlnx_rel_v2024.1" | ||
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..bf779ff5 --- /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 = "7d39410ad2172be9f339c4ce565ed765ddd8c5c8" | ||
3 | BRANCH = "xlnx_rel_v2024.1" | ||
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_%.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.bbappend index 2b96f152..e0de911f 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_%.bbappend | |||
@@ -3,12 +3,12 @@ | |||
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-8.1.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc new file mode 100644 index 00000000..42f054e6 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split-8.1.inc | |||
@@ -0,0 +1,71 @@ | |||
1 | # we have our own package splitting for qemu, inhbit the oe-core | ||
2 | # split by overriding the split function | ||
3 | python split_qemu_packages () { | ||
4 | print( "meta-virtualization: vmsplit: inhibiting core qemu package split" ) | ||
5 | } | ||
6 | |||
7 | PACKAGES:prepend:class-target = "${PN}-x86_64 \ | ||
8 | ${PN}-aarch64 \ | ||
9 | ${PN}-arm \ | ||
10 | ${PN}-i386 \ | ||
11 | ${PN}-system-i386 \ | ||
12 | ${PN}-microblaze \ | ||
13 | ${PN}-support \ | ||
14 | ${PN}-keymaps \ | ||
15 | ${PN}-firmware \ | ||
16 | " | ||
17 | |||
18 | FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" | ||
19 | RDEPENDS:${PN}-x86_64:append:class-target = " ${PN}" | ||
20 | RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-system-x86_64" | ||
21 | RPROVIDES:${PN}-x86_64:append:class-target = " ${PN}-user-x86_64" | ||
22 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-x86_64" | ||
23 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-x86_64" | ||
24 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" | ||
25 | |||
26 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" | ||
27 | RDEPENDS:${PN}-i386:append:class-target = " ${PN}" | ||
28 | RPROVIDES:${PN}-i386:append:class-target = " ${PN}-user-i386" | ||
29 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-i386" | ||
30 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" | ||
31 | |||
32 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" | ||
33 | RDEPENDS:${PN}-system-i386:append:class-target = " ${PN}" | ||
34 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-system-i386" | ||
35 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" | ||
36 | |||
37 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" | ||
38 | RDEPENDS:${PN}-aarch64:append:class-target = " ${PN}" | ||
39 | RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-system-aarch64" | ||
40 | RPROVIDES:${PN}-aarch64:append:class-target = " ${PN}-user-aarch64" | ||
41 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-aarch64" | ||
42 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-aarch64" | ||
43 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" | ||
44 | |||
45 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" | ||
46 | RDEPENDS:${PN}-arm:append:class-target = " ${PN}" | ||
47 | RPROVIDES:${PN}-arm:append:class-target = " ${PN}-system-arm" | ||
48 | RPROVIDES:${PN}-arm:append:class-target = " ${PN}-user-arm" | ||
49 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-arm" | ||
50 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-arm" | ||
51 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
52 | |||
53 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" | ||
54 | RDEPENDS:${PN}-microblaze:append:class-target = " ${PN}" | ||
55 | RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-system-microblaze" | ||
56 | RPROVIDES:${PN}-microblaze:append:class-target = " ${PN}-user-microblaze" | ||
57 | RDEPENDS:${PN}-system-all:append:class-target = " ${PN}-microblaze" | ||
58 | RDEPENDS:${PN}-user-all:append:class-target = " ${PN}-microblaze" | ||
59 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
60 | |||
61 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" | ||
62 | RDEPENDS:${PN}-support:class-target = "${PN} bash" | ||
63 | |||
64 | FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*" | ||
65 | RDEPENDS:${PN}-firmware:class-target = "${PN}" | ||
66 | INSANE_SKIP:${PN}-firmware:class-target = "arch" | ||
67 | |||
68 | FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*" | ||
69 | RDEPENDS:${PN}-keymaps:class-target = "${PN}" | ||
70 | |||
71 | PACKAGECONFIG:append:class-target = " virtfs" | ||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc deleted file mode 100644 index 2c73d931..00000000 --- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx-package-split.inc +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | PACKAGES:prepend:class-target = "${PN}-x86_64 \ | ||
2 | ${PN}-aarch64 \ | ||
3 | ${PN}-arm \ | ||
4 | ${PN}-i386 \ | ||
5 | ${PN}-system-i386 \ | ||
6 | ${PN}-microblaze \ | ||
7 | ${PN}-support \ | ||
8 | ${PN}-keymaps \ | ||
9 | ${PN}-firmware \ | ||
10 | " | ||
11 | |||
12 | FILES:${PN}-x86_64:class-target = "${bindir}/qemu-system-x86_64 ${bindir}/qemu-x86_64" | ||
13 | RDEPENDS:${PN}-x86_64:append:class-target = "${PN}" | ||
14 | INSANE_SKIP:${PN}-x86_64:class-target = "file-rdeps" | ||
15 | |||
16 | FILES:${PN}-i386:class-target = "${bindir}/qemu-i386" | ||
17 | RDEPENDS:${PN}-i386:append:class-target = "${PN}" | ||
18 | INSANE_SKIP:${PN}-i386:class-target = "file-rdeps" | ||
19 | |||
20 | FILES:${PN}-system-i386:class-target = "${bindir}/qemu-system-i386" | ||
21 | RDEPENDS:${PN}-system-i386:append:class-target = "${PN}" | ||
22 | INSANE_SKIP:${PN}-system-i386:class-target = "file-rdeps" | ||
23 | |||
24 | FILES:${PN}-aarch64:class-target = "${bindir}/qemu-system-aarch64 ${bindir}/qemu-aarch64" | ||
25 | RDEPENDS:${PN}-aarch64:append:class-target = "${PN}" | ||
26 | INSANE_SKIP:${PN}-aarch64:class-target = "file-rdeps" | ||
27 | |||
28 | FILES:${PN}-arm:class-target = "${bindir}/qemu-system-arm ${bindir}/qemu-arm" | ||
29 | RDEPENDS:${PN}-arm:append:class-target = "${PN}" | ||
30 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
31 | |||
32 | FILES:${PN}-microblaze:class-target = "${bindir}/qemu-system-microblaze* ${bindir}/qemu-microblaze*" | ||
33 | RDEPENDS:${PN}-microblaze:append:class-target = "${PN}" | ||
34 | INSANE_SKIP:${PN}-arm:class-target = "file-rdeps" | ||
35 | |||
36 | FILES:${PN}-support:class-target = "${bindir}/* ${libexecdir}/*" | ||
37 | RDEPENDS:${PN}-support:class-target = "${PN} bash" | ||
38 | |||
39 | FILES:${PN}-firmware:class-target = "${datadir}/${PN}/*.bin ${datadir}/${PN}/*.rom ${datadir}/${PN}/*.img ${datadir}/${PN}/openbios* ${datadir}/${PN}/*.dtb ${datadir}/${PN}/u-boot*" | ||
40 | RDEPENDS:${PN}-firmware:class-target = "${PN}" | ||
41 | INSANE_SKIP:${PN}-firmware:class-target = "arch" | ||
42 | |||
43 | FILES:${PN}-keymaps:class-target = "${datadir}/${PN}/keymaps/*" | ||
44 | RDEPENDS:${PN}-keymaps:class-target = "${PN}" | ||
45 | |||
46 | PACKAGECONFIG:append:class-target = " virtfs" | ||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend deleted file mode 100644 index 5cca9e1f..00000000 --- a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', '${BPN}-package-split.inc', '', d)} | ||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-devtools/qemu/qemu-xilinx_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_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..b8da828d 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=v0.2024.x;protocol=https" |
2 | SRCREV = "807435ae6fa0a07e8c84b458d138f3f54614eb5c" | 2 | SRCREV = "30bed2bbebeae4c190a74a5d6f26f43a62135041" |
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 index f053a9bd..1f1d0606 100644 --- a/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb +++ b/meta-xilinx-core/recipes-apps/image-update/image-update_1.1.bb | |||
@@ -6,7 +6,7 @@ SUMMARY = "Image update is used to update alternate image on compatible firmware | |||
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b" | 7 | LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSES/MIT;md5=2ac09a7a37dd6ee0ba23ce497d57d09b" |
8 | 8 | ||
9 | BRANCH = "master" | 9 | BRANCH = "xlnx_rel_v2024.1" |
10 | SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https" | 10 | SRC_URI = "git://github.com/Xilinx/linux-image_update.git;branch=${BRANCH};protocol=https" |
11 | SRCREV = "a68308f329578d3585fd335071a9184aa7f46d2e" | 11 | SRCREV = "a68308f329578d3585fd335071a9184aa7f46d2e" |
12 | 12 | ||
@@ -16,6 +16,7 @@ S = "${WORKDIR}/git" | |||
16 | 16 | ||
17 | COMPATIBLE_MACHINE = "^$" | 17 | COMPATIBLE_MACHINE = "^$" |
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
19 | 20 | ||
20 | PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" | 21 | PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" |
21 | 22 | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb new file mode 100644 index 00000000..075fd94c --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.5.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | ||
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.inc | ||
5 | |||
6 | SECTION = "libs" | ||
7 | |||
8 | AIEDIR ?= "${S}/driver" | ||
9 | S = "${WORKDIR}/git" | ||
10 | I = "${AIEDIR}/include" | ||
11 | |||
12 | COMPATIBLE_MACHINE = "^$" | ||
13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
15 | |||
16 | IOBACKENDS ?= "Linux" | ||
17 | |||
18 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
19 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
20 | |||
21 | PROVIDES = "libxaiengine" | ||
22 | RPROVIDES:${PN} = "libxaiengine" | ||
23 | |||
24 | # The makefile isn't ready for parallel execution at the moment | ||
25 | PARALLEL_MAKE = "-j 1" | ||
26 | |||
27 | CFLAGS += "-Wall -Wextra" | ||
28 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
30 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
31 | |||
32 | |||
33 | do_compile(){ | ||
34 | oe_runmake | ||
35 | } | ||
36 | |||
37 | do_install(){ | ||
38 | install -d ${D}${includedir} | ||
39 | install ${I}/*.h ${D}${includedir}/ | ||
40 | install -d ${D}${includedir}/xaiengine | ||
41 | install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/ | ||
42 | install -d ${D}${libdir} | ||
43 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | ||
44 | } | ||
45 | |||
46 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
47 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
48 | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc new file mode 100644 index 00000000..577ac963 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | SECTION = "libs" | ||
2 | |||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
4 | |||
5 | BRANCH ?= "xlnx_rel_v2024.1" | ||
6 | SRCREV ?= "d864f8eb4c509393696cf564bee11086744efcdb" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb new file mode 100644 index 00000000..5c479d05 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.6.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | ||
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.inc | ||
5 | |||
6 | SECTION = "devel" | ||
7 | |||
8 | XAIEFAL_DIR ?= "fal" | ||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | COMPATIBLE_MACHINE = "^$" | ||
12 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
13 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
14 | |||
15 | IOBACKENDS ?= "Linux" | ||
16 | |||
17 | PROVIDES = "aiefal" | ||
18 | ALLOW_EMPTY:${PN} = "1" | ||
19 | |||
20 | inherit pkgconfig cmake | ||
21 | |||
22 | DEPENDS = "libxaiengine" | ||
23 | |||
24 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
25 | |||
26 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON " | ||
27 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
28 | |||
29 | FILES:${PN}-demos = " \ | ||
30 | ${bindir}/* \ | ||
31 | " | ||
32 | |||
33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
34 | PACKAGE_ARCH:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-bsp/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/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 26a10677..9367fa2c 100644 --- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb | |||
@@ -23,7 +23,7 @@ inherit devicetree image-artifact-names | |||
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..28f997f2 --- /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 = "xlnx_rel_v2024.1" | ||
12 | SRCREV = "ec70363a2a878737057995f922a9460d18aafa26" | ||
13 | SOMAJOR = "1" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | |||
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..42e67ce6 --- /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 ?= "xlnx_rel_v2024.1" | ||
8 | REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https" | ||
9 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
10 | SRC_URI = "${REPO};${BRANCHARG}" | ||
11 | SRCREV = "c8275891ead62b3dfce68c00cf466715f0ac75f1" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
15 | COMPATIBLE_MACHINE:versal = "versal" | ||
16 | |||
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_2024.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb new file mode 100644 index 00000000..590d1755 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.1.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2024.1.inc | ||
3 | |||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | ||
5 | # bmp_logo.h | ||
6 | SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"' | ||
7 | |||
8 | # Default do_compile fails with: | ||
9 | # | error: object directory ../downloads/git2/github.com.Xilinx.u-boot-xlnx.git/objects does not exist; check .git/objects/info/alternates. | ||
10 | # The regular workaround of calling 'git diff' seems to be problematic. | ||
11 | do_compile () { | ||
12 | oe_runmake -C ${S} tools-only_defconfig O=${B} | ||
13 | |||
14 | # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and | ||
15 | # generating it requires bin2header tool, which for target build | ||
16 | # is built with target tools and thus cannot be executed on host. | ||
17 | sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config | ||
18 | |||
19 | oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B} | ||
20 | } | ||
21 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg new file mode 100644 index 00000000..033fb197 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-v2024.01/microblaze-generic.cfg | |||
@@ -0,0 +1,83 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | #........................................................................ | ||
4 | # WARNING | ||
5 | # | ||
6 | # This file is a u-boot configuration fragment, and not a full u-boot | ||
7 | # configuration file. The final u-boot configuration is made up of | ||
8 | # an assembly of processed fragments, each of which is designed to | ||
9 | # capture a specific part of the final configuration (e.g. platform | ||
10 | # configuration, feature configuration, and board specific hardware | ||
11 | # configuration). For more information on u-boot configuration, please | ||
12 | # refer the product documentation. | ||
13 | # | ||
14 | #....................................................................... | ||
15 | |||
16 | # | ||
17 | # Definitions for Generic Microbalze machine. | ||
18 | # | ||
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.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc index a7b1c9dc..2e761ebe 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.2.inc | |||
@@ -15,3 +15,9 @@ HAS_PLATFORM_INIT ?= " \ | |||
15 | " | 15 | " |
16 | 16 | ||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | 17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" |
18 | |||
19 | SRC_URI:append:microblaze = " file://microblaze-generic-top.h" | ||
20 | |||
21 | do_configure:prepend:microblaze () { | ||
22 | install ${WORKDIR}/microblaze-generic-top.h ${S}/include/configs/ | ||
23 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc new file mode 100644 index 00000000..b4ac7998 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.1.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2024.01" | ||
2 | |||
3 | UBRANCH = "xlnx_rebase_v2024.01" | ||
4 | |||
5 | SRCREV = "a64b554a4a7e0c540dd4fbb69bcf765a88d7359f" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
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 ac391c3c..985ca427 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb | |||
@@ -65,6 +65,7 @@ UBOOTPXE_CONFIG ?= "pxelinux.cfg" | |||
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-scr/boot.cmd.ubifs b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs index dca974ab..fde094cf 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.ubifs | |||
@@ -7,6 +7,10 @@ | |||
7 | 7 | ||
8 | for boot_target in ${boot_targets}; | 8 | for boot_target in ${boot_targets}; |
9 | do | 9 | do |
10 | echo "Trying to load boot images from ${boot_target}" | ||
11 | if test "${boot_target}" = "jtag" ; then | ||
12 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@ | ||
13 | fi | ||
10 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then | 14 | if test "${boot_target}" = "xspi0" || test "${boot_target}" = "qspi" || test "${boot_target}" = "qspi0"; then |
11 | ubifsls @@FIT_IMAGE@@ | 15 | ubifsls @@FIT_IMAGE@@ |
12 | if test $? = 0; then | 16 | if test $? = 0; then |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb index 228396eb..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_2024.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb new file mode 100644 index 00000000..718ad9d4 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.1.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | require u-boot-xlnx.inc | ||
3 | require u-boot-spl-zynq-init.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-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch index 6fb160e6..c6550801 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch | |||
@@ -18,11 +18,11 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com> | |||
18 | hw/mips/malta.c | 2 +- | 18 | hw/mips/malta.c | 2 +- |
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | 19 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 20 | ||
21 | diff --git a/hw/mips/malta.c b/hw/mips/malta.c | 21 | Index: qemu-8.0.0/hw/mips/malta.c |
22 | index 628851172..12d37f35d 100644 | 22 | =================================================================== |
23 | --- a/hw/mips/malta.c | 23 | --- qemu-8.0.0.orig/hw/mips/malta.c |
24 | +++ b/hw/mips/malta.c | 24 | +++ qemu-8.0.0/hw/mips/malta.c |
25 | @@ -61,7 +61,7 @@ | 25 | @@ -64,7 +64,7 @@ |
26 | #define ENVP_PADDR 0x2000 | 26 | #define ENVP_PADDR 0x2000 |
27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) | 27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) |
28 | #define ENVP_NB_ENTRIES 16 | 28 | #define ENVP_NB_ENTRIES 16 |
@@ -31,6 +31,3 @@ index 628851172..12d37f35d 100644 | |||
31 | 31 | ||
32 | /* Hardware addresses */ | 32 | /* Hardware addresses */ |
33 | #define FLASH_ADDRESS 0x1e000000ULL | 33 | #define FLASH_ADDRESS 0x1e000000ULL |
34 | -- | ||
35 | 2.30.2 | ||
36 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch new file mode 100644 index 00000000..ceae67be --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch | |||
@@ -0,0 +1,355 @@ | |||
1 | From 71f14902256e3c3529710b713e1ea43100bf4c40 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 17 Dec 2022 08:37:46 -0800 | ||
4 | Subject: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and | ||
5 | macros | ||
6 | |||
7 | Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions | ||
8 | anf macros behave same as their 64 suffixed counterparts. This also | ||
9 | helps in compiling with latest musl C library, where these macros and | ||
10 | functions are no more available under _GNU_SOURCE feature macro | ||
11 | |||
12 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg02841.html] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Cc: Laurent Vivier <laurent@vivier.eu> | ||
15 | --- | ||
16 | linux-user/syscall.c | 153 +++++++++++-------------------------------- | ||
17 | 1 file changed, 39 insertions(+), 114 deletions(-) | ||
18 | |||
19 | Index: qemu-8.0.0/linux-user/syscall.c | ||
20 | =================================================================== | ||
21 | --- qemu-8.0.0.orig/linux-user/syscall.c | ||
22 | +++ qemu-8.0.0/linux-user/syscall.c | ||
23 | @@ -761,8 +761,8 @@ safe_syscall6(ssize_t, copy_file_range, | ||
24 | */ | ||
25 | #define safe_ioctl(...) safe_syscall(__NR_ioctl, __VA_ARGS__) | ||
26 | /* Similarly for fcntl. Note that callers must always: | ||
27 | - * pass the F_GETLK64 etc constants rather than the unsuffixed F_GETLK | ||
28 | - * use the flock64 struct rather than unsuffixed flock | ||
29 | + * pass the F_GETLK etc constants rather than the unsuffixed F_GETLK | ||
30 | + * use the flock struct rather than unsuffixed flock | ||
31 | * This will then work and use a 64-bit offset for both 32-bit and 64-bit hosts. | ||
32 | */ | ||
33 | #ifdef __NR_fcntl64 | ||
34 | @@ -6813,13 +6813,13 @@ static int target_to_host_fcntl_cmd(int | ||
35 | ret = cmd; | ||
36 | break; | ||
37 | case TARGET_F_GETLK: | ||
38 | - ret = F_GETLK64; | ||
39 | + ret = F_GETLK; | ||
40 | break; | ||
41 | case TARGET_F_SETLK: | ||
42 | - ret = F_SETLK64; | ||
43 | + ret = F_SETLK; | ||
44 | break; | ||
45 | case TARGET_F_SETLKW: | ||
46 | - ret = F_SETLKW64; | ||
47 | + ret = F_SETLKW; | ||
48 | break; | ||
49 | case TARGET_F_GETOWN: | ||
50 | ret = F_GETOWN; | ||
51 | @@ -6833,17 +6833,6 @@ static int target_to_host_fcntl_cmd(int | ||
52 | case TARGET_F_SETSIG: | ||
53 | ret = F_SETSIG; | ||
54 | break; | ||
55 | -#if TARGET_ABI_BITS == 32 | ||
56 | - case TARGET_F_GETLK64: | ||
57 | - ret = F_GETLK64; | ||
58 | - break; | ||
59 | - case TARGET_F_SETLK64: | ||
60 | - ret = F_SETLK64; | ||
61 | - break; | ||
62 | - case TARGET_F_SETLKW64: | ||
63 | - ret = F_SETLKW64; | ||
64 | - break; | ||
65 | -#endif | ||
66 | case TARGET_F_SETLEASE: | ||
67 | ret = F_SETLEASE; | ||
68 | break; | ||
69 | @@ -6895,8 +6884,8 @@ static int target_to_host_fcntl_cmd(int | ||
70 | * them to 5, 6 and 7 before making the syscall(). Since we make the | ||
71 | * syscall directly, adjust to what is supported by the kernel. | ||
72 | */ | ||
73 | - if (ret >= F_GETLK64 && ret <= F_SETLKW64) { | ||
74 | - ret -= F_GETLK64 - 5; | ||
75 | + if (ret >= F_GETLK && ret <= F_SETLKW) { | ||
76 | + ret -= F_GETLK - 5; | ||
77 | } | ||
78 | #endif | ||
79 | |||
80 | @@ -6929,55 +6918,11 @@ static int host_to_target_flock(int type | ||
81 | return type; | ||
82 | } | ||
83 | |||
84 | -static inline abi_long copy_from_user_flock(struct flock64 *fl, | ||
85 | - abi_ulong target_flock_addr) | ||
86 | -{ | ||
87 | - struct target_flock *target_fl; | ||
88 | - int l_type; | ||
89 | - | ||
90 | - if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
91 | - return -TARGET_EFAULT; | ||
92 | - } | ||
93 | - | ||
94 | - __get_user(l_type, &target_fl->l_type); | ||
95 | - l_type = target_to_host_flock(l_type); | ||
96 | - if (l_type < 0) { | ||
97 | - return l_type; | ||
98 | - } | ||
99 | - fl->l_type = l_type; | ||
100 | - __get_user(fl->l_whence, &target_fl->l_whence); | ||
101 | - __get_user(fl->l_start, &target_fl->l_start); | ||
102 | - __get_user(fl->l_len, &target_fl->l_len); | ||
103 | - __get_user(fl->l_pid, &target_fl->l_pid); | ||
104 | - unlock_user_struct(target_fl, target_flock_addr, 0); | ||
105 | - return 0; | ||
106 | -} | ||
107 | - | ||
108 | -static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr, | ||
109 | - const struct flock64 *fl) | ||
110 | -{ | ||
111 | - struct target_flock *target_fl; | ||
112 | - short l_type; | ||
113 | - | ||
114 | - if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
115 | - return -TARGET_EFAULT; | ||
116 | - } | ||
117 | - | ||
118 | - l_type = host_to_target_flock(fl->l_type); | ||
119 | - __put_user(l_type, &target_fl->l_type); | ||
120 | - __put_user(fl->l_whence, &target_fl->l_whence); | ||
121 | - __put_user(fl->l_start, &target_fl->l_start); | ||
122 | - __put_user(fl->l_len, &target_fl->l_len); | ||
123 | - __put_user(fl->l_pid, &target_fl->l_pid); | ||
124 | - unlock_user_struct(target_fl, target_flock_addr, 1); | ||
125 | - return 0; | ||
126 | -} | ||
127 | - | ||
128 | -typedef abi_long from_flock64_fn(struct flock64 *fl, abi_ulong target_addr); | ||
129 | -typedef abi_long to_flock64_fn(abi_ulong target_addr, const struct flock64 *fl); | ||
130 | +typedef abi_long from_flock_fn(struct flock *fl, abi_ulong target_addr); | ||
131 | +typedef abi_long to_flock_fn(abi_ulong target_addr, const struct flock *fl); | ||
132 | |||
133 | #if defined(TARGET_ARM) && TARGET_ABI_BITS == 32 | ||
134 | -struct target_oabi_flock64 { | ||
135 | +struct target_oabi_flock { | ||
136 | abi_short l_type; | ||
137 | abi_short l_whence; | ||
138 | abi_llong l_start; | ||
139 | @@ -6985,10 +6930,10 @@ struct target_oabi_flock64 { | ||
140 | abi_int l_pid; | ||
141 | } QEMU_PACKED; | ||
142 | |||
143 | -static inline abi_long copy_from_user_oabi_flock64(struct flock64 *fl, | ||
144 | +static inline abi_long copy_from_user_oabi_flock(struct flock *fl, | ||
145 | abi_ulong target_flock_addr) | ||
146 | { | ||
147 | - struct target_oabi_flock64 *target_fl; | ||
148 | + struct target_oabi_flock *target_fl; | ||
149 | int l_type; | ||
150 | |||
151 | if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
152 | @@ -7009,10 +6954,10 @@ static inline abi_long copy_from_user_oa | ||
153 | return 0; | ||
154 | } | ||
155 | |||
156 | -static inline abi_long copy_to_user_oabi_flock64(abi_ulong target_flock_addr, | ||
157 | - const struct flock64 *fl) | ||
158 | +static inline abi_long copy_to_user_oabi_flock(abi_ulong target_flock_addr, | ||
159 | + const struct flock *fl) | ||
160 | { | ||
161 | - struct target_oabi_flock64 *target_fl; | ||
162 | + struct target_oabi_flock *target_fl; | ||
163 | short l_type; | ||
164 | |||
165 | if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
166 | @@ -7030,10 +6975,10 @@ static inline abi_long copy_to_user_oabi | ||
167 | } | ||
168 | #endif | ||
169 | |||
170 | -static inline abi_long copy_from_user_flock64(struct flock64 *fl, | ||
171 | +static inline abi_long copy_from_user_flock(struct flock *fl, | ||
172 | abi_ulong target_flock_addr) | ||
173 | { | ||
174 | - struct target_flock64 *target_fl; | ||
175 | + struct target_flock *target_fl; | ||
176 | int l_type; | ||
177 | |||
178 | if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) { | ||
179 | @@ -7054,10 +6999,10 @@ static inline abi_long copy_from_user_fl | ||
180 | return 0; | ||
181 | } | ||
182 | |||
183 | -static inline abi_long copy_to_user_flock64(abi_ulong target_flock_addr, | ||
184 | - const struct flock64 *fl) | ||
185 | +static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr, | ||
186 | + const struct flock *fl) | ||
187 | { | ||
188 | - struct target_flock64 *target_fl; | ||
189 | + struct target_flock *target_fl; | ||
190 | short l_type; | ||
191 | |||
192 | if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) { | ||
193 | @@ -7076,7 +7021,7 @@ static inline abi_long copy_to_user_floc | ||
194 | |||
195 | static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) | ||
196 | { | ||
197 | - struct flock64 fl64; | ||
198 | + struct flock fl64; | ||
199 | #ifdef F_GETOWN_EX | ||
200 | struct f_owner_ex fox; | ||
201 | struct target_f_owner_ex *target_fox; | ||
202 | @@ -7089,6 +7034,7 @@ static abi_long do_fcntl(int fd, int cmd | ||
203 | |||
204 | switch(cmd) { | ||
205 | case TARGET_F_GETLK: | ||
206 | + case TARGET_F_OFD_GETLK: | ||
207 | ret = copy_from_user_flock(&fl64, arg); | ||
208 | if (ret) { | ||
209 | return ret; | ||
210 | @@ -7098,32 +7044,11 @@ static abi_long do_fcntl(int fd, int cmd | ||
211 | ret = copy_to_user_flock(arg, &fl64); | ||
212 | } | ||
213 | break; | ||
214 | - | ||
215 | case TARGET_F_SETLK: | ||
216 | case TARGET_F_SETLKW: | ||
217 | - ret = copy_from_user_flock(&fl64, arg); | ||
218 | - if (ret) { | ||
219 | - return ret; | ||
220 | - } | ||
221 | - ret = get_errno(safe_fcntl(fd, host_cmd, &fl64)); | ||
222 | - break; | ||
223 | - | ||
224 | - case TARGET_F_GETLK64: | ||
225 | - case TARGET_F_OFD_GETLK: | ||
226 | - ret = copy_from_user_flock64(&fl64, arg); | ||
227 | - if (ret) { | ||
228 | - return ret; | ||
229 | - } | ||
230 | - ret = get_errno(safe_fcntl(fd, host_cmd, &fl64)); | ||
231 | - if (ret == 0) { | ||
232 | - ret = copy_to_user_flock64(arg, &fl64); | ||
233 | - } | ||
234 | - break; | ||
235 | - case TARGET_F_SETLK64: | ||
236 | - case TARGET_F_SETLKW64: | ||
237 | case TARGET_F_OFD_SETLK: | ||
238 | case TARGET_F_OFD_SETLKW: | ||
239 | - ret = copy_from_user_flock64(&fl64, arg); | ||
240 | + ret = copy_from_user_flock(&fl64, arg); | ||
241 | if (ret) { | ||
242 | return ret; | ||
243 | } | ||
244 | @@ -7348,7 +7273,7 @@ static inline abi_long target_truncate64 | ||
245 | arg2 = arg3; | ||
246 | arg3 = arg4; | ||
247 | } | ||
248 | - return get_errno(truncate64(arg1, target_offset64(arg2, arg3))); | ||
249 | + return get_errno(truncate(arg1, target_offset64(arg2, arg3))); | ||
250 | } | ||
251 | #endif | ||
252 | |||
253 | @@ -7362,7 +7287,7 @@ static inline abi_long target_ftruncate6 | ||
254 | arg2 = arg3; | ||
255 | arg3 = arg4; | ||
256 | } | ||
257 | - return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3))); | ||
258 | + return get_errno(ftruncate(arg1, target_offset64(arg2, arg3))); | ||
259 | } | ||
260 | #endif | ||
261 | |||
262 | @@ -8598,7 +8523,7 @@ static int do_getdents(abi_long dirfd, a | ||
263 | void *tdirp; | ||
264 | int hlen, hoff, toff; | ||
265 | int hreclen, treclen; | ||
266 | - off64_t prev_diroff = 0; | ||
267 | + off_t prev_diroff = 0; | ||
268 | |||
269 | hdirp = g_try_malloc(count); | ||
270 | if (!hdirp) { | ||
271 | @@ -8651,7 +8576,7 @@ static int do_getdents(abi_long dirfd, a | ||
272 | * Return what we have, resetting the file pointer to the | ||
273 | * location of the first record not returned. | ||
274 | */ | ||
275 | - lseek64(dirfd, prev_diroff, SEEK_SET); | ||
276 | + lseek(dirfd, prev_diroff, SEEK_SET); | ||
277 | break; | ||
278 | } | ||
279 | |||
280 | @@ -8685,7 +8610,7 @@ static int do_getdents64(abi_long dirfd, | ||
281 | void *tdirp; | ||
282 | int hlen, hoff, toff; | ||
283 | int hreclen, treclen; | ||
284 | - off64_t prev_diroff = 0; | ||
285 | + off_t prev_diroff = 0; | ||
286 | |||
287 | hdirp = g_try_malloc(count); | ||
288 | if (!hdirp) { | ||
289 | @@ -8727,7 +8652,7 @@ static int do_getdents64(abi_long dirfd, | ||
290 | * Return what we have, resetting the file pointer to the | ||
291 | * location of the first record not returned. | ||
292 | */ | ||
293 | - lseek64(dirfd, prev_diroff, SEEK_SET); | ||
294 | + lseek(dirfd, prev_diroff, SEEK_SET); | ||
295 | break; | ||
296 | } | ||
297 | |||
298 | @@ -11158,7 +11083,7 @@ static abi_long do_syscall1(CPUArchState | ||
299 | return -TARGET_EFAULT; | ||
300 | } | ||
301 | } | ||
302 | - ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
303 | + ret = get_errno(pread(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
304 | unlock_user(p, arg2, ret); | ||
305 | return ret; | ||
306 | case TARGET_NR_pwrite64: | ||
307 | @@ -11175,7 +11100,7 @@ static abi_long do_syscall1(CPUArchState | ||
308 | return -TARGET_EFAULT; | ||
309 | } | ||
310 | } | ||
311 | - ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
312 | + ret = get_errno(pwrite(arg1, p, arg3, target_offset64(arg4, arg5))); | ||
313 | unlock_user(p, arg2, 0); | ||
314 | return ret; | ||
315 | #endif | ||
316 | @@ -11998,14 +11923,14 @@ static abi_long do_syscall1(CPUArchState | ||
317 | case TARGET_NR_fcntl64: | ||
318 | { | ||
319 | int cmd; | ||
320 | - struct flock64 fl; | ||
321 | - from_flock64_fn *copyfrom = copy_from_user_flock64; | ||
322 | - to_flock64_fn *copyto = copy_to_user_flock64; | ||
323 | + struct flock fl; | ||
324 | + from_flock_fn *copyfrom = copy_from_user_flock; | ||
325 | + to_flock_fn *copyto = copy_to_user_flock; | ||
326 | |||
327 | #ifdef TARGET_ARM | ||
328 | if (!cpu_env->eabi) { | ||
329 | - copyfrom = copy_from_user_oabi_flock64; | ||
330 | - copyto = copy_to_user_oabi_flock64; | ||
331 | + copyfrom = copy_from_user_oabi_flock; | ||
332 | + copyto = copy_to_user_oabi_flock; | ||
333 | } | ||
334 | #endif | ||
335 | |||
336 | @@ -12015,7 +11940,7 @@ static abi_long do_syscall1(CPUArchState | ||
337 | } | ||
338 | |||
339 | switch(arg2) { | ||
340 | - case TARGET_F_GETLK64: | ||
341 | + case TARGET_F_GETLK: | ||
342 | ret = copyfrom(&fl, arg3); | ||
343 | if (ret) { | ||
344 | break; | ||
345 | @@ -12026,8 +11951,8 @@ static abi_long do_syscall1(CPUArchState | ||
346 | } | ||
347 | break; | ||
348 | |||
349 | - case TARGET_F_SETLK64: | ||
350 | - case TARGET_F_SETLKW64: | ||
351 | + case TARGET_F_SETLK: | ||
352 | + case TARGET_F_SETLKW: | ||
353 | ret = copyfrom(&fl, arg3); | ||
354 | if (ret) { | ||
355 | break; | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch index f350ffce..e85f8202 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
29 | hw/intc/apic.c | 2 +- | 29 | hw/intc/apic.c | 2 +- |
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | 30 | 1 file changed, 1 insertion(+), 1 deletion(-) |
31 | 31 | ||
32 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c | 32 | Index: qemu-8.0.0/hw/intc/apic.c |
33 | index 3df11c34d..9506c88ce 100644 | 33 | =================================================================== |
34 | --- a/hw/intc/apic.c | 34 | --- qemu-8.0.0.orig/hw/intc/apic.c |
35 | +++ b/hw/intc/apic.c | 35 | +++ qemu-8.0.0/hw/intc/apic.c |
36 | @@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev) | 36 | @@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de |
37 | APICCommonState *s = APIC(dev); | 37 | APICCommonState *s = APIC(dev); |
38 | uint32_t lvt0; | 38 | uint32_t lvt0; |
39 | 39 | ||
@@ -42,6 +42,3 @@ index 3df11c34d..9506c88ce 100644 | |||
42 | return -1; | 42 | return -1; |
43 | 43 | ||
44 | lvt0 = s->lvt[APIC_LVT_LINT0]; | 44 | lvt0 = s->lvt[APIC_LVT_LINT0]; |
45 | -- | ||
46 | 2.30.2 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch index 6faebd4e..f981a64a 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | |||
@@ -14,19 +14,16 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
14 | meson.build | 2 +- | 14 | meson.build | 2 +- |
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/meson.build b/meson.build | 17 | Index: qemu-8.1.0/meson.build |
18 | index 861de93c4..d45ff2d7c 100644 | 18 | =================================================================== |
19 | --- a/meson.build | 19 | --- qemu-8.1.0.orig/meson.build |
20 | +++ b/meson.build | 20 | +++ qemu-8.1.0/meson.build |
21 | @@ -1063,7 +1063,7 @@ endif | 21 | @@ -1481,7 +1481,7 @@ endif |
22 | if not gnutls_crypto.found() | 22 | if not gnutls_crypto.found() |
23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() | 23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() |
24 | gcrypt = dependency('libgcrypt', version: '>=1.8', | 24 | gcrypt = dependency('libgcrypt', version: '>=1.8', |
25 | - method: 'config-tool', | 25 | - method: 'config-tool', |
26 | + method: 'pkg-config', | 26 | + method: 'pkg-config', |
27 | required: get_option('gcrypt'), | 27 | required: get_option('gcrypt')) |
28 | kwargs: static_kwargs) | ||
29 | # Debian has removed -lgpg-error from libgcrypt-config | 28 | # Debian has removed -lgpg-error from libgcrypt-config |
30 | -- | 29 | # as it "spreads unnecessary dependencies" which in |
31 | 2.30.2 | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch index 3f3c39f9..38aa4c3b 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch | |||
@@ -16,11 +16,11 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | |||
16 | linux-user/syscall.c | 2 ++ | 16 | linux-user/syscall.c | 2 ++ |
17 | 1 file changed, 2 insertions(+) | 17 | 1 file changed, 2 insertions(+) |
18 | 18 | ||
19 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c | 19 | Index: qemu-8.0.0/linux-user/syscall.c |
20 | index f65045efe..340e0c6f0 100644 | 20 | =================================================================== |
21 | --- a/linux-user/syscall.c | 21 | --- qemu-8.0.0.orig/linux-user/syscall.c |
22 | +++ b/linux-user/syscall.c | 22 | +++ qemu-8.0.0/linux-user/syscall.c |
23 | @@ -113,7 +113,9 @@ | 23 | @@ -115,7 +115,9 @@ |
24 | #include <linux/blkpg.h> | 24 | #include <linux/blkpg.h> |
25 | #include <netpacket/packet.h> | 25 | #include <netpacket/packet.h> |
26 | #include <linux/netlink.h> | 26 | #include <linux/netlink.h> |
@@ -30,6 +30,3 @@ index f65045efe..340e0c6f0 100644 | |||
30 | #include <linux/rtc.h> | 30 | #include <linux/rtc.h> |
31 | #include <sound/asound.h> | 31 | #include <sound/asound.h> |
32 | #ifdef HAVE_BTRFS_H | 32 | #ifdef HAVE_BTRFS_H |
33 | -- | ||
34 | 2.30.2 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch index 75c03693..5d1d7c68 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch | |||
@@ -23,11 +23,11 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org | |||
23 | linux-user/mmap.c | 10 +++++++--- | 23 | linux-user/mmap.c | 10 +++++++--- |
24 | 1 file changed, 7 insertions(+), 3 deletions(-) | 24 | 1 file changed, 7 insertions(+), 3 deletions(-) |
25 | 25 | ||
26 | diff --git a/linux-user/mmap.c b/linux-user/mmap.c | 26 | Index: qemu-8.0.0/linux-user/mmap.c |
27 | index c125031b9..e651834a5 100644 | 27 | =================================================================== |
28 | --- a/linux-user/mmap.c | 28 | --- qemu-8.0.0.orig/linux-user/mmap.c |
29 | +++ b/linux-user/mmap.c | 29 | +++ qemu-8.0.0/linux-user/mmap.c |
30 | @@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, | 30 | @@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add |
31 | int prot; | 31 | int prot; |
32 | void *host_addr; | 32 | void *host_addr; |
33 | 33 | ||
@@ -47,6 +47,3 @@ index c125031b9..e651834a5 100644 | |||
47 | return -1; | 47 | return -1; |
48 | } | 48 | } |
49 | 49 | ||
50 | -- | ||
51 | 2.30.2 | ||
52 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch index 0d7dae36..d3f965e0 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch | |||
@@ -16,10 +16,10 @@ RP 2021/3/1 | |||
16 | scripts/decodetree.py | 2 +- | 16 | scripts/decodetree.py | 2 +- |
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
18 | 18 | ||
19 | diff --git a/scripts/decodetree.py b/scripts/decodetree.py | 19 | Index: qemu-8.0.0/scripts/decodetree.py |
20 | index a03dc6b5e..4ea24c1f3 100644 | 20 | =================================================================== |
21 | --- a/scripts/decodetree.py | 21 | --- qemu-8.0.0.orig/scripts/decodetree.py |
22 | +++ b/scripts/decodetree.py | 22 | +++ qemu-8.0.0/scripts/decodetree.py |
23 | @@ -1328,7 +1328,7 @@ def main(): | 23 | @@ -1328,7 +1328,7 @@ def main(): |
24 | toppat = ExcMultiPattern(0) | 24 | toppat = ExcMultiPattern(0) |
25 | 25 | ||
@@ -29,6 +29,3 @@ index a03dc6b5e..4ea24c1f3 100644 | |||
29 | f = open(filename, 'rt', encoding='utf-8') | 29 | f = open(filename, 'rt', encoding='utf-8') |
30 | parse_file(f, toppat) | 30 | parse_file(f, toppat) |
31 | f.close() | 31 | f.close() |
32 | -- | ||
33 | 2.30.2 | ||
34 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch index 43d3c7cf..a84364cc 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch | |||
@@ -17,22 +17,25 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> | |||
17 | tests/unit/meson.build | 4 ++-- | 17 | tests/unit/meson.build | 4 ++-- |
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | 18 | 1 file changed, 2 insertions(+), 2 deletions(-) |
19 | 19 | ||
20 | diff --git a/tests/unit/meson.build b/tests/unit/meson.build | 20 | Index: qemu-8.0.0/tests/unit/meson.build |
21 | index 96b295263..e4c3246dc 100644 | 21 | =================================================================== |
22 | --- a/tests/unit/meson.build | 22 | --- qemu-8.0.0.orig/tests/unit/meson.build |
23 | +++ b/tests/unit/meson.build | 23 | +++ qemu-8.0.0/tests/unit/meson.build |
24 | @@ -44,9 +44,9 @@ tests = { | 24 | @@ -46,7 +46,7 @@ tests = { |
25 | 'test-keyval': [testqapi], | 25 | 'test-keyval': [testqapi], |
26 | 'test-logging': [], | 26 | 'test-logging': [], |
27 | 'test-uuid': [], | 27 | 'test-uuid': [], |
28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], | 28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], |
29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], | 29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], |
30 | 'test-qapi-util': [], | 30 | 'test-qapi-util': [], |
31 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], | 31 | 'test-interval-tree': [], |
32 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | 32 | 'test-xs-node': [qom], |
33 | } | 33 | @@ -136,7 +136,7 @@ if have_system |
34 | 34 | 'test-util-sockets': ['socket-helpers.c'], | |
35 | if have_system or have_tools | 35 | 'test-base64': [], |
36 | -- | 36 | 'test-bufferiszero': [], |
37 | 2.30.2 | 37 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], |
38 | 38 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | |
39 | 'test-vmstate': [migration, io], | ||
40 | 'test-yank': ['socket-helpers.c', qom, io, chardev] | ||
41 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch index 23d0a698..4de6cc24 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | |||
@@ -18,10 +18,10 @@ Cc: Michael S. Tsirkin <mst@redhat.com> | |||
18 | util/mmap-alloc.c | 10 +++++++--- | 18 | util/mmap-alloc.c | 10 +++++++--- |
19 | 1 file changed, 7 insertions(+), 3 deletions(-) | 19 | 1 file changed, 7 insertions(+), 3 deletions(-) |
20 | 20 | ||
21 | diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c | 21 | Index: qemu-8.0.0/util/mmap-alloc.c |
22 | index 893d86435..86d3cda24 100644 | 22 | =================================================================== |
23 | --- a/util/mmap-alloc.c | 23 | --- qemu-8.0.0.orig/util/mmap-alloc.c |
24 | +++ b/util/mmap-alloc.c | 24 | +++ qemu-8.0.0/util/mmap-alloc.c |
25 | @@ -10,14 +10,18 @@ | 25 | @@ -10,14 +10,18 @@ |
26 | * later. See the COPYING file in the top-level directory. | 26 | * later. See the COPYING file in the top-level directory. |
27 | */ | 27 | */ |
@@ -44,6 +44,3 @@ index 893d86435..86d3cda24 100644 | |||
44 | #include "qemu/mmap-alloc.h" | 44 | #include "qemu/mmap-alloc.h" |
45 | #include "qemu/host-utils.h" | 45 | #include "qemu/host-utils.h" |
46 | #include "qemu/cutils.h" | 46 | #include "qemu/cutils.h" |
47 | -- | ||
48 | 2.30.2 | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch index 810c74fa..6caf35b6 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch | |||
@@ -21,13 +21,13 @@ Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | |||
21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ | 21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ |
22 | 1 file changed, 6 insertions(+) | 22 | 1 file changed, 6 insertions(+) |
23 | 23 | ||
24 | diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c | 24 | Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c |
25 | index da7ddfa548..89db963c46 100644 | 25 | =================================================================== |
26 | --- a/hw/rdma/vmw/pvrdma_cmd.c | 26 | --- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c |
27 | +++ b/hw/rdma/vmw/pvrdma_cmd.c | 27 | +++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c |
28 | @@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) | 28 | @@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) |
29 | 29 | goto out; | |
30 | dsr_info = &dev->dsr_info; | 30 | } |
31 | 31 | ||
32 | + if (!dsr_info->dsr) { | 32 | + if (!dsr_info->dsr) { |
33 | + /* Buggy or malicious guest driver */ | 33 | + /* Buggy or malicious guest driver */ |
@@ -38,6 +38,3 @@ index da7ddfa548..89db963c46 100644 | |||
38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / | 38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / |
39 | sizeof(struct cmd_handler)) { | 39 | sizeof(struct cmd_handler)) { |
40 | rdma_error_report("Unsupported command"); | 40 | rdma_error_report("Unsupported command"); |
41 | -- | ||
42 | 2.34.1 | ||
43 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch index ca2ad361..112eb925 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch | |||
@@ -14,19 +14,19 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | |||
14 | configure | 4 ---- | 14 | configure | 4 ---- |
15 | 1 file changed, 4 deletions(-) | 15 | 1 file changed, 4 deletions(-) |
16 | 16 | ||
17 | Index: qemu-7.1.0/configure | 17 | Index: qemu-8.0.0/configure |
18 | =================================================================== | 18 | =================================================================== |
19 | --- qemu-7.1.0.orig/configure | 19 | --- qemu-8.0.0.orig/configure |
20 | +++ qemu-7.1.0/configure | 20 | +++ qemu-8.0.0/configure |
21 | @@ -2710,7 +2710,6 @@ if test "$skip_meson" = no; then | 21 | @@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then |
22 | echo "strip = [$(meson_quote $strip)]" >> $cross | ||
23 | echo "widl = [$(meson_quote $widl)]" >> $cross | 22 | echo "widl = [$(meson_quote $widl)]" >> $cross |
24 | echo "windres = [$(meson_quote $windres)]" >> $cross | 23 | echo "windres = [$(meson_quote $windres)]" >> $cross |
24 | echo "windmc = [$(meson_quote $windmc)]" >> $cross | ||
25 | - if test "$cross_compile" = "yes"; then | 25 | - if test "$cross_compile" = "yes"; then |
26 | cross_arg="--cross-file config-meson.cross" | 26 | cross_arg="--cross-file config-meson.cross" |
27 | echo "[host_machine]" >> $cross | 27 | echo "[host_machine]" >> $cross |
28 | echo "system = '$targetos'" >> $cross | 28 | echo "system = '$targetos'" >> $cross |
29 | @@ -2728,9 +2727,6 @@ if test "$skip_meson" = no; then | 29 | @@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then |
30 | else | 30 | else |
31 | echo "endian = 'little'" >> $cross | 31 | echo "endian = 'little'" >> $cross |
32 | fi | 32 | fi |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch new file mode 100644 index 00000000..0cbaea07 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch | |||
@@ -0,0 +1,20 @@ | |||
1 | Upstream-Status: Inappropriate [workaround, would need a real fix for upstream] | ||
2 | |||
3 | Index: qemu-8.1.0/configure | ||
4 | =================================================================== | ||
5 | --- qemu-8.1.0.orig/configure | ||
6 | +++ qemu-8.1.0/configure | ||
7 | @@ -1032,12 +1032,7 @@ then | ||
8 | exit 1 | ||
9 | fi | ||
10 | |||
11 | -# At this point, we expect Meson to be installed and available. | ||
12 | -# We expect mkvenv or pip to have created pyvenv/bin/meson for us. | ||
13 | -# We ignore PATH completely here: we want to use the venv's Meson | ||
14 | -# *exclusively*. | ||
15 | - | ||
16 | -meson="$(cd pyvenv/bin; pwd)/meson" | ||
17 | +meson=`which meson` | ||
18 | |||
19 | # Conditionally ensure Sphinx is installed. | ||
20 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch new file mode 100644 index 00000000..01546d10 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Patch to fix mips boot hangs where virtio appears broken. Patch under discussion upstream. | ||
2 | Regression is introduced by other fixes to 8.1.0 to get x86 boots working. | ||
3 | |||
4 | Upstream-Status: Pending [https://lore.kernel.org/qemu-devel/6c956b90-5a13-db96-9c02-9834a512fe6f@linaro.org/] | ||
5 | |||
6 | Index: qemu-8.1.0/softmmu/physmem.c | ||
7 | =================================================================== | ||
8 | --- qemu-8.1.0.orig/softmmu/physmem.c | ||
9 | +++ qemu-8.1.0/softmmu/physmem.c | ||
10 | @@ -2517,7 +2517,7 @@ static void tcg_commit(MemoryListener *l | ||
11 | * That said, the listener is also called during realize, before | ||
12 | * all of the tcg machinery for run-on is initialized: thus halt_cond. | ||
13 | */ | ||
14 | - if (cpu->halt_cond) { | ||
15 | + if (cpu->halt_cond && !qemu_cpu_is_self(cpu)) { | ||
16 | async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas)); | ||
17 | } else { | ||
18 | tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas)); | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch new file mode 100644 index 00000000..09e13e8b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | qemu: Ensure pip and the python venv aren't used for meson | ||
2 | |||
3 | Qemu wants to use a supported python version and a specific meson version | ||
4 | to "help" users and uses pip and creates a venv to do this. This is a nightmare | ||
5 | for us. Our versions stay up to date and should be supported so we don't | ||
6 | really need/want this wrapping. Tweak things to disable it. | ||
7 | |||
8 | There was breakage from the wrapper shown by: | ||
9 | |||
10 | bitbake qemu-system-native | ||
11 | <add DISTRO_FEATURES:remove = "opengl" to local.conf> | ||
12 | bitbake qemu-system-native -c configure | ||
13 | |||
14 | which would crash. The issue is the change in configuration removes pieces | ||
15 | from the sysroot but pyc files remainm as do pieces of pip which causes | ||
16 | problems. | ||
17 | |||
18 | Ideally we'd convince upstream to allow some way to disable the venv on | ||
19 | the understanding that if/when it breaks, we keep the pieces. The patch | ||
20 | as it stands is a workaround. | ||
21 | |||
22 | Upstream-Status: Inappropriate [oe specific] | ||
23 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
24 | |||
25 | Index: qemu-8.1.2/configure | ||
26 | =================================================================== | ||
27 | --- qemu-8.1.2.orig/configure | ||
28 | +++ qemu-8.1.2/configure | ||
29 | @@ -1009,7 +1009,7 @@ python="$(command -v "$python")" | ||
30 | echo "python determined to be '$python'" | ||
31 | echo "python version: $($python --version)" | ||
32 | |||
33 | -python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)" | ||
34 | +python=python3 | ||
35 | if test "$?" -ne 0 ; then | ||
36 | error_exit "python venv creation failed" | ||
37 | fi | ||
38 | @@ -1017,6 +1017,7 @@ fi | ||
39 | # Suppress writing compiled files | ||
40 | python="$python -B" | ||
41 | mkvenv="$python ${source_path}/python/scripts/mkvenv.py" | ||
42 | +mkvenv=true | ||
43 | |||
44 | mkvenv_flags="" | ||
45 | if test "$download" = "enabled" ; then | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin index c4044296..c4044296 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin | |||
Binary files differ | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init new file mode 100644 index 00000000..5ebaadde --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init | |||
@@ -0,0 +1,75 @@ | |||
1 | # SPDX-License-Identifier: GPL-2.0-only | ||
2 | # Initially written by: Michael Tokarev <mjt@tls.msk.ru> | ||
3 | # For QEMU Debian downstream package | ||
4 | |||
5 | set -e | ||
6 | |||
7 | . /etc/init.d/functions | ||
8 | |||
9 | PATH=/sbin:/usr/sbin:/bin:/usr/bin | ||
10 | DESC="QEMU Guest Agent" | ||
11 | NAME=qemu-ga | ||
12 | DAEMON=@bindir@/$NAME | ||
13 | PIDFILE=/var/run/$NAME.pid | ||
14 | |||
15 | # config | ||
16 | DAEMON_ARGS="" | ||
17 | # default transport | ||
18 | TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0 | ||
19 | NO_START=0 | ||
20 | |||
21 | test ! -r /etc/default/qemu-guest-agent || . /etc/default/qemu-guest-agent | ||
22 | test "$NO_START" = "0" || exit 0 | ||
23 | test -x "$DAEMON" || exit 0 | ||
24 | |||
25 | # | ||
26 | # Function that checks whenever system has necessary environment | ||
27 | # It also splits $TRANSPORT into $method and $path | ||
28 | # | ||
29 | do_check_transport() { | ||
30 | method=${TRANSPORT%%:*}; | ||
31 | path=${TRANSPORT#*:} | ||
32 | case "$method" in | ||
33 | virtio-serial | isa-serial) | ||
34 | if [ ! -e "$path" ]; then | ||
35 | echo "$NAME: transport endpoint not found, not starting" | ||
36 | return 1 | ||
37 | fi | ||
38 | ;; | ||
39 | esac | ||
40 | } | ||
41 | |||
42 | case "$1" in | ||
43 | start) | ||
44 | do_check_transport || exit 0 | ||
45 | echo -n "Starting $DESC: " | ||
46 | start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \ | ||
47 | $DAEMON_ARGS -d -m "$method" -p "$path" | ||
48 | echo "$NAME." | ||
49 | ;; | ||
50 | stop) | ||
51 | echo -n "Stopping $DESC: " | ||
52 | start-stop-daemon -K -x "$DAEMON" -p $PIDFILE | ||
53 | echo "$NAME." | ||
54 | ;; | ||
55 | status) | ||
56 | status "$DAEMON" | ||
57 | exit $? | ||
58 | ;; | ||
59 | restart|force-reload) | ||
60 | do_check_transport || exit 0 | ||
61 | echo -n "Restarting $DESC: " | ||
62 | start-stop-daemon -K -x "$DAEMON" -p $PIDFILE | ||
63 | sleep 1 | ||
64 | start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \ | ||
65 | $DAEMON_ARGS -d -m "$method" -p "$path" | ||
66 | echo "$NAME." | ||
67 | ;; | ||
68 | *) | ||
69 | N=/etc/init.d/$NAME | ||
70 | echo "Usage: $N {start|stop|status|restart|force-reload}" >&2 | ||
71 | exit 1 | ||
72 | ;; | ||
73 | esac | ||
74 | |||
75 | exit 0 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev new file mode 100644 index 00000000..47097057 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev | |||
@@ -0,0 +1,2 @@ | |||
1 | SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \ | ||
2 | TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest index f9a4e8fb..f9a4e8fb 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb deleted file mode 100644 index 7c734cd6..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.1" | ||
5 | SRCREV ?= "0499324af1178057c3730b0989c8fb5c5bbc4cf8" | ||
6 | |||
7 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
8 | SRC_URI:append = " file://0001-Makefile-Use-python3-instead-of-python.patch" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb deleted file mode 100644 index 6675ba3e..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.2" | ||
5 | SRCREV ?= "cf5d357e16c13ac447861f908e83951ffb7b4301" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb deleted file mode 100644 index dc1feda4..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2023.1" | ||
5 | SRCREV ?= "56538937584f527fb408347c3b430142e74723e8" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb deleted file mode 100644 index d41743c1..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2023.2" | ||
5 | SRCREV ?= "d1013382d9a5ef816cd020e7840813b7a2d65c51" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb new file mode 100644 index 00000000..d10504d3 --- /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 ?= "xlnx_rel_v2024.1" | ||
5 | SRCREV ?= "b9c88cbfaaa0c8b8be70ea3c74f4cb69fb02a080" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc new file mode 100644 index 00000000..22fa9685 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | require qemu-8.1.inc | ||
2 | |||
3 | inherit native | ||
4 | |||
5 | EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'" | ||
6 | |||
7 | LDFLAGS:append = " -fuse-ld=bfd" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc new file mode 100644 index 00000000..24f9a039 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc | |||
@@ -0,0 +1,28 @@ | |||
1 | # possible arch values are: | ||
2 | # aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze | ||
3 | # mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb | ||
4 | # riscv32 riscv64 sparc sparc32 sparc32plus | ||
5 | |||
6 | def get_qemu_target_list(d): | ||
7 | import bb | ||
8 | archs = d.getVar('QEMU_TARGETS').split() | ||
9 | tos = d.getVar('HOST_OS') | ||
10 | softmmuonly = "" | ||
11 | for arch in ['ppcemb', 'lm32']: | ||
12 | if arch in archs: | ||
13 | softmmuonly += arch + "-softmmu," | ||
14 | archs.remove(arch) | ||
15 | linuxuseronly = "" | ||
16 | for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 'aarch64_be']: | ||
17 | if arch in archs: | ||
18 | linuxuseronly += arch + "-linux-user," | ||
19 | archs.remove(arch) | ||
20 | if 'linux' not in tos: | ||
21 | return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',') | ||
22 | return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',') | ||
23 | |||
24 | def get_qemu_usermode_target_list(d): | ||
25 | return ",".join(filter(lambda i: "-linux-user" in i, get_qemu_target_list(d).split(','))) | ||
26 | |||
27 | def get_qemu_system_target_list(d): | ||
28 | return ",".join(filter(lambda i: "-linux-user" not in i, get_qemu_target_list(d).split(','))) | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc deleted file mode 100644 index bb8fac70..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc deleted file mode 100644 index bb8fac70..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc deleted file mode 100644 index 06ac05a1..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | XILINX_QEMU_VERSION = "v7.1.0" | ||
2 | BRANCH = "xlnx_rel_v2023.1" | ||
3 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc deleted file mode 100644 index db6e1528..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | XILINX_QEMU_VERSION = "v7.1.0" | ||
2 | BRANCH = "xlnx_rel_v2023.2" | ||
3 | SRCREV = "23b643ba1683a47ef49447a45643fe2172d6f8ca" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc new file mode 100644 index 00000000..d48350b2 --- /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 = "xlnx_rel_v2024.1" | ||
3 | SRCREV = "2319c870e754148ec3b9d40be0d3dbee959c3251" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch deleted file mode 100644 index 6c85a77b..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | CVE: CVE-2022-2962 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From 5c5c50b0a73d78ffe18336c9996fef5eae9bbbb0 Mon Sep 17 00:00:00 2001 | ||
6 | From: Zheyu Ma <zheyuma97@gmail.com> | ||
7 | Date: Sun, 21 Aug 2022 20:43:43 +0800 | ||
8 | Subject: [PATCH] net: tulip: Restrict DMA engine to memories | ||
9 | |||
10 | The DMA engine is started by I/O access and then itself accesses the | ||
11 | I/O registers, triggering a reentrancy bug. | ||
12 | |||
13 | The following log can reveal it: | ||
14 | ==5637==ERROR: AddressSanitizer: stack-overflow | ||
15 | #0 0x5595435f6078 in tulip_xmit_list_update qemu/hw/net/tulip.c:673 | ||
16 | #1 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
17 | #2 0x559544637f86 in memory_region_write_accessor qemu/softmmu/memory.c:492:5 | ||
18 | #3 0x5595446379fa in access_with_adjusted_size qemu/softmmu/memory.c:554:18 | ||
19 | #4 0x5595446372fa in memory_region_dispatch_write qemu/softmmu/memory.c | ||
20 | #5 0x55954468b74c in flatview_write_continue qemu/softmmu/physmem.c:2825:23 | ||
21 | #6 0x559544683662 in flatview_write qemu/softmmu/physmem.c:2867:12 | ||
22 | #7 0x5595446833f3 in address_space_write qemu/softmmu/physmem.c:2963:18 | ||
23 | #8 0x5595435fb082 in dma_memory_rw_relaxed qemu/include/sysemu/dma.h:87:12 | ||
24 | #9 0x5595435fb082 in dma_memory_rw qemu/include/sysemu/dma.h:130:12 | ||
25 | #10 0x5595435fb082 in dma_memory_write qemu/include/sysemu/dma.h:171:12 | ||
26 | #11 0x5595435fb082 in stl_le_dma qemu/include/sysemu/dma.h:272:1 | ||
27 | #12 0x5595435fb082 in stl_le_pci_dma qemu/include/hw/pci/pci.h:910:1 | ||
28 | #13 0x5595435fb082 in tulip_desc_write qemu/hw/net/tulip.c:101:9 | ||
29 | #14 0x5595435f7e3d in tulip_xmit_list_update qemu/hw/net/tulip.c:706:9 | ||
30 | #15 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
31 | |||
32 | Fix this bug by restricting the DMA engine to memories regions. | ||
33 | |||
34 | Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> | ||
35 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
36 | --- | ||
37 | hw/net/tulip.c | 4 ++-- | ||
38 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
39 | |||
40 | diff --git a/hw/net/tulip.c b/hw/net/tulip.c | ||
41 | index 097e905bec..b9e42c322a 100644 | ||
42 | --- a/hw/net/tulip.c | ||
43 | +++ b/hw/net/tulip.c | ||
44 | @@ -70,7 +70,7 @@ static const VMStateDescription vmstate_pci_tulip = { | ||
45 | static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
46 | struct tulip_descriptor *desc) | ||
47 | { | ||
48 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
49 | + const MemTxAttrs attrs = { .memory = true }; | ||
50 | |||
51 | if (s->csr[0] & CSR0_DBO) { | ||
52 | ldl_be_pci_dma(&s->dev, p, &desc->status, attrs); | ||
53 | @@ -88,7 +88,7 @@ static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
54 | static void tulip_desc_write(TULIPState *s, hwaddr p, | ||
55 | struct tulip_descriptor *desc) | ||
56 | { | ||
57 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
58 | + const MemTxAttrs attrs = { .memory = true }; | ||
59 | |||
60 | if (s->csr[0] & CSR0_DBO) { | ||
61 | stl_be_pci_dma(&s->dev, p, desc->status, attrs); | ||
62 | -- | ||
63 | 2.34.1 | ||
64 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch deleted file mode 100644 index 63a99c96..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch +++ /dev/null | |||
@@ -1,246 +0,0 @@ | |||
1 | From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
3 | Date: Thu, 21 Dec 2017 11:35:16 -0800 | ||
4 | Subject: [PATCH 02/12] chardev: connect socket to a spawned command | ||
5 | |||
6 | The command is started in a shell (sh -c) with stdin connect to QEMU | ||
7 | via a Unix domain stream socket. QEMU then exchanges data via its own | ||
8 | end of the socket, just like it normally does. | ||
9 | |||
10 | "-chardev socket" supports some ways of connecting via protocols like | ||
11 | telnet, but that is only a subset of the functionality supported by | ||
12 | tools socat. To use socat instead, for example to connect via a socks | ||
13 | proxy, use: | ||
14 | |||
15 | -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \ | ||
16 | -device usb-serial,chardev=socat | ||
17 | |||
18 | Beware that commas in the command must be escaped as double commas. | ||
19 | |||
20 | Or interactively in the console: | ||
21 | (qemu) chardev-add socket,id=cat,cmd=cat | ||
22 | (qemu) device_add usb-serial,chardev=cat | ||
23 | ^ac | ||
24 | # cat >/dev/ttyUSB0 | ||
25 | hello | ||
26 | hello | ||
27 | |||
28 | Another usage is starting swtpm from inside QEMU. swtpm will | ||
29 | automatically shut down once it looses the connection to the parent | ||
30 | QEMU, so there is no risk of lingering processes: | ||
31 | |||
32 | -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \ | ||
33 | -tpmdev emulator,id=tpm0,chardev=chrtpm0 \ | ||
34 | -device tpm-tis,tpmdev=tpm0 | ||
35 | |||
36 | The patch was discussed upstream, but QEMU developers believe that the | ||
37 | code calling QEMU should be responsible for managing additional | ||
38 | processes. In OE-core, that would imply enhancing runqemu and | ||
39 | oeqa. This patch is a simpler solution. | ||
40 | |||
41 | Because it is not going upstream, the patch was written so that it is | ||
42 | as simple as possible. | ||
43 | |||
44 | Upstream-Status: Inappropriate [embedded specific] | ||
45 | |||
46 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | ||
47 | |||
48 | --- | ||
49 | chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++ | ||
50 | chardev/char.c | 3 ++ | ||
51 | qapi/char.json | 5 +++ | ||
52 | 3 files changed, 108 insertions(+) | ||
53 | |||
54 | diff --git a/chardev/char-socket.c b/chardev/char-socket.c | ||
55 | index fab2d791d..c79641f24 100644 | ||
56 | --- a/chardev/char-socket.c | ||
57 | +++ b/chardev/char-socket.c | ||
58 | @@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock, | ||
59 | return true; | ||
60 | } | ||
61 | |||
62 | +#ifndef _WIN32 | ||
63 | +static void chardev_open_socket_cmd(Chardev *chr, | ||
64 | + const char *cmd, | ||
65 | + Error **errp) | ||
66 | +{ | ||
67 | + int fds[2] = { -1, -1 }; | ||
68 | + QIOChannelSocket *sioc = NULL; | ||
69 | + pid_t pid = -1; | ||
70 | + const char *argv[] = { "/bin/sh", "-c", cmd, NULL }; | ||
71 | + | ||
72 | + /* | ||
73 | + * We need a Unix domain socket for commands like swtpm and a single | ||
74 | + * connection, therefore we cannot use qio_channel_command_new_spawn() | ||
75 | + * without patching it first. Duplicating the functionality is easier. | ||
76 | + */ | ||
77 | + if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) { | ||
78 | + error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)"); | ||
79 | + goto error; | ||
80 | + } | ||
81 | + | ||
82 | + pid = qemu_fork(errp); | ||
83 | + if (pid < 0) { | ||
84 | + goto error; | ||
85 | + } | ||
86 | + | ||
87 | + if (!pid) { | ||
88 | + /* child */ | ||
89 | + dup2(fds[1], STDIN_FILENO); | ||
90 | + execv(argv[0], (char * const *)argv); | ||
91 | + _exit(1); | ||
92 | + } | ||
93 | + | ||
94 | + /* | ||
95 | + * Hand over our end of the socket pair to the qio channel. | ||
96 | + * | ||
97 | + * We don't reap the child because it is expected to keep | ||
98 | + * running. We also don't support the "reconnect" option for the | ||
99 | + * same reason. | ||
100 | + */ | ||
101 | + sioc = qio_channel_socket_new_fd(fds[0], errp); | ||
102 | + if (!sioc) { | ||
103 | + goto error; | ||
104 | + } | ||
105 | + fds[0] = -1; | ||
106 | + | ||
107 | + g_free(chr->filename); | ||
108 | + chr->filename = g_strdup_printf("cmd:%s", cmd); | ||
109 | + tcp_chr_new_client(chr, sioc); | ||
110 | + | ||
111 | + error: | ||
112 | + if (fds[0] >= 0) { | ||
113 | + close(fds[0]); | ||
114 | + } | ||
115 | + if (fds[1] >= 0) { | ||
116 | + close(fds[1]); | ||
117 | + } | ||
118 | + if (sioc) { | ||
119 | + object_unref(OBJECT(sioc)); | ||
120 | + } | ||
121 | +} | ||
122 | +#endif | ||
123 | |||
124 | static void qmp_chardev_open_socket(Chardev *chr, | ||
125 | ChardevBackend *backend, | ||
126 | @@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
127 | { | ||
128 | SocketChardev *s = SOCKET_CHARDEV(chr); | ||
129 | ChardevSocket *sock = backend->u.socket.data; | ||
130 | +#ifndef _WIN32 | ||
131 | + const char *cmd = sock->cmd; | ||
132 | +#endif | ||
133 | bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; | ||
134 | bool is_listen = sock->has_server ? sock->server : true; | ||
135 | bool is_telnet = sock->has_telnet ? sock->telnet : false; | ||
136 | @@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
137 | |||
138 | update_disconnected_filename(s); | ||
139 | |||
140 | +#ifndef _WIN32 | ||
141 | + if (cmd) { | ||
142 | + chardev_open_socket_cmd(chr, cmd, errp); | ||
143 | + | ||
144 | + /* everything ready (or failed permanently) before we return */ | ||
145 | + *be_opened = true; | ||
146 | + } else | ||
147 | +#endif | ||
148 | if (s->is_listen) { | ||
149 | if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270, | ||
150 | is_waitconnect, errp) < 0) { | ||
151 | @@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
152 | const char *host = qemu_opt_get(opts, "host"); | ||
153 | const char *port = qemu_opt_get(opts, "port"); | ||
154 | const char *fd = qemu_opt_get(opts, "fd"); | ||
155 | +#ifndef _WIN32 | ||
156 | + const char *cmd = qemu_opt_get(opts, "cmd"); | ||
157 | +#endif | ||
158 | #ifdef CONFIG_LINUX | ||
159 | bool tight = qemu_opt_get_bool(opts, "tight", true); | ||
160 | bool abstract = qemu_opt_get_bool(opts, "abstract", false); | ||
161 | @@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
162 | SocketAddressLegacy *addr; | ||
163 | ChardevSocket *sock; | ||
164 | |||
165 | +#ifndef _WIN32 | ||
166 | + if (cmd) { | ||
167 | + /* | ||
168 | + * Here we have to ensure that no options are set which are incompatible with | ||
169 | + * spawning a command, otherwise unmodified code that doesn't know about | ||
170 | + * command spawning (like socket_reconnect_timeout()) might get called. | ||
171 | + */ | ||
172 | + if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) { | ||
173 | + error_setg(errp, "chardev: socket: cmd does not support any additional options"); | ||
174 | + return; | ||
175 | + } | ||
176 | + } else | ||
177 | +#endif | ||
178 | + | ||
179 | if ((!!path + !!fd + !!host) > 1) { | ||
180 | error_setg(errp, | ||
181 | "None or one of 'path', 'fd' or 'host' option required."); | ||
182 | @@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
183 | sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds")); | ||
184 | sock->has_tls_authz = qemu_opt_get(opts, "tls-authz"); | ||
185 | sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz")); | ||
186 | +#ifndef _WIN32 | ||
187 | + sock->cmd = g_strdup(cmd); | ||
188 | +#endif | ||
189 | |||
190 | addr = g_new0(SocketAddressLegacy, 1); | ||
191 | +#ifndef _WIN32 | ||
192 | + if (path || cmd) { | ||
193 | +#else | ||
194 | if (path) { | ||
195 | +#endif | ||
196 | UnixSocketAddress *q_unix; | ||
197 | addr->type = SOCKET_ADDRESS_TYPE_UNIX; | ||
198 | q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1); | ||
199 | +#ifndef _WIN32 | ||
200 | + q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path); | ||
201 | +#else | ||
202 | q_unix->path = g_strdup(path); | ||
203 | +#endif | ||
204 | #ifdef CONFIG_LINUX | ||
205 | q_unix->has_tight = true; | ||
206 | q_unix->tight = tight; | ||
207 | diff --git a/chardev/char.c b/chardev/char.c | ||
208 | index 0169d8dde..ce9a21f41 100644 | ||
209 | --- a/chardev/char.c | ||
210 | +++ b/chardev/char.c | ||
211 | @@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = { | ||
212 | },{ | ||
213 | .name = "path", | ||
214 | .type = QEMU_OPT_STRING, | ||
215 | + },{ | ||
216 | + .name = "cmd", | ||
217 | + .type = QEMU_OPT_STRING, | ||
218 | },{ | ||
219 | .name = "host", | ||
220 | .type = QEMU_OPT_STRING, | ||
221 | diff --git a/qapi/char.json b/qapi/char.json | ||
222 | index 7b4215157..37feabdac 100644 | ||
223 | --- a/qapi/char.json | ||
224 | +++ b/qapi/char.json | ||
225 | @@ -250,6 +250,10 @@ | ||
226 | # | ||
227 | # @addr: socket address to listen on (server=true) | ||
228 | # or connect to (server=false) | ||
229 | +# @cmd: command to run via "sh -c" with stdin as one end of | ||
230 | +# a AF_UNIX SOCK_DSTREAM socket pair. The other end | ||
231 | +# is used by the chardev. Either an addr or a cmd can | ||
232 | +# be specified, but not both. | ||
233 | # @tls-creds: the ID of the TLS credentials object (since 2.6) | ||
234 | # @tls-authz: the ID of the QAuthZ authorization object against which | ||
235 | # the client's x509 distinguished name will be validated. This | ||
236 | @@ -276,6 +280,7 @@ | ||
237 | ## | ||
238 | { 'struct': 'ChardevSocket', | ||
239 | 'data': { 'addr': 'SocketAddressLegacy', | ||
240 | + '*cmd': 'str', | ||
241 | '*tls-creds': 'str', | ||
242 | '*tls-authz' : 'str', | ||
243 | '*server': 'bool', | ||
244 | -- | ||
245 | 2.30.2 | ||
246 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch deleted file mode 100644 index 3b4a6694..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | CVE: CVE-2022-3165 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From d307040b18bfcb1393b910f1bae753d5c12a4dc7 Mon Sep 17 00:00:00 2001 | ||
6 | From: Mauro Matteo Cascella <mcascell@redhat.com> | ||
7 | Date: Sun, 25 Sep 2022 22:45:11 +0200 | ||
8 | Subject: [PATCH] ui/vnc-clipboard: fix integer underflow in | ||
9 | vnc_client_cut_text_ext | ||
10 | |||
11 | Extended ClientCutText messages start with a 4-byte header. If len < 4, | ||
12 | an integer underflow occurs in vnc_client_cut_text_ext. The result is | ||
13 | used to decompress data in a while loop in inflate_buffer, leading to | ||
14 | CPU consumption and denial of service. Prevent this by checking dlen in | ||
15 | protocol_client_msg. | ||
16 | |||
17 | Fixes: CVE-2022-3165 | ||
18 | Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support") | ||
19 | Reported-by: TangPeng <tangpeng@qianxin.com> | ||
20 | Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> | ||
21 | Message-Id: <20220925204511.1103214-1-mcascell@redhat.com> | ||
22 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
23 | --- | ||
24 | ui/vnc.c | 11 ++++++++--- | ||
25 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/ui/vnc.c b/ui/vnc.c | ||
28 | index 6a05d06147..acb3629cd8 100644 | ||
29 | --- a/ui/vnc.c | ||
30 | +++ b/ui/vnc.c | ||
31 | @@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
32 | if (len == 1) { | ||
33 | return 8; | ||
34 | } | ||
35 | + uint32_t dlen = abs(read_s32(data, 4)); | ||
36 | if (len == 8) { | ||
37 | - uint32_t dlen = abs(read_s32(data, 4)); | ||
38 | if (dlen > (1 << 20)) { | ||
39 | error_report("vnc: client_cut_text msg payload has %u bytes" | ||
40 | " which exceeds our limit of 1MB.", dlen); | ||
41 | @@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
42 | } | ||
43 | |||
44 | if (read_s32(data, 4) < 0) { | ||
45 | - vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)), | ||
46 | - read_u32(data, 8), data + 12); | ||
47 | + if (dlen < 4) { | ||
48 | + error_report("vnc: malformed payload (header less than 4 bytes)" | ||
49 | + " in extended clipboard pseudo-encoding."); | ||
50 | + vnc_client_error(vs); | ||
51 | + break; | ||
52 | + } | ||
53 | + vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12); | ||
54 | break; | ||
55 | } | ||
56 | vnc_client_cut_text(vs, read_u32(data, 4), data + 8); | ||
57 | -- | ||
58 | GitLab | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch deleted file mode 100644 index 071691f8..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP | ||
2 | |||
3 | SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark | ||
4 | it with ARM_CP_EL3_NO_EL2_KEEP. | ||
5 | |||
6 | Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL") | ||
7 | Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
8 | |||
9 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04515.html] | ||
10 | |||
11 | --- | ||
12 | target/arm/helper.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | Index: qemu-7.1.0/target/arm/helper.c | ||
16 | =================================================================== | ||
17 | --- qemu-7.1.0.orig/target/arm/helper.c | ||
18 | +++ qemu-7.1.0/target/arm/helper.c | ||
19 | @@ -4971,7 +4971,7 @@ static const ARMCPRegInfo v8_cp_reginfo[ | ||
20 | .fieldoffset = offsetof(CPUARMState, sp_el[0]) }, | ||
21 | { .name = "SP_EL1", .state = ARM_CP_STATE_AA64, | ||
22 | .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0, | ||
23 | - .access = PL2_RW, .type = ARM_CP_ALIAS, | ||
24 | + .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP, | ||
25 | .fieldoffset = offsetof(CPUARMState, sp_el[1]) }, | ||
26 | { .name = "SPSel", .state = ARM_CP_STATE_AA64, | ||
27 | .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0, | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch deleted file mode 100644 index abad1cfe..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | Avoid conflicts between sys/mount.h and linux/mount.h that are seen | ||
2 | with glibc 2.36 | ||
3 | |||
4 | Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- a/linux-user/syscall.c | ||
9 | +++ b/linux-user/syscall.c | ||
10 | @@ -95,7 +95,25 @@ | ||
11 | #include <linux/soundcard.h> | ||
12 | #include <linux/kd.h> | ||
13 | #include <linux/mtio.h> | ||
14 | + | ||
15 | +#ifdef HAVE_SYS_MOUNT_FSCONFIG | ||
16 | +/* | ||
17 | + * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, | ||
18 | + * which in turn prevents use of linux/fs.h. So we have to | ||
19 | + * define the constants ourselves for now. | ||
20 | + */ | ||
21 | +#define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
22 | +#define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
23 | +#define FS_IOC_GETVERSION _IOR('v', 1, long) | ||
24 | +#define FS_IOC_SETVERSION _IOW('v', 2, long) | ||
25 | +#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) | ||
26 | +#define FS_IOC32_GETFLAGS _IOR('f', 1, int) | ||
27 | +#define FS_IOC32_SETFLAGS _IOW('f', 2, int) | ||
28 | +#define FS_IOC32_GETVERSION _IOR('v', 1, int) | ||
29 | +#define FS_IOC32_SETVERSION _IOW('v', 2, int) | ||
30 | +#else | ||
31 | #include <linux/fs.h> | ||
32 | +#endif | ||
33 | #include <linux/fd.h> | ||
34 | #if defined(CONFIG_FIEMAP) | ||
35 | #include <linux/fiemap.h> | ||
36 | --- a/meson.build | ||
37 | +++ b/meson.build | ||
38 | @@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET', | ||
39 | cc.has_header_symbol('getopt.h', 'optreset')) | ||
40 | config_host_data.set('HAVE_IPPROTO_MPTCP', | ||
41 | cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) | ||
42 | +config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', | ||
43 | + cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) | ||
44 | |||
45 | # has_member | ||
46 | config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc deleted file mode 100644 index 4b0aceb8..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | SUMMARY = "Xilinx's fork of a fast open source processor emulator" | ||
2 | HOMEPAGE = "https://github.com/xilinx/qemu/" | ||
3 | |||
4 | # This qemu fork is NOT compatible with running on a 32-bit system | ||
5 | # See: https://github.com/Xilinx/qemu/issues/35 | ||
6 | COMPATIBLE_HOST:arm = "null" | ||
7 | |||
8 | # x86_64 is needed to build nativesdks | ||
9 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel x86_64" | ||
10 | |||
11 | LIC_FILES_CHKSUM = " \ | ||
12 | file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
13 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \ | ||
14 | " | ||
15 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" | ||
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-7.1.0:" | ||
18 | |||
19 | PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
20 | REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" | ||
21 | |||
22 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
23 | SRC_URI = "${REPO};${BRANCHARG}" | ||
24 | |||
25 | FILESEXTRAPATHS:append := ":${COREBASE}/meta/recipes-devtools/qemu/qemu" | ||
26 | |||
27 | SRC_URI += "\ | ||
28 | file://powerpc_rom.bin \ | ||
29 | file://run-ptest \ | ||
30 | file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \ | ||
31 | file://0002-chardev-connect-socket-to-a-spawned-command.patch \ | ||
32 | file://0003-apic-fixup-fallthrough-to-PIC.patch \ | ||
33 | file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \ | ||
34 | file://0005-qemu-Do-not-include-file-if-not-exists.patch \ | ||
35 | file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \ | ||
36 | file://0007-qemu-Determinism-fixes.patch \ | ||
37 | file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \ | ||
38 | file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \ | ||
39 | file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \ | ||
40 | file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \ | ||
41 | file://arm-cpreg-fix.patch \ | ||
42 | file://CVE-2022-3165.patch \ | ||
43 | file://qemu-guest-agent.init \ | ||
44 | file://qemu-guest-agent.udev \ | ||
45 | " | ||
46 | |||
47 | # Workaround for 8.2 patch that doesn't apply | ||
48 | SRC_URI:remove = "file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch" | ||
49 | SRC_URI:remove = "file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch" | ||
50 | |||
51 | S = "${WORKDIR}/git" | ||
52 | |||
53 | PACKAGECONFIG ??= " \ | ||
54 | fdt sdl kvm gcrypt pie slirp \ | ||
55 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \ | ||
56 | ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \ | ||
57 | " | ||
58 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp" | ||
59 | |||
60 | # Disable this | ||
61 | PACKAGECONFIG[debuginfo] = "" | ||
62 | PACKAGECONFIG[pipewire] = "" | ||
63 | PACKAGECONFIG[sndio] = "" | ||
64 | |||
65 | DISABLE_STATIC:pn-${PN} = "" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc new file mode 100644 index 00000000..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-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc deleted file mode 100644 index e664a580..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | require recipes-devtools/qemu/qemu-native.inc | ||
2 | require qemu-xilinx-7.1.inc | ||
3 | |||
4 | DEPENDS = "glib-2.0-native zlib-native ninja-native meson-native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc new file mode 100644 index 00000000..ad00453f --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc | |||
@@ -0,0 +1,2 @@ | |||
1 | require qemu-native-8.1.inc | ||
2 | require qemu-xilinx-8.1.inc | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb deleted file mode 100644 index bfdb916d..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb deleted file mode 100644 index f91eb891..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb deleted file mode 100644 index a19b2cc3..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2023.1.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb deleted file mode 100644 index 78ffedca..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | require qemu-xilinx-2023.2.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
20 | |||
21 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_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_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb deleted file mode 100644 index ba733ede..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.1.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb deleted file mode 100644 index 17386afe..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.2.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb deleted file mode 100644 index 3264c260..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2023.1.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb deleted file mode 100644 index fdf3be2e..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2023.2.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
12 | |||
13 | EXTRA_OECONF:append = "\ | ||
14 | --with-git=/bin/false \ | ||
15 | --with-git-submodules=ignore \ | ||
16 | --meson=meson \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
20 | |||
21 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
22 | |||
23 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
24 | |||
25 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
26 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
27 | |||
28 | do_install:append() { | ||
29 | # The following is also installed by qemu-native | ||
30 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
31 | rm -rf ${D}${datadir}/qemu/keymaps | ||
32 | rm -rf ${D}${datadir}/icons | ||
33 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
34 | |||
35 | # Install qmp.py to be used with testimage | ||
36 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
37 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_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_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb deleted file mode 100644 index 96b26101..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | |||
26 | EXTRA_OECONF:append = "\ | ||
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | |||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
35 | |||
36 | do_install:append:class-nativesdk() { | ||
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb deleted file mode 100644 index c6e91fdd..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
9 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
10 | |||
11 | BBCLASSEXTEND = "nativesdk" | ||
12 | |||
13 | RDEPENDS:${PN}:class-target += "bash" | ||
14 | |||
15 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
16 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
17 | |||
18 | # Latest poky has changed the defaults, restore them to something compatible | ||
19 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
20 | EXTRA_OECONF:remove = "--disable-download" | ||
21 | EXTRA_OECONF:remove = "--disable-docs" | ||
22 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
23 | |||
24 | EXTRA_OECONF:append = "\ | ||
25 | --with-git=/bin/false \ | ||
26 | --with-git-submodules=ignore \ | ||
27 | --meson=meson \ | ||
28 | " | ||
29 | |||
30 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
31 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
32 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
33 | |||
34 | do_install:append:class-nativesdk() { | ||
35 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
36 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb deleted file mode 100644 index fca09883..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | require qemu-xilinx-2023.1.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | |||
26 | EXTRA_OECONF:append = "\ | ||
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | |||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
35 | |||
36 | do_install:append:class-nativesdk() { | ||
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
38 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb index 070ae65f..cff60bd6 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb | |||
@@ -1,6 +1,8 @@ | |||
1 | require qemu-xilinx-2023.2.inc | 1 | BBCLASSEXTEND = "nativesdk" |
2 | require recipes-devtools/qemu/qemu.inc | 2 | |
3 | require qemu-xilinx-7.1.inc | 3 | require qemu-xilinx-2024.1.inc |
4 | require qemu-8.1.inc | ||
5 | require qemu-xilinx-8.1.inc | ||
4 | require qemu-alt.inc | 6 | require qemu-alt.inc |
5 | 7 | ||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | 8 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific |
@@ -10,29 +12,27 @@ MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtua | |||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | 12 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" |
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | 13 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" |
12 | 14 | ||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | 15 | ||
15 | RDEPENDS:${PN}:class-target += "bash" | 16 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" |
16 | 17 | ||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | 18 | DEPENDS:append:libc-musl = " libucontext" |
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | 19 | ||
20 | # Latest poky has changed the defaults, restore them to something compatible | 20 | CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" |
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | EXTRA_OECONF:remove = "--disable-af-xdp" | ||
25 | 21 | ||
26 | EXTRA_OECONF:append = "\ | 22 | RDEPENDS:${PN}-common:class-target += "bash" |
27 | --with-git=/bin/false \ | ||
28 | --with-git-submodules=ignore \ | ||
29 | --meson=meson \ | ||
30 | " | ||
31 | 23 | ||
32 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | 24 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" |
33 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
34 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | 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)}" | ||
35 | 27 | ||
36 | do_install:append:class-nativesdk() { | 28 | PACKAGECONFIG ??= " \ |
37 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | 29 | fdt sdl kvm pie slirp gcrypt \ |
38 | } | 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/libgles/libmali-xlnx.bb b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb index db99c4d7..82c411a2 100644 --- a/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb +++ b/meta-xilinx-core/recipes-graphics/libgles/libmali-xlnx.bb | |||
@@ -13,7 +13,7 @@ PROVIDES += "virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm" | |||
13 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | 13 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" |
14 | 14 | ||
15 | REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https" | 15 | REPO ?= "git://github.com/Xilinx/mali-userspace-binaries.git;protocol=https" |
16 | BRANCH ?= "xlnx_rel_v2023.2" | 16 | BRANCH ?= "xlnx_rel_v2024.1" |
17 | SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" | 17 | SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" |
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
19 | 19 | ||
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-graphics/mali/kernel-module-mali/0029-Fixed-buildpath-QA-warning.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0029-Fixed-buildpath-QA-warning.patch new file mode 100644 index 00000000..a3ddafed --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0029-Fixed-buildpath-QA-warning.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 7659ba2e251b72aa3c248d3b1f3a23971180ba41 Mon Sep 17 00:00:00 2001 | ||
2 | From: Parth Gajjar <parth.gajjar@amd.com> | ||
3 | Date: Mon, 18 Mar 2024 13:43:30 +0000 | ||
4 | Subject: [PATCH] Fixed buildpath QA warning | ||
5 | |||
6 | Removed KDIR from buildinfo | ||
7 | WARNING: kernel-module-mali-r9p0-01rel0-r0 do_package_qa: | ||
8 | QA Issue: File /lib/modules/6.6.10-xilinx-v2024.1-g2c37bbe14ced/updates/mali.ko | ||
9 | in package kernel-module-mali-6.6.10-xilinx-v2024.1-g2c37bbe14ced contains | ||
10 | reference to TMPDIR [buildpaths]" from the log file. | ||
11 | |||
12 | Signed-off-by: Parth Gajjar <parth.gajjar@amd.com> | ||
13 | |||
14 | diff --git a/Kbuild b/Kbuild | ||
15 | index 8c6e6e0..2b8632b 100644 | ||
16 | --- a/Kbuild | ||
17 | +++ b/Kbuild | ||
18 | @@ -243,7 +243,7 @@ VERSION_STRINGS += BUILD=release | ||
19 | endif | ||
20 | VERSION_STRINGS += TARGET_PLATFORM=$(TARGET_PLATFORM) | ||
21 | VERSION_STRINGS += MALI_PLATFORM=$(MALI_PLATFORM) | ||
22 | -VERSION_STRINGS += KDIR=$(KDIR) | ||
23 | +#VERSION_STRINGS += KDIR=$(KDIR) | ||
24 | VERSION_STRINGS += OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=$(OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB) | ||
25 | VERSION_STRINGS += USING_UMP=$(CONFIG_MALI400_UMP) | ||
26 | VERSION_STRINGS += USING_PROFILING=$(CONFIG_MALI400_PROFILING) | ||
27 | -- | ||
28 | 2.37.6 | ||
29 | |||
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali_2024.1.bb b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali_2024.1.bb new file mode 100644 index 00000000..72bd7759 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali_2024.1.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "A Mali 400 Linux Kernel module" | ||
2 | SECTION = "kernel/modules" | ||
3 | |||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = " \ | ||
6 | file://linux/license/gpl/mali_kernel_license.h;md5=f5af2d61f4c1eb262cb6a557aaa1070a \ | ||
7 | " | ||
8 | |||
9 | MALI_VERSION = "r9p0-01rel0" | ||
10 | PV =. "${MALI_VERSION}-v" | ||
11 | |||
12 | SRC_URI = " \ | ||
13 | https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/mali-utgard-gpu/DX910-SW-99002-${MALI_VERSION}.tgz \ | ||
14 | file://0001-Change-Makefile-to-be-compatible-with-Yocto.patch \ | ||
15 | file://0002-staging-mali-r8p0-01rel0-Add-the-ZYNQ-ZYNQMP-platfor.patch \ | ||
16 | file://0003-staging-mali-r8p0-01rel0-Remove-unused-trace-macros.patch \ | ||
17 | file://0004-staging-mali-r8p0-01rel0-Don-t-include-mali_read_phy.patch \ | ||
18 | file://0005-linux-mali_kernel_linux.c-Handle-clock-when-probed-a.patch \ | ||
19 | file://0006-arm.c-global-variable-dma_ops-is-removed-from-the-ke.patch \ | ||
20 | file://0010-common-mali_pm.c-Add-PM-runtime-barrier-after-removi.patch \ | ||
21 | file://0011-linux-mali_kernel_linux.c-Enable-disable-clock-for-r.patch\ | ||
22 | file://0012-linux-mali_memory_os_alloc-Remove-__GFP_COLD.patch\ | ||
23 | file://0013-linux-mali_memory_secure-Add-header-file-dma-direct..patch\ | ||
24 | file://0014-linux-mali_-timer-Get-rid-of-init_timer.patch\ | ||
25 | file://0015-fix-driver-failed-to-check-map-error.patch \ | ||
26 | file://0016-mali_memory_secure-Kernel-5.0-onwards-access_ok-API-.patch \ | ||
27 | file://0017-Support-for-vm_insert_pfn-deprecated-from-kernel-4.2.patch \ | ||
28 | file://0018-Change-return-type-to-vm_fault_t-for-fault-handler.patch \ | ||
29 | file://0019-get_monotonic_boottime-ts-deprecated-from-kernel-4.2.patch \ | ||
30 | file://0020-Fix-ioremap_nocache-deprecation-in-kernel-5.6.patch \ | ||
31 | file://0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch \ | ||
32 | file://0022-Set-HAVE_UNLOCKED_IOCTL-default-to-true.patch \ | ||
33 | file://0023-Use-PTR_ERR_OR_ZERO-instead-of-PTR_RET.patch \ | ||
34 | file://0024-Use-community-device-tree-names.patch \ | ||
35 | file://0025-Import-DMA_BUF-module-and-update-register_shrinker-f.patch \ | ||
36 | file://0026-Fix-gpu-driver-probe-failure.patch \ | ||
37 | file://0027-Updated-clock-name-and-structure-to-match-LIMA-drive.patch \ | ||
38 | file://0028-Replace-vma-vm_flags-direct-modifications-with-modif.patch \ | ||
39 | file://0029-Fixed-buildpath-QA-warning.patch \ | ||
40 | " | ||
41 | SRC_URI[md5sum] = "85ea110dd6675c70b7d01af87ec9633c" | ||
42 | SRC_URI[sha256sum] = "7a67127341d17640c1fff5dad80258fb2a37c8a2121b81525fe2327e4532ce2b" | ||
43 | |||
44 | inherit features_check module | ||
45 | |||
46 | PARALLEL_MAKE = "-j 1" | ||
47 | |||
48 | S = "${WORKDIR}/DX910-SW-99002-${MALI_VERSION}/driver/src/devicedrv/mali" | ||
49 | |||
50 | REQUIRED_MACHINE_FEATURES = "mali400" | ||
51 | |||
52 | EXTRA_OEMAKE = 'KDIR="${STAGING_KERNEL_DIR}" \ | ||
53 | ARCH="${ARCH}" \ | ||
54 | BUILD=release \ | ||
55 | MALI_PLATFORM="arm" \ | ||
56 | USING_DT=1 \ | ||
57 | MALI_SHARED_INTERRUPTS=1 \ | ||
58 | CROSS_COMPILE="${TARGET_PREFIX}" \ | ||
59 | MALI_QUIET=1 \ | ||
60 | ' | ||
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..503cee02 --- /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 ?= "xlnx_rel_v2024.1" | ||
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..73a22d30 --- /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 ?= "xlnx_rel_v2024.1" | ||
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_2024.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2024.1.bb new file mode 100644 index 00000000..3008a572 --- /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 = "73608e3d7f39dc2b44a1d3c135dec85bcb1b67f0" | ||
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..f474595c --- /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 = "xlnx_rel_v2024.1" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "91d19a16308a438596138d30d8174e148fc45584" | ||
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..14226aa7 --- /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 ?= "xlnx_rel_v2024.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "dc34204543b89997577bd2c9757b3c218e6caccc" | ||
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..e3f656b0 --- /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 ?= "xlnx_rel_v2024.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "940f9fa933402de6f959911c236f36add5dd3a40" | ||
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..1031f892 --- /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 ?= "xlnx_rel_v2024.1" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "6ee1998c53817ab0c137b8b99089337d5caba62c" | ||
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..84f9cc2a --- /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 ?= "xlnx_rel_v2024.1" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https" | ||
16 | SRCREV ?= "25773344ce1e539e7136c5a30cdee98a6cf490a8" | ||
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..3acbf3ef --- /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 ?= "xlnx_rel_v2024.1" | ||
15 | REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" | ||
16 | SRCREV ?= "7af131e0780d52ebc7bd6173bf1b99fec4dc522f" | ||
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..5ba604f8 --- /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 ?= "xlnx_rel_v2024.1" | ||
11 | REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" | ||
12 | SRCREV ?= "af9c6e8935799f4dcd579b0164dd05eb039b569d" | ||
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..86f977b4 --- /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 ?= "xlnx_rel_v2024.1" | ||
17 | REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" | ||
18 | SRCREV ?= "724de80630edcb87d865d69f1a6c0dc61c3f9f12" | ||
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_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.0.bb new file mode 100644 index 00000000..37f32a23 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202410.2.17.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | FILESEXTRAPATHS:append := ":${THISDIR}/xrt" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_FILES_CHKSUM = " \ | ||
10 | file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | ||
11 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
12 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
13 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
14 | file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
15 | file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 \ | ||
16 | " | ||
17 | |||
18 | S = "${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-202410.2.17.0.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc new file mode 100644 index 00000000..9e38688d --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | REPO ?= "git://github.com/Xilinx/XRT.git;protocol=https" | ||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
3 | SRC_URI = "${REPO};${BRANCHARG};name=xrt" | ||
4 | |||
5 | BRANCH= "master" | ||
6 | SRCREV_xrt = "baf88820fb3fc24dda4dc08c91ecbca2c76c7b0f" | ||
7 | |||
8 | SRC_URI += "git://github.com/Xilinx/dma_ip_drivers.git;branch=master;name=dma_ip_drivers;destsuffix=git/src/runtime_src/core/pcie/driver/linux/xocl/lib/libqdma;protocol=https" | ||
9 | SRCREV_dma_ip_drivers = "9f02769a2eddde008158c96efa39d7edb6512578" | ||
10 | |||
11 | SRC_URI += "git://github.com/serge1/ELFIO.git;branch=main;name=ELFIO;destsuffix=git/src/runtime_src/core/common/elf;protocol=https" | ||
12 | SRCREV_ELFIO = "a04810f12625207cce72665d783babb80f0175a8" | ||
13 | SRCREV_FORMAT = "xrt" | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch new file mode 100644 index 00000000..b83c5ef7 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202410.2.17.0/xrt-cstdint.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Add cstdint as necessary | ||
2 | |||
3 | In GCC 13.1 usage of uint64 and similar will result in an error without | ||
4 | #include <cstdint> | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | |||
8 | Index: src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
9 | =================================================================== | ||
10 | --- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
11 | +++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
12 | @@ -18,6 +18,7 @@ | ||
13 | |||
14 | #include <string> | ||
15 | #include <vector> | ||
16 | +#include <cstdint> | ||
17 | |||
18 | namespace adf | ||
19 | { | ||
20 | Index: src/runtime_src/core/edge/user/zynq_dev.h | ||
21 | =================================================================== | ||
22 | --- a/src/runtime_src/core/edge/user/zynq_dev.h | ||
23 | +++ b/src/runtime_src/core/edge/user/zynq_dev.h | ||
24 | @@ -19,6 +19,7 @@ | ||
25 | #include <fstream> | ||
26 | #include <string> | ||
27 | #include <vector> | ||
28 | +#include <cstdint> | ||
29 | |||
30 | class zynq_device { | ||
31 | public: | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb new file mode 100644 index 00000000..7f211e6f --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.0.bb | |||
@@ -0,0 +1,57 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | SRC_URI += "file://xrt-cstdint.patch;striplevel=2" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | ||
10 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
11 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
12 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
13 | file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
14 | file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 " | ||
15 | |||
16 | COMPATIBLE_MACHINE ?= "^$" | ||
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
18 | COMPATIBLE_MACHINE:versal = ".*" | ||
19 | |||
20 | S = "${WORKDIR}/git/src" | ||
21 | |||
22 | inherit cmake pkgconfig | ||
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
25 | |||
26 | # util-linux is for libuuid-dev. | ||
27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap libdfx" | ||
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | ||
29 | |||
30 | EXTRA_OECMAKE += " \ | ||
31 | -DCMAKE_BUILD_TYPE=Release \ | ||
32 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | ||
33 | -DXRT_LIBDFX=true \ | ||
34 | " | ||
35 | |||
36 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers | ||
37 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend | ||
38 | # Note: If meta-openamp is not available, AIE will not be enabled. | ||
39 | |||
40 | FILES_SOLIBSDEV = "" | ||
41 | FILES:${PN} += "\ | ||
42 | ${libdir}/lib*.so \ | ||
43 | ${libdir}/lib*.so.* \ | ||
44 | ${libdir}/ps_kernels_lib \ | ||
45 | /lib/*.so* \ | ||
46 | ${datadir}" | ||
47 | INSANE_SKIP:${PN} += "dev-so" | ||
48 | |||
49 | pkg_postinst_ontarget:${PN}() { | ||
50 | #!/bin/sh | ||
51 | if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then | ||
52 | echo "INFO: Creating ICD entry for Xilinx Platform" | ||
53 | mkdir -p /etc/OpenCL/vendors | ||
54 | echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd | ||
55 | chmod -R 755 /etc/OpenCL | ||
56 | fi | ||
57 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.0.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.0.bb new file mode 100644 index 00000000..24f69aec --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202410.2.17.0.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
3 | |||
4 | COMPATIBLE_MACHINE:microblaze = "none" | ||
5 | |||
6 | require recipes-xrt/xrt/xrt-${PV}.inc | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
9 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
10 | |||
11 | COMPATIBLE_MACHINE ?= "^$" | ||
12 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
13 | COMPATIBLE_MACHINE:versal = ".*" | ||
14 | |||
15 | S = "${WORKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
16 | |||
17 | inherit module | ||
18 | |||
19 | pkg_postinst_ontarget:${PN}() { | ||
20 | #!/bin/sh | ||
21 | echo "Unloading old XRT Linux kernel modules" | ||
22 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
23 | echo "Loading new XRT Linux kernel modules" | ||
24 | modprobe zocl | ||
25 | } | ||
diff --git a/meta-xilinx-standalone-experimental/README.md b/meta-xilinx-standalone-experimental/README.md index 31aa0f63..950e4e12 100644 --- a/meta-xilinx-standalone-experimental/README.md +++ b/meta-xilinx-standalone-experimental/README.md | |||
@@ -1,44 +1,150 @@ | |||
1 | # meta-xilinx-standalone-experimental | 1 | # meta-xilinx-standalone-experimental |
2 | 2 | ||
3 | This layer contains experimental items that may eventually be added | 3 | This layer contains experimental items that may eventually be added to the |
4 | to the meta-xilinx-standalone layer. The components in this layer | 4 | meta-xilinx-standalone layer. The components in this layer may or may not be |
5 | may or may not be buildable as they may require unreleased code. | 5 | buildable as they may require unreleased code. |
6 | 6 | ||
7 | The non-Linux software components are still in development and | 7 | The non-Linux software components are still in development and this should be |
8 | this should be considered to be a preview release only. For instance, | 8 | considered to be a preview release only. For instance, some components may not |
9 | some components may not be buildable, expect APIs to change on various | 9 | be buildable, expect APIs to change on various parts and pieces. |
10 | parts and pieces. | ||
11 | 10 | ||
12 | ## Build Instructions | 11 | ## Build Instructions |
13 | 12 | ||
14 | **Note:** to use this layer you must REMOVE meta-xilinx-tools from your | 13 | > **Note:** |
15 | project. meta-xilinx-tools is not compatible with this experimental | 14 | > * To use this layer you must REMOVE meta-xilinx-tools from your project. |
16 | approach. You may also have to remove other layers that depend | 15 | meta-xilinx-tools is not compatible with this experimental approach. You may |
17 | on meta-xilinx-tools, such as meta-kria and meta-system-controller. | 16 | also have to remove other layers that depend on meta-xilinx-tools, such as |
17 | meta-kria and meta-system-controller. | ||
18 | > * To use the experimental version of the embedded software (firmware) as well | ||
19 | as system configuration, you must build through gen-machineconf tool. This tool | ||
20 | is passed a output of system device tree directory. | ||
18 | 21 | ||
19 | To use the experimental version of the embedded software (firmware) | 22 | The Yocto Project setup for the System Device Tree (SDT) workflow is as follows. |
20 | as well as system configuration, you must build the 'meta-xilinx-setup' | 23 | Be sure to read everything below. |
21 | SDK. This SDK is passed a device tree, constructed from System Device tree and | 24 | |
22 | produces a number of configuration files. | 25 | 1. Follow [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) |
26 | upto step 4. | ||
27 | |||
28 | 2. Remove meta-xilinx-tools and meta-xilinx-tools dependency layers(such as | ||
29 | meta-kria and meta-system-controller if included in bblayers.conf), then add | ||
30 | the meta-xilinx-standalone-experimental layer. | ||
31 | |||
32 | > **Note:** SDT builds for following devices are not supported in 2024.1 release. | ||
33 | > * Zynq 7000 | ||
34 | > * MicoBlaze | ||
35 | > * Kria | ||
36 | > * System Controller | ||
23 | 37 | ||
24 | 1. Remove meta-xilinx-tools, meta-kria and meta-system-controller, then add the decoupling layer | ||
25 | ``` | 38 | ``` |
26 | $ bitbake-layers remove-layer meta-xilinx-tools | 39 | $ bitbake-layers remove-layer meta-xilinx-tools |
27 | $ bitbake-layers remove-layer meta-kria | 40 | $ bitbake-layers remove-layer meta-kria |
28 | $ bitbake-layers remove-layer meta-system-controller | 41 | $ bitbake-layers remove-layer meta-system-controller |
29 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-experimental | 42 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-experimental |
30 | ``` | 43 | ``` |
31 | 2. Build the setup SDK | 44 | |
45 | 3. Export gen-machineconf tool. | ||
46 | ``` | ||
47 | $ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf | ||
48 | ``` | ||
49 | |||
50 | 4. Run the script from the build or ${TOPDIR} directory. This step describes | ||
51 | System Device Tree (SDT) with and without pl overlays. Configruations are same | ||
52 | for both SDT with and without pl overlays except for linux dts content. | ||
53 | |||
54 | > **Note:** | ||
55 | > 1. The -l option will automatically add the necessary parameters to the | ||
56 | local.conf file. If you need to re-run this comment, you just clear the | ||
57 | parameters from the end of the file. Without the -l option the items are | ||
58 | printed to the screen and must be manually added to your conf/local.conf | ||
59 | > 2. The --soc-family argument is an optional argument and user can skip this. | ||
60 | > 3. By default minimal set of multiconfigs are generated by gen-machineconf tool. | ||
61 | > To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use | ||
62 | > `--multiconfigfull` option. | ||
63 | |||
64 | a. Without SDT pl overlay: | ||
65 | ``` | ||
66 | $ gen-machineconf --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf | ||
67 | ``` | ||
68 | |||
69 | b. With SDT pl overlay: | ||
70 | To generate SDT pl overlay run gen-machineconf command with | ||
71 | `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully | ||
72 | pl.dtsi will be generated under <conf>/dts/${MACHINE}/pl-overlay-{full|dfx} | ||
73 | directory. User can use this pl.dtsi as input to full or dfx static firmware | ||
74 | recipes. | ||
75 | |||
76 | > **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User | ||
77 | > needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output | ||
78 | > artifacts to DFx partial firmware recipes. | ||
79 | |||
80 | * ZynqMP Full bitstream or Versal Segmented Configuration: | ||
81 | ``` | ||
82 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g full | ||
83 | ``` | ||
84 | |||
85 | * ZynqMP or Versal DFx: | ||
86 | ``` | ||
87 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g dfx | ||
32 | ``` | 88 | ``` |
33 | $ bitbake meta-xilinx-setup | 89 | |
90 | For example, zynqmp: | ||
91 | ``` | ||
92 | $ gen-machineconf --soc-family zynqmp --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf | ||
93 | ``` | ||
94 | The following will be written to the end of the conf/local.conf file: | ||
95 | |||
96 | ``` | ||
97 | # Use the newly generated MACHINE | ||
98 | MACHINE = "xlnx-zynqmp-zcu102-rev1-0" | ||
99 | |||
100 | # Avoid errors in some baremetal configs as these layers may be present | ||
101 | # but are not used. Note the following lines are optional and can be | ||
102 | # safetly disabled. | ||
103 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
104 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
105 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
106 | |||
107 | # Each generated multiconfig defines it's own TMPDIR, either edit the | ||
108 | # multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below | ||
109 | #MC_TMPDIR_PREFIX = "${TOPDIR}/tmp" | ||
110 | ``` | ||
111 | |||
112 | For example, versal: | ||
34 | ``` | 113 | ``` |
35 | 3. Install the setup SDK: | 114 | $ gen-machineconf --soc-family versal --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf |
36 | ``` | 115 | ``` |
37 | $ .${TMPDIR}/tmp/deploy/sdk/x86_64-xilinx-nativesdk-prestep-2023.2....sh -d prestep -y | 116 | |
117 | The following will be written to the end of the conf/local.conf file: | ||
118 | |||
119 | ``` | ||
120 | # Use the newly generated MACHINE | ||
121 | MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva" | ||
122 | |||
123 | # Avoid errors in some baremetal configs as these layers may be present | ||
124 | # but are not used. Note the following lines are optional and can be | ||
125 | # safetly disabled. | ||
126 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
127 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
128 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
129 | |||
130 | # Each generated multiconfig defines it's own TMPDIR, either edit the | ||
131 | # multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below | ||
132 | #MC_TMPDIR_PREFIX = "${TOPDIR}/tmp" | ||
38 | ``` | 133 | ``` |
134 | > **Bitbake Performance Note:** | ||
135 | Each BBMULTICONFIG value requires all of the recipes to be parsed for that | ||
136 | configuration. Thus each multiconfig will add more parsing time. A long list | ||
137 | can lead to a very slow parse (many minutes). To speed up parsing, it is | ||
138 | suggested that you trim this down to only the configurations you require. | ||
139 | A minimum configuration is included with the generated configuration. | ||
39 | 140 | ||
40 | Then follow the instructions in the 'prestep/README-setup' file. | ||
41 | 141 | ||
142 | 5. Build your project, You should now be able to build your project normally. | ||
143 | See the Yocto Project documentation if you have questions on how to work with | ||
144 | the multiconfig recipes. The following is a simple build for testing. | ||
145 | |||
146 | 6. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) | ||
147 | from step 6. | ||
42 | 148 | ||
43 | ## Dependencies | 149 | ## Dependencies |
44 | 150 | ||
@@ -56,5 +162,14 @@ This layer depends on: | |||
56 | https://git.yoctoproject.org/meta-xilinx (official version) | 162 | https://git.yoctoproject.org/meta-xilinx (official version) |
57 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 163 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) |
58 | layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone | 164 | layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone |
59 | branch: langdale or amd xilinx release version (e.g. rel-v2023.1) | 165 | branch: langdale or amd xilinx release version (e.g. rel-v2024.1) |
166 | |||
167 | URI: | ||
168 | https://git.yoctoproject.org/meta-virtualization (official version) | ||
169 | https://github.com/Xilinx/meta-virtualization (development and amd xilinx release) | ||
170 | branch: langdale or amd xilinx release version (e.g. rel-v2024.1) | ||
60 | 171 | ||
172 | URI: | ||
173 | https://github.com/OpenAMP/meta-openamp (official version) | ||
174 | https://github.com/Xilinx/meta-openamp (development and amd xilinx release) | ||
175 | branch: langdale or amd xilinx release version (e.g. rel-v2024.1) | ||
diff --git a/meta-xilinx-standalone-experimental/README.sdt.bsp.md b/meta-xilinx-standalone-experimental/README.sdt.bsp.md new file mode 100644 index 00000000..2b2ce4b0 --- /dev/null +++ b/meta-xilinx-standalone-experimental/README.sdt.bsp.md | |||
@@ -0,0 +1,46 @@ | |||
1 | # SDT BSP | ||
2 | |||
3 | This section describes the SDT BSP settings which must be added to the generated | ||
4 | machine configuration file, following [Build Instructions](README.md) step 4, in | ||
5 | order to use the runqemu command. | ||
6 | |||
7 | ## SDT BSP settings | ||
8 | |||
9 | The following board settings need to be added in sdt machine configuration file | ||
10 | to define which QEMU device trees should be used. | ||
11 | |||
12 | > **Variable usage examples:** | ||
13 | > | ||
14 | > QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"` | ||
15 | > | ||
16 | > QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"` | ||
17 | > | ||
18 | > QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"` | ||
19 | > | ||
20 | > QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"` | ||
21 | > | ||
22 | > QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are | ||
23 | > different, Hence we need to adjust the same in QB_MEM to match board dtsi files. | ||
24 | > Below are some examples. | ||
25 | > * ZynqMP `QB_MEM = "-m 4096"` | ||
26 | > * Versal VEK280 `QB_MEM = "-m 12G"` | ||
27 | |||
28 | |||
29 | | Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem | | ||
30 | |---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------| | ||
31 | | ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
32 | | | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
33 | | | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
34 | | | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
35 | | | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
36 | | | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
37 | | | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
38 | | Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G | | ||
39 | | | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G | | ||
40 | | | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G | | ||
41 | | | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G | | ||
42 | | | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G | | ||
43 | | | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G | | ||
44 | |||
45 | > **Note:** Additional information on Xilinx architectures can be found at: | ||
46 | https://www.xilinx.com/products/silicon-devices.html | ||
diff --git a/meta-xilinx-standalone-experimental/classes/esw.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw.bbclass index febdebad..b6f799b9 100644 --- a/meta-xilinx-standalone-experimental/classes/esw.bbclass +++ b/meta-xilinx-standalone-experimental/classes-recipe/esw.bbclass | |||
@@ -2,8 +2,9 @@ PV = "${ESW_VER}" | |||
2 | 2 | ||
3 | inherit python3native xlnx-embeddedsw pkgconfig cmake | 3 | inherit python3native xlnx-embeddedsw pkgconfig cmake |
4 | 4 | ||
5 | # Override xlnx-embeddedsw with out version | 5 | # It is unclear why the following is needed, but without this cmake/ninja |
6 | require conf/dtb-embeddedsw.inc | 6 | # will generate: -isystem /usr/include which will cause a build failure. |
7 | OECMAKE_ARGS:remove = "-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON" | ||
7 | 8 | ||
8 | SRCREV_FORMAT = "src_decouple" | 9 | SRCREV_FORMAT = "src_decouple" |
9 | 10 | ||
@@ -35,37 +36,43 @@ do_configure[depends] += "device-tree:do_deploy" | |||
35 | do_compile[depends] += "device-tree:do_deploy" | 36 | do_compile[depends] += "device-tree:do_deploy" |
36 | do_install[depends] += "device-tree:do_deploy" | 37 | do_install[depends] += "device-tree:do_deploy" |
37 | 38 | ||
38 | def get_xlnx_cmake_machine(fam, d): | 39 | def get_xlnx_cmake_machine(fam, variant, d): |
39 | cmake_machine = fam | 40 | cmake_machine = fam |
40 | if (fam == 'zynqmp'): | 41 | if (fam == 'zynqmp'): |
41 | cmake_machine = 'ZynqMP' | 42 | cmake_machine = 'ZynqMP' |
42 | elif (fam == 'versal'): | 43 | elif (fam == 'versal'): |
43 | cmake_machine = 'Versal' | 44 | cmake_machine = 'Versal' |
45 | if (variant == 'net'): | ||
46 | cmake_machine = 'VersalNet' | ||
44 | elif (fam == 'zynq'): | 47 | elif (fam == 'zynq'): |
45 | cmake_machine = 'Zynq' | 48 | cmake_machine = 'Zynq' |
46 | return cmake_machine | 49 | return cmake_machine |
47 | 50 | ||
48 | def get_xlnx_cmake_processor(tune, machine, d): | 51 | def get_xlnx_cmake_processor(tune, machine, variant, d): |
49 | cmake_processor = tune | 52 | cmake_processor = tune |
50 | if tune.startswith('microblaze'): | 53 | if tune.startswith('microblaze'): |
51 | if (machine == 'psu_pmu_0'): | 54 | if (machine == 'psu_pmu_0'): |
52 | cmake_processor = 'pmu_microblaze' | 55 | cmake_processor = 'pmu_microblaze' |
53 | elif (machine == 'psv_pmc_0'): | 56 | elif (machine in [ 'psv_pmc_0', 'psx_pmc_0' ]): |
54 | cmake_processor = 'plm_microblaze' | 57 | cmake_processor = 'plm_microblaze' |
55 | else: | 58 | else: |
56 | cmake_processor = 'microblaze' | 59 | cmake_processor = 'microblaze' |
57 | elif tune == 'cortexr5': | 60 | elif (tune in [ 'cortexr5', 'cortexr5hf' ]): |
58 | cmake_processor = 'cortexr5' | 61 | cmake_processor = 'cortexr5' |
62 | elif (tune in [ 'cortexr52', 'cortexr52hf' ]): | ||
63 | cmake_processor = 'cortexr52' | ||
59 | elif tune.startswith('cortexa9'): | 64 | elif tune.startswith('cortexa9'): |
60 | cmake_processor = 'cortexa9' | 65 | cmake_processor = 'cortexa9' |
61 | elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]): | 66 | elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]): |
62 | cmake_processor = 'cortexa53' | 67 | cmake_processor = 'cortexa53' |
63 | elif tune == 'cortexa72': | 68 | elif tune == 'cortexa72': |
64 | cmake_processor = 'cortexa72' | 69 | cmake_processor = 'cortexa72' |
70 | if (variant == 'net'): | ||
71 | cmake_processor = 'cortexa78' | ||
65 | return cmake_processor | 72 | return cmake_processor |
66 | 73 | ||
67 | XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d)}" | 74 | XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d.getVar('SOC_VARIANT'), d)}" |
68 | XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d)}" | 75 | XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d.getVar('SOC_VARIANT'), d)}" |
69 | XLNX_CMAKE_SYSTEM_NAME ?= "Generic" | 76 | XLNX_CMAKE_SYSTEM_NAME ?= "Generic" |
70 | XLNX_CMAKE_BSP_VARS ?= "" | 77 | XLNX_CMAKE_BSP_VARS ?= "" |
71 | 78 | ||
@@ -80,11 +87,11 @@ cmake_do_generate_toolchain_file:append() { | |||
80 | # set( CMAKE_SYSTEM_NAME `echo elf | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) | 87 | # set( CMAKE_SYSTEM_NAME `echo elf | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) |
81 | set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) | 88 | set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) |
82 | set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake) | 89 | set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake) |
83 | set( CMAKE_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR}) | 90 | set( CMAKE_LIBRARY_PATH ${B}) |
84 | if ("${XLNX_CMAKE_PROCESSOR}" STREQUAL "plm_microblaze") | 91 | if ("${XLNX_CMAKE_PROCESSOR}" STREQUAL "plm_microblaze") |
85 | set( CMAKE_BUILD_TYPE Release) | 92 | set( CMAKE_BUILD_TYPE Release) |
86 | endif() | 93 | endif() |
87 | add_definitions( "${XLNX_CMAKE_BSP_VARS}" ) | 94 | add_definitions( "${XLNX_CMAKE_BSP_VARS} -DSDT" ) |
88 | EOF | 95 | EOF |
89 | } | 96 | } |
90 | 97 | ||
@@ -96,6 +103,15 @@ do_install() { | |||
96 | } | 103 | } |
97 | 104 | ||
98 | CFLAGS:append = " ${ESW_CFLAGS}" | 105 | CFLAGS:append = " ${ESW_CFLAGS}" |
106 | EXTRA_OECMAKE += "-DYOCTO=ON" | ||
107 | |||
108 | do_configure:prepend() { | ||
109 | ( | ||
110 | cd ${S} | ||
111 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/lib/bsp/standalone/src/ hwcmake_metadata ${S} | ||
112 | install -m 0755 StandaloneExample.cmake ${S}/cmake/Findcommonmeta.cmake | ||
113 | ) | ||
114 | } | ||
99 | 115 | ||
100 | # We need to find the license file, which vaires depending on the component | 116 | # We need to find the license file, which vaires depending on the component |
101 | # recurse a maximum of x times, could be fancier but it gets complicated since | 117 | # recurse a maximum of x times, could be fancier but it gets complicated since |
@@ -135,9 +151,9 @@ python do_generate_driver_data() { | |||
135 | os.chdir(d.getVar('B')) | 151 | os.chdir(d.getVar('B')) |
136 | command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] | 152 | command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] |
137 | subprocess.run(command, check = True) | 153 | subprocess.run(command, check = True) |
138 | src_file = str("x") + driver_name.replace('-', '_') + str("_g.c") | 154 | src_file = glob.glob('*_g.c') |
139 | if os.path.exists(src_file): | 155 | if os.path.exists(src_file[0]): |
140 | bb.note("Generated config file for driver %s" % driver_name) | 156 | bb.note("Generated config file for driver %s" % driver_name) |
141 | command = ["install"] + ["-m"] + ["0755"] + [src_file] + [src_dir[0]] | 157 | command = ["install"] + ["-m"] + ["0755"] + [src_file[0]] + [src_dir[0]] |
142 | subprocess.run(command, check = True) | 158 | subprocess.run(command, check = True) |
143 | } | 159 | } |
diff --git a/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass new file mode 100644 index 00000000..85b753a5 --- /dev/null +++ b/meta-xilinx-standalone-experimental/classes-recipe/esw_apps_common.bbclass | |||
@@ -0,0 +1,31 @@ | |||
1 | # | ||
2 | # Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved. | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # This bbclass is inherited by esw application recipes. This class provides | ||
7 | # common code for elf name, bitbake install and deploy task functionality for | ||
8 | # multiconfig target images. | ||
9 | |||
10 | inherit deploy image-artifact-names | ||
11 | |||
12 | APP_IMAGE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}" | ||
13 | |||
14 | ESW_EXECUTABLE_NAME ?= "" | ||
15 | |||
16 | do_install() { | ||
17 | install -d ${D}/${base_libdir}/firmware | ||
18 | # Note that we have to make the ELF executable for it to be stripped | ||
19 | install -m 0755 ${B}/${ESW_EXECUTABLE_NAME}* ${D}/${base_libdir}/firmware | ||
20 | } | ||
21 | |||
22 | do_deploy() { | ||
23 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
24 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf | ||
25 | ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf | ||
26 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.elf ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin | ||
27 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin | ||
28 | ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin | ||
29 | } | ||
30 | |||
31 | addtask deploy before do_build after do_package | ||
diff --git a/meta-xilinx-standalone-experimental/classes/esw_examples.bbclass b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass index 43e78191..9a94f3cd 100644 --- a/meta-xilinx-standalone-experimental/classes/esw_examples.bbclass +++ b/meta-xilinx-standalone-experimental/classes-recipe/esw_examples.bbclass | |||
@@ -7,6 +7,7 @@ do_configure:prepend() { | |||
7 | cd ${S} | 7 | cd ${S} |
8 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | 8 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} |
9 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | 9 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ |
10 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
10 | ) | 11 | ) |
11 | } | 12 | } |
12 | 13 | ||
diff --git a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc b/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc deleted file mode 100644 index a9192f62..00000000 --- a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # The format of this file must be compatible with | ||
2 | # meta-xilinx/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | ||
3 | |||
4 | # Make it clear decoupling is 'experimental' in the version | ||
5 | ESW_VER = "2023_sdt_experimental" | ||
6 | |||
7 | REPO = "git://github.com/Xilinx/embeddedsw-experimental-dt-support.git;protocol=https" | ||
8 | |||
9 | ESW_BRANCH[2023_sdt_experimental] = "xlnx_rel_v2023.2_sdt" | ||
10 | ESW_REV[2023_sdt_experimental] = "742a608800e7621fb7c376daf5124333b5826d6d" | ||
11 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_sdt] = 'ce611484168a6000bd35df68fc4f4290' | ||
diff --git a/meta-xilinx-standalone-experimental/conf/layer.conf b/meta-xilinx-standalone-experimental/conf/layer.conf index 6cfd01c3..b4282ce0 100644 --- a/meta-xilinx-standalone-experimental/conf/layer.conf +++ b/meta-xilinx-standalone-experimental/conf/layer.conf | |||
@@ -19,7 +19,8 @@ LAYERDEPENDS_xilinx-standalone-exp = "core \ | |||
19 | xilinx \ | 19 | xilinx \ |
20 | xilinx-standalone \ | 20 | xilinx-standalone \ |
21 | xilinx-microblaze \ | 21 | xilinx-microblaze \ |
22 | virtualization-layer \ | 22 | virtualization-layer \ |
23 | openamp-layer \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | LAYERSERIES_COMPAT_xilinx-standalone-exp = "scarthgap" | 26 | LAYERSERIES_COMPAT_xilinx-standalone-exp = "scarthgap" |
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb new file mode 100644 index 00000000..4287bb0a --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.1.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/ddr_self_refresh/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer xilpm" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "ddr_self_refresh" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | |||
26 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
27 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
28 | |||
29 | FILES:${PN} = "${base_libdir}/firmware/ddr_self_refresh*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_2024.1.bb index d62779ae..2c70796a 100644 --- a/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-applications/empty-application/empty-application_2024.1.bb | |||
@@ -1,11 +1,9 @@ | |||
1 | inherit esw deploy | 1 | inherit esw deploy python3native |
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/empty_application/src/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_apps/empty_application/src/" |
4 | 4 | ||
5 | DEPENDS += "libxil xiltimer" | 5 | DEPENDS += "libxil xiltimer" |
6 | 6 | ||
7 | inherit python3native | ||
8 | |||
9 | do_configure:prepend() { | 7 | do_configure:prepend() { |
10 | ( | 8 | ( |
11 | cd ${S} | 9 | cd ${S} |
@@ -24,7 +22,7 @@ EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | |||
24 | 22 | ||
25 | inherit image-artifact-names | 23 | inherit image-artifact-names |
26 | 24 | ||
27 | CUSTOM_APP_BASE_NAME ?= "${CUSTOM_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 25 | CUSTOM_APP_BASE_NAME ?= "${CUSTOM_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}" |
28 | 26 | ||
29 | ESW_COMPONENT ??= "empty_application.elf" | 27 | ESW_COMPONENT ??= "empty_application.elf" |
30 | 28 | ||
@@ -38,8 +36,8 @@ do_install() { | |||
38 | 36 | ||
39 | do_deploy() { | 37 | do_deploy() { |
40 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.elf | 38 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.elf |
41 | ln -sf ${CUSTOM_APP_BASE_NAME}.elf ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}.elf | 39 | ln -sf ${CUSTOM_APP_BASE_NAME}.elf ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.elf |
42 | install -m 0644 ${B}/empty_application.bin ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.bin | 40 | install -m 0644 ${B}/empty_application.bin ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.bin |
43 | ln -sf ${CUSTOM_APP_BASE_NAME}.bin ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}.bin | 41 | ln -sf ${CUSTOM_APP_BASE_NAME}.bin ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.bin |
44 | } | 42 | } |
45 | addtask deploy before do_build after do_install | 43 | addtask deploy before do_build after do_install |
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb new file mode 100644 index 00000000..97d2ba0a --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_2024.1.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_hello_world/src/" | ||
4 | |||
5 | DEPENDS += "libxil xilstandalone freertos10-xilinx xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_hello_world" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | FILES:${PN} = "${base_libdir}/firmware/freertos_hello_world*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb deleted file mode 100644 index 8106684b..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-hello-world/freertos-hello-world_git.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_hello_world/src/" | ||
4 | |||
5 | DEPENDS += "libxil xilstandalone freertos10-xilinx xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
12 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
13 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_install() { | ||
18 | install -d ${D}/${base_libdir}/firmware | ||
19 | # Note that we have to make the ELF executable for it to be stripped | ||
20 | install -m 0755 ${B}/freertos_hello_world* ${D}/${base_libdir}/firmware | ||
21 | } | ||
22 | |||
23 | inherit image-artifact-names | ||
24 | |||
25 | FREERTOS_HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
26 | |||
27 | do_deploy() { | ||
28 | |||
29 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
30 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.elf | ||
31 | ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
32 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin | ||
33 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_hello_world.bin ${DEPLOYDIR}/${FREERTOS_HELLO_WORLD_BASE_NAME}.bin | ||
34 | ln -sf ${FREERTOS_HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
35 | } | ||
36 | |||
37 | addtask deploy before do_build after do_package | ||
38 | |||
39 | FILES:${PN} = "${base_libdir}/firmware/freertos_hello_world*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb new file mode 100644 index 00000000..58d5b9c7 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_echo_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_lwip_echo_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_echo*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb deleted file mode 100644 index f7eae1dc..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_echo_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
12 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
13 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/freertos_lwip_echo* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | FREERTOS_LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.elf | ||
40 | ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_echo_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_ECHO_BASE_NAME}.bin | ||
43 | ln -sf ${FREERTOS_LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_echo*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb new file mode 100644 index 00000000..5c00254c --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_lwip_tcp_perf_client" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb deleted file mode 100644 index 51b89b8e..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
12 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
13 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/freertos_lwip_tcp_perf_client* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf | ||
40 | ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin | ||
43 | ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb new file mode 100644 index 00000000..910a6fa2 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_lwip_tcp_perf_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb deleted file mode 100644 index 606fd01e..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_tcp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
12 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
13 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/freertos_lwip_tcp_perf_server* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf | ||
40 | ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_tcp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin | ||
43 | ln -sf ${FREERTOS_LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_tcp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb new file mode 100644 index 00000000..c20d640d --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_lwip_udp_perf_client" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb deleted file mode 100644 index 7f9d86e2..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/freertos_lwip_udp_perf_client* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf | ||
40 | ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_client.bin ${DEPLOYDIR}/${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin | ||
43 | ln -sf ${FREERTOS_LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb new file mode 100644 index 00000000..194b0565 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "freertos_lwip_udp_perf_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb deleted file mode 100644 index 4fc02f36..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/freertos_lwip_udp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer freertos10-xilinx" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/freertos_lwip_udp_perf_server* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf | ||
40 | ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/freertos_lwip_udp_perf_server.bin ${DEPLOYDIR}/${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin | ||
43 | ln -sf ${FREERTOS_LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/freertos_lwip_udp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb new file mode 100644 index 00000000..ee0afec5 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_2024.1.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | inherit esw deploy python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/hello_world/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "hello_world" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
20 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
21 | |||
22 | FILES:${PN} = "${base_libdir}/firmware/hello_world*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb deleted file mode 100644 index 1de5ef8c..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/hello-world/hello-world_git.bb +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/hello_world/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | inherit python3native | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_install() { | ||
20 | install -d ${D}/${base_libdir}/firmware | ||
21 | # Note that we have to make the ELF executable for it to be stripped | ||
22 | install -m 0755 ${B}/hello_world* ${D}/${base_libdir}/firmware | ||
23 | } | ||
24 | |||
25 | inherit image-artifact-names | ||
26 | |||
27 | HELLO_WORLD_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
28 | |||
29 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
30 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
31 | |||
32 | do_deploy() { | ||
33 | |||
34 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
35 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.elf | ||
36 | ln -sf ${HELLO_WORLD_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
37 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/hello_world.elf ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin | ||
38 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/hello_world.bin ${DEPLOYDIR}/${HELLO_WORLD_BASE_NAME}.bin | ||
39 | ln -sf ${HELLO_WORLD_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
40 | } | ||
41 | |||
42 | addtask deploy before do_build after do_package | ||
43 | |||
44 | FILES:${PN} = "${base_libdir}/firmware/hello_world*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb new file mode 100644 index 00000000..f3397f7f --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_echo_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "lwip_echo_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/lwip_echo*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb deleted file mode 100644 index c59d816e..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-echo-server/lwip-echo-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_echo_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/lwip_echo* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | LWIP_ECHO_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.elf | ||
40 | ln -sf ${LWIP_ECHO_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_echo.bin ${DEPLOYDIR}/${LWIP_ECHO_BASE_NAME}.bin | ||
43 | ln -sf ${LWIP_ECHO_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/lwip_echo*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb new file mode 100644 index 00000000..bc90046e --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "lwip_tcp_perf_client" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb deleted file mode 100644 index b9834e34..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/lwip_tcp_perf_client* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | LWIP_TCP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf | ||
40 | ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_client.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin | ||
43 | ln -sf ${LWIP_TCP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb new file mode 100644 index 00000000..5c9cd5fa --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "lwip_tcp_perf_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb deleted file mode 100644 index 0acc4b8f..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_tcp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/lwip_tcp_perf_server* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | LWIP_TCP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf | ||
40 | ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_tcp_perf_server.bin ${DEPLOYDIR}/${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin | ||
43 | ln -sf ${LWIP_TCP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/lwip_tcp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb new file mode 100644 index 00000000..2855b08c --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "lwip_udp_perf_client" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb deleted file mode 100644 index 00a9eaa6..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_client/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/lwip_udp_perf_client* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | LWIP_UDP_PERF_CLIENT_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf | ||
40 | ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_client.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin | ||
43 | ln -sf ${LWIP_UDP_PERF_CLIENT_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_client*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb new file mode 100644 index 00000000..149e7a6c --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "lwip_udp_perf_server" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb deleted file mode 100644 index 5f54caf9..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_git.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/lwip_udp_perf_server/src/" | ||
4 | |||
5 | DEPENDS += "libxil lwip xiltimer" | ||
6 | |||
7 | do_configure:prepend() { | ||
8 | ( | ||
9 | cd ${S} | ||
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
12 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
13 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
14 | ) | ||
15 | } | ||
16 | |||
17 | do_generate_app_data() { | ||
18 | # This script should also not rely on relative paths and such | ||
19 | cd ${S} | ||
20 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
21 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | } | ||
23 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
24 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${base_libdir}/firmware | ||
28 | # Note that we have to make the ELF executable for it to be stripped | ||
29 | install -m 0755 ${B}/lwip_udp_perf_server* ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | inherit image-artifact-names | ||
33 | |||
34 | LWIP_UDP_PERF_SERVER_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
35 | |||
36 | do_deploy() { | ||
37 | |||
38 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
39 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf | ||
40 | ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
41 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.elf ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin | ||
42 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/lwip_udp_perf_server.bin ${DEPLOYDIR}/${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin | ||
43 | ln -sf ${LWIP_UDP_PERF_SERVER_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
44 | } | ||
45 | |||
46 | addtask deploy before do_build after do_package | ||
47 | |||
48 | FILES:${PN} = "${base_libdir}/firmware/lwip_udp_perf_server*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb new file mode 100644 index 00000000..8420171b --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_2024.1.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/memory_tests/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "memory_tests" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} memtest | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | FILES:${PN} = "${base_libdir}/firmware/memory_tests*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb deleted file mode 100644 index 1ece5a8c..00000000 --- a/meta-xilinx-standalone-experimental/recipes-applications/memory-tests/memory-tests_git.bb +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/memory_tests/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | inherit python3native | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} memtest | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_install() { | ||
20 | install -d ${D}/${base_libdir}/firmware | ||
21 | # Note that we have to make the ELF executable for it to be stripped | ||
22 | install -m 0755 ${B}/memory_tests* ${D}/${base_libdir}/firmware | ||
23 | } | ||
24 | |||
25 | inherit image-artifact-names | ||
26 | |||
27 | MEMORY_TESTS_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
28 | |||
29 | do_deploy() { | ||
30 | |||
31 | # We need to deploy the stripped elf, hence why not doing it from ${D} | ||
32 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.elf ${DEPLOYDIR}/${MEMORY_TESTS_BASE_NAME}.elf | ||
33 | ln -sf ${MEMORY_TESTS_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | ||
34 | ${OBJCOPY} -O binary ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.elf ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.bin | ||
35 | install -m 0644 ${WORKDIR}/package/${base_libdir}/firmware/memory_tests.bin ${DEPLOYDIR}/${MEMORY_TESTS_BASE_NAME}.bin | ||
36 | ln -sf ${MEMORY_TESTS_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | ||
37 | } | ||
38 | |||
39 | addtask deploy before do_build after do_package | ||
40 | |||
41 | FILES:${PN} = "${base_libdir}/firmware/memory_tests*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb new file mode 100644 index 00000000..58f08bf2 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-echo-testd.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require openamp-fw.inc | ||
2 | |||
3 | PROVIDES:append:armv7r = " openamp-fw-echo-testd " | ||
4 | |||
5 | OPENAMP_FW_SRC_NAME = "rpmsg-echo.out" | ||
6 | OPENAMP_FW_NAME = "image_echo_test" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb new file mode 100644 index 00000000..c8d4382d --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-mat-muld.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require openamp-fw.inc | ||
2 | |||
3 | PROVIDES:append:armv7r = " openamp-fw-mat-muld " | ||
4 | |||
5 | OPENAMP_FW_SRC_NAME = "matrix_multiplyd.out" | ||
6 | OPENAMP_FW_NAME = "image_matrix_multiply" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb new file mode 100644 index 00000000..4efdb4c6 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw-rpc-demo.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | require openamp-fw.inc | ||
2 | |||
3 | PROVIDES:append:armv7r = " openamp-fw-rpc-demo " | ||
4 | |||
5 | OPENAMP_FW_SRC_NAME = "rpc_demo.out" | ||
6 | OPENAMP_FW_NAME = "image_rpc_demo" | ||
7 | OPENAMP_WITH_PROXY = "ON" | ||
8 | |||
9 | # NOTE: BSP should have flag ESW_CFLAGS:append = " -DUNDEFINE_FILE_OPS=1 " | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc new file mode 100644 index 00000000..398f8dce --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/openamp-fw/openamp-fw.inc | |||
@@ -0,0 +1,27 @@ | |||
1 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
2 | LICENSE = "MIT" | ||
3 | INSANE_SKIP:${PN} = "arch" | ||
4 | |||
5 | FW_LIB_DIR = "/lib/firmware" | ||
6 | |||
7 | OPENAMP_FW_SRC_NAME ?= "rpmsg-echo.out" | ||
8 | OPENAMP_FW_NAME ?= "image_echo_test" | ||
9 | |||
10 | FW_MACHINE:zynqmp = "cortexr5-0-zynqmp" | ||
11 | FW_MACHINE:versal = "cortexr5-0-versal" | ||
12 | FW_MACHINE:versal-net = "cortexr52-0-versal-net" | ||
13 | FW_OS ?= "baremetal" | ||
14 | |||
15 | OPENAMP_FW_DEPLOY_DIR ?= "${MC_TMPDIR_PREFIX}-${FW_MACHINE}-${FW_OS}/deploy/images/${MACHINE}" | ||
16 | DEPENDS = " open-amp-xlnx " | ||
17 | do_install[mcdepends] += "mc::${FW_MACHINE}-${FW_OS}:open-amp-xlnx:do_deploy" | ||
18 | do_install() { | ||
19 | install -d ${D}${FW_LIB_DIR} | ||
20 | src=${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME} | ||
21 | dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME} | ||
22 | install -m 0644 ${src} ${dest} | ||
23 | } | ||
24 | |||
25 | do_compile[noexec] = "1" | ||
26 | |||
27 | FILES:${PN} = "/lib/firmware/${OPENAMP_FW_NAME}" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_git.bb b/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_2024.1.bb index b6b15d5a..d2fb106a 100644 --- a/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-applications/peripheral-tests/peripheral-tests_2024.1.bb | |||
@@ -1,10 +1,10 @@ | |||
1 | inherit esw deploy | 1 | inherit esw python3native esw_apps_common |
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/peripheral_tests/src/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_apps/peripheral_tests/src/" |
4 | 4 | ||
5 | DEPENDS += "libxil xiltimer" | 5 | DEPENDS += "libxil xiltimer" |
6 | 6 | ||
7 | inherit python3native | 7 | ESW_EXECUTABLE_NAME = "peripheral_tests" |
8 | 8 | ||
9 | do_configure:prepend() { | 9 | do_configure:prepend() { |
10 | ( | 10 | ( |
@@ -37,16 +37,8 @@ python do_generate_app_data() { | |||
37 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | 37 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot |
38 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | 38 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" |
39 | 39 | ||
40 | PERIPHERAL_TEST_APP_IMAGE_NAME ??= "${BPN}" | ||
41 | |||
42 | inherit image-artifact-names | ||
43 | |||
44 | PERIPHERAL_TEST_BASE_NAME ?= "${PERIPHERAL_TEST_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
45 | |||
46 | ESW_COMPONENT ??= "peripheral_tests.elf" | ||
47 | |||
48 | do_compile:append() { | 40 | do_compile:append() { |
49 | ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/peripheral_tests.bin | 41 | ${OBJCOPY} -O binary ${B}/${ESW_EXECUTABLE_NAME}.elf ${B}${ESW_EXECUTABLE_NAME}.bin |
50 | } | 42 | } |
51 | 43 | ||
52 | do_install() { | 44 | do_install() { |
@@ -54,9 +46,8 @@ do_install() { | |||
54 | } | 46 | } |
55 | 47 | ||
56 | do_deploy() { | 48 | do_deploy() { |
57 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PERIPHERAL_TEST_BASE_NAME}.elf | 49 | install -Dm 0644 ${B}/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf |
58 | ln -sf ${PERIPHERAL_TEST_BASE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}.elf | 50 | ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf |
59 | install -m 0644 ${B}/peripheral_tests.bin ${DEPLOYDIR}/${PERIPHERAL_TEST_BASE_NAME}.bin | 51 | install -m 0644 ${B}/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin |
60 | ln -sf ${PERIPHERAL_TEST_BASE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}.bin | 52 | ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin |
61 | } | 53 | } |
62 | addtask deploy before do_build after do_install | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb b/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb new file mode 100644 index 00000000..5def36c3 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/sample-fw-package/sample-fw-package.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | SUMMARY = "Sample recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | inherit fw-package | ||
5 | |||
6 | FW_NAME = "hello-world" | ||
7 | |||
8 | TARGET_MC = "cortexr5-0-zynqmp-baremetal" | ||
9 | |||
10 | FW_MCDEPENDS := "${@bb.utils.contains('BBMULTICONFIG', '${TARGET_MC}', 'mc::${TARGET_MC}:${FW_NAME}:do_deploy', '', d)}" | ||
11 | FW_DEPLOY_DIR := "${@bb.utils.contains('BBMULTICONFIG', '${TARGET_MC}', '${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb new file mode 100644 index 00000000..03ada8c1 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/srec-bootloader/srec-bootloader_2024.1.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/srec_bootloader/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "srec_bootloader" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
20 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
21 | |||
22 | FILES:${PN} = "${base_libdir}/firmware/srec_bootloader*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb new file mode 100644 index 00000000..e6f29570 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.1.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/srec_spi_bootloader/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "srec_spi_bootloader" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
20 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
21 | |||
22 | FILES:${PN} = "${base_libdir}/firmware/srec_spi_bootloader*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb new file mode 100644 index 00000000..8e0b0c06 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/zynq-dram-test/zynq-dram-test_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/zynq_dram_test/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "zynq_dram_test" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/zynq_dram*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb new file mode 100644 index 00000000..25215801 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.1.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/zynqmp_dram_test/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "zynqmp_dram_test" | ||
8 | |||
9 | do_configure:prepend() { | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | do_generate_app_data() { | ||
20 | # This script should also not rely on relative paths and such | ||
21 | cd ${S} | ||
22 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
23 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
24 | } | ||
25 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
26 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
27 | |||
28 | FILES:${PN} = "${base_libdir}/firmware/zynqmp_dram*" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_2024.1.bb index e6cf1d8b..f99db010 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_2024.1.bb | |||
@@ -1,9 +1,6 @@ | |||
1 | # Can't depend on esw since this is needed for setup! | 1 | # Can't depend on esw since this is needed for setup! |
2 | inherit xlnx-embeddedsw | 2 | inherit xlnx-embeddedsw |
3 | 3 | ||
4 | # We need to override the inherit | ||
5 | require conf/dtb-embeddedsw.inc | ||
6 | |||
7 | S = "${WORKDIR}/git" | 4 | S = "${WORKDIR}/git" |
8 | B = "${WORKDIR}/build" | 5 | B = "${WORKDIR}/build" |
9 | 6 | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bbappend index d40f3cdb..d40f3cdb 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bbappend | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_2024.1.bbappend index 202764ac..202764ac 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/plm-firmware_2024.1.bbappend | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bbappend index 0c51fbad..0c51fbad 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bbappend | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_2024.1.bbappend index 96cd38cd..96cd38cd 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/psm-firmware_2024.1.bbappend | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup deleted file mode 100644 index 0a5736d8..00000000 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | Document Version: 20230112 | ||
2 | |||
3 | The Yocto Project setup for the System Device Tree workflow is as follows. | ||
4 | Be sure to read everything below, as the steps will be updated in the future | ||
5 | if the setup script changes. | ||
6 | |||
7 | The steps in this document expect that you have already built the setup | ||
8 | (meta-xilinx-setup) SDK, and installed it. | ||
9 | |||
10 | * Run the setup script | ||
11 | |||
12 | The setup environment should be run in a new shell (not the build shell) | ||
13 | to ensure that you do not contaminate the environment for your build. | ||
14 | |||
15 | We will assume below that the directory "prestep" was used for the SDK, | ||
16 | however you may use any path you wish. | ||
17 | |||
18 | Source the SDK environment file | ||
19 | $ . <build>/prestep/environment-setup-x86_64-petalinux-linux | ||
20 | |||
21 | Run the script from the same directory as this README | ||
22 | $ <build>/prestep/dt-processor.sh -c <conf> -s <dtb> -l conf/local.conf | ||
23 | |||
24 | Note: The -l option will automatically add the necessary parameters to the | ||
25 | local.conf file. If you need to re-run this comment, you just clear the | ||
26 | parameters from the end of the file. Without the -l option the items are | ||
27 | printed to the screen and must be manually added to your conf/local.conf | ||
28 | |||
29 | For example, zynqmp: | ||
30 | $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/zcu102-sdt/system-top.dts -l conf/local.conf | ||
31 | |||
32 | The following will be written to the end of the conf/local.conf file: | ||
33 | |||
34 | # Each multiconfig will define it's own TMPDIR, this is the new default based | ||
35 | # on BASE_TMPDIR for the Linux build | ||
36 | TMPDIR = "${BASE_TMPDIR}/tmp" | ||
37 | |||
38 | # Use the newly generated MACHINE | ||
39 | MACHINE = "xlnx-zynqmp-zcu102-rev1-0" | ||
40 | |||
41 | # All of the TMPDIRs must be in a common parent directory. This is defined | ||
42 | # as BASE_TMPDIR. | ||
43 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp | ||
44 | BASE_TMPDIR ?= "${TOPDIR}" | ||
45 | |||
46 | # The following is the full set of multiconfigs for this configuration | ||
47 | # A large list can cause a slow parse. | ||
48 | BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal cortexa53-0-zynqmp-baremetal cortexa53-0-zynqmp-freertos cortexa53-1-zynqmp-baremetal cortexa53-1-zynqmp-freertos cortexa53-2-zynqmp-baremetal cortexa53-2-zynqmp-freertos cortexa53-3-zynqmp-baremetal cortexa53-3-zynqmp-freertos cortexr5-0-zynqmp-fsbl-baremetal cortexr5-0-zynqmp-baremetal cortexr5-0-zynqmp-freertos cortexr5-1-zynqmp-baremetal cortexr5-1-zynqmp-freertos microblaze-0-pmu" | ||
49 | # Alternatively trim the list to the minimum | ||
50 | #BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal microblaze-0-pmu" | ||
51 | |||
52 | |||
53 | For example, versal: | ||
54 | $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/vmk180-sdt/system-top.dts -l conf/local.conf | ||
55 | |||
56 | The following will be written to the end of the conf/local.conf file: | ||
57 | |||
58 | # Each multiconfig will define it's own TMPDIR, this is the new default based | ||
59 | # on BASE_TMPDIR for the Linux build | ||
60 | TMPDIR = "${BASE_TMPDIR}/tmp" | ||
61 | |||
62 | # Use the newly generated MACHINE | ||
63 | MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva" | ||
64 | |||
65 | # All of the TMPDIRs must be in a common parent directory. This is defined | ||
66 | # as BASE_TMPDIR. | ||
67 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp | ||
68 | BASE_TMPDIR ?= "${TOPDIR}" | ||
69 | |||
70 | # The following is the full set of multiconfigs for this configuration | ||
71 | # A large list can cause a slow parse. | ||
72 | BBMULTICONFIG = " cortexa72-0-versal-baremetal cortexa72-0-versal-freertos cortexa72-1-versal-baremetal cortexa72-1-versal-freertos microblaze-0-pmc microblaze-0-psm cortexr5-0-versal-baremetal cortexr5-0-versal-freertos cortexr5-1-versal-baremetal cortexr5-1-versal-freertos" | ||
73 | # Alternatively trim the list to the minimum | ||
74 | #BBMULTICONFIG = " microblaze-0-pmc microblaze-0-psm" | ||
75 | |||
76 | |||
77 | You can now EXIT THE NEW SHELL return the build environment for the remaining steps. | ||
78 | |||
79 | * Bitbake Performance Note | ||
80 | |||
81 | Each BBMULTICONFIG value requires all of the recipes to be parsed for that | ||
82 | configuration. Thus each multiconfig will add more parsing time. A long list | ||
83 | can lead to a very slow parse (many minutes). To speed up parsing, it is | ||
84 | suggested that you trim this down to only the configurations you require. | ||
85 | A minimum configuration is included with the generated configuration. | ||
86 | |||
87 | * Build your project | ||
88 | |||
89 | You should now be able to build your project normally. See the Yocto Project | ||
90 | documentation if you have questions on how to work with the multiconfig | ||
91 | recipes. The following is a simple build for testing. | ||
92 | |||
93 | In the original build shell | ||
94 | Build your Linux sytem: | ||
95 | $ bitbake petalinux-image-minimal | ||
96 | |||
97 | The output will be in tmp/deploy/images/... | ||
98 | |||
99 | If the system is QEMU capable execute QEMU using: | ||
100 | $ runqemu nographic slirp core-image-minimal | ||
101 | |||
102 | To terminate qemu, usually the command is ctrl-a x | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh deleted file mode 100755 index 1c754689..00000000 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh +++ /dev/null | |||
@@ -1,1260 +0,0 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | # Copyright (c) 2021-2022 Xilinx Inc | ||
4 | # Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights reserved. | ||
5 | # | ||
6 | # Permission is hereby granted, free of charge, to any person obtaining a copy | ||
7 | # of this software and associated documentation files (the "Software"), to deal | ||
8 | # in the Software without restriction, including without limitation the rights | ||
9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
10 | # copies of the Software, and to permit persons to whom the Software is | ||
11 | # furnished to do so, subject to the following conditions: | ||
12 | # | ||
13 | # The above copyright notice and this permission notice shall be included in | ||
14 | # all copies or substantial portions of the Software. | ||
15 | # | ||
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
22 | # THE SOFTWARE. | ||
23 | |||
24 | # This script configures the Yocto Project build system for use with the System | ||
25 | # Device Tree workflow when building for a Xilinx FPGA, such as the ZynqMP or | ||
26 | # Versal. | ||
27 | |||
28 | error() { echo "ERROR: $1" >&2; exit 1; } | ||
29 | |||
30 | warn() { echo "WARNING: $1"; } | ||
31 | |||
32 | info() { echo "INFO: $1"; } | ||
33 | |||
34 | usage() { | ||
35 | cat <<EOF | ||
36 | $0 | ||
37 | -c <config_dir> Location of the build conf directory | ||
38 | -s <system_dts> Path to system dts | ||
39 | [-d <domain_file>] Path to domain file (.yml/.dts) | ||
40 | [-o <overlay_dts>] Generate overlay dts | ||
41 | [-e <external_fpga>] Apply a partial overlay | ||
42 | [-m <machine_conf>] The name of the machine .conf to generate | ||
43 | [-D <dts_path>] Absolute path or subdirectory of conf/dts to place DTS files in (usually auto detected from DTS) | ||
44 | [-t <machine>] Machine type: zynqmp or versal (usually auto detected) | ||
45 | [-v <soc_variant>] SOC Variant: cg, dr, eg, ev, ai-prime, premium (usually auto detected) | ||
46 | [-r <require_machine>] This machine will be required, instead of the generic machine if defined | ||
47 | [-O <overrides>] Optional, can add additional overrides to the generated machine | ||
48 | [-p <psu_init_path>] Path to psu_init files, defaults to system_dts path | ||
49 | [-i <pdi_path>] Path to the pdi file | ||
50 | [-l <config_file>] write local.conf changes to this file | ||
51 | [-P <petalinux_schema>] Path to petalinux schema file | ||
52 | |||
53 | EOF | ||
54 | exit | ||
55 | } | ||
56 | |||
57 | parse_args() { | ||
58 | [ $# -eq 0 ] && usage | ||
59 | [ $1 = "--help" ] && usage | ||
60 | |||
61 | while getopts ":c:s:d:o:e:m:D:l:hP:p:i:t:v:r:O:" opt; do | ||
62 | case ${opt} in | ||
63 | c) config_dir=$OPTARG ;; | ||
64 | s) system_dts=$OPTARG ;; | ||
65 | o) overlay_dts=$OPTARG ;; | ||
66 | d) domain_file=$OPTARG ;; | ||
67 | e) external_fpga=$OPTARG ;; | ||
68 | m) mach_conf=$OPTARG ; mach_conf=${mach_conf%%.conf} ;; | ||
69 | D) dts_path=$OPTARG ;; | ||
70 | t) machine=$OPTARG ;; | ||
71 | v) soc_variant=$OPTARG ;; | ||
72 | r) incmachine=$OPTARG ;; | ||
73 | O) overrides=$OPTARG ;; | ||
74 | p) psu_init_path=$OPTARG ;; | ||
75 | i) pdi_path=$OPTARG ;; | ||
76 | l) localconf=$OPTARG ;; | ||
77 | P) petalinux_schema=$OPTARG ;; | ||
78 | h) usage ;; | ||
79 | :) error "Missing argument for -$OPTARG" ;; | ||
80 | \?) error "Invalid option -$OPTARG" ;; | ||
81 | esac | ||
82 | done | ||
83 | |||
84 | [ -z "${config_dir}" ] && error "You must specify the path to the build conf directory with -c" | ||
85 | [ -z "${system_dts}" ] && error "You must specify the path to the system device tree with -s" | ||
86 | [ -f "${config_dir}/local.conf" ] || error "Invalid config dir: ${config_dir}" | ||
87 | [ -f "${system_dts}" ] || error "Unable to find: ${system_dts}" | ||
88 | system_dts=$(realpath ${system_dts}) | ||
89 | if [ -z "$psu_init_path" ]; then | ||
90 | psu_init_path=$(dirname ${system_dts}) | ||
91 | else | ||
92 | psu_init_path=$(realpath ${psu_init_path}) | ||
93 | fi | ||
94 | if [ -z "$pdi_path" ]; then | ||
95 | pdi_path=$(dirname ${system_dts}) | ||
96 | else | ||
97 | pdi_path=$(realpath ${pdi_path}) | ||
98 | fi | ||
99 | if [ -n "$domain_file" ]; then | ||
100 | domain_file=$(realpath ${domain_file}) | ||
101 | fi | ||
102 | |||
103 | } | ||
104 | |||
105 | detect_machine() { | ||
106 | if [ -z "${machine}" ]; then | ||
107 | if [ -n "${deviceid}" ]; then | ||
108 | case ${deviceid} in | ||
109 | # ZynqMP variants | ||
110 | xczu*cg) | ||
111 | machine="zynqmp" | ||
112 | soc_variant="cg" ;; | ||
113 | xczu*dr) | ||
114 | machine="zynqmp" | ||
115 | soc_variant="dr" ;; | ||
116 | xczu*eg) | ||
117 | machine="zynqmp" | ||
118 | soc_variant="eg" ;; | ||
119 | xczu*ev) | ||
120 | machine="zynqmp" | ||
121 | soc_variant="ev" ;; | ||
122 | # Versal variants | ||
123 | xcvm*) | ||
124 | machine="versal" | ||
125 | soc_variant="prime" ;; | ||
126 | xcvc*) | ||
127 | machine="versal" | ||
128 | soc_variant="ai-core" ;; | ||
129 | xcve*) | ||
130 | machine="versal" | ||
131 | soc_variant="ai-edge" ;; | ||
132 | xcvn*) | ||
133 | machine="versal" | ||
134 | soc_variant="net" ;; | ||
135 | xcvp*) | ||
136 | machine="versal" | ||
137 | soc_variant="premium" ;; | ||
138 | xcvh*) | ||
139 | machine="versal" | ||
140 | soc_variant="hbm" ;; | ||
141 | # Special Case Starter Kit SOMs | ||
142 | xck26) | ||
143 | if [ -z "${incmachine}" ]; then | ||
144 | incmachine="k26-smk.conf" | ||
145 | fi | ||
146 | machine="zynqmp" | ||
147 | soc_variant="ev" ;; | ||
148 | xck24) | ||
149 | if [ -z "${incmachine}" ]; then | ||
150 | incmachine="k24-smk.conf" | ||
151 | fi | ||
152 | machine="zynqmp" | ||
153 | soc_variant="eg" ;; | ||
154 | esac | ||
155 | else | ||
156 | # Identify the system type first using PSM/PMC/PMU | ||
157 | while read -r cpu core domain cpu_name os_hint; do | ||
158 | case ${cpu} in | ||
159 | pmu-microblaze) | ||
160 | machine="zynqmp" ;; | ||
161 | pmc-microblaze | psm-microblaze) | ||
162 | machine="versal" ;; | ||
163 | esac | ||
164 | done <${cpulist} | ||
165 | fi | ||
166 | fi | ||
167 | |||
168 | # Machine not provided and we cannot identify.. | ||
169 | [ -z ${machine} ] && \ | ||
170 | error "Unable to autodetect machine type, use -t to specify the machine." | ||
171 | |||
172 | case ${machine} in | ||
173 | zynqmp | versal) : ;; | ||
174 | *) error "Invalid machine type ${machine}; please choose zynqmp or versal" | ||
175 | esac | ||
176 | |||
177 | [ -z ${soc_variant} ] && \ | ||
178 | warn "Unable to autodetect soc variant, use -v to specify a variant." | ||
179 | } | ||
180 | |||
181 | dump_cpus() { | ||
182 | prefix="$1" | ||
183 | while read -r cpu core domain cpu_name os_hint; do | ||
184 | case ${cpu} in | ||
185 | \#*) ;; | ||
186 | \[*) ;; | ||
187 | pmu-microblaze) echo "${prefix}zynqmp-pmu ${cpu_name}" ;; | ||
188 | pmc-microblaze) echo "${prefix}versal-plm ${cpu_name}" ;; | ||
189 | psm-microblaze) echo "${prefix}versal-psm ${cpu_name}" ;; | ||
190 | xlnx,microblaze) echo "${prefix}microblaze ${core} ${cpu_name}";; | ||
191 | arm,*) echo "${prefix}${cpu/,/ } ${core} ${cpu_name}";; | ||
192 | *) echo "${prefix}${cpu} ${core} ${cpu_name}";; | ||
193 | esac | ||
194 | done <${cpulist} | ||
195 | } | ||
196 | |||
197 | cortex_a53_linux() { | ||
198 | info "cortex-a53 for Linux [ $1 ]" | ||
199 | |||
200 | if [ "$1" = "None" ]; then | ||
201 | dts_file="cortexa53-${machine}-linux.dts" | ||
202 | system_conf=${dts_file} | ||
203 | conf_file="" | ||
204 | else | ||
205 | mc_name=cortexa53-${machine}-$1-linux | ||
206 | dts_file="${mc_name}.dts" | ||
207 | multiconf="${multiconf} ${mc_name}" | ||
208 | conf_file=multiconfig/${mc_name}.conf | ||
209 | fi | ||
210 | |||
211 | # Check if it is overlay dts otherwise just create linux dts | ||
212 | ( | ||
213 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
214 | if [ "${overlay_dts}" = "true" ]; then | ||
215 | if [ "${external_fpga}" = "true" ]; then | ||
216 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt ${machine} full \ | ||
217 | || error "lopper failed" | ||
218 | else | ||
219 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt ${machine} partial \ | ||
220 | || error "lopper failed" | ||
221 | fi | ||
222 | dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed" | ||
223 | elif [ -n "${domain_file}" ]; then | ||
224 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
225 | -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" \ | ||
226 | -i "${lops_dir}/lop-domain-linux-a53.dts" \ | ||
227 | -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \ | ||
228 | "${system_dts}" "${dts_file}" \ | ||
229 | || error "lopper failed" | ||
230 | else | ||
231 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ | ||
232 | -i "${lops_dir}/lop-domain-linux-a53.dts" \ | ||
233 | -i "${lops_dir}/lop-domain-linux-a53-prune.dts" \ | ||
234 | "${system_dts}" "${dts_file}" \ | ||
235 | || error "lopper failed" | ||
236 | fi | ||
237 | rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb lop-domain-linux-a53-prune.dts.dtb | ||
238 | ) | ||
239 | |||
240 | if [ -z "${conf_file}" ]; then | ||
241 | return $? | ||
242 | fi | ||
243 | |||
244 | ## Generate a multiconfig | ||
245 | cat <<EOF >"${conf_file}" | ||
246 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
247 | |||
248 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
249 | EOF | ||
250 | } | ||
251 | |||
252 | a53_fsbl_done=0 | ||
253 | cortex_a53_baremetal() { | ||
254 | if [ "$1" = "fsbl" ]; then | ||
255 | [ ${a53_fsbl_done} = 1 ] && return | ||
256 | info "cortex-a53 FSBL baremetal configuration" | ||
257 | else | ||
258 | info "cortex-a53 baremetal configuration for core $2 [ $1 ]" | ||
259 | fi | ||
260 | |||
261 | suffix=""; lto="-nolto" | ||
262 | if [ "$1" != "None" ]; then | ||
263 | suffix="-$1"; lto="" | ||
264 | fi | ||
265 | |||
266 | mc_name="cortexa53-$2-${machine}${suffix}-baremetal" | ||
267 | dts_file="${mc_name}.dts" | ||
268 | multiconf="${multiconf} ${mc_name}" | ||
269 | conf_file="multiconfig/${mc_name}.conf" | ||
270 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
271 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
272 | yocto_distro="xilinx-standalone${lto}" | ||
273 | if [ "$1" = "fsbl" ]; then | ||
274 | fsbl_mcdepends="mc::${mc_name}:fsbl-firmware:do_deploy" | ||
275 | fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}" | ||
276 | multiconf_min="${multiconf_min} ${mc_name}" | ||
277 | a53_fsbl_done=1 | ||
278 | fi | ||
279 | |||
280 | # Build device tree | ||
281 | ( | ||
282 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
283 | if [ -n "${domain_file}" ]; then | ||
284 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
285 | -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \ | ||
286 | || error "lopper failed" | ||
287 | else | ||
288 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ | ||
289 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
290 | fi | ||
291 | rm -f lop-a53-imux.dts.dtb | ||
292 | ) | ||
293 | |||
294 | # Build baremetal multiconfig | ||
295 | if [ -n "${domain_file}" ]; then | ||
296 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
297 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
298 | || error "lopper failed" | ||
299 | else | ||
300 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
301 | || error "lopper failed" | ||
302 | fi | ||
303 | |||
304 | mv libxil.conf "${libxil}" | ||
305 | mv distro.conf "${features}" | ||
306 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
307 | |||
308 | if [ "$1" = "fsbl" ]; then | ||
309 | if [ ! -e "${psu_init_path}/psu_init.c" ]; then | ||
310 | warn "Warning: Unable to find psu_init.c in ${psu_init_path}" | ||
311 | fi | ||
312 | if [ ! -e "${psu_init_path}/psu_init.h" ]; then | ||
313 | warn "Warning: Unable to find psu_init.h in ${psu_init_path}" | ||
314 | fi | ||
315 | |||
316 | cat <<EOF >"${conf_file}" | ||
317 | PSU_INIT_PATH = "${psu_init_path}" | ||
318 | EOF | ||
319 | else | ||
320 | cat /dev/null >"${conf_file}" | ||
321 | fi | ||
322 | cat <<EOF >>"${conf_file}" | ||
323 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
324 | |||
325 | ESW_MACHINE = "$3" | ||
326 | DEFAULTTUNE = "cortexa53" | ||
327 | |||
328 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
329 | |||
330 | DISTRO = "${yocto_distro}" | ||
331 | EOF | ||
332 | } | ||
333 | |||
334 | cortex_a53_freertos() { | ||
335 | info "cortex-a53 FreeRTOS configuration for core $2 [ $1 ]" | ||
336 | |||
337 | suffix="" | ||
338 | [ "$1" != "None" ] && suffix="-$1" | ||
339 | |||
340 | mc_name="cortexa53-$2-${machine}${suffix}-freertos" | ||
341 | dts_file="${mc_name}.dts" | ||
342 | multiconf="${multiconf} ${mc_name}" | ||
343 | conf_file="multiconfig/${mc_name}.conf" | ||
344 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
345 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
346 | |||
347 | # Build device tree | ||
348 | ( | ||
349 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
350 | if [ -n "${domain_file}" ]; then | ||
351 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
352 | -i "${domain_file}" -i "${lops_dir}/lop-a53-imux.dts" "${system_dts}" "${dts_file}" \ | ||
353 | || error "lopper failed" | ||
354 | else | ||
355 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a53-imux.dts" \ | ||
356 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
357 | fi | ||
358 | rm -f lop-a53-imux.dts.dtb | ||
359 | ) | ||
360 | |||
361 | # Build baremetal multiconfig | ||
362 | if [ -n "${domain_file}" ]; then | ||
363 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
364 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" | ||
365 | else | ||
366 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
367 | || error "lopper failed" | ||
368 | fi | ||
369 | |||
370 | mv libxil.conf "${libxil}" | ||
371 | mv distro.conf "${features}" | ||
372 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
373 | |||
374 | cat <<EOF >"${conf_file}" | ||
375 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
376 | |||
377 | ESW_MACHINE = "$3" | ||
378 | DEFAULTTUNE = "cortexa53" | ||
379 | |||
380 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
381 | |||
382 | DISTRO = "xilinx-freertos" | ||
383 | EOF | ||
384 | } | ||
385 | |||
386 | cortex_a72_linux() { | ||
387 | info "cortex-a72 for Linux [ $1 ]" | ||
388 | |||
389 | # Find the first file ending in .pdi | ||
390 | full_pdi_path=$(ls ${pdi_path}/*.pdi 2>/dev/null | head -n 1) | ||
391 | if [ -z "${full_pdi_path}" ]; then | ||
392 | error "Unable to find a pdi file in ${pdi_path}, use the -i option to point to the directory containing a .pdi file" | ||
393 | full_pdi_path="__PATH TO PDI FILE HERE__" | ||
394 | elif [ "${full_pdi_path}" != "$(ls ${pdi_path}/*.pdi 2>/dev/null)" ]; then | ||
395 | warn "Warning: multiple PDI files found, using first found $(basename ${full_pdi_path})." | ||
396 | fi | ||
397 | |||
398 | if [ "$1" = "None" ]; then | ||
399 | dts_file="cortexa72-${machine}-linux.dts" | ||
400 | system_conf=${dts_file} | ||
401 | conf_file="" | ||
402 | else | ||
403 | mc_name="cortexa72-${machine}-$1-linux" | ||
404 | dts_file="${mc_name}.dts" | ||
405 | multiconf="${multiconf} ${mc_name}" | ||
406 | conf_file=multiconfig/${mc_name}.conf | ||
407 | fi | ||
408 | |||
409 | ( | ||
410 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
411 | # Check if it is overlay dts otherwise just create linux dts | ||
412 | if [ "${overlay_dts}" = "true" ]; then | ||
413 | # As there is no partial support on Versal, As per fpga manager implementation there is | ||
414 | # a flag "external_fpga" which says apply overlay without loading the bit file. | ||
415 | if [ "${external_fpga}" = "true" ]; then | ||
416 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- xlnx_overlay_dt \ | ||
417 | ${machine} full external_fpga || error "lopper failed" | ||
418 | else | ||
419 | # If there is no external_fpga flag, then the default is full | ||
420 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- xlnx_overlay_dt \ | ||
421 | ${machine} full || error "lopper failed" | ||
422 | fi | ||
423 | dtc -q -O dtb -o pl.dtbo -b 0 -@ pl.dtsi || error "dtc failed" | ||
424 | elif [ -n "${domain_file}" ]; then | ||
425 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
426 | -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" \ | ||
427 | -i "${lops_dir}/lop-domain-a72.dts" \ | ||
428 | -i "${lops_dir}/lop-domain-a72-prune.dts" \ | ||
429 | "${system_dts}" "${dts_file}" \ | ||
430 | || error "lopper failed" | ||
431 | else | ||
432 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ | ||
433 | -i "${lops_dir}/lop-domain-a72.dts" \ | ||
434 | -i "${lops_dir}/lop-domain-a72-prune.dts" \ | ||
435 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
436 | fi | ||
437 | rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb lop-domain-a72-prune.dts.dtb | ||
438 | ) | ||
439 | |||
440 | if [ -z "${conf_file}" ]; then | ||
441 | return $? | ||
442 | fi | ||
443 | |||
444 | ## Generate a multiconfig | ||
445 | cat <<EOF >"${conf_file}" | ||
446 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
447 | |||
448 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
449 | EOF | ||
450 | } | ||
451 | |||
452 | cortex_a72_baremetal() { | ||
453 | info "cortex-a72 baremetal configuration for core $2 [ $1 ]" | ||
454 | |||
455 | suffix="" | ||
456 | [ "$1" != "None" ] && suffix="-$1" | ||
457 | |||
458 | mc_name="cortexa72-$2-${machine}${suffix}-baremetal" | ||
459 | dts_file="${mc_name}.dts" | ||
460 | multiconf="${multiconf} ${mc_name}" | ||
461 | conf_file="multiconfig/${mc_name}.conf" | ||
462 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
463 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
464 | |||
465 | # Build device tree | ||
466 | ( | ||
467 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
468 | if [ -n "${domain_file}" ]; then | ||
469 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
470 | -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \ | ||
471 | || error "lopper failed" | ||
472 | else | ||
473 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ | ||
474 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
475 | fi | ||
476 | rm -f lop-a72-imux.dts.dtb | ||
477 | ) | ||
478 | |||
479 | # Build baremetal multiconfig | ||
480 | if [ -n "${domain_file}" ]; then | ||
481 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
482 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" | ||
483 | else | ||
484 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
485 | || error "lopper failed" | ||
486 | fi | ||
487 | |||
488 | mv libxil.conf "${libxil}" | ||
489 | mv distro.conf "${features}" | ||
490 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
491 | |||
492 | cat <<EOF >"${conf_file}" | ||
493 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
494 | |||
495 | ESW_MACHINE = "$3" | ||
496 | DEFAULTTUNE = "cortexa72" | ||
497 | |||
498 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
499 | |||
500 | DISTRO = "xilinx-standalone-nolto" | ||
501 | EOF | ||
502 | } | ||
503 | |||
504 | cortex_a72_freertos() { | ||
505 | info "cortex-a72 FreeRTOS configuration for core $2 [ $1 ]" | ||
506 | |||
507 | suffix="" | ||
508 | [ "$1" != "None" ] && suffix="-$1" | ||
509 | |||
510 | mc_name="cortexa72-$2-${machine}${suffix}-freertos" | ||
511 | dts_file="${mc_name}.dts" | ||
512 | multiconf="${multiconf} ${mc_name}" | ||
513 | conf_file="multiconfig/${mc_name}.conf" | ||
514 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
515 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
516 | |||
517 | # Build device tree | ||
518 | ( | ||
519 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
520 | if [ -n "${domain_file}" ]; then | ||
521 | LOPPER_DTC_FLAGS="-b 0 -@" lopper -f --enhanced -x '*.yaml' \ | ||
522 | -i "${domain_file}" -i "${lops_dir}/lop-a72-imux.dts" "${system_dts}" "${dts_file}" \ | ||
523 | || error "lopper failed" | ||
524 | else | ||
525 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-a72-imux.dts" \ | ||
526 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
527 | fi | ||
528 | rm -f lop-a72-imux.dts.dtb | ||
529 | ) | ||
530 | |||
531 | # Build baremetal multiconfig | ||
532 | if [ -n "${domain_file}" ]; then | ||
533 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
534 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" | ||
535 | else | ||
536 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
537 | || error "lopper failed" | ||
538 | fi | ||
539 | |||
540 | mv libxil.conf "${libxil}" | ||
541 | mv distro.conf "${features}" | ||
542 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
543 | |||
544 | cat <<EOF >"${conf_file}" | ||
545 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
546 | |||
547 | ESW_MACHINE = "$3" | ||
548 | DEFAULTTUNE = "cortexa72" | ||
549 | |||
550 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
551 | |||
552 | DISTRO = "xilinx-freertos" | ||
553 | EOF | ||
554 | } | ||
555 | |||
556 | r5_fsbl_done=0 | ||
557 | cortex_r5_baremetal() { | ||
558 | if [ "$1" = "fsbl" ]; then | ||
559 | [ ${r5_fsbl_done} = 1 ] && return | ||
560 | info "cortex-r5 FSBL baremetal configuration" | ||
561 | else | ||
562 | info "cortex-r5 baremetal configuration for core $2 [ $1 ]" | ||
563 | fi | ||
564 | |||
565 | suffix=""; lto="-nolto" | ||
566 | if [ "$1" != "None" ]; then | ||
567 | suffix="-$1"; lto="" | ||
568 | fi | ||
569 | |||
570 | mc_name="cortexr5-$2-${machine}${suffix}-baremetal" | ||
571 | dts_file="${mc_name}.dts" | ||
572 | multiconf="${multiconf} ${mc_name}" | ||
573 | conf_file="multiconfig/${mc_name}.conf" | ||
574 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
575 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
576 | yocto_distro="xilinx-standalone${lto}" | ||
577 | |||
578 | if [ "$1" = "fsbl" ]; then | ||
579 | r5fsbl_mcdepends="mc::${mc_name}:fsbl-firmware:do_deploy" | ||
580 | r5fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}" | ||
581 | r5_fsbl_done=1 | ||
582 | fi | ||
583 | |||
584 | # Build device tree | ||
585 | ( | ||
586 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
587 | if [ -n "$domain_file" ]; then | ||
588 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
589 | -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \ | ||
590 | || error "lopper failed" | ||
591 | else | ||
592 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \ | ||
593 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
594 | fi | ||
595 | rm -f lop-r5-imux.dts.dtb | ||
596 | ) | ||
597 | |||
598 | # Build baremetal multiconfig | ||
599 | if [ -n "${domain_file}" ]; then | ||
600 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
601 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" | ||
602 | else | ||
603 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
604 | || error "lopper failed" | ||
605 | fi | ||
606 | |||
607 | mv libxil.conf "${libxil}" | ||
608 | mv distro.conf "${features}" | ||
609 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
610 | |||
611 | if [ "$1" = "fsbl" ]; then | ||
612 | if [ ! -e "${psu_init_path}/psu_init.c" ]; then | ||
613 | warn "Warning: Unable to find psu_init.c in ${psu_init_path}" | ||
614 | fi | ||
615 | if [ ! -e "${psu_init_path}/psu_init.h" ]; then | ||
616 | warn "Warning: Unable to find psu_init.h in ${psu_init_path}" | ||
617 | fi | ||
618 | |||
619 | cat <<EOF >"${conf_file}" | ||
620 | PSU_INIT_PATH = "${psu_init_path}" | ||
621 | EOF | ||
622 | else | ||
623 | cat /dev/null >"${conf_file}" | ||
624 | fi | ||
625 | cat <<EOF >>"${conf_file}" | ||
626 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
627 | |||
628 | ESW_MACHINE = "$3" | ||
629 | DEFAULTTUNE = "cortexr5" | ||
630 | |||
631 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
632 | |||
633 | DISTRO = "$yocto_distro" | ||
634 | EOF | ||
635 | } | ||
636 | |||
637 | cortex_r5_freertos() { | ||
638 | info "cortex-r5 FreeRTOS configuration for core $2 [ $1 ]" | ||
639 | |||
640 | suffix="" | ||
641 | [ "$1" != "None" ] && suffix="-$1" | ||
642 | |||
643 | mc_name="cortexr5-$2-${machine}${suffix}-freertos" | ||
644 | dts_file="${mc_name}.dts" | ||
645 | multiconf="${multiconf} ${mc_name}" | ||
646 | conf_file="multiconfig/${mc_name}.conf" | ||
647 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
648 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
649 | |||
650 | # Build device tree | ||
651 | ( | ||
652 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
653 | if [ -n "$domain_file" ]; then | ||
654 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' \ | ||
655 | -i "${domain_file}" -i "${lops_dir}/lop-r5-imux.dts" "${system_dts}" "${dts_file}" \ | ||
656 | || error "lopper failed" | ||
657 | else | ||
658 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-r5-imux.dts" \ | ||
659 | "${system_dts}" "${dts_file}" || error "lopper failed" | ||
660 | fi | ||
661 | rm -f lop-r5-imux.dts.dtb | ||
662 | ) | ||
663 | |||
664 | # Build baremetal multiconfig | ||
665 | if [ -n "${domain_file}" ]; then | ||
666 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
667 | -- baremetaldrvlist_xlnx $3 "${embeddedsw}" || error "lopper failed" | ||
668 | else | ||
669 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $3 "${embeddedsw}" \ | ||
670 | || error "lopper failed" | ||
671 | fi | ||
672 | |||
673 | mv libxil.conf "${libxil}" | ||
674 | mv distro.conf "${features}" | ||
675 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
676 | |||
677 | cat <<EOF >"${conf_file}" | ||
678 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
679 | |||
680 | ESW_MACHINE = "$3" | ||
681 | DEFAULTTUNE = "cortexr5" | ||
682 | |||
683 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
684 | |||
685 | DISTRO = "xilinx-freertos" | ||
686 | EOF | ||
687 | } | ||
688 | |||
689 | # Generate microblaze tunings | ||
690 | microblaze_done=0 | ||
691 | process_microblaze() { | ||
692 | [ ${microblaze_done} = 1 ] && return | ||
693 | |||
694 | info "Generating microblaze processor tunes" | ||
695 | |||
696 | mkdir -p machine/include/${mach_conf} | ||
697 | ( | ||
698 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
699 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dts}" \ | ||
700 | || error "lopper failed" | ||
701 | rm -f lop-microblaze-yocto.dts.dtb | ||
702 | ) >machine/include/${mach_conf}/microblaze.inc | ||
703 | |||
704 | echo "require conf/machine/include/xilinx-microblaze.inc" >> machine/include/${mach_conf}/microblaze.inc | ||
705 | |||
706 | microblaze_done=1 | ||
707 | } | ||
708 | |||
709 | # pmu-microblaze is ALWAYS baremetal, no domain | ||
710 | pmu-microblaze() { | ||
711 | info "Microblaze ZynqMP PMU" | ||
712 | |||
713 | process_microblaze | ||
714 | |||
715 | mc_name="microblaze-0-pmu" | ||
716 | dts_file="${mc_name}.dts" | ||
717 | multiconf="${multiconf} ${mc_name}" | ||
718 | multiconf_min="${multiconf_min} ${mc_name}" | ||
719 | conf_file="multiconfig/${mc_name}.conf" | ||
720 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
721 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
722 | |||
723 | pmu_mcdepends="mc::${mc_name}:pmu-firmware:do_deploy" | ||
724 | pmu_firmware_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}" | ||
725 | |||
726 | # Build device tree | ||
727 | ( | ||
728 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
729 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed" | ||
730 | ) | ||
731 | |||
732 | # Build baremetal multiconfig | ||
733 | if [ -n "${domain_file}" ]; then | ||
734 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
735 | -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" | ||
736 | else | ||
737 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ | ||
738 | || error "lopper failed" | ||
739 | fi | ||
740 | |||
741 | mv libxil.conf "${libxil}" | ||
742 | mv distro.conf "${features}" | ||
743 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
744 | |||
745 | cat <<EOF >"${conf_file}" | ||
746 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
747 | |||
748 | ESW_MACHINE = "$1" | ||
749 | |||
750 | DEFAULTTUNE = "microblaze-pmu" | ||
751 | |||
752 | TARGET_CFLAGS += "-DPSU_PMU=1U" | ||
753 | |||
754 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
755 | |||
756 | DISTRO = "xilinx-standalone" | ||
757 | EOF | ||
758 | } | ||
759 | |||
760 | # pmc-microblaze is ALWAYS baremetal, no domain | ||
761 | pmc-microblaze() { | ||
762 | info "Microblaze Versal PMC" | ||
763 | |||
764 | process_microblaze | ||
765 | |||
766 | mc_name="microblaze-0-pmc" | ||
767 | dts_file="${mc_name}.dts" | ||
768 | multiconf="${multiconf} ${mc_name}" | ||
769 | multiconf_min="${multiconf_min} ${mc_name}" | ||
770 | conf_file="multiconfig/${mc_name}.conf" | ||
771 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
772 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
773 | |||
774 | plm_mcdepends="mc::${mc_name}:plm-firmware:do_deploy" | ||
775 | plm_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}" | ||
776 | |||
777 | # Build device tree | ||
778 | ( | ||
779 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
780 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed" | ||
781 | ) | ||
782 | |||
783 | # Build baremetal multiconfig | ||
784 | if [ -n "${domain_file}" ]; then | ||
785 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
786 | -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" | ||
787 | else | ||
788 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ | ||
789 | || error "lopper failed" | ||
790 | fi | ||
791 | |||
792 | mv libxil.conf "${libxil}" | ||
793 | mv distro.conf "${features}" | ||
794 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
795 | |||
796 | cat <<EOF >"${conf_file}" | ||
797 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
798 | |||
799 | ESW_MACHINE = "$1" | ||
800 | |||
801 | DEFAULTTUNE = "microblaze-pmc" | ||
802 | |||
803 | TARGET_CFLAGS += "-DVERSAL_PLM=1" | ||
804 | |||
805 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
806 | |||
807 | DISTRO = "xilinx-standalone" | ||
808 | EOF | ||
809 | } | ||
810 | |||
811 | # psm-microblaze is ALWAYS baremetal, no domain | ||
812 | psm-microblaze() { | ||
813 | info "Microblaze Versal PSM" | ||
814 | |||
815 | process_microblaze | ||
816 | |||
817 | mc_name="microblaze-0-psm" | ||
818 | dts_file="${mc_name}.dts" | ||
819 | multiconf="${multiconf} ${mc_name}" | ||
820 | multiconf_min="${multiconf_min} ${mc_name}" | ||
821 | conf_file="multiconfig/${mc_name}.conf" | ||
822 | libxil="machine/include/${mach_conf}/${mc_name}-libxil.conf" | ||
823 | features="machine/include/${mach_conf}/${mc_name}-features.conf" | ||
824 | |||
825 | psm_mcdepends="mc::${mc_name}:psm-firmware:do_deploy" | ||
826 | psm_firmware_deploy_dir="\${BASE_TMPDIR}/tmp-${mc_name}/deploy/images/\${MACHINE}" | ||
827 | |||
828 | # Build device tree | ||
829 | ( | ||
830 | cd ${dts_path} || error "Unable to cd to ${dts_path} dir" | ||
831 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" "${dts_file}" || error "lopper failed" | ||
832 | ) | ||
833 | |||
834 | # Build baremetal multiconfig | ||
835 | if [ -n "${domain_file}" ]; then | ||
836 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -x '*.yaml' -i "${domain_file}" "${system_dts}" \ | ||
837 | -- baremetaldrvlist_xlnx $1 "${embeddedsw}" || error "lopper failed" | ||
838 | else | ||
839 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f "${system_dts}" -- baremetaldrvlist_xlnx $1 "${embeddedsw}" \ | ||
840 | || error "lopper failed" | ||
841 | fi | ||
842 | |||
843 | mv libxil.conf "${libxil}" | ||
844 | mv distro.conf "${features}" | ||
845 | sed -i ${features} -e "s,DISTRO_FEATURES,MACHINE_FEATURES," | ||
846 | |||
847 | cat <<EOF >"${conf_file}" | ||
848 | CONFIG_DTFILE = "${dts_file_path}/${dts_file}" | ||
849 | |||
850 | ESW_MACHINE = "$1" | ||
851 | |||
852 | DEFAULTTUNE = "microblaze-psm" | ||
853 | |||
854 | TARGET_CFLAGS += "-DVERSAL_psm=1" | ||
855 | |||
856 | TMPDIR = "\${BASE_TMPDIR}/tmp-${mc_name}" | ||
857 | |||
858 | DISTRO = "xilinx-standalone" | ||
859 | EOF | ||
860 | } | ||
861 | |||
862 | generate_machine() { | ||
863 | info "Generating machine conf file" | ||
864 | conf_file="machine/${mach_conf}.conf" | ||
865 | |||
866 | # Machine include file | ||
867 | if [ -z ${incmachine} ]; then | ||
868 | if [ -n ${soc_variant} ]; then | ||
869 | incmachine="${machine}-${soc_variant}-generic.conf" | ||
870 | else | ||
871 | incmachine="${machine}-generic.conf" | ||
872 | fi | ||
873 | fi | ||
874 | |||
875 | mkdir -p machine | ||
876 | # Generate header | ||
877 | cat <<EOF >"${conf_file}" | ||
878 | #@TYPE: Machine | ||
879 | #@NAME: ${mach_conf} | ||
880 | #@DESCRIPTION: ${model} | ||
881 | |||
882 | #### Preamble | ||
883 | MACHINEOVERRIDES =. "\${@['', '${mach_conf}:']['${mach_conf}' != '\${MACHINE}']}" | ||
884 | #### Regular settings follow | ||
885 | |||
886 | EOF | ||
887 | |||
888 | if [ -n "${overrides}" ]; then | ||
889 | cat <<EOF >>"${conf_file}" | ||
890 | MACHINEOVERRIDES .= ":${overrides}" | ||
891 | |||
892 | EOF | ||
893 | fi | ||
894 | |||
895 | if [ "${machine}" == "zynqmp" ]; then | ||
896 | cat <<EOF >>"${conf_file}" | ||
897 | TUNEFILE[microblaze-pmu] = "conf/machine/include/${mach_conf}/microblaze.inc" | ||
898 | EOF | ||
899 | elif [ "${machine}" == "versal" ]; then | ||
900 | cat <<EOF >>"${conf_file}" | ||
901 | TUNEFILE[microblaze-pmc] = "conf/machine/include/${mach_conf}/microblaze.inc" | ||
902 | TUNEFILE[microblaze-psm] = "conf/machine/include/${mach_conf}/microblaze.inc" | ||
903 | EOF | ||
904 | fi | ||
905 | |||
906 | sysdt_path=$(dirname ${system_dts}) | ||
907 | sysdt_base=$(basename ${system_dts}) | ||
908 | cat <<EOF >>"${conf_file}" | ||
909 | |||
910 | # Set the default (linux) domain device tree | ||
911 | CONFIG_DTFILE ?= "${dts_file_path}/${system_conf}" | ||
912 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
913 | |||
914 | require conf/machine/${incmachine} | ||
915 | |||
916 | # System Device Tree does not use HDF_MACHINE | ||
917 | HDF_MACHINE = "" | ||
918 | |||
919 | # Set the system device trees | ||
920 | SYSTEM_DTFILE_DIR = "${sysdt_path}" | ||
921 | SYSTEM_DTFILE = "\${SYSTEM_DTFILE_DIR}/${sysdt_base}" | ||
922 | SYSTEM_DTFILE[vardepsexclude] += "SYSTEM_DTFILE_DIR" | ||
923 | |||
924 | # Load the dynamic machine features | ||
925 | include conf/machine/include/${mach_conf}/\${BB_CURRENT_MC}-features.conf | ||
926 | LIBXIL_CONFIG = "conf/machine/include/${mach_conf}/\${BB_CURRENT_MC}-libxil.conf" | ||
927 | |||
928 | EOF | ||
929 | |||
930 | if [ -n "${fsbl_mcdepends}" ]; then | ||
931 | cat <<EOF >>"${conf_file}" | ||
932 | # First Stage Boot Loader | ||
933 | FSBL_DEPENDS = "" | ||
934 | FSBL_MCDEPENDS = "${fsbl_mcdepends}" | ||
935 | FSBL_DEPLOY_DIR = "${fsbl_deploy_dir}" | ||
936 | |||
937 | EOF | ||
938 | fi | ||
939 | if [ -n "${r5fsbl_mcdepends}" ]; then | ||
940 | cat <<EOF >>"${conf_file}" | ||
941 | # Cortex-R5 First Stage Boot Loader | ||
942 | R5FSBL_DEPENDS = "" | ||
943 | R5FSBL_MCDEPENDS = "${r5fsbl_mcdepends}" | ||
944 | R5FSBL_DEPLOY_DIR = "${r5fsbl_deploy_dir}" | ||
945 | |||
946 | EOF | ||
947 | fi | ||
948 | if [ -n "${pmu_mcdepends}" ]; then | ||
949 | cat <<EOF >>"${conf_file}" | ||
950 | # PMU Firware | ||
951 | PMU_DEPENDS = "" | ||
952 | PMU_MCDEPENDS = "${pmu_mcdepends}" | ||
953 | PMU_FIRMWARE_DEPLOY_DIR = "${pmu_firmware_deploy_dir}" | ||
954 | |||
955 | EOF | ||
956 | fi | ||
957 | if [ -n "${plm_mcdepends}" ]; then | ||
958 | cat <<EOF >>"${conf_file}" | ||
959 | # Platform Loader and Manager | ||
960 | PLM_DEPENDS = "" | ||
961 | PLM_MCDEPENDS = "${plm_mcdepends}" | ||
962 | PLM_DEPLOY_DIR = "${plm_deploy_dir}" | ||
963 | |||
964 | EOF | ||
965 | fi | ||
966 | if [ -n "${psm_mcdepends}" ]; then | ||
967 | cat <<EOF >>"${conf_file}" | ||
968 | # PSM Firmware | ||
969 | PSM_DEPENDS = "" | ||
970 | PSM_MCDEPENDS = "${psm_mcdepends}" | ||
971 | PSM_FIRMWARE_DEPLOY_DIR = "${psm_firmware_deploy_dir}" | ||
972 | |||
973 | EOF | ||
974 | fi | ||
975 | |||
976 | if [ -n "${full_pdi_path}" ]; then | ||
977 | pdi_path_dir=$(dirname ${full_pdi_path}) | ||
978 | pdi_path_base=$(basename ${full_pdi_path}) | ||
979 | cat <<EOF >>"${conf_file}" | ||
980 | # Versal PDI | ||
981 | PDI_PATH_DIR = "${pdi_path_dir}" | ||
982 | PDI_PATH = "\${PDI_PATH_DIR}/${pdi_path_base}" | ||
983 | PDI_PATH[vardepsexclude] += "PDI_PATH_DIR" | ||
984 | |||
985 | EOF | ||
986 | fi | ||
987 | |||
988 | cat <<EOF >>"${conf_file}" | ||
989 | # Enable the correct version of the firmware components | ||
990 | PREFERRED_VERSION_fsbl-firmware = "2023_sdt_experimental%" | ||
991 | PREFERRED_VERSION_pmu-firmware = "2023_sdt_experimental%" | ||
992 | PREFERRED_VERSION_plm-firmware = "2023_sdt_experimental%" | ||
993 | PREFERRED_VERSION_psm-firmware = "2023_sdt_experimental%" | ||
994 | |||
995 | # Exclude BASE_TMPDIR from hash calculations | ||
996 | BB_HASHEXCLUDE_COMMON:append = " BASE_TMPDIR" | ||
997 | |||
998 | # Update bootbin to use proper device tree | ||
999 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}" | ||
1000 | # Remap boot files to ensure the right device tree is listed first | ||
1001 | IMAGE_BOOT_FILES =+ "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts', '.dtb'))}" | ||
1002 | |||
1003 | #### No additional settings should be after the Postamble | ||
1004 | #### Postamble | ||
1005 | PACKAGE_EXTRA_ARCHS:append = "\${@['', ' ${mach_conf//-/_}']['${mach_conf}' != "\${MACHINE}"]}" | ||
1006 | EOF | ||
1007 | } | ||
1008 | |||
1009 | parse_cpus() { | ||
1010 | gen_linux_dts="None" | ||
1011 | while read -r cpu core domain cpu_name os_hint; do | ||
1012 | # Skip commented lines and WARNINGs | ||
1013 | case ${cpu} in | ||
1014 | \#* | \[WARNING\]:) continue ;; | ||
1015 | esac | ||
1016 | |||
1017 | case ${cpu} in | ||
1018 | |||
1019 | arm,cortex-a53) | ||
1020 | # We need a base cortex_a53_baremetal for the FSBL | ||
1021 | if [ "${core}" == 0 ]; then | ||
1022 | cortex_a53_baremetal fsbl ${core} ${cpu_name} | ||
1023 | fi | ||
1024 | if [ "${os_hint}" == "None" ]; then | ||
1025 | if [ "${gen_linux_dts}" == "None" ]; then | ||
1026 | cortex_a53_linux "${domain}" | ||
1027 | gen_linux_dts="True" | ||
1028 | fi | ||
1029 | cortex_a53_baremetal "${domain}" ${core} ${cpu_name} | ||
1030 | cortex_a53_freertos "${domain}" ${core} ${cpu_name} | ||
1031 | else | ||
1032 | case "${os_hint}" in | ||
1033 | linux*) | ||
1034 | if [ "${gen_linux_dts}" == "None" ]; then | ||
1035 | cortex_a53_linux "${domain}" | ||
1036 | gen_linux_dts="True" | ||
1037 | fi | ||
1038 | ;; | ||
1039 | baremetal*) | ||
1040 | cortex_a53_baremetal "${domain}" ${core} ${cpu_name};; | ||
1041 | freertos*) | ||
1042 | cortex_a53_freertos "${domain}" ${core} ${cpu_name};; | ||
1043 | *) | ||
1044 | warn "cortex-a53 for unknown OS (${os_hint}), parsing baremetal. ${domain}" | ||
1045 | cortex_a53_baremetal "${domain}" | ||
1046 | esac | ||
1047 | fi | ||
1048 | ;; | ||
1049 | |||
1050 | arm,cortex-a72) | ||
1051 | if [ "${os_hint}" == "None" ]; then | ||
1052 | if [ "${gen_linux_dts}" == "None" ]; then | ||
1053 | cortex_a72_linux "${domain}" | ||
1054 | gen_linux_dts="True" | ||
1055 | fi | ||
1056 | cortex_a72_baremetal "${domain}" ${core} ${cpu_name} | ||
1057 | cortex_a72_freertos "${domain}" ${core} ${cpu_name} | ||
1058 | else | ||
1059 | case "${os_hint}" in | ||
1060 | linux*) | ||
1061 | if [ "${gen_linux_dts}" == "None" ]; then | ||
1062 | cortex_a72_linux "${domain}" | ||
1063 | gen_linux_dts="True" | ||
1064 | fi | ||
1065 | ;; | ||
1066 | baremetal*) | ||
1067 | cortex_a72_baremetal "${domain}" ${core} ${cpu_name};; | ||
1068 | freertos*) | ||
1069 | cortex_a72_freertos "${domain}" ${core} ${cpu_name};; | ||
1070 | *) | ||
1071 | warn "cortex-a72 for unknown OS (${os_hint}), parsing baremetal. ${domain}" | ||
1072 | cortex_a72_baremetal "${domain}" | ||
1073 | esac | ||
1074 | fi | ||
1075 | ;; | ||
1076 | arm,cortex-r5) | ||
1077 | if [ "${os_hint}" == "None" ]; then | ||
1078 | # We need a base cortex_r5_baremetal for the FSBL for ZynqMP platform | ||
1079 | [ "${machine}" = "zynqmp" ] && cortex_r5_baremetal fsbl ${core} ${cpu_name} | ||
1080 | cortex_r5_baremetal "${domain}" ${core} ${cpu_name} | ||
1081 | cortex_r5_freertos "${domain}" ${core} ${cpu_name} | ||
1082 | else | ||
1083 | case "${os_hint}" in | ||
1084 | baremetal*) | ||
1085 | cortex_r5_baremetal "${domain}" ${core} ${cpu_name};; | ||
1086 | freertos*) | ||
1087 | cortex_r5_freertos "${domain}" ${core} ${cpu_name};; | ||
1088 | *) | ||
1089 | warn "cortex-r5 for unknown OS (${os_hint}), parsing baremetal. ${domain}" | ||
1090 | cortex_r5_baremetal "${domain}" | ||
1091 | esac | ||
1092 | fi | ||
1093 | ;; | ||
1094 | |||
1095 | xlnx,microblaze) | ||
1096 | process_microblaze | ||
1097 | case "${os_hint}" in | ||
1098 | None | baremetal*) | ||
1099 | warn "Microblaze for Baremetal ${domain} not yet implemented" ;; | ||
1100 | Linux) | ||
1101 | warn "Microblaze for Linux ${domain} not yet implemented" ;; | ||
1102 | *) | ||
1103 | warn "Microblaze for unknown OS (${os_hint}), not yet implemented. ${domain}" ;; | ||
1104 | esac | ||
1105 | ;; | ||
1106 | |||
1107 | pmu-microblaze) | ||
1108 | pmu-microblaze ${cpu_name};; | ||
1109 | |||
1110 | pmc-microblaze) | ||
1111 | pmc-microblaze ${cpu_name};; | ||
1112 | |||
1113 | psm-microblaze) | ||
1114 | psm-microblaze ${cpu_name};; | ||
1115 | *) | ||
1116 | warn "Unknown CPU ${cpu}" | ||
1117 | |||
1118 | esac | ||
1119 | done <${cpulist} | ||
1120 | } | ||
1121 | |||
1122 | gen_local_conf() { | ||
1123 | cat << EOF >> $1 | ||
1124 | |||
1125 | # Avoid errors in some baremetal configs as these layers may be present | ||
1126 | # but are not used. Note the following lines are optional and can be | ||
1127 | # safetly disabled. | ||
1128 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
1129 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
1130 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
1131 | |||
1132 | # Each multiconfig will define it's own TMPDIR, this is the new default based | ||
1133 | # on BASE_TMPDIR for the Linux build | ||
1134 | TMPDIR = "\${BASE_TMPDIR}/tmp" | ||
1135 | |||
1136 | # Use the newly generated MACHINE | ||
1137 | MACHINE = "${mach_conf}" | ||
1138 | |||
1139 | # All of the TMPDIRs must be in a common parent directory. This is defined | ||
1140 | # as BASE_TMPDIR. | ||
1141 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp | ||
1142 | BASE_TMPDIR ?= "\${TOPDIR}" | ||
1143 | |||
1144 | # The following is the full set of multiconfigs for this configuration | ||
1145 | # A large list can cause a slow parse. | ||
1146 | #BBMULTICONFIG ?= "${multiconf}" | ||
1147 | # Alternatively trim the list to the minimum | ||
1148 | BBMULTICONFIG = "${multiconf_min}" | ||
1149 | EOF | ||
1150 | } | ||
1151 | |||
1152 | gen_petalinux_conf() { | ||
1153 | cd "${config_dir}" || exit | ||
1154 | ( | ||
1155 | if [ "$machine" == "zynqmp" ]; then | ||
1156 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psu_cortexa53_0 ${petalinux_schema} \ | ||
1157 | || error "lopper failed" | ||
1158 | else | ||
1159 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} "${system_dts}" -- petalinuxconfig_xlnx psv_cortexa72_0 ${petalinux_schema} \ | ||
1160 | || error "lopper failed" | ||
1161 | fi | ||
1162 | ) | ||
1163 | } | ||
1164 | parse_args "$@" | ||
1165 | |||
1166 | lopper=$(command -v lopper) | ||
1167 | lopper_dir=$(dirname "${lopper}") | ||
1168 | lops_dir=$(ls -d $(dirname "${lopper_dir}")/lib/python*/site-packages/lopper/lops | head -n 1) | ||
1169 | embeddedsw=$(dirname "${lopper_dir}")/share/embeddedsw | ||
1170 | system_conf="" | ||
1171 | multiconf="" | ||
1172 | |||
1173 | [ -z "${lopper}" ] && error "Unable to find lopper, please source the prestep environment" | ||
1174 | |||
1175 | cpulist=$(mktemp) | ||
1176 | |||
1177 | priordir=$(pwd) | ||
1178 | cd "${config_dir}" || exit | ||
1179 | mkdir -p dts multiconfig machine/include | ||
1180 | # Get mach_conf name and model name | ||
1181 | ( | ||
1182 | cd dts || error "Unable to cd to dts dir" | ||
1183 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-machine-name.dts" "${system_dts}" \ | ||
1184 | /dev/null > ${cpulist} || error "lopper failed" | ||
1185 | rm -f "lop-machine-name.dts.dtb" | ||
1186 | ) | ||
1187 | read local_mach_conf deviceid model < ${cpulist} | ||
1188 | if [ -z "${mach_conf}" ]; then | ||
1189 | mach_conf=${local_mach_conf} | ||
1190 | fi | ||
1191 | |||
1192 | if [ -z "${dts_path}"]; then | ||
1193 | dts_path=${local_mach_conf} | ||
1194 | fi | ||
1195 | # Is it relative? If so, relative to conf/dts | ||
1196 | if [ "${dts_path##/}" = "${dts_path}" ]; then | ||
1197 | dts_path="dts/${dts_path}" | ||
1198 | else | ||
1199 | dts_path=$(realpath ${dts_path}) | ||
1200 | fi | ||
1201 | # Convert the DTS_PATH into something we can put in a config file | ||
1202 | if [ "${dts_path##/}" = "${dts_path}" ]; then | ||
1203 | dts_file_path="\${TOPDIR}/conf/${dts_path}" | ||
1204 | else | ||
1205 | dts_file_path="${dts_path}" | ||
1206 | fi | ||
1207 | |||
1208 | # Generate CPU list | ||
1209 | ( | ||
1210 | cd dts || error "Unable to cd to dts dir" | ||
1211 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dts}" \ | ||
1212 | /dev/null > ${cpulist} || error "lopper failed" | ||
1213 | rm -f "lop-xilinx-id-cpus.dts.dtb" | ||
1214 | ) | ||
1215 | |||
1216 | detect_machine | ||
1217 | # Now that we know the machine name, we can create the directory | ||
1218 | mkdir -p machine/include/${mach_conf} | ||
1219 | mkdir -p ${dts_path} | ||
1220 | |||
1221 | echo "System Configuration:" | ||
1222 | echo "MODEL = \"${model}\"" | ||
1223 | echo "MACHINE = \"${mach_conf}\"" | ||
1224 | echo "DEVICE_ID = \"${deviceid}\"" | ||
1225 | echo "SOC_FAMILY = \"${machine}\"" | ||
1226 | echo "SOC_VARIANT = \"${soc_variant}\"" | ||
1227 | echo "CPUs:" | ||
1228 | dump_cpus " = " | ||
1229 | echo | ||
1230 | |||
1231 | info "Generating configuration..." | ||
1232 | parse_cpus | ||
1233 | |||
1234 | generate_machine | ||
1235 | |||
1236 | cd ${priordir} | ||
1237 | if [ -z "${localconf}" ]; then | ||
1238 | echo | ||
1239 | echo "To enable this, add the following to your local.conf:" | ||
1240 | echo | ||
1241 | tmpfile=$(mktemp) | ||
1242 | gen_local_conf ${tmpfile} | ||
1243 | cat $tmpfile | ||
1244 | rm $tmpfile | ||
1245 | else | ||
1246 | echo | ||
1247 | echo "Configuration for local.conf written to ${localconf}" | ||
1248 | echo | ||
1249 | gen_local_conf ${localconf} | ||
1250 | fi | ||
1251 | |||
1252 | if [ -n "${petalinux_schema}" ]; then | ||
1253 | echo | ||
1254 | echo "Generating petalinux config file:" | ||
1255 | echo | ||
1256 | gen_petalinux_conf | ||
1257 | fi | ||
1258 | |||
1259 | # Cleanup our temp file | ||
1260 | rm -rf ${cpulist} ${config_dir}/CMakeLists.txt ${config_dir}/DRVLISTConfig.cmake | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb b/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb deleted file mode 100644 index dc7d647a..00000000 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/meta-xilinx-setup.bb +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | DESCRIPTION = "Xilinx Device Tree based configuration generator" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | SRC_URI += " \ | ||
5 | file://dt-processor.sh \ | ||
6 | file://README-setup \ | ||
7 | " | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | |||
11 | TOOLCHAIN_TARGET_TASK = "" | ||
12 | |||
13 | TOOLCHAIN_HOST_TASK = "\ | ||
14 | nativesdk-sdk-provides-dummy \ | ||
15 | nativesdk-lopper \ | ||
16 | nativesdk-xilinx-lops \ | ||
17 | nativesdk-esw-conf \ | ||
18 | " | ||
19 | |||
20 | MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" | ||
21 | PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}" | ||
22 | PACKAGE_ARCHS = "" | ||
23 | TARGET_ARCH = "none" | ||
24 | TARGET_OS = "none" | ||
25 | |||
26 | SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}" | ||
27 | |||
28 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-xilinx-nativesdk-prestep-${DISTRO_VERSION}" | ||
29 | |||
30 | SDK_TITLE = "Device Tree setup tools" | ||
31 | |||
32 | RDEPENDS = "${TOOLCHAIN_HOST_TASK}" | ||
33 | |||
34 | EXCLUDE_FROM_WORLD = "1" | ||
35 | |||
36 | inherit populate_sdk | ||
37 | inherit toolchain-scripts-base | ||
38 | inherit nopackages | ||
39 | |||
40 | deltask install | ||
41 | deltask populate_sysroot | ||
42 | |||
43 | do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}" | ||
44 | |||
45 | REAL_MULTIMACH_TARGET_SYS = "none" | ||
46 | |||
47 | # Needed to ensure README-setup and dt-processor.sh are available | ||
48 | addtask do_populate_sdk after do_unpack | ||
49 | |||
50 | create_sdk_files:append () { | ||
51 | |||
52 | install -m 0644 ${WORKDIR}/README-setup ${SDK_OUTPUT}/${SDKPATH}/. | ||
53 | install -m 0755 ${WORKDIR}/dt-processor.sh ${SDK_OUTPUT}/${SDKPATH}/. | ||
54 | |||
55 | rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-* | ||
56 | rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-* | ||
57 | rm -f ${SDK_OUTPUT}/${SDKPATH}/version-* | ||
58 | |||
59 | # Generate new (mini) sdk-environment-setup file | ||
60 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}} | ||
61 | touch $script | ||
62 | echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script | ||
63 | echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script | ||
64 | echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script | ||
65 | echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script | ||
66 | |||
67 | toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS} | ||
68 | |||
69 | cat >> $script <<EOF | ||
70 | if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then | ||
71 | for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do | ||
72 | . \$envfile | ||
73 | done | ||
74 | fi | ||
75 | # We have to unset this else it can confuse oe-selftest and other tools | ||
76 | # which may also use the overlapping namespace. | ||
77 | unset OECORE_NATIVE_SYSROOT | ||
78 | EOF | ||
79 | |||
80 | if [ "${SDKMACHINE}" = "i686" ]; then | ||
81 | echo 'export NO32LIBS="0"' >>$script | ||
82 | echo 'echo "$BB_ENV_PASSTHROUGH_ADDITIONS" | grep -q "NO32LIBS"' >>$script | ||
83 | echo '[ $? != 0 ] && export BB_ENV_PASSTHROUGH_ADDITIONS="NO32LIBS $BB_ENV_PASSTHROUGH_ADDITIONS"' >>$script | ||
84 | fi | ||
85 | } | ||
86 | |||
87 | # buildtools-tarball doesn't need config site | ||
88 | TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" | ||
89 | |||
90 | # The recipe doesn't need any default deps | ||
91 | INHIBIT_DEFAULT_DEPS = "1" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_2024.1.bb index 7edd2d9d..7edd2d9d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/avbuf_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_2024.1.bb index 1846b291..1846b291 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_2024.1.bb index 47111dc5..47111dc5 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axicdma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_2024.1.bb index 68a26f45..68a26f45 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axidma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axidma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axidma_2024.1.bb index c385d13f..c385d13f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axidma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axidma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_2024.1.bb index 04c2c151..04c2c151 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_2024.1.bb index 0b635859..0b635859 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axiethernet_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_2024.1.bb index 4aa716e7..4aa716e7 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_2024.1.bb index ff2eae91..ff2eae91 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axipmon_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_2024.1.bb index b34dedb0..b34dedb0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axis-switch_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_2024.1.bb index 2866c02b..2866c02b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_2024.1.bb index 15268629..15268629 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/axivdma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_2024.1.bb index a3145467..a3145467 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/bram-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/bram_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/bram_2024.1.bb index 3c81c619..3c81c619 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/bram_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/bram_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/can-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/can-example_2024.1.bb index 115852fa..115852fa 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/can-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/can-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/can_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/can_2024.1.bb index eb7fc473..eb7fc473 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/can_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/can_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_2024.1.bb index 84276569..84276569 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/canfd-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canfd_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canfd_2024.1.bb index 5f2e6ea8..5f2e6ea8 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/canfd_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/canfd_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_2024.1.bb index 574dc563..574dc563 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/canps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/canps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/canps_2024.1.bb index c9f61cd2..c9f61cd2 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/canps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/canps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/cframe_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/cframe_2024.1.bb index 6ffdf85d..6ffdf85d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/cframe_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/cframe_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_2024.1.bb index 3cb675bc..3cb675bc 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/cfupmc_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb new file mode 100644 index 00000000..71ffdc32 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz-example_2024.1.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "clk-wiz" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clk_wiz/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_2024.1.bb index ae0453a1..ae0453a1 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/clk-wiz_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_2024.1.bb index f9c5bce6..f9c5bce6 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/clockps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/clockps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/clockps_2024.1.bb index 4bddb2c0..3a464480 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/clockps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/clockps_2024.1.bb | |||
@@ -8,3 +8,6 @@ DEPENDS += "xilstandalone " | |||
8 | 8 | ||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/src/" | 9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/src/" |
10 | ESW_COMPONENT_NAME = "libclockps.a" | 10 | ESW_COMPONENT_NAME = "libclockps.a" |
11 | |||
12 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
13 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/common_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/common_2024.1.bb index 541ff225..10635f7f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/common_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/common_2024.1.bb | |||
@@ -13,11 +13,13 @@ PACKAGECONFIG[clockps] = "${RECIPE_SYSROOT}/usr/lib/libclockps.a,,clockps,," | |||
13 | PACKAGECONFIG[scugic] = "${RECIPE_SYSROOT}/usr/lib/libscugic.a,,scugic,," | 13 | PACKAGECONFIG[scugic] = "${RECIPE_SYSROOT}/usr/lib/libscugic.a,,scugic,," |
14 | PACKAGECONFIG[intc] = "${RECIPE_SYSROOT}/usr/lib/libintc.a,,intc,," | 14 | PACKAGECONFIG[intc] = "${RECIPE_SYSROOT}/usr/lib/libintc.a,,intc,," |
15 | 15 | ||
16 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/common/src/" | 16 | ESW_COMPONENT_SRC = "/lib/bsp/standalone/src/common/intr/" |
17 | ESW_COMPONENT_NAME = "libcommon.a" | 17 | ESW_COMPONENT_NAME = "libcommon.a" |
18 | 18 | ||
19 | do_configure:prepend() { | 19 | do_configure:prepend() { |
20 | ( | ||
21 | cd ${S}/${ESW_COMPONENT_SRC}/ | ||
20 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/intc/src/ | 22 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/intc/src/ |
21 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/scugic/src/ | 23 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/scugic/src/ |
22 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | 24 | ) |
23 | } | 25 | } |
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_2024.1.bb index 9110b51e..9110b51e 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/coresightps-dcc_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_2024.1.bb index 5706967a..5706967a 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/csudma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/csudma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/csudma_2024.1.bb index 8283ce8d..8283ce8d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/csudma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/csudma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_2024.1.bb index 4728b6c5..4728b6c5 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ddrcpsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_2024.1.bb index dd70e09d..dd70e09d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_2024.1.bb index 4b794d22..4b794d22 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/devcfg_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb new file mode 100644 index 00000000..fd01b757 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeccf" | ||
5 | |||
6 | DEPENDS += " dfeccf" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeccf/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb new file mode 100644 index 00000000..86a55b9f --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeccf_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeccf" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeccf/src/" | ||
11 | ESW_COMPONENT_NAME = "libdfeccf.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb new file mode 100644 index 00000000..0f4d45be --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeequ" | ||
5 | |||
6 | DEPENDS += " dfeequ" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeequ/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb new file mode 100644 index 00000000..8ad43c1b --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeequ_2024.1.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeequ" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal " | ||
9 | |||
10 | |||
11 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeequ/src/" | ||
12 | ESW_COMPONENT_NAME = "libdfeequ.a" | ||
13 | |||
14 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
15 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb new file mode 100644 index 00000000..9149e9c4 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfemix" | ||
5 | |||
6 | DEPENDS += " dfemix" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfemix/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb new file mode 100644 index 00000000..31c7b8ed --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfemix_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfemix" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfemix/src/" | ||
11 | ESW_COMPONENT_NAME = "libdfemix.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb new file mode 100644 index 00000000..661c2768 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeofdm" | ||
5 | |||
6 | DEPENDS += " dfeofdm" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeofdm/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb new file mode 100644 index 00000000..a02ceae7 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeofdm_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeofdm" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeofdm/src/" | ||
11 | ESW_COMPONENT_NAME = "libdfeofdm.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb new file mode 100644 index 00000000..10ac2029 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeprach" | ||
5 | |||
6 | DEPENDS += " dfeprach" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeprach/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb new file mode 100644 index 00000000..0890ff3b --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfeprach_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dfeprach" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfeprach/src/" | ||
11 | ESW_COMPONENT_NAME = "libdfeprach.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_2024.1.bb index 974dd48b..974dd48b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_2024.1.bb index 81f2157b..81f2157b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dfxasm_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_2024.1.bb index 40d08e4b..40d08e4b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_2024.1.bb index 1dcd8404..1dcd8404 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dmaps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb new file mode 100644 index 00000000..ab63d3a1 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dp14_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp14" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp14.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb new file mode 100644 index 00000000..4e98b2e4 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dp14rxss_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp14rxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14rxss/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp14rxss.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_2024.1.bb index 3adb88a6..3adb88a6 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dpdma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_2024.1.bb index 87cca884..87cca884 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/dppsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_2024.1.bb index 6ed717fb..6ed717fb 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_2024.1.bb index 9ceb477f..9ceb477f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/emaclite_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_2024.1.bb index 2c57eafe..2c57eafe 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/emacps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emacps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emacps_2024.1.bb index 8ed85984..8ed85984 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/emacps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/emacps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb new file mode 100644 index 00000000..0f46f99b --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/emc_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "emc" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emc/src/" | ||
11 | ESW_COMPONENT_NAME = "libemc.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_2024.1.bb index 3f79cfec..3f79cfec 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpio-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpio_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpio_2024.1.bb index 83a746b7..83a746b7 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/gpio_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpio_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_2024.1.bb index cc2e1703..cc2e1703 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_2024.1.bb index 4bd63d1e..4bd63d1e 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/gpiops_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb new file mode 100644 index 00000000..37d70f6a --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/hwicap_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hwicap" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hwicap/src/" | ||
11 | ESW_COMPONENT_NAME = "libhwicap.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb new file mode 100644 index 00000000..27333e13 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/i2srx_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "i2srx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i2srx/src/" | ||
11 | ESW_COMPONENT_NAME = "libi2srx.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb new file mode 100644 index 00000000..ca09a7f0 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/i2stx_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "i2stx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i2stx/src/" | ||
11 | ESW_COMPONENT_NAME = "libi2stx.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb new file mode 100644 index 00000000..699b9d97 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx-example_2024.1.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "i3cpsx" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i3cpsx/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb new file mode 100644 index 00000000..7b88520d --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/i3cpsx_2024.1.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "i3cpsx" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i3cpsx/src/" | ||
10 | ESW_COMPONENT_NAME = "libi3cpsx.a" | ||
11 | |||
12 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
13 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_2024.1.bb index b781b82c..b781b82c 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/iic-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iic_2024.1.bb index 7011f90b..7011f90b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/iic_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/iic_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_2024.1.bb index e9df1cbd..e9df1cbd 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/iicps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iicps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iicps_2024.1.bb index e96dc2ac..e96dc2ac 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/iicps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/iicps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_2024.1.bb index 0b4b95a8..0b4b95a8 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/intc-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/intc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/intc_2024.1.bb index 331c2e32..331c2e32 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/intc_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/intc_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_2024.1.bb index 1f625521..1f625521 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/iomodule_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_2024.1.bb index 0b31601d..0b31601d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_2024.1.bb index 3e2ccc0b..3e2ccc0b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ipipsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_2024.1.bb index 6b1c211a..6b1c211a 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_2024.1.bb index 1fb76b18..1fb76b18 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/llfifo_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_2024.1.bb index 3c4870b4..3c4870b4 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mbox-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mbox_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mbox_2024.1.bb index 5c1b8393..5c1b8393 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mbox_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mbox_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_2024.1.bb index 64979470..64979470 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_2024.1.bb index f13a7e54..f13a7e54 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mcdma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_2024.1.bb index fc0527da..fc0527da 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mutex-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/mutex_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/mutex_2024.1.bb index 98abc948..98abc948 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/mutex_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/mutex_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb new file mode 100644 index 00000000..ce3f7898 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandps_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "nandps" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/nandps/src/" | ||
11 | ESW_COMPONENT_NAME = "libnandps.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_2024.1.bb index 8b7a88b5..8b7a88b5 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_2024.1.bb index 6d2a71c5..6d2a71c5 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/nandpsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_2024.1.bb index 0ded4fd2..0ded4fd2 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_2024.1.bb index f0548efc..f0548efc 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ospipsv_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_2024.1.bb index 23895fba..23895fba 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_2024.1.bb index ccedb1df..ccedb1df 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/pciepsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb new file mode 100644 index 00000000..12390ae2 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/prc_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "prc" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/prc/src/" | ||
11 | ESW_COMPONENT_NAME = "libprc.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb new file mode 100644 index 00000000..9ea7b2d8 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/prd_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "prd" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/prd/src/" | ||
11 | ESW_COMPONENT_NAME = "libprd.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_2024.1.bb index 674b879a..674b879a 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspips-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspips_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspips_2024.1.bb index fa28d901..fa28d901 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/qspips_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspips_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_2024.1.bb index 21231450..21231450 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_2024.1.bb index 5b4b1614..5b4b1614 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/qspipsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_2024.1.bb index 243393bb..243393bb 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/resetps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/resetps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/resetps_2024.1.bb index c753c666..c753c666 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/resetps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/resetps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb new file mode 100644 index 00000000..973e5177 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc-example_2024.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | inherit esw_examples features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "rfdc" | ||
5 | |||
6 | DEPENDS += " rfdc" | ||
7 | |||
8 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rfdc/examples/" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb new file mode 100644 index 00000000..cfc106b6 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/rfdc_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "rfdc" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone libmetal" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rfdc/src/" | ||
11 | ESW_COMPONENT_NAME = "librfdc.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_2024.1.bb index ac386c4c..ac386c4c 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_2024.1.bb index 7b96bf16..7b96bf16 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/rtcpsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_2024.1.bb index cbef3ce9..cbef3ce9 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/scugic-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scugic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scugic_2024.1.bb index f079354d..f079354d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/scugic_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/scugic_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb new file mode 100644 index 00000000..9e101058 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/scutimer_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "scutimer" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scutimer/src/" | ||
11 | ESW_COMPONENT_NAME = "libscutimer.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb new file mode 100644 index 00000000..757a5de1 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/scuwdt_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "scuwdt" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scuwdt/src/" | ||
11 | ESW_COMPONENT_NAME = "libscuwdt.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb new file mode 100644 index 00000000..e4f61219 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sd-fec_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "sd-fec" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sd_fec/src/" | ||
11 | ESW_COMPONENT_NAME = "libsd_fec.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_2024.1.bb index 550d664b..550d664b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sdps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sdps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sdps_2024.1.bb index 4caf0e63..4caf0e63 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sdps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sdps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb new file mode 100644 index 00000000..3e564725 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/spi_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "spi" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spi/src/" | ||
11 | ESW_COMPONENT_NAME = "libspi.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_2024.1.bb index 71ead5d3..71ead5d3 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/spips-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/spips_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/spips_2024.1.bb index ca02fda0..ca02fda0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/spips_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/spips_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_2024.1.bb index 5bc007ad..5bc007ad 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_2024.1.bb index 5353f6f8..5353f6f8 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmon_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_2024.1.bb index 2c76a978..2c76a978 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_2024.1.bb index 871a77a3..871a77a3 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_2024.1.bb index edce2794..edce2794 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_2024.1.bb index 2c693809..2c693809 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/sysmonpsv_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb new file mode 100644 index 00000000..d8dcff08 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/tft_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "tft" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tft/src/" | ||
11 | ESW_COMPONENT_NAME = "libtft.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_2024.1.bb index dbf3d364..dbf3d364 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-inject_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_2024.1.bb index dd91fed7..dd91fed7 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmr-manager_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_2024.1.bb index 8224d6fe..8224d6fe 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_2024.1.bb index cf94a9d0..cf94a9d0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/tmrctr_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_2024.1.bb index 84c5618c..84c5618c 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_2024.1.bb index 77d000db..77d000db 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/trafgen_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb new file mode 100644 index 00000000..1651ede2 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsv_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "trngpsv" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trngpsv/src/" | ||
11 | ESW_COMPONENT_NAME = "libtrngpsv.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb new file mode 100644 index 00000000..7699dfe5 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/trngpsx_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "trngpsx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trngpsx/src/" | ||
11 | ESW_COMPONENT_NAME = "libtrngpsx.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_2024.1.bb index d294c383..d294c383 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_2024.1.bb index ea520656..ea520656 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/ttcps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_2024.1.bb index 9aa0f598..9aa0f598 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_2024.1.bb index 5998e092..5998e092 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartlite_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_2024.1.bb index d81ce77b..d81ce77b 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_2024.1.bb index a08763cb..a08763cb 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartns550_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_2024.1.bb index bbff466d..bbff466d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartps_2024.1.bb index 932be9eb..932be9eb 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_2024.1.bb index 78f878a6..78f878a6 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_2024.1.bb index 01e48caa..01e48caa 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/uartpsv_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_2024.1.bb index 0d4e113a..0d4e113a 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/usb-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usb_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usb_2024.1.bb index 9dac8cba..9dac8cba 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/usb_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/usb_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb new file mode 100644 index 00000000..c4a2fff0 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbps_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "usbps" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usbps/src/" | ||
11 | ESW_COMPONENT_NAME = "libusbps.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_2024.1.bb index 4eb9bc93..4eb9bc93 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_2024.1.bb index 194b1f0f..194b1f0f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/usbpsu_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_2024.1.bb index 068a43e9..068a43e9 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-csc_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_2024.1.bb index 741fdd91..741fdd91 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-deinterlacer_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_2024.1.bb index cf2cdf6f..cf2cdf6f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_2024.1.bb index 79ef55f2..79ef55f2 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-demosaic_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_2024.1.bb index fc13c194..fc13c194 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_2024.1.bb index 91ee34d8..91ee34d8 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-rd_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_2024.1.bb index 87a1be53..87a1be53 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_2024.1.bb index d88ac592..d88ac592 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-frmbuf-wr_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_2024.1.bb index 4d5dcf03..4d5dcf03 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_2024.1.bb index 8cf95c9d..8cf95c9d 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-gamma-lut_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_2024.1.bb index 1731f984..1731f984 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hcresampler_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb new file mode 100644 index 00000000..1e592d40 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmi-common_2024.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmi-common" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmi_common/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmi_common.a" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb new file mode 100644 index 00000000..d3d601cb --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmiphy1_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmiphy1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmiphy1/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmiphy1.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb new file mode 100644 index 00000000..f2b576cd --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirx1_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmirx1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirx1/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmirx1.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb new file mode 100644 index 00000000..faf57614 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmirxss1_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmirxss1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirxss1/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmirxss1.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb new file mode 100644 index 00000000..7070235e --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitx1_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmitx1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitx1/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmitx1.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb new file mode 100644 index 00000000..de4f4ad9 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hdmitxss1_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmitxss1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitxss1/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmitxss1.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_2024.1.bb index b239380e..b239380e 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-hscaler_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_2024.1.bb index f5ad5f4e..f5ad5f4e 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-letterbox_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_2024.1.bb index 8bafbf00..8bafbf00 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_2024.1.bb index acc19bd0..acc19bd0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-mix_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_2024.1.bb index 28660316..28660316 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_2024.1.bb index bd725dbe..bd725dbe 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-multi-scaler_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_2024.1.bb index 2859de79..2859de79 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_2024.1.bb index 77cf9189..77cf9189 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-scenechange_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_2024.1.bb index 6ea70db1..6ea70db1 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-tpg_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_2024.1.bb index 45913cdc..45913cdc 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-vcresampler_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_2024.1.bb index 9528d2e0..9528d2e0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-vscaler_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb new file mode 100644 index 00000000..f908ce55 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-filter_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-warp-filter" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_warp_filter/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_warp_filter.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb new file mode 100644 index 00000000..ff04ec35 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/v-warp-init_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-warp-init" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_warp_init/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_warp_init.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/video-common_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/video-common_2024.1.bb index 278dee8a..278dee8a 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/video-common_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/video-common_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb new file mode 100644 index 00000000..1a06cf60 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-drivers/vphy_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "vphy" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/vphy/src/" | ||
11 | ESW_COMPONENT_NAME = "libvphy.a" | ||
12 | |||
13 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
14 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_2024.1.bb index d9050ec4..d9050ec4 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_2024.1.bb index 26b2852f..26b2852f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/vprocss_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/vtc_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/vtc_2024.1.bb index a82ae5ee..a82ae5ee 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/vtc_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/vtc_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_2024.1.bb index 610a7476..610a7476 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_2024.1.bb index 2c900038..2c900038 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdtps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_2024.1.bb index cad6ca20..cad6ca20 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_2024.1.bb index 33331c32..33331c32 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/wdttb_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_2024.1.bb index f8878144..f8878144 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_2024.1.bb index 85800a27..85800a27 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xadcps_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_2024.1.bb index 26983a8f..26983a8f 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_2024.1.bb index cab8e9d0..cab8e9d0 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xdmapcie_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_2024.1.bb index d6a87183..d6a87183 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_2024.1.bb index 491eb07c..491eb07c 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/xxvethernet_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_2024.1.bb index e74e3279..e74e3279 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/zdma-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-drivers/zdma_git.bb b/meta-xilinx-standalone-experimental/recipes-drivers/zdma_2024.1.bb index e987f560..e987f560 100644 --- a/meta-xilinx-standalone-experimental/recipes-drivers/zdma_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-drivers/zdma_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_2024.1.bb index 22d7955e..22d7955e 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/freertos10-xilinx_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_2024.1.bb index 2ec1d6cd..2eb08307 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/libxil_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/libxil_2024.1.bb | |||
@@ -25,14 +25,10 @@ ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" | |||
25 | ESW_COMPONENT_NAME = "libxil.a" | 25 | ESW_COMPONENT_NAME = "libxil.a" |
26 | 26 | ||
27 | DEPENDS += "xilstandalone " | 27 | DEPENDS += "xilstandalone " |
28 | MACHINE_FEATURES:remove = "aiengine dfeccf dfeequ dfemix dfeprach rfdc dfeofdm" | ||
28 | REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}" | 29 | REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}" |
29 | PACKAGECONFIG ?= "${MACHINE_FEATURES}" | 30 | PACKAGECONFIG ?= "${MACHINE_FEATURES}" |
30 | 31 | ||
31 | do_configure:prepend() { | ||
32 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S} | ||
33 | install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/ | ||
34 | } | ||
35 | |||
36 | do_compile() { | 32 | do_compile() { |
37 | # Combines the .a archives produced by all of the dependent items | 33 | # Combines the .a archives produced by all of the dependent items |
38 | cd ${RECIPE_SYSROOT}/usr/lib/ | 34 | cd ${RECIPE_SYSROOT}/usr/lib/ |
@@ -48,3 +44,12 @@ do_compile() { | |||
48 | ${AR} -M <libxil.mri | 44 | ${AR} -M <libxil.mri |
49 | cp libxil.a ${B} | 45 | cp libxil.a ${B} |
50 | } | 46 | } |
47 | |||
48 | do_install() { | ||
49 | install -d ${D}${libdir} | ||
50 | install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir} | ||
51 | |||
52 | # Install Spec files for consumers of BSP | ||
53 | install -d ${D}${includedir} | ||
54 | cp -rf ${SPECFILE_PATH} ${D}${includedir} | ||
55 | } | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/lwip_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/lwip_2024.1.bb index 93f0b1e8..e70dfa11 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/lwip_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/lwip_2024.1.bb | |||
@@ -1,17 +1,17 @@ | |||
1 | inherit esw python3native | 1 | inherit esw python3native |
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip213/src/" | 3 | ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip220/src/" |
4 | ESW_COMPONENT_NAME = "liblwip213.a" | 4 | ESW_COMPONENT_NAME = "liblwip220.a" |
5 | 5 | ||
6 | DEPENDS += "libxil" | 6 | DEPENDS += "libxil" |
7 | DEPENDS:append:xilinx-freertos = "freertos10-xilinx" | 7 | DEPENDS:append:xilinx-freertos = "freertos10-xilinx" |
8 | 8 | ||
9 | EXTRA_OECMAKE += "-Dlwip213_api_mode=RAW_API" | 9 | EXTRA_OECMAKE += "-Dlwip220_api_mode=RAW_API" |
10 | EXTRA_OECMAKE += "-Dlwip213_dhcp_does_arp_check=ON" | 10 | EXTRA_OECMAKE += "-Dlwip220_dhcp_does_arp_check=ON" |
11 | EXTRA_OECMAKE += "-Dlwip213_dhcp=ON" | 11 | EXTRA_OECMAKE += "-Dlwip220_dhcp=ON" |
12 | EXTRA_OECMAKE += "-Dlwip213_pbuf_pool_size=2048" | 12 | EXTRA_OECMAKE += "-Dlwip220_pbuf_pool_size=2048" |
13 | EXTRA_OECMAKE += "-Dlwip213_ipv6_enable=OFF" | 13 | EXTRA_OECMAKE += "-Dlwip220_ipv6_enable=OFF" |
14 | EXTRA_OECMAKE:append:xilinx-freertos = " -Dlwip213_api_mode=SOCKET_API" | 14 | EXTRA_OECMAKE:append:xilinx-freertos = " -Dlwip220_api_mode=SOCKET_API" |
15 | 15 | ||
16 | do_configure:prepend() { | 16 | do_configure:prepend() { |
17 | # This script should also not rely on relative paths and such | 17 | # This script should also not rely on relative paths and such |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_2024.1.bb index cae39d17..cae39d17 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_2024.1.bb index b8dc3b33..b8dc3b33 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilffs_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_2024.1.bb index a3fb1560..a3fb1560 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_2024.1.bb index 6eaf40ac..6eaf40ac 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilfpga_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_2024.1.bb index 11b03c1b..11b03c1b 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilloader_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_2024.1.bb index 600369ad..600369ad 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox-example_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_2024.1.bb index 77115515..77115515 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilmailbox_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb index a4a81c8b..bd001f64 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm-example_2024.1.bb | |||
@@ -2,6 +2,10 @@ inherit esw deploy | |||
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/examples/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/examples/" |
4 | 4 | ||
5 | PACKAGECONFIG ??= "client server" | ||
6 | PACKAGECONFIG[client] ="-DXILNVM_mode="client",," | ||
7 | PACKAGECONFIG[server] ="-DXILNVM_mode="server",," | ||
8 | |||
5 | DEPENDS += "xilnvm" | 9 | DEPENDS += "xilnvm" |
6 | 10 | ||
7 | do_configure:prepend() { | 11 | do_configure:prepend() { |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb new file mode 100644 index 00000000..8aa1250d --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_2024.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilnvm.a" | ||
5 | |||
6 | PACKAGECONFIG ??= "client server" | ||
7 | PACKAGECONFIG[client] ="-DXILNVM_mode="client",," | ||
8 | PACKAGECONFIG[server] ="-DXILNVM_mode="server",," | ||
9 | |||
10 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb deleted file mode 100644 index 9114aa72..00000000 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilnvm_git.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilnvm.a" | ||
5 | |||
6 | DEPENDS += "libxil xiltimer xilplmi" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_2024.1.bb index c008b069..c008b069 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpdi_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb new file mode 100644 index 00000000..cb3b7831 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_2024.1.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilplmi/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilplmi.a" | ||
5 | |||
6 | DEPENDS += "xilstandalone libxil cfupmc xiltimer ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb deleted file mode 100644 index 35a1efb0..00000000 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilplmi_git.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilplmi/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilplmi.a" | ||
5 | |||
6 | DEPENDS += "xilstandalone libxil cfupmc" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_2024.1.bb index 69b505c8..69b505c8 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpm_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_2024.1.bb index ca0abc12..bbe2920b 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf-example_2024.1.bb | |||
@@ -2,7 +2,11 @@ inherit esw deploy | |||
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/examples/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/examples/" |
4 | 4 | ||
5 | DEPENDS += "xilpuf xilsecure" | 5 | PACKAGECONFIG ??= "client server" |
6 | PACKAGECONFIG[client] ="-DXILPUF_Mode="client",," | ||
7 | PACKAGECONFIG[server] ="-DXILPUF_Mode="server",," | ||
8 | |||
9 | DEPENDS += "xilpuf xilsecure xilmailbox xilnvm xilplmi" | ||
6 | 10 | ||
7 | do_configure:prepend() { | 11 | do_configure:prepend() { |
8 | ( | 12 | ( |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_2024.1.bb index 81bee095..84765a39 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilpuf_2024.1.bb | |||
@@ -3,4 +3,8 @@ inherit esw | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/" |
4 | ESW_COMPONENT_NAME = "libxilpuf.a" | 4 | ESW_COMPONENT_NAME = "libxilpuf.a" |
5 | 5 | ||
6 | PACKAGECONFIG ??= "client server" | ||
7 | PACKAGECONFIG[client] ="-DXILPUF_Mode="client",," | ||
8 | PACKAGECONFIG[server] ="-DXILPUF_Mode="server",," | ||
9 | |||
6 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}" | 10 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}" |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb new file mode 100644 index 00000000..a2b4b7a5 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_2024.1.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/examples/" | ||
4 | |||
5 | PACKAGECONFIG ??= "client server" | ||
6 | PACKAGECONFIG[client] ="-DXILSECURE_mode="client",," | ||
7 | PACKAGECONFIG[server] ="-DXILSECURE_mode="server",," | ||
8 | |||
9 | DEPENDS += "xilsecure" | ||
10 | |||
11 | do_configure:prepend() { | ||
12 | ( | ||
13 | cd ${S} | ||
14 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
15 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
16 | ) | ||
17 | } | ||
18 | |||
19 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
20 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
21 | |||
22 | do_install() { | ||
23 | install -d ${D}/${base_libdir}/firmware | ||
24 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
25 | } | ||
26 | |||
27 | do_deploy() { | ||
28 | install -d ${DEPLOYDIR}/${BPN}/ | ||
29 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
30 | } | ||
31 | addtask deploy before do_build after do_package | ||
32 | |||
33 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb new file mode 100644 index 00000000..be22ba90 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_2024.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilsecure.a" | ||
5 | |||
6 | PACKAGECONFIG ??= "client server" | ||
7 | PACKAGECONFIG[client] ="-DXILSECURE_mode="client",," | ||
8 | PACKAGECONFIG[server] ="-DXILSECURE_mode="server",," | ||
9 | |||
10 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' or d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''} ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}" | ||
11 | |||
12 | do_install:append() { | ||
13 | install -m 0755 ${B}/*.a ${D}${libdir} | ||
14 | } | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb deleted file mode 100644 index 0001d3fb..00000000 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure_git.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilsecure.a" | ||
5 | |||
6 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else ''} ${@'xilmailbox' if d.getVar('ESW_MACHINE') == 'psv_cortexa72_0' or d.getVar('ESW_MACHINE') == 'psv_cortexr5_0' else ''}" | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_2024.1.bb index 3631d7f0..3631d7f0 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilsem_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey-example_2024.1.bb index 993794b5..a42d6fd2 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilsecure-example_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey-example_2024.1.bb | |||
@@ -1,29 +1,29 @@ | |||
1 | inherit esw deploy | 1 | inherit esw deploy |
2 | 2 | ||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilsecure/examples/" | 3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilskey/examples/" |
4 | 4 | ||
5 | DEPENDS += "xilsecure" | 5 | DEPENDS += "xilskey xilsecure" |
6 | 6 | ||
7 | do_configure:prepend() { | 7 | do_configure:prepend() { |
8 | ( | 8 | ( |
9 | cd ${S} | 9 | cd ${S} |
10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | 10 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} |
11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | 11 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ |
12 | ) | 12 | ) |
13 | } | 13 | } |
14 | 14 | ||
15 | ESW_CUSTOM_LINKER_FILE ?= "None" | 15 | ESW_CUSTOM_LINKER_FILE ?= "None" |
16 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | 16 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" |
17 | 17 | ||
18 | do_install() { | 18 | do_install() { |
19 | install -d ${D}/${base_libdir}/firmware | 19 | install -d ${D}/${base_libdir}/firmware |
20 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | 20 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware |
21 | } | 21 | } |
22 | 22 | ||
23 | do_deploy() { | 23 | do_deploy() { |
24 | install -d ${DEPLOYDIR}/${BPN}/ | 24 | install -d ${DEPLOYDIR}/${BPN}/ |
25 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | 25 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ |
26 | } | 26 | } |
27 | addtask deploy before do_build after do_package | 27 | addtask deploy before do_build after do_package |
28 | 28 | ||
29 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | 29 | FILES:${PN} = "${base_libdir}/firmware/*.elf" |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_2024.1.bb index 84782554..84782554 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilskey_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_2024.1.bb index facbfbaa..a4b0037b 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xilstandalone_2024.1.bb | |||
@@ -14,5 +14,8 @@ do_configure:prepend() { | |||
14 | install -m 0755 *.c ${S}/${ESW_COMPONENT_SRC} | 14 | install -m 0755 *.c ${S}/${ESW_COMPONENT_SRC} |
15 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | 15 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} |
16 | install -m 0755 StandaloneExample.cmake ${S}/${ESW_COMPONENT_SRC}/common/ | 16 | install -m 0755 StandaloneExample.cmake ${S}/${ESW_COMPONENT_SRC}/common/ |
17 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S} | ||
18 | install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/common/ | ||
17 | ) | 19 | ) |
20 | |||
18 | } | 21 | } |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_git.bb b/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_2024.1.bb index dd19671d..dd19671d 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-libraries/xiltimer_2024.1.bb | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend b/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend new file mode 100644 index 00000000..5434c9a5 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx.inc | |||
diff --git a/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend b/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend new file mode 100644 index 00000000..88b45295 --- /dev/null +++ b/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx.inc | |||
diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass index b1e1929f..d8f7ebfb 100644 --- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass +++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | |||
@@ -1,29 +1,46 @@ | |||
1 | |||
1 | # Automatically determnine the version from the bb file | 2 | # Automatically determnine the version from the bb file |
2 | ESW_VER ?= "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or 'master'}" | 3 | ESW_VER ?= "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or 'master'}" |
3 | 4 | ||
4 | REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" | 5 | REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" |
5 | 6 | ||
7 | ESW_BRANCH[git] = "master" | ||
6 | ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update" | 8 | ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update" |
7 | ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" | 9 | ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" |
8 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" | 10 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" |
9 | ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2_update" | 11 | ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2_update" |
12 | ESW_BRANCH[2024.1] = "xlnx_rel_v2024.1-next" | ||
10 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" | 13 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" |
11 | 14 | ||
15 | ESW_REV[git] = "${AUTOREV}" | ||
12 | ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01" | 16 | ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01" |
13 | ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" | 17 | ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" |
14 | ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" | 18 | ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" |
15 | ESW_REV[2023.2] = "e847e1935dca630615e5f7dc694365a44b89699c" | 19 | ESW_REV[2023.2] = "e847e1935dca630615e5f7dc694365a44b89699c" |
16 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'invalid'}" | 20 | ESW_REV[2024.1] = "faf498ef6012b89134892af6644943bd3caa776d" |
21 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'INVALID'}" | ||
17 | 22 | ||
18 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" | 23 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" |
19 | EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" | 24 | EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" |
20 | 25 | ||
21 | LICENSE = "MIT" | 26 | LICENSE = "MIT" |
27 | LIC_FILES_CHKSUM[master] = '9fceecdbcad88698f265578f3d4cb26c' | ||
22 | LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d' | 28 | LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d' |
23 | LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' | 29 | LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' |
24 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' | 30 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' |
25 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_update] = '9fceecdbcad88698f265578f3d4cb26c' | 31 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_update] = '9fceecdbcad88698f265578f3d4cb26c' |
32 | LIC_FILES_CHKSUM[xlnx_rel_v2024.1-next] = '443113d5aa8fd5facf31e9c5d25dc114' | ||
26 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" | 33 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" |
27 | 34 | ||
28 | SRC_URI = "${EMBEDDEDSW_SRCURI}" | 35 | SRC_URI = "${EMBEDDEDSW_SRCURI}" |
29 | PV .= "+git${SRCPV}" | 36 | PV .= "+git${SRCPV}" |
37 | |||
38 | python() { | ||
39 | if d.getVar('BB_NO_NETWORK') == '1': | ||
40 | try: | ||
41 | # Just evaluating SRCPV / SRCREV can trigger an exception when BB_NO_NETWORK is enabled. | ||
42 | var = d.getVar('SRCPV') | ||
43 | var = d.getVar('SRCREV') | ||
44 | except: | ||
45 | raise bb.parse.SkipRecipe('BB_NO_NETWORK is enabled, can not fetch SRCREV (%s)' % d.getVar('SRCREV')) | ||
46 | } | ||
diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc index 814cb9cd..4d591707 100644 --- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc +++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc | |||
@@ -15,6 +15,9 @@ ESW_CFLAGS ?= "" | |||
15 | 15 | ||
16 | # Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw | 16 | # Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw |
17 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}" | 17 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}" |
18 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr52', ' -DARMR5 -DARMR52', '', d)}" | ||
19 | TUNE_CCARGS:append:versal = " -Dversal" | ||
20 | TUNE_CCARGS:append:versal-net = " -DVERSAL_NET" | ||
18 | 21 | ||
19 | # Make sure all regular recipes are excluded from compatibility | 22 | # Make sure all regular recipes are excluded from compatibility |
20 | # Avoid using this for native, nativesdk or cross recipes | 23 | # Avoid using this for native, nativesdk or cross recipes |
@@ -25,9 +28,8 @@ COMPATIBLE_HOST ?= "${COMPATOS}" | |||
25 | 28 | ||
26 | # Clear defaults | 29 | # Clear defaults |
27 | PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" | 30 | PREFERRED_PROVIDER_virtual/kernel = "linux-dummy" |
28 | 31 | PREFERRED_PROVIDER_libmetal = "libmetal-xlnx" | |
29 | PREFERRED_VERSION_libmetal-xlnx = "${@'standalone' if 'xilinx-standalone-exp' in d.getVar('BBFILE_COLLECTIONS').split() else ''}" | 32 | PREFERRED_PROVIDER_open-amp = "open-amp-xlnx" |
30 | PREFERRED_VERSION_open-amp-xlnx = "${@'standalone' if 'xilinx-standalone-exp' in d.getVar('BBFILE_COLLECTIONS').split() else ''}" | ||
31 | 33 | ||
32 | # Workaround for pulling in nativesdk-mingw-w64-winpthreads | 34 | # Workaround for pulling in nativesdk-mingw-w64-winpthreads |
33 | TOOLCHAIN_HOST_TASK:append:sdkmingw32 = " nativesdk-mingw-w64-winpthreads" | 35 | TOOLCHAIN_HOST_TASK:append:sdkmingw32 = " nativesdk-mingw-w64-winpthreads" |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/0001-versal_fw-Fixup-core-makefiles.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/0001-versal_fw-Fixup-core-makefiles.patch new file mode 100644 index 00000000..d6cb0e38 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/0001-versal_fw-Fixup-core-makefiles.patch | |||
@@ -0,0 +1,101 @@ | |||
1 | From 607322dafb2979affd329ea70a2a7952203188a4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Wed, 7 Dec 2022 15:42:15 -0800 | ||
4 | Subject: [PATCH] versal_fw: Fixup core makefiles | ||
5 | |||
6 | The Yocto Project build environment needs to be able to override a few | ||
7 | additional variables that may not be appropriate to do on the regular | ||
8 | command line build version. This patch preserves the default while | ||
9 | allowing it to be overriden as necessary. | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | --- | ||
13 | lib/sw_apps/versal_plm/misc/versal/Makefile | 6 ++++-- | ||
14 | lib/sw_apps/versal_plm/misc/versal_net/Makefile | 6 ++++-- | ||
15 | lib/sw_apps/versal_psmfw/misc/Makefile | 6 ++++-- | ||
16 | 3 files changed, 12 insertions(+), 6 deletions(-) | ||
17 | |||
18 | diff --git a/lib/sw_apps/versal_plm/misc/versal/Makefile b/lib/sw_apps/versal_plm/misc/versal/Makefile | ||
19 | index 5c8e719e9c..af070716b6 100644 | ||
20 | --- a/lib/sw_apps/versal_plm/misc/versal/Makefile | ||
21 | +++ b/lib/sw_apps/versal_plm/misc/versal/Makefile | ||
22 | @@ -2,6 +2,8 @@ | ||
23 | COMPILER := mb-gcc | ||
24 | ARCHIVER := mb-gcc-ar | ||
25 | ASSEMBLER := mb-as | ||
26 | +COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare | ||
27 | +EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects | ||
28 | DRIVER_LIB_VERSION = 1.0 | ||
29 | PROCESSOR = psv_pmc_0 | ||
30 | LIBRARIES = ${PROCESSOR}/lib/libxil.a | ||
31 | @@ -40,11 +42,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a | ||
32 | |||
33 | %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) | ||
34 | @echo "Running Make include in $(subst /make.include,,$@)" | ||
35 | - $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
36 | + $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
37 | |||
38 | %/make.libs: include | ||
39 | @echo "Running Make libs in $(subst /make.libs,,$@)" | ||
40 | - $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
41 | + $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
42 | |||
43 | %/make.clean: | ||
44 | $(MAKE) -C $(subst /make.clean,,$@) -s clean | ||
45 | diff --git a/lib/sw_apps/versal_plm/misc/versal_net/Makefile b/lib/sw_apps/versal_plm/misc/versal_net/Makefile | ||
46 | index abffa6c5ed..4af5a02001 100644 | ||
47 | --- a/lib/sw_apps/versal_plm/misc/versal_net/Makefile | ||
48 | +++ b/lib/sw_apps/versal_plm/misc/versal_net/Makefile | ||
49 | @@ -2,6 +2,8 @@ | ||
50 | COMPILER := mb-gcc | ||
51 | ARCHIVER := mb-gcc-ar | ||
52 | ASSEMBLER := mb-as | ||
53 | +COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare | ||
54 | +EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects | ||
55 | DRIVER_LIB_VERSION = 1.0 | ||
56 | PROCESSOR = psx_pmc_0 | ||
57 | LIBRARIES = ${PROCESSOR}/lib/libxil.a | ||
58 | @@ -40,11 +42,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a | ||
59 | |||
60 | %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) | ||
61 | @echo "Running Make include in $(subst /make.include,,$@)" | ||
62 | - $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
63 | + $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
64 | |||
65 | %/make.libs: include | ||
66 | @echo "Running Make libs in $(subst /make.libs,,$@)" | ||
67 | - $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
68 | + $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
69 | |||
70 | %/make.clean: | ||
71 | $(MAKE) -C $(subst /make.clean,,$@) -s clean | ||
72 | diff --git a/lib/sw_apps/versal_psmfw/misc/Makefile b/lib/sw_apps/versal_psmfw/misc/Makefile | ||
73 | index 02d85e492e..f6386dcbed 100644 | ||
74 | --- a/lib/sw_apps/versal_psmfw/misc/Makefile | ||
75 | +++ b/lib/sw_apps/versal_psmfw/misc/Makefile | ||
76 | @@ -11,6 +11,8 @@ PAR_SUBDIRS := $(patsubst %/Makefile, %, $(BSP_PARALLEL_MAKEFILES)) | ||
77 | COMPILER := mb-gcc | ||
78 | ARCHIVER := mb-ar | ||
79 | ASSEMBLER := mb-as | ||
80 | +COMPILER_FLAGS := -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare | ||
81 | +EXTRA_COMPILER_FLAGS := -g -ffunction-sections -fdata-sections -Wall -Wextra | ||
82 | |||
83 | ifneq (,$(findstring win,$(RDI_PLATFORM))) | ||
84 | SHELL = CMD | ||
85 | @@ -41,11 +43,11 @@ $(PROCESSOR)/lib/libxil.a: $(PROCESSOR)/lib/libxil_init.a | ||
86 | |||
87 | %/make.include: $(if $(wildcard $(PROCESSOR)/lib/libxil_init.a),$(PROCESSOR)/lib/libxil.a,) | ||
88 | @echo "Running Make include in $(subst /make.include,,$@)" | ||
89 | - $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
90 | + $(MAKE) -C $(subst /make.include,,$@) -s include "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
91 | |||
92 | %/make.libs: include | ||
93 | @echo "Running Make libs in $(subst /make.libs,,$@)" | ||
94 | - $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS= -O2 -c -mcpu=v10.0 -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare" "EXTRA_COMPILER_FLAGS=-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
95 | + $(MAKE) -C $(subst /make.libs,,$@) -s libs "SHELL=$(SHELL)" "COMPILER=$(COMPILER)" "ASSEMBLER=$(ASSEMBLER)" "ARCHIVER=$(ARCHIVER)" "COMPILER_FLAGS=$(COMPILER_FLAGS)" "EXTRA_COMPILER_FLAGS=$(EXTRA_COMPILER_FLAGS)" | ||
96 | |||
97 | %/make.clean: | ||
98 | $(MAKE) -C $(subst /make.clean,,$@) -s clean | ||
99 | -- | ||
100 | 2.17.1 | ||
101 | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 00000000..4ce521cd --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.1/makefile-skip-copy_bsp.sh.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | From d703670357546d9aab66baea1f6751ba1cbdf7ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Wed, 7 Dec 2022 15:30:23 -0800 | ||
4 | Subject: [PATCH] Prevent makefile from calling copy_bsp.sh | ||
5 | |||
6 | If we call copy_bsp.sh we will undo any manual compliation steps we | ||
7 | have already done. Avoid this. | ||
8 | |||
9 | YP integration specific | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | --- | ||
13 | lib/sw_apps/versal_plm/src/versal/Makefile | 4 ++-- | ||
14 | lib/sw_apps/versal_plm/src/versal_net/Makefile | 4 ++-- | ||
15 | lib/sw_apps/versal_psmfw/src/versal/Makefile | 4 ++-- | ||
16 | lib/sw_apps/versal_psmfw/src/versal_net/Makefile | 6 +++--- | ||
17 | lib/sw_apps/zynqmp_pmufw/src/Makefile | 4 ++-- | ||
18 | 5 files changed, 11 insertions(+), 11 deletions(-) | ||
19 | |||
20 | Index: git/lib/sw_apps/versal_plm/src/versal/Makefile | ||
21 | =================================================================== | ||
22 | --- git.orig/lib/sw_apps/versal_plm/src/versal/Makefile | ||
23 | +++ git/lib/sw_apps/versal_plm/src/versal/Makefile | ||
24 | @@ -35,8 +35,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) | ||
25 | $(OBJS): $(LIBS) | ||
26 | |||
27 | $(LIBS): | ||
28 | - echo "Copying BSP files" | ||
29 | - ../../misc/versal/copy_bsp.sh | ||
30 | + #echo "Copying BSP files" | ||
31 | + #../../misc/versal/copy_bsp.sh | ||
32 | echo "Compiling bsp" | ||
33 | $(MAKE) -C ../../misc/versal/versal_plm_bsp | ||
34 | |||
35 | Index: git/lib/sw_apps/versal_plm/src/versal_net/Makefile | ||
36 | =================================================================== | ||
37 | --- git.orig/lib/sw_apps/versal_plm/src/versal_net/Makefile | ||
38 | +++ git/lib/sw_apps/versal_plm/src/versal_net/Makefile | ||
39 | @@ -35,8 +35,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) | ||
40 | $(OBJS): $(LIBS) | ||
41 | |||
42 | $(LIBS): | ||
43 | - echo "Copying BSP files" | ||
44 | - ../../misc/versal_net/copy_bsp.sh | ||
45 | + #echo "Copying BSP files" | ||
46 | + #../../misc/versal_net/copy_bsp.sh | ||
47 | echo "Compiling bsp" | ||
48 | $(MAKE) -C ../../misc/versal_net/versal_plm_bsp | ||
49 | |||
50 | Index: git/lib/sw_apps/versal_psmfw/src/versal/Makefile | ||
51 | =================================================================== | ||
52 | --- git.orig/lib/sw_apps/versal_psmfw/src/versal/Makefile | ||
53 | +++ git/lib/sw_apps/versal_psmfw/src/versal/Makefile | ||
54 | @@ -37,8 +37,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) | ||
55 | $(OBJS): $(LIBS) | ||
56 | |||
57 | $(LIBS): | ||
58 | - echo "Copying BSP files" | ||
59 | - ../../misc/copy_bsp.sh | ||
60 | + #echo "Copying BSP files" | ||
61 | + #../../misc/copy_bsp.sh | ||
62 | echo "Compiling bsp" | ||
63 | $(MAKE) -C ../../misc/versal_psmfw_bsp | ||
64 | |||
65 | Index: git/lib/sw_apps/versal_psmfw/src/versal_net/Makefile | ||
66 | =================================================================== | ||
67 | --- git.orig/lib/sw_apps/versal_psmfw/src/versal_net/Makefile | ||
68 | +++ git/lib/sw_apps/versal_psmfw/src/versal_net/Makefile | ||
69 | @@ -37,8 +37,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) | ||
70 | $(OBJS): $(LIBS) | ||
71 | |||
72 | $(LIBS): | ||
73 | - echo "Copying BSP files" | ||
74 | - ../../misc/versal_net/copy_bsp.sh | ||
75 | + #echo "Copying BSP files" | ||
76 | + #../../misc/versal_net/copy_bsp.sh | ||
77 | echo "Compiling bsp" | ||
78 | $(MAKE) -C ../../misc/versal_net/versal_psmfw_bsp | ||
79 | |||
80 | @@ -47,4 +47,3 @@ $(LIBS): | ||
81 | |||
82 | clean: | ||
83 | rm -rf $(OBJS) $(LIBS) $(EXEC) *.o *.d ../common/*.o ../common/*.d | ||
84 | - rm -rf ../../misc/versal_net/versal_psmfw_bsp | ||
85 | Index: git/lib/sw_apps/zynqmp_pmufw/src/Makefile | ||
86 | =================================================================== | ||
87 | --- git.orig/lib/sw_apps/zynqmp_pmufw/src/Makefile | ||
88 | +++ git/lib/sw_apps/zynqmp_pmufw/src/Makefile | ||
89 | @@ -30,8 +30,8 @@ $(EXEC): $(LIBS) $(OBJS) $(INCLUDES) | ||
90 | $(OBJS): $(LIBS) | ||
91 | |||
92 | $(LIBS): | ||
93 | - echo "Copying BSP files" | ||
94 | - ../misc/copy_bsp.sh | ||
95 | + #echo "Copying BSP files" | ||
96 | + #../misc/copy_bsp.sh | ||
97 | echo "Compiling bsp" | ||
98 | $(MAKE) -C ../misc/zynqmp_pmufw_bsp | ||
99 | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb new file mode 100644 index 00000000..62e009ec --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require fsbl-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2024.1:${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://fsbl-fixups.patch \ | ||
8 | " | ||
9 | |||
10 | # This version does not build for zynq | ||
11 | COMPATIBLE_MACHINE:zynq = "none" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb new file mode 100644 index 00000000..37861b75 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.1.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | require plm-firmware.inc | ||
2 | |||
3 | # Separate build directories for versal and versal-net | ||
4 | SOC_DIR = "versal" | ||
5 | SOC_DIR:versal-net = "versal_net" | ||
6 | B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}" | ||
7 | |||
8 | BSP_DIR ?= "${B}/../../misc/versal_plm_bsp" | ||
9 | |||
10 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" | ||
11 | |||
12 | SRC_URI += " \ | ||
13 | file://makefile-skip-copy_bsp.sh.patch \ | ||
14 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
15 | " | ||
16 | |||
17 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
18 | |||
19 | do_configure() { | ||
20 | # manually do the copy_bsp step first, so as to be able to fix up use of | ||
21 | # mb-* commands | ||
22 | ${B}/../../misc/${SOC_DIR}/copy_bsp.sh | ||
23 | } | ||
24 | |||
25 | do_compile() { | ||
26 | oe_runmake | ||
27 | |||
28 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
29 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb new file mode 100644 index 00000000..fab49bc0 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.1.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | require pmu-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2024.1:${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra ${ESW_CFLAGS}" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb new file mode 100644 index 00000000..569c5a46 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.1.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | require psm-firmware.inc | ||
2 | |||
3 | # Separate build directories for versal and versal-net | ||
4 | SOC_DIR = "versal" | ||
5 | SOC_DIR:versal-net = "versal_net" | ||
6 | B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}" | ||
7 | |||
8 | BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp" | ||
9 | |||
10 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/2023.1:${FILE_DIRNAME}/embeddedsw" | ||
11 | |||
12 | SRC_URI += " \ | ||
13 | file://makefile-skip-copy_bsp.sh.patch \ | ||
14 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
15 | " | ||
16 | |||
17 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
18 | |||
19 | # Override default since we're in a subdirectory deeper now... | ||
20 | do_configure() { | ||
21 | # manually do the copy_bsp step first, so as to be able to fix up use of | ||
22 | # mb-* commands | ||
23 | if [ ${SOC_DIR} != "versal" ]; then | ||
24 | ${B}/../../misc/${SOC_DIR}/copy_bsp.sh | ||
25 | else | ||
26 | ${B}/../../misc/copy_bsp.sh | ||
27 | fi | ||
28 | } | ||
29 | |||
30 | do_compile() { | ||
31 | oe_runmake | ||
32 | |||
33 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
34 | } | ||
diff --git a/meta-xilinx-virtualization/COPYING.MIT b/meta-xilinx-virtualization/COPYING.MIT new file mode 100644 index 00000000..fb950dc6 --- /dev/null +++ b/meta-xilinx-virtualization/COPYING.MIT | |||
@@ -0,0 +1,17 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/meta-xilinx-virtualization/README.md b/meta-xilinx-virtualization/README.md new file mode 100644 index 00000000..5b66ea38 --- /dev/null +++ b/meta-xilinx-virtualization/README.md | |||
@@ -0,0 +1,154 @@ | |||
1 | # meta-xilinx-vendor | ||
2 | |||
3 | This layer enables AMD Xilinx Xen configurations and features for ZynqMP and | ||
4 | Versal devices and also provides related metadata. | ||
5 | |||
6 | ## Xen Build Instructions | ||
7 | |||
8 | The Yocto Project setup for AMD Xilinx Xen configurations workflow is as follows. | ||
9 | Be sure to read everything below. | ||
10 | |||
11 | 1. Follow [Building Instructions](../README.building.md) upto step 2. | ||
12 | |||
13 | 2. Clone the meta-security repository. | ||
14 | |||
15 | ``` | ||
16 | $ git clone -b <release-branch> https://git.yoctoproject.org/meta-security | ||
17 | ``` | ||
18 | |||
19 | 3. Continue [Building Instructions](../README.building.md) from step 4. | ||
20 | |||
21 | > **Note:** | ||
22 | > * For System Device Tree(SDT) workflow see [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md) | ||
23 | |||
24 | 4. Add meta-xilinx-virtualization layer to bblayers.conf as shown below. | ||
25 | |||
26 | ``` | ||
27 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-virtualization | ||
28 | ``` | ||
29 | |||
30 | 5. The following variables needs to be added to the end of the conf/local.conf file. | ||
31 | |||
32 | ``` | ||
33 | # Xen variables | ||
34 | BOOTMODE = "xen" | ||
35 | ENABLE_XEN_UBOOT_SCR = "1" | ||
36 | ENABLE_XEN_DTSI = "1" | ||
37 | ENABLE_XEN_QEMU_DTSI = "1" | ||
38 | |||
39 | # Default Xen Serial Console is serial0, if you are using serial1 then set as show below. | ||
40 | XEN_SERIAL_CONSOLES = "serial1" | ||
41 | |||
42 | # Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image. | ||
43 | IMAGE_FSTYPES += "cpio.gz" | ||
44 | RAMDISK_IMAGE = "rootfs.cpio.gz" | ||
45 | |||
46 | # Variables for Xen SD WIC image boot flow. | ||
47 | IMAGE_FSTYPES += "wic" | ||
48 | WKS_FILES = "xilinx-default-sd.wks" | ||
49 | |||
50 | DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen" | ||
51 | |||
52 | IMAGE_FEATURES += "ssh-server-openssh" | ||
53 | |||
54 | DISTRO_FEATURES:append = " systemd" | ||
55 | VIRTUAL-RUNTIME_init_manager = "systemd" | ||
56 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | ||
57 | |||
58 | IMAGE_INSTALL:append = " \ | ||
59 | kernel-module-xen-blkback \ | ||
60 | kernel-module-xen-gntalloc \ | ||
61 | kernel-module-xen-gntdev \ | ||
62 | kernel-module-xen-netback \ | ||
63 | kernel-module-xen-wdt \ | ||
64 | xen \ | ||
65 | xen-tools \ | ||
66 | xen-tools-xenstat \ | ||
67 | ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \ | ||
68 | " | ||
69 | ``` | ||
70 | |||
71 | 6. Continue [Building Instructions](../README.building.md) from step 5. | ||
72 | |||
73 | ## Xen Boot Instructions | ||
74 | |||
75 | > **Note:** | ||
76 | > * This README provides instructions for Xen Dom0 only. | ||
77 | |||
78 | 1. Follow [Booting Instructions](../README.booting.md) upto step 2. | ||
79 | |||
80 | 2. Verify Xen Dom0 is up and running on QEMU or target as shown below. | ||
81 | |||
82 | ``` | ||
83 | Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0 | ||
84 | |||
85 | zynqmp-generic login: root | ||
86 | root@zynqmp-generic:~# xl list | ||
87 | Name ID Mem VCPUs State Time(s) | ||
88 | Domain-0 0 1500 1 r----- 123.5 | ||
89 | root@zynqmp-generic:~# xl info | ||
90 | host : zynqmp-generic | ||
91 | release : 6.1.0-xilinx-v2024.1 | ||
92 | version : #1 SMP Thu Dec 21 07:00:11 UTC 2023 | ||
93 | machine : aarch64 | ||
94 | nr_cpus : 4 | ||
95 | max_cpu_id : 3 | ||
96 | nr_nodes : 1 | ||
97 | cores_per_socket : 1 | ||
98 | threads_per_core : 1 | ||
99 | cpu_mhz : 99.990 | ||
100 | hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000 | ||
101 | virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1 | ||
102 | total_memory : 4095 | ||
103 | free_memory : 2529 | ||
104 | sharing_freed_memory : 0 | ||
105 | sharing_used_memory : 0 | ||
106 | outstanding_claims : 0 | ||
107 | free_cpus : 0 | ||
108 | xen_major : 4 | ||
109 | xen_minor : 17 | ||
110 | xen_extra : .0 | ||
111 | xen_version : 4.17.0 | ||
112 | xen_caps : xen-3.0-aarch64 xen-3.0-armv7l | ||
113 | xen_scheduler : credit2 | ||
114 | xen_pagesize : 4096 | ||
115 | platform_params : virt_start=0x200000 | ||
116 | xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty | ||
117 | xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native | ||
118 | cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0 | ||
119 | cc_compile_by : santraju | ||
120 | cc_compile_domain : | ||
121 | cc_compile_date : 2023-12-12 | ||
122 | build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285 | ||
123 | xend_config_format : 4 | ||
124 | root@zynqmp-generic:~# | ||
125 | ``` | ||
126 | |||
127 | ## Dependencies | ||
128 | |||
129 | This layer depends on: | ||
130 | |||
131 | URI: https://git.yoctoproject.org/poky | ||
132 | layers: meta, meta-poky | ||
133 | branch: langdale | ||
134 | |||
135 | URI: https://git.openembedded.org/meta-openembedded | ||
136 | layers: meta-oe, meta-python, meta-filesystems, meta-networking. | ||
137 | branch: langdale | ||
138 | |||
139 | URI: | ||
140 | https://git.yoctoproject.org/meta-xilinx (official version) | ||
141 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | ||
142 | layers: meta-xilinx-core, meta-xilinx-standalone | ||
143 | branch: langdale or amd xilinx release version (e.g. rel-v2024.1) | ||
144 | |||
145 | URI: https://git.yoctoproject.org/meta-virtualization | ||
146 | branch: langdale | ||
147 | |||
148 | URI: https://git.yoctoproject.org/meta-security | ||
149 | layers: meta-tpm | ||
150 | branch: langdale | ||
151 | |||
152 | ## References | ||
153 | |||
154 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor | ||
diff --git a/meta-xilinx-virtualization/conf/layer.conf b/meta-xilinx-virtualization/conf/layer.conf new file mode 100644 index 00000000..29506eab --- /dev/null +++ b/meta-xilinx-virtualization/conf/layer.conf | |||
@@ -0,0 +1,23 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have packages directories, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "xilinx-virtualization" | ||
9 | BBFILE_PATTERN_xilinx-virtualization = "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_xilinx-virtualization = "5" | ||
11 | |||
12 | LAYERDEPENDS_xilinx-virtualization = "\ | ||
13 | xilinx \ | ||
14 | virtualization-layer \ | ||
15 | security \ | ||
16 | tpm-layer \ | ||
17 | " | ||
18 | |||
19 | LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" | ||
20 | |||
21 | XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" | ||
22 | PREFERRED_VERSION_xen ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" | ||
23 | PREFERRED_VERSION_xen-tools ?= "${@d.getVarFlag('XILINX_XEN_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or '4.18+stable-xilinx+git%'}" | ||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend new file mode 100644 index 00000000..e84844cf --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-tpm.inc | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend new file mode 100644 index 00000000..e84844cf --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-system-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-tpm.inc | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc new file mode 100644 index 00000000..a582b035 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-tpm.inc | |||
@@ -0,0 +1,4 @@ | |||
1 | PACKAGECONFIG:append = "${@bb.utils.contains('DISTRO_FEATURES', 'tpm', ' tpm', '', d)}" | ||
2 | |||
3 | PACKAGECONFIG[tpm] = "--enable-tpm,--disable-tpm,,swtpm libtpm" | ||
4 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc new file mode 100644 index 00000000..c674dc1a --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xen_8.1.inc | |||
@@ -0,0 +1,20 @@ | |||
1 | # Xen-4.18 specific changes are only applicable on the target | ||
2 | SRC_URI_XEN = "" | ||
3 | SRC_URI_XEN:class-target = " \ | ||
4 | file://0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch \ | ||
5 | file://0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch \ | ||
6 | file://0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch \ | ||
7 | file://0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch \ | ||
8 | file://0005-softmmu-physmem-Split-ram_block_add.patch \ | ||
9 | file://0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch \ | ||
10 | file://0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch \ | ||
11 | file://0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch \ | ||
12 | file://0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch \ | ||
13 | file://0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch \ | ||
14 | file://0011-hw-arm-Add-grant-mapping.patch \ | ||
15 | file://0001-arm-xenpvh-Introduce-virtio-pci-support.patch \ | ||
16 | " | ||
17 | |||
18 | FILESEXTRAPATHS:prepend:class-target := "${THISDIR}/qemu-xilinx-8.1:" | ||
19 | |||
20 | SRC_URI .= "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${SRC_URI_XEN}', '', d)}" | ||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch new file mode 100644 index 00000000..6e3b40f7 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-arm-xenpvh-Introduce-virtio-pci-support.patch | |||
@@ -0,0 +1,353 @@ | |||
1 | From 3104d411ee36487ea409ba5a1b474989326f70f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vikram Garhwal <vikram.garhwal@amd.com> | ||
3 | Date: Wed, 15 Nov 2023 14:19:31 -0800 | ||
4 | Subject: [PATCH] arm: xenpvh: Introduce virtio-pci support | ||
5 | |||
6 | The bridge is needed for virtio-pci support, as QEMU can emulate the | ||
7 | whole bridge with any virtio-pci devices connected to it. | ||
8 | |||
9 | NOTE: A few xen-hvm-common.c and xen_native.h changes are cherry-picked from | ||
10 | EPAM QEMU patches for xen-arm. This was done to keep least diff with upstream. | ||
11 | |||
12 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
13 | Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | ||
14 | Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com> | ||
15 | --- | ||
16 | hw/arm/xen_arm.c | 271 ++++++++++++++++++++++++++++++++++++ | ||
17 | include/hw/xen/xen_native.h | 3 + | ||
18 | 2 files changed, 274 insertions(+) | ||
19 | |||
20 | diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c | ||
21 | index 1587e2a43b..a7c5b20777 100644 | ||
22 | --- a/hw/arm/xen_arm.c | ||
23 | +++ b/hw/arm/xen_arm.c | ||
24 | @@ -34,6 +34,7 @@ | ||
25 | #include "hw/xen/xen-hvm-common.h" | ||
26 | #include "sysemu/tpm.h" | ||
27 | #include "hw/xen/arch_hvm.h" | ||
28 | +#include "hw/pci-host/gpex.h" | ||
29 | |||
30 | #define TYPE_XEN_ARM MACHINE_TYPE_NAME("xenpvh") | ||
31 | OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM) | ||
32 | @@ -57,6 +58,9 @@ struct XenArmState { | ||
33 | |||
34 | struct { | ||
35 | uint64_t tpm_base_addr; | ||
36 | + MemMapEntry pcie_mmio; | ||
37 | + MemMapEntry pcie_ecam; | ||
38 | + MemMapEntry pcie_mmio_high; | ||
39 | } cfg; | ||
40 | }; | ||
41 | |||
42 | @@ -132,6 +136,80 @@ static void xen_init_ram(MachineState *machine) | ||
43 | ram_grants = *xen_init_grant_ram(); | ||
44 | } | ||
45 | |||
46 | +static bool xen_validate_pcie_config(XenArmState *xam) | ||
47 | +{ | ||
48 | + if (xam->cfg.pcie_ecam.base == 0 && | ||
49 | + xam->cfg.pcie_ecam.size == 0 && | ||
50 | + xam->cfg.pcie_mmio.base == 0 && | ||
51 | + xam->cfg.pcie_mmio.size == 0 && | ||
52 | + xam->cfg.pcie_mmio_high.base == 0 && | ||
53 | + xam->cfg.pcie_mmio_high.size == 0) { | ||
54 | + /* It's okay, user just don't want PCIe brige */ | ||
55 | + return false; | ||
56 | + } | ||
57 | + | ||
58 | + if (xam->cfg.pcie_ecam.base == 0 || | ||
59 | + xam->cfg.pcie_ecam.size == 0 || | ||
60 | + xam->cfg.pcie_mmio.base == 0 || | ||
61 | + xam->cfg.pcie_mmio.size == 0 || | ||
62 | + xam->cfg.pcie_mmio_high.base == 0 || | ||
63 | + xam->cfg.pcie_mmio_high.size == 0) { | ||
64 | + /* User provided some PCIe options, but not all of them */ | ||
65 | + error_printf("Incomplete PCIe bridge configuration\n"); | ||
66 | + exit(1); | ||
67 | + } | ||
68 | + | ||
69 | + return true; | ||
70 | +} | ||
71 | + | ||
72 | +static void xen_create_pcie(XenArmState *xam) | ||
73 | +{ | ||
74 | + MemoryRegion *mmio_alias, *mmio_alias_high, *mmio_reg; | ||
75 | + MemoryRegion *ecam_alias, *ecam_reg; | ||
76 | + DeviceState *dev; | ||
77 | + int i; | ||
78 | + | ||
79 | + dev = qdev_new(TYPE_GPEX_HOST); | ||
80 | + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); | ||
81 | + | ||
82 | + /* Map ECAM space */ | ||
83 | + ecam_alias = g_new0(MemoryRegion, 1); | ||
84 | + ecam_reg = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); | ||
85 | + memory_region_init_alias(ecam_alias, OBJECT(dev), "pcie-ecam", | ||
86 | + ecam_reg, 0, xam->cfg.pcie_ecam.size); | ||
87 | + memory_region_add_subregion(get_system_memory(), xam->cfg.pcie_ecam.base, | ||
88 | + ecam_alias); | ||
89 | + | ||
90 | + /* Map the MMIO space */ | ||
91 | + mmio_alias = g_new0(MemoryRegion, 1); | ||
92 | + mmio_reg = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 1); | ||
93 | + memory_region_init_alias(mmio_alias, OBJECT(dev), "pcie-mmio", | ||
94 | + mmio_reg, | ||
95 | + xam->cfg.pcie_mmio.base, | ||
96 | + xam->cfg.pcie_mmio.size); | ||
97 | + memory_region_add_subregion(get_system_memory(), xam->cfg.pcie_mmio.base, | ||
98 | + mmio_alias); | ||
99 | + | ||
100 | + /* Map the MMIO_HIGH space */ | ||
101 | + mmio_alias_high = g_new0(MemoryRegion, 1); | ||
102 | + memory_region_init_alias(mmio_alias_high, OBJECT(dev), "pcie-mmio-high", | ||
103 | + mmio_reg, | ||
104 | + xam->cfg.pcie_mmio_high.base, | ||
105 | + xam->cfg.pcie_mmio_high.size); | ||
106 | + memory_region_add_subregion(get_system_memory(), | ||
107 | + xam->cfg.pcie_mmio_high.base, | ||
108 | + mmio_alias_high); | ||
109 | + | ||
110 | + /* Legacy PCI interrupts (#INTA - #INTD) */ | ||
111 | + for (i = 0; i < GPEX_NUM_IRQS; i++) { | ||
112 | + qemu_irq irq = qemu_allocate_irq(xen_set_irq, NULL, | ||
113 | + GUEST_VIRTIO_PCI_SPI_FIRST + i); | ||
114 | + | ||
115 | + sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, irq); | ||
116 | + gpex_set_irq_num(GPEX_HOST(dev), i, GUEST_VIRTIO_PCI_SPI_FIRST + i); | ||
117 | + } | ||
118 | +} | ||
119 | + | ||
120 | void arch_handle_ioreq(XenIOState *state, ioreq_t *req) | ||
121 | { | ||
122 | hw_error("Invalid ioreq type 0x%x\n", req->type); | ||
123 | @@ -193,6 +271,13 @@ static void xen_arm_init(MachineState *machine) | ||
124 | |||
125 | xen_create_virtio_mmio_devices(xam); | ||
126 | |||
127 | + if (xen_validate_pcie_config(xam)) { | ||
128 | + xen_create_pcie(xam); | ||
129 | + } else { | ||
130 | + DPRINTF("PCIe host bridge is not configured," | ||
131 | + " only virtio-mmio can be used\n"); | ||
132 | + } | ||
133 | + | ||
134 | #ifdef CONFIG_TPM | ||
135 | if (xam->cfg.tpm_base_addr) { | ||
136 | xen_enable_tpm(xam); | ||
137 | @@ -228,6 +313,150 @@ static void xen_arm_set_tpm_base_addr(Object *obj, Visitor *v, | ||
138 | } | ||
139 | #endif | ||
140 | |||
141 | +static void xen_arm_get_pcie_ecam_base_addr(Object *obj, Visitor *v, | ||
142 | + const char *name, void *opaque, | ||
143 | + Error **errp) | ||
144 | +{ | ||
145 | + XenArmState *xam = XEN_ARM(obj); | ||
146 | + uint64_t value = xam->cfg.pcie_ecam.base; | ||
147 | + | ||
148 | + visit_type_uint64(v, name, &value, errp); | ||
149 | +} | ||
150 | + | ||
151 | +static void xen_arm_set_pcie_ecam_base_addr(Object *obj, Visitor *v, | ||
152 | + const char *name, void *opaque, | ||
153 | + Error **errp) | ||
154 | +{ | ||
155 | + XenArmState *xam = XEN_ARM(obj); | ||
156 | + uint64_t value; | ||
157 | + | ||
158 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
159 | + return; | ||
160 | + } | ||
161 | + | ||
162 | + xam->cfg.pcie_ecam.base = value; | ||
163 | +} | ||
164 | + | ||
165 | +static void xen_arm_get_pcie_ecam_size(Object *obj, Visitor *v, | ||
166 | + const char *name, void *opaque, | ||
167 | + Error **errp) | ||
168 | +{ | ||
169 | + XenArmState *xam = XEN_ARM(obj); | ||
170 | + uint64_t value = xam->cfg.pcie_ecam.size; | ||
171 | + | ||
172 | + visit_type_uint64(v, name, &value, errp); | ||
173 | +} | ||
174 | + | ||
175 | +static void xen_arm_set_pcie_ecam_size(Object *obj, Visitor *v, | ||
176 | + const char *name, void *opaque, | ||
177 | + Error **errp) | ||
178 | +{ | ||
179 | + XenArmState *xam = XEN_ARM(obj); | ||
180 | + uint64_t value; | ||
181 | + | ||
182 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
183 | + return; | ||
184 | + } | ||
185 | + | ||
186 | + xam->cfg.pcie_ecam.size = value; | ||
187 | +} | ||
188 | + | ||
189 | +static void xen_arm_get_pcie_mmio_base_addr(Object *obj, Visitor *v, | ||
190 | + const char *name, void *opaque, | ||
191 | + Error **errp) | ||
192 | +{ | ||
193 | + XenArmState *xam = XEN_ARM(obj); | ||
194 | + uint64_t value = xam->cfg.pcie_mmio.base; | ||
195 | + | ||
196 | + visit_type_uint64(v, name, &value, errp); | ||
197 | +} | ||
198 | + | ||
199 | +static void xen_arm_set_pcie_mmio_base_addr(Object *obj, Visitor *v, | ||
200 | + const char *name, void *opaque, | ||
201 | + Error **errp) | ||
202 | +{ | ||
203 | + XenArmState *xam = XEN_ARM(obj); | ||
204 | + uint64_t value; | ||
205 | + | ||
206 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
207 | + return; | ||
208 | + } | ||
209 | + | ||
210 | + xam->cfg.pcie_mmio.base = value; | ||
211 | +} | ||
212 | + | ||
213 | +static void xen_arm_get_pcie_mmio_size(Object *obj, Visitor *v, | ||
214 | + const char *name, void *opaque, | ||
215 | + Error **errp) | ||
216 | +{ | ||
217 | + XenArmState *xam = XEN_ARM(obj); | ||
218 | + uint64_t value = xam->cfg.pcie_mmio.size; | ||
219 | + | ||
220 | + visit_type_uint64(v, name, &value, errp); | ||
221 | +} | ||
222 | + | ||
223 | +static void xen_arm_set_pcie_mmio_size(Object *obj, Visitor *v, | ||
224 | + const char *name, void *opaque, | ||
225 | + Error **errp) | ||
226 | +{ | ||
227 | + XenArmState *xam = XEN_ARM(obj); | ||
228 | + uint64_t value; | ||
229 | + | ||
230 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
231 | + return; | ||
232 | + } | ||
233 | + | ||
234 | + xam->cfg.pcie_mmio.size = value; | ||
235 | +} | ||
236 | + | ||
237 | +static void xen_arm_get_pcie_prefetch_base_addr(Object *obj, Visitor *v, | ||
238 | + const char *name, void *opaque, | ||
239 | + Error **errp) | ||
240 | +{ | ||
241 | + XenArmState *xam = XEN_ARM(obj); | ||
242 | + uint64_t value = xam->cfg.pcie_mmio_high.base; | ||
243 | + | ||
244 | + visit_type_uint64(v, name, &value, errp); | ||
245 | +} | ||
246 | + | ||
247 | +static void xen_arm_set_pcie_prefetch_base_addr(Object *obj, Visitor *v, | ||
248 | + const char *name, void *opaque, | ||
249 | + Error **errp) | ||
250 | +{ | ||
251 | + XenArmState *xam = XEN_ARM(obj); | ||
252 | + uint64_t value; | ||
253 | + | ||
254 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
255 | + return; | ||
256 | + } | ||
257 | + | ||
258 | + xam->cfg.pcie_mmio_high.base = value; | ||
259 | +} | ||
260 | + | ||
261 | +static void xen_arm_get_pcie_prefetch_size(Object *obj, Visitor *v, | ||
262 | + const char *name, void *opaque, | ||
263 | + Error **errp) | ||
264 | +{ | ||
265 | + XenArmState *xam = XEN_ARM(obj); | ||
266 | + uint64_t value = xam->cfg.pcie_mmio_high.size; | ||
267 | + | ||
268 | + visit_type_uint64(v, name, &value, errp); | ||
269 | +} | ||
270 | + | ||
271 | +static void xen_arm_set_pcie_prefetch_size(Object *obj, Visitor *v, | ||
272 | + const char *name, void *opaque, | ||
273 | + Error **errp) | ||
274 | +{ | ||
275 | + XenArmState *xam = XEN_ARM(obj); | ||
276 | + uint64_t value; | ||
277 | + | ||
278 | + if (!visit_type_uint64(v, name, &value, errp)) { | ||
279 | + return; | ||
280 | + } | ||
281 | + | ||
282 | + xam->cfg.pcie_mmio_high.size = value; | ||
283 | +} | ||
284 | + | ||
285 | static void xen_arm_machine_class_init(ObjectClass *oc, void *data) | ||
286 | { | ||
287 | |||
288 | @@ -249,6 +478,48 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data) | ||
289 | |||
290 | machine_class_allow_dynamic_sysbus_dev(mc, TYPE_TPM_TIS_SYSBUS); | ||
291 | #endif | ||
292 | + | ||
293 | + object_class_property_add(oc, "pci-ecam-base-addr", "uint64_t", | ||
294 | + xen_arm_get_pcie_ecam_base_addr, | ||
295 | + xen_arm_set_pcie_ecam_base_addr, | ||
296 | + NULL, NULL); | ||
297 | + object_class_property_set_description(oc, "pci-ecam-base-addr", | ||
298 | + "Set Base address for PCI ECAM."); | ||
299 | + | ||
300 | + object_class_property_add(oc, "pci-ecam-size", "uint64_t", | ||
301 | + xen_arm_get_pcie_ecam_size, | ||
302 | + xen_arm_set_pcie_ecam_size, | ||
303 | + NULL, NULL); | ||
304 | + object_class_property_set_description(oc, "pci-ecam-size", | ||
305 | + "Set Size for PCI ECAM."); | ||
306 | + | ||
307 | + object_class_property_add(oc, "pci-mmio-base-addr", "uint64_t", | ||
308 | + xen_arm_get_pcie_mmio_base_addr, | ||
309 | + xen_arm_set_pcie_mmio_base_addr, | ||
310 | + NULL, NULL); | ||
311 | + object_class_property_set_description(oc, "pci-mmio-base-addr", | ||
312 | + "Set Base address for PCI MMIO."); | ||
313 | + | ||
314 | + object_class_property_add(oc, "pci-mmio-size", "uint64_t", | ||
315 | + xen_arm_get_pcie_mmio_size, | ||
316 | + xen_arm_set_pcie_mmio_size, | ||
317 | + NULL, NULL); | ||
318 | + object_class_property_set_description(oc, "pci-mmio-size", | ||
319 | + "Set size for PCI MMIO."); | ||
320 | + | ||
321 | + object_class_property_add(oc, "pci-prefetch-base-addr", "uint64_t", | ||
322 | + xen_arm_get_pcie_prefetch_base_addr, | ||
323 | + xen_arm_set_pcie_prefetch_base_addr, | ||
324 | + NULL, NULL); | ||
325 | + object_class_property_set_description(oc, "pci-prefetch-base-addr", | ||
326 | + "Set Prefetch Base address for PCI."); | ||
327 | + | ||
328 | + object_class_property_add(oc, "pci-prefetch-size", "uint64_t", | ||
329 | + xen_arm_get_pcie_prefetch_size, | ||
330 | + xen_arm_set_pcie_prefetch_size, | ||
331 | + NULL, NULL); | ||
332 | + object_class_property_set_description(oc, "pci-prefetch-size", | ||
333 | + "Set Prefetch size for PCI."); | ||
334 | } | ||
335 | |||
336 | static const TypeInfo xen_arm_machine_type = { | ||
337 | diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h | ||
338 | index 6f09c48823..1e81189a27 100644 | ||
339 | --- a/include/hw/xen/xen_native.h | ||
340 | +++ b/include/hw/xen/xen_native.h | ||
341 | @@ -539,6 +539,9 @@ static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod, | ||
342 | #define GUEST_VIRTIO_MMIO_SPI_LAST 43 | ||
343 | #endif | ||
344 | |||
345 | +#define GUEST_VIRTIO_PCI_SPI_FIRST 44 | ||
346 | +#define GUEST_VIRTIO_PCI_SPI_LAST 48 | ||
347 | + | ||
348 | #if defined(__i386__) || defined(__x86_64__) | ||
349 | #define GUEST_RAM_BANKS 2 | ||
350 | #define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ | ||
351 | -- | ||
352 | 2.30.2 | ||
353 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch new file mode 100644 index 00000000..1757e9e2 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0001-xen_arm-Create-virtio-mmio-devices-during-initializa.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From b9291457ca2eb4340c71d2eed08fde83916c9fa4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | ||
3 | Date: Tue, 29 Aug 2023 21:35:17 -0700 | ||
4 | Subject: [PATCH 01/11] xen_arm: Create virtio-mmio devices during | ||
5 | initialization | ||
6 | |||
7 | In order to use virtio backends we need to allocate virtio-mmio | ||
8 | parameters (irq and base) and register corresponding buses. | ||
9 | |||
10 | Use the constants defined in public header arch-arm.h to be | ||
11 | aligned with the toolstack. So the number of current supported | ||
12 | virtio-mmio devices is 10. | ||
13 | |||
14 | For the interrupts triggering use already existing on Arm | ||
15 | device-model hypercall. | ||
16 | |||
17 | The toolstack should then insert the same amount of device nodes | ||
18 | into guest device-tree. | ||
19 | |||
20 | Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | ||
21 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
22 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
23 | Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> | ||
24 | --- | ||
25 | hw/arm/xen_arm.c | 35 +++++++++++++++++++++++++++++++++++ | ||
26 | include/hw/xen/xen_native.h | 16 ++++++++++++++++ | ||
27 | 2 files changed, 51 insertions(+) | ||
28 | |||
29 | diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c | ||
30 | index 1d3e6d481a..7393b37355 100644 | ||
31 | --- a/hw/arm/xen_arm.c | ||
32 | +++ b/hw/arm/xen_arm.c | ||
33 | @@ -26,6 +26,7 @@ | ||
34 | #include "qapi/qapi-commands-migration.h" | ||
35 | #include "qapi/visitor.h" | ||
36 | #include "hw/boards.h" | ||
37 | +#include "hw/irq.h" | ||
38 | #include "hw/sysbus.h" | ||
39 | #include "sysemu/block-backend.h" | ||
40 | #include "sysemu/tpm_backend.h" | ||
41 | @@ -59,6 +60,38 @@ struct XenArmState { | ||
42 | } cfg; | ||
43 | }; | ||
44 | |||
45 | +/* | ||
46 | + * VIRTIO_MMIO_DEV_SIZE is imported from tools/libs/light/libxl_arm.c under Xen | ||
47 | + * repository. | ||
48 | + * | ||
49 | + * Origin: git://xenbits.xen.org/xen.git 2128143c114c | ||
50 | + */ | ||
51 | +#define VIRTIO_MMIO_DEV_SIZE 0x200 | ||
52 | + | ||
53 | +#define NR_VIRTIO_MMIO_DEVICES \ | ||
54 | + (GUEST_VIRTIO_MMIO_SPI_LAST - GUEST_VIRTIO_MMIO_SPI_FIRST) | ||
55 | + | ||
56 | +static void xen_set_irq(void *opaque, int irq, int level) | ||
57 | +{ | ||
58 | + xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level); | ||
59 | +} | ||
60 | + | ||
61 | +static void xen_create_virtio_mmio_devices(XenArmState *xam) | ||
62 | +{ | ||
63 | + int i; | ||
64 | + | ||
65 | + for (i = 0; i < NR_VIRTIO_MMIO_DEVICES; i++) { | ||
66 | + hwaddr base = GUEST_VIRTIO_MMIO_BASE + i * VIRTIO_MMIO_DEV_SIZE; | ||
67 | + qemu_irq irq = qemu_allocate_irq(xen_set_irq, NULL, | ||
68 | + GUEST_VIRTIO_MMIO_SPI_FIRST + i); | ||
69 | + | ||
70 | + sysbus_create_simple("virtio-mmio", base, irq); | ||
71 | + | ||
72 | + DPRINTF("Created virtio-mmio device %d: irq %d base 0x%lx\n", | ||
73 | + i, GUEST_VIRTIO_MMIO_SPI_FIRST + i, base); | ||
74 | + } | ||
75 | +} | ||
76 | + | ||
77 | void arch_handle_ioreq(XenIOState *state, ioreq_t *req) | ||
78 | { | ||
79 | hw_error("Invalid ioreq type 0x%x\n", req->type); | ||
80 | @@ -110,6 +143,8 @@ static void xen_arm_init(MachineState *machine) | ||
81 | |||
82 | xen_register_ioreq(xam->state, machine->smp.cpus, &xen_memory_listener); | ||
83 | |||
84 | + xen_create_virtio_mmio_devices(xam); | ||
85 | + | ||
86 | #ifdef CONFIG_TPM | ||
87 | if (xam->cfg.tpm_base_addr) { | ||
88 | xen_enable_tpm(xam); | ||
89 | diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h | ||
90 | index 4dce905fde..a4b1aa9e5d 100644 | ||
91 | --- a/include/hw/xen/xen_native.h | ||
92 | +++ b/include/hw/xen/xen_native.h | ||
93 | @@ -523,4 +523,20 @@ static inline int xen_set_ioreq_server_state(domid_t dom, | ||
94 | enable); | ||
95 | } | ||
96 | |||
97 | +#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500 | ||
98 | +static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod, | ||
99 | + domid_t domid, uint32_t irq, | ||
100 | + unsigned int level) | ||
101 | +{ | ||
102 | + return 0; | ||
103 | +} | ||
104 | +#endif | ||
105 | + | ||
106 | +#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41700 | ||
107 | +#define GUEST_VIRTIO_MMIO_BASE xen_mk_ullong(0x02000000) | ||
108 | +#define GUEST_VIRTIO_MMIO_SIZE xen_mk_ullong(0x00100000) | ||
109 | +#define GUEST_VIRTIO_MMIO_SPI_FIRST 33 | ||
110 | +#define GUEST_VIRTIO_MMIO_SPI_LAST 43 | ||
111 | +#endif | ||
112 | + | ||
113 | #endif /* QEMU_HW_XEN_NATIVE_H */ | ||
114 | -- | ||
115 | 2.39.2 | ||
116 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch new file mode 100644 index 00000000..f88db620 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0002-xen_arm-Initialize-RAM-and-add-hi-low-memory-regions.patch | |||
@@ -0,0 +1,124 @@ | |||
1 | From 70a74795c5071bf591e6e557b7c8c492ead0e675 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | ||
3 | Date: Tue, 29 Aug 2023 21:35:18 -0700 | ||
4 | Subject: [PATCH 02/11] xen_arm: Initialize RAM and add hi/low memory regions | ||
5 | |||
6 | In order to use virtio backends we need to initialize RAM for the | ||
7 | xen-mapcache (which is responsible for mapping guest memory using foreign | ||
8 | mapping) to work. Calculate and add hi/low memory regions based on | ||
9 | machine->ram_size. | ||
10 | |||
11 | Use the constants defined in public header arch-arm.h to be aligned with the xen | ||
12 | toolstack. | ||
13 | |||
14 | While using this machine, the toolstack should then pass real ram_size using | ||
15 | "-m" arg. If "-m" is not given, create a QEMU machine without IOREQ and other | ||
16 | emulated devices like TPM and VIRTIO. This is done to keep this QEMU machine | ||
17 | usable for /etc/init.d/xencommons. | ||
18 | |||
19 | Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> | ||
20 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
21 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
22 | Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com> | ||
23 | --- | ||
24 | hw/arm/xen_arm.c | 45 +++++++++++++++++++++++++++++++++++++ | ||
25 | include/hw/xen/xen_native.h | 8 +++++++ | ||
26 | 2 files changed, 53 insertions(+) | ||
27 | |||
28 | diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c | ||
29 | index 7393b37355..f83b983ec5 100644 | ||
30 | --- a/hw/arm/xen_arm.c | ||
31 | +++ b/hw/arm/xen_arm.c | ||
32 | @@ -60,6 +60,8 @@ struct XenArmState { | ||
33 | } cfg; | ||
34 | }; | ||
35 | |||
36 | +static MemoryRegion ram_lo, ram_hi; | ||
37 | + | ||
38 | /* | ||
39 | * VIRTIO_MMIO_DEV_SIZE is imported from tools/libs/light/libxl_arm.c under Xen | ||
40 | * repository. | ||
41 | @@ -92,6 +94,39 @@ static void xen_create_virtio_mmio_devices(XenArmState *xam) | ||
42 | } | ||
43 | } | ||
44 | |||
45 | +static void xen_init_ram(MachineState *machine) | ||
46 | +{ | ||
47 | + MemoryRegion *sysmem = get_system_memory(); | ||
48 | + ram_addr_t block_len, ram_size[GUEST_RAM_BANKS]; | ||
49 | + | ||
50 | + if (machine->ram_size <= GUEST_RAM0_SIZE) { | ||
51 | + ram_size[0] = machine->ram_size; | ||
52 | + ram_size[1] = 0; | ||
53 | + block_len = GUEST_RAM0_BASE + ram_size[0]; | ||
54 | + } else { | ||
55 | + ram_size[0] = GUEST_RAM0_SIZE; | ||
56 | + ram_size[1] = machine->ram_size - GUEST_RAM0_SIZE; | ||
57 | + block_len = GUEST_RAM1_BASE + ram_size[1]; | ||
58 | + } | ||
59 | + | ||
60 | + memory_region_init_ram(&ram_memory, NULL, "xen.ram", block_len, | ||
61 | + &error_fatal); | ||
62 | + | ||
63 | + memory_region_init_alias(&ram_lo, NULL, "xen.ram.lo", &ram_memory, | ||
64 | + GUEST_RAM0_BASE, ram_size[0]); | ||
65 | + memory_region_add_subregion(sysmem, GUEST_RAM0_BASE, &ram_lo); | ||
66 | + DPRINTF("Initialized region xen.ram.lo: base 0x%llx size 0x%lx\n", | ||
67 | + GUEST_RAM0_BASE, ram_size[0]); | ||
68 | + | ||
69 | + if (ram_size[1] > 0) { | ||
70 | + memory_region_init_alias(&ram_hi, NULL, "xen.ram.hi", &ram_memory, | ||
71 | + GUEST_RAM1_BASE, ram_size[1]); | ||
72 | + memory_region_add_subregion(sysmem, GUEST_RAM1_BASE, &ram_hi); | ||
73 | + DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n", | ||
74 | + GUEST_RAM1_BASE, ram_size[1]); | ||
75 | + } | ||
76 | +} | ||
77 | + | ||
78 | void arch_handle_ioreq(XenIOState *state, ioreq_t *req) | ||
79 | { | ||
80 | hw_error("Invalid ioreq type 0x%x\n", req->type); | ||
81 | @@ -141,6 +176,14 @@ static void xen_arm_init(MachineState *machine) | ||
82 | |||
83 | xam->state = g_new0(XenIOState, 1); | ||
84 | |||
85 | + if (machine->ram_size == 0) { | ||
86 | + DPRINTF("ram_size not specified. QEMU machine started without IOREQ" | ||
87 | + "(no emulated devices including Virtio)\n"); | ||
88 | + return; | ||
89 | + } | ||
90 | + | ||
91 | + xen_init_ram(machine); | ||
92 | + | ||
93 | xen_register_ioreq(xam->state, machine->smp.cpus, &xen_memory_listener); | ||
94 | |||
95 | xen_create_virtio_mmio_devices(xam); | ||
96 | @@ -188,6 +231,8 @@ static void xen_arm_machine_class_init(ObjectClass *oc, void *data) | ||
97 | mc->init = xen_arm_init; | ||
98 | mc->max_cpus = 1; | ||
99 | mc->default_machine_opts = "accel=xen"; | ||
100 | + /* Set explicitly here to make sure that real ram_size is passed */ | ||
101 | + mc->default_ram_size = 0; | ||
102 | |||
103 | #ifdef CONFIG_TPM | ||
104 | object_class_property_add(oc, "tpm-base-addr", "uint64_t", | ||
105 | diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h | ||
106 | index a4b1aa9e5d..5d2718261f 100644 | ||
107 | --- a/include/hw/xen/xen_native.h | ||
108 | +++ b/include/hw/xen/xen_native.h | ||
109 | @@ -539,4 +539,12 @@ static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod, | ||
110 | #define GUEST_VIRTIO_MMIO_SPI_LAST 43 | ||
111 | #endif | ||
112 | |||
113 | +#if defined(__i386__) || defined(__x86_64__) | ||
114 | +#define GUEST_RAM_BANKS 2 | ||
115 | +#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ | ||
116 | +#define GUEST_RAM0_SIZE 0xc0000000ULL | ||
117 | +#define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */ | ||
118 | +#define GUEST_RAM1_SIZE 0xfe00000000ULL | ||
119 | +#endif | ||
120 | + | ||
121 | #endif /* QEMU_HW_XEN_NATIVE_H */ | ||
122 | -- | ||
123 | 2.39.2 | ||
124 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch new file mode 100644 index 00000000..c6945d54 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0003-Xen-Fix-xen_set_irq-and-xendevicemodel_set_irq_level.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 14b9dbd7f0261ae7a36bef251924ba211beef17a Mon Sep 17 00:00:00 2001 | ||
2 | From: Vikram Garhwal <vikram.garhwal@amd.com> | ||
3 | Date: Wed, 1 Nov 2023 14:07:23 -0700 | ||
4 | Subject: [PATCH 03/11] Xen: Fix xen_set_irq() and | ||
5 | xendevicemodel_set_irq_level() | ||
6 | |||
7 | Remove '=' from 'if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500'. | ||
8 | Because xendevicemodel_set_irq_level() was introduced in 4.15 version. | ||
9 | |||
10 | Also, update xendevicemodel_set_irq_level() to return -1 for older versions. | ||
11 | |||
12 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
13 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
14 | --- | ||
15 | hw/arm/xen_arm.c | 4 +++- | ||
16 | include/hw/xen/xen_native.h | 4 ++-- | ||
17 | 2 files changed, 5 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c | ||
20 | index f83b983ec5..a5631529d0 100644 | ||
21 | --- a/hw/arm/xen_arm.c | ||
22 | +++ b/hw/arm/xen_arm.c | ||
23 | @@ -75,7 +75,9 @@ static MemoryRegion ram_lo, ram_hi; | ||
24 | |||
25 | static void xen_set_irq(void *opaque, int irq, int level) | ||
26 | { | ||
27 | - xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level); | ||
28 | + if (xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level)) { | ||
29 | + error_report("xendevicemodel_set_irq_level failed"); | ||
30 | + } | ||
31 | } | ||
32 | |||
33 | static void xen_create_virtio_mmio_devices(XenArmState *xam) | ||
34 | diff --git a/include/hw/xen/xen_native.h b/include/hw/xen/xen_native.h | ||
35 | index 5d2718261f..6f09c48823 100644 | ||
36 | --- a/include/hw/xen/xen_native.h | ||
37 | +++ b/include/hw/xen/xen_native.h | ||
38 | @@ -523,12 +523,12 @@ static inline int xen_set_ioreq_server_state(domid_t dom, | ||
39 | enable); | ||
40 | } | ||
41 | |||
42 | -#if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500 | ||
43 | +#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41500 | ||
44 | static inline int xendevicemodel_set_irq_level(xendevicemodel_handle *dmod, | ||
45 | domid_t domid, uint32_t irq, | ||
46 | unsigned int level) | ||
47 | { | ||
48 | - return 0; | ||
49 | + return -1; | ||
50 | } | ||
51 | #endif | ||
52 | |||
53 | -- | ||
54 | 2.39.2 | ||
55 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch new file mode 100644 index 00000000..da2f042b --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0004-xen-when-unplugging-emulated-devices-skip-virtio-dev.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 02507086b3ad9beb9c669aae54fcb4857cd61ef8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Tue, 16 Mar 2021 14:00:33 +0100 | ||
4 | Subject: [PATCH 04/11] xen: when unplugging emulated devices skip virtio | ||
5 | devices | ||
6 | |||
7 | Virtio devices should never be unplugged at boot time, as they are | ||
8 | similar to pci passthrough devices. | ||
9 | |||
10 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
11 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
12 | --- | ||
13 | docs/system/i386/xen.rst | 3 --- | ||
14 | hw/i386/xen/xen_platform.c | 10 ++++++++-- | ||
15 | 2 files changed, 8 insertions(+), 5 deletions(-) | ||
16 | |||
17 | diff --git a/docs/system/i386/xen.rst b/docs/system/i386/xen.rst | ||
18 | index f06765e88c..b86d57af6e 100644 | ||
19 | --- a/docs/system/i386/xen.rst | ||
20 | +++ b/docs/system/i386/xen.rst | ||
21 | @@ -52,9 +52,6 @@ It is necessary to use the pc machine type, as the q35 machine uses AHCI instead | ||
22 | of legacy IDE, and AHCI disks are not unplugged through the Xen PV unplug | ||
23 | mechanism. | ||
24 | |||
25 | -VirtIO devices can also be used; Linux guests may need to be dissuaded from | ||
26 | -umplugging them by adding 'xen_emul_unplug=never' on their command line. | ||
27 | - | ||
28 | Properties | ||
29 | ---------- | ||
30 | |||
31 | diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c | ||
32 | index 17457ff3de..0187b73eeb 100644 | ||
33 | --- a/hw/i386/xen/xen_platform.c | ||
34 | +++ b/hw/i386/xen/xen_platform.c | ||
35 | @@ -28,6 +28,7 @@ | ||
36 | #include "hw/ide/pci.h" | ||
37 | #include "hw/pci/pci.h" | ||
38 | #include "migration/vmstate.h" | ||
39 | +#include "hw/virtio/virtio-bus.h" | ||
40 | #include "net/net.h" | ||
41 | #include "trace.h" | ||
42 | #include "sysemu/xen.h" | ||
43 | @@ -129,10 +130,11 @@ static bool pci_device_is_passthrough(PCIDevice *d) | ||
44 | |||
45 | static void unplug_nic(PCIBus *b, PCIDevice *d, void *o) | ||
46 | { | ||
47 | - /* We have to ignore passthrough devices */ | ||
48 | + /* We have to ignore passthrough devices and virtio devices. */ | ||
49 | if (pci_get_word(d->config + PCI_CLASS_DEVICE) == | ||
50 | PCI_CLASS_NETWORK_ETHERNET | ||
51 | - && !pci_device_is_passthrough(d)) { | ||
52 | + && !pci_device_is_passthrough(d) | ||
53 | + && !qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) { | ||
54 | object_unparent(OBJECT(d)); | ||
55 | } | ||
56 | } | ||
57 | @@ -208,6 +210,10 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *opaque) | ||
58 | /* We have to ignore passthrough devices */ | ||
59 | if (pci_device_is_passthrough(d)) | ||
60 | return; | ||
61 | + /* Ignore virtio devices */ | ||
62 | + if (qdev_get_child_bus(&d->qdev, TYPE_VIRTIO_BUS)) { | ||
63 | + return; | ||
64 | + } | ||
65 | |||
66 | switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) { | ||
67 | case PCI_CLASS_STORAGE_IDE: | ||
68 | -- | ||
69 | 2.39.2 | ||
70 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch new file mode 100644 index 00000000..3c39dd19 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0005-softmmu-physmem-Split-ram_block_add.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | From d4774a0e5e1ebed605c5d49e81433fd371d0b680 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vikram Garhwal <vikram.garhwal@amd.com> | ||
3 | Date: Tue, 17 Oct 2023 20:22:26 +0000 | ||
4 | Subject: [PATCH 05/11] softmmu: physmem: Split ram_block_add() | ||
5 | |||
6 | Extract ram block list update to a new function ram_block_add_list(). This is | ||
7 | done to support grant mappings which adds a memory region for granted memory and | ||
8 | updates the ram_block list. | ||
9 | |||
10 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
11 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
12 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
13 | --- | ||
14 | include/exec/ram_addr.h | 1 + | ||
15 | softmmu/physmem.c | 62 ++++++++++++++++++++++++++--------------- | ||
16 | 2 files changed, 40 insertions(+), 23 deletions(-) | ||
17 | |||
18 | diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h | ||
19 | index 9f2e3893f5..76fa360463 100644 | ||
20 | --- a/include/exec/ram_addr.h | ||
21 | +++ b/include/exec/ram_addr.h | ||
22 | @@ -139,6 +139,7 @@ void qemu_ram_free(RAMBlock *block); | ||
23 | int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp); | ||
24 | |||
25 | void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length); | ||
26 | +void ram_block_add_list(RAMBlock *new_block); | ||
27 | |||
28 | /* Clear whole block of mem */ | ||
29 | static inline void qemu_ram_block_writeback(RAMBlock *block) | ||
30 | diff --git a/softmmu/physmem.c b/softmmu/physmem.c | ||
31 | index 3df73542e1..f73629733e 100644 | ||
32 | --- a/softmmu/physmem.c | ||
33 | +++ b/softmmu/physmem.c | ||
34 | @@ -1786,12 +1786,47 @@ static void dirty_memory_extend(ram_addr_t old_ram_size, | ||
35 | } | ||
36 | } | ||
37 | |||
38 | +static void ram_block_add_list_locked(RAMBlock *new_block) | ||
39 | + { | ||
40 | + RAMBlock *block; | ||
41 | + RAMBlock *last_block = NULL; | ||
42 | + | ||
43 | + /* | ||
44 | + * Keep the list sorted from biggest to smallest block. Unlike QTAILQ, | ||
45 | + * QLIST (which has an RCU-friendly variant) does not have insertion at | ||
46 | + * tail, so save the last element in last_block. | ||
47 | + */ | ||
48 | + RAMBLOCK_FOREACH(block) { | ||
49 | + last_block = block; | ||
50 | + if (block->max_length < new_block->max_length) { | ||
51 | + break; | ||
52 | + } | ||
53 | + } | ||
54 | + if (block) { | ||
55 | + QLIST_INSERT_BEFORE_RCU(block, new_block, next); | ||
56 | + } else if (last_block) { | ||
57 | + QLIST_INSERT_AFTER_RCU(last_block, new_block, next); | ||
58 | + } else { /* list is empty */ | ||
59 | + QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next); | ||
60 | + } | ||
61 | + ram_list.mru_block = NULL; | ||
62 | + | ||
63 | + /* Write list before version */ | ||
64 | + smp_wmb(); | ||
65 | + ram_list.version++; | ||
66 | +} | ||
67 | + | ||
68 | +void ram_block_add_list(RAMBlock *new_block) | ||
69 | +{ | ||
70 | + qemu_mutex_lock_ramlist(); | ||
71 | + ram_block_add_list_locked(new_block); | ||
72 | + qemu_mutex_unlock_ramlist(); | ||
73 | +} | ||
74 | + | ||
75 | static void ram_block_add(RAMBlock *new_block, Error **errp) | ||
76 | { | ||
77 | const bool noreserve = qemu_ram_is_noreserve(new_block); | ||
78 | const bool shared = qemu_ram_is_shared(new_block); | ||
79 | - RAMBlock *block; | ||
80 | - RAMBlock *last_block = NULL; | ||
81 | ram_addr_t old_ram_size, new_ram_size; | ||
82 | Error *err = NULL; | ||
83 | |||
84 | @@ -1829,28 +1864,9 @@ static void ram_block_add(RAMBlock *new_block, Error **errp) | ||
85 | if (new_ram_size > old_ram_size) { | ||
86 | dirty_memory_extend(old_ram_size, new_ram_size); | ||
87 | } | ||
88 | - /* Keep the list sorted from biggest to smallest block. Unlike QTAILQ, | ||
89 | - * QLIST (which has an RCU-friendly variant) does not have insertion at | ||
90 | - * tail, so save the last element in last_block. | ||
91 | - */ | ||
92 | - RAMBLOCK_FOREACH(block) { | ||
93 | - last_block = block; | ||
94 | - if (block->max_length < new_block->max_length) { | ||
95 | - break; | ||
96 | - } | ||
97 | - } | ||
98 | - if (block) { | ||
99 | - QLIST_INSERT_BEFORE_RCU(block, new_block, next); | ||
100 | - } else if (last_block) { | ||
101 | - QLIST_INSERT_AFTER_RCU(last_block, new_block, next); | ||
102 | - } else { /* list is empty */ | ||
103 | - QLIST_INSERT_HEAD_RCU(&ram_list.blocks, new_block, next); | ||
104 | - } | ||
105 | - ram_list.mru_block = NULL; | ||
106 | + | ||
107 | + ram_block_add_list_locked(new_block); | ||
108 | |||
109 | - /* Write list before version */ | ||
110 | - smp_wmb(); | ||
111 | - ram_list.version++; | ||
112 | qemu_mutex_unlock_ramlist(); | ||
113 | |||
114 | cpu_physical_memory_set_dirty_range(new_block->offset, | ||
115 | -- | ||
116 | 2.39.2 | ||
117 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch new file mode 100644 index 00000000..a43748fe --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0006-xen-add-pseudo-RAM-region-for-grant-mappings.patch | |||
@@ -0,0 +1,153 @@ | |||
1 | From 637d10471fef76a7ab0e8f5631ea3c85ff5ce9db Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Thu, 20 May 2021 11:19:58 +0200 | ||
4 | Subject: [PATCH 06/11] xen: add pseudo RAM region for grant mappings | ||
5 | |||
6 | Add a memory region which can be used to automatically map granted | ||
7 | memory. It is starting at 0x8000000000000000ULL in order to be able to | ||
8 | distinguish it from normal RAM. | ||
9 | |||
10 | For this reason the xen.ram memory region is expanded, which has no | ||
11 | further impact as it is used just as a container of the real RAM | ||
12 | regions and now the grant region. | ||
13 | |||
14 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
15 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
16 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
17 | --- | ||
18 | hw/i386/xen/xen-hvm.c | 3 +++ | ||
19 | hw/xen/xen-hvm-common.c | 4 ++-- | ||
20 | hw/xen/xen-mapcache.c | 27 +++++++++++++++++++++++++++ | ||
21 | include/hw/xen/xen-hvm-common.h | 2 ++ | ||
22 | include/hw/xen/xen_pvdev.h | 3 +++ | ||
23 | include/sysemu/xen-mapcache.h | 3 +++ | ||
24 | 6 files changed, 40 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c | ||
27 | index f42621e674..67a55558a6 100644 | ||
28 | --- a/hw/i386/xen/xen-hvm.c | ||
29 | +++ b/hw/i386/xen/xen-hvm.c | ||
30 | @@ -172,6 +172,9 @@ static void xen_ram_init(PCMachineState *pcms, | ||
31 | x86ms->above_4g_mem_size); | ||
32 | memory_region_add_subregion(sysmem, 0x100000000ULL, &ram_hi); | ||
33 | } | ||
34 | + | ||
35 | + /* Add grant mappings as a pseudo RAM region. */ | ||
36 | + ram_grants = *xen_init_grant_ram(); | ||
37 | } | ||
38 | |||
39 | static XenPhysmap *get_physmapping(hwaddr start_addr, ram_addr_t size) | ||
40 | diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c | ||
41 | index 565dc39c8f..b7255977a5 100644 | ||
42 | --- a/hw/xen/xen-hvm-common.c | ||
43 | +++ b/hw/xen/xen-hvm-common.c | ||
44 | @@ -9,7 +9,7 @@ | ||
45 | #include "hw/boards.h" | ||
46 | #include "hw/xen/arch_hvm.h" | ||
47 | |||
48 | -MemoryRegion ram_memory; | ||
49 | +MemoryRegion ram_memory, ram_grants; | ||
50 | |||
51 | void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr, | ||
52 | Error **errp) | ||
53 | @@ -26,7 +26,7 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr, | ||
54 | return; | ||
55 | } | ||
56 | |||
57 | - if (mr == &ram_memory) { | ||
58 | + if (mr == &ram_memory || mr == &ram_grants) { | ||
59 | return; | ||
60 | } | ||
61 | |||
62 | diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c | ||
63 | index f7d974677d..8115c44c00 100644 | ||
64 | --- a/hw/xen/xen-mapcache.c | ||
65 | +++ b/hw/xen/xen-mapcache.c | ||
66 | @@ -14,7 +14,9 @@ | ||
67 | |||
68 | #include <sys/resource.h> | ||
69 | |||
70 | +#include "hw/xen/xen-hvm-common.h" | ||
71 | #include "hw/xen/xen_native.h" | ||
72 | +#include "hw/xen/xen_pvdev.h" | ||
73 | #include "qemu/bitmap.h" | ||
74 | |||
75 | #include "sysemu/runstate.h" | ||
76 | @@ -597,3 +599,28 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, | ||
77 | mapcache_unlock(); | ||
78 | return p; | ||
79 | } | ||
80 | + | ||
81 | +MemoryRegion *xen_init_grant_ram(void) | ||
82 | +{ | ||
83 | + RAMBlock *block; | ||
84 | + | ||
85 | + memory_region_init(&ram_grants, NULL, "xen.grants", | ||
86 | + XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE); | ||
87 | + block = g_malloc0(sizeof(*block)); | ||
88 | + block->mr = &ram_grants; | ||
89 | + block->used_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE; | ||
90 | + block->max_length = XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE; | ||
91 | + block->fd = -1; | ||
92 | + block->page_size = XC_PAGE_SIZE; | ||
93 | + block->host = (void *)XEN_GRANT_ADDR_OFF; | ||
94 | + block->offset = XEN_GRANT_ADDR_OFF; | ||
95 | + block->flags = RAM_PREALLOC; | ||
96 | + ram_grants.ram_block = block; | ||
97 | + ram_grants.ram = true; | ||
98 | + ram_grants.terminates = true; | ||
99 | + ram_block_add_list(block); | ||
100 | + memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF, | ||
101 | + &ram_grants); | ||
102 | + | ||
103 | + return &ram_grants; | ||
104 | +} | ||
105 | diff --git a/include/hw/xen/xen-hvm-common.h b/include/hw/xen/xen-hvm-common.h | ||
106 | index 4e9904f1a6..0d300ba898 100644 | ||
107 | --- a/include/hw/xen/xen-hvm-common.h | ||
108 | +++ b/include/hw/xen/xen-hvm-common.h | ||
109 | @@ -17,6 +17,8 @@ | ||
110 | #include <xen/hvm/ioreq.h> | ||
111 | |||
112 | extern MemoryRegion ram_memory; | ||
113 | + | ||
114 | +extern MemoryRegion ram_grants; | ||
115 | extern MemoryListener xen_io_listener; | ||
116 | extern DeviceListener xen_device_listener; | ||
117 | |||
118 | diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h | ||
119 | index ddad4b9f36..0f1b5edfa9 100644 | ||
120 | --- a/include/hw/xen/xen_pvdev.h | ||
121 | +++ b/include/hw/xen/xen_pvdev.h | ||
122 | @@ -80,4 +80,7 @@ int xen_pv_send_notify(struct XenLegacyDevice *xendev); | ||
123 | void xen_pv_printf(struct XenLegacyDevice *xendev, int msg_level, | ||
124 | const char *fmt, ...) G_GNUC_PRINTF(3, 4); | ||
125 | |||
126 | +#define XEN_GRANT_ADDR_OFF 0x8000000000000000ULL | ||
127 | +#define XEN_MAX_VIRTIO_GRANTS 65536 | ||
128 | + | ||
129 | #endif /* QEMU_HW_XEN_PVDEV_H */ | ||
130 | diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h | ||
131 | index c8e7c2f6cf..f4bedb1c11 100644 | ||
132 | --- a/include/sysemu/xen-mapcache.h | ||
133 | +++ b/include/sysemu/xen-mapcache.h | ||
134 | @@ -10,6 +10,7 @@ | ||
135 | #define XEN_MAPCACHE_H | ||
136 | |||
137 | #include "exec/cpu-common.h" | ||
138 | +#include "exec/ram_addr.h" | ||
139 | |||
140 | typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset, | ||
141 | ram_addr_t size); | ||
142 | @@ -25,6 +26,8 @@ void xen_invalidate_map_cache(void); | ||
143 | uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, | ||
144 | hwaddr new_phys_addr, | ||
145 | hwaddr size); | ||
146 | +MemoryRegion *xen_init_grant_ram(void); | ||
147 | + | ||
148 | #else | ||
149 | |||
150 | static inline void xen_map_cache_init(phys_offset_to_gaddr_t f, | ||
151 | -- | ||
152 | 2.39.2 | ||
153 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch new file mode 100644 index 00000000..ee400e2c --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0007-softmmu-let-qemu_map_ram_ptr-use-qemu_ram_ptr_length.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | From 82139e7e4bdcf5ca51b2ac90c63e4af699e3eb6f Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Thu, 20 May 2021 11:54:48 +0200 | ||
4 | Subject: [PATCH 07/11] softmmu: let qemu_map_ram_ptr() use | ||
5 | qemu_ram_ptr_length() | ||
6 | |||
7 | qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so | ||
8 | modify qemu_ram_ptr_length() a little bit and use it for | ||
9 | qemu_map_ram_ptr(), too. | ||
10 | |||
11 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
12 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
13 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
14 | --- | ||
15 | softmmu/physmem.c | 58 +++++++++++++++++++---------------------------- | ||
16 | 1 file changed, 23 insertions(+), 35 deletions(-) | ||
17 | |||
18 | diff --git a/softmmu/physmem.c b/softmmu/physmem.c | ||
19 | index f73629733e..a934e44fe7 100644 | ||
20 | --- a/softmmu/physmem.c | ||
21 | +++ b/softmmu/physmem.c | ||
22 | @@ -2123,38 +2123,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length) | ||
23 | } | ||
24 | #endif /* !_WIN32 */ | ||
25 | |||
26 | -/* Return a host pointer to ram allocated with qemu_ram_alloc. | ||
27 | - * This should not be used for general purpose DMA. Use address_space_map | ||
28 | - * or address_space_rw instead. For local memory (e.g. video ram) that the | ||
29 | - * device owns, use memory_region_get_ram_ptr. | ||
30 | - * | ||
31 | - * Called within RCU critical section. | ||
32 | - */ | ||
33 | -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) | ||
34 | -{ | ||
35 | - RAMBlock *block = ram_block; | ||
36 | - | ||
37 | - if (block == NULL) { | ||
38 | - block = qemu_get_ram_block(addr); | ||
39 | - addr -= block->offset; | ||
40 | - } | ||
41 | - | ||
42 | - if (xen_enabled() && block->host == NULL) { | ||
43 | - /* We need to check if the requested address is in the RAM | ||
44 | - * because we don't want to map the entire memory in QEMU. | ||
45 | - * In that case just map until the end of the page. | ||
46 | - */ | ||
47 | - if (block->offset == 0) { | ||
48 | - return xen_map_cache(addr, 0, 0, false); | ||
49 | - } | ||
50 | - | ||
51 | - block->host = xen_map_cache(block->offset, block->max_length, 1, false); | ||
52 | - } | ||
53 | - return ramblock_ptr(block, addr); | ||
54 | -} | ||
55 | - | ||
56 | -/* Return a host pointer to guest's ram. Similar to qemu_map_ram_ptr | ||
57 | - * but takes a size argument. | ||
58 | +/* | ||
59 | + * Return a host pointer to guest's ram. | ||
60 | * | ||
61 | * Called within RCU critical section. | ||
62 | */ | ||
63 | @@ -2162,7 +2132,9 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, | ||
64 | hwaddr *size, bool lock) | ||
65 | { | ||
66 | RAMBlock *block = ram_block; | ||
67 | - if (*size == 0) { | ||
68 | + hwaddr len = 0; | ||
69 | + | ||
70 | + if (size && *size == 0) { | ||
71 | return NULL; | ||
72 | } | ||
73 | |||
74 | @@ -2170,7 +2142,10 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, | ||
75 | block = qemu_get_ram_block(addr); | ||
76 | addr -= block->offset; | ||
77 | } | ||
78 | - *size = MIN(*size, block->max_length - addr); | ||
79 | + if (size) { | ||
80 | + *size = MIN(*size, block->max_length - addr); | ||
81 | + len = *size; | ||
82 | + } | ||
83 | |||
84 | if (xen_enabled() && block->host == NULL) { | ||
85 | /* We need to check if the requested address is in the RAM | ||
86 | @@ -2178,7 +2153,7 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, | ||
87 | * In that case just map the requested area. | ||
88 | */ | ||
89 | if (block->offset == 0) { | ||
90 | - return xen_map_cache(addr, *size, lock, lock); | ||
91 | + return xen_map_cache(addr, len, lock, lock); | ||
92 | } | ||
93 | |||
94 | block->host = xen_map_cache(block->offset, block->max_length, 1, lock); | ||
95 | @@ -2187,6 +2162,19 @@ static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, | ||
96 | return ramblock_ptr(block, addr); | ||
97 | } | ||
98 | |||
99 | +/* | ||
100 | + * Return a host pointer to ram allocated with qemu_ram_alloc. | ||
101 | + * This should not be used for general purpose DMA. Use address_space_map | ||
102 | + * or address_space_rw instead. For local memory (e.g. video ram) that the | ||
103 | + * device owns, use memory_region_get_ram_ptr. | ||
104 | + * | ||
105 | + * Called within RCU critical section. | ||
106 | + */ | ||
107 | +void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) | ||
108 | +{ | ||
109 | + return qemu_ram_ptr_length(ram_block, addr, NULL, false); | ||
110 | +} | ||
111 | + | ||
112 | /* Return the offset of a hostpointer within a ramblock */ | ||
113 | ram_addr_t qemu_ram_block_host_offset(RAMBlock *rb, void *host) | ||
114 | { | ||
115 | -- | ||
116 | 2.39.2 | ||
117 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch new file mode 100644 index 00000000..c1e9abd9 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0008-xen-let-xen_ram_addr_from_mapcache-return-1-in-case-.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 857bcafe8beb5a0cd78c070f432108049661a56d Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Thu, 20 May 2021 13:31:32 +0200 | ||
4 | Subject: [PATCH 08/11] xen: let xen_ram_addr_from_mapcache() return -1 in case | ||
5 | of not found entry | ||
6 | |||
7 | Today xen_ram_addr_from_mapcache() will either abort() or return 0 in | ||
8 | case it can't find a matching entry for a pointer value. Both cases | ||
9 | are bad, so change that to return an invalid address instead. | ||
10 | |||
11 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
12 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
13 | --- | ||
14 | hw/xen/xen-mapcache.c | 12 +++--------- | ||
15 | 1 file changed, 3 insertions(+), 9 deletions(-) | ||
16 | |||
17 | diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c | ||
18 | index 8115c44c00..8a61c7dde6 100644 | ||
19 | --- a/hw/xen/xen-mapcache.c | ||
20 | +++ b/hw/xen/xen-mapcache.c | ||
21 | @@ -404,13 +404,8 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr) | ||
22 | } | ||
23 | } | ||
24 | if (!found) { | ||
25 | - fprintf(stderr, "%s, could not find %p\n", __func__, ptr); | ||
26 | - QTAILQ_FOREACH(reventry, &mapcache->locked_entries, next) { | ||
27 | - DPRINTF(" "HWADDR_FMT_plx" -> %p is present\n", reventry->paddr_index, | ||
28 | - reventry->vaddr_req); | ||
29 | - } | ||
30 | - abort(); | ||
31 | - return 0; | ||
32 | + mapcache_unlock(); | ||
33 | + return RAM_ADDR_INVALID; | ||
34 | } | ||
35 | |||
36 | entry = &mapcache->entry[paddr_index % mapcache->nr_buckets]; | ||
37 | @@ -418,8 +413,7 @@ ram_addr_t xen_ram_addr_from_mapcache(void *ptr) | ||
38 | entry = entry->next; | ||
39 | } | ||
40 | if (!entry) { | ||
41 | - DPRINTF("Trying to find address %p that is not in the mapcache!\n", ptr); | ||
42 | - raddr = 0; | ||
43 | + raddr = RAM_ADDR_INVALID; | ||
44 | } else { | ||
45 | raddr = (reventry->paddr_index << MCACHE_BUCKET_SHIFT) + | ||
46 | ((unsigned long) ptr - (unsigned long) entry->vaddr_base); | ||
47 | -- | ||
48 | 2.39.2 | ||
49 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch new file mode 100644 index 00000000..fa18ef16 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0009-memory-add-MemoryRegion-map-and-unmap-callbacks.patch | |||
@@ -0,0 +1,155 @@ | |||
1 | From 364a11be6274336ec9b0f06f3272f964d27c9349 Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Thu, 27 May 2021 15:27:55 +0200 | ||
4 | Subject: [PATCH 09/11] memory: add MemoryRegion map and unmap callbacks | ||
5 | |||
6 | In order to support mapping and unmapping guest memory dynamically to | ||
7 | and from qemu during address_space_[un]map() operations add the map() | ||
8 | and unmap() callbacks to MemoryRegionOps. | ||
9 | |||
10 | Those will be used e.g. for Xen grant mappings when performing guest | ||
11 | I/Os. | ||
12 | |||
13 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
14 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
15 | --- | ||
16 | include/exec/memory.h | 21 ++++++++++++++++++ | ||
17 | softmmu/physmem.c | 50 +++++++++++++++++++++++++++++++++---------- | ||
18 | 2 files changed, 60 insertions(+), 11 deletions(-) | ||
19 | |||
20 | diff --git a/include/exec/memory.h b/include/exec/memory.h | ||
21 | index 68284428f8..55414417ab 100644 | ||
22 | --- a/include/exec/memory.h | ||
23 | +++ b/include/exec/memory.h | ||
24 | @@ -274,6 +274,27 @@ struct MemoryRegionOps { | ||
25 | unsigned size, | ||
26 | MemTxAttrs attrs); | ||
27 | |||
28 | + /* | ||
29 | + * Dynamically create mapping. @addr is the guest address to map; @plen | ||
30 | + * is the pointer to the usable length of the buffer. | ||
31 | + * @mr contents can be changed in case a new memory region is created for | ||
32 | + * the mapping. | ||
33 | + * Returns the buffer address for accessing the data. | ||
34 | + */ | ||
35 | + void *(*map)(MemoryRegion **mr, | ||
36 | + hwaddr addr, | ||
37 | + hwaddr *plen, | ||
38 | + bool is_write, | ||
39 | + MemTxAttrs attrs); | ||
40 | + | ||
41 | + /* Unmap an area obtained via map() before. */ | ||
42 | + void (*unmap)(MemoryRegion *mr, | ||
43 | + void *buffer, | ||
44 | + ram_addr_t addr, | ||
45 | + hwaddr len, | ||
46 | + bool is_write, | ||
47 | + hwaddr access_len); | ||
48 | + | ||
49 | enum device_endian endianness; | ||
50 | /* Guest-visible constraints: */ | ||
51 | struct { | ||
52 | diff --git a/softmmu/physmem.c b/softmmu/physmem.c | ||
53 | index a934e44fe7..a1e2030424 100644 | ||
54 | --- a/softmmu/physmem.c | ||
55 | +++ b/softmmu/physmem.c | ||
56 | @@ -3070,6 +3070,7 @@ void *address_space_map(AddressSpace *as, | ||
57 | hwaddr len = *plen; | ||
58 | hwaddr l, xlat; | ||
59 | MemoryRegion *mr; | ||
60 | + void *ptr = NULL; | ||
61 | FlatView *fv; | ||
62 | |||
63 | if (len == 0) { | ||
64 | @@ -3103,12 +3104,20 @@ void *address_space_map(AddressSpace *as, | ||
65 | return bounce.buffer; | ||
66 | } | ||
67 | |||
68 | - | ||
69 | memory_region_ref(mr); | ||
70 | + | ||
71 | + if (mr->ops && mr->ops->map) { | ||
72 | + ptr = mr->ops->map(&mr, addr, plen, is_write, attrs); | ||
73 | + } | ||
74 | + | ||
75 | *plen = flatview_extend_translation(fv, addr, len, mr, xlat, | ||
76 | l, is_write, attrs); | ||
77 | fuzz_dma_read_cb(addr, *plen, mr); | ||
78 | - return qemu_ram_ptr_length(mr->ram_block, xlat, plen, true); | ||
79 | + if (ptr == NULL) { | ||
80 | + ptr = qemu_ram_ptr_length(mr->ram_block, xlat, plen, true); | ||
81 | + } | ||
82 | + | ||
83 | + return ptr; | ||
84 | } | ||
85 | |||
86 | /* Unmaps a memory region previously mapped by address_space_map(). | ||
87 | @@ -3124,11 +3133,16 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, | ||
88 | |||
89 | mr = memory_region_from_host(buffer, &addr1); | ||
90 | assert(mr != NULL); | ||
91 | - if (is_write) { | ||
92 | - invalidate_and_set_dirty(mr, addr1, access_len); | ||
93 | - } | ||
94 | - if (xen_enabled()) { | ||
95 | - xen_invalidate_map_cache_entry(buffer); | ||
96 | + | ||
97 | + if (mr->ops && mr->ops->unmap) { | ||
98 | + mr->ops->unmap(mr, buffer, addr1, len, is_write, access_len); | ||
99 | + } else { | ||
100 | + if (is_write) { | ||
101 | + invalidate_and_set_dirty(mr, addr1, access_len); | ||
102 | + } | ||
103 | + if (xen_enabled()) { | ||
104 | + xen_invalidate_map_cache_entry(buffer); | ||
105 | + } | ||
106 | } | ||
107 | memory_region_unref(mr); | ||
108 | return; | ||
109 | @@ -3201,10 +3215,18 @@ int64_t address_space_cache_init(MemoryRegionCache *cache, | ||
110 | * doing this if we found actual RAM, which behaves the same | ||
111 | * regardless of attributes; so UNSPECIFIED is fine. | ||
112 | */ | ||
113 | + if (mr->ops && mr->ops->map) { | ||
114 | + cache->ptr = mr->ops->map(&mr, addr, &l, is_write, | ||
115 | + MEMTXATTRS_UNSPECIFIED); | ||
116 | + } | ||
117 | + | ||
118 | l = flatview_extend_translation(cache->fv, addr, len, mr, | ||
119 | cache->xlat, l, is_write, | ||
120 | MEMTXATTRS_UNSPECIFIED); | ||
121 | - cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l, true); | ||
122 | + if (!cache->ptr) { | ||
123 | + cache->ptr = qemu_ram_ptr_length(mr->ram_block, cache->xlat, &l, | ||
124 | + true); | ||
125 | + } | ||
126 | } else { | ||
127 | cache->ptr = NULL; | ||
128 | } | ||
129 | @@ -3226,14 +3248,20 @@ void address_space_cache_invalidate(MemoryRegionCache *cache, | ||
130 | |||
131 | void address_space_cache_destroy(MemoryRegionCache *cache) | ||
132 | { | ||
133 | - if (!cache->mrs.mr) { | ||
134 | + MemoryRegion *mr = cache->mrs.mr; | ||
135 | + | ||
136 | + if (!mr) { | ||
137 | return; | ||
138 | } | ||
139 | |||
140 | - if (xen_enabled()) { | ||
141 | + if (mr->ops && mr->ops->unmap) { | ||
142 | + mr->ops->unmap(mr, cache->ptr, cache->xlat, cache->len, | ||
143 | + cache->is_write, cache->len); | ||
144 | + } else if (xen_enabled()) { | ||
145 | xen_invalidate_map_cache_entry(cache->ptr); | ||
146 | } | ||
147 | - memory_region_unref(cache->mrs.mr); | ||
148 | + | ||
149 | + memory_region_unref(mr); | ||
150 | flatview_unref(cache->fv); | ||
151 | cache->mrs.mr = NULL; | ||
152 | cache->fv = NULL; | ||
153 | -- | ||
154 | 2.39.2 | ||
155 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch new file mode 100644 index 00000000..48dcf7d7 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0010-xen-add-map-and-unmap-callbacks-for-grant-region.patch | |||
@@ -0,0 +1,262 @@ | |||
1 | From 90496d4c71e3b9334aebca118661bf72631ed0f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Juergen Gross <jgross@suse.com> | ||
3 | Date: Fri, 26 Aug 2022 13:57:06 +0200 | ||
4 | Subject: [PATCH 10/11] xen: add map and unmap callbacks for grant region | ||
5 | |||
6 | Add the callbacks for mapping/unmapping guest memory via grants to the | ||
7 | special grant memory region. | ||
8 | |||
9 | Signed-off-by: Juergen Gross <jgross@suse.com> | ||
10 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
11 | --- | ||
12 | hw/xen/xen-mapcache.c | 176 +++++++++++++++++++++++++++++++++++++++++- | ||
13 | softmmu/physmem.c | 11 ++- | ||
14 | 2 files changed, 182 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c | ||
17 | index 8a61c7dde6..e071328fc5 100644 | ||
18 | --- a/hw/xen/xen-mapcache.c | ||
19 | +++ b/hw/xen/xen-mapcache.c | ||
20 | @@ -9,6 +9,8 @@ | ||
21 | */ | ||
22 | |||
23 | #include "qemu/osdep.h" | ||
24 | +#include "qemu/queue.h" | ||
25 | +#include "qemu/thread.h" | ||
26 | #include "qemu/units.h" | ||
27 | #include "qemu/error-report.h" | ||
28 | |||
29 | @@ -23,6 +25,8 @@ | ||
30 | #include "sysemu/xen-mapcache.h" | ||
31 | #include "trace.h" | ||
32 | |||
33 | +#include <xenevtchn.h> | ||
34 | +#include <xengnttab.h> | ||
35 | |||
36 | //#define MAPCACHE_DEBUG | ||
37 | |||
38 | @@ -385,7 +389,7 @@ uint8_t *xen_map_cache(hwaddr phys_addr, hwaddr size, | ||
39 | return p; | ||
40 | } | ||
41 | |||
42 | -ram_addr_t xen_ram_addr_from_mapcache(void *ptr) | ||
43 | +static ram_addr_t xen_ram_addr_from_mapcache_try(void *ptr) | ||
44 | { | ||
45 | MapCacheEntry *entry = NULL; | ||
46 | MapCacheRev *reventry; | ||
47 | @@ -594,10 +598,179 @@ uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, | ||
48 | return p; | ||
49 | } | ||
50 | |||
51 | +struct XENMappedGrantRegion { | ||
52 | + void *addr; | ||
53 | + unsigned int pages; | ||
54 | + unsigned int refs; | ||
55 | + unsigned int prot; | ||
56 | + uint32_t idx; | ||
57 | + QLIST_ENTRY(XENMappedGrantRegion) list; | ||
58 | +}; | ||
59 | + | ||
60 | +static xengnttab_handle *xen_region_gnttabdev; | ||
61 | +static QLIST_HEAD(GrantRegionList, XENMappedGrantRegion) xen_grant_mappings = | ||
62 | + QLIST_HEAD_INITIALIZER(xen_grant_mappings); | ||
63 | +static QemuMutex xen_map_mutex; | ||
64 | + | ||
65 | +static void *xen_map_grant_dyn(MemoryRegion **mr, hwaddr addr, hwaddr *plen, | ||
66 | + bool is_write, MemTxAttrs attrs) | ||
67 | +{ | ||
68 | + unsigned int page_off = addr & (XC_PAGE_SIZE - 1); | ||
69 | + unsigned int i; | ||
70 | + unsigned int total_grants = 0; | ||
71 | + unsigned int nrefs = (page_off + *plen + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT; | ||
72 | + uint32_t ref = (addr - XEN_GRANT_ADDR_OFF) >> XC_PAGE_SHIFT; | ||
73 | + uint32_t *refs = NULL; | ||
74 | + unsigned int prot = PROT_READ; | ||
75 | + struct XENMappedGrantRegion *mgr = NULL; | ||
76 | + | ||
77 | + if (is_write) { | ||
78 | + prot |= PROT_WRITE; | ||
79 | + } | ||
80 | + | ||
81 | + qemu_mutex_lock(&xen_map_mutex); | ||
82 | + | ||
83 | + QLIST_FOREACH(mgr, &xen_grant_mappings, list) { | ||
84 | + if (mgr->idx == ref && | ||
85 | + mgr->pages == nrefs && | ||
86 | + (mgr->prot & prot) == prot) { | ||
87 | + break; | ||
88 | + } | ||
89 | + | ||
90 | + total_grants += mgr->pages; | ||
91 | + } | ||
92 | + | ||
93 | + if (!mgr) { | ||
94 | + if (nrefs + total_grants >= XEN_MAX_VIRTIO_GRANTS) { | ||
95 | + qemu_mutex_unlock(&xen_map_mutex); | ||
96 | + return NULL; | ||
97 | + } | ||
98 | + | ||
99 | + mgr = g_new(struct XENMappedGrantRegion, 1); | ||
100 | + | ||
101 | + if (nrefs == 1) { | ||
102 | + refs = &ref; | ||
103 | + } else { | ||
104 | + refs = g_new(uint32_t, nrefs); | ||
105 | + for (i = 0; i < nrefs; i++) { | ||
106 | + refs[i] = ref + i; | ||
107 | + } | ||
108 | + } | ||
109 | + mgr->addr = xengnttab_map_domain_grant_refs(xen_region_gnttabdev, nrefs, | ||
110 | + xen_domid, refs, prot); | ||
111 | + if (mgr->addr) { | ||
112 | + mgr->pages = nrefs; | ||
113 | + mgr->refs = 1; | ||
114 | + mgr->prot = prot; | ||
115 | + mgr->idx = ref; | ||
116 | + | ||
117 | + QLIST_INSERT_HEAD(&xen_grant_mappings, mgr, list); | ||
118 | + } else { | ||
119 | + g_free(mgr); | ||
120 | + mgr = NULL; | ||
121 | + } | ||
122 | + } else { | ||
123 | + mgr->refs++; | ||
124 | + } | ||
125 | + | ||
126 | + qemu_mutex_unlock(&xen_map_mutex); | ||
127 | + | ||
128 | + if (nrefs > 1) { | ||
129 | + g_free(refs); | ||
130 | + } | ||
131 | + | ||
132 | + return mgr ? mgr->addr + page_off : NULL; | ||
133 | +} | ||
134 | + | ||
135 | +static void xen_unmap_grant_dyn(MemoryRegion *mr, void *buffer, ram_addr_t addr, | ||
136 | + hwaddr len, bool is_write, hwaddr access_len) | ||
137 | +{ | ||
138 | + unsigned int page_off = (unsigned long)buffer & (XC_PAGE_SIZE - 1); | ||
139 | + unsigned int nrefs = (page_off + len + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT; | ||
140 | + unsigned int prot = PROT_READ; | ||
141 | + struct XENMappedGrantRegion *mgr = NULL; | ||
142 | + | ||
143 | + if (is_write) { | ||
144 | + prot |= PROT_WRITE; | ||
145 | + } | ||
146 | + | ||
147 | + qemu_mutex_lock(&xen_map_mutex); | ||
148 | + | ||
149 | + QLIST_FOREACH(mgr, &xen_grant_mappings, list) { | ||
150 | + if (mgr->addr == buffer - page_off && | ||
151 | + mgr->pages == nrefs && | ||
152 | + (mgr->prot & prot) == prot) { | ||
153 | + break; | ||
154 | + } | ||
155 | + } | ||
156 | + if (mgr) { | ||
157 | + mgr->refs--; | ||
158 | + if (!mgr->refs) { | ||
159 | + xengnttab_unmap(xen_region_gnttabdev, mgr->addr, nrefs); | ||
160 | + | ||
161 | + QLIST_REMOVE(mgr, list); | ||
162 | + g_free(mgr); | ||
163 | + } | ||
164 | + } else { | ||
165 | + error_report("xen_unmap_grant_dyn() trying to unmap unknown buffer"); | ||
166 | + } | ||
167 | + | ||
168 | + qemu_mutex_unlock(&xen_map_mutex); | ||
169 | +} | ||
170 | + | ||
171 | +static ram_addr_t xen_ram_addr_from_grant_cache(void *ptr) | ||
172 | +{ | ||
173 | + unsigned int page_off = (unsigned long)ptr & (XC_PAGE_SIZE - 1); | ||
174 | + struct XENMappedGrantRegion *mgr = NULL; | ||
175 | + ram_addr_t raddr = RAM_ADDR_INVALID; | ||
176 | + | ||
177 | + qemu_mutex_lock(&xen_map_mutex); | ||
178 | + | ||
179 | + QLIST_FOREACH(mgr, &xen_grant_mappings, list) { | ||
180 | + if (mgr->addr == ptr - page_off) { | ||
181 | + break; | ||
182 | + } | ||
183 | + } | ||
184 | + | ||
185 | + if (mgr) { | ||
186 | + raddr = (mgr->idx << XC_PAGE_SHIFT) + page_off + XEN_GRANT_ADDR_OFF; | ||
187 | + } | ||
188 | + | ||
189 | + qemu_mutex_unlock(&xen_map_mutex); | ||
190 | + | ||
191 | + return raddr; | ||
192 | +} | ||
193 | + | ||
194 | +ram_addr_t xen_ram_addr_from_mapcache(void *ptr) | ||
195 | +{ | ||
196 | + ram_addr_t raddr; | ||
197 | + | ||
198 | + raddr = xen_ram_addr_from_mapcache_try(ptr); | ||
199 | + if (raddr == RAM_ADDR_INVALID) { | ||
200 | + raddr = xen_ram_addr_from_grant_cache(ptr); | ||
201 | + } | ||
202 | + | ||
203 | + return raddr; | ||
204 | +} | ||
205 | + | ||
206 | +static const struct MemoryRegionOps xen_grant_mr_ops = { | ||
207 | + .map = xen_map_grant_dyn, | ||
208 | + .unmap = xen_unmap_grant_dyn, | ||
209 | + .endianness = DEVICE_LITTLE_ENDIAN, | ||
210 | +}; | ||
211 | + | ||
212 | MemoryRegion *xen_init_grant_ram(void) | ||
213 | { | ||
214 | RAMBlock *block; | ||
215 | |||
216 | + qemu_mutex_init(&xen_map_mutex); | ||
217 | + | ||
218 | + xen_region_gnttabdev = xengnttab_open(NULL, 0); | ||
219 | + if (xen_region_gnttabdev == NULL) { | ||
220 | + fprintf(stderr, "can't open gnttab device\n"); | ||
221 | + return NULL; | ||
222 | + } | ||
223 | + | ||
224 | memory_region_init(&ram_grants, NULL, "xen.grants", | ||
225 | XEN_MAX_VIRTIO_GRANTS * XC_PAGE_SIZE); | ||
226 | block = g_malloc0(sizeof(*block)); | ||
227 | @@ -612,6 +785,7 @@ MemoryRegion *xen_init_grant_ram(void) | ||
228 | ram_grants.ram_block = block; | ||
229 | ram_grants.ram = true; | ||
230 | ram_grants.terminates = true; | ||
231 | + ram_grants.ops = &xen_grant_mr_ops; | ||
232 | ram_block_add_list(block); | ||
233 | memory_region_add_subregion(get_system_memory(), XEN_GRANT_ADDR_OFF, | ||
234 | &ram_grants); | ||
235 | diff --git a/softmmu/physmem.c b/softmmu/physmem.c | ||
236 | index a1e2030424..e1057304f1 100644 | ||
237 | --- a/softmmu/physmem.c | ||
238 | +++ b/softmmu/physmem.c | ||
239 | @@ -2210,13 +2210,16 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset, | ||
240 | |||
241 | if (xen_enabled()) { | ||
242 | ram_addr_t ram_addr; | ||
243 | + | ||
244 | RCU_READ_LOCK_GUARD(); | ||
245 | ram_addr = xen_ram_addr_from_mapcache(ptr); | ||
246 | - block = qemu_get_ram_block(ram_addr); | ||
247 | - if (block) { | ||
248 | - *offset = ram_addr - block->offset; | ||
249 | + if (ram_addr != RAM_ADDR_INVALID) { | ||
250 | + block = qemu_get_ram_block(ram_addr); | ||
251 | + if (block) { | ||
252 | + *offset = ram_addr - block->offset; | ||
253 | + } | ||
254 | + return block; | ||
255 | } | ||
256 | - return block; | ||
257 | } | ||
258 | |||
259 | RCU_READ_LOCK_GUARD(); | ||
260 | -- | ||
261 | 2.39.2 | ||
262 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch new file mode 100644 index 00000000..fb5450e6 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-8.1/0011-hw-arm-Add-grant-mapping.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From b1eaba758a9000061fc53a934c348d6ef8dcdf64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vikram Garhwal <vikram.garhwal@amd.com> | ||
3 | Date: Tue, 31 Jan 2023 21:46:43 +0000 | ||
4 | Subject: [PATCH 11/11] hw: arm: Add grant mapping. | ||
5 | |||
6 | Enable grant ram mapping support for Xenpvh machine on ARM. | ||
7 | |||
8 | Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com> | ||
9 | Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> | ||
10 | --- | ||
11 | hw/arm/xen_arm.c | 3 +++ | ||
12 | 1 file changed, 3 insertions(+) | ||
13 | |||
14 | diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c | ||
15 | index a5631529d0..1587e2a43b 100644 | ||
16 | --- a/hw/arm/xen_arm.c | ||
17 | +++ b/hw/arm/xen_arm.c | ||
18 | @@ -127,6 +127,9 @@ static void xen_init_ram(MachineState *machine) | ||
19 | DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n", | ||
20 | GUEST_RAM1_BASE, ram_size[1]); | ||
21 | } | ||
22 | + | ||
23 | + DPRINTF("init grant ram mapping for XEN\n"); | ||
24 | + ram_grants = *xen_init_grant_ram(); | ||
25 | } | ||
26 | |||
27 | void arch_handle_ioreq(XenIOState *state, ioreq_t *req) | ||
28 | -- | ||
29 | 2.39.2 | ||
30 | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend new file mode 100644 index 00000000..e84844cf --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-tpm.inc | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend new file mode 100644 index 00000000..e84844cf --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require qemu-tpm.inc | |||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend new file mode 100644 index 00000000..2f8e55aa --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu-xilinx_2024%.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | require qemu-tpm.inc | ||
2 | require qemu-xen_8.1.inc | ||
3 | |||
4 | # We do not want QEMU, on the target to be configured with OpenGL | ||
5 | PACKAGECONFIG:remove:class-target:petalinux = "virglrenderer epoxy gtk+" | ||
diff --git a/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend new file mode 100644 index 00000000..95b1902b --- /dev/null +++ b/meta-xilinx-virtualization/recipes-devtools/qemu/qemu_8.1%.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | require qemu-tpm.inc | ||
2 | require qemu-xen_8.1.inc | ||
3 | |||
4 | # We do not want QEMU, on the target to be configured with OpenGL | ||
5 | PACKAGECONFIG:remove:class-target = "virglrenderer epoxy gtk+" | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch new file mode 100644 index 00000000..135860ab --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From b300c18ab899b3c899e5405c96c20a32e51d77c8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Mon, 2 Jul 2018 23:10:28 -0400 | ||
4 | Subject: [PATCH] xen: Fix menuconfig and add support for config fragments and | ||
5 | |||
6 | Upstream-Status: Xen: Inappropriate [oe specific, cross compile issue] | ||
7 | Upstream-Status: Kernel: Pending | ||
8 | Signed-off-by: Diego Sueiro <diego.sueiro@arm.com> | ||
9 | commit e6972e689a980ab28637e94e48c77eeace6abde5 | ||
10 | |||
11 | xen/kconfig,menuconfig,mconf-cfg: Allow specification of ncurses location | ||
12 | |||
13 | In some cross build environments such as the Yocto Project build | ||
14 | environment it provides an ncurses library that is compiled | ||
15 | differently than the host's version. This causes display corruption | ||
16 | problems when the host's curses includes are used instead of the | ||
17 | includes from the provided compiler are overridden. There is a second | ||
18 | case where there is no curses libraries at all on the host system and | ||
19 | menuconfig will just fail entirely. | ||
20 | |||
21 | The solution is simply to allow an override variable in | ||
22 | check-lxdialog.sh for environments such as the Yocto Project. Adding | ||
23 | a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing | ||
24 | compiling and linking against the right headers and libraries. | ||
25 | |||
26 | Change-Id: Ibe8dfafc90655e3be2671dbbb0cb7f5631fc4d44 | ||
27 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
28 | cc: Michal Marek <mmarek@suse.cz> | ||
29 | cc: linux-kbuild@vger.kernel.org | ||
30 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
31 | |||
32 | --- | ||
33 | xen/tools/kconfig/mconf-cfg.sh | 8 ++++++++ | ||
34 | 1 file changed, 8 insertions(+) | ||
35 | mode change 100755 => 100644 xen/tools/kconfig/mconf-cfg.sh | ||
36 | |||
37 | diff --git a/xen/tools/kconfig/mconf-cfg.sh b/xen/tools/kconfig/mconf-cfg.sh | ||
38 | old mode 100755 | ||
39 | new mode 100644 | ||
40 | index c812872d7f..56eb4fc79f | ||
41 | --- a/xen/tools/kconfig/mconf-cfg.sh | ||
42 | +++ b/xen/tools/kconfig/mconf-cfg.sh | ||
43 | @@ -4,6 +4,14 @@ | ||
44 | PKG="ncursesw" | ||
45 | PKG2="ncurses" | ||
46 | |||
47 | +if [ "$CROSS_CURSES_LIB" != "" ]; then | ||
48 | + echo libs=\'$CROSS_CURSES_LIB\' | ||
49 | + if [ x"$CROSS_CURSES_INC" != x ]; then | ||
50 | + echo cflags=\'$CROSS_CURSES_INC\' | ||
51 | + fi | ||
52 | + exit 0 | ||
53 | +fi | ||
54 | + | ||
55 | if [ -n "$(command -v pkg-config)" ]; then | ||
56 | if pkg-config --exists $PKG; then | ||
57 | echo cflags=\"$(pkg-config --cflags $PKG)\" | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch new file mode 100644 index 00000000..35cd9a81 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com> | ||
3 | From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
4 | Date: Fri, 19 Oct 2018 11:01:37 +0200 | ||
5 | Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args | ||
6 | |||
7 | Upstream-Status: Xen: Inappropriate [oe specific, python install issues] | ||
8 | |||
9 | Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR) | ||
10 | as well as other parameters set by the OpenEmbedded build system. | ||
11 | This is especially useful when the target libdir is not the default one | ||
12 | (/usr/lib), but for example /usr/lib64. | ||
13 | |||
14 | Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
15 | |||
16 | Forward-ported to Xen 4.12.0 | ||
17 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
18 | |||
19 | Modified to support pygrub installation with python 3 | ||
20 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
21 | |||
22 | Forward-ported to Xen 4.14.0 | ||
23 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
24 | |||
25 | Forward-ported to Xen 4.15.0 | ||
26 | Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> | ||
27 | |||
28 | --- | ||
29 | tools/pygrub/Makefile | 7 +++++-- | ||
30 | tools/python/Makefile | 2 +- | ||
31 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
32 | |||
33 | diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile | ||
34 | index 37b2146214..ffb9270065 100644 | ||
35 | --- a/tools/pygrub/Makefile | ||
36 | +++ b/tools/pygrub/Makefile | ||
37 | @@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt | ||
38 | all: build | ||
39 | .PHONY: build | ||
40 | build: | ||
41 | - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build | ||
42 | + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) | ||
43 | |||
44 | .PHONY: install | ||
45 | install: all | ||
46 | @@ -18,7 +18,10 @@ install: all | ||
47 | CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \ | ||
48 | LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \ | ||
49 | --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
50 | - --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force | ||
51 | + --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \ | ||
52 | + $(DISTUTILS_INSTALL_ARGS) | ||
53 | + rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
54 | + $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
55 | set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ | ||
56 | "`readlink -f $(DESTDIR)/$(bindir)`" != \ | ||
57 | "`readlink -f $(LIBEXEC_BIN)`" ]; then \ | ||
58 | diff --git a/tools/python/Makefile b/tools/python/Makefile | ||
59 | index cc76423647..5cb11ae453 100644 | ||
60 | --- a/tools/python/Makefile | ||
61 | +++ b/tools/python/Makefile | ||
62 | @@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA | ||
63 | SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \ | ||
64 | SHLIB_libxenguest="$(SHLIB_libxenguest)" \ | ||
65 | SHLIB_libxenstore="$(SHLIB_libxenstore)" \ | ||
66 | - $(PYTHON) setup.py | ||
67 | + $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS) | ||
68 | |||
69 | .PHONY: build | ||
70 | build: | ||
71 | -- | ||
72 | 2.17.1 | ||
73 | |||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch new file mode 100644 index 00000000..7ac1a399 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile | ||
4 | index 4963bc89c6..c1c05eb421 100644 | ||
5 | --- a/tools/pygrub/Makefile | ||
6 | +++ b/tools/pygrub/Makefile | ||
7 | @@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA | ||
8 | all: build | ||
9 | .PHONY: build | ||
10 | build: | ||
11 | - $(setup.py) build | ||
12 | + $(setup.py) build $(DISTUTILS_BUILD_ARGS) | ||
13 | |||
14 | .PHONY: install | ||
15 | install: all | ||
16 | $(INSTALL_DIR) $(DESTDIR)/$(bindir) | ||
17 | $(INSTALL_DIR) $(DESTDIR)/$(LIBEXEC_BIN) | ||
18 | $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
19 | - --root="$(DESTDIR)" --force | ||
20 | + --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) | ||
21 | $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
22 | set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ | ||
23 | "`readlink -f $(DESTDIR)/$(bindir)`" != \ | ||
24 | diff --git a/tools/python/Makefile b/tools/python/Makefile | ||
25 | index 437431c48e..0a99c2067e 100644 | ||
26 | --- a/tools/python/Makefile | ||
27 | +++ b/tools/python/Makefile | ||
28 | @@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA | ||
29 | |||
30 | .PHONY: build | ||
31 | build: | ||
32 | - $(setup.py) build | ||
33 | + $(setup.py) build $(DISTUTILS_BUILD_ARGS) | ||
34 | |||
35 | .PHONY: install | ||
36 | install: | ||
37 | $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) | ||
38 | $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
39 | - --root="$(DESTDIR)" --force | ||
40 | + --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) | ||
41 | $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) | ||
42 | $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN) | ||
43 | |||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch new file mode 100644 index 00000000..fa2a82ff --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/files/xen-flask-race-fix.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From mboxrd@z Thu Jan 1 00:00:00 1970 | ||
2 | From: Anthony PERARD <anthony.perard@citrix.com> | ||
3 | Subject: [XEN PATCH] build: fix building flask headers before descending in flask/ss/ | ||
4 | Date: Fri, 20 Jan 2023 13:36:26 +0000 | ||
5 | Message-ID: <20230120133626.55680-1-anthony.perard@citrix.com> | ||
6 | X-Mailer: git-send-email 2.30.2 | ||
7 | MIME-Version: 1.0 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | Content-Type: text/plain | ||
10 | |||
11 | Unfortunatly, adding prerequisite to "$(obj)/ss/built_in.o" doesn't | ||
12 | work because we have "$(obj)/%/built_in.o: $(obj)/% ;" in Rules.mk. | ||
13 | So, make is allow to try to build objects in "xsm/flask/ss/" before | ||
14 | generating the headers. | ||
15 | |||
16 | Adding a prerequisite on "$(obj)/ss" instead will fix the issue has | ||
17 | that the target used to run make in this subdirectory. | ||
18 | |||
19 | Unfortunatly, that target is also used when running `make clean`, so | ||
20 | we need to ignore it in this case. $(MAKECMDGOALS) can't be used in | ||
21 | this case as it is empty, but we can guess which operation is done by | ||
22 | looking at the list of loaded makefiles. | ||
23 | |||
24 | Upstream-Status: backport [https://lore.kernel.org/xen-devel/20230120133626.55680-1-anthony.perard@citrix.com/T/#u] | ||
25 | |||
26 | Fixes: 7a3bcd2babcc ("build: build everything from the root dir, use obj=$subdir") | ||
27 | Reported-by: "Daniel P. Smith" <dpsmith@apertussolutions.com> | ||
28 | Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> | ||
29 | --- | ||
30 | xen/xsm/flask/Makefile | 6 +++++- | ||
31 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
32 | |||
33 | diff --git a/xen/xsm/flask/Makefile b/xen/xsm/flask/Makefile | ||
34 | index d25312f4fa..2d24346ee3 100644 | ||
35 | --- a/xen/xsm/flask/Makefile | ||
36 | +++ b/xen/xsm/flask/Makefile | ||
37 | @@ -16,7 +16,11 @@ FLASK_H_FILES := flask.h class_to_string.h initial_sid_to_string.h | ||
38 | AV_H_FILES := av_perm_to_string.h av_permissions.h | ||
39 | ALL_H_FILES := $(addprefix include/,$(FLASK_H_FILES) $(AV_H_FILES)) | ||
40 | |||
41 | -$(addprefix $(obj)/,$(obj-y)) $(obj)/ss/built_in.o: $(addprefix $(obj)/,$(ALL_H_FILES)) | ||
42 | +# Adding prerequisite to descending into ss/ folder only when not running `make | ||
43 | +# clean`. | ||
44 | +ifeq ($(filter %/Makefile.clean,$(MAKEFILE_LIST)),) | ||
45 | +$(addprefix $(obj)/,$(obj-y)) $(obj)/ss: $(addprefix $(obj)/,$(ALL_H_FILES)) | ||
46 | +endif | ||
47 | extra-y += $(ALL_H_FILES) | ||
48 | |||
49 | mkflask := $(srcdir)/policy/mkflask.sh | ||
50 | -- | ||
51 | Anthony PERARD | ||
52 | |||
53 | |||
54 | |||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc new file mode 100644 index 00000000..e7bc8d7e --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | # Only include the sysvinit scripts if sysvinit is enabled. | ||
2 | do_install:append () { | ||
3 | if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then | ||
4 | sed -i -e '1c#!/usr/bin/env python3' ${D}/usr/lib/xen/bin/pygrub | ||
5 | fi | ||
6 | |||
7 | if [ "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit', '', d)}" != 'sysvinit' ]; then | ||
8 | rm -f ${D}/etc/init.d/xendomains | ||
9 | rm -f ${D}/etc/init.d/xencommons | ||
10 | rm -f ${D}/etc/init.d/xendriverdomain | ||
11 | rm -f ${D}/etc/init.d/xen-watchdog | ||
12 | fi | ||
13 | } | ||
14 | |||
15 | # If we're in a hybrid configuration, we want to stop the system from | ||
16 | # running any Xen sysvinit scripts | ||
17 | # This has a side effect of, on a hybrid system, if the init manager is | ||
18 | # sysvinit, the user will need to manually enable Xen. | ||
19 | INHIBIT_UPDATERCD_BBCLASS = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '', d)}" | ||
20 | |||
21 | FILES:${PN} += " \ | ||
22 | ${libdir}/xen/bin/init-dom0less \ | ||
23 | ${libdir}/xen/bin/get_overlay \ | ||
24 | ${libdir}/xen/bin/get_overlay.sh \ | ||
25 | " | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend new file mode 100644 index 00000000..86702979 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools_4.18.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | require xen-xilinx_4.18.inc | ||
2 | require xen-tools-xilinx.inc | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc new file mode 100644 index 00000000..7c573f73 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc | |||
@@ -0,0 +1,12 @@ | |||
1 | SRCREV = "a4754372819eb69acb658fc013ad35c4d55bf9a5" | ||
2 | XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" | ||
3 | XEN_BRANCH = "xlnx_rebase_4.18" | ||
4 | |||
5 | PV .= "-xilinx+git${SRCPV}" | ||
6 | |||
7 | DEFAULT_PREFERENCE = "+1" | ||
8 | |||
9 | SRC_URI = " \ | ||
10 | ${XEN_URI};branch=${XEN_BRANCH} \ | ||
11 | file://0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch \ | ||
12 | " | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend new file mode 100644 index 00000000..e2c75566 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen_4.18.bbappend | |||
@@ -0,0 +1,20 @@ | |||
1 | require xen-xilinx_4.18.inc | ||
2 | |||
3 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
4 | |||
5 | RDEPENDS:${PN}-efi += "bash python3" | ||
6 | |||
7 | do_deploy:append() { | ||
8 | # Mimic older behavior for compatibility | ||
9 | if [ -f ${DEPLOYDIR}/xen-${MACHINE} ]; then | ||
10 | ln -s xen-${MACHINE} ${DEPLOYDIR}/xen | ||
11 | fi | ||
12 | |||
13 | if [ -f ${DEPLOYDIR}/xen-${MACHINE}.gz ]; then | ||
14 | ln -s xen-${MACHINE}.gz ${DEPLOYDIR}/xen.gz | ||
15 | fi | ||
16 | |||
17 | if [ -f ${DEPLOYDIR}/xen-${MACHINE}.efi ]; then | ||
18 | ln -s xen-${MACHINE}.efi ${DEPLOYDIR}/xen.efi | ||
19 | fi | ||
20 | } | ||
diff --git a/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend new file mode 100644 index 00000000..298b1dc8 --- /dev/null +++ b/meta-xilinx-virtualization/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | # See meta-virtualization recipes-graphics/xorg-xserver/xserver-xorg_xen.inc | ||
2 | |||
3 | # We want the configuration to remain optimized, if a user wants the removal | ||
4 | # behavior, then they can set one of the below using 'glamor' as in the | ||
5 | # xserver-xorg_xen.inc file. | ||
6 | XEN_REMOVED_OPENGL_PKGCONFIGS:zynqmp ?= "" | ||
7 | XEN_REMOVED_OPENGL_PKGCONFIGS:versal ?= "" | ||
8 | |||