diff options
943 files changed, 37339 insertions, 13020 deletions
diff --git a/.gitmodules b/.gitmodules index 104587f3..5881b482 100644 --- a/.gitmodules +++ b/.gitmodules | |||
@@ -1,4 +1,4 @@ | |||
1 | [submodule "gen-machine-conf"] | 1 | [submodule "gen-machine-conf"] |
2 | path = meta-xilinx-core/gen-machine-conf | 2 | path = meta-xilinx-core/gen-machine-conf |
3 | url = https://github.com/Xilinx/gen-machine-conf.git | 3 | url = https://github.com/Xilinx/gen-machine-conf.git |
4 | branch = xlnx_rel_v2024.1 | 4 | branch = xlnx_rel_v2024.2 |
diff --git a/MAINTAINERS.md b/MAINTAINERS.md index d9067769..7e842dc4 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md | |||
@@ -8,10 +8,10 @@ the [meta-xilinx mailing list](https://lists.yoctoproject.org/g/meta-xilinx): | |||
8 | When sending patches, please make sure the email subject line includes | 8 | When sending patches, please make sure the email subject line includes |
9 | `[meta-xilinx][<BRANCH_NAME>][PATCH]` and cc'ing the maintainers. | 9 | `[meta-xilinx][<BRANCH_NAME>][PATCH]` and cc'ing the maintainers. |
10 | 10 | ||
11 | For more details follow the OE community patch submission guidelines, as described in: | 11 | For more details follow the Yocto Project community patch submission guidelines, |
12 | as described in: | ||
12 | 13 | ||
13 | https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines | 14 | https://docs.yoctoproject.org/dev/contributor-guide/submit-changes.html# |
14 | https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded | ||
15 | 15 | ||
16 | `git send-email --to meta-xilinx@lists.yoctoproject.org *.patch` | 16 | `git send-email --to meta-xilinx@lists.yoctoproject.org *.patch` |
17 | 17 | ||
@@ -24,13 +24,14 @@ https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded | |||
24 | `git format-patch -s --subject-prefix="meta-xilinx][<BRANCH_NAME>][PATCH" -1` | 24 | `git format-patch -s --subject-prefix="meta-xilinx][<BRANCH_NAME>][PATCH" -1` |
25 | 25 | ||
26 | **Example:** | 26 | **Example:** |
27 | `git format-patch -s --subject-prefix="meta-xilinx][langdale][PATCH" -1` | 27 | `git format-patch -s --subject-prefix="meta-xilinx][scarthgap][PATCH" -1` |
28 | 28 | ||
29 | **Maintainers:** | 29 | **Maintainers:** |
30 | 30 | ||
31 | Mark Hatle <mark.hatle@amd.com> | 31 | Mark Hatle <mark.hatle@amd.com> |
32 | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> | 32 | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> |
33 | John Toomey <john.toomey@amd.com> | 33 | John Toomey <john.toomey@amd.com> |
34 | Trevor Woerner <trevor.woerner@amd.com> | ||
34 | 35 | ||
35 | > **Note:** | 36 | > **Note:** |
36 | 37 | ||
@@ -43,3 +44,4 @@ https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded | |||
43 | Mark Hatle <mark.hatle@xilinx.com> | 44 | Mark Hatle <mark.hatle@xilinx.com> |
44 | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@xilinx.com> | 45 | Sandeep Gundlupet Raju <sandeep.gundlupet-raju@xilinx.com> |
45 | John Toomey <john.toomey@xilinx.com> | 46 | John Toomey <john.toomey@xilinx.com> |
47 | Trevor Woerner <trevor.woerner@amd.com> | ||
diff --git a/README.building.md b/README.building.md index 456aa634..7cbeb262 100644 --- a/README.building.md +++ b/README.building.md | |||
@@ -6,25 +6,34 @@ layers. | |||
6 | The following instructions require OE-Core meta and BitBake. Poky provides these | 6 | The following instructions require OE-Core meta and BitBake. Poky provides these |
7 | components, however they can be acquired separately. | 7 | components, however they can be acquired separately. |
8 | 8 | ||
9 | > **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/4.1.2/singleindex.html#preparing-the-build-host) documentation. | 9 | > **Pre-requisites:** Refer [Preparing Build Host](https://docs.yoctoproject.org/5.0.4/singleindex.html#preparing-the-build-host) documentation. |
10 | 10 | ||
11 | 1. Create a project directory. | 11 | 1. Create a project directory. |
12 | ``` | 12 | ``` |
13 | $ mkdir sources | 13 | $ mkdir sources |
14 | $ cd sources | 14 | $ cd sources |
15 | ``` | 15 | ``` |
16 | 2. Clone the poky, openembedded and amd xilinx repository. | 16 | |
17 | 2. Clone the poky, openembedded and AMD repository. | ||
17 | > **Note:** | 18 | > **Note:** |
18 | > * *release_branch:* refers to upstream stable release branch. | 19 | > * *release_branch:* refers to upstream stable release branch. |
19 | > * *rel-version:* refers to amd xilinx release version. | 20 | > * *rel-version:* refers to AMD release version. |
21 | > * *README:* By default README file link will be pointing to master branch so make | ||
22 | > sure to checkout the release_branch or rel-version branch. | ||
23 | > * *Upstream Pending Patches:* It is intended to resync Scarthgap (upstream) for | ||
24 | > both meta-virtualization and meta-openamp, but currently there are some patches | ||
25 | > in there that have not yet been accepted by upstream. So using the fork from | ||
26 | > https://github.com/Xilinx is recommended. | ||
20 | 27 | ||
21 | ``` | 28 | ``` |
22 | $ mkdir sources | 29 | $ mkdir sources |
23 | $ git clone -b <release-branch> https://git.yoctoproject.org/poky.git | 30 | $ git clone -b <release-branch> https://git.yoctoproject.org/poky |
24 | $ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded.git | 31 | $ git clone -b <release-branch> https://git.openembedded.org/meta-openembedded |
25 | $ git clone -b <release-branch> https://git.yoctoproject.org/git/meta-virtualization | 32 | $ git clone -b <release-branch> https://git.yoctoproject.org/meta-virtualization |
26 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx.git --recurse-submodules | 33 | $ git clone -b <release-branch> https://git.yoctoproject.org/meta-arm |
27 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git | 34 | $ git clone -b <release-branch> https://github.com/OpenAMP/meta-openamp |
35 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx --recurse-submodules | ||
36 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools | ||
28 | ``` | 37 | ``` |
29 | > **Note:** | 38 | > **Note:** |
30 | > * When meta-xilinx layer is cloned using git tool by default it will clone | 39 | > * When meta-xilinx layer is cloned using git tool by default it will clone |
@@ -37,6 +46,7 @@ $ git clone -b <rel-version> https://github.com/Xilinx/meta-xilinx-tools.git | |||
37 | ``` | 46 | ``` |
38 | $ source poky/oe-init-build-env | 47 | $ source poky/oe-init-build-env |
39 | ``` | 48 | ``` |
49 | |||
40 | 4. Once initialized configure `bblayers.conf` by adding dependency layers as shown | 50 | 4. Once initialized configure `bblayers.conf` by adding dependency layers as shown |
41 | below using `bitbake-layers` command. | 51 | below using `bitbake-layers` command. |
42 | > **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf | 52 | > **Note:** From step 3 by default `meta-yocto-bsp` will be included in bblayers.conf |
@@ -46,29 +56,34 @@ $ source poky/oe-init-build-env | |||
46 | ``` | 56 | ``` |
47 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe | 57 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-oe |
48 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python | 58 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-python |
49 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems | ||
50 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking | 59 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-networking |
60 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openembedded/meta-filesystems | ||
51 | $ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization | 61 | $ bitbake-layers add-layer ./<path-to-layer>/meta-virtualization |
62 | $ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm-toolchain | ||
63 | $ bitbake-layers add-layer ./<path-to-layer>/meta-arm/meta-arm | ||
64 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openamp | ||
52 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze | 65 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-microblaze |
53 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core | 66 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-core |
54 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone | 67 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone |
68 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-sdt | ||
55 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp | 69 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-bsp |
56 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-vendor | ||
57 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-contrib | ||
58 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools | 70 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-tools |
59 | ``` | 71 | ``` |
60 | > **Note:** We recommend using meta-xilinx-tools, the version that is built as | 72 | > **Note:** |
61 | > standalone may not work on many boards as it does not know the board configuration. | 73 | > 1. For SDT build flow user can remove meta-xilinx-tools as this layer is |
62 | 74 | > optional. | |
63 | 5. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf | 75 | > 2. If user wants to build machine files supported by meta-xilinx-vendor or |
64 | file for a specific target which can boot and run the in the board or QEMU. | 76 | > met-xilinx-contrib layer then include these layer running following commands. |
65 | ``` | 77 | ``` |
66 | MACHINE = "<target_machine_name>" | 78 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-vendor |
79 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx-contrib | ||
67 | ``` | 80 | ``` |
68 | * For list of available target machines see meta layer README files. | ||
69 | 81 | ||
70 | * [meta-xilinx-bsp README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) | 82 | 5. Create a new layer to for SDT or XSCT machine files geneated using gen-machineconf |
71 | * [meta-kria README](https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-bsp#amd-xilinx-evaluation-boards-bsp-machines-files) | 83 | tool. If user already has a custom-bsp layer then you can skip this step. |
84 | ``` | ||
85 | $ bitbake-layers create-layer --add-layer --layerid <layerid> <layername> | ||
86 | ``` | ||
72 | 87 | ||
73 | 6. For NFS build host system modify the build/conf/local.conf and add TMPDIR | 88 | 6. For NFS build host system modify the build/conf/local.conf and add TMPDIR |
74 | path as shown below. On local storage $TMPDIR will be set to build/tmp | 89 | path as shown below. On local storage $TMPDIR will be set to build/tmp |
@@ -76,36 +91,104 @@ MACHINE = "<target_machine_name>" | |||
76 | TMPDIR = "/tmp/$USER/yocto/release_version/build" | 91 | TMPDIR = "/tmp/$USER/yocto/release_version/build" |
77 | ``` | 92 | ``` |
78 | 93 | ||
79 | 7. Modify the build/conf/local.conf file to add wic image to default target | 94 | 7. Follow generating SDT or XSCT machine configuration file instructions using |
95 | gen-machineconf tool. SDT or XSCT machine files are generated using sdtgen | ||
96 | output or xsa. | ||
97 | * [SDT](https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-standalone-sdt/README.sdt.bsp.md) | ||
98 | * [XSCT](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md) | ||
99 | |||
100 | 8. Set hardware `MACHINE` configuration variable in <proj-dir>/build/conf/local.conf | ||
101 | file for a specific target which can boot and run the in the board or QEMU. | ||
102 | ``` | ||
103 | MACHINE = "<target_machine_name>" | ||
104 | ``` | ||
105 | * For list of available pre-built target machines see meta layer README files. | ||
106 | |||
107 | * [meta-amd-adaptive-socs-bsp README](https://github.com/Xilinx/meta-amd-adaptive-socs/blob/master/meta-amd-adaptive-socs-bsp/README.asoc.bsp.md) | ||
108 | * [meta-xilinx-tools README](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md) | ||
109 | * [meta-kria README](https://github.com/Xilinx/meta-kria/blob/master/README.kria.bsp.md) | ||
110 | |||
111 | 9. Once machine files are generated in <conf-directory>/machine/<soc-family>-<board-name>-<sdt-or-xsct>-<design-name>.conf, | ||
112 | include the QEMU DT files, See [QEMU Configurations](#qemu-configurations) | ||
113 | section for more details. This step can be skipped if you are using pre-built | ||
114 | target machines files. | ||
115 | |||
116 | 10. Modify the build/conf/local.conf file to add wic image to default target | ||
80 | image as shown below. | 117 | image as shown below. |
81 | ``` | 118 | ``` |
82 | IMAGE_FSTYPES += "wic" | 119 | IMAGE_FSTYPES += "wic" |
83 | WKS_FILES = "xilinx-default-sd.wks" | 120 | WKS_FILES = "xilinx-default-sd.wks" |
84 | ``` | 121 | ``` |
85 | 122 | ||
86 | 8. Build the qemu-helper-native package to setup QEMU network tap devices. | 123 | 11. Build the qemu-helper-native package to setup QEMU network tap devices. |
87 | ``` | 124 | ``` |
88 | $ bitbake qemu-helper-native | 125 | $ bitbake qemu-helper-native |
89 | ``` | 126 | ``` |
90 | 127 | ||
91 | 9. Manually configure a tap interface for your build system. As root run | 128 | 12. Manually configure a tap interface for your build system. As root run |
92 | <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a | 129 | <path-to>/sources/poky/scripts/runqemu-gen-tapdevs, which should generate a |
93 | list of tap devices. Once tap interfaces are successfully create you should | 130 | list of tap devices. Once tap interfaces are successfully create you should |
94 | be able to see all the interfaces by running ifconfig command. | 131 | be able to see all the interfaces by running ifconfig command. |
95 | 132 | ||
96 | ``` | 133 | ``` |
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 | 134 | $ sudo ./<path-to-layer>/poky/scripts/runqemu-gen-tapdevs $(id -g $USER) 4 |
98 | ``` | 135 | ``` |
99 | 136 | ||
100 | 10. Build an OS image for the target using `bitbake` command. | 137 | 13. Build an OS image for the target using `bitbake` command. |
101 | > **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt | 138 | > **Note:** Refer ./<path-to-distro-layer>/conf/templates/default/conf-notes.txt |
102 | > for available target image-name. e.g. core-image-minimal or petalinux-image-minimal | 139 | > for available target image-name. e.g. core-image-minimal or petalinux-image-minimal |
103 | |||
104 | ``` | 140 | ``` |
105 | $ bitbake <target-image> | 141 | $ bitbake <target-image> |
106 | ``` | 142 | ``` |
107 | 143 | ||
108 | 7. Once complete the images for the target machine will be available in the output | 144 | 14. Once complete the images for the target machine will be available in the output |
109 | directory `${TMPDIR}/deploy/images/${MACHINE}/`. | 145 | directory `${TMPDIR}/deploy/images/${MACHINE}/`. |
110 | 146 | ||
111 | 8. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md) | 147 | 15. Follow [Booting Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.booting.md) |
148 | |||
149 | ## QEMU Configurations | ||
150 | |||
151 | This section describes the QEMU settings which must be added to the generated | ||
152 | machine configuration file in order to use the runqemu command. The following | ||
153 | board settings need to be added in sdt or xsct machine configuration file to | ||
154 | define which QEMU device trees should be used. | ||
155 | |||
156 | > **Variable usage examples:** | ||
157 | > | ||
158 | > QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"` | ||
159 | > | ||
160 | > QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"` | ||
161 | > | ||
162 | > QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"` | ||
163 | > | ||
164 | > QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"` | ||
165 | > | ||
166 | > QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are | ||
167 | > different, Hence we need to adjust the same in QB_MEM to match board dtsi files. | ||
168 | > Below are some examples. | ||
169 | > * ZynqMP `QB_MEM = "-m 4096"` | ||
170 | > * Versal VEK280 `QB_MEM = "-m 12G"` | ||
171 | |||
172 | > **Note:** QEMU_HW_DTB_PS files are based on eval board schematics. If you are | ||
173 | > using a custom board then user has to create a QEMU_HW_DTB_PS to match their | ||
174 | > custom boards. Refer https://github.com/Xilinx/qemu-devicetrees/blob/master/board-versal-ps-vek280.dts | ||
175 | > as an example. | ||
176 | |||
177 | | Devices | Evaluation Board | QEMU PMC or PMU DTB file | QEMU PS DTB file | QB Mem | | ||
178 | |---------|-------------------------------------------------------------------------------|-----------------------------|-------------------------------|--------| | ||
179 | | ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
180 | | | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
181 | | | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
182 | | | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
183 | | | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
184 | | | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
185 | | | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | `zynqmp-pmu.dtb` | `zcu102-arm.dtb` | 4096 | | ||
186 | | Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vck190.dtb` | 8G | | ||
187 | | | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vmk180.dtb` | 8G | | ||
188 | | | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk120.dtb` | 8G | | ||
189 | | | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vpk180.dtb` | 8G | | ||
190 | | | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vek280.dtb` | 12G | | ||
191 | | | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | `board-versal-pmc-virt.dtb` | `board-versal-ps-vhk158.dtb` | 32G | | ||
192 | |||
193 | > **Note:** Additional information on AMD Adaptive SoC's and FPGA's can be found at: | ||
194 | https://www.amd.com/en/products/adaptive-socs-and-fpgas.html | ||
@@ -19,7 +19,7 @@ components, kernel etc. | |||
19 | * **meta-xilinx-standalone**: layer containing the AMD Xilinx Baremetal or | 19 | * **meta-xilinx-standalone**: layer containing the AMD Xilinx Baremetal or |
20 | Standalone Toolchains metadata to build baremetal firmware and applications. | 20 | Standalone Toolchains metadata to build baremetal firmware and applications. |
21 | 21 | ||
22 | * **meta-xilinx-standalone-experimental**: layer containing metadata to build | 22 | * **meta-xilinx-standalone-sdt**: layer containing metadata to build |
23 | all the boot images using lopper and system device tree without using the | 23 | all the boot images using lopper and system device tree without using the |
24 | meta-xilinx-tools layer. | 24 | meta-xilinx-tools layer. |
25 | 25 | ||
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md index 91c0eda9..21bd1dad 100644 --- a/docs/README.booting.microblaze.md +++ b/docs/README.booting.microblaze.md | |||
@@ -2,18 +2,20 @@ | |||
2 | 2 | ||
3 | Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes. | 3 | Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes. |
4 | 4 | ||
5 | * [Setting Up the Target](#setting-up-the-target) | 5 | - [Booting OS Images on MicroBlaze target boards](#booting-os-images-on-microblaze-target-boards) |
6 | * [Booting from JTAG](#booting-from-jtag) | 6 | - [Setting Up the Target](#setting-up-the-target) |
7 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) | 7 | - [Booting from JTAG](#booting-from-jtag) |
8 | * [Deploying the images to target](#deploying-the-images-to-target) | 8 | - [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) | 9 | - [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) | 10 | - [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb) | 11 | - [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) | 12 | - [Loading Bitstream using XSDB](#loading-bitstream-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) | 13 | - [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) |
14 | * [Using XSDB](#using-xsdb) | 14 | - [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) |
15 | * [Using TFTP](#using-tftp) | 15 | - [Using XSDB](#using-xsdb) |
16 | * [Booting Linux](#booting-linux) | 16 | - [Using TFTP](#using-tftp) |
17 | - [Booting Linux](#booting-linux) | ||
18 | - [Limitation](#limitation) | ||
17 | 19 | ||
18 | ## Setting Up the Target | 20 | ## Setting Up the Target |
19 | 21 | ||
@@ -195,3 +197,27 @@ xsdb% exit | |||
195 | ``` | 197 | ``` |
196 | U-Boot> boot | 198 | U-Boot> boot |
197 | ``` | 199 | ``` |
200 | |||
201 | ## Limitation | ||
202 | |||
203 | 1. Booting core-image-minimal or other image target excluding | ||
204 | petalinux-image-minimal you can observe below error message. | ||
205 | |||
206 | ``` | ||
207 | Error: argument "/en*" is wrong: "dev" not a valid ifname | ||
208 | Starting syslogd/klogd: done | ||
209 | |||
210 | Poky (Yocto Project Reference Distro) 5.0.2 kcu105-microblazeel ttyUL0 | ||
211 | |||
212 | INIT: Id "1" respawning too fast: disabled for 5 minutes | ||
213 | |||
214 | kcu105-microblazeel login: | ||
215 | ``` | ||
216 | |||
217 | This is due to pni-names distro feature is not enabled by default and eudev uses | ||
218 | classic network interface naming scheme. To resolve this issue add pni-names | ||
219 | distro feature from <distro>.conf or local.file. | ||
220 | |||
221 | ``` | ||
222 | DISTRO_FEATURES:append:microblaze = " pni-names" | ||
223 | ``` \ No newline at end of file | ||
diff --git a/docs/README.booting.zynq.md b/docs/README.booting.zynq.md index 28aad78f..660cc64f 100644 --- a/docs/README.booting.zynq.md +++ b/docs/README.booting.zynq.md | |||
@@ -3,19 +3,21 @@ | |||
3 | Booting OS images on Zynq boards can be done using JTAG, SD, eMMC, QSPI and NAND | 3 | Booting OS images on Zynq boards can be done using JTAG, SD, eMMC, QSPI and NAND |
4 | boot modes. | 4 | boot modes. |
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | - [Booting OS Images on Zynq target boards](#booting-os-images-on-zynq-target-boards) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | - [Setting Up the Target](#setting-up-the-target) |
8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) | 8 | - [Booting from JTAG](#booting-from-jtag) |
9 | * [Deploying the images to target](#deploying-the-images-to-target) | 9 | - [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) | 10 | - [Deploying the images to target](#deploying-the-images-to-target) |
11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) | 11 | - [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
12 | * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) | 12 | - [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 13 | - [Loading boot components using XSDB](#loading-boot-components-using-xsdb) |
14 | * [Using XSDB](#using-xsdb) | 14 | - [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) |
15 | * [Using TFTP](#using-tftp) | 15 | - [Using XSDB](#using-xsdb) |
16 | * [Booting Linux](#booting-linux) | 16 | - [Using TFTP](#using-tftp) |
17 | * [Booting from SD](#booting-from-sd) | 17 | - [Booting Linux](#booting-linux) |
18 | * [Booting from QSPI](#booting-from-qspi) | 18 | - [Booting from SD](#booting-from-sd) |
19 | - [Booting from QSPI](#booting-from-qspi) | ||
20 | - [Limitation](#limitation) | ||
19 | 21 | ||
20 | ## Setting Up the Target | 22 | ## Setting Up the Target |
21 | 1. Connect a USB cable between the CP210x USB-to-UART bridge USB Mini-B on | 23 | 1. Connect a USB cable between the CP210x USB-to-UART bridge USB Mini-B on |
@@ -214,7 +216,7 @@ U-Boot> boot | |||
214 | --- | 216 | --- |
215 | ## Booting from QSPI | 217 | ## Booting from QSPI |
216 | 218 | ||
217 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot | 219 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZC702 board and boot |
218 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 220 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
219 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` | 221 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
220 | command. | 222 | command. |
@@ -222,3 +224,25 @@ U-Boot> boot | |||
222 | 3. After flashing the images, turn off the power switch on the board, and change | 224 | 3. After flashing the images, turn off the power switch on the board, and change |
223 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) | 225 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) |
224 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). | 226 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). |
227 | |||
228 | ## Limitation | ||
229 | |||
230 | 1. Booting core-image-minimal or other image target excluding | ||
231 | petalinux-image-minimal you can observe below error message. | ||
232 | |||
233 | ``` | ||
234 | Error: argument "/en*" is wrong: "dev" not a valid ifname | ||
235 | Starting syslogd/klogd: done | ||
236 | |||
237 | Poky (Yocto Project Reference Distro) 5.0.2 zc702-zynq7 ttyPS0 | ||
238 | |||
239 | zc702-zynq7 login: | ||
240 | ``` | ||
241 | |||
242 | This is due to pni-names distro feature is not enabled by default and eudev uses | ||
243 | classic network interface naming scheme. To resolve this issue add pni-names | ||
244 | distro feature from <distro>.conf or local.file. | ||
245 | |||
246 | ``` | ||
247 | DISTRO_FEATURES:append:zynq = " pni-names" | ||
248 | ``` | ||
diff --git a/docs/README.dfx.user.dts.md b/docs/README.dfx.user.dts.md index 9caf866e..09e68be5 100644 --- a/docs/README.dfx.user.dts.md +++ b/docs/README.dfx.user.dts.md | |||
@@ -283,7 +283,7 @@ SRC_URI = " \ | |||
283 | 283 | ||
284 | 1. Follow SDT or XSCT Build instructions whichever build method is used but not | 284 | 1. Follow SDT or XSCT Build instructions whichever build method is used but not |
285 | both. | 285 | both. |
286 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md) upto step 4. | 286 | a. [SDT Building Instructions](../meta-xilinx-standalone-sdt/README.md) upto step 4. |
287 | b. [XSCT Building Instructions](../README.building.md) | 287 | b. [XSCT Building Instructions](../README.building.md) |
288 | upto step 4.b (With SDT overlay). | 288 | upto step 4.b (With SDT overlay). |
289 | 2. Create recipes-firmware directory in meta layer and copy the .bit/bin/pdi, | 289 | 2. Create recipes-firmware directory in meta layer and copy the .bit/bin/pdi, |
@@ -326,7 +326,7 @@ IMAGE_INSTALL:append = " \ | |||
326 | ``` | 326 | ``` |
327 | 6. Follow SDT or XSCT Build instructions whichever build method is used but not | 327 | 6. Follow SDT or XSCT Build instructions whichever build method is used but not |
328 | both. | 328 | both. |
329 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from step 5. | 329 | a. [SDT Building Instructions](../meta-xilinx-standalone-sdt/README.md ) and continue from step 5. |
330 | b. [XSCT Building Instructions](../README.building.md) | 330 | b. [XSCT Building Instructions](../README.building.md) |
331 | and continue from step 5. | 331 | and continue from step 5. |
332 | 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. |
diff --git a/docs/README.fw.package.md b/docs/README.fw.package.md index a7e54402..696687d6 100644 --- a/docs/README.fw.package.md +++ b/docs/README.fw.package.md | |||
@@ -1,4 +1,4 @@ | |||
1 | # How to package and depoly firmware elf or bin to linux root filesystem | 1 | # How to package and deploy firmware elf or bin to linux root filesystem |
2 | 2 | ||
3 | * [Introduction](#introduction) | 3 | * [Introduction](#introduction) |
4 | * [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe) | 4 | * [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe) |
@@ -14,16 +14,19 @@ filesystem. | |||
14 | 14 | ||
15 | ## How to create and install firmware package recipe | 15 | ## How to create and install firmware package recipe |
16 | 16 | ||
17 | 1. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) upto step 4. | 17 | 1. Follow [SDT Mulitconfig Building Instructions](../meta-xilinx-standalone-sdt/README.sdt.mc.build.md) |
18 | upto step 3. | ||
18 | 19 | ||
19 | 2. Create recipes-firmware directory in distribution meta layer. | 20 | 2. Create recipes-firmware directory in distribution meta layer. |
20 | ``` | 21 | ``` |
21 | $ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/ | 22 | $ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/ |
22 | ``` | 23 | ``` |
24 | |||
23 | 3. Now create the recipes firmware package using recipetool. | 25 | 3. Now create the recipes firmware package using recipetool. |
24 | ``` | 26 | ``` |
25 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb | 27 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb |
26 | ``` | 28 | ``` |
29 | |||
27 | 4. Modify the recipe and inherit fw-package bbclass as shown below. | 30 | 4. Modify the recipe and inherit fw-package bbclass as shown below. |
28 | 31 | ||
29 | > **Note:** | 32 | > **Note:** |
@@ -33,9 +36,9 @@ $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/fir | |||
33 | > * **FW_NAME:** Variable to define firmware baremetal or freertos application | 36 | > * **FW_NAME:** Variable to define firmware baremetal or freertos application |
34 | > recipe name. | 37 | > recipe name. |
35 | > * **TARGET_MC:** Variable to define one of the multiconfig target name | 38 | > * **TARGET_MC:** Variable to define one of the multiconfig target name |
36 | > (ex: cortexr5-0-zynqmp-baremetal) from the BBMULTICONFIG list | 39 | > (ex: <soc-family>-<board-name>-sdt-<design-name>-cortexr5-0-baremetal) |
37 | > generated at [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) | 40 | > from the BBMULTICONFIG list generated at [SDT Mulitconfig Building Instructions](../meta-xilinx-standalone-sdt/README.sdt.mc.build.md) |
38 | > step 4. | 41 | > step 2. |
39 | 42 | ||
40 | ``` | 43 | ``` |
41 | SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" | 44 | SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" |
@@ -45,7 +48,7 @@ inherit fw-package | |||
45 | 48 | ||
46 | FW_NAME = "hello-world" | 49 | FW_NAME = "hello-world" |
47 | 50 | ||
48 | TARGET_MC = "cortexr5-0-zynqmp-baremetal" | 51 | TARGET_MC = "<soc-family>-<board-name>-sdt-<design-name>-cortexr5-0-baremetal" |
49 | 52 | ||
50 | FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy" | 53 | FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy" |
51 | FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}" | 54 | FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}" |
@@ -57,5 +60,5 @@ IMAGE_INSTALL:append = " \ | |||
57 | firmware-package-name \ | 60 | firmware-package-name \ |
58 | " | 61 | " |
59 | ``` | 62 | ``` |
60 | 6. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from | 63 | 6. Follow [SDT Building Instructions](../meta-xilinx-standalone-sdt/README.sdt.bsp.md) and continue from |
61 | step 5. | 64 | step 5. |
diff --git a/meta-microblaze/README.md b/meta-microblaze/README.md index 9da3f813..262b2679 100644 --- a/meta-microblaze/README.md +++ b/meta-microblaze/README.md | |||
@@ -8,14 +8,18 @@ This layer depends on: | |||
8 | 8 | ||
9 | URI: https://git.yoctoproject.org/poky | 9 | URI: https://git.yoctoproject.org/poky |
10 | layers: meta, meta-poky | 10 | layers: meta, meta-poky |
11 | branch: langdale | 11 | branch: scarthgap |
12 | 12 | ||
13 | URI: https://git.openembedded.org/meta-openembedded | 13 | URI: https://git.openembedded.org/meta-openembedded |
14 | layers: meta-oe | 14 | layers: meta-oe |
15 | branch: langdale | 15 | branch: scarthgap |
16 | |||
17 | URI: https://git.yoctoproject.org/meta-arm | ||
18 | layers: meta-arm, meta-arm-toolchain | ||
19 | branch: scarthgap | ||
16 | 20 | ||
17 | URI: | 21 | URI: |
18 | https://git.yoctoproject.org/meta-xilinx (official version) | 22 | https://git.yoctoproject.org/meta-xilinx (official version) |
19 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 23 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
20 | layers: meta-xilinx-core | 24 | layers: meta-xilinx-core |
21 | branch: langdale or amd xilinx release version (e.g. rel-v2023.1) | 25 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-microblaze/conf/layer.conf b/meta-microblaze/conf/layer.conf index d1443c16..ea8a1e4b 100644 --- a/meta-microblaze/conf/layer.conf +++ b/meta-microblaze/conf/layer.conf | |||
@@ -20,14 +20,6 @@ OLDEST_KERNEL:microblaze = "3.15" | |||
20 | 20 | ||
21 | INHERIT += "rust_microblaze" | 21 | INHERIT += "rust_microblaze" |
22 | 22 | ||
23 | # We want to use gcc 12.x for the microblaze stuff, and 13.x for any host tooling | ||
24 | GCCVERSION:microblaze = "12.2.%" | ||
25 | SDKGCCVERSION:microblaze = "13.%" | ||
26 | |||
27 | GDBVERSION:microblaze = "12.1" | ||
28 | # canon-prefix-map doesn't exist in gcc 12.x | ||
29 | DEBUG_PREFIX_MAP:remove:microblaze = "-fcanon-prefix-map" | ||
30 | |||
31 | MICROBLAZE_SKIP_MSG = "" | 23 | MICROBLAZE_SKIP_MSG = "" |
32 | MICROBLAZE_SKIP_MSG:microblaze = "This recipe does not currently work on microblaze." | 24 | MICROBLAZE_SKIP_MSG:microblaze = "This recipe does not currently work on microblaze." |
33 | 25 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch b/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch deleted file mode 100644 index 31076208..00000000 --- a/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | From d3b09cb319fb1af1bcb83aa50d559ccccdeac639 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 23 Jan 2017 15:27:25 +0530 | ||
4 | Subject: [PATCH 01/11] [Patch, microblaze]: Add config/microblaze.mt for | ||
5 | target_makefile_frag Mirror MIPS method of creating copy of default.mt which | ||
6 | drops the compilation of generic sbrk.c to instead continue using the | ||
7 | microblaze provided version. | ||
8 | |||
9 | [Libgloss] | ||
10 | |||
11 | Changelog | ||
12 | |||
13 | 2013-07-15 David Holsgrove <david.holsgrove@xilinx.com> | ||
14 | |||
15 | * config/microblaze.mt: New file. | ||
16 | * microblaze/configure.in: Switch default.mt to microblaze.mt. | ||
17 | * microblaze/configure: Likewise. | ||
18 | |||
19 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
20 | |||
21 | Upstream-Status: Pending | ||
22 | |||
23 | --- | ||
24 | libgloss/config/microblaze.mt | 30 ++++++++++++++++++++++++++++++ | ||
25 | libgloss/microblaze/configure | 2 +- | ||
26 | libgloss/microblaze/configure.ac | 2 +- | ||
27 | 3 files changed, 32 insertions(+), 2 deletions(-) | ||
28 | create mode 100644 libgloss/config/microblaze.mt | ||
29 | |||
30 | Index: git/libgloss/config/microblaze.mt | ||
31 | =================================================================== | ||
32 | --- /dev/null | ||
33 | +++ git/libgloss/config/microblaze.mt | ||
34 | @@ -0,0 +1,30 @@ | ||
35 | +# | ||
36 | +# Match default.mt to compile generic objects but continue building | ||
37 | +# MicroBlaze specific sbrk.c | ||
38 | +# | ||
39 | +close.o: ${srcdir}/../close.c | ||
40 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
41 | +fstat.o: ${srcdir}/../fstat.c | ||
42 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
43 | +getpid.o: ${srcdir}/../getpid.c | ||
44 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
45 | +isatty.o: ${srcdir}/../isatty.c | ||
46 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
47 | +kill.o: ${srcdir}/../kill.c | ||
48 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
49 | +lseek.o: ${srcdir}/../lseek.c | ||
50 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
51 | +open.o: ${srcdir}/../open.c | ||
52 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
53 | +print.o: ${srcdir}/../print.c | ||
54 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
55 | +putnum.o: ${srcdir}/../putnum.c | ||
56 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
57 | +read.o: ${srcdir}/../read.c | ||
58 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
59 | +stat.o: ${srcdir}/../stat.c | ||
60 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
61 | +unlink.o: ${srcdir}/../unlink.c | ||
62 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
63 | +write.o: ${srcdir}/../write.c | ||
64 | + $(CC) $(CFLAGS_FOR_TARGET) -O2 $(INCLUDES) -c $(CFLAGS) $? | ||
65 | Index: git/libgloss/configure | ||
66 | =================================================================== | ||
67 | --- git.orig/libgloss/configure | ||
68 | +++ git/libgloss/configure | ||
69 | @@ -2909,6 +2909,7 @@ case "${target}" in | ||
70 | ac_config_files="$ac_config_files microblaze/Makefile" | ||
71 | |||
72 | subdirs="$subdirs microblaze" | ||
73 | + target_makefile_frag=${srcdir}/config/microblaze.mt | ||
74 | ;; | ||
75 | mt-*-*) | ||
76 | ac_config_files="$ac_config_files mt/Makefile" | ||
77 | Index: git/libgloss/configure.ac | ||
78 | =================================================================== | ||
79 | --- git.orig/libgloss/configure.ac | ||
80 | +++ git/libgloss/configure.ac | ||
81 | @@ -172,6 +172,7 @@ case "${target}" in | ||
82 | microblaze*-*-*) | ||
83 | AC_CONFIG_FILES([microblaze/Makefile]) | ||
84 | subdirs="$subdirs microblaze" | ||
85 | + target_makefile_frag=${srcdir}/config/microblaze.mt | ||
86 | ;; | ||
87 | mt-*-*) | ||
88 | AC_CONFIG_FILES([mt/Makefile]) | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0002-Patch-microblaze-Modified-_exceptional_handler.patch b/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Modified-_exceptional_handler.patch index 3c940329..6e0e2377 100644 --- a/meta-microblaze/recipes-core/newlib/files/0002-Patch-microblaze-Modified-_exceptional_handler.patch +++ b/meta-microblaze/recipes-core/newlib/files/0001-Patch-microblaze-Modified-_exceptional_handler.patch | |||
@@ -1,13 +1,12 @@ | |||
1 | From c96521b00af5259e1404c921cc6a22fbb16c1ace Mon Sep 17 00:00:00 2001 | 1 | From e2293e32df22089aa9a9fb3727aba4faa3774b7c Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 23 Jan 2017 15:30:02 +0530 | 3 | Date: Mon, 23 Jan 2017 15:30:02 +0530 |
4 | Subject: [PATCH 02/11] [Patch, microblaze]: Modified _exceptional_handler | 4 | Subject: [PATCH 01/11] [Patch, microblaze]: Modified _exceptional_handler |
5 | Modified the _exceptional_handler to support the changes made in GCC related | 5 | Modified the _exceptional_handler to support the changes made in GCC related |
6 | to Superviosry call | 6 | to Superviosry call |
7 | 7 | ||
8 | Signed-off-by:Nagaraju Mekala<nmekala@xilix.com> | 8 | Signed-off-by:Nagaraju Mekala<nmekala@xilix.com> |
9 | 9 | (cherry picked from commit c96521b00af5259e1404c921cc6a22fbb16c1ace) | |
10 | Upstream-Status: Pending | ||
11 | --- | 10 | --- |
12 | libgloss/microblaze/_exception_handler.S | 1 - | 11 | libgloss/microblaze/_exception_handler.S | 1 - |
13 | 1 file changed, 1 deletion(-) | 12 | 1 file changed, 1 deletion(-) |
@@ -23,5 +22,5 @@ index 59385ad9b..7a91a781e 100644 | |||
23 | - addi r11,r11,8 | 22 | - addi r11,r11,8 |
24 | bra r11 | 23 | bra r11 |
25 | -- | 24 | -- |
26 | 2.37.1 (Apple Git-137.1) | 25 | 2.34.1 |
27 | 26 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch b/meta-microblaze/recipes-core/newlib/files/0002-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch index 96b83269..74389b07 100644 --- a/meta-microblaze/recipes-core/newlib/files/0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch +++ b/meta-microblaze/recipes-core/newlib/files/0002-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch | |||
@@ -1,24 +1,24 @@ | |||
1 | From 765f715f4077780395d381bf25870b61008f8013 Mon Sep 17 00:00:00 2001 | 1 | From b7b5423f937e63dcb09dbd2d14566e82ff7adc67 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 23 Jan 2017 15:39:45 +0530 | 3 | Date: Mon, 23 Jan 2017 15:39:45 +0530 |
4 | Subject: [PATCH 03/11] [LOCAL]: Add missing declarations for xil_printf to | 4 | Subject: [PATCH 02/11] [LOCAL]: Add missing declarations for xil_printf to |
5 | stdio.h for inclusion in toolchain and use in c++ apps | 5 | stdio.h for inclusion in toolchain and use in c++ apps |
6 | 6 | ||
7 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 7 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Conflicts: | 9 | Conflicts: |
12 | newlib/libc/include/stdio.h | 10 | newlib/libc/include/stdio.h |
11 | |||
12 | (cherry picked from commit 765f715f4077780395d381bf25870b61008f8013) | ||
13 | --- | 13 | --- |
14 | newlib/libc/include/stdio.h | 3 +++ | 14 | newlib/libc/include/stdio.h | 3 +++ |
15 | 1 file changed, 3 insertions(+) | 15 | 1 file changed, 3 insertions(+) |
16 | 16 | ||
17 | diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h | 17 | diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h |
18 | index 7748351f0..fd95f1344 100644 | 18 | index 77966578d..fda52fdba 100644 |
19 | --- a/newlib/libc/include/stdio.h | 19 | --- a/newlib/libc/include/stdio.h |
20 | +++ b/newlib/libc/include/stdio.h | 20 | +++ b/newlib/libc/include/stdio.h |
21 | @@ -245,6 +245,9 @@ int sprintf (char *__restrict, const char *__restrict, ...) | 21 | @@ -251,6 +251,9 @@ int sprintf (char *__restrict, const char *__restrict, ...) |
22 | _ATTRIBUTE ((__format__ (__printf__, 2, 3))); | 22 | _ATTRIBUTE ((__format__ (__printf__, 2, 3))); |
23 | int remove (const char *); | 23 | int remove (const char *); |
24 | int rename (const char *, const char *); | 24 | int rename (const char *, const char *); |
@@ -29,5 +29,5 @@ index 7748351f0..fd95f1344 100644 | |||
29 | int _rename (const char *, const char *); | 29 | int _rename (const char *, const char *); |
30 | #endif | 30 | #endif |
31 | -- | 31 | -- |
32 | 2.37.1 (Apple Git-137.1) | 32 | 2.34.1 |
33 | 33 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0004-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch b/meta-microblaze/recipes-core/newlib/files/0003-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch index 6d398bdc..d3775f4e 100644 --- a/meta-microblaze/recipes-core/newlib/files/0004-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch +++ b/meta-microblaze/recipes-core/newlib/files/0003-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch | |||
@@ -1,11 +1,10 @@ | |||
1 | From edf132aae14fadd15630916781a14a29cafd37ef Mon Sep 17 00:00:00 2001 | 1 | From 471a4a4ee556af3274b6d3652cfd4f35801b9b57 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 23 Jan 2017 15:42:11 +0530 | 3 | Date: Mon, 23 Jan 2017 15:42:11 +0530 |
4 | Subject: [PATCH 04/11] [Local]: deleting the xil_printf.c file as now it part | 4 | Subject: [PATCH 03/11] [Local]: deleting the xil_printf.c file as now it part |
5 | of BSP | 5 | of BSP |
6 | 6 | ||
7 | Upstream-Status: Pending | 7 | (cherry picked from commit edf132aae14fadd15630916781a14a29cafd37ef) |
8 | |||
9 | --- | 8 | --- |
10 | libgloss/microblaze/xil_printf.c | 284 ------------------------------- | 9 | libgloss/microblaze/xil_printf.c | 284 ------------------------------- |
11 | 1 file changed, 284 deletions(-) | 10 | 1 file changed, 284 deletions(-) |
@@ -302,5 +301,5 @@ index f18ee8446..000000000 | |||
302 | - | 301 | - |
303 | -/*---------------------------------------------------*/ | 302 | -/*---------------------------------------------------*/ |
304 | -- | 303 | -- |
305 | 2.37.1 (Apple Git-137.1) | 304 | 2.34.1 |
306 | 305 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0005-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch b/meta-microblaze/recipes-core/newlib/files/0004-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch index 1576e54d..b441c320 100644 --- a/meta-microblaze/recipes-core/newlib/files/0005-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch +++ b/meta-microblaze/recipes-core/newlib/files/0004-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch | |||
@@ -1,19 +1,18 @@ | |||
1 | From 250aa479da0b688b87f1fa42f45ecd4536194a45 Mon Sep 17 00:00:00 2001 | 1 | From cff1abc10b20e8f9083ee7a5dc3ebfae431c430c Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 23 Jan 2017 15:44:17 +0530 | 3 | Date: Mon, 23 Jan 2017 15:44:17 +0530 |
4 | Subject: [PATCH 05/11] [Local]: deleting the xil_printf.o from MAKEFILE | 4 | Subject: [PATCH 04/11] [Local]: deleting the xil_printf.o from MAKEFILE |
5 | |||
6 | Upstream-Status: Pending | ||
7 | 5 | ||
6 | (cherry picked from commit 250aa479da0b688b87f1fa42f45ecd4536194a45) | ||
8 | --- | 7 | --- |
9 | libgloss/microblaze/Makefile.in | 2 +- | 8 | libgloss/microblaze/Makefile.in | 2 +- |
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
11 | 10 | ||
12 | diff --git a/libgloss/microblaze/Makefile.in b/libgloss/microblaze/Makefile.in | 11 | diff --git a/libgloss/microblaze/Makefile.in b/libgloss/microblaze/Makefile.in |
13 | index fe04a08c9..32aafda37 100644 | 12 | index f1fa286bb..6d369242d 100644 |
14 | --- a/libgloss/microblaze/Makefile.in | 13 | --- a/libgloss/microblaze/Makefile.in |
15 | +++ b/libgloss/microblaze/Makefile.in | 14 | +++ b/libgloss/microblaze/Makefile.in |
16 | @@ -81,7 +81,7 @@ GENOBJS = fstat.o getpid.o isatty.o kill.o lseek.o print.o putnum.o stat.o unlin | 15 | @@ -83,7 +83,7 @@ GENOBJS = fstat.o getpid.o isatty.o kill.o lseek.o print.o putnum.o stat.o unlin |
17 | open.o close.o read.o write.o | 16 | open.o close.o read.o write.o |
18 | OBJS = ${GENOBJS} sbrk.o timer.o _exception_handler.o _hw_exception_handler.o \ | 17 | OBJS = ${GENOBJS} sbrk.o timer.o _exception_handler.o _hw_exception_handler.o \ |
19 | _interrupt_handler.o _program_clean.o _program_init.o \ | 18 | _interrupt_handler.o _program_clean.o _program_init.o \ |
@@ -23,5 +22,5 @@ index fe04a08c9..32aafda37 100644 | |||
23 | 22 | ||
24 | # Tiny Linux BSP. | 23 | # Tiny Linux BSP. |
25 | -- | 24 | -- |
26 | 2.37.1 (Apple Git-137.1) | 25 | 2.34.1 |
27 | 26 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0006-MB-X-intial-commit.patch b/meta-microblaze/recipes-core/newlib/files/0005-MB-X-intial-commit.patch index 779580b6..3f113228 100644 --- a/meta-microblaze/recipes-core/newlib/files/0006-MB-X-intial-commit.patch +++ b/meta-microblaze/recipes-core/newlib/files/0005-MB-X-intial-commit.patch | |||
@@ -1,10 +1,9 @@ | |||
1 | From 97684eb81807189dbcdca560d086100ba8bfa906 Mon Sep 17 00:00:00 2001 | 1 | From 6c4a1e25108584fc472f42d58b14ee5f951080d9 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Fri, 27 Jul 2018 16:10:36 +0530 | 3 | Date: Fri, 27 Jul 2018 16:10:36 +0530 |
4 | Subject: [PATCH 06/11] MB-X intial commit | 4 | Subject: [PATCH 05/11] MB-X intial commit |
5 | |||
6 | Upstream-Status: Pending | ||
7 | 5 | ||
6 | (cherry picked from commit 97684eb81807189dbcdca560d086100ba8bfa906) | ||
8 | --- | 7 | --- |
9 | libgloss/microblaze/crt0.S | 2 +- | 8 | libgloss/microblaze/crt0.S | 2 +- |
10 | libgloss/microblaze/crt1.S | 2 +- | 9 | libgloss/microblaze/crt1.S | 2 +- |
@@ -192,5 +191,5 @@ index 434195e2c..3119d82c5 100644 | |||
192 | { | 191 | { |
193 | /* To get here, *a1 == *a2, thus if we find a null in *a1, | 192 | /* To get here, *a1 == *a2, thus if we find a null in *a1, |
194 | -- | 193 | -- |
195 | 2.37.1 (Apple Git-137.1) | 194 | 2.34.1 |
196 | 195 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0007-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch b/meta-microblaze/recipes-core/newlib/files/0006-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch index f3e20253..52a4319b 100644 --- a/meta-microblaze/recipes-core/newlib/files/0007-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch +++ b/meta-microblaze/recipes-core/newlib/files/0006-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch | |||
@@ -1,14 +1,14 @@ | |||
1 | From e7b0c93274c2f51adc7c20c24a28d3cd5974fddc Mon Sep 17 00:00:00 2001 | 1 | From 9fcd09b603d8deb2bbd3557aae6faba311dbdf12 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 11 Sep 2018 14:32:20 +0530 | 3 | Date: Tue, 11 Sep 2018 14:32:20 +0530 |
4 | Subject: [PATCH 07/11] [Patch, Microblaze]: newlib port for microblaze m64 | 4 | Subject: [PATCH 06/11] [Patch, Microblaze]: newlib port for microblaze m64 |
5 | flag... | 5 | flag... |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Conflicts: | 7 | Conflicts: |
10 | libgloss/microblaze/_hw_exception_handler.S | 8 | libgloss/microblaze/_hw_exception_handler.S |
11 | libgloss/microblaze/_interrupt_handler.S | 9 | libgloss/microblaze/_interrupt_handler.S |
10 | |||
11 | (cherry picked from commit e7b0c93274c2f51adc7c20c24a28d3cd5974fddc) | ||
12 | --- | 12 | --- |
13 | libgloss/microblaze/_exception_handler.S | 6 +- | 13 | libgloss/microblaze/_exception_handler.S | 6 +- |
14 | libgloss/microblaze/_hw_exception_handler.S | 7 +- | 14 | libgloss/microblaze/_hw_exception_handler.S | 7 +- |
@@ -1135,5 +1135,5 @@ index cdd87c76f..971862bcb 100644 | |||
1135 | +#endif | 1135 | +#endif |
1136 | .end setjmp | 1136 | .end setjmp |
1137 | -- | 1137 | -- |
1138 | 2.37.1 (Apple Git-137.1) | 1138 | 2.34.1 |
1139 | 1139 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0008-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch b/meta-microblaze/recipes-core/newlib/files/0007-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch index b82d7b5c..6e7b2e48 100644 --- a/meta-microblaze/recipes-core/newlib/files/0008-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch +++ b/meta-microblaze/recipes-core/newlib/files/0007-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch | |||
@@ -1,11 +1,10 @@ | |||
1 | From 924721fdb8eed60fe58c8a7976955bac02efc200 Mon Sep 17 00:00:00 2001 | 1 | From eb41f08c22949726576d001e27ec8be3531d947a Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Fri, 28 Sep 2018 12:07:43 +0530 | 3 | Date: Fri, 28 Sep 2018 12:07:43 +0530 |
4 | Subject: [PATCH 08/11] fixing the bug in crt files, added addlik instead of | 4 | Subject: [PATCH 07/11] fixing the bug in crt files, added addlik instead of |
5 | lli insn | 5 | lli insn |
6 | 6 | ||
7 | Upstream-Status: Pending | 7 | (cherry picked from commit 924721fdb8eed60fe58c8a7976955bac02efc200) |
8 | |||
9 | --- | 8 | --- |
10 | libgloss/microblaze/crt0.S | 6 +++--- | 9 | libgloss/microblaze/crt0.S | 6 +++--- |
11 | libgloss/microblaze/crt1.S | 6 +++--- | 10 | libgloss/microblaze/crt1.S | 6 +++--- |
@@ -100,5 +99,5 @@ index 54ba473ea..a25c84734 100644 | |||
100 | brealid r15, _crtinit /* Initialize BSS and run program */ | 99 | brealid r15, _crtinit /* Initialize BSS and run program */ |
101 | nop | 100 | nop |
102 | -- | 101 | -- |
103 | 2.37.1 (Apple Git-137.1) | 102 | 2.34.1 |
104 | 103 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0009-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch b/meta-microblaze/recipes-core/newlib/files/0008-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch index 1a89c31b..7eaf0a88 100644 --- a/meta-microblaze/recipes-core/newlib/files/0009-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch +++ b/meta-microblaze/recipes-core/newlib/files/0008-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch | |||
@@ -1,11 +1,10 @@ | |||
1 | From e7a5086bc3e38cf5bc5c5943de6cf5135ed6a77b Mon Sep 17 00:00:00 2001 | 1 | From 82e5a92af613455cb7aed4eee7da3d723e5f5011 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Nov 2020 13:06:41 +0530 | 3 | Date: Tue, 17 Nov 2020 13:06:41 +0530 |
4 | Subject: [PATCH 09/11] [Patch,MicroBlaze] : Added MB-64 support to | 4 | Subject: [PATCH 08/11] [Patch,MicroBlaze] : Added MB-64 support to |
5 | strcmp/strcpy/strlen files Signed-off-by:Mahesh Bodapati<mbodapat@xilinx.com> | 5 | strcmp/strcpy/strlen files Signed-off-by:Mahesh Bodapati<mbodapat@xilinx.com> |
6 | 6 | ||
7 | Upstream-Status: Pending | 7 | (cherry picked from commit e7a5086bc3e38cf5bc5c5943de6cf5135ed6a77b) |
8 | |||
9 | --- | 8 | --- |
10 | newlib/libc/machine/microblaze/strcmp.c | 63 ++++++++++++++++++++++++- | 9 | newlib/libc/machine/microblaze/strcmp.c | 63 ++++++++++++++++++++++++- |
11 | newlib/libc/machine/microblaze/strcpy.c | 57 ++++++++++++++++++++++ | 10 | newlib/libc/machine/microblaze/strcpy.c | 57 ++++++++++++++++++++++ |
@@ -228,5 +227,5 @@ index acb4464bc..b6f2d3c13 100644 | |||
228 | #endif /* ! HAVE_HW_PCMP */ | 227 | #endif /* ! HAVE_HW_PCMP */ |
229 | } | 228 | } |
230 | -- | 229 | -- |
231 | 2.37.1 (Apple Git-137.1) | 230 | 2.34.1 |
232 | 231 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0010-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch b/meta-microblaze/recipes-core/newlib/files/0009-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch index aaa2a009..2a3d8632 100644 --- a/meta-microblaze/recipes-core/newlib/files/0010-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch +++ b/meta-microblaze/recipes-core/newlib/files/0009-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch | |||
@@ -1,12 +1,12 @@ | |||
1 | From 6b8e5c7a773de4609f9c855aa714eca5a3f8b4ab Mon Sep 17 00:00:00 2001 | 1 | From 5a7955b68f5066b00413e751d1de967181c88b94 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 9 Nov 2021 22:53:44 +0530 | 3 | Date: Tue, 9 Nov 2021 22:53:44 +0530 |
4 | Subject: [PATCH 10/11] [Patch,MicroBlaze] : Removing the Assembly | 4 | Subject: [PATCH 09/11] [Patch,MicroBlaze] : Removing the Assembly |
5 | implementation of 64bit string function. | 5 | implementation of 64bit string function. |
6 | 6 | ||
7 | Revisit in next release and fix it | 7 | Revisit in next release and fix it |
8 | 8 | ||
9 | Upstream-Status: Pending | 9 | (cherry picked from commit 6b8e5c7a773de4609f9c855aa714eca5a3f8b4ab) |
10 | --- | 10 | --- |
11 | newlib/libc/machine/microblaze/mb_endian.h | 4 + | 11 | newlib/libc/machine/microblaze/mb_endian.h | 4 + |
12 | newlib/libc/machine/microblaze/strcmp.c | 95 ++++++++-------------- | 12 | newlib/libc/machine/microblaze/strcmp.c | 95 ++++++++-------------- |
@@ -337,5 +337,5 @@ index b6f2d3c13..940753996 100644 | |||
337 | #endif /* ! HAVE_HW_PCMP */ | 337 | #endif /* ! HAVE_HW_PCMP */ |
338 | } | 338 | } |
339 | -- | 339 | -- |
340 | 2.37.1 (Apple Git-137.1) | 340 | 2.34.1 |
341 | 341 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0011-Fixed-the-bug-in-crtinit.s-for-MB-64.patch b/meta-microblaze/recipes-core/newlib/files/0010-Fixed-the-bug-in-crtinit.s-for-MB-64.patch index 5e89db18..76b83372 100644 --- a/meta-microblaze/recipes-core/newlib/files/0011-Fixed-the-bug-in-crtinit.s-for-MB-64.patch +++ b/meta-microblaze/recipes-core/newlib/files/0010-Fixed-the-bug-in-crtinit.s-for-MB-64.patch | |||
@@ -1,10 +1,9 @@ | |||
1 | From bab2eafd2d4ca1f2caacd50120e8ac94aca1b7c4 Mon Sep 17 00:00:00 2001 | 1 | From 3790e623bec70441d7d34f9390760b611a968e9d Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju <nmekala@xilinx.com> | 2 | From: Nagaraju <nmekala@xilinx.com> |
3 | Date: Tue, 14 Jan 2020 22:32:30 +0530 | 3 | Date: Tue, 14 Jan 2020 22:32:30 +0530 |
4 | Subject: [PATCH 11/11] Fixed the bug in crtinit.s for MB-64 | 4 | Subject: [PATCH 10/11] Fixed the bug in crtinit.s for MB-64 |
5 | |||
6 | Upstream-Status: Pending | ||
7 | 5 | ||
6 | (cherry picked from commit bab2eafd2d4ca1f2caacd50120e8ac94aca1b7c4) | ||
8 | --- | 7 | --- |
9 | libgloss/microblaze/crtinit.S | 2 +- | 8 | libgloss/microblaze/crtinit.S | 2 +- |
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
@@ -23,5 +22,5 @@ index 854117536..f79140734 100644 | |||
23 | beagti r18, .Lloopsbss | 22 | beagti r18, .Lloopsbss |
24 | .Lendsbss: | 23 | .Lendsbss: |
25 | -- | 24 | -- |
26 | 2.37.1 (Apple Git-137.1) | 25 | 2.34.1 |
27 | 26 | ||
diff --git a/meta-microblaze/recipes-core/newlib/files/0011-Use-port-specific-sbrk.patch b/meta-microblaze/recipes-core/newlib/files/0011-Use-port-specific-sbrk.patch new file mode 100644 index 00000000..52df9e34 --- /dev/null +++ b/meta-microblaze/recipes-core/newlib/files/0011-Use-port-specific-sbrk.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From c7e7aea9c60f87096a38604a9d4738cf762669dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Aayush Misra <aayushm@amd.com> | ||
3 | Date: Fri, 26 Jul 2024 19:08:17 +0530 | ||
4 | Subject: [PATCH 11/11] Use port-specific sbrk | ||
5 | |||
6 | --- | ||
7 | libgloss/microblaze/Makefile.in | 1 + | ||
8 | 1 file changed, 1 insertion(+) | ||
9 | |||
10 | diff --git a/libgloss/microblaze/Makefile.in b/libgloss/microblaze/Makefile.in | ||
11 | index 6d369242d..d5206a849 100644 | ||
12 | --- a/libgloss/microblaze/Makefile.in | ||
13 | +++ b/libgloss/microblaze/Makefile.in | ||
14 | @@ -122,6 +122,7 @@ linux-crt0.o: linux-crt0.S | ||
15 | crtinit.o: crtinit.S | ||
16 | sim-crtinit.o: sim-crtinit.S | ||
17 | sim-pgcrtinit.o: sim-pgcrtinit.S | ||
18 | +sbrk.o: sbrk.c | ||
19 | |||
20 | # target specific makefile fragment comes in here. | ||
21 | @target_makefile_frag@ | ||
22 | -- | ||
23 | 2.34.1 | ||
24 | |||
diff --git a/meta-microblaze/recipes-core/newlib/libgloss-microblaze.inc b/meta-microblaze/recipes-core/newlib/libgloss-microblaze.inc new file mode 100644 index 00000000..5410286b --- /dev/null +++ b/meta-microblaze/recipes-core/newlib/libgloss-microblaze.inc | |||
@@ -0,0 +1,13 @@ | |||
1 | require microblaze-newlib.inc | ||
2 | |||
3 | do_configure:prepend() { | ||
4 | # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) | ||
5 | export CC="${CC} -L${S}/libgloss/microblaze" | ||
6 | } | ||
7 | |||
8 | # Libgloss provides various .o files in libdir | ||
9 | # These must NOT be stripped, but for some reason they are installed +x | ||
10 | # which triggers them to be stripped. | ||
11 | do_install:append() { | ||
12 | chmod 0644 ${D}${libdir}/*.o | ||
13 | } | ||
diff --git a/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend b/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend index 15be1732..0ebe2e13 100644 --- a/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend +++ b/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend | |||
@@ -1,13 +1,4 @@ | |||
1 | require microblaze-newlib.inc | 1 | MICROBLAZEPATCHES = "" |
2 | MICROBLAZEPATCHES:microblaze = "libgloss-microblaze.inc" | ||
2 | 3 | ||
3 | do_configure:prepend:microblaze() { | 4 | require ${MICROBLAZEPATCHES} |
4 | # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) | ||
5 | export CC="${CC} -L${S}/libgloss/microblaze" | ||
6 | } | ||
7 | |||
8 | # Libgloss provides various .o files in libdir | ||
9 | # These must NOT be stripped, but for some reason they are installed +x | ||
10 | # which triggers them to be stripped. | ||
11 | do_install:append:microblaze() { | ||
12 | chmod 0644 ${D}${libdir}/*.o | ||
13 | } | ||
diff --git a/meta-microblaze/recipes-core/newlib/microblaze-newlib.inc b/meta-microblaze/recipes-core/newlib/microblaze-newlib.inc index a1e3b92f..99d3d02e 100644 --- a/meta-microblaze/recipes-core/newlib/microblaze-newlib.inc +++ b/meta-microblaze/recipes-core/newlib/microblaze-newlib.inc | |||
@@ -1,19 +1,23 @@ | |||
1 | # Add MicroBlaze Patches | 1 | # Add MicroBlaze Patches |
2 | FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/files" | 2 | FILESEXTRAPATHS:append := ":${THISDIR}/files" |
3 | SRC_URI:append:microblaze = " \ | 3 | |
4 | file://0001-Patch-microblaze-Add-config-microblaze.mt-for-target.patch \ | 4 | # Our changes are all local, no real patch-status |
5 | file://0002-Patch-microblaze-Modified-_exceptional_handler.patch \ | 5 | ERROR_QA:remove = "patch-status" |
6 | file://0003-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch \ | 6 | |
7 | file://0004-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch \ | 7 | SRC_URI += " \ |
8 | file://0005-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch \ | 8 | file://0001-Patch-microblaze-Modified-_exceptional_handler.patch \ |
9 | file://0006-MB-X-intial-commit.patch \ | 9 | file://0002-LOCAL-Add-missing-declarations-for-xil_printf-to-std.patch \ |
10 | file://0007-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch \ | 10 | file://0003-Local-deleting-the-xil_printf.c-file-as-now-it-part-.patch \ |
11 | file://0008-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch \ | 11 | file://0004-Local-deleting-the-xil_printf.o-from-MAKEFILE.patch \ |
12 | file://0009-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch \ | 12 | file://0005-MB-X-intial-commit.patch \ |
13 | file://0010-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch \ | 13 | file://0006-Patch-Microblaze-newlib-port-for-microblaze-m64-flag.patch \ |
14 | file://0011-Fixed-the-bug-in-crtinit.s-for-MB-64.patch \ | 14 | file://0007-fixing-the-bug-in-crt-files-added-addlik-instead-of-.patch \ |
15 | file://0008-Patch-MicroBlaze-Added-MB-64-support-to-strcmp-strcp.patch \ | ||
16 | file://0009-Patch-MicroBlaze-Removing-the-Assembly-implementatio.patch \ | ||
17 | file://0010-Fixed-the-bug-in-crtinit.s-for-MB-64.patch \ | ||
18 | file://0011-Use-port-specific-sbrk.patch \ | ||
15 | " | 19 | " |
16 | 20 | ||
17 | EXTRA_OECONF:append:xilinx-standalone:microblaze = " \ | 21 | EXTRA_OECONF:append:xilinx-standalone = " \ |
18 | --disable-newlib-reent-check-verify \ | 22 | --disable-newlib-reent-check-verify \ |
19 | " | 23 | " |
diff --git a/meta-microblaze/recipes-core/newlib/newlib-microblaze.inc b/meta-microblaze/recipes-core/newlib/newlib-microblaze.inc new file mode 100644 index 00000000..116bfbf3 --- /dev/null +++ b/meta-microblaze/recipes-core/newlib/newlib-microblaze.inc | |||
@@ -0,0 +1,7 @@ | |||
1 | require microblaze-newlib.inc | ||
2 | |||
3 | do_configure:prepend() { | ||
4 | # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) | ||
5 | export CC="${CC} -L${S}/libgloss/microblaze" | ||
6 | } | ||
7 | |||
diff --git a/meta-microblaze/recipes-core/newlib/newlib_%.bbappend b/meta-microblaze/recipes-core/newlib/newlib_%.bbappend index d30e61ec..27bdee48 100644 --- a/meta-microblaze/recipes-core/newlib/newlib_%.bbappend +++ b/meta-microblaze/recipes-core/newlib/newlib_%.bbappend | |||
@@ -1,7 +1,4 @@ | |||
1 | require microblaze-newlib.inc | 1 | MICROBLAZEPATCHES = "" |
2 | 2 | MICROBLAZEPATCHES:microblaze = "newlib-microblaze.inc" | |
3 | do_configure:prepend:microblaze() { | ||
4 | # hack for microblaze, which needs xilinx.ld to literally do any linking (its hard coded in its LINK_SPEC) | ||
5 | export CC="${CC} -L${S}/libgloss/microblaze" | ||
6 | } | ||
7 | 3 | ||
4 | require ${MICROBLAZEPATCHES} | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc index 3701d245..014729a5 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc +++ b/meta-microblaze/recipes-devtools/binutils/binutils-microblaze.inc | |||
@@ -2,3 +2,62 @@ FILESEXTRAPATHS:append := ":${THISDIR}/binutils" | |||
2 | 2 | ||
3 | LDGOLD_ALTS:microblaze = "" | 3 | LDGOLD_ALTS:microblaze = "" |
4 | USE_ALTERNATIVES_FOR:remove:microblaze = "gprof" | 4 | USE_ALTERNATIVES_FOR:remove:microblaze = "gprof" |
5 | |||
6 | # Our changes are all local, no real patch-status | ||
7 | ERROR_QA:remove = "patch-status" | ||
8 | |||
9 | SRC_URI += " \ | ||
10 | file://0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch \ | ||
11 | file://0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch \ | ||
12 | file://0003-Initial-port-of-core-reading-support-Added-support-f.patch \ | ||
13 | file://0004-Fix-debug-message-when-register-is-unavailable.patch \ | ||
14 | file://0005-MicroBlaze-native-gdb-port.patch \ | ||
15 | file://0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch \ | ||
16 | file://0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch \ | ||
17 | file://0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch \ | ||
18 | file://0009-Depth-Total-number-of-inline-functions-refer-inline-.patch \ | ||
19 | file://0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch \ | ||
20 | file://0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch \ | ||
21 | file://0012-Add-mlittle-endian-and-mbig-endian-flags.patch \ | ||
22 | file://0013-Disable-the-warning-message-for-eh_frame_hdr.patch \ | ||
23 | file://0014-Fix-relaxation-of-assembler-resolved-references-Fixu.patch \ | ||
24 | file://0015-upstream-change-to-garbage-collection-sweep-causes-m.patch \ | ||
25 | file://0016-Add-new-bit-field-instructions.patch \ | ||
26 | file://0017-fixed-bug-in-GCC-so-that-It-will-support-.long-0U-an.patch \ | ||
27 | file://0018-Compiler-will-give-error-messages-in-more-detail-for.patch \ | ||
28 | file://0019-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
29 | file://0020-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
30 | file://0021-Added-relocations-for-MB-X.patch \ | ||
31 | file://0022-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
32 | file://0023-Added-relocations-for-MB-X.patch \ | ||
33 | file://0024-Fixed-MB-x-relocation-issues-Added-imml-for-required.patch \ | ||
34 | file://0025-Fixed-address-computation-issues-with-64bit-address-.patch \ | ||
35 | file://0026-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch \ | ||
36 | file://0027-Revert-ld-Remove-unused-expression-state-defsym-symb.patch \ | ||
37 | file://0028-fixing-the-long-long-long-mingw-toolchain-issue.patch \ | ||
38 | file://0029-Added-support-to-new-arithmetic-single-register-inst.patch \ | ||
39 | file://0030-double-imml-generation-for-64-bit-values.patch \ | ||
40 | file://0031-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch \ | ||
41 | file://0032-This-patch-will-remove-imml-0-and-imml-1-instruction.patch \ | ||
42 | file://0033-Changing-the-long-to-long-long-as-in-Windows-long-is.patch \ | ||
43 | file://0034-gas-revert-moving-of-md_pseudo_table-from-const.patch \ | ||
44 | file://0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch \ | ||
45 | file://0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch \ | ||
46 | file://0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch \ | ||
47 | file://0038-MB-binutils-Upstream-port-issues.patch \ | ||
48 | file://0039-Initial-port-of-core-reading-support-Added-support-f.patch \ | ||
49 | file://0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch \ | ||
50 | file://0041-disable-truncated-register-warning-gdb-remote.c.patch \ | ||
51 | file://0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch \ | ||
52 | file://0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch \ | ||
53 | file://0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch \ | ||
54 | file://0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch \ | ||
55 | file://0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch \ | ||
56 | file://0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch \ | ||
57 | file://0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch \ | ||
58 | file://0049-When-unwinding-pc-value-adjust-return-pc-value.patch \ | ||
59 | file://0050-info-reg-pc-does-not-print-symbolic-value.patch \ | ||
60 | file://0051-Wrong-target-description-accepted-by-microblaze-arch.patch \ | ||
61 | file://0052-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch \ | ||
62 | file://0053-Roll-back-an-improvement-which-inlines-target_gdbarc.patch \ | ||
63 | " | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch new file mode 100644 index 00000000..fd8a96c9 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From add4545f804219232f16f96e3a83af2fadf41463 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 15:07:22 +0530 | ||
4 | Subject: [PATCH 01/53] Add initial port of linux gdbserver add | ||
5 | gdb_proc_service_h to gdbserver microblaze-linux | ||
6 | |||
7 | gdbserver needs to initialise the microblaze registers | ||
8 | |||
9 | other archs use this step to run a *_arch_setup() to carry out all | ||
10 | architecture specific setup - may need to add in future | ||
11 | |||
12 | * add linux-ptrace.o to gdbserver configure | ||
13 | * Update breakpoint opcode | ||
14 | * fix segfault on connecting gdbserver | ||
15 | * add microblaze_linux_memory_remove_breakpoint | ||
16 | * add set_solib_svr4_fetch_link_map_offsets | ||
17 | * add set_gdbarch_fetch_tls_load_module_address | ||
18 | * Force reading of r0 as 0, prevent stores | ||
19 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
21 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
22 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gdbserver/Makefile.in | 1 + | ||
26 | 1 file changed, 1 insertion(+) | ||
27 | |||
28 | diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in | ||
29 | index d12f8746611..ee606908bae 100644 | ||
30 | --- a/gdbserver/Makefile.in | ||
31 | +++ b/gdbserver/Makefile.in | ||
32 | @@ -180,6 +180,7 @@ SFILES = \ | ||
33 | $(srcdir)/linux-loongarch-low.cc \ | ||
34 | $(srcdir)/linux-low.cc \ | ||
35 | $(srcdir)/linux-m68k-low.cc \ | ||
36 | + $(srcdir)/linux-microblaze-low.cc \ | ||
37 | $(srcdir)/linux-mips-low.cc \ | ||
38 | $(srcdir)/linux-nios2-low.cc \ | ||
39 | $(srcdir)/linux-or1k-low.cc \ | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch index 050bdde5..ea6689fe 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From baac387700a72407b3994bfd0a03825112c9745f Mon Sep 17 00:00:00 2001 | 1 | From aebe2fdb45467fe4a07874cc310e441a38c23f84 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 10 Oct 2022 15:07:22 +0530 | 3 | Date: Mon, 10 Oct 2022 15:07:22 +0530 |
4 | Subject: [PATCH 1/8] Add initial port of linux gdbserver add | 4 | Subject: [PATCH 02/53] Add initial port of linux gdbserver add |
5 | gdb_proc_service_h to gdbserver microblaze-linux | 5 | gdb_proc_service_h to gdbserver microblaze-linux |
6 | 6 | ||
7 | gdbserver needs to initialise the microblaze registers | 7 | gdbserver needs to initialise the microblaze registers |
@@ -17,11 +17,10 @@ architecture specific setup - may need to add in future | |||
17 | * add set_gdbarch_fetch_tls_load_module_address | 17 | * add set_gdbarch_fetch_tls_load_module_address |
18 | * Force reading of r0 as 0, prevent stores | 18 | * Force reading of r0 as 0, prevent stores |
19 | 19 | ||
20 | Upstream-Status: Pending | ||
21 | |||
22 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | 20 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> |
23 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | 21 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> |
24 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | 22 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
25 | --- | 24 | --- |
26 | gdb/configure.host | 2 + | 25 | gdb/configure.host | 2 + |
27 | gdb/features/Makefile | 1 + | 26 | gdb/features/Makefile | 1 + |
@@ -31,10 +30,9 @@ Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | |||
31 | gdb/microblaze-tdep.h | 4 +- | 30 | gdb/microblaze-tdep.h | 4 +- |
32 | gdb/regformats/microblaze-linux.dat | 64 +++++++ | 31 | gdb/regformats/microblaze-linux.dat | 64 +++++++ |
33 | gdb/regformats/reg-microblaze.dat | 41 +++++ | 32 | gdb/regformats/reg-microblaze.dat | 41 +++++ |
34 | gdbserver/Makefile.in | 1 + | ||
35 | gdbserver/configure.srv | 10 ++ | 33 | gdbserver/configure.srv | 10 ++ |
36 | gdbserver/linux-microblaze-low.cc | 269 ++++++++++++++++++++++++++++ | 34 | gdbserver/linux-microblaze-low.cc | 269 ++++++++++++++++++++++++++++ |
37 | 11 files changed, 466 insertions(+), 3 deletions(-) | 35 | 10 files changed, 465 insertions(+), 3 deletions(-) |
38 | create mode 100644 gdb/features/microblaze-linux.xml | 36 | create mode 100644 gdb/features/microblaze-linux.xml |
39 | create mode 100644 gdb/regformats/microblaze-linux.dat | 37 | create mode 100644 gdb/regformats/microblaze-linux.dat |
40 | create mode 100644 gdb/regformats/reg-microblaze.dat | 38 | create mode 100644 gdb/regformats/reg-microblaze.dat |
@@ -61,7 +59,7 @@ index da71675b201..877537d06ef 100644 | |||
61 | mips*-*-netbsdaout* | mips*-*-knetbsd*-gnu) | 59 | mips*-*-netbsdaout* | mips*-*-knetbsd*-gnu) |
62 | gdb_host=nbsd ;; | 60 | gdb_host=nbsd ;; |
63 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | 61 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile |
64 | index 68e17d0085d..fc3196864c9 100644 | 62 | index cda6a49d563..8ac30d8cea3 100644 |
65 | --- a/gdb/features/Makefile | 63 | --- a/gdb/features/Makefile |
66 | +++ b/gdb/features/Makefile | 64 | +++ b/gdb/features/Makefile |
67 | @@ -46,6 +46,7 @@ | 65 | @@ -46,6 +46,7 @@ |
@@ -92,7 +90,7 @@ index 00000000000..688a3f83d1e | |||
92 | + <xi:include href="microblaze-core.xml"/> | 90 | + <xi:include href="microblaze-core.xml"/> |
93 | +</target> | 91 | +</target> |
94 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | 92 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c |
95 | index daa7ddf7e4d..5748556a556 100644 | 93 | index 7d620a3688b..d25100ef867 100644 |
96 | --- a/gdb/microblaze-linux-tdep.c | 94 | --- a/gdb/microblaze-linux-tdep.c |
97 | +++ b/gdb/microblaze-linux-tdep.c | 95 | +++ b/gdb/microblaze-linux-tdep.c |
98 | @@ -37,6 +37,22 @@ | 96 | @@ -37,6 +37,22 @@ |
@@ -152,7 +150,7 @@ index daa7ddf7e4d..5748556a556 100644 | |||
152 | 150 | ||
153 | void _initialize_microblaze_linux_tdep (); | 151 | void _initialize_microblaze_linux_tdep (); |
154 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | 152 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c |
155 | index 3d5dd669341..3e8e8fe35b9 100644 | 153 | index fc83634d1e6..3ff7ec644b6 100644 |
156 | --- a/gdb/microblaze-tdep.c | 154 | --- a/gdb/microblaze-tdep.c |
157 | +++ b/gdb/microblaze-tdep.c | 155 | +++ b/gdb/microblaze-tdep.c |
158 | @@ -128,7 +128,38 @@ microblaze_fetch_instruction (CORE_ADDR pc) | 156 | @@ -128,7 +128,38 @@ microblaze_fetch_instruction (CORE_ADDR pc) |
@@ -195,7 +193,7 @@ index 3d5dd669341..3e8e8fe35b9 100644 | |||
195 | 193 | ||
196 | /* Allocate and initialize a frame cache. */ | 194 | /* Allocate and initialize a frame cache. */ |
197 | 195 | ||
198 | @@ -716,6 +747,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 196 | @@ -714,6 +745,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
199 | microblaze_breakpoint::kind_from_pc); | 197 | microblaze_breakpoint::kind_from_pc); |
200 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, | 198 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, |
201 | microblaze_breakpoint::bp_from_kind); | 199 | microblaze_breakpoint::bp_from_kind); |
@@ -203,14 +201,14 @@ index 3d5dd669341..3e8e8fe35b9 100644 | |||
203 | 201 | ||
204 | set_gdbarch_frame_args_skip (gdbarch, 8); | 202 | set_gdbarch_frame_args_skip (gdbarch, 8); |
205 | 203 | ||
206 | @@ -756,4 +788,5 @@ When non-zero, microblaze specific debugging is enabled."), | 204 | @@ -754,4 +786,5 @@ When non-zero, microblaze specific debugging is enabled."), |
207 | NULL, | 205 | NULL, |
208 | &setdebuglist, &showdebuglist); | 206 | &setdebuglist, &showdebuglist); |
209 | 207 | ||
210 | + | 208 | + |
211 | } | 209 | } |
212 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | 210 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h |
213 | index 4d90e8785dc..53fcb2297e6 100644 | 211 | index 0b4a5a3f472..56736b9b0c9 100644 |
214 | --- a/gdb/microblaze-tdep.h | 212 | --- a/gdb/microblaze-tdep.h |
215 | +++ b/gdb/microblaze-tdep.h | 213 | +++ b/gdb/microblaze-tdep.h |
216 | @@ -118,6 +118,8 @@ struct microblaze_frame_cache | 214 | @@ -118,6 +118,8 @@ struct microblaze_frame_cache |
@@ -340,23 +338,11 @@ index 00000000000..bd8a4384424 | |||
340 | +32:fsr | 338 | +32:fsr |
341 | +32:slr | 339 | +32:slr |
342 | +32:shr | 340 | +32:shr |
343 | diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in | ||
344 | index 47648b8d962..55a5f5b81ae 100644 | ||
345 | --- a/gdbserver/Makefile.in | ||
346 | +++ b/gdbserver/Makefile.in | ||
347 | @@ -178,6 +178,7 @@ SFILES = \ | ||
348 | $(srcdir)/linux-ia64-low.cc \ | ||
349 | $(srcdir)/linux-low.cc \ | ||
350 | $(srcdir)/linux-m68k-low.cc \ | ||
351 | + $(srcdir)/linux-microblaze-low.cc \ | ||
352 | $(srcdir)/linux-mips-low.cc \ | ||
353 | $(srcdir)/linux-nios2-low.cc \ | ||
354 | $(srcdir)/linux-or1k-low.cc \ | ||
355 | diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv | 341 | diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv |
356 | index 6e09b0eeb79..1817f1f04fb 100644 | 342 | index 9e861a75088..11ce617e72f 100644 |
357 | --- a/gdbserver/configure.srv | 343 | --- a/gdbserver/configure.srv |
358 | +++ b/gdbserver/configure.srv | 344 | +++ b/gdbserver/configure.srv |
359 | @@ -145,6 +145,16 @@ case "${gdbserver_host}" in | 345 | @@ -159,6 +159,16 @@ case "${gdbserver_host}" in |
360 | srv_linux_regsets=yes | 346 | srv_linux_regsets=yes |
361 | srv_linux_thread_db=yes | 347 | srv_linux_thread_db=yes |
362 | ;; | 348 | ;; |
@@ -649,5 +635,5 @@ index 00000000000..bf9eecc41ab | |||
649 | +} | 635 | +} |
650 | + | 636 | + |
651 | -- | 637 | -- |
652 | 2.37.1 (Apple Git-137.1) | 638 | 2.34.1 |
653 | 639 | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0003-Initial-port-of-core-reading-support-Added-support-f.patch index f7af2a62..c0515aa6 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0003-Initial-port-of-core-reading-support-Added-support-f.patch | |||
@@ -1,16 +1,14 @@ | |||
1 | From 7da397cae8c0f8826184d6e12fda9ccd11f92753 Mon Sep 17 00:00:00 2001 | 1 | From 67943e124abc6b1228d84399fbde5b129015ac7f Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 10 Oct 2022 16:37:53 +0530 | 3 | Date: Mon, 10 Oct 2022 16:37:53 +0530 |
4 | Subject: [PATCH 2/8] [Patch,MicroBlaze]: Initial port of core reading support | 4 | Subject: [PATCH 03/53] Initial port of core reading support Added support for |
5 | Added support for reading notes in linux core dumps Support for reading of | 5 | reading notes in linux core dumps Support for reading of PRSTATUS and PSINFO |
6 | PRSTATUS and PSINFO information for rebuilding ".reg" sections of core dumps | 6 | information for rebuilding ".reg" sections of core dumps at run time. |
7 | at run time. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | 7 | ||
11 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | 8 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> |
12 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | 9 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> |
13 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | 10 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
14 | --- | 12 | --- |
15 | bfd/elf32-microblaze.c | 84 +++++++++++++++++++++++++++++++++++++ | 13 | bfd/elf32-microblaze.c | 84 +++++++++++++++++++++++++++++++++++++ |
16 | gdb/configure.tgt | 2 +- | 14 | gdb/configure.tgt | 2 +- |
@@ -20,10 +18,10 @@ Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | |||
20 | 5 files changed, 177 insertions(+), 2 deletions(-) | 18 | 5 files changed, 177 insertions(+), 2 deletions(-) |
21 | 19 | ||
22 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | 20 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c |
23 | index d09b3f7095d..d3b3c66cf00 100644 | 21 | index 64198b8f1a6..022ce365c59 100644 |
24 | --- a/bfd/elf32-microblaze.c | 22 | --- a/bfd/elf32-microblaze.c |
25 | +++ b/bfd/elf32-microblaze.c | 23 | +++ b/bfd/elf32-microblaze.c |
26 | @@ -713,6 +713,87 @@ microblaze_elf_is_local_label_name (bfd *abfd, const char *name) | 24 | @@ -772,6 +772,87 @@ microblaze_elf_is_local_label_name (bfd *abfd, const char *name) |
27 | return _bfd_elf_is_local_label_name (abfd, name); | 25 | return _bfd_elf_is_local_label_name (abfd, name); |
28 | } | 26 | } |
29 | 27 | ||
@@ -111,7 +109,7 @@ index d09b3f7095d..d3b3c66cf00 100644 | |||
111 | /* ELF linker hash entry. */ | 109 | /* ELF linker hash entry. */ |
112 | 110 | ||
113 | struct elf32_mb_link_hash_entry | 111 | struct elf32_mb_link_hash_entry |
114 | @@ -3434,4 +3515,7 @@ microblaze_elf_add_symbol_hook (bfd *abfd, | 112 | @@ -3500,4 +3581,7 @@ microblaze_elf_add_symbol_hook (bfd *abfd, |
115 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | 113 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections |
116 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | 114 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook |
117 | 115 | ||
@@ -120,10 +118,10 @@ index d09b3f7095d..d3b3c66cf00 100644 | |||
120 | + | 118 | + |
121 | #include "elf32-target.h" | 119 | #include "elf32-target.h" |
122 | diff --git a/gdb/configure.tgt b/gdb/configure.tgt | 120 | diff --git a/gdb/configure.tgt b/gdb/configure.tgt |
123 | index 0705ccf32b8..7ea186481f3 100644 | 121 | index 47a674201f9..d0673abd2b8 100644 |
124 | --- a/gdb/configure.tgt | 122 | --- a/gdb/configure.tgt |
125 | +++ b/gdb/configure.tgt | 123 | +++ b/gdb/configure.tgt |
126 | @@ -400,7 +400,7 @@ mep-*-*) | 124 | @@ -415,7 +415,7 @@ mep-*-*) |
127 | 125 | ||
128 | microblaze*-linux-*|microblaze*-*-linux*) | 126 | microblaze*-linux-*|microblaze*-*-linux*) |
129 | # Target: Xilinx MicroBlaze running Linux | 127 | # Target: Xilinx MicroBlaze running Linux |
@@ -133,7 +131,7 @@ index 0705ccf32b8..7ea186481f3 100644 | |||
133 | ;; | 131 | ;; |
134 | microblaze*-*-*) | 132 | microblaze*-*-*) |
135 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | 133 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c |
136 | index 5748556a556..d6197c49dfd 100644 | 134 | index d25100ef867..eef09bacec0 100644 |
137 | --- a/gdb/microblaze-linux-tdep.c | 135 | --- a/gdb/microblaze-linux-tdep.c |
138 | +++ b/gdb/microblaze-linux-tdep.c | 136 | +++ b/gdb/microblaze-linux-tdep.c |
139 | @@ -36,6 +36,7 @@ | 137 | @@ -36,6 +36,7 @@ |
@@ -179,10 +177,10 @@ index 5748556a556..d6197c49dfd 100644 | |||
179 | set_gdbarch_fetch_tls_load_module_address (gdbarch, | 177 | set_gdbarch_fetch_tls_load_module_address (gdbarch, |
180 | svr4_fetch_objfile_link_map); | 178 | svr4_fetch_objfile_link_map); |
181 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | 179 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c |
182 | index 3e8e8fe35b9..ccd37d085d6 100644 | 180 | index 3ff7ec644b6..7c98331f8a9 100644 |
183 | --- a/gdb/microblaze-tdep.c | 181 | --- a/gdb/microblaze-tdep.c |
184 | +++ b/gdb/microblaze-tdep.c | 182 | +++ b/gdb/microblaze-tdep.c |
185 | @@ -666,6 +666,43 @@ microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | 183 | @@ -665,6 +665,43 @@ microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) |
186 | tdesc_microblaze_with_stack_protect); | 184 | tdesc_microblaze_with_stack_protect); |
187 | } | 185 | } |
188 | 186 | ||
@@ -226,9 +224,9 @@ index 3e8e8fe35b9..ccd37d085d6 100644 | |||
226 | static struct gdbarch * | 224 | static struct gdbarch * |
227 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 225 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
228 | { | 226 | { |
229 | @@ -718,6 +755,10 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 227 | @@ -716,6 +753,10 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
230 | microblaze_gdbarch_tdep *tdep = new microblaze_gdbarch_tdep; | 228 | gdbarch *gdbarch |
231 | gdbarch = gdbarch_alloc (&info, tdep); | 229 | = gdbarch_alloc (&info, gdbarch_tdep_up (new microblaze_gdbarch_tdep)); |
232 | 230 | ||
233 | + tdep->gregset = NULL; | 231 | + tdep->gregset = NULL; |
234 | + tdep->sizeof_gregset = 0; | 232 | + tdep->sizeof_gregset = 0; |
@@ -237,7 +235,7 @@ index 3e8e8fe35b9..ccd37d085d6 100644 | |||
237 | set_gdbarch_long_double_bit (gdbarch, 128); | 235 | set_gdbarch_long_double_bit (gdbarch, 128); |
238 | 236 | ||
239 | set_gdbarch_num_regs (gdbarch, MICROBLAZE_NUM_REGS); | 237 | set_gdbarch_num_regs (gdbarch, MICROBLAZE_NUM_REGS); |
240 | @@ -766,6 +807,13 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 238 | @@ -764,6 +805,13 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
241 | frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer); | 239 | frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer); |
242 | if (tdesc_data != NULL) | 240 | if (tdesc_data != NULL) |
243 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); | 241 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); |
@@ -252,7 +250,7 @@ index 3e8e8fe35b9..ccd37d085d6 100644 | |||
252 | return gdbarch; | 250 | return gdbarch; |
253 | } | 251 | } |
254 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | 252 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h |
255 | index 53fcb2297e6..2e853d84d72 100644 | 253 | index 56736b9b0c9..07a160a463c 100644 |
256 | --- a/gdb/microblaze-tdep.h | 254 | --- a/gdb/microblaze-tdep.h |
257 | +++ b/gdb/microblaze-tdep.h | 255 | +++ b/gdb/microblaze-tdep.h |
258 | @@ -23,8 +23,23 @@ | 256 | @@ -23,8 +23,23 @@ |
@@ -267,7 +265,7 @@ index 53fcb2297e6..2e853d84d72 100644 | |||
267 | + unsigned int pregs[16]; | 265 | + unsigned int pregs[16]; |
268 | +}; | 266 | +}; |
269 | + | 267 | + |
270 | struct microblaze_gdbarch_tdep : gdbarch_tdep | 268 | struct microblaze_gdbarch_tdep : gdbarch_tdep_base |
271 | { | 269 | { |
272 | + int dummy; // declare something. | 270 | + int dummy; // declare something. |
273 | + | 271 | + |
@@ -299,5 +297,5 @@ index 53fcb2297e6..2e853d84d72 100644 | |||
299 | 297 | ||
300 | #endif /* microblaze-tdep.h */ | 298 | #endif /* microblaze-tdep.h */ |
301 | -- | 299 | -- |
302 | 2.37.1 (Apple Git-137.1) | 300 | 2.34.1 |
303 | 301 | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0004-Fix-debug-message-when-register-is-unavailable.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0004-Fix-debug-message-when-register-is-unavailable.patch new file mode 100644 index 00000000..1383efd8 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0004-Fix-debug-message-when-register-is-unavailable.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 087f77ebdbdf5b9b5d199ba92b31c6503cb66b37 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan.rossi@petalogix.com> | ||
3 | Date: Tue, 8 May 2012 18:11:17 +1000 | ||
4 | Subject: [PATCH 04/53] Fix debug message when register is unavailable | ||
5 | |||
6 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
7 | |||
8 | Conflicts: | ||
9 | gdb/frame.c | ||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | gdb/frame.c | 14 +++++++++++--- | ||
13 | 1 file changed, 11 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
16 | index d95d63eb0f6..859e1a6553d 100644 | ||
17 | --- a/gdb/frame.c | ||
18 | +++ b/gdb/frame.c | ||
19 | @@ -1317,12 +1317,20 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum) | ||
20 | else | ||
21 | { | ||
22 | int i; | ||
23 | - gdb::array_view<const gdb_byte> buf = value->contents (); | ||
24 | + | ||
25 | + const gdb_byte *buf = NULL; | ||
26 | + if (value_entirely_available(value)) { | ||
27 | + gdb::array_view<const gdb_byte> buf = value->contents (); | ||
28 | + } | ||
29 | |||
30 | gdb_printf (&debug_file, " bytes="); | ||
31 | gdb_printf (&debug_file, "["); | ||
32 | - for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
33 | - gdb_printf (&debug_file, "%02x", buf[i]); | ||
34 | + if (buf != NULL) { | ||
35 | + for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
36 | + gdb_printf (&debug_file, "%02x", buf[i]); | ||
37 | + } else { | ||
38 | + gdb_printf (&debug_file, "unavailable"); | ||
39 | + } | ||
40 | gdb_printf (&debug_file, "]"); | ||
41 | } | ||
42 | } | ||
43 | -- | ||
44 | 2.34.1 | ||
45 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0005-MicroBlaze-native-gdb-port.patch index 08b0ae17..75c06b62 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0005-MicroBlaze-native-gdb-port.patch | |||
@@ -1,13 +1,11 @@ | |||
1 | From 8d05b79cda7617f228fa4bb6e5147689b662699e Mon Sep 17 00:00:00 2001 | 1 | From 5b633480eb0b45dc15b6416c54535c54c062d23c Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 10 Oct 2022 18:53:46 +0530 | 3 | Date: Mon, 10 Oct 2022 18:53:46 +0530 |
4 | Subject: [PATCH 4/8] [Patch,MicroBlaze] : MicroBlaze native gdb port. | 4 | Subject: [PATCH 05/53] MicroBlaze native gdb port. |
5 | 5 | ||
6 | signed-off-by : Mahesh Bodapati <mbodapat@amd.com> | 6 | signed-off-by : Mahesh Bodapati <mbodapat@amd.com> |
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 7 | ||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | 9 | --- |
12 | gdb/Makefile.in | 2 + | 10 | gdb/Makefile.in | 2 + |
13 | gdb/configure.nat | 4 + | 11 | gdb/configure.nat | 4 + |
@@ -23,10 +21,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
23 | create mode 100644 gdb/microblaze-linux-tdep.h | 21 | create mode 100644 gdb/microblaze-linux-tdep.h |
24 | 22 | ||
25 | diff --git a/gdb/Makefile.in b/gdb/Makefile.in | 23 | diff --git a/gdb/Makefile.in b/gdb/Makefile.in |
26 | index aecab41eeb8..fb63e1662c1 100644 | 24 | index 0e0f19c40c9..056588d88d0 100644 |
27 | --- a/gdb/Makefile.in | 25 | --- a/gdb/Makefile.in |
28 | +++ b/gdb/Makefile.in | 26 | +++ b/gdb/Makefile.in |
29 | @@ -1374,6 +1374,7 @@ HFILES_NO_SRCDIR = \ | 27 | @@ -1409,6 +1409,7 @@ HFILES_NO_SRCDIR = \ |
30 | memory-map.h \ | 28 | memory-map.h \ |
31 | memrange.h \ | 29 | memrange.h \ |
32 | microblaze-tdep.h \ | 30 | microblaze-tdep.h \ |
@@ -34,7 +32,7 @@ index aecab41eeb8..fb63e1662c1 100644 | |||
34 | mips-linux-tdep.h \ | 32 | mips-linux-tdep.h \ |
35 | mips-netbsd-tdep.h \ | 33 | mips-netbsd-tdep.h \ |
36 | mips-tdep.h \ | 34 | mips-tdep.h \ |
37 | @@ -2249,6 +2250,7 @@ ALLDEPFILES = \ | 35 | @@ -1757,6 +1758,7 @@ ALLDEPFILES = \ |
38 | m68k-linux-nat.c \ | 36 | m68k-linux-nat.c \ |
39 | m68k-linux-tdep.c \ | 37 | m68k-linux-tdep.c \ |
40 | m68k-tdep.c \ | 38 | m68k-tdep.c \ |
@@ -43,10 +41,10 @@ index aecab41eeb8..fb63e1662c1 100644 | |||
43 | microblaze-tdep.c \ | 41 | microblaze-tdep.c \ |
44 | mingw-hdep.c \ | 42 | mingw-hdep.c \ |
45 | diff --git a/gdb/configure.nat b/gdb/configure.nat | 43 | diff --git a/gdb/configure.nat b/gdb/configure.nat |
46 | index b45519fd116..256c666e760 100644 | 44 | index 8b98511cef7..c9f0fb25010 100644 |
47 | --- a/gdb/configure.nat | 45 | --- a/gdb/configure.nat |
48 | +++ b/gdb/configure.nat | 46 | +++ b/gdb/configure.nat |
49 | @@ -270,6 +270,10 @@ case ${gdb_host} in | 47 | @@ -274,6 +274,10 @@ case ${gdb_host} in |
50 | # Host: Motorola m68k running GNU/Linux. | 48 | # Host: Motorola m68k running GNU/Linux. |
51 | NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o" | 49 | NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o" |
52 | ;; | 50 | ;; |
@@ -144,378 +142,378 @@ index 00000000000..267e12f6d59 | |||
144 | +} | 142 | +} |
145 | diff --git a/gdb/microblaze-linux-nat.c b/gdb/microblaze-linux-nat.c | 143 | diff --git a/gdb/microblaze-linux-nat.c b/gdb/microblaze-linux-nat.c |
146 | new file mode 100755 | 144 | new file mode 100755 |
147 | index 00000000000..6b9daa23120 | 145 | index 00000000000..a348001a3e2 |
148 | --- /dev/null | 146 | --- /dev/null |
149 | +++ b/gdb/microblaze-linux-nat.c | 147 | +++ b/gdb/microblaze-linux-nat.c |
150 | @@ -0,0 +1,366 @@ | 148 | @@ -0,0 +1,366 @@ |
151 | +/* Native-dependent code for GNU/Linux MicroBlaze. | 149 | +/* Native-dependent code for GNU/Linux MicroBlaze. |
152 | + Copyright (C) 2021 Free Software Foundation, Inc. | 150 | + Copyright (C) 2021 Free Software Foundation, Inc. |
153 | + | 151 | + |
154 | + This file is part of GDB. | 152 | + This file is part of GDB. |
155 | + | 153 | + |
156 | + This program is free software; you can redistribute it and/or modify | 154 | + This program is free software; you can redistribute it and/or modify |
157 | + it under the terms of the GNU General Public License as published by | 155 | + it under the terms of the GNU General Public License as published by |
158 | + the Free Software Foundation; either version 3 of the License, or | 156 | + the Free Software Foundation; either version 3 of the License, or |
159 | + (at your option) any later version. | 157 | + (at your option) any later version. |
160 | + | 158 | + |
161 | + This program is distributed in the hope that it will be useful, | 159 | + This program is distributed in the hope that it will be useful, |
162 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | 160 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
163 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 161 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
164 | + GNU General Public License for more details. | 162 | + GNU General Public License for more details. |
165 | + | 163 | + |
166 | + You should have received a copy of the GNU General Public License | 164 | + You should have received a copy of the GNU General Public License |
167 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 165 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
168 | + | 166 | + |
169 | +#include "defs.h" | 167 | +#include "defs.h" |
170 | +#include "arch-utils.h" | 168 | +#include "arch-utils.h" |
171 | +#include "dis-asm.h" | 169 | +#include "dis-asm.h" |
172 | +#include "frame.h" | 170 | +#include "frame.h" |
173 | +#include "trad-frame.h" | 171 | +#include "trad-frame.h" |
174 | +#include "symtab.h" | 172 | +#include "symtab.h" |
175 | +#include "value.h" | 173 | +#include "value.h" |
176 | +#include "gdbcmd.h" | 174 | +#include "gdbcmd.h" |
177 | +#include "breakpoint.h" | 175 | +#include "breakpoint.h" |
178 | +#include "inferior.h" | 176 | +#include "inferior.h" |
179 | +#include "gdbthread.h" | 177 | +#include "gdbthread.h" |
180 | +#include "gdbcore.h" | 178 | +#include "gdbcore.h" |
181 | +#include "regcache.h" | 179 | +#include "regcache.h" |
182 | +#include "regset.h" | 180 | +#include "regset.h" |
183 | +#include "target.h" | 181 | +#include "target.h" |
184 | +#include "frame.h" | 182 | +#include "frame.h" |
185 | +#include "frame-base.h" | 183 | +#include "frame-base.h" |
186 | +#include "frame-unwind.h" | 184 | +#include "frame-unwind.h" |
187 | +#include "osabi.h" | 185 | +#include "osabi.h" |
188 | +#include "gdbsupport/gdb_assert.h" | 186 | +#include "gdbsupport/gdb_assert.h" |
189 | +#include <string.h> | 187 | +#include <string.h> |
190 | +#include "target-descriptions.h" | 188 | +#include "target-descriptions.h" |
191 | +#include "opcodes/microblaze-opcm.h" | 189 | +#include "opcodes/microblaze-opcm.h" |
192 | +#include "opcodes/microblaze-dis.h" | 190 | +#include "opcodes/microblaze-dis.h" |
193 | +#include "gregset.h" | 191 | +#include "gregset.h" |
194 | + | 192 | + |
195 | +#include "linux-nat.h" | 193 | +#include "linux-nat.h" |
196 | +#include "linux-tdep.h" | 194 | +#include "linux-tdep.h" |
197 | +#include "target-descriptions.h" | 195 | +#include "target-descriptions.h" |
198 | + | 196 | + |
199 | +#include <sys/user.h> | 197 | +#include <sys/user.h> |
200 | +#include <sys/ioctl.h> | 198 | +#include <sys/ioctl.h> |
201 | +#include <sys/uio.h> | 199 | +#include <sys/uio.h> |
202 | +#include "gdbsupport/gdb_wait.h" | 200 | +#include "gdbsupport/gdb_wait.h" |
203 | +#include <fcntl.h> | 201 | +#include <fcntl.h> |
204 | +#include <sys/procfs.h> | 202 | +#include <sys/procfs.h> |
205 | +#include "nat/gdb_ptrace.h" | 203 | +#include "nat/gdb_ptrace.h" |
206 | +#include "nat/linux-ptrace.h" | 204 | +#include "nat/linux-ptrace.h" |
207 | +#include "inf-ptrace.h" | 205 | +#include "inf-ptrace.h" |
208 | +#include <algorithm> | 206 | +#include <algorithm> |
209 | +#include <unordered_map> | 207 | +#include <unordered_map> |
210 | +#include <list> | 208 | +#include <list> |
211 | +#include <sys/ptrace.h> | 209 | +#include <sys/ptrace.h> |
212 | + | 210 | + |
213 | +/* Prototypes for supply_gregset etc. */ | 211 | +/* Prototypes for supply_gregset etc. */ |
214 | +#include "gregset.h" | 212 | +#include "gregset.h" |
215 | + | 213 | + |
216 | +#include "microblaze-tdep.h" | 214 | +#include "microblaze-tdep.h" |
217 | +#include "microblaze-linux-tdep.h" | 215 | +#include "microblaze-linux-tdep.h" |
218 | +#include "inferior.h" | 216 | +#include "inferior.h" |
219 | + | 217 | + |
220 | +#include "elf/common.h" | 218 | +#include "elf/common.h" |
221 | + | 219 | + |
222 | +#include "auxv.h" | 220 | +#include "auxv.h" |
223 | +#include "linux-tdep.h" | 221 | +#include "linux-tdep.h" |
224 | + | 222 | + |
225 | +#include <sys/ptrace.h> | 223 | +#include <sys/ptrace.h> |
226 | + | 224 | + |
227 | + | 225 | + |
228 | +//int have_ptrace_getsetregs=1; | 226 | +//int have_ptrace_getsetregs=1; |
229 | + | 227 | + |
230 | +/* MicroBlaze Linux native additions to the default linux support. */ | 228 | +/* MicroBlaze Linux native additions to the default linux support. */ |
231 | + | 229 | + |
232 | +class microblaze_linux_nat_target final : public linux_nat_target | 230 | +class microblaze_linux_nat_target final : public linux_nat_target |
233 | +{ | 231 | +{ |
234 | +public: | 232 | +public: |
235 | + /* Add our register access methods. */ | 233 | + /* Add our register access methods. */ |
236 | + void fetch_registers (struct regcache *regcache, int regnum) override; | 234 | + void fetch_registers (struct regcache *regcache, int regnum) override; |
237 | + void store_registers (struct regcache *regcache, int regnum) override; | 235 | + void store_registers (struct regcache *regcache, int regnum) override; |
238 | + | 236 | + |
239 | + /* Read suitable target description. */ | 237 | + /* Read suitable target description. */ |
240 | + const struct target_desc *read_description () override; | 238 | + const struct target_desc *read_description () override; |
241 | +}; | 239 | +}; |
242 | + | 240 | + |
243 | +static microblaze_linux_nat_target the_microblaze_linux_nat_target; | 241 | +static microblaze_linux_nat_target the_microblaze_linux_nat_target; |
244 | + | 242 | + |
245 | +static int | 243 | +static int |
246 | +microblaze_register_u_addr (struct gdbarch *gdbarch, int regno) | 244 | +microblaze_register_u_addr (struct gdbarch *gdbarch, int regno) |
247 | +{ | 245 | +{ |
248 | + int u_addr = -1; | 246 | + int u_addr = -1; |
249 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 247 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
250 | + /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace | 248 | + /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace |
251 | + * interface, and not the wordsize of the program's ABI. */ | 249 | + * interface, and not the wordsize of the program's ABI. */ |
252 | + int wordsize = sizeof (long); | 250 | + int wordsize = sizeof (long); |
253 | + | 251 | + |
254 | + /* General purpose registers occupy 1 slot each in the buffer. */ | 252 | + /* General purpose registers occupy 1 slot each in the buffer. */ |
255 | + if (regno >= MICROBLAZE_R0_REGNUM | 253 | + if (regno >= MICROBLAZE_R0_REGNUM |
256 | + && regno <= MICROBLAZE_FSR_REGNUM) | 254 | + && regno <= MICROBLAZE_FSR_REGNUM) |
257 | + u_addr = ((regno - MICROBLAZE_R0_REGNUM)* wordsize); | 255 | + u_addr = ((regno - MICROBLAZE_R0_REGNUM)* wordsize); |
258 | + | 256 | + |
259 | + return u_addr; | 257 | + return u_addr; |
260 | +} | 258 | +} |
261 | + | 259 | + |
262 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) | 260 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) |
263 | + from regset GREGS into REGCACHE. */ | 261 | + from regset GREGS into REGCACHE. */ |
264 | + | 262 | + |
265 | +static void | 263 | +static void |
266 | +supply_gregset_regnum (struct regcache *regcache, const prgregset_t *gregs, | 264 | +supply_gregset_regnum (struct regcache *regcache, const prgregset_t *gregs, |
267 | + int regnum) | 265 | + int regnum) |
268 | +{ | 266 | +{ |
269 | + int i; | 267 | + int i; |
270 | + const elf_greg_t *regp = *gregs; | 268 | + const elf_greg_t *regp = *gregs; |
271 | + /* Access all registers */ | 269 | + /* Access all registers */ |
272 | + if (regnum == -1) | 270 | + if (regnum == -1) |
273 | + { | 271 | + { |
274 | + /* We fill the general purpose registers. */ | 272 | + /* We fill the general purpose registers. */ |
275 | + for (i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) | 273 | + for (i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) |
276 | + regcache->raw_supply (i, regp + i); | 274 | + regcache->raw_supply (i, regp + i); |
277 | + | 275 | + |
278 | + /* Supply MICROBLAZE_PC_REGNUM from index 32. */ | 276 | + /* Supply MICROBLAZE_PC_REGNUM from index 32. */ |
279 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); | 277 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); |
280 | + | 278 | + |
281 | + /* Fill the inaccessible zero register with zero. */ | 279 | + /* Fill the inaccessible zero register with zero. */ |
282 | + regcache->raw_supply_zeroed (0); | 280 | + regcache->raw_supply_zeroed (0); |
283 | + } | 281 | + } |
284 | + else if (regnum == MICROBLAZE_R0_REGNUM) | 282 | + else if (regnum == MICROBLAZE_R0_REGNUM) |
285 | + regcache->raw_supply_zeroed (0); | 283 | + regcache->raw_supply_zeroed (0); |
286 | + else if (regnum == MICROBLAZE_PC_REGNUM) | 284 | + else if (regnum == MICROBLAZE_PC_REGNUM) |
287 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); | 285 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); |
288 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) | 286 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) |
289 | + regcache->raw_supply (regnum, regp + regnum); | 287 | + regcache->raw_supply (regnum, regp + regnum); |
290 | +} | 288 | +} |
291 | + | 289 | + |
292 | +/* Copy all general purpose registers from regset GREGS into REGCACHE. */ | 290 | +/* Copy all general purpose registers from regset GREGS into REGCACHE. */ |
293 | + | 291 | + |
294 | +void | 292 | +void |
295 | +supply_gregset (struct regcache *regcache, const prgregset_t *gregs) | 293 | +supply_gregset (struct regcache *regcache, const prgregset_t *gregs) |
296 | +{ | 294 | +{ |
297 | + supply_gregset_regnum (regcache, gregs, -1); | 295 | + supply_gregset_regnum (regcache, gregs, -1); |
298 | +} | 296 | +} |
299 | + | 297 | + |
300 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) | 298 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) |
301 | + from REGCACHE into regset GREGS. */ | 299 | + from REGCACHE into regset GREGS. */ |
302 | + | 300 | + |
303 | +void | 301 | +void |
304 | +fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) | 302 | +fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) |
305 | +{ | 303 | +{ |
306 | + elf_greg_t *regp = *gregs; | 304 | + elf_greg_t *regp = *gregs; |
307 | + if (regnum == -1) | 305 | + if (regnum == -1) |
308 | + { | 306 | + { |
309 | + /* We fill the general purpose registers. */ | 307 | + /* We fill the general purpose registers. */ |
310 | + for (int i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) | 308 | + for (int i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) |
311 | + regcache->raw_collect (i, regp + i); | 309 | + regcache->raw_collect (i, regp + i); |
312 | + | 310 | + |
313 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); | 311 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); |
314 | + } | 312 | + } |
315 | + else if (regnum == MICROBLAZE_R0_REGNUM) | 313 | + else if (regnum == MICROBLAZE_R0_REGNUM) |
316 | + /* Nothing to do here. */ | 314 | + /* Nothing to do here. */ |
317 | + ; | 315 | + ; |
318 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) | 316 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) |
319 | + regcache->raw_collect (regnum, regp + regnum); | 317 | + regcache->raw_collect (regnum, regp + regnum); |
320 | + else if (regnum == MICROBLAZE_PC_REGNUM) | 318 | + else if (regnum == MICROBLAZE_PC_REGNUM) |
321 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); | 319 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); |
322 | +} | 320 | +} |
323 | + | 321 | + |
324 | +/* Transfering floating-point registers between GDB, inferiors and cores. | 322 | +/* Transfering floating-point registers between GDB, inferiors and cores. |
325 | + Since MicroBlaze floating-point registers are the same as GPRs these do | 323 | + Since MicroBlaze floating-point registers are the same as GPRs these do |
326 | + nothing. */ | 324 | + nothing. */ |
327 | + | 325 | + |
328 | +void | 326 | +void |
329 | +supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregs) | 327 | +supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregs) |
330 | +{ | 328 | +{ |
331 | +} | 329 | +} |
332 | + | 330 | + |
333 | +void | 331 | +void |
334 | +fill_fpregset (const struct regcache *regcache, | 332 | +fill_fpregset (const struct regcache *regcache, |
335 | + gdb_fpregset_t *fpregs, int regno) | 333 | + gdb_fpregset_t *fpregs, int regno) |
336 | +{ | 334 | +{ |
337 | +} | 335 | +} |
338 | + | 336 | + |
339 | + | 337 | + |
340 | +static void | 338 | +static void |
341 | +fetch_register (struct regcache *regcache, int tid, int regno) | 339 | +fetch_register (struct regcache *regcache, int tid, int regno) |
342 | +{ | 340 | +{ |
343 | + struct gdbarch *gdbarch = regcache->arch (); | 341 | + struct gdbarch *gdbarch = regcache->arch (); |
344 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | 342 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); |
345 | + /* This isn't really an address. But ptrace thinks of it as one. */ | 343 | + /* This isn't really an address. But ptrace thinks of it as one. */ |
346 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); | 344 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); |
347 | + int bytes_transferred; | 345 | + int bytes_transferred; |
348 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; | 346 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; |
349 | + | 347 | + |
350 | + if (regaddr == -1) | 348 | + if (regaddr == -1) |
351 | + { | 349 | + { |
352 | + memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */ | 350 | + memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */ |
353 | + regcache->raw_supply (regno, buf); | 351 | + regcache->raw_supply (regno, buf); |
354 | + return; | 352 | + return; |
355 | + } | 353 | + } |
356 | + | 354 | + |
357 | + /* Read the raw register using sizeof(long) sized chunks. On a | 355 | + /* Read the raw register using sizeof(long) sized chunks. On a |
358 | + * 32-bit platform, 64-bit floating-point registers will require two | 356 | + * 32-bit platform, 64-bit floating-point registers will require two |
359 | + * transfers. */ | 357 | + * transfers. */ |
360 | + for (bytes_transferred = 0; | 358 | + for (bytes_transferred = 0; |
361 | + bytes_transferred < register_size (gdbarch, regno); | 359 | + bytes_transferred < register_size (gdbarch, regno); |
362 | + bytes_transferred += sizeof (long)) | 360 | + bytes_transferred += sizeof (long)) |
363 | + { | 361 | + { |
364 | + long l; | 362 | + long l; |
365 | + | 363 | + |
366 | + errno = 0; | 364 | + errno = 0; |
367 | + l = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0); | 365 | + l = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0); |
368 | + if (errno == EIO) | 366 | + if (errno == EIO) |
369 | + { | 367 | + { |
370 | + printf("ptrace io error\n"); | 368 | + printf("ptrace io error\n"); |
371 | + } | 369 | + } |
372 | + regaddr += sizeof (long); | 370 | + regaddr += sizeof (long); |
373 | + if (errno != 0) | 371 | + if (errno != 0) |
374 | + { | 372 | + { |
375 | + char message[128]; | 373 | + char message[128]; |
376 | + sprintf (message, "reading register %s (#%d)", | 374 | + sprintf (message, "reading register %s (#%d)", |
377 | + gdbarch_register_name (gdbarch, regno), regno); | 375 | + gdbarch_register_name (gdbarch, regno), regno); |
378 | + perror_with_name (message); | 376 | + perror_with_name (message); |
379 | + } | 377 | + } |
380 | + memcpy (&buf[bytes_transferred], &l, sizeof (l)); | 378 | + memcpy (&buf[bytes_transferred], &l, sizeof (l)); |
381 | + } | 379 | + } |
382 | + | 380 | + |
383 | + /* Now supply the register. Keep in mind that the regcache's idea | 381 | + /* Now supply the register. Keep in mind that the regcache's idea |
384 | + * of the register's size may not be a multiple of sizeof | 382 | + * of the register's size may not be a multiple of sizeof |
385 | + * (long). */ | 383 | + * (long). */ |
386 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) | 384 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) |
387 | + { | 385 | + { |
388 | + /* Little-endian values are always found at the left end of the | 386 | + /* Little-endian values are always found at the left end of the |
389 | + * bytes transferred. */ | 387 | + * bytes transferred. */ |
390 | + regcache->raw_supply (regno, buf); | 388 | + regcache->raw_supply (regno, buf); |
391 | + } | 389 | + } |
392 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | 390 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) |
393 | + { | 391 | + { |
394 | + /* Big-endian values are found at the right end of the bytes | 392 | + /* Big-endian values are found at the right end of the bytes |
395 | + * transferred. */ | 393 | + * transferred. */ |
396 | + size_t padding = (bytes_transferred - register_size (gdbarch, regno)); | 394 | + size_t padding = (bytes_transferred - register_size (gdbarch, regno)); |
397 | + regcache->raw_supply (regno, buf + padding); | 395 | + regcache->raw_supply (regno, buf + padding); |
398 | + } | 396 | + } |
399 | + else | 397 | + else |
400 | + internal_error (__FILE__, __LINE__, | 398 | + internal_error (__FILE__, __LINE__, |
401 | + _("fetch_register: unexpected byte order: %d"), | 399 | + _("fetch_register: unexpected byte order: %d"), |
402 | + gdbarch_byte_order (gdbarch)); | 400 | + gdbarch_byte_order (gdbarch)); |
403 | +} | 401 | +} |
404 | + | 402 | + |
405 | + | 403 | + |
406 | +/* This is a wrapper for the fetch_all_gp_regs function. It is | 404 | +/* This is a wrapper for the fetch_all_gp_regs function. It is |
407 | + * responsible for verifying if this target has the ptrace request | 405 | + * responsible for verifying if this target has the ptrace request |
408 | + * that can be used to fetch all general-purpose registers at one | 406 | + * that can be used to fetch all general-purpose registers at one |
409 | + * shot. If it doesn't, then we should fetch them using the | 407 | + * shot. If it doesn't, then we should fetch them using the |
410 | + * old-fashioned way, which is to iterate over the registers and | 408 | + * old-fashioned way, which is to iterate over the registers and |
411 | + * request them one by one. */ | 409 | + * request them one by one. */ |
412 | +static void | 410 | +static void |
413 | +fetch_gp_regs (struct regcache *regcache, int tid) | 411 | +fetch_gp_regs (struct regcache *regcache, int tid) |
414 | +{ | 412 | +{ |
415 | + int i; | 413 | + int i; |
416 | +/* If we've hit this point, it doesn't really matter which | 414 | +/* If we've hit this point, it doesn't really matter which |
417 | + architecture we are using. We just need to read the | 415 | + architecture we are using. We just need to read the |
418 | + registers in the "old-fashioned way". */ | 416 | + registers in the "old-fashioned way". */ |
419 | + for (i = MICROBLAZE_R0_REGNUM; i <= MICROBLAZE_FSR_REGNUM; i++) | 417 | + for (i = MICROBLAZE_R0_REGNUM; i <= MICROBLAZE_FSR_REGNUM; i++) |
420 | + fetch_register (regcache, tid, i); | 418 | + fetch_register (regcache, tid, i); |
421 | +} | 419 | +} |
422 | + | 420 | + |
423 | +/* Return a target description for the current target. */ | 421 | +/* Return a target description for the current target. */ |
424 | + | 422 | + |
425 | +const struct target_desc * | 423 | +const struct target_desc * |
426 | +microblaze_linux_nat_target::read_description () | 424 | +microblaze_linux_nat_target::read_description () |
427 | +{ | 425 | +{ |
428 | + return tdesc_microblaze_linux; | 426 | + return tdesc_microblaze_linux; |
429 | +} | 427 | +} |
430 | + | 428 | + |
431 | +/* Fetch REGNUM (or all registers if REGNUM == -1) from the target | 429 | +/* Fetch REGNUM (or all registers if REGNUM == -1) from the target |
432 | + into REGCACHE using PTRACE_GETREGSET. */ | 430 | + into REGCACHE using PTRACE_GETREGSET. */ |
433 | + | 431 | + |
434 | +void | 432 | +void |
435 | +microblaze_linux_nat_target::fetch_registers (struct regcache * regcache, | 433 | +microblaze_linux_nat_target::fetch_registers (struct regcache * regcache, |
436 | + int regno) | 434 | + int regno) |
437 | +{ | 435 | +{ |
438 | + /* Get the thread id for the ptrace call. */ | 436 | + /* Get the thread id for the ptrace call. */ |
439 | + int tid = regcache->ptid ().lwp (); | 437 | + int tid = regcache->ptid ().lwp (); |
440 | +//int tid = get_ptrace_pid (regcache->ptid()); | 438 | +//int tid = get_ptrace_pid (regcache->ptid()); |
441 | +#if 1 | 439 | +#if 1 |
442 | + if (regno == -1) | 440 | + if (regno == -1) |
443 | +#endif | 441 | +#endif |
444 | + fetch_gp_regs (regcache, tid); | 442 | + fetch_gp_regs (regcache, tid); |
445 | +#if 1 | 443 | +#if 1 |
446 | + else | 444 | + else |
447 | + fetch_register (regcache, tid, regno); | 445 | + fetch_register (regcache, tid, regno); |
448 | +#endif | 446 | +#endif |
449 | +} | 447 | +} |
450 | + | 448 | + |
451 | + | 449 | + |
452 | +/* Store REGNUM (or all registers if REGNUM == -1) to the target | 450 | +/* Store REGNUM (or all registers if REGNUM == -1) to the target |
453 | + from REGCACHE using PTRACE_SETREGSET. */ | 451 | + from REGCACHE using PTRACE_SETREGSET. */ |
454 | + | 452 | + |
455 | +void | 453 | +void |
456 | +microblaze_linux_nat_target::store_registers (struct regcache *regcache, int regno) | 454 | +microblaze_linux_nat_target::store_registers (struct regcache *regcache, int regno) |
457 | +{ | 455 | +{ |
458 | + int tid; | 456 | + int tid; |
459 | + | 457 | + |
460 | + tid = get_ptrace_pid (regcache->ptid ()); | 458 | + tid = get_ptrace_pid (regcache->ptid ()); |
461 | + | 459 | + |
462 | + struct gdbarch *gdbarch = regcache->arch (); | 460 | + struct gdbarch *gdbarch = regcache->arch (); |
463 | + /* This isn't really an address. But ptrace thinks of it as one. */ | 461 | + /* This isn't really an address. But ptrace thinks of it as one. */ |
464 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); | 462 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); |
465 | + int i; | 463 | + int i; |
466 | + size_t bytes_to_transfer; | 464 | + size_t bytes_to_transfer; |
467 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; | 465 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; |
468 | + | 466 | + |
469 | + if (regaddr == -1) | 467 | + if (regaddr == -1) |
470 | + return; | 468 | + return; |
471 | + | 469 | + |
472 | + /* First collect the register. Keep in mind that the regcache's | 470 | + /* First collect the register. Keep in mind that the regcache's |
473 | + * idea of the register's size may not be a multiple of sizeof | 471 | + * idea of the register's size may not be a multiple of sizeof |
474 | + * (long). */ | 472 | + * (long). */ |
475 | + memset (buf, 0, sizeof buf); | 473 | + memset (buf, 0, sizeof buf); |
476 | + bytes_to_transfer = align_up (register_size (gdbarch, regno), sizeof (long)); | 474 | + bytes_to_transfer = align_up (register_size (gdbarch, regno), sizeof (long)); |
477 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) | 475 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) |
478 | + { | 476 | + { |
479 | + /* Little-endian values always sit at the left end of the buffer. */ | 477 | + /* Little-endian values always sit at the left end of the buffer. */ |
480 | + regcache->raw_collect (regno, buf); | 478 | + regcache->raw_collect (regno, buf); |
481 | + } | 479 | + } |
482 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | 480 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) |
483 | + { | 481 | + { |
484 | + /* Big-endian values sit at the right end of the buffer. */ | 482 | + /* Big-endian values sit at the right end of the buffer. */ |
485 | + size_t padding = (bytes_to_transfer - register_size (gdbarch, regno)); | 483 | + size_t padding = (bytes_to_transfer - register_size (gdbarch, regno)); |
486 | + regcache->raw_collect (regno, buf + padding); | 484 | + regcache->raw_collect (regno, buf + padding); |
487 | + } | 485 | + } |
488 | + | 486 | + |
489 | + for (i = 0; i < bytes_to_transfer; i += sizeof (long)) | 487 | + for (i = 0; i < bytes_to_transfer; i += sizeof (long)) |
490 | + { | 488 | + { |
491 | + long l; | 489 | + long l; |
492 | + | 490 | + |
493 | + memcpy (&l, &buf[i], sizeof (l)); | 491 | + memcpy (&l, &buf[i], sizeof (l)); |
494 | + errno = 0; | 492 | + errno = 0; |
495 | + ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr, l); | 493 | + ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr, l); |
496 | + regaddr += sizeof (long); | 494 | + regaddr += sizeof (long); |
497 | + | 495 | + |
498 | + if (errno != 0) | 496 | + if (errno != 0) |
499 | + { | 497 | + { |
500 | + char message[128]; | 498 | + char message[128]; |
501 | + sprintf (message, "writing register %s (#%d)", | 499 | + sprintf (message, "writing register %s (#%d)", |
502 | + gdbarch_register_name (gdbarch, regno), regno); | 500 | + gdbarch_register_name (gdbarch, regno), regno); |
503 | + perror_with_name (message); | 501 | + perror_with_name (message); |
504 | + } | 502 | + } |
505 | + } | 503 | + } |
506 | +} | 504 | +} |
507 | + | 505 | + |
508 | +void _initialize_microblaze_linux_nat (void); | 506 | +void _initialize_microblaze_linux_nat (void); |
509 | + | 507 | + |
510 | +void | 508 | +void |
511 | +_initialize_microblaze_linux_nat (void) | 509 | +_initialize_microblaze_linux_nat (void) |
512 | +{ | 510 | +{ |
513 | + /* Register the target. */ | 511 | + /* Register the target. */ |
514 | + linux_target = &the_microblaze_linux_nat_target; | 512 | + linux_target = &the_microblaze_linux_nat_target; |
515 | + add_inf_child_target (linux_target); | 513 | + add_inf_child_target (linux_target); |
516 | +} | 514 | +} |
517 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | 515 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c |
518 | index d6197c49dfd..fc52adffb72 100644 | 516 | index eef09bacec0..d086debc4f8 100644 |
519 | --- a/gdb/microblaze-linux-tdep.c | 517 | --- a/gdb/microblaze-linux-tdep.c |
520 | +++ b/gdb/microblaze-linux-tdep.c | 518 | +++ b/gdb/microblaze-linux-tdep.c |
521 | @@ -37,6 +37,7 @@ | 519 | @@ -37,6 +37,7 @@ |
@@ -563,7 +561,7 @@ index 00000000000..a2c744e2961 | |||
563 | + | 561 | + |
564 | +#endif /* MICROBLAZE_LINUX_TDEP_H */ | 562 | +#endif /* MICROBLAZE_LINUX_TDEP_H */ |
565 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | 563 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c |
566 | index ccd37d085d6..ccb6b730d64 100644 | 564 | index 7c98331f8a9..b0b4c1b2614 100644 |
567 | --- a/gdb/microblaze-tdep.c | 565 | --- a/gdb/microblaze-tdep.c |
568 | +++ b/gdb/microblaze-tdep.c | 566 | +++ b/gdb/microblaze-tdep.c |
569 | @@ -285,6 +285,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, | 567 | @@ -285,6 +285,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, |
@@ -595,7 +593,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
595 | if (ostart_pc > start_pc) | 593 | if (ostart_pc > start_pc) |
596 | return ostart_pc; | 594 | return ostart_pc; |
597 | return start_pc; | 595 | return start_pc; |
598 | @@ -453,6 +456,7 @@ microblaze_frame_cache (struct frame_info *next_frame, void **this_cache) | 596 | @@ -453,6 +456,7 @@ microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache) |
599 | struct microblaze_frame_cache *cache; | 597 | struct microblaze_frame_cache *cache; |
600 | struct gdbarch *gdbarch = get_frame_arch (next_frame); | 598 | struct gdbarch *gdbarch = get_frame_arch (next_frame); |
601 | int rn; | 599 | int rn; |
@@ -603,7 +601,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
603 | 601 | ||
604 | if (*this_cache) | 602 | if (*this_cache) |
605 | return (struct microblaze_frame_cache *) *this_cache; | 603 | return (struct microblaze_frame_cache *) *this_cache; |
606 | @@ -466,10 +470,17 @@ microblaze_frame_cache (struct frame_info *next_frame, void **this_cache) | 604 | @@ -466,10 +470,17 @@ microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache) |
607 | cache->register_offsets[rn] = -1; | 605 | cache->register_offsets[rn] = -1; |
608 | 606 | ||
609 | /* Call for side effects. */ | 607 | /* Call for side effects. */ |
@@ -625,7 +623,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
625 | return cache; | 623 | return cache; |
626 | } | 624 | } |
627 | 625 | ||
628 | @@ -494,6 +505,25 @@ microblaze_frame_prev_register (struct frame_info *this_frame, | 626 | @@ -494,6 +505,25 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, |
629 | struct microblaze_frame_cache *cache = | 627 | struct microblaze_frame_cache *cache = |
630 | microblaze_frame_cache (this_frame, this_cache); | 628 | microblaze_frame_cache (this_frame, this_cache); |
631 | 629 | ||
@@ -651,7 +649,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
651 | if (cache->frameless_p) | 649 | if (cache->frameless_p) |
652 | { | 650 | { |
653 | if (regnum == MICROBLAZE_PC_REGNUM) | 651 | if (regnum == MICROBLAZE_PC_REGNUM) |
654 | @@ -506,7 +536,9 @@ microblaze_frame_prev_register (struct frame_info *this_frame, | 652 | @@ -506,7 +536,9 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, |
655 | else | 653 | else |
656 | return trad_frame_get_prev_register (this_frame, cache->saved_regs, | 654 | return trad_frame_get_prev_register (this_frame, cache->saved_regs, |
657 | regnum); | 655 | regnum); |
@@ -662,8 +660,8 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
662 | } | 660 | } |
663 | 661 | ||
664 | static const struct frame_unwind microblaze_frame_unwind = | 662 | static const struct frame_unwind microblaze_frame_unwind = |
665 | @@ -622,7 +654,106 @@ microblaze_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | 663 | @@ -621,7 +653,106 @@ microblaze_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) |
666 | return (TYPE_LENGTH (type) == 16); | 664 | return (type->length () == 16); |
667 | } | 665 | } |
668 | 666 | ||
669 | - | 667 | - |
@@ -770,7 +768,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
770 | static int dwarf2_to_reg_map[78] = | 768 | static int dwarf2_to_reg_map[78] = |
771 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ | 769 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ |
772 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ | 770 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ |
773 | @@ -790,6 +921,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 771 | @@ -788,6 +919,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
774 | microblaze_breakpoint::bp_from_kind); | 772 | microblaze_breakpoint::bp_from_kind); |
775 | set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | 773 | set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); |
776 | 774 | ||
@@ -780,7 +778,7 @@ index ccd37d085d6..ccb6b730d64 100644 | |||
780 | 778 | ||
781 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | 779 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); |
782 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | 780 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h |
783 | index 2e853d84d72..2415acfe7b6 100644 | 781 | index 07a160a463c..c4c8098308f 100644 |
784 | --- a/gdb/microblaze-tdep.h | 782 | --- a/gdb/microblaze-tdep.h |
785 | +++ b/gdb/microblaze-tdep.h | 783 | +++ b/gdb/microblaze-tdep.h |
786 | @@ -60,11 +60,11 @@ enum microblaze_regnum | 784 | @@ -60,11 +60,11 @@ enum microblaze_regnum |
@@ -832,5 +830,5 @@ index 2e853d84d72..2415acfe7b6 100644 | |||
832 | int frameless_p; | 830 | int frameless_p; |
833 | 831 | ||
834 | -- | 832 | -- |
835 | 2.37.1 (Apple Git-137.1) | 833 | 2.34.1 |
836 | 834 | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch new file mode 100644 index 00000000..a61c17d9 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch | |||
@@ -0,0 +1,1841 @@ | |||
1 | From ff4596845becf48fa17f06ea30a59658e9722e06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Thu, 31 Jan 2019 14:36:00 +0530 | ||
4 | Subject: [PATCH 06/53] Adding 64 bit MB support Added new architecture to | ||
5 | Microblaze 64-bit support to GDB Signed-off-by :Nagaraju Mekala | ||
6 | <nmekala@xilix.com> Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com> | ||
7 | |||
8 | Conflicts: | ||
9 | gdb/Makefile.in | ||
10 | |||
11 | Conflicts: | ||
12 | bfd/cpu-microblaze.c | ||
13 | gdb/microblaze-tdep.c | ||
14 | ld/Makefile.am | ||
15 | ld/Makefile.in | ||
16 | opcodes/microblaze-dis.c | ||
17 | |||
18 | Conflicts: | ||
19 | bfd/configure | ||
20 | gas/config/tc-microblaze.c | ||
21 | ld/Makefile.in | ||
22 | opcodes/microblaze-opcm.h | ||
23 | |||
24 | Conflicts: | ||
25 | gdb/microblaze-tdep.c | ||
26 | |||
27 | Conflicts: | ||
28 | bfd/elf32-microblaze.c | ||
29 | gas/config/tc-microblaze.c | ||
30 | gdb/features/Makefile | ||
31 | gdb/features/microblaze-with-stack-protect.c | ||
32 | gdb/microblaze-tdep.c | ||
33 | gdb/regformats/microblaze-with-stack-protect.dat | ||
34 | gdbserver/linux-microblaze-low.c | ||
35 | include/elf/common.h | ||
36 | |||
37 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
38 | --- | ||
39 | bfd/Makefile.am | 2 + | ||
40 | bfd/Makefile.in | 3 + | ||
41 | bfd/archures.c | 2 + | ||
42 | bfd/bfd-in2.h | 41 ++++- | ||
43 | bfd/config.bfd | 4 + | ||
44 | bfd/configure | 2 + | ||
45 | bfd/cpu-microblaze.c | 55 +++++- | ||
46 | bfd/elf32-microblaze.c | 133 ++++++++++++-- | ||
47 | bfd/libbfd.h | 2 + | ||
48 | bfd/reloc.c | 20 +++ | ||
49 | bfd/targets.c | 6 + | ||
50 | gdb/features/Makefile | 2 + | ||
51 | gdb/features/microblaze-core.xml | 6 +- | ||
52 | gdb/features/microblaze-stack-protect.xml | 4 +- | ||
53 | gdb/features/microblaze-with-stack-protect.c | 8 +- | ||
54 | gdb/features/microblaze.c | 6 +- | ||
55 | gdb/features/microblaze64-core.xml | 69 ++++++++ | ||
56 | gdb/features/microblaze64-stack-protect.xml | 12 ++ | ||
57 | .../microblaze64-with-stack-protect.c | 79 +++++++++ | ||
58 | .../microblaze64-with-stack-protect.xml | 12 ++ | ||
59 | gdb/features/microblaze64.c | 77 +++++++++ | ||
60 | gdb/features/microblaze64.xml | 11 ++ | ||
61 | gdb/microblaze-linux-tdep.c | 36 +++- | ||
62 | gdb/microblaze-tdep.c | 125 ++++++++++---- | ||
63 | gdb/microblaze-tdep.h | 4 +- | ||
64 | include/elf/common.h | 1 + | ||
65 | include/elf/microblaze.h | 2 + | ||
66 | opcodes/microblaze-dis.c | 52 +++--- | ||
67 | opcodes/microblaze-opc.h | 162 ++++++++++++++++-- | ||
68 | opcodes/microblaze-opcm.h | 24 ++- | ||
69 | 30 files changed, 853 insertions(+), 109 deletions(-) | ||
70 | create mode 100644 gdb/features/microblaze64-core.xml | ||
71 | create mode 100644 gdb/features/microblaze64-stack-protect.xml | ||
72 | create mode 100644 gdb/features/microblaze64-with-stack-protect.c | ||
73 | create mode 100644 gdb/features/microblaze64-with-stack-protect.xml | ||
74 | create mode 100644 gdb/features/microblaze64.c | ||
75 | create mode 100644 gdb/features/microblaze64.xml | ||
76 | |||
77 | diff --git a/bfd/Makefile.am b/bfd/Makefile.am | ||
78 | index 4f67b59585d..510f96439b7 100644 | ||
79 | --- a/bfd/Makefile.am | ||
80 | +++ b/bfd/Makefile.am | ||
81 | @@ -568,6 +568,7 @@ BFD64_BACKENDS = \ | ||
82 | elf64-ppc.lo \ | ||
83 | elf64-riscv.lo \ | ||
84 | elf64-s390.lo \ | ||
85 | + elf64-microblaze.lo \ | ||
86 | elf64-sparc.lo \ | ||
87 | elf64-tilegx.lo \ | ||
88 | elf64-x86-64.lo \ | ||
89 | @@ -617,6 +618,7 @@ BFD64_BACKENDS_CFILES = \ | ||
90 | elf64-nfp.c \ | ||
91 | elf64-ppc.c \ | ||
92 | elf64-s390.c \ | ||
93 | + elf64-microblaze.c \ | ||
94 | elf64-sparc.c \ | ||
95 | elf64-tilegx.c \ | ||
96 | elf64-x86-64.c \ | ||
97 | diff --git a/bfd/Makefile.in b/bfd/Makefile.in | ||
98 | index faaa0c424b8..71982d9f729 100644 | ||
99 | --- a/bfd/Makefile.in | ||
100 | +++ b/bfd/Makefile.in | ||
101 | @@ -1036,6 +1036,7 @@ BFD64_BACKENDS = \ | ||
102 | elf64-ppc.lo \ | ||
103 | elf64-riscv.lo \ | ||
104 | elf64-s390.lo \ | ||
105 | + elf64-microblaze.lo \ | ||
106 | elf64-sparc.lo \ | ||
107 | elf64-tilegx.lo \ | ||
108 | elf64-x86-64.lo \ | ||
109 | @@ -1085,6 +1086,7 @@ BFD64_BACKENDS_CFILES = \ | ||
110 | elf64-nfp.c \ | ||
111 | elf64-ppc.c \ | ||
112 | elf64-s390.c \ | ||
113 | + elf64-microblaze.c \ | ||
114 | elf64-sparc.c \ | ||
115 | elf64-tilegx.c \ | ||
116 | elf64-x86-64.c \ | ||
117 | @@ -1661,6 +1663,7 @@ distclean-compile: | ||
118 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@ | ||
119 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-riscv.Plo@am__quote@ | ||
120 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@ | ||
121 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-microblaze.Plo@am__quote@ | ||
122 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@ | ||
123 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-tilegx.Plo@am__quote@ | ||
124 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@ | ||
125 | diff --git a/bfd/archures.c b/bfd/archures.c | ||
126 | index 94118b8d2cf..b9db26627ea 100644 | ||
127 | --- a/bfd/archures.c | ||
128 | +++ b/bfd/archures.c | ||
129 | @@ -515,6 +515,8 @@ DESCRIPTION | ||
130 | . bfd_arch_lm32, {* Lattice Mico32. *} | ||
131 | .#define bfd_mach_lm32 1 | ||
132 | . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} | ||
133 | +.#define bfd_mach_microblaze 1 | ||
134 | +.#define bfd_mach_microblaze64 2 | ||
135 | . bfd_arch_kvx, {* Kalray VLIW core of the MPPA processor family *} | ||
136 | .#define bfd_mach_kv3_unknown 0 | ||
137 | .#define bfd_mach_kv3_1 1 | ||
138 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
139 | index 581d8fe0b3e..7ccc155394d 100644 | ||
140 | --- a/bfd/bfd-in2.h | ||
141 | +++ b/bfd/bfd-in2.h | ||
142 | @@ -1771,6 +1771,8 @@ enum bfd_architecture | ||
143 | bfd_arch_lm32, /* Lattice Mico32. */ | ||
144 | #define bfd_mach_lm32 1 | ||
145 | bfd_arch_microblaze,/* Xilinx MicroBlaze. */ | ||
146 | +#define bfd_mach_microblaze 1 | ||
147 | +#define bfd_mach_microblaze64 2 | ||
148 | bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ | ||
149 | #define bfd_mach_kv3_unknown 0 | ||
150 | #define bfd_mach_kv3_1 1 | ||
151 | @@ -6444,23 +6446,44 @@ enum bfd_reloc_code_real | ||
152 | the form "Symbol Op Symbol". */ | ||
153 | BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, | ||
154 | |||
155 | - /* This is a 32 bit reloc that stores the 32 bit pc relative value in | ||
156 | - two words (with an imm instruction). No relocation is done here - | ||
157 | - only used for relaxing. */ | ||
158 | +/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
159 | +value in two words (with an imm instruction). No relocation is | ||
160 | +done here - only used for relaxing */ | ||
161 | BFD_RELOC_MICROBLAZE_32_NONE, | ||
162 | |||
163 | - /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
164 | - two words (with an imm instruction). No relocation is done here - | ||
165 | - only used for relaxing. */ | ||
166 | - BFD_RELOC_MICROBLAZE_64_NONE, | ||
167 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
168 | + * +value in two words (with an imml instruction). No relocation is | ||
169 | + * +done here - only used for relaxing */ | ||
170 | + BFD_RELOC_MICROBLAZE_64_PCREL, | ||
171 | + | ||
172 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
173 | + * +value in two words (with an imml instruction). No relocation is | ||
174 | + * +done here - only used for relaxing */ | ||
175 | + BFD_RELOC_MICROBLAZE_64, | ||
176 | + | ||
177 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
178 | + * +value in two words (with an imml instruction). No relocation is | ||
179 | + * +done here - only used for relaxing */ | ||
180 | + BFD_RELOC_MICROBLAZE_EA64, | ||
181 | + | ||
182 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
183 | + * +value in two words (with an imm instruction). No relocation is | ||
184 | + * +done here - only used for relaxing */ | ||
185 | + BFD_RELOC_MICROBLAZE_64_NONE, | ||
186 | |||
187 | /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
188 | two words (with an imm instruction). The relocation is PC-relative | ||
189 | GOT offset. */ | ||
190 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
191 | |||
192 | - /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
193 | - two words (with an imm instruction). The relocation is GOT offset. */ | ||
194 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
195 | +value in two words (with an imml instruction). The relocation is | ||
196 | +PC-relative GOT offset */ | ||
197 | + BFD_RELOC_MICROBLAZE_64_GPC, | ||
198 | + | ||
199 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
200 | +value in two words (with an imm instruction). The relocation is | ||
201 | +GOT offset */ | ||
202 | BFD_RELOC_MICROBLAZE_64_GOT, | ||
203 | |||
204 | /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
205 | diff --git a/bfd/config.bfd b/bfd/config.bfd | ||
206 | index bbf12447517..cbba305354f 100644 | ||
207 | --- a/bfd/config.bfd | ||
208 | +++ b/bfd/config.bfd | ||
209 | @@ -884,11 +884,15 @@ case "${targ}" in | ||
210 | microblazeel*-*) | ||
211 | targ_defvec=microblaze_elf32_le_vec | ||
212 | targ_selvecs=microblaze_elf32_vec | ||
213 | + targ64_selvecs=microblaze_elf64_vec | ||
214 | + targ64_selvecs=microblaze_elf64_le_vec | ||
215 | ;; | ||
216 | |||
217 | microblaze*-*) | ||
218 | targ_defvec=microblaze_elf32_vec | ||
219 | targ_selvecs=microblaze_elf32_le_vec | ||
220 | + targ64_selvecs=microblaze_elf64_vec | ||
221 | + targ64_selvecs=microblaze_elf64_le_vec | ||
222 | ;; | ||
223 | |||
224 | #ifdef BFD64 | ||
225 | diff --git a/bfd/configure b/bfd/configure | ||
226 | index 5618c5d3217..3c5b58c33b4 100755 | ||
227 | --- a/bfd/configure | ||
228 | +++ b/bfd/configure | ||
229 | @@ -16016,6 +16016,8 @@ do | ||
230 | rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; | ||
231 | s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; | ||
232 | s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | ||
233 | + microblaze_elf64_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
234 | + microblaze_elf64_le_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
235 | score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
236 | score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
237 | sh_coff_vec) tb="$tb coff-sh.lo $coff" ;; | ||
238 | diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c | ||
239 | index a7af3a17237..caf4fb66826 100644 | ||
240 | --- a/bfd/cpu-microblaze.c | ||
241 | +++ b/bfd/cpu-microblaze.c | ||
242 | @@ -23,13 +23,30 @@ | ||
243 | #include "bfd.h" | ||
244 | #include "libbfd.h" | ||
245 | |||
246 | -const bfd_arch_info_type bfd_microblaze_arch = | ||
247 | +const bfd_arch_info_type bfd_microblaze_arch[] = | ||
248 | +{ | ||
249 | +#if BFD_DEFAULT_TARGET_SIZE == 64 | ||
250 | +{ | ||
251 | + 64, /* 32 bits in a word. */ | ||
252 | + 64, /* 32 bits in an address. */ | ||
253 | + 8, /* 8 bits in a byte. */ | ||
254 | + bfd_arch_microblaze, /* Architecture. */ | ||
255 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
256 | + "microblaze", /* Architecture name. */ | ||
257 | + "MicroBlaze", /* Printable name. */ | ||
258 | + 3, /* Section align power. */ | ||
259 | + false, /* Is this the default architecture ? */ | ||
260 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
261 | + bfd_default_scan, /* String to architecture conversion. */ | ||
262 | + bfd_arch_default_fill, /* Default fill. */ | ||
263 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
264 | +}, | ||
265 | { | ||
266 | 32, /* Bits in a word. */ | ||
267 | 32, /* Bits in an address. */ | ||
268 | 8, /* Bits in a byte. */ | ||
269 | bfd_arch_microblaze, /* Architecture number. */ | ||
270 | - 0, /* Machine number - 0 for now. */ | ||
271 | + bfd_mach_microblaze, /* Machine number - 0 for now. */ | ||
272 | "microblaze", /* Architecture name. */ | ||
273 | "MicroBlaze", /* Printable name. */ | ||
274 | 3, /* Section align power. */ | ||
275 | @@ -39,4 +56,38 @@ const bfd_arch_info_type bfd_microblaze_arch = | ||
276 | bfd_arch_default_fill, /* Default fill. */ | ||
277 | NULL, /* Next in list. */ | ||
278 | 0 /* Maximum offset of a reloc from the start of an insn. */ | ||
279 | +} | ||
280 | +#else | ||
281 | +{ | ||
282 | + 32, /* 32 bits in a word. */ | ||
283 | + 32, /* 32 bits in an address. */ | ||
284 | + 8, /* 8 bits in a byte. */ | ||
285 | + bfd_arch_microblaze, /* Architecture. */ | ||
286 | + bfd_mach_microblaze, /* 32 bit Machine */ | ||
287 | + "microblaze", /* Architecture name. */ | ||
288 | + "MicroBlaze", /* Printable name. */ | ||
289 | + 3, /* Section align power. */ | ||
290 | + true, /* Is this the default architecture ? */ | ||
291 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
292 | + bfd_default_scan, /* String to architecture conversion. */ | ||
293 | + bfd_arch_default_fill, /* Default fill. */ | ||
294 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
295 | +}, | ||
296 | +{ | ||
297 | + 64, /* 32 bits in a word. */ | ||
298 | + 64, /* 32 bits in an address. */ | ||
299 | + 8, /* 8 bits in a byte. */ | ||
300 | + bfd_arch_microblaze, /* Architecture. */ | ||
301 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
302 | + "microblaze", /* Architecture name. */ | ||
303 | + "MicroBlaze", /* Printable name. */ | ||
304 | + 3, /* Section align power. */ | ||
305 | + false, /* Is this the default architecture ? */ | ||
306 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
307 | + bfd_default_scan, /* String to architecture conversion. */ | ||
308 | + bfd_arch_default_fill, /* Default fill. */ | ||
309 | + NULL, /* Next in list. */ | ||
310 | + 0 | ||
311 | +} | ||
312 | +#endif | ||
313 | }; | ||
314 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
315 | index 022ce365c59..7e7c4bf471d 100644 | ||
316 | --- a/bfd/elf32-microblaze.c | ||
317 | +++ b/bfd/elf32-microblaze.c | ||
318 | @@ -114,6 +114,20 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
319 | 0x0000ffff, /* Dest Mask. */ | ||
320 | true), /* PC relative offset? */ | ||
321 | |||
322 | + HOWTO (R_MICROBLAZE_IMML_64, /* Type. */ | ||
323 | + 0, /* Rightshift. */ | ||
324 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
325 | + 16, /* Bitsize. */ | ||
326 | + true, /* PC_relative. */ | ||
327 | + 0, /* Bitpos. */ | ||
328 | + complain_overflow_dont, /* Complain on overflow. */ | ||
329 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
330 | + "R_MICROBLAZE_IMML_64", /* Name. */ | ||
331 | + false, /* Partial Inplace. */ | ||
332 | + 0, /* Source Mask. */ | ||
333 | + 0x0000ffff, /* Dest Mask. */ | ||
334 | + false), /* PC relative offset? */ | ||
335 | + | ||
336 | /* A 64 bit relocation. Table entry not really used. */ | ||
337 | HOWTO (R_MICROBLAZE_64, /* Type. */ | ||
338 | 0, /* Rightshift. */ | ||
339 | @@ -279,6 +293,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
340 | 0x0000ffff, /* Dest Mask. */ | ||
341 | true), /* PC relative offset? */ | ||
342 | |||
343 | + /* A 64 bit GOTPC relocation. Table-entry not really used. */ | ||
344 | + HOWTO (R_MICROBLAZE_GPC_64, /* Type. */ | ||
345 | + 0, /* Rightshift. */ | ||
346 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
347 | + 16, /* Bitsize. */ | ||
348 | + true, /* PC_relative. */ | ||
349 | + 0, /* Bitpos. */ | ||
350 | + complain_overflow_dont, /* Complain on overflow. */ | ||
351 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
352 | + "R_MICROBLAZE_GPC_64", /* Name. */ | ||
353 | + false, /* Partial Inplace. */ | ||
354 | + 0, /* Source Mask. */ | ||
355 | + 0x0000ffff, /* Dest Mask. */ | ||
356 | + true), /* PC relative offset? */ | ||
357 | + | ||
358 | /* A 64 bit GOT relocation. Table-entry not really used. */ | ||
359 | HOWTO (R_MICROBLAZE_GOT_64, /* Type. */ | ||
360 | 0, /* Rightshift. */ | ||
361 | @@ -618,9 +647,15 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
362 | case BFD_RELOC_VTABLE_ENTRY: | ||
363 | microblaze_reloc = R_MICROBLAZE_GNU_VTENTRY; | ||
364 | break; | ||
365 | + case BFD_RELOC_MICROBLAZE_64: | ||
366 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
367 | + break; | ||
368 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
369 | microblaze_reloc = R_MICROBLAZE_GOTPC_64; | ||
370 | break; | ||
371 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
372 | + microblaze_reloc = R_MICROBLAZE_GPC_64; | ||
373 | + break; | ||
374 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
375 | microblaze_reloc = R_MICROBLAZE_GOT_64; | ||
376 | break; | ||
377 | @@ -1582,7 +1617,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, | ||
378 | if (r_symndx == STN_UNDEF || (input_section->flags & SEC_ALLOC) == 0) | ||
379 | { | ||
380 | relocation += addend; | ||
381 | - if (r_type == R_MICROBLAZE_32) | ||
382 | + if (r_type == R_MICROBLAZE_32)// || r_type == R_MICROBLAZE_IMML_64) | ||
383 | bfd_put_32 (input_bfd, relocation, contents + offset); | ||
384 | else | ||
385 | { | ||
386 | @@ -1987,8 +2022,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
387 | else | ||
388 | symval += irel->r_addend; | ||
389 | |||
390 | - if ((symval & 0xffff8000) == 0 | ||
391 | - || (symval & 0xffff8000) == 0xffff8000) | ||
392 | + if ((symval & 0xffff8000) == 0) | ||
393 | { | ||
394 | /* We can delete this instruction. */ | ||
395 | sdata->relax[sdata->relax_count].addr = irel->r_offset; | ||
396 | @@ -2052,16 +2086,45 @@ microblaze_elf_relax_section (bfd *abfd, | ||
397 | irel->r_addend -= calc_fixup (irel->r_addend, 0, sec); | ||
398 | } | ||
399 | break; | ||
400 | + case R_MICROBLAZE_IMML_64: | ||
401 | + { | ||
402 | + /* This was a PC-relative instruction that was | ||
403 | + completely resolved. */ | ||
404 | + int sfix, efix; | ||
405 | + unsigned int val; | ||
406 | + bfd_vma target_address; | ||
407 | + target_address = irel->r_addend + irel->r_offset; | ||
408 | + sfix = calc_fixup (irel->r_offset, 0, sec); | ||
409 | + efix = calc_fixup (target_address, 0, sec); | ||
410 | + | ||
411 | + /* Validate the in-band val. */ | ||
412 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
413 | + if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
414 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
415 | + } | ||
416 | + irel->r_addend -= (efix - sfix); | ||
417 | + /* Should use HOWTO. */ | ||
418 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
419 | + irel->r_addend); | ||
420 | + } | ||
421 | + break; | ||
422 | case R_MICROBLAZE_NONE: | ||
423 | case R_MICROBLAZE_32_NONE: | ||
424 | { | ||
425 | /* This was a PC-relative instruction that was | ||
426 | completely resolved. */ | ||
427 | size_t sfix, efix; | ||
428 | + unsigned int val; | ||
429 | bfd_vma target_address; | ||
430 | target_address = irel->r_addend + irel->r_offset; | ||
431 | sfix = calc_fixup (irel->r_offset, 0, sec); | ||
432 | efix = calc_fixup (target_address, 0, sec); | ||
433 | + | ||
434 | + /* Validate the in-band val. */ | ||
435 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
436 | + if (val != irel->r_addend && ELF32_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
437 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
438 | + } | ||
439 | irel->r_addend -= (efix - sfix); | ||
440 | /* Should use HOWTO. */ | ||
441 | microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset, | ||
442 | @@ -2078,8 +2141,8 @@ microblaze_elf_relax_section (bfd *abfd, | ||
443 | sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); | ||
444 | efix = calc_fixup (target_address, 0, sec); | ||
445 | irel->r_addend -= (efix - sfix); | ||
446 | - microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset | ||
447 | - + INST_WORD_SIZE, irel->r_addend); | ||
448 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
449 | + irel->r_addend); | ||
450 | } | ||
451 | break; | ||
452 | } | ||
453 | @@ -2109,10 +2172,50 @@ microblaze_elf_relax_section (bfd *abfd, | ||
454 | irelscanend = irelocs + o->reloc_count; | ||
455 | for (irelscan = irelocs; irelscan < irelscanend; irelscan++) | ||
456 | { | ||
457 | - if ((ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) | ||
458 | - || (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE)) | ||
459 | - { | ||
460 | - isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
461 | + if (1 && ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE) | ||
462 | + { | ||
463 | + unsigned int val; | ||
464 | + | ||
465 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
466 | + | ||
467 | + /* hax: We only do the following fixup for debug location lists. */ | ||
468 | + if (strcmp(".debug_loc", o->name)) | ||
469 | + continue; | ||
470 | + | ||
471 | + /* This was a PC-relative instruction that was completely resolved. */ | ||
472 | + if (ocontents == NULL) | ||
473 | + { | ||
474 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
475 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
476 | + else | ||
477 | + { | ||
478 | + /* We always cache the section contents. | ||
479 | + Perhaps, if info->keep_memory is FALSE, we | ||
480 | + should free them, if we are permitted to. */ | ||
481 | + | ||
482 | + if (o->rawsize == 0) | ||
483 | + o->rawsize = o->size; | ||
484 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
485 | + if (ocontents == NULL) | ||
486 | + goto error_return; | ||
487 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
488 | + (file_ptr) 0, | ||
489 | + o->rawsize)) | ||
490 | + goto error_return; | ||
491 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
492 | + } | ||
493 | + } | ||
494 | + val = bfd_get_32 (abfd, ocontents + irelscan->r_offset); | ||
495 | + if (val != irelscan->r_addend) { | ||
496 | + fprintf(stderr, "%d: CORRUPT relax reloc! %x %lx\n", __LINE__, val, irelscan->r_addend); | ||
497 | + } | ||
498 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec); | ||
499 | + microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | ||
500 | + irelscan->r_addend); | ||
501 | + } | ||
502 | + if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)// || ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
503 | + { | ||
504 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
505 | |||
506 | /* Look at the reloc only if the value has been resolved. */ | ||
507 | if (isym->st_shndx == shndx | ||
508 | @@ -3510,6 +3613,14 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, | ||
509 | return true; | ||
510 | } | ||
511 | |||
512 | + | ||
513 | +static bool | ||
514 | +elf_microblaze_object_p (bfd *abfd) | ||
515 | +{ | ||
516 | + /* Set the right machine number for an s390 elf32 file. */ | ||
517 | + return bfd_default_set_arch_mach (abfd, bfd_arch_microblaze, bfd_mach_microblaze); | ||
518 | +} | ||
519 | + | ||
520 | /* Hook called by the linker routine which adds symbols from an object | ||
521 | file. We use it to put .comm items in .sbss, and not .bss. */ | ||
522 | |||
523 | @@ -3580,8 +3691,6 @@ microblaze_elf_add_symbol_hook (bfd *abfd, | ||
524 | #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol | ||
525 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | ||
526 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | ||
527 | - | ||
528 | -#define elf_backend_grok_prstatus microblaze_elf_grok_prstatus | ||
529 | -#define elf_backend_grok_psinfo microblaze_elf_grok_psinfo | ||
530 | +#define elf_backend_object_p elf_microblaze_object_p | ||
531 | |||
532 | #include "elf32-target.h" | ||
533 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | ||
534 | index ebd4f24149b..7a3e558d70a 100644 | ||
535 | --- a/bfd/libbfd.h | ||
536 | +++ b/bfd/libbfd.h | ||
537 | @@ -3011,6 +3011,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
538 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
539 | "BFD_RELOC_MICROBLAZE_32_GOTOFF", | ||
540 | "BFD_RELOC_MICROBLAZE_COPY", | ||
541 | + "BFD_RELOC_MICROBLAZE_64", | ||
542 | + "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
543 | "BFD_RELOC_MICROBLAZE_64_TLS", | ||
544 | "BFD_RELOC_MICROBLAZE_64_TLSGD", | ||
545 | "BFD_RELOC_MICROBLAZE_64_TLSLD", | ||
546 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
547 | index e74cbd75e96..fda67e5ffda 100644 | ||
548 | --- a/bfd/reloc.c | ||
549 | +++ b/bfd/reloc.c | ||
550 | @@ -6665,6 +6665,12 @@ ENUMDOC | ||
551 | This is a 32 bit reloc that stores the 32 bit pc relative value in | ||
552 | two words (with an imm instruction). No relocation is done here - | ||
553 | only used for relaxing. | ||
554 | +ENUM | ||
555 | + BFD_RELOC_MICROBLAZE_32_NONE | ||
556 | +ENUMDOC | ||
557 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
558 | + value in two words (with an imm instruction). No relocation is | ||
559 | + done here - only used for relaxing | ||
560 | ENUM | ||
561 | BFD_RELOC_MICROBLAZE_64_NONE | ||
562 | ENUMDOC | ||
563 | @@ -7886,6 +7892,20 @@ ENUMX | ||
564 | ENUMDOC | ||
565 | Tilera TILE-Gx Relocations. | ||
566 | |||
567 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
568 | + to two words (uses imml instruction). | ||
569 | +ENUM | ||
570 | +BFD_RELOC_MICROBLAZE_64, | ||
571 | +ENUMDOC | ||
572 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
573 | + value in two words (with an imml instruction). No relocation is | ||
574 | + done here - only used for relaxing | ||
575 | +ENUM | ||
576 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
577 | +ENUMDOC | ||
578 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
579 | + value in two words (with an imml instruction). No relocation is | ||
580 | + done here - only used for relaxing | ||
581 | ENUM | ||
582 | BFD_RELOC_BPF_64 | ||
583 | ENUMX | ||
584 | diff --git a/bfd/targets.c b/bfd/targets.c | ||
585 | index 3addf2fe373..a9a9b975c82 100644 | ||
586 | --- a/bfd/targets.c | ||
587 | +++ b/bfd/targets.c | ||
588 | @@ -799,6 +799,8 @@ extern const bfd_target mep_elf32_le_vec; | ||
589 | extern const bfd_target metag_elf32_vec; | ||
590 | extern const bfd_target microblaze_elf32_vec; | ||
591 | extern const bfd_target microblaze_elf32_le_vec; | ||
592 | +extern const bfd_target microblaze_elf64_vec; | ||
593 | +extern const bfd_target microblaze_elf64_le_vec; | ||
594 | extern const bfd_target mips_ecoff_be_vec; | ||
595 | extern const bfd_target mips_ecoff_le_vec; | ||
596 | extern const bfd_target mips_ecoff_bele_vec; | ||
597 | @@ -1167,6 +1169,10 @@ static const bfd_target * const _bfd_target_vector[] = | ||
598 | |||
599 | &metag_elf32_vec, | ||
600 | |||
601 | +#ifdef BFD64 | ||
602 | + µblaze_elf64_vec, | ||
603 | + µblaze_elf64_le_vec, | ||
604 | +#endif | ||
605 | µblaze_elf32_vec, | ||
606 | |||
607 | &mips_ecoff_be_vec, | ||
608 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | ||
609 | index 8ac30d8cea3..690f1e94570 100644 | ||
610 | --- a/gdb/features/Makefile | ||
611 | +++ b/gdb/features/Makefile | ||
612 | @@ -102,7 +102,9 @@ OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH)) | ||
613 | # to make on the command line. | ||
614 | XMLTOC = \ | ||
615 | microblaze-with-stack-protect.xml \ | ||
616 | + microblaze64-with-stack-protect.xml \ | ||
617 | microblaze.xml \ | ||
618 | + microblaze64.xml \ | ||
619 | mips-dsp-linux.xml \ | ||
620 | mips-linux.xml \ | ||
621 | mips64-dsp-linux.xml \ | ||
622 | diff --git a/gdb/features/microblaze-core.xml b/gdb/features/microblaze-core.xml | ||
623 | index d1d7d538461..4d77d9d898f 100644 | ||
624 | --- a/gdb/features/microblaze-core.xml | ||
625 | +++ b/gdb/features/microblaze-core.xml | ||
626 | @@ -8,7 +8,7 @@ | ||
627 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
628 | <feature name="org.gnu.gdb.microblaze.core"> | ||
629 | <reg name="r0" bitsize="32" regnum="0"/> | ||
630 | - <reg name="r1" bitsize="32" type="data_ptr"/> | ||
631 | + <reg name="r1" bitsize="32"/> | ||
632 | <reg name="r2" bitsize="32"/> | ||
633 | <reg name="r3" bitsize="32"/> | ||
634 | <reg name="r4" bitsize="32"/> | ||
635 | @@ -39,7 +39,7 @@ | ||
636 | <reg name="r29" bitsize="32"/> | ||
637 | <reg name="r30" bitsize="32"/> | ||
638 | <reg name="r31" bitsize="32"/> | ||
639 | - <reg name="rpc" bitsize="32" type="code_ptr"/> | ||
640 | + <reg name="rpc" bitsize="32"/> | ||
641 | <reg name="rmsr" bitsize="32"/> | ||
642 | <reg name="rear" bitsize="32"/> | ||
643 | <reg name="resr" bitsize="32"/> | ||
644 | @@ -64,4 +64,6 @@ | ||
645 | <reg name="rtlbsx" bitsize="32"/> | ||
646 | <reg name="rtlblo" bitsize="32"/> | ||
647 | <reg name="rtlbhi" bitsize="32"/> | ||
648 | + <reg name="slr" bitsize="32"/> | ||
649 | + <reg name="shr" bitsize="32"/> | ||
650 | </feature> | ||
651 | diff --git a/gdb/features/microblaze-stack-protect.xml b/gdb/features/microblaze-stack-protect.xml | ||
652 | index b5f68403bd5..013240ce798 100644 | ||
653 | --- a/gdb/features/microblaze-stack-protect.xml | ||
654 | +++ b/gdb/features/microblaze-stack-protect.xml | ||
655 | @@ -7,6 +7,6 @@ | ||
656 | |||
657 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
658 | <feature name="org.gnu.gdb.microblaze.stack-protect"> | ||
659 | - <reg name="rslr" bitsize="32"/> | ||
660 | - <reg name="rshr" bitsize="32"/> | ||
661 | + <reg name="slr" bitsize="32"/> | ||
662 | + <reg name="shr" bitsize="32"/> | ||
663 | </feature> | ||
664 | diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c | ||
665 | index 574dc02db67..8ab9565a047 100644 | ||
666 | --- a/gdb/features/microblaze-with-stack-protect.c | ||
667 | +++ b/gdb/features/microblaze-with-stack-protect.c | ||
668 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
669 | |||
670 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
671 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
672 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
673 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
674 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
675 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
676 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
677 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
678 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
679 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
680 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
681 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
682 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
683 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
684 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
685 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
686 | @@ -72,8 +72,8 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
687 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
688 | |||
689 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
690 | - tdesc_create_reg (feature, "rslr", 57, 1, NULL, 32, "int"); | ||
691 | - tdesc_create_reg (feature, "rshr", 58, 1, NULL, 32, "int"); | ||
692 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
693 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
694 | |||
695 | tdesc_microblaze_with_stack_protect = result.release (); | ||
696 | } | ||
697 | diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c | ||
698 | index 8f1fb0a142f..ed12e5bcfd2 100644 | ||
699 | --- a/gdb/features/microblaze.c | ||
700 | +++ b/gdb/features/microblaze.c | ||
701 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze (void) | ||
702 | |||
703 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
704 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
705 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
706 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
707 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
708 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
709 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
710 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze (void) | ||
711 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
712 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
713 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
714 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
715 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
716 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
717 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
718 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
719 | @@ -70,6 +70,8 @@ initialize_tdesc_microblaze (void) | ||
720 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
721 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
722 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
723 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
724 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
725 | |||
726 | tdesc_microblaze = result.release (); | ||
727 | } | ||
728 | diff --git a/gdb/features/microblaze64-core.xml b/gdb/features/microblaze64-core.xml | ||
729 | new file mode 100644 | ||
730 | index 00000000000..96e99e2fb24 | ||
731 | --- /dev/null | ||
732 | +++ b/gdb/features/microblaze64-core.xml | ||
733 | @@ -0,0 +1,69 @@ | ||
734 | +<?xml version="1.0"?> | ||
735 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
736 | + | ||
737 | + Copying and distribution of this file, with or without modification, | ||
738 | + are permitted in any medium without royalty provided the copyright | ||
739 | + notice and this notice are preserved. --> | ||
740 | + | ||
741 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
742 | +<feature name="org.gnu.gdb.microblaze64.core"> | ||
743 | + <reg name="r0" bitsize="64" regnum="0"/> | ||
744 | + <reg name="r1" bitsize="64"/> | ||
745 | + <reg name="r2" bitsize="64"/> | ||
746 | + <reg name="r3" bitsize="64"/> | ||
747 | + <reg name="r4" bitsize="64"/> | ||
748 | + <reg name="r5" bitsize="64"/> | ||
749 | + <reg name="r6" bitsize="64"/> | ||
750 | + <reg name="r7" bitsize="64"/> | ||
751 | + <reg name="r8" bitsize="64"/> | ||
752 | + <reg name="r9" bitsize="64"/> | ||
753 | + <reg name="r10" bitsize="64"/> | ||
754 | + <reg name="r11" bitsize="64"/> | ||
755 | + <reg name="r12" bitsize="64"/> | ||
756 | + <reg name="r13" bitsize="64"/> | ||
757 | + <reg name="r14" bitsize="64"/> | ||
758 | + <reg name="r15" bitsize="64"/> | ||
759 | + <reg name="r16" bitsize="64"/> | ||
760 | + <reg name="r17" bitsize="64"/> | ||
761 | + <reg name="r18" bitsize="64"/> | ||
762 | + <reg name="r19" bitsize="64"/> | ||
763 | + <reg name="r20" bitsize="64"/> | ||
764 | + <reg name="r21" bitsize="64"/> | ||
765 | + <reg name="r22" bitsize="64"/> | ||
766 | + <reg name="r23" bitsize="64"/> | ||
767 | + <reg name="r24" bitsize="64"/> | ||
768 | + <reg name="r25" bitsize="64"/> | ||
769 | + <reg name="r26" bitsize="64"/> | ||
770 | + <reg name="r27" bitsize="64"/> | ||
771 | + <reg name="r28" bitsize="64"/> | ||
772 | + <reg name="r29" bitsize="64"/> | ||
773 | + <reg name="r30" bitsize="64"/> | ||
774 | + <reg name="r31" bitsize="64"/> | ||
775 | + <reg name="rpc" bitsize="64"/> | ||
776 | + <reg name="rmsr" bitsize="32"/> | ||
777 | + <reg name="rear" bitsize="64"/> | ||
778 | + <reg name="resr" bitsize="32"/> | ||
779 | + <reg name="rfsr" bitsize="32"/> | ||
780 | + <reg name="rbtr" bitsize="64"/> | ||
781 | + <reg name="rpvr0" bitsize="32"/> | ||
782 | + <reg name="rpvr1" bitsize="32"/> | ||
783 | + <reg name="rpvr2" bitsize="32"/> | ||
784 | + <reg name="rpvr3" bitsize="32"/> | ||
785 | + <reg name="rpvr4" bitsize="32"/> | ||
786 | + <reg name="rpvr5" bitsize="32"/> | ||
787 | + <reg name="rpvr6" bitsize="32"/> | ||
788 | + <reg name="rpvr7" bitsize="32"/> | ||
789 | + <reg name="rpvr8" bitsize="64"/> | ||
790 | + <reg name="rpvr9" bitsize="64"/> | ||
791 | + <reg name="rpvr10" bitsize="32"/> | ||
792 | + <reg name="rpvr11" bitsize="32"/> | ||
793 | + <reg name="redr" bitsize="32"/> | ||
794 | + <reg name="rpid" bitsize="32"/> | ||
795 | + <reg name="rzpr" bitsize="32"/> | ||
796 | + <reg name="rtlbx" bitsize="32"/> | ||
797 | + <reg name="rtlbsx" bitsize="32"/> | ||
798 | + <reg name="rtlblo" bitsize="32"/> | ||
799 | + <reg name="rtlbhi" bitsize="32"/> | ||
800 | + <reg name="slr" bitsize="64"/> | ||
801 | + <reg name="shr" bitsize="64"/> | ||
802 | +</feature> | ||
803 | diff --git a/gdb/features/microblaze64-stack-protect.xml b/gdb/features/microblaze64-stack-protect.xml | ||
804 | new file mode 100644 | ||
805 | index 00000000000..1bbf5fc3cea | ||
806 | --- /dev/null | ||
807 | +++ b/gdb/features/microblaze64-stack-protect.xml | ||
808 | @@ -0,0 +1,12 @@ | ||
809 | +<?xml version="1.0"?> | ||
810 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
811 | + | ||
812 | + Copying and distribution of this file, with or without modification, | ||
813 | + are permitted in any medium without royalty provided the copyright | ||
814 | + notice and this notice are preserved. --> | ||
815 | + | ||
816 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
817 | +<feature name="org.gnu.gdb.microblaze64.stack-protect"> | ||
818 | + <reg name="slr" bitsize="64"/> | ||
819 | + <reg name="shr" bitsize="64"/> | ||
820 | +</feature> | ||
821 | diff --git a/gdb/features/microblaze64-with-stack-protect.c b/gdb/features/microblaze64-with-stack-protect.c | ||
822 | new file mode 100644 | ||
823 | index 00000000000..a4de4666c76 | ||
824 | --- /dev/null | ||
825 | +++ b/gdb/features/microblaze64-with-stack-protect.c | ||
826 | @@ -0,0 +1,79 @@ | ||
827 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
828 | + Original: microblaze-with-stack-protect.xml */ | ||
829 | + | ||
830 | +#include "defs.h" | ||
831 | +#include "osabi.h" | ||
832 | +#include "target-descriptions.h" | ||
833 | + | ||
834 | +struct target_desc *tdesc_microblaze64_with_stack_protect; | ||
835 | +static void | ||
836 | +initialize_tdesc_microblaze64_with_stack_protect (void) | ||
837 | +{ | ||
838 | + target_desc_up result = allocate_target_description (); | ||
839 | + struct tdesc_feature *feature; | ||
840 | + | ||
841 | + feature = tdesc_create_feature (result.get() , "org.gnu.gdb.microblaze64.core"); | ||
842 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | ||
843 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | ||
844 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | ||
845 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
846 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
847 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
848 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
849 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
850 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
851 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
852 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
853 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
854 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
855 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
856 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
857 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
858 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
859 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
860 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
861 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
862 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
863 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
864 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
865 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
866 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
867 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
868 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
869 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
870 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
871 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
872 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
873 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
874 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
875 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
876 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "int"); | ||
877 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
878 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
879 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
880 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
881 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
882 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
883 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
884 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
885 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
886 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
887 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
888 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
889 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
890 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
891 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
892 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
893 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
894 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
895 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
896 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
897 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
898 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
899 | + | ||
900 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.stack-protect"); | ||
901 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
902 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
903 | + | ||
904 | + tdesc_microblaze64_with_stack_protect = result.release(); | ||
905 | +} | ||
906 | diff --git a/gdb/features/microblaze64-with-stack-protect.xml b/gdb/features/microblaze64-with-stack-protect.xml | ||
907 | new file mode 100644 | ||
908 | index 00000000000..0e9f01611f3 | ||
909 | --- /dev/null | ||
910 | +++ b/gdb/features/microblaze64-with-stack-protect.xml | ||
911 | @@ -0,0 +1,12 @@ | ||
912 | +<?xml version="1.0"?> | ||
913 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
914 | + | ||
915 | + Copying and distribution of this file, with or without modification, | ||
916 | + are permitted in any medium without royalty provided the copyright | ||
917 | + notice and this notice are preserved. --> | ||
918 | + | ||
919 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
920 | +<target> | ||
921 | + <xi:include href="microblaze64-core.xml"/> | ||
922 | + <xi:include href="microblaze64-stack-protect.xml"/> | ||
923 | +</target> | ||
924 | diff --git a/gdb/features/microblaze64.c b/gdb/features/microblaze64.c | ||
925 | new file mode 100644 | ||
926 | index 00000000000..8ab7a90dd95 | ||
927 | --- /dev/null | ||
928 | +++ b/gdb/features/microblaze64.c | ||
929 | @@ -0,0 +1,77 @@ | ||
930 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
931 | + Original: microblaze.xml */ | ||
932 | + | ||
933 | +#include "defs.h" | ||
934 | +#include "osabi.h" | ||
935 | +#include "target-descriptions.h" | ||
936 | + | ||
937 | +struct target_desc *tdesc_microblaze64; | ||
938 | +static void | ||
939 | +initialize_tdesc_microblaze64 (void) | ||
940 | +{ | ||
941 | + target_desc_up result = allocate_target_description (); | ||
942 | + struct tdesc_feature *feature; | ||
943 | + | ||
944 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.core"); | ||
945 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | ||
946 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | ||
947 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | ||
948 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
949 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
950 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
951 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
952 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
953 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
954 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
955 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
956 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
957 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
958 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
959 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
960 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
961 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
962 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
963 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
964 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
965 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
966 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
967 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
968 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
969 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
970 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
971 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
972 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
973 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
974 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
975 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
976 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
977 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
978 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
979 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "uint64"); | ||
980 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
981 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
982 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
983 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
984 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
985 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
986 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
987 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
988 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
989 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
990 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
991 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
992 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
993 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
994 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
995 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
996 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
997 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
998 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
999 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
1000 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
1001 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
1002 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
1003 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
1004 | + | ||
1005 | + tdesc_microblaze64 = result.release(); | ||
1006 | +} | ||
1007 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
1008 | new file mode 100644 | ||
1009 | index 00000000000..515d18e65cf | ||
1010 | --- /dev/null | ||
1011 | +++ b/gdb/features/microblaze64.xml | ||
1012 | @@ -0,0 +1,11 @@ | ||
1013 | +<?xml version="1.0"?> | ||
1014 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
1015 | + | ||
1016 | + Copying and distribution of this file, with or without modification, | ||
1017 | + are permitted in any medium without royalty provided the copyright | ||
1018 | + notice and this notice are preserved. --> | ||
1019 | + | ||
1020 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
1021 | +<target> | ||
1022 | + <xi:include href="microblaze64-core.xml"/> | ||
1023 | +</target> | ||
1024 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
1025 | index d086debc4f8..f34b0fa9fd4 100644 | ||
1026 | --- a/gdb/microblaze-linux-tdep.c | ||
1027 | +++ b/gdb/microblaze-linux-tdep.c | ||
1028 | @@ -40,6 +40,7 @@ | ||
1029 | #include "features/microblaze-linux.c" | ||
1030 | |||
1031 | static int microblaze_debug_flag = 0; | ||
1032 | +int MICROBLAZE_REGISTER_SIZE=4; | ||
1033 | |||
1034 | static void | ||
1035 | microblaze_debug (const char *fmt, ...) | ||
1036 | @@ -55,6 +56,7 @@ microblaze_debug (const char *fmt, ...) | ||
1037 | } | ||
1038 | } | ||
1039 | |||
1040 | +#if 0 | ||
1041 | static int | ||
1042 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1043 | struct bp_target_info *bp_tgt) | ||
1044 | @@ -86,6 +88,8 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1045 | return val; | ||
1046 | } | ||
1047 | |||
1048 | +#endif | ||
1049 | + | ||
1050 | static void | ||
1051 | microblaze_linux_sigtramp_cache (frame_info_ptr next_frame, | ||
1052 | struct trad_frame_cache *this_cache, | ||
1053 | @@ -147,8 +151,8 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
1054 | |||
1055 | linux_init_abi (info, gdbarch, 0); | ||
1056 | |||
1057 | - set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
1058 | - microblaze_linux_memory_remove_breakpoint); | ||
1059 | + // set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
1060 | + // microblaze_linux_memory_remove_breakpoint); | ||
1061 | |||
1062 | /* Shared library handling. */ | ||
1063 | set_solib_svr4_fetch_link_map_offsets (gdbarch, | ||
1064 | @@ -160,10 +164,30 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
1065 | |||
1066 | /* BFD target for core files. */ | ||
1067 | if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
1068 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
1069 | + { | ||
1070 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
1071 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblaze"); | ||
1072 | + MICROBLAZE_REGISTER_SIZE=8; | ||
1073 | + } | ||
1074 | + else | ||
1075 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
1076 | + } | ||
1077 | else | ||
1078 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
1079 | + { | ||
1080 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
1081 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblazeel"); | ||
1082 | + MICROBLAZE_REGISTER_SIZE=8; | ||
1083 | + } | ||
1084 | + else | ||
1085 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
1086 | + } | ||
1087 | |||
1088 | + switch (info.bfd_arch_info->mach) | ||
1089 | + { | ||
1090 | + case bfd_mach_microblaze64: | ||
1091 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
1092 | + break; | ||
1093 | + } | ||
1094 | |||
1095 | /* Shared library handling. */ | ||
1096 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
1097 | @@ -178,7 +202,9 @@ void _initialize_microblaze_linux_tdep (); | ||
1098 | void | ||
1099 | _initialize_microblaze_linux_tdep () | ||
1100 | { | ||
1101 | - gdbarch_register_osabi (bfd_arch_microblaze, 0, GDB_OSABI_LINUX, | ||
1102 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze, GDB_OSABI_LINUX, | ||
1103 | + microblaze_linux_init_abi); | ||
1104 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze64, GDB_OSABI_LINUX, | ||
1105 | microblaze_linux_init_abi); | ||
1106 | initialize_tdesc_microblaze_linux (); | ||
1107 | } | ||
1108 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
1109 | index b0b4c1b2614..7cbbc8986a1 100644 | ||
1110 | --- a/gdb/microblaze-tdep.c | ||
1111 | +++ b/gdb/microblaze-tdep.c | ||
1112 | @@ -40,7 +40,9 @@ | ||
1113 | #include "remote.h" | ||
1114 | |||
1115 | #include "features/microblaze-with-stack-protect.c" | ||
1116 | +#include "features/microblaze64-with-stack-protect.c" | ||
1117 | #include "features/microblaze.c" | ||
1118 | +#include "features/microblaze64.c" | ||
1119 | |||
1120 | /* Instruction macros used for analyzing the prologue. */ | ||
1121 | /* This set of instruction macros need to be changed whenever the | ||
1122 | @@ -75,12 +77,13 @@ static const char * const microblaze_register_names[] = | ||
1123 | "rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6", | ||
1124 | "rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11", | ||
1125 | "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi", | ||
1126 | - "rslr", "rshr" | ||
1127 | + "slr", "shr" | ||
1128 | }; | ||
1129 | |||
1130 | #define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names) | ||
1131 | |||
1132 | static unsigned int microblaze_debug_flag = 0; | ||
1133 | +int reg_size = 4; | ||
1134 | |||
1135 | #define microblaze_debug(fmt, ...) \ | ||
1136 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
1137 | @@ -128,6 +131,15 @@ microblaze_fetch_instruction (CORE_ADDR pc) | ||
1138 | constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT; | ||
1139 | |||
1140 | typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint; | ||
1141 | +static CORE_ADDR | ||
1142 | +microblaze_store_arguments (struct regcache *regcache, int nargs, | ||
1143 | + struct value **args, CORE_ADDR sp, | ||
1144 | + int struct_return, CORE_ADDR struct_addr) | ||
1145 | +{ | ||
1146 | + error (_("store_arguments not implemented")); | ||
1147 | + return sp; | ||
1148 | +} | ||
1149 | +#if 0 | ||
1150 | static int | ||
1151 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1152 | struct bp_target_info *bp_tgt) | ||
1153 | @@ -146,7 +158,6 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1154 | /* Make sure we see the memory breakpoints. */ | ||
1155 | scoped_restore restore_memory | ||
1156 | = make_scoped_restore_show_memory_breakpoints (1); | ||
1157 | - | ||
1158 | val = target_read_memory (addr, old_contents, bplen); | ||
1159 | |||
1160 | /* If our breakpoint is no longer at the address, this means that the | ||
1161 | @@ -161,6 +172,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1162 | return val; | ||
1163 | } | ||
1164 | |||
1165 | +#endif | ||
1166 | /* Allocate and initialize a frame cache. */ | ||
1167 | |||
1168 | static struct microblaze_frame_cache * | ||
1169 | @@ -583,11 +595,11 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache, | ||
1170 | { | ||
1171 | case 1: /* return last byte in the register. */ | ||
1172 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
1173 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1); | ||
1174 | + memcpy(valbuf, buf + reg_size - 1, 1); | ||
1175 | return; | ||
1176 | case 2: /* return last 2 bytes in register. */ | ||
1177 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
1178 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2); | ||
1179 | + memcpy(valbuf, buf + reg_size - 2, 2); | ||
1180 | return; | ||
1181 | case 4: /* for sizes 4 or 8, copy the required length. */ | ||
1182 | case 8: | ||
1183 | @@ -753,6 +765,12 @@ microblaze_software_single_step (struct regcache *regcache) | ||
1184 | } | ||
1185 | #endif | ||
1186 | |||
1187 | +static void | ||
1188 | +microblaze_write_pc (struct regcache *regcache, CORE_ADDR pc) | ||
1189 | +{ | ||
1190 | + regcache_cooked_write_unsigned (regcache, MICROBLAZE_PC_REGNUM, pc); | ||
1191 | +} | ||
1192 | + | ||
1193 | static int dwarf2_to_reg_map[78] = | ||
1194 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ | ||
1195 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ | ||
1196 | @@ -787,13 +805,14 @@ microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) | ||
1197 | static void | ||
1198 | microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
1199 | { | ||
1200 | + | ||
1201 | register_remote_g_packet_guess (gdbarch, | ||
1202 | 4 * MICROBLAZE_NUM_CORE_REGS, | ||
1203 | - tdesc_microblaze); | ||
1204 | + tdesc_microblaze64); | ||
1205 | |||
1206 | register_remote_g_packet_guess (gdbarch, | ||
1207 | 4 * MICROBLAZE_NUM_REGS, | ||
1208 | - tdesc_microblaze_with_stack_protect); | ||
1209 | + tdesc_microblaze64_with_stack_protect); | ||
1210 | } | ||
1211 | |||
1212 | void | ||
1213 | @@ -801,7 +820,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
1214 | struct regcache *regcache, | ||
1215 | int regnum, const void *gregs) | ||
1216 | { | ||
1217 | - const unsigned int *regs = (const unsigned int *)gregs; | ||
1218 | + const gdb_byte *regs = (const gdb_byte *) gregs; | ||
1219 | if (regnum >= 0) | ||
1220 | regcache->raw_supply (regnum, regs + regnum); | ||
1221 | |||
1222 | @@ -809,7 +828,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
1223 | int i; | ||
1224 | |||
1225 | for (i = 0; i < 50; i++) { | ||
1226 | - regcache->raw_supply (i, regs + i); | ||
1227 | + regcache->raw_supply (regnum, regs + i); | ||
1228 | } | ||
1229 | } | ||
1230 | } | ||
1231 | @@ -832,6 +851,17 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
1232 | } | ||
1233 | |||
1234 | |||
1235 | +static void | ||
1236 | +make_regs (struct gdbarch *arch) | ||
1237 | +{ | ||
1238 | + struct gdbarch_tdep *tdep = gdbarch_tdep (arch); | ||
1239 | + int mach = gdbarch_bfd_arch_info (arch)->mach; | ||
1240 | + | ||
1241 | + if (mach == bfd_mach_microblaze64) | ||
1242 | + { | ||
1243 | + set_gdbarch_ptr_bit (arch, 64); | ||
1244 | + } | ||
1245 | +} | ||
1246 | |||
1247 | static struct gdbarch * | ||
1248 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1249 | @@ -844,8 +874,15 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1250 | if (arches != NULL) | ||
1251 | return arches->gdbarch; | ||
1252 | if (tdesc == NULL) | ||
1253 | - tdesc = tdesc_microblaze; | ||
1254 | - | ||
1255 | + { | ||
1256 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1257 | + { | ||
1258 | + tdesc = tdesc_microblaze64; | ||
1259 | + reg_size = 8; | ||
1260 | + } | ||
1261 | + else | ||
1262 | + tdesc = tdesc_microblaze; | ||
1263 | + } | ||
1264 | /* Check any target description for validity. */ | ||
1265 | if (tdesc_has_registers (tdesc)) | ||
1266 | { | ||
1267 | @@ -853,31 +890,42 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1268 | int valid_p; | ||
1269 | int i; | ||
1270 | |||
1271 | - feature = tdesc_find_feature (tdesc, | ||
1272 | - "org.gnu.gdb.microblaze.core"); | ||
1273 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1274 | + feature = tdesc_find_feature (tdesc, | ||
1275 | + "org.gnu.gdb.microblaze64.core"); | ||
1276 | + else | ||
1277 | + feature = tdesc_find_feature (tdesc, | ||
1278 | + "org.gnu.gdb.microblaze.core"); | ||
1279 | if (feature == NULL) | ||
1280 | return NULL; | ||
1281 | tdesc_data = tdesc_data_alloc (); | ||
1282 | |||
1283 | valid_p = 1; | ||
1284 | - for (i = 0; i < MICROBLAZE_NUM_CORE_REGS; i++) | ||
1285 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), i, | ||
1286 | - microblaze_register_names[i]); | ||
1287 | - feature = tdesc_find_feature (tdesc, | ||
1288 | - "org.gnu.gdb.microblaze.stack-protect"); | ||
1289 | + for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
1290 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
1291 | + microblaze_register_names[i]); | ||
1292 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1293 | + feature = tdesc_find_feature (tdesc, | ||
1294 | + "org.gnu.gdb.microblaze64.stack-protect"); | ||
1295 | + else | ||
1296 | + feature = tdesc_find_feature (tdesc, | ||
1297 | + "org.gnu.gdb.microblaze.stack-protect"); | ||
1298 | if (feature != NULL) | ||
1299 | - { | ||
1300 | - valid_p = 1; | ||
1301 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
1302 | - MICROBLAZE_SLR_REGNUM, | ||
1303 | - "rslr"); | ||
1304 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
1305 | - MICROBLAZE_SHR_REGNUM, | ||
1306 | - "rshr"); | ||
1307 | - } | ||
1308 | + { | ||
1309 | + valid_p = 1; | ||
1310 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
1311 | + MICROBLAZE_SLR_REGNUM, | ||
1312 | + "slr"); | ||
1313 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
1314 | + MICROBLAZE_SHR_REGNUM, | ||
1315 | + "shr"); | ||
1316 | + } | ||
1317 | |||
1318 | if (!valid_p) | ||
1319 | - return NULL; | ||
1320 | + { | ||
1321 | + // tdesc_data_cleanup (tdesc_data.get ()); | ||
1322 | + return NULL; | ||
1323 | + } | ||
1324 | } | ||
1325 | |||
1326 | /* Allocate space for the new architecture. */ | ||
1327 | @@ -897,7 +945,17 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1328 | /* Register numbers of various important registers. */ | ||
1329 | set_gdbarch_sp_regnum (gdbarch, MICROBLAZE_SP_REGNUM); | ||
1330 | set_gdbarch_pc_regnum (gdbarch, MICROBLAZE_PC_REGNUM); | ||
1331 | + | ||
1332 | + /* Register set. | ||
1333 | + make_regs (gdbarch); */ | ||
1334 | + switch (info.bfd_arch_info->mach) | ||
1335 | + { | ||
1336 | + case bfd_mach_microblaze64: | ||
1337 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
1338 | + break; | ||
1339 | + } | ||
1340 | |||
1341 | + | ||
1342 | /* Map Dwarf2 registers to GDB registers. */ | ||
1343 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
1344 | |||
1345 | @@ -917,7 +975,9 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1346 | microblaze_breakpoint::kind_from_pc); | ||
1347 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, | ||
1348 | microblaze_breakpoint::bp_from_kind); | ||
1349 | - set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
1350 | +// set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
1351 | + | ||
1352 | +// set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
1353 | |||
1354 | set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
1355 | |||
1356 | @@ -925,7 +985,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1357 | |||
1358 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | ||
1359 | |||
1360 | - microblaze_register_g_packet_guesses (gdbarch); | ||
1361 | + //microblaze_register_g_packet_guesses (gdbarch); | ||
1362 | |||
1363 | frame_base_set_default (gdbarch, µblaze_frame_base); | ||
1364 | |||
1365 | @@ -940,12 +1000,11 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1366 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); | ||
1367 | //frame_base_append_sniffer (gdbarch, microblaze_frame_sniffer); | ||
1368 | |||
1369 | - /* If we have register sets, enable the generic core file support. */ | ||
1370 | + /* If we have register sets, enable the generic core file support. | ||
1371 | if (tdep->gregset) { | ||
1372 | set_gdbarch_iterate_over_regset_sections (gdbarch, | ||
1373 | microblaze_iterate_over_regset_sections); | ||
1374 | - } | ||
1375 | - | ||
1376 | + }*/ | ||
1377 | return gdbarch; | ||
1378 | } | ||
1379 | |||
1380 | @@ -957,6 +1016,8 @@ _initialize_microblaze_tdep () | ||
1381 | |||
1382 | initialize_tdesc_microblaze_with_stack_protect (); | ||
1383 | initialize_tdesc_microblaze (); | ||
1384 | + initialize_tdesc_microblaze64_with_stack_protect (); | ||
1385 | + initialize_tdesc_microblaze64 (); | ||
1386 | /* Debug this files internals. */ | ||
1387 | add_setshow_zuinteger_cmd ("microblaze", class_maintenance, | ||
1388 | µblaze_debug_flag, _("\ | ||
1389 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
1390 | index c4c8098308f..81f7f30cb8e 100644 | ||
1391 | --- a/gdb/microblaze-tdep.h | ||
1392 | +++ b/gdb/microblaze-tdep.h | ||
1393 | @@ -28,7 +28,7 @@ struct microblaze_gregset | ||
1394 | microblaze_gregset() {} | ||
1395 | unsigned int gregs[32]; | ||
1396 | unsigned int fpregs[32]; | ||
1397 | - unsigned int pregs[16]; | ||
1398 | + unsigned int pregs[18]; | ||
1399 | }; | ||
1400 | |||
1401 | struct microblaze_gdbarch_tdep : gdbarch_tdep_base | ||
1402 | @@ -134,7 +134,7 @@ struct microblaze_frame_cache | ||
1403 | struct trad_frame_saved_reg *saved_regs; | ||
1404 | }; | ||
1405 | /* All registers are 32 bits. */ | ||
1406 | -#define MICROBLAZE_REGISTER_SIZE 4 | ||
1407 | +//#define MICROBLAZE_REGISTER_SIZE 8 | ||
1408 | |||
1409 | /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used. | ||
1410 | Only used for native debugging. */ | ||
1411 | diff --git a/include/elf/common.h b/include/elf/common.h | ||
1412 | index 6a66456cd22..11f5d1a3cc9 100644 | ||
1413 | --- a/include/elf/common.h | ||
1414 | +++ b/include/elf/common.h | ||
1415 | @@ -360,6 +360,7 @@ | ||
1416 | #define EM_U16_U8CORE 260 /* LAPIS nX-U16/U8 */ | ||
1417 | #define EM_TACHYUM 261 /* Tachyum */ | ||
1418 | #define EM_56800EF 262 /* NXP 56800EF Digital Signal Controller (DSC) */ | ||
1419 | +#define EM_MB_64 263 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ | ||
1420 | |||
1421 | /* If it is necessary to assign new unofficial EM_* values, please pick large | ||
1422 | random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision | ||
1423 | diff --git a/include/elf/microblaze.h b/include/elf/microblaze.h | ||
1424 | index a48b1358efd..c515f15bfb8 100644 | ||
1425 | --- a/include/elf/microblaze.h | ||
1426 | +++ b/include/elf/microblaze.h | ||
1427 | @@ -62,6 +62,8 @@ START_RELOC_NUMBERS (elf_microblaze_reloc_type) | ||
1428 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_64, 31) /* TEXT Entry offset 64-bit. */ | ||
1429 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_32_LO, 32) /* TEXT Entry offset 32-bit. */ | ||
1430 | RELOC_NUMBER (R_MICROBLAZE_32_NONE, 33) | ||
1431 | + RELOC_NUMBER (R_MICROBLAZE_IMML_64, 34) | ||
1432 | + RELOC_NUMBER (R_MICROBLAZE_GPC_64, 35) /* GOT entry offset. */ | ||
1433 | END_RELOC_NUMBERS (R_MICROBLAZE_max) | ||
1434 | |||
1435 | /* Global base address names. */ | ||
1436 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
1437 | index 3d696325803..ee447cecc3f 100644 | ||
1438 | --- a/opcodes/microblaze-dis.c | ||
1439 | +++ b/opcodes/microblaze-dis.c | ||
1440 | @@ -33,6 +33,7 @@ | ||
1441 | #define get_field_r1(buf, instr) get_field (buf, instr, RA_MASK, RA_LOW) | ||
1442 | #define get_field_r2(buf, instr) get_field (buf, instr, RB_MASK, RB_LOW) | ||
1443 | #define get_int_field_imm(instr) ((instr & IMM_MASK) >> IMM_LOW) | ||
1444 | +#define get_int_field_imml(instr) ((instr & IMML_MASK) >> IMM_LOW) | ||
1445 | #define get_int_field_r1(instr) ((instr & RA_MASK) >> RA_LOW) | ||
1446 | |||
1447 | #define NUM_STRBUFS 4 | ||
1448 | @@ -73,11 +74,20 @@ get_field_imm (struct string_buf *buf, long instr) | ||
1449 | } | ||
1450 | |||
1451 | static char * | ||
1452 | -get_field_imm5 (struct string_buf *buf, long instr) | ||
1453 | +get_field_imml (struct string_buf *buf, long instr) | ||
1454 | { | ||
1455 | char *p = strbuf (buf); | ||
1456 | |||
1457 | - sprintf (p, "%d", (short)((instr & IMM5_MASK) >> IMM_LOW)); | ||
1458 | + sprintf (p, "%d", (int)((instr & IMML_MASK) >> IMM_LOW)); | ||
1459 | + return p; | ||
1460 | +} | ||
1461 | + | ||
1462 | +static char * | ||
1463 | +get_field_imms (struct string_buf *buf, long instr) | ||
1464 | +{ | ||
1465 | + char *p = strbuf (buf); | ||
1466 | + | ||
1467 | + sprintf (p, "%d", (short)((instr & IMM6_MASK) >> IMM_LOW)); | ||
1468 | return p; | ||
1469 | } | ||
1470 | |||
1471 | @@ -96,12 +106,9 @@ get_field_immw (struct string_buf *buf, long instr) | ||
1472 | char *p = strbuf (buf); | ||
1473 | |||
1474 | if (instr & 0x00004000) | ||
1475 | - sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) | ||
1476 | - >> IMM_WIDTH_LOW))); /* bsefi */ | ||
1477 | - else | ||
1478 | - sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) >> | ||
1479 | - IMM_WIDTH_LOW) - ((instr & IMM5_MASK) >> | ||
1480 | - IMM_LOW) + 1)); /* bsifi */ | ||
1481 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW))); /* bsefi */ | ||
1482 | + else | ||
1483 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW) - ((instr & IMM6_MASK) >> IMM_LOW) + 1)); /* bsifi */ | ||
1484 | return p; | ||
1485 | } | ||
1486 | |||
1487 | @@ -311,9 +318,14 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1488 | } | ||
1489 | } | ||
1490 | break; | ||
1491 | - case INST_TYPE_RD_R1_IMM5: | ||
1492 | + case INST_TYPE_RD_R1_IMML: | ||
1493 | + print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
1494 | + get_field_r1(&buf, inst), get_field_imm (&buf, inst)); | ||
1495 | + /* TODO: Also print symbol */ | ||
1496 | + break; | ||
1497 | + case INST_TYPE_RD_R1_IMMS: | ||
1498 | print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
1499 | - get_field_r1 (&buf, inst), get_field_imm5 (&buf, inst)); | ||
1500 | + get_field_r1(&buf, inst), get_field_imms (&buf, inst)); | ||
1501 | break; | ||
1502 | case INST_TYPE_RD_RFSL: | ||
1503 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
1504 | @@ -417,9 +429,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1505 | } | ||
1506 | } | ||
1507 | break; | ||
1508 | - case INST_TYPE_RD_R2: | ||
1509 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
1510 | - get_field_r2 (&buf, inst)); | ||
1511 | + case INST_TYPE_IMML: | ||
1512 | + print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
1513 | + /* TODO: Also print symbol */ | ||
1514 | + break; | ||
1515 | + case INST_TYPE_RD_R2: | ||
1516 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_r2 (&buf, inst)); | ||
1517 | break; | ||
1518 | case INST_TYPE_R2: | ||
1519 | print_func (stream, "\t%s", get_field_r2 (&buf, inst)); | ||
1520 | @@ -442,15 +457,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1521 | /* For mbar 16 or sleep insn. */ | ||
1522 | case INST_TYPE_NONE: | ||
1523 | break; | ||
1524 | - /* For bit field insns. */ | ||
1525 | + /* For bit field insns. */ | ||
1526 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
1527 | - print_func (stream, "\t%s, %s, %s, %s", | ||
1528 | - get_field_rd (&buf, inst), | ||
1529 | - get_field_r1 (&buf, inst), | ||
1530 | - get_field_immw (&buf, inst), | ||
1531 | - get_field_imm5 (&buf, inst)); | ||
1532 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
1533 | + get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
1534 | break; | ||
1535 | - /* For tuqula instruction */ | ||
1536 | + /* For tuqula instruction */ | ||
1537 | case INST_TYPE_RD: | ||
1538 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
1539 | break; | ||
1540 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
1541 | index fe23b0af56a..afc1220e357 100644 | ||
1542 | --- a/opcodes/microblaze-opc.h | ||
1543 | +++ b/opcodes/microblaze-opc.h | ||
1544 | @@ -40,7 +40,7 @@ | ||
1545 | #define INST_TYPE_RD_SPECIAL 11 | ||
1546 | #define INST_TYPE_R1 12 | ||
1547 | /* New instn type for barrel shift imms. */ | ||
1548 | -#define INST_TYPE_RD_R1_IMM5 13 | ||
1549 | +#define INST_TYPE_RD_R1_IMMS 13 | ||
1550 | #define INST_TYPE_RD_RFSL 14 | ||
1551 | #define INST_TYPE_R1_RFSL 15 | ||
1552 | |||
1553 | @@ -62,6 +62,11 @@ | ||
1554 | /* For bsefi and bsifi */ | ||
1555 | #define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
1556 | |||
1557 | +/* For 64-bit instructions */ | ||
1558 | +#define INST_TYPE_IMML 22 | ||
1559 | +#define INST_TYPE_RD_R1_IMML 23 | ||
1560 | +#define INST_TYPE_R1_IMML 24 | ||
1561 | + | ||
1562 | #define INST_TYPE_NONE 25 | ||
1563 | |||
1564 | |||
1565 | @@ -91,15 +96,14 @@ | ||
1566 | #define OPCODE_MASK_H24 0xFC1F07FF /* High 6, bits 20-16 and low 11 bits. */ | ||
1567 | #define OPCODE_MASK_H124 0xFFFF07FF /* High 16, and low 11 bits. */ | ||
1568 | #define OPCODE_MASK_H1234 0xFFFFFFFF /* All 32 bits. */ | ||
1569 | -#define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22. */ | ||
1570 | -#define OPCODE_MASK_H3B 0xFC00F9E0 /* High 6 bits and bits 16:20 and | ||
1571 | - bits 23:26. */ | ||
1572 | +#define OPCODE_MASK_H3 0xFC000700 /* High 6 bits and bits 21, 22, 23. */ | ||
1573 | +#define OPCODE_MASK_H3B 0xFC00E600 /* High 6 bits and bits 16, 17, 18, 21, 22. */ | ||
1574 | #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21. */ | ||
1575 | -#define OPCODE_MASK_H32B 0xFC00F820 /* High 6 bits and bits 16:20 and | ||
1576 | - bit 26 */ | ||
1577 | +#define OPCODE_MASK_H32B 0xFC00E000 /* High 6 bits and bit 16, 17, 18. */ | ||
1578 | #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits. */ | ||
1579 | #define OPCODE_MASK_H35B 0xFC0004FF /* High 6 bits and low 9 bits. */ | ||
1580 | #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */ | ||
1581 | +#define OPCODE_MASK_H8 0xFF000000 /* High 8 bits only. */ | ||
1582 | |||
1583 | /* New Mask for msrset, msrclr insns. */ | ||
1584 | #define OPCODE_MASK_H23N 0xFC1F8000 /* High 6 and bits 11 - 16. */ | ||
1585 | @@ -109,7 +113,7 @@ | ||
1586 | #define DELAY_SLOT 1 | ||
1587 | #define NO_DELAY_SLOT 0 | ||
1588 | |||
1589 | -#define MAX_OPCODES 291 | ||
1590 | +#define MAX_OPCODES 412 | ||
1591 | |||
1592 | const struct op_code_struct | ||
1593 | { | ||
1594 | @@ -127,6 +131,7 @@ const struct op_code_struct | ||
1595 | /* More info about output format here. */ | ||
1596 | } microblaze_opcodes[MAX_OPCODES] = | ||
1597 | { | ||
1598 | + /* 32-bit instructions */ | ||
1599 | {"add", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000000, OPCODE_MASK_H4, add, arithmetic_inst }, | ||
1600 | {"rsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H4, rsub, arithmetic_inst }, | ||
1601 | {"addc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000000, OPCODE_MASK_H4, addc, arithmetic_inst }, | ||
1602 | @@ -163,9 +168,9 @@ const struct op_code_struct | ||
1603 | {"ncget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C006000, OPCODE_MASK_H32, ncget, anyware_inst }, | ||
1604 | {"ncput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00E000, OPCODE_MASK_H32, ncput, anyware_inst }, | ||
1605 | {"muli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x60000000, OPCODE_MASK_H, muli, mult_inst }, | ||
1606 | - {"bslli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3B, bslli, barrel_shift_inst }, | ||
1607 | - {"bsrai", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3B, bsrai, barrel_shift_inst }, | ||
1608 | - {"bsrli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3B, bsrli, barrel_shift_inst }, | ||
1609 | + {"bslli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3B, bslli, barrel_shift_inst }, | ||
1610 | + {"bsrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3B, bsrai, barrel_shift_inst }, | ||
1611 | + {"bsrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3B, bsrli, barrel_shift_inst }, | ||
1612 | {"bsefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64004000, OPCODE_MASK_H32B, bsefi, barrel_shift_inst }, | ||
1613 | {"bsifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64008000, OPCODE_MASK_H32B, bsifi, barrel_shift_inst }, | ||
1614 | {"or", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000000, OPCODE_MASK_H4, microblaze_or, logical_inst }, | ||
1615 | @@ -269,9 +274,7 @@ const struct op_code_struct | ||
1616 | {"la", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* la translates to addik. */ | ||
1617 | {"tuqula",INST_TYPE_RD, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3000002A, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* tuqula rd translates to addik rd, r0, 42. */ | ||
1618 | {"not", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA800FFFF, OPCODE_MASK_H34, invalid_inst, logical_inst }, /* not translates to xori rd,ra,-1. */ | ||
1619 | - {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
1620 | {"rtb", INST_TYPE_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB6000004, OPCODE_MASK_H1, invalid_inst, return_inst }, /* rtb translates to rts rd, 4. */ | ||
1621 | - {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
1622 | {"lmi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE8000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, | ||
1623 | {"smi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xF8000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, | ||
1624 | {"msrset",INST_TYPE_RD_IMM15, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x94100000, OPCODE_MASK_H23N, msrset, special_inst }, | ||
1625 | @@ -427,7 +430,131 @@ const struct op_code_struct | ||
1626 | {"suspend", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBB020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 24. */ | ||
1627 | {"swapb", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E0, OPCODE_MASK_H4, swapb, arithmetic_inst }, | ||
1628 | {"swaph", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E2, OPCODE_MASK_H4, swaph, arithmetic_inst }, | ||
1629 | - {NULL, 0, 0, 0, 0, 0, 0, 0, 0}, | ||
1630 | + /* 64-bit instructions */ | ||
1631 | + {"addl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000100, OPCODE_MASK_H4, addl, arithmetic_inst }, | ||
1632 | + {"rsubl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000100, OPCODE_MASK_H4, rsubl, arithmetic_inst }, | ||
1633 | + {"addlc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000100, OPCODE_MASK_H4, addlc, arithmetic_inst }, | ||
1634 | + {"rsublc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x0C000100, OPCODE_MASK_H4, rsublc, arithmetic_inst }, | ||
1635 | + {"addlk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x10000100, OPCODE_MASK_H4, addlk, arithmetic_inst }, | ||
1636 | + {"rsublk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000100, OPCODE_MASK_H4, rsublk, arithmetic_inst }, | ||
1637 | + {"addlkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x18000100, OPCODE_MASK_H4, addlkc, arithmetic_inst }, | ||
1638 | + {"rsublkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x1C000100, OPCODE_MASK_H4, rsublkc, arithmetic_inst }, | ||
1639 | + {"cmpl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000101, OPCODE_MASK_H4, cmpl, arithmetic_inst }, | ||
1640 | + {"cmplu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000103, OPCODE_MASK_H4, cmplu, arithmetic_inst }, | ||
1641 | + {"addli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x20000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1642 | + {"rsubli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x24000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1643 | + {"addlic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x28000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1644 | + {"rsublic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x2C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1645 | + {"addlik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1646 | + {"rsublik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x34000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1647 | + {"addlikc", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x38000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1648 | + {"rsublikc",INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1649 | + {"mull", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x40000100, OPCODE_MASK_H4, mull, mult_inst }, | ||
1650 | + {"bslll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000500, OPCODE_MASK_H3, bslll, barrel_shift_inst }, | ||
1651 | + {"bslra", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000300, OPCODE_MASK_H3, bslra, barrel_shift_inst }, | ||
1652 | + {"bslrl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000100, OPCODE_MASK_H3, bslrl, barrel_shift_inst }, | ||
1653 | + {"bsllli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002400, OPCODE_MASK_H3B, bsllli, barrel_shift_inst }, | ||
1654 | + {"bslrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002200, OPCODE_MASK_H3B, bslrai, barrel_shift_inst }, | ||
1655 | + {"bslrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002000, OPCODE_MASK_H3B, bslrli, barrel_shift_inst }, | ||
1656 | + {"bslefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64006000, OPCODE_MASK_H32B, bslefi, barrel_shift_inst }, | ||
1657 | + {"bslifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6400a000, OPCODE_MASK_H32B, bslifi, barrel_shift_inst }, | ||
1658 | + {"orl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000100, OPCODE_MASK_H4, orl, logical_inst }, | ||
1659 | + {"andl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000100, OPCODE_MASK_H4, andl, logical_inst }, | ||
1660 | + {"xorl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000100, OPCODE_MASK_H4, xorl, logical_inst }, | ||
1661 | + {"andnl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000100, OPCODE_MASK_H4, andnl, logical_inst }, | ||
1662 | + {"pcmplbf", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000500, OPCODE_MASK_H4, pcmplbf, logical_inst }, | ||
1663 | + {"pcmpleq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000500, OPCODE_MASK_H4, pcmpleq, logical_inst }, | ||
1664 | + {"pcmplne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000500, OPCODE_MASK_H4, pcmplne, logical_inst }, | ||
1665 | + {"srla", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000101, OPCODE_MASK_H34, srla, logical_inst }, | ||
1666 | + {"srlc", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000121, OPCODE_MASK_H34, srlc, logical_inst }, | ||
1667 | + {"srll", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000141, OPCODE_MASK_H34, srll, logical_inst }, | ||
1668 | + {"sextl8", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000160, OPCODE_MASK_H34, sextl8, logical_inst }, | ||
1669 | + {"sextl16", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000161, OPCODE_MASK_H34, sextl16, logical_inst }, | ||
1670 | + {"sextl32", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000162, OPCODE_MASK_H34, sextl32, logical_inst }, | ||
1671 | + {"brea", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98010000, OPCODE_MASK_H124, brea, branch_inst }, | ||
1672 | + {"bread", INST_TYPE_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98110000, OPCODE_MASK_H124, bread, branch_inst }, | ||
1673 | + {"breald", INST_TYPE_RD_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98150000, OPCODE_MASK_H24, breald, branch_inst }, | ||
1674 | + {"beaeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000000, OPCODE_MASK_H14, beaeq, branch_inst }, | ||
1675 | + {"bealeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000100, OPCODE_MASK_H14, bealeq, branch_inst }, | ||
1676 | + {"beaeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000000, OPCODE_MASK_H14, beaeqd, branch_inst }, | ||
1677 | + {"bealeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000100, OPCODE_MASK_H14, bealeqd, branch_inst }, | ||
1678 | + {"beane", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200000, OPCODE_MASK_H14, beane, branch_inst }, | ||
1679 | + {"bealne", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200100, OPCODE_MASK_H14, bealne, branch_inst }, | ||
1680 | + {"beaned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200000, OPCODE_MASK_H14, beaned, branch_inst }, | ||
1681 | + {"bealned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200100, OPCODE_MASK_H14, bealned, branch_inst }, | ||
1682 | + {"bealt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400000, OPCODE_MASK_H14, bealt, branch_inst }, | ||
1683 | + {"beallt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400100, OPCODE_MASK_H14, beallt, branch_inst }, | ||
1684 | + {"bealtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400000, OPCODE_MASK_H14, bealtd, branch_inst }, | ||
1685 | + {"bealltd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400100, OPCODE_MASK_H14, bealltd, branch_inst }, | ||
1686 | + {"beale", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600000, OPCODE_MASK_H14, beale, branch_inst }, | ||
1687 | + {"bealle", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600100, OPCODE_MASK_H14, bealle, branch_inst }, | ||
1688 | + {"bealed", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600000, OPCODE_MASK_H14, bealed, branch_inst }, | ||
1689 | + {"bealled", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600100, OPCODE_MASK_H14, bealled, branch_inst }, | ||
1690 | + {"beagt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800000, OPCODE_MASK_H14, beagt, branch_inst }, | ||
1691 | + {"bealgt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800100, OPCODE_MASK_H14, bealgt, branch_inst }, | ||
1692 | + {"beagtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800000, OPCODE_MASK_H14, beagtd, branch_inst }, | ||
1693 | + {"bealgtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800100, OPCODE_MASK_H14, bealgtd, branch_inst }, | ||
1694 | + {"beage", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00000, OPCODE_MASK_H14, beage, branch_inst }, | ||
1695 | + {"bealge", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00100, OPCODE_MASK_H14, bealge, branch_inst }, | ||
1696 | + {"beaged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00000, OPCODE_MASK_H14, beaged, branch_inst }, | ||
1697 | + {"bealged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00100, OPCODE_MASK_H14, bealged, branch_inst }, | ||
1698 | + {"orli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA0000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1699 | + {"andli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA4000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1700 | + {"xorli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA8000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1701 | + {"andnli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xAC000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1702 | + {"imml", INST_TYPE_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB2000000, OPCODE_MASK_H8, imml, immediate_inst }, | ||
1703 | + {"breai", INST_TYPE_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8010000, OPCODE_MASK_H12, breai, branch_inst }, | ||
1704 | + {"breaid", INST_TYPE_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8110000, OPCODE_MASK_H12, breaid, branch_inst }, | ||
1705 | + {"brealid", INST_TYPE_RD_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8150000, OPCODE_MASK_H2, brealid, branch_inst }, | ||
1706 | + {"beaeqi", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, beaeqi, branch_inst }, | ||
1707 | + {"bealeqi", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqi */ | ||
1708 | + {"beaeqid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, beaeqid, branch_inst }, | ||
1709 | + {"bealeqid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqid */ | ||
1710 | + {"beanei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, beanei, branch_inst }, | ||
1711 | + {"bealnei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beanei */ | ||
1712 | + {"beaneid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, beaneid, branch_inst }, | ||
1713 | + {"bealneid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaneid */ | ||
1714 | + {"bealti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, bealti, branch_inst }, | ||
1715 | + {"beallti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealti */ | ||
1716 | + {"bealtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, bealtid, branch_inst }, | ||
1717 | + {"bealltid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealtid */ | ||
1718 | + {"bealei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, bealei, branch_inst }, | ||
1719 | + {"beallei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealei */ | ||
1720 | + {"bealeid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, bealeid, branch_inst }, | ||
1721 | + {"bealleid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealeid */ | ||
1722 | + {"beagti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, beagti, branch_inst }, | ||
1723 | + {"bealgti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagti */ | ||
1724 | + {"beagtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, beagtid, branch_inst }, | ||
1725 | + {"bealgtid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagtid */ | ||
1726 | + {"beagei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, beagei, branch_inst }, | ||
1727 | + {"bealgei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagei */ | ||
1728 | + {"beageid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, beageid, branch_inst }, | ||
1729 | + {"bealgeid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beageid */ | ||
1730 | + {"ll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000100, OPCODE_MASK_H4, ll, memory_load_inst }, | ||
1731 | + {"llr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000300, OPCODE_MASK_H4, llr, memory_load_inst }, | ||
1732 | + {"sl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000100, OPCODE_MASK_H4, sl, memory_store_inst }, | ||
1733 | + {"slr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000300, OPCODE_MASK_H4, slr, memory_store_inst }, | ||
1734 | + {"lli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xEC000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, /* Identical to 32-bit */ | ||
1735 | + {"sli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xFC000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, /* Identical to 32-bit */ | ||
1736 | + {"lla", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* lla translates to addlik */ | ||
1737 | + {"dadd", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000400, OPCODE_MASK_H4, dadd, arithmetic_inst }, | ||
1738 | + {"drsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000480, OPCODE_MASK_H4, drsub, arithmetic_inst }, | ||
1739 | + {"dmul", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000500, OPCODE_MASK_H4, dmul, arithmetic_inst }, | ||
1740 | + {"ddiv", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000580, OPCODE_MASK_H4, ddiv, arithmetic_inst }, | ||
1741 | + {"dcmp.lt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000610, OPCODE_MASK_H4, dcmp_lt, arithmetic_inst }, | ||
1742 | + {"dcmp.eq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000620, OPCODE_MASK_H4, dcmp_eq, arithmetic_inst }, | ||
1743 | + {"dcmp.le", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000630, OPCODE_MASK_H4, dcmp_le, arithmetic_inst }, | ||
1744 | + {"dcmp.gt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000640, OPCODE_MASK_H4, dcmp_gt, arithmetic_inst }, | ||
1745 | + {"dcmp.ne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000650, OPCODE_MASK_H4, dcmp_ne, arithmetic_inst }, | ||
1746 | + {"dcmp.ge", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000660, OPCODE_MASK_H4, dcmp_ge, arithmetic_inst }, | ||
1747 | + {"dcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000600, OPCODE_MASK_H4, dcmp_un, arithmetic_inst }, | ||
1748 | + {"dbl", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000680, OPCODE_MASK_H4, dbl, arithmetic_inst }, | ||
1749 | + {"dlong", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000700, OPCODE_MASK_H4, dlong, arithmetic_inst }, | ||
1750 | + {"dsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000780, OPCODE_MASK_H4, dsqrt, arithmetic_inst }, | ||
1751 | + {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
1752 | + {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
1753 | + | ||
1754 | + {"", 0, 0, 0, 0, 0, 0, 0, 0}, | ||
1755 | }; | ||
1756 | |||
1757 | /* Prefix for register names. */ | ||
1758 | @@ -447,8 +574,17 @@ char pvr_register_prefix[] = "rpvr"; | ||
1759 | #define MIN_IMM5 ((int) 0x00000000) | ||
1760 | #define MAX_IMM5 ((int) 0x0000001f) | ||
1761 | |||
1762 | +#define MIN_IMM6 ((int) 0x00000000) | ||
1763 | +#define MAX_IMM6 ((int) 0x0000003f) | ||
1764 | + | ||
1765 | #define MIN_IMM_WIDTH ((int) 0x00000001) | ||
1766 | #define MAX_IMM_WIDTH ((int) 0x00000020) | ||
1767 | |||
1768 | +#define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
1769 | +#define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
1770 | + | ||
1771 | +#define MIN_IMML ((long) 0xffffff8000000000L) | ||
1772 | +#define MAX_IMML ((long) 0x0000007fffffffffL) | ||
1773 | + | ||
1774 | #endif /* MICROBLAZE_OPC */ | ||
1775 | |||
1776 | diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h | ||
1777 | index cb8d3a59949..08ed44352ee 100644 | ||
1778 | --- a/opcodes/microblaze-opcm.h | ||
1779 | +++ b/opcodes/microblaze-opcm.h | ||
1780 | @@ -25,6 +25,7 @@ | ||
1781 | |||
1782 | enum microblaze_instr | ||
1783 | { | ||
1784 | + /* 32-bit instructions */ | ||
1785 | add, rsub, addc, rsubc, addk, rsubk, addkc, rsubkc, clz, cmp, cmpu, | ||
1786 | addi, rsubi, addic, rsubic, addik, rsubik, addikc, rsubikc, mul, | ||
1787 | mulh, mulhu, mulhsu, swapb, swaph, | ||
1788 | @@ -39,8 +40,8 @@ enum microblaze_instr | ||
1789 | imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid, | ||
1790 | brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti, | ||
1791 | bgtid, bgei, bgeid, lbu, lbuea, lbur, lhu, lhuea, lhur, lw, lwea, lwr, lwx, | ||
1792 | - sb, sbea, sbr, sh, shea, shr, sw, swea, swr, swx, lbui, lhui, lwi, | ||
1793 | - sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
1794 | + sb, sbea, sbr, sh, shea, shr, sw, swea, swr, swx, lbui, lhui, lwi, lli, | ||
1795 | + sbi, shi, sli, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
1796 | fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, | ||
1797 | /* 'fsqrt' is a glibc:math.h symbol. */ | ||
1798 | fint, microblaze_fsqrt, | ||
1799 | @@ -59,6 +60,18 @@ enum microblaze_instr | ||
1800 | aputd, taputd, caputd, tcaputd, naputd, tnaputd, ncaputd, tncaputd, | ||
1801 | eagetd, teagetd, ecagetd, tecagetd, neagetd, tneagetd, necagetd, tnecagetd, | ||
1802 | eaputd, teaputd, ecaputd, tecaputd, neaputd, tneaputd, necaputd, tnecaputd, | ||
1803 | + | ||
1804 | + /* 64-bit instructions */ | ||
1805 | + addl, rsubl, addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
1806 | + bslll, bslra, bslrl, bsllli, bslrai, bslrli, bslefi, bslifi, orl, andl, xorl, | ||
1807 | + andnl, pcmplbf, pcmpleq, pcmplne, srla, srlc, srll, sextl8, sextl16, sextl32, | ||
1808 | + brea, bread, breald, beaeq, bealeq, beaeqd, bealeqd, beane, bealne, beaned, | ||
1809 | + bealned, bealt, beallt, bealtd, bealltd, beale, bealle, bealed, bealled, beagt, | ||
1810 | + bealgt, beagtd, bealgtd, beage, bealge, beaged, bealged, breai, breaid, brealid, | ||
1811 | + beaeqi, beaeqid, beanei, beaneid, bealti, bealtid, bealei, bealeid, beagti, | ||
1812 | + beagtid, beagei, beageid, imml, ll, llr, sl, slr, | ||
1813 | + dadd, drsub, dmul, ddiv, dcmp_lt, dcmp_eq, dcmp_le, dcmp_gt, dcmp_ne, dcmp_ge, | ||
1814 | + dcmp_un, dbl, dlong, dsqrt, | ||
1815 | invalid_inst | ||
1816 | }; | ||
1817 | |||
1818 | @@ -136,15 +149,18 @@ enum microblaze_instr_type | ||
1819 | #define RA_MASK 0x001F0000 | ||
1820 | #define RB_MASK 0x0000F800 | ||
1821 | #define IMM_MASK 0x0000FFFF | ||
1822 | +#define IMML_MASK 0x00FFFFFF | ||
1823 | |||
1824 | -/* Imm mask for barrel shifts. */ | ||
1825 | +/* Imm masks for barrel shifts. */ | ||
1826 | #define IMM5_MASK 0x0000001F | ||
1827 | +#define IMM6_MASK 0x0000003F | ||
1828 | |||
1829 | /* Imm mask for mbar. */ | ||
1830 | #define IMM5_MBAR_MASK 0x03E00000 | ||
1831 | |||
1832 | -/* Imm mask for extract/insert width. */ | ||
1833 | +/* Imm masks for extract/insert width. */ | ||
1834 | #define IMM5_WIDTH_MASK 0x000007C0 | ||
1835 | +#define IMM6_WIDTH_MASK 0x00000FC0 | ||
1836 | |||
1837 | /* FSL imm mask for get, put instructions. */ | ||
1838 | #define RFSL_MASK 0x000000F | ||
1839 | -- | ||
1840 | 2.34.1 | ||
1841 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch index 9d12cc53..a744bcb4 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch | |||
@@ -1,23 +1,20 @@ | |||
1 | From ef411b49f3b2c9e4048eb273f43ab4ee96f96b7e Mon Sep 17 00:00:00 2001 | 1 | From 6c699df5c33f13ea3226d144f544d5a295edcf17 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 19 Apr 2021 14:33:27 +0530 | 3 | Date: Mon, 19 Apr 2021 14:33:27 +0530 |
4 | Subject: [PATCH 6/8] [Patch,MicroBlaze] : these changes will make 64 bit | 4 | Subject: [PATCH 07/53] these changes will make 64 bit vectors as default |
5 | vectors as default target types when we built gdb with microblaze 64 bit type | 5 | target types when we built gdb with microblaze 64 bit type targets,for |
6 | targets,for instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64 | 6 | instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64 |
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | 7 | ||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | 9 | --- |
13 | bfd/config.bfd | 8 ++++++++ | 10 | bfd/config.bfd | 8 ++++++++ |
14 | 1 file changed, 8 insertions(+) | 11 | 1 file changed, 8 insertions(+) |
15 | 12 | ||
16 | diff --git a/bfd/config.bfd b/bfd/config.bfd | 13 | diff --git a/bfd/config.bfd b/bfd/config.bfd |
17 | index 5e9ba3d9805..deb3d078439 100644 | 14 | index cbba305354f..f7134608693 100644 |
18 | --- a/bfd/config.bfd | 15 | --- a/bfd/config.bfd |
19 | +++ b/bfd/config.bfd | 16 | +++ b/bfd/config.bfd |
20 | @@ -856,7 +856,15 @@ case "${targ}" in | 17 | @@ -880,7 +880,15 @@ case "${targ}" in |
21 | targ_defvec=metag_elf32_vec | 18 | targ_defvec=metag_elf32_vec |
22 | targ_underscore=yes | 19 | targ_underscore=yes |
23 | ;; | 20 | ;; |
@@ -34,5 +31,5 @@ index 5e9ba3d9805..deb3d078439 100644 | |||
34 | targ_defvec=microblaze_elf32_le_vec | 31 | targ_defvec=microblaze_elf32_le_vec |
35 | targ_selvecs=microblaze_elf32_vec | 32 | targ_selvecs=microblaze_elf32_vec |
36 | -- | 33 | -- |
37 | 2.37.1 (Apple Git-137.1) | 34 | 2.34.1 |
38 | 35 | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch index 6eea28fe..10517953 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch | |||
@@ -1,591 +1,21 @@ | |||
1 | From 6aadc445a00275c37112e431c6a29f5a331e6e16 Mon Sep 17 00:00:00 2001 | 1 | From 815e641399628fcde8e13f925e4a6d3bc565a762 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 31 Jan 2019 14:36:00 +0530 | 3 | Date: Tue, 9 Nov 2021 16:19:17 +0530 |
4 | Subject: [PATCH 5/8] [Patch, microblaze]: Adding 64 bit MB support Added new | 4 | Subject: [PATCH 08/53] Added m64 abi for 64 bit target descriptions. set m64 |
5 | architecture to Microblaze 64-bit support to GDB Signed-off-by :Nagaraju | 5 | abi for 64 bit elf. |
6 | Mekala <nmekala@xilix.com> Signed-off-by :Mahesh Bodapati | ||
7 | <mbodapat@xilinx.com> | ||
8 | 6 | ||
9 | Conflicts: | 7 | Conflicts: |
10 | gdb/Makefile.in | ||
11 | |||
12 | Conflicts: | ||
13 | bfd/cpu-microblaze.c | ||
14 | gdb/microblaze-tdep.c | 8 | gdb/microblaze-tdep.c |
15 | ld/Makefile.am | 9 | gdb/microblaze-tdep.h |
16 | ld/Makefile.in | ||
17 | opcodes/microblaze-dis.c | ||
18 | |||
19 | Conflicts: | ||
20 | bfd/configure | ||
21 | gas/config/tc-microblaze.c | ||
22 | ld/Makefile.in | ||
23 | opcodes/microblaze-opcm.h | ||
24 | |||
25 | Conflicts: | ||
26 | gdb/microblaze-tdep.c | ||
27 | |||
28 | Conflicts: | ||
29 | bfd/elf32-microblaze.c | ||
30 | gas/config/tc-microblaze.c | ||
31 | gdb/features/Makefile | ||
32 | gdb/features/microblaze-with-stack-protect.c | ||
33 | gdb/microblaze-tdep.c | ||
34 | gdb/regformats/microblaze-with-stack-protect.dat | ||
35 | gdbserver/linux-microblaze-low.c | ||
36 | include/elf/common.h | ||
37 | Upstream-Status: Pending | ||
38 | |||
39 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
40 | 10 | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
41 | --- | 12 | --- |
42 | bfd/Makefile.am | 2 + | 13 | bfd/elf64-microblaze.c | 3810 ++++++++++++++++++++++++++++++++++++++++ |
43 | bfd/Makefile.in | 3 + | 14 | gdb/microblaze-tdep.c | 160 +- |
44 | bfd/archures.c | 2 + | 15 | gdb/microblaze-tdep.h | 13 +- |
45 | bfd/bfd-in2.h | 31 +- | 16 | 3 files changed, 3975 insertions(+), 8 deletions(-) |
46 | bfd/config.bfd | 4 + | ||
47 | bfd/configure | 2 + | ||
48 | bfd/cpu-microblaze.c | 55 +- | ||
49 | bfd/elf32-microblaze.c | 162 +- | ||
50 | bfd/elf64-microblaze.c | 3810 +++++++++++++++++ | ||
51 | bfd/libbfd.h | 3 + | ||
52 | bfd/reloc.c | 20 + | ||
53 | bfd/targets.c | 6 + | ||
54 | gdb/features/Makefile | 2 + | ||
55 | gdb/features/microblaze-core.xml | 6 +- | ||
56 | gdb/features/microblaze-stack-protect.xml | 4 +- | ||
57 | gdb/features/microblaze-with-stack-protect.c | 8 +- | ||
58 | gdb/features/microblaze.c | 6 +- | ||
59 | gdb/features/microblaze64-core.xml | 69 + | ||
60 | gdb/features/microblaze64-stack-protect.xml | 12 + | ||
61 | .../microblaze64-with-stack-protect.c | 79 + | ||
62 | .../microblaze64-with-stack-protect.xml | 12 + | ||
63 | gdb/features/microblaze64.c | 77 + | ||
64 | gdb/features/microblaze64.xml | 11 + | ||
65 | gdb/microblaze-linux-tdep.c | 36 +- | ||
66 | gdb/microblaze-tdep.c | 126 +- | ||
67 | gdb/microblaze-tdep.h | 4 +- | ||
68 | include/elf/common.h | 1 + | ||
69 | include/elf/microblaze.h | 4 + | ||
70 | opcodes/microblaze-dis.c | 51 +- | ||
71 | opcodes/microblaze-opc.h | 180 +- | ||
72 | opcodes/microblaze-opcm.h | 36 +- | ||
73 | 31 files changed, 4729 insertions(+), 95 deletions(-) | ||
74 | create mode 100755 bfd/elf64-microblaze.c | 17 | create mode 100755 bfd/elf64-microblaze.c |
75 | create mode 100644 gdb/features/microblaze64-core.xml | ||
76 | create mode 100644 gdb/features/microblaze64-stack-protect.xml | ||
77 | create mode 100644 gdb/features/microblaze64-with-stack-protect.c | ||
78 | create mode 100644 gdb/features/microblaze64-with-stack-protect.xml | ||
79 | create mode 100644 gdb/features/microblaze64.c | ||
80 | create mode 100644 gdb/features/microblaze64.xml | ||
81 | 18 | ||
82 | diff --git a/bfd/Makefile.am b/bfd/Makefile.am | ||
83 | index b9a3f8207ac..2ddd7891661 100644 | ||
84 | --- a/bfd/Makefile.am | ||
85 | +++ b/bfd/Makefile.am | ||
86 | @@ -571,6 +571,7 @@ BFD64_BACKENDS = \ | ||
87 | elf64-riscv.lo \ | ||
88 | elfxx-riscv.lo \ | ||
89 | elf64-s390.lo \ | ||
90 | + elf64-microblaze.lo \ | ||
91 | elf64-sparc.lo \ | ||
92 | elf64-tilegx.lo \ | ||
93 | elf64-x86-64.lo \ | ||
94 | @@ -608,6 +609,7 @@ BFD64_BACKENDS_CFILES = \ | ||
95 | elf64-nfp.c \ | ||
96 | elf64-ppc.c \ | ||
97 | elf64-s390.c \ | ||
98 | + elf64-microblaze.c \ | ||
99 | elf64-sparc.c \ | ||
100 | elf64-tilegx.c \ | ||
101 | elf64-x86-64.c \ | ||
102 | diff --git a/bfd/Makefile.in b/bfd/Makefile.in | ||
103 | index 934dd4bc066..7efb10f111d 100644 | ||
104 | --- a/bfd/Makefile.in | ||
105 | +++ b/bfd/Makefile.in | ||
106 | @@ -1040,6 +1040,7 @@ BFD64_BACKENDS = \ | ||
107 | elf64-riscv.lo \ | ||
108 | elfxx-riscv.lo \ | ||
109 | elf64-s390.lo \ | ||
110 | + elf64-microblaze.lo \ | ||
111 | elf64-sparc.lo \ | ||
112 | elf64-tilegx.lo \ | ||
113 | elf64-x86-64.lo \ | ||
114 | @@ -1077,6 +1078,7 @@ BFD64_BACKENDS_CFILES = \ | ||
115 | elf64-nfp.c \ | ||
116 | elf64-ppc.c \ | ||
117 | elf64-s390.c \ | ||
118 | + elf64-microblaze.c \ | ||
119 | elf64-sparc.c \ | ||
120 | elf64-tilegx.c \ | ||
121 | elf64-x86-64.c \ | ||
122 | @@ -1664,6 +1666,7 @@ distclean-compile: | ||
123 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@ | ||
124 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-riscv.Plo@am__quote@ | ||
125 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@ | ||
126 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-microblaze.Plo@am__quote@ | ||
127 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@ | ||
128 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-tilegx.Plo@am__quote@ | ||
129 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@ | ||
130 | diff --git a/bfd/archures.c b/bfd/archures.c | ||
131 | index fac9fe82a08..1790c741c58 100644 | ||
132 | --- a/bfd/archures.c | ||
133 | +++ b/bfd/archures.c | ||
134 | @@ -524,6 +524,8 @@ DESCRIPTION | ||
135 | . bfd_arch_lm32, {* Lattice Mico32. *} | ||
136 | .#define bfd_mach_lm32 1 | ||
137 | . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} | ||
138 | +.#define bfd_mach_microblaze 1 | ||
139 | +.#define bfd_mach_microblaze64 2 | ||
140 | . bfd_arch_tilepro, {* Tilera TILEPro. *} | ||
141 | . bfd_arch_tilegx, {* Tilera TILE-Gx. *} | ||
142 | .#define bfd_mach_tilepro 1 | ||
143 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
144 | index c0b563aec02..ccaeecb9476 100644 | ||
145 | --- a/bfd/bfd-in2.h | ||
146 | +++ b/bfd/bfd-in2.h | ||
147 | @@ -1903,6 +1903,8 @@ enum bfd_architecture | ||
148 | bfd_arch_lm32, /* Lattice Mico32. */ | ||
149 | #define bfd_mach_lm32 1 | ||
150 | bfd_arch_microblaze,/* Xilinx MicroBlaze. */ | ||
151 | +#define bfd_mach_microblaze 1 | ||
152 | +#define bfd_mach_microblaze64 2 | ||
153 | bfd_arch_tilepro, /* Tilera TILEPro. */ | ||
154 | bfd_arch_tilegx, /* Tilera TILE-Gx. */ | ||
155 | #define bfd_mach_tilepro 1 | ||
156 | @@ -5443,16 +5445,41 @@ value relative to the read-write small data area anchor */ | ||
157 | expressions of the form "Symbol Op Symbol" */ | ||
158 | BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, | ||
159 | |||
160 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
161 | +/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
162 | value in two words (with an imm instruction). No relocation is | ||
163 | done here - only used for relaxing */ | ||
164 | - BFD_RELOC_MICROBLAZE_64_NONE, | ||
165 | + BFD_RELOC_MICROBLAZE_32_NONE, | ||
166 | + | ||
167 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
168 | + * +value in two words (with an imml instruction). No relocation is | ||
169 | + * +done here - only used for relaxing */ | ||
170 | + BFD_RELOC_MICROBLAZE_64_PCREL, | ||
171 | + | ||
172 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
173 | + * +value in two words (with an imml instruction). No relocation is | ||
174 | + * +done here - only used for relaxing */ | ||
175 | + BFD_RELOC_MICROBLAZE_64, | ||
176 | + | ||
177 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
178 | + * +value in two words (with an imml instruction). No relocation is | ||
179 | + * +done here - only used for relaxing */ | ||
180 | + BFD_RELOC_MICROBLAZE_EA64, | ||
181 | + | ||
182 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
183 | + * +value in two words (with an imm instruction). No relocation is | ||
184 | + * +done here - only used for relaxing */ | ||
185 | + BFD_RELOC_MICROBLAZE_64_NONE, | ||
186 | |||
187 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
188 | value in two words (with an imm instruction). The relocation is | ||
189 | PC-relative GOT offset */ | ||
190 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
191 | |||
192 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
193 | +value in two words (with an imml instruction). The relocation is | ||
194 | +PC-relative GOT offset */ | ||
195 | + BFD_RELOC_MICROBLAZE_64_GPC, | ||
196 | + | ||
197 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
198 | value in two words (with an imm instruction). The relocation is | ||
199 | GOT offset */ | ||
200 | diff --git a/bfd/config.bfd b/bfd/config.bfd | ||
201 | index 872685cfb72..5e9ba3d9805 100644 | ||
202 | --- a/bfd/config.bfd | ||
203 | +++ b/bfd/config.bfd | ||
204 | @@ -860,11 +860,15 @@ case "${targ}" in | ||
205 | microblazeel*-*) | ||
206 | targ_defvec=microblaze_elf32_le_vec | ||
207 | targ_selvecs=microblaze_elf32_vec | ||
208 | + targ64_selvecs=microblaze_elf64_vec | ||
209 | + targ64_selvecs=microblaze_elf64_le_vec | ||
210 | ;; | ||
211 | |||
212 | microblaze*-*) | ||
213 | targ_defvec=microblaze_elf32_vec | ||
214 | targ_selvecs=microblaze_elf32_le_vec | ||
215 | + targ64_selvecs=microblaze_elf64_vec | ||
216 | + targ64_selvecs=microblaze_elf64_le_vec | ||
217 | ;; | ||
218 | |||
219 | #ifdef BFD64 | ||
220 | diff --git a/bfd/configure b/bfd/configure | ||
221 | index 0ef4c206fb0..b7547c6777c 100755 | ||
222 | --- a/bfd/configure | ||
223 | +++ b/bfd/configure | ||
224 | @@ -13547,6 +13547,8 @@ do | ||
225 | rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; | ||
226 | s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; | ||
227 | s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | ||
228 | + microblaze_elf64_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
229 | + microblaze_elf64_le_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
230 | score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
231 | score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
232 | sh_coff_vec) tb="$tb coff-sh.lo $coff" ;; | ||
233 | diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c | ||
234 | index 0c1d2b1aa69..106f78229b5 100644 | ||
235 | --- a/bfd/cpu-microblaze.c | ||
236 | +++ b/bfd/cpu-microblaze.c | ||
237 | @@ -23,13 +23,30 @@ | ||
238 | #include "bfd.h" | ||
239 | #include "libbfd.h" | ||
240 | |||
241 | -const bfd_arch_info_type bfd_microblaze_arch = | ||
242 | +const bfd_arch_info_type bfd_microblaze_arch[] = | ||
243 | +{ | ||
244 | +#if BFD_DEFAULT_TARGET_SIZE == 64 | ||
245 | +{ | ||
246 | + 64, /* 32 bits in a word. */ | ||
247 | + 64, /* 32 bits in an address. */ | ||
248 | + 8, /* 8 bits in a byte. */ | ||
249 | + bfd_arch_microblaze, /* Architecture. */ | ||
250 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
251 | + "microblaze", /* Architecture name. */ | ||
252 | + "MicroBlaze", /* Printable name. */ | ||
253 | + 3, /* Section align power. */ | ||
254 | + false, /* Is this the default architecture ? */ | ||
255 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
256 | + bfd_default_scan, /* String to architecture conversion. */ | ||
257 | + bfd_arch_default_fill, /* Default fill. */ | ||
258 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
259 | +}, | ||
260 | { | ||
261 | 32, /* Bits in a word. */ | ||
262 | 32, /* Bits in an address. */ | ||
263 | 8, /* Bits in a byte. */ | ||
264 | bfd_arch_microblaze, /* Architecture number. */ | ||
265 | - 0, /* Machine number - 0 for now. */ | ||
266 | + bfd_mach_microblaze, /* Machine number - 0 for now. */ | ||
267 | "microblaze", /* Architecture name. */ | ||
268 | "MicroBlaze", /* Printable name. */ | ||
269 | 3, /* Section align power. */ | ||
270 | @@ -39,4 +56,38 @@ const bfd_arch_info_type bfd_microblaze_arch = | ||
271 | bfd_arch_default_fill, /* Default fill. */ | ||
272 | NULL, /* Next in list. */ | ||
273 | 0 /* Maximum offset of a reloc from the start of an insn. */ | ||
274 | +} | ||
275 | +#else | ||
276 | +{ | ||
277 | + 32, /* 32 bits in a word. */ | ||
278 | + 32, /* 32 bits in an address. */ | ||
279 | + 8, /* 8 bits in a byte. */ | ||
280 | + bfd_arch_microblaze, /* Architecture. */ | ||
281 | + bfd_mach_microblaze, /* 32 bit Machine */ | ||
282 | + "microblaze", /* Architecture name. */ | ||
283 | + "MicroBlaze", /* Printable name. */ | ||
284 | + 3, /* Section align power. */ | ||
285 | + true, /* Is this the default architecture ? */ | ||
286 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
287 | + bfd_default_scan, /* String to architecture conversion. */ | ||
288 | + bfd_arch_default_fill, /* Default fill. */ | ||
289 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
290 | +}, | ||
291 | +{ | ||
292 | + 64, /* 32 bits in a word. */ | ||
293 | + 64, /* 32 bits in an address. */ | ||
294 | + 8, /* 8 bits in a byte. */ | ||
295 | + bfd_arch_microblaze, /* Architecture. */ | ||
296 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
297 | + "microblaze", /* Architecture name. */ | ||
298 | + "MicroBlaze", /* Printable name. */ | ||
299 | + 3, /* Section align power. */ | ||
300 | + false, /* Is this the default architecture ? */ | ||
301 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
302 | + bfd_default_scan, /* String to architecture conversion. */ | ||
303 | + bfd_arch_default_fill, /* Default fill. */ | ||
304 | + NULL, /* Next in list. */ | ||
305 | + 0 | ||
306 | +} | ||
307 | +#endif | ||
308 | }; | ||
309 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
310 | index d3b3c66cf00..053c1b432f9 100644 | ||
311 | --- a/bfd/elf32-microblaze.c | ||
312 | +++ b/bfd/elf32-microblaze.c | ||
313 | @@ -114,6 +114,20 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
314 | 0x0000ffff, /* Dest Mask. */ | ||
315 | true), /* PC relative offset? */ | ||
316 | |||
317 | + HOWTO (R_MICROBLAZE_IMML_64, /* Type. */ | ||
318 | + 0, /* Rightshift. */ | ||
319 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
320 | + 16, /* Bitsize. */ | ||
321 | + true, /* PC_relative. */ | ||
322 | + 0, /* Bitpos. */ | ||
323 | + complain_overflow_dont, /* Complain on overflow. */ | ||
324 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
325 | + "R_MICROBLAZE_IMML_64", /* Name. */ | ||
326 | + false, /* Partial Inplace. */ | ||
327 | + 0, /* Source Mask. */ | ||
328 | + 0x0000ffff, /* Dest Mask. */ | ||
329 | + false), /* PC relative offset? */ | ||
330 | + | ||
331 | /* A 64 bit relocation. Table entry not really used. */ | ||
332 | HOWTO (R_MICROBLAZE_64, /* Type. */ | ||
333 | 0, /* Rightshift. */ | ||
334 | @@ -174,7 +188,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
335 | 0x0000ffff, /* Dest Mask. */ | ||
336 | false), /* PC relative offset? */ | ||
337 | |||
338 | - /* This reloc does nothing. Used for relaxation. */ | ||
339 | + HOWTO (R_MICROBLAZE_32_NONE, /* Type. */ | ||
340 | + 0, /* Rightshift. */ | ||
341 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
342 | + 32, /* Bitsize. */ | ||
343 | + true, /* PC_relative. */ | ||
344 | + 0, /* Bitpos. */ | ||
345 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
346 | + NULL, /* Special Function. */ | ||
347 | + "R_MICROBLAZE_32_NONE",/* Name. */ | ||
348 | + false, /* Partial Inplace. */ | ||
349 | + 0, /* Source Mask. */ | ||
350 | + 0, /* Dest Mask. */ | ||
351 | + false), /* PC relative offset? */ | ||
352 | + | ||
353 | + /* This reloc does nothing. Used for relaxation. */ | ||
354 | HOWTO (R_MICROBLAZE_64_NONE, /* Type. */ | ||
355 | 0, /* Rightshift. */ | ||
356 | 3, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
357 | @@ -264,6 +292,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
358 | 0x0000ffff, /* Dest Mask. */ | ||
359 | true), /* PC relative offset? */ | ||
360 | |||
361 | + /* A 64 bit GOTPC relocation. Table-entry not really used. */ | ||
362 | + HOWTO (R_MICROBLAZE_GPC_64, /* Type. */ | ||
363 | + 0, /* Rightshift. */ | ||
364 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
365 | + 16, /* Bitsize. */ | ||
366 | + true, /* PC_relative. */ | ||
367 | + 0, /* Bitpos. */ | ||
368 | + complain_overflow_dont, /* Complain on overflow. */ | ||
369 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
370 | + "R_MICROBLAZE_GPC_64", /* Name. */ | ||
371 | + false, /* Partial Inplace. */ | ||
372 | + 0, /* Source Mask. */ | ||
373 | + 0x0000ffff, /* Dest Mask. */ | ||
374 | + true), /* PC relative offset? */ | ||
375 | + | ||
376 | /* A 64 bit GOT relocation. Table-entry not really used. */ | ||
377 | HOWTO (R_MICROBLAZE_GOT_64, /* Type. */ | ||
378 | 0, /* Rightshift. */ | ||
379 | @@ -560,6 +603,9 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
380 | case BFD_RELOC_NONE: | ||
381 | microblaze_reloc = R_MICROBLAZE_NONE; | ||
382 | break; | ||
383 | + case BFD_RELOC_MICROBLAZE_32_NONE: | ||
384 | + microblaze_reloc = R_MICROBLAZE_32_NONE; | ||
385 | + break; | ||
386 | case BFD_RELOC_MICROBLAZE_64_NONE: | ||
387 | microblaze_reloc = R_MICROBLAZE_64_NONE; | ||
388 | break; | ||
389 | @@ -600,9 +646,15 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
390 | case BFD_RELOC_VTABLE_ENTRY: | ||
391 | microblaze_reloc = R_MICROBLAZE_GNU_VTENTRY; | ||
392 | break; | ||
393 | + case BFD_RELOC_MICROBLAZE_64: | ||
394 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
395 | + break; | ||
396 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
397 | microblaze_reloc = R_MICROBLAZE_GOTPC_64; | ||
398 | break; | ||
399 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
400 | + microblaze_reloc = R_MICROBLAZE_GPC_64; | ||
401 | + break; | ||
402 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
403 | microblaze_reloc = R_MICROBLAZE_GOT_64; | ||
404 | break; | ||
405 | @@ -1507,9 +1559,9 @@ microblaze_elf_relocate_section (bfd *output_bfd, | ||
406 | relocation += addend; | ||
407 | relocation -= dtprel_base(info); | ||
408 | bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
409 | - contents + offset + 2); | ||
410 | + contents + offset + endian); | ||
411 | bfd_put_16 (input_bfd, relocation & 0xffff, | ||
412 | - contents + offset + 2 + INST_WORD_SIZE); | ||
413 | + contents + offset + endian + INST_WORD_SIZE); | ||
414 | break; | ||
415 | case (int) R_MICROBLAZE_TEXTREL_64: | ||
416 | case (int) R_MICROBLAZE_TEXTREL_32_LO: | ||
417 | @@ -1523,7 +1575,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, | ||
418 | if (r_symndx == STN_UNDEF || (input_section->flags & SEC_ALLOC) == 0) | ||
419 | { | ||
420 | relocation += addend; | ||
421 | - if (r_type == R_MICROBLAZE_32) | ||
422 | + if (r_type == R_MICROBLAZE_32)// || r_type == R_MICROBLAZE_IMML_64) | ||
423 | bfd_put_32 (input_bfd, relocation, contents + offset); | ||
424 | else | ||
425 | { | ||
426 | @@ -1925,8 +1977,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
427 | else | ||
428 | symval += irel->r_addend; | ||
429 | |||
430 | - if ((symval & 0xffff8000) == 0 | ||
431 | - || (symval & 0xffff8000) == 0xffff8000) | ||
432 | + if ((symval & 0xffff8000) == 0) | ||
433 | { | ||
434 | /* We can delete this instruction. */ | ||
435 | sec->relax[sec->relax_count].addr = irel->r_offset; | ||
436 | @@ -1990,21 +2041,51 @@ microblaze_elf_relax_section (bfd *abfd, | ||
437 | irel->r_addend -= calc_fixup (irel->r_addend, 0, sec); | ||
438 | } | ||
439 | break; | ||
440 | + case R_MICROBLAZE_IMML_64: | ||
441 | + { | ||
442 | + /* This was a PC-relative instruction that was | ||
443 | + completely resolved. */ | ||
444 | + int sfix, efix; | ||
445 | + unsigned int val; | ||
446 | + bfd_vma target_address; | ||
447 | + target_address = irel->r_addend + irel->r_offset; | ||
448 | + sfix = calc_fixup (irel->r_offset, 0, sec); | ||
449 | + efix = calc_fixup (target_address, 0, sec); | ||
450 | + | ||
451 | + /* Validate the in-band val. */ | ||
452 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
453 | + if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
454 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
455 | + } | ||
456 | + irel->r_addend -= (efix - sfix); | ||
457 | + /* Should use HOWTO. */ | ||
458 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
459 | + irel->r_addend); | ||
460 | + } | ||
461 | + break; | ||
462 | case R_MICROBLAZE_NONE: | ||
463 | + case R_MICROBLAZE_32_NONE: | ||
464 | { | ||
465 | /* This was a PC-relative instruction that was | ||
466 | completely resolved. */ | ||
467 | int sfix, efix; | ||
468 | + unsigned int val; | ||
469 | bfd_vma target_address; | ||
470 | target_address = irel->r_addend + irel->r_offset; | ||
471 | sfix = calc_fixup (irel->r_offset, 0, sec); | ||
472 | efix = calc_fixup (target_address, 0, sec); | ||
473 | + | ||
474 | + /* Validate the in-band val. */ | ||
475 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
476 | + if (val != irel->r_addend && ELF32_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
477 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
478 | + } | ||
479 | irel->r_addend -= (efix - sfix); | ||
480 | /* Should use HOWTO. */ | ||
481 | microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset, | ||
482 | irel->r_addend); | ||
483 | - } | ||
484 | - break; | ||
485 | + } | ||
486 | + break; | ||
487 | case R_MICROBLAZE_64_NONE: | ||
488 | { | ||
489 | /* This was a PC-relative 64-bit instruction that was | ||
490 | @@ -2015,8 +2096,8 @@ microblaze_elf_relax_section (bfd *abfd, | ||
491 | sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); | ||
492 | efix = calc_fixup (target_address, 0, sec); | ||
493 | irel->r_addend -= (efix - sfix); | ||
494 | - microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset | ||
495 | - + INST_WORD_SIZE, irel->r_addend); | ||
496 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
497 | + irel->r_addend); | ||
498 | } | ||
499 | break; | ||
500 | } | ||
501 | @@ -2046,9 +2127,50 @@ microblaze_elf_relax_section (bfd *abfd, | ||
502 | irelscanend = irelocs + o->reloc_count; | ||
503 | for (irelscan = irelocs; irelscan < irelscanend; irelscan++) | ||
504 | { | ||
505 | - if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) | ||
506 | - { | ||
507 | - isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
508 | + if (1 && ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE) | ||
509 | + { | ||
510 | + unsigned int val; | ||
511 | + | ||
512 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
513 | + | ||
514 | + /* hax: We only do the following fixup for debug location lists. */ | ||
515 | + if (strcmp(".debug_loc", o->name)) | ||
516 | + continue; | ||
517 | + | ||
518 | + /* This was a PC-relative instruction that was completely resolved. */ | ||
519 | + if (ocontents == NULL) | ||
520 | + { | ||
521 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
522 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
523 | + else | ||
524 | + { | ||
525 | + /* We always cache the section contents. | ||
526 | + Perhaps, if info->keep_memory is FALSE, we | ||
527 | + should free them, if we are permitted to. */ | ||
528 | + | ||
529 | + if (o->rawsize == 0) | ||
530 | + o->rawsize = o->size; | ||
531 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
532 | + if (ocontents == NULL) | ||
533 | + goto error_return; | ||
534 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
535 | + (file_ptr) 0, | ||
536 | + o->rawsize)) | ||
537 | + goto error_return; | ||
538 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
539 | + } | ||
540 | + } | ||
541 | + val = bfd_get_32 (abfd, ocontents + irelscan->r_offset); | ||
542 | + if (val != irelscan->r_addend) { | ||
543 | + fprintf(stderr, "%d: CORRUPT relax reloc! %x %lx\n", __LINE__, val, irelscan->r_addend); | ||
544 | + } | ||
545 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec); | ||
546 | + microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | ||
547 | + irelscan->r_addend); | ||
548 | + } | ||
549 | + if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)// || ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
550 | + { | ||
551 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
552 | |||
553 | /* Look at the reloc only if the value has been resolved. */ | ||
554 | if (isym->st_shndx == shndx | ||
555 | @@ -2105,7 +2227,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
556 | elf_section_data (o)->this_hdr.contents = ocontents; | ||
557 | } | ||
558 | } | ||
559 | - irelscan->r_addend -= calc_fixup (irel->r_addend | ||
560 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend | ||
561 | + isym->st_value, | ||
562 | 0, | ||
563 | sec); | ||
564 | @@ -3445,6 +3567,14 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, | ||
565 | return true; | ||
566 | } | ||
567 | |||
568 | + | ||
569 | +static bool | ||
570 | +elf_microblaze_object_p (bfd *abfd) | ||
571 | +{ | ||
572 | + /* Set the right machine number for an s390 elf32 file. */ | ||
573 | + return bfd_default_set_arch_mach (abfd, bfd_arch_microblaze, bfd_mach_microblaze); | ||
574 | +} | ||
575 | + | ||
576 | /* Hook called by the linker routine which adds symbols from an object | ||
577 | file. We use it to put .comm items in .sbss, and not .bss. */ | ||
578 | |||
579 | @@ -3514,8 +3644,6 @@ microblaze_elf_add_symbol_hook (bfd *abfd, | ||
580 | #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol | ||
581 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | ||
582 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | ||
583 | - | ||
584 | -#define elf_backend_grok_prstatus microblaze_elf_grok_prstatus | ||
585 | -#define elf_backend_grok_psinfo microblaze_elf_grok_psinfo | ||
586 | +#define elf_backend_object_p elf_microblaze_object_p | ||
587 | |||
588 | #include "elf32-target.h" | ||
589 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | 19 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c |
590 | new file mode 100755 | 20 | new file mode 100755 |
591 | index 00000000000..6cd9753a592 | 21 | index 00000000000..6cd9753a592 |
@@ -4402,1388 +3832,273 @@ index 00000000000..6cd9753a592 | |||
4402 | +#define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | 3832 | +#define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook |
4403 | + | 3833 | + |
4404 | +#include "elf64-target.h" | 3834 | +#include "elf64-target.h" |
4405 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | 3835 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c |
4406 | index 6e62e556962..ef5568a78b0 100644 | 3836 | index 7cbbc8986a1..597507e53cd 100644 |
4407 | --- a/bfd/libbfd.h | 3837 | --- a/gdb/microblaze-tdep.c |
4408 | +++ b/bfd/libbfd.h | 3838 | +++ b/gdb/microblaze-tdep.c |
4409 | @@ -2992,6 +2992,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | 3839 | @@ -65,8 +65,95 @@ |
4410 | "BFD_RELOC_MICROBLAZE_32_ROSDA", | 3840 | #define IS_SAVE_HIDDEN_PTR(op, rd, ra, rb) \ |
4411 | "BFD_RELOC_MICROBLAZE_32_RWSDA", | 3841 | ((op == add || op == addik) && ra == MICROBLAZE_FIRST_ARGREG && rb == 0) |
4412 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
4413 | + "BFD_RELOC_MICROBLAZE_32_NONE", | ||
4414 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
4415 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
4416 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
4417 | @@ -2999,6 +3000,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
4418 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
4419 | "BFD_RELOC_MICROBLAZE_32_GOTOFF", | ||
4420 | "BFD_RELOC_MICROBLAZE_COPY", | ||
4421 | + "BFD_RELOC_MICROBLAZE_64", | ||
4422 | + "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
4423 | "BFD_RELOC_MICROBLAZE_64_TLS", | ||
4424 | "BFD_RELOC_MICROBLAZE_64_TLSGD", | ||
4425 | "BFD_RELOC_MICROBLAZE_64_TLSLD", | ||
4426 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
4427 | index 164060361a9..e733e2397f4 100644 | ||
4428 | --- a/bfd/reloc.c | ||
4429 | +++ b/bfd/reloc.c | ||
4430 | @@ -6898,6 +6898,12 @@ ENUM | ||
4431 | ENUMDOC | ||
4432 | This is a 32 bit reloc for the microblaze to handle | ||
4433 | expressions of the form "Symbol Op Symbol" | ||
4434 | +ENUM | ||
4435 | + BFD_RELOC_MICROBLAZE_32_NONE | ||
4436 | +ENUMDOC | ||
4437 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
4438 | + value in two words (with an imm instruction). No relocation is | ||
4439 | + done here - only used for relaxing | ||
4440 | ENUM | ||
4441 | BFD_RELOC_MICROBLAZE_64_NONE | ||
4442 | ENUMDOC | ||
4443 | @@ -6991,6 +6997,20 @@ ENUMDOC | ||
4444 | value in two words (with an imm instruction). The relocation is | ||
4445 | relative offset from start of TEXT. | ||
4446 | |||
4447 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
4448 | + to two words (uses imml instruction). | ||
4449 | +ENUM | ||
4450 | +BFD_RELOC_MICROBLAZE_64, | ||
4451 | +ENUMDOC | ||
4452 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
4453 | + value in two words (with an imml instruction). No relocation is | ||
4454 | + done here - only used for relaxing | ||
4455 | +ENUM | ||
4456 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
4457 | +ENUMDOC | ||
4458 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
4459 | + value in two words (with an imml instruction). No relocation is | ||
4460 | + done here - only used for relaxing | ||
4461 | ENUM | ||
4462 | BFD_RELOC_AARCH64_RELOC_START | ||
4463 | ENUMDOC | ||
4464 | diff --git a/bfd/targets.c b/bfd/targets.c | ||
4465 | index 417743efc0e..333f05c55f4 100644 | ||
4466 | --- a/bfd/targets.c | ||
4467 | +++ b/bfd/targets.c | ||
4468 | @@ -795,6 +795,8 @@ extern const bfd_target mep_elf32_le_vec; | ||
4469 | extern const bfd_target metag_elf32_vec; | ||
4470 | extern const bfd_target microblaze_elf32_vec; | ||
4471 | extern const bfd_target microblaze_elf32_le_vec; | ||
4472 | +extern const bfd_target microblaze_elf64_vec; | ||
4473 | +extern const bfd_target microblaze_elf64_le_vec; | ||
4474 | extern const bfd_target mips_ecoff_be_vec; | ||
4475 | extern const bfd_target mips_ecoff_le_vec; | ||
4476 | extern const bfd_target mips_ecoff_bele_vec; | ||
4477 | @@ -1165,6 +1167,10 @@ static const bfd_target * const _bfd_target_vector[] = | ||
4478 | |||
4479 | &metag_elf32_vec, | ||
4480 | |||
4481 | +#ifdef BFD64 | ||
4482 | + µblaze_elf64_vec, | ||
4483 | + µblaze_elf64_le_vec, | ||
4484 | +#endif | ||
4485 | µblaze_elf32_vec, | ||
4486 | |||
4487 | &mips_ecoff_be_vec, | ||
4488 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | ||
4489 | index fc3196864c9..1bb198abfd3 100644 | ||
4490 | --- a/gdb/features/Makefile | ||
4491 | +++ b/gdb/features/Makefile | ||
4492 | @@ -101,7 +101,9 @@ OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH)) | ||
4493 | # to make on the command line. | ||
4494 | XMLTOC = \ | ||
4495 | microblaze-with-stack-protect.xml \ | ||
4496 | + microblaze64-with-stack-protect.xml \ | ||
4497 | microblaze.xml \ | ||
4498 | + microblaze64.xml \ | ||
4499 | mips-dsp-linux.xml \ | ||
4500 | mips-linux.xml \ | ||
4501 | mips64-dsp-linux.xml \ | ||
4502 | diff --git a/gdb/features/microblaze-core.xml b/gdb/features/microblaze-core.xml | ||
4503 | index 29fdd6c0a2f..a5c3cce069d 100644 | ||
4504 | --- a/gdb/features/microblaze-core.xml | ||
4505 | +++ b/gdb/features/microblaze-core.xml | ||
4506 | @@ -8,7 +8,7 @@ | ||
4507 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
4508 | <feature name="org.gnu.gdb.microblaze.core"> | ||
4509 | <reg name="r0" bitsize="32" regnum="0"/> | ||
4510 | - <reg name="r1" bitsize="32" type="data_ptr"/> | ||
4511 | + <reg name="r1" bitsize="32"/> | ||
4512 | <reg name="r2" bitsize="32"/> | ||
4513 | <reg name="r3" bitsize="32"/> | ||
4514 | <reg name="r4" bitsize="32"/> | ||
4515 | @@ -39,7 +39,7 @@ | ||
4516 | <reg name="r29" bitsize="32"/> | ||
4517 | <reg name="r30" bitsize="32"/> | ||
4518 | <reg name="r31" bitsize="32"/> | ||
4519 | - <reg name="rpc" bitsize="32" type="code_ptr"/> | ||
4520 | + <reg name="rpc" bitsize="32"/> | ||
4521 | <reg name="rmsr" bitsize="32"/> | ||
4522 | <reg name="rear" bitsize="32"/> | ||
4523 | <reg name="resr" bitsize="32"/> | ||
4524 | @@ -64,4 +64,6 @@ | ||
4525 | <reg name="rtlbsx" bitsize="32"/> | ||
4526 | <reg name="rtlblo" bitsize="32"/> | ||
4527 | <reg name="rtlbhi" bitsize="32"/> | ||
4528 | + <reg name="slr" bitsize="32"/> | ||
4529 | + <reg name="shr" bitsize="32"/> | ||
4530 | </feature> | ||
4531 | diff --git a/gdb/features/microblaze-stack-protect.xml b/gdb/features/microblaze-stack-protect.xml | ||
4532 | index aac51ea471c..722a51f0df5 100644 | ||
4533 | --- a/gdb/features/microblaze-stack-protect.xml | ||
4534 | +++ b/gdb/features/microblaze-stack-protect.xml | ||
4535 | @@ -7,6 +7,6 @@ | ||
4536 | |||
4537 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
4538 | <feature name="org.gnu.gdb.microblaze.stack-protect"> | ||
4539 | - <reg name="rslr" bitsize="32"/> | ||
4540 | - <reg name="rshr" bitsize="32"/> | ||
4541 | + <reg name="slr" bitsize="32"/> | ||
4542 | + <reg name="shr" bitsize="32"/> | ||
4543 | </feature> | ||
4544 | diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c | ||
4545 | index aa180bf35d5..6a9e74c7a6f 100644 | ||
4546 | --- a/gdb/features/microblaze-with-stack-protect.c | ||
4547 | +++ b/gdb/features/microblaze-with-stack-protect.c | ||
4548 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
4549 | |||
4550 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
4551 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
4552 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
4553 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
4554 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
4555 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
4556 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
4557 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
4558 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
4559 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
4560 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
4561 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
4562 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
4563 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
4564 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
4565 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
4566 | @@ -72,8 +72,8 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
4567 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
4568 | |||
4569 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
4570 | - tdesc_create_reg (feature, "rslr", 57, 1, NULL, 32, "int"); | ||
4571 | - tdesc_create_reg (feature, "rshr", 58, 1, NULL, 32, "int"); | ||
4572 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
4573 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
4574 | |||
4575 | tdesc_microblaze_with_stack_protect = result.release (); | ||
4576 | } | ||
4577 | diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c | ||
4578 | index ef2c64c720e..201232dff83 100644 | ||
4579 | --- a/gdb/features/microblaze.c | ||
4580 | +++ b/gdb/features/microblaze.c | ||
4581 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze (void) | ||
4582 | |||
4583 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
4584 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
4585 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
4586 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
4587 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
4588 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
4589 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
4590 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze (void) | ||
4591 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
4592 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
4593 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
4594 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
4595 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
4596 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
4597 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
4598 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
4599 | @@ -70,6 +70,8 @@ initialize_tdesc_microblaze (void) | ||
4600 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
4601 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
4602 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
4603 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
4604 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
4605 | 3842 | ||
4606 | tdesc_microblaze = result.release (); | 3843 | +static const char *microblaze_abi_string; |
4607 | } | ||
4608 | diff --git a/gdb/features/microblaze64-core.xml b/gdb/features/microblaze64-core.xml | ||
4609 | new file mode 100644 | ||
4610 | index 00000000000..96e99e2fb24 | ||
4611 | --- /dev/null | ||
4612 | +++ b/gdb/features/microblaze64-core.xml | ||
4613 | @@ -0,0 +1,69 @@ | ||
4614 | +<?xml version="1.0"?> | ||
4615 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
4616 | + | ||
4617 | + Copying and distribution of this file, with or without modification, | ||
4618 | + are permitted in any medium without royalty provided the copyright | ||
4619 | + notice and this notice are preserved. --> | ||
4620 | + | ||
4621 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
4622 | +<feature name="org.gnu.gdb.microblaze64.core"> | ||
4623 | + <reg name="r0" bitsize="64" regnum="0"/> | ||
4624 | + <reg name="r1" bitsize="64"/> | ||
4625 | + <reg name="r2" bitsize="64"/> | ||
4626 | + <reg name="r3" bitsize="64"/> | ||
4627 | + <reg name="r4" bitsize="64"/> | ||
4628 | + <reg name="r5" bitsize="64"/> | ||
4629 | + <reg name="r6" bitsize="64"/> | ||
4630 | + <reg name="r7" bitsize="64"/> | ||
4631 | + <reg name="r8" bitsize="64"/> | ||
4632 | + <reg name="r9" bitsize="64"/> | ||
4633 | + <reg name="r10" bitsize="64"/> | ||
4634 | + <reg name="r11" bitsize="64"/> | ||
4635 | + <reg name="r12" bitsize="64"/> | ||
4636 | + <reg name="r13" bitsize="64"/> | ||
4637 | + <reg name="r14" bitsize="64"/> | ||
4638 | + <reg name="r15" bitsize="64"/> | ||
4639 | + <reg name="r16" bitsize="64"/> | ||
4640 | + <reg name="r17" bitsize="64"/> | ||
4641 | + <reg name="r18" bitsize="64"/> | ||
4642 | + <reg name="r19" bitsize="64"/> | ||
4643 | + <reg name="r20" bitsize="64"/> | ||
4644 | + <reg name="r21" bitsize="64"/> | ||
4645 | + <reg name="r22" bitsize="64"/> | ||
4646 | + <reg name="r23" bitsize="64"/> | ||
4647 | + <reg name="r24" bitsize="64"/> | ||
4648 | + <reg name="r25" bitsize="64"/> | ||
4649 | + <reg name="r26" bitsize="64"/> | ||
4650 | + <reg name="r27" bitsize="64"/> | ||
4651 | + <reg name="r28" bitsize="64"/> | ||
4652 | + <reg name="r29" bitsize="64"/> | ||
4653 | + <reg name="r30" bitsize="64"/> | ||
4654 | + <reg name="r31" bitsize="64"/> | ||
4655 | + <reg name="rpc" bitsize="64"/> | ||
4656 | + <reg name="rmsr" bitsize="32"/> | ||
4657 | + <reg name="rear" bitsize="64"/> | ||
4658 | + <reg name="resr" bitsize="32"/> | ||
4659 | + <reg name="rfsr" bitsize="32"/> | ||
4660 | + <reg name="rbtr" bitsize="64"/> | ||
4661 | + <reg name="rpvr0" bitsize="32"/> | ||
4662 | + <reg name="rpvr1" bitsize="32"/> | ||
4663 | + <reg name="rpvr2" bitsize="32"/> | ||
4664 | + <reg name="rpvr3" bitsize="32"/> | ||
4665 | + <reg name="rpvr4" bitsize="32"/> | ||
4666 | + <reg name="rpvr5" bitsize="32"/> | ||
4667 | + <reg name="rpvr6" bitsize="32"/> | ||
4668 | + <reg name="rpvr7" bitsize="32"/> | ||
4669 | + <reg name="rpvr8" bitsize="64"/> | ||
4670 | + <reg name="rpvr9" bitsize="64"/> | ||
4671 | + <reg name="rpvr10" bitsize="32"/> | ||
4672 | + <reg name="rpvr11" bitsize="32"/> | ||
4673 | + <reg name="redr" bitsize="32"/> | ||
4674 | + <reg name="rpid" bitsize="32"/> | ||
4675 | + <reg name="rzpr" bitsize="32"/> | ||
4676 | + <reg name="rtlbx" bitsize="32"/> | ||
4677 | + <reg name="rtlbsx" bitsize="32"/> | ||
4678 | + <reg name="rtlblo" bitsize="32"/> | ||
4679 | + <reg name="rtlbhi" bitsize="32"/> | ||
4680 | + <reg name="slr" bitsize="64"/> | ||
4681 | + <reg name="shr" bitsize="64"/> | ||
4682 | +</feature> | ||
4683 | diff --git a/gdb/features/microblaze64-stack-protect.xml b/gdb/features/microblaze64-stack-protect.xml | ||
4684 | new file mode 100644 | ||
4685 | index 00000000000..1bbf5fc3cea | ||
4686 | --- /dev/null | ||
4687 | +++ b/gdb/features/microblaze64-stack-protect.xml | ||
4688 | @@ -0,0 +1,12 @@ | ||
4689 | +<?xml version="1.0"?> | ||
4690 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
4691 | + | ||
4692 | + Copying and distribution of this file, with or without modification, | ||
4693 | + are permitted in any medium without royalty provided the copyright | ||
4694 | + notice and this notice are preserved. --> | ||
4695 | + | ||
4696 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
4697 | +<feature name="org.gnu.gdb.microblaze64.stack-protect"> | ||
4698 | + <reg name="slr" bitsize="64"/> | ||
4699 | + <reg name="shr" bitsize="64"/> | ||
4700 | +</feature> | ||
4701 | diff --git a/gdb/features/microblaze64-with-stack-protect.c b/gdb/features/microblaze64-with-stack-protect.c | ||
4702 | new file mode 100644 | ||
4703 | index 00000000000..a4de4666c76 | ||
4704 | --- /dev/null | ||
4705 | +++ b/gdb/features/microblaze64-with-stack-protect.c | ||
4706 | @@ -0,0 +1,79 @@ | ||
4707 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
4708 | + Original: microblaze-with-stack-protect.xml */ | ||
4709 | + | 3844 | + |
4710 | +#include "defs.h" | 3845 | +static const char *const microblaze_abi_strings[] = { |
4711 | +#include "osabi.h" | 3846 | + "auto", |
4712 | +#include "target-descriptions.h" | 3847 | + "m64", |
3848 | +}; | ||
3849 | + | ||
3850 | +enum microblaze_abi | ||
3851 | +microblaze_abi (struct gdbarch *gdbarch) | ||
3852 | +{ | ||
3853 | + microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
3854 | + return tdep->microblaze_abi; | ||
3855 | +} | ||
3856 | /* The registers of the Xilinx microblaze processor. */ | ||
3857 | |||
3858 | + static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
3859 | + static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
4713 | + | 3860 | + |
4714 | +struct target_desc *tdesc_microblaze64_with_stack_protect; | ||
4715 | +static void | 3861 | +static void |
4716 | +initialize_tdesc_microblaze64_with_stack_protect (void) | 3862 | +microblaze_abi_update (const char *ignore_args, |
3863 | + int from_tty, struct cmd_list_element *c) | ||
4717 | +{ | 3864 | +{ |
4718 | + target_desc_up result = allocate_target_description (); | 3865 | + struct gdbarch_info info; |
4719 | + struct tdesc_feature *feature; | 3866 | + |
4720 | + | 3867 | + /* Force the architecture to update, and (if it's a microblaze architecture) |
4721 | + feature = tdesc_create_feature (result.get() , "org.gnu.gdb.microblaze64.core"); | 3868 | + * microblaze_gdbarch_init will take care of the rest. */ |
4722 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | 3869 | +// gdbarch_info_init (&info); |
4723 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | 3870 | + gdbarch_update_p (info); |
4724 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | ||
4725 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
4726 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
4727 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
4728 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
4729 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
4730 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
4731 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
4732 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
4733 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
4734 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
4735 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
4736 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
4737 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
4738 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
4739 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
4740 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
4741 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
4742 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
4743 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
4744 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
4745 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
4746 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
4747 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
4748 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
4749 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
4750 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
4751 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
4752 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
4753 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
4754 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
4755 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
4756 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "int"); | ||
4757 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
4758 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
4759 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
4760 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
4761 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
4762 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
4763 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
4764 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
4765 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
4766 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
4767 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
4768 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
4769 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
4770 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
4771 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
4772 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
4773 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
4774 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
4775 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
4776 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
4777 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
4778 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
4779 | + | ||
4780 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.stack-protect"); | ||
4781 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
4782 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
4783 | + | ||
4784 | + tdesc_microblaze64_with_stack_protect = result.release(); | ||
4785 | +} | 3871 | +} |
4786 | diff --git a/gdb/features/microblaze64-with-stack-protect.xml b/gdb/features/microblaze64-with-stack-protect.xml | ||
4787 | new file mode 100644 | ||
4788 | index 00000000000..0e9f01611f3 | ||
4789 | --- /dev/null | ||
4790 | +++ b/gdb/features/microblaze64-with-stack-protect.xml | ||
4791 | @@ -0,0 +1,12 @@ | ||
4792 | +<?xml version="1.0"?> | ||
4793 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
4794 | + | ||
4795 | + Copying and distribution of this file, with or without modification, | ||
4796 | + are permitted in any medium without royalty provided the copyright | ||
4797 | + notice and this notice are preserved. --> | ||
4798 | + | ||
4799 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
4800 | +<target> | ||
4801 | + <xi:include href="microblaze64-core.xml"/> | ||
4802 | + <xi:include href="microblaze64-stack-protect.xml"/> | ||
4803 | +</target> | ||
4804 | diff --git a/gdb/features/microblaze64.c b/gdb/features/microblaze64.c | ||
4805 | new file mode 100644 | ||
4806 | index 00000000000..8ab7a90dd95 | ||
4807 | --- /dev/null | ||
4808 | +++ b/gdb/features/microblaze64.c | ||
4809 | @@ -0,0 +1,77 @@ | ||
4810 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
4811 | + Original: microblaze.xml */ | ||
4812 | + | 3872 | + |
4813 | +#include "defs.h" | ||
4814 | +#include "osabi.h" | ||
4815 | +#include "target-descriptions.h" | ||
4816 | + | 3873 | + |
4817 | +struct target_desc *tdesc_microblaze64; | 3874 | +static enum microblaze_abi |
4818 | +static void | 3875 | +global_microblaze_abi (void) |
4819 | +initialize_tdesc_microblaze64 (void) | ||
4820 | +{ | 3876 | +{ |
4821 | + target_desc_up result = allocate_target_description (); | 3877 | + int i; |
4822 | + struct tdesc_feature *feature; | 3878 | + |
4823 | + | 3879 | + for (i = 0; microblaze_abi_strings[i] != NULL; i++) |
4824 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.core"); | 3880 | + if (microblaze_abi_strings[i] == microblaze_abi_string) |
4825 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | 3881 | + return (enum microblaze_abi) i; |
4826 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | 3882 | + |
4827 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | 3883 | +// internal_error (__FILE__, __LINE__, _("unknown ABI string")); |
4828 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
4829 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
4830 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
4831 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
4832 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
4833 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
4834 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
4835 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
4836 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
4837 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
4838 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
4839 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
4840 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
4841 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
4842 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
4843 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
4844 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
4845 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
4846 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
4847 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
4848 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
4849 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
4850 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
4851 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
4852 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
4853 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
4854 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
4855 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
4856 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
4857 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
4858 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
4859 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "uint64"); | ||
4860 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
4861 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
4862 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
4863 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
4864 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
4865 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
4866 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
4867 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
4868 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
4869 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
4870 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
4871 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
4872 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
4873 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
4874 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
4875 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
4876 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
4877 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
4878 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
4879 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
4880 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
4881 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
4882 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
4883 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
4884 | + | ||
4885 | + tdesc_microblaze64 = result.release(); | ||
4886 | +} | 3884 | +} |
4887 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
4888 | new file mode 100644 | ||
4889 | index 00000000000..515d18e65cf | ||
4890 | --- /dev/null | ||
4891 | +++ b/gdb/features/microblaze64.xml | ||
4892 | @@ -0,0 +1,11 @@ | ||
4893 | +<?xml version="1.0"?> | ||
4894 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
4895 | + | ||
4896 | + Copying and distribution of this file, with or without modification, | ||
4897 | + are permitted in any medium without royalty provided the copyright | ||
4898 | + notice and this notice are preserved. --> | ||
4899 | + | ||
4900 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
4901 | +<target> | ||
4902 | + <xi:include href="microblaze64-core.xml"/> | ||
4903 | +</target> | ||
4904 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
4905 | index fc52adffb72..f2db32f0087 100644 | ||
4906 | --- a/gdb/microblaze-linux-tdep.c | ||
4907 | +++ b/gdb/microblaze-linux-tdep.c | ||
4908 | @@ -40,6 +40,7 @@ | ||
4909 | #include "features/microblaze-linux.c" | ||
4910 | |||
4911 | static int microblaze_debug_flag = 0; | ||
4912 | +int MICROBLAZE_REGISTER_SIZE=4; | ||
4913 | |||
4914 | static void | ||
4915 | microblaze_debug (const char *fmt, ...) | ||
4916 | @@ -55,6 +56,7 @@ microblaze_debug (const char *fmt, ...) | ||
4917 | } | ||
4918 | } | ||
4919 | |||
4920 | +#if 0 | ||
4921 | static int | ||
4922 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
4923 | struct bp_target_info *bp_tgt) | ||
4924 | @@ -86,6 +88,8 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
4925 | return val; | ||
4926 | } | ||
4927 | |||
4928 | +#endif | ||
4929 | + | 3885 | + |
4930 | static void | 3886 | +static void |
4931 | microblaze_linux_sigtramp_cache (struct frame_info *next_frame, | 3887 | +show_microblaze_abi (struct ui_file *file, |
4932 | struct trad_frame_cache *this_cache, | 3888 | + int from_tty, |
4933 | @@ -147,8 +151,8 @@ microblaze_linux_init_abi (struct gdbarch_info info, | 3889 | + struct cmd_list_element *ignored_cmd, |
4934 | 3890 | + const char *ignored_value) | |
4935 | linux_init_abi (info, gdbarch, 0); | 3891 | +{ |
4936 | 3892 | + enum microblaze_abi global_abi = global_microblaze_abi (); | |
4937 | - set_gdbarch_memory_remove_breakpoint (gdbarch, | 3893 | + enum microblaze_abi actual_abi = microblaze_abi (target_gdbarch ()); |
4938 | - microblaze_linux_memory_remove_breakpoint); | 3894 | + const char *actual_abi_str = microblaze_abi_strings[actual_abi]; |
4939 | + // set_gdbarch_memory_remove_breakpoint (gdbarch, | 3895 | + |
4940 | + // microblaze_linux_memory_remove_breakpoint); | 3896 | +#if 1 |
4941 | 3897 | + if (global_abi == MICROBLAZE_ABI_AUTO) | |
4942 | /* Shared library handling. */ | 3898 | + fprintf_filtered |
4943 | set_solib_svr4_fetch_link_map_offsets (gdbarch, | 3899 | + (file, |
4944 | @@ -160,10 +164,30 @@ microblaze_linux_init_abi (struct gdbarch_info info, | 3900 | + "The microblaze ABI is set automatically (currently \"%s\").\n", |
4945 | 3901 | + actual_abi_str); | |
4946 | /* BFD target for core files. */ | 3902 | + else if (global_abi == actual_abi) |
4947 | if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | 3903 | + fprintf_filtered |
4948 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | 3904 | + (file, |
4949 | + { | 3905 | + "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", |
4950 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | 3906 | + actual_abi_str); |
4951 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblaze"); | ||
4952 | + MICROBLAZE_REGISTER_SIZE=8; | ||
4953 | + } | ||
4954 | + else | 3907 | + else |
4955 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | 3908 | + { |
4956 | + } | 3909 | +#endif |
4957 | else | 3910 | + /* Probably shouldn't happen... */ |
4958 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | 3911 | + fprintf_filtered (file, |
4959 | + { | 3912 | + "The (auto detected) microblaze ABI \"%s\" is in use " |
4960 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | 3913 | + "even though the user setting was \"%s\".\n", |
4961 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblazeel"); | 3914 | + actual_abi_str, microblaze_abi_strings[global_abi]); |
4962 | + MICROBLAZE_REGISTER_SIZE=8; | ||
4963 | + } | 3915 | + } |
4964 | + else | 3916 | +} |
4965 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | 3917 | + |
4966 | + } | 3918 | +static void |
4967 | 3919 | +show_microblaze_command (const char *args, int from_tty) | |
4968 | + switch (info.bfd_arch_info->mach) | ||
4969 | + { | ||
4970 | + case bfd_mach_microblaze64: | ||
4971 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
4972 | + break; | ||
4973 | + } | ||
4974 | |||
4975 | /* Shared library handling. */ | ||
4976 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
4977 | @@ -178,7 +202,9 @@ void _initialize_microblaze_linux_tdep (); | ||
4978 | void | ||
4979 | _initialize_microblaze_linux_tdep () | ||
4980 | { | ||
4981 | - gdbarch_register_osabi (bfd_arch_microblaze, 0, GDB_OSABI_LINUX, | ||
4982 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze, GDB_OSABI_LINUX, | ||
4983 | + microblaze_linux_init_abi); | ||
4984 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze64, GDB_OSABI_LINUX, | ||
4985 | microblaze_linux_init_abi); | ||
4986 | initialize_tdesc_microblaze_linux (); | ||
4987 | } | ||
4988 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
4989 | index ccb6b730d64..c347bb9516b 100644 | ||
4990 | --- a/gdb/microblaze-tdep.c | ||
4991 | +++ b/gdb/microblaze-tdep.c | ||
4992 | @@ -40,7 +40,9 @@ | ||
4993 | #include "remote.h" | ||
4994 | |||
4995 | #include "features/microblaze-with-stack-protect.c" | ||
4996 | +#include "features/microblaze64-with-stack-protect.c" | ||
4997 | #include "features/microblaze.c" | ||
4998 | +#include "features/microblaze64.c" | ||
4999 | |||
5000 | /* Instruction macros used for analyzing the prologue. */ | ||
5001 | /* This set of instruction macros need to be changed whenever the | ||
5002 | @@ -75,12 +77,13 @@ static const char * const microblaze_register_names[] = | ||
5003 | "rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6", | ||
5004 | "rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11", | ||
5005 | "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi", | ||
5006 | - "rslr", "rshr" | ||
5007 | + "slr", "shr" | ||
5008 | }; | ||
5009 | |||
5010 | #define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names) | ||
5011 | |||
5012 | static unsigned int microblaze_debug_flag = 0; | ||
5013 | +int reg_size = 4; | ||
5014 | |||
5015 | #define microblaze_debug(fmt, ...) \ | ||
5016 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
5017 | @@ -128,6 +131,15 @@ microblaze_fetch_instruction (CORE_ADDR pc) | ||
5018 | constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT; | ||
5019 | |||
5020 | typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint; | ||
5021 | +static CORE_ADDR | ||
5022 | +microblaze_store_arguments (struct regcache *regcache, int nargs, | ||
5023 | + struct value **args, CORE_ADDR sp, | ||
5024 | + int struct_return, CORE_ADDR struct_addr) | ||
5025 | +{ | 3920 | +{ |
5026 | + error (_("store_arguments not implemented")); | 3921 | + help_list (showmicroblazecmdlist, "show microblaze ", all_commands, gdb_stdout); |
5027 | + return sp; | ||
5028 | +} | 3922 | +} |
5029 | +#if 0 | 3923 | + |
5030 | static int | ||
5031 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
5032 | struct bp_target_info *bp_tgt) | ||
5033 | @@ -146,7 +158,6 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
5034 | /* Make sure we see the memory breakpoints. */ | ||
5035 | scoped_restore restore_memory | ||
5036 | = make_scoped_restore_show_memory_breakpoints (1); | ||
5037 | - | ||
5038 | val = target_read_memory (addr, old_contents, bplen); | ||
5039 | |||
5040 | /* If our breakpoint is no longer at the address, this means that the | ||
5041 | @@ -161,6 +172,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
5042 | return val; | ||
5043 | } | ||
5044 | |||
5045 | +#endif | ||
5046 | /* Allocate and initialize a frame cache. */ | ||
5047 | |||
5048 | static struct microblaze_frame_cache * | ||
5049 | @@ -577,17 +589,16 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache, | ||
5050 | gdb_byte *valbuf) | ||
5051 | { | ||
5052 | gdb_byte buf[8]; | ||
5053 | - | ||
5054 | /* Copy the return value (starting) in RETVAL_REGNUM to VALBUF. */ | ||
5055 | switch (TYPE_LENGTH (type)) | ||
5056 | { | ||
5057 | case 1: /* return last byte in the register. */ | ||
5058 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
5059 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1); | ||
5060 | + memcpy(valbuf, buf + reg_size - 1, 1); | ||
5061 | return; | ||
5062 | case 2: /* return last 2 bytes in register. */ | ||
5063 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
5064 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2); | ||
5065 | + memcpy(valbuf, buf + reg_size - 2, 2); | ||
5066 | return; | ||
5067 | case 4: /* for sizes 4 or 8, copy the required length. */ | ||
5068 | case 8: | ||
5069 | @@ -754,6 +765,12 @@ microblaze_software_single_step (struct regcache *regcache) | ||
5070 | } | ||
5071 | #endif | ||
5072 | |||
5073 | +static void | 3924 | +static void |
5074 | +microblaze_write_pc (struct regcache *regcache, CORE_ADDR pc) | 3925 | +set_microblaze_command (const char *args, int from_tty) |
5075 | +{ | 3926 | +{ |
5076 | + regcache_cooked_write_unsigned (regcache, MICROBLAZE_PC_REGNUM, pc); | 3927 | + printf_unfiltered |
3928 | + ("\"set microblaze\" must be followed by an appropriate subcommand.\n"); | ||
3929 | + help_list (setmicroblazecmdlist, "set microblaze ", all_commands, gdb_stdout); | ||
5077 | +} | 3930 | +} |
5078 | + | 3931 | + |
5079 | static int dwarf2_to_reg_map[78] = | 3932 | static const char * const microblaze_register_names[] = |
5080 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ | ||
5081 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ | ||
5082 | @@ -788,13 +805,14 @@ microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) | ||
5083 | static void | ||
5084 | microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
5085 | { | 3933 | { |
5086 | + | 3934 | "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", |
5087 | register_remote_g_packet_guess (gdbarch, | 3935 | @@ -85,9 +172,21 @@ static const char * const microblaze_register_names[] = |
5088 | 4 * MICROBLAZE_NUM_CORE_REGS, | 3936 | static unsigned int microblaze_debug_flag = 0; |
5089 | - tdesc_microblaze); | 3937 | int reg_size = 4; |
5090 | + tdesc_microblaze64); | ||
5091 | |||
5092 | register_remote_g_packet_guess (gdbarch, | ||
5093 | 4 * MICROBLAZE_NUM_REGS, | ||
5094 | - tdesc_microblaze_with_stack_protect); | ||
5095 | + tdesc_microblaze64_with_stack_protect); | ||
5096 | } | ||
5097 | |||
5098 | void | ||
5099 | @@ -802,7 +820,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
5100 | struct regcache *regcache, | ||
5101 | int regnum, const void *gregs) | ||
5102 | { | ||
5103 | - const unsigned int *regs = (const unsigned int *)gregs; | ||
5104 | + const gdb_byte *regs = (const gdb_byte *) gregs; | ||
5105 | if (regnum >= 0) | ||
5106 | regcache->raw_supply (regnum, regs + regnum); | ||
5107 | |||
5108 | @@ -810,7 +828,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
5109 | int i; | ||
5110 | |||
5111 | for (i = 0; i < 50; i++) { | ||
5112 | - regcache->raw_supply (i, regs + i); | ||
5113 | + regcache->raw_supply (regnum, regs + i); | ||
5114 | } | ||
5115 | } | ||
5116 | } | ||
5117 | @@ -833,6 +851,17 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
5118 | } | ||
5119 | |||
5120 | 3938 | ||
5121 | +static void | 3939 | +unsigned int |
5122 | +make_regs (struct gdbarch *arch) | 3940 | +microblaze_abi_regsize (struct gdbarch *gdbarch) |
5123 | +{ | 3941 | +{ |
5124 | + struct gdbarch_tdep *tdep = gdbarch_tdep (arch); | 3942 | + switch (microblaze_abi (gdbarch)) |
5125 | + int mach = gdbarch_bfd_arch_info (arch)->mach; | ||
5126 | + | ||
5127 | + if (mach == bfd_mach_microblaze64) | ||
5128 | + { | 3943 | + { |
5129 | + set_gdbarch_ptr_bit (arch, 64); | 3944 | + case MICROBLAZE_ABI_M64: |
3945 | + return 8; | ||
3946 | + default: | ||
3947 | + return 4; | ||
5130 | + } | 3948 | + } |
5131 | +} | 3949 | +} |
3950 | + | ||
3951 | #define microblaze_debug(fmt, ...) \ | ||
3952 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
3953 | - fmt, ## __VA_ARGS__) | ||
3954 | + fmt, ## __VA_ARGS__) | ||
5132 | 3955 | ||
5133 | static struct gdbarch * | 3956 | |
3957 | /* Return the name of register REGNUM. */ | ||
3958 | @@ -867,15 +966,30 @@ static struct gdbarch * | ||
5134 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 3959 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
5135 | @@ -846,8 +875,15 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 3960 | { |
5136 | if (arches != NULL) | 3961 | tdesc_arch_data_up tdesc_data; |
3962 | + enum microblaze_abi microblaze_abi, found_abi, wanted_abi; | ||
3963 | const struct target_desc *tdesc = info.target_desc; | ||
3964 | |||
3965 | + /* What has the user specified from the command line? */ | ||
3966 | + wanted_abi = global_microblaze_abi (); | ||
3967 | + if (gdbarch_debug) | ||
3968 | + fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
3969 | + wanted_abi); | ||
3970 | + if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
3971 | + microblaze_abi = wanted_abi; | ||
3972 | + | ||
3973 | /* If there is already a candidate, use it. */ | ||
3974 | arches = gdbarch_list_lookup_by_info (arches, &info); | ||
3975 | - if (arches != NULL) | ||
3976 | + if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
5137 | return arches->gdbarch; | 3977 | return arches->gdbarch; |
5138 | if (tdesc == NULL) | 3978 | + |
5139 | - tdesc = tdesc_microblaze; | 3979 | + if (microblaze_abi == MICROBLAZE_ABI_M64) |
5140 | - | ||
5141 | + { | 3980 | + { |
5142 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | 3981 | + tdesc = tdesc_microblaze64; |
5143 | + { | ||
5144 | + tdesc = tdesc_microblaze64; | ||
5145 | + reg_size = 8; | 3982 | + reg_size = 8; |
5146 | + } | ||
5147 | + else | ||
5148 | + tdesc = tdesc_microblaze; | ||
5149 | + } | 3983 | + } |
5150 | /* Check any target description for validity. */ | 3984 | if (tdesc == NULL) |
5151 | if (tdesc_has_registers (tdesc)) | ||
5152 | { | 3985 | { |
5153 | @@ -855,31 +891,42 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 3986 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) |
3987 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
3988 | { | ||
3989 | tdesc = tdesc_microblaze64; | ||
3990 | reg_size = 8; | ||
3991 | @@ -890,7 +1004,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
5154 | int valid_p; | 3992 | int valid_p; |
5155 | int i; | 3993 | int i; |
5156 | 3994 | ||
5157 | - feature = tdesc_find_feature (tdesc, | 3995 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) |
5158 | - "org.gnu.gdb.microblaze.core"); | 3996 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) |
5159 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | 3997 | feature = tdesc_find_feature (tdesc, |
5160 | + feature = tdesc_find_feature (tdesc, | 3998 | "org.gnu.gdb.microblaze64.core"); |
5161 | + "org.gnu.gdb.microblaze64.core"); | 3999 | else |
5162 | + else | 4000 | @@ -904,7 +1018,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
5163 | + feature = tdesc_find_feature (tdesc, | 4001 | for (i = 0; i < MICROBLAZE_NUM_REGS; i++) |
5164 | + "org.gnu.gdb.microblaze.core"); | 4002 | valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, |
5165 | if (feature == NULL) | 4003 | microblaze_register_names[i]); |
5166 | return NULL; | 4004 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) |
5167 | tdesc_data = tdesc_data_alloc (); | 4005 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) |
5168 | 4006 | feature = tdesc_find_feature (tdesc, | |
5169 | valid_p = 1; | 4007 | "org.gnu.gdb.microblaze64.stack-protect"); |
5170 | - for (i = 0; i < MICROBLAZE_NUM_CORE_REGS; i++) | 4008 | else |
5171 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), i, | 4009 | @@ -954,7 +1068,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) |
5172 | - microblaze_register_names[i]); | 4010 | set_gdbarch_ptr_bit (gdbarch, 64); |
5173 | - feature = tdesc_find_feature (tdesc, | 4011 | break; |
5174 | - "org.gnu.gdb.microblaze.stack-protect"); | ||
5175 | + for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
5176 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
5177 | + microblaze_register_names[i]); | ||
5178 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
5179 | + feature = tdesc_find_feature (tdesc, | ||
5180 | + "org.gnu.gdb.microblaze64.stack-protect"); | ||
5181 | + else | ||
5182 | + feature = tdesc_find_feature (tdesc, | ||
5183 | + "org.gnu.gdb.microblaze.stack-protect"); | ||
5184 | if (feature != NULL) | ||
5185 | - { | ||
5186 | - valid_p = 1; | ||
5187 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
5188 | - MICROBLAZE_SLR_REGNUM, | ||
5189 | - "rslr"); | ||
5190 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
5191 | - MICROBLAZE_SHR_REGNUM, | ||
5192 | - "rshr"); | ||
5193 | - } | ||
5194 | + { | ||
5195 | + valid_p = 1; | ||
5196 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
5197 | + MICROBLAZE_SLR_REGNUM, | ||
5198 | + "slr"); | ||
5199 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
5200 | + MICROBLAZE_SHR_REGNUM, | ||
5201 | + "shr"); | ||
5202 | + } | ||
5203 | |||
5204 | if (!valid_p) | ||
5205 | - return NULL; | ||
5206 | + { | ||
5207 | + // tdesc_data_cleanup (tdesc_data.get ()); | ||
5208 | + return NULL; | ||
5209 | + } | ||
5210 | } | 4012 | } |
5211 | 4013 | - | |
5212 | /* Allocate space for the new architecture. */ | 4014 | + if(microblaze_abi == MICROBLAZE_ABI_M64) |
5213 | @@ -899,7 +946,17 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 4015 | + set_gdbarch_ptr_bit (gdbarch, 64); |
5214 | /* Register numbers of various important registers. */ | 4016 | |
5215 | set_gdbarch_sp_regnum (gdbarch, MICROBLAZE_SP_REGNUM); | ||
5216 | set_gdbarch_pc_regnum (gdbarch, MICROBLAZE_PC_REGNUM); | ||
5217 | + | ||
5218 | + /* Register set. | ||
5219 | + make_regs (gdbarch); */ | ||
5220 | + switch (info.bfd_arch_info->mach) | ||
5221 | + { | ||
5222 | + case bfd_mach_microblaze64: | ||
5223 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
5224 | + break; | ||
5225 | + } | ||
5226 | |||
5227 | + | ||
5228 | /* Map Dwarf2 registers to GDB registers. */ | 4017 | /* Map Dwarf2 registers to GDB registers. */ |
5229 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | 4018 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); |
4019 | @@ -1014,6 +1129,38 @@ _initialize_microblaze_tdep () | ||
4020 | { | ||
4021 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
5230 | 4022 | ||
5231 | @@ -919,7 +976,9 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 4023 | +// static struct cmd_list_element *setmicroblazecmdlist = NULL; |
5232 | microblaze_breakpoint::kind_from_pc); | 4024 | +// static struct cmd_list_element *showmicroblazecmdlist = NULL; |
5233 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, | 4025 | + |
5234 | microblaze_breakpoint::bp_from_kind); | 4026 | + /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ |
5235 | - set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | 4027 | + |
5236 | +// set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | 4028 | + add_setshow_prefix_cmd ("microblaze", no_class, |
5237 | + | 4029 | + _("Various microblaze specific commands."), |
5238 | +// set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | 4030 | + _("Various microblaze specific commands."), |
5239 | 4031 | + &setmicroblazecmdlist,&showmicroblazecmdlist, | |
5240 | set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | 4032 | + &setlist,&showlist); |
5241 | 4033 | +#if 0 | |
5242 | @@ -927,7 +986,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 4034 | + add_prefix_cmd ("microblaze", no_class, set_microblaze_command, |
5243 | 4035 | + _("Various microblaze specific commands."), | |
5244 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | 4036 | + &setmicroblazecmdlist, "set microblaze ", 0, &setlist); |
5245 | 4037 | + | |
5246 | - microblaze_register_g_packet_guesses (gdbarch); | 4038 | + add_prefix_cmd ("microblaze", no_class, show_microblaze_command, |
5247 | + //microblaze_register_g_packet_guesses (gdbarch); | 4039 | + _("Various microblaze specific commands."), |
5248 | 4040 | + &showmicroblazecmdlist, "show microblaze ", 0, &showlist); | |
5249 | frame_base_set_default (gdbarch, µblaze_frame_base); | 4041 | +#endif |
5250 | 4042 | + | |
5251 | @@ -942,12 +1001,11 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | 4043 | + /* Allow the user to override the ABI. */ |
5252 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); | 4044 | + add_setshow_enum_cmd ("abi", class_obscure, microblaze_abi_strings, |
5253 | //frame_base_append_sniffer (gdbarch, microblaze_frame_sniffer); | 4045 | + µblaze_abi_string, _("\ |
4046 | +Set the microblaze ABI used by this program."), _("\ | ||
4047 | +Show the microblaze ABI used by this program."), _("\ | ||
4048 | +This option can be set to one of:\n\ | ||
4049 | + auto - the default ABI associated with the current binary\n\ | ||
4050 | + m64"), | ||
4051 | + microblaze_abi_update, | ||
4052 | + show_microblaze_abi, | ||
4053 | + &setmicroblazecmdlist, &showmicroblazecmdlist); | ||
4054 | + | ||
4055 | initialize_tdesc_microblaze_with_stack_protect (); | ||
4056 | initialize_tdesc_microblaze (); | ||
4057 | initialize_tdesc_microblaze64_with_stack_protect (); | ||
4058 | @@ -1028,5 +1175,4 @@ When non-zero, microblaze specific debugging is enabled."), | ||
4059 | NULL, | ||
4060 | &setdebuglist, &showdebuglist); | ||
5254 | 4061 | ||
5255 | - /* If we have register sets, enable the generic core file support. */ | ||
5256 | + /* If we have register sets, enable the generic core file support. | ||
5257 | if (tdep->gregset) { | ||
5258 | set_gdbarch_iterate_over_regset_sections (gdbarch, | ||
5259 | microblaze_iterate_over_regset_sections); | ||
5260 | - } | ||
5261 | - | 4062 | - |
5262 | + }*/ | ||
5263 | return gdbarch; | ||
5264 | } | 4063 | } |
5265 | |||
5266 | @@ -959,6 +1017,8 @@ _initialize_microblaze_tdep () | ||
5267 | |||
5268 | initialize_tdesc_microblaze_with_stack_protect (); | ||
5269 | initialize_tdesc_microblaze (); | ||
5270 | + initialize_tdesc_microblaze64_with_stack_protect (); | ||
5271 | + initialize_tdesc_microblaze64 (); | ||
5272 | /* Debug this files internals. */ | ||
5273 | add_setshow_zuinteger_cmd ("microblaze", class_maintenance, | ||
5274 | µblaze_debug_flag, _("\ | ||
5275 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | 4064 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h |
5276 | index 2415acfe7b6..f4d810303ca 100644 | 4065 | index 81f7f30cb8e..f6cef7c9a33 100644 |
5277 | --- a/gdb/microblaze-tdep.h | 4066 | --- a/gdb/microblaze-tdep.h |
5278 | +++ b/gdb/microblaze-tdep.h | 4067 | +++ b/gdb/microblaze-tdep.h |
5279 | @@ -28,7 +28,7 @@ struct microblaze_gregset | 4068 | @@ -19,9 +19,17 @@ |
5280 | microblaze_gregset() {} | ||
5281 | unsigned int gregs[32]; | ||
5282 | unsigned int fpregs[32]; | ||
5283 | - unsigned int pregs[16]; | ||
5284 | + unsigned int pregs[18]; | ||
5285 | }; | ||
5286 | |||
5287 | struct microblaze_gdbarch_tdep : gdbarch_tdep | ||
5288 | @@ -134,7 +134,7 @@ struct microblaze_frame_cache | ||
5289 | struct trad_frame_saved_reg *saved_regs; | ||
5290 | }; | ||
5291 | /* All registers are 32 bits. */ | ||
5292 | -#define MICROBLAZE_REGISTER_SIZE 4 | ||
5293 | +//#define MICROBLAZE_REGISTER_SIZE 8 | ||
5294 | |||
5295 | /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used. | ||
5296 | Only used for native debugging. */ | ||
5297 | diff --git a/include/elf/common.h b/include/elf/common.h | ||
5298 | index 70d63e3299c..8aa330d6631 100644 | ||
5299 | --- a/include/elf/common.h | ||
5300 | +++ b/include/elf/common.h | ||
5301 | @@ -360,6 +360,7 @@ | ||
5302 | #define EM_U16_U8CORE 260 /* LAPIS nX-U16/U8 */ | ||
5303 | #define EM_TACHYUM 261 /* Tachyum */ | ||
5304 | #define EM_56800EF 262 /* NXP 56800EF Digital Signal Controller (DSC) */ | ||
5305 | +#define EM_MB_64 263 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ | ||
5306 | |||
5307 | /* If it is necessary to assign new unofficial EM_* values, please pick large | ||
5308 | random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision | ||
5309 | diff --git a/include/elf/microblaze.h b/include/elf/microblaze.h | ||
5310 | index 43ad3ad3904..79799b86a49 100644 | ||
5311 | --- a/include/elf/microblaze.h | ||
5312 | +++ b/include/elf/microblaze.h | ||
5313 | @@ -61,6 +61,10 @@ START_RELOC_NUMBERS (elf_microblaze_reloc_type) | ||
5314 | RELOC_NUMBER (R_MICROBLAZE_TEXTPCREL_64, 30) /* PC-relative TEXT offset. */ | ||
5315 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_64, 31) /* TEXT Entry offset 64-bit. */ | ||
5316 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_32_LO, 32) /* TEXT Entry offset 32-bit. */ | ||
5317 | + RELOC_NUMBER (R_MICROBLAZE_32_NONE, 33) | ||
5318 | + RELOC_NUMBER (R_MICROBLAZE_IMML_64, 34) | ||
5319 | + RELOC_NUMBER (R_MICROBLAZE_GPC_64, 35) /* GOT entry offset. */ | ||
5320 | + | ||
5321 | END_RELOC_NUMBERS (R_MICROBLAZE_max) | ||
5322 | |||
5323 | /* Global base address names. */ | ||
5324 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
5325 | index b057492ba93..283d87c04a2 100644 | ||
5326 | --- a/opcodes/microblaze-dis.c | ||
5327 | +++ b/opcodes/microblaze-dis.c | ||
5328 | @@ -33,6 +33,7 @@ | ||
5329 | #define get_field_r1(buf, instr) get_field (buf, instr, RA_MASK, RA_LOW) | ||
5330 | #define get_field_r2(buf, instr) get_field (buf, instr, RB_MASK, RB_LOW) | ||
5331 | #define get_int_field_imm(instr) ((instr & IMM_MASK) >> IMM_LOW) | ||
5332 | +#define get_int_field_imml(instr) ((instr & IMML_MASK) >> IMM_LOW) | ||
5333 | #define get_int_field_r1(instr) ((instr & RA_MASK) >> RA_LOW) | ||
5334 | |||
5335 | #define NUM_STRBUFS 3 | ||
5336 | @@ -73,11 +74,20 @@ get_field_imm (struct string_buf *buf, long instr) | ||
5337 | } | ||
5338 | 4069 | ||
5339 | static char * | 4070 | #ifndef MICROBLAZE_TDEP_H |
5340 | -get_field_imm5 (struct string_buf *buf, long instr) | 4071 | #define MICROBLAZE_TDEP_H 1 |
5341 | +get_field_imml (struct string_buf *buf, long instr) | 4072 | - |
5342 | { | 4073 | +#include "objfiles.h" |
5343 | char *p = strbuf (buf); | 4074 | #include "gdbarch.h" |
5344 | |||
5345 | - sprintf (p, "%d", (short)((instr & IMM5_MASK) >> IMM_LOW)); | ||
5346 | + sprintf (p, "%d", (int)((instr & IMML_MASK) >> IMM_LOW)); | ||
5347 | + return p; | ||
5348 | +} | ||
5349 | + | ||
5350 | +static char * | ||
5351 | +get_field_imms (struct string_buf *buf, long instr) | ||
5352 | +{ | ||
5353 | + char *p = strbuf (buf); | ||
5354 | + | ||
5355 | + sprintf (p, "%d", (short)((instr & IMM6_MASK) >> IMM_LOW)); | ||
5356 | return p; | ||
5357 | } | ||
5358 | |||
5359 | @@ -90,6 +100,18 @@ get_field_imm5_mbar (struct string_buf *buf, long instr) | ||
5360 | return p; | ||
5361 | } | ||
5362 | |||
5363 | +static char * | ||
5364 | +get_field_immw (struct string_buf *buf, long instr) | ||
5365 | +{ | ||
5366 | + char *p = strbuf (buf); | ||
5367 | + | ||
5368 | + if (instr & 0x00004000) | ||
5369 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW))); /* bsefi */ | ||
5370 | + else | ||
5371 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW) - ((instr & IMM6_MASK) >> IMM_LOW) + 1)); /* bsifi */ | ||
5372 | + return p; | ||
5373 | +} | ||
5374 | + | ||
5375 | static char * | ||
5376 | get_field_rfsl (struct string_buf *buf, long instr) | ||
5377 | { | ||
5378 | @@ -296,9 +318,14 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
5379 | } | ||
5380 | } | ||
5381 | break; | ||
5382 | - case INST_TYPE_RD_R1_IMM5: | ||
5383 | + case INST_TYPE_RD_R1_IMML: | ||
5384 | + print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
5385 | + get_field_r1(&buf, inst), get_field_imm (&buf, inst)); | ||
5386 | + /* TODO: Also print symbol */ | ||
5387 | + break; | ||
5388 | + case INST_TYPE_RD_R1_IMMS: | ||
5389 | print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
5390 | - get_field_r1 (&buf, inst), get_field_imm5 (&buf, inst)); | ||
5391 | + get_field_r1(&buf, inst), get_field_imms (&buf, inst)); | ||
5392 | break; | ||
5393 | case INST_TYPE_RD_RFSL: | ||
5394 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
5395 | @@ -402,9 +429,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
5396 | } | ||
5397 | } | ||
5398 | break; | ||
5399 | - case INST_TYPE_RD_R2: | ||
5400 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
5401 | - get_field_r2 (&buf, inst)); | ||
5402 | + case INST_TYPE_IMML: | ||
5403 | + print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
5404 | + /* TODO: Also print symbol */ | ||
5405 | + break; | ||
5406 | + case INST_TYPE_RD_R2: | ||
5407 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_r2 (&buf, inst)); | ||
5408 | break; | ||
5409 | case INST_TYPE_R2: | ||
5410 | print_func (stream, "\t%s", get_field_r2 (&buf, inst)); | ||
5411 | @@ -427,7 +457,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
5412 | /* For mbar 16 or sleep insn. */ | ||
5413 | case INST_TYPE_NONE: | ||
5414 | break; | ||
5415 | - /* For tuqula instruction */ | ||
5416 | + /* For bit field insns. */ | ||
5417 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
5418 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
5419 | + get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
5420 | + break; | ||
5421 | + /* For tuqula instruction */ | ||
5422 | case INST_TYPE_RD: | ||
5423 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
5424 | break; | ||
5425 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
5426 | index ffb0f08c692..5e45df995de 100644 | ||
5427 | --- a/opcodes/microblaze-opc.h | ||
5428 | +++ b/opcodes/microblaze-opc.h | ||
5429 | @@ -40,7 +40,7 @@ | ||
5430 | #define INST_TYPE_RD_SPECIAL 11 | ||
5431 | #define INST_TYPE_R1 12 | ||
5432 | /* New instn type for barrel shift imms. */ | ||
5433 | -#define INST_TYPE_RD_R1_IMM5 13 | ||
5434 | +#define INST_TYPE_RD_R1_IMMS 13 | ||
5435 | #define INST_TYPE_RD_RFSL 14 | ||
5436 | #define INST_TYPE_R1_RFSL 15 | ||
5437 | |||
5438 | @@ -59,6 +59,15 @@ | ||
5439 | /* For mbar. */ | ||
5440 | #define INST_TYPE_IMM5 20 | ||
5441 | |||
5442 | +/* For bsefi and bsifi */ | ||
5443 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
5444 | + | ||
5445 | +/* For 64-bit instructions */ | ||
5446 | +#define INST_TYPE_IMML 22 | ||
5447 | +#define INST_TYPE_RD_R1_IMML 23 | ||
5448 | +#define INST_TYPE_R1_IMML 24 | ||
5449 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
5450 | + | ||
5451 | #define INST_TYPE_NONE 25 | ||
5452 | |||
5453 | |||
5454 | @@ -88,10 +97,14 @@ | ||
5455 | #define OPCODE_MASK_H24 0xFC1F07FF /* High 6, bits 20-16 and low 11 bits. */ | ||
5456 | #define OPCODE_MASK_H124 0xFFFF07FF /* High 16, and low 11 bits. */ | ||
5457 | #define OPCODE_MASK_H1234 0xFFFFFFFF /* All 32 bits. */ | ||
5458 | -#define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22. */ | ||
5459 | +#define OPCODE_MASK_H3 0xFC000700 /* High 6 bits and bits 21, 22, 23. */ | ||
5460 | +#define OPCODE_MASK_H3B 0xFC00E600 /* High 6 bits and bits 16, 17, 18, 21, 22. */ | ||
5461 | #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21. */ | ||
5462 | +#define OPCODE_MASK_H32B 0xFC00E000 /* High 6 bits and bit 16, 17, 18. */ | ||
5463 | #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits. */ | ||
5464 | +#define OPCODE_MASK_H35B 0xFC0004FF /* High 6 bits and low 9 bits. */ | ||
5465 | #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */ | ||
5466 | +#define OPCODE_MASK_H8 0xFF000000 /* High 8 bits only. */ | ||
5467 | |||
5468 | /* New Mask for msrset, msrclr insns. */ | ||
5469 | #define OPCODE_MASK_H23N 0xFC1F8000 /* High 6 and bits 11 - 16. */ | ||
5470 | @@ -101,7 +114,7 @@ | ||
5471 | #define DELAY_SLOT 1 | ||
5472 | #define NO_DELAY_SLOT 0 | ||
5473 | |||
5474 | -#define MAX_OPCODES 289 | ||
5475 | +#define MAX_OPCODES 412 | ||
5476 | 4075 | ||
5477 | const struct op_code_struct | 4076 | +struct gdbarch; |
4077 | +enum microblaze_abi | ||
4078 | + { | ||
4079 | + MICROBLAZE_ABI_AUTO = 0, | ||
4080 | + MICROBLAZE_ABI_M64, | ||
4081 | + }; | ||
4082 | + | ||
4083 | +enum microblaze_abi microblaze_abi (struct gdbarch *gdbarch); | ||
4084 | /* Microblaze architecture-specific information. */ | ||
4085 | struct microblaze_gregset | ||
5478 | { | 4086 | { |
5479 | @@ -119,6 +132,7 @@ const struct op_code_struct | 4087 | @@ -35,11 +43,14 @@ struct microblaze_gdbarch_tdep : gdbarch_tdep_base |
5480 | /* More info about output format here. */ | ||
5481 | } microblaze_opcodes[MAX_OPCODES] = | ||
5482 | { | 4088 | { |
5483 | + /* 32-bit instructions */ | 4089 | int dummy; // declare something. |
5484 | {"add", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000000, OPCODE_MASK_H4, add, arithmetic_inst }, | ||
5485 | {"rsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H4, rsub, arithmetic_inst }, | ||
5486 | {"addc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000000, OPCODE_MASK_H4, addc, arithmetic_inst }, | ||
5487 | @@ -155,9 +169,11 @@ const struct op_code_struct | ||
5488 | {"ncget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C006000, OPCODE_MASK_H32, ncget, anyware_inst }, | ||
5489 | {"ncput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00E000, OPCODE_MASK_H32, ncput, anyware_inst }, | ||
5490 | {"muli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x60000000, OPCODE_MASK_H, muli, mult_inst }, | ||
5491 | - {"bslli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3, bslli, barrel_shift_inst }, | ||
5492 | - {"bsrai", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3, bsrai, barrel_shift_inst }, | ||
5493 | - {"bsrli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3, bsrli, barrel_shift_inst }, | ||
5494 | + {"bslli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3B, bslli, barrel_shift_inst }, | ||
5495 | + {"bsrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3B, bsrai, barrel_shift_inst }, | ||
5496 | + {"bsrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3B, bsrli, barrel_shift_inst }, | ||
5497 | + {"bsefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64004000, OPCODE_MASK_H32B, bsefi, barrel_shift_inst }, | ||
5498 | + {"bsifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64008000, OPCODE_MASK_H32B, bsifi, barrel_shift_inst }, | ||
5499 | {"or", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000000, OPCODE_MASK_H4, microblaze_or, logical_inst }, | ||
5500 | {"and", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000000, OPCODE_MASK_H4, microblaze_and, logical_inst }, | ||
5501 | {"xor", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000000, OPCODE_MASK_H4, microblaze_xor, logical_inst }, | ||
5502 | @@ -174,9 +190,14 @@ const struct op_code_struct | ||
5503 | {"wic", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000068, OPCODE_MASK_H34B, wic, special_inst }, | ||
5504 | {"wdc", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000064, OPCODE_MASK_H34B, wdc, special_inst }, | ||
5505 | {"wdc.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000066, OPCODE_MASK_H34B, wdcclear, special_inst }, | ||
5506 | + {"wdc.ext.clear", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000466, OPCODE_MASK_H35B, wdcextclear, special_inst }, | ||
5507 | {"wdc.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000074, OPCODE_MASK_H34B, wdcflush, special_inst }, | ||
5508 | + {"wdc.ext.flush", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000476, OPCODE_MASK_H35B, wdcextflush, special_inst }, | ||
5509 | + {"wdc.clear.ea", INST_TYPE_R1_R2_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900000E6, OPCODE_MASK_H34B, wdcclearea, special_inst }, | ||
5510 | {"mts", INST_TYPE_SPECIAL_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MTS, 0x9400C000, OPCODE_MASK_H13S, mts, special_inst }, | ||
5511 | + {"mtse", INST_TYPE_SPECIAL_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MTS, 0x9500C000, OPCODE_MASK_H13S, mtse,special_inst }, | ||
5512 | {"mfs", INST_TYPE_RD_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MFS, 0x94008000, OPCODE_MASK_H23S, mfs, special_inst }, | ||
5513 | + {"mfse", INST_TYPE_RD_SPECIAL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_MFS, 0x94088000, OPCODE_MASK_H23S, mfse, special_inst }, | ||
5514 | {"br", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98000000, OPCODE_MASK_H124, br, branch_inst }, | ||
5515 | {"brd", INST_TYPE_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98100000, OPCODE_MASK_H124, brd, branch_inst }, | ||
5516 | {"brld", INST_TYPE_RD_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98140000, OPCODE_MASK_H24, brld, branch_inst }, | ||
5517 | @@ -226,18 +247,24 @@ const struct op_code_struct | ||
5518 | {"bgeid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBEA00000, OPCODE_MASK_H1, bgeid, branch_inst }, | ||
5519 | {"lbu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC0000000, OPCODE_MASK_H4, lbu, memory_load_inst }, | ||
5520 | {"lbur", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC0000200, OPCODE_MASK_H4, lbur, memory_load_inst }, | ||
5521 | + {"lbuea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC0000080, OPCODE_MASK_H4, lbuea, memory_load_inst }, | ||
5522 | {"lhu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC4000000, OPCODE_MASK_H4, lhu, memory_load_inst }, | ||
5523 | {"lhur", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC4000200, OPCODE_MASK_H4, lhur, memory_load_inst }, | ||
5524 | + {"lhuea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC4000080, OPCODE_MASK_H4, lhuea, memory_load_inst }, | ||
5525 | {"lw", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000000, OPCODE_MASK_H4, lw, memory_load_inst }, | ||
5526 | {"lwr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000200, OPCODE_MASK_H4, lwr, memory_load_inst }, | ||
5527 | {"lwx", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000400, OPCODE_MASK_H4, lwx, memory_load_inst }, | ||
5528 | + {"lwea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000080, OPCODE_MASK_H4, lwea, memory_load_inst }, | ||
5529 | {"sb", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD0000000, OPCODE_MASK_H4, sb, memory_store_inst }, | ||
5530 | {"sbr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD0000200, OPCODE_MASK_H4, sbr, memory_store_inst }, | ||
5531 | + {"sbea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD0000080, OPCODE_MASK_H4, sbea, memory_store_inst }, | ||
5532 | {"sh", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD4000000, OPCODE_MASK_H4, sh, memory_store_inst }, | ||
5533 | {"shr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD4000200, OPCODE_MASK_H4, shr, memory_store_inst }, | ||
5534 | + {"shea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD4000080, OPCODE_MASK_H4, shea, memory_store_inst }, | ||
5535 | {"sw", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000000, OPCODE_MASK_H4, sw, memory_store_inst }, | ||
5536 | {"swr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000200, OPCODE_MASK_H4, swr, memory_store_inst }, | ||
5537 | {"swx", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000400, OPCODE_MASK_H4, swx, memory_store_inst }, | ||
5538 | + {"swea", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000080, OPCODE_MASK_H4, swea, memory_store_inst }, | ||
5539 | {"lbui", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE0000000, OPCODE_MASK_H, lbui, memory_load_inst }, | ||
5540 | {"lhui", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE4000000, OPCODE_MASK_H, lhui, memory_load_inst }, | ||
5541 | {"lwi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE8000000, OPCODE_MASK_H, lwi, memory_load_inst }, | ||
5542 | @@ -248,9 +275,7 @@ const struct op_code_struct | ||
5543 | {"la", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* la translates to addik. */ | ||
5544 | {"tuqula",INST_TYPE_RD, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3000002A, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* tuqula rd translates to addik rd, r0, 42. */ | ||
5545 | {"not", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA800FFFF, OPCODE_MASK_H34, invalid_inst, logical_inst }, /* not translates to xori rd,ra,-1. */ | ||
5546 | - {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
5547 | {"rtb", INST_TYPE_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB6000004, OPCODE_MASK_H1, invalid_inst, return_inst }, /* rtb translates to rts rd, 4. */ | ||
5548 | - {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
5549 | {"lmi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE8000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, | ||
5550 | {"smi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xF8000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, | ||
5551 | {"msrset",INST_TYPE_RD_IMM15, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x94100000, OPCODE_MASK_H23N, msrset, special_inst }, | ||
5552 | @@ -402,8 +427,135 @@ const struct op_code_struct | ||
5553 | {"clz", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900000E0, OPCODE_MASK_H34, clz, special_inst }, | ||
5554 | {"mbar", INST_TYPE_IMM5, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8020004, OPCODE_MASK_HN, mbar, special_inst }, | ||
5555 | {"sleep", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBA020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 16. */ | ||
5556 | + {"hibernate", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB9020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 8. */ | ||
5557 | + {"suspend", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBB020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 24. */ | ||
5558 | {"swapb", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E0, OPCODE_MASK_H4, swapb, arithmetic_inst }, | ||
5559 | {"swaph", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E2, OPCODE_MASK_H4, swaph, arithmetic_inst }, | ||
5560 | + | ||
5561 | + /* 64-bit instructions */ | ||
5562 | + {"addl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000100, OPCODE_MASK_H4, addl, arithmetic_inst }, | ||
5563 | + {"rsubl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000100, OPCODE_MASK_H4, rsubl, arithmetic_inst }, | ||
5564 | + {"addlc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000100, OPCODE_MASK_H4, addlc, arithmetic_inst }, | ||
5565 | + {"rsublc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x0C000100, OPCODE_MASK_H4, rsublc, arithmetic_inst }, | ||
5566 | + {"addlk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x10000100, OPCODE_MASK_H4, addlk, arithmetic_inst }, | ||
5567 | + {"rsublk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000100, OPCODE_MASK_H4, rsublk, arithmetic_inst }, | ||
5568 | + {"addlkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x18000100, OPCODE_MASK_H4, addlkc, arithmetic_inst }, | ||
5569 | + {"rsublkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x1C000100, OPCODE_MASK_H4, rsublkc, arithmetic_inst }, | ||
5570 | + {"cmpl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000101, OPCODE_MASK_H4, cmpl, arithmetic_inst }, | ||
5571 | + {"cmplu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000103, OPCODE_MASK_H4, cmplu, arithmetic_inst }, | ||
5572 | + {"addli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x20000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5573 | + {"rsubli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x24000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5574 | + {"addlic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x28000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5575 | + {"rsublic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x2C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5576 | + {"addlik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5577 | + {"rsublik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x34000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5578 | + {"addlikc", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x38000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5579 | + {"rsublikc",INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
5580 | + {"mull", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x40000100, OPCODE_MASK_H4, mull, mult_inst }, | ||
5581 | + {"bslll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000500, OPCODE_MASK_H3, bslll, barrel_shift_inst }, | ||
5582 | + {"bslra", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000300, OPCODE_MASK_H3, bslra, barrel_shift_inst }, | ||
5583 | + {"bslrl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000100, OPCODE_MASK_H3, bslrl, barrel_shift_inst }, | ||
5584 | + {"bsllli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002400, OPCODE_MASK_H3B, bsllli, barrel_shift_inst }, | ||
5585 | + {"bslrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002200, OPCODE_MASK_H3B, bslrai, barrel_shift_inst }, | ||
5586 | + {"bslrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002000, OPCODE_MASK_H3B, bslrli, barrel_shift_inst }, | ||
5587 | + {"bslefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64006000, OPCODE_MASK_H32B, bslefi, barrel_shift_inst }, | ||
5588 | + {"bslifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6400a000, OPCODE_MASK_H32B, bslifi, barrel_shift_inst }, | ||
5589 | + {"orl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000100, OPCODE_MASK_H4, orl, logical_inst }, | ||
5590 | + {"andl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000100, OPCODE_MASK_H4, andl, logical_inst }, | ||
5591 | + {"xorl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000100, OPCODE_MASK_H4, xorl, logical_inst }, | ||
5592 | + {"andnl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000100, OPCODE_MASK_H4, andnl, logical_inst }, | ||
5593 | + {"pcmplbf", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000500, OPCODE_MASK_H4, pcmplbf, logical_inst }, | ||
5594 | + {"pcmpleq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000500, OPCODE_MASK_H4, pcmpleq, logical_inst }, | ||
5595 | + {"pcmplne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000500, OPCODE_MASK_H4, pcmplne, logical_inst }, | ||
5596 | + {"srla", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000101, OPCODE_MASK_H34, srla, logical_inst }, | ||
5597 | + {"srlc", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000121, OPCODE_MASK_H34, srlc, logical_inst }, | ||
5598 | + {"srll", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000141, OPCODE_MASK_H34, srll, logical_inst }, | ||
5599 | + {"sextl8", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000160, OPCODE_MASK_H34, sextl8, logical_inst }, | ||
5600 | + {"sextl16", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000161, OPCODE_MASK_H34, sextl16, logical_inst }, | ||
5601 | + {"sextl32", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000162, OPCODE_MASK_H34, sextl32, logical_inst }, | ||
5602 | + {"brea", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98010000, OPCODE_MASK_H124, brea, branch_inst }, | ||
5603 | + {"bread", INST_TYPE_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98110000, OPCODE_MASK_H124, bread, branch_inst }, | ||
5604 | + {"breald", INST_TYPE_RD_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98150000, OPCODE_MASK_H24, breald, branch_inst }, | ||
5605 | + {"beaeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000000, OPCODE_MASK_H14, beaeq, branch_inst }, | ||
5606 | + {"bealeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000100, OPCODE_MASK_H14, bealeq, branch_inst }, | ||
5607 | + {"beaeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000000, OPCODE_MASK_H14, beaeqd, branch_inst }, | ||
5608 | + {"bealeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000100, OPCODE_MASK_H14, bealeqd, branch_inst }, | ||
5609 | + {"beane", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200000, OPCODE_MASK_H14, beane, branch_inst }, | ||
5610 | + {"bealne", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200100, OPCODE_MASK_H14, bealne, branch_inst }, | ||
5611 | + {"beaned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200000, OPCODE_MASK_H14, beaned, branch_inst }, | ||
5612 | + {"bealned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200100, OPCODE_MASK_H14, bealned, branch_inst }, | ||
5613 | + {"bealt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400000, OPCODE_MASK_H14, bealt, branch_inst }, | ||
5614 | + {"beallt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400100, OPCODE_MASK_H14, beallt, branch_inst }, | ||
5615 | + {"bealtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400000, OPCODE_MASK_H14, bealtd, branch_inst }, | ||
5616 | + {"bealltd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400100, OPCODE_MASK_H14, bealltd, branch_inst }, | ||
5617 | + {"beale", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600000, OPCODE_MASK_H14, beale, branch_inst }, | ||
5618 | + {"bealle", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600100, OPCODE_MASK_H14, bealle, branch_inst }, | ||
5619 | + {"bealed", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600000, OPCODE_MASK_H14, bealed, branch_inst }, | ||
5620 | + {"bealled", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600100, OPCODE_MASK_H14, bealled, branch_inst }, | ||
5621 | + {"beagt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800000, OPCODE_MASK_H14, beagt, branch_inst }, | ||
5622 | + {"bealgt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800100, OPCODE_MASK_H14, bealgt, branch_inst }, | ||
5623 | + {"beagtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800000, OPCODE_MASK_H14, beagtd, branch_inst }, | ||
5624 | + {"bealgtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800100, OPCODE_MASK_H14, bealgtd, branch_inst }, | ||
5625 | + {"beage", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00000, OPCODE_MASK_H14, beage, branch_inst }, | ||
5626 | + {"bealge", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00100, OPCODE_MASK_H14, bealge, branch_inst }, | ||
5627 | + {"beaged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00000, OPCODE_MASK_H14, beaged, branch_inst }, | ||
5628 | + {"bealged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00100, OPCODE_MASK_H14, bealged, branch_inst }, | ||
5629 | + {"orli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA0000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
5630 | + {"andli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA4000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
5631 | + {"xorli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA8000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
5632 | + {"andnli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xAC000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
5633 | + {"imml", INST_TYPE_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB2000000, OPCODE_MASK_H8, imml, immediate_inst }, | ||
5634 | + {"breai", INST_TYPE_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8010000, OPCODE_MASK_H12, breai, branch_inst }, | ||
5635 | + {"breaid", INST_TYPE_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8110000, OPCODE_MASK_H12, breaid, branch_inst }, | ||
5636 | + {"brealid", INST_TYPE_RD_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8150000, OPCODE_MASK_H2, brealid, branch_inst }, | ||
5637 | + {"beaeqi", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, beaeqi, branch_inst }, | ||
5638 | + {"bealeqi", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqi */ | ||
5639 | + {"beaeqid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, beaeqid, branch_inst }, | ||
5640 | + {"bealeqid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqid */ | ||
5641 | + {"beanei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, beanei, branch_inst }, | ||
5642 | + {"bealnei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beanei */ | ||
5643 | + {"beaneid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, beaneid, branch_inst }, | ||
5644 | + {"bealneid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaneid */ | ||
5645 | + {"bealti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, bealti, branch_inst }, | ||
5646 | + {"beallti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealti */ | ||
5647 | + {"bealtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, bealtid, branch_inst }, | ||
5648 | + {"bealltid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealtid */ | ||
5649 | + {"bealei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, bealei, branch_inst }, | ||
5650 | + {"beallei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealei */ | ||
5651 | + {"bealeid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, bealeid, branch_inst }, | ||
5652 | + {"bealleid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealeid */ | ||
5653 | + {"beagti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, beagti, branch_inst }, | ||
5654 | + {"bealgti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagti */ | ||
5655 | + {"beagtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, beagtid, branch_inst }, | ||
5656 | + {"bealgtid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagtid */ | ||
5657 | + {"beagei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, beagei, branch_inst }, | ||
5658 | + {"bealgei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagei */ | ||
5659 | + {"beageid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, beageid, branch_inst }, | ||
5660 | + {"bealgeid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beageid */ | ||
5661 | + {"ll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000100, OPCODE_MASK_H4, ll, memory_load_inst }, | ||
5662 | + {"llr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000300, OPCODE_MASK_H4, llr, memory_load_inst }, | ||
5663 | + {"sl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000100, OPCODE_MASK_H4, sl, memory_store_inst }, | ||
5664 | + {"slr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000300, OPCODE_MASK_H4, slr, memory_store_inst }, | ||
5665 | + {"lli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xEC000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, /* Identical to 32-bit */ | ||
5666 | + {"sli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xFC000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, /* Identical to 32-bit */ | ||
5667 | + {"lla", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* lla translates to addlik */ | ||
5668 | + {"dadd", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000400, OPCODE_MASK_H4, dadd, arithmetic_inst }, | ||
5669 | + {"drsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000480, OPCODE_MASK_H4, drsub, arithmetic_inst }, | ||
5670 | + {"dmul", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000500, OPCODE_MASK_H4, dmul, arithmetic_inst }, | ||
5671 | + {"ddiv", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000580, OPCODE_MASK_H4, ddiv, arithmetic_inst }, | ||
5672 | + {"dcmp.lt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000610, OPCODE_MASK_H4, dcmp_lt, arithmetic_inst }, | ||
5673 | + {"dcmp.eq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000620, OPCODE_MASK_H4, dcmp_eq, arithmetic_inst }, | ||
5674 | + {"dcmp.le", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000630, OPCODE_MASK_H4, dcmp_le, arithmetic_inst }, | ||
5675 | + {"dcmp.gt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000640, OPCODE_MASK_H4, dcmp_gt, arithmetic_inst }, | ||
5676 | + {"dcmp.ne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000650, OPCODE_MASK_H4, dcmp_ne, arithmetic_inst }, | ||
5677 | + {"dcmp.ge", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000660, OPCODE_MASK_H4, dcmp_ge, arithmetic_inst }, | ||
5678 | + {"dcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000600, OPCODE_MASK_H4, dcmp_un, arithmetic_inst }, | ||
5679 | + {"dbl", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000680, OPCODE_MASK_H4, dbl, arithmetic_inst }, | ||
5680 | + {"dlong", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000700, OPCODE_MASK_H4, dlong, arithmetic_inst }, | ||
5681 | + {"dsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000780, OPCODE_MASK_H4, dsqrt, arithmetic_inst }, | ||
5682 | + {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
5683 | + {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
5684 | + | ||
5685 | {"", 0, 0, 0, 0, 0, 0, 0, 0}, | ||
5686 | }; | ||
5687 | |||
5688 | @@ -424,5 +576,17 @@ char pvr_register_prefix[] = "rpvr"; | ||
5689 | #define MIN_IMM5 ((int) 0x00000000) | ||
5690 | #define MAX_IMM5 ((int) 0x0000001f) | ||
5691 | 4090 | ||
5692 | +#define MIN_IMM6 ((int) 0x00000000) | 4091 | + enum microblaze_abi microblaze_abi {}; |
5693 | +#define MAX_IMM6 ((int) 0x0000003f) | 4092 | + enum microblaze_abi found_abi {}; |
5694 | + | 4093 | /* Register sets. */ |
5695 | +#define MIN_IMM_WIDTH ((int) 0x00000001) | 4094 | struct regset *gregset; |
5696 | +#define MAX_IMM_WIDTH ((int) 0x00000020) | 4095 | size_t sizeof_gregset; |
5697 | + | 4096 | struct regset *fpregset; |
5698 | +#define MIN_IMM6_WIDTH ((int) 0x00000001) | 4097 | size_t sizeof_fpregset; |
5699 | +#define MAX_IMM6_WIDTH ((int) 0x00000040) | 4098 | + int register_size; |
5700 | + | ||
5701 | +#define MIN_IMML ((long) 0xffffff8000000000L) | ||
5702 | +#define MAX_IMML ((long) 0x0000007fffffffffL) | ||
5703 | + | ||
5704 | #endif /* MICROBLAZE_OPC */ | ||
5705 | |||
5706 | diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h | ||
5707 | index 8e293465fec..254d9fe911e 100644 | ||
5708 | --- a/opcodes/microblaze-opcm.h | ||
5709 | +++ b/opcodes/microblaze-opcm.h | ||
5710 | @@ -25,22 +25,23 @@ | ||
5711 | |||
5712 | enum microblaze_instr | ||
5713 | { | ||
5714 | + /* 32-bit instructions */ | ||
5715 | add, rsub, addc, rsubc, addk, rsubk, addkc, rsubkc, clz, cmp, cmpu, | ||
5716 | addi, rsubi, addic, rsubic, addik, rsubik, addikc, rsubikc, mul, | ||
5717 | mulh, mulhu, mulhsu,swapb,swaph, | ||
5718 | idiv, idivu, bsll, bsra, bsrl, get, put, nget, nput, cget, cput, | ||
5719 | - ncget, ncput, muli, bslli, bsrai, bsrli, mului, | ||
5720 | + ncget, ncput, muli, bslli, bsrai, bsrli, bsefi, bsifi, mului, | ||
5721 | /* 'or/and/xor' are C++ keywords. */ | ||
5722 | microblaze_or, microblaze_and, microblaze_xor, | ||
5723 | andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16, | ||
5724 | - wic, wdc, wdcclear, wdcflush, mts, mfs, mbar, br, brd, | ||
5725 | - brld, bra, brad, brald, microblaze_brk, beq, beqd, bne, bned, blt, | ||
5726 | - bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni, | ||
5727 | + wic, wdc, wdcclear, wdcextclear, wdcflush, wdcextflush, wdcclearea, mts, mtse, | ||
5728 | + mfs, mfse, mbar, br, brd, brld, bra, brad, brald, microblaze_brk, beq, beqd, | ||
5729 | + bne, bned, blt, bltd, ble, bled, bgt, bgtd, bge, bged, ori, andi, xori, andni, | ||
5730 | imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid, | ||
5731 | brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti, | ||
5732 | - bgtid, bgei, bgeid, lbu, lbur, lhu, lhur, lw, lwr, lwx, sb, sbr, sh, | ||
5733 | - shr, sw, swr, swx, lbui, lhui, lwi, | ||
5734 | - sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
5735 | + bgtid, bgei, bgeid, lbu, lbuea, lbur, lhu, lhuea, lhur, lw, lwea, lwr, lwx, | ||
5736 | + sb, sbea, sbr, sh, shea, shr, sw, swea, swr, swx, lbui, lhui, lwi, lli, | ||
5737 | + sbi, shi, sli, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
5738 | fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, | ||
5739 | /* 'fsqrt' is a glibc:math.h symbol. */ | ||
5740 | fint, microblaze_fsqrt, | ||
5741 | @@ -59,6 +60,18 @@ enum microblaze_instr | ||
5742 | aputd, taputd, caputd, tcaputd, naputd, tnaputd, ncaputd, tncaputd, | ||
5743 | eagetd, teagetd, ecagetd, tecagetd, neagetd, tneagetd, necagetd, tnecagetd, | ||
5744 | eaputd, teaputd, ecaputd, tecaputd, neaputd, tneaputd, necaputd, tnecaputd, | ||
5745 | + | ||
5746 | + /* 64-bit instructions */ | ||
5747 | + addl, rsubl, addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
5748 | + bslll, bslra, bslrl, bsllli, bslrai, bslrli, bslefi, bslifi, orl, andl, xorl, | ||
5749 | + andnl, pcmplbf, pcmpleq, pcmplne, srla, srlc, srll, sextl8, sextl16, sextl32, | ||
5750 | + brea, bread, breald, beaeq, bealeq, beaeqd, bealeqd, beane, bealne, beaned, | ||
5751 | + bealned, bealt, beallt, bealtd, bealltd, beale, bealle, bealed, bealled, beagt, | ||
5752 | + bealgt, beagtd, bealgtd, beage, bealge, beaged, bealged, breai, breaid, brealid, | ||
5753 | + beaeqi, beaeqid, beanei, beaneid, bealti, bealtid, bealei, bealeid, beagti, | ||
5754 | + beagtid, beagei, beageid, imml, ll, llr, sl, slr, | ||
5755 | + dadd, drsub, dmul, ddiv, dcmp_lt, dcmp_eq, dcmp_le, dcmp_gt, dcmp_ne, dcmp_ge, | ||
5756 | + dcmp_un, dbl, dlong, dsqrt, | ||
5757 | invalid_inst | ||
5758 | }; | 4099 | }; |
5759 | 4100 | ||
5760 | @@ -130,18 +143,25 @@ enum microblaze_instr_type | 4101 | /* Register numbers. */ |
5761 | #define RB_LOW 11 /* Low bit for RB. */ | ||
5762 | #define IMM_LOW 0 /* Low bit for immediate. */ | ||
5763 | #define IMM_MBAR 21 /* low bit for mbar instruction. */ | ||
5764 | +#define IMM_WIDTH_LOW 6 /* Low bit for immediate width */ | ||
5765 | |||
5766 | #define RD_MASK 0x03E00000 | ||
5767 | #define RA_MASK 0x001F0000 | ||
5768 | #define RB_MASK 0x0000F800 | ||
5769 | #define IMM_MASK 0x0000FFFF | ||
5770 | +#define IMML_MASK 0x00FFFFFF | ||
5771 | |||
5772 | -/* Imm mask for barrel shifts. */ | ||
5773 | +/* Imm masks for barrel shifts. */ | ||
5774 | #define IMM5_MASK 0x0000001F | ||
5775 | +#define IMM6_MASK 0x0000003F | ||
5776 | |||
5777 | /* Imm mask for mbar. */ | ||
5778 | #define IMM5_MBAR_MASK 0x03E00000 | ||
5779 | |||
5780 | +/* Imm masks for extract/insert width. */ | ||
5781 | +#define IMM5_WIDTH_MASK 0x000007C0 | ||
5782 | +#define IMM6_WIDTH_MASK 0x00000FC0 | ||
5783 | + | ||
5784 | /* FSL imm mask for get, put instructions. */ | ||
5785 | #define RFSL_MASK 0x000000F | ||
5786 | |||
5787 | -- | 4102 | -- |
5788 | 2.37.1 (Apple Git-137.1) | 4103 | 2.34.1 |
5789 | 4104 | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0009-Depth-Total-number-of-inline-functions-refer-inline-.patch index 941a3b9c..6ec184d0 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0009-Depth-Total-number-of-inline-functions-refer-inline-.patch | |||
@@ -1,32 +1,41 @@ | |||
1 | From 0532b1db08b9d8efc670f7288fe2d8168b8ed0d1 Mon Sep 17 00:00:00 2001 | 1 | From bd2d24cf21943babe2e0a73cf68da273a38d7058 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 21 Jul 2022 11:45:01 +0530 | 3 | Date: Thu, 21 Jul 2022 11:45:01 +0530 |
4 | Subject: [PATCH 8/8] =?UTF-8?q?[Patch,MicroBlaze]:=20Depth:=20=20Total=20n?= | 4 | Subject: [PATCH 09/53] =?UTF-8?q?Depth:=20Total=20number=20of=20inline=20f?= |
5 | =?UTF-8?q?umber=20of=20inline=20functions=20[refer=20inline-frame.c]=20st?= | 5 | =?UTF-8?q?unctions=20[refer=20inline-frame.c]=20state->skipped=5Fframes?= |
6 | =?UTF-8?q?ate->skipped=5Fframes=20:=20Number=20of=20inline=20functions=20?= | 6 | =?UTF-8?q?=20:=20Number=20of=20inline=20functions=20skipped.=20the=20curr?= |
7 | =?UTF-8?q?skipped.=20the=20current=20unwind=5Fpc=20is=20causing=20an=20is?= | 7 | =?UTF-8?q?ent=20unwind=5Fpc=20is=20causing=20an=20issue=20when=20we=20try?= |
8 | =?UTF-8?q?sue=20when=20we=20try=20to=20step=20into=20inline=20functions[D?= | 8 | =?UTF-8?q?=20to=20step=20into=20inline=20functions[Depth=20is=20becoming?= |
9 | =?UTF-8?q?epth=20is=20becoming=200].=20It=E2=80=99s=20incrementing=20pc?= | 9 | =?UTF-8?q?=200].=20It=E2=80=99s=20incrementing=20pc=20by=208=20even=20wit?= |
10 | =?UTF-8?q?=20by=208=20even=20with=20si=20instruction.?= | 10 | =?UTF-8?q?h=20si=20instruction.?= |
11 | MIME-Version: 1.0 | 11 | MIME-Version: 1.0 |
12 | Content-Type: text/plain; charset=UTF-8 | 12 | Content-Type: text/plain; charset=UTF-8 |
13 | Content-Transfer-Encoding: 8bit | 13 | Content-Transfer-Encoding: 8bit |
14 | 14 | ||
15 | Upstream-Status: Pending | 15 | Signed-off-by: Aayush Misra <aayushm@amd.com> |
16 | |||
17 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
18 | |||
19 | --- | 16 | --- |
20 | gdb/microblaze-tdep.c | 14 +++----------- | 17 | gdb/features/microblaze64.xml | 1 + |
21 | 1 file changed, 3 insertions(+), 11 deletions(-) | 18 | gdb/microblaze-tdep.c | 14 +++----------- |
19 | 2 files changed, 4 insertions(+), 11 deletions(-) | ||
22 | 20 | ||
21 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
22 | index 515d18e65cf..9c1b7d22003 100644 | ||
23 | --- a/gdb/features/microblaze64.xml | ||
24 | +++ b/gdb/features/microblaze64.xml | ||
25 | @@ -7,5 +7,6 @@ | ||
26 | |||
27 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
28 | <target> | ||
29 | + <architecture>microblaze64</architecture> | ||
30 | <xi:include href="microblaze64-core.xml"/> | ||
31 | </target> | ||
23 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | 32 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c |
24 | index d83072cdaef..38ba38e8c7d 100644 | 33 | index 597507e53cd..aed5f2ec30c 100644 |
25 | --- a/gdb/microblaze-tdep.c | 34 | --- a/gdb/microblaze-tdep.c |
26 | +++ b/gdb/microblaze-tdep.c | 35 | +++ b/gdb/microblaze-tdep.c |
27 | @@ -513,16 +513,8 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, | 36 | @@ -513,16 +513,8 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, |
28 | static CORE_ADDR | 37 | static CORE_ADDR |
29 | microblaze_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) | 38 | microblaze_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) |
30 | { | 39 | { |
31 | - gdb_byte buf[4]; | 40 | - gdb_byte buf[4]; |
32 | CORE_ADDR pc; | 41 | CORE_ADDR pc; |
@@ -61,5 +70,5 @@ index d83072cdaef..38ba38e8c7d 100644 | |||
61 | 70 | ||
62 | static CORE_ADDR | 71 | static CORE_ADDR |
63 | -- | 72 | -- |
64 | 2.37.1 (Apple Git-137.1) | 73 | 2.34.1 |
65 | 74 | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch new file mode 100644 index 00000000..78e4970b --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch | |||
@@ -0,0 +1,133 @@ | |||
1 | From 3616ef25911d9fa8b5c0e4883f19131da48896d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 29 Feb 2024 10:53:04 +0530 | ||
4 | Subject: [PATCH 10/53] Fix gdb-14 build errors for microblaze-xilinx-elf | ||
5 | 2023.2 merge | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/elf64-microblaze.c | 12 ++++++++++++ | ||
10 | gdb/frame.c | 2 +- | ||
11 | gdb/microblaze-tdep.c | 17 +++++++++++------ | ||
12 | 3 files changed, 24 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
15 | index 6cd9753a592..119d266f95a 100755 | ||
16 | --- a/bfd/elf64-microblaze.c | ||
17 | +++ b/bfd/elf64-microblaze.c | ||
18 | @@ -750,6 +750,18 @@ microblaze_elf_info_to_howto (bfd * abfd, | ||
19 | return true; | ||
20 | } | ||
21 | |||
22 | +/* Relax table contains information about instructions which can | ||
23 | + be removed by relaxation -- replacing a long address with a | ||
24 | + short address. */ | ||
25 | +struct relax_table | ||
26 | +{ | ||
27 | + /* Address where bytes may be deleted. */ | ||
28 | + bfd_vma addr; | ||
29 | + | ||
30 | + /* Number of bytes to be deleted. */ | ||
31 | + size_t size; | ||
32 | +}; | ||
33 | + | ||
34 | struct _microblaze_elf_section_data | ||
35 | { | ||
36 | struct bfd_elf_section_data elf; | ||
37 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
38 | index 859e1a6553d..94bb026c4d9 100644 | ||
39 | --- a/gdb/frame.c | ||
40 | +++ b/gdb/frame.c | ||
41 | @@ -1319,7 +1319,7 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum) | ||
42 | int i; | ||
43 | |||
44 | const gdb_byte *buf = NULL; | ||
45 | - if (value_entirely_available(value)) { | ||
46 | + if (value->entirely_available()) { | ||
47 | gdb::array_view<const gdb_byte> buf = value->contents (); | ||
48 | } | ||
49 | |||
50 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
51 | index aed5f2ec30c..e1a7a49eb84 100644 | ||
52 | --- a/gdb/microblaze-tdep.c | ||
53 | +++ b/gdb/microblaze-tdep.c | ||
54 | @@ -75,7 +75,7 @@ static const char *const microblaze_abi_strings[] = { | ||
55 | enum microblaze_abi | ||
56 | microblaze_abi (struct gdbarch *gdbarch) | ||
57 | { | ||
58 | - microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
59 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
60 | return tdep->microblaze_abi; | ||
61 | } | ||
62 | /* The registers of the Xilinx microblaze processor. */ | ||
63 | @@ -120,12 +120,12 @@ show_microblaze_abi (struct ui_file *file, | ||
64 | |||
65 | #if 1 | ||
66 | if (global_abi == MICROBLAZE_ABI_AUTO) | ||
67 | - fprintf_filtered | ||
68 | + gdb_printf | ||
69 | (file, | ||
70 | "The microblaze ABI is set automatically (currently \"%s\").\n", | ||
71 | actual_abi_str); | ||
72 | else if (global_abi == actual_abi) | ||
73 | - fprintf_filtered | ||
74 | + gdb_printf | ||
75 | (file, | ||
76 | "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", | ||
77 | actual_abi_str); | ||
78 | @@ -133,7 +133,7 @@ show_microblaze_abi (struct ui_file *file, | ||
79 | { | ||
80 | #endif | ||
81 | /* Probably shouldn't happen... */ | ||
82 | - fprintf_filtered (file, | ||
83 | + gdb_printf (file, | ||
84 | "The (auto detected) microblaze ABI \"%s\" is in use " | ||
85 | "even though the user setting was \"%s\".\n", | ||
86 | actual_abi_str, microblaze_abi_strings[global_abi]); | ||
87 | @@ -934,7 +934,7 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
88 | void *cb_data, | ||
89 | const struct regcache *regcache) | ||
90 | { | ||
91 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
92 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
93 | |||
94 | cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
95 | |||
96 | @@ -942,6 +942,8 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
97 | } | ||
98 | |||
99 | |||
100 | +#if 0 | ||
101 | +// compilation errors - function is not actually used ? | ||
102 | static void | ||
103 | make_regs (struct gdbarch *arch) | ||
104 | { | ||
105 | @@ -953,6 +955,7 @@ make_regs (struct gdbarch *arch) | ||
106 | set_gdbarch_ptr_bit (arch, 64); | ||
107 | } | ||
108 | } | ||
109 | +#endif | ||
110 | |||
111 | static struct gdbarch * | ||
112 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
113 | @@ -964,7 +967,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
114 | /* What has the user specified from the command line? */ | ||
115 | wanted_abi = global_microblaze_abi (); | ||
116 | if (gdbarch_debug) | ||
117 | - fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
118 | + gdb_printf (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
119 | wanted_abi); | ||
120 | if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
121 | microblaze_abi = wanted_abi; | ||
122 | @@ -1038,6 +1041,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
123 | gdbarch *gdbarch | ||
124 | = gdbarch_alloc (&info, gdbarch_tdep_up (new microblaze_gdbarch_tdep)); | ||
125 | |||
126 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
127 | + | ||
128 | tdep->gregset = NULL; | ||
129 | tdep->sizeof_gregset = 0; | ||
130 | tdep->fpregset = NULL; | ||
131 | -- | ||
132 | 2.34.1 | ||
133 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch new file mode 100644 index 00000000..d3da41d5 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 9037b1a9e862263ba935314e8604a922d14c8dd4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 29 Feb 2024 10:55:16 +0530 | ||
4 | Subject: [PATCH 11/53] fix gdb microblaze-xilinx-elf crash issue on invocation | ||
5 | Regression from merging microblaze 64-bit support | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | gdb/microblaze-tdep.c | 3 +++ | ||
10 | 1 file changed, 3 insertions(+) | ||
11 | |||
12 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
13 | index e1a7a49eb84..f9cb3dfda33 100644 | ||
14 | --- a/gdb/microblaze-tdep.c | ||
15 | +++ b/gdb/microblaze-tdep.c | ||
16 | @@ -1124,6 +1124,9 @@ void _initialize_microblaze_tdep (); | ||
17 | void | ||
18 | _initialize_microblaze_tdep () | ||
19 | { | ||
20 | + //Setting abi to auto manually, should be able to modify in 'arch'_gdbarch_init function | ||
21 | + microblaze_abi_string = microblaze_abi_strings[0]; | ||
22 | + | ||
23 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
24 | |||
25 | // static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
26 | -- | ||
27 | 2.34.1 | ||
28 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0012-Add-mlittle-endian-and-mbig-endian-flags.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0012-Add-mlittle-endian-and-mbig-endian-flags.patch new file mode 100644 index 00000000..e1074c85 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0012-Add-mlittle-endian-and-mbig-endian-flags.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 05a5677c1b5cd7f109c49e6697b6716f7ac0fb97 Mon Sep 17 00:00:00 2001 | ||
2 | From: nagaraju <nmekala@xilix.com> | ||
3 | Date: Tue, 19 Mar 2013 17:18:23 +0530 | ||
4 | Subject: [PATCH 12/53] Add mlittle-endian and mbig-endian flags | ||
5 | |||
6 | Added support in gas for mlittle-endian and mbig-endian flags | ||
7 | as options. | ||
8 | |||
9 | Updated show usage for MicroBlaze specific assembler options | ||
10 | to include new entries. | ||
11 | |||
12 | Signed-off-by:nagaraju <nmekala@xilix.com> | ||
13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | gas/config/tc-microblaze.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
18 | |||
19 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
20 | index c971d187095..62238646a52 100644 | ||
21 | --- a/gas/config/tc-microblaze.c | ||
22 | +++ b/gas/config/tc-microblaze.c | ||
23 | @@ -37,6 +37,8 @@ | ||
24 | |||
25 | #define OPTION_EB (OPTION_MD_BASE + 0) | ||
26 | #define OPTION_EL (OPTION_MD_BASE + 1) | ||
27 | +#define OPTION_LITTLE (OPTION_MD_BASE + 2) | ||
28 | +#define OPTION_BIG (OPTION_MD_BASE + 3) | ||
29 | |||
30 | void microblaze_generate_symbol (char *sym); | ||
31 | static bool check_spl_reg (unsigned *); | ||
32 | @@ -2565,9 +2567,11 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
33 | switch (c) | ||
34 | { | ||
35 | case OPTION_EB: | ||
36 | + case OPTION_BIG: | ||
37 | target_big_endian = 1; | ||
38 | break; | ||
39 | case OPTION_EL: | ||
40 | + case OPTION_LITTLE: | ||
41 | target_big_endian = 0; | ||
42 | break; | ||
43 | default: | ||
44 | -- | ||
45 | 2.34.1 | ||
46 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0013-Disable-the-warning-message-for-eh_frame_hdr.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0013-Disable-the-warning-message-for-eh_frame_hdr.patch new file mode 100644 index 00000000..31529d0d --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0013-Disable-the-warning-message-for-eh_frame_hdr.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From a622ee3ff40515edf05a61a77fbcd8999ecf0905 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> | ||
3 | Date: Fri, 22 Jun 2012 01:20:20 +0200 | ||
4 | Subject: [PATCH 13/53] Disable the warning message for eh_frame_hdr | ||
5 | |||
6 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | ||
7 | |||
8 | Conflicts: | ||
9 | bfd/elf-eh-frame.c | ||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | bfd/elf-eh-frame.c | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c | ||
16 | index 9a504234163..5e393558293 100644 | ||
17 | --- a/bfd/elf-eh-frame.c | ||
18 | +++ b/bfd/elf-eh-frame.c | ||
19 | @@ -1045,10 +1045,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
20 | goto success; | ||
21 | |||
22 | free_no_table: | ||
23 | +/* FIXME: Remove the microblaze specifics when relaxing gets fixed. */ | ||
24 | +if (bfd_get_arch(abfd) != bfd_arch_microblaze) { | ||
25 | _bfd_error_handler | ||
26 | /* xgettext:c-format */ | ||
27 | (_("error in %pB(%pA); no .eh_frame_hdr table will be created"), | ||
28 | abfd, sec); | ||
29 | +} | ||
30 | hdr_info->u.dwarf.table = false; | ||
31 | free (sec_info); | ||
32 | success: | ||
33 | -- | ||
34 | 2.34.1 | ||
35 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0014-Fix-relaxation-of-assembler-resolved-references-Fixu.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0014-Fix-relaxation-of-assembler-resolved-references-Fixu.patch new file mode 100644 index 00000000..7574067d --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0014-Fix-relaxation-of-assembler-resolved-references-Fixu.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 965a464418e8c8968453206f27763043fb38dc64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Tue, 8 Nov 2016 11:54:08 +0530 | ||
4 | Subject: [PATCH 14/53] Fix relaxation of assembler resolved references,Fixup | ||
5 | debug_loc sections after linker relaxation Adds a new reloctype | ||
6 | R_MICROBLAZE_32_NONE, used for passing reloc info from the assembler to the | ||
7 | linker when the linker manages to fully resolve a local symbol reference. | ||
8 | |||
9 | This is a workaround for design flaws in the assembler to | ||
10 | linker interface with regards to linker relaxation. | ||
11 | |||
12 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | ||
13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
14 | |||
15 | Conflicts: | ||
16 | bfd/elf32-microblaze.c | ||
17 | binutils/readelf.c | ||
18 | include/elf/microblaze.h | ||
19 | |||
20 | Conflicts: | ||
21 | binutils/readelf.c | ||
22 | |||
23 | Conflicts: | ||
24 | bfd/elf32-microblaze.c | ||
25 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
26 | --- | ||
27 | binutils/readelf.c | 5 +++++ | ||
28 | 1 file changed, 5 insertions(+) | ||
29 | |||
30 | diff --git a/binutils/readelf.c b/binutils/readelf.c | ||
31 | index 5e4ad6ea6ad..3ca9f3697d1 100644 | ||
32 | --- a/binutils/readelf.c | ||
33 | +++ b/binutils/readelf.c | ||
34 | @@ -15288,6 +15288,11 @@ is_8bit_abs_reloc (Filedata * filedata, unsigned int reloc_type) | ||
35 | || reloc_type == 9 /* R_MICROBLAZE_64_NONE. */); | ||
36 | default: | ||
37 | return false; | ||
38 | + /* REVISIT microblaze-binutils-merge */ | ||
39 | + case EM_MICROBLAZE: | ||
40 | + return reloc_type == 33 /* R_MICROBLAZE_32_NONE. */ | ||
41 | + || reloc_type == 0 /* R_MICROBLAZE_NONE. */ | ||
42 | + || reloc_type == 9; /* R_MICROBLAZE_64_NONE. */ | ||
43 | } | ||
44 | } | ||
45 | |||
46 | -- | ||
47 | 2.34.1 | ||
48 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch new file mode 100644 index 00000000..c46af2e7 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 07743ed9395bfea466cdbdf0bbe9566fa93165de Mon Sep 17 00:00:00 2001 | ||
2 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
3 | Date: Wed, 27 Feb 2013 13:56:11 +1000 | ||
4 | Subject: [PATCH 15/53] upstream change to garbage collection sweep causes mb | ||
5 | regression | ||
6 | |||
7 | Upstream change for PR13177 now clears the def_regular during gc_sweep of a | ||
8 | section. (All other archs in binutils/bfd/elf32-*.c received an update | ||
9 | to a warning about unresolvable relocations - this warning is not present | ||
10 | in binutils/bfd/elf32-microblaze.c, but this warning check would not | ||
11 | prevent the error being seen) | ||
12 | |||
13 | The visible issue with this change is when running a c++ application | ||
14 | in Petalinux which links libstdc++.so for exception handling it segfaults | ||
15 | on execution. | ||
16 | |||
17 | This does not occur if static linking libstdc++.a, so its during the | ||
18 | relocations for a shared lib with garbage collection this occurs | ||
19 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
21 | |||
22 | Conflicts: | ||
23 | bfd/elflink.c | ||
24 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
25 | --- | ||
26 | bfd/elflink.c | 1 - | ||
27 | 1 file changed, 1 deletion(-) | ||
28 | |||
29 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
30 | index c2494b3e12e..1f8f54cd4e6 100644 | ||
31 | --- a/bfd/elflink.c | ||
32 | +++ b/bfd/elflink.c | ||
33 | @@ -6633,7 +6633,6 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) | ||
34 | |||
35 | inf = (struct elf_gc_sweep_symbol_info *) data; | ||
36 | (*inf->hide_symbol) (inf->info, h, true); | ||
37 | - h->def_regular = 0; | ||
38 | h->ref_regular = 0; | ||
39 | h->ref_regular_nonweak = 0; | ||
40 | } | ||
41 | -- | ||
42 | 2.34.1 | ||
43 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0016-Add-new-bit-field-instructions.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0016-Add-new-bit-field-instructions.patch new file mode 100644 index 00000000..aab6c5d1 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0016-Add-new-bit-field-instructions.patch | |||
@@ -0,0 +1,219 @@ | |||
1 | From 39ef5af3dd4551b24a47c8e48af67478183a7149 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Mon, 18 Jul 2016 12:24:28 +0530 | ||
4 | Subject: [PATCH 16/53] Add new bit-field instructions | ||
5 | |||
6 | This patches adds new bsefi and bsifi instructions. | ||
7 | BSEFI- The instruction shall extract a bit field from a | ||
8 | register and place it right-adjusted in the destination register. | ||
9 | The other bits in the destination register shall be set to zero | ||
10 | BSIFI- The instruction shall insert a right-adjusted bit field | ||
11 | from a register at another position in the destination register. | ||
12 | The rest of the bits in the destination register shall be unchanged | ||
13 | |||
14 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | ||
15 | |||
16 | Conflicts: | ||
17 | opcodes/microblaze-dis.c | ||
18 | |||
19 | Conflicts: | ||
20 | gas/config/tc-microblaze.c | ||
21 | opcodes/microblaze-opc.h | ||
22 | |||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gas/config/tc-microblaze.c | 82 ++++++++++++++++---------------------- | ||
26 | opcodes/microblaze-dis.c | 18 ++++++++- | ||
27 | opcodes/microblaze-opc.h | 6 +++ | ||
28 | 3 files changed, 58 insertions(+), 48 deletions(-) | ||
29 | |||
30 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
31 | index 62238646a52..f13efcae979 100644 | ||
32 | --- a/gas/config/tc-microblaze.c | ||
33 | +++ b/gas/config/tc-microblaze.c | ||
34 | @@ -1150,88 +1150,76 @@ md_assemble (char * str) | ||
35 | inst |= (reg2 << RA_LOW) & RA_MASK; | ||
36 | inst |= (immed << IMM_LOW) & IMM5_MASK; | ||
37 | break; | ||
38 | - | ||
39 | - case INST_TYPE_RD_R1_IMMW_IMMS: | ||
40 | + case INST_TYPE_RD_R1_IMM5_IMM5: | ||
41 | if (strcmp (op_end, "")) | ||
42 | - op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
43 | + op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
44 | else | ||
45 | { | ||
46 | - as_fatal (_("Error in statement syntax")); | ||
47 | - reg1 = 0; | ||
48 | - } | ||
49 | - | ||
50 | + as_fatal (_("Error in statement syntax")); | ||
51 | + reg1 = 0; | ||
52 | + } | ||
53 | if (strcmp (op_end, "")) | ||
54 | - op_end = parse_reg (op_end + 1, ®2); /* Get r1. */ | ||
55 | + op_end = parse_reg (op_end + 1, ®2); /* Get r1. */ | ||
56 | else | ||
57 | { | ||
58 | - as_fatal (_("Error in statement syntax")); | ||
59 | - reg2 = 0; | ||
60 | - } | ||
61 | + as_fatal (_("Error in statement syntax")); | ||
62 | + reg2 = 0; | ||
63 | + } | ||
64 | |||
65 | /* Check for spl registers. */ | ||
66 | if (check_spl_reg (®1)) | ||
67 | - as_fatal (_("Cannot use special register with this instruction")); | ||
68 | + as_fatal (_("Cannot use special register with this instruction")); | ||
69 | if (check_spl_reg (®2)) | ||
70 | - as_fatal (_("Cannot use special register with this instruction")); | ||
71 | + as_fatal (_("Cannot use special register with this instruction")); | ||
72 | |||
73 | /* Width immediate value. */ | ||
74 | if (strcmp (op_end, "")) | ||
75 | - op_end = parse_imm (op_end + 1, &exp, MIN_IMM_WIDTH, MAX_IMM_WIDTH); | ||
76 | + op_end = parse_imm (op_end + 1, &exp, MIN_IMM_WIDTH, MAX_IMM_WIDTH); | ||
77 | else | ||
78 | - as_fatal (_("Error in statement syntax")); | ||
79 | - | ||
80 | + as_fatal (_("Error in statement syntax")); | ||
81 | if (exp.X_op != O_constant) | ||
82 | { | ||
83 | - as_warn (_( | ||
84 | - "Symbol used as immediate width value for bit field instruction")); | ||
85 | - immed = 1; | ||
86 | - } | ||
87 | + as_warn (_("Symbol used as immediate width value for bit field instruction")); | ||
88 | + immed = 1; | ||
89 | + } | ||
90 | else | ||
91 | - immed = exp.X_add_number; | ||
92 | - | ||
93 | + immed = exp.X_add_number; | ||
94 | if (opcode->instr == bsefi && immed > 31) | ||
95 | - as_fatal (_("Width value must be less than 32")); | ||
96 | + as_fatal (_("Width value must be less than 32")); | ||
97 | |||
98 | /* Shift immediate value. */ | ||
99 | if (strcmp (op_end, "")) | ||
100 | - op_end = parse_imm (op_end + 1, &exp, MIN_IMM, MAX_IMM); | ||
101 | + op_end = parse_imm (op_end + 1, &exp, MIN_IMM, MAX_IMM); | ||
102 | else | ||
103 | - as_fatal (_("Error in statement syntax")); | ||
104 | - | ||
105 | + as_fatal (_("Error in statement syntax")); | ||
106 | if (exp.X_op != O_constant) | ||
107 | - { | ||
108 | - as_warn (_( | ||
109 | - "Symbol used as immediate shift value for bit field instruction")); | ||
110 | - immed2 = 0; | ||
111 | - } | ||
112 | + { | ||
113 | + as_warn (_("Symbol used as immediate shift value for bit field instruction")); | ||
114 | + immed2 = 0; | ||
115 | + } | ||
116 | else | ||
117 | - { | ||
118 | - output = frag_more (isize); | ||
119 | - immed2 = exp.X_add_number; | ||
120 | - } | ||
121 | - | ||
122 | + { | ||
123 | + output = frag_more (isize); | ||
124 | + immed2 = exp.X_add_number; | ||
125 | + } | ||
126 | if (immed2 != (immed2 % 32)) | ||
127 | - { | ||
128 | - as_warn (_("Shift value greater than 32. using <value %% 32>")); | ||
129 | - immed2 = immed2 % 32; | ||
130 | - } | ||
131 | + { | ||
132 | + as_warn (_("Shift value greater than 32. using <value %% 32>")); | ||
133 | + immed2 = immed2 % 32; | ||
134 | + } | ||
135 | |||
136 | /* Check combined value. */ | ||
137 | if (immed + immed2 > 32) | ||
138 | - as_fatal (_("Width value + shift value must not be greater than 32")); | ||
139 | + as_fatal (_("Width value + shift value must not be greater than 32")); | ||
140 | |||
141 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
142 | inst |= (reg2 << RA_LOW) & RA_MASK; | ||
143 | - | ||
144 | if (opcode->instr == bsefi) | ||
145 | - inst |= (immed & IMM5_MASK) << IMM_WIDTH_LOW; /* bsefi */ | ||
146 | + inst |= (immed & IMM5_MASK) << IMM_WIDTH_LOW; /* bsefi */ | ||
147 | else | ||
148 | - inst |= ((immed + immed2 - 1) & IMM5_MASK) | ||
149 | - << IMM_WIDTH_LOW; /* bsifi */ | ||
150 | - | ||
151 | + inst |= ((immed + immed2 - 1) & IMM5_MASK) << IMM_WIDTH_LOW; /* bsifi */ | ||
152 | inst |= (immed2 << IMM_LOW) & IMM5_MASK; | ||
153 | break; | ||
154 | - | ||
155 | case INST_TYPE_R1_R2: | ||
156 | if (strcmp (op_end, "")) | ||
157 | op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ | ||
158 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
159 | index ee447cecc3f..45135f9d264 100644 | ||
160 | --- a/opcodes/microblaze-dis.c | ||
161 | +++ b/opcodes/microblaze-dis.c | ||
162 | @@ -113,7 +113,19 @@ get_field_immw (struct string_buf *buf, long instr) | ||
163 | } | ||
164 | |||
165 | static char * | ||
166 | -get_field_rfsl (struct string_buf *buf, long instr) | ||
167 | +get_field_imm5width (struct string_buf *buf, long instr) | ||
168 | +{ | ||
169 | + char *p = strbuf (buf); | ||
170 | + | ||
171 | + if (instr & 0x00004000) | ||
172 | + sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) >> IMM_WIDTH_LOW))); /* bsefi */ | ||
173 | + else | ||
174 | + sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) >> IMM_WIDTH_LOW) - ((instr & IMM5_MASK) >> IMM_LOW) + 1)); /* bsifi */ | ||
175 | + return p; | ||
176 | +} | ||
177 | + | ||
178 | +static char * | ||
179 | +get_field_rfsl (struct string_buf *buf,long instr) | ||
180 | { | ||
181 | char *p = strbuf (buf); | ||
182 | |||
183 | @@ -462,6 +474,10 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
184 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
185 | get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
186 | break; | ||
187 | + /* For bit field insns. */ | ||
188 | + case INST_TYPE_RD_R1_IMM5_IMM5: | ||
189 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_imm5width (&buf, inst), get_field_imm5 (&buf, inst)); | ||
190 | + break; | ||
191 | /* For tuqula instruction */ | ||
192 | case INST_TYPE_RD: | ||
193 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
194 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
195 | index afc1220e357..a952b9ac3c2 100644 | ||
196 | --- a/opcodes/microblaze-opc.h | ||
197 | +++ b/opcodes/microblaze-opc.h | ||
198 | @@ -67,6 +67,9 @@ | ||
199 | #define INST_TYPE_RD_R1_IMML 23 | ||
200 | #define INST_TYPE_R1_IMML 24 | ||
201 | |||
202 | +/* For bsefi and bsifi */ | ||
203 | +#define INST_TYPE_RD_R1_IMM5_IMM5 21 | ||
204 | + | ||
205 | #define INST_TYPE_NONE 25 | ||
206 | |||
207 | |||
208 | @@ -586,5 +589,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
209 | #define MIN_IMML ((long) 0xffffff8000000000L) | ||
210 | #define MAX_IMML ((long) 0x0000007fffffffffL) | ||
211 | |||
212 | +#define MIN_IMM_WIDTH ((int) 0x00000001) | ||
213 | +#define MAX_IMM_WIDTH ((int) 0x00000020) | ||
214 | + | ||
215 | #endif /* MICROBLAZE_OPC */ | ||
216 | |||
217 | -- | ||
218 | 2.34.1 | ||
219 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0017-fixed-bug-in-GCC-so-that-It-will-support-.long-0U-an.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0017-fixed-bug-in-GCC-so-that-It-will-support-.long-0U-an.patch new file mode 100644 index 00000000..f679971d --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0017-fixed-bug-in-GCC-so-that-It-will-support-.long-0U-an.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From ea27bc6ec052b20f4c193054ecdef9bd4ecbcde7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Fri, 29 Sep 2017 18:00:23 +0530 | ||
4 | Subject: [PATCH 17/53] fixed bug in GCC so that It will support .long 0U and | ||
5 | .long 0u | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | gas/expr.c | 9 +++++++++ | ||
10 | 1 file changed, 9 insertions(+) | ||
11 | |||
12 | diff --git a/gas/expr.c b/gas/expr.c | ||
13 | index 3a01b88e310..8214bdf3263 100644 | ||
14 | --- a/gas/expr.c | ||
15 | +++ b/gas/expr.c | ||
16 | @@ -833,6 +833,15 @@ operand (expressionS *expressionP, enum expr_mode mode) | ||
17 | break; | ||
18 | } | ||
19 | } | ||
20 | + if ((*input_line_pointer == 'U') || (*input_line_pointer == 'u')) | ||
21 | + { | ||
22 | + input_line_pointer--; | ||
23 | + | ||
24 | + integer_constant ((NUMBERS_WITH_SUFFIX || flag_m68k_mri) | ||
25 | + ? 0 : 10, | ||
26 | + expressionP); | ||
27 | + break; | ||
28 | + } | ||
29 | c = *input_line_pointer; | ||
30 | switch (c) | ||
31 | { | ||
32 | -- | ||
33 | 2.34.1 | ||
34 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0018-Compiler-will-give-error-messages-in-more-detail-for.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0018-Compiler-will-give-error-messages-in-more-detail-for.patch new file mode 100644 index 00000000..c63f4566 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0018-Compiler-will-give-error-messages-in-more-detail-for.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 3056650d65b5bfa34bf16cd1ee7829a64dfb19ac Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Wed, 21 Feb 2018 12:32:02 +0530 | ||
4 | Subject: [PATCH 18/53] Compiler will give error messages in more detail for | ||
5 | mxl-gp-opt flag.. | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | ld/ldmain.c | 12 ++++++++++++ | ||
10 | 1 file changed, 12 insertions(+) | ||
11 | |||
12 | diff --git a/ld/ldmain.c b/ld/ldmain.c | ||
13 | index e90c2021b33..e135939fade 100644 | ||
14 | --- a/ld/ldmain.c | ||
15 | +++ b/ld/ldmain.c | ||
16 | @@ -1575,6 +1575,18 @@ reloc_overflow (struct bfd_link_info *info, | ||
17 | break; | ||
18 | case bfd_link_hash_defined: | ||
19 | case bfd_link_hash_defweak: | ||
20 | + | ||
21 | + if((strcmp(reloc_name,"R_MICROBLAZE_SRW32") == 0) && entry->type == bfd_link_hash_defined) | ||
22 | + { | ||
23 | + einfo (_(" relocation truncated to fit: don't enable small data pointer optimizations[mxl-gp-opt] if extern or multiple declarations used: " | ||
24 | + "%s against symbol `%T' defined in %A section in %B"), | ||
25 | + reloc_name, entry->root.string, | ||
26 | + entry->u.def.section, | ||
27 | + entry->u.def.section == bfd_abs_section_ptr | ||
28 | + ? info->output_bfd : entry->u.def.section->owner); | ||
29 | + break; | ||
30 | + } | ||
31 | + | ||
32 | einfo (_(" relocation truncated to fit: " | ||
33 | "%s against symbol `%pT' defined in %pA section in %pB"), | ||
34 | reloc_name, entry->root.string, | ||
35 | -- | ||
36 | 2.34.1 | ||
37 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0019-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0019-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..452c1418 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0019-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,202 @@ | |||
1 | From 06c3e8ef9bdea329af1099e14abbde3d76a114a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 19/53] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | bfd/bfd-in2.h | 14 ++++++++++++-- | ||
17 | bfd/libbfd.h | 2 ++ | ||
18 | bfd/reloc.c | 18 +++++++++++++++--- | ||
19 | gas/config/tc-microblaze.h | 4 +++- | ||
20 | ld/Makefile.am | 2 ++ | ||
21 | ld/configure.tgt | 3 +++ | ||
22 | opcodes/microblaze-dis.c | 8 ++++++-- | ||
23 | opcodes/microblaze-opc.h | 11 +++++++---- | ||
24 | 8 files changed, 50 insertions(+), 12 deletions(-) | ||
25 | |||
26 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
27 | index 7ccc155394d..8b2815d7303 100644 | ||
28 | --- a/bfd/bfd-in2.h | ||
29 | +++ b/bfd/bfd-in2.h | ||
30 | @@ -6472,8 +6472,13 @@ done here - only used for relaxing */ | ||
31 | BFD_RELOC_MICROBLAZE_64_NONE, | ||
32 | |||
33 | /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
34 | - two words (with an imm instruction). The relocation is PC-relative | ||
35 | - GOT offset. */ | ||
36 | + two words (with an imm instruction). No relocation is done here | ||
37 | + only used for relaxing */ | ||
38 | + BFD_RELOC_MICROBLAZE_64, | ||
39 | + | ||
40 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
41 | +value in two words (with an imm instruction). The relocation is | ||
42 | +PC-relative GOT offset */ | ||
43 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
44 | |||
45 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
46 | @@ -6481,6 +6486,11 @@ value in two words (with an imml instruction). The relocation is | ||
47 | PC-relative GOT offset */ | ||
48 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
49 | |||
50 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
51 | +value in two words (with an imml instruction). The relocation is | ||
52 | +PC-relative GOT offset */ | ||
53 | + BFD_RELOC_MICROBLAZE_64_GPC, | ||
54 | + | ||
55 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
56 | value in two words (with an imm instruction). The relocation is | ||
57 | GOT offset */ | ||
58 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | ||
59 | index 7a3e558d70a..603ed8260cb 100644 | ||
60 | --- a/bfd/libbfd.h | ||
61 | +++ b/bfd/libbfd.h | ||
62 | @@ -3005,7 +3005,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
63 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
64 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
65 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
66 | + "BFD_RELOC_MICROBLAZE_64", | ||
67 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
68 | + "BFD_RELOC_MICROBLAZE_64_GPC", | ||
69 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
70 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
71 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
72 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
73 | index fda67e5ffda..3e8647f601e 100644 | ||
74 | --- a/bfd/reloc.c | ||
75 | +++ b/bfd/reloc.c | ||
76 | @@ -6677,12 +6677,24 @@ ENUMDOC | ||
77 | This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
78 | two words (with an imm instruction). No relocation is done here - | ||
79 | only used for relaxing. | ||
80 | +ENUM | ||
81 | + BFD_RELOC_MICROBLAZE_64 | ||
82 | +ENUMDOC | ||
83 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
84 | + value in two words (with an imm instruction). No relocation is | ||
85 | + done here - only used for relaxing | ||
86 | ENUM | ||
87 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
88 | ENUMDOC | ||
89 | - This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
90 | - two words (with an imm instruction). The relocation is PC-relative | ||
91 | - GOT offset. | ||
92 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
93 | + value in two words (with an imml instruction). No relocation is | ||
94 | + done here - only used for relaxing | ||
95 | +ENUM | ||
96 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
97 | +ENUMDOC | ||
98 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
99 | + value in two words (with an imm instruction). The relocation is | ||
100 | + PC-relative GOT offset | ||
101 | ENUM | ||
102 | BFD_RELOC_MICROBLAZE_64_GOT | ||
103 | ENUMDOC | ||
104 | diff --git a/gas/config/tc-microblaze.h b/gas/config/tc-microblaze.h | ||
105 | index 20d0da5496d..f0f861c3373 100644 | ||
106 | --- a/gas/config/tc-microblaze.h | ||
107 | +++ b/gas/config/tc-microblaze.h | ||
108 | @@ -81,7 +81,9 @@ extern const struct relax_type md_relax_table[]; | ||
109 | |||
110 | #ifdef OBJ_ELF | ||
111 | |||
112 | -#define TARGET_FORMAT (target_big_endian ? "elf32-microblaze" : "elf32-microblazeel") | ||
113 | +#define TARGET_FORMAT microblaze_target_format() | ||
114 | +extern const char *microblaze_target_format (void); | ||
115 | +//#define TARGET_FORMAT (target_big_endian ? "elf32-microblaze" : "elf32-microblazeel") | ||
116 | |||
117 | #define ELF_TC_SPECIAL_SECTIONS \ | ||
118 | { ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, \ | ||
119 | diff --git a/ld/Makefile.am b/ld/Makefile.am | ||
120 | index f9ee05b1400..c1daf842444 100644 | ||
121 | --- a/ld/Makefile.am | ||
122 | +++ b/ld/Makefile.am | ||
123 | @@ -424,6 +424,8 @@ ALL_64_EMULATION_SOURCES = \ | ||
124 | eelf32ltsmipn32.c \ | ||
125 | eelf32ltsmipn32_fbsd.c \ | ||
126 | eelf32mipswindiss.c \ | ||
127 | + eelf64microblazeel.c \ | ||
128 | + eelf64microblaze.c \ | ||
129 | eelf64_aix.c \ | ||
130 | eelf64_ia64.c \ | ||
131 | eelf64_ia64_fbsd.c \ | ||
132 | diff --git a/ld/configure.tgt b/ld/configure.tgt | ||
133 | index f937f78b876..a9d3004e445 100644 | ||
134 | --- a/ld/configure.tgt | ||
135 | +++ b/ld/configure.tgt | ||
136 | @@ -527,6 +527,9 @@ microblaze*-linux*) targ_emul="elf32mb_linux" | ||
137 | microblazeel*) targ_emul=elf32microblazeel | ||
138 | targ_extra_emuls=elf32microblaze | ||
139 | ;; | ||
140 | +microblazeel64*) targ_emul=elf64microblazeel | ||
141 | + targ_extra_emuls=elf64microblaze | ||
142 | + ;; | ||
143 | microblaze*) targ_emul=elf32microblaze | ||
144 | targ_extra_emuls=elf32microblazeel | ||
145 | ;; | ||
146 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
147 | index 45135f9d264..45262aef909 100644 | ||
148 | --- a/opcodes/microblaze-dis.c | ||
149 | +++ b/opcodes/microblaze-dis.c | ||
150 | @@ -457,6 +457,10 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
151 | case INST_TYPE_R1_R2_SPECIAL: | ||
152 | print_func (stream, "\t%s, %s", get_field_r1 (&buf, inst), | ||
153 | get_field_r2 (&buf, inst)); | ||
154 | + break; | ||
155 | + case INST_TYPE_IMML: | ||
156 | + print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
157 | + /* TODO: Also print symbol */ | ||
158 | break; | ||
159 | case INST_TYPE_RD_IMM15: | ||
160 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
161 | @@ -475,8 +479,8 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
162 | get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
163 | break; | ||
164 | /* For bit field insns. */ | ||
165 | - case INST_TYPE_RD_R1_IMM5_IMM5: | ||
166 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_imm5width (&buf, inst), get_field_imm5 (&buf, inst)); | ||
167 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
168 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
169 | break; | ||
170 | /* For tuqula instruction */ | ||
171 | case INST_TYPE_RD: | ||
172 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
173 | index a952b9ac3c2..d9d05721dae 100644 | ||
174 | --- a/opcodes/microblaze-opc.h | ||
175 | +++ b/opcodes/microblaze-opc.h | ||
176 | @@ -68,7 +68,13 @@ | ||
177 | #define INST_TYPE_R1_IMML 24 | ||
178 | |||
179 | /* For bsefi and bsifi */ | ||
180 | -#define INST_TYPE_RD_R1_IMM5_IMM5 21 | ||
181 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
182 | + | ||
183 | +/* For 64-bit instructions */ | ||
184 | +#define INST_TYPE_IMML 22 | ||
185 | +#define INST_TYPE_RD_R1_IMML 23 | ||
186 | +#define INST_TYPE_R1_IMML 24 | ||
187 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
188 | |||
189 | #define INST_TYPE_NONE 25 | ||
190 | |||
191 | @@ -589,8 +595,5 @@ char pvr_register_prefix[] = "rpvr"; | ||
192 | #define MIN_IMML ((long) 0xffffff8000000000L) | ||
193 | #define MAX_IMML ((long) 0x0000007fffffffffL) | ||
194 | |||
195 | -#define MIN_IMM_WIDTH ((int) 0x00000001) | ||
196 | -#define MAX_IMM_WIDTH ((int) 0x00000020) | ||
197 | - | ||
198 | #endif /* MICROBLAZE_OPC */ | ||
199 | |||
200 | -- | ||
201 | 2.34.1 | ||
202 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0020-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0020-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..f3073f1e --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0020-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From f46a81a4ffa73453403a5e99e7005a8f1d974ecf Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 20/53] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | ld/emulparams/elf64microblaze.sh | 23 +++++++++++++++++++++++ | ||
17 | ld/emulparams/elf64microblazeel.sh | 23 +++++++++++++++++++++++ | ||
18 | 2 files changed, 46 insertions(+) | ||
19 | create mode 100644 ld/emulparams/elf64microblaze.sh | ||
20 | create mode 100644 ld/emulparams/elf64microblazeel.sh | ||
21 | |||
22 | diff --git a/ld/emulparams/elf64microblaze.sh b/ld/emulparams/elf64microblaze.sh | ||
23 | new file mode 100644 | ||
24 | index 00000000000..9c7b0eb7080 | ||
25 | --- /dev/null | ||
26 | +++ b/ld/emulparams/elf64microblaze.sh | ||
27 | @@ -0,0 +1,23 @@ | ||
28 | +SCRIPT_NAME=elfmicroblaze | ||
29 | +OUTPUT_FORMAT="elf64-microblazeel" | ||
30 | +#BIG_OUTPUT_FORMAT="elf64-microblaze" | ||
31 | +LITTLE_OUTPUT_FORMAT="elf64-microblazeel" | ||
32 | +#TEXT_START_ADDR=0 | ||
33 | +NONPAGED_TEXT_START_ADDR=0x28 | ||
34 | +ALIGNMENT=4 | ||
35 | +MAXPAGESIZE=4 | ||
36 | +ARCH=microblaze | ||
37 | +EMBEDDED=yes | ||
38 | + | ||
39 | +NOP=0x80000000 | ||
40 | + | ||
41 | +# Hmmm, there's got to be a better way. This sets the stack to the | ||
42 | +# top of the simulator memory (2^19 bytes). | ||
43 | +#PAGE_SIZE=0x1000 | ||
44 | +#DATA_ADDR=0x10000 | ||
45 | +#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }' | ||
46 | +#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
47 | +#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
48 | + | ||
49 | +TEMPLATE_NAME=elf32 | ||
50 | +#GENERATE_SHLIB_SCRIPT=yes | ||
51 | diff --git a/ld/emulparams/elf64microblazeel.sh b/ld/emulparams/elf64microblazeel.sh | ||
52 | new file mode 100644 | ||
53 | index 00000000000..9c7b0eb7080 | ||
54 | --- /dev/null | ||
55 | +++ b/ld/emulparams/elf64microblazeel.sh | ||
56 | @@ -0,0 +1,23 @@ | ||
57 | +SCRIPT_NAME=elfmicroblaze | ||
58 | +OUTPUT_FORMAT="elf64-microblazeel" | ||
59 | +#BIG_OUTPUT_FORMAT="elf64-microblaze" | ||
60 | +LITTLE_OUTPUT_FORMAT="elf64-microblazeel" | ||
61 | +#TEXT_START_ADDR=0 | ||
62 | +NONPAGED_TEXT_START_ADDR=0x28 | ||
63 | +ALIGNMENT=4 | ||
64 | +MAXPAGESIZE=4 | ||
65 | +ARCH=microblaze | ||
66 | +EMBEDDED=yes | ||
67 | + | ||
68 | +NOP=0x80000000 | ||
69 | + | ||
70 | +# Hmmm, there's got to be a better way. This sets the stack to the | ||
71 | +# top of the simulator memory (2^19 bytes). | ||
72 | +#PAGE_SIZE=0x1000 | ||
73 | +#DATA_ADDR=0x10000 | ||
74 | +#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }' | ||
75 | +#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
76 | +#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
77 | + | ||
78 | +TEMPLATE_NAME=elf32 | ||
79 | +#GENERATE_SHLIB_SCRIPT=yes | ||
80 | -- | ||
81 | 2.34.1 | ||
82 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0021-Added-relocations-for-MB-X.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0021-Added-relocations-for-MB-X.patch new file mode 100644 index 00000000..24e0894d --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0021-Added-relocations-for-MB-X.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | From 39ba1e8a13828ac3c860a72b95c3abae024044b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 11 Sep 2018 17:30:17 +0530 | ||
4 | Subject: [PATCH 21/53] Added relocations for MB-X | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/bfd-in2.h | ||
8 | gas/config/tc-microblaze.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | |||
13 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
14 | --- | ||
15 | bfd/reloc.c | 26 ++++++++++++++------------ | ||
16 | gas/config/tc-microblaze.c | 11 +++++++++++ | ||
17 | 2 files changed, 25 insertions(+), 12 deletions(-) | ||
18 | |||
19 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
20 | index 3e8647f601e..c5c0ce5d060 100644 | ||
21 | --- a/bfd/reloc.c | ||
22 | +++ b/bfd/reloc.c | ||
23 | @@ -6661,12 +6661,6 @@ ENUMDOC | ||
24 | the form "Symbol Op Symbol". | ||
25 | ENUM | ||
26 | BFD_RELOC_MICROBLAZE_32_NONE | ||
27 | -ENUMDOC | ||
28 | - This is a 32 bit reloc that stores the 32 bit pc relative value in | ||
29 | - two words (with an imm instruction). No relocation is done here - | ||
30 | - only used for relaxing. | ||
31 | -ENUM | ||
32 | - BFD_RELOC_MICROBLAZE_32_NONE | ||
33 | ENUMDOC | ||
34 | This is a 32 bit reloc that stores the 32 bit pc relative | ||
35 | value in two words (with an imm instruction). No relocation is | ||
36 | @@ -6685,12 +6679,6 @@ ENUMDOC | ||
37 | done here - only used for relaxing | ||
38 | ENUM | ||
39 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
40 | -ENUMDOC | ||
41 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
42 | - value in two words (with an imml instruction). No relocation is | ||
43 | - done here - only used for relaxing | ||
44 | -ENUM | ||
45 | - BFD_RELOC_MICROBLAZE_64_GPC | ||
46 | ENUMDOC | ||
47 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
48 | value in two words (with an imm instruction). The relocation is | ||
49 | @@ -7929,6 +7917,20 @@ ENUMX | ||
50 | ENUMDOC | ||
51 | Linux eBPF relocations. | ||
52 | |||
53 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
54 | + to two words (uses imml instruction). | ||
55 | +ENUM | ||
56 | +BFD_RELOC_MICROBLAZE_64, | ||
57 | +ENUMDOC | ||
58 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
59 | + value in two words (with an imml instruction). No relocation is | ||
60 | + done here - only used for relaxing | ||
61 | +ENUM | ||
62 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
63 | +ENUMDOC | ||
64 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
65 | + value in two words (with an imml instruction). No relocation is | ||
66 | + done here - only used for relaxing | ||
67 | ENUM | ||
68 | BFD_RELOC_EPIPHANY_SIMM8 | ||
69 | ENUMDOC | ||
70 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
71 | index f13efcae979..9b8b129e309 100644 | ||
72 | --- a/gas/config/tc-microblaze.c | ||
73 | +++ b/gas/config/tc-microblaze.c | ||
74 | @@ -91,6 +91,8 @@ const char FLT_CHARS[] = "rRsSfFdDxXpP"; | ||
75 | #define TLSTPREL_OFFSET 16 | ||
76 | #define TEXT_OFFSET 17 | ||
77 | #define TEXT_PC_OFFSET 18 | ||
78 | +#define DEFINED_64_OFFSET 19 | ||
79 | +#define DEFINED_64_PC_OFFSET 20 | ||
80 | |||
81 | /* Initialize the relax table. */ | ||
82 | const relax_typeS md_relax_table[] = | ||
83 | @@ -114,6 +116,8 @@ const relax_typeS md_relax_table[] = | ||
84 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 16: TLSTPREL_OFFSET. */ | ||
85 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 17: TEXT_OFFSET. */ | ||
86 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 } /* 18: TEXT_PC_OFFSET. */ | ||
87 | + { 0x7fffffffffffffff, 0x8000000000000000, INST_WORD_SIZE, 0 }, /* 19: DEFINED_64_OFFSET. */ | ||
88 | + { 0x7fffffffffffffff, 0x8000000000000000, INST_WORD_SIZE*2, 0 } /* 20: DEFINED_64_PC_OFFSET. */ | ||
89 | }; | ||
90 | |||
91 | static htab_t opcode_hash_control; /* Opcode mnemonics. */ | ||
92 | @@ -2330,6 +2334,13 @@ md_estimate_size_before_relax (fragS * fragP, | ||
93 | /* Variable part does not change. */ | ||
94 | fragP->fr_var = INST_WORD_SIZE*2; | ||
95 | } | ||
96 | + else if (streq (fragP->fr_opcode, str_microblaze_64)) | ||
97 | + { | ||
98 | + /* Used as an absolute value. */ | ||
99 | + fragP->fr_subtype = DEFINED_64_OFFSET; | ||
100 | + /* Variable part does not change. */ | ||
101 | + fragP->fr_var = INST_WORD_SIZE; | ||
102 | + } | ||
103 | else if (streq (fragP->fr_opcode, str_microblaze_ro_anchor)) | ||
104 | { | ||
105 | /* It is accessed using the small data read only anchor. */ | ||
106 | -- | ||
107 | 2.34.1 | ||
108 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0022-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0022-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..5ef086bd --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0022-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,958 @@ | |||
1 | From 6e30e2ce72e9257daae0633a6b57e7a5c4c918f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 22/53] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | bfd/elf64-microblaze.c | 8 + | ||
17 | bfd/reloc.c | 36 +-- | ||
18 | gas/config/tc-microblaze.c | 556 ++++++++++++++++++++++++++++++++----- | ||
19 | 3 files changed, 499 insertions(+), 101 deletions(-) | ||
20 | |||
21 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
22 | index 119d266f95a..ca92df647c9 100755 | ||
23 | --- a/bfd/elf64-microblaze.c | ||
24 | +++ b/bfd/elf64-microblaze.c | ||
25 | @@ -1666,6 +1666,14 @@ microblaze_elf_relocate_section (bfd *output_bfd, | ||
26 | outrel.r_info = ELF64_R_INFO (0, R_MICROBLAZE_REL); | ||
27 | outrel.r_addend = relocation + addend; | ||
28 | } | ||
29 | + unsigned long insn = bfd_get_32 (input_bfd, contents + offset +endian); | ||
30 | + if (insn == 0xb2000000 || insn == 0xb2ffffff) | ||
31 | + { | ||
32 | + insn &= ~0x00ffffff; | ||
33 | + insn |= (relocation >> 16) & 0xffffff; | ||
34 | + bfd_put_32 (input_bfd, insn, | ||
35 | + contents + offset + endian); | ||
36 | + } | ||
37 | else | ||
38 | { | ||
39 | BFD_FAIL (); | ||
40 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
41 | index c5c0ce5d060..6eb93e993f0 100644 | ||
42 | --- a/bfd/reloc.c | ||
43 | +++ b/bfd/reloc.c | ||
44 | @@ -6677,8 +6677,20 @@ ENUMDOC | ||
45 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
46 | value in two words (with an imm instruction). No relocation is | ||
47 | done here - only used for relaxing | ||
48 | +ENUM | ||
49 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
50 | +ENUMDOC | ||
51 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
52 | + value in two words (with an imml instruction). No relocation is | ||
53 | + done here - only used for relaxing | ||
54 | ENUM | ||
55 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
56 | +ENUMDOC | ||
57 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
58 | + value in two words (with an imml instruction). No relocation is | ||
59 | + done here - only used for relaxing | ||
60 | +ENUM | ||
61 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
62 | ENUMDOC | ||
63 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
64 | value in two words (with an imm instruction). The relocation is | ||
65 | @@ -7894,18 +7906,6 @@ ENUMDOC | ||
66 | |||
67 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
68 | to two words (uses imml instruction). | ||
69 | -ENUM | ||
70 | -BFD_RELOC_MICROBLAZE_64, | ||
71 | -ENUMDOC | ||
72 | - This is a 64 bit reloc that stores the 64 bit pc relative | ||
73 | - value in two words (with an imml instruction). No relocation is | ||
74 | - done here - only used for relaxing | ||
75 | -ENUM | ||
76 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
77 | -ENUMDOC | ||
78 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
79 | - value in two words (with an imml instruction). No relocation is | ||
80 | - done here - only used for relaxing | ||
81 | ENUM | ||
82 | BFD_RELOC_BPF_64 | ||
83 | ENUMX | ||
84 | @@ -7919,18 +7919,6 @@ ENUMDOC | ||
85 | |||
86 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
87 | to two words (uses imml instruction). | ||
88 | -ENUM | ||
89 | -BFD_RELOC_MICROBLAZE_64, | ||
90 | -ENUMDOC | ||
91 | - This is a 64 bit reloc that stores the 64 bit pc relative | ||
92 | - value in two words (with an imml instruction). No relocation is | ||
93 | - done here - only used for relaxing | ||
94 | -ENUM | ||
95 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
96 | -ENUMDOC | ||
97 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
98 | - value in two words (with an imml instruction). No relocation is | ||
99 | - done here - only used for relaxing | ||
100 | ENUM | ||
101 | BFD_RELOC_EPIPHANY_SIMM8 | ||
102 | ENUMDOC | ||
103 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
104 | index 9b8b129e309..6640266cc47 100644 | ||
105 | --- a/gas/config/tc-microblaze.c | ||
106 | +++ b/gas/config/tc-microblaze.c | ||
107 | @@ -35,10 +35,13 @@ | ||
108 | #define streq(a,b) (strcmp (a, b) == 0) | ||
109 | #endif | ||
110 | |||
111 | +static int microblaze_arch_size = 0; | ||
112 | + | ||
113 | #define OPTION_EB (OPTION_MD_BASE + 0) | ||
114 | #define OPTION_EL (OPTION_MD_BASE + 1) | ||
115 | #define OPTION_LITTLE (OPTION_MD_BASE + 2) | ||
116 | #define OPTION_BIG (OPTION_MD_BASE + 3) | ||
117 | +#define OPTION_M64 (OPTION_MD_BASE + 4) | ||
118 | |||
119 | void microblaze_generate_symbol (char *sym); | ||
120 | static bool check_spl_reg (unsigned *); | ||
121 | @@ -360,7 +363,7 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED) | ||
122 | Integer arg to pass to the function. */ | ||
123 | /* If the pseudo-op is not found in this table, it searches in the obj-elf.c, | ||
124 | and then in the read.c table. */ | ||
125 | -const pseudo_typeS md_pseudo_table[] = | ||
126 | +pseudo_typeS md_pseudo_table[] = | ||
127 | { | ||
128 | {"lcomm", microblaze_s_lcomm, 1}, | ||
129 | {"data8", cons, 1}, /* Same as byte. */ | ||
130 | @@ -369,6 +372,7 @@ const pseudo_typeS md_pseudo_table[] = | ||
131 | {"ent", s_func, 0}, /* Treat ent as function entry point. */ | ||
132 | {"end", microblaze_s_func, 1}, /* Treat end as function end point. */ | ||
133 | {"gpword", s_rva, 4}, /* gpword label => store resolved label address in data section. */ | ||
134 | + {"gpdword", s_rva, 8}, /* gpword label => store resolved label address in data section. */ | ||
135 | {"weakext", microblaze_s_weakext, 0}, | ||
136 | {"rodata", microblaze_s_rdata, 0}, | ||
137 | {"sdata2", microblaze_s_rdata, 1}, | ||
138 | @@ -378,6 +382,7 @@ const pseudo_typeS md_pseudo_table[] = | ||
139 | #endif | ||
140 | {"sbss", microblaze_s_sbss, 0}, | ||
141 | {"word", cons, 4}, | ||
142 | + {"dword", cons, 8}, | ||
143 | {"frame", s_ignore, 0}, | ||
144 | {"mask", s_ignore, 0}, /* Emitted by gcc. */ | ||
145 | {NULL, NULL, 0} | ||
146 | @@ -749,6 +754,74 @@ parse_imm (char * s, expressionS * e, offsetT min, offsetT max) | ||
147 | return new_pointer; | ||
148 | } | ||
149 | |||
150 | + static char * | ||
151 | +parse_imml (char * s, expressionS * e, long min, long max) | ||
152 | +{ | ||
153 | + char *new_pointer; | ||
154 | + char *atp; | ||
155 | + int itype, ilen; | ||
156 | + | ||
157 | + ilen = 0; | ||
158 | + | ||
159 | + /* Find the start of "@GOT" or "@PLT" suffix (if any) */ | ||
160 | + for (atp = s; *atp != '@'; atp++) | ||
161 | + if (is_end_of_line[(unsigned char) *atp]) | ||
162 | + break; | ||
163 | + | ||
164 | + if (*atp == '@') | ||
165 | + { | ||
166 | + itype = match_imm (atp + 1, &ilen); | ||
167 | + if (itype != 0) | ||
168 | + { | ||
169 | + *atp = 0; | ||
170 | + e->X_md = itype; | ||
171 | + } | ||
172 | + else | ||
173 | + { | ||
174 | + atp = NULL; | ||
175 | + e->X_md = 0; | ||
176 | + ilen = 0; | ||
177 | + } | ||
178 | + *atp = 0; | ||
179 | + } | ||
180 | + else | ||
181 | + { | ||
182 | + atp = NULL; | ||
183 | + e->X_md = 0; | ||
184 | + } | ||
185 | + | ||
186 | + if (atp && !GOT_symbol) | ||
187 | + { | ||
188 | + GOT_symbol = symbol_find_or_make (GOT_SYMBOL_NAME); | ||
189 | + } | ||
190 | + | ||
191 | + new_pointer = parse_exp (s, e); | ||
192 | + | ||
193 | + if (!GOT_symbol && ! strncmp (s, GOT_SYMBOL_NAME, 20)) | ||
194 | + { | ||
195 | + GOT_symbol = symbol_find_or_make (GOT_SYMBOL_NAME); | ||
196 | + } | ||
197 | + | ||
198 | + if (e->X_op == O_absent) | ||
199 | + ; /* An error message has already been emitted. */ | ||
200 | + else if ((e->X_op != O_constant && e->X_op != O_symbol) ) | ||
201 | + as_fatal (_("operand must be a constant or a label")); | ||
202 | + else if ((e->X_op == O_constant) && ((long) e->X_add_number < min | ||
203 | + || (long) e->X_add_number > max)) | ||
204 | + { | ||
205 | + as_fatal (_("operand must be absolute in range %ld..%ld, not %ld"), | ||
206 | + min, max, (long) e->X_add_number); | ||
207 | + } | ||
208 | + | ||
209 | + if (atp) | ||
210 | + { | ||
211 | + *atp = '@'; /* restore back (needed?) */ | ||
212 | + if (new_pointer >= atp) | ||
213 | + new_pointer += ilen + 1; /* sizeof (imm_suffix) + 1 for '@' */ | ||
214 | + } | ||
215 | + return new_pointer; | ||
216 | +} | ||
217 | + | ||
218 | static char * | ||
219 | check_got (int * got_type, int * got_len) | ||
220 | { | ||
221 | @@ -803,7 +876,7 @@ check_got (int * got_type, int * got_len) | ||
222 | extern bfd_reloc_code_real_type | ||
223 | parse_cons_expression_microblaze (expressionS *exp, int size) | ||
224 | { | ||
225 | - if (size == 4) | ||
226 | + if (size == 4 || (microblaze_arch_size == 64 && size == 8)) | ||
227 | { | ||
228 | /* Handle @GOTOFF et.al. */ | ||
229 | char *save, *gotfree_copy; | ||
230 | @@ -835,6 +908,7 @@ parse_cons_expression_microblaze (expressionS *exp, int size) | ||
231 | |||
232 | static const char * str_microblaze_ro_anchor = "RO"; | ||
233 | static const char * str_microblaze_rw_anchor = "RW"; | ||
234 | +static const char * str_microblaze_64 = "64"; | ||
235 | |||
236 | static bool | ||
237 | check_spl_reg (unsigned * reg) | ||
238 | @@ -893,9 +967,10 @@ md_assemble (char * str) | ||
239 | unsigned reg2; | ||
240 | unsigned reg3; | ||
241 | unsigned isize; | ||
242 | - unsigned int immed = 0, immed2 = 0, temp; | ||
243 | + unsigned long immed = 0, immed2 = 0, temp; | ||
244 | expressionS exp; | ||
245 | char name[20]; | ||
246 | + long immedl; | ||
247 | |||
248 | /* Drop leading whitespace. */ | ||
249 | while (ISSPACE (* str)) | ||
250 | @@ -1014,8 +1089,9 @@ md_assemble (char * str) | ||
251 | as_fatal (_("lmi pseudo instruction should not use a label in imm field")); | ||
252 | else if (streq (name, "smi")) | ||
253 | as_fatal (_("smi pseudo instruction should not use a label in imm field")); | ||
254 | - | ||
255 | - if (reg2 == REG_ROSDP) | ||
256 | + if(streq (name, "lli") || streq (name, "sli")) | ||
257 | + opc = str_microblaze_64; | ||
258 | + else if (reg2 == REG_ROSDP) | ||
259 | opc = str_microblaze_ro_anchor; | ||
260 | else if (reg2 == REG_RWSDP) | ||
261 | opc = str_microblaze_rw_anchor; | ||
262 | @@ -1082,36 +1158,60 @@ md_assemble (char * str) | ||
263 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
264 | } | ||
265 | } | ||
266 | - else | ||
267 | - { | ||
268 | - temp = immed & 0xFFFF8000; | ||
269 | - if ((temp != 0) && (temp != 0xFFFF8000)) | ||
270 | - { | ||
271 | + else if (streq (name, "lli") || streq (name, "sli")) | ||
272 | + { | ||
273 | + temp = immed & 0xFFFFFF8000; | ||
274 | + if (temp != 0 && temp != 0xFFFFFF8000) | ||
275 | + { | ||
276 | /* Needs an immediate inst. */ | ||
277 | opcode1 | ||
278 | = (struct op_code_struct *) str_hash_find (opcode_hash_control, | ||
279 | - "imm"); | ||
280 | + "imml"); | ||
281 | if (opcode1 == NULL) | ||
282 | { | ||
283 | - as_bad (_("unknown opcode \"%s\""), "imm"); | ||
284 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
285 | return; | ||
286 | } | ||
287 | - | ||
288 | inst1 = opcode1->bit_sequence; | ||
289 | - inst1 |= ((immed & 0xFFFF0000) >> 16) & IMM_MASK; | ||
290 | + inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
291 | output[0] = INST_BYTE0 (inst1); | ||
292 | output[1] = INST_BYTE1 (inst1); | ||
293 | output[2] = INST_BYTE2 (inst1); | ||
294 | output[3] = INST_BYTE3 (inst1); | ||
295 | output = frag_more (isize); | ||
296 | - } | ||
297 | - inst |= (reg1 << RD_LOW) & RD_MASK; | ||
298 | - inst |= (reg2 << RA_LOW) & RA_MASK; | ||
299 | - inst |= (immed << IMM_LOW) & IMM_MASK; | ||
300 | - } | ||
301 | + } | ||
302 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
303 | + inst |= (reg2 << RA_LOW) & RA_MASK; | ||
304 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
305 | + } | ||
306 | + else | ||
307 | + { | ||
308 | + temp = immed & 0xFFFF8000; | ||
309 | + if ((temp != 0) && (temp != 0xFFFF8000)) | ||
310 | + { | ||
311 | + /* Needs an immediate inst. */ | ||
312 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
313 | + if (opcode1 == NULL) | ||
314 | + { | ||
315 | + as_bad (_("unknown opcode \"%s\""), "imm"); | ||
316 | + return; | ||
317 | + } | ||
318 | + | ||
319 | + inst1 = opcode1->bit_sequence; | ||
320 | + inst1 |= ((immed & 0xFFFF0000) >> 16) & IMM_MASK; | ||
321 | + output[0] = INST_BYTE0 (inst1); | ||
322 | + output[1] = INST_BYTE1 (inst1); | ||
323 | + output[2] = INST_BYTE2 (inst1); | ||
324 | + output[3] = INST_BYTE3 (inst1); | ||
325 | + output = frag_more (isize); | ||
326 | + } | ||
327 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
328 | + inst |= (reg2 << RA_LOW) & RA_MASK; | ||
329 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
330 | + } | ||
331 | break; | ||
332 | |||
333 | - case INST_TYPE_RD_R1_IMM5: | ||
334 | + case INST_TYPE_RD_R1_IMMS: | ||
335 | if (strcmp (op_end, "")) | ||
336 | op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
337 | else | ||
338 | @@ -1145,16 +1245,22 @@ md_assemble (char * str) | ||
339 | immed = exp.X_add_number; | ||
340 | } | ||
341 | |||
342 | - if (immed != (immed % 32)) | ||
343 | + if ((immed != (immed % 32)) && | ||
344 | + (opcode->instr == bslli || opcode->instr == bsrai || opcode->instr == bsrli)) | ||
345 | { | ||
346 | as_warn (_("Shift value > 32. using <value %% 32>")); | ||
347 | immed = immed % 32; | ||
348 | } | ||
349 | + else if (immed != (immed % 64)) | ||
350 | + { | ||
351 | + as_warn (_("Shift value > 64. using <value %% 64>")); | ||
352 | + immed = immed % 64; | ||
353 | + } | ||
354 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
355 | inst |= (reg2 << RA_LOW) & RA_MASK; | ||
356 | - inst |= (immed << IMM_LOW) & IMM5_MASK; | ||
357 | + inst |= (immed << IMM_LOW) & IMM6_MASK; | ||
358 | break; | ||
359 | - case INST_TYPE_RD_R1_IMM5_IMM5: | ||
360 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
361 | if (strcmp (op_end, "")) | ||
362 | op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
363 | else | ||
364 | @@ -1178,7 +1284,7 @@ md_assemble (char * str) | ||
365 | |||
366 | /* Width immediate value. */ | ||
367 | if (strcmp (op_end, "")) | ||
368 | - op_end = parse_imm (op_end + 1, &exp, MIN_IMM_WIDTH, MAX_IMM_WIDTH); | ||
369 | + op_end = parse_imm (op_end + 1, &exp, MIN_IMM, MAX_IMM); | ||
370 | else | ||
371 | as_fatal (_("Error in statement syntax")); | ||
372 | if (exp.X_op != O_constant) | ||
373 | @@ -1190,6 +1296,8 @@ md_assemble (char * str) | ||
374 | immed = exp.X_add_number; | ||
375 | if (opcode->instr == bsefi && immed > 31) | ||
376 | as_fatal (_("Width value must be less than 32")); | ||
377 | + else if (opcode->instr == bslefi && immed > 63) | ||
378 | + as_fatal (_("Width value must be less than 64")); | ||
379 | |||
380 | /* Shift immediate value. */ | ||
381 | if (strcmp (op_end, "")) | ||
382 | @@ -1206,23 +1314,31 @@ md_assemble (char * str) | ||
383 | output = frag_more (isize); | ||
384 | immed2 = exp.X_add_number; | ||
385 | } | ||
386 | - if (immed2 != (immed2 % 32)) | ||
387 | - { | ||
388 | - as_warn (_("Shift value greater than 32. using <value %% 32>")); | ||
389 | + if ((immed2 != (immed2 % 32)) && (opcode->instr == bsefi || opcode->instr == bsifi)) | ||
390 | + { | ||
391 | + | ||
392 | + as_warn (_("Shift value greater than 32. using <value %% 32>")); | ||
393 | immed2 = immed2 % 32; | ||
394 | } | ||
395 | + else if (immed2 != (immed2 % 64)) | ||
396 | + { | ||
397 | + as_warn (_("Shift value greater than 64. using <value %% 64>")); | ||
398 | + immed2 = immed2 % 64; | ||
399 | + } | ||
400 | |||
401 | /* Check combined value. */ | ||
402 | - if (immed + immed2 > 32) | ||
403 | + if ((immed + immed2 > 32) && (opcode->instr == bsefi || opcode->instr == bsifi)) | ||
404 | as_fatal (_("Width value + shift value must not be greater than 32")); | ||
405 | + else if (immed + immed2 > 64) | ||
406 | + as_fatal (_("Width value + shift value must not be greater than 64")); | ||
407 | |||
408 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
409 | inst |= (reg2 << RA_LOW) & RA_MASK; | ||
410 | - if (opcode->instr == bsefi) | ||
411 | - inst |= (immed & IMM5_MASK) << IMM_WIDTH_LOW; /* bsefi */ | ||
412 | + if (opcode->instr == bsefi || opcode->instr == bslefi) | ||
413 | + inst |= (immed & IMM6_MASK) << IMM_WIDTH_LOW; /* bsefi or bslefi */ | ||
414 | else | ||
415 | - inst |= ((immed + immed2 - 1) & IMM5_MASK) << IMM_WIDTH_LOW; /* bsifi */ | ||
416 | - inst |= (immed2 << IMM_LOW) & IMM5_MASK; | ||
417 | + inst |= ((immed + immed2 - 1) & IMM6_MASK) << IMM_WIDTH_LOW; /* bsifi or bslifi */ | ||
418 | + inst |= (immed2 << IMM_LOW) & IMM6_MASK; | ||
419 | break; | ||
420 | case INST_TYPE_R1_R2: | ||
421 | if (strcmp (op_end, "")) | ||
422 | @@ -1722,12 +1838,20 @@ md_assemble (char * str) | ||
423 | case INST_TYPE_IMM: | ||
424 | if (streq (name, "imm")) | ||
425 | as_fatal (_("An IMM instruction should not be present in the .s file")); | ||
426 | - | ||
427 | - op_end = parse_imm (op_end + 1, & exp, MIN_IMM, MAX_IMM); | ||
428 | + if (microblaze_arch_size == 64) | ||
429 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
430 | + else | ||
431 | + op_end = parse_imm (op_end + 1, & exp, MIN_IMM, MAX_IMM); | ||
432 | |||
433 | if (exp.X_op != O_constant) | ||
434 | { | ||
435 | - char *opc = NULL; | ||
436 | + char *opc; | ||
437 | + if (microblaze_arch_size == 64 && (streq (name, "breai") || | ||
438 | + streq (name, "breaid") || | ||
439 | + streq (name, "brai") || streq (name, "braid"))) | ||
440 | + opc = str_microblaze_64; | ||
441 | + else | ||
442 | + opc = NULL; | ||
443 | relax_substateT subtype; | ||
444 | |||
445 | if (exp.X_md != 0) | ||
446 | @@ -1750,29 +1874,53 @@ md_assemble (char * str) | ||
447 | immed = exp.X_add_number; | ||
448 | } | ||
449 | |||
450 | - | ||
451 | - temp = immed & 0xFFFF8000; | ||
452 | - if ((temp != 0) && (temp != 0xFFFF8000)) | ||
453 | - { | ||
454 | - /* Needs an immediate inst. */ | ||
455 | - opcode1 | ||
456 | - = (struct op_code_struct *) str_hash_find (opcode_hash_control, | ||
457 | - "imm"); | ||
458 | - if (opcode1 == NULL) | ||
459 | - { | ||
460 | - as_bad (_("unknown opcode \"%s\""), "imm"); | ||
461 | - return; | ||
462 | + if (microblaze_arch_size == 64 && (streq (name, "breai") || | ||
463 | + streq (name, "breaid") || | ||
464 | + streq (name, "brai") || streq (name, "braid"))) | ||
465 | + { | ||
466 | + temp = immed & 0xFFFFFF8000; | ||
467 | + if (temp != 0) | ||
468 | + { | ||
469 | + /* Needs an immediate inst. */ | ||
470 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
471 | + if (opcode1 == NULL) | ||
472 | + { | ||
473 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
474 | + return; | ||
475 | + } | ||
476 | + inst1 = opcode1->bit_sequence; | ||
477 | + inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
478 | + output[0] = INST_BYTE0 (inst1); | ||
479 | + output[1] = INST_BYTE1 (inst1); | ||
480 | + output[2] = INST_BYTE2 (inst1); | ||
481 | + output[3] = INST_BYTE3 (inst1); | ||
482 | + output = frag_more (isize); | ||
483 | } | ||
484 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
485 | + } | ||
486 | + else | ||
487 | + { | ||
488 | + temp = immed & 0xFFFF8000; | ||
489 | + if ((temp != 0) && (temp != 0xFFFF8000)) | ||
490 | + { | ||
491 | + /* Needs an immediate inst. */ | ||
492 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
493 | + if (opcode1 == NULL) | ||
494 | + { | ||
495 | + as_bad (_("unknown opcode \"%s\""), "imm"); | ||
496 | + return; | ||
497 | + } | ||
498 | |||
499 | - inst1 = opcode1->bit_sequence; | ||
500 | - inst1 |= ((immed & 0xFFFF0000) >> 16) & IMM_MASK; | ||
501 | - output[0] = INST_BYTE0 (inst1); | ||
502 | - output[1] = INST_BYTE1 (inst1); | ||
503 | - output[2] = INST_BYTE2 (inst1); | ||
504 | - output[3] = INST_BYTE3 (inst1); | ||
505 | - output = frag_more (isize); | ||
506 | - } | ||
507 | - inst |= (immed << IMM_LOW) & IMM_MASK; | ||
508 | + inst1 = opcode1->bit_sequence; | ||
509 | + inst1 |= ((immed & 0xFFFF0000) >> 16) & IMM_MASK; | ||
510 | + output[0] = INST_BYTE0 (inst1); | ||
511 | + output[1] = INST_BYTE1 (inst1); | ||
512 | + output[2] = INST_BYTE2 (inst1); | ||
513 | + output[3] = INST_BYTE3 (inst1); | ||
514 | + output = frag_more (isize); | ||
515 | + } | ||
516 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
517 | + } | ||
518 | break; | ||
519 | |||
520 | case INST_TYPE_NONE: | ||
521 | @@ -1903,6 +2051,7 @@ struct option md_longopts[] = | ||
522 | {"EL", no_argument, NULL, OPTION_EL}, | ||
523 | {"mlittle-endian", no_argument, NULL, OPTION_EL}, | ||
524 | {"mbig-endian", no_argument, NULL, OPTION_EB}, | ||
525 | + {"m64", no_argument, NULL, OPTION_M64}, | ||
526 | { NULL, no_argument, NULL, 0} | ||
527 | }; | ||
528 | |||
529 | @@ -1947,13 +2096,23 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, | ||
530 | fragP->fr_fix += INST_WORD_SIZE * 2; | ||
531 | fragP->fr_var = 0; | ||
532 | break; | ||
533 | + case DEFINED_64_OFFSET: | ||
534 | + if (fragP->fr_symbol == GOT_symbol) | ||
535 | + fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE, fragP->fr_symbol, | ||
536 | + fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64_GPC); | ||
537 | + else | ||
538 | + fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE, fragP->fr_symbol, | ||
539 | + fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64); | ||
540 | + fragP->fr_fix += INST_WORD_SIZE * 2; | ||
541 | + fragP->fr_var = 0; | ||
542 | + break; | ||
543 | case DEFINED_ABS_SEGMENT: | ||
544 | if (fragP->fr_symbol == GOT_symbol) | ||
545 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE * 2, fragP->fr_symbol, | ||
546 | fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64_GOTPC); | ||
547 | else | ||
548 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE * 2, fragP->fr_symbol, | ||
549 | - fragP->fr_offset, false, BFD_RELOC_64); | ||
550 | + fragP->fr_offset, true, BFD_RELOC_64); | ||
551 | fragP->fr_fix += INST_WORD_SIZE * 2; | ||
552 | fragP->fr_var = 0; | ||
553 | break; | ||
554 | @@ -2174,23 +2333,38 @@ md_apply_fix (fixS * fixP, | ||
555 | case BFD_RELOC_64_PCREL: | ||
556 | case BFD_RELOC_64: | ||
557 | case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
558 | + case BFD_RELOC_MICROBLAZE_64: | ||
559 | /* Add an imm instruction. First save the current instruction. */ | ||
560 | for (i = 0; i < INST_WORD_SIZE; i++) | ||
561 | buf[i + INST_WORD_SIZE] = buf[i]; | ||
562 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
563 | + { | ||
564 | + /* Generate the imm instruction. */ | ||
565 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
566 | + if (opcode1 == NULL) | ||
567 | + { | ||
568 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
569 | + return; | ||
570 | + } | ||
571 | |||
572 | - /* Generate the imm instruction. */ | ||
573 | - opcode1 | ||
574 | - = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
575 | - if (opcode1 == NULL) | ||
576 | - { | ||
577 | - as_bad (_("unknown opcode \"%s\""), "imm"); | ||
578 | - return; | ||
579 | - } | ||
580 | - | ||
581 | - inst1 = opcode1->bit_sequence; | ||
582 | - if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
583 | - inst1 |= ((val & 0xFFFF0000) >> 16) & IMM_MASK; | ||
584 | - | ||
585 | + inst1 = opcode1->bit_sequence; | ||
586 | + if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
587 | + inst1 |= ((val & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
588 | + } | ||
589 | + else | ||
590 | + { | ||
591 | + /* Generate the imm instruction. */ | ||
592 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
593 | + if (opcode1 == NULL) | ||
594 | + { | ||
595 | + as_bad (_("unknown opcode \"%s\""), "imm"); | ||
596 | + return; | ||
597 | + } | ||
598 | + | ||
599 | + inst1 = opcode1->bit_sequence; | ||
600 | + if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
601 | + inst1 |= ((val & 0xFFFF0000) >> 16) & IMM_MASK; | ||
602 | + } | ||
603 | buf[0] = INST_BYTE0 (inst1); | ||
604 | buf[1] = INST_BYTE1 (inst1); | ||
605 | buf[2] = INST_BYTE2 (inst1); | ||
606 | @@ -2219,6 +2393,7 @@ md_apply_fix (fixS * fixP, | ||
607 | /* Fall through. */ | ||
608 | |||
609 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
610 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
611 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
612 | case BFD_RELOC_MICROBLAZE_64_PLT: | ||
613 | case BFD_RELOC_MICROBLAZE_64_GOTOFF: | ||
614 | @@ -2226,13 +2401,17 @@ md_apply_fix (fixS * fixP, | ||
615 | /* Add an imm instruction. First save the current instruction. */ | ||
616 | for (i = 0; i < INST_WORD_SIZE; i++) | ||
617 | buf[i + INST_WORD_SIZE] = buf[i]; | ||
618 | - | ||
619 | /* Generate the imm instruction. */ | ||
620 | - opcode1 | ||
621 | - = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
622 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_GPC) | ||
623 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
624 | + else | ||
625 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
626 | if (opcode1 == NULL) | ||
627 | { | ||
628 | - as_bad (_("unknown opcode \"%s\""), "imm"); | ||
629 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_GPC) | ||
630 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
631 | + else | ||
632 | + as_bad (_("unknown opcode \"%s\""), "imm"); | ||
633 | return; | ||
634 | } | ||
635 | |||
636 | @@ -2256,6 +2435,8 @@ md_apply_fix (fixS * fixP, | ||
637 | moves code around due to relaxing. */ | ||
638 | if (fixP->fx_r_type == BFD_RELOC_64_PCREL) | ||
639 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE; | ||
640 | + else if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
641 | + fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE; | ||
642 | else if (fixP->fx_r_type == BFD_RELOC_32) | ||
643 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_32_NONE; | ||
644 | else | ||
645 | @@ -2298,6 +2479,32 @@ md_estimate_size_before_relax (fragS * fragP, | ||
646 | as_bad (_("Absolute PC-relative value in relaxation code. Assembler error.....")); | ||
647 | abort (); | ||
648 | } | ||
649 | + else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type | ||
650 | + && !S_IS_WEAK (fragP->fr_symbol)) | ||
651 | + { | ||
652 | + if (fragP->fr_opcode != NULL) { | ||
653 | + if(streq (fragP->fr_opcode, str_microblaze_64)) | ||
654 | + { | ||
655 | + /* Used as an absolute value. */ | ||
656 | + fragP->fr_subtype = DEFINED_64_OFFSET; | ||
657 | + /* Variable part does not change. */ | ||
658 | + fragP->fr_var = INST_WORD_SIZE; | ||
659 | + } | ||
660 | + else | ||
661 | + { | ||
662 | + fragP->fr_subtype = DEFINED_PC_OFFSET; | ||
663 | + /* Don't know now whether we need an imm instruction. */ | ||
664 | + fragP->fr_var = INST_WORD_SIZE; | ||
665 | + } | ||
666 | + } | ||
667 | + else | ||
668 | + { | ||
669 | + fragP->fr_subtype = DEFINED_PC_OFFSET; | ||
670 | + /* Don't know now whether we need an imm instruction. */ | ||
671 | + fragP->fr_var = INST_WORD_SIZE; | ||
672 | + } | ||
673 | + } | ||
674 | +#if 0 | ||
675 | else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type && | ||
676 | !S_IS_WEAK (fragP->fr_symbol)) | ||
677 | { | ||
678 | @@ -2305,6 +2512,7 @@ md_estimate_size_before_relax (fragS * fragP, | ||
679 | /* Don't know now whether we need an imm instruction. */ | ||
680 | fragP->fr_var = INST_WORD_SIZE; | ||
681 | } | ||
682 | +#endif | ||
683 | else if (S_IS_DEFINED (fragP->fr_symbol) | ||
684 | && (((S_GET_SEGMENT (fragP->fr_symbol))->flags & SEC_CODE) == 0)) | ||
685 | { | ||
686 | @@ -2316,7 +2524,14 @@ md_estimate_size_before_relax (fragS * fragP, | ||
687 | } | ||
688 | else | ||
689 | { | ||
690 | - fragP->fr_subtype = UNDEFINED_PC_OFFSET; | ||
691 | + if (fragP->fr_opcode != NULL) { | ||
692 | + if (streq (fragP->fr_opcode, str_microblaze_64)) | ||
693 | + fragP->fr_subtype = DEFINED_64_PC_OFFSET; | ||
694 | + else | ||
695 | + fragP->fr_subtype = UNDEFINED_PC_OFFSET; | ||
696 | + } | ||
697 | + else | ||
698 | + fragP->fr_subtype = UNDEFINED_PC_OFFSET; | ||
699 | fragP->fr_var = INST_WORD_SIZE*2; | ||
700 | } | ||
701 | break; | ||
702 | @@ -2395,6 +2610,33 @@ md_estimate_size_before_relax (fragS * fragP, | ||
703 | abort (); | ||
704 | } | ||
705 | } | ||
706 | +#if 0 //revisit | ||
707 | + else if (streq (name, "lli") || streq (name, "sli")) | ||
708 | + { | ||
709 | + temp = immed & 0xFFFFFFFFFFFF8000; | ||
710 | + if ((temp != 0) && (temp != 0xFFFFFFFFFFFF8000)) | ||
711 | + { | ||
712 | + /* Needs an immediate inst. */ | ||
713 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
714 | + if (opcode1 == NULL) | ||
715 | + { | ||
716 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
717 | + return; | ||
718 | + } | ||
719 | + | ||
720 | + inst1 = opcode1->bit_sequence; | ||
721 | + inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
722 | + output[0] = INST_BYTE0 (inst1); | ||
723 | + output[1] = INST_BYTE1 (inst1); | ||
724 | + output[2] = INST_BYTE2 (inst1); | ||
725 | + output[3] = INST_BYTE3 (inst1); | ||
726 | + output = frag_more (isize); | ||
727 | + } | ||
728 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
729 | + inst |= (reg2 << RA_LOW) & RA_MASK; | ||
730 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
731 | + } | ||
732 | +#endif | ||
733 | else | ||
734 | { | ||
735 | /* We know the abs value: Should never happen. */ | ||
736 | @@ -2414,6 +2656,7 @@ md_estimate_size_before_relax (fragS * fragP, | ||
737 | case TLSLD_OFFSET: | ||
738 | case TLSTPREL_OFFSET: | ||
739 | case TLSDTPREL_OFFSET: | ||
740 | + case DEFINED_64_OFFSET: | ||
741 | fragP->fr_var = INST_WORD_SIZE*2; | ||
742 | break; | ||
743 | case DEFINED_RO_SEGMENT: | ||
744 | @@ -2467,7 +2710,7 @@ md_pcrel_from_section (fixS * fixp, segT sec ATTRIBUTE_UNUSED) | ||
745 | else | ||
746 | { | ||
747 | /* The case where we are going to resolve things... */ | ||
748 | - if (fixp->fx_r_type == BFD_RELOC_64_PCREL) | ||
749 | + if (fixp->fx_r_type == BFD_RELOC_64_PCREL ||fixp->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
750 | return fixp->fx_where + fixp->fx_frag->fr_address + INST_WORD_SIZE; | ||
751 | else | ||
752 | return fixp->fx_where + fixp->fx_frag->fr_address; | ||
753 | @@ -2500,6 +2743,8 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
754 | case BFD_RELOC_MICROBLAZE_32_RWSDA: | ||
755 | case BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: | ||
756 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
757 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
758 | + case BFD_RELOC_MICROBLAZE_64: | ||
759 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
760 | case BFD_RELOC_MICROBLAZE_64_PLT: | ||
761 | case BFD_RELOC_MICROBLAZE_64_GOTOFF: | ||
762 | @@ -2515,6 +2760,143 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
763 | case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
764 | code = fixp->fx_r_type; | ||
765 | break; | ||
766 | + /* For 64-bit instructions */ | ||
767 | + case INST_TYPE_RD_R1_IMML: | ||
768 | + if (strcmp (op_end, "")) | ||
769 | + op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
770 | + else | ||
771 | + { | ||
772 | + as_fatal (_("Error in statement syntax")); | ||
773 | + reg1 = 0; | ||
774 | + } | ||
775 | + if (strcmp (op_end, "")) | ||
776 | + op_end = parse_reg (op_end + 1, ®2); /* Get r1. */ | ||
777 | + else | ||
778 | + { | ||
779 | + as_fatal (_("Error in statement syntax")); | ||
780 | + reg2 = 0; | ||
781 | + } | ||
782 | + if (strcmp (op_end, "")) | ||
783 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
784 | + else | ||
785 | + as_fatal (_("Error in statement syntax")); | ||
786 | + | ||
787 | + /* Check for spl registers. */ | ||
788 | + if (check_spl_reg (& reg1)) | ||
789 | + as_fatal (_("Cannot use special register with this instruction")); | ||
790 | + if (check_spl_reg (& reg2)) | ||
791 | + as_fatal (_("Cannot use special register with this instruction")); | ||
792 | + | ||
793 | + if (exp.X_op != O_constant) | ||
794 | + { | ||
795 | + char *opc = NULL; | ||
796 | + //char *opc = str_microblaze_64; | ||
797 | + relax_substateT subtype; | ||
798 | + | ||
799 | + if (exp.X_md != 0) | ||
800 | + subtype = get_imm_otype(exp.X_md); | ||
801 | + else | ||
802 | + subtype = opcode->inst_offset_type; | ||
803 | + | ||
804 | + output = frag_var (rs_machine_dependent, | ||
805 | + isize * 2, /* maxm of 2 words. */ | ||
806 | + isize * 2, /* minm of 2 words. */ | ||
807 | + subtype, /* PC-relative or not. */ | ||
808 | + exp.X_add_symbol, | ||
809 | + exp.X_add_number, | ||
810 | + (char *) opc); | ||
811 | + immedl = 0L; | ||
812 | + } | ||
813 | + else | ||
814 | + { | ||
815 | + output = frag_more (isize); | ||
816 | + immedl = exp.X_add_number; | ||
817 | + | ||
818 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
819 | + if (opcode1 == NULL) | ||
820 | + { | ||
821 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
822 | + return; | ||
823 | + } | ||
824 | + | ||
825 | + inst1 = opcode1->bit_sequence; | ||
826 | + inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
827 | + output[0] = INST_BYTE0 (inst1); | ||
828 | + output[1] = INST_BYTE1 (inst1); | ||
829 | + output[2] = INST_BYTE2 (inst1); | ||
830 | + output[3] = INST_BYTE3 (inst1); | ||
831 | + output = frag_more (isize); | ||
832 | + } | ||
833 | + | ||
834 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
835 | + inst |= (reg2 << RA_LOW) & RA_MASK; | ||
836 | + inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
837 | + break; | ||
838 | + | ||
839 | + case INST_TYPE_R1_IMML: | ||
840 | + if (strcmp (op_end, "")) | ||
841 | + op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ | ||
842 | + else | ||
843 | + { | ||
844 | + as_fatal (_("Error in statement syntax")); | ||
845 | + reg1 = 0; | ||
846 | + } | ||
847 | + if (strcmp (op_end, "")) | ||
848 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
849 | + else | ||
850 | + as_fatal (_("Error in statement syntax")); | ||
851 | + | ||
852 | + /* Check for spl registers. */ | ||
853 | + if (check_spl_reg (®1)) | ||
854 | + as_fatal (_("Cannot use special register with this instruction")); | ||
855 | + | ||
856 | + if (exp.X_op != O_constant) | ||
857 | + { | ||
858 | + //char *opc = NULL; | ||
859 | + char *opc = str_microblaze_64; | ||
860 | + relax_substateT subtype; | ||
861 | + | ||
862 | + if (exp.X_md != 0) | ||
863 | + subtype = get_imm_otype(exp.X_md); | ||
864 | + else | ||
865 | + subtype = opcode->inst_offset_type; | ||
866 | + | ||
867 | + output = frag_var (rs_machine_dependent, | ||
868 | + isize * 2, /* maxm of 2 words. */ | ||
869 | + isize * 2, /* minm of 2 words. */ | ||
870 | + subtype, /* PC-relative or not. */ | ||
871 | + exp.X_add_symbol, | ||
872 | + exp.X_add_number, | ||
873 | + (char *) opc); | ||
874 | + immedl = 0L; | ||
875 | + } | ||
876 | + else | ||
877 | + { | ||
878 | + output = frag_more (isize); | ||
879 | + immedl = exp.X_add_number; | ||
880 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
881 | + if (opcode1 == NULL) | ||
882 | + { | ||
883 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
884 | + return; | ||
885 | + } | ||
886 | + | ||
887 | + inst1 = opcode1->bit_sequence; | ||
888 | + inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
889 | + output[0] = INST_BYTE0 (inst1); | ||
890 | + output[1] = INST_BYTE1 (inst1); | ||
891 | + output[2] = INST_BYTE2 (inst1); | ||
892 | + output[3] = INST_BYTE3 (inst1); | ||
893 | + output = frag_more (isize); | ||
894 | + } | ||
895 | + | ||
896 | + inst |= (reg1 << RA_LOW) & RA_MASK; | ||
897 | + inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
898 | + break; | ||
899 | + | ||
900 | + case INST_TYPE_IMML: | ||
901 | + as_fatal (_("An IMML instruction should not be present in the .s file")); | ||
902 | + break; | ||
903 | |||
904 | default: | ||
905 | switch (F (fixp->fx_size, fixp->fx_pcrel)) | ||
906 | @@ -2560,6 +2942,18 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
907 | return rel; | ||
908 | } | ||
909 | |||
910 | +/* Called by TARGET_FORMAT. */ | ||
911 | +const char * | ||
912 | +microblaze_target_format (void) | ||
913 | +{ | ||
914 | + | ||
915 | + if (microblaze_arch_size == 64) | ||
916 | + return "elf64-microblazeel"; | ||
917 | + else | ||
918 | + return target_big_endian ? "elf32-microblaze" : "elf32-microblazeel"; | ||
919 | +} | ||
920 | + | ||
921 | + | ||
922 | int | ||
923 | md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
924 | { | ||
925 | @@ -2573,6 +2967,10 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
926 | case OPTION_LITTLE: | ||
927 | target_big_endian = 0; | ||
928 | break; | ||
929 | + case OPTION_M64: | ||
930 | + //if (arg != NULL && strcmp (arg, "64") == 0) | ||
931 | + microblaze_arch_size = 64; | ||
932 | + break; | ||
933 | default: | ||
934 | return 0; | ||
935 | } | ||
936 | @@ -2588,6 +2986,7 @@ md_show_usage (FILE * stream ATTRIBUTE_UNUSED) | ||
937 | fprintf (stream, _(" MicroBlaze specific assembler options:\n")); | ||
938 | fprintf (stream, " -%-23s%s\n", "mbig-endian", N_("assemble for a big endian cpu")); | ||
939 | fprintf (stream, " -%-23s%s\n", "mlittle-endian", N_("assemble for a little endian cpu")); | ||
940 | + fprintf (stream, " -%-23s%s\n", "m64", N_("generate 64-bit elf")); | ||
941 | } | ||
942 | |||
943 | |||
944 | @@ -2625,7 +3024,10 @@ cons_fix_new_microblaze (fragS * frag, | ||
945 | r = BFD_RELOC_32; | ||
946 | break; | ||
947 | case 8: | ||
948 | - r = BFD_RELOC_64; | ||
949 | + if (microblaze_arch_size == 64) | ||
950 | + r = BFD_RELOC_32; | ||
951 | + else | ||
952 | + r = BFD_RELOC_64; | ||
953 | break; | ||
954 | default: | ||
955 | as_bad (_("unsupported BFD relocation size %u"), size); | ||
956 | -- | ||
957 | 2.34.1 | ||
958 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-relocations-for-MB-X.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-relocations-for-MB-X.patch new file mode 100644 index 00000000..f92dd068 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-relocations-for-MB-X.patch | |||
@@ -0,0 +1,246 @@ | |||
1 | From fb4a4d6855092f5b0b201e40234782822cd63a66 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 11 Sep 2018 17:30:17 +0530 | ||
4 | Subject: [PATCH 23/53] Added relocations for MB-X | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/bfd-in2.h | ||
8 | gas/config/tc-microblaze.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | |||
13 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
14 | --- | ||
15 | bfd/libbfd.h | 2 -- | ||
16 | bfd/reloc.c | 26 ++++++++------- | ||
17 | gas/config/tc-microblaze.c | 68 ++++++++++++-------------------------- | ||
18 | 3 files changed, 36 insertions(+), 60 deletions(-) | ||
19 | |||
20 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | ||
21 | index 603ed8260cb..7a3e558d70a 100644 | ||
22 | --- a/bfd/libbfd.h | ||
23 | +++ b/bfd/libbfd.h | ||
24 | @@ -3005,9 +3005,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
25 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
26 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
27 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
28 | - "BFD_RELOC_MICROBLAZE_64", | ||
29 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
30 | - "BFD_RELOC_MICROBLAZE_64_GPC", | ||
31 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
32 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
33 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
34 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
35 | index 6eb93e993f0..b6c9c22a0be 100644 | ||
36 | --- a/bfd/reloc.c | ||
37 | +++ b/bfd/reloc.c | ||
38 | @@ -6634,6 +6634,20 @@ ENUM | ||
39 | ENUMDOC | ||
40 | Address of a GOT entry. | ||
41 | |||
42 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
43 | + to two words (uses imml instruction). | ||
44 | +ENUM | ||
45 | +BFD_RELOC_MICROBLAZE_64, | ||
46 | +ENUMDOC | ||
47 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
48 | + value in two words (with an imml instruction). No relocation is | ||
49 | + done here - only used for relaxing | ||
50 | +ENUM | ||
51 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
52 | +ENUMDOC | ||
53 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
54 | + value in two words (with an imml instruction). No relocation is | ||
55 | + done here - only used for relaxing | ||
56 | ENUM | ||
57 | BFD_RELOC_MICROBLAZE_32_LO | ||
58 | ENUMDOC | ||
59 | @@ -6671,12 +6685,6 @@ ENUMDOC | ||
60 | This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
61 | two words (with an imm instruction). No relocation is done here - | ||
62 | only used for relaxing. | ||
63 | -ENUM | ||
64 | - BFD_RELOC_MICROBLAZE_64 | ||
65 | -ENUMDOC | ||
66 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
67 | - value in two words (with an imm instruction). No relocation is | ||
68 | - done here - only used for relaxing | ||
69 | ENUM | ||
70 | BFD_RELOC_MICROBLAZE_64_PCREL, | ||
71 | ENUMDOC | ||
72 | @@ -6689,12 +6697,6 @@ ENUMDOC | ||
73 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
74 | value in two words (with an imml instruction). No relocation is | ||
75 | done here - only used for relaxing | ||
76 | -ENUM | ||
77 | - BFD_RELOC_MICROBLAZE_64_GPC | ||
78 | -ENUMDOC | ||
79 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
80 | - value in two words (with an imm instruction). The relocation is | ||
81 | - PC-relative GOT offset | ||
82 | ENUM | ||
83 | BFD_RELOC_MICROBLAZE_64_GOT | ||
84 | ENUMDOC | ||
85 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
86 | index 6640266cc47..29fb6360169 100644 | ||
87 | --- a/gas/config/tc-microblaze.c | ||
88 | +++ b/gas/config/tc-microblaze.c | ||
89 | @@ -2096,23 +2096,29 @@ md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, | ||
90 | fragP->fr_fix += INST_WORD_SIZE * 2; | ||
91 | fragP->fr_var = 0; | ||
92 | break; | ||
93 | + case DEFINED_64_PC_OFFSET: | ||
94 | + fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE, fragP->fr_symbol, | ||
95 | + fragP->fr_offset, TRUE, BFD_RELOC_MICROBLAZE_64_PCREL); | ||
96 | + fragP->fr_fix += INST_WORD_SIZE * 2; | ||
97 | + fragP->fr_var = 0; | ||
98 | + break; | ||
99 | case DEFINED_64_OFFSET: | ||
100 | if (fragP->fr_symbol == GOT_symbol) | ||
101 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE, fragP->fr_symbol, | ||
102 | - fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64_GPC); | ||
103 | + fragP->fr_offset, false, BFD_RELOC_MICROBLAZE_64_GPC); | ||
104 | else | ||
105 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE, fragP->fr_symbol, | ||
106 | - fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64); | ||
107 | + fragP->fr_offset, false, BFD_RELOC_MICROBLAZE_64); | ||
108 | fragP->fr_fix += INST_WORD_SIZE * 2; | ||
109 | fragP->fr_var = 0; | ||
110 | break; | ||
111 | case DEFINED_ABS_SEGMENT: | ||
112 | if (fragP->fr_symbol == GOT_symbol) | ||
113 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE * 2, fragP->fr_symbol, | ||
114 | - fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64_GOTPC); | ||
115 | + fragP->fr_offset, true, BFD_RELOC_MICROBLAZE_64_GOTPC); | ||
116 | else | ||
117 | fix_new (fragP, fragP->fr_fix, INST_WORD_SIZE * 2, fragP->fr_symbol, | ||
118 | - fragP->fr_offset, true, BFD_RELOC_64); | ||
119 | + fragP->fr_offset, false, BFD_RELOC_64); | ||
120 | fragP->fr_fix += INST_WORD_SIZE * 2; | ||
121 | fragP->fr_var = 0; | ||
122 | break; | ||
123 | @@ -2334,10 +2340,12 @@ md_apply_fix (fixS * fixP, | ||
124 | case BFD_RELOC_64: | ||
125 | case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
126 | case BFD_RELOC_MICROBLAZE_64: | ||
127 | + case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
128 | /* Add an imm instruction. First save the current instruction. */ | ||
129 | for (i = 0; i < INST_WORD_SIZE; i++) | ||
130 | buf[i + INST_WORD_SIZE] = buf[i]; | ||
131 | - if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
132 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64 | ||
133 | + || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
134 | { | ||
135 | /* Generate the imm instruction. */ | ||
136 | opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
137 | @@ -2350,6 +2358,10 @@ md_apply_fix (fixS * fixP, | ||
138 | inst1 = opcode1->bit_sequence; | ||
139 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
140 | inst1 |= ((val & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
141 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
142 | + fixP->fx_r_type = BFD_RELOC_64; | ||
143 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
144 | + fixP->fx_r_type = BFD_RELOC_64_PCREL; | ||
145 | } | ||
146 | else | ||
147 | { | ||
148 | @@ -2435,8 +2447,6 @@ md_apply_fix (fixS * fixP, | ||
149 | moves code around due to relaxing. */ | ||
150 | if (fixP->fx_r_type == BFD_RELOC_64_PCREL) | ||
151 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE; | ||
152 | - else if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
153 | - fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE; | ||
154 | else if (fixP->fx_r_type == BFD_RELOC_32) | ||
155 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_32_NONE; | ||
156 | else | ||
157 | @@ -2486,9 +2496,9 @@ md_estimate_size_before_relax (fragS * fragP, | ||
158 | if(streq (fragP->fr_opcode, str_microblaze_64)) | ||
159 | { | ||
160 | /* Used as an absolute value. */ | ||
161 | - fragP->fr_subtype = DEFINED_64_OFFSET; | ||
162 | + fragP->fr_subtype = DEFINED_64_PC_OFFSET; | ||
163 | /* Variable part does not change. */ | ||
164 | - fragP->fr_var = INST_WORD_SIZE; | ||
165 | + fragP->fr_var = INST_WORD_SIZE*2; | ||
166 | } | ||
167 | else | ||
168 | { | ||
169 | @@ -2504,15 +2514,6 @@ md_estimate_size_before_relax (fragS * fragP, | ||
170 | fragP->fr_var = INST_WORD_SIZE; | ||
171 | } | ||
172 | } | ||
173 | -#if 0 | ||
174 | - else if (S_GET_SEGMENT (fragP->fr_symbol) == segment_type && | ||
175 | - !S_IS_WEAK (fragP->fr_symbol)) | ||
176 | - { | ||
177 | - fragP->fr_subtype = DEFINED_PC_OFFSET; | ||
178 | - /* Don't know now whether we need an imm instruction. */ | ||
179 | - fragP->fr_var = INST_WORD_SIZE; | ||
180 | - } | ||
181 | -#endif | ||
182 | else if (S_IS_DEFINED (fragP->fr_symbol) | ||
183 | && (((S_GET_SEGMENT (fragP->fr_symbol))->flags & SEC_CODE) == 0)) | ||
184 | { | ||
185 | @@ -2610,33 +2611,6 @@ md_estimate_size_before_relax (fragS * fragP, | ||
186 | abort (); | ||
187 | } | ||
188 | } | ||
189 | -#if 0 //revisit | ||
190 | - else if (streq (name, "lli") || streq (name, "sli")) | ||
191 | - { | ||
192 | - temp = immed & 0xFFFFFFFFFFFF8000; | ||
193 | - if ((temp != 0) && (temp != 0xFFFFFFFFFFFF8000)) | ||
194 | - { | ||
195 | - /* Needs an immediate inst. */ | ||
196 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
197 | - if (opcode1 == NULL) | ||
198 | - { | ||
199 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
200 | - return; | ||
201 | - } | ||
202 | - | ||
203 | - inst1 = opcode1->bit_sequence; | ||
204 | - inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
205 | - output[0] = INST_BYTE0 (inst1); | ||
206 | - output[1] = INST_BYTE1 (inst1); | ||
207 | - output[2] = INST_BYTE2 (inst1); | ||
208 | - output[3] = INST_BYTE3 (inst1); | ||
209 | - output = frag_more (isize); | ||
210 | - } | ||
211 | - inst |= (reg1 << RD_LOW) & RD_MASK; | ||
212 | - inst |= (reg2 << RA_LOW) & RA_MASK; | ||
213 | - inst |= (immed << IMM_LOW) & IMM_MASK; | ||
214 | - } | ||
215 | -#endif | ||
216 | else | ||
217 | { | ||
218 | /* We know the abs value: Should never happen. */ | ||
219 | @@ -2657,6 +2631,7 @@ md_estimate_size_before_relax (fragS * fragP, | ||
220 | case TLSTPREL_OFFSET: | ||
221 | case TLSDTPREL_OFFSET: | ||
222 | case DEFINED_64_OFFSET: | ||
223 | + case DEFINED_64_PC_OFFSET: | ||
224 | fragP->fr_var = INST_WORD_SIZE*2; | ||
225 | break; | ||
226 | case DEFINED_RO_SEGMENT: | ||
227 | @@ -2710,7 +2685,7 @@ md_pcrel_from_section (fixS * fixp, segT sec ATTRIBUTE_UNUSED) | ||
228 | else | ||
229 | { | ||
230 | /* The case where we are going to resolve things... */ | ||
231 | - if (fixp->fx_r_type == BFD_RELOC_64_PCREL ||fixp->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
232 | + if (fixp->fx_r_type == BFD_RELOC_64_PCREL ||fixp->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
233 | return fixp->fx_where + fixp->fx_frag->fr_address + INST_WORD_SIZE; | ||
234 | else | ||
235 | return fixp->fx_where + fixp->fx_frag->fr_address; | ||
236 | @@ -2745,6 +2720,7 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
237 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
238 | case BFD_RELOC_MICROBLAZE_64_GPC: | ||
239 | case BFD_RELOC_MICROBLAZE_64: | ||
240 | + case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
241 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
242 | case BFD_RELOC_MICROBLAZE_64_PLT: | ||
243 | case BFD_RELOC_MICROBLAZE_64_GOTOFF: | ||
244 | -- | ||
245 | 2.34.1 | ||
246 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0024-Fixed-MB-x-relocation-issues-Added-imml-for-required.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0024-Fixed-MB-x-relocation-issues-Added-imml-for-required.patch new file mode 100644 index 00000000..18698b02 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0024-Fixed-MB-x-relocation-issues-Added-imml-for-required.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 88f7a313f8e21021dacfc8da2c490a433f596fd8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Fri, 28 Sep 2018 12:04:55 +0530 | ||
4 | Subject: [PATCH 24/53] -Fixed MB-x relocation issues -Added imml for required | ||
5 | MB-x instructions | ||
6 | |||
7 | Conflicts: | ||
8 | bfd/elf64-microblaze.c | ||
9 | gas/config/tc-microblaze.c | ||
10 | |||
11 | Conflicts: | ||
12 | gas/config/tc-microblaze.c | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | gas/config/tc-microblaze.c | 6 ++++-- | ||
17 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
20 | index 29fb6360169..e43ea82a2cc 100644 | ||
21 | --- a/gas/config/tc-microblaze.c | ||
22 | +++ b/gas/config/tc-microblaze.c | ||
23 | @@ -363,7 +363,7 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED) | ||
24 | Integer arg to pass to the function. */ | ||
25 | /* If the pseudo-op is not found in this table, it searches in the obj-elf.c, | ||
26 | and then in the read.c table. */ | ||
27 | -pseudo_typeS md_pseudo_table[] = | ||
28 | +const pseudo_typeS md_pseudo_table[] = | ||
29 | { | ||
30 | {"lcomm", microblaze_s_lcomm, 1}, | ||
31 | {"data8", cons, 1}, /* Same as byte. */ | ||
32 | @@ -2357,7 +2357,7 @@ md_apply_fix (fixS * fixP, | ||
33 | |||
34 | inst1 = opcode1->bit_sequence; | ||
35 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
36 | - inst1 |= ((val & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
37 | + inst1 |= ((val & 0xFFFFFF0000L) >> 16) & IMML_MASK; | ||
38 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
39 | fixP->fx_r_type = BFD_RELOC_64; | ||
40 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
41 | @@ -2946,6 +2946,8 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
42 | case OPTION_M64: | ||
43 | //if (arg != NULL && strcmp (arg, "64") == 0) | ||
44 | microblaze_arch_size = 64; | ||
45 | + // UPSTREAM/REVISIT - md_pseudo_table is const | ||
46 | + // md_pseudo_table[7].poc_val = 8; | ||
47 | break; | ||
48 | default: | ||
49 | return 0; | ||
50 | -- | ||
51 | 2.34.1 | ||
52 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-address-computation-issues-with-64bit-address-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-address-computation-issues-with-64bit-address-.patch new file mode 100644 index 00000000..d480388c --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-address-computation-issues-with-64bit-address-.patch | |||
@@ -0,0 +1,160 @@ | |||
1 | From 585f95d1510385ed3f67e76e2ad8f9a27b3ee32a Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 9 Oct 2018 10:14:22 +0530 | ||
4 | Subject: [PATCH 25/53] - Fixed address computation issues with 64bit address - | ||
5 | Fixed imml dissassamble issue | ||
6 | |||
7 | Conflicts: | ||
8 | gas/config/tc-microblaze.c | ||
9 | opcodes/microblaze-dis.c | ||
10 | |||
11 | Conflicts: | ||
12 | bfd/elf64-microblaze.c | ||
13 | |||
14 | Conflicts: | ||
15 | bfd/elf64-microblaze.c | ||
16 | |||
17 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
18 | --- | ||
19 | bfd/elf64-microblaze.c | 2 +- | ||
20 | gas/config/tc-microblaze.c | 74 +++++++++++++++++++++++++++++++++----- | ||
21 | 2 files changed, 67 insertions(+), 9 deletions(-) | ||
22 | |||
23 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
24 | index ca92df647c9..9f542f55ebd 100755 | ||
25 | --- a/bfd/elf64-microblaze.c | ||
26 | +++ b/bfd/elf64-microblaze.c | ||
27 | @@ -2131,7 +2131,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
28 | efix = calc_fixup (target_address, 0, sec); | ||
29 | |||
30 | /* Validate the in-band val. */ | ||
31 | - val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
32 | + val = bfd_get_64 (abfd, contents + irel->r_offset); | ||
33 | if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
34 | fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
35 | } | ||
36 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
37 | index e43ea82a2cc..544732649a5 100644 | ||
38 | --- a/gas/config/tc-microblaze.c | ||
39 | +++ b/gas/config/tc-microblaze.c | ||
40 | @@ -372,7 +372,6 @@ const pseudo_typeS md_pseudo_table[] = | ||
41 | {"ent", s_func, 0}, /* Treat ent as function entry point. */ | ||
42 | {"end", microblaze_s_func, 1}, /* Treat end as function end point. */ | ||
43 | {"gpword", s_rva, 4}, /* gpword label => store resolved label address in data section. */ | ||
44 | - {"gpdword", s_rva, 8}, /* gpword label => store resolved label address in data section. */ | ||
45 | {"weakext", microblaze_s_weakext, 0}, | ||
46 | {"rodata", microblaze_s_rdata, 0}, | ||
47 | {"sdata2", microblaze_s_rdata, 1}, | ||
48 | @@ -2317,18 +2316,74 @@ md_apply_fix (fixS * fixP, | ||
49 | case BFD_RELOC_RVA: | ||
50 | case BFD_RELOC_32_PCREL: | ||
51 | case BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: | ||
52 | + /* Don't do anything if the symbol is not defined. */ | ||
53 | + if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
54 | + { | ||
55 | + if ((fixP->fx_r_type == BFD_RELOC_RVA) && (microblaze_arch_size == 64)) | ||
56 | + { | ||
57 | + if (target_big_endian) | ||
58 | + { | ||
59 | + buf[0] |= ((val >> 56) & 0xff); | ||
60 | + buf[1] |= ((val >> 48) & 0xff); | ||
61 | + buf[2] |= ((val >> 40) & 0xff); | ||
62 | + buf[3] |= ((val >> 32) & 0xff); | ||
63 | + buf[4] |= ((val >> 24) & 0xff); | ||
64 | + buf[5] |= ((val >> 16) & 0xff); | ||
65 | + buf[6] |= ((val >> 8) & 0xff); | ||
66 | + buf[7] |= (val & 0xff); | ||
67 | + } | ||
68 | + else | ||
69 | + { | ||
70 | + buf[7] |= ((val >> 56) & 0xff); | ||
71 | + buf[6] |= ((val >> 48) & 0xff); | ||
72 | + buf[5] |= ((val >> 40) & 0xff); | ||
73 | + buf[4] |= ((val >> 32) & 0xff); | ||
74 | + buf[3] |= ((val >> 24) & 0xff); | ||
75 | + buf[2] |= ((val >> 16) & 0xff); | ||
76 | + buf[1] |= ((val >> 8) & 0xff); | ||
77 | + buf[0] |= (val & 0xff); | ||
78 | + } | ||
79 | + } | ||
80 | + else { | ||
81 | + if (target_big_endian) | ||
82 | + { | ||
83 | + buf[0] |= ((val >> 24) & 0xff); | ||
84 | + buf[1] |= ((val >> 16) & 0xff); | ||
85 | + buf[2] |= ((val >> 8) & 0xff); | ||
86 | + buf[3] |= (val & 0xff); | ||
87 | + } | ||
88 | + else | ||
89 | + { | ||
90 | + buf[3] |= ((val >> 24) & 0xff); | ||
91 | + buf[2] |= ((val >> 16) & 0xff); | ||
92 | + buf[1] |= ((val >> 8) & 0xff); | ||
93 | + buf[0] |= (val & 0xff); | ||
94 | + } | ||
95 | + } | ||
96 | + } | ||
97 | + break; | ||
98 | + | ||
99 | + case BFD_RELOC_MICROBLAZE_EA64: | ||
100 | /* Don't do anything if the symbol is not defined. */ | ||
101 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
102 | { | ||
103 | if (target_big_endian) | ||
104 | { | ||
105 | - buf[0] |= ((val >> 24) & 0xff); | ||
106 | - buf[1] |= ((val >> 16) & 0xff); | ||
107 | - buf[2] |= ((val >> 8) & 0xff); | ||
108 | - buf[3] |= (val & 0xff); | ||
109 | + buf[0] |= ((val >> 56) & 0xff); | ||
110 | + buf[1] |= ((val >> 48) & 0xff); | ||
111 | + buf[2] |= ((val >> 40) & 0xff); | ||
112 | + buf[3] |= ((val >> 32) & 0xff); | ||
113 | + buf[4] |= ((val >> 24) & 0xff); | ||
114 | + buf[5] |= ((val >> 16) & 0xff); | ||
115 | + buf[6] |= ((val >> 8) & 0xff); | ||
116 | + buf[7] |= (val & 0xff); | ||
117 | } | ||
118 | else | ||
119 | { | ||
120 | + buf[7] |= ((val >> 56) & 0xff); | ||
121 | + buf[6] |= ((val >> 48) & 0xff); | ||
122 | + buf[5] |= ((val >> 40) & 0xff); | ||
123 | + buf[4] |= ((val >> 32) & 0xff); | ||
124 | buf[3] |= ((val >> 24) & 0xff); | ||
125 | buf[2] |= ((val >> 16) & 0xff); | ||
126 | buf[1] |= ((val >> 8) & 0xff); | ||
127 | @@ -2449,6 +2504,8 @@ md_apply_fix (fixS * fixP, | ||
128 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_64_NONE; | ||
129 | else if (fixP->fx_r_type == BFD_RELOC_32) | ||
130 | fixP->fx_r_type = BFD_RELOC_MICROBLAZE_32_NONE; | ||
131 | + else if(fixP->fx_r_type == BFD_RELOC_MICROBLAZE_EA64) | ||
132 | + fixP->fx_r_type = BFD_RELOC_MICROBLAZE_EA64; | ||
133 | else | ||
134 | fixP->fx_r_type = BFD_RELOC_NONE; | ||
135 | fixP->fx_addsy = section_symbol (absolute_section); | ||
136 | @@ -2719,6 +2776,7 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
137 | case BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: | ||
138 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
139 | case BFD_RELOC_MICROBLAZE_64_GPC: | ||
140 | + case BFD_RELOC_MICROBLAZE_EA64: | ||
141 | case BFD_RELOC_MICROBLAZE_64: | ||
142 | case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
143 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
144 | @@ -3002,10 +3060,10 @@ cons_fix_new_microblaze (fragS * frag, | ||
145 | r = BFD_RELOC_32; | ||
146 | break; | ||
147 | case 8: | ||
148 | - if (microblaze_arch_size == 64) | ||
149 | + /*if (microblaze_arch_size == 64) | ||
150 | r = BFD_RELOC_32; | ||
151 | - else | ||
152 | - r = BFD_RELOC_64; | ||
153 | + else*/ | ||
154 | + r = BFD_RELOC_MICROBLAZE_EA64; | ||
155 | break; | ||
156 | default: | ||
157 | as_bad (_("unsupported BFD relocation size %u"), size); | ||
158 | -- | ||
159 | 2.34.1 | ||
160 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch new file mode 100644 index 00000000..03d8e0b8 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From d3fd5a77fa218f8f6c296337758d45cab61483fe Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Tue, 2 Nov 2021 17:28:24 +0530 | ||
4 | Subject: [PATCH 26/53] [Patch,MicroBlaze : Adding new relocation to support | ||
5 | 64bit rodata. | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | gas/config/tc-microblaze.c | 49 ++++++++++++++++++++++++++++++++++---- | ||
10 | 1 file changed, 45 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
13 | index 544732649a5..c9757796ae8 100644 | ||
14 | --- a/gas/config/tc-microblaze.c | ||
15 | +++ b/gas/config/tc-microblaze.c | ||
16 | @@ -1090,6 +1090,13 @@ md_assemble (char * str) | ||
17 | as_fatal (_("smi pseudo instruction should not use a label in imm field")); | ||
18 | if(streq (name, "lli") || streq (name, "sli")) | ||
19 | opc = str_microblaze_64; | ||
20 | + else if ((microblaze_arch_size == 64) && ((streq (name, "lbui") | ||
21 | + || streq (name, "lhui") || streq (name, "lwi") || streq (name, "sbi") | ||
22 | + || streq (name, "shi") || streq (name, "swi")))) | ||
23 | + { | ||
24 | + opc = str_microblaze_64; | ||
25 | + subtype = opcode->inst_offset_type; | ||
26 | + } | ||
27 | else if (reg2 == REG_ROSDP) | ||
28 | opc = str_microblaze_ro_anchor; | ||
29 | else if (reg2 == REG_RWSDP) | ||
30 | @@ -1157,7 +1164,10 @@ md_assemble (char * str) | ||
31 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
32 | } | ||
33 | } | ||
34 | - else if (streq (name, "lli") || streq (name, "sli")) | ||
35 | + else if (streq (name, "lli") || streq (name, "sli") || ((microblaze_arch_size == 64) | ||
36 | + && ((streq (name, "lbui")) || streq (name, "lhui") | ||
37 | + || streq (name, "lwi") || streq (name, "sbi") | ||
38 | + || streq (name, "shi") || streq (name, "swi")))) | ||
39 | { | ||
40 | temp = immed & 0xFFFFFF8000; | ||
41 | if (temp != 0 && temp != 0xFFFFFF8000) | ||
42 | @@ -1773,6 +1783,11 @@ md_assemble (char * str) | ||
43 | |||
44 | if (exp.X_md != 0) | ||
45 | subtype = get_imm_otype(exp.X_md); | ||
46 | + else if (streq (name, "brealid") || streq (name, "breaid") || streq (name, "breai")) | ||
47 | + { | ||
48 | + opc = str_microblaze_64; | ||
49 | + subtype = opcode->inst_offset_type; | ||
50 | + } | ||
51 | else | ||
52 | subtype = opcode->inst_offset_type; | ||
53 | |||
54 | @@ -1790,6 +1805,31 @@ md_assemble (char * str) | ||
55 | output = frag_more (isize); | ||
56 | immed = exp.X_add_number; | ||
57 | } | ||
58 | + if (streq (name, "brealid") || streq (name, "breaid") || streq (name, "breai")) | ||
59 | + { | ||
60 | + temp = immed & 0xFFFFFF8000; | ||
61 | + if (temp != 0 && temp != 0xFFFFFF8000) | ||
62 | + { | ||
63 | + /* Needs an immediate inst. */ | ||
64 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
65 | + if (opcode1 == NULL) | ||
66 | + { | ||
67 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
68 | + return; | ||
69 | + } | ||
70 | + inst1 = opcode1->bit_sequence; | ||
71 | + inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
72 | + output[0] = INST_BYTE0 (inst1); | ||
73 | + output[1] = INST_BYTE1 (inst1); | ||
74 | + output[2] = INST_BYTE2 (inst1); | ||
75 | + output[3] = INST_BYTE3 (inst1); | ||
76 | + output = frag_more (isize); | ||
77 | + } | ||
78 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
79 | + inst |= (immed << IMM_LOW) & IMM_MASK; | ||
80 | + } | ||
81 | + else | ||
82 | + { | ||
83 | |||
84 | temp = immed & 0xFFFF8000; | ||
85 | if ((temp != 0) && (temp != 0xFFFF8000)) | ||
86 | @@ -1815,6 +1855,7 @@ md_assemble (char * str) | ||
87 | |||
88 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
89 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
90 | + } | ||
91 | break; | ||
92 | |||
93 | case INST_TYPE_R2: | ||
94 | @@ -3060,10 +3101,10 @@ cons_fix_new_microblaze (fragS * frag, | ||
95 | r = BFD_RELOC_32; | ||
96 | break; | ||
97 | case 8: | ||
98 | - /*if (microblaze_arch_size == 64) | ||
99 | - r = BFD_RELOC_32; | ||
100 | - else*/ | ||
101 | + if (microblaze_arch_size == 64) | ||
102 | r = BFD_RELOC_MICROBLAZE_EA64; | ||
103 | + else | ||
104 | + r = BFD_RELOC_64; | ||
105 | break; | ||
106 | default: | ||
107 | as_bad (_("unsupported BFD relocation size %u"), size); | ||
108 | -- | ||
109 | 2.34.1 | ||
110 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0027-Revert-ld-Remove-unused-expression-state-defsym-symb.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0027-Revert-ld-Remove-unused-expression-state-defsym-symb.patch new file mode 100644 index 00000000..5a8992df --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0027-Revert-ld-Remove-unused-expression-state-defsym-symb.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | From e89c2729322ce147e8a5a5e7842944593b4dd474 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Wed, 27 Feb 2019 15:12:32 +0530 | ||
4 | Subject: [PATCH 27/53] Revert "ld: Remove unused expression state" --defsym | ||
5 | symbol=expression Create a global symbol in the output file, containing the | ||
6 | absolute address given by expression. | ||
7 | |||
8 | This reverts commit 65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb. | ||
9 | |||
10 | Conflicts: | ||
11 | ld/ChangeLog | ||
12 | |||
13 | Conflicts: | ||
14 | ld/ldexp.c | ||
15 | ld/ldexp.h | ||
16 | |||
17 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
18 | --- | ||
19 | ld/ldexp.c | 8 +++++--- | ||
20 | ld/ldexp.h | 1 + | ||
21 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
22 | |||
23 | diff --git a/ld/ldexp.c b/ld/ldexp.c | ||
24 | index 3c8ab2d3589..525f3e4262c 100644 | ||
25 | --- a/ld/ldexp.c | ||
26 | +++ b/ld/ldexp.c | ||
27 | @@ -1402,6 +1402,7 @@ static etree_type * | ||
28 | exp_assop (const char *dst, | ||
29 | etree_type *src, | ||
30 | enum node_tree_enum class, | ||
31 | + bool defsym, | ||
32 | bool hidden) | ||
33 | { | ||
34 | etree_type *n; | ||
35 | @@ -1413,6 +1414,7 @@ exp_assop (const char *dst, | ||
36 | n->assign.type.node_class = class; | ||
37 | n->assign.src = src; | ||
38 | n->assign.dst = dst; | ||
39 | + n->assign.defsym = defsym; | ||
40 | n->assign.hidden = hidden; | ||
41 | return n; | ||
42 | } | ||
43 | @@ -1422,7 +1424,7 @@ exp_assop (const char *dst, | ||
44 | etree_type * | ||
45 | exp_assign (const char *dst, etree_type *src, bool hidden) | ||
46 | { | ||
47 | - return exp_assop (dst, src, etree_assign, hidden); | ||
48 | + return exp_assop (dst, src, etree_assign, false, hidden); | ||
49 | } | ||
50 | |||
51 | /* Handle --defsym command-line option. */ | ||
52 | @@ -1430,7 +1432,7 @@ exp_assign (const char *dst, etree_type *src, bool hidden) | ||
53 | etree_type * | ||
54 | exp_defsym (const char *dst, etree_type *src) | ||
55 | { | ||
56 | - return exp_assop (dst, src, etree_assign, false); | ||
57 | + return exp_assop (dst, src, etree_assign, true, false); | ||
58 | } | ||
59 | |||
60 | /* Handle PROVIDE. */ | ||
61 | @@ -1438,7 +1440,7 @@ exp_defsym (const char *dst, etree_type *src) | ||
62 | etree_type * | ||
63 | exp_provide (const char *dst, etree_type *src, bool hidden) | ||
64 | { | ||
65 | - return exp_assop (dst, src, etree_provide, hidden); | ||
66 | + return exp_assop (dst, src, etree_provide, false, hidden); | ||
67 | } | ||
68 | |||
69 | /* Handle ASSERT. */ | ||
70 | diff --git a/ld/ldexp.h b/ld/ldexp.h | ||
71 | index c779729e900..6d583e1b15a 100644 | ||
72 | --- a/ld/ldexp.h | ||
73 | +++ b/ld/ldexp.h | ||
74 | @@ -66,6 +66,7 @@ typedef union etree_union { | ||
75 | node_type type; | ||
76 | const char *dst; | ||
77 | union etree_union *src; | ||
78 | + bool defsym; | ||
79 | bool hidden; | ||
80 | } assign; | ||
81 | struct { | ||
82 | -- | ||
83 | 2.34.1 | ||
84 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch new file mode 100644 index 00000000..675ce3ee --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 21eacbba925e2aaceaf3d3400030ae61a1aa4fef Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Thu, 29 Nov 2018 17:59:25 +0530 | ||
4 | Subject: [PATCH 28/53] fixing the long & long long mingw toolchain issue | ||
5 | |||
6 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
7 | --- | ||
8 | gas/config/tc-microblaze.c | 10 +++++----- | ||
9 | opcodes/microblaze-opc.h | 4 ++-- | ||
10 | 2 files changed, 7 insertions(+), 7 deletions(-) | ||
11 | |||
12 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
13 | index c9757796ae8..a8194d175e1 100644 | ||
14 | --- a/gas/config/tc-microblaze.c | ||
15 | +++ b/gas/config/tc-microblaze.c | ||
16 | @@ -754,7 +754,7 @@ parse_imm (char * s, expressionS * e, offsetT min, offsetT max) | ||
17 | } | ||
18 | |||
19 | static char * | ||
20 | -parse_imml (char * s, expressionS * e, long min, long max) | ||
21 | +parse_imml (char * s, expressionS * e, long long min, long long max) | ||
22 | { | ||
23 | char *new_pointer; | ||
24 | char *atp; | ||
25 | @@ -805,11 +805,11 @@ parse_imml (char * s, expressionS * e, long min, long max) | ||
26 | ; /* An error message has already been emitted. */ | ||
27 | else if ((e->X_op != O_constant && e->X_op != O_symbol) ) | ||
28 | as_fatal (_("operand must be a constant or a label")); | ||
29 | - else if ((e->X_op == O_constant) && ((long) e->X_add_number < min | ||
30 | - || (long) e->X_add_number > max)) | ||
31 | + else if ((e->X_op == O_constant) && ((long long) e->X_add_number < min | ||
32 | + || (long long) e->X_add_number > max)) | ||
33 | { | ||
34 | - as_fatal (_("operand must be absolute in range %ld..%ld, not %ld"), | ||
35 | - min, max, (long) e->X_add_number); | ||
36 | + as_fatal (_("operand must be absolute in range %lld..%lld, not %lld"), | ||
37 | + min, max, (long long) e->X_add_number); | ||
38 | } | ||
39 | |||
40 | if (atp) | ||
41 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
42 | index d9d05721dae..f85f5a600cc 100644 | ||
43 | --- a/opcodes/microblaze-opc.h | ||
44 | +++ b/opcodes/microblaze-opc.h | ||
45 | @@ -592,8 +592,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
46 | #define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
47 | #define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
48 | |||
49 | -#define MIN_IMML ((long) 0xffffff8000000000L) | ||
50 | -#define MAX_IMML ((long) 0x0000007fffffffffL) | ||
51 | +#define MIN_IMML ((long long) 0xffffff8000000000L) | ||
52 | +#define MAX_IMML ((long long) 0x0000007fffffffffL) | ||
53 | |||
54 | #endif /* MICROBLAZE_OPC */ | ||
55 | |||
56 | -- | ||
57 | 2.34.1 | ||
58 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0029-Added-support-to-new-arithmetic-single-register-inst.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0029-Added-support-to-new-arithmetic-single-register-inst.patch new file mode 100644 index 00000000..6199a4e5 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0029-Added-support-to-new-arithmetic-single-register-inst.patch | |||
@@ -0,0 +1,371 @@ | |||
1 | From c0cff55375899b12045eef8f5755e68a598ee4ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju <nmekala@xilinx.com> | ||
3 | Date: Fri, 23 Aug 2019 16:18:43 +0530 | ||
4 | Subject: [PATCH 29/53] Added support to new arithmetic single register | ||
5 | instructions | ||
6 | |||
7 | Conflicts: | ||
8 | opcodes/microblaze-dis.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | opcodes/microblaze-dis.c | ||
13 | |||
14 | Conflicts: | ||
15 | gas/config/tc-microblaze.c | ||
16 | signed-off-by:Nagaraju <nmekala@xilinx.com> | ||
17 | Mahesh <mbodapat@xilinx.com> | ||
18 | |||
19 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
20 | --- | ||
21 | gas/config/tc-microblaze.c | 147 ++++++++++++++++++++++++++++++++++++- | ||
22 | opcodes/microblaze-dis.c | 11 +++ | ||
23 | opcodes/microblaze-opc.h | 43 ++++++++++- | ||
24 | opcodes/microblaze-opcm.h | 5 +- | ||
25 | 4 files changed, 200 insertions(+), 6 deletions(-) | ||
26 | |||
27 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
28 | index a8194d175e1..3c9aec4c1f9 100644 | ||
29 | --- a/gas/config/tc-microblaze.c | ||
30 | +++ b/gas/config/tc-microblaze.c | ||
31 | @@ -394,12 +394,33 @@ void | ||
32 | md_begin (void) | ||
33 | { | ||
34 | const struct op_code_struct * opcode; | ||
35 | + const char *prev_name = ""; | ||
36 | |||
37 | opcode_hash_control = str_htab_create (); | ||
38 | |||
39 | /* Insert unique names into hash table. */ | ||
40 | - for (opcode = microblaze_opcodes; opcode->name; opcode ++) | ||
41 | - str_hash_insert (opcode_hash_control, opcode->name, opcode, 0); | ||
42 | + for (opcode = (struct microblaze_opcodes *)microblaze_opcodes; opcode->name; opcode ++) | ||
43 | + { | ||
44 | + if (strcmp (prev_name, opcode->name)) | ||
45 | + { | ||
46 | + prev_name = (char *) opcode->name; | ||
47 | + str_hash_insert (opcode_hash_control, opcode->name, opcode, 0); | ||
48 | + } | ||
49 | + } | ||
50 | +} | ||
51 | + | ||
52 | +static int | ||
53 | +is_reg (char * s) | ||
54 | +{ | ||
55 | + int is_reg = 0; | ||
56 | + /* Strip leading whitespace. */ | ||
57 | + while (ISSPACE (* s)) | ||
58 | + ++ s; | ||
59 | + if (TOLOWER (s[0]) == 'r') | ||
60 | + { | ||
61 | + is_reg =1; | ||
62 | + } | ||
63 | + return is_reg; | ||
64 | } | ||
65 | |||
66 | /* Try to parse a reg name. */ | ||
67 | @@ -957,6 +978,7 @@ md_assemble (char * str) | ||
68 | { | ||
69 | char * op_start; | ||
70 | char * op_end; | ||
71 | + char * temp_op_end; | ||
72 | struct op_code_struct * opcode, *opcode1; | ||
73 | char * output = NULL; | ||
74 | int nlen = 0; | ||
75 | @@ -967,9 +989,10 @@ md_assemble (char * str) | ||
76 | unsigned reg3; | ||
77 | unsigned isize; | ||
78 | unsigned long immed = 0, immed2 = 0, temp; | ||
79 | - expressionS exp; | ||
80 | + expressionS exp,exp1; | ||
81 | char name[20]; | ||
82 | long immedl; | ||
83 | + int reg=0; | ||
84 | |||
85 | /* Drop leading whitespace. */ | ||
86 | while (ISSPACE (* str)) | ||
87 | @@ -1000,7 +1023,78 @@ md_assemble (char * str) | ||
88 | as_bad (_("unknown opcode \"%s\""), name); | ||
89 | return; | ||
90 | } | ||
91 | - | ||
92 | + | ||
93 | + if ((microblaze_arch_size == 64) && (streq (name, "addli") || streq (name, "addlic") || | ||
94 | + streq (name, "addlik") || streq (name, "addlikc") || streq (name, "rsubli") | ||
95 | + || streq (name, "rsublic") || streq (name, "rsublik") || streq (name, "rsublikc") | ||
96 | + || streq (name, "andli") || streq (name, "andnli") || streq (name, "orli") | ||
97 | + || streq (name, "xorli"))) | ||
98 | + { | ||
99 | + temp_op_end = op_end; | ||
100 | + if (strcmp (temp_op_end, "")) | ||
101 | + temp_op_end = parse_reg (temp_op_end + 1, ®1); /* Get rd. */ | ||
102 | + if (strcmp (temp_op_end, "")) | ||
103 | + reg = is_reg (temp_op_end + 1); | ||
104 | + if (reg) | ||
105 | + { | ||
106 | + | ||
107 | + opcode->inst_type=INST_TYPE_RD_R1_IMML; | ||
108 | + opcode->inst_offset_type = OPCODE_MASK_H; | ||
109 | + if (streq (name, "addli")) | ||
110 | + opcode->bit_sequence = ADDLI_MASK; | ||
111 | + else if (streq (name, "addlic")) | ||
112 | + opcode->bit_sequence = ADDLIC_MASK; | ||
113 | + else if (streq (name, "addlik")) | ||
114 | + opcode->bit_sequence = ADDLIK_MASK; | ||
115 | + else if (streq (name, "addlikc")) | ||
116 | + opcode->bit_sequence = ADDLIKC_MASK; | ||
117 | + else if (streq (name, "rsubli")) | ||
118 | + opcode->bit_sequence = RSUBLI_MASK; | ||
119 | + else if (streq (name, "rsublic")) | ||
120 | + opcode->bit_sequence = RSUBLIC_MASK; | ||
121 | + else if (streq (name, "rsublik")) | ||
122 | + opcode->bit_sequence = RSUBLIK_MASK; | ||
123 | + else if (streq (name, "rsublikc")) | ||
124 | + opcode->bit_sequence = RSUBLIKC_MASK; | ||
125 | + else if (streq (name, "andli")) | ||
126 | + opcode->bit_sequence = ANDLI_MASK; | ||
127 | + else if (streq (name, "andnli")) | ||
128 | + opcode->bit_sequence = ANDLNI_MASK; | ||
129 | + else if (streq (name, "orli")) | ||
130 | + opcode->bit_sequence = ORLI_MASK; | ||
131 | + else if (streq (name, "xorli")) | ||
132 | + opcode->bit_sequence = XORLI_MASK; | ||
133 | + } | ||
134 | + else | ||
135 | + { | ||
136 | + opcode->inst_type=INST_TYPE_RD_IMML; | ||
137 | + opcode->inst_offset_type = OPCODE_MASK_LIMM; | ||
138 | + if (streq (name, "addli")) | ||
139 | + opcode->bit_sequence = ADDLI_ONE_REG_MASK; | ||
140 | + else if (streq (name, "addlic")) | ||
141 | + opcode->bit_sequence = ADDLIC_ONE_REG_MASK; | ||
142 | + else if (streq (name, "addlik")) | ||
143 | + opcode->bit_sequence = ADDLIK_ONE_REG_MASK; | ||
144 | + else if (streq (name, "addlikc")) | ||
145 | + opcode->bit_sequence = ADDLIKC_ONE_REG_MASK; | ||
146 | + else if (streq (name, "rsubli")) | ||
147 | + opcode->bit_sequence = RSUBLI_ONE_REG_MASK; | ||
148 | + else if (streq (name, "rsublic")) | ||
149 | + opcode->bit_sequence = RSUBLIC_ONE_REG_MASK; | ||
150 | + else if (streq (name, "rsublik")) | ||
151 | + opcode->bit_sequence = RSUBLIK_ONE_REG_MASK; | ||
152 | + else if (streq (name, "rsublikc")) | ||
153 | + opcode->bit_sequence = RSUBLIKC_ONE_REG_MASK; | ||
154 | + else if (streq (name, "andli")) | ||
155 | + opcode->bit_sequence = ANDLI_ONE_REG_MASK; | ||
156 | + else if (streq (name, "andnli")) | ||
157 | + opcode->bit_sequence = ANDLNI_ONE_REG_MASK; | ||
158 | + else if (streq (name, "orli")) | ||
159 | + opcode->bit_sequence = ORLI_ONE_REG_MASK; | ||
160 | + else if (streq (name, "xorli")) | ||
161 | + opcode->bit_sequence = XORLI_ONE_REG_MASK; | ||
162 | + } | ||
163 | + } | ||
164 | inst = opcode->bit_sequence; | ||
165 | isize = 4; | ||
166 | |||
167 | @@ -1457,6 +1551,51 @@ md_assemble (char * str) | ||
168 | inst |= (immed << IMM_LOW) & IMM15_MASK; | ||
169 | break; | ||
170 | |||
171 | + case INST_TYPE_RD_IMML: | ||
172 | + if (strcmp (op_end, "")) | ||
173 | + op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
174 | + else | ||
175 | + { | ||
176 | + as_fatal (_("Error in statement syntax")); | ||
177 | + reg1 = 0; | ||
178 | + } | ||
179 | + | ||
180 | + if (strcmp (op_end, "")) | ||
181 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
182 | + else | ||
183 | + as_fatal (_("Error in statement syntax")); | ||
184 | + | ||
185 | + /* Check for spl registers. */ | ||
186 | + if (check_spl_reg (®1)) | ||
187 | + as_fatal (_("Cannot use special register with this instruction")); | ||
188 | + if (exp.X_op != O_constant) | ||
189 | + { | ||
190 | + char *opc = NULL; | ||
191 | + relax_substateT subtype; | ||
192 | + | ||
193 | + if (exp.X_md != 0) | ||
194 | + subtype = get_imm_otype(exp.X_md); | ||
195 | + else | ||
196 | + subtype = opcode->inst_offset_type; | ||
197 | + | ||
198 | + output = frag_var (rs_machine_dependent, | ||
199 | + isize * 2, | ||
200 | + isize * 2, | ||
201 | + subtype, | ||
202 | + exp.X_add_symbol, | ||
203 | + exp.X_add_number, | ||
204 | + (char *) opc); | ||
205 | + immedl = 0L; | ||
206 | + } | ||
207 | + else | ||
208 | + { | ||
209 | + output = frag_more (isize); | ||
210 | + immed = exp.X_add_number; | ||
211 | + } | ||
212 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
213 | + inst |= (immed << IMM_LOW) & IMM16_MASK; | ||
214 | + break; | ||
215 | + | ||
216 | case INST_TYPE_R1_RFSL: | ||
217 | if (strcmp (op_end, "")) | ||
218 | op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ | ||
219 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
220 | index 45262aef909..bdc6db79726 100644 | ||
221 | --- a/opcodes/microblaze-dis.c | ||
222 | +++ b/opcodes/microblaze-dis.c | ||
223 | @@ -143,6 +143,14 @@ get_field_imm15 (struct string_buf *buf, long instr) | ||
224 | return p; | ||
225 | } | ||
226 | |||
227 | +get_field_imm16 (struct string_buf *buf, long instr) | ||
228 | +{ | ||
229 | + char *p = strbuf (buf); | ||
230 | + | ||
231 | + sprintf (p, "%d", (short)((instr & IMM16_MASK) >> IMM_LOW)); | ||
232 | + return p; | ||
233 | +} | ||
234 | + | ||
235 | static char * | ||
236 | get_field_special (struct string_buf *buf, long instr, | ||
237 | const struct op_code_struct *op) | ||
238 | @@ -473,6 +481,9 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
239 | /* For mbar 16 or sleep insn. */ | ||
240 | case INST_TYPE_NONE: | ||
241 | break; | ||
242 | + case INST_TYPE_RD_IMML: | ||
243 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
244 | + break; | ||
245 | /* For bit field insns. */ | ||
246 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
247 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
248 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
249 | index f85f5a600cc..6228114698b 100644 | ||
250 | --- a/opcodes/microblaze-opc.h | ||
251 | +++ b/opcodes/microblaze-opc.h | ||
252 | @@ -77,6 +77,7 @@ | ||
253 | #define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
254 | |||
255 | #define INST_TYPE_NONE 25 | ||
256 | +#define INST_TYPE_RD_IMML 26 | ||
257 | |||
258 | |||
259 | |||
260 | @@ -92,6 +93,7 @@ | ||
261 | #define IMMVAL_MASK_MFS 0x0000 | ||
262 | |||
263 | #define OPCODE_MASK_H 0xFC000000 /* High 6 bits only. */ | ||
264 | +#define OPCODE_MASK_LIMM 0xFC1F0000 /* High 6 bits and 12-16 bits */ | ||
265 | #define OPCODE_MASK_H1 0xFFE00000 /* High 11 bits. */ | ||
266 | #define OPCODE_MASK_H2 0xFC1F0000 /* High 6 and bits 20-16. */ | ||
267 | #define OPCODE_MASK_H12 0xFFFF0000 /* High 16. */ | ||
268 | @@ -114,6 +116,33 @@ | ||
269 | #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */ | ||
270 | #define OPCODE_MASK_H8 0xFF000000 /* High 8 bits only. */ | ||
271 | |||
272 | +/*Defines to identify 64-bit single reg instructions */ | ||
273 | +#define ADDLI_ONE_REG_MASK 0x68000000 | ||
274 | +#define ADDLIC_ONE_REG_MASK 0x68020000 | ||
275 | +#define ADDLIK_ONE_REG_MASK 0x68040000 | ||
276 | +#define ADDLIKC_ONE_REG_MASK 0x68060000 | ||
277 | +#define RSUBLI_ONE_REG_MASK 0x68010000 | ||
278 | +#define RSUBLIC_ONE_REG_MASK 0x68030000 | ||
279 | +#define RSUBLIK_ONE_REG_MASK 0x68050000 | ||
280 | +#define RSUBLIKC_ONE_REG_MASK 0x68070000 | ||
281 | +#define ORLI_ONE_REG_MASK 0x68100000 | ||
282 | +#define ANDLI_ONE_REG_MASK 0x68110000 | ||
283 | +#define XORLI_ONE_REG_MASK 0x68120000 | ||
284 | +#define ANDLNI_ONE_REG_MASK 0x68130000 | ||
285 | +#define ADDLI_MASK 0x20000000 | ||
286 | +#define ADDLIC_MASK 0x28000000 | ||
287 | +#define ADDLIK_MASK 0x30000000 | ||
288 | +#define ADDLIKC_MASK 0x38000000 | ||
289 | +#define RSUBLI_MASK 0x24000000 | ||
290 | +#define RSUBLIC_MASK 0x2C000000 | ||
291 | +#define RSUBLIK_MASK 0x34000000 | ||
292 | +#define RSUBLIKC_MASK 0x3C000000 | ||
293 | +#define ANDLI_MASK 0xA4000000 | ||
294 | +#define ANDLNI_MASK 0xAC000000 | ||
295 | +#define ORLI_MASK 0xA0000000 | ||
296 | +#define XORLI_MASK 0xA8000000 | ||
297 | + | ||
298 | + | ||
299 | /* New Mask for msrset, msrclr insns. */ | ||
300 | #define OPCODE_MASK_H23N 0xFC1F8000 /* High 6 and bits 11 - 16. */ | ||
301 | /* Mask for mbar insn. */ | ||
302 | @@ -122,7 +151,7 @@ | ||
303 | #define DELAY_SLOT 1 | ||
304 | #define NO_DELAY_SLOT 0 | ||
305 | |||
306 | -#define MAX_OPCODES 412 | ||
307 | +#define MAX_OPCODES 424 | ||
308 | |||
309 | const struct op_code_struct | ||
310 | { | ||
311 | @@ -451,13 +480,21 @@ const struct op_code_struct | ||
312 | {"cmpl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000101, OPCODE_MASK_H4, cmpl, arithmetic_inst }, | ||
313 | {"cmplu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000103, OPCODE_MASK_H4, cmplu, arithmetic_inst }, | ||
314 | {"addli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x20000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
315 | + {"addli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68000000, OPCODE_MASK_LIMM, addli, arithmetic_inst }, | ||
316 | {"rsubli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x24000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
317 | + {"rsubli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68010000, OPCODE_MASK_LIMM, rsubli, arithmetic_inst }, | ||
318 | {"addlic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x28000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
319 | + {"addlic", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68020000, OPCODE_MASK_LIMM, addlic, arithmetic_inst }, | ||
320 | {"rsublic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x2C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
321 | + {"rsublic", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68030000, OPCODE_MASK_LIMM, rsublic, arithmetic_inst }, | ||
322 | {"addlik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
323 | + {"addlik", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68040000, OPCODE_MASK_LIMM, addlik, arithmetic_inst }, | ||
324 | {"rsublik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x34000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
325 | + {"rsublik", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68050000, OPCODE_MASK_LIMM, rsublik, arithmetic_inst }, | ||
326 | {"addlikc", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x38000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
327 | + {"addlikc", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68060000, OPCODE_MASK_LIMM, addlikc, arithmetic_inst }, | ||
328 | {"rsublikc",INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
329 | + {"rsublikc", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68070000, OPCODE_MASK_LIMM, rsublikc, arithmetic_inst }, | ||
330 | {"mull", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x40000100, OPCODE_MASK_H4, mull, mult_inst }, | ||
331 | {"bslll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000500, OPCODE_MASK_H3, bslll, barrel_shift_inst }, | ||
332 | {"bslra", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000300, OPCODE_MASK_H3, bslra, barrel_shift_inst }, | ||
333 | @@ -508,9 +545,13 @@ const struct op_code_struct | ||
334 | {"beaged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00000, OPCODE_MASK_H14, beaged, branch_inst }, | ||
335 | {"bealged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00100, OPCODE_MASK_H14, bealged, branch_inst }, | ||
336 | {"orli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA0000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
337 | + {"orli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68100000, OPCODE_MASK_LIMM, orli, arithmetic_inst }, | ||
338 | {"andli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA4000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
339 | + {"andli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68110000, OPCODE_MASK_LIMM, andli, arithmetic_inst }, | ||
340 | {"xorli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA8000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
341 | + {"xorli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68120000, OPCODE_MASK_LIMM, xorli, arithmetic_inst }, | ||
342 | {"andnli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xAC000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
343 | + {"andnli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68130000, OPCODE_MASK_LIMM, andnli, arithmetic_inst }, | ||
344 | {"imml", INST_TYPE_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB2000000, OPCODE_MASK_H8, imml, immediate_inst }, | ||
345 | {"breai", INST_TYPE_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8010000, OPCODE_MASK_H12, breai, branch_inst }, | ||
346 | {"breaid", INST_TYPE_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8110000, OPCODE_MASK_H12, breaid, branch_inst }, | ||
347 | diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h | ||
348 | index 08ed44352ee..a57cabf905f 100644 | ||
349 | --- a/opcodes/microblaze-opcm.h | ||
350 | +++ b/opcodes/microblaze-opcm.h | ||
351 | @@ -62,7 +62,9 @@ enum microblaze_instr | ||
352 | eaputd, teaputd, ecaputd, tecaputd, neaputd, tneaputd, necaputd, tnecaputd, | ||
353 | |||
354 | /* 64-bit instructions */ | ||
355 | - addl, rsubl, addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
356 | + addl, addli, addlic, addlik, addlikc, rsubl, rsubli, rsublic, rsublik, rsublikc, | ||
357 | + addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
358 | + andli, andnli, orli, xorli, | ||
359 | bslll, bslra, bslrl, bsllli, bslrai, bslrli, bslefi, bslifi, orl, andl, xorl, | ||
360 | andnl, pcmplbf, pcmpleq, pcmplne, srla, srlc, srll, sextl8, sextl16, sextl32, | ||
361 | brea, bread, breald, beaeq, bealeq, beaeqd, bealeqd, beane, bealne, beaned, | ||
362 | @@ -167,5 +169,6 @@ enum microblaze_instr_type | ||
363 | |||
364 | /* Imm mask for msrset, msrclr instructions. */ | ||
365 | #define IMM15_MASK 0x00007FFF | ||
366 | +#define IMM16_MASK 0x0000FFFF | ||
367 | |||
368 | #endif /* MICROBLAZE-OPCM */ | ||
369 | -- | ||
370 | 2.34.1 | ||
371 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0030-double-imml-generation-for-64-bit-values.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0030-double-imml-generation-for-64-bit-values.patch new file mode 100644 index 00000000..eb62eaeb --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0030-double-imml-generation-for-64-bit-values.patch | |||
@@ -0,0 +1,545 @@ | |||
1 | From e4d7207d18e47a9ce5fbf57fc4faa370bf150284 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 26 Aug 2019 15:29:42 +0530 | ||
4 | Subject: [PATCH 30/53] double imml generation for 64 bit values. | ||
5 | |||
6 | Conflicts: | ||
7 | gas/config/tc-microblaze.c | ||
8 | |||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | gas/config/tc-microblaze.c | 321 ++++++++++++++++++++++++++++++------- | ||
12 | opcodes/microblaze-opc.h | 4 +- | ||
13 | 2 files changed, 262 insertions(+), 63 deletions(-) | ||
14 | |||
15 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
16 | index 3c9aec4c1f9..4da765223be 100644 | ||
17 | --- a/gas/config/tc-microblaze.c | ||
18 | +++ b/gas/config/tc-microblaze.c | ||
19 | @@ -979,7 +979,7 @@ md_assemble (char * str) | ||
20 | char * op_start; | ||
21 | char * op_end; | ||
22 | char * temp_op_end; | ||
23 | - struct op_code_struct * opcode, *opcode1; | ||
24 | + struct op_code_struct * opcode, *opcode1, *opcode2; | ||
25 | char * output = NULL; | ||
26 | int nlen = 0; | ||
27 | int i; | ||
28 | @@ -1163,7 +1163,12 @@ md_assemble (char * str) | ||
29 | reg2 = 0; | ||
30 | } | ||
31 | if (strcmp (op_end, "")) | ||
32 | + { | ||
33 | + if(microblaze_arch_size == 64) | ||
34 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
35 | + else | ||
36 | op_end = parse_imm (op_end + 1, & exp, MIN_IMM, MAX_IMM); | ||
37 | + } | ||
38 | else | ||
39 | as_fatal (_("Error in statement syntax")); | ||
40 | |||
41 | @@ -1263,26 +1268,51 @@ md_assemble (char * str) | ||
42 | || streq (name, "lwi") || streq (name, "sbi") | ||
43 | || streq (name, "shi") || streq (name, "swi")))) | ||
44 | { | ||
45 | - temp = immed & 0xFFFFFF8000; | ||
46 | - if (temp != 0 && temp != 0xFFFFFF8000) | ||
47 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
48 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000) | ||
49 | { | ||
50 | /* Needs an immediate inst. */ | ||
51 | - opcode1 | ||
52 | - = (struct op_code_struct *) str_hash_find (opcode_hash_control, | ||
53 | - "imml"); | ||
54 | - if (opcode1 == NULL) | ||
55 | + if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
56 | + { | ||
57 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
58 | + if (opcode1 == NULL) | ||
59 | { | ||
60 | as_bad (_("unknown opcode \"%s\""), "imml"); | ||
61 | return; | ||
62 | } | ||
63 | inst1 = opcode1->bit_sequence; | ||
64 | - inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
65 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
66 | output[0] = INST_BYTE0 (inst1); | ||
67 | output[1] = INST_BYTE1 (inst1); | ||
68 | output[2] = INST_BYTE2 (inst1); | ||
69 | output[3] = INST_BYTE3 (inst1); | ||
70 | output = frag_more (isize); | ||
71 | } | ||
72 | + else | ||
73 | + { | ||
74 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
75 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
76 | + if (opcode1 == NULL || opcode2 == NULL) | ||
77 | + { | ||
78 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
79 | + return; | ||
80 | + } | ||
81 | + inst1 = opcode2->bit_sequence; | ||
82 | + inst1 |= ((immed & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
83 | + output[0] = INST_BYTE0 (inst1); | ||
84 | + output[1] = INST_BYTE1 (inst1); | ||
85 | + output[2] = INST_BYTE2 (inst1); | ||
86 | + output[3] = INST_BYTE3 (inst1); | ||
87 | + output = frag_more (isize); | ||
88 | + inst1 = opcode1->bit_sequence; | ||
89 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
90 | + output[0] = INST_BYTE0 (inst1); | ||
91 | + output[1] = INST_BYTE1 (inst1); | ||
92 | + output[2] = INST_BYTE2 (inst1); | ||
93 | + output[3] = INST_BYTE3 (inst1); | ||
94 | + output = frag_more (isize); | ||
95 | + } | ||
96 | + } | ||
97 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
98 | inst |= (reg2 << RA_LOW) & RA_MASK; | ||
99 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
100 | @@ -1299,8 +1329,7 @@ md_assemble (char * str) | ||
101 | as_bad (_("unknown opcode \"%s\""), "imm"); | ||
102 | return; | ||
103 | } | ||
104 | - | ||
105 | - inst1 = opcode1->bit_sequence; | ||
106 | + inst1 = opcode1->bit_sequence; | ||
107 | inst1 |= ((immed & 0xFFFF0000) >> 16) & IMM_MASK; | ||
108 | output[0] = INST_BYTE0 (inst1); | ||
109 | output[1] = INST_BYTE1 (inst1); | ||
110 | @@ -1541,7 +1570,7 @@ md_assemble (char * str) | ||
111 | as_fatal (_("Cannot use special register with this instruction")); | ||
112 | |||
113 | if (exp.X_op != O_constant) | ||
114 | - as_fatal (_("Symbol used as immediate value for msrset/msrclr instructions")); | ||
115 | + as_fatal (_("Symbol used as immediate value for arithmetic long instructions")); | ||
116 | else | ||
117 | { | ||
118 | output = frag_more (isize); | ||
119 | @@ -1875,6 +1904,7 @@ md_assemble (char * str) | ||
120 | temp = immed & 0xFFFF8000; | ||
121 | if ((temp != 0) && (temp != 0xFFFF8000)) | ||
122 | { | ||
123 | + | ||
124 | /* Needs an immediate inst. */ | ||
125 | opcode1 | ||
126 | = (struct op_code_struct *) str_hash_find (opcode_hash_control, | ||
127 | @@ -1907,7 +1937,12 @@ md_assemble (char * str) | ||
128 | reg1 = 0; | ||
129 | } | ||
130 | if (strcmp (op_end, "")) | ||
131 | + { | ||
132 | + if(microblaze_arch_size == 64) | ||
133 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
134 | + else | ||
135 | op_end = parse_imm (op_end + 1, & exp, MIN_IMM, MAX_IMM); | ||
136 | + } | ||
137 | else | ||
138 | as_fatal (_("Error in statement syntax")); | ||
139 | |||
140 | @@ -1946,30 +1981,55 @@ md_assemble (char * str) | ||
141 | } | ||
142 | if (streq (name, "brealid") || streq (name, "breaid") || streq (name, "breai")) | ||
143 | { | ||
144 | - temp = immed & 0xFFFFFF8000; | ||
145 | - if (temp != 0 && temp != 0xFFFFFF8000) | ||
146 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
147 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000) | ||
148 | { | ||
149 | /* Needs an immediate inst. */ | ||
150 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
151 | + if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
152 | + { | ||
153 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
154 | if (opcode1 == NULL) | ||
155 | { | ||
156 | as_bad (_("unknown opcode \"%s\""), "imml"); | ||
157 | return; | ||
158 | } | ||
159 | inst1 = opcode1->bit_sequence; | ||
160 | - inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
161 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
162 | output[0] = INST_BYTE0 (inst1); | ||
163 | output[1] = INST_BYTE1 (inst1); | ||
164 | output[2] = INST_BYTE2 (inst1); | ||
165 | output[3] = INST_BYTE3 (inst1); | ||
166 | output = frag_more (isize); | ||
167 | } | ||
168 | + else { | ||
169 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
170 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
171 | + if (opcode1 == NULL || opcode2 == NULL) | ||
172 | + { | ||
173 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
174 | + return; | ||
175 | + } | ||
176 | + inst1 = opcode2->bit_sequence; | ||
177 | + inst1 |= ((immed & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
178 | + output[0] = INST_BYTE0 (inst1); | ||
179 | + output[1] = INST_BYTE1 (inst1); | ||
180 | + output[2] = INST_BYTE2 (inst1); | ||
181 | + output[3] = INST_BYTE3 (inst1); | ||
182 | + output = frag_more (isize); | ||
183 | + inst1 = opcode1->bit_sequence; | ||
184 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
185 | + output[0] = INST_BYTE0 (inst1); | ||
186 | + output[1] = INST_BYTE1 (inst1); | ||
187 | + output[2] = INST_BYTE2 (inst1); | ||
188 | + output[3] = INST_BYTE3 (inst1); | ||
189 | + output = frag_more (isize); | ||
190 | + } | ||
191 | + } | ||
192 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
193 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
194 | } | ||
195 | else | ||
196 | { | ||
197 | - | ||
198 | temp = immed & 0xFFFF8000; | ||
199 | if ((temp != 0) && (temp != 0xFFFF8000)) | ||
200 | { | ||
201 | @@ -2057,24 +2117,50 @@ md_assemble (char * str) | ||
202 | streq (name, "breaid") || | ||
203 | streq (name, "brai") || streq (name, "braid"))) | ||
204 | { | ||
205 | - temp = immed & 0xFFFFFF8000; | ||
206 | + temp = immed & 0xFFFFFFFFFFFF8000; | ||
207 | if (temp != 0) | ||
208 | { | ||
209 | /* Needs an immediate inst. */ | ||
210 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
211 | + if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
212 | + { | ||
213 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
214 | if (opcode1 == NULL) | ||
215 | { | ||
216 | as_bad (_("unknown opcode \"%s\""), "imml"); | ||
217 | return; | ||
218 | } | ||
219 | inst1 = opcode1->bit_sequence; | ||
220 | - inst1 |= ((immed & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
221 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
222 | output[0] = INST_BYTE0 (inst1); | ||
223 | output[1] = INST_BYTE1 (inst1); | ||
224 | output[2] = INST_BYTE2 (inst1); | ||
225 | output[3] = INST_BYTE3 (inst1); | ||
226 | output = frag_more (isize); | ||
227 | } | ||
228 | + else { | ||
229 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
230 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
231 | + if (opcode1 == NULL || opcode2 == NULL) | ||
232 | + { | ||
233 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
234 | + return; | ||
235 | + } | ||
236 | + inst1 = opcode2->bit_sequence; | ||
237 | + inst1 |= ((immed & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
238 | + output[0] = INST_BYTE0 (inst1); | ||
239 | + output[1] = INST_BYTE1 (inst1); | ||
240 | + output[2] = INST_BYTE2 (inst1); | ||
241 | + output[3] = INST_BYTE3 (inst1); | ||
242 | + output = frag_more (isize); | ||
243 | + inst1 = opcode1->bit_sequence; | ||
244 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
245 | + output[0] = INST_BYTE0 (inst1); | ||
246 | + output[1] = INST_BYTE1 (inst1); | ||
247 | + output[2] = INST_BYTE2 (inst1); | ||
248 | + output[3] = INST_BYTE3 (inst1); | ||
249 | + output = frag_more (isize); | ||
250 | + } | ||
251 | + } | ||
252 | inst |= (immed << IMM_LOW) & IMM_MASK; | ||
253 | } | ||
254 | else | ||
255 | @@ -2394,8 +2480,8 @@ md_apply_fix (fixS * fixP, | ||
256 | /* Note: use offsetT because it is signed, valueT is unsigned. */ | ||
257 | offsetT val = (offsetT) * valp; | ||
258 | int i; | ||
259 | - struct op_code_struct * opcode1; | ||
260 | - unsigned long inst1; | ||
261 | + struct op_code_struct * opcode1, * opcode2; | ||
262 | + unsigned long inst1,inst2; | ||
263 | |||
264 | symname = fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : _("<unknown>"); | ||
265 | |||
266 | @@ -2576,30 +2662,75 @@ md_apply_fix (fixS * fixP, | ||
267 | case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
268 | case BFD_RELOC_MICROBLAZE_64: | ||
269 | case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
270 | - /* Add an imm instruction. First save the current instruction. */ | ||
271 | - for (i = 0; i < INST_WORD_SIZE; i++) | ||
272 | - buf[i + INST_WORD_SIZE] = buf[i]; | ||
273 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64 | ||
274 | || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
275 | { | ||
276 | /* Generate the imm instruction. */ | ||
277 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
278 | + if (((long long)val) > (long long)-549755813888 && ((long long)val) < (long long)549755813887) | ||
279 | + { | ||
280 | + /* Add an imm instruction. First save the current instruction. */ | ||
281 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
282 | + buf[i + INST_WORD_SIZE] = buf[i]; | ||
283 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
284 | if (opcode1 == NULL) | ||
285 | - { | ||
286 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
287 | - return; | ||
288 | - } | ||
289 | + { | ||
290 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
291 | + return; | ||
292 | + } | ||
293 | |||
294 | inst1 = opcode1->bit_sequence; | ||
295 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
296 | - inst1 |= ((val & 0xFFFFFF0000L) >> 16) & IMML_MASK; | ||
297 | + inst1 |= ((val & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
298 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
299 | + fixP->fx_r_type = BFD_RELOC_64; | ||
300 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
301 | + fixP->fx_r_type = BFD_RELOC_64_PCREL; | ||
302 | + buf[0] = INST_BYTE0 (inst1); | ||
303 | + buf[1] = INST_BYTE1 (inst1); | ||
304 | + buf[2] = INST_BYTE2 (inst1); | ||
305 | + buf[3] = INST_BYTE3 (inst1); | ||
306 | + } | ||
307 | + else { | ||
308 | + /* Add an imm instruction. First save the current instruction. */ | ||
309 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
310 | + buf[i + INST_WORD_SIZE + 4] = buf[i]; | ||
311 | + | ||
312 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
313 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
314 | + if (opcode1 == NULL || opcode2 ==NULL) | ||
315 | + { | ||
316 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
317 | + return; | ||
318 | + } | ||
319 | + inst1 = opcode2->bit_sequence; | ||
320 | + if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
321 | + inst1 |= ((val & 0x000000FFFFFF0000L) >> 40) & IMML_MASK; | ||
322 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
323 | + fixP->fx_r_type = BFD_RELOC_64; | ||
324 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
325 | + fixP->fx_r_type = BFD_RELOC_64_PCREL; | ||
326 | + inst2 = opcode1->bit_sequence; | ||
327 | + if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
328 | + inst1 |= ((val & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
329 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64) | ||
330 | - fixP->fx_r_type = BFD_RELOC_64; | ||
331 | + fixP->fx_r_type = BFD_RELOC_64; | ||
332 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
333 | - fixP->fx_r_type = BFD_RELOC_64_PCREL; | ||
334 | + fixP->fx_r_type = BFD_RELOC_64_PCREL; | ||
335 | + buf[0] = INST_BYTE0 (inst1); | ||
336 | + buf[1] = INST_BYTE1 (inst1); | ||
337 | + buf[2] = INST_BYTE2 (inst1); | ||
338 | + buf[3] = INST_BYTE3 (inst1); | ||
339 | + buf[4] = INST_BYTE0 (inst2); | ||
340 | + buf[5] = INST_BYTE1 (inst2); | ||
341 | + buf[6] = INST_BYTE2 (inst2); | ||
342 | + buf[7] = INST_BYTE3 (inst2); | ||
343 | + } | ||
344 | } | ||
345 | else | ||
346 | { | ||
347 | + /* Add an imm instruction. First save the current instruction. */ | ||
348 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
349 | + buf[i + INST_WORD_SIZE] = buf[i]; | ||
350 | /* Generate the imm instruction. */ | ||
351 | opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
352 | if (opcode1 == NULL) | ||
353 | @@ -2611,12 +2742,11 @@ md_apply_fix (fixS * fixP, | ||
354 | inst1 = opcode1->bit_sequence; | ||
355 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
356 | inst1 |= ((val & 0xFFFF0000) >> 16) & IMM_MASK; | ||
357 | - } | ||
358 | buf[0] = INST_BYTE0 (inst1); | ||
359 | buf[1] = INST_BYTE1 (inst1); | ||
360 | buf[2] = INST_BYTE2 (inst1); | ||
361 | buf[3] = INST_BYTE3 (inst1); | ||
362 | - | ||
363 | + } | ||
364 | /* Add the value only if the symbol is defined. */ | ||
365 | if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy)) | ||
366 | { | ||
367 | @@ -2649,21 +2779,41 @@ md_apply_fix (fixS * fixP, | ||
368 | for (i = 0; i < INST_WORD_SIZE; i++) | ||
369 | buf[i + INST_WORD_SIZE] = buf[i]; | ||
370 | /* Generate the imm instruction. */ | ||
371 | - if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_GPC) | ||
372 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
373 | + if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_GPC) { | ||
374 | + if (((long long)val) > (long long)-549755813888 && ((long long)val) < (long long)549755813887) | ||
375 | + { | ||
376 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
377 | + buf[i + INST_WORD_SIZE] = buf[i]; | ||
378 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
379 | + } | ||
380 | + else { | ||
381 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
382 | + buf[i + INST_WORD_SIZE + 4] = buf[i]; | ||
383 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
384 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
385 | + inst2 = opcode2->bit_sequence; | ||
386 | + | ||
387 | + /* We can fixup call to a defined non-global address | ||
388 | + * within the same section only. */ | ||
389 | + buf[4] = INST_BYTE0 (inst2); | ||
390 | + buf[5] = INST_BYTE1 (inst2); | ||
391 | + buf[6] = INST_BYTE2 (inst2); | ||
392 | + buf[7] = INST_BYTE3 (inst2); | ||
393 | + } | ||
394 | + } | ||
395 | else | ||
396 | opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imm"); | ||
397 | if (opcode1 == NULL) | ||
398 | { | ||
399 | + for (i = 0; i < INST_WORD_SIZE; i++) | ||
400 | + buf[i + INST_WORD_SIZE] = buf[i]; | ||
401 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_GPC) | ||
402 | as_bad (_("unknown opcode \"%s\""), "imml"); | ||
403 | else | ||
404 | as_bad (_("unknown opcode \"%s\""), "imm"); | ||
405 | return; | ||
406 | } | ||
407 | - | ||
408 | inst1 = opcode1->bit_sequence; | ||
409 | - | ||
410 | /* We can fixup call to a defined non-global address | ||
411 | within the same section only. */ | ||
412 | buf[0] = INST_BYTE0 (inst1); | ||
413 | @@ -3025,21 +3175,45 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
414 | { | ||
415 | output = frag_more (isize); | ||
416 | immedl = exp.X_add_number; | ||
417 | - | ||
418 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
419 | - if (opcode1 == NULL) | ||
420 | - { | ||
421 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
422 | - return; | ||
423 | - } | ||
424 | - | ||
425 | - inst1 = opcode1->bit_sequence; | ||
426 | - inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
427 | - output[0] = INST_BYTE0 (inst1); | ||
428 | - output[1] = INST_BYTE1 (inst1); | ||
429 | - output[2] = INST_BYTE2 (inst1); | ||
430 | - output[3] = INST_BYTE3 (inst1); | ||
431 | - output = frag_more (isize); | ||
432 | + if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
433 | + { | ||
434 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
435 | + if (opcode1 == NULL) | ||
436 | + { | ||
437 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
438 | + return; | ||
439 | + } | ||
440 | + inst1 = opcode1->bit_sequence; | ||
441 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
442 | + output[0] = INST_BYTE0 (inst1); | ||
443 | + output[1] = INST_BYTE1 (inst1); | ||
444 | + output[2] = INST_BYTE2 (inst1); | ||
445 | + output[3] = INST_BYTE3 (inst1); | ||
446 | + output = frag_more (isize); | ||
447 | + } | ||
448 | + else { | ||
449 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
450 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
451 | + if (opcode2 == NULL || opcode1 == NULL) | ||
452 | + { | ||
453 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
454 | + return; | ||
455 | + } | ||
456 | + inst1 = opcode2->bit_sequence; | ||
457 | + inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
458 | + output[0] = INST_BYTE0 (inst1); | ||
459 | + output[1] = INST_BYTE1 (inst1); | ||
460 | + output[2] = INST_BYTE2 (inst1); | ||
461 | + output[3] = INST_BYTE3 (inst1); | ||
462 | + output = frag_more (isize); | ||
463 | + inst1 = opcode1->bit_sequence; | ||
464 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
465 | + output[0] = INST_BYTE0 (inst1); | ||
466 | + output[1] = INST_BYTE1 (inst1); | ||
467 | + output[2] = INST_BYTE2 (inst1); | ||
468 | + output[3] = INST_BYTE3 (inst1); | ||
469 | + output = frag_more (isize); | ||
470 | + } | ||
471 | } | ||
472 | |||
473 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
474 | @@ -3088,20 +3262,45 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
475 | { | ||
476 | output = frag_more (isize); | ||
477 | immedl = exp.X_add_number; | ||
478 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
479 | - if (opcode1 == NULL) | ||
480 | - { | ||
481 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
482 | - return; | ||
483 | - } | ||
484 | - | ||
485 | + if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
486 | + { | ||
487 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
488 | + if (opcode1 == NULL) | ||
489 | + { | ||
490 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
491 | + return; | ||
492 | + } | ||
493 | inst1 = opcode1->bit_sequence; | ||
494 | - inst1 |= ((immedl & 0xFFFFFFFFFFFF0000L) >> 16) & IMML_MASK; | ||
495 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
496 | output[0] = INST_BYTE0 (inst1); | ||
497 | output[1] = INST_BYTE1 (inst1); | ||
498 | output[2] = INST_BYTE2 (inst1); | ||
499 | output[3] = INST_BYTE3 (inst1); | ||
500 | output = frag_more (isize); | ||
501 | + } | ||
502 | + else { | ||
503 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
504 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
505 | + if (opcode2 == NULL || opcode1 == NULL) | ||
506 | + { | ||
507 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
508 | + return; | ||
509 | + } | ||
510 | + inst1 = opcode2->bit_sequence; | ||
511 | + inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
512 | + output[0] = INST_BYTE0 (inst1); | ||
513 | + output[1] = INST_BYTE1 (inst1); | ||
514 | + output[2] = INST_BYTE2 (inst1); | ||
515 | + output[3] = INST_BYTE3 (inst1); | ||
516 | + output = frag_more (isize); | ||
517 | + inst1 = opcode1->bit_sequence; | ||
518 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
519 | + output[0] = INST_BYTE0 (inst1); | ||
520 | + output[1] = INST_BYTE1 (inst1); | ||
521 | + output[2] = INST_BYTE2 (inst1); | ||
522 | + output[3] = INST_BYTE3 (inst1); | ||
523 | + output = frag_more (isize); | ||
524 | + } | ||
525 | } | ||
526 | |||
527 | inst |= (reg1 << RA_LOW) & RA_MASK; | ||
528 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
529 | index 6228114698b..f46fc76a94a 100644 | ||
530 | --- a/opcodes/microblaze-opc.h | ||
531 | +++ b/opcodes/microblaze-opc.h | ||
532 | @@ -633,8 +633,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
533 | #define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
534 | #define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
535 | |||
536 | -#define MIN_IMML ((long long) 0xffffff8000000000L) | ||
537 | -#define MAX_IMML ((long long) 0x0000007fffffffffL) | ||
538 | +#define MIN_IMML ((long long) -9223372036854775808) | ||
539 | +#define MAX_IMML ((long long) 9223372036854775807) | ||
540 | |||
541 | #endif /* MICROBLAZE_OPC */ | ||
542 | |||
543 | -- | ||
544 | 2.34.1 | ||
545 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0031-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0031-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch new file mode 100644 index 00000000..5bc507ce --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0031-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 3cd07844b77691afeb675806cc4c73fe08d2c30e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Wed, 3 Nov 2021 12:13:32 +0530 | ||
4 | Subject: [PATCH 31/53] Fixed bug in generation of IMML instruction for the | ||
5 | |||
6 | new MB-64 instructions with single register. | ||
7 | |||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | gas/config/tc-microblaze.c | 50 +++++++++++++++++++++++++++++++++++--- | ||
11 | 1 file changed, 47 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
14 | index 4da765223be..651d855c800 100644 | ||
15 | --- a/gas/config/tc-microblaze.c | ||
16 | +++ b/gas/config/tc-microblaze.c | ||
17 | @@ -1614,12 +1614,56 @@ md_assemble (char * str) | ||
18 | exp.X_add_symbol, | ||
19 | exp.X_add_number, | ||
20 | (char *) opc); | ||
21 | - immedl = 0L; | ||
22 | + immed = 0L; | ||
23 | } | ||
24 | else | ||
25 | { | ||
26 | output = frag_more (isize); | ||
27 | immed = exp.X_add_number; | ||
28 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
29 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000 && temp != 0x8000) | ||
30 | + { | ||
31 | + /* Needs an immediate inst. */ | ||
32 | + if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
33 | + { | ||
34 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
35 | + if (opcode1 == NULL) | ||
36 | + { | ||
37 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
38 | + return; | ||
39 | + } | ||
40 | + inst1 = opcode1->bit_sequence; | ||
41 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
42 | + output[0] = INST_BYTE0 (inst1); | ||
43 | + output[1] = INST_BYTE1 (inst1); | ||
44 | + output[2] = INST_BYTE2 (inst1); | ||
45 | + output[3] = INST_BYTE3 (inst1); | ||
46 | + output = frag_more (isize); | ||
47 | + } | ||
48 | + else { | ||
49 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
50 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
51 | + if (opcode1 == NULL || opcode2 == NULL) | ||
52 | + { | ||
53 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
54 | + return; | ||
55 | + } | ||
56 | + inst1 = opcode2->bit_sequence; | ||
57 | + inst1 |= ((immed & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
58 | + output[0] = INST_BYTE0 (inst1); | ||
59 | + output[1] = INST_BYTE1 (inst1); | ||
60 | + output[2] = INST_BYTE2 (inst1); | ||
61 | + output[3] = INST_BYTE3 (inst1); | ||
62 | + output = frag_more (isize); | ||
63 | + inst1 = opcode1->bit_sequence; | ||
64 | + inst1 |= ((immed & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
65 | + output[0] = INST_BYTE0 (inst1); | ||
66 | + output[1] = INST_BYTE1 (inst1); | ||
67 | + output[2] = INST_BYTE2 (inst1); | ||
68 | + output[3] = INST_BYTE3 (inst1); | ||
69 | + output = frag_more (isize); | ||
70 | + } | ||
71 | + } | ||
72 | } | ||
73 | inst |= (reg1 << RD_LOW) & RD_MASK; | ||
74 | inst |= (immed << IMM_LOW) & IMM16_MASK; | ||
75 | @@ -2117,8 +2161,8 @@ md_assemble (char * str) | ||
76 | streq (name, "breaid") || | ||
77 | streq (name, "brai") || streq (name, "braid"))) | ||
78 | { | ||
79 | - temp = immed & 0xFFFFFFFFFFFF8000; | ||
80 | - if (temp != 0) | ||
81 | + temp = ((long long)immed) & 0xFFFFFFFFFFFF8000; | ||
82 | + if (temp != 0 && temp != 0xFFFFFFFFFFFF8000 && temp != 0x8000) | ||
83 | { | ||
84 | /* Needs an immediate inst. */ | ||
85 | if (((long long)immed) > (long long)-549755813888 && ((long long)immed) < (long long)549755813887) | ||
86 | -- | ||
87 | 2.34.1 | ||
88 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0032-This-patch-will-remove-imml-0-and-imml-1-instruction.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0032-This-patch-will-remove-imml-0-and-imml-1-instruction.patch new file mode 100644 index 00000000..686c8827 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0032-This-patch-will-remove-imml-0-and-imml-1-instruction.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 6e672cb099ae9670a9be1d26e36fa33df5757191 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Thu, 16 Apr 2020 18:08:58 +0530 | ||
4 | Subject: [PATCH 32/53] This patch will remove imml 0 and imml -1 instructions | ||
5 | when the offset is less than 16 bit for Type A branch EA instructions. | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | gas/config/tc-microblaze.c | 6 ++---- | ||
10 | 1 file changed, 2 insertions(+), 4 deletions(-) | ||
11 | |||
12 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
13 | index 651d855c800..ce0d3e26204 100644 | ||
14 | --- a/gas/config/tc-microblaze.c | ||
15 | +++ b/gas/config/tc-microblaze.c | ||
16 | @@ -2129,9 +2129,7 @@ md_assemble (char * str) | ||
17 | if (exp.X_op != O_constant) | ||
18 | { | ||
19 | char *opc; | ||
20 | - if (microblaze_arch_size == 64 && (streq (name, "breai") || | ||
21 | - streq (name, "breaid") || | ||
22 | - streq (name, "brai") || streq (name, "braid"))) | ||
23 | + if (microblaze_arch_size == 64 && (streq (name, "brai") || streq (name, "braid"))) | ||
24 | opc = str_microblaze_64; | ||
25 | else | ||
26 | opc = NULL; | ||
27 | @@ -2707,7 +2705,7 @@ md_apply_fix (fixS * fixP, | ||
28 | case BFD_RELOC_MICROBLAZE_64: | ||
29 | case BFD_RELOC_MICROBLAZE_64_PCREL: | ||
30 | if (fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64 | ||
31 | - || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL) | ||
32 | + || fixP->fx_r_type == BFD_RELOC_MICROBLAZE_64_PCREL || (fixP->fx_r_type == BFD_RELOC_64_PCREL && microblaze_arch_size == 64)) | ||
33 | { | ||
34 | /* Generate the imm instruction. */ | ||
35 | if (((long long)val) > (long long)-549755813888 && ((long long)val) < (long long)549755813887) | ||
36 | -- | ||
37 | 2.34.1 | ||
38 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0033-Changing-the-long-to-long-long-as-in-Windows-long-is.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0033-Changing-the-long-to-long-long-as-in-Windows-long-is.patch new file mode 100644 index 00000000..1dbeaf0e --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0033-Changing-the-long-to-long-long-as-in-Windows-long-is.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 0c29905801152c8b8230bcca00b49b945054586b Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilinx.com> | ||
3 | Date: Tue, 20 Apr 2021 21:22:06 +0530 | ||
4 | Subject: [PATCH 33/53] Changing the long to long long as in Windows long is | ||
5 | 32-bit but we need the variable to be 64-bit | ||
6 | |||
7 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | ||
8 | |||
9 | Conflicts: | ||
10 | gas/config/tc-microblaze.c | ||
11 | |||
12 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
13 | --- | ||
14 | gas/config/tc-microblaze.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
18 | index ce0d3e26204..dc87429a4e8 100644 | ||
19 | --- a/gas/config/tc-microblaze.c | ||
20 | +++ b/gas/config/tc-microblaze.c | ||
21 | @@ -988,7 +988,7 @@ md_assemble (char * str) | ||
22 | unsigned reg2; | ||
23 | unsigned reg3; | ||
24 | unsigned isize; | ||
25 | - unsigned long immed = 0, immed2 = 0, temp; | ||
26 | + unsigned long long immed = 0, immed2 = 0, temp; | ||
27 | expressionS exp,exp1; | ||
28 | char name[20]; | ||
29 | long immedl; | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0034-gas-revert-moving-of-md_pseudo_table-from-const.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0034-gas-revert-moving-of-md_pseudo_table-from-const.patch new file mode 100644 index 00000000..943d3158 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0034-gas-revert-moving-of-md_pseudo_table-from-const.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From ec4fac4177c4364f52d1bc6ba53ffd971323cc22 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 8 Nov 2021 21:57:13 +0530 | ||
4 | Subject: [PATCH 34/53] gas: revert moving of md_pseudo_table from const | ||
5 | |||
6 | The base system expect md_pseudo_table to be constant, Changing the | ||
7 | definition will break other architectures when compiled with a | ||
8 | unified source code. | ||
9 | |||
10 | Patch reverts the change away from const, and implements a newer | ||
11 | dynamic handler that passes the correct argument value based on word | ||
12 | size. | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | ||
15 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
16 | --- | ||
17 | gas/config/tc-microblaze.c | 15 ++++++++++++--- | ||
18 | 1 file changed, 12 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
21 | index dc87429a4e8..faa458af3a0 100644 | ||
22 | --- a/gas/config/tc-microblaze.c | ||
23 | +++ b/gas/config/tc-microblaze.c | ||
24 | @@ -356,6 +356,17 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED) | ||
25 | demand_empty_rest_of_line (); | ||
26 | } | ||
27 | |||
28 | +/* Handle the .gpword pseudo-op, Pass to s_rva */ | ||
29 | + | ||
30 | +static void | ||
31 | +microblaze_s_gpword (int ignore ATTRIBUTE_UNUSED) | ||
32 | +{ | ||
33 | + int size = 4; | ||
34 | + if (microblaze_arch_size == 64) | ||
35 | + size = 8; | ||
36 | + s_rva(size); | ||
37 | +} | ||
38 | + | ||
39 | /* This table describes all the machine specific pseudo-ops the assembler | ||
40 | has to support. The fields are: | ||
41 | Pseudo-op name without dot | ||
42 | @@ -371,7 +382,7 @@ const pseudo_typeS md_pseudo_table[] = | ||
43 | {"data32", cons, 4}, /* Same as word. */ | ||
44 | {"ent", s_func, 0}, /* Treat ent as function entry point. */ | ||
45 | {"end", microblaze_s_func, 1}, /* Treat end as function end point. */ | ||
46 | - {"gpword", s_rva, 4}, /* gpword label => store resolved label address in data section. */ | ||
47 | + {"gpword", microblaze_s_gpword, 0}, /* gpword label => store resolved label address in data section. */ | ||
48 | {"weakext", microblaze_s_weakext, 0}, | ||
49 | {"rodata", microblaze_s_rdata, 0}, | ||
50 | {"sdata2", microblaze_s_rdata, 1}, | ||
51 | @@ -3425,8 +3436,6 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
52 | case OPTION_M64: | ||
53 | //if (arg != NULL && strcmp (arg, "64") == 0) | ||
54 | microblaze_arch_size = 64; | ||
55 | - // UPSTREAM/REVISIT - md_pseudo_table is const | ||
56 | - // md_pseudo_table[7].poc_val = 8; | ||
57 | break; | ||
58 | default: | ||
59 | return 0; | ||
60 | -- | ||
61 | 2.34.1 | ||
62 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch new file mode 100644 index 00000000..c3ff9baf --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 2148cf1617fe1168ea747346d407e2ece94e163a Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 8 Nov 2021 22:01:23 +0530 | ||
4 | Subject: [PATCH 35/53] ld/emulparams/elf64microblaze: Fix emulation generation | ||
5 | |||
6 | Compilation fails when building ld-new with: | ||
7 | |||
8 | ldemul.o:(.data.rel+0x820): undefined reference to `ld_elf64microblazeel_emulation' | ||
9 | ldemul.o:(.data.rel+0x828): undefined reference to `ld_elf64microblaze_emulation' | ||
10 | |||
11 | The error appears to be that the elf64 files were referencing the elf32 emulation. | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | ld/emulparams/elf64microblaze.sh | 2 +- | ||
17 | ld/emulparams/elf64microblazeel.sh | 2 +- | ||
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/ld/emulparams/elf64microblaze.sh b/ld/emulparams/elf64microblaze.sh | ||
21 | index 9c7b0eb7080..7b4c7c411bd 100644 | ||
22 | --- a/ld/emulparams/elf64microblaze.sh | ||
23 | +++ b/ld/emulparams/elf64microblaze.sh | ||
24 | @@ -19,5 +19,5 @@ NOP=0x80000000 | ||
25 | #$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
26 | #OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
27 | |||
28 | -TEMPLATE_NAME=elf32 | ||
29 | +TEMPLATE_NAME=elf | ||
30 | #GENERATE_SHLIB_SCRIPT=yes | ||
31 | diff --git a/ld/emulparams/elf64microblazeel.sh b/ld/emulparams/elf64microblazeel.sh | ||
32 | index 9c7b0eb7080..7b4c7c411bd 100644 | ||
33 | --- a/ld/emulparams/elf64microblazeel.sh | ||
34 | +++ b/ld/emulparams/elf64microblazeel.sh | ||
35 | @@ -19,5 +19,5 @@ NOP=0x80000000 | ||
36 | #$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
37 | #OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
38 | |||
39 | -TEMPLATE_NAME=elf32 | ||
40 | +TEMPLATE_NAME=elf | ||
41 | #GENERATE_SHLIB_SCRIPT=yes | ||
42 | -- | ||
43 | 2.34.1 | ||
44 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch new file mode 100644 index 00000000..fd03fc4c --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From 9d691c146a484002e678babb0d40a9387272cb97 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 24 Jan 2022 16:04:07 +0530 | ||
4 | Subject: [PATCH 36/53] Invalid data offsets (pointer) after relaxation. | ||
5 | Proposed patch from community member (dednev@rambler.ru) against 2021.1 | ||
6 | [CR-1115232] | ||
7 | |||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | bfd/elf32-microblaze.c | 18 ++++++++++++++++++ | ||
11 | 1 file changed, 18 insertions(+) | ||
12 | |||
13 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
14 | index 7e7c4bf471d..0ba7e36aa5f 100644 | ||
15 | --- a/bfd/elf32-microblaze.c | ||
16 | +++ b/bfd/elf32-microblaze.c | ||
17 | @@ -2176,6 +2176,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
18 | { | ||
19 | unsigned int val; | ||
20 | |||
21 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
22 | + continue; | ||
23 | + | ||
24 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
25 | |||
26 | /* hax: We only do the following fixup for debug location lists. */ | ||
27 | @@ -2215,6 +2218,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
28 | } | ||
29 | if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)// || ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
30 | { | ||
31 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
32 | + continue; | ||
33 | + | ||
34 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
35 | |||
36 | /* Look at the reloc only if the value has been resolved. */ | ||
37 | @@ -2247,6 +2253,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
38 | } | ||
39 | else if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_SYM_OP_SYM) | ||
40 | { | ||
41 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
42 | + continue; | ||
43 | + | ||
44 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
45 | |||
46 | /* Look at the reloc only if the value has been resolved. */ | ||
47 | @@ -2284,6 +2293,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
48 | || (ELF32_R_TYPE (irelscan->r_info) | ||
49 | == (int) R_MICROBLAZE_TEXTREL_32_LO)) | ||
50 | { | ||
51 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
52 | + continue; | ||
53 | + | ||
54 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
55 | |||
56 | /* Look at the reloc only if the value has been resolved. */ | ||
57 | @@ -2330,6 +2342,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
58 | || (ELF32_R_TYPE (irelscan->r_info) | ||
59 | == (int) R_MICROBLAZE_TEXTREL_64)) | ||
60 | { | ||
61 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
62 | + continue; | ||
63 | + | ||
64 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
65 | |||
66 | /* Look at the reloc only if the value has been resolved. */ | ||
67 | @@ -2364,6 +2379,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
68 | } | ||
69 | else if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_64_PCREL) | ||
70 | { | ||
71 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
72 | + continue; | ||
73 | + | ||
74 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
75 | |||
76 | /* Look at the reloc only if the value has been resolved. */ | ||
77 | -- | ||
78 | 2.34.1 | ||
79 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch new file mode 100644 index 00000000..2e632939 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | From 36e578efe3e94a6c13b21c364d818d0a8fd675ca Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 24 Jan 2022 16:59:19 +0530 | ||
4 | Subject: [PATCH 37/53] Double free with ld --no-keep-memory. Proposed patches | ||
5 | from the community member (dednev@rambler.ru) for 2021.1. [CR-1115233] | ||
6 | |||
7 | Conflicts: | ||
8 | bfd/elf32-microblaze.c | ||
9 | bfd/elf64-microblaze.c | ||
10 | |||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/elf32-microblaze.c | 40 ++++++++++++++++++++++------------------ | ||
14 | 1 file changed, 22 insertions(+), 18 deletions(-) | ||
15 | |||
16 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
17 | index 0ba7e36aa5f..1ff552a151b 100644 | ||
18 | --- a/bfd/elf32-microblaze.c | ||
19 | +++ b/bfd/elf32-microblaze.c | ||
20 | @@ -1882,10 +1882,8 @@ microblaze_elf_relax_section (bfd *abfd, | ||
21 | { | ||
22 | Elf_Internal_Shdr *symtab_hdr; | ||
23 | Elf_Internal_Rela *internal_relocs; | ||
24 | - Elf_Internal_Rela *free_relocs = NULL; | ||
25 | Elf_Internal_Rela *irel, *irelend; | ||
26 | bfd_byte *contents = NULL; | ||
27 | - bfd_byte *free_contents = NULL; | ||
28 | int rel_count; | ||
29 | unsigned int shndx; | ||
30 | size_t i, sym_index; | ||
31 | @@ -1929,8 +1927,6 @@ microblaze_elf_relax_section (bfd *abfd, | ||
32 | internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, link_info->keep_memory); | ||
33 | if (internal_relocs == NULL) | ||
34 | goto error_return; | ||
35 | - if (! link_info->keep_memory) | ||
36 | - free_relocs = internal_relocs; | ||
37 | |||
38 | sdata->relax_count = 0; | ||
39 | sdata->relax = (struct relax_table *) bfd_malloc ((sec->reloc_count + 1) | ||
40 | @@ -1958,7 +1954,6 @@ microblaze_elf_relax_section (bfd *abfd, | ||
41 | contents = (bfd_byte *) bfd_malloc (sec->size); | ||
42 | if (contents == NULL) | ||
43 | goto error_return; | ||
44 | - free_contents = contents; | ||
45 | |||
46 | if (!bfd_get_section_contents (abfd, sec, contents, | ||
47 | (file_ptr) 0, sec->size)) | ||
48 | @@ -2475,25 +2470,26 @@ microblaze_elf_relax_section (bfd *abfd, | ||
49 | } | ||
50 | |||
51 | elf_section_data (sec)->relocs = internal_relocs; | ||
52 | - free_relocs = NULL; | ||
53 | |||
54 | elf_section_data (sec)->this_hdr.contents = contents; | ||
55 | - free_contents = NULL; | ||
56 | |||
57 | symtab_hdr->contents = (bfd_byte *) isymbuf; | ||
58 | } | ||
59 | |||
60 | - free (free_relocs); | ||
61 | - free_relocs = NULL; | ||
62 | + if (internal_relocs != NULL | ||
63 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
64 | + free (internal_relocs); | ||
65 | |||
66 | - if (free_contents != NULL) | ||
67 | - { | ||
68 | - if (!link_info->keep_memory) | ||
69 | - free (free_contents); | ||
70 | + if (contents != NULL | ||
71 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
72 | + { | ||
73 | + if (! link_info->keep_memory) | ||
74 | + free (contents); | ||
75 | else | ||
76 | - /* Cache the section contents for elf_link_input_bfd. */ | ||
77 | - elf_section_data (sec)->this_hdr.contents = contents; | ||
78 | - free_contents = NULL; | ||
79 | + { | ||
80 | + /* Cache the section contents for elf_link_input_bfd. */ | ||
81 | + elf_section_data (sec)->this_hdr.contents = contents; | ||
82 | + } | ||
83 | } | ||
84 | |||
85 | if (sdata->relax_count == 0) | ||
86 | @@ -2507,8 +2503,16 @@ microblaze_elf_relax_section (bfd *abfd, | ||
87 | return true; | ||
88 | |||
89 | error_return: | ||
90 | - free (free_relocs); | ||
91 | - free (free_contents); | ||
92 | + | ||
93 | + if (isymbuf != NULL | ||
94 | + && symtab_hdr->contents != (unsigned char *) isymbuf) | ||
95 | + free (isymbuf); | ||
96 | + if (internal_relocs != NULL | ||
97 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
98 | + free (internal_relocs); | ||
99 | + if (contents != NULL | ||
100 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
101 | + free (contents); | ||
102 | free (sdata->relax); | ||
103 | sdata->relax = NULL; | ||
104 | sdata->relax_count = 0; | ||
105 | -- | ||
106 | 2.34.1 | ||
107 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0038-MB-binutils-Upstream-port-issues.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0038-MB-binutils-Upstream-port-issues.patch new file mode 100644 index 00000000..cfa1a49e --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0038-MB-binutils-Upstream-port-issues.patch | |||
@@ -0,0 +1,99 @@ | |||
1 | From b960fb122b35cb327b9db8fd1bb835899b24d106 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Sun, 28 Nov 2021 17:17:15 +0530 | ||
4 | Subject: [PATCH 38/53] MB binutils Upstream port issues. | ||
5 | |||
6 | It's resolving the seg faults with ADDLIK | ||
7 | Conflicts: | ||
8 | bfd/elf64-microblaze.c | ||
9 | |||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | gas/config/tc-microblaze.c | 2 +- | ||
13 | opcodes/microblaze-dis.c | 12 ++++++------ | ||
14 | opcodes/microblaze-opc.h | 2 +- | ||
15 | 3 files changed, 8 insertions(+), 8 deletions(-) | ||
16 | |||
17 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
18 | index faa458af3a0..686b1a00177 100644 | ||
19 | --- a/gas/config/tc-microblaze.c | ||
20 | +++ b/gas/config/tc-microblaze.c | ||
21 | @@ -404,7 +404,7 @@ const pseudo_typeS md_pseudo_table[] = | ||
22 | void | ||
23 | md_begin (void) | ||
24 | { | ||
25 | - const struct op_code_struct * opcode; | ||
26 | + struct op_code_struct * opcode; | ||
27 | const char *prev_name = ""; | ||
28 | |||
29 | opcode_hash_control = str_htab_create (); | ||
30 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
31 | index bdc6db79726..d61d6bcfeba 100644 | ||
32 | --- a/opcodes/microblaze-dis.c | ||
33 | +++ b/opcodes/microblaze-dis.c | ||
34 | @@ -153,7 +153,7 @@ get_field_imm16 (struct string_buf *buf, long instr) | ||
35 | |||
36 | static char * | ||
37 | get_field_special (struct string_buf *buf, long instr, | ||
38 | - const struct op_code_struct *op) | ||
39 | + struct op_code_struct *op) | ||
40 | { | ||
41 | char *p = strbuf (buf); | ||
42 | char *spr; | ||
43 | @@ -226,11 +226,11 @@ get_field_special (struct string_buf *buf, long instr, | ||
44 | static unsigned long | ||
45 | read_insn_microblaze (bfd_vma memaddr, | ||
46 | struct disassemble_info *info, | ||
47 | - const struct op_code_struct **opr) | ||
48 | + struct op_code_struct **opr) | ||
49 | { | ||
50 | unsigned char ibytes[4]; | ||
51 | int status; | ||
52 | - const struct op_code_struct *op; | ||
53 | + struct op_code_struct *op; | ||
54 | unsigned long inst; | ||
55 | |||
56 | status = info->read_memory_func (memaddr, ibytes, 4, info); | ||
57 | @@ -266,7 +266,7 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
58 | fprintf_ftype print_func = info->fprintf_func; | ||
59 | void *stream = info->stream; | ||
60 | unsigned long inst, prev_inst; | ||
61 | - const struct op_code_struct *op, *pop; | ||
62 | + struct op_code_struct *op, *pop; | ||
63 | int immval = 0; | ||
64 | bool immfound = false; | ||
65 | static bfd_vma prev_insn_addr = -1; /* Init the prev insn addr. */ | ||
66 | @@ -518,7 +518,7 @@ get_insn_microblaze (long inst, | ||
67 | enum microblaze_instr_type *insn_type, | ||
68 | short *delay_slots) | ||
69 | { | ||
70 | - const struct op_code_struct *op; | ||
71 | + struct op_code_struct *op; | ||
72 | *isunsignedimm = false; | ||
73 | |||
74 | /* Just a linear search of the table. */ | ||
75 | @@ -560,7 +560,7 @@ microblaze_get_target_address (long inst, bool immfound, int immval, | ||
76 | bool *targetvalid, | ||
77 | bool *unconditionalbranch) | ||
78 | { | ||
79 | - const struct op_code_struct *op; | ||
80 | + struct op_code_struct *op; | ||
81 | long targetaddr = 0; | ||
82 | |||
83 | *unconditionalbranch = false; | ||
84 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
85 | index f46fc76a94a..9f6d5456701 100644 | ||
86 | --- a/opcodes/microblaze-opc.h | ||
87 | +++ b/opcodes/microblaze-opc.h | ||
88 | @@ -153,7 +153,7 @@ | ||
89 | |||
90 | #define MAX_OPCODES 424 | ||
91 | |||
92 | -const struct op_code_struct | ||
93 | +struct op_code_struct | ||
94 | { | ||
95 | const char * name; | ||
96 | short inst_type; /* Registers and immediate values involved. */ | ||
97 | -- | ||
98 | 2.34.1 | ||
99 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0039-Initial-port-of-core-reading-support-Added-support-f.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0039-Initial-port-of-core-reading-support-Added-support-f.patch new file mode 100644 index 00000000..06fefe2f --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0039-Initial-port-of-core-reading-support-Added-support-f.patch | |||
@@ -0,0 +1,89 @@ | |||
1 | From ac87f4a6b9e35083a0403f188b61a317b53cfdbc Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 16:37:53 +0530 | ||
4 | Subject: [PATCH 39/53] Initial port of core reading support Added support for | ||
5 | reading notes in linux core dumps Support for reading of PRSTATUS and PSINFO | ||
6 | information for rebuilding ".reg" sections of core dumps at run time. | ||
7 | |||
8 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
9 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
10 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | gdb/microblaze-linux-tdep.c | 11 +++++++++++ | ||
14 | gdb/microblaze-tdep.c | 37 +++++++++++++++++++++++++++++++++++++ | ||
15 | 2 files changed, 48 insertions(+) | ||
16 | |||
17 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
18 | index f34b0fa9fd4..babc9020f0f 100644 | ||
19 | --- a/gdb/microblaze-linux-tdep.c | ||
20 | +++ b/gdb/microblaze-linux-tdep.c | ||
21 | @@ -193,6 +193,17 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
22 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
23 | set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); | ||
24 | |||
25 | + /* BFD target for core files. */ | ||
26 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
27 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
28 | + else | ||
29 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
30 | + | ||
31 | + | ||
32 | + /* Shared library handling. */ | ||
33 | + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
34 | + set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); | ||
35 | + | ||
36 | /* Enable TLS support. */ | ||
37 | set_gdbarch_fetch_tls_load_module_address (gdbarch, | ||
38 | svr4_fetch_objfile_link_map); | ||
39 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
40 | index f9cb3dfda33..fdea9721b17 100644 | ||
41 | --- a/gdb/microblaze-tdep.c | ||
42 | +++ b/gdb/microblaze-tdep.c | ||
43 | @@ -957,6 +957,43 @@ make_regs (struct gdbarch *arch) | ||
44 | } | ||
45 | #endif | ||
46 | |||
47 | +void | ||
48 | +microblaze_supply_gregset (const struct regset *regset, | ||
49 | + struct regcache *regcache, | ||
50 | + int regnum, const void *gregs) | ||
51 | +{ | ||
52 | + const unsigned int *regs = (const unsigned int *)gregs; | ||
53 | + if (regnum >= 0) | ||
54 | + regcache->raw_supply (regnum, regs + regnum); | ||
55 | + | ||
56 | + if (regnum == -1) { | ||
57 | + int i; | ||
58 | + | ||
59 | + for (i = 0; i < 50; i++) { | ||
60 | + regcache->raw_supply (i, regs + i); | ||
61 | + } | ||
62 | + } | ||
63 | +} | ||
64 | + | ||
65 | + | ||
66 | +/* Return the appropriate register set for the core section identified | ||
67 | + by SECT_NAME and SECT_SIZE. */ | ||
68 | + | ||
69 | +static void | ||
70 | +microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
71 | + iterate_over_regset_sections_cb *cb, | ||
72 | + void *cb_data, | ||
73 | + const struct regcache *regcache) | ||
74 | +{ | ||
75 | + struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
76 | + | ||
77 | + cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
78 | + | ||
79 | + cb(".reg2", tdep->sizeof_fpregset, tdep->sizeof_fpregset, tdep->fpregset, NULL, cb_data); | ||
80 | +} | ||
81 | + | ||
82 | + | ||
83 | + | ||
84 | static struct gdbarch * | ||
85 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
86 | { | ||
87 | -- | ||
88 | 2.34.1 | ||
89 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch new file mode 100644 index 00000000..85ae3f02 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch | |||
@@ -0,0 +1,185 @@ | |||
1 | From fc4d292d4154cad199cbe1635790867c98a84fc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 14 Mar 2024 10:41:33 +0530 | ||
4 | Subject: [PATCH 40/53] Fix build issues after Xilinx 2023.2 binutils merge | ||
5 | |||
6 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/bfd-in2.h | 10 ------ | ||
10 | gdb/microblaze-tdep.c | 71 ++++++++++++++-------------------------- | ||
11 | opcodes/microblaze-dis.c | 10 ------ | ||
12 | 3 files changed, 25 insertions(+), 66 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
15 | index 8b2815d7303..cfab5c99b76 100644 | ||
16 | --- a/bfd/bfd-in2.h | ||
17 | +++ b/bfd/bfd-in2.h | ||
18 | @@ -6456,11 +6456,6 @@ done here - only used for relaxing */ | ||
19 | * +done here - only used for relaxing */ | ||
20 | BFD_RELOC_MICROBLAZE_64_PCREL, | ||
21 | |||
22 | -/* This is a 64 bit reloc that stores the 32 bit relative | ||
23 | - * +value in two words (with an imml instruction). No relocation is | ||
24 | - * +done here - only used for relaxing */ | ||
25 | - BFD_RELOC_MICROBLAZE_64, | ||
26 | - | ||
27 | /* This is a 64 bit reloc that stores the 32 bit relative | ||
28 | * +value in two words (with an imml instruction). No relocation is | ||
29 | * +done here - only used for relaxing */ | ||
30 | @@ -6486,11 +6481,6 @@ value in two words (with an imml instruction). The relocation is | ||
31 | PC-relative GOT offset */ | ||
32 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
33 | |||
34 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
35 | -value in two words (with an imml instruction). The relocation is | ||
36 | -PC-relative GOT offset */ | ||
37 | - BFD_RELOC_MICROBLAZE_64_GPC, | ||
38 | - | ||
39 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
40 | value in two words (with an imm instruction). The relocation is | ||
41 | GOT offset */ | ||
42 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
43 | index fdea9721b17..d83e508b82b 100644 | ||
44 | --- a/gdb/microblaze-tdep.c | ||
45 | +++ b/gdb/microblaze-tdep.c | ||
46 | @@ -70,6 +70,7 @@ static const char *microblaze_abi_string; | ||
47 | static const char *const microblaze_abi_strings[] = { | ||
48 | "auto", | ||
49 | "m64", | ||
50 | + NULL | ||
51 | }; | ||
52 | |||
53 | enum microblaze_abi | ||
54 | @@ -105,7 +106,7 @@ global_microblaze_abi (void) | ||
55 | if (microblaze_abi_strings[i] == microblaze_abi_string) | ||
56 | return (enum microblaze_abi) i; | ||
57 | |||
58 | -// internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
59 | + internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
60 | } | ||
61 | |||
62 | static void | ||
63 | @@ -894,16 +895,31 @@ microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) | ||
64 | } | ||
65 | |||
66 | static void | ||
67 | -microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
68 | +microblaze_register_g_packet_guesses (struct gdbarch *gdbarch, enum microblaze_abi abi) | ||
69 | { | ||
70 | |||
71 | - register_remote_g_packet_guess (gdbarch, | ||
72 | - 4 * MICROBLAZE_NUM_CORE_REGS, | ||
73 | - tdesc_microblaze64); | ||
74 | + if (abi == MICROBLAZE_ABI_M64) | ||
75 | + { | ||
76 | + | ||
77 | + register_remote_g_packet_guess (gdbarch, | ||
78 | + 8 * MICROBLAZE_NUM_CORE_REGS, | ||
79 | + tdesc_microblaze64); | ||
80 | + | ||
81 | + register_remote_g_packet_guess (gdbarch, | ||
82 | + 8 * MICROBLAZE_NUM_REGS, | ||
83 | + tdesc_microblaze64_with_stack_protect); | ||
84 | + } | ||
85 | + else | ||
86 | + { | ||
87 | + | ||
88 | + register_remote_g_packet_guess (gdbarch, | ||
89 | + 4 * MICROBLAZE_NUM_CORE_REGS, | ||
90 | + tdesc_microblaze); | ||
91 | |||
92 | - register_remote_g_packet_guess (gdbarch, | ||
93 | - 4 * MICROBLAZE_NUM_REGS, | ||
94 | - tdesc_microblaze64_with_stack_protect); | ||
95 | + register_remote_g_packet_guess (gdbarch, | ||
96 | + 4 * MICROBLAZE_NUM_REGS, | ||
97 | + tdesc_microblaze_with_stack_protect); | ||
98 | + } | ||
99 | } | ||
100 | |||
101 | void | ||
102 | @@ -957,43 +973,6 @@ make_regs (struct gdbarch *arch) | ||
103 | } | ||
104 | #endif | ||
105 | |||
106 | -void | ||
107 | -microblaze_supply_gregset (const struct regset *regset, | ||
108 | - struct regcache *regcache, | ||
109 | - int regnum, const void *gregs) | ||
110 | -{ | ||
111 | - const unsigned int *regs = (const unsigned int *)gregs; | ||
112 | - if (regnum >= 0) | ||
113 | - regcache->raw_supply (regnum, regs + regnum); | ||
114 | - | ||
115 | - if (regnum == -1) { | ||
116 | - int i; | ||
117 | - | ||
118 | - for (i = 0; i < 50; i++) { | ||
119 | - regcache->raw_supply (i, regs + i); | ||
120 | - } | ||
121 | - } | ||
122 | -} | ||
123 | - | ||
124 | - | ||
125 | -/* Return the appropriate register set for the core section identified | ||
126 | - by SECT_NAME and SECT_SIZE. */ | ||
127 | - | ||
128 | -static void | ||
129 | -microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
130 | - iterate_over_regset_sections_cb *cb, | ||
131 | - void *cb_data, | ||
132 | - const struct regcache *regcache) | ||
133 | -{ | ||
134 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
135 | - | ||
136 | - cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
137 | - | ||
138 | - cb(".reg2", tdep->sizeof_fpregset, tdep->sizeof_fpregset, tdep->fpregset, NULL, cb_data); | ||
139 | -} | ||
140 | - | ||
141 | - | ||
142 | - | ||
143 | static struct gdbarch * | ||
144 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
145 | { | ||
146 | @@ -1134,7 +1113,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
147 | |||
148 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | ||
149 | |||
150 | - //microblaze_register_g_packet_guesses (gdbarch); | ||
151 | + // microblaze_register_g_packet_guesses (gdbarch, microblaze_abi); | ||
152 | |||
153 | frame_base_set_default (gdbarch, µblaze_frame_base); | ||
154 | |||
155 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
156 | index d61d6bcfeba..692c977ac00 100644 | ||
157 | --- a/opcodes/microblaze-dis.c | ||
158 | +++ b/opcodes/microblaze-dis.c | ||
159 | @@ -466,10 +466,6 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
160 | print_func (stream, "\t%s, %s", get_field_r1 (&buf, inst), | ||
161 | get_field_r2 (&buf, inst)); | ||
162 | break; | ||
163 | - case INST_TYPE_IMML: | ||
164 | - print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
165 | - /* TODO: Also print symbol */ | ||
166 | - break; | ||
167 | case INST_TYPE_RD_IMM15: | ||
168 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
169 | get_field_imm15 (&buf, inst)); | ||
170 | @@ -484,12 +480,6 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
171 | case INST_TYPE_RD_IMML: | ||
172 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
173 | break; | ||
174 | - /* For bit field insns. */ | ||
175 | - case INST_TYPE_RD_R1_IMMW_IMMS: | ||
176 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
177 | - get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
178 | - break; | ||
179 | - /* For bit field insns. */ | ||
180 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
181 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
182 | break; | ||
183 | -- | ||
184 | 2.34.1 | ||
185 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0041-disable-truncated-register-warning-gdb-remote.c.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0041-disable-truncated-register-warning-gdb-remote.c.patch new file mode 100644 index 00000000..5a7e4dc3 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0041-disable-truncated-register-warning-gdb-remote.c.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 0dc1b1aebeba31dff808a20fcc6444c9acfb99a3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 14 Mar 2024 15:44:56 +0530 | ||
4 | Subject: [PATCH 41/53] disable truncated register warning (gdb/remote.c) | ||
5 | |||
6 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
7 | --- | ||
8 | gdb/remote.c | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/gdb/remote.c b/gdb/remote.c | ||
12 | index 72f14e28f54..cb99e5bc7b1 100644 | ||
13 | --- a/gdb/remote.c | ||
14 | +++ b/gdb/remote.c | ||
15 | @@ -8857,7 +8857,7 @@ remote_target::process_g_packet (struct regcache *regcache) | ||
16 | if (rsa->regs[i].pnum == -1) | ||
17 | continue; | ||
18 | |||
19 | - if (offset >= sizeof_g_packet) | ||
20 | + if (offset >= sizeof_g_packet || (offset + reg_size > sizeof_g_packet)) | ||
21 | rsa->regs[i].in_g_packet = 0; | ||
22 | else if (offset + reg_size > sizeof_g_packet) | ||
23 | error (_("Truncated register %d in remote 'g' packet"), i); | ||
24 | -- | ||
25 | 2.34.1 | ||
26 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch new file mode 100644 index 00000000..88aefa2f --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 81f86c3d6f787a9694e1c95625736f7c921b74df Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 10:20:48 +0530 | ||
4 | Subject: [PATCH 42/53] Fix unresolved conflicts from binutils_2_42_merge | ||
5 | |||
6 | opcodes/microblaze-dis.c | ||
7 | |||
8 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | opcodes/microblaze-dis.c | 15 ++++++++++----- | ||
12 | 1 file changed, 10 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
15 | index 692c977ac00..912fa31be79 100644 | ||
16 | --- a/opcodes/microblaze-dis.c | ||
17 | +++ b/opcodes/microblaze-dis.c | ||
18 | @@ -478,11 +478,16 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
19 | case INST_TYPE_NONE: | ||
20 | break; | ||
21 | case INST_TYPE_RD_IMML: | ||
22 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
23 | - break; | ||
24 | - case INST_TYPE_RD_R1_IMMW_IMMS: | ||
25 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
26 | - break; | ||
27 | + print_func (stream, "\t%s, %s", | ||
28 | + get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
29 | + break; | ||
30 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
31 | + print_func (stream, "\t%s, %s, %s, %s", | ||
32 | + get_field_rd (&buf, inst), | ||
33 | + get_field_r1(&buf, inst), | ||
34 | + get_field_immw (&buf, inst), | ||
35 | + get_field_imms (&buf, inst)); | ||
36 | + break; | ||
37 | /* For tuqula instruction */ | ||
38 | case INST_TYPE_RD: | ||
39 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch new file mode 100644 index 00000000..c5fa72d8 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch | |||
@@ -0,0 +1,177 @@ | |||
1 | From a949ac58b5a3e6cbef03fc431f64052827fc9640 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 10:59:40 +0530 | ||
4 | Subject: [PATCH 43/53] microblaze_gdbarch_init: set microblaze_abi based on | ||
5 | wanted_abi and found_abi | ||
6 | |||
7 | Earlier found_abi was declared but not set, instead gdbarch_info info | ||
8 | was checked every time. Also, microblaze_abi remained undefined for 32-bit | ||
9 | machines. As a result, gdb would show 64-bit registers when connecting | ||
10 | to 32-bit targets with all register values garbled (r5 ended up in r2). | ||
11 | This defect is fixed. found_abi is set from gdbarch_info, microblaze_abi | ||
12 | is set based on wanted_abi and found_abi. Now upon connecting to a 32-bit | ||
13 | remote target (mb-qemu) registers have the correct 32-bit size. | ||
14 | |||
15 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
16 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
17 | --- | ||
18 | gdb/microblaze-tdep.c | 73 +++++++++++++++++++------------------------ | ||
19 | 1 file changed, 33 insertions(+), 40 deletions(-) | ||
20 | |||
21 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
22 | index d83e508b82b..6dcdeee76b3 100644 | ||
23 | --- a/gdb/microblaze-tdep.c | ||
24 | +++ b/gdb/microblaze-tdep.c | ||
25 | @@ -116,7 +116,7 @@ show_microblaze_abi (struct ui_file *file, | ||
26 | const char *ignored_value) | ||
27 | { | ||
28 | enum microblaze_abi global_abi = global_microblaze_abi (); | ||
29 | - enum microblaze_abi actual_abi = microblaze_abi (target_gdbarch ()); | ||
30 | + enum microblaze_abi actual_abi = microblaze_abi (current_inferior ()->arch ()); | ||
31 | const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
32 | |||
33 | #if 1 | ||
34 | @@ -203,6 +203,13 @@ microblaze_register_name (struct gdbarch *gdbarch, int regnum) | ||
35 | static struct type * | ||
36 | microblaze_register_type (struct gdbarch *gdbarch, int regnum) | ||
37 | { | ||
38 | + | ||
39 | + int mb_reg_size = microblaze_abi_regsize(gdbarch); | ||
40 | + | ||
41 | + if (gdbarch_debug) | ||
42 | + gdb_printf (gdb_stdlog, "microblaze_register_type: reg_size = %d\n", | ||
43 | + mb_reg_size); | ||
44 | + | ||
45 | if (regnum == MICROBLAZE_SP_REGNUM) | ||
46 | return builtin_type (gdbarch)->builtin_data_ptr; | ||
47 | |||
48 | @@ -980,34 +987,38 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
49 | enum microblaze_abi microblaze_abi, found_abi, wanted_abi; | ||
50 | const struct target_desc *tdesc = info.target_desc; | ||
51 | |||
52 | + /* If there is already a candidate, use it. */ | ||
53 | + arches = gdbarch_list_lookup_by_info (arches, &info); | ||
54 | + if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
55 | + return arches->gdbarch; | ||
56 | + | ||
57 | /* What has the user specified from the command line? */ | ||
58 | wanted_abi = global_microblaze_abi (); | ||
59 | if (gdbarch_debug) | ||
60 | gdb_printf (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
61 | wanted_abi); | ||
62 | + | ||
63 | + found_abi = MICROBLAZE_ABI_AUTO; | ||
64 | + | ||
65 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
66 | + found_abi = MICROBLAZE_ABI_M64; | ||
67 | + | ||
68 | if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
69 | microblaze_abi = wanted_abi; | ||
70 | - | ||
71 | - /* If there is already a candidate, use it. */ | ||
72 | - arches = gdbarch_list_lookup_by_info (arches, &info); | ||
73 | - if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
74 | - return arches->gdbarch; | ||
75 | + else | ||
76 | + microblaze_abi = found_abi; | ||
77 | |||
78 | if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
79 | { | ||
80 | - tdesc = tdesc_microblaze64; | ||
81 | - reg_size = 8; | ||
82 | + tdesc = tdesc_microblaze64; | ||
83 | + reg_size = 8; | ||
84 | } | ||
85 | - if (tdesc == NULL) | ||
86 | + else | ||
87 | { | ||
88 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
89 | - { | ||
90 | - tdesc = tdesc_microblaze64; | ||
91 | - reg_size = 8; | ||
92 | - } | ||
93 | - else | ||
94 | - tdesc = tdesc_microblaze; | ||
95 | + tdesc = tdesc_microblaze; | ||
96 | + reg_size = 4; | ||
97 | } | ||
98 | + | ||
99 | /* Check any target description for validity. */ | ||
100 | if (tdesc_has_registers (tdesc)) | ||
101 | { | ||
102 | @@ -1015,7 +1026,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
103 | int valid_p; | ||
104 | int i; | ||
105 | |||
106 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
107 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
108 | feature = tdesc_find_feature (tdesc, | ||
109 | "org.gnu.gdb.microblaze64.core"); | ||
110 | else | ||
111 | @@ -1029,7 +1040,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
112 | for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
113 | valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
114 | microblaze_register_names[i]); | ||
115 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
116 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
117 | feature = tdesc_find_feature (tdesc, | ||
118 | "org.gnu.gdb.microblaze64.stack-protect"); | ||
119 | else | ||
120 | @@ -1075,15 +1086,11 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
121 | |||
122 | /* Register set. | ||
123 | make_regs (gdbarch); */ | ||
124 | - switch (info.bfd_arch_info->mach) | ||
125 | - { | ||
126 | - case bfd_mach_microblaze64: | ||
127 | - set_gdbarch_ptr_bit (gdbarch, 64); | ||
128 | - break; | ||
129 | - } | ||
130 | - if(microblaze_abi == MICROBLAZE_ABI_M64) | ||
131 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
132 | set_gdbarch_ptr_bit (gdbarch, 64); | ||
133 | - | ||
134 | + else | ||
135 | + set_gdbarch_ptr_bit (gdbarch, 32); | ||
136 | + | ||
137 | /* Map Dwarf2 registers to GDB registers. */ | ||
138 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
139 | |||
140 | @@ -1105,8 +1112,6 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
141 | microblaze_breakpoint::bp_from_kind); | ||
142 | // set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
143 | |||
144 | -// set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
145 | - | ||
146 | set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
147 | |||
148 | set_gdbarch_frame_args_skip (gdbarch, 8); | ||
149 | @@ -1145,9 +1150,6 @@ _initialize_microblaze_tdep () | ||
150 | |||
151 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
152 | |||
153 | -// static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
154 | -// static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
155 | - | ||
156 | /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
157 | |||
158 | add_setshow_prefix_cmd ("microblaze", no_class, | ||
159 | @@ -1155,15 +1157,6 @@ _initialize_microblaze_tdep () | ||
160 | _("Various microblaze specific commands."), | ||
161 | &setmicroblazecmdlist,&showmicroblazecmdlist, | ||
162 | &setlist,&showlist); | ||
163 | -#if 0 | ||
164 | - add_prefix_cmd ("microblaze", no_class, set_microblaze_command, | ||
165 | - _("Various microblaze specific commands."), | ||
166 | - &setmicroblazecmdlist, "set microblaze ", 0, &setlist); | ||
167 | - | ||
168 | - add_prefix_cmd ("microblaze", no_class, show_microblaze_command, | ||
169 | - _("Various microblaze specific commands."), | ||
170 | - &showmicroblazecmdlist, "show microblaze ", 0, &showlist); | ||
171 | -#endif | ||
172 | |||
173 | /* Allow the user to override the ABI. */ | ||
174 | add_setshow_enum_cmd ("abi", class_obscure, microblaze_abi_strings, | ||
175 | -- | ||
176 | 2.34.1 | ||
177 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch new file mode 100644 index 00000000..a22fdb26 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 70d94c8a627a91b7a59d99abf5c137f650a687d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 11:36:32 +0530 | ||
4 | Subject: [PATCH 44/53] Start bfd_mach_microblaze values from 0 (0,1) instead | ||
5 | of (1,2) | ||
6 | |||
7 | Before 64-bit support there was only bfd_mach_microblaze (implicitly set to 0), | ||
8 | setting microblaze_mach_microblaze64 to 1 | ||
9 | |||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | bfd/archures.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/bfd/archures.c b/bfd/archures.c | ||
16 | index b9db26627ea..604e65b7256 100644 | ||
17 | --- a/bfd/archures.c | ||
18 | +++ b/bfd/archures.c | ||
19 | @@ -515,8 +515,8 @@ DESCRIPTION | ||
20 | . bfd_arch_lm32, {* Lattice Mico32. *} | ||
21 | .#define bfd_mach_lm32 1 | ||
22 | . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} | ||
23 | -.#define bfd_mach_microblaze 1 | ||
24 | -.#define bfd_mach_microblaze64 2 | ||
25 | +.#define bfd_mach_microblaze 0 | ||
26 | +.#define bfd_mach_microblaze64 1 | ||
27 | . bfd_arch_kvx, {* Kalray VLIW core of the MPPA processor family *} | ||
28 | .#define bfd_mach_kv3_unknown 0 | ||
29 | .#define bfd_mach_kv3_1 1 | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch new file mode 100644 index 00000000..a9f96637 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From 8fd6902a818f28422bd98b18ff3f0fe9b872e5cf Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 15:37:11 +0530 | ||
4 | Subject: [PATCH 45/53] Fix build issues - bfd/reloc.c add missing relocs used | ||
5 | elsewhere | ||
6 | |||
7 | BFD_RELOC_MICROBLAZE_EA64 | ||
8 | BFD_RELOC_MICROBLAZE_64_GPC | ||
9 | |||
10 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/reloc.c | 16 +++++++++++----- | ||
14 | 1 file changed, 11 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
17 | index b6c9c22a0be..86ca1283582 100644 | ||
18 | --- a/bfd/reloc.c | ||
19 | +++ b/bfd/reloc.c | ||
20 | @@ -6637,13 +6637,19 @@ ENUMDOC | ||
21 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
22 | to two words (uses imml instruction). | ||
23 | ENUM | ||
24 | -BFD_RELOC_MICROBLAZE_64, | ||
25 | +BFD_RELOC_MICROBLAZE_64 | ||
26 | ENUMDOC | ||
27 | This is a 64 bit reloc that stores the 64 bit pc relative | ||
28 | value in two words (with an imml instruction). No relocation is | ||
29 | done here - only used for relaxing | ||
30 | ENUM | ||
31 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
32 | +BFD_RELOC_MICROBLAZE_EA64 | ||
33 | +ENUMDOC | ||
34 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
35 | + value in two words (with an imml instruction). No relocation is | ||
36 | + done here - only used for relaxing | ||
37 | +ENUM | ||
38 | +BFD_RELOC_MICROBLAZE_64_PCREL | ||
39 | ENUMDOC | ||
40 | This is a 32 bit reloc that stores the 32 bit pc relative | ||
41 | value in two words (with an imml instruction). No relocation is | ||
42 | @@ -6686,13 +6692,13 @@ ENUMDOC | ||
43 | two words (with an imm instruction). No relocation is done here - | ||
44 | only used for relaxing. | ||
45 | ENUM | ||
46 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
47 | +BFD_RELOC_MICROBLAZE_64_GOTPC | ||
48 | ENUMDOC | ||
49 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
50 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
51 | value in two words (with an imml instruction). No relocation is | ||
52 | done here - only used for relaxing | ||
53 | ENUM | ||
54 | - BFD_RELOC_MICROBLAZE_64_GOTPC | ||
55 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
56 | ENUMDOC | ||
57 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
58 | value in two words (with an imml instruction). No relocation is | ||
59 | -- | ||
60 | 2.34.1 | ||
61 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch new file mode 100644 index 00000000..3e6be541 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From 84bb72aa81dddd5f21ac49ddf7b38bce74942cdf Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 15:47:56 +0530 | ||
4 | Subject: [PATCH 46/53] Regenerate - bfd/bfd-in2.h bfd/libbfd.h | ||
5 | |||
6 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/bfd-in2.h | 70 +++++++++++++++++++++++++-------------------------- | ||
10 | 1 file changed, 35 insertions(+), 35 deletions(-) | ||
11 | |||
12 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
13 | index cfab5c99b76..96949605e50 100644 | ||
14 | --- a/bfd/bfd-in2.h | ||
15 | +++ b/bfd/bfd-in2.h | ||
16 | @@ -1771,8 +1771,8 @@ enum bfd_architecture | ||
17 | bfd_arch_lm32, /* Lattice Mico32. */ | ||
18 | #define bfd_mach_lm32 1 | ||
19 | bfd_arch_microblaze,/* Xilinx MicroBlaze. */ | ||
20 | -#define bfd_mach_microblaze 1 | ||
21 | -#define bfd_mach_microblaze64 2 | ||
22 | +#define bfd_mach_microblaze 0 | ||
23 | +#define bfd_mach_microblaze64 1 | ||
24 | bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ | ||
25 | #define bfd_mach_kv3_unknown 0 | ||
26 | #define bfd_mach_kv3_1 1 | ||
27 | @@ -6426,8 +6426,23 @@ enum bfd_reloc_code_real | ||
28 | /* Address of a GOT entry. */ | ||
29 | BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, | ||
30 | |||
31 | - /* This is a 32 bit reloc for the microblaze that stores the low 16 | ||
32 | - bits of a value. */ | ||
33 | + /* This is a 64 bit reloc that stores the 64 bit pc relative | ||
34 | + value in two words (with an imml instruction). No relocation is | ||
35 | + done here - only used for relaxing */ | ||
36 | + BFD_RELOC_MICROBLAZE_64, | ||
37 | + | ||
38 | + /* This is a 64 bit reloc that stores the 64 bit pc relative | ||
39 | + value in two words (with an imml instruction). No relocation is | ||
40 | + done here - only used for relaxing */ | ||
41 | + BFD_RELOC_MICROBLAZE_EA64, | ||
42 | + | ||
43 | + /* This is a 32 bit reloc that stores the 32 bit pc relative | ||
44 | + value in two words (with an imml instruction). No relocation is | ||
45 | + done here - only used for relaxing */ | ||
46 | + BFD_RELOC_MICROBLAZE_64_PCREL, | ||
47 | + | ||
48 | + /* This is a 32 bit reloc for the microblaze that stores the | ||
49 | + low 16 bits of a value */ | ||
50 | BFD_RELOC_MICROBLAZE_32_LO, | ||
51 | |||
52 | /* This is a 32 bit pc-relative reloc for the microblaze that stores | ||
53 | @@ -6446,44 +6461,29 @@ enum bfd_reloc_code_real | ||
54 | the form "Symbol Op Symbol". */ | ||
55 | BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, | ||
56 | |||
57 | -/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
58 | -value in two words (with an imm instruction). No relocation is | ||
59 | -done here - only used for relaxing */ | ||
60 | + /* This is a 32 bit reloc that stores the 32 bit pc relative | ||
61 | + value in two words (with an imm instruction). No relocation is | ||
62 | + done here - only used for relaxing */ | ||
63 | BFD_RELOC_MICROBLAZE_32_NONE, | ||
64 | |||
65 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
66 | - * +value in two words (with an imml instruction). No relocation is | ||
67 | - * +done here - only used for relaxing */ | ||
68 | - BFD_RELOC_MICROBLAZE_64_PCREL, | ||
69 | - | ||
70 | -/* This is a 64 bit reloc that stores the 32 bit relative | ||
71 | - * +value in two words (with an imml instruction). No relocation is | ||
72 | - * +done here - only used for relaxing */ | ||
73 | - BFD_RELOC_MICROBLAZE_EA64, | ||
74 | - | ||
75 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
76 | - * +value in two words (with an imm instruction). No relocation is | ||
77 | - * +done here - only used for relaxing */ | ||
78 | - BFD_RELOC_MICROBLAZE_64_NONE, | ||
79 | - | ||
80 | - /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
81 | - two words (with an imm instruction). No relocation is done here | ||
82 | - only used for relaxing */ | ||
83 | - BFD_RELOC_MICROBLAZE_64, | ||
84 | + /* This is a 32 bit reloc that stores the 32 bit pc relative | ||
85 | + value in two words (with an imml instruction). No relocation is | ||
86 | + done here - only used for relaxing */ | ||
87 | + BFD_RELOC_MICROBLAZE_64_NONE, | ||
88 | |||
89 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
90 | -value in two words (with an imm instruction). The relocation is | ||
91 | -PC-relative GOT offset */ | ||
92 | + /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
93 | + value in two words (with an imm instruction). The relocation is | ||
94 | + PC-relative GOT offset */ | ||
95 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
96 | |||
97 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
98 | -value in two words (with an imml instruction). The relocation is | ||
99 | -PC-relative GOT offset */ | ||
100 | + /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
101 | + value in two words (with an imml instruction). No relocation is | ||
102 | + done here - only used for relaxing */ | ||
103 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
104 | |||
105 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
106 | -value in two words (with an imm instruction). The relocation is | ||
107 | -GOT offset */ | ||
108 | + /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
109 | + value in two words (with an imm instruction). The relocation is | ||
110 | + GOT offset */ | ||
111 | BFD_RELOC_MICROBLAZE_64_GOT, | ||
112 | |||
113 | /* This is a 64 bit reloc that stores the 32 bit pc relative value in | ||
114 | -- | ||
115 | 2.34.1 | ||
116 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch new file mode 100644 index 00000000..bf82b0ef --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 8deda21efd527564a262dc07a519f8bd03095b3c Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 16:32:22 +0530 | ||
4 | Subject: [PATCH 47/53] gdb/remote.c - revert earlier change to | ||
5 | process_g_packet | ||
6 | |||
7 | When connecting to remote target, gdb (microblaze-xilinx-elf) was | ||
8 | generating Truncated register 29 error when parsing the g packet, | ||
9 | workaround added being reverted. | ||
10 | |||
11 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
12 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
13 | --- | ||
14 | gdb/remote.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/gdb/remote.c b/gdb/remote.c | ||
18 | index cb99e5bc7b1..72f14e28f54 100644 | ||
19 | --- a/gdb/remote.c | ||
20 | +++ b/gdb/remote.c | ||
21 | @@ -8857,7 +8857,7 @@ remote_target::process_g_packet (struct regcache *regcache) | ||
22 | if (rsa->regs[i].pnum == -1) | ||
23 | continue; | ||
24 | |||
25 | - if (offset >= sizeof_g_packet || (offset + reg_size > sizeof_g_packet)) | ||
26 | + if (offset >= sizeof_g_packet) | ||
27 | rsa->regs[i].in_g_packet = 0; | ||
28 | else if (offset + reg_size > sizeof_g_packet) | ||
29 | error (_("Truncated register %d in remote 'g' packet"), i); | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch new file mode 100644 index 00000000..6c40a7e4 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch | |||
@@ -0,0 +1,465 @@ | |||
1 | From e372266dde792b03fb1754769a9615c818336171 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Mon, 1 Apr 2024 16:21:28 +0530 | ||
4 | Subject: [PATCH 48/53] Fix build issues after Xilinx 2023.2 binutils patch | ||
5 | merge | ||
6 | |||
7 | binutils/readelf.c - duplicate case statement | ||
8 | gas/config/tc-microblaze.c - Missing , between array elements | ||
9 | gas/config/tc-microblaze.c - A whole hunk ended up in wrong function/switch | ||
10 | |||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/libbfd.h | 6 +- | ||
14 | binutils/readelf.c | 5 - | ||
15 | gas/config/tc-microblaze.c | 375 +++++++++++++++++++------------------ | ||
16 | 3 files changed, 192 insertions(+), 194 deletions(-) | ||
17 | |||
18 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | ||
19 | index 7a3e558d70a..5f78d16db18 100644 | ||
20 | --- a/bfd/libbfd.h | ||
21 | +++ b/bfd/libbfd.h | ||
22 | @@ -2998,6 +2998,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
23 | "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21", | ||
24 | "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12", | ||
25 | "BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT", | ||
26 | + "BFD_RELOC_MICROBLAZE_64", | ||
27 | + "BFD_RELOC_MICROBLAZE_EA64", | ||
28 | + "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
29 | "BFD_RELOC_MICROBLAZE_32_LO", | ||
30 | "BFD_RELOC_MICROBLAZE_32_LO_PCREL", | ||
31 | "BFD_RELOC_MICROBLAZE_32_ROSDA", | ||
32 | @@ -3006,13 +3009,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
33 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
34 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
35 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
36 | + "BFD_RELOC_MICROBLAZE_64_GPC", | ||
37 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
38 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
39 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
40 | "BFD_RELOC_MICROBLAZE_32_GOTOFF", | ||
41 | "BFD_RELOC_MICROBLAZE_COPY", | ||
42 | - "BFD_RELOC_MICROBLAZE_64", | ||
43 | - "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
44 | "BFD_RELOC_MICROBLAZE_64_TLS", | ||
45 | "BFD_RELOC_MICROBLAZE_64_TLSGD", | ||
46 | "BFD_RELOC_MICROBLAZE_64_TLSLD", | ||
47 | diff --git a/binutils/readelf.c b/binutils/readelf.c | ||
48 | index 3ca9f3697d1..5e4ad6ea6ad 100644 | ||
49 | --- a/binutils/readelf.c | ||
50 | +++ b/binutils/readelf.c | ||
51 | @@ -15288,11 +15288,6 @@ is_8bit_abs_reloc (Filedata * filedata, unsigned int reloc_type) | ||
52 | || reloc_type == 9 /* R_MICROBLAZE_64_NONE. */); | ||
53 | default: | ||
54 | return false; | ||
55 | - /* REVISIT microblaze-binutils-merge */ | ||
56 | - case EM_MICROBLAZE: | ||
57 | - return reloc_type == 33 /* R_MICROBLAZE_32_NONE. */ | ||
58 | - || reloc_type == 0 /* R_MICROBLAZE_NONE. */ | ||
59 | - || reloc_type == 9; /* R_MICROBLAZE_64_NONE. */ | ||
60 | } | ||
61 | } | ||
62 | |||
63 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
64 | index 686b1a00177..d3d1e334bb5 100644 | ||
65 | --- a/gas/config/tc-microblaze.c | ||
66 | +++ b/gas/config/tc-microblaze.c | ||
67 | @@ -118,7 +118,7 @@ const relax_typeS md_relax_table[] = | ||
68 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 15: TLSGOTTPREL_OFFSET. */ | ||
69 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 16: TLSTPREL_OFFSET. */ | ||
70 | { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 17: TEXT_OFFSET. */ | ||
71 | - { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 } /* 18: TEXT_PC_OFFSET. */ | ||
72 | + { 0x7fffffff, 0x80000000, INST_WORD_SIZE*2, 0 }, /* 18: TEXT_PC_OFFSET. */ | ||
73 | { 0x7fffffffffffffff, 0x8000000000000000, INST_WORD_SIZE, 0 }, /* 19: DEFINED_64_OFFSET. */ | ||
74 | { 0x7fffffffffffffff, 0x8000000000000000, INST_WORD_SIZE*2, 0 } /* 20: DEFINED_64_PC_OFFSET. */ | ||
75 | }; | ||
76 | @@ -2263,6 +2263,193 @@ md_assemble (char * str) | ||
77 | inst |= (immed << IMM_MBAR); | ||
78 | break; | ||
79 | |||
80 | + /* For 64-bit instructions */ | ||
81 | + case INST_TYPE_RD_R1_IMML: | ||
82 | + if (strcmp (op_end, "")) | ||
83 | + op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
84 | + else | ||
85 | + { | ||
86 | + as_fatal (_("Error in statement syntax")); | ||
87 | + reg1 = 0; | ||
88 | + } | ||
89 | + if (strcmp (op_end, "")) | ||
90 | + op_end = parse_reg (op_end + 1, ®2); /* Get r1. */ | ||
91 | + else | ||
92 | + { | ||
93 | + as_fatal (_("Error in statement syntax")); | ||
94 | + reg2 = 0; | ||
95 | + } | ||
96 | + if (strcmp (op_end, "")) | ||
97 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
98 | + else | ||
99 | + as_fatal (_("Error in statement syntax")); | ||
100 | + | ||
101 | + /* Check for spl registers. */ | ||
102 | + if (check_spl_reg (& reg1)) | ||
103 | + as_fatal (_("Cannot use special register with this instruction")); | ||
104 | + if (check_spl_reg (& reg2)) | ||
105 | + as_fatal (_("Cannot use special register with this instruction")); | ||
106 | + | ||
107 | + if (exp.X_op != O_constant) | ||
108 | + { | ||
109 | + char *opc = NULL; | ||
110 | + //char *opc = str_microblaze_64; | ||
111 | + relax_substateT subtype; | ||
112 | + | ||
113 | + if (exp.X_md != 0) | ||
114 | + subtype = get_imm_otype(exp.X_md); | ||
115 | + else | ||
116 | + subtype = opcode->inst_offset_type; | ||
117 | + | ||
118 | + output = frag_var (rs_machine_dependent, | ||
119 | + isize * 2, /* maxm of 2 words. */ | ||
120 | + isize * 2, /* minm of 2 words. */ | ||
121 | + subtype, /* PC-relative or not. */ | ||
122 | + exp.X_add_symbol, | ||
123 | + exp.X_add_number, | ||
124 | + (char *) opc); | ||
125 | + immedl = 0L; | ||
126 | + } | ||
127 | + else | ||
128 | + { | ||
129 | + output = frag_more (isize); | ||
130 | + immedl = exp.X_add_number; | ||
131 | + if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
132 | + { | ||
133 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
134 | + if (opcode1 == NULL) | ||
135 | + { | ||
136 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
137 | + return; | ||
138 | + } | ||
139 | + inst1 = opcode1->bit_sequence; | ||
140 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
141 | + output[0] = INST_BYTE0 (inst1); | ||
142 | + output[1] = INST_BYTE1 (inst1); | ||
143 | + output[2] = INST_BYTE2 (inst1); | ||
144 | + output[3] = INST_BYTE3 (inst1); | ||
145 | + output = frag_more (isize); | ||
146 | + } | ||
147 | + else { | ||
148 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
149 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
150 | + if (opcode2 == NULL || opcode1 == NULL) | ||
151 | + { | ||
152 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
153 | + return; | ||
154 | + } | ||
155 | + inst1 = opcode2->bit_sequence; | ||
156 | + inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
157 | + output[0] = INST_BYTE0 (inst1); | ||
158 | + output[1] = INST_BYTE1 (inst1); | ||
159 | + output[2] = INST_BYTE2 (inst1); | ||
160 | + output[3] = INST_BYTE3 (inst1); | ||
161 | + output = frag_more (isize); | ||
162 | + inst1 = opcode1->bit_sequence; | ||
163 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
164 | + output[0] = INST_BYTE0 (inst1); | ||
165 | + output[1] = INST_BYTE1 (inst1); | ||
166 | + output[2] = INST_BYTE2 (inst1); | ||
167 | + output[3] = INST_BYTE3 (inst1); | ||
168 | + output = frag_more (isize); | ||
169 | + } | ||
170 | + } | ||
171 | + | ||
172 | + inst |= (reg1 << RD_LOW) & RD_MASK; | ||
173 | + inst |= (reg2 << RA_LOW) & RA_MASK; | ||
174 | + inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
175 | + break; | ||
176 | + | ||
177 | + case INST_TYPE_R1_IMML: | ||
178 | + if (strcmp (op_end, "")) | ||
179 | + op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ | ||
180 | + else | ||
181 | + { | ||
182 | + as_fatal (_("Error in statement syntax")); | ||
183 | + reg1 = 0; | ||
184 | + } | ||
185 | + if (strcmp (op_end, "")) | ||
186 | + op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
187 | + else | ||
188 | + as_fatal (_("Error in statement syntax")); | ||
189 | + | ||
190 | + /* Check for spl registers. */ | ||
191 | + if (check_spl_reg (®1)) | ||
192 | + as_fatal (_("Cannot use special register with this instruction")); | ||
193 | + | ||
194 | + if (exp.X_op != O_constant) | ||
195 | + { | ||
196 | + //char *opc = NULL; | ||
197 | + char *opc = str_microblaze_64; | ||
198 | + relax_substateT subtype; | ||
199 | + | ||
200 | + if (exp.X_md != 0) | ||
201 | + subtype = get_imm_otype(exp.X_md); | ||
202 | + else | ||
203 | + subtype = opcode->inst_offset_type; | ||
204 | + | ||
205 | + output = frag_var (rs_machine_dependent, | ||
206 | + isize * 2, /* maxm of 2 words. */ | ||
207 | + isize * 2, /* minm of 2 words. */ | ||
208 | + subtype, /* PC-relative or not. */ | ||
209 | + exp.X_add_symbol, | ||
210 | + exp.X_add_number, | ||
211 | + (char *) opc); | ||
212 | + immedl = 0L; | ||
213 | + } | ||
214 | + else | ||
215 | + { | ||
216 | + output = frag_more (isize); | ||
217 | + immedl = exp.X_add_number; | ||
218 | + if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
219 | + { | ||
220 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
221 | + if (opcode1 == NULL) | ||
222 | + { | ||
223 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
224 | + return; | ||
225 | + } | ||
226 | + inst1 = opcode1->bit_sequence; | ||
227 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
228 | + output[0] = INST_BYTE0 (inst1); | ||
229 | + output[1] = INST_BYTE1 (inst1); | ||
230 | + output[2] = INST_BYTE2 (inst1); | ||
231 | + output[3] = INST_BYTE3 (inst1); | ||
232 | + output = frag_more (isize); | ||
233 | + } | ||
234 | + else { | ||
235 | + opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
236 | + opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
237 | + if (opcode2 == NULL || opcode1 == NULL) | ||
238 | + { | ||
239 | + as_bad (_("unknown opcode \"%s\""), "imml"); | ||
240 | + return; | ||
241 | + } | ||
242 | + inst1 = opcode2->bit_sequence; | ||
243 | + inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
244 | + output[0] = INST_BYTE0 (inst1); | ||
245 | + output[1] = INST_BYTE1 (inst1); | ||
246 | + output[2] = INST_BYTE2 (inst1); | ||
247 | + output[3] = INST_BYTE3 (inst1); | ||
248 | + output = frag_more (isize); | ||
249 | + inst1 = opcode1->bit_sequence; | ||
250 | + inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
251 | + output[0] = INST_BYTE0 (inst1); | ||
252 | + output[1] = INST_BYTE1 (inst1); | ||
253 | + output[2] = INST_BYTE2 (inst1); | ||
254 | + output[3] = INST_BYTE3 (inst1); | ||
255 | + output = frag_more (isize); | ||
256 | + } | ||
257 | + } | ||
258 | + | ||
259 | + inst |= (reg1 << RA_LOW) & RA_MASK; | ||
260 | + inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
261 | + break; | ||
262 | + | ||
263 | + case INST_TYPE_IMML: | ||
264 | + as_fatal (_("An IMML instruction should not be present in the .s file")); | ||
265 | + break; | ||
266 | + | ||
267 | default: | ||
268 | as_fatal (_("unimplemented opcode \"%s\""), name); | ||
269 | } | ||
270 | @@ -3177,192 +3364,6 @@ tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp) | ||
271 | case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
272 | code = fixp->fx_r_type; | ||
273 | break; | ||
274 | - /* For 64-bit instructions */ | ||
275 | - case INST_TYPE_RD_R1_IMML: | ||
276 | - if (strcmp (op_end, "")) | ||
277 | - op_end = parse_reg (op_end + 1, ®1); /* Get rd. */ | ||
278 | - else | ||
279 | - { | ||
280 | - as_fatal (_("Error in statement syntax")); | ||
281 | - reg1 = 0; | ||
282 | - } | ||
283 | - if (strcmp (op_end, "")) | ||
284 | - op_end = parse_reg (op_end + 1, ®2); /* Get r1. */ | ||
285 | - else | ||
286 | - { | ||
287 | - as_fatal (_("Error in statement syntax")); | ||
288 | - reg2 = 0; | ||
289 | - } | ||
290 | - if (strcmp (op_end, "")) | ||
291 | - op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
292 | - else | ||
293 | - as_fatal (_("Error in statement syntax")); | ||
294 | - | ||
295 | - /* Check for spl registers. */ | ||
296 | - if (check_spl_reg (& reg1)) | ||
297 | - as_fatal (_("Cannot use special register with this instruction")); | ||
298 | - if (check_spl_reg (& reg2)) | ||
299 | - as_fatal (_("Cannot use special register with this instruction")); | ||
300 | - | ||
301 | - if (exp.X_op != O_constant) | ||
302 | - { | ||
303 | - char *opc = NULL; | ||
304 | - //char *opc = str_microblaze_64; | ||
305 | - relax_substateT subtype; | ||
306 | - | ||
307 | - if (exp.X_md != 0) | ||
308 | - subtype = get_imm_otype(exp.X_md); | ||
309 | - else | ||
310 | - subtype = opcode->inst_offset_type; | ||
311 | - | ||
312 | - output = frag_var (rs_machine_dependent, | ||
313 | - isize * 2, /* maxm of 2 words. */ | ||
314 | - isize * 2, /* minm of 2 words. */ | ||
315 | - subtype, /* PC-relative or not. */ | ||
316 | - exp.X_add_symbol, | ||
317 | - exp.X_add_number, | ||
318 | - (char *) opc); | ||
319 | - immedl = 0L; | ||
320 | - } | ||
321 | - else | ||
322 | - { | ||
323 | - output = frag_more (isize); | ||
324 | - immedl = exp.X_add_number; | ||
325 | - if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
326 | - { | ||
327 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
328 | - if (opcode1 == NULL) | ||
329 | - { | ||
330 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
331 | - return; | ||
332 | - } | ||
333 | - inst1 = opcode1->bit_sequence; | ||
334 | - inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
335 | - output[0] = INST_BYTE0 (inst1); | ||
336 | - output[1] = INST_BYTE1 (inst1); | ||
337 | - output[2] = INST_BYTE2 (inst1); | ||
338 | - output[3] = INST_BYTE3 (inst1); | ||
339 | - output = frag_more (isize); | ||
340 | - } | ||
341 | - else { | ||
342 | - opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
343 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
344 | - if (opcode2 == NULL || opcode1 == NULL) | ||
345 | - { | ||
346 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
347 | - return; | ||
348 | - } | ||
349 | - inst1 = opcode2->bit_sequence; | ||
350 | - inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
351 | - output[0] = INST_BYTE0 (inst1); | ||
352 | - output[1] = INST_BYTE1 (inst1); | ||
353 | - output[2] = INST_BYTE2 (inst1); | ||
354 | - output[3] = INST_BYTE3 (inst1); | ||
355 | - output = frag_more (isize); | ||
356 | - inst1 = opcode1->bit_sequence; | ||
357 | - inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
358 | - output[0] = INST_BYTE0 (inst1); | ||
359 | - output[1] = INST_BYTE1 (inst1); | ||
360 | - output[2] = INST_BYTE2 (inst1); | ||
361 | - output[3] = INST_BYTE3 (inst1); | ||
362 | - output = frag_more (isize); | ||
363 | - } | ||
364 | - } | ||
365 | - | ||
366 | - inst |= (reg1 << RD_LOW) & RD_MASK; | ||
367 | - inst |= (reg2 << RA_LOW) & RA_MASK; | ||
368 | - inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
369 | - break; | ||
370 | - | ||
371 | - case INST_TYPE_R1_IMML: | ||
372 | - if (strcmp (op_end, "")) | ||
373 | - op_end = parse_reg (op_end + 1, ®1); /* Get r1. */ | ||
374 | - else | ||
375 | - { | ||
376 | - as_fatal (_("Error in statement syntax")); | ||
377 | - reg1 = 0; | ||
378 | - } | ||
379 | - if (strcmp (op_end, "")) | ||
380 | - op_end = parse_imml (op_end + 1, & exp, MIN_IMML, MAX_IMML); | ||
381 | - else | ||
382 | - as_fatal (_("Error in statement syntax")); | ||
383 | - | ||
384 | - /* Check for spl registers. */ | ||
385 | - if (check_spl_reg (®1)) | ||
386 | - as_fatal (_("Cannot use special register with this instruction")); | ||
387 | - | ||
388 | - if (exp.X_op != O_constant) | ||
389 | - { | ||
390 | - //char *opc = NULL; | ||
391 | - char *opc = str_microblaze_64; | ||
392 | - relax_substateT subtype; | ||
393 | - | ||
394 | - if (exp.X_md != 0) | ||
395 | - subtype = get_imm_otype(exp.X_md); | ||
396 | - else | ||
397 | - subtype = opcode->inst_offset_type; | ||
398 | - | ||
399 | - output = frag_var (rs_machine_dependent, | ||
400 | - isize * 2, /* maxm of 2 words. */ | ||
401 | - isize * 2, /* minm of 2 words. */ | ||
402 | - subtype, /* PC-relative or not. */ | ||
403 | - exp.X_add_symbol, | ||
404 | - exp.X_add_number, | ||
405 | - (char *) opc); | ||
406 | - immedl = 0L; | ||
407 | - } | ||
408 | - else | ||
409 | - { | ||
410 | - output = frag_more (isize); | ||
411 | - immedl = exp.X_add_number; | ||
412 | - if (((long long)immedl) > (long long)-549755813888 && ((long long)immedl) < (long long)549755813887) | ||
413 | - { | ||
414 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
415 | - if (opcode1 == NULL) | ||
416 | - { | ||
417 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
418 | - return; | ||
419 | - } | ||
420 | - inst1 = opcode1->bit_sequence; | ||
421 | - inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
422 | - output[0] = INST_BYTE0 (inst1); | ||
423 | - output[1] = INST_BYTE1 (inst1); | ||
424 | - output[2] = INST_BYTE2 (inst1); | ||
425 | - output[3] = INST_BYTE3 (inst1); | ||
426 | - output = frag_more (isize); | ||
427 | - } | ||
428 | - else { | ||
429 | - opcode1 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
430 | - opcode2 = (struct op_code_struct *) str_hash_find (opcode_hash_control, "imml"); | ||
431 | - if (opcode2 == NULL || opcode1 == NULL) | ||
432 | - { | ||
433 | - as_bad (_("unknown opcode \"%s\""), "imml"); | ||
434 | - return; | ||
435 | - } | ||
436 | - inst1 = opcode2->bit_sequence; | ||
437 | - inst1 |= ((immedl & 0xFFFFFF0000000000L) >> 40) & IMML_MASK; | ||
438 | - output[0] = INST_BYTE0 (inst1); | ||
439 | - output[1] = INST_BYTE1 (inst1); | ||
440 | - output[2] = INST_BYTE2 (inst1); | ||
441 | - output[3] = INST_BYTE3 (inst1); | ||
442 | - output = frag_more (isize); | ||
443 | - inst1 = opcode1->bit_sequence; | ||
444 | - inst1 |= ((immedl & 0x000000FFFFFF0000L) >> 16) & IMML_MASK; | ||
445 | - output[0] = INST_BYTE0 (inst1); | ||
446 | - output[1] = INST_BYTE1 (inst1); | ||
447 | - output[2] = INST_BYTE2 (inst1); | ||
448 | - output[3] = INST_BYTE3 (inst1); | ||
449 | - output = frag_more (isize); | ||
450 | - } | ||
451 | - } | ||
452 | - | ||
453 | - inst |= (reg1 << RA_LOW) & RA_MASK; | ||
454 | - inst |= (immedl << IMM_LOW) & IMM_MASK; | ||
455 | - break; | ||
456 | - | ||
457 | - case INST_TYPE_IMML: | ||
458 | - as_fatal (_("An IMML instruction should not be present in the .s file")); | ||
459 | - break; | ||
460 | |||
461 | default: | ||
462 | switch (F (fixp->fx_size, fixp->fx_pcrel)) | ||
463 | -- | ||
464 | 2.34.1 | ||
465 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0049-When-unwinding-pc-value-adjust-return-pc-value.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0049-When-unwinding-pc-value-adjust-return-pc-value.patch new file mode 100644 index 00000000..f7869532 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0049-When-unwinding-pc-value-adjust-return-pc-value.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | From 21527b2edc1359417cc7978558167ef9c8c92afd Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Wed, 1 May 2024 11:12:32 +0530 | ||
4 | Subject: [PATCH 49/53] When unwinding pc value, adjust return pc value | ||
5 | |||
6 | A call (branch and link) instruction can include a delay slot, the | ||
7 | value of pc stored in the link register for Microblaze architecture | ||
8 | is the pc value corresponding to last executed instruction (call) | ||
9 | in the caller. The return instruction (branch reg) includes an | ||
10 | offset of 8 so that when function returns execution continues from | ||
11 | the address at : link register + 8, as the instruction in delay slot | ||
12 | (link register + 4) is already executed at the time of call. | ||
13 | |||
14 | Handle this by adjusting pc value during unwind-pc. | ||
15 | |||
16 | Basically restoring code to do this that seems to have been removed | ||
17 | as part of a gdb patch (gdb patch #8, Xilinx Yocto 2023.2) | ||
18 | |||
19 | That patch caused hundreds of regressions in gdb testuite, including | ||
20 | gdb.base/advance.exp, which is now fixed. | ||
21 | |||
22 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gdb/microblaze-tdep.c | 24 ++++++++++++++++++------ | ||
26 | 1 file changed, 18 insertions(+), 6 deletions(-) | ||
27 | |||
28 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
29 | index 6dcdeee76b3..2507cfe540f 100644 | ||
30 | --- a/gdb/microblaze-tdep.c | ||
31 | +++ b/gdb/microblaze-tdep.c | ||
32 | @@ -523,6 +523,12 @@ microblaze_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) | ||
33 | { | ||
34 | CORE_ADDR pc; | ||
35 | pc=frame_unwind_register_unsigned (next_frame, MICROBLAZE_PC_REGNUM); | ||
36 | + /* For sentinel frame, return address is actual PC. For other frames, | ||
37 | + return address is pc+8. This is a workaround because gcc does not | ||
38 | + generate correct return address in CIE. */ | ||
39 | + if (frame_relative_level (next_frame) >= 0) | ||
40 | + pc = pc + 8; | ||
41 | + microblaze_debug ("unwind pc = 0x%x\n", (int) pc); | ||
42 | return pc; | ||
43 | } | ||
44 | |||
45 | @@ -615,6 +621,7 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, | ||
46 | struct microblaze_frame_cache *cache = | ||
47 | microblaze_frame_cache (this_frame, this_cache); | ||
48 | |||
49 | +#if 1 | ||
50 | if ((regnum == MICROBLAZE_SP_REGNUM && | ||
51 | cache->register_offsets[MICROBLAZE_SP_REGNUM]) | ||
52 | || (regnum == MICROBLAZE_FP_REGNUM && | ||
53 | @@ -625,15 +632,22 @@ if ((regnum == MICROBLAZE_SP_REGNUM && | ||
54 | |||
55 | if (regnum == MICROBLAZE_PC_REGNUM) | ||
56 | { | ||
57 | - regnum = 15; | ||
58 | + regnum = MICROBLAZE_PREV_PC_REGNUM; | ||
59 | + | ||
60 | + microblaze_debug ("prev pc is r15 @ frame offset 0x%x\n", | ||
61 | + (int) cache->register_offsets[regnum] ); | ||
62 | + | ||
63 | return frame_unwind_got_memory (this_frame, regnum, | ||
64 | cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM]); | ||
65 | - | ||
66 | } | ||
67 | + | ||
68 | if (regnum == MICROBLAZE_SP_REGNUM) | ||
69 | regnum = 1; | ||
70 | -#if 0 | ||
71 | |||
72 | + return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
73 | + regnum); | ||
74 | + | ||
75 | +#else | ||
76 | if (cache->frameless_p) | ||
77 | { | ||
78 | if (regnum == MICROBLAZE_PC_REGNUM) | ||
79 | @@ -646,9 +660,7 @@ if (regnum == MICROBLAZE_SP_REGNUM) | ||
80 | else | ||
81 | return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
82 | regnum); | ||
83 | -#endif | ||
84 | - return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
85 | - regnum); | ||
86 | +#endif | ||
87 | } | ||
88 | |||
89 | static const struct frame_unwind microblaze_frame_unwind = | ||
90 | -- | ||
91 | 2.34.1 | ||
92 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0050-info-reg-pc-does-not-print-symbolic-value.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0050-info-reg-pc-does-not-print-symbolic-value.patch new file mode 100644 index 00000000..c9bca41d --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0050-info-reg-pc-does-not-print-symbolic-value.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From 54a6eedd59d70a80be5dc8b4a5abe642113ea291 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 9 May 2024 11:30:22 +0530 | ||
4 | Subject: [PATCH 50/53] info reg pc does not print symbolic value | ||
5 | |||
6 | Problem - Test gdb.base/pc-fp.exp fails | ||
7 | Fix - Change feature/microblaze-core.xml add type=code_ptr for pc | ||
8 | |||
9 | Files changed | ||
10 | features/microblaze-core.xml | ||
11 | features/microblaze.c (generated) | ||
12 | features/microblaze-with-stack-protect.c (generated) | ||
13 | |||
14 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
15 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
16 | --- | ||
17 | gdb/features/microblaze-core.xml | 4 ++-- | ||
18 | gdb/features/microblaze-with-stack-protect.c | 10 ++++++---- | ||
19 | gdb/features/microblaze.c | 8 ++++---- | ||
20 | 3 files changed, 12 insertions(+), 10 deletions(-) | ||
21 | |||
22 | diff --git a/gdb/features/microblaze-core.xml b/gdb/features/microblaze-core.xml | ||
23 | index 4d77d9d898f..f49d048fc73 100644 | ||
24 | --- a/gdb/features/microblaze-core.xml | ||
25 | +++ b/gdb/features/microblaze-core.xml | ||
26 | @@ -8,7 +8,7 @@ | ||
27 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
28 | <feature name="org.gnu.gdb.microblaze.core"> | ||
29 | <reg name="r0" bitsize="32" regnum="0"/> | ||
30 | - <reg name="r1" bitsize="32"/> | ||
31 | + <reg name="r1" bitsize="32" type="data_ptr"/> | ||
32 | <reg name="r2" bitsize="32"/> | ||
33 | <reg name="r3" bitsize="32"/> | ||
34 | <reg name="r4" bitsize="32"/> | ||
35 | @@ -39,7 +39,7 @@ | ||
36 | <reg name="r29" bitsize="32"/> | ||
37 | <reg name="r30" bitsize="32"/> | ||
38 | <reg name="r31" bitsize="32"/> | ||
39 | - <reg name="rpc" bitsize="32"/> | ||
40 | + <reg name="rpc" bitsize="32" type="code_ptr"/> | ||
41 | <reg name="rmsr" bitsize="32"/> | ||
42 | <reg name="rear" bitsize="32"/> | ||
43 | <reg name="resr" bitsize="32"/> | ||
44 | diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c | ||
45 | index 8ab9565a047..95e3eed1a4e 100644 | ||
46 | --- a/gdb/features/microblaze-with-stack-protect.c | ||
47 | +++ b/gdb/features/microblaze-with-stack-protect.c | ||
48 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
49 | |||
50 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
51 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
52 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
53 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
54 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
55 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
56 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
57 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
58 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
59 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
60 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
61 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
62 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
63 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
64 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
65 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
66 | @@ -70,10 +70,12 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
67 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
68 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
69 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
70 | - | ||
71 | - feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
72 | tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
73 | tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
74 | |||
75 | + feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
76 | + tdesc_create_reg (feature, "slr", 59, 1, NULL, 32, "int"); | ||
77 | + tdesc_create_reg (feature, "shr", 60, 1, NULL, 32, "int"); | ||
78 | + | ||
79 | tdesc_microblaze_with_stack_protect = result.release (); | ||
80 | } | ||
81 | diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c | ||
82 | index ed12e5bcfd2..ff4865b2acc 100644 | ||
83 | --- a/gdb/features/microblaze.c | ||
84 | +++ b/gdb/features/microblaze.c | ||
85 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze (void) | ||
86 | |||
87 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
88 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
89 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
90 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
91 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
92 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
93 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
94 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze (void) | ||
95 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
96 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
97 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
98 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
99 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
100 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
101 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
102 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
103 | @@ -70,8 +70,8 @@ initialize_tdesc_microblaze (void) | ||
104 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
105 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
106 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
107 | - tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
108 | - tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
109 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
110 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
111 | |||
112 | tdesc_microblaze = result.release (); | ||
113 | } | ||
114 | -- | ||
115 | 2.34.1 | ||
116 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0051-Wrong-target-description-accepted-by-microblaze-arch.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0051-Wrong-target-description-accepted-by-microblaze-arch.patch new file mode 100644 index 00000000..65993021 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0051-Wrong-target-description-accepted-by-microblaze-arch.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 80f3d1ca2ece1ef143f00365b938e0d0b575d239 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 9 May 2024 11:34:04 +0530 | ||
4 | Subject: [PATCH 51/53] Wrong target description accepted by microblaze | ||
5 | architecture | ||
6 | |||
7 | Fix - Modify microblaze_gdbarch_init, set tdesc only when it is NULL | ||
8 | |||
9 | Files changed - gdb/microblaze-tdep.c | ||
10 | |||
11 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
12 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
13 | --- | ||
14 | gdb/microblaze-tdep.c | 21 ++++++++++++--------- | ||
15 | 1 file changed, 12 insertions(+), 9 deletions(-) | ||
16 | |||
17 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
18 | index 2507cfe540f..cc80e4f0e6b 100644 | ||
19 | --- a/gdb/microblaze-tdep.c | ||
20 | +++ b/gdb/microblaze-tdep.c | ||
21 | @@ -1020,15 +1020,18 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
22 | else | ||
23 | microblaze_abi = found_abi; | ||
24 | |||
25 | - if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
26 | - { | ||
27 | - tdesc = tdesc_microblaze64; | ||
28 | - reg_size = 8; | ||
29 | - } | ||
30 | - else | ||
31 | - { | ||
32 | - tdesc = tdesc_microblaze; | ||
33 | - reg_size = 4; | ||
34 | + if (tdesc == NULL) | ||
35 | + { | ||
36 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
37 | + { | ||
38 | + tdesc = tdesc_microblaze64; | ||
39 | + reg_size = 8; | ||
40 | + } | ||
41 | + else | ||
42 | + { | ||
43 | + tdesc = tdesc_microblaze; | ||
44 | + reg_size = 4; | ||
45 | + } | ||
46 | } | ||
47 | |||
48 | /* Check any target description for validity. */ | ||
49 | -- | ||
50 | 2.34.1 | ||
51 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0052-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0052-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch new file mode 100644 index 00000000..f358e45e --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0052-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 2e4370f257fae84d18d1f6ef3a756795d77d5707 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 23 May 2024 16:02:59 +0530 | ||
4 | Subject: [PATCH 52/53] Merge gdb/microblaze-linux-tdep.c to gdb-14 and fix | ||
5 | compilation issues. | ||
6 | |||
7 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | gdb/microblaze-linux-tdep.c | 6 ++++-- | ||
11 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
14 | index babc9020f0f..00112b8f540 100644 | ||
15 | --- a/gdb/microblaze-linux-tdep.c | ||
16 | +++ b/gdb/microblaze-linux-tdep.c | ||
17 | @@ -48,10 +48,12 @@ microblaze_debug (const char *fmt, ...) | ||
18 | if (microblaze_debug_flag) | ||
19 | { | ||
20 | va_list args; | ||
21 | + string_file file (gdb_stdout->can_emit_style_escape ()); | ||
22 | |||
23 | va_start (args, fmt); | ||
24 | printf_unfiltered ("MICROBLAZE LINUX: "); | ||
25 | - vprintf_unfiltered (fmt, args); | ||
26 | + file.vprintf (fmt, args); | ||
27 | + gdb_stdout->puts_unfiltered (file.string ().c_str ()); | ||
28 | va_end (args); | ||
29 | } | ||
30 | } | ||
31 | @@ -145,7 +147,7 @@ static void | ||
32 | microblaze_linux_init_abi (struct gdbarch_info info, | ||
33 | struct gdbarch *gdbarch) | ||
34 | { | ||
35 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
36 | + struct microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
37 | |||
38 | tdep->sizeof_gregset = 200; | ||
39 | |||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0053-Roll-back-an-improvement-which-inlines-target_gdbarc.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0053-Roll-back-an-improvement-which-inlines-target_gdbarc.patch new file mode 100644 index 00000000..f7d32927 --- /dev/null +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0053-Roll-back-an-improvement-which-inlines-target_gdbarc.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 13146f53b89c03b086e883e1f4bd9e14c32e6943 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Fri, 19 Jul 2024 12:39:24 +0530 | ||
4 | Subject: [PATCH 53/53] Roll back an improvement which inlines target_gdbarch | ||
5 | () inherited from binutils 2.42 merge that causes compilation issues on gdb | ||
6 | 14.2 | ||
7 | |||
8 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | gdb/microblaze-tdep.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
15 | index cc80e4f0e6b..86dedafdbd6 100644 | ||
16 | --- a/gdb/microblaze-tdep.c | ||
17 | +++ b/gdb/microblaze-tdep.c | ||
18 | @@ -116,7 +116,7 @@ show_microblaze_abi (struct ui_file *file, | ||
19 | const char *ignored_value) | ||
20 | { | ||
21 | enum microblaze_abi global_abi = global_microblaze_abi (); | ||
22 | - enum microblaze_abi actual_abi = microblaze_abi (current_inferior ()->arch ()); | ||
23 | + enum microblaze_abi actual_abi = microblaze_abi ( target_gdbarch () ); | ||
24 | const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
25 | |||
26 | #if 1 | ||
27 | -- | ||
28 | 2.34.1 | ||
29 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc deleted file mode 100644 index 82867489..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | require gcc-common.inc | ||
2 | |||
3 | # Third digit in PV should be incremented after a minor release | ||
4 | |||
5 | PV = "12.2.0" | ||
6 | |||
7 | # BINV should be incremented to a revision after a minor gcc release | ||
8 | |||
9 | BINV = "12.2.0" | ||
10 | |||
11 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:" | ||
12 | |||
13 | DEPENDS =+ "mpfr gmp libmpc zlib flex-native" | ||
14 | NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native" | ||
15 | |||
16 | LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only" | ||
17 | |||
18 | LIC_FILES_CHKSUM = "\ | ||
19 | file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
20 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
21 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
22 | file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | ||
23 | file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ | ||
24 | " | ||
25 | # from git | ||
26 | #RELEASE ?= "7092b7aea122a91824d048aeb23834cf1d19b1a1" | ||
27 | #BASEURI ?= "https://repo.or.cz/official-gcc.git/snapshot/${RELEASE}.tar.gz;downloadfilename=gcc-${PV}-${RELEASE}.tar.gz" | ||
28 | #SOURCEDIR ?= "official-gcc-${@'${RELEASE}'[0:7]}" | ||
29 | |||
30 | # from snapshot | ||
31 | #RELEASE ?= "12.1.0-RC-20220429" | ||
32 | #SOURCEDIR ?= "gcc-${RELEASE}" | ||
33 | #BASEURI ?= "https://gcc.gnu.org/pub/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.xz" | ||
34 | |||
35 | # official release | ||
36 | RELEASE ?= "${PV}" | ||
37 | BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz" | ||
38 | SOURCEDIR ?= "gcc-${PV}" | ||
39 | |||
40 | SRC_URI = "${BASEURI} \ | ||
41 | file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ | ||
42 | file://0002-gcc-poison-system-directories.patch \ | ||
43 | file://0003-64-bit-multilib-hack.patch \ | ||
44 | file://0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch \ | ||
45 | file://0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ | ||
46 | file://0006-cpp-honor-sysroot.patch \ | ||
47 | file://0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ | ||
48 | file://0008-libtool.patch \ | ||
49 | file://0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ | ||
50 | file://0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ | ||
51 | file://0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ | ||
52 | file://0013-Ensure-target-gcc-headers-can-be-included.patch \ | ||
53 | file://0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ | ||
54 | file://0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ | ||
55 | file://0016-handle-sysroot-support-for-nativesdk-gcc.patch \ | ||
56 | file://0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ | ||
57 | file://0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ | ||
58 | file://0019-Re-introduce-spe-commandline-options.patch \ | ||
59 | file://0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ | ||
60 | file://0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \ | ||
61 | file://0023-libatomic-Do-not-enforce-march-on-aarch64.patch \ | ||
62 | file://0024-Fix-install-path-of-linux64.h.patch \ | ||
63 | file://0026-rust-recursion-limit.patch \ | ||
64 | file://prefix-map-realpath.patch \ | ||
65 | file://hardcoded-paths.patch \ | ||
66 | " | ||
67 | SRC_URI[sha256sum] = "e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff" | ||
68 | |||
69 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}" | ||
70 | B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" | ||
71 | |||
72 | # Language Overrides | ||
73 | FORTRAN = "" | ||
74 | JAVA = "" | ||
75 | |||
76 | SSP ?= "--disable-libssp" | ||
77 | SSP:mingw32 = "--enable-libssp" | ||
78 | |||
79 | EXTRA_OECONF_BASE = "\ | ||
80 | ${SSP} \ | ||
81 | --enable-libitm \ | ||
82 | --enable-lto \ | ||
83 | --disable-bootstrap \ | ||
84 | --with-system-zlib \ | ||
85 | ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \ | ||
86 | --enable-linker-build-id \ | ||
87 | --with-ppl=no \ | ||
88 | --with-cloog=no \ | ||
89 | --enable-checking=release \ | ||
90 | --enable-cheaders=c_global \ | ||
91 | --without-isl \ | ||
92 | " | ||
93 | |||
94 | EXTRA_OECONF_INITIAL = "\ | ||
95 | --disable-libgomp \ | ||
96 | --disable-libitm \ | ||
97 | --disable-libquadmath \ | ||
98 | --with-system-zlib \ | ||
99 | --disable-lto \ | ||
100 | --disable-plugin \ | ||
101 | --enable-linker-build-id \ | ||
102 | --enable-decimal-float=no \ | ||
103 | --without-isl \ | ||
104 | --disable-libssp \ | ||
105 | " | ||
106 | |||
107 | EXTRA_OECONF_PATHS = "\ | ||
108 | --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ | ||
109 | --with-sysroot=/not/exist \ | ||
110 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
111 | " | ||
112 | |||
113 | # Is a binutils 2.26 issue, not gcc | ||
114 | CVE_STATUS[CVE-2021-37322] = "cpe-incorrect: Is a binutils 2.26 issue, not gcc" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch index f8985752..8b9c6177 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch | |||
@@ -1,9 +1,7 @@ | |||
1 | From 376b0ee790231a99fe50b50e20070c104bbba0d8 Mon Sep 17 00:00:00 2001 | 1 | From 8beb2e85436c77db197ce22626c7b7037d41d595 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 11 Jan 2017 13:13:57 +0530 | 3 | Date: Wed, 11 Jan 2017 13:13:57 +0530 |
4 | Subject: [PATCH 01/53] LOCAL]: Testsuite - builtins tests require fpic | 4 | Subject: [PATCH 01/54] LOCAL]: Testsuite - builtins tests require fpic |
5 | Upstream-Status: Pending | ||
6 | |||
7 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 5 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
8 | 6 | ||
9 | Conflicts: | 7 | Conflicts: |
@@ -14,7 +12,7 @@ Conflicts: | |||
14 | 1 file changed, 8 insertions(+) | 12 | 1 file changed, 8 insertions(+) |
15 | 13 | ||
16 | diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 14 | diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
17 | index fb47f51f90c..d9ecf045554 100644 | 15 | index fa762d33232..ce8545fc460 100644 |
18 | --- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 16 | --- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
19 | +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 17 | +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
20 | @@ -48,6 +48,14 @@ if { [istarget *-*-eabi*] | 18 | @@ -48,6 +48,14 @@ if { [istarget *-*-eabi*] |
@@ -33,5 +31,5 @@ index fb47f51f90c..d9ecf045554 100644 | |||
33 | if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { | 31 | if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { |
34 | c-torture-execute [list $src \ | 32 | c-torture-execute [list $src \ |
35 | -- | 33 | -- |
36 | 2.37.1 (Apple Git-137.1) | 34 | 2.34.1 |
37 | 35 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch index 5302b942..94970e7b 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch | |||
@@ -1,12 +1,10 @@ | |||
1 | From b1aea8e71692065497ee3e9be5a9f1fccecf5685 Mon Sep 17 00:00:00 2001 | 1 | From 4a2d958fe0d54c78b7a131b9cde1c74165533aaf Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 11 Jan 2017 14:31:10 +0530 | 3 | Date: Wed, 11 Jan 2017 14:31:10 +0530 |
4 | Subject: [PATCH 02/53] [LOCAL]: Quick fail g++.dg/opt/memcpy1.C This | 4 | Subject: [PATCH 02/54] Quick fail g++.dg/opt/memcpy1.C This particular |
5 | particular testcase fails with a timeout. Instead, fail it at compile-time | 5 | testcase fails with a timeout. Instead, fail it at compile-time for |
6 | for microblaze. This speeds up the testsuite without removing it from the | 6 | microblaze. This speeds up the testsuite without removing it from the FAIL |
7 | FAIL reports. | 7 | reports. |
8 | |||
9 | Upstream-Status: Pending | ||
10 | 8 | ||
11 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | 9 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> |
12 | --- | 10 | --- |
@@ -29,5 +27,5 @@ index 3862756083d..db9f990f781 100644 | |||
29 | typedef uint8_t uint8; | 27 | typedef uint8_t uint8; |
30 | __extension__ typedef __SIZE_TYPE__ size_t; | 28 | __extension__ typedef __SIZE_TYPE__ size_t; |
31 | -- | 29 | -- |
32 | 2.37.1 (Apple Git-137.1) | 30 | 2.34.1 |
33 | 31 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch index 89fe0ff6..5b4466d8 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch | |||
@@ -1,20 +1,18 @@ | |||
1 | From af78edb2cb91c55f54ac2d720cee9871da13b845 Mon Sep 17 00:00:00 2001 | 1 | From 0b4ec0cbfc13f5a40a20663da9c074ac81c5ec3f Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 11 Jan 2017 15:46:28 +0530 | 3 | Date: Wed, 11 Jan 2017 15:46:28 +0530 |
4 | Subject: [PATCH 03/53] [LOCAL]: For dejagnu static testing on qemu, suppress | 4 | Subject: [PATCH 03/54] For dejagnu static testing on qemu, suppress warnings |
5 | warnings about multiple definitions from the test function and libc in line | 5 | about multiple definitions from the test function and libc in line with |
6 | with method used by powerpc. Dynamic linking and using a qemu binary which | 6 | method used by powerpc. Dynamic linking and using a qemu binary which |
7 | understands sysroot resolves all test failures with builtins | 7 | understands sysroot resolves all test failures with builtins |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 9 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
12 | --- | 10 | --- |
13 | gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- | 11 | gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- |
14 | 1 file changed, 4 deletions(-) | 12 | 1 file changed, 4 deletions(-) |
15 | 13 | ||
16 | diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 14 | diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
17 | index d9ecf045554..d6c2b04f286 100644 | 15 | index ce8545fc460..72fd697d855 100644 |
18 | --- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 16 | --- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
19 | +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 17 | +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp |
20 | @@ -48,14 +48,10 @@ if { [istarget *-*-eabi*] | 18 | @@ -48,14 +48,10 @@ if { [istarget *-*-eabi*] |
@@ -33,5 +31,5 @@ index d9ecf045554..d6c2b04f286 100644 | |||
33 | if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { | 31 | if {![string match *-lib.c $src] && [runtest_file_p $runtests $src]} { |
34 | c-torture-execute [list $src \ | 32 | c-torture-execute [list $src \ |
35 | -- | 33 | -- |
36 | 2.37.1 (Apple Git-137.1) | 34 | 2.34.1 |
37 | 35 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch index 39c9c17e..87adeaf4 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From 34b7dd28e3fe40f55ec7f6df3f000dd797d6c1cc Mon Sep 17 00:00:00 2001 | 1 | From dcb106f7cb2fb68f3117677b12df2b01f3929f7b Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 11 Jan 2017 15:50:35 +0530 | 3 | Date: Wed, 11 Jan 2017 15:50:35 +0530 |
4 | Subject: [PATCH 04/53] [Patch, testsuite]: Add MicroBlaze to target-supports | 4 | Subject: [PATCH 04/54] Add MicroBlaze to target-supports for atomic buil. .tin |
5 | for atomic buil. .tin tests | 5 | tests |
6 | 6 | ||
7 | MicroBlaze added to supported targets for atomic builtin tests. | 7 | MicroBlaze added to supported targets for atomic builtin tests. |
8 | 8 | ||
@@ -13,18 +13,16 @@ Changelog/testsuite | |||
13 | * gcc/testsuite/lib/target-supports.exp: Add microblaze to | 13 | * gcc/testsuite/lib/target-supports.exp: Add microblaze to |
14 | check_effective_target_sync_int_long. | 14 | check_effective_target_sync_int_long. |
15 | 15 | ||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
19 | --- | 17 | --- |
20 | gcc/testsuite/lib/target-supports.exp | 1 + | 18 | gcc/testsuite/lib/target-supports.exp | 1 + |
21 | 1 file changed, 1 insertion(+) | 19 | 1 file changed, 1 insertion(+) |
22 | 20 | ||
23 | diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp | 21 | diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp |
24 | index 244fe2306f4..c19f251f0d2 100644 | 22 | index 40f71e9ed8b..32e29706fcd 100644 |
25 | --- a/gcc/testsuite/lib/target-supports.exp | 23 | --- a/gcc/testsuite/lib/target-supports.exp |
26 | +++ b/gcc/testsuite/lib/target-supports.exp | 24 | +++ b/gcc/testsuite/lib/target-supports.exp |
27 | @@ -8639,6 +8639,7 @@ proc check_effective_target_sync_int_long { } { | 25 | @@ -8947,6 +8947,7 @@ proc check_effective_target_sync_int_long { } { |
28 | && [check_effective_target_arm_acq_rel]) | 26 | && [check_effective_target_arm_acq_rel]) |
29 | || [istarget bfin*-*linux*] | 27 | || [istarget bfin*-*linux*] |
30 | || [istarget hppa*-*linux*] | 28 | || [istarget hppa*-*linux*] |
@@ -33,5 +31,5 @@ index 244fe2306f4..c19f251f0d2 100644 | |||
33 | || [istarget powerpc*-*-*] | 31 | || [istarget powerpc*-*-*] |
34 | || [istarget cris-*-*] | 32 | || [istarget cris-*-*] |
35 | -- | 33 | -- |
36 | 2.37.1 (Apple Git-137.1) | 34 | 2.34.1 |
37 | 35 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch index d127a03e..9a8d0a86 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From 2d0b5d68aff95a95dfb4ed0b207849658502bd53 Mon Sep 17 00:00:00 2001 | 1 | From 68bc05ae258334f591c336dbed6dc907969e90fc Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 11 Jan 2017 16:20:01 +0530 | 3 | Date: Wed, 11 Jan 2017 16:20:01 +0530 |
4 | Subject: [PATCH 05/53] [Patch, testsuite]: Update MicroBlaze strings test for | 4 | Subject: [PATCH 05/54] Update MicroBlaze strings test for new scan-assembly |
5 | new scan-assembly output resulting in use of $LC label | 5 | output resulting in use of $LC label |
6 | 6 | ||
7 | ChangeLog/testsuite | 7 | ChangeLog/testsuite |
8 | 8 | ||
@@ -11,8 +11,6 @@ ChangeLog/testsuite | |||
11 | * gcc/testsuite/gcc.target/microblaze/others/strings1.c: Update | 11 | * gcc/testsuite/gcc.target/microblaze/others/strings1.c: Update |
12 | to include $LC label. | 12 | to include $LC label. |
13 | 13 | ||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 14 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
17 | --- | 15 | --- |
18 | gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++ | 16 | gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++ |
@@ -34,5 +32,5 @@ index efaf3c660ea..347872360d3 100644 | |||
34 | 32 | ||
35 | extern void somefunc (char *); | 33 | extern void somefunc (char *); |
36 | -- | 34 | -- |
37 | 2.37.1 (Apple Git-137.1) | 35 | 2.34.1 |
38 | 36 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch index 3c412471..c32a8bab 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | From 20b6479f240bfebb46daad06839286a7abcff56c Mon Sep 17 00:00:00 2001 | 1 | From 7b07ae9c8086973b7baa031b09889146057de8ab Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:14:15 +0530 | 3 | Date: Thu, 12 Jan 2017 16:14:15 +0530 |
4 | Subject: [PATCH 06/53] [Patch, testsuite]: Allow MicroBlaze .weakext pattern | 4 | Subject: [PATCH 06/54] Allow MicroBlaze .weakext pattern in regex match Extend |
5 | in regex match Extend regex pattern to include optional ext at the end of | 5 | regex pattern to include optional ext at the end of .weak to match the |
6 | .weak to match the MicroBlaze weak label .weakext | 6 | MicroBlaze weak label .weakext |
7 | 7 | ||
8 | ChangeLog/testsuite | 8 | ChangeLog/testsuite |
9 | 9 | ||
@@ -13,8 +13,6 @@ ChangeLog/testsuite | |||
13 | pattern to take optional ext after .weak. | 13 | pattern to take optional ext after .weak. |
14 | * gcc/testsuite/g++.dg/abi/thunk4.C: Likewise. | 14 | * gcc/testsuite/g++.dg/abi/thunk4.C: Likewise. |
15 | 15 | ||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
19 | 17 | ||
20 | Conflicts: | 18 | Conflicts: |
@@ -65,5 +63,5 @@ index 6e8f124bc5e..d1d34fe1e4a 100644 | |||
65 | 63 | ||
66 | struct Base | 64 | struct Base |
67 | -- | 65 | -- |
68 | 2.37.1 (Apple Git-137.1) | 66 | 2.34.1 |
69 | 67 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch index 89d3b75a..5de0bfd8 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch | |||
@@ -1,12 +1,9 @@ | |||
1 | From 0efefd8ac71dd084c745402afdf07319de9774c6 Mon Sep 17 00:00:00 2001 | 1 | From 6de628ecccf3739891052a2fbaf97048384c6190 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:34:27 +0530 | 3 | Date: Thu, 12 Jan 2017 16:34:27 +0530 |
4 | Subject: [PATCH 07/53] [Patch, testsuite]: Add MicroBlaze to | 4 | Subject: [PATCH 07/54] Add MicroBlaze to check_profiling_available Testsuite, |
5 | check_profiling_available Testsuite, add microblaze*-*-* target in | 5 | add microblaze*-*-* target in check_profiling_available inline with other |
6 | check_profiling_available inline with other archs setting | 6 | archs setting profiling_available_saved to 0 |
7 | profiling_available_saved to 0 | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | 7 | ||
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 8 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
12 | --- | 9 | --- |
@@ -14,10 +11,10 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | |||
14 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 1 insertion(+) |
15 | 12 | ||
16 | diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp | 13 | diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp |
17 | index c19f251f0d2..c136c93e673 100644 | 14 | index 32e29706fcd..47233563339 100644 |
18 | --- a/gcc/testsuite/lib/target-supports.exp | 15 | --- a/gcc/testsuite/lib/target-supports.exp |
19 | +++ b/gcc/testsuite/lib/target-supports.exp | 16 | +++ b/gcc/testsuite/lib/target-supports.exp |
20 | @@ -729,6 +729,7 @@ proc check_profiling_available { test_what } { | 17 | @@ -804,6 +804,7 @@ proc check_profiling_available { test_what } { |
21 | || [istarget m68k-*-elf] | 18 | || [istarget m68k-*-elf] |
22 | || [istarget m68k-*-uclinux*] | 19 | || [istarget m68k-*-uclinux*] |
23 | || [istarget mips*-*-elf*] | 20 | || [istarget mips*-*-elf*] |
@@ -26,5 +23,5 @@ index c19f251f0d2..c136c93e673 100644 | |||
26 | || [istarget mn10300-*-elf*] | 23 | || [istarget mn10300-*-elf*] |
27 | || [istarget moxie-*-elf*] | 24 | || [istarget moxie-*-elf*] |
28 | -- | 25 | -- |
29 | 2.37.1 (Apple Git-137.1) | 26 | 2.34.1 |
30 | 27 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch index 21747726..e554e660 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch | |||
@@ -1,13 +1,10 @@ | |||
1 | From 42ab0f7a2e6834feed456d00b3e2ec0ae2532a41 Mon Sep 17 00:00:00 2001 | 1 | From cd3db73d253df229054863e5f920e59e60b84c45 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:41:43 +0530 | 3 | Date: Thu, 12 Jan 2017 16:41:43 +0530 |
4 | Subject: [PATCH 08/53] [Patch, microblaze]: Fix atomic side effects. In | 4 | Subject: [PATCH 08/54] Fix atomic side effects. In atomic_compare_and_swapsi, |
5 | atomic_compare_and_swapsi, add side effects to prevent incorrect assumptions | 5 | add side effects to prevent incorrect assumptions during optimization. |
6 | during optimization. Previously, the outputs were considered unused; this | 6 | Previously, the outputs were considered unused; this generated assembly code |
7 | generated assembly code with undefined side effects after invocation of the | 7 | with undefined side effects after invocation of the atomic. |
8 | atomic. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | 8 | ||
12 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | 9 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> |
13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 10 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
@@ -20,7 +17,7 @@ Conflicts: | |||
20 | 2 files changed, 16 insertions(+), 8 deletions(-) | 17 | 2 files changed, 16 insertions(+), 8 deletions(-) |
21 | 18 | ||
22 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 19 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
23 | index 0765ff930c6..ea7f74f1dff 100644 | 20 | index 671667b537c..dfd7395432b 100644 |
24 | --- a/gcc/config/microblaze/microblaze.md | 21 | --- a/gcc/config/microblaze/microblaze.md |
25 | +++ b/gcc/config/microblaze/microblaze.md | 22 | +++ b/gcc/config/microblaze/microblaze.md |
26 | @@ -43,6 +43,9 @@ | 23 | @@ -43,6 +43,9 @@ |
@@ -34,7 +31,7 @@ index 0765ff930c6..ea7f74f1dff 100644 | |||
34 | 31 | ||
35 | (define_c_enum "unspec" [ | 32 | (define_c_enum "unspec" [ |
36 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md | 33 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md |
37 | index ae8955ce691..77c3ce8ff27 100644 | 34 | index c84bac94101..587f852b3a0 100644 |
38 | --- a/gcc/config/microblaze/sync.md | 35 | --- a/gcc/config/microblaze/sync.md |
39 | +++ b/gcc/config/microblaze/sync.md | 36 | +++ b/gcc/config/microblaze/sync.md |
40 | @@ -18,14 +18,19 @@ | 37 | @@ -18,14 +18,19 @@ |
@@ -66,5 +63,5 @@ index ae8955ce691..77c3ce8ff27 100644 | |||
66 | "" | 63 | "" |
67 | { | 64 | { |
68 | -- | 65 | -- |
69 | 2.37.1 (Apple Git-137.1) | 66 | 2.34.1 |
70 | 67 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch index 97f35569..617b10f3 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch | |||
@@ -1,11 +1,9 @@ | |||
1 | From a1b8136a157c549f0f65c14d628e694310ca0d23 Mon Sep 17 00:00:00 2001 | 1 | From 7eca0d5cf7bc603c5a359b70521861c11faf6038 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:45:45 +0530 | 3 | Date: Thu, 12 Jan 2017 16:45:45 +0530 |
4 | Subject: [PATCH 09/53] [Patch, microblaze]: Fix atomic boolean return value. | 4 | Subject: [PATCH 09/54] Fix atomic boolean return value. In |
5 | In atomic_compare_and_swapsi, fix boolean return value. Previously, it | 5 | atomic_compare_and_swapsi, fix boolean return value. Previously, it contained |
6 | contained zero if successful and non-zero if unsuccessful. | 6 | zero if successful and non-zero if unsuccessful. |
7 | |||
8 | Upstream-Status: Pending | ||
9 | 7 | ||
10 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | 8 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> |
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 9 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
@@ -14,7 +12,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | |||
14 | 1 file changed, 4 insertions(+), 3 deletions(-) | 12 | 1 file changed, 4 insertions(+), 3 deletions(-) |
15 | 13 | ||
16 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md | 14 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md |
17 | index 77c3ce8ff27..573ce4765a0 100644 | 15 | index 587f852b3a0..230699bf280 100644 |
18 | --- a/gcc/config/microblaze/sync.md | 16 | --- a/gcc/config/microblaze/sync.md |
19 | +++ b/gcc/config/microblaze/sync.md | 17 | +++ b/gcc/config/microblaze/sync.md |
20 | @@ -34,15 +34,16 @@ | 18 | @@ -34,15 +34,16 @@ |
@@ -38,5 +36,5 @@ index 77c3ce8ff27..573ce4765a0 100644 | |||
38 | } | 36 | } |
39 | ) | 37 | ) |
40 | -- | 38 | -- |
41 | 2.37.1 (Apple Git-137.1) | 39 | 2.34.1 |
42 | 40 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch index 62bb02a9..42b9d575 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch | |||
@@ -1,15 +1,12 @@ | |||
1 | From 1ab5b8af098d100a1d7af05cca680b3c7181549d Mon Sep 17 00:00:00 2001 | 1 | From 72cdba90d70131c092918c5d5c18eb800f0f9dfb Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:50:17 +0530 | 3 | Date: Thu, 12 Jan 2017 16:50:17 +0530 |
4 | Subject: [PATCH 10/53] [Patch, microblaze]: Fix the Microblaze crash with | 4 | Subject: [PATCH 10/54] Fix the Microblaze crash with msmall-divides flag |
5 | msmall-divides flag Compiler is crashing when we use msmall-divides and | 5 | Compiler is crashing when we use msmall-divides and mxl-barrel-shift flag. |
6 | mxl-barrel-shift flag. This is because when use above flags | 6 | This is because when use above flags microblaze_expand_divide function will |
7 | microblaze_expand_divide function will be called for division operation. In | 7 | be called for division operation. In microblaze_expand_divide function we are |
8 | microblaze_expand_divide function we are using sub_reg but MicroBlaze doesn't | 8 | using sub_reg but MicroBlaze doesn't have subreg register due to this |
9 | have subreg register due to this compiler was crashing. Changed the logic to | 9 | compiler was crashing. Changed the logic to avoid sub_reg call |
10 | avoid sub_reg call | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | 10 | ||
14 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> | 11 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> |
15 | 12 | ||
@@ -20,10 +17,10 @@ Conflicts: | |||
20 | 1 file changed, 1 insertion(+), 2 deletions(-) | 17 | 1 file changed, 1 insertion(+), 2 deletions(-) |
21 | 18 | ||
22 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 19 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
23 | index f32effecfb6..6922dd94af7 100644 | 20 | index 6df2c712cab..11e34b3fdae 100644 |
24 | --- a/gcc/config/microblaze/microblaze.cc | 21 | --- a/gcc/config/microblaze/microblaze.cc |
25 | +++ b/gcc/config/microblaze/microblaze.cc | 22 | +++ b/gcc/config/microblaze/microblaze.cc |
26 | @@ -3710,8 +3710,7 @@ microblaze_expand_divide (rtx operands[]) | 23 | @@ -3719,8 +3719,7 @@ microblaze_expand_divide (rtx operands[]) |
27 | mem_rtx = gen_rtx_MEM (QImode, | 24 | mem_rtx = gen_rtx_MEM (QImode, |
28 | gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); | 25 | gen_rtx_PLUS (Pmode, regt1, div_table_rtx)); |
29 | 26 | ||
@@ -34,5 +31,5 @@ index f32effecfb6..6922dd94af7 100644 | |||
34 | JUMP_LABEL (jump) = div_end_label; | 31 | JUMP_LABEL (jump) = div_end_label; |
35 | LABEL_NUSES (div_end_label) = 1; | 32 | LABEL_NUSES (div_end_label) = 1; |
36 | -- | 33 | -- |
37 | 2.37.1 (Apple Git-137.1) | 34 | 2.34.1 |
38 | 35 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch index 09ebfca6..8988e23b 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch | |||
@@ -1,12 +1,10 @@ | |||
1 | From 7dd4ae2ad891094aa85a907b168cbdce744789e9 Mon Sep 17 00:00:00 2001 | 1 | From 41d8b3677d64bf9408925667c103a04b176050d5 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 16:52:56 +0530 | 3 | Date: Thu, 12 Jan 2017 16:52:56 +0530 |
4 | Subject: [PATCH 11/53] [Patch, microblaze]: Added ashrsi3_with_size_opt Added | 4 | Subject: [PATCH 11/54] Added ashrsi3_with_size_opt Added ashrsi3_with_size_opt |
5 | ashrsi3_with_size_opt pattern to optimize the sra instructions when the -Os | 5 | pattern to optimize the sra instructions when the -Os optimization is used. |
6 | optimization is used. lshrsi3_with_size_opt is being removed as it has | 6 | lshrsi3_with_size_opt is being removed as it has conflicts with unsigned int |
7 | conflicts with unsigned int variables | 7 | variables |
8 | |||
9 | Upstream-Status: Pending | ||
10 | 8 | ||
11 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> | 9 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> |
12 | --- | 10 | --- |
@@ -14,7 +12,7 @@ Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> | |||
14 | 1 file changed, 21 insertions(+) | 12 | 1 file changed, 21 insertions(+) |
15 | 13 | ||
16 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 14 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
17 | index ea7f74f1dff..9fbb3113f3c 100644 | 15 | index dfd7395432b..4f20b8efe33 100644 |
18 | --- a/gcc/config/microblaze/microblaze.md | 16 | --- a/gcc/config/microblaze/microblaze.md |
19 | +++ b/gcc/config/microblaze/microblaze.md | 17 | +++ b/gcc/config/microblaze/microblaze.md |
20 | @@ -1508,6 +1508,27 @@ | 18 | @@ -1508,6 +1508,27 @@ |
@@ -46,5 +44,5 @@ index ea7f74f1dff..9fbb3113f3c 100644 | |||
46 | [(set (match_operand:SI 0 "register_operand" "=&d") | 44 | [(set (match_operand:SI 0 "register_operand" "=&d") |
47 | (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") | 45 | (ashiftrt:SI (match_operand:SI 1 "register_operand" "d") |
48 | -- | 46 | -- |
49 | 2.37.1 (Apple Git-137.1) | 47 | 2.34.1 |
50 | 48 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch index c26d46d4..46a8699a 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch | |||
@@ -1,17 +1,15 @@ | |||
1 | From 12d7e086376916ef61e2c48639671fd0f7c8fbbf Mon Sep 17 00:00:00 2001 | 1 | From 9dc1f7291c4c7abfe254ca4e86a6ba0975a74960 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 10:57:19 +0530 | 3 | Date: Tue, 17 Jan 2017 10:57:19 +0530 |
4 | Subject: [PATCH 12/53] [Patch, microblaze]: Use bralid for profiler calls | 4 | Subject: [PATCH 12/54] Use bralid for profiler calls Signed-off-by: Edgar E. |
5 | Upstream-Status: Pending | 5 | Iglesias <edgar.iglesias@gmail.com> |
6 | |||
7 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | ||
8 | 6 | ||
9 | --- | 7 | --- |
10 | gcc/config/microblaze/microblaze.h | 2 +- | 8 | gcc/config/microblaze/microblaze.h | 2 +- |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 10 | ||
13 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 11 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
14 | index d28bc766de8..cd544f2030e 100644 | 12 | index 0398902362b..49e7fbedd5a 100644 |
15 | --- a/gcc/config/microblaze/microblaze.h | 13 | --- a/gcc/config/microblaze/microblaze.h |
16 | +++ b/gcc/config/microblaze/microblaze.h | 14 | +++ b/gcc/config/microblaze/microblaze.h |
17 | @@ -486,7 +486,7 @@ typedef struct microblaze_args | 15 | @@ -486,7 +486,7 @@ typedef struct microblaze_args |
@@ -24,5 +22,5 @@ index d28bc766de8..cd544f2030e 100644 | |||
24 | } | 22 | } |
25 | 23 | ||
26 | -- | 24 | -- |
27 | 2.37.1 (Apple Git-137.1) | 25 | 2.34.1 |
28 | 26 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch index 8739e6ea..26c24a49 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch | |||
@@ -1,10 +1,8 @@ | |||
1 | From cd8c9f3c43b266628d1585b74fc78f3e34a33c44 Mon Sep 17 00:00:00 2001 | 1 | From a2dbb662c573d2bf1a6a9192eb0d7f453ad20c59 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Thu, 12 Jan 2017 17:36:16 +0530 | 3 | Date: Thu, 12 Jan 2017 17:36:16 +0530 |
4 | Subject: [PATCH 13/53] [Patch, microblaze]: Removed moddi3 routinue Using the | 4 | Subject: [PATCH 13/54] Removed moddi3 routinue Using the default moddi3 |
5 | default moddi3 function as the existing implementation has many bugs | 5 | function as the existing implementation has many bugs |
6 | |||
7 | Upstream-Status: Pending | ||
8 | 6 | ||
9 | Signed-off-by:Nagaraju <nmekala@xilix.com> | 7 | Signed-off-by:Nagaraju <nmekala@xilix.com> |
10 | 8 | ||
@@ -18,13 +16,13 @@ Conflicts: | |||
18 | 16 | ||
19 | diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S | 17 | diff --git a/libgcc/config/microblaze/moddi3.S b/libgcc/config/microblaze/moddi3.S |
20 | deleted file mode 100644 | 18 | deleted file mode 100644 |
21 | index 9b77865df38..00000000000 | 19 | index b3e4bf6182e..00000000000 |
22 | --- a/libgcc/config/microblaze/moddi3.S | 20 | --- a/libgcc/config/microblaze/moddi3.S |
23 | +++ /dev/null | 21 | +++ /dev/null |
24 | @@ -1,121 +0,0 @@ | 22 | @@ -1,121 +0,0 @@ |
25 | -################################### | 23 | -################################### |
26 | -# | 24 | -# |
27 | -# Copyright (C) 2009-2022 Free Software Foundation, Inc. | 25 | -# Copyright (C) 2009-2023 Free Software Foundation, Inc. |
28 | -# | 26 | -# |
29 | -# Contributed by Michael Eager <eager@eagercon.com>. | 27 | -# Contributed by Michael Eager <eager@eagercon.com>. |
30 | -# | 28 | -# |
@@ -158,5 +156,5 @@ index 96959f0292b..8d954a49575 100644 | |||
158 | $(srcdir)/config/microblaze/muldi3_hard.S \ | 156 | $(srcdir)/config/microblaze/muldi3_hard.S \ |
159 | $(srcdir)/config/microblaze/mulsi3.S \ | 157 | $(srcdir)/config/microblaze/mulsi3.S \ |
160 | -- | 158 | -- |
161 | 2.37.1 (Apple Git-137.1) | 159 | 2.34.1 |
162 | 160 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch index 472c543c..9e4348ad 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch | |||
@@ -1,8 +1,8 @@ | |||
1 | From 30aa7cef2dd076637155384fba539838ddaf0163 Mon Sep 17 00:00:00 2001 | 1 | From 40dd974a6cd608567f1746a934c9743b80ca1e3f Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 12 Sep 2022 20:20:00 +0530 | 3 | Date: Mon, 12 Sep 2022 20:20:00 +0530 |
4 | Subject: [PATCH 14/53] [Patch, microblaze]: Add INIT_PRIORITY support Added | 4 | Subject: [PATCH 14/54] Add INIT_PRIORITY support Added TARGET_ASM_CONSTRUCTOR |
5 | TARGET_ASM_CONSTRUCTOR and TARGET_ASM_DESTRUCTOR macros. | 5 | and TARGET_ASM_DESTRUCTOR macros. |
6 | 6 | ||
7 | These macros allows users to control the order of initialization | 7 | These macros allows users to control the order of initialization |
8 | of objects defined at namespace scope with the init_priority | 8 | of objects defined at namespace scope with the init_priority |
@@ -10,19 +10,15 @@ attribute by specifying a relative priority, a constant integral | |||
10 | expression currently bounded between 101 and 65535 inclusive. | 10 | expression currently bounded between 101 and 65535 inclusive. |
11 | 11 | ||
12 | Lower numbers indicate a higher priority. | 12 | Lower numbers indicate a higher priority. |
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
16 | |||
17 | --- | 13 | --- |
18 | gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++ | 14 | gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++ |
19 | 1 file changed, 53 insertions(+) | 15 | 1 file changed, 53 insertions(+) |
20 | 16 | ||
21 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 17 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
22 | index 6922dd94af7..4b0621db168 100644 | 18 | index 11e34b3fdae..3fb402b87d4 100644 |
23 | --- a/gcc/config/microblaze/microblaze.cc | 19 | --- a/gcc/config/microblaze/microblaze.cc |
24 | +++ b/gcc/config/microblaze/microblaze.cc | 20 | +++ b/gcc/config/microblaze/microblaze.cc |
25 | @@ -2635,6 +2635,53 @@ print_operand_address (FILE * file, rtx addr) | 21 | @@ -2640,6 +2640,53 @@ print_operand_address (FILE * file, rtx addr) |
26 | } | 22 | } |
27 | } | 23 | } |
28 | 24 | ||
@@ -76,7 +72,7 @@ index 6922dd94af7..4b0621db168 100644 | |||
76 | /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol | 72 | /* Emit either a label, .comm, or .lcomm directive, and mark that the symbol |
77 | is used, so that we don't emit an .extern for it in | 73 | is used, so that we don't emit an .extern for it in |
78 | microblaze_asm_file_end. */ | 74 | microblaze_asm_file_end. */ |
79 | @@ -3976,6 +4023,12 @@ microblaze_starting_frame_offset (void) | 75 | @@ -3985,6 +4032,12 @@ microblaze_starting_frame_offset (void) |
80 | #undef TARGET_ATTRIBUTE_TABLE | 76 | #undef TARGET_ATTRIBUTE_TABLE |
81 | #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table | 77 | #define TARGET_ATTRIBUTE_TABLE microblaze_attribute_table |
82 | 78 | ||
@@ -90,5 +86,5 @@ index 6922dd94af7..4b0621db168 100644 | |||
90 | #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p | 86 | #define TARGET_IN_SMALL_DATA_P microblaze_elf_in_small_data_p |
91 | 87 | ||
92 | -- | 88 | -- |
93 | 2.37.1 (Apple Git-137.1) | 89 | 2.34.1 |
94 | 90 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch index 7ce5ebc0..fac95b7b 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | From b9bb669d9404bd04676f09c793310e1b7f228674 Mon Sep 17 00:00:00 2001 | 1 | From d0f1a493d130e06816df4d11f31421a8691761e0 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 15:23:57 +0530 | 3 | Date: Tue, 17 Jan 2017 15:23:57 +0530 |
4 | Subject: [PATCH 15/53] [Patch, microblaze]: Add optimized lshrsi3 When barrel | 4 | Subject: [PATCH 15/54] Add optimized lshrsi3 When barrel shifter is not |
5 | shifter is not present, the immediate value is greater than #5 and | 5 | present, the immediate value is greater than #5 and optimization is -OS, the |
6 | optimization is -OS, the compiler will generate shift operation using loop. | 6 | compiler will generate shift operation using loop. |
7 | 7 | ||
8 | Changelog | 8 | Changelog |
9 | 9 | ||
@@ -17,8 +17,6 @@ ChangeLog/testsuite | |||
17 | 17 | ||
18 | * gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c: New test. | 18 | * gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c: New test. |
19 | 19 | ||
20 | Upstream-Status: Pending | ||
21 | |||
22 | Signed-off-by:Nagaraju <nmekala@xilix.com> | 20 | Signed-off-by:Nagaraju <nmekala@xilix.com> |
23 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 21 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
24 | --- | 22 | --- |
@@ -28,7 +26,7 @@ Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | |||
28 | create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c | 26 | create mode 100644 gcc/testsuite/gcc.target/microblaze/others/lshrsi_Os_1.c |
29 | 27 | ||
30 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 28 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
31 | index 9fbb3113f3c..52308cce0cb 100644 | 29 | index 4f20b8efe33..5d65ad84449 100644 |
32 | --- a/gcc/config/microblaze/microblaze.md | 30 | --- a/gcc/config/microblaze/microblaze.md |
33 | +++ b/gcc/config/microblaze/microblaze.md | 31 | +++ b/gcc/config/microblaze/microblaze.md |
34 | @@ -1618,6 +1618,27 @@ | 32 | @@ -1618,6 +1618,27 @@ |
@@ -79,5 +77,5 @@ index 00000000000..32a3be7c76a | |||
79 | +/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */ | 77 | +/* { dg-final { scan-assembler "bneid\tr18,.-4" } } */ |
80 | +/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */ | 78 | +/* { dg-final { scan-assembler "\srl\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])" } } */ |
81 | -- | 79 | -- |
82 | 2.37.1 (Apple Git-137.1) | 80 | 2.34.1 |
83 | 81 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch index dc645c30..298765dc 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch | |||
@@ -1,12 +1,9 @@ | |||
1 | From 08d7bb4062024f3e34fbb17d695f8fa2c9e1b305 Mon Sep 17 00:00:00 2001 | 1 | From e94d406c9fa0d7b99532bd8cf4b2a4580cdb02b7 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 17:04:37 +0530 | 3 | Date: Tue, 17 Jan 2017 17:04:37 +0530 |
4 | Subject: [PATCH 16/53] [Patch, microblaze]: Add cbranchsi4_reg This patch | 4 | Subject: [PATCH 16/54] Add cbranchsi4_reg This patch optimizes the generation |
5 | optimizes the generation of pcmpne/pcmpeq instruction if the compare | 5 | of pcmpne/pcmpeq instruction if the compare instruction has no immediate |
6 | instruction has no immediate values.For the immediate values the xor | 6 | values.For the immediate values the xor instruction is generated |
7 | instruction is generated | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | 7 | ||
11 | Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> | 8 | Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> |
12 | Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> | 9 | Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> |
@@ -32,7 +29,7 @@ Conflicts: | |||
32 | 7 files changed, 18 insertions(+), 18 deletions(-) | 29 | 7 files changed, 18 insertions(+), 18 deletions(-) |
33 | 30 | ||
34 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h | 31 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h |
35 | index d67355697b5..848cd509003 100644 | 32 | index 31a6515176b..41557af0f3c 100644 |
36 | --- a/gcc/config/microblaze/microblaze-protos.h | 33 | --- a/gcc/config/microblaze/microblaze-protos.h |
37 | +++ b/gcc/config/microblaze/microblaze-protos.h | 34 | +++ b/gcc/config/microblaze/microblaze-protos.h |
38 | @@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *); | 35 | @@ -33,7 +33,7 @@ extern int microblaze_expand_shift (rtx *); |
@@ -145,5 +142,5 @@ index 1d6ba807b12..532c035adfd 100644 | |||
145 | 142 | ||
146 | } | 143 | } |
147 | -- | 144 | -- |
148 | 2.37.1 (Apple Git-137.1) | 145 | 2.34.1 |
149 | 146 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch index b0d33516..91ca87fc 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch | |||
@@ -1,19 +1,19 @@ | |||
1 | From 1593e5a9839b7cade95e9f55ba3cff66d64d0e84 Mon Sep 17 00:00:00 2001 | 1 | From 0760cd661f6c09cda8327288f79314319a0b9b14 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 17:11:04 +0530 | 3 | Date: Tue, 17 Jan 2017 17:11:04 +0530 |
4 | Subject: [PATCH 17/53] [Patch,microblaze]: Inline Expansion of fsqrt builtin. | 4 | Subject: [PATCH 17/54] Inline Expansion of fsqrt builtin. The changes are made |
5 | The changes are made in the patch for the inline expansion of the fsqrt | 5 | in the patch for the inline expansion of the fsqrt builtin with fqrt |
6 | builtin with fqrt instruction. The sqrt math function takes double as | 6 | instruction. The sqrt math function takes double as argument and return |
7 | argument and return double as argument. The pattern is selected while | 7 | double as argument. The pattern is selected while expanding the unary op |
8 | expanding the unary op through expand_unop which passes DFmode and the DFmode | 8 | through expand_unop which passes DFmode and the DFmode pattern was not there |
9 | pattern was not there returning zero. Thus the sqrt math function is not | 9 | returning zero. Thus the sqrt math function is not inlined and expanded. The |
10 | inlined and expanded. The pattern with DFmode argument is added. Also the | 10 | pattern with DFmode argument is added. Also the source and destination |
11 | source and destination argument is not same the DF through two different | 11 | argument is not same the DF through two different consecutive registers with |
12 | consecutive registers with lower 32 bit is the argument passed to sqrt and | 12 | lower 32 bit is the argument passed to sqrt and the higher 32 bit is zero. If |
13 | the higher 32 bit is zero. If the source and destinations are different the | 13 | the source and destinations are different the DFmode 64 bits registers is not |
14 | DFmode 64 bits registers is not set properly giving the problem in runtime. | 14 | set properly giving the problem in runtime. Such changes are taken care in |
15 | Such changes are taken care in the implementation of the pattern for DFmode | 15 | the implementation of the pattern for DFmode for inline expansion of the |
16 | for inline expansion of the sqrt. | 16 | sqrt. |
17 | 17 | ||
18 | ChangeLog: | 18 | ChangeLog: |
19 | 2015-06-16 Ajit Agarwal <ajitkum@xilinx.com> | 19 | 2015-06-16 Ajit Agarwal <ajitkum@xilinx.com> |
@@ -22,8 +22,6 @@ ChangeLog: | |||
22 | * config/microblaze/microblaze.md (sqrtdf2): New | 22 | * config/microblaze/microblaze.md (sqrtdf2): New |
23 | pattern. | 23 | pattern. |
24 | 24 | ||
25 | Upstream-Status: Pending | ||
26 | |||
27 | Signed-off-by:Ajit Agarwal ajitkum@xilinx.com | 25 | Signed-off-by:Ajit Agarwal ajitkum@xilinx.com |
28 | Nagaraju Mekala nmekala@xilinx.com | 26 | Nagaraju Mekala nmekala@xilinx.com |
29 | --- | 27 | --- |
@@ -31,7 +29,7 @@ Signed-off-by:Ajit Agarwal ajitkum@xilinx.com | |||
31 | 1 file changed, 14 insertions(+) | 29 | 1 file changed, 14 insertions(+) |
32 | 30 | ||
33 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 31 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
34 | index 52308cce0cb..0e5ef4d7649 100644 | 32 | index 5d65ad84449..0597ed8d75a 100644 |
35 | --- a/gcc/config/microblaze/microblaze.md | 33 | --- a/gcc/config/microblaze/microblaze.md |
36 | +++ b/gcc/config/microblaze/microblaze.md | 34 | +++ b/gcc/config/microblaze/microblaze.md |
37 | @@ -451,6 +451,20 @@ | 35 | @@ -451,6 +451,20 @@ |
@@ -56,5 +54,5 @@ index 52308cce0cb..0e5ef4d7649 100644 | |||
56 | [(set (match_operand:SI 0 "register_operand" "=d") | 54 | [(set (match_operand:SI 0 "register_operand" "=d") |
57 | (fix:SI (match_operand:SF 1 "register_operand" "d")))] | 55 | (fix:SI (match_operand:SF 1 "register_operand" "d")))] |
58 | -- | 56 | -- |
59 | 2.37.1 (Apple Git-137.1) | 57 | 2.34.1 |
60 | 58 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch index 94235be6..f388e9b5 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | From 9002b7d4c295bef95a3fc28c05f86dde5087dde1 Mon Sep 17 00:00:00 2001 | 1 | From 0a7299e82a8f463e9e7cd6297c5bdc0aac3a0ec4 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 18:07:24 +0530 | 3 | Date: Tue, 17 Jan 2017 18:07:24 +0530 |
4 | Subject: [PATCH 18/53] [PATCH] microblaze.md: Improve 'adddi3' and 'subdi3' | 4 | Subject: [PATCH 18/54] microblaze.md: Improve 'adddi3' and 'subdi3' insn |
5 | insn definitions Change adddi3 to handle DI immediates as the second operand, | 5 | definitions Change adddi3 to handle DI immediates as the second operand, this |
6 | this requires modification to the output template however reduces the need to | 6 | requires modification to the output template however reduces the need to |
7 | specify seperate templates for 16-bit positive/negative immediate operands. | 7 | specify seperate templates for 16-bit positive/negative immediate operands. |
8 | The use of 32-bit immediates for the addi and addic instructions is handled | 8 | The use of 32-bit immediates for the addi and addic instructions is handled |
9 | by the assembler, which will emit the imm instructions when required. This | 9 | by the assembler, which will emit the imm instructions when required. This |
@@ -17,15 +17,13 @@ implement purely with instructions as microblaze does not provide an | |||
17 | instruction to perform a forward arithmetic subtraction (it only | 17 | instruction to perform a forward arithmetic subtraction (it only |
18 | provides reverse 'rD = IMM - rA'). | 18 | provides reverse 'rD = IMM - rA'). |
19 | 19 | ||
20 | Upstream-Status: Pending | ||
21 | |||
22 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | 20 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> |
23 | --- | 21 | --- |
24 | gcc/config/microblaze/microblaze.md | 13 ++++++------- | 22 | gcc/config/microblaze/microblaze.md | 13 ++++++------- |
25 | 1 file changed, 6 insertions(+), 7 deletions(-) | 23 | 1 file changed, 6 insertions(+), 7 deletions(-) |
26 | 24 | ||
27 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 25 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
28 | index 0e5ef4d7649..effb9774c32 100644 | 26 | index 0597ed8d75a..498926a4a75 100644 |
29 | --- a/gcc/config/microblaze/microblaze.md | 27 | --- a/gcc/config/microblaze/microblaze.md |
30 | +++ b/gcc/config/microblaze/microblaze.md | 28 | +++ b/gcc/config/microblaze/microblaze.md |
31 | @@ -502,17 +502,16 @@ | 29 | @@ -502,17 +502,16 @@ |
@@ -61,5 +59,5 @@ index 0e5ef4d7649..effb9774c32 100644 | |||
61 | "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1" | 59 | "rsub\t%L0,%L2,%L1\;rsubc\t%M0,%M2,%M1" |
62 | [(set_attr "type" "darith") | 60 | [(set_attr "type" "darith") |
63 | -- | 61 | -- |
64 | 2.37.1 (Apple Git-137.1) | 62 | 2.34.1 |
65 | 63 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch index e955938e..0f388f70 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch | |||
@@ -1,10 +1,10 @@ | |||
1 | From ef94a8b2110f5a3becefb00c1f7c0c3adac6fcac Mon Sep 17 00:00:00 2001 | 1 | From a969ab3f04de077eca6d928dd651e3c6b042367d Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 17 Jan 2017 18:18:41 +0530 | 3 | Date: Tue, 17 Jan 2017 18:18:41 +0530 |
4 | Subject: [PATCH 19/53] [Patch, microblaze]: Update ashlsi3 & movsf patterns | 4 | Subject: [PATCH 19/54] Update ashlsi3 & movsf patterns This patch removes the |
5 | This patch removes the use of HOST_WIDE_INT_PRINT_HEX macro in print_operand | 5 | use of HOST_WIDE_INT_PRINT_HEX macro in print_operand of |
6 | of ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay and movsf_internal | 6 | ashlsi3_with_mul_nodelay,ashlsi3_with_mul_delay and movsf_internal patterns |
7 | patterns beacuse HOST_WIDE_INT_PRINT_HEX is generating 64-bit value which our | 7 | beacuse HOST_WIDE_INT_PRINT_HEX is generating 64-bit value which our |
8 | instruction doesn't support so using gen_int_mode function | 8 | instruction doesn't support so using gen_int_mode function |
9 | 9 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
@@ -24,20 +24,16 @@ ChangeLog: | |||
24 | 24 | ||
25 | Conflicts: | 25 | Conflicts: |
26 | gcc/config/microblaze/microblaze.c | 26 | gcc/config/microblaze/microblaze.c |
27 | Upstream-Status: Pending | ||
28 | |||
29 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
30 | |||
31 | --- | 27 | --- |
32 | gcc/config/microblaze/microblaze.cc | 2 +- | 28 | gcc/config/microblaze/microblaze.cc | 2 +- |
33 | gcc/config/microblaze/microblaze.md | 10 ++++++++-- | 29 | gcc/config/microblaze/microblaze.md | 10 ++++++++-- |
34 | 2 files changed, 9 insertions(+), 3 deletions(-) | 30 | 2 files changed, 9 insertions(+), 3 deletions(-) |
35 | 31 | ||
36 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 32 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
37 | index 4b0621db168..c23061c4e4a 100644 | 33 | index 3fb402b87d4..ff64e0ca342 100644 |
38 | --- a/gcc/config/microblaze/microblaze.cc | 34 | --- a/gcc/config/microblaze/microblaze.cc |
39 | +++ b/gcc/config/microblaze/microblaze.cc | 35 | +++ b/gcc/config/microblaze/microblaze.cc |
40 | @@ -2469,7 +2469,7 @@ print_operand (FILE * file, rtx op, int letter) | 36 | @@ -2474,7 +2474,7 @@ print_operand (FILE * file, rtx op, int letter) |
41 | unsigned long value_long; | 37 | unsigned long value_long; |
42 | REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), | 38 | REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), |
43 | value_long); | 39 | value_long); |
@@ -47,7 +43,7 @@ index 4b0621db168..c23061c4e4a 100644 | |||
47 | else | 43 | else |
48 | { | 44 | { |
49 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 45 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
50 | index effb9774c32..a4d7ea29219 100644 | 46 | index 498926a4a75..0448101de8a 100644 |
51 | --- a/gcc/config/microblaze/microblaze.md | 47 | --- a/gcc/config/microblaze/microblaze.md |
52 | +++ b/gcc/config/microblaze/microblaze.md | 48 | +++ b/gcc/config/microblaze/microblaze.md |
53 | @@ -1368,7 +1368,10 @@ | 49 | @@ -1368,7 +1368,10 @@ |
@@ -75,5 +71,5 @@ index effb9774c32..a4d7ea29219 100644 | |||
75 | [(set_attr "type" "no_delay_arith") | 71 | [(set_attr "type" "no_delay_arith") |
76 | (set_attr "mode" "SI") | 72 | (set_attr "mode" "SI") |
77 | -- | 73 | -- |
78 | 2.37.1 (Apple Git-137.1) | 74 | 2.34.1 |
79 | 75 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch index 2d384b78..002e60be 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch | |||
@@ -1,15 +1,11 @@ | |||
1 | From 65574bdca9006fda7654e33a0081eeecfcd9976b Mon Sep 17 00:00:00 2001 | 1 | From 21daca8e01515b2e73463adbf9488b63bb0ccf54 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 12 Sep 2022 21:05:51 +0530 | 3 | Date: Mon, 12 Sep 2022 21:05:51 +0530 |
4 | Subject: [PATCH 20/53] [Patch, microblaze]: 8-stage pipeline for microblaze | 4 | Subject: [PATCH 20/54] 8-stage pipeline for microblaze This patch adds the |
5 | This patch adds the support for the 8-stage pipeline. The new 8-stage | 5 | support for the 8-stage pipeline. The new 8-stage pipeline reduces the |
6 | pipeline reduces the latencies of float & integer division drastically | 6 | latencies of float & integer division drastically |
7 | 7 | ||
8 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 8 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
13 | --- | 9 | --- |
14 | gcc/config/microblaze/microblaze.cc | 11 ++++ | 10 | gcc/config/microblaze/microblaze.cc | 11 ++++ |
15 | gcc/config/microblaze/microblaze.h | 3 +- | 11 | gcc/config/microblaze/microblaze.h | 3 +- |
@@ -18,10 +14,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
18 | 4 files changed, 94 insertions(+), 3 deletions(-) | 14 | 4 files changed, 94 insertions(+), 3 deletions(-) |
19 | 15 | ||
20 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 16 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
21 | index c23061c4e4a..bd394c411b8 100644 | 17 | index ff64e0ca342..a58a5b2a1b0 100644 |
22 | --- a/gcc/config/microblaze/microblaze.cc | 18 | --- a/gcc/config/microblaze/microblaze.cc |
23 | +++ b/gcc/config/microblaze/microblaze.cc | 19 | +++ b/gcc/config/microblaze/microblaze.cc |
24 | @@ -1841,6 +1841,17 @@ microblaze_option_override (void) | 20 | @@ -1846,6 +1846,17 @@ microblaze_option_override (void) |
25 | "%<-mcpu=v8.30.a%>"); | 21 | "%<-mcpu=v8.30.a%>"); |
26 | TARGET_REORDER = 0; | 22 | TARGET_REORDER = 0; |
27 | } | 23 | } |
@@ -40,7 +36,7 @@ index c23061c4e4a..bd394c411b8 100644 | |||
40 | if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) | 36 | if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) |
41 | error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); | 37 | error ("%<-mxl-multiply-high%> requires %<-mno-xl-soft-mul%>"); |
42 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 38 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
43 | index cd544f2030e..640ae6ea9a3 100644 | 39 | index 49e7fbedd5a..e4faa9c681f 100644 |
44 | --- a/gcc/config/microblaze/microblaze.h | 40 | --- a/gcc/config/microblaze/microblaze.h |
45 | +++ b/gcc/config/microblaze/microblaze.h | 41 | +++ b/gcc/config/microblaze/microblaze.h |
46 | @@ -27,7 +27,8 @@ | 42 | @@ -27,7 +27,8 @@ |
@@ -54,7 +50,7 @@ index cd544f2030e..640ae6ea9a3 100644 | |||
54 | 50 | ||
55 | #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001 | 51 | #define MICROBLAZE_MASK_NO_UNSAFE_DELAY 0x00000001 |
56 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 52 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
57 | index a4d7ea29219..9e9dfb1ccb0 100644 | 53 | index 0448101de8a..7a01b28d8f0 100644 |
58 | --- a/gcc/config/microblaze/microblaze.md | 54 | --- a/gcc/config/microblaze/microblaze.md |
59 | +++ b/gcc/config/microblaze/microblaze.md | 55 | +++ b/gcc/config/microblaze/microblaze.md |
60 | @@ -35,6 +35,7 @@ | 56 | @@ -35,6 +35,7 @@ |
@@ -165,7 +161,7 @@ index a4d7ea29219..9e9dfb1ccb0 100644 | |||
165 | (set_attr "length" "4")]) | 161 | (set_attr "length" "4")]) |
166 | 162 | ||
167 | diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt | 163 | diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt |
168 | index 9f47e67cf2a..cc009363f87 100644 | 164 | index dbf6390ef4b..37aaaf9ffda 100644 |
169 | --- a/gcc/config/microblaze/microblaze.opt | 165 | --- a/gcc/config/microblaze/microblaze.opt |
170 | +++ b/gcc/config/microblaze/microblaze.opt | 166 | +++ b/gcc/config/microblaze/microblaze.opt |
171 | @@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE). | 167 | @@ -133,3 +133,7 @@ Data referenced by offset from start of text instead of GOT (with -fPIC/-fPIE). |
@@ -177,5 +173,5 @@ index 9f47e67cf2a..cc009363f87 100644 | |||
177 | +Target Mask(AREA_OPTIMIZED_2) | 173 | +Target Mask(AREA_OPTIMIZED_2) |
178 | +Use 8 stage pipeline (frequency optimization) | 174 | +Use 8 stage pipeline (frequency optimization) |
179 | -- | 175 | -- |
180 | 2.37.1 (Apple Git-137.1) | 176 | 2.34.1 |
181 | 177 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0021-Correct-the-const-high-double-immediate-value-with-t.patch index 1b8d924c..2e8182d1 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0021-Correct-the-const-high-double-immediate-value-with-t.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From 1d56bfb436b008422b4a7d4d4e3180667130c840 Mon Sep 17 00:00:00 2001 | 1 | From 1cda2f5772650aa65853e6a3e9d8162498c2f469 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 11:49:11 +0530 | 3 | Date: Tue, 13 Sep 2022 11:49:11 +0530 |
4 | Subject: [PATCH 21/53] [PATCH 21/53] [Patch, microblaze]: Correct the const | 4 | Subject: [PATCH 21/54] Correct the const high double immediate value with this |
5 | high double immediate value with this patch the loading of the DI mode | 5 | patch the loading of the DI mode immediate values will be using |
6 | immediate values will be using REAL_VALUE_FROM_CONST_DOUBLE and | 6 | REAL_VALUE_FROM_CONST_DOUBLE and REAL_VALUE_TO_TARGET_DOUBLE functions, as |
7 | REAL_VALUE_TO_TARGET_DOUBLE functions, as CONST_DOUBLE_HIGH was returning | 7 | CONST_DOUBLE_HIGH was returning the sign extension value even of the unsigned |
8 | the sign extension value even of the unsigned long long constants also | 8 | long long constants also |
9 | 9 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
11 | Ajit Agarwal <ajitkum@xilinx.com> | 11 | Ajit Agarwal <ajitkum@xilinx.com> |
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | |||
16 | --- | 12 | --- |
17 | gcc/config/microblaze/microblaze.cc | 6 ++++-- | 13 | gcc/config/microblaze/microblaze.cc | 6 ++++-- |
18 | gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ | 14 | gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ |
@@ -20,10 +16,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
20 | create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c | 16 | create mode 100644 gcc/testsuite/gcc.target/microblaze/others/long.c |
21 | 17 | ||
22 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 18 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
23 | index bd394c411b8..7c648cda1b2 100644 | 19 | index a58a5b2a1b0..af5c2371740 100644 |
24 | --- a/gcc/config/microblaze/microblaze.cc | 20 | --- a/gcc/config/microblaze/microblaze.cc |
25 | +++ b/gcc/config/microblaze/microblaze.cc | 21 | +++ b/gcc/config/microblaze/microblaze.cc |
26 | @@ -2453,14 +2453,16 @@ print_operand (FILE * file, rtx op, int letter) | 22 | @@ -2458,14 +2458,16 @@ print_operand (FILE * file, rtx op, int letter) |
27 | else if (letter == 'h' || letter == 'j') | 23 | else if (letter == 'h' || letter == 'j') |
28 | { | 24 | { |
29 | long val[2]; | 25 | long val[2]; |
@@ -58,5 +54,5 @@ index 00000000000..b6b55d5ad65 | |||
58 | +/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */ | 54 | +/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0x00000000" } } */ |
59 | +/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */ | 55 | +/* { dg-final { scan-assembler "addik\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r0,0xf0000000" } } */ |
60 | -- | 56 | -- |
61 | 2.37.1 (Apple Git-137.1) | 57 | 2.34.1 |
62 | 58 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0022-Fix-internal-compiler-error-with-msmall-divides-This.patch index a5917947..599bd71e 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0022-Fix-internal-compiler-error-with-msmall-divides-This.patch | |||
@@ -1,27 +1,23 @@ | |||
1 | From cd60ea1bd88ac47856ac66266a0771478ac73bad Mon Sep 17 00:00:00 2001 | 1 | From a88796930d8ef1b97056217ffdcc9f86326cdc98 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 11:58:14 +0530 | 3 | Date: Tue, 13 Sep 2022 11:58:14 +0530 |
4 | Subject: [PATCH 22/53] [Fix, microblaze]: Fix internal compiler error with | 4 | Subject: [PATCH 22/54] Fix internal compiler error with msmall-divides This |
5 | msmall-divides This patch will fix the internal error | 5 | patch will fix the internal error microblaze_expand_divide function which |
6 | microblaze_expand_divide function which come of rtx PLUS where the | 6 | come of rtx PLUS where the mem_rtx is of type SI and the operand is of type |
7 | mem_rtx is of type SI and the operand is of type QImode. This patch | 7 | QImode. This patch modifies the mem_rtx as QImode and Plus as QImode to fix |
8 | modifies the mem_rtx as QImode and Plus as QImode to fix the error. | 8 | the error. |
9 | 9 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
11 | Ajit Agarwal <ajitkum@xilinx.com> | 11 | Ajit Agarwal <ajitkum@xilinx.com> |
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | |||
16 | --- | 12 | --- |
17 | gcc/config/microblaze/microblaze.cc | 2 +- | 13 | gcc/config/microblaze/microblaze.cc | 2 +- |
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | 15 | ||
20 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 16 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
21 | index 7c648cda1b2..907c0afa9b8 100644 | 17 | index af5c2371740..4967d6a0133 100644 |
22 | --- a/gcc/config/microblaze/microblaze.cc | 18 | --- a/gcc/config/microblaze/microblaze.cc |
23 | +++ b/gcc/config/microblaze/microblaze.cc | 19 | +++ b/gcc/config/microblaze/microblaze.cc |
24 | @@ -3768,7 +3768,7 @@ microblaze_expand_divide (rtx operands[]) | 20 | @@ -3777,7 +3777,7 @@ microblaze_expand_divide (rtx operands[]) |
25 | emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); | 21 | emit_insn (gen_ashlsi3_bshift (regt1, operands[1], GEN_INT(4))); |
26 | emit_insn (gen_addsi3 (regt1, regt1, operands[2])); | 22 | emit_insn (gen_addsi3 (regt1, regt1, operands[2])); |
27 | mem_rtx = gen_rtx_MEM (QImode, | 23 | mem_rtx = gen_rtx_MEM (QImode, |
@@ -31,5 +27,5 @@ index 7c648cda1b2..907c0afa9b8 100644 | |||
31 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); | 27 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); |
32 | jump = emit_jump_insn_after (gen_jump (div_end_label), insn); | 28 | jump = emit_jump_insn_after (gen_jump (div_end_label), insn); |
33 | -- | 29 | -- |
34 | 2.37.1 (Apple Git-137.1) | 30 | 2.34.1 |
35 | 31 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch index ae05e791..65f283ad 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch | |||
@@ -1,8 +1,7 @@ | |||
1 | From b98cddb206ce84994425ede4b116365977768e37 Mon Sep 17 00:00:00 2001 | 1 | From f9871617fe69a105ebc4aa4838c682bfe40e4f2c Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 12:03:08 +0530 | 3 | Date: Tue, 13 Sep 2022 12:03:08 +0530 |
4 | Subject: [PATCH 23/53] [patch,microblaze]: Fix the calculation of high word in | 4 | Subject: [PATCH 23/54] Fix the calculation of high word in a long long 64-bit |
5 | a long long 64-bit | ||
6 | 5 | ||
7 | This patch will change the calculation of high word in a long long 64-bit. | 6 | This patch will change the calculation of high word in a long long 64-bit. |
8 | Earlier to this patch the high word of long long word (0xF0000000ULL) is | 7 | Earlier to this patch the high word of long long word (0xF0000000ULL) is |
@@ -14,19 +13,15 @@ Subject: [PATCH 23/53] [patch,microblaze]: Fix the calculation of high word in | |||
14 | 13 | ||
15 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 14 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
16 | Ajit Agarwal <ajitkum@xilinx.com> | 15 | Ajit Agarwal <ajitkum@xilinx.com> |
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
20 | |||
21 | --- | 16 | --- |
22 | gcc/config/microblaze/microblaze.cc | 3 --- | 17 | gcc/config/microblaze/microblaze.cc | 3 --- |
23 | 1 file changed, 3 deletions(-) | 18 | 1 file changed, 3 deletions(-) |
24 | 19 | ||
25 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 20 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
26 | index 907c0afa9b8..f75eaff4b49 100644 | 21 | index 4967d6a0133..2d516724acc 100644 |
27 | --- a/gcc/config/microblaze/microblaze.cc | 22 | --- a/gcc/config/microblaze/microblaze.cc |
28 | +++ b/gcc/config/microblaze/microblaze.cc | 23 | +++ b/gcc/config/microblaze/microblaze.cc |
29 | @@ -2469,9 +2469,6 @@ print_operand (FILE * file, rtx op, int letter) | 24 | @@ -2474,9 +2474,6 @@ print_operand (FILE * file, rtx op, int letter) |
30 | { | 25 | { |
31 | val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32; | 26 | val[0] = (INTVAL (op) & 0xffffffff00000000LL) >> 32; |
32 | val[1] = INTVAL (op) & 0x00000000ffffffffLL; | 27 | val[1] = INTVAL (op) & 0x00000000ffffffffLL; |
@@ -37,5 +32,5 @@ index 907c0afa9b8..f75eaff4b49 100644 | |||
37 | fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]); | 32 | fprintf (file, "0x%8.8lx", (letter == 'h') ? val[0] : val[1]); |
38 | } | 33 | } |
39 | -- | 34 | -- |
40 | 2.37.1 (Apple Git-137.1) | 35 | 2.34.1 |
41 | 36 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch index 444c9397..0356657b 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch | |||
@@ -1,14 +1,10 @@ | |||
1 | From 89269c9b8d2047ebbc13e98c45e94746edc63de6 Mon Sep 17 00:00:00 2001 | 1 | From a8991be91d79cf0bd17b7d303a10ec5edd7408c6 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 12:23:54 +0530 | 3 | Date: Tue, 13 Sep 2022 12:23:54 +0530 |
4 | Subject: [PATCH 24/53] [Patch,MicroBlaze] : this patch has 1.Fixed the bug in | 4 | Subject: [PATCH 24/54] this patch has 1.Fixed the bug in version calculation. |
5 | version calculation. 2.Add new bitfield instructions. | 5 | 2.Add new bitfield instructions. |
6 | 6 | ||
7 | Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com> | 7 | Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com> |
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
12 | --- | 8 | --- |
13 | gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++-------------- | 9 | gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++-------------- |
14 | gcc/config/microblaze/microblaze.h | 2 + | 10 | gcc/config/microblaze/microblaze.h | 2 + |
@@ -16,7 +12,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
16 | 3 files changed, 147 insertions(+), 78 deletions(-) | 12 | 3 files changed, 147 insertions(+), 78 deletions(-) |
17 | 13 | ||
18 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 14 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
19 | index f75eaff4b49..3abfc834ff2 100644 | 15 | index 2d516724acc..e28ab593c3e 100644 |
20 | --- a/gcc/config/microblaze/microblaze.cc | 16 | --- a/gcc/config/microblaze/microblaze.cc |
21 | +++ b/gcc/config/microblaze/microblaze.cc | 17 | +++ b/gcc/config/microblaze/microblaze.cc |
22 | @@ -165,6 +165,9 @@ int microblaze_no_unsafe_delay; | 18 | @@ -165,6 +165,9 @@ int microblaze_no_unsafe_delay; |
@@ -93,7 +89,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
93 | /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ | 89 | /* Return truth value if a CONST_DOUBLE is ok to be a legitimate constant. */ |
94 | static bool | 90 | static bool |
95 | microblaze_const_double_ok (rtx op, machine_mode mode) | 91 | microblaze_const_double_ok (rtx op, machine_mode mode) |
96 | @@ -1339,8 +1399,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, | 92 | @@ -1344,8 +1404,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, |
97 | { | 93 | { |
98 | if (TARGET_BARREL_SHIFT) | 94 | if (TARGET_BARREL_SHIFT) |
99 | { | 95 | { |
@@ -103,7 +99,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
103 | *total = COSTS_N_INSNS (1); | 99 | *total = COSTS_N_INSNS (1); |
104 | else | 100 | else |
105 | *total = COSTS_N_INSNS (2); | 101 | *total = COSTS_N_INSNS (2); |
106 | @@ -1401,8 +1460,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, | 102 | @@ -1406,8 +1465,7 @@ microblaze_rtx_costs (rtx x, machine_mode mode, int outer_code ATTRIBUTE_UNUSED, |
107 | } | 103 | } |
108 | else if (!TARGET_SOFT_MUL) | 104 | else if (!TARGET_SOFT_MUL) |
109 | { | 105 | { |
@@ -113,7 +109,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
113 | *total = COSTS_N_INSNS (1); | 109 | *total = COSTS_N_INSNS (1); |
114 | else | 110 | else |
115 | *total = COSTS_N_INSNS (3); | 111 | *total = COSTS_N_INSNS (3); |
116 | @@ -1675,72 +1733,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v, | 112 | @@ -1680,72 +1738,13 @@ function_arg_partial_bytes (cumulative_args_t cum_v, |
117 | return 0; | 113 | return 0; |
118 | } | 114 | } |
119 | 115 | ||
@@ -187,7 +183,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
187 | 183 | ||
188 | microblaze_section_threshold = (OPTION_SET_P (g_switch_value) | 184 | microblaze_section_threshold = (OPTION_SET_P (g_switch_value) |
189 | ? g_switch_value | 185 | ? g_switch_value |
190 | @@ -1761,13 +1760,13 @@ microblaze_option_override (void) | 186 | @@ -1766,13 +1765,13 @@ microblaze_option_override (void) |
191 | /* Check the MicroBlaze CPU version for any special action to be done. */ | 187 | /* Check the MicroBlaze CPU version for any special action to be done. */ |
192 | if (microblaze_select_cpu == NULL) | 188 | if (microblaze_select_cpu == NULL) |
193 | microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU; | 189 | microblaze_select_cpu = MICROBLAZE_DEFAULT_CPU; |
@@ -204,7 +200,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
204 | if (ver < 0) | 200 | if (ver < 0) |
205 | { | 201 | { |
206 | /* No hardware exceptions in earlier versions. So no worries. */ | 202 | /* No hardware exceptions in earlier versions. So no worries. */ |
207 | @@ -1778,8 +1777,7 @@ microblaze_option_override (void) | 203 | @@ -1783,8 +1782,7 @@ microblaze_option_override (void) |
208 | microblaze_pipe = MICROBLAZE_PIPE_3; | 204 | microblaze_pipe = MICROBLAZE_PIPE_3; |
209 | } | 205 | } |
210 | else if (ver == 0 | 206 | else if (ver == 0 |
@@ -214,7 +210,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
214 | { | 210 | { |
215 | #if 0 | 211 | #if 0 |
216 | microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY); | 212 | microblaze_select_flags |= (MICROBLAZE_MASK_NO_UNSAFE_DELAY); |
217 | @@ -1796,11 +1794,9 @@ microblaze_option_override (void) | 213 | @@ -1801,11 +1799,9 @@ microblaze_option_override (void) |
218 | #endif | 214 | #endif |
219 | microblaze_no_unsafe_delay = 0; | 215 | microblaze_no_unsafe_delay = 0; |
220 | microblaze_pipe = MICROBLAZE_PIPE_5; | 216 | microblaze_pipe = MICROBLAZE_PIPE_5; |
@@ -229,7 +225,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
229 | { | 225 | { |
230 | /* Pattern compares are to be turned on by default only when | 226 | /* Pattern compares are to be turned on by default only when |
231 | compiling for MB v5.00.'z'. */ | 227 | compiling for MB v5.00.'z'. */ |
232 | @@ -1808,7 +1804,7 @@ microblaze_option_override (void) | 228 | @@ -1813,7 +1809,7 @@ microblaze_option_override (void) |
233 | } | 229 | } |
234 | } | 230 | } |
235 | 231 | ||
@@ -238,7 +234,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
238 | if (ver < 0) | 234 | if (ver < 0) |
239 | { | 235 | { |
240 | if (TARGET_MULTIPLY_HIGH) | 236 | if (TARGET_MULTIPLY_HIGH) |
241 | @@ -1817,7 +1813,7 @@ microblaze_option_override (void) | 237 | @@ -1822,7 +1818,7 @@ microblaze_option_override (void) |
242 | "%<-mcpu=v6.00.a%> or greater"); | 238 | "%<-mcpu=v6.00.a%> or greater"); |
243 | } | 239 | } |
244 | 240 | ||
@@ -247,7 +243,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
247 | microblaze_has_clz = 1; | 243 | microblaze_has_clz = 1; |
248 | if (ver < 0) | 244 | if (ver < 0) |
249 | { | 245 | { |
250 | @@ -1826,7 +1822,7 @@ microblaze_option_override (void) | 246 | @@ -1831,7 +1827,7 @@ microblaze_option_override (void) |
251 | } | 247 | } |
252 | 248 | ||
253 | /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ | 249 | /* TARGET_REORDER defaults to 2 if -mxl-reorder not specified. */ |
@@ -256,7 +252,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
256 | if (ver < 0) | 252 | if (ver < 0) |
257 | { | 253 | { |
258 | if (TARGET_REORDER == 1) | 254 | if (TARGET_REORDER == 1) |
259 | @@ -1841,7 +1837,7 @@ microblaze_option_override (void) | 255 | @@ -1846,7 +1842,7 @@ microblaze_option_override (void) |
260 | "%<-mcpu=v8.30.a%>"); | 256 | "%<-mcpu=v8.30.a%>"); |
261 | TARGET_REORDER = 0; | 257 | TARGET_REORDER = 0; |
262 | } | 258 | } |
@@ -265,7 +261,7 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
265 | if (ver < 0) | 261 | if (ver < 0) |
266 | { | 262 | { |
267 | if (TARGET_AREA_OPTIMIZED_2) | 263 | if (TARGET_AREA_OPTIMIZED_2) |
268 | @@ -1851,6 +1847,8 @@ microblaze_option_override (void) | 264 | @@ -1856,6 +1852,8 @@ microblaze_option_override (void) |
269 | { | 265 | { |
270 | if (TARGET_AREA_OPTIMIZED_2) | 266 | if (TARGET_AREA_OPTIMIZED_2) |
271 | microblaze_pipe = MICROBLAZE_PIPE_8; | 267 | microblaze_pipe = MICROBLAZE_PIPE_8; |
@@ -275,10 +271,10 @@ index f75eaff4b49..3abfc834ff2 100644 | |||
275 | 271 | ||
276 | if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) | 272 | if (TARGET_MULTIPLY_HIGH && TARGET_SOFT_MUL) |
277 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 273 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
278 | index 640ae6ea9a3..67015058198 100644 | 274 | index e4faa9c681f..94d96bf6b5d 100644 |
279 | --- a/gcc/config/microblaze/microblaze.h | 275 | --- a/gcc/config/microblaze/microblaze.h |
280 | +++ b/gcc/config/microblaze/microblaze.h | 276 | +++ b/gcc/config/microblaze/microblaze.h |
281 | @@ -44,6 +44,7 @@ extern int microblaze_dbx_regno[]; | 277 | @@ -44,6 +44,7 @@ extern int microblaze_debugger_regno[]; |
282 | 278 | ||
283 | extern int microblaze_no_unsafe_delay; | 279 | extern int microblaze_no_unsafe_delay; |
284 | extern int microblaze_has_clz; | 280 | extern int microblaze_has_clz; |
@@ -295,7 +291,7 @@ index 640ae6ea9a3..67015058198 100644 | |||
295 | #define TARGET_SUPPORTS_PIC 1 | 291 | #define TARGET_SUPPORTS_PIC 1 |
296 | 292 | ||
297 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 293 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
298 | index 9e9dfb1ccb0..dede4d068d3 100644 | 294 | index 7a01b28d8f0..a76287ab4fd 100644 |
299 | --- a/gcc/config/microblaze/microblaze.md | 295 | --- a/gcc/config/microblaze/microblaze.md |
300 | +++ b/gcc/config/microblaze/microblaze.md | 296 | +++ b/gcc/config/microblaze/microblaze.md |
301 | @@ -2491,4 +2491,73 @@ | 297 | @@ -2491,4 +2491,73 @@ |
@@ -373,5 +369,5 @@ index 9e9dfb1ccb0..dede4d068d3 100644 | |||
373 | + | 369 | + |
374 | (include "sync.md") | 370 | (include "sync.md") |
375 | -- | 371 | -- |
376 | 2.37.1 (Apple Git-137.1) | 372 | 2.34.1 |
377 | 373 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch index 2800dee7..cd286818 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch | |||
@@ -1,21 +1,17 @@ | |||
1 | From 101f47dedd82fc09bcefd5db986e6d6b0a1761ad Mon Sep 17 00:00:00 2001 | 1 | From 85273a514d0ab3b243b947633ab46705a0d946bc Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Thu, 23 Feb 2017 17:09:04 +0530 | 3 | Date: Thu, 23 Feb 2017 17:09:04 +0530 |
4 | Subject: [PATCH 25/53] Fixing the issue with the builtin_alloc. register r18 | 4 | Subject: [PATCH 25/54] Fixing the issue with the builtin_alloc. register r18 |
5 | was not properly handling the stack pattern which was resolved by using free | 5 | was not properly handling the stack pattern which was resolved by using free |
6 | available register | 6 | available register |
7 | 7 | ||
8 | signed-off-by:nagaraju mekala <nmekala@xilinx.com> | 8 | signed-off-by:nagaraju mekala <nmekala@xilinx.com> |
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
13 | --- | 9 | --- |
14 | gcc/config/microblaze/microblaze.md | 8 ++++---- | 10 | gcc/config/microblaze/microblaze.md | 8 ++++---- |
15 | 1 file changed, 4 insertions(+), 4 deletions(-) | 11 | 1 file changed, 4 insertions(+), 4 deletions(-) |
16 | 12 | ||
17 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 13 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
18 | index dede4d068d3..c6d8a87e9d1 100644 | 14 | index a76287ab4fd..12270f135cf 100644 |
19 | --- a/gcc/config/microblaze/microblaze.md | 15 | --- a/gcc/config/microblaze/microblaze.md |
20 | +++ b/gcc/config/microblaze/microblaze.md | 16 | +++ b/gcc/config/microblaze/microblaze.md |
21 | @@ -2075,10 +2075,10 @@ | 17 | @@ -2075,10 +2075,10 @@ |
@@ -44,5 +40,5 @@ index dede4d068d3..c6d8a87e9d1 100644 | |||
44 | } | 40 | } |
45 | ) | 41 | ) |
46 | -- | 42 | -- |
47 | 2.37.1 (Apple Git-137.1) | 43 | 2.34.1 |
48 | 44 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0026-Removed-fsqrt-generation-for-double-values.patch index a1e4fb36..02cc5a1e 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0026-Removed-fsqrt-generation-for-double-values.patch | |||
@@ -1,19 +1,14 @@ | |||
1 | From b3e51ca34dc4048445b178253051ad4bbdfc5ec4 Mon Sep 17 00:00:00 2001 | 1 | From aba85eba7bc5cc19edafe54379fb1f1794dc3844 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 4 Jun 2018 10:10:18 +0530 | 3 | Date: Mon, 4 Jun 2018 10:10:18 +0530 |
4 | Subject: [PATCH 26/53] [Patch,Microblaze] : Removed fsqrt generation for | 4 | Subject: [PATCH 26/54] Removed fsqrt generation for double values. |
5 | double values. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 5 | ||
11 | --- | 6 | --- |
12 | gcc/config/microblaze/microblaze.md | 14 -------------- | 7 | gcc/config/microblaze/microblaze.md | 14 -------------- |
13 | 1 file changed, 14 deletions(-) | 8 | 1 file changed, 14 deletions(-) |
14 | 9 | ||
15 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 10 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
16 | index c6d8a87e9d1..f23a85c7ac7 100644 | 11 | index 12270f135cf..b05f7da30b4 100644 |
17 | --- a/gcc/config/microblaze/microblaze.md | 12 | --- a/gcc/config/microblaze/microblaze.md |
18 | +++ b/gcc/config/microblaze/microblaze.md | 13 | +++ b/gcc/config/microblaze/microblaze.md |
19 | @@ -526,20 +526,6 @@ | 14 | @@ -526,20 +526,6 @@ |
@@ -38,5 +33,5 @@ index c6d8a87e9d1..f23a85c7ac7 100644 | |||
38 | [(set (match_operand:SI 0 "register_operand" "=d") | 33 | [(set (match_operand:SI 0 "register_operand" "=d") |
39 | (fix:SI (match_operand:SF 1 "register_operand" "d")))] | 34 | (fix:SI (match_operand:SF 1 "register_operand" "d")))] |
40 | -- | 35 | -- |
41 | 2.37.1 (Apple Git-137.1) | 36 | 2.34.1 |
42 | 37 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0027-Intial-commit-of-64-bit-Microblaze.patch index a9222e54..c998d5eb 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0027-Intial-commit-of-64-bit-Microblaze.patch | |||
@@ -1,14 +1,10 @@ | |||
1 | From cf9ab9693d02212e1a49465e55d759a01acc507a Mon Sep 17 00:00:00 2001 | 1 | From dd3eee641d2bf28216bf02f324cf8b81d4a61e43 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 13:56:52 +0530 | 3 | Date: Tue, 13 Sep 2022 13:56:52 +0530 |
4 | Subject: [PATCH 27/53] [Patch,MicroBlaze]: Intial commit of 64-bit Microblaze | 4 | Subject: [PATCH 27/54] Intial commit of 64-bit Microblaze |
5 | 5 | ||
6 | Conflicts: | 6 | Conflicts: |
7 | gcc/config/microblaze/microblaze.md | 7 | gcc/config/microblaze/microblaze.md |
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
12 | --- | 8 | --- |
13 | gcc/config/microblaze/constraints.md | 6 + | 9 | gcc/config/microblaze/constraints.md | 6 + |
14 | gcc/config/microblaze/microblaze-protos.h | 1 + | 10 | gcc/config/microblaze/microblaze-protos.h | 1 + |
@@ -20,7 +16,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
20 | 7 files changed, 456 insertions(+), 30 deletions(-) | 16 | 7 files changed, 456 insertions(+), 30 deletions(-) |
21 | 17 | ||
22 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md | 18 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md |
23 | index a8934d305ee..2133650147e 100644 | 19 | index aae4be73ae3..26742d34980 100644 |
24 | --- a/gcc/config/microblaze/constraints.md | 20 | --- a/gcc/config/microblaze/constraints.md |
25 | +++ b/gcc/config/microblaze/constraints.md | 21 | +++ b/gcc/config/microblaze/constraints.md |
26 | @@ -52,6 +52,12 @@ | 22 | @@ -52,6 +52,12 @@ |
@@ -37,7 +33,7 @@ index a8934d305ee..2133650147e 100644 | |||
37 | 33 | ||
38 | (define_constraint "G" | 34 | (define_constraint "G" |
39 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h | 35 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h |
40 | index 848cd509003..7f575c2adec 100644 | 36 | index 41557af0f3c..0e9f783c4a4 100644 |
41 | --- a/gcc/config/microblaze/microblaze-protos.h | 37 | --- a/gcc/config/microblaze/microblaze-protos.h |
42 | +++ b/gcc/config/microblaze/microblaze-protos.h | 38 | +++ b/gcc/config/microblaze/microblaze-protos.h |
43 | @@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *); | 39 | @@ -36,6 +36,7 @@ extern void microblaze_expand_divide (rtx *); |
@@ -49,10 +45,10 @@ index 848cd509003..7f575c2adec 100644 | |||
49 | extern void print_operand (FILE *, rtx, int); | 45 | extern void print_operand (FILE *, rtx, int); |
50 | extern void print_operand_address (FILE *, rtx); | 46 | extern void print_operand_address (FILE *, rtx); |
51 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 47 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
52 | index 3abfc834ff2..1ac889041b8 100644 | 48 | index e28ab593c3e..7975bc182f2 100644 |
53 | --- a/gcc/config/microblaze/microblaze.cc | 49 | --- a/gcc/config/microblaze/microblaze.cc |
54 | +++ b/gcc/config/microblaze/microblaze.cc | 50 | +++ b/gcc/config/microblaze/microblaze.cc |
55 | @@ -3433,11 +3433,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) | 51 | @@ -3438,11 +3438,11 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) |
56 | op0 = operands[0]; | 52 | op0 = operands[0]; |
57 | op1 = operands[1]; | 53 | op1 = operands[1]; |
58 | 54 | ||
@@ -67,7 +63,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
67 | emit_move_insn (op0, temp); | 63 | emit_move_insn (op0, temp); |
68 | return true; | 64 | return true; |
69 | } | 65 | } |
70 | @@ -3502,12 +3502,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) | 66 | @@ -3511,12 +3511,12 @@ microblaze_expand_move (machine_mode mode, rtx operands[]) |
71 | && (flag_pic == 2 || microblaze_tls_symbol_p (p0) | 67 | && (flag_pic == 2 || microblaze_tls_symbol_p (p0) |
72 | || !SMALL_INT (p1))))) | 68 | || !SMALL_INT (p1))))) |
73 | { | 69 | { |
@@ -82,7 +78,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
82 | return true; | 78 | return true; |
83 | } | 79 | } |
84 | } | 80 | } |
85 | @@ -3638,7 +3638,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) | 81 | @@ -3647,7 +3647,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) |
86 | rtx cmp_op0 = operands[1]; | 82 | rtx cmp_op0 = operands[1]; |
87 | rtx cmp_op1 = operands[2]; | 83 | rtx cmp_op1 = operands[2]; |
88 | rtx label1 = operands[3]; | 84 | rtx label1 = operands[3]; |
@@ -91,7 +87,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
91 | rtx condition; | 87 | rtx condition; |
92 | 88 | ||
93 | gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); | 89 | gcc_assert ((GET_CODE (cmp_op0) == REG) || (GET_CODE (cmp_op0) == SUBREG)); |
94 | @@ -3647,23 +3647,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) | 90 | @@ -3656,23 +3656,36 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) |
95 | if (cmp_op1 == const0_rtx) | 91 | if (cmp_op1 == const0_rtx) |
96 | { | 92 | { |
97 | comp_reg = cmp_op0; | 93 | comp_reg = cmp_op0; |
@@ -134,7 +130,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
134 | } | 130 | } |
135 | } | 131 | } |
136 | 132 | ||
137 | @@ -3674,7 +3687,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) | 133 | @@ -3683,7 +3696,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) |
138 | rtx cmp_op0 = operands[1]; | 134 | rtx cmp_op0 = operands[1]; |
139 | rtx cmp_op1 = operands[2]; | 135 | rtx cmp_op1 = operands[2]; |
140 | rtx label1 = operands[3]; | 136 | rtx label1 = operands[3]; |
@@ -143,7 +139,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
143 | rtx condition; | 139 | rtx condition; |
144 | 140 | ||
145 | gcc_assert ((GET_CODE (cmp_op0) == REG) | 141 | gcc_assert ((GET_CODE (cmp_op0) == REG) |
146 | @@ -3685,30 +3698,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) | 142 | @@ -3694,30 +3707,63 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) |
147 | { | 143 | { |
148 | comp_reg = cmp_op0; | 144 | comp_reg = cmp_op0; |
149 | condition = gen_rtx_fmt_ee (signed_condition (code), | 145 | condition = gen_rtx_fmt_ee (signed_condition (code), |
@@ -219,7 +215,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
219 | } | 215 | } |
220 | } | 216 | } |
221 | 217 | ||
222 | @@ -3725,6 +3771,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) | 218 | @@ -3734,6 +3780,19 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) |
223 | emit_jump_insn (gen_condjump (condition, operands[3])); | 219 | emit_jump_insn (gen_condjump (condition, operands[3])); |
224 | } | 220 | } |
225 | 221 | ||
@@ -240,7 +236,7 @@ index 3abfc834ff2..1ac889041b8 100644 | |||
240 | 236 | ||
241 | static bool | 237 | static bool |
242 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 238 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
243 | index 67015058198..885abc6e5a1 100644 | 239 | index 94d96bf6b5d..f35f7075ce3 100644 |
244 | --- a/gcc/config/microblaze/microblaze.h | 240 | --- a/gcc/config/microblaze/microblaze.h |
245 | +++ b/gcc/config/microblaze/microblaze.h | 241 | +++ b/gcc/config/microblaze/microblaze.h |
246 | @@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe; | 242 | @@ -102,6 +102,7 @@ extern enum pipeline_type microblaze_pipe; |
@@ -269,7 +265,7 @@ index 67015058198..885abc6e5a1 100644 | |||
269 | #define FLOAT_TYPE_SIZE 32 | 265 | #define FLOAT_TYPE_SIZE 32 |
270 | #define DOUBLE_TYPE_SIZE 64 | 266 | #define DOUBLE_TYPE_SIZE 64 |
271 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 267 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
272 | index f23a85c7ac7..40711fe224b 100644 | 268 | index b05f7da30b4..3f572fe2351 100644 |
273 | --- a/gcc/config/microblaze/microblaze.md | 269 | --- a/gcc/config/microblaze/microblaze.md |
274 | +++ b/gcc/config/microblaze/microblaze.md | 270 | +++ b/gcc/config/microblaze/microblaze.md |
275 | @@ -497,7 +497,6 @@ | 271 | @@ -497,7 +497,6 @@ |
@@ -751,7 +747,7 @@ index f23a85c7ac7..40711fe224b 100644 | |||
751 | ;; Unconditional branches | 747 | ;; Unconditional branches |
752 | ;;---------------------------------------------------------------- | 748 | ;;---------------------------------------------------------------- |
753 | diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt | 749 | diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt |
754 | index cc009363f87..10910dbb83f 100644 | 750 | index 37aaaf9ffda..96615a6d2c4 100644 |
755 | --- a/gcc/config/microblaze/microblaze.opt | 751 | --- a/gcc/config/microblaze/microblaze.opt |
756 | +++ b/gcc/config/microblaze/microblaze.opt | 752 | +++ b/gcc/config/microblaze/microblaze.opt |
757 | @@ -136,4 +136,9 @@ Target | 753 | @@ -136,4 +136,9 @@ Target |
@@ -784,5 +780,5 @@ index 7e2fc5dcef8..4c25cfe15e7 100644 | |||
784 | # Extra files | 780 | # Extra files |
785 | microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \ | 781 | microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \ |
786 | -- | 782 | -- |
787 | 2.37.1 (Apple Git-137.1) | 783 | 2.34.1 |
788 | 784 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch index c36e246a..58bb6fd8 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch | |||
@@ -1,12 +1,8 @@ | |||
1 | From da40b160857d0b6a56b6f6c9c81d61dabb5255db Mon Sep 17 00:00:00 2001 | 1 | From fcec4be11de1c646bdcd6dcfc3844b7deb42898e Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 14:38:48 +0530 | 3 | Date: Tue, 13 Sep 2022 14:38:48 +0530 |
4 | Subject: [PATCH 28/53] Intial commit for 64bit-MB sources. Need to cleanup | 4 | Subject: [PATCH 28/54] Intial commit for 64bit-MB sources. Need to cleanup the |
5 | the code later. | 5 | code later. |
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 6 | ||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/constraints.md | 2 +- | 8 | gcc/config/microblaze/constraints.md | 2 +- |
@@ -33,7 +29,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
33 | create mode 100644 libgcc/config/microblaze/umoddi3.S | 29 | create mode 100644 libgcc/config/microblaze/umoddi3.S |
34 | 30 | ||
35 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md | 31 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md |
36 | index 2133650147e..0ced155340d 100644 | 32 | index 26742d34980..7bb1e0b4c8d 100644 |
37 | --- a/gcc/config/microblaze/constraints.md | 33 | --- a/gcc/config/microblaze/constraints.md |
38 | +++ b/gcc/config/microblaze/constraints.md | 34 | +++ b/gcc/config/microblaze/constraints.md |
39 | @@ -55,7 +55,7 @@ | 35 | @@ -55,7 +55,7 @@ |
@@ -46,7 +42,7 @@ index 2133650147e..0ced155340d 100644 | |||
46 | 42 | ||
47 | ;; Define floating point constraints | 43 | ;; Define floating point constraints |
48 | diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc | 44 | diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc |
49 | index caabe99b993..ef8d2430565 100644 | 45 | index 065351ad218..af73de0709c 100644 |
50 | --- a/gcc/config/microblaze/microblaze-c.cc | 46 | --- a/gcc/config/microblaze/microblaze-c.cc |
51 | +++ b/gcc/config/microblaze/microblaze-c.cc | 47 | +++ b/gcc/config/microblaze/microblaze-c.cc |
52 | @@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile) | 48 | @@ -100,4 +100,10 @@ microblaze_cpp_define (cpp_reader *pfile) |
@@ -61,7 +57,7 @@ index caabe99b993..ef8d2430565 100644 | |||
61 | + } | 57 | + } |
62 | } | 58 | } |
63 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 59 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
64 | index 1ac889041b8..9d3628c6816 100644 | 60 | index 7975bc182f2..46bbf8a21e7 100644 |
65 | --- a/gcc/config/microblaze/microblaze.cc | 61 | --- a/gcc/config/microblaze/microblaze.cc |
66 | +++ b/gcc/config/microblaze/microblaze.cc | 62 | +++ b/gcc/config/microblaze/microblaze.cc |
67 | @@ -384,10 +384,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) | 63 | @@ -384,10 +384,10 @@ simple_memory_operand (rtx op, machine_mode mode ATTRIBUTE_UNUSED) |
@@ -104,7 +100,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
104 | info->type = ADDRESS_GOTOFF; | 100 | info->type = ADDRESS_GOTOFF; |
105 | } | 101 | } |
106 | else if (XINT (x, 1) == UNSPEC_PLT) | 102 | else if (XINT (x, 1) == UNSPEC_PLT) |
107 | @@ -1303,8 +1303,16 @@ microblaze_block_move_loop (rtx dest, rtx src, HOST_WIDE_INT length) | 103 | @@ -1308,8 +1308,16 @@ microblaze_block_move_loop (rtx dest, rtx src, HOST_WIDE_INT length) |
108 | emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES)); | 104 | emit_move_insn (dest_reg, plus_constant (Pmode, dest_reg, MAX_MOVE_BYTES)); |
109 | 105 | ||
110 | /* Emit the test & branch. */ | 106 | /* Emit the test & branch. */ |
@@ -122,7 +118,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
122 | 118 | ||
123 | /* Mop up any left-over bytes. */ | 119 | /* Mop up any left-over bytes. */ |
124 | if (leftover) | 120 | if (leftover) |
125 | @@ -1634,14 +1642,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v, | 121 | @@ -1639,14 +1647,20 @@ microblaze_function_arg_advance (cumulative_args_t cum_v, |
126 | break; | 122 | break; |
127 | 123 | ||
128 | case E_DFmode: | 124 | case E_DFmode: |
@@ -145,7 +141,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
145 | break; | 141 | break; |
146 | 142 | ||
147 | case E_QImode: | 143 | case E_QImode: |
148 | @@ -2156,7 +2170,7 @@ compute_frame_size (HOST_WIDE_INT size) | 144 | @@ -2161,7 +2175,7 @@ compute_frame_size (HOST_WIDE_INT size) |
149 | 145 | ||
150 | if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM) | 146 | if (regno != MB_ABI_SUB_RETURN_ADDR_REGNUM) |
151 | /* Don't account for link register. It is accounted specially below. */ | 147 | /* Don't account for link register. It is accounted specially below. */ |
@@ -154,7 +150,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
154 | 150 | ||
155 | mask |= (1L << (regno - GP_REG_FIRST)); | 151 | mask |= (1L << (regno - GP_REG_FIRST)); |
156 | } | 152 | } |
157 | @@ -2425,7 +2439,7 @@ print_operand (FILE * file, rtx op, int letter) | 153 | @@ -2430,7 +2444,7 @@ print_operand (FILE * file, rtx op, int letter) |
158 | 154 | ||
159 | if ((letter == 'M' && !WORDS_BIG_ENDIAN) | 155 | if ((letter == 'M' && !WORDS_BIG_ENDIAN) |
160 | || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D') | 156 | || (letter == 'L' && WORDS_BIG_ENDIAN) || letter == 'D') |
@@ -163,7 +159,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
163 | 159 | ||
164 | fprintf (file, "%s", reg_names[regnum]); | 160 | fprintf (file, "%s", reg_names[regnum]); |
165 | } | 161 | } |
166 | @@ -2451,6 +2465,7 @@ print_operand (FILE * file, rtx op, int letter) | 162 | @@ -2456,6 +2470,7 @@ print_operand (FILE * file, rtx op, int letter) |
167 | else if (letter == 'h' || letter == 'j') | 163 | else if (letter == 'h' || letter == 'j') |
168 | { | 164 | { |
169 | long val[2]; | 165 | long val[2]; |
@@ -171,7 +167,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
171 | long l[2]; | 167 | long l[2]; |
172 | if (code == CONST_DOUBLE) | 168 | if (code == CONST_DOUBLE) |
173 | { | 169 | { |
174 | @@ -2463,12 +2478,12 @@ print_operand (FILE * file, rtx op, int letter) | 170 | @@ -2468,12 +2483,12 @@ print_operand (FILE * file, rtx op, int letter) |
175 | val[0] = l[WORDS_BIG_ENDIAN != 0]; | 171 | val[0] = l[WORDS_BIG_ENDIAN != 0]; |
176 | } | 172 | } |
177 | } | 173 | } |
@@ -188,7 +184,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
188 | } | 184 | } |
189 | else if (code == CONST_DOUBLE) | 185 | else if (code == CONST_DOUBLE) |
190 | { | 186 | { |
191 | @@ -2662,7 +2677,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority) | 187 | @@ -2667,7 +2682,10 @@ microblaze_asm_constructor (rtx symbol ATTRIBUTE_UNUSED, int priority) |
192 | 188 | ||
193 | switch_to_section (get_section (section, 0, NULL)); | 189 | switch_to_section (get_section (section, 0, NULL)); |
194 | assemble_align (POINTER_SIZE); | 190 | assemble_align (POINTER_SIZE); |
@@ -200,7 +196,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
200 | output_addr_const (asm_out_file, symbol); | 196 | output_addr_const (asm_out_file, symbol); |
201 | fputs ("\n", asm_out_file); | 197 | fputs ("\n", asm_out_file); |
202 | } | 198 | } |
203 | @@ -2685,7 +2703,10 @@ microblaze_asm_destructor (rtx symbol, int priority) | 199 | @@ -2690,7 +2708,10 @@ microblaze_asm_destructor (rtx symbol, int priority) |
204 | 200 | ||
205 | switch_to_section (get_section (section, 0, NULL)); | 201 | switch_to_section (get_section (section, 0, NULL)); |
206 | assemble_align (POINTER_SIZE); | 202 | assemble_align (POINTER_SIZE); |
@@ -212,7 +208,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
212 | output_addr_const (asm_out_file, symbol); | 208 | output_addr_const (asm_out_file, symbol); |
213 | fputs ("\n", asm_out_file); | 209 | fputs ("\n", asm_out_file); |
214 | } | 210 | } |
215 | @@ -2751,7 +2772,7 @@ save_restore_insns (int prologue) | 211 | @@ -2756,7 +2777,7 @@ save_restore_insns (int prologue) |
216 | /* For interrupt_handlers, need to save/restore the MSR. */ | 212 | /* For interrupt_handlers, need to save/restore the MSR. */ |
217 | if (microblaze_is_interrupt_variant ()) | 213 | if (microblaze_is_interrupt_variant ()) |
218 | { | 214 | { |
@@ -221,7 +217,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
221 | gen_rtx_PLUS (Pmode, base_reg_rtx, | 217 | gen_rtx_PLUS (Pmode, base_reg_rtx, |
222 | GEN_INT (current_frame_info. | 218 | GEN_INT (current_frame_info. |
223 | gp_offset - | 219 | gp_offset - |
224 | @@ -2759,8 +2780,8 @@ save_restore_insns (int prologue) | 220 | @@ -2764,8 +2785,8 @@ save_restore_insns (int prologue) |
225 | 221 | ||
226 | /* Do not optimize in flow analysis. */ | 222 | /* Do not optimize in flow analysis. */ |
227 | MEM_VOLATILE_P (isr_mem_rtx) = 1; | 223 | MEM_VOLATILE_P (isr_mem_rtx) = 1; |
@@ -232,7 +228,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
232 | } | 228 | } |
233 | 229 | ||
234 | if (microblaze_is_interrupt_variant () && !prologue) | 230 | if (microblaze_is_interrupt_variant () && !prologue) |
235 | @@ -2768,8 +2789,8 @@ save_restore_insns (int prologue) | 231 | @@ -2773,8 +2794,8 @@ save_restore_insns (int prologue) |
236 | emit_move_insn (isr_reg_rtx, isr_mem_rtx); | 232 | emit_move_insn (isr_reg_rtx, isr_mem_rtx); |
237 | emit_move_insn (isr_msr_rtx, isr_reg_rtx); | 233 | emit_move_insn (isr_msr_rtx, isr_reg_rtx); |
238 | /* Do not optimize in flow analysis. */ | 234 | /* Do not optimize in flow analysis. */ |
@@ -243,7 +239,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
243 | } | 239 | } |
244 | 240 | ||
245 | for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++) | 241 | for (regno = GP_REG_FIRST; regno <= GP_REG_LAST; regno++) |
246 | @@ -2780,9 +2801,9 @@ save_restore_insns (int prologue) | 242 | @@ -2785,9 +2806,9 @@ save_restore_insns (int prologue) |
247 | /* Don't handle here. Already handled as the first register. */ | 243 | /* Don't handle here. Already handled as the first register. */ |
248 | continue; | 244 | continue; |
249 | 245 | ||
@@ -255,7 +251,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
255 | if (microblaze_is_interrupt_variant () || save_volatiles) | 251 | if (microblaze_is_interrupt_variant () || save_volatiles) |
256 | /* Do not optimize in flow analysis. */ | 252 | /* Do not optimize in flow analysis. */ |
257 | MEM_VOLATILE_P (mem_rtx) = 1; | 253 | MEM_VOLATILE_P (mem_rtx) = 1; |
258 | @@ -2797,7 +2818,7 @@ save_restore_insns (int prologue) | 254 | @@ -2802,7 +2823,7 @@ save_restore_insns (int prologue) |
259 | insn = emit_move_insn (reg_rtx, mem_rtx); | 255 | insn = emit_move_insn (reg_rtx, mem_rtx); |
260 | } | 256 | } |
261 | 257 | ||
@@ -264,7 +260,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
264 | } | 260 | } |
265 | } | 261 | } |
266 | 262 | ||
267 | @@ -2807,8 +2828,8 @@ save_restore_insns (int prologue) | 263 | @@ -2812,8 +2833,8 @@ save_restore_insns (int prologue) |
268 | emit_move_insn (isr_mem_rtx, isr_reg_rtx); | 264 | emit_move_insn (isr_mem_rtx, isr_reg_rtx); |
269 | 265 | ||
270 | /* Do not optimize in flow analysis. */ | 266 | /* Do not optimize in flow analysis. */ |
@@ -275,7 +271,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
275 | } | 271 | } |
276 | 272 | ||
277 | /* Done saving and restoring */ | 273 | /* Done saving and restoring */ |
278 | @@ -2898,7 +2919,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) | 274 | @@ -2903,7 +2924,10 @@ microblaze_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) |
279 | 275 | ||
280 | switch_to_section (s); | 276 | switch_to_section (s); |
281 | assemble_align (POINTER_SIZE); | 277 | assemble_align (POINTER_SIZE); |
@@ -287,7 +283,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
287 | output_addr_const (asm_out_file, symbol); | 283 | output_addr_const (asm_out_file, symbol); |
288 | fputs ("\n", asm_out_file); | 284 | fputs ("\n", asm_out_file); |
289 | } | 285 | } |
290 | @@ -3042,10 +3066,10 @@ microblaze_expand_prologue (void) | 286 | @@ -3047,10 +3071,10 @@ microblaze_expand_prologue (void) |
291 | { | 287 | { |
292 | if (offset != 0) | 288 | if (offset != 0) |
293 | ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); | 289 | ptr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (offset)); |
@@ -301,7 +297,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
301 | } | 297 | } |
302 | } | 298 | } |
303 | 299 | ||
304 | @@ -3054,15 +3078,23 @@ microblaze_expand_prologue (void) | 300 | @@ -3059,15 +3083,23 @@ microblaze_expand_prologue (void) |
305 | rtx fsiz_rtx = GEN_INT (fsiz); | 301 | rtx fsiz_rtx = GEN_INT (fsiz); |
306 | 302 | ||
307 | rtx_insn *insn = NULL; | 303 | rtx_insn *insn = NULL; |
@@ -327,7 +323,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
327 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, | 323 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, |
328 | const0_rtx)); | 324 | const0_rtx)); |
329 | 325 | ||
330 | @@ -3070,7 +3102,7 @@ microblaze_expand_prologue (void) | 326 | @@ -3075,7 +3107,7 @@ microblaze_expand_prologue (void) |
331 | /* Do not optimize in flow analysis. */ | 327 | /* Do not optimize in flow analysis. */ |
332 | MEM_VOLATILE_P (mem_rtx) = 1; | 328 | MEM_VOLATILE_P (mem_rtx) = 1; |
333 | 329 | ||
@@ -336,7 +332,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
336 | insn = emit_move_insn (mem_rtx, reg_rtx); | 332 | insn = emit_move_insn (mem_rtx, reg_rtx); |
337 | RTX_FRAME_RELATED_P (insn) = 1; | 333 | RTX_FRAME_RELATED_P (insn) = 1; |
338 | } | 334 | } |
339 | @@ -3180,12 +3212,12 @@ microblaze_expand_epilogue (void) | 335 | @@ -3185,12 +3217,12 @@ microblaze_expand_epilogue (void) |
340 | if (!crtl->is_leaf || interrupt_handler) | 336 | if (!crtl->is_leaf || interrupt_handler) |
341 | { | 337 | { |
342 | mem_rtx = | 338 | mem_rtx = |
@@ -351,7 +347,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
351 | emit_move_insn (reg_rtx, mem_rtx); | 347 | emit_move_insn (reg_rtx, mem_rtx); |
352 | } | 348 | } |
353 | 349 | ||
354 | @@ -3201,15 +3233,25 @@ microblaze_expand_epilogue (void) | 350 | @@ -3206,15 +3238,25 @@ microblaze_expand_epilogue (void) |
355 | /* _restore_ registers for epilogue. */ | 351 | /* _restore_ registers for epilogue. */ |
356 | save_restore_insns (0); | 352 | save_restore_insns (0); |
357 | emit_insn (gen_blockage ()); | 353 | emit_insn (gen_blockage ()); |
@@ -381,7 +377,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
381 | emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + | 377 | emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + |
382 | MB_ABI_SUB_RETURN_ADDR_REGNUM))); | 378 | MB_ABI_SUB_RETURN_ADDR_REGNUM))); |
383 | } | 379 | } |
384 | @@ -3376,9 +3418,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, | 380 | @@ -3381,9 +3423,14 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, |
385 | else | 381 | else |
386 | this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM); | 382 | this_rtx = gen_rtx_REG (Pmode, MB_ABI_FIRST_ARG_REGNUM); |
387 | 383 | ||
@@ -398,7 +394,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
398 | 394 | ||
399 | /* Apply the offset from the vtable, if required. */ | 395 | /* Apply the offset from the vtable, if required. */ |
400 | if (vcall_offset) | 396 | if (vcall_offset) |
401 | @@ -3391,7 +3438,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, | 397 | @@ -3396,7 +3443,10 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED, |
402 | rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx); | 398 | rtx loc = gen_rtx_PLUS (Pmode, temp1, vcall_offset_rtx); |
403 | emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc)); | 399 | emit_move_insn (temp1, gen_rtx_MEM (Pmode, loc)); |
404 | 400 | ||
@@ -410,7 +406,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
410 | } | 406 | } |
411 | 407 | ||
412 | /* Generate a tail call to the target function. */ | 408 | /* Generate a tail call to the target function. */ |
413 | @@ -3622,9 +3672,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) | 409 | @@ -3631,9 +3681,9 @@ microblaze_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) |
414 | emit_block_move (m_tramp, assemble_trampoline_template (), | 410 | emit_block_move (m_tramp, assemble_trampoline_template (), |
415 | GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL); | 411 | GEN_INT (6*UNITS_PER_WORD), BLOCK_OP_NORMAL); |
416 | 412 | ||
@@ -422,7 +418,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
422 | emit_move_insn (mem, fnaddr); | 418 | emit_move_insn (mem, fnaddr); |
423 | } | 419 | } |
424 | 420 | ||
425 | @@ -3648,7 +3698,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) | 421 | @@ -3657,7 +3707,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) |
426 | { | 422 | { |
427 | comp_reg = cmp_op0; | 423 | comp_reg = cmp_op0; |
428 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); | 424 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); |
@@ -431,7 +427,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
431 | emit_jump_insn (gen_condjump (condition, label1)); | 427 | emit_jump_insn (gen_condjump (condition, label1)); |
432 | else | 428 | else |
433 | emit_jump_insn (gen_long_condjump (condition, label1)); | 429 | emit_jump_insn (gen_long_condjump (condition, label1)); |
434 | @@ -3767,7 +3817,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) | 430 | @@ -3776,7 +3826,7 @@ microblaze_expand_conditional_branch_sf (rtx operands[]) |
435 | rtx comp_reg = gen_reg_rtx (SImode); | 431 | rtx comp_reg = gen_reg_rtx (SImode); |
436 | 432 | ||
437 | emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); | 433 | emit_insn (gen_cstoresf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); |
@@ -440,7 +436,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
440 | emit_jump_insn (gen_condjump (condition, operands[3])); | 436 | emit_jump_insn (gen_condjump (condition, operands[3])); |
441 | } | 437 | } |
442 | 438 | ||
443 | @@ -3777,10 +3827,10 @@ microblaze_expand_conditional_branch_df (rtx operands[]) | 439 | @@ -3786,10 +3836,10 @@ microblaze_expand_conditional_branch_df (rtx operands[]) |
444 | rtx condition; | 440 | rtx condition; |
445 | rtx cmp_op0 = XEXP (operands[0], 0); | 441 | rtx cmp_op0 = XEXP (operands[0], 0); |
446 | rtx cmp_op1 = XEXP (operands[0], 1); | 442 | rtx cmp_op1 = XEXP (operands[0], 1); |
@@ -453,7 +449,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
453 | emit_jump_insn (gen_long_condjump (condition, operands[3])); | 449 | emit_jump_insn (gen_long_condjump (condition, operands[3])); |
454 | } | 450 | } |
455 | 451 | ||
456 | @@ -3801,8 +3851,8 @@ microblaze_expand_divide (rtx operands[]) | 452 | @@ -3810,8 +3860,8 @@ microblaze_expand_divide (rtx operands[]) |
457 | { | 453 | { |
458 | /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */ | 454 | /* Table lookup software divides. Works for all (nr/dr) where (0 <= nr,dr <= 15). */ |
459 | 455 | ||
@@ -464,7 +460,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
464 | rtx regqi = gen_reg_rtx (QImode); | 460 | rtx regqi = gen_reg_rtx (QImode); |
465 | rtx_code_label *div_label = gen_label_rtx (); | 461 | rtx_code_label *div_label = gen_label_rtx (); |
466 | rtx_code_label *div_end_label = gen_label_rtx (); | 462 | rtx_code_label *div_end_label = gen_label_rtx (); |
467 | @@ -3810,17 +3860,31 @@ microblaze_expand_divide (rtx operands[]) | 463 | @@ -3819,17 +3869,31 @@ microblaze_expand_divide (rtx operands[]) |
468 | rtx mem_rtx; | 464 | rtx mem_rtx; |
469 | rtx ret; | 465 | rtx ret; |
470 | rtx_insn *jump, *cjump, *insn; | 466 | rtx_insn *jump, *cjump, *insn; |
@@ -503,7 +499,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
503 | mem_rtx = gen_rtx_MEM (QImode, | 499 | mem_rtx = gen_rtx_MEM (QImode, |
504 | gen_rtx_PLUS (QImode, regt1, div_table_rtx)); | 500 | gen_rtx_PLUS (QImode, regt1, div_table_rtx)); |
505 | 501 | ||
506 | @@ -3967,7 +4031,7 @@ insert_wic_for_ilb_runout (rtx_insn *first) | 502 | @@ -3976,7 +4040,7 @@ insert_wic_for_ilb_runout (rtx_insn *first) |
507 | { | 503 | { |
508 | insn = | 504 | insn = |
509 | emit_insn_before (gen_iprefetch | 505 | emit_insn_before (gen_iprefetch |
@@ -512,7 +508,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
512 | before_4); | 508 | before_4); |
513 | recog_memoized (insn); | 509 | recog_memoized (insn); |
514 | INSN_LOCATION (insn) = INSN_LOCATION (before_4); | 510 | INSN_LOCATION (insn) = INSN_LOCATION (before_4); |
515 | @@ -3977,7 +4041,27 @@ insert_wic_for_ilb_runout (rtx_insn *first) | 511 | @@ -3986,7 +4050,27 @@ insert_wic_for_ilb_runout (rtx_insn *first) |
516 | } | 512 | } |
517 | } | 513 | } |
518 | } | 514 | } |
@@ -541,7 +537,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
541 | /* Insert instruction prefetch instruction at the fall | 537 | /* Insert instruction prefetch instruction at the fall |
542 | through path of the function call. */ | 538 | through path of the function call. */ |
543 | 539 | ||
544 | @@ -4130,6 +4214,17 @@ microblaze_starting_frame_offset (void) | 540 | @@ -4139,6 +4223,17 @@ microblaze_starting_frame_offset (void) |
545 | #undef TARGET_LRA_P | 541 | #undef TARGET_LRA_P |
546 | #define TARGET_LRA_P hook_bool_void_false | 542 | #define TARGET_LRA_P hook_bool_void_false |
547 | 543 | ||
@@ -559,7 +555,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
559 | #undef TARGET_FRAME_POINTER_REQUIRED | 555 | #undef TARGET_FRAME_POINTER_REQUIRED |
560 | #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required | 556 | #define TARGET_FRAME_POINTER_REQUIRED microblaze_frame_pointer_required |
561 | 557 | ||
562 | @@ -4139,6 +4234,9 @@ microblaze_starting_frame_offset (void) | 558 | @@ -4148,6 +4243,9 @@ microblaze_starting_frame_offset (void) |
563 | #undef TARGET_TRAMPOLINE_INIT | 559 | #undef TARGET_TRAMPOLINE_INIT |
564 | #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init | 560 | #define TARGET_TRAMPOLINE_INIT microblaze_trampoline_init |
565 | 561 | ||
@@ -570,7 +566,7 @@ index 1ac889041b8..9d3628c6816 100644 | |||
570 | #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote | 566 | #define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote |
571 | 567 | ||
572 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 568 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
573 | index 885abc6e5a1..5f30b8ac195 100644 | 569 | index f35f7075ce3..3aee003de0d 100644 |
574 | --- a/gcc/config/microblaze/microblaze.h | 570 | --- a/gcc/config/microblaze/microblaze.h |
575 | +++ b/gcc/config/microblaze/microblaze.h | 571 | +++ b/gcc/config/microblaze/microblaze.h |
576 | @@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe; | 572 | @@ -173,7 +173,6 @@ extern enum pipeline_type microblaze_pipe; |
@@ -739,7 +735,7 @@ index 885abc6e5a1..5f30b8ac195 100644 | |||
739 | /* Default to -G 8 */ | 735 | /* Default to -G 8 */ |
740 | #ifndef MICROBLAZE_DEFAULT_GVALUE | 736 | #ifndef MICROBLAZE_DEFAULT_GVALUE |
741 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 737 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
742 | index 40711fe224b..c99150ff0da 100644 | 738 | index 3f572fe2351..97da9aad6fd 100644 |
743 | --- a/gcc/config/microblaze/microblaze.md | 739 | --- a/gcc/config/microblaze/microblaze.md |
744 | +++ b/gcc/config/microblaze/microblaze.md | 740 | +++ b/gcc/config/microblaze/microblaze.md |
745 | @@ -26,6 +26,7 @@ | 741 | @@ -26,6 +26,7 @@ |
@@ -1799,7 +1795,7 @@ index 4c25cfe15e7..965132b3513 100644 | |||
1799 | MULTILIB_EXCEPTIONS += mxl-multiply-high/m64 | 1795 | MULTILIB_EXCEPTIONS += mxl-multiply-high/m64 |
1800 | MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 | 1796 | MULTILIB_EXCEPTIONS += *mxl-multiply-high/mlittle-endian/m64 |
1801 | diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S | 1797 | diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S |
1802 | index cbbe32d5f6a..ec797e1bf17 100644 | 1798 | index 0f24adb750d..1a89a0a2ffa 100644 |
1803 | --- a/libgcc/config/microblaze/crti.S | 1799 | --- a/libgcc/config/microblaze/crti.S |
1804 | +++ b/libgcc/config/microblaze/crti.S | 1800 | +++ b/libgcc/config/microblaze/crti.S |
1805 | @@ -40,7 +40,7 @@ | 1801 | @@ -40,7 +40,7 @@ |
@@ -1819,7 +1815,7 @@ index cbbe32d5f6a..ec797e1bf17 100644 | |||
1819 | + addik r1, r1, -16 | 1815 | + addik r1, r1, -16 |
1820 | sw r15, r0, r1 | 1816 | sw r15, r0, r1 |
1821 | diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S | 1817 | diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S |
1822 | index cb8d8ef2bfa..977b43b9436 100644 | 1818 | index d38d7ab9f98..29a004973ae 100644 |
1823 | --- a/libgcc/config/microblaze/crtn.S | 1819 | --- a/libgcc/config/microblaze/crtn.S |
1824 | +++ b/libgcc/config/microblaze/crtn.S | 1820 | +++ b/libgcc/config/microblaze/crtn.S |
1825 | @@ -33,9 +33,9 @@ | 1821 | @@ -33,9 +33,9 @@ |
@@ -2442,5 +2438,5 @@ index 00000000000..7f5cd23f9a1 | |||
2442 | + .size __umoddi3, . - __umoddi3 | 2438 | + .size __umoddi3, . - __umoddi3 |
2443 | +#endif | 2439 | +#endif |
2444 | -- | 2440 | -- |
2445 | 2.37.1 (Apple Git-137.1) | 2441 | 2.34.1 |
2446 | 2442 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0029-re-arrangement-of-the-compare-branches.patch index 0a275c0b..448e850f 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0029-re-arrangement-of-the-compare-branches.patch | |||
@@ -1,12 +1,7 @@ | |||
1 | From 10d5e7d6cad5e7349b88b7469eb5ae20d87eb908 Mon Sep 17 00:00:00 2001 | 1 | From 870bfd716fcddeb72660f3176fb2a68aaa5ecc0e Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 14:45:15 +0530 | 3 | Date: Tue, 13 Sep 2022 14:45:15 +0530 |
4 | Subject: [PATCH 29/53] [Patch,MicroBlaze] : re-arrangement of the compare | 4 | Subject: [PATCH 29/54] re-arrangement of the compare branches |
5 | branches | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 5 | ||
11 | --- | 6 | --- |
12 | gcc/config/microblaze/microblaze.cc | 28 ++---- | 7 | gcc/config/microblaze/microblaze.cc | 28 ++---- |
@@ -14,10 +9,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
14 | 2 files changed, 73 insertions(+), 96 deletions(-) | 9 | 2 files changed, 73 insertions(+), 96 deletions(-) |
15 | 10 | ||
16 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 11 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
17 | index 9d3628c6816..4792e3ba370 100644 | 12 | index 46bbf8a21e7..de3c95a005e 100644 |
18 | --- a/gcc/config/microblaze/microblaze.cc | 13 | --- a/gcc/config/microblaze/microblaze.cc |
19 | +++ b/gcc/config/microblaze/microblaze.cc | 14 | +++ b/gcc/config/microblaze/microblaze.cc |
20 | @@ -3698,11 +3698,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) | 15 | @@ -3707,11 +3707,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) |
21 | { | 16 | { |
22 | comp_reg = cmp_op0; | 17 | comp_reg = cmp_op0; |
23 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); | 18 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); |
@@ -30,7 +25,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
30 | } | 25 | } |
31 | 26 | ||
32 | else if (code == EQ || code == NE) | 27 | else if (code == EQ || code == NE) |
33 | @@ -3713,10 +3709,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) | 28 | @@ -3722,10 +3718,7 @@ microblaze_expand_conditional_branch (machine_mode mode, rtx operands[]) |
34 | else | 29 | else |
35 | emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1)); | 30 | emit_insn (gen_xordi3 (comp_reg, cmp_op0, cmp_op1)); |
36 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); | 31 | condition = gen_rtx_fmt_ee (signed_condition (code), mode, comp_reg, const0_rtx); |
@@ -42,7 +37,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
42 | } | 37 | } |
43 | else | 38 | else |
44 | { | 39 | { |
45 | @@ -3749,10 +3742,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) | 40 | @@ -3758,10 +3751,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) |
46 | comp_reg = cmp_op0; | 41 | comp_reg = cmp_op0; |
47 | condition = gen_rtx_fmt_ee (signed_condition (code), | 42 | condition = gen_rtx_fmt_ee (signed_condition (code), |
48 | mode, comp_reg, const0_rtx); | 43 | mode, comp_reg, const0_rtx); |
@@ -54,7 +49,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
54 | } | 49 | } |
55 | else if (code == EQ) | 50 | else if (code == EQ) |
56 | { | 51 | { |
57 | @@ -3767,10 +3757,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) | 52 | @@ -3776,10 +3766,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) |
58 | cmp_op1)); | 53 | cmp_op1)); |
59 | } | 54 | } |
60 | condition = gen_rtx_EQ (mode, comp_reg, const0_rtx); | 55 | condition = gen_rtx_EQ (mode, comp_reg, const0_rtx); |
@@ -66,7 +61,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
66 | 61 | ||
67 | } | 62 | } |
68 | else if (code == NE) | 63 | else if (code == NE) |
69 | @@ -3786,10 +3773,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) | 64 | @@ -3795,10 +3782,7 @@ microblaze_expand_conditional_branch_reg (machine_mode mode, rtx operands[]) |
70 | cmp_op1)); | 65 | cmp_op1)); |
71 | } | 66 | } |
72 | condition = gen_rtx_NE (mode, comp_reg, const0_rtx); | 67 | condition = gen_rtx_NE (mode, comp_reg, const0_rtx); |
@@ -78,7 +73,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
78 | } | 73 | } |
79 | else | 74 | else |
80 | { | 75 | { |
81 | @@ -3831,7 +3815,7 @@ microblaze_expand_conditional_branch_df (rtx operands[]) | 76 | @@ -3840,7 +3824,7 @@ microblaze_expand_conditional_branch_df (rtx operands[]) |
82 | 77 | ||
83 | emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); | 78 | emit_insn (gen_cstoredf4 (comp_reg, operands[0], cmp_op0, cmp_op1)); |
84 | condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx); | 79 | condition = gen_rtx_NE (Pmode, comp_reg, const0_rtx); |
@@ -88,7 +83,7 @@ index 9d3628c6816..4792e3ba370 100644 | |||
88 | 83 | ||
89 | /* Implement TARGET_FRAME_POINTER_REQUIRED. */ | 84 | /* Implement TARGET_FRAME_POINTER_REQUIRED. */ |
90 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 85 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
91 | index c99150ff0da..566c53ba228 100644 | 86 | index 97da9aad6fd..31bf04e4abd 100644 |
92 | --- a/gcc/config/microblaze/microblaze.md | 87 | --- a/gcc/config/microblaze/microblaze.md |
93 | +++ b/gcc/config/microblaze/microblaze.md | 88 | +++ b/gcc/config/microblaze/microblaze.md |
94 | @@ -2268,7 +2268,27 @@ else | 89 | @@ -2268,7 +2268,27 @@ else |
@@ -269,5 +264,5 @@ index c99150ff0da..566c53ba228 100644 | |||
269 | ;; Unconditional branches | 264 | ;; Unconditional branches |
270 | ;;---------------------------------------------------------------- | 265 | ;;---------------------------------------------------------------- |
271 | -- | 266 | -- |
272 | 2.37.1 (Apple Git-137.1) | 267 | 2.34.1 |
273 | 268 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch index bda4e7da..92951b08 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch | |||
@@ -1,19 +1,15 @@ | |||
1 | From af910dd71faec99838e421dd76fd5231e34bee3e Mon Sep 17 00:00:00 2001 | 1 | From e4713a382c1e6729cd3228284def9fa59da70028 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 8 Aug 2018 17:37:26 +0530 | 3 | Date: Wed, 8 Aug 2018 17:37:26 +0530 |
4 | Subject: [PATCH 30/53] [Patch,Microblaze] : previous commit broke the | 4 | Subject: [PATCH 30/54] previous commit broke the handling of SI Branch compare |
5 | handling of SI Branch compare for Microblaze 32-bit.. | 5 | for Microblaze 32-bit.. |
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 6 | ||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/microblaze.md | 4 ++-- | 8 | gcc/config/microblaze/microblaze.md | 4 ++-- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 9 | 1 file changed, 2 insertions(+), 2 deletions(-) |
14 | 10 | ||
15 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 11 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
16 | index 566c53ba228..e54888550f6 100644 | 12 | index 31bf04e4abd..e37a7704195 100644 |
17 | --- a/gcc/config/microblaze/microblaze.md | 13 | --- a/gcc/config/microblaze/microblaze.md |
18 | +++ b/gcc/config/microblaze/microblaze.md | 14 | +++ b/gcc/config/microblaze/microblaze.md |
19 | @@ -2224,8 +2224,8 @@ else | 15 | @@ -2224,8 +2224,8 @@ else |
@@ -28,5 +24,5 @@ index 566c53ba228..e54888550f6 100644 | |||
28 | (pc)))] | 24 | (pc)))] |
29 | "" | 25 | "" |
30 | -- | 26 | -- |
31 | 2.37.1 (Apple Git-137.1) | 27 | 2.34.1 |
32 | 28 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0031-Support-of-multilibs-with-m64.patch index a9a7a03d..40009bf0 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0031-Support-of-multilibs-with-m64.patch | |||
@@ -1,16 +1,12 @@ | |||
1 | From 6921698fc0acf40cb036cf71649762e7a21bf604 Mon Sep 17 00:00:00 2001 | 1 | From 0673e986a5c06cba6507e0361ebdb9cf309f6a4c Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 11 Sep 2018 13:43:48 +0530 | 3 | Date: Tue, 11 Sep 2018 13:43:48 +0530 |
4 | Subject: [PATCH 31/53] [Patch, Microblaze] : Support of multilibs with m64 ... | 4 | Subject: [PATCH 31/54] Support of multilibs with m64 ... |
5 | 5 | ||
6 | Conflicts: | 6 | Conflicts: |
7 | gcc/config/microblaze/microblaze-c.c | 7 | gcc/config/microblaze/microblaze-c.c |
8 | 8 | ||
9 | signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com> | 9 | signed-off-by : Mahesh Bodapati <mbodapat@xilinx.com> |
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
14 | --- | 10 | --- |
15 | gcc/config/microblaze/microblaze-c.cc | 1 + | 11 | gcc/config/microblaze/microblaze-c.cc | 1 + |
16 | gcc/config/microblaze/t-microblaze | 15 ++++++--------- | 12 | gcc/config/microblaze/t-microblaze | 15 ++++++--------- |
@@ -18,7 +14,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
18 | 3 files changed, 10 insertions(+), 17 deletions(-) | 14 | 3 files changed, 10 insertions(+), 17 deletions(-) |
19 | 15 | ||
20 | diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc | 16 | diff --git a/gcc/config/microblaze/microblaze-c.cc b/gcc/config/microblaze/microblaze-c.cc |
21 | index ef8d2430565..4e83a84b112 100644 | 17 | index af73de0709c..c7cb139d25a 100644 |
22 | --- a/gcc/config/microblaze/microblaze-c.cc | 18 | --- a/gcc/config/microblaze/microblaze-c.cc |
23 | +++ b/gcc/config/microblaze/microblaze-c.cc | 19 | +++ b/gcc/config/microblaze/microblaze-c.cc |
24 | @@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile) | 20 | @@ -102,6 +102,7 @@ microblaze_cpp_define (cpp_reader *pfile) |
@@ -77,5 +73,5 @@ index 35021b24b7d..8d954a49575 100644 | |||
77 | - $(srcdir)/config/microblaze/divsi3_table.c \ | 73 | - $(srcdir)/config/microblaze/divsi3_table.c \ |
78 | + $(srcdir)/config/microblaze/divsi3_table.c | 74 | + $(srcdir)/config/microblaze/divsi3_table.c |
79 | -- | 75 | -- |
80 | 2.37.1 (Apple Git-137.1) | 76 | 2.34.1 |
81 | 77 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch index cb62c5a7..df7ef8da 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch | |||
@@ -1,12 +1,8 @@ | |||
1 | From 7f827e73dff27c764e5f475613e3e06ae546103f Mon Sep 17 00:00:00 2001 | 1 | From 63e3adfb493e225c55536e72cfbf8be70977cdc8 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 15:24:25 +0530 | 3 | Date: Tue, 13 Sep 2022 15:24:25 +0530 |
4 | Subject: [PATCH 32/53] [Patch,MicroBlaze]: Fixed issues like: 1 Interrupt | 4 | Subject: [PATCH 32/54] Fixed issues like: 1 Interrupt alignment issue 2 Sign |
5 | alignment issue 2 Sign extension issue | 5 | extension issue |
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 6 | ||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/microblaze.cc | 16 ++++++++++------ | 8 | gcc/config/microblaze/microblaze.cc | 16 ++++++++++------ |
@@ -14,10 +10,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
14 | 2 files changed, 11 insertions(+), 7 deletions(-) | 10 | 2 files changed, 11 insertions(+), 7 deletions(-) |
15 | 11 | ||
16 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 12 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
17 | index 4792e3ba370..f1da145232a 100644 | 13 | index de3c95a005e..6fbecb43e4a 100644 |
18 | --- a/gcc/config/microblaze/microblaze.cc | 14 | --- a/gcc/config/microblaze/microblaze.cc |
19 | +++ b/gcc/config/microblaze/microblaze.cc | 15 | +++ b/gcc/config/microblaze/microblaze.cc |
20 | @@ -2178,9 +2178,14 @@ compute_frame_size (HOST_WIDE_INT size) | 16 | @@ -2183,9 +2183,14 @@ compute_frame_size (HOST_WIDE_INT size) |
21 | 17 | ||
22 | total_size += gp_reg_size; | 18 | total_size += gp_reg_size; |
23 | 19 | ||
@@ -34,7 +30,7 @@ index 4792e3ba370..f1da145232a 100644 | |||
34 | 30 | ||
35 | /* No space to be allocated for link register in leaf functions with no other | 31 | /* No space to be allocated for link register in leaf functions with no other |
36 | stack requirements. */ | 32 | stack requirements. */ |
37 | @@ -2465,7 +2470,6 @@ print_operand (FILE * file, rtx op, int letter) | 33 | @@ -2470,7 +2475,6 @@ print_operand (FILE * file, rtx op, int letter) |
38 | else if (letter == 'h' || letter == 'j') | 34 | else if (letter == 'h' || letter == 'j') |
39 | { | 35 | { |
40 | long val[2]; | 36 | long val[2]; |
@@ -42,7 +38,7 @@ index 4792e3ba370..f1da145232a 100644 | |||
42 | long l[2]; | 38 | long l[2]; |
43 | if (code == CONST_DOUBLE) | 39 | if (code == CONST_DOUBLE) |
44 | { | 40 | { |
45 | @@ -2480,10 +2484,10 @@ print_operand (FILE * file, rtx op, int letter) | 41 | @@ -2485,10 +2489,10 @@ print_operand (FILE * file, rtx op, int letter) |
46 | } | 42 | } |
47 | else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF) | 43 | else if (code == CONST_INT || code == CONST)// || code == SYMBOL_REF ||code == LABEL_REF) |
48 | { | 44 | { |
@@ -57,7 +53,7 @@ index 4792e3ba370..f1da145232a 100644 | |||
57 | else if (code == CONST_DOUBLE) | 53 | else if (code == CONST_DOUBLE) |
58 | { | 54 | { |
59 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 55 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
60 | index e54888550f6..4e5d21a1f4c 100644 | 56 | index e37a7704195..72c2a9a38cd 100644 |
61 | --- a/gcc/config/microblaze/microblaze.md | 57 | --- a/gcc/config/microblaze/microblaze.md |
62 | +++ b/gcc/config/microblaze/microblaze.md | 58 | +++ b/gcc/config/microblaze/microblaze.md |
63 | @@ -1096,7 +1096,7 @@ | 59 | @@ -1096,7 +1096,7 @@ |
@@ -70,5 +66,5 @@ index e54888550f6..4e5d21a1f4c 100644 | |||
70 | } | 66 | } |
71 | } | 67 | } |
72 | -- | 68 | -- |
73 | 2.37.1 (Apple Git-137.1) | 69 | 2.34.1 |
74 | 70 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0033-fixed-below-issues-Floating-point-print-issues-in-64.patch index 9760695c..cf1076ea 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0033-fixed-below-issues-Floating-point-print-issues-in-64.patch | |||
@@ -1,16 +1,11 @@ | |||
1 | From 0a86428a345ed359f788a72a0e185053b598e908 Mon Sep 17 00:00:00 2001 | 1 | From 58d4d2ca4fdf90d9d21e7813a599b3491f52e34d Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 15:28:58 +0530 | 3 | Date: Tue, 13 Sep 2022 15:28:58 +0530 |
4 | Subject: [PATCH 33/53] [Patch,MicroBlaze]: fixed below issues: - Floating | 4 | Subject: [PATCH 33/54] fixed below issues: - Floating point print issues in |
5 | point print issues in 64bit mode - Dejagnu Jump related issues - | 5 | 64bit mode - Dejagnu Jump related issues - Added dbl instruction |
6 | Added dbl instruction | ||
7 | 6 | ||
8 | Conflicts: | 7 | Conflicts: |
9 | gcc/config/microblaze/microblaze.md | 8 | gcc/config/microblaze/microblaze.md |
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
14 | --- | 9 | --- |
15 | gcc/config/microblaze/microblaze.cc | 12 +++- | 10 | gcc/config/microblaze/microblaze.cc | 12 +++- |
16 | gcc/config/microblaze/microblaze.h | 7 +++ | 11 | gcc/config/microblaze/microblaze.h | 7 +++ |
@@ -20,10 +15,10 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
20 | 5 files changed, 125 insertions(+), 17 deletions(-) | 15 | 5 files changed, 125 insertions(+), 17 deletions(-) |
21 | 16 | ||
22 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 17 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
23 | index f1da145232a..7a08390a027 100644 | 18 | index 6fbecb43e4a..965a041ea8c 100644 |
24 | --- a/gcc/config/microblaze/microblaze.cc | 19 | --- a/gcc/config/microblaze/microblaze.cc |
25 | +++ b/gcc/config/microblaze/microblaze.cc | 20 | +++ b/gcc/config/microblaze/microblaze.cc |
26 | @@ -2474,7 +2474,12 @@ print_operand (FILE * file, rtx op, int letter) | 21 | @@ -2479,7 +2479,12 @@ print_operand (FILE * file, rtx op, int letter) |
27 | if (code == CONST_DOUBLE) | 22 | if (code == CONST_DOUBLE) |
28 | { | 23 | { |
29 | if (GET_MODE (op) == DFmode) | 24 | if (GET_MODE (op) == DFmode) |
@@ -37,7 +32,7 @@ index f1da145232a..7a08390a027 100644 | |||
37 | else | 32 | else |
38 | { | 33 | { |
39 | REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); | 34 | REAL_VALUE_TO_TARGET_DOUBLE (*CONST_DOUBLE_REAL_VALUE (op), l); |
40 | @@ -3877,7 +3882,10 @@ microblaze_expand_divide (rtx operands[]) | 35 | @@ -3886,7 +3891,10 @@ microblaze_expand_divide (rtx operands[]) |
41 | gen_rtx_PLUS (QImode, regt1, div_table_rtx)); | 36 | gen_rtx_PLUS (QImode, regt1, div_table_rtx)); |
42 | 37 | ||
43 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); | 38 | insn = emit_insn (gen_zero_extendqisi2(operands[0],mem_rtx)); |
@@ -50,7 +45,7 @@ index f1da145232a..7a08390a027 100644 | |||
50 | LABEL_NUSES (div_end_label) = 1; | 45 | LABEL_NUSES (div_end_label) = 1; |
51 | emit_barrier (); | 46 | emit_barrier (); |
52 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 47 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
53 | index 5f30b8ac195..ac4ea43a706 100644 | 48 | index 3aee003de0d..145368db8b8 100644 |
54 | --- a/gcc/config/microblaze/microblaze.h | 49 | --- a/gcc/config/microblaze/microblaze.h |
55 | +++ b/gcc/config/microblaze/microblaze.h | 50 | +++ b/gcc/config/microblaze/microblaze.h |
56 | @@ -888,10 +888,17 @@ do { \ | 51 | @@ -888,10 +888,17 @@ do { \ |
@@ -72,7 +67,7 @@ index 5f30b8ac195..ac4ea43a706 100644 | |||
72 | /* We need to group -lm as well, since some Newlib math functions | 67 | /* We need to group -lm as well, since some Newlib math functions |
73 | reference __errno! */ | 68 | reference __errno! */ |
74 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 69 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
75 | index 4e5d21a1f4c..5a950b49591 100644 | 70 | index 72c2a9a38cd..b3d265d9941 100644 |
76 | --- a/gcc/config/microblaze/microblaze.md | 71 | --- a/gcc/config/microblaze/microblaze.md |
77 | +++ b/gcc/config/microblaze/microblaze.md | 72 | +++ b/gcc/config/microblaze/microblaze.md |
78 | @@ -527,6 +527,15 @@ | 73 | @@ -527,6 +527,15 @@ |
@@ -233,7 +228,7 @@ index 4e5d21a1f4c..5a950b49591 100644 | |||
233 | "" | 228 | "" |
234 | "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8" | 229 | "mfs\t%0,rpc\n\taddik\t%0,%0,_GLOBAL_OFFSET_TABLE_+8" |
235 | diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S | 230 | diff --git a/libgcc/config/microblaze/crti.S b/libgcc/config/microblaze/crti.S |
236 | index ec797e1bf17..15ebe68c277 100644 | 231 | index 1a89a0a2ffa..7cf5664880b 100644 |
237 | --- a/libgcc/config/microblaze/crti.S | 232 | --- a/libgcc/config/microblaze/crti.S |
238 | +++ b/libgcc/config/microblaze/crti.S | 233 | +++ b/libgcc/config/microblaze/crti.S |
239 | @@ -33,11 +33,32 @@ | 234 | @@ -33,11 +33,32 @@ |
@@ -276,7 +271,7 @@ index ec797e1bf17..15ebe68c277 100644 | |||
276 | sw r15, r0, r1 | 271 | sw r15, r0, r1 |
277 | +#endif | 272 | +#endif |
278 | diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S | 273 | diff --git a/libgcc/config/microblaze/crtn.S b/libgcc/config/microblaze/crtn.S |
279 | index 977b43b9436..9de3d4de13c 100644 | 274 | index 29a004973ae..9697b247b6c 100644 |
280 | --- a/libgcc/config/microblaze/crtn.S | 275 | --- a/libgcc/config/microblaze/crtn.S |
281 | +++ b/libgcc/config/microblaze/crtn.S | 276 | +++ b/libgcc/config/microblaze/crtn.S |
282 | @@ -29,7 +29,19 @@ | 277 | @@ -29,7 +29,19 @@ |
@@ -305,5 +300,5 @@ index 977b43b9436..9de3d4de13c 100644 | |||
305 | addik r1, r1, 16 | 300 | addik r1, r1, 16 |
306 | +#endif | 301 | +#endif |
307 | -- | 302 | -- |
308 | 2.37.1 (Apple Git-137.1) | 303 | 2.34.1 |
309 | 304 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0034-Added-double-arith-instructions-Fixed-prologue-stack.patch index 3f07dfa1..ab50b599 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0034-Added-double-arith-instructions-Fixed-prologue-stack.patch | |||
@@ -1,20 +1,16 @@ | |||
1 | From 80c16e39bdf8643184c353e34f146dc8601c2c1e Mon Sep 17 00:00:00 2001 | 1 | From 924a756b5c9edc5d626f68323f67ced2800c75ff Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Tue, 9 Oct 2018 10:07:08 +0530 | 3 | Date: Tue, 9 Oct 2018 10:07:08 +0530 |
4 | Subject: [PATCH 34/53] -Added double arith instructions -Fixed prologue stack | 4 | Subject: [PATCH 34/54] -Added double arith instructions -Fixed prologue stack |
5 | pointer decrement issue | 5 | pointer decrement issue |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++---- | 8 | gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++---- |
13 | gcc/config/microblaze/t-microblaze | 7 +++ | 9 | gcc/config/microblaze/t-microblaze | 7 +++ |
14 | 2 files changed, 76 insertions(+), 9 deletions(-) | 10 | 2 files changed, 76 insertions(+), 9 deletions(-) |
15 | 11 | ||
16 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 12 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
17 | index 5a950b49591..5506aee7be5 100644 | 13 | index b3d265d9941..0f769f320b2 100644 |
18 | --- a/gcc/config/microblaze/microblaze.md | 14 | --- a/gcc/config/microblaze/microblaze.md |
19 | +++ b/gcc/config/microblaze/microblaze.md | 15 | +++ b/gcc/config/microblaze/microblaze.md |
20 | @@ -527,6 +527,66 @@ | 16 | @@ -527,6 +527,66 @@ |
@@ -135,5 +131,5 @@ index 47b869b9303..3522afd4831 100644 | |||
135 | MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high | 131 | MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high |
136 | MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high | 132 | MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high |
137 | -- | 133 | -- |
138 | 2.37.1 (Apple Git-137.1) | 134 | 2.34.1 |
139 | 135 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch index 3ff6a2d0..589ca998 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch | |||
@@ -1,19 +1,15 @@ | |||
1 | From 455216291580ca22767433eec11941c5f2471892 Mon Sep 17 00:00:00 2001 | 1 | From 3ebc7f9a11d66843982544cd0f88f35cc4defb83 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Fri, 12 Oct 2018 16:07:36 +0530 | 3 | Date: Fri, 12 Oct 2018 16:07:36 +0530 |
4 | Subject: [PATCH 35/53] Fixed the issue in the delay slot with swap | 4 | Subject: [PATCH 35/54] Fixed the issue in the delay slot with swap |
5 | instructions | 5 | instructions |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/microblaze.md | 6 ++++++ | 8 | gcc/config/microblaze/microblaze.md | 6 ++++++ |
13 | 1 file changed, 6 insertions(+) | 9 | 1 file changed, 6 insertions(+) |
14 | 10 | ||
15 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 11 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
16 | index 5506aee7be5..4a372f8fd3f 100644 | 12 | index 0f769f320b2..6ada55ac2bc 100644 |
17 | --- a/gcc/config/microblaze/microblaze.md | 13 | --- a/gcc/config/microblaze/microblaze.md |
18 | +++ b/gcc/config/microblaze/microblaze.md | 14 | +++ b/gcc/config/microblaze/microblaze.md |
19 | @@ -443,6 +443,9 @@ | 15 | @@ -443,6 +443,9 @@ |
@@ -37,5 +33,5 @@ index 5506aee7be5..4a372f8fd3f 100644 | |||
37 | 33 | ||
38 | ;;---------------------------------------------------------------- | 34 | ;;---------------------------------------------------------------- |
39 | -- | 35 | -- |
40 | 2.37.1 (Apple Git-137.1) | 36 | 2.34.1 |
41 | 37 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch index 90ddf3eb..8431cb16 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch | |||
@@ -1,13 +1,9 @@ | |||
1 | From b8c468f1bd467213083b59b54af100ee0c6dea9e Mon Sep 17 00:00:00 2001 | 1 | From 9ea2aee3599d2f1fc9d67c7a72cd7c826272a2fa Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Sat, 13 Oct 2018 21:12:43 +0530 | 3 | Date: Sat, 13 Oct 2018 21:12:43 +0530 |
4 | Subject: [PATCH 36/53] Fixed the load store issue with the 32bit arith | 4 | Subject: [PATCH 36/54] Fixed the load store issue with the 32bit arith |
5 | libraries | 5 | libraries |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
11 | --- | 7 | --- |
12 | libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++- | 8 | libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++- |
13 | libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++- | 9 | libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++- |
@@ -17,7 +13,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
17 | 5 files changed, 98 insertions(+), 4 deletions(-) | 13 | 5 files changed, 98 insertions(+), 4 deletions(-) |
18 | 14 | ||
19 | diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S | 15 | diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S |
20 | index 14829ec6701..b464deed481 100644 | 16 | index a449fedd53e..9f04f59104e 100644 |
21 | --- a/libgcc/config/microblaze/divsi3.S | 17 | --- a/libgcc/config/microblaze/divsi3.S |
22 | +++ b/libgcc/config/microblaze/divsi3.S | 18 | +++ b/libgcc/config/microblaze/divsi3.S |
23 | @@ -41,6 +41,17 @@ | 19 | @@ -41,6 +41,17 @@ |
@@ -74,7 +70,7 @@ index 14829ec6701..b464deed481 100644 | |||
74 | .size __divsi3, . - __divsi3 | 70 | .size __divsi3, . - __divsi3 |
75 | 71 | ||
76 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S | 72 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S |
77 | index b8f2e37809d..e0fbd91e766 100644 | 73 | index 282fabfd966..d2f9dc770e4 100644 |
78 | --- a/libgcc/config/microblaze/modsi3.S | 74 | --- a/libgcc/config/microblaze/modsi3.S |
79 | +++ b/libgcc/config/microblaze/modsi3.S | 75 | +++ b/libgcc/config/microblaze/modsi3.S |
80 | @@ -41,6 +41,17 @@ | 76 | @@ -41,6 +41,17 @@ |
@@ -132,7 +128,7 @@ index b8f2e37809d..e0fbd91e766 100644 | |||
132 | .size __modsi3, . - __modsi3 | 128 | .size __modsi3, . - __modsi3 |
133 | 129 | ||
134 | diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S | 130 | diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S |
135 | index f48fcf8270c..657668ef826 100644 | 131 | index 3da55416964..437e2bc309e 100644 |
136 | --- a/libgcc/config/microblaze/mulsi3.S | 132 | --- a/libgcc/config/microblaze/mulsi3.S |
137 | +++ b/libgcc/config/microblaze/mulsi3.S | 133 | +++ b/libgcc/config/microblaze/mulsi3.S |
138 | @@ -41,6 +41,9 @@ | 134 | @@ -41,6 +41,9 @@ |
@@ -146,7 +142,7 @@ index f48fcf8270c..657668ef826 100644 | |||
146 | .frame r1,0,r15 | 142 | .frame r1,0,r15 |
147 | add r3,r0,r0 | 143 | add r3,r0,r0 |
148 | diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S | 144 | diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S |
149 | index 2c321f94b09..fc6a4b5a248 100644 | 145 | index 7f3fe99eb12..496dd6794bf 100644 |
150 | --- a/libgcc/config/microblaze/udivsi3.S | 146 | --- a/libgcc/config/microblaze/udivsi3.S |
151 | +++ b/libgcc/config/microblaze/udivsi3.S | 147 | +++ b/libgcc/config/microblaze/udivsi3.S |
152 | @@ -41,6 +41,16 @@ | 148 | @@ -41,6 +41,16 @@ |
@@ -201,7 +197,7 @@ index 2c321f94b09..fc6a4b5a248 100644 | |||
201 | .end __udivsi3 | 197 | .end __udivsi3 |
202 | .size __udivsi3, . - __udivsi3 | 198 | .size __udivsi3, . - __udivsi3 |
203 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S | 199 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S |
204 | index fbe942dc5f2..b68ba7a5ea6 100644 | 200 | index 6c7f2b3c917..fffc784b4cb 100644 |
205 | --- a/libgcc/config/microblaze/umodsi3.S | 201 | --- a/libgcc/config/microblaze/umodsi3.S |
206 | +++ b/libgcc/config/microblaze/umodsi3.S | 202 | +++ b/libgcc/config/microblaze/umodsi3.S |
207 | @@ -41,6 +41,16 @@ | 203 | @@ -41,6 +41,16 @@ |
@@ -256,5 +252,5 @@ index fbe942dc5f2..b68ba7a5ea6 100644 | |||
256 | .end __umodsi3 | 252 | .end __umodsi3 |
257 | .size __umodsi3, . - __umodsi3 | 253 | .size __umodsi3, . - __umodsi3 |
258 | -- | 254 | -- |
259 | 2.37.1 (Apple Git-137.1) | 255 | 2.34.1 |
260 | 256 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch index 191c7627..8b0fa208 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From 2bc476e64f1bacc27874c152340c004c17bfd942 Mon Sep 17 00:00:00 2001 | 1 | From d2c971646ce103fa17cc32474cb942268bc59258 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Mon, 15 Oct 2018 12:00:10 +0530 | 3 | Date: Mon, 15 Oct 2018 12:00:10 +0530 |
4 | Subject: [PATCH 37/53] extending the Dwarf support to 64bit Microblaze | 4 | Subject: [PATCH 37/54] extending the Dwarf support to 64bit Microblaze |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | gcc/config/microblaze/microblaze.h | 2 +- | 7 | gcc/config/microblaze/microblaze.h | 2 +- |
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | 8 | 1 file changed, 1 insertion(+), 1 deletion(-) |
13 | 9 | ||
14 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 10 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
15 | index ac4ea43a706..56dfc2a3824 100644 | 11 | index 145368db8b8..4258dcde0d1 100644 |
16 | --- a/gcc/config/microblaze/microblaze.h | 12 | --- a/gcc/config/microblaze/microblaze.h |
17 | +++ b/gcc/config/microblaze/microblaze.h | 13 | +++ b/gcc/config/microblaze/microblaze.h |
18 | @@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe; | 14 | @@ -207,7 +207,7 @@ extern enum pipeline_type microblaze_pipe; |
@@ -25,5 +21,5 @@ index ac4ea43a706..56dfc2a3824 100644 | |||
25 | /* Target machine storage layout */ | 21 | /* Target machine storage layout */ |
26 | 22 | ||
27 | -- | 23 | -- |
28 | 2.37.1 (Apple Git-137.1) | 24 | 2.34.1 |
29 | 25 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0038-fixing-the-typo-errors-in-umodsi3-file.patch index 8697be58..d7b78895 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0038-fixing-the-typo-errors-in-umodsi3-file.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From 1e0eaa1330f24d4989af6326ce1af4f613ea0d89 Mon Sep 17 00:00:00 2001 | 1 | From 0c0b4fb378d9035f0c5f847321b543a5c2ff70e2 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Tue, 16 Oct 2018 07:55:46 +0530 | 3 | Date: Tue, 16 Oct 2018 07:55:46 +0530 |
4 | Subject: [PATCH 38/53] fixing the typo errors in umodsi3 file | 4 | Subject: [PATCH 38/54] fixing the typo errors in umodsi3 file |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | libgcc/config/microblaze/umodsi3.S | 6 +++--- | 7 | libgcc/config/microblaze/umodsi3.S | 6 +++--- |
12 | 1 file changed, 3 insertions(+), 3 deletions(-) | 8 | 1 file changed, 3 insertions(+), 3 deletions(-) |
13 | 9 | ||
14 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S | 10 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S |
15 | index b68ba7a5ea6..03be6df1fc6 100644 | 11 | index fffc784b4cb..a706017c634 100644 |
16 | --- a/libgcc/config/microblaze/umodsi3.S | 12 | --- a/libgcc/config/microblaze/umodsi3.S |
17 | +++ b/libgcc/config/microblaze/umodsi3.S | 13 | +++ b/libgcc/config/microblaze/umodsi3.S |
18 | @@ -47,9 +47,9 @@ __umodsi3: | 14 | @@ -47,9 +47,9 @@ __umodsi3: |
@@ -29,5 +25,5 @@ index b68ba7a5ea6..03be6df1fc6 100644 | |||
29 | __umodsi3: | 25 | __umodsi3: |
30 | .frame r1,0,r15 | 26 | .frame r1,0,r15 |
31 | -- | 27 | -- |
32 | 2.37.1 (Apple Git-137.1) | 28 | 2.34.1 |
33 | 29 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch index 032cab4d..27b6efd1 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From 7dbdc5ba78c9237b0a367ca61f448cf3a0277ea6 Mon Sep 17 00:00:00 2001 | 1 | From 8dfc5e76a3b0388bb5c88c5c0072256f3062f3c8 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Wed, 17 Oct 2018 16:56:14 +0530 | 3 | Date: Wed, 17 Oct 2018 16:56:14 +0530 |
4 | Subject: [PATCH 39/53] fixing the 32bit LTO related issue9(1014024) | 4 | Subject: [PATCH 39/54] fixing the 32bit LTO related issue9(1014024) |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- | 7 | gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- |
12 | 1 file changed, 14 insertions(+), 10 deletions(-) | 8 | 1 file changed, 14 insertions(+), 10 deletions(-) |
13 | 9 | ||
14 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 10 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
15 | index 56dfc2a3824..c48b6de0d58 100644 | 11 | index 4258dcde0d1..4d6babfe9c4 100644 |
16 | --- a/gcc/config/microblaze/microblaze.h | 12 | --- a/gcc/config/microblaze/microblaze.h |
17 | +++ b/gcc/config/microblaze/microblaze.h | 13 | +++ b/gcc/config/microblaze/microblaze.h |
18 | @@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe; | 14 | @@ -265,12 +265,14 @@ extern enum pipeline_type microblaze_pipe; |
@@ -68,5 +64,5 @@ index 56dfc2a3824..c48b6de0d58 100644 | |||
68 | #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1) | 64 | #define REGNO_OK_FOR_BASE_P(regno) microblaze_regno_ok_for_base_p ((regno), 1) |
69 | 65 | ||
70 | -- | 66 | -- |
71 | 2.37.1 (Apple Git-137.1) | 67 | 2.34.1 |
72 | 68 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch index 1ed53957..35251ff8 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch | |||
@@ -1,19 +1,15 @@ | |||
1 | From a21a41a0c574b807c7e7edaa7051a0f7395d8142 Mon Sep 17 00:00:00 2001 | 1 | From 411324e0340a32b4a84094b38e5d74f38cf391bc Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Fri, 19 Oct 2018 14:26:25 +0530 | 3 | Date: Fri, 19 Oct 2018 14:26:25 +0530 |
4 | Subject: [PATCH 40/53] Fixed the missing stack adjustment in prologue of | 4 | Subject: [PATCH 40/54] Fixed the missing stack adjustment in prologue of |
5 | modsi3 function | 5 | modsi3 function |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
11 | --- | 7 | --- |
12 | libgcc/config/microblaze/modsi3.S | 1 + | 8 | libgcc/config/microblaze/modsi3.S | 1 + |
13 | 1 file changed, 1 insertion(+) | 9 | 1 file changed, 1 insertion(+) |
14 | 10 | ||
15 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S | 11 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S |
16 | index e0fbd91e766..3ec17685e51 100644 | 12 | index d2f9dc770e4..f8684db721e 100644 |
17 | --- a/libgcc/config/microblaze/modsi3.S | 13 | --- a/libgcc/config/microblaze/modsi3.S |
18 | +++ b/libgcc/config/microblaze/modsi3.S | 14 | +++ b/libgcc/config/microblaze/modsi3.S |
19 | @@ -119,6 +119,7 @@ $LaRETURN_HERE: | 15 | @@ -119,6 +119,7 @@ $LaRETURN_HERE: |
@@ -25,5 +21,5 @@ index e0fbd91e766..3ec17685e51 100644 | |||
25 | .end __modsi3 | 21 | .end __modsi3 |
26 | .size __modsi3, . - __modsi3 | 22 | .size __modsi3, . - __modsi3 |
27 | -- | 23 | -- |
28 | 2.37.1 (Apple Git-137.1) | 24 | 2.34.1 |
29 | 25 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0041-corrected-SPN-for-dlong-instruction-mapping.patch index e6335e8e..bb797a4a 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0041-corrected-SPN-for-dlong-instruction-mapping.patch | |||
@@ -1,19 +1,14 @@ | |||
1 | From 5f799ea01bae0573a44f3fefa825861e99f4e30a Mon Sep 17 00:00:00 2001 | 1 | From b03e3a75a37213823c062bb72e4f6f470c516222 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 24 Oct 2018 18:31:04 +0530 | 3 | Date: Wed, 24 Oct 2018 18:31:04 +0530 |
4 | Subject: [PATCH 41/53] [Patch,Microblaze] : corrected SPN for dlong | 4 | Subject: [PATCH 41/54] corrected SPN for dlong instruction mapping. |
5 | instruction mapping. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 5 | ||
11 | --- | 6 | --- |
12 | gcc/config/microblaze/microblaze.md | 4 ++-- | 7 | gcc/config/microblaze/microblaze.md | 4 ++-- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 8 | 1 file changed, 2 insertions(+), 2 deletions(-) |
14 | 9 | ||
15 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 10 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
16 | index 4a372f8fd3f..5a964e70d1f 100644 | 11 | index 6ada55ac2bc..36b050670b8 100644 |
17 | --- a/gcc/config/microblaze/microblaze.md | 12 | --- a/gcc/config/microblaze/microblaze.md |
18 | +++ b/gcc/config/microblaze/microblaze.md | 13 | +++ b/gcc/config/microblaze/microblaze.md |
19 | @@ -602,9 +602,9 @@ | 14 | @@ -602,9 +602,9 @@ |
@@ -29,5 +24,5 @@ index 4a372f8fd3f..5a964e70d1f 100644 | |||
29 | "dlong\t%0,%1" | 24 | "dlong\t%0,%1" |
30 | [(set_attr "type" "fcvt") | 25 | [(set_attr "type" "fcvt") |
31 | -- | 26 | -- |
32 | 2.37.1 (Apple Git-137.1) | 27 | 2.34.1 |
33 | 28 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch index f4013b9e..cbafaafc 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch | |||
@@ -1,11 +1,7 @@ | |||
1 | From 9c37b9690ec2c6290095209c039725f235537379 Mon Sep 17 00:00:00 2001 | 1 | From b926d05a0cdd32d9821a48f62eef49c5b1025f73 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju Mekala <nmekala@xilix.com> | 2 | From: Nagaraju Mekala <nmekala@xilix.com> |
3 | Date: Thu, 29 Nov 2018 17:55:08 +0530 | 3 | Date: Thu, 29 Nov 2018 17:55:08 +0530 |
4 | Subject: [PATCH 42/53] fixing the long & long long mingw toolchain issue | 4 | Subject: [PATCH 42/54] fixing the long & long long mingw toolchain issue |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | gcc/config/microblaze/constraints.md | 2 +- | 7 | gcc/config/microblaze/constraints.md | 2 +- |
@@ -13,7 +9,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
13 | 2 files changed, 5 insertions(+), 5 deletions(-) | 9 | 2 files changed, 5 insertions(+), 5 deletions(-) |
14 | 10 | ||
15 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md | 11 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md |
16 | index 0ced155340d..3f9805dfe0a 100644 | 12 | index 7bb1e0b4c8d..fa605831bfe 100644 |
17 | --- a/gcc/config/microblaze/constraints.md | 13 | --- a/gcc/config/microblaze/constraints.md |
18 | +++ b/gcc/config/microblaze/constraints.md | 14 | +++ b/gcc/config/microblaze/constraints.md |
19 | @@ -55,7 +55,7 @@ | 15 | @@ -55,7 +55,7 @@ |
@@ -26,7 +22,7 @@ index 0ced155340d..3f9805dfe0a 100644 | |||
26 | 22 | ||
27 | ;; Define floating point constraints | 23 | ;; Define floating point constraints |
28 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 24 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
29 | index 5a964e70d1f..f509bd5e665 100644 | 25 | index 36b050670b8..e123bf3a7d1 100644 |
30 | --- a/gcc/config/microblaze/microblaze.md | 26 | --- a/gcc/config/microblaze/microblaze.md |
31 | +++ b/gcc/config/microblaze/microblaze.md | 27 | +++ b/gcc/config/microblaze/microblaze.md |
32 | @@ -648,8 +648,8 @@ | 28 | @@ -648,8 +648,8 @@ |
@@ -59,5 +55,5 @@ index 5a964e70d1f..f509bd5e665 100644 | |||
59 | else | 55 | else |
60 | return "addlik\t%0,r0,%1"; | 56 | return "addlik\t%0,r0,%1"; |
61 | -- | 57 | -- |
62 | 2.37.1 (Apple Git-137.1) | 58 | 2.34.1 |
63 | 59 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch index 7f3c8373..af8c684f 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From 0ed24f5a2e6e47f5d13896793ab2c6ea89e8c8e6 Mon Sep 17 00:00:00 2001 | 1 | From 854371934116e5197d627cebaf274f431205b914 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju <nmekala@xilinx.com> | 2 | From: Nagaraju <nmekala@xilinx.com> |
3 | Date: Thu, 14 Mar 2019 18:11:04 +0530 | 3 | Date: Thu, 14 Mar 2019 18:11:04 +0530 |
4 | Subject: [PATCH 43/53] Fix the MB-64 bug of handling QI objects | 4 | Subject: [PATCH 43/54] Fix the MB-64 bug of handling QI objects |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | gcc/config/microblaze/microblaze.md | 14 +++++++------- | 7 | gcc/config/microblaze/microblaze.md | 14 +++++++------- |
12 | 1 file changed, 7 insertions(+), 7 deletions(-) | 8 | 1 file changed, 7 insertions(+), 7 deletions(-) |
13 | 9 | ||
14 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 10 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
15 | index f509bd5e665..27436c0f660 100644 | 11 | index e123bf3a7d1..0f81b0ed58c 100644 |
16 | --- a/gcc/config/microblaze/microblaze.md | 12 | --- a/gcc/config/microblaze/microblaze.md |
17 | +++ b/gcc/config/microblaze/microblaze.md | 13 | +++ b/gcc/config/microblaze/microblaze.md |
18 | @@ -2345,11 +2345,11 @@ else | 14 | @@ -2345,11 +2345,11 @@ else |
@@ -47,5 +43,5 @@ index f509bd5e665..27436c0f660 100644 | |||
47 | "TARGET_MB_64" | 43 | "TARGET_MB_64" |
48 | { | 44 | { |
49 | -- | 45 | -- |
50 | 2.37.1 (Apple Git-137.1) | 46 | 2.34.1 |
51 | 47 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0044-We-will-check-the-possibility-of-peephole2-optimizat.patch index 14eb812a..277e5be2 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0044-We-will-check-the-possibility-of-peephole2-optimizat.patch | |||
@@ -1,19 +1,15 @@ | |||
1 | From e8286e00f939486dde52e9475bc9cca0aa025a42 Mon Sep 17 00:00:00 2001 | 1 | From 5527cec8136440a1edea87b2bb6dafa8e78d07b0 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Fri, 29 Mar 2019 12:08:39 +0530 | 3 | Date: Fri, 29 Mar 2019 12:08:39 +0530 |
4 | Subject: [PATCH 44/53] [Patch,Microblaze] : We will check the possibility of | 4 | Subject: [PATCH 44/54] We will check the possibility of peephole2 |
5 | peephole2 optimization,if we can then we will fix the compiler issue. | 5 | optimization,if we can then we will fix the compiler issue. |
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 6 | ||
11 | --- | 7 | --- |
12 | gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------ | 8 | gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------ |
13 | 1 file changed, 38 insertions(+), 25 deletions(-) | 9 | 1 file changed, 38 insertions(+), 25 deletions(-) |
14 | 10 | ||
15 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 11 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
16 | index 27436c0f660..4b9acddb1f1 100644 | 12 | index 0f81b0ed58c..f661ba1c241 100644 |
17 | --- a/gcc/config/microblaze/microblaze.md | 13 | --- a/gcc/config/microblaze/microblaze.md |
18 | +++ b/gcc/config/microblaze/microblaze.md | 14 | +++ b/gcc/config/microblaze/microblaze.md |
19 | @@ -882,31 +882,44 @@ | 15 | @@ -882,31 +882,44 @@ |
@@ -87,5 +83,5 @@ index 27436c0f660..4b9acddb1f1 100644 | |||
87 | ;;---------------------------------------------------------------- | 83 | ;;---------------------------------------------------------------- |
88 | ;; Negation and one's complement | 84 | ;; Negation and one's complement |
89 | -- | 85 | -- |
90 | 2.37.1 (Apple Git-137.1) | 86 | 2.34.1 |
91 | 87 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch index 54135b0f..4760926f 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch | |||
@@ -1,12 +1,7 @@ | |||
1 | From 29c33e35373d7dc52e43162dce38a3ec0e350db3 Mon Sep 17 00:00:00 2001 | 1 | From 3c6f051ce41f06eab29932859be52ed864bef52f Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Wed, 17 Apr 2019 12:36:16 +0530 | 3 | Date: Wed, 17 Apr 2019 12:36:16 +0530 |
4 | Subject: [PATCH 45/53] [Patch,MicroBlaze]: fixed typos in mul,div and mod | 4 | Subject: [PATCH 45/54] fixed typos in mul,div and mod assembly files. |
5 | assembly files. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 5 | ||
11 | --- | 6 | --- |
12 | libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++---- | 7 | libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++---- |
@@ -17,7 +12,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
17 | 5 files changed, 212 insertions(+), 20 deletions(-) | 12 | 5 files changed, 212 insertions(+), 20 deletions(-) |
18 | 13 | ||
19 | diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S | 14 | diff --git a/libgcc/config/microblaze/divsi3.S b/libgcc/config/microblaze/divsi3.S |
20 | index b464deed481..ceeed6be1f4 100644 | 15 | index 9f04f59104e..e1dfccbf257 100644 |
21 | --- a/libgcc/config/microblaze/divsi3.S | 16 | --- a/libgcc/config/microblaze/divsi3.S |
22 | +++ b/libgcc/config/microblaze/divsi3.S | 17 | +++ b/libgcc/config/microblaze/divsi3.S |
23 | @@ -46,7 +46,7 @@ | 18 | @@ -46,7 +46,7 @@ |
@@ -111,7 +106,7 @@ index b464deed481..ceeed6be1f4 100644 | |||
111 | $LaDiv_By_Zero: | 106 | $LaDiv_By_Zero: |
112 | $LaResult_Is_Zero: | 107 | $LaResult_Is_Zero: |
113 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S | 108 | diff --git a/libgcc/config/microblaze/modsi3.S b/libgcc/config/microblaze/modsi3.S |
114 | index 3ec17685e51..637b06c09a3 100644 | 109 | index f8684db721e..3bf9b10ec3e 100644 |
115 | --- a/libgcc/config/microblaze/modsi3.S | 110 | --- a/libgcc/config/microblaze/modsi3.S |
116 | +++ b/libgcc/config/microblaze/modsi3.S | 111 | +++ b/libgcc/config/microblaze/modsi3.S |
117 | @@ -62,40 +62,72 @@ __modsi3: | 112 | @@ -62,40 +62,72 @@ __modsi3: |
@@ -200,7 +195,7 @@ index 3ec17685e51..637b06c09a3 100644 | |||
200 | nop | 195 | nop |
201 | #else | 196 | #else |
202 | diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S | 197 | diff --git a/libgcc/config/microblaze/mulsi3.S b/libgcc/config/microblaze/mulsi3.S |
203 | index 657668ef826..6be75dc95e8 100644 | 198 | index 437e2bc309e..bc9ff9cdc89 100644 |
204 | --- a/libgcc/config/microblaze/mulsi3.S | 199 | --- a/libgcc/config/microblaze/mulsi3.S |
205 | +++ b/libgcc/config/microblaze/mulsi3.S | 200 | +++ b/libgcc/config/microblaze/mulsi3.S |
206 | @@ -43,7 +43,37 @@ | 201 | @@ -43,7 +43,37 @@ |
@@ -250,7 +245,7 @@ index 657668ef826..6be75dc95e8 100644 | |||
250 | .end __mulsi3 | 245 | .end __mulsi3 |
251 | .size __mulsi3, . - __mulsi3 | 246 | .size __mulsi3, . - __mulsi3 |
252 | diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S | 247 | diff --git a/libgcc/config/microblaze/udivsi3.S b/libgcc/config/microblaze/udivsi3.S |
253 | index fc6a4b5a248..f8ce88bd8b7 100644 | 248 | index 496dd6794bf..486bc8f0819 100644 |
254 | --- a/libgcc/config/microblaze/udivsi3.S | 249 | --- a/libgcc/config/microblaze/udivsi3.S |
255 | +++ b/libgcc/config/microblaze/udivsi3.S | 250 | +++ b/libgcc/config/microblaze/udivsi3.S |
256 | @@ -59,52 +59,96 @@ __udivsi3: | 251 | @@ -59,52 +59,96 @@ __udivsi3: |
@@ -364,7 +359,7 @@ index fc6a4b5a248..f8ce88bd8b7 100644 | |||
364 | NOP | 359 | NOP |
365 | #else | 360 | #else |
366 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S | 361 | diff --git a/libgcc/config/microblaze/umodsi3.S b/libgcc/config/microblaze/umodsi3.S |
367 | index 03be6df1fc6..3be3658f7a2 100644 | 362 | index a706017c634..1d8e2921745 100644 |
368 | --- a/libgcc/config/microblaze/umodsi3.S | 363 | --- a/libgcc/config/microblaze/umodsi3.S |
369 | +++ b/libgcc/config/microblaze/umodsi3.S | 364 | +++ b/libgcc/config/microblaze/umodsi3.S |
370 | @@ -46,7 +46,7 @@ | 365 | @@ -46,7 +46,7 @@ |
@@ -466,5 +461,5 @@ index 03be6df1fc6..3be3658f7a2 100644 | |||
466 | $LaRETURN_HERE: | 461 | $LaRETURN_HERE: |
467 | # Restore values of CSRs and that of r3 and the divisor and the dividend | 462 | # Restore values of CSRs and that of r3 and the divisor and the dividend |
468 | -- | 463 | -- |
469 | 2.37.1 (Apple Git-137.1) | 464 | 2.34.1 |
470 | 465 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch index def10321..5f45d03f 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch | |||
@@ -1,27 +1,22 @@ | |||
1 | From 39589348962a2e0453ad49118b6bc3dd8a7b1bb5 Mon Sep 17 00:00:00 2001 | 1 | From 0776495e85a15c1ad84fd90736059902bb3ea152 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 15:59:12 +0530 | 3 | Date: Tue, 13 Sep 2022 15:59:12 +0530 |
4 | Subject: [PATCH 46/53] [Patch, microblaze]: MB-64 removal of barrel-shift | 4 | Subject: [PATCH 46/54] MB-64 removal of barrel-shift instructions from default |
5 | instructions from default By default MB-64 is generatting | 5 | By default MB-64 is generatting barrel-shift instructions. It has been |
6 | barrel-shift instructions. It has been removed from default. | 6 | removed from default. Barrel-shift instructions will be generated only if |
7 | Barrel-shift instructions will be generated only if barrel-shifter is | 7 | barrel-shifter is enabled. Similarly to double instructions as well. |
8 | enabled. Similarly to double instructions as well. | ||
9 | 8 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 9 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
15 | --- | 10 | --- |
16 | gcc/config/microblaze/microblaze.cc | 2 +- | 11 | gcc/config/microblaze/microblaze.cc | 2 +- |
17 | gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- | 12 | gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- |
18 | 2 files changed, 252 insertions(+), 19 deletions(-) | 13 | 2 files changed, 252 insertions(+), 19 deletions(-) |
19 | 14 | ||
20 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 15 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
21 | index 7a08390a027..3ee3996a38d 100644 | 16 | index 965a041ea8c..f949a8863d3 100644 |
22 | --- a/gcc/config/microblaze/microblaze.cc | 17 | --- a/gcc/config/microblaze/microblaze.cc |
23 | +++ b/gcc/config/microblaze/microblaze.cc | 18 | +++ b/gcc/config/microblaze/microblaze.cc |
24 | @@ -3871,7 +3871,7 @@ microblaze_expand_divide (rtx operands[]) | 19 | @@ -3880,7 +3880,7 @@ microblaze_expand_divide (rtx operands[]) |
25 | emit_insn (gen_rtx_CLOBBER (Pmode, reg18)); | 20 | emit_insn (gen_rtx_CLOBBER (Pmode, reg18)); |
26 | 21 | ||
27 | if (TARGET_MB_64) { | 22 | if (TARGET_MB_64) { |
@@ -31,7 +26,7 @@ index 7a08390a027..3ee3996a38d 100644 | |||
31 | } | 26 | } |
32 | else { | 27 | else { |
33 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 28 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
34 | index 4b9acddb1f1..3695e9e101d 100644 | 29 | index f661ba1c241..9bc9512db8e 100644 |
35 | --- a/gcc/config/microblaze/microblaze.md | 30 | --- a/gcc/config/microblaze/microblaze.md |
36 | +++ b/gcc/config/microblaze/microblaze.md | 31 | +++ b/gcc/config/microblaze/microblaze.md |
37 | @@ -547,7 +547,7 @@ | 32 | @@ -547,7 +547,7 @@ |
@@ -477,5 +472,5 @@ index 4b9acddb1f1..3695e9e101d 100644 | |||
477 | [(set_attr "type" "arith") | 472 | [(set_attr "type" "arith") |
478 | (set_attr "mode" "DI") | 473 | (set_attr "mode" "DI") |
479 | -- | 474 | -- |
480 | 2.37.1 (Apple Git-137.1) | 475 | 2.34.1 |
481 | 476 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch index 318abe7b..0272fd3c 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch | |||
@@ -1,18 +1,14 @@ | |||
1 | From e32334b0f8a4c9532975001ffab33e86469ea4e1 Mon Sep 17 00:00:00 2001 | 1 | From 003f60fa4eedddd15de6e9f633bffec1a887fe45 Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju <nmekala@xilinx.com> | 2 | From: Nagaraju <nmekala@xilinx.com> |
3 | Date: Fri, 23 Aug 2019 16:16:53 +0530 | 3 | Date: Fri, 23 Aug 2019 16:16:53 +0530 |
4 | Subject: [PATCH 47/53] Added new MB-64 single register arithmetic instructions | 4 | Subject: [PATCH 47/54] Added new MB-64 single register arithmetic instructions |
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | 5 | ||
10 | --- | 6 | --- |
11 | gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++ | 7 | gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++ |
12 | 1 file changed, 56 insertions(+) | 8 | 1 file changed, 56 insertions(+) |
13 | 9 | ||
14 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 10 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
15 | index 3695e9e101d..85c1ab45994 100644 | 11 | index 9bc9512db8e..9172f1bc209 100644 |
16 | --- a/gcc/config/microblaze/microblaze.md | 12 | --- a/gcc/config/microblaze/microblaze.md |
17 | +++ b/gcc/config/microblaze/microblaze.md | 13 | +++ b/gcc/config/microblaze/microblaze.md |
18 | @@ -654,6 +654,18 @@ | 14 | @@ -654,6 +654,18 @@ |
@@ -107,5 +103,5 @@ index 3695e9e101d..85c1ab45994 100644 | |||
107 | [(set (match_operand:DI 0 "register_operand" "=d,d") | 103 | [(set (match_operand:DI 0 "register_operand" "=d,d") |
108 | (xor:DI (match_operand:DI 1 "arith_operand" "%d,d") | 104 | (xor:DI (match_operand:DI 1 "arith_operand" "%d,d") |
109 | -- | 105 | -- |
110 | 2.37.1 (Apple Git-137.1) | 106 | 2.34.1 |
111 | 107 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0048-Added-support-for-64-bit-Immediate-values.patch index 09514a7d..0be495a8 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0048-Added-support-for-64-bit-Immediate-values.patch | |||
@@ -1,12 +1,7 @@ | |||
1 | From f5f262b196de197b7e9ece8cc08c8715f953857f Mon Sep 17 00:00:00 2001 | 1 | From 8d20c82d95e22a42551b446c087d9e06958a3580 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Mon, 26 Aug 2019 15:55:22 +0530 | 3 | Date: Mon, 26 Aug 2019 15:55:22 +0530 |
4 | Subject: [PATCH 48/53] [Patch,MicroBlaze] : Added support for 64 bit Immediate | 4 | Subject: [PATCH 48/54] Added support for 64 bit Immediate values. |
5 | values. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | 5 | ||
11 | --- | 6 | --- |
12 | gcc/config/microblaze/constraints.md | 4 ++-- | 7 | gcc/config/microblaze/constraints.md | 4 ++-- |
@@ -14,7 +9,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
14 | 2 files changed, 3 insertions(+), 4 deletions(-) | 9 | 2 files changed, 3 insertions(+), 4 deletions(-) |
15 | 10 | ||
16 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md | 11 | diff --git a/gcc/config/microblaze/constraints.md b/gcc/config/microblaze/constraints.md |
17 | index 3f9805dfe0a..91653f36f52 100644 | 12 | index fa605831bfe..40cd88a870c 100644 |
18 | --- a/gcc/config/microblaze/constraints.md | 13 | --- a/gcc/config/microblaze/constraints.md |
19 | +++ b/gcc/config/microblaze/constraints.md | 14 | +++ b/gcc/config/microblaze/constraints.md |
20 | @@ -53,9 +53,9 @@ | 15 | @@ -53,9 +53,9 @@ |
@@ -30,7 +25,7 @@ index 3f9805dfe0a..91653f36f52 100644 | |||
30 | 25 | ||
31 | ;; Define floating point constraints | 26 | ;; Define floating point constraints |
32 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 27 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
33 | index 85c1ab45994..0ac6e1480e6 100644 | 28 | index 9172f1bc209..f41474feca6 100644 |
34 | --- a/gcc/config/microblaze/microblaze.md | 29 | --- a/gcc/config/microblaze/microblaze.md |
35 | +++ b/gcc/config/microblaze/microblaze.md | 30 | +++ b/gcc/config/microblaze/microblaze.md |
36 | @@ -1332,8 +1332,7 @@ | 31 | @@ -1332,8 +1332,7 @@ |
@@ -44,5 +39,5 @@ index 85c1ab45994..0ac6e1480e6 100644 | |||
44 | addlk\t%0,r0,r0\t | 39 | addlk\t%0,r0,r0\t |
45 | addlik\t%0,r0,%1\t #N1 %X1 | 40 | addlik\t%0,r0,%1\t #N1 %X1 |
46 | -- | 41 | -- |
47 | 2.37.1 (Apple Git-137.1) | 42 | 2.34.1 |
48 | 43 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch index 6258e799..ca813796 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch | |||
@@ -1,26 +1,22 @@ | |||
1 | From d45405d05a1f9079f7db86ba60dcd30d358613d4 Mon Sep 17 00:00:00 2001 | 1 | From 8107e0be46e5bdbfc353648ce5129afde5275ea9 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 16:06:10 +0530 | 3 | Date: Tue, 13 Sep 2022 16:06:10 +0530 |
4 | Subject: [PATCH 49/53] [Patch, microblaze]: Fix Compiler crash with | 4 | Subject: [PATCH 49/54] Fix Compiler crash with -freg-struct-return This patch |
5 | -freg-struct-return This patch fixes a bug in MB GCC regarding the | 5 | fixes a bug in MB GCC regarding the passing struct values in registers. |
6 | passing struct values in registers. Currently we are only handling SImode | 6 | Currently we are only handling SImode With this patch all other modes are |
7 | With this patch all other modes are handled properly | 7 | handled properly |
8 | 8 | ||
9 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 9 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
14 | --- | 10 | --- |
15 | gcc/config/microblaze/microblaze.cc | 11 ++++++++++- | 11 | gcc/config/microblaze/microblaze.cc | 11 ++++++++++- |
16 | gcc/config/microblaze/microblaze.h | 19 ------------------- | 12 | gcc/config/microblaze/microblaze.h | 19 ------------------- |
17 | 2 files changed, 10 insertions(+), 20 deletions(-) | 13 | 2 files changed, 10 insertions(+), 20 deletions(-) |
18 | 14 | ||
19 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 15 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
20 | index 3ee3996a38d..4668a81d060 100644 | 16 | index f949a8863d3..4748c8c1f0d 100644 |
21 | --- a/gcc/config/microblaze/microblaze.cc | 17 | --- a/gcc/config/microblaze/microblaze.cc |
22 | +++ b/gcc/config/microblaze/microblaze.cc | 18 | +++ b/gcc/config/microblaze/microblaze.cc |
23 | @@ -3909,7 +3909,16 @@ microblaze_function_value (const_tree valtype, | 19 | @@ -3918,7 +3918,16 @@ microblaze_function_value (const_tree valtype, |
24 | const_tree func ATTRIBUTE_UNUSED, | 20 | const_tree func ATTRIBUTE_UNUSED, |
25 | bool outgoing ATTRIBUTE_UNUSED) | 21 | bool outgoing ATTRIBUTE_UNUSED) |
26 | { | 22 | { |
@@ -39,7 +35,7 @@ index 3ee3996a38d..4668a81d060 100644 | |||
39 | 35 | ||
40 | /* Implement TARGET_SCHED_ADJUST_COST. */ | 36 | /* Implement TARGET_SCHED_ADJUST_COST. */ |
41 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 37 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
42 | index c48b6de0d58..730ad87b13b 100644 | 38 | index 4d6babfe9c4..eea360fda47 100644 |
43 | --- a/gcc/config/microblaze/microblaze.h | 39 | --- a/gcc/config/microblaze/microblaze.h |
44 | +++ b/gcc/config/microblaze/microblaze.h | 40 | +++ b/gcc/config/microblaze/microblaze.h |
45 | @@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe; | 41 | @@ -266,13 +266,6 @@ extern enum pipeline_type microblaze_pipe; |
@@ -76,5 +72,5 @@ index c48b6de0d58..730ad87b13b 100644 | |||
76 | On the MicroBlaze, R2 R3 are the only register thus used. | 72 | On the MicroBlaze, R2 R3 are the only register thus used. |
77 | Currently, R2 are only implemented here (C has no complex type) */ | 73 | Currently, R2 are only implemented here (C has no complex type) */ |
78 | -- | 74 | -- |
79 | 2.37.1 (Apple Git-137.1) | 75 | 2.34.1 |
80 | 76 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch index 8d99c93d..3b8fad81 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch | |||
@@ -1,16 +1,14 @@ | |||
1 | From a64afc59e82703f40d04d4d7126038811a195467 Mon Sep 17 00:00:00 2001 | 1 | From b7fb925d6277d11e4014aa1731fc58813e30761f Mon Sep 17 00:00:00 2001 |
2 | From: Nagaraju <nmekala@xilinx.com> | 2 | From: Nagaraju <nmekala@xilinx.com> |
3 | Date: Wed, 8 May 2019 14:12:03 +0530 | 3 | Date: Wed, 8 May 2019 14:12:03 +0530 |
4 | Subject: [PATCH 50/53] [Patch, microblaze]: Add TARGET_OPTION_OPTIMIZATION and | 4 | Subject: [PATCH 50/54] Add TARGET_OPTION_OPTIMIZATION and disable fivopts by |
5 | disable fivopts by default | 5 | default |
6 | 6 | ||
7 | Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. | 7 | Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. |
8 | 8 | ||
9 | * gcc/common/config/microblaze/microblaze-common.c | 9 | * gcc/common/config/microblaze/microblaze-common.c |
10 | (microblaze_option_optimization_table): Disable fivopts by default. | 10 | (microblaze_option_optimization_table): Disable fivopts by default. |
11 | 11 | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> | 12 | Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> |
15 | Mahesh Bodapati <mbodapat@xilinx.com> | 13 | Mahesh Bodapati <mbodapat@xilinx.com> |
16 | Conflicts: | 14 | Conflicts: |
@@ -23,7 +21,7 @@ Conflicts: | |||
23 | 1 file changed, 13 insertions(+) | 21 | 1 file changed, 13 insertions(+) |
24 | 22 | ||
25 | diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc | 23 | diff --git a/gcc/common/config/microblaze/microblaze-common.cc b/gcc/common/config/microblaze/microblaze-common.cc |
26 | index 21b35f55b92..137332ded25 100644 | 24 | index 8750b022447..8a924e8a997 100644 |
27 | --- a/gcc/common/config/microblaze/microblaze-common.cc | 25 | --- a/gcc/common/config/microblaze/microblaze-common.cc |
28 | +++ b/gcc/common/config/microblaze/microblaze-common.cc | 26 | +++ b/gcc/common/config/microblaze/microblaze-common.cc |
29 | @@ -24,7 +24,20 @@ | 27 | @@ -24,7 +24,20 @@ |
@@ -48,5 +46,5 @@ index 21b35f55b92..137332ded25 100644 | |||
48 | + | 46 | + |
49 | struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; | 47 | struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; |
50 | -- | 48 | -- |
51 | 2.37.1 (Apple Git-137.1) | 49 | 2.34.1 |
52 | 50 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0051-Reducing-Stack-space-for-arguments.patch index 64069e3c..648da43a 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0051-Reducing-Stack-space-for-arguments.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 09e10c513f8970f4d2402244b7ac69ecd33b4c04 Mon Sep 17 00:00:00 2001 | 1 | From a464c0e6070cac9b40b7fe760e25cbd484a615a7 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 16:35:00 +0530 | 3 | Date: Tue, 13 Sep 2022 16:35:00 +0530 |
4 | Subject: [PATCH 51/53] [Patch, microblaze]: Reducing Stack space for arguments | 4 | Subject: [PATCH 51/54] Reducing Stack space for arguments |
5 | 5 | ||
6 | Currently in Microblaze target stack space for arguments in register is being | 6 | Currently in Microblaze target stack space for arguments in register is being |
7 | allocated even if there are no arguments in the function. | 7 | allocated even if there are no arguments in the function. |
@@ -9,10 +9,6 @@ Subject: [PATCH 51/53] [Patch, microblaze]: Reducing Stack space for arguments | |||
9 | 9 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
11 | :Ajit Agarwal <ajitkum@xilinx.com> | 11 | :Ajit Agarwal <ajitkum@xilinx.com> |
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | |||
16 | --- | 12 | --- |
17 | gcc/config/microblaze/microblaze-protos.h | 1 + | 13 | gcc/config/microblaze/microblaze-protos.h | 1 + |
18 | gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++ | 14 | gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++ |
@@ -20,7 +16,7 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
20 | 3 files changed, 133 insertions(+), 2 deletions(-) | 16 | 3 files changed, 133 insertions(+), 2 deletions(-) |
21 | 17 | ||
22 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h | 18 | diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h |
23 | index 7f575c2adec..bd594699940 100644 | 19 | index 0e9f783c4a4..091d8d9a51b 100644 |
24 | --- a/gcc/config/microblaze/microblaze-protos.h | 20 | --- a/gcc/config/microblaze/microblaze-protos.h |
25 | +++ b/gcc/config/microblaze/microblaze-protos.h | 21 | +++ b/gcc/config/microblaze/microblaze-protos.h |
26 | @@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx); | 22 | @@ -60,6 +60,7 @@ extern int symbol_mentioned_p (rtx); |
@@ -32,10 +28,10 @@ index 7f575c2adec..bd594699940 100644 | |||
32 | 28 | ||
33 | /* Declare functions in microblaze-c.cc. */ | 29 | /* Declare functions in microblaze-c.cc. */ |
34 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 30 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
35 | index 4668a81d060..24ac215b6d5 100644 | 31 | index 4748c8c1f0d..e6d3f35370c 100644 |
36 | --- a/gcc/config/microblaze/microblaze.cc | 32 | --- a/gcc/config/microblaze/microblaze.cc |
37 | +++ b/gcc/config/microblaze/microblaze.cc | 33 | +++ b/gcc/config/microblaze/microblaze.cc |
38 | @@ -2081,6 +2081,136 @@ microblaze_must_save_register (int regno) | 34 | @@ -2086,6 +2086,136 @@ microblaze_must_save_register (int regno) |
39 | return 0; | 35 | return 0; |
40 | } | 36 | } |
41 | 37 | ||
@@ -173,7 +169,7 @@ index 4668a81d060..24ac215b6d5 100644 | |||
173 | stack pointer. | 169 | stack pointer. |
174 | 170 | ||
175 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h | 171 | diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h |
176 | index 730ad87b13b..dfacd080b6d 100644 | 172 | index eea360fda47..f23805b1c03 100644 |
177 | --- a/gcc/config/microblaze/microblaze.h | 173 | --- a/gcc/config/microblaze/microblaze.h |
178 | +++ b/gcc/config/microblaze/microblaze.h | 174 | +++ b/gcc/config/microblaze/microblaze.h |
179 | @@ -447,9 +447,9 @@ extern struct microblaze_frame_info current_frame_info; | 175 | @@ -447,9 +447,9 @@ extern struct microblaze_frame_info current_frame_info; |
@@ -189,5 +185,5 @@ index 730ad87b13b..dfacd080b6d 100644 | |||
189 | #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32) | 185 | #define STACK_BOUNDARY (TARGET_MB_64 ? 64 : 32) |
190 | 186 | ||
191 | -- | 187 | -- |
192 | 2.37.1 (Apple Git-137.1) | 188 | 2.34.1 |
193 | 189 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch index 63feff79..d0474dd9 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch | |||
@@ -1,26 +1,21 @@ | |||
1 | From fe2781d189493dc82a3714b48bbc12c6bd5cdfd0 Mon Sep 17 00:00:00 2001 | 1 | From b792943436857172e7a39e26a00602c7e6620860 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 16:38:43 +0530 | 3 | Date: Tue, 13 Sep 2022 16:38:43 +0530 |
4 | Subject: [PATCH 52/53] [Patch,MicroBlaze] : If we use break_handler | 4 | Subject: [PATCH 52/54] If we use break_handler attribute then interrupt vector |
5 | attribute then interrupt vector call happened to break_handler instead of | 5 | call happened to break_handler instead of interrupt_handler. this fix will |
6 | interrupt_handler. this fix will resolve the issue CR-1081780. This | 6 | resolve the issue CR-1081780. This fix will not change the behavior of |
7 | fix will not change the behavior of compiler unless there is a usage of | 7 | compiler unless there is a usage of break_handler attribute. signed-off-by : |
8 | break_handler attribute. signed-off-by : Mahesh Bodapati | 8 | Mahesh Bodapati <mbodapat@xilinx.com> |
9 | <mbodapat@xilinx.com> | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | 9 | ||
15 | --- | 10 | --- |
16 | gcc/config/microblaze/microblaze.cc | 13 +++++-------- | 11 | gcc/config/microblaze/microblaze.cc | 13 +++++-------- |
17 | 1 file changed, 5 insertions(+), 8 deletions(-) | 12 | 1 file changed, 5 insertions(+), 8 deletions(-) |
18 | 13 | ||
19 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc | 14 | diff --git a/gcc/config/microblaze/microblaze.cc b/gcc/config/microblaze/microblaze.cc |
20 | index 24ac215b6d5..66d62f6f909 100644 | 15 | index e6d3f35370c..58d091fbed2 100644 |
21 | --- a/gcc/config/microblaze/microblaze.cc | 16 | --- a/gcc/config/microblaze/microblaze.cc |
22 | +++ b/gcc/config/microblaze/microblaze.cc | 17 | +++ b/gcc/config/microblaze/microblaze.cc |
23 | @@ -2020,7 +2020,7 @@ microblaze_save_volatiles (tree func) | 18 | @@ -2025,7 +2025,7 @@ microblaze_save_volatiles (tree func) |
24 | int | 19 | int |
25 | microblaze_is_interrupt_variant (void) | 20 | microblaze_is_interrupt_variant (void) |
26 | { | 21 | { |
@@ -29,7 +24,7 @@ index 24ac215b6d5..66d62f6f909 100644 | |||
29 | } | 24 | } |
30 | int | 25 | int |
31 | microblaze_is_break_handler (void) | 26 | microblaze_is_break_handler (void) |
32 | @@ -2059,7 +2059,7 @@ microblaze_must_save_register (int regno) | 27 | @@ -2064,7 +2064,7 @@ microblaze_must_save_register (int regno) |
33 | { | 28 | { |
34 | if (df_regs_ever_live_p (regno) | 29 | if (df_regs_ever_live_p (regno) |
35 | || regno == MB_ABI_MSR_SAVE_REG | 30 | || regno == MB_ABI_MSR_SAVE_REG |
@@ -38,7 +33,7 @@ index 24ac215b6d5..66d62f6f909 100644 | |||
38 | && (regno == MB_ABI_ASM_TEMP_REGNUM | 33 | && (regno == MB_ABI_ASM_TEMP_REGNUM |
39 | || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM))) | 34 | || regno == MB_ABI_EXCEPTION_RETURN_ADDR_REGNUM))) |
40 | return 1; | 35 | return 1; |
41 | @@ -2275,9 +2275,6 @@ compute_frame_size (HOST_WIDE_INT size) | 36 | @@ -2280,9 +2280,6 @@ compute_frame_size (HOST_WIDE_INT size) |
42 | fast_interrupt = | 37 | fast_interrupt = |
43 | microblaze_fast_interrupt_function_p (current_function_decl); | 38 | microblaze_fast_interrupt_function_p (current_function_decl); |
44 | save_volatiles = microblaze_save_volatiles (current_function_decl); | 39 | save_volatiles = microblaze_save_volatiles (current_function_decl); |
@@ -48,7 +43,7 @@ index 24ac215b6d5..66d62f6f909 100644 | |||
48 | gp_reg_size = 0; | 43 | gp_reg_size = 0; |
49 | mask = 0; | 44 | mask = 0; |
50 | var_size = size; | 45 | var_size = size; |
51 | @@ -3237,7 +3234,7 @@ microblaze_expand_prologue (void) | 46 | @@ -3242,7 +3239,7 @@ microblaze_expand_prologue (void) |
52 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, | 47 | gen_rtx_PLUS (Pmode, stack_pointer_rtx, |
53 | const0_rtx)); | 48 | const0_rtx)); |
54 | 49 | ||
@@ -57,7 +52,7 @@ index 24ac215b6d5..66d62f6f909 100644 | |||
57 | /* Do not optimize in flow analysis. */ | 52 | /* Do not optimize in flow analysis. */ |
58 | MEM_VOLATILE_P (mem_rtx) = 1; | 53 | MEM_VOLATILE_P (mem_rtx) = 1; |
59 | 54 | ||
60 | @@ -3348,12 +3345,12 @@ microblaze_expand_epilogue (void) | 55 | @@ -3353,12 +3350,12 @@ microblaze_expand_epilogue (void) |
61 | a load-use stall cycle :) This is also important to handle alloca. | 56 | a load-use stall cycle :) This is also important to handle alloca. |
62 | (See comments for if (frame_pointer_needed) below. */ | 57 | (See comments for if (frame_pointer_needed) below. */ |
63 | 58 | ||
@@ -73,5 +68,5 @@ index 24ac215b6d5..66d62f6f909 100644 | |||
73 | MEM_VOLATILE_P (mem_rtx) = 1; | 68 | MEM_VOLATILE_P (mem_rtx) = 1; |
74 | reg_rtx = gen_rtx_REG (Pmode, MB_ABI_SUB_RETURN_ADDR_REGNUM); | 69 | reg_rtx = gen_rtx_REG (Pmode, MB_ABI_SUB_RETURN_ADDR_REGNUM); |
75 | -- | 70 | -- |
76 | 2.37.1 (Apple Git-137.1) | 71 | 2.34.1 |
77 | 72 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0053-Add-Zero_extended-instructions.patch index 1552a5e9..52017a9d 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0053-Add-Zero_extended-instructions.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 6c2e67237a12cecfd8c0575fd17314d3024943fc Mon Sep 17 00:00:00 2001 | 1 | From fbf853f0b9571529dcc72fc53adf4a35abd3e050 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Tue, 13 Sep 2022 16:45:41 +0530 | 3 | Date: Tue, 13 Sep 2022 16:45:41 +0530 |
4 | Subject: [PATCH 53/53] [patch, microblaze64]: Add Zero_extended instructions | 4 | Subject: [PATCH 53/54] Add Zero_extended instructions |
5 | 5 | ||
6 | Due to latest changes in GCC-10.2 MB64 perforamance has reduced | 6 | Due to latest changes in GCC-10.2 MB64 perforamance has reduced |
7 | We have added zero_extended instructions to get rid of left shift | 7 | We have added zero_extended instructions to get rid of left shift |
@@ -9,8 +9,6 @@ Subject: [PATCH 53/53] [patch, microblaze64]: Add Zero_extended instructions | |||
9 | 9 | ||
10 | [CR/TSR]: TSR-974519 | 10 | [CR/TSR]: TSR-974519 |
11 | 11 | ||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com> | 12 | Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com> |
15 | Mahesh Bodapati<mbodapat@xilinx.com> | 13 | Mahesh Bodapati<mbodapat@xilinx.com> |
16 | --- | 14 | --- |
@@ -18,7 +16,7 @@ Upstream-Status: Pending | |||
18 | 1 file changed, 27 insertions(+) | 16 | 1 file changed, 27 insertions(+) |
19 | 17 | ||
20 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | 18 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md |
21 | index 0ac6e1480e6..7a7c70d607b 100644 | 19 | index f41474feca6..aff98604db7 100644 |
22 | --- a/gcc/config/microblaze/microblaze.md | 20 | --- a/gcc/config/microblaze/microblaze.md |
23 | +++ b/gcc/config/microblaze/microblaze.md | 21 | +++ b/gcc/config/microblaze/microblaze.md |
24 | @@ -1191,6 +1191,33 @@ | 22 | @@ -1191,6 +1191,33 @@ |
@@ -56,5 +54,5 @@ index 0ac6e1480e6..7a7c70d607b 100644 | |||
56 | ;; Sign extension | 54 | ;; Sign extension |
57 | ;;---------------------------------------------------------------- | 55 | ;;---------------------------------------------------------------- |
58 | -- | 56 | -- |
59 | 2.37.1 (Apple Git-137.1) | 57 | 2.34.1 |
60 | 58 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch new file mode 100644 index 00000000..ec8bc0cf --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 79d007fea870a3b8d72faa90238cee2cdfaf5c85 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Fri, 28 Jun 2024 12:18:38 +0530 | ||
4 | Subject: [PATCH 54/54] Fix failure with gcc.c-torture/execute/ashrdi-1.c -Os | ||
5 | execution test | ||
6 | |||
7 | The following tests fail with -Os option because a shift instruction | ||
8 | in a branch delay slot gets replaced with multiple instructions when | ||
9 | the processor has no barrel shifter. This fix addresses the problem | ||
10 | by marking the responsible instruction pattern as type multi preventing | ||
11 | it from being placed in a delay slot. | ||
12 | |||
13 | > gcc.c-torture/execute/ashrdi-1.c -Os execution test | ||
14 | > gcc.c-torture/execute/pr40057.c -Os execution test | ||
15 | > gcc.c-torture/execute/pr79121.c -Os execution test | ||
16 | > gcc.c-torture/execute/pr82524.c -Os execution test | ||
17 | > c-c++-common/torture/vector-compare-1.c -Os execution test | ||
18 | > gcc.dg/torture/vec-cvt-1.c -Os execution test | ||
19 | |||
20 | These tests pass with this fix. | ||
21 | |||
22 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
23 | --- | ||
24 | gcc/config/microblaze/microblaze.md | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
28 | index aff98604db7..0e3981390c8 100644 | ||
29 | --- a/gcc/config/microblaze/microblaze.md | ||
30 | +++ b/gcc/config/microblaze/microblaze.md | ||
31 | @@ -2286,7 +2286,7 @@ else | ||
32 | output_asm_insn ("bneid\t%3,.-4", operands); | ||
33 | return "sra\t%0,%0"; | ||
34 | } | ||
35 | - [(set_attr "type" "arith") | ||
36 | + [(set_attr "type" "multi") | ||
37 | (set_attr "mode" "SI") | ||
38 | (set_attr "length" "20")] | ||
39 | ) | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/microblaze-mulitlib-hack.patch b/meta-microblaze/recipes-devtools/gcc/gcc-13/microblaze-mulitlib-hack.patch index af8ebf3b..af8ebf3b 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/microblaze-mulitlib-hack.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-13/microblaze-mulitlib-hack.patch | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-common.inc b/meta-microblaze/recipes-devtools/gcc/gcc-common.inc deleted file mode 100644 index 5ac82b1b..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-common.inc +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | SUMMARY = "GNU cc and gcc C compilers" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/gcc/" | ||
3 | DESCRIPTION = "The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, and D, as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system." | ||
4 | SECTION = "devel" | ||
5 | LICENSE = "GPL" | ||
6 | |||
7 | NATIVEDEPS = "" | ||
8 | |||
9 | CVE_PRODUCT = "gcc" | ||
10 | |||
11 | inherit autotools gettext texinfo | ||
12 | |||
13 | BPN = "gcc" | ||
14 | COMPILERDEP = "virtual/${TARGET_PREFIX}gcc:do_gcc_stash_builddir" | ||
15 | |||
16 | python extract_stashed_builddir () { | ||
17 | src = d.expand("${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}") | ||
18 | dest = d.getVar("B") | ||
19 | oe.path.copyhardlinktree(src, dest) | ||
20 | staging_processfixme([src + "/fixmepath"], dest, d.getVar("RECIPE_SYSROOT"), d.getVar("RECIPE_SYSROOT_NATIVE"), d) | ||
21 | } | ||
22 | |||
23 | def get_gcc_float_setting(bb, d): | ||
24 | if d.getVar('ARMPKGSFX_EABI') == "hf" and d.getVar('TRANSLATED_TARGET_ARCH') == "arm": | ||
25 | return "--with-float=hard" | ||
26 | if d.getVar('TARGET_FPU') in [ 'soft' ]: | ||
27 | return "--with-float=soft" | ||
28 | if d.getVar('TARGET_FPU') in [ 'ppc-efd' ]: | ||
29 | return "--enable-e500_double" | ||
30 | return "" | ||
31 | |||
32 | get_gcc_float_setting[vardepvalue] = "${@get_gcc_float_setting(bb, d)}" | ||
33 | |||
34 | def get_gcc_x86_64_arch_setting(bb, d): | ||
35 | import re | ||
36 | march = re.match(r'^.*-march=([^\s]*)', d.getVar('TUNE_CCARGS')) | ||
37 | if march: | ||
38 | return "--with-arch=%s " % march.group(1) | ||
39 | # The earliest supported x86-64 CPU | ||
40 | return "--with-arch=core2" | ||
41 | |||
42 | get_gcc_x86_64_arch_setting[vardepvalue] = "${@get_gcc_x86_64_arch_setting(bb, d)}" | ||
43 | |||
44 | def get_gcc_mips_plt_setting(bb, d): | ||
45 | if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'mips', 'mipsel' ] and bb.utils.contains('DISTRO_FEATURES', 'mplt', True, False, d): | ||
46 | return "--with-mips-plt" | ||
47 | return "" | ||
48 | |||
49 | def get_gcc_ppc_plt_settings(bb, d): | ||
50 | if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and not bb.utils.contains('DISTRO_FEATURES', 'bssplt', True, False, d): | ||
51 | return "--enable-secureplt" | ||
52 | return "" | ||
53 | |||
54 | def get_gcc_multiarch_setting(bb, d): | ||
55 | target_arch = d.getVar('TRANSLATED_TARGET_ARCH') | ||
56 | multiarch_options = { | ||
57 | "i586": "--enable-targets=all", | ||
58 | "i686": "--enable-targets=all", | ||
59 | "powerpc": "--enable-targets=powerpc64", | ||
60 | "powerpc64le": "--enable-targets=powerpcle", | ||
61 | "mips": "--enable-targets=all", | ||
62 | "sparc": "--enable-targets=all", | ||
63 | } | ||
64 | |||
65 | if bb.utils.contains('DISTRO_FEATURES', 'multiarch', True, False, d): | ||
66 | if target_arch in multiarch_options : | ||
67 | return multiarch_options[target_arch] | ||
68 | return "" | ||
69 | |||
70 | # this is used by the multilib setup of gcc | ||
71 | def get_tune_parameters(tune, d): | ||
72 | availtunes = d.getVar('AVAILTUNES') | ||
73 | if tune not in availtunes.split(): | ||
74 | bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes)) | ||
75 | |||
76 | localdata = bb.data.createCopy(d) | ||
77 | override = ':tune-' + tune | ||
78 | localdata.setVar('OVERRIDES', localdata.getVar('OVERRIDES', False) + override) | ||
79 | |||
80 | retdict = {} | ||
81 | retdict['tune'] = tune | ||
82 | retdict['ccargs'] = localdata.getVar('TUNE_CCARGS') | ||
83 | retdict['features'] = localdata.getVar('TUNE_FEATURES') | ||
84 | # BASELIB is used by the multilib code to change library paths | ||
85 | retdict['baselib'] = localdata.getVar('BASE_LIB') or localdata.getVar('BASELIB') | ||
86 | retdict['arch'] = localdata.getVar('TUNE_ARCH') | ||
87 | retdict['abiextension'] = localdata.getVar('ABIEXTENSION') | ||
88 | retdict['target_fpu'] = localdata.getVar('TARGET_FPU') | ||
89 | retdict['pkgarch'] = localdata.getVar('TUNE_PKGARCH') | ||
90 | retdict['package_extra_archs'] = localdata.getVar('PACKAGE_EXTRA_ARCHS') | ||
91 | return retdict | ||
92 | |||
93 | get_tune_parameters[vardepsexclude] = "AVAILTUNES TUNE_CCARGS OVERRIDES TUNE_FEATURES BASE_LIB BASELIB TUNE_ARCH ABIEXTENSION TARGET_FPU TUNE_PKGARCH PACKAGE_EXTRA_ARCHS" | ||
94 | |||
95 | DEBIANNAME:${MLPREFIX}libgcc = "libgcc1" | ||
96 | |||
97 | MIRRORS =+ "\ | ||
98 | ${GNU_MIRROR}/gcc https://gcc.gnu.org/pub/gcc/releases/ \ | ||
99 | " | ||
100 | # | ||
101 | # Set some default values | ||
102 | # | ||
103 | gcclibdir = "${libdir}/gcc" | ||
104 | BINV = "${PV}" | ||
105 | #S = "${WORKDIR}/gcc-${PV}" | ||
106 | S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" | ||
107 | |||
108 | B ?= "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" | ||
109 | |||
110 | target_includedir ?= "${includedir}" | ||
111 | target_libdir ?= "${libdir}" | ||
112 | target_base_libdir ?= "${base_libdir}" | ||
113 | target_prefix ?= "${prefix}" | ||
114 | |||
115 | # We need to ensure that for the shared work directory, the do_patch signatures match | ||
116 | # The real WORKDIR location isn't a dependency for the shared workdir. | ||
117 | src_patches[vardepsexclude] = "WORKDIR" | ||
118 | should_apply[vardepsexclude] += "PN" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc b/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc deleted file mode 100644 index e4cdb73f..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | require gcc-multilib-config.inc | ||
2 | require gcc-shared-source.inc | ||
3 | # | ||
4 | # Build the list of lanaguages to build. | ||
5 | # | ||
6 | # These can be overridden by the version specific .inc file. | ||
7 | |||
8 | # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran' | ||
9 | FORTRAN ?= ",f77" | ||
10 | LANGUAGES ?= "c,c++${FORTRAN}" | ||
11 | |||
12 | EXTRA_OECONF_BASE ?= "" | ||
13 | EXTRA_OECONF_PATHS ?= "" | ||
14 | |||
15 | GCCMULTILIB ?= "--disable-multilib" | ||
16 | GCCTHREADS ?= "posix" | ||
17 | |||
18 | GCCPIE ??= "" | ||
19 | |||
20 | SYMVERS_CONF ?= "--enable-symvers=gnu" | ||
21 | |||
22 | EXTRA_OECONF = "\ | ||
23 | ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') != 'no']} \ | ||
24 | --with-gnu-ld \ | ||
25 | --enable-shared \ | ||
26 | --enable-languages=${LANGUAGES} \ | ||
27 | --enable-threads=${GCCTHREADS} \ | ||
28 | ${GCCMULTILIB} \ | ||
29 | ${GCCPIE} \ | ||
30 | --enable-c99 \ | ||
31 | --enable-long-long \ | ||
32 | ${SYMVERS_CONF} \ | ||
33 | --enable-libstdcxx-pch \ | ||
34 | --program-prefix=${TARGET_PREFIX} \ | ||
35 | --without-local-prefix \ | ||
36 | --disable-install-libiberty \ | ||
37 | ${EXTRA_OECONF_BASE} \ | ||
38 | ${EXTRA_OECONF_GCC_FLOAT} \ | ||
39 | ${EXTRA_OECONF_PATHS} \ | ||
40 | ${@get_gcc_mips_plt_setting(bb, d)} \ | ||
41 | ${@get_gcc_ppc_plt_settings(bb, d)} \ | ||
42 | ${@get_gcc_multiarch_setting(bb, d)} \ | ||
43 | --enable-standard-branch-protection \ | ||
44 | " | ||
45 | |||
46 | # glibc version is a minimum controlling whether features are enabled. | ||
47 | # Doesn't need to track glibc exactly | ||
48 | EXTRA_OECONF:append:libc-glibc = " --with-glibc-version=2.28 " | ||
49 | |||
50 | # Set this here since GCC configure won't auto-detect and enable | ||
51 | # initfini-arry when cross compiling. | ||
52 | EXTRA_OECONF:append = " --enable-initfini-array" | ||
53 | |||
54 | export gcc_cv_collect2_libs = 'none required' | ||
55 | # We need to set gcc_cv_collect2_libs else there is cross-compilation badness | ||
56 | # in the config.log files (which might not get generated until do_compile | ||
57 | # hence being missed by the insane do_configure check). | ||
58 | |||
59 | EXTRA_OECONF:append:linux = " --enable-__cxa_atexit" | ||
60 | |||
61 | EXTRA_OECONF:append:mips64 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
62 | EXTRA_OECONF:append:mips64el = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
63 | EXTRA_OECONF:append:mips64n32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
64 | EXTRA_OECONF:append:mips64eln32 = " --with-abi=64 --with-arch-64=mips64 --with-tune-64=mips64" | ||
65 | EXTRA_OECONF:append:mipsisa32r6el = " --with-abi=32 --with-arch=mips32r6" | ||
66 | EXTRA_OECONF:append:mipsisa32r6 = " --with-abi=32 --with-arch=mips32r6" | ||
67 | EXTRA_OECONF:append:mipsisa64r6el = " --with-abi=64 --with-arch-64=mips64r6" | ||
68 | EXTRA_OECONF:append:mipsisa64r6 = " --with-abi=64 --with-arch-64=mips64r6" | ||
69 | |||
70 | EXTRA_OECONF_GCC_FLOAT ??= "" | ||
71 | CPPFLAGS = "" | ||
72 | |||
73 | SYSTEMHEADERS = "${target_includedir}" | ||
74 | SYSTEMLIBS = "${target_base_libdir}/" | ||
75 | SYSTEMLIBS1 = "${target_libdir}/" | ||
76 | |||
77 | do_configure:prepend () { | ||
78 | # teach gcc to find correct target includedir when checking libc ssp support | ||
79 | mkdir -p ${B}/gcc | ||
80 | echo "NATIVE_SYSTEM_HEADER_DIR = ${SYSTEMHEADERS}" > ${B}/gcc/t-oe | ||
81 | cat ${S}/gcc/defaults.h | grep -v "\#endif.*GCC_DEFAULTS_H" > ${B}/gcc/defaults.h.new | ||
82 | cat >>${B}/gcc/defaults.h.new <<_EOF | ||
83 | #define NATIVE_SYSTEM_HEADER_DIR "${SYSTEMHEADERS}" | ||
84 | #define STANDARD_STARTFILE_PREFIX_1 "${SYSTEMLIBS}" | ||
85 | #define STANDARD_STARTFILE_PREFIX_2 "${SYSTEMLIBS1}" | ||
86 | #define SYSTEMLIBS_DIR "${SYSTEMLIBS}" | ||
87 | #endif /* ! GCC_DEFAULTS_H */ | ||
88 | _EOF | ||
89 | mv ${B}/gcc/defaults.h.new ${B}/gcc/defaults.h | ||
90 | } | ||
91 | |||
92 | do_configure () { | ||
93 | # Setup these vars for cross building only | ||
94 | # ... because foo_FOR_TARGET apparently gets misinterpreted inside the | ||
95 | # gcc build stuff when the build is producing a cross compiler - i.e. | ||
96 | # when the 'current' target is the 'host' system, and the host is not | ||
97 | # the target (because the build is actually making a cross compiler!) | ||
98 | if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then | ||
99 | export CC_FOR_TARGET="${CC}" | ||
100 | export GCC_FOR_TARGET="${CC}" | ||
101 | export CXX_FOR_TARGET="${CXX}" | ||
102 | export AS_FOR_TARGET="${HOST_PREFIX}as" | ||
103 | export LD_FOR_TARGET="${HOST_PREFIX}ld" | ||
104 | export NM_FOR_TARGET="${HOST_PREFIX}nm" | ||
105 | export AR_FOR_TARGET="${HOST_PREFIX}ar" | ||
106 | export GFORTRAN_FOR_TARGET="gfortran" | ||
107 | export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib" | ||
108 | fi | ||
109 | export CC_FOR_BUILD="${BUILD_CC}" | ||
110 | export CXX_FOR_BUILD="${BUILD_CXX}" | ||
111 | export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" | ||
112 | export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" | ||
113 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | ||
114 | export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" | ||
115 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
116 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
117 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
118 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
119 | |||
120 | |||
121 | oe_runconf | ||
122 | } | ||
123 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc deleted file mode 100644 index ec87b462..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | inherit cross-canadian | ||
2 | |||
3 | SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)" | ||
4 | PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
5 | |||
6 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc nativesdk-gettext flex-native virtual/libc" | ||
7 | |||
8 | GCCMULTILIB = "--enable-multilib" | ||
9 | |||
10 | require gcc-configure-common.inc | ||
11 | |||
12 | EXTRA_OECONF += "--with-plugin-ld=ld" | ||
13 | EXTRA_OECONF_PATHS = "\ | ||
14 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ | ||
15 | --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \ | ||
16 | --with-sysroot=/not/exist \ | ||
17 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
18 | " | ||
19 | # We have to point gcc at a sysroot but we don't need to rebuild if this changes | ||
20 | # e.g. we switch between different machines with different tunes. | ||
21 | EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH" | ||
22 | TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" | ||
23 | get_gcc_float_setting[vardepvalue] = "" | ||
24 | |||
25 | # | ||
26 | # gcc-cross looks and finds these in ${exec_prefix} but we're not so lucky | ||
27 | # for the sdk. Hardcoding the paths ensures the build doesn't go canadian or worse. | ||
28 | # | ||
29 | export AR_FOR_TARGET = "${TARGET_PREFIX}ar" | ||
30 | export AS_FOR_TARGET = "${TARGET_PREFIX}as" | ||
31 | export DLLTOOL_FOR_TARGET = "${TARGET_PREFIX}dlltool" | ||
32 | export CC_FOR_TARGET = "${TARGET_PREFIX}gcc" | ||
33 | export CXX_FOR_TARGET = "${TARGET_PREFIX}g++" | ||
34 | export GCC_FOR_TARGET = "${TARGET_PREFIX}gcc" | ||
35 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" | ||
36 | export LIPO_FOR_TARGET = "${TARGET_PREFIX}lipo" | ||
37 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" | ||
38 | export OBJDUMP_FOR_TARGET = "${TARGET_PREFIX}objdump" | ||
39 | export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" | ||
40 | export STRIP_FOR_TARGET = "${TARGET_PREFIX}strip" | ||
41 | export WINDRES_FOR_TARGET = "${TARGET_PREFIX}windres" | ||
42 | |||
43 | # | ||
44 | # We need to override this and make sure the compiler can find staging | ||
45 | # | ||
46 | export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}" | ||
47 | |||
48 | do_configure () { | ||
49 | if [ ! -d ${RECIPE_SYSROOT}/${target_includedir} ]; then | ||
50 | mkdir -p ${RECIPE_SYSROOT}/${target_includedir} | ||
51 | fi | ||
52 | export CC_FOR_BUILD="${BUILD_CC}" | ||
53 | export CXX_FOR_BUILD="${BUILD_CXX}" | ||
54 | export CFLAGS_FOR_BUILD="${BUILD_CFLAGS}" | ||
55 | export CPPFLAGS_FOR_BUILD="${BUILD_CPPFLAGS}" | ||
56 | export CXXFLAGS_FOR_BUILD="${BUILD_CXXFLAGS}" | ||
57 | export LDFLAGS_FOR_BUILD="${BUILD_LDFLAGS}" | ||
58 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
59 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
60 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
61 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
62 | oe_runconf | ||
63 | } | ||
64 | |||
65 | do_compile () { | ||
66 | oe_runmake all-host configure-target-libgcc | ||
67 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) | ||
68 | } | ||
69 | |||
70 | PACKAGES = "${PN}-dbg ${PN} ${PN}-doc" | ||
71 | |||
72 | FILES:${PN} = "\ | ||
73 | ${exec_prefix}/bin/* \ | ||
74 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/* \ | ||
75 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
76 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
77 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib* \ | ||
78 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
79 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
80 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | ||
81 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.* \ | ||
82 | ${libdir}/bfd-plugins/*.so \ | ||
83 | ${includedir}/c++/${BINV} \ | ||
84 | ${prefix}/${TARGET_SYS}/bin/* \ | ||
85 | ${prefix}/${TARGET_SYS}/lib/* \ | ||
86 | ${prefix}/${TARGET_SYS}${target_includedir}/* \ | ||
87 | " | ||
88 | INSANE_SKIP:${PN} += "dev-so" | ||
89 | |||
90 | FILES:${PN}-doc = "\ | ||
91 | ${infodir} \ | ||
92 | ${mandir} \ | ||
93 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
94 | " | ||
95 | |||
96 | EXEEXT = "" | ||
97 | |||
98 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
99 | BINRELPATH = "${@os.path.relpath(d.expand("${bindir}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" | ||
100 | # linker plugin path | ||
101 | LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${libdir}/bfd-plugins"))}" | ||
102 | |||
103 | do_install () { | ||
104 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) | ||
105 | oe_runmake 'DESTDIR=${D}' install-host | ||
106 | |||
107 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
108 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
109 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
110 | rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | ||
111 | |||
112 | # We care about g++ not c++ | ||
113 | rm -f ${D}${bindir}/*c++ | ||
114 | |||
115 | # We don't care about the gcc-<version> copies | ||
116 | rm -f ${D}${bindir}/*gcc-${BINV}* | ||
117 | |||
118 | # Cleanup empty directories which are not shipped | ||
119 | # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted | ||
120 | # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686 | ||
121 | local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}" | ||
122 | for i in $empty_dirs; do | ||
123 | [ -d $i ] && rmdir --ignore-fail-on-non-empty $i | ||
124 | done | ||
125 | |||
126 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
127 | # found. | ||
128 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
129 | install -d $dest | ||
130 | suffix=${EXEEXT} | ||
131 | for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
132 | if [ "$t" = "g77" -o "$t" = "gfortran" ] && [ ! -e ${D}${bindir}/${TARGET_PREFIX}$t$suffix ]; then | ||
133 | continue | ||
134 | fi | ||
135 | |||
136 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix | ||
137 | done | ||
138 | |||
139 | # libquadmath headers need to be available in the gcc libexec dir | ||
140 | install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
141 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
142 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
143 | |||
144 | # install LTO linker plugins where binutils tools can find it | ||
145 | install -d ${D}${libdir}/bfd-plugins | ||
146 | ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | ||
147 | |||
148 | chown -R root:root ${D} | ||
149 | |||
150 | cross_canadian_bindirlinks | ||
151 | |||
152 | for i in linux ${CANADIANEXTRAOS} | ||
153 | do | ||
154 | for v in ${CANADIANEXTRAVENDOR} | ||
155 | do | ||
156 | d=${D}${bindir}/../${TARGET_ARCH}$v-$i | ||
157 | install -d $d | ||
158 | for j in ${TARGET_PREFIX}gcc${EXEEXT} ${TARGET_PREFIX}g++${EXEEXT} | ||
159 | do | ||
160 | p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` | ||
161 | case $i in | ||
162 | *musl*) | ||
163 | rm -rf $d/$p | ||
164 | echo "#!/usr/bin/env sh" > $d/$p | ||
165 | echo "exec \`dirname \$0\`/../${TARGET_SYS}/$j -mmusl \$@" >> $d/$p | ||
166 | chmod 0755 $d/$p | ||
167 | ;; | ||
168 | *) | ||
169 | ;; | ||
170 | esac | ||
171 | done | ||
172 | done | ||
173 | done | ||
174 | } | ||
175 | |||
176 | ELFUTILS = "nativesdk-elfutils" | ||
177 | DEPENDS += "nativesdk-gmp nativesdk-mpfr nativesdk-libmpc ${ELFUTILS} nativesdk-zlib nativesdk-zstd" | ||
178 | RDEPENDS:${PN} += "nativesdk-mpfr nativesdk-libmpc ${ELFUTILS}" | ||
179 | |||
180 | SYSTEMHEADERS = "${target_includedir}/" | ||
181 | SYSTEMLIBS = "${target_base_libdir}/" | ||
182 | SYSTEMLIBS1 = "${target_libdir}/" | ||
183 | |||
184 | EXTRA_OECONF += "--enable-poison-system-directories" | ||
185 | |||
186 | # gcc 4.7 needs -isystem | ||
187 | export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET} -isystem=${target_includedir}" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb deleted file mode 100644 index bf53c5cd..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require gcc-cross-canadian.inc | ||
3 | |||
4 | |||
5 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc b/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc deleted file mode 100644 index a540fb24..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | inherit cross | ||
2 | |||
3 | INHIBIT_DEFAULT_DEPS = "1" | ||
4 | EXTRADEPENDS = "" | ||
5 | DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}" | ||
6 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | ||
7 | python () { | ||
8 | if d.getVar("TARGET_OS").startswith("linux"): | ||
9 | d.setVar("EXTRADEPENDS", "linux-libc-headers") | ||
10 | } | ||
11 | |||
12 | PN = "gcc-cross-${TARGET_ARCH}" | ||
13 | |||
14 | # Ignore how TARGET_ARCH is computed. | ||
15 | TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" | ||
16 | |||
17 | require gcc-configure-common.inc | ||
18 | |||
19 | # While we want the 'gnu' hash style, we explicitly set it to sysv here to | ||
20 | # ensure that any recipe which doesn't obey our LDFLAGS (which also set it to | ||
21 | # gnu) will hit a QA failure. | ||
22 | LINKER_HASH_STYLE ?= "sysv" | ||
23 | |||
24 | EXTRA_OECONF += "--enable-poison-system-directories=error" | ||
25 | EXTRA_OECONF:append:sh4 = " \ | ||
26 | --with-multilib-list= \ | ||
27 | --enable-incomplete-targets \ | ||
28 | " | ||
29 | |||
30 | EXTRA_OECONF += "\ | ||
31 | --with-system-zlib \ | ||
32 | " | ||
33 | |||
34 | EXTRA_OECONF:append:libc-baremetal = " --without-headers" | ||
35 | EXTRA_OECONF:remove:libc-baremetal = "--enable-threads=posix" | ||
36 | EXTRA_OECONF:remove:libc-newlib = "--enable-threads=posix" | ||
37 | |||
38 | EXTRA_OECONF_PATHS = "\ | ||
39 | --with-gxx-include-dir=/not/exist${target_includedir}/c++/${BINV} \ | ||
40 | --with-sysroot=/not/exist \ | ||
41 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
42 | " | ||
43 | |||
44 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | ||
45 | |||
46 | |||
47 | do_configure:prepend () { | ||
48 | install -d ${RECIPE_SYSROOT}${target_includedir} | ||
49 | touch ${RECIPE_SYSROOT}${target_includedir}/limits.h | ||
50 | } | ||
51 | |||
52 | do_compile () { | ||
53 | export CC="${BUILD_CC}" | ||
54 | export AR_FOR_TARGET="${TARGET_SYS}-ar" | ||
55 | export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" | ||
56 | export LD_FOR_TARGET="${TARGET_SYS}-ld" | ||
57 | export NM_FOR_TARGET="${TARGET_SYS}-nm" | ||
58 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc" | ||
59 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
60 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
61 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
62 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
63 | |||
64 | # Prevent native/host sysroot path from being used in configargs.h header, | ||
65 | # as it will be rewritten when used by other sysroots preventing support | ||
66 | # for gcc plugins | ||
67 | oe_runmake configure-gcc | ||
68 | sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h | ||
69 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h | ||
70 | |||
71 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
72 | # checksum-options is used to generate a checksum which is embedded into | ||
73 | # the output binary. | ||
74 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
75 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
76 | sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options | ||
77 | |||
78 | oe_runmake all-host configure-target-libgcc | ||
79 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) | ||
80 | } | ||
81 | |||
82 | INHIBIT_PACKAGE_STRIP = "1" | ||
83 | |||
84 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
85 | BINRELPATH = "${@os.path.relpath(d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_SYS}"), d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"))}" | ||
86 | # linker plugin path | ||
87 | LIBRELPATH = "${@os.path.relpath(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/bfd-plugins"))}" | ||
88 | |||
89 | do_install () { | ||
90 | ( cd ${B}/${TARGET_SYS}/libgcc; oe_runmake 'DESTDIR=${D}' install-unwind_h-forbuild install-unwind_h ) | ||
91 | oe_runmake 'DESTDIR=${D}' install-host | ||
92 | |||
93 | install -d ${D}${target_base_libdir} | ||
94 | install -d ${D}${target_libdir} | ||
95 | |||
96 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 | ||
97 | # gfortran is fully backwards compatible. This is a safe and practical solution. | ||
98 | if [ -n "${@d.getVar('FORTRAN')}" ]; then | ||
99 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true | ||
100 | fortsymlinks="g77 gfortran" | ||
101 | fi | ||
102 | |||
103 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
104 | # found. These need to be relative paths so they work in different locations. | ||
105 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
106 | install -d $dest | ||
107 | for t in ar as ld ld.bfd ld.gold nm objcopy objdump ranlib strip gcc cpp $fortsymlinks; do | ||
108 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | ||
109 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t | ||
110 | done | ||
111 | |||
112 | # Remove things we don't need but keep share/java | ||
113 | for d in info man share/doc share/locale share/man share/info; do | ||
114 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d | ||
115 | done | ||
116 | |||
117 | # libquadmath headers need to be available in the gcc libexec dir | ||
118 | install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
119 | cp ${S}/libquadmath/quadmath.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
120 | cp ${S}/libquadmath/quadmath_weak.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
121 | |||
122 | find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f | ||
123 | |||
124 | # install LTO linker plugins where binutils tools can find it | ||
125 | install -d ${D}${libdir}/bfd-plugins | ||
126 | ln -sf ${LIBRELPATH}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | ||
127 | } | ||
128 | |||
129 | do_package[noexec] = "1" | ||
130 | do_packagedata[noexec] = "1" | ||
131 | do_package_write_ipk[noexec] = "1" | ||
132 | do_package_write_rpm[noexec] = "1" | ||
133 | do_package_write_deb[noexec] = "1" | ||
134 | |||
135 | inherit chrpath | ||
136 | |||
137 | python gcc_stash_builddir_fixrpaths() { | ||
138 | # rewrite rpaths, breaking hardlinks as required | ||
139 | process_dir("/", d.getVar("BUILDDIRSTASH"), d, break_hardlinks = True) | ||
140 | } | ||
141 | |||
142 | BUILDDIRSTASH = "${WORKDIR}/stashed-builddir/build" | ||
143 | do_gcc_stash_builddir[dirs] = "${B}" | ||
144 | do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}" | ||
145 | do_gcc_stash_builddir[postfuncs] += "gcc_stash_builddir_fixrpaths" | ||
146 | do_gcc_stash_builddir () { | ||
147 | dest=${BUILDDIRSTASH} | ||
148 | hardlinkdir . $dest | ||
149 | # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files | ||
150 | rm $dest/gcc/include/*.h | ||
151 | cp gcc/include/*.h $dest/gcc/include/ | ||
152 | sysroot-relativelinks.py $dest | ||
153 | } | ||
154 | addtask do_gcc_stash_builddir after do_compile before do_install | ||
155 | SSTATETASKS += "do_gcc_stash_builddir" | ||
156 | do_gcc_stash_builddir[sstate-inputdirs] = "${BUILDDIRSTASH}" | ||
157 | do_gcc_stash_builddir[sstate-outputdirs] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}" | ||
158 | do_gcc_stash_builddir[sstate-fixmedir] = "${COMPONENTS_DIR}/${BUILD_ARCH}/gcc-stashed-builddir-${TARGET_SYS}" | ||
159 | |||
160 | python do_gcc_stash_builddir_setscene () { | ||
161 | sstate_setscene(d) | ||
162 | } | ||
163 | addtask do_gcc_stash_builddir_setscene | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb deleted file mode 100644 index b43cca0c..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require gcc-cross.inc | ||
3 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc deleted file mode 100644 index bd65b1fe..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | inherit crosssdk | ||
2 | |||
3 | PN = "gcc-crosssdk-${SDK_SYS}" | ||
4 | |||
5 | SYSTEMHEADERS = "${SDKPATHNATIVE}${prefix_nativesdk}/include" | ||
6 | SYSTEMLIBS = "${SDKPATHNATIVE}${base_libdir_nativesdk}/" | ||
7 | SYSTEMLIBS1 = "${SDKPATHNATIVE}${libdir_nativesdk}/" | ||
8 | |||
9 | GCCMULTILIB = "--disable-multilib" | ||
10 | |||
11 | DEPENDS = "virtual/${TARGET_PREFIX}binutils gettext-native ${NATIVEDEPS}" | ||
12 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb deleted file mode 100644 index 40a6c4fe..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-cross_${PV}.bb | ||
2 | require gcc-crosssdk.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc b/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc deleted file mode 100644 index 2dbbc23c..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc +++ /dev/null | |||
@@ -1,249 +0,0 @@ | |||
1 | # following code modifies these definitions in the gcc config | ||
2 | # MULTILIB_OPTIONS | ||
3 | # MULTILIB_DIRNAMES | ||
4 | # MULTILIB_OSDIRNAMES | ||
5 | # GLIBC_DYNAMIC_LINKER32 | ||
6 | # GLIBC_DYNAMIC_LINKER64 | ||
7 | # GLIBC_DYNAMIC_LINKERX32 | ||
8 | # GLIBC_DYNAMIC_LINKERN32 | ||
9 | # For more information on use of these variables look at these files in the gcc source code | ||
10 | # gcc/config/i386/t-linux64 | ||
11 | # gcc/config/mips/t-linux64 | ||
12 | # gcc/config/rs6000/t-linux64 | ||
13 | # gcc/config/i386/linux64.h | ||
14 | # gcc/config/mips/linux64.h | ||
15 | # gcc/config/rs6000/linux64.h | ||
16 | |||
17 | MULTILIB_OPTION_WHITELIST ??= "-m32 -m64 -mx32 -mabi=n32 -mabi=32 -mabi=64" | ||
18 | |||
19 | python gcc_multilib_setup() { | ||
20 | import re | ||
21 | import shutil | ||
22 | import glob | ||
23 | |||
24 | srcdir = d.getVar('S') | ||
25 | builddir = d.getVar('B') | ||
26 | src_conf_dir = '%s/gcc/config' % srcdir | ||
27 | build_conf_dir = '%s/gcc/config' % builddir | ||
28 | |||
29 | bb.utils.remove(build_conf_dir, True) | ||
30 | ml_globs = ('%s/*/t-linux64' % src_conf_dir, | ||
31 | '%s/*/linux64.h' % src_conf_dir, | ||
32 | '%s/aarch64/t-aarch64' % src_conf_dir, | ||
33 | '%s/aarch64/aarch64.h' % src_conf_dir, | ||
34 | '%s/aarch64/aarch64-linux.h' % src_conf_dir, | ||
35 | '%s/aarch64/aarch64-cores.def' % src_conf_dir, | ||
36 | '%s/arm/linux-eabi.h' % src_conf_dir, | ||
37 | '%s/*/linux.h' % src_conf_dir, | ||
38 | '%s/linux.h' % src_conf_dir) | ||
39 | |||
40 | # copy the target multilib config files to ${B} | ||
41 | for ml_glob in ml_globs: | ||
42 | for fn in glob.glob(ml_glob): | ||
43 | rel_path = os.path.relpath(fn, src_conf_dir) | ||
44 | parent_dir = os.path.dirname(rel_path) | ||
45 | bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir)) | ||
46 | bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path)) | ||
47 | |||
48 | pn = d.getVar('PN') | ||
49 | multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split() | ||
50 | if not multilibs and pn != "nativesdk-gcc": | ||
51 | return | ||
52 | |||
53 | mlprefix = d.getVar('MLPREFIX') | ||
54 | |||
55 | if ('%sgcc' % mlprefix) != pn and (not pn.startswith('gcc-cross-canadian')) and pn != "nativesdk-gcc": | ||
56 | return | ||
57 | |||
58 | |||
59 | def write_config(root, files, options, dirnames, osdirnames): | ||
60 | for ml_conf_file in files: | ||
61 | with open(root + '/' + ml_conf_file, 'r') as f: | ||
62 | filelines = f.readlines() | ||
63 | # recreate multilib configuration variables | ||
64 | substs = [ | ||
65 | (r'^(\s*(MULTILIB_OPTIONS\s*=).*)$', r'\2 %s' % '/'.join(options)), | ||
66 | (r'^(\s*MULTILIB_OPTIONS\s*\+=.*)$', ''), | ||
67 | (r'^(\s*(MULTILIB_DIRNAMES\s*=).*)$', r'\2 %s' % ' '.join(dirnames)), | ||
68 | (r'^(\s*MULTILIB_DIRNAMES\s*\+=.*)$', ''), | ||
69 | (r'^(\s*(MULTILIB_OSDIRNAMES\s*=).*)$', r'\2 %s' % ' '.join(osdirnames)), | ||
70 | (r'^(\s*MULTILIB_OSDIRNAMES\s*\+=.*)$', ''), | ||
71 | ] | ||
72 | |||
73 | for (i, line) in enumerate(filelines): | ||
74 | for subst in substs: | ||
75 | line = re.sub(subst[0], subst[1], line) | ||
76 | filelines[i] = line | ||
77 | |||
78 | with open(root + '/' + ml_conf_file, 'w') as f: | ||
79 | f.write(''.join(filelines)) | ||
80 | |||
81 | def write_headers(root, files, libdir32, libdir64, libdirx32, libdirn32): | ||
82 | def wrap_libdir(libdir): | ||
83 | if libdir.find('SYSTEMLIBS_DIR') != -1: | ||
84 | return '"%r"' | ||
85 | else: | ||
86 | return '"/%s/"' % libdir | ||
87 | |||
88 | for ml_conf_file in files: | ||
89 | fn = root + '/' + ml_conf_file | ||
90 | if not os.path.exists(fn): | ||
91 | continue | ||
92 | with open(fn, 'r') as f: | ||
93 | filelines = f.readlines() | ||
94 | |||
95 | # replace lines like | ||
96 | # #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
97 | # by | ||
98 | # #define GLIBC_DYNAMIC_LINKER32 "/lib/" "ld-linux.so.2" | ||
99 | # this is needed to put the correct dynamic loader path in the generated binaries | ||
100 | substs = [ | ||
101 | (r'^(#define\s*GLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$', | ||
102 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
103 | (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\"\S+\")$', | ||
104 | r'\1' + wrap_libdir(libdir64) + r'\3'), | ||
105 | (r'^(#define\s*GLIBC_DYNAMIC_LINKER64\s*\"\S+\"\s*)(\S+)(\s*\"\S+\"\s*)(\S+)(\s*\".*\")$', | ||
106 | r'\1' + wrap_libdir(libdir64) + r'\3' + wrap_libdir(libdir64) + r'\5'), | ||
107 | (r'^(#define\s*GLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$', | ||
108 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
109 | (r'^(#define\s*GLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$', | ||
110 | r'\1' + wrap_libdir(libdirx32) + r'\3'), | ||
111 | (r'^(#define\s*GLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$', | ||
112 | r'\1' + wrap_libdir(libdirn32) + r'\3'), | ||
113 | (r'^(#define\s*UCLIBC_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$', | ||
114 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
115 | (r'^(#define\s*UCLIBC_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$', | ||
116 | r'\1' + wrap_libdir(libdir64) + r'\3'), | ||
117 | (r'^(#define\s*UCLIBC_DYNAMIC_LINKERN32\s*)(\S+)(\s*\".*\")$', | ||
118 | r'\1' + wrap_libdir(libdirn32) + r'\3'), | ||
119 | (r'^(#define\s*UCLIBC_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$', | ||
120 | r'\1' + wrap_libdir(libdirx32) + r'\3'), | ||
121 | (r'^(#define\s*UCLIBC_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$', | ||
122 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
123 | (r'^(#define\s*MUSL_DYNAMIC_LINKER32\s*)(\S+)(\s*\".*\")$', | ||
124 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
125 | (r'^(#define\s*MUSL_DYNAMIC_LINKER64\s*)(\S+)(\s*\".*\")$', | ||
126 | r'\1' + wrap_libdir(libdir64) + r'\3'), | ||
127 | (r'^(#define\s*MUSL_DYNAMIC_LINKERX32\s*)(\S+)(\s*\".*\")$', | ||
128 | r'\1' + wrap_libdir(libdirx32) + r'\3'), | ||
129 | (r'^(#define\s*MUSL_DYNAMIC_LINKER\b\s*)(\S+)(\s*\".*\")$', | ||
130 | r'\1' + wrap_libdir(libdir32) + r'\3'), | ||
131 | ] | ||
132 | |||
133 | for (i, line) in enumerate(filelines): | ||
134 | for subst in substs: | ||
135 | line = re.sub(subst[0], subst[1], line) | ||
136 | filelines[i] = line | ||
137 | |||
138 | with open(root + '/' + ml_conf_file, 'w') as f: | ||
139 | f.write(''.join(filelines)) | ||
140 | |||
141 | |||
142 | gcc_target_config_files = { | ||
143 | 'x86_64' : ['gcc/config/i386/t-linux64'], | ||
144 | 'i586' : ['gcc/config/i386/t-linux64'], | ||
145 | 'i686' : ['gcc/config/i386/t-linux64'], | ||
146 | 'mips' : ['gcc/config/mips/t-linux64'], | ||
147 | 'mips64' : ['gcc/config/mips/t-linux64'], | ||
148 | 'powerpc' : ['gcc/config/rs6000/t-linux64'], | ||
149 | 'powerpc64' : ['gcc/config/rs6000/t-linux64'], | ||
150 | 'aarch64' : ['gcc/config/aarch64/t-aarch64'], | ||
151 | 'arm' : ['gcc/config/aarch64/t-aarch64'], | ||
152 | } | ||
153 | |||
154 | gcc_header_config_files = { | ||
155 | 'x86_64' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'], | ||
156 | 'i586' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'], | ||
157 | 'i686' : ['gcc/config/linux.h', 'gcc/config/i386/linux.h', 'gcc/config/i386/linux64.h'], | ||
158 | 'mips' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'], | ||
159 | 'mips64' : ['gcc/config/linux.h', 'gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'], | ||
160 | 'powerpc' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'], | ||
161 | 'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'], | ||
162 | 'aarch64' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'], | ||
163 | 'arm' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'], | ||
164 | } | ||
165 | |||
166 | libdir32 = 'SYSTEMLIBS_DIR' | ||
167 | libdir64 = 'SYSTEMLIBS_DIR' | ||
168 | libdirx32 = 'SYSTEMLIBS_DIR' | ||
169 | libdirn32 = 'SYSTEMLIBS_DIR' | ||
170 | |||
171 | |||
172 | target_arch = (d.getVar('TARGET_ARCH_MULTILIB_ORIGINAL') if mlprefix | ||
173 | else d.getVar('TARGET_ARCH')) | ||
174 | if pn == "nativesdk-gcc": | ||
175 | header_config_files = gcc_header_config_files[d.getVar("SDK_ARCH")] | ||
176 | write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32) | ||
177 | return | ||
178 | |||
179 | if target_arch not in gcc_target_config_files: | ||
180 | bb.warn('gcc multilib setup is not supported for TARGET_ARCH=' + target_arch) | ||
181 | return | ||
182 | |||
183 | target_config_files = gcc_target_config_files[target_arch] | ||
184 | header_config_files = gcc_header_config_files[target_arch] | ||
185 | |||
186 | ml_list = ['DEFAULTTUNE_MULTILIB_ORIGINAL' if mlprefix else 'DEFAULTTUNE'] | ||
187 | mltunes = [('DEFAULTTUNE:virtclass-multilib-%s' % ml) for ml in multilibs] | ||
188 | if mlprefix: | ||
189 | mlindex = 0 | ||
190 | for ml in multilibs: | ||
191 | if mlprefix == ml + '-': | ||
192 | break | ||
193 | mlindex += 1 | ||
194 | |||
195 | ml_list.extend(mltunes[:mlindex] + ['DEFAULTTUNE'] + mltunes[(mlindex + 1):]) | ||
196 | else: | ||
197 | ml_list.extend(mltunes) | ||
198 | |||
199 | options = [] | ||
200 | dirnames = [] | ||
201 | osdirnames = [] | ||
202 | optsets = [] | ||
203 | |||
204 | for ml in ml_list: | ||
205 | tune = d.getVar(ml) | ||
206 | if not tune: | ||
207 | bb.warn("%s doesn't have a corresponding tune. Skipping..." % ml) | ||
208 | continue | ||
209 | tune_parameters = get_tune_parameters(tune, d) | ||
210 | |||
211 | tune_baselib = tune_parameters['baselib'] | ||
212 | if not tune_baselib: | ||
213 | bb.warn("Tune %s doesn't have a baselib set. Skipping..." % tune) | ||
214 | continue | ||
215 | |||
216 | if tune_baselib == 'lib64': | ||
217 | libdir64 = tune_baselib | ||
218 | elif tune_baselib == 'libx32': | ||
219 | libdirx32 = tune_baselib | ||
220 | elif tune_baselib == 'lib32': | ||
221 | libdirn32 = tune_baselib | ||
222 | elif tune_baselib == 'lib': | ||
223 | libdir32 = tune_baselib | ||
224 | else: | ||
225 | bb.error('Unknown libdir (%s) of the tune : %s' % (tune_baselib, tune)) | ||
226 | |||
227 | # take out '-' mcpu='s and march='s from parameters | ||
228 | opts = [] | ||
229 | whitelist = (d.getVar("MULTILIB_OPTION_WHITELIST") or "").split() | ||
230 | for i in d.expand(tune_parameters['ccargs']).split(): | ||
231 | if i in whitelist: | ||
232 | # Need to strip '-' from option | ||
233 | opts.append(i[1:]) | ||
234 | options.append(" ".join(opts)) | ||
235 | |||
236 | if tune_baselib == 'lib': | ||
237 | dirnames.append('32') # /lib => 32bit lib | ||
238 | else: | ||
239 | dirnames.append(tune_baselib.replace('lib', '')) | ||
240 | osdirnames.append('../' + tune_baselib) | ||
241 | |||
242 | write_config(builddir, target_config_files, options, dirnames, osdirnames) | ||
243 | write_headers(builddir, header_config_files, libdir32, libdir64, libdirx32, libdirn32) | ||
244 | } | ||
245 | |||
246 | gcc_multilib_setup[cleandirs] = "${B}/gcc/config" | ||
247 | gcc_multilib_setup[vardepsexclude] = "SDK_ARCH" | ||
248 | |||
249 | EXTRACONFFUNCS += "gcc_multilib_setup" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc b/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc deleted file mode 100644 index 8bb58631..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc +++ /dev/null | |||
@@ -1,310 +0,0 @@ | |||
1 | require gcc-configure-common.inc | ||
2 | |||
3 | SUMMARY = "Runtime libraries from GCC" | ||
4 | |||
5 | # Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3" | ||
6 | # All gcc-runtime packages are now covered by the runtime exception. | ||
7 | LICENSE = "GPL-3.0-with-GCC-exception" | ||
8 | |||
9 | CXXFLAGS:remove = "-fvisibility-inlines-hidden" | ||
10 | |||
11 | EXTRA_OECONF_PATHS = "\ | ||
12 | --with-gxx-include-dir=${includedir}/c++/${BINV} \ | ||
13 | --with-sysroot=/not/exist \ | ||
14 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
15 | " | ||
16 | |||
17 | EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu" | ||
18 | EXTRA_OECONF:append = " --cache-file=${B}/config.cache" | ||
19 | EXTRA_OECONF:append:libc-newlib = " --with-newlib --with-target-subdir" | ||
20 | EXTRA_OECONF:append:libc-baremetal = " --with-target-subdir" | ||
21 | |||
22 | # Disable ifuncs for libatomic on arm conflicts -march/-mcpu | ||
23 | EXTRA_OECONF:append:arm = " libat_cv_have_ifunc=no " | ||
24 | EXTRA_OECONF:append:armeb = " libat_cv_have_ifunc=no " | ||
25 | |||
26 | DISABLE_STATIC:class-nativesdk ?= "" | ||
27 | |||
28 | # Newlib does not support symbol versioning on libsdtcc++ | ||
29 | SYMVERS_CONF:libc-newlib = "" | ||
30 | |||
31 | # Building with thumb enabled on armv6t fails | ||
32 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
33 | |||
34 | RUNTIMELIBITM = "libitm" | ||
35 | RUNTIMELIBITM:arc = "" | ||
36 | RUNTIMELIBITM:mipsarch = "" | ||
37 | RUNTIMELIBITM:nios2 = "" | ||
38 | RUNTIMELIBITM:microblaze = "" | ||
39 | RUNTIMELIBITM:riscv32 = "" | ||
40 | RUNTIMELIBITM:riscv64 = "" | ||
41 | RUNTIMELIBITM:loongarch64 = "" | ||
42 | RUNTIMELIBSSP ?= "" | ||
43 | RUNTIMELIBSSP:mingw32 ?= "libssp" | ||
44 | |||
45 | RUNTIMETARGET = "${RUNTIMELIBSSP} libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ | ||
46 | ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \ | ||
47 | " | ||
48 | # Only build libstdc++ for newlib | ||
49 | RUNTIMETARGET:libc-newlib = "libstdc++-v3" | ||
50 | |||
51 | # libiberty | ||
52 | # libgfortran needs separate recipe due to libquadmath dependency | ||
53 | |||
54 | do_configure () { | ||
55 | export CXX="${CXX} -nostdinc++ -L${WORKDIR}/dummylib" | ||
56 | # libstdc++ isn't built yet so CXX would error not able to find it which breaks stdc++'s configure | ||
57 | # tests. Create a dummy empty lib for the purposes of configure. | ||
58 | mkdir -p ${WORKDIR}/dummylib | ||
59 | ${CC} -x c /dev/null -c -o ${WORKDIR}/dummylib/dummylib.o | ||
60 | ${AR} rcs ${WORKDIR}/dummylib/libstdc++.a ${WORKDIR}/dummylib/dummylib.o | ||
61 | for d in libgcc ${RUNTIMETARGET}; do | ||
62 | echo "Configuring $d" | ||
63 | rm -rf ${B}/${TARGET_SYS}/$d/ | ||
64 | mkdir -p ${B}/${TARGET_SYS}/$d/ | ||
65 | cd ${B}/${TARGET_SYS}/$d/ | ||
66 | chmod a+x ${S}/$d/configure | ||
67 | ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
68 | if [ "$d" = "libgcc" ]; then | ||
69 | (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) | ||
70 | fi | ||
71 | done | ||
72 | } | ||
73 | EXTRACONFFUNCS += "extract_stashed_builddir" | ||
74 | do_configure[depends] += "${COMPILERDEP}" | ||
75 | |||
76 | do_compile () { | ||
77 | for d in libgcc ${RUNTIMETARGET}; do | ||
78 | cd ${B}/${TARGET_SYS}/$d/ | ||
79 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ | ||
80 | done | ||
81 | } | ||
82 | |||
83 | do_install () { | ||
84 | for d in ${RUNTIMETARGET}; do | ||
85 | cd ${B}/${TARGET_SYS}/$d/ | ||
86 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install | ||
87 | done | ||
88 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then | ||
89 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
90 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
91 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include | ||
92 | fi | ||
93 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir | ||
94 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir | ||
95 | rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir | ||
96 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then | ||
97 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | ||
98 | fi | ||
99 | if [ -d ${D}${infodir} ]; then | ||
100 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | ||
101 | fi | ||
102 | } | ||
103 | |||
104 | do_install:append:class-target () { | ||
105 | if [ "${TARGET_OS}" = "linux-gnuspe" ]; then | ||
106 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
107 | fi | ||
108 | |||
109 | if [ "${TARGET_OS}" = "linux-gnun32" ]; then | ||
110 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
111 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux | ||
112 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/32 | ||
113 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then | ||
114 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
115 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 | ||
116 | else | ||
117 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
118 | fi | ||
119 | elif [ "${TARGET_OS}" = "linux-gnux32" ]; then | ||
120 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
121 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux | ||
122 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-linux/x32 | ||
123 | elif [ "${MULTILIB_VARIANTS}" != "" ]; then | ||
124 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
125 | ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux/32 | ||
126 | else | ||
127 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux | ||
128 | fi | ||
129 | elif [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
130 | mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} | ||
131 | ln -s ../${TARGET_SYS}/bits ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/bits | ||
132 | ln -s ../${TARGET_SYS}/ext ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}/ext | ||
133 | fi | ||
134 | |||
135 | if [ "${TARGET_ARCH}" == "x86_64" -a "${MULTILIB_VARIANTS}" != "" ];then | ||
136 | ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32 | ||
137 | fi | ||
138 | |||
139 | if [ "${TCLIBC}" != "glibc" ]; then | ||
140 | case "${TARGET_OS}" in | ||
141 | "linux-musl" | "linux-*spe") extra_target_os="linux";; | ||
142 | "linux-musleabi") extra_target_os="linux-gnueabi";; | ||
143 | *) extra_target_os="linux";; | ||
144 | esac | ||
145 | ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os | ||
146 | fi | ||
147 | chown -R root:root ${D} | ||
148 | } | ||
149 | |||
150 | INHIBIT_DEFAULT_DEPS = "1" | ||
151 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc virtual/${MLPREFIX}libc" | ||
152 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" | ||
153 | |||
154 | #BBCLASSEXTEND = "nativesdk" | ||
155 | |||
156 | PACKAGES = "\ | ||
157 | ${PN}-dbg \ | ||
158 | libstdc++ \ | ||
159 | libstdc++-precompile-dev \ | ||
160 | libstdc++-dev \ | ||
161 | libstdc++-staticdev \ | ||
162 | libg2c \ | ||
163 | libg2c-dev \ | ||
164 | libssp \ | ||
165 | libssp-dev \ | ||
166 | libssp-staticdev \ | ||
167 | libquadmath \ | ||
168 | libquadmath-dev \ | ||
169 | libquadmath-staticdev \ | ||
170 | libgomp \ | ||
171 | libgomp-dev \ | ||
172 | libgomp-staticdev \ | ||
173 | libatomic \ | ||
174 | libatomic-dev \ | ||
175 | libatomic-staticdev \ | ||
176 | libitm \ | ||
177 | libitm-dev \ | ||
178 | libitm-staticdev \ | ||
179 | " | ||
180 | # The base package doesn't exist, so we clear the recommends. | ||
181 | RRECOMMENDS:${PN}-dbg = "" | ||
182 | |||
183 | # include python debugging scripts | ||
184 | FILES:${PN}-dbg += "\ | ||
185 | ${libdir}/libstdc++.*-gdb.py \ | ||
186 | ${datadir}/gcc-${BINV}/python/libstdcxx \ | ||
187 | " | ||
188 | |||
189 | FILES:libg2c = "${target_libdir}/libg2c.so.*" | ||
190 | SUMMARY:libg2c = "Companion runtime library for g77" | ||
191 | FILES:libg2c-dev = "\ | ||
192 | ${libdir}/libg2c.so \ | ||
193 | ${libdir}/libg2c.a \ | ||
194 | ${libdir}/libfrtbegin.a \ | ||
195 | " | ||
196 | SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files" | ||
197 | |||
198 | FILES:libstdc++ = "${libdir}/libstdc++.so.*" | ||
199 | SUMMARY:libstdc++ = "GNU standard C++ library" | ||
200 | FILES:libstdc++-dev = "\ | ||
201 | ${includedir}/c++/ \ | ||
202 | ${libdir}/libstdc++.so \ | ||
203 | ${libdir}/libstdc++*.la \ | ||
204 | ${libdir}/libsupc++.la \ | ||
205 | " | ||
206 | SUMMARY:libstdc++-dev = "GNU standard C++ library - development files" | ||
207 | FILES:libstdc++-staticdev = "\ | ||
208 | ${libdir}/libstdc++*.a \ | ||
209 | ${libdir}/libsupc++.a \ | ||
210 | " | ||
211 | SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files" | ||
212 | |||
213 | FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch" | ||
214 | SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files" | ||
215 | |||
216 | FILES:libssp = "${libdir}/libssp.so.*" | ||
217 | SUMMARY:libssp = "GNU stack smashing protection library" | ||
218 | FILES:libssp-dev = "\ | ||
219 | ${libdir}/libssp*.so \ | ||
220 | ${libdir}/libssp*_nonshared.a \ | ||
221 | ${libdir}/libssp*.la \ | ||
222 | ${libdir}/${TARGET_SYS}/${BINV}/include/ssp \ | ||
223 | " | ||
224 | SUMMARY:libssp-dev = "GNU stack smashing protection library - development files" | ||
225 | FILES:libssp-staticdev = "${libdir}/libssp*.a" | ||
226 | SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files" | ||
227 | |||
228 | FILES:libquadmath = "${libdir}/libquadmath*.so.*" | ||
229 | SUMMARY:libquadmath = "GNU quad-precision math library" | ||
230 | FILES:libquadmath-dev = "\ | ||
231 | ${libdir}/${TARGET_SYS}/${BINV}/include/quadmath* \ | ||
232 | ${libdir}/libquadmath*.so \ | ||
233 | ${libdir}/libquadmath.la \ | ||
234 | " | ||
235 | SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files" | ||
236 | FILES:libquadmath-staticdev = "${libdir}/libquadmath.a" | ||
237 | SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files" | ||
238 | |||
239 | FILES:libgomp = "${libdir}/libgomp*${SOLIBS}" | ||
240 | SUMMARY:libgomp = "GNU OpenMP parallel programming library" | ||
241 | FILES:libgomp-dev = "\ | ||
242 | ${libdir}/libgomp*${SOLIBSDEV} \ | ||
243 | ${libdir}/libgomp*.la \ | ||
244 | ${libdir}/libgomp.spec \ | ||
245 | ${libdir}/${TARGET_SYS}/${BINV}/include/acc_prof.h \ | ||
246 | ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \ | ||
247 | ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \ | ||
248 | " | ||
249 | SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files" | ||
250 | FILES:libgomp-staticdev = "${libdir}/libgomp*.a" | ||
251 | SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files" | ||
252 | |||
253 | FILES:libatomic = "${libdir}/libatomic.so.*" | ||
254 | SUMMARY:libatomic = "GNU C++11 atomics support library" | ||
255 | FILES:libatomic-dev = "\ | ||
256 | ${libdir}/libatomic.so \ | ||
257 | ${libdir}/libatomic.la \ | ||
258 | " | ||
259 | SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files" | ||
260 | FILES:libatomic-staticdev = "${libdir}/libatomic.a" | ||
261 | SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files" | ||
262 | |||
263 | FILES:libitm = "${libdir}/libitm.so.*" | ||
264 | SUMMARY:libitm = "GNU transactional memory support library" | ||
265 | FILES:libitm-dev = "\ | ||
266 | ${libdir}/libitm.so \ | ||
267 | ${libdir}/libitm.la \ | ||
268 | ${libdir}/libitm.spec \ | ||
269 | " | ||
270 | SUMMARY:libitm-dev = "GNU transactional memory support library - development files" | ||
271 | FILES:libitm-staticdev = "${libdir}/libitm.a" | ||
272 | SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files" | ||
273 | |||
274 | require gcc-testsuite.inc | ||
275 | |||
276 | EXTRA_OEMAKE:prepend:task-check = "${PARALLEL_MAKE} " | ||
277 | |||
278 | MAKE_CHECK_TARGETS ??= "check-gcc ${@" ".join("check-target-" + i for i in d.getVar("RUNTIMETARGET").split())}" | ||
279 | # prettyprinters and xmethods require gdb tooling | ||
280 | MAKE_CHECK_IGNORE ??= "prettyprinters.exp xmethods.exp" | ||
281 | MAKE_CHECK_RUNTESTFLAGS ??= "${MAKE_CHECK_BOARDARGS} --ignore '${MAKE_CHECK_IGNORE}'" | ||
282 | |||
283 | # specific host and target dependencies required for test suite running | ||
284 | do_check[depends] += "dejagnu-native:do_populate_sysroot expect-native:do_populate_sysroot" | ||
285 | do_check[depends] += "virtual/libc:do_populate_sysroot" | ||
286 | # only depend on qemu if targeting linux user execution | ||
287 | do_check[depends] += "${@'qemu-native:do_populate_sysroot' if "user" in d.getVar('TOOLCHAIN_TEST_TARGET') else ''}" | ||
288 | # extend the recipe sysroot to include the built libraries (for qemu usermode) | ||
289 | do_check[prefuncs] += "extend_recipe_sysroot" | ||
290 | do_check[prefuncs] += "check_prepare" | ||
291 | do_check[dirs] = "${WORKDIR}/dejagnu ${B}" | ||
292 | do_check[nostamp] = "1" | ||
293 | do_check() { | ||
294 | export DEJAGNU="${WORKDIR}/dejagnu/site.exp" | ||
295 | |||
296 | # HACK: this works around the configure setting CXX with -nostd* args | ||
297 | sed -i 's#-nostdinc++ -L${WORKDIR}/dummylib##g' $(find ${B} -name testsuite_flags | head -1) | ||
298 | |||
299 | if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then | ||
300 | # qemu user has issues allocating large amounts of memory | ||
301 | export G_SLICE=always-malloc | ||
302 | # no test should need more that 10G of memory, this prevents tests like pthread7-rope from leaking memory | ||
303 | ulimit -m 4194304 | ||
304 | ulimit -v 10485760 | ||
305 | fi | ||
306 | |||
307 | oe_runmake -i ${MAKE_CHECK_TARGETS} RUNTESTFLAGS="${MAKE_CHECK_RUNTESTFLAGS}" | ||
308 | } | ||
309 | addtask check after do_compile do_populate_sysroot | ||
310 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb deleted file mode 100644 index dd430b57..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require gcc-runtime.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc deleted file mode 100644 index f6aa9c99..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | require gcc-configure-common.inc | ||
2 | |||
3 | LICENSE = "NCSA | MIT" | ||
4 | |||
5 | LIC_FILES_CHKSUM = "\ | ||
6 | file://libsanitizer/LICENSE.TXT;md5=0249c37748936faf5b1efd5789587909 \ | ||
7 | " | ||
8 | |||
9 | EXTRA_OECONF_PATHS = "\ | ||
10 | --with-sysroot=/not/exist \ | ||
11 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
12 | " | ||
13 | |||
14 | do_configure () { | ||
15 | rm -rf ${B}/${TARGET_SYS}/libsanitizer/ | ||
16 | mkdir -p ${B}/${TARGET_SYS}/libsanitizer/ | ||
17 | cd ${B}/${TARGET_SYS}/libsanitizer/ | ||
18 | chmod a+x ${S}/libsanitizer/configure | ||
19 | relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/${TARGET_SYS}/libsanitizer")} | ||
20 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
21 | # Easiest way to stop bad RPATHs getting into the library since we have a | ||
22 | # broken libtool here | ||
23 | sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libsanitizer/libtool | ||
24 | # Link to the sysroot's libstdc++ instead of one gcc thinks it just built | ||
25 | sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/${TARGET_SYS}/libsanitizer/*/Makefile | ||
26 | } | ||
27 | EXTRACONFFUNCS += "extract_stashed_builddir" | ||
28 | do_configure[depends] += "${COMPILERDEP}" | ||
29 | |||
30 | do_compile () { | ||
31 | cd ${B}/${TARGET_SYS}/libsanitizer/ | ||
32 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ | ||
33 | } | ||
34 | |||
35 | do_install () { | ||
36 | cd ${B}/${TARGET_SYS}/libsanitizer/ | ||
37 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install | ||
38 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then | ||
39 | install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
40 | mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
41 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include | ||
42 | fi | ||
43 | if [ -d ${D}${infodir} ]; then | ||
44 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | ||
45 | fi | ||
46 | chown -R root:root ${D} | ||
47 | } | ||
48 | |||
49 | INHIBIT_DEFAULT_DEPS = "1" | ||
50 | ALLOW_EMPTY:${PN} = "1" | ||
51 | DEPENDS = "virtual/crypt gcc-runtime virtual/${TARGET_PREFIX}gcc" | ||
52 | |||
53 | # used to fix ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21: error: 'st.st_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
54 | DEBUG_OPTIMIZATION:append = " -Wno-error" | ||
55 | |||
56 | #BBCLASSEXTEND = "nativesdk" | ||
57 | |||
58 | PACKAGES = "${PN} ${PN}-dbg" | ||
59 | PACKAGES += "libasan libubsan liblsan libtsan" | ||
60 | PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev" | ||
61 | PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev" | ||
62 | |||
63 | RDEPENDS:libasan += "libstdc++" | ||
64 | RDEPENDS:libubsan += "libstdc++" | ||
65 | RDEPENDS:liblsan += "libstdc++" | ||
66 | RDEPENDS:libtsan += "libstdc++" | ||
67 | RDEPENDS:libasan-dev += "${PN}" | ||
68 | RDEPENDS:libubsan-dev += "${PN}" | ||
69 | RDEPENDS:liblsan-dev += "${PN}" | ||
70 | RDEPENDS:libtsan-dev += "${PN}" | ||
71 | RRECOMMENDS:${PN} += "libasan libubsan" | ||
72 | RRECOMMENDS:${PN}:append:x86 = " liblsan" | ||
73 | RRECOMMENDS:${PN}:append:x86-64 = " liblsan libtsan" | ||
74 | RRECOMMENDS:${PN}:append:powerpc64 = " liblsan libtsan" | ||
75 | RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan" | ||
76 | |||
77 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | ||
78 | do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | ||
79 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | ||
80 | |||
81 | # Only x86, powerpc, sparc, s390, arm, and aarch64 are supported | ||
82 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux' | ||
83 | # musl is currently broken entirely | ||
84 | COMPATIBLE_HOST:libc-musl = 'null' | ||
85 | |||
86 | FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*" | ||
87 | FILES:libasan-dev += "\ | ||
88 | ${libdir}/libasan_preinit.o \ | ||
89 | ${libdir}/libasan.so \ | ||
90 | ${libdir}/libhwasan.so \ | ||
91 | ${libdir}/libasan.la \ | ||
92 | " | ||
93 | FILES:libasan-staticdev += "${libdir}/libasan.a \ | ||
94 | ${libdir}/libhwasan.a \ | ||
95 | " | ||
96 | |||
97 | FILES:libubsan += "${libdir}/libubsan.so.*" | ||
98 | FILES:libubsan-dev += "\ | ||
99 | ${libdir}/libubsan.so \ | ||
100 | ${libdir}/libubsan.la \ | ||
101 | " | ||
102 | FILES:libubsan-staticdev += "${libdir}/libubsan.a" | ||
103 | |||
104 | FILES:liblsan += "${libdir}/liblsan.so.*" | ||
105 | FILES:liblsan-dev += "\ | ||
106 | ${libdir}/liblsan.so \ | ||
107 | ${libdir}/liblsan.la \ | ||
108 | ${libdir}/liblsan_preinit.o \ | ||
109 | " | ||
110 | FILES:liblsan-staticdev += "${libdir}/liblsan.a" | ||
111 | |||
112 | FILES:libtsan += "${libdir}/libtsan.so.*" | ||
113 | FILES:libtsan-dev += "\ | ||
114 | ${libdir}/libtsan.so \ | ||
115 | ${libdir}/libtsan.la \ | ||
116 | ${libdir}/libtsan_*.o \ | ||
117 | " | ||
118 | FILES:libtsan-staticdev += "${libdir}/libtsan.a" | ||
119 | |||
120 | FILES:${PN} = "${libdir}/*.spec ${libdir}/${TARGET_SYS}/${BINV}/include/sanitizer/*.h" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb deleted file mode 100644 index 8bda2cca..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require gcc-sanitizers.inc | ||
3 | |||
4 | # Building with thumb enabled on armv4t armv5t fails with | ||
5 | # sanitizer_linux.s:5749: Error: lo register required -- `ldr ip,[sp],#8' | ||
6 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
7 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc b/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc deleted file mode 100644 index 03f520b0..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | do_fetch() { | ||
2 | : | ||
3 | } | ||
4 | do_fetch[noexec] = "1" | ||
5 | deltask do_unpack | ||
6 | deltask do_patch | ||
7 | |||
8 | SRC_URI = "" | ||
9 | |||
10 | do_configure[depends] += "gcc-source-${PV}:do_preconfigure" | ||
11 | do_populate_lic[depends] += "gcc-source-${PV}:do_unpack" | ||
12 | do_deploy_source_date_epoch[depends] += "gcc-source-${PV}:do_deploy_source_date_epoch" | ||
13 | |||
14 | # Copy the SDE from the shared workdir to the recipe workdir | ||
15 | do_deploy_source_date_epoch () { | ||
16 | sde_file=${SDE_FILE} | ||
17 | sde_file=${sde_file#${WORKDIR}/} | ||
18 | mkdir -p ${SDE_DEPLOYDIR} $(dirname ${SDE_FILE}) | ||
19 | cp -p $(dirname ${S})/$sde_file ${SDE_DEPLOYDIR} | ||
20 | cp -p $(dirname ${S})/$sde_file ${SDE_FILE} | ||
21 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source.inc b/meta-microblaze/recipes-devtools/gcc/gcc-source.inc deleted file mode 100644 index 265bcf4b..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-source.inc +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | deltask do_configure | ||
2 | deltask do_compile | ||
3 | deltask do_install | ||
4 | deltask do_populate_sysroot | ||
5 | deltask do_populate_lic | ||
6 | RM_WORK_EXCLUDE += "${PN}" | ||
7 | |||
8 | inherit nopackages | ||
9 | |||
10 | PN = "gcc-source-${PV}" | ||
11 | WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}" | ||
12 | SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:" | ||
13 | |||
14 | STAMP = "${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}" | ||
15 | STAMPCLEAN = "${STAMPS_DIR}/work-shared/gcc-${PV}-*" | ||
16 | |||
17 | INHIBIT_DEFAULT_DEPS = "1" | ||
18 | DEPENDS = "" | ||
19 | PACKAGES = "" | ||
20 | TARGET_ARCH = "allarch" | ||
21 | TARGET_AS_ARCH = "none" | ||
22 | TARGET_CC_ARCH = "none" | ||
23 | TARGET_LD_ARCH = "none" | ||
24 | TARGET_OS = "linux" | ||
25 | baselib = "lib" | ||
26 | PACKAGE_ARCH = "all" | ||
27 | |||
28 | B = "${WORKDIR}/build" | ||
29 | |||
30 | # This needs to be Python to avoid lots of shell variables becoming dependencies. | ||
31 | python do_preconfigure () { | ||
32 | import subprocess | ||
33 | cmd = d.expand('cd ${S} && PATH=${PATH} gnu-configize') | ||
34 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
35 | cmd = d.expand("sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure") | ||
36 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
37 | |||
38 | # Easiest way to stop bad RPATHs getting into the library since we have a | ||
39 | # broken libtool here (breaks cross-canadian and target at least) | ||
40 | cmd = d.expand("sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${S}/libcc1/configure") | ||
41 | subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | ||
42 | } | ||
43 | addtask do_preconfigure after do_patch | ||
44 | do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot" | ||
45 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend deleted file mode 100644 index 42bcd174..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.%.bbappend +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | # Add MicroBlaze Patches (only when using MicroBlaze) | ||
2 | FILESEXTRAPATHS:append := ":${THISDIR}/gcc-12" | ||
3 | |||
4 | SRC_URI += " \ | ||
5 | file://0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch \ | ||
6 | file://0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch \ | ||
7 | file://0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch \ | ||
8 | file://0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch \ | ||
9 | file://0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch \ | ||
10 | file://0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch \ | ||
11 | file://0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch \ | ||
12 | file://0008-Patch-microblaze-Fix-atomic-side-effects.patch \ | ||
13 | file://0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch \ | ||
14 | file://0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch \ | ||
15 | file://0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch \ | ||
16 | file://0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch \ | ||
17 | file://0013-Patch-microblaze-Removed-moddi3-routinue.patch \ | ||
18 | file://0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch \ | ||
19 | file://0015-Patch-microblaze-Add-optimized-lshrsi3.patch \ | ||
20 | file://0016-Patch-microblaze-Add-cbranchsi4_reg.patch \ | ||
21 | file://0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch \ | ||
22 | file://0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch \ | ||
23 | file://0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch \ | ||
24 | file://0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch \ | ||
25 | file://0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch \ | ||
26 | file://0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch \ | ||
27 | file://0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch \ | ||
28 | file://0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch \ | ||
29 | file://0025-Fixing-the-issue-with-the-builtin_alloc.patch \ | ||
30 | file://0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch \ | ||
31 | file://0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch \ | ||
32 | file://0028-Intial-commit-for-64bit-MB-sources.patch \ | ||
33 | file://0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch \ | ||
34 | file://0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch \ | ||
35 | file://0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch \ | ||
36 | file://0032-Patch-MicroBlaze-Fixed-issues-like.patch \ | ||
37 | file://0033-Patch-MicroBlaze.patch \ | ||
38 | file://0034-Added-double-arith-instructions.patch \ | ||
39 | file://0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch \ | ||
40 | file://0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch \ | ||
41 | file://0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch \ | ||
42 | file://0038-fixing-the-typo-errors-in-umodsi3-file.patch \ | ||
43 | file://0039-fixing-the-32bit-LTO-related-issue9-1014024.patch \ | ||
44 | file://0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch \ | ||
45 | file://0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch \ | ||
46 | file://0042-fixing-the-long-long-long-mingw-toolchain-issue.patch \ | ||
47 | file://0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch \ | ||
48 | file://0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch \ | ||
49 | file://0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch \ | ||
50 | file://0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch \ | ||
51 | file://0047-Added-new-MB-64-single-register-arithmetic-instructi.patch \ | ||
52 | file://0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch \ | ||
53 | file://0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch \ | ||
54 | file://0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch \ | ||
55 | file://0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch \ | ||
56 | file://0052-Patch-MicroBlaze.patch \ | ||
57 | file://0053-patch-microblaze64-Add-Zero_extended-instructions.patch \ | ||
58 | file://microblaze-mulitlib-hack.patch \ | ||
59 | " | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb deleted file mode 100644 index b890fa33..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require recipes-devtools/gcc/gcc-source.inc | ||
3 | |||
4 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend new file mode 100644 index 00000000..51b08f36 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-source_13.%.bbappend | |||
@@ -0,0 +1,63 @@ | |||
1 | # Add MicroBlaze Patches (only when using MicroBlaze) | ||
2 | FILESEXTRAPATHS:append := ":${THISDIR}/gcc-13" | ||
3 | |||
4 | # Our changes are all local, no real patch-status | ||
5 | ERROR_QA:remove = "patch-status" | ||
6 | |||
7 | SRC_URI += " \ | ||
8 | file://0001-LOCAL-Testsuite-builtins-tests-require-fpic-Signed-o.patch \ | ||
9 | file://0002-Quick-fail-g-.dg-opt-memcpy1.C-This-particular-testc.patch \ | ||
10 | file://0003-For-dejagnu-static-testing-on-qemu-suppress-warnings.patch \ | ||
11 | file://0004-Add-MicroBlaze-to-target-supports-for-atomic-buil.-..patch \ | ||
12 | file://0005-Update-MicroBlaze-strings-test-for-new-scan-assembly.patch \ | ||
13 | file://0006-Allow-MicroBlaze-.weakext-pattern-in-regex-match-Ext.patch \ | ||
14 | file://0007-Add-MicroBlaze-to-check_profiling_available-Testsuit.patch \ | ||
15 | file://0008-Fix-atomic-side-effects.-In-atomic_compare_and_swaps.patch \ | ||
16 | file://0009-Fix-atomic-boolean-return-value.-In-atomic_compare_a.patch \ | ||
17 | file://0010-Fix-the-Microblaze-crash-with-msmall-divides-flag-Co.patch \ | ||
18 | file://0011-Added-ashrsi3_with_size_opt-Added-ashrsi3_with_size_.patch \ | ||
19 | file://0012-Use-bralid-for-profiler-calls-Signed-off-by-Edgar-E..patch \ | ||
20 | file://0013-Removed-moddi3-routinue-Using-the-default-moddi3-fun.patch \ | ||
21 | file://0014-Add-INIT_PRIORITY-support-Added-TARGET_ASM_CONSTRUCT.patch \ | ||
22 | file://0015-Add-optimized-lshrsi3-When-barrel-shifter-is-not-pre.patch \ | ||
23 | file://0016-Add-cbranchsi4_reg-This-patch-optimizes-the-generati.patch \ | ||
24 | file://0017-Inline-Expansion-of-fsqrt-builtin.-The-changes-are-m.patch \ | ||
25 | file://0018-microblaze.md-Improve-adddi3-and-subdi3-insn-definit.patch \ | ||
26 | file://0019-Update-ashlsi3-movsf-patterns-This-patch-removes-the.patch \ | ||
27 | file://0020-8-stage-pipeline-for-microblaze-This-patch-adds-the-.patch \ | ||
28 | file://0021-Correct-the-const-high-double-immediate-value-with-t.patch \ | ||
29 | file://0022-Fix-internal-compiler-error-with-msmall-divides-This.patch \ | ||
30 | file://0023-Fix-the-calculation-of-high-word-in-a-long-long-64-b.patch \ | ||
31 | file://0024-this-patch-has-1.Fixed-the-bug-in-version-calculatio.patch \ | ||
32 | file://0025-Fixing-the-issue-with-the-builtin_alloc.-register-r1.patch \ | ||
33 | file://0026-Removed-fsqrt-generation-for-double-values.patch \ | ||
34 | file://0027-Intial-commit-of-64-bit-Microblaze.patch \ | ||
35 | file://0028-Intial-commit-for-64bit-MB-sources.-Need-to-cleanup-.patch \ | ||
36 | file://0029-re-arrangement-of-the-compare-branches.patch \ | ||
37 | file://0030-previous-commit-broke-the-handling-of-SI-Branch-comp.patch \ | ||
38 | file://0031-Support-of-multilibs-with-m64.patch \ | ||
39 | file://0032-Fixed-issues-like-1-Interrupt-alignment-issue-2-Sign.patch \ | ||
40 | file://0033-fixed-below-issues-Floating-point-print-issues-in-64.patch \ | ||
41 | file://0034-Added-double-arith-instructions-Fixed-prologue-stack.patch \ | ||
42 | file://0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch \ | ||
43 | file://0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch \ | ||
44 | file://0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch \ | ||
45 | file://0038-fixing-the-typo-errors-in-umodsi3-file.patch \ | ||
46 | file://0039-fixing-the-32bit-LTO-related-issue9-1014024.patch \ | ||
47 | file://0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch \ | ||
48 | file://0041-corrected-SPN-for-dlong-instruction-mapping.patch \ | ||
49 | file://0042-fixing-the-long-long-long-mingw-toolchain-issue.patch \ | ||
50 | file://0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch \ | ||
51 | file://0044-We-will-check-the-possibility-of-peephole2-optimizat.patch \ | ||
52 | file://0045-fixed-typos-in-mul-div-and-mod-assembly-files.patch \ | ||
53 | file://0046-MB-64-removal-of-barrel-shift-instructions-from-defa.patch \ | ||
54 | file://0047-Added-new-MB-64-single-register-arithmetic-instructi.patch \ | ||
55 | file://0048-Added-support-for-64-bit-Immediate-values.patch \ | ||
56 | file://0049-Fix-Compiler-crash-with-freg-struct-return-This-patc.patch \ | ||
57 | file://0050-Add-TARGET_OPTION_OPTIMIZATION-and-disable-fivopts-b.patch \ | ||
58 | file://0051-Reducing-Stack-space-for-arguments.patch \ | ||
59 | file://0052-If-we-use-break_handler-attribute-then-interrupt-vec.patch \ | ||
60 | file://0053-Add-Zero_extended-instructions.patch \ | ||
61 | file://0054-Fix-failure-with-gcc.c-torture-execute-ashrdi-1.c-Os.patch \ | ||
62 | file://microblaze-mulitlib-hack.patch \ | ||
63 | " | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-target.inc b/meta-microblaze/recipes-devtools/gcc/gcc-target.inc deleted file mode 100644 index 7dac3ef4..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-target.inc +++ /dev/null | |||
@@ -1,259 +0,0 @@ | |||
1 | GCCMULTILIB = "--enable-multilib" | ||
2 | require gcc-configure-common.inc | ||
3 | |||
4 | EXTRA_OECONF_PATHS = "\ | ||
5 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
6 | " | ||
7 | |||
8 | EXTRA_OECONF:append:linuxstdbase = " --enable-clocale=gnu" | ||
9 | |||
10 | # Configure gcc running on the target to default to an architecture which will | ||
11 | # be compatible with that of gcc-runtime (which is cross compiled to be target | ||
12 | # specific). For example, for ARM, ARMv6+ adds atomic instructions that may | ||
13 | # affect the ABI in the gcc-runtime libs. Since we can't rely on gcc on the | ||
14 | # target to always be passed -march etc, its built-in default needs to be safe. | ||
15 | |||
16 | ARMFPARCHEXT ?= "" | ||
17 | |||
18 | EXTRA_OECONF:append:armv6:class-target = " --with-arch=armv6${ARMFPARCHEXT}" | ||
19 | EXTRA_OECONF:append:armv7a:class-target = " --with-arch=armv7-a${ARMFPARCHEXT}" | ||
20 | EXTRA_OECONF:append:armv7ve:class-target = " --with-arch=armv7ve${ARMFPARCHEXT}" | ||
21 | EXTRA_OECONF:append:arc:class-target = " --with-cpu=${TUNE_PKGARCH}" | ||
22 | EXTRA_OECONF:append:x86-64:class-target = " ${@get_gcc_x86_64_arch_setting(bb, d)}" | ||
23 | |||
24 | # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is | ||
25 | # set in subdir gcc, so subdir libcc1 can't use it, export it here to | ||
26 | # fix the problem. | ||
27 | export gcc_cv_objdump = "${TARGET_PREFIX}objdump" | ||
28 | |||
29 | EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}" | ||
30 | |||
31 | PACKAGES = "\ | ||
32 | ${PN} ${PN}-plugins ${PN}-symlinks \ | ||
33 | g++ g++-symlinks \ | ||
34 | cpp cpp-symlinks \ | ||
35 | g77 g77-symlinks \ | ||
36 | gfortran gfortran-symlinks \ | ||
37 | gcov gcov-symlinks \ | ||
38 | ${PN}-doc \ | ||
39 | ${PN}-dev \ | ||
40 | ${PN}-dbg \ | ||
41 | " | ||
42 | |||
43 | FILES:${PN} = "\ | ||
44 | ${bindir}/${TARGET_PREFIX}gcc* \ | ||
45 | ${bindir}/${TARGET_PREFIX}lto* \ | ||
46 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2* \ | ||
47 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/g++-mapper-server \ | ||
48 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \ | ||
49 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \ | ||
50 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \ | ||
51 | ${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \ | ||
52 | ${gcclibdir}/${TARGET_SYS}/${BINV}/specs \ | ||
53 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \ | ||
54 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include \ | ||
55 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \ | ||
56 | ${libdir}/bfd-plugins/*.so \ | ||
57 | " | ||
58 | INSANE_SKIP:${PN} += "dev-so" | ||
59 | RRECOMMENDS:${PN} += "\ | ||
60 | libssp \ | ||
61 | libssp-dev \ | ||
62 | " | ||
63 | RDEPENDS:${PN} += "cpp" | ||
64 | |||
65 | FILES:${PN}-dev = "\ | ||
66 | ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \ | ||
67 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \ | ||
68 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \ | ||
69 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \ | ||
70 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \ | ||
71 | " | ||
72 | FILES:${PN}-symlinks = "\ | ||
73 | ${bindir}/cc \ | ||
74 | ${bindir}/gcc \ | ||
75 | ${bindir}/gccbug \ | ||
76 | " | ||
77 | |||
78 | FILES:${PN}-plugins = "\ | ||
79 | ${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \ | ||
80 | " | ||
81 | ALLOW_EMPTY:${PN}-plugins = "1" | ||
82 | |||
83 | FILES:g77 = "\ | ||
84 | ${bindir}/${TARGET_PREFIX}g77 \ | ||
85 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \ | ||
86 | " | ||
87 | FILES:g77-symlinks = "\ | ||
88 | ${bindir}/g77 \ | ||
89 | ${bindir}/f77 \ | ||
90 | " | ||
91 | RRECOMMENDS:g77 = "\ | ||
92 | libg2c \ | ||
93 | libg2c-dev \ | ||
94 | " | ||
95 | |||
96 | FILES:gfortran = "\ | ||
97 | ${bindir}/${TARGET_PREFIX}gfortran \ | ||
98 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \ | ||
99 | " | ||
100 | RRECOMMENDS:gfortran = "\ | ||
101 | libquadmath \ | ||
102 | libquadmath-dev \ | ||
103 | " | ||
104 | FILES:gfortran-symlinks = "\ | ||
105 | ${bindir}/gfortran \ | ||
106 | ${bindir}/f95" | ||
107 | |||
108 | FILES:cpp = "\ | ||
109 | ${bindir}/${TARGET_PREFIX}cpp* \ | ||
110 | ${base_libdir}/cpp \ | ||
111 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1" | ||
112 | FILES:cpp-symlinks = "${bindir}/cpp" | ||
113 | |||
114 | FILES:gcov = "${bindir}/${TARGET_PREFIX}gcov* \ | ||
115 | ${bindir}/${TARGET_PREFIX}gcov-tool* \ | ||
116 | " | ||
117 | FILES:gcov-symlinks = "${bindir}/gcov \ | ||
118 | ${bindir}/gcov-tool \ | ||
119 | " | ||
120 | |||
121 | FILES:g++ = "\ | ||
122 | ${bindir}/${TARGET_PREFIX}g++* \ | ||
123 | ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \ | ||
124 | " | ||
125 | FILES:g++-symlinks = "\ | ||
126 | ${bindir}/c++ \ | ||
127 | ${bindir}/g++ \ | ||
128 | " | ||
129 | RRECOMMENDS:g++ = "\ | ||
130 | libstdc++ \ | ||
131 | libstdc++-dev \ | ||
132 | libatomic \ | ||
133 | libatomic-dev \ | ||
134 | " | ||
135 | |||
136 | FILES:${PN}-doc = "\ | ||
137 | ${infodir} \ | ||
138 | ${mandir} \ | ||
139 | ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \ | ||
140 | " | ||
141 | |||
142 | do_compile () { | ||
143 | # Prevent full target sysroot path from being used in configargs.h header, | ||
144 | # as it will be rewritten when used by other sysroots preventing support | ||
145 | # for gcc plugins. Additionally the path is embeddeded into the output | ||
146 | # binary, this prevents building a reproducible binary. | ||
147 | oe_runmake configure-gcc | ||
148 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h | ||
149 | sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h | ||
150 | |||
151 | # Prevent sysroot/workdir paths from being used in checksum-options. | ||
152 | # checksum-options is used to generate a checksum which is embedded into | ||
153 | # the output binary. | ||
154 | oe_runmake TARGET-gcc=checksum-options all-gcc | ||
155 | sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options | ||
156 | sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options | ||
157 | |||
158 | oe_runmake all-host | ||
159 | } | ||
160 | |||
161 | do_install () { | ||
162 | oe_runmake 'DESTDIR=${D}' install-host | ||
163 | |||
164 | # Add unwind.h, it comes from libgcc which we don't want to build again | ||
165 | install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ | ||
166 | |||
167 | # Info dir listing isn't interesting at this point so remove it if it exists. | ||
168 | if [ -e "${D}${infodir}/dir" ]; then | ||
169 | rm -f ${D}${infodir}/dir | ||
170 | fi | ||
171 | |||
172 | # Cleanup some of the ${libdir}{,exec}/gcc stuff ... | ||
173 | rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
174 | rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools | ||
175 | rm -rf ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/*.la | ||
176 | rmdir ${D}${includedir} | ||
177 | rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | ||
178 | |||
179 | # Hack around specs file assumptions | ||
180 | test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs | ||
181 | |||
182 | # Cleanup manpages.. | ||
183 | rm -rf ${D}${mandir}/man7 | ||
184 | |||
185 | # Don't package details about the build host | ||
186 | rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/auto-build.h | ||
187 | rm -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/plugin/include/bconfig.h | ||
188 | |||
189 | cd ${D}${bindir} | ||
190 | |||
191 | # We care about g++ not c++ | ||
192 | rm -f *c++* | ||
193 | |||
194 | # We don't care about the gcc-<version> ones for this | ||
195 | rm -f *gcc-?*.?* | ||
196 | |||
197 | # Not sure why we end up with these but we don't want them... | ||
198 | rm -f ${TARGET_PREFIX}${TARGET_PREFIX}* | ||
199 | |||
200 | # Symlinks so we can use these trivially on the target | ||
201 | if [ -e ${TARGET_PREFIX}g77 ]; then | ||
202 | ln -sf ${TARGET_PREFIX}g77 g77 || true | ||
203 | ln -sf g77 f77 || true | ||
204 | fi | ||
205 | if [ -e ${TARGET_PREFIX}gfortran ]; then | ||
206 | ln -sf ${TARGET_PREFIX}gfortran gfortran || true | ||
207 | ln -sf gfortran f95 || true | ||
208 | fi | ||
209 | ln -sf ${TARGET_PREFIX}g++ g++ | ||
210 | ln -sf ${TARGET_PREFIX}gcc gcc | ||
211 | ln -sf ${TARGET_PREFIX}cpp cpp | ||
212 | ln -sf ${TARGET_PREFIX}gcov gcov | ||
213 | ln -sf ${TARGET_PREFIX}gcov-tool gcov-tool | ||
214 | install -d ${D}${base_libdir} | ||
215 | ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp | ||
216 | ln -sf g++ c++ | ||
217 | ln -sf gcc cc | ||
218 | install -d ${D}${libdir}/bfd-plugins | ||
219 | ln -sf ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto_plugin.so ${D}${libdir}/bfd-plugins/liblto_plugin.so | ||
220 | chown -R root:root ${D} | ||
221 | } | ||
222 | |||
223 | do_install:append () { | ||
224 | # | ||
225 | # Thefixinc.sh script, run on the gcc's compile phase, looks into sysroot header | ||
226 | # files and places the modified files into | ||
227 | # {D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed folder. This makes the | ||
228 | # build not deterministic. The following code prunes all those headers | ||
229 | # except those under include-fixed/linux, *limits.h and README, yielding | ||
230 | # the same include-fixed folders no matter what sysroot | ||
231 | |||
232 | include_fixed="${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed" | ||
233 | for f in $(find ${include_fixed} -type f); do | ||
234 | case $f in | ||
235 | */include-fixed/linux/*) | ||
236 | continue | ||
237 | ;; | ||
238 | */include-fixed/*limits.h) | ||
239 | continue | ||
240 | ;; | ||
241 | */include-fixed/README) | ||
242 | continue | ||
243 | ;; | ||
244 | *) | ||
245 | # remove file and directory if empty | ||
246 | bbdebug 2 "Pruning $f" | ||
247 | rm $f | ||
248 | find $(dirname $f) -maxdepth 0 -empty -exec rmdir {} \; | ||
249 | ;; | ||
250 | esac | ||
251 | done | ||
252 | } | ||
253 | |||
254 | # Installing /usr/lib/gcc/* means we'd have two copies, one from gcc-cross | ||
255 | # and one from here. These can confuse gcc cross where includes use #include_next | ||
256 | # and builds track file dependencies (e.g. perl and its makedepends code). | ||
257 | # For determinism we don't install this ever and rely on the copy from gcc-cross. | ||
258 | # [YOCTO #7287] | ||
259 | SYSROOT_DIRS_IGNORE += "${libdir}/gcc" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc b/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc deleted file mode 100644 index f68fec58..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | inherit qemu | ||
2 | |||
3 | TOOLCHAIN_TEST_TARGET ??= "user" | ||
4 | TOOLCHAIN_TEST_HOST ??= "localhost" | ||
5 | TOOLCHAIN_TEST_HOST_USER ??= "root" | ||
6 | TOOLCHAIN_TEST_HOST_PORT ??= "2222" | ||
7 | |||
8 | MAKE_CHECK_BOARDFLAGS ??= "" | ||
9 | MAKE_CHECK_BOARDARGS ??= "--target_board=${TOOLCHAIN_TEST_TARGET}${MAKE_CHECK_BOARDFLAGS}" | ||
10 | |||
11 | python () { | ||
12 | # Provide the targets compiler args via targets options. This allows dejagnu to | ||
13 | # correctly mark incompatible tests as UNSUPPORTED (e.g. needs soft-float | ||
14 | # but running on hard-float target). | ||
15 | # | ||
16 | # These options are called "multilib_flags" within the gcc test suite. Most | ||
17 | # architectures handle these options in a sensible way such that tests that | ||
18 | # are incompatible with the provided multilib are marked as UNSUPPORTED. | ||
19 | # | ||
20 | # Note: multilib flags are added to the compile command after the args | ||
21 | # provided by any test (through dg-options), CFLAGS_FOR_TARGET is always | ||
22 | # added to the compile command before any other args but is not interpted | ||
23 | # as options like multilib flags. | ||
24 | # | ||
25 | # i686, x86-64 and aarch64 are special, since most toolchains built for | ||
26 | # these targets don't do multilib the tests do not get correctly marked as | ||
27 | # UNSUPPORTED. More importantly the test suite itself does not handle | ||
28 | # overriding the multilib flags where it could (like other archs do). As | ||
29 | # such do not pass the target compiler args for these targets. | ||
30 | args = d.getVar("TUNE_CCARGS").split() | ||
31 | if d.getVar("TUNE_ARCH") in ["i686", "x86_64", "aarch64"]: | ||
32 | args = [] | ||
33 | d.setVar("MAKE_CHECK_BOARDFLAGS", ("/" + "/".join(args)) if len(args) != 0 else "") | ||
34 | } | ||
35 | |||
36 | python check_prepare() { | ||
37 | def generate_qemu_linux_user_config(d): | ||
38 | content = [] | ||
39 | content.append('load_generic_config "sim"') | ||
40 | content.append('load_base_board_description "basic-sim"') | ||
41 | content.append('process_multilib_options ""') | ||
42 | |||
43 | # qemu args | ||
44 | qemu_binary = qemu_target_binary(d) | ||
45 | if not qemu_binary: | ||
46 | bb.fatal("Missing target qemu linux-user binary") | ||
47 | |||
48 | args = [] | ||
49 | # QEMU_OPTIONS is not always valid due to -cross recipe | ||
50 | args += ["-r", d.getVar("OLDEST_KERNEL")] | ||
51 | # enable all valid instructions, since the test suite itself does not | ||
52 | # limit itself to the target cpu options. | ||
53 | # - valid for x86*, powerpc, arm, arm64 | ||
54 | if qemu_binary.lstrip("qemu-") in ["x86_64", "i386", "ppc", "arm", "aarch64"]: | ||
55 | args += ["-cpu", "max"] | ||
56 | |||
57 | sysroot = d.getVar("RECIPE_SYSROOT") | ||
58 | args += ["-L", sysroot] | ||
59 | # lib paths are static here instead of using $libdir since this is used by a -cross recipe | ||
60 | libpaths = [sysroot + "/usr/lib", sysroot + "/lib"] | ||
61 | args += ["-E", "LD_LIBRARY_PATH={0}".format(":".join(libpaths))] | ||
62 | |||
63 | content.append('set_board_info is_simulator 1') | ||
64 | content.append('set_board_info sim "{0}"'.format(qemu_binary)) | ||
65 | content.append('set_board_info sim,options "{0}"'.format(" ".join(args))) | ||
66 | |||
67 | # target build/test config | ||
68 | content.append('set_board_info target_install {%s}' % d.getVar("TARGET_SYS")) | ||
69 | content.append('set_board_info ldscript ""') | ||
70 | #content.append('set_board_info needs_status_wrapper 1') # qemu-linux-user return codes work, and abort works fine | ||
71 | content.append('set_board_info gcc,stack_size 16834') | ||
72 | content.append('set_board_info gdb,nosignals 1') | ||
73 | content.append('set_board_info gcc,timeout 60') | ||
74 | |||
75 | return "\n".join(content) | ||
76 | |||
77 | def generate_remote_ssh_linux_config(d): | ||
78 | content = [] | ||
79 | content.append('load_generic_config "unix"') | ||
80 | content.append('process_multilib_options ""') | ||
81 | content.append("set_board_info hostname {0}".format(d.getVar("TOOLCHAIN_TEST_HOST"))) | ||
82 | content.append("set_board_info username {0}".format(d.getVar("TOOLCHAIN_TEST_HOST_USER"))) | ||
83 | |||
84 | port = d.getVar("TOOLCHAIN_TEST_HOST_PORT") | ||
85 | content.append("set_board_info rsh_prog \"/usr/bin/ssh -p {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port)) | ||
86 | content.append("set_board_info rcp_prog \"/usr/bin/scp -P {0} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\"".format(port)) | ||
87 | |||
88 | return "\n".join(content) | ||
89 | |||
90 | dejagnudir = d.expand("${WORKDIR}/dejagnu") | ||
91 | if not os.path.isdir(dejagnudir): | ||
92 | os.makedirs(dejagnudir) | ||
93 | |||
94 | # write out target qemu board config | ||
95 | with open(os.path.join(dejagnudir, "user.exp"), "w") as f: | ||
96 | f.write(generate_qemu_linux_user_config(d)) | ||
97 | |||
98 | # write out target ssh board config | ||
99 | with open(os.path.join(dejagnudir, "ssh.exp"), "w") as f: | ||
100 | f.write(generate_remote_ssh_linux_config(d)) | ||
101 | |||
102 | # generate site.exp to provide boards | ||
103 | with open(os.path.join(dejagnudir, "site.exp"), "w") as f: | ||
104 | f.write("lappend boards_dir {0}\n".format(dejagnudir)) | ||
105 | f.write("set CFLAGS_FOR_TARGET \"{0}\"\n".format(d.getVar("TOOLCHAIN_OPTIONS"))) | ||
106 | } | ||
107 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch deleted file mode 100644 index 66e582ca..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 31f94ef5b43a984a98f0eebd2dcf1b53aa1d7bce Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 08:37:11 +0400 | ||
4 | Subject: [PATCH] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | --- | ||
10 | configure | 2 +- | ||
11 | configure.ac | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/configure b/configure | ||
15 | index 5dcaab14ae9..f76310a36bb 100755 | ||
16 | --- a/configure | ||
17 | +++ b/configure | ||
18 | @@ -10165,7 +10165,7 @@ fi | ||
19 | # for target_alias and gcc doesn't manage it consistently. | ||
20 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
21 | |||
22 | -FLAGS_FOR_TARGET= | ||
23 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
24 | case " $target_configdirs " in | ||
25 | *" newlib "*) | ||
26 | case " $target_configargs " in | ||
27 | diff --git a/configure.ac b/configure.ac | ||
28 | index 85977482aee..8b9097c7a45 100644 | ||
29 | --- a/configure.ac | ||
30 | +++ b/configure.ac | ||
31 | @@ -3346,7 +3346,7 @@ fi | ||
32 | # for target_alias and gcc doesn't manage it consistently. | ||
33 | target_configargs="--cache-file=./config.cache ${target_configargs}" | ||
34 | |||
35 | -FLAGS_FOR_TARGET= | ||
36 | +FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET" | ||
37 | case " $target_configdirs " in | ||
38 | *" newlib "*) | ||
39 | case " $target_configargs " in | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch deleted file mode 100644 index 5aa635b3..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch +++ /dev/null | |||
@@ -1,239 +0,0 @@ | |||
1 | From 99f1e61b2957226254a116fde7fd73bf07034012 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 8 Mar 2021 16:04:20 -0800 | ||
4 | Subject: [PATCH] gcc: poison-system-directories | ||
5 | |||
6 | Add /sw/include and /opt/include based on the original | ||
7 | zecke-no-host-includes.patch patch. The original patch checked for | ||
8 | /usr/include, /sw/include and /opt/include and then triggered a failure and | ||
9 | aborted. | ||
10 | |||
11 | Instead, we add the two missing items to the current scan. If the user | ||
12 | wants this to be a failure, they can add "-Werror=poison-system-directories". | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | gcc/common.opt | 4 ++++ | ||
19 | gcc/config.in | 10 ++++++++++ | ||
20 | gcc/configure | 19 +++++++++++++++++++ | ||
21 | gcc/configure.ac | 16 ++++++++++++++++ | ||
22 | gcc/doc/invoke.texi | 9 +++++++++ | ||
23 | gcc/gcc.cc | 15 ++++++++++++--- | ||
24 | gcc/incpath.cc | 21 +++++++++++++++++++++ | ||
25 | 7 files changed, 91 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/gcc/common.opt b/gcc/common.opt | ||
28 | index 8a0dafc52..0357868e2 100644 | ||
29 | --- a/gcc/common.opt | ||
30 | +++ b/gcc/common.opt | ||
31 | @@ -710,6 +710,10 @@ Wreturn-local-addr | ||
32 | Common Var(warn_return_local_addr) Init(1) Warning | ||
33 | Warn about returning a pointer/reference to a local or temporary variable. | ||
34 | |||
35 | +Wpoison-system-directories | ||
36 | +Common Var(flag_poison_system_directories) Init(1) Warning | ||
37 | +Warn for -I and -L options using system directories if cross compiling | ||
38 | + | ||
39 | Wshadow | ||
40 | Common Var(warn_shadow) Warning | ||
41 | Warn when one variable shadows another. Same as -Wshadow=global. | ||
42 | diff --git a/gcc/config.in b/gcc/config.in | ||
43 | index 64c27c9cf..a693cb8a8 100644 | ||
44 | --- a/gcc/config.in | ||
45 | +++ b/gcc/config.in | ||
46 | @@ -230,6 +230,16 @@ | ||
47 | #endif | ||
48 | |||
49 | |||
50 | +/* Define to warn for use of native system header directories */ | ||
51 | +#ifndef USED_FOR_TARGET | ||
52 | +#undef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
53 | +#endif | ||
54 | +/* Define to warn for use of native system header directories */ | ||
55 | +#ifndef USED_FOR_TARGET | ||
56 | +#undef POISON_BY_DEFAULT | ||
57 | +#endif | ||
58 | + | ||
59 | + | ||
60 | /* Define if you want all operations on RTL (the basic data structure of the | ||
61 | optimizer and back end) to be checked for dynamic type safety at runtime. | ||
62 | This is quite expensive. */ | ||
63 | diff --git a/gcc/configure b/gcc/configure | ||
64 | index 2b83acfb0..8bb97578c 100755 | ||
65 | --- a/gcc/configure | ||
66 | +++ b/gcc/configure | ||
67 | @@ -1023,6 +1023,7 @@ enable_maintainer_mode | ||
68 | enable_link_mutex | ||
69 | enable_link_serialization | ||
70 | enable_version_specific_runtime_libs | ||
71 | +enable_poison_system_directories | ||
72 | enable_plugin | ||
73 | enable_host_shared | ||
74 | enable_libquadmath_support | ||
75 | @@ -1785,6 +1786,8 @@ Optional Features: | ||
76 | --enable-version-specific-runtime-libs | ||
77 | specify that runtime libraries should be installed | ||
78 | in a compiler-specific directory | ||
79 | + --enable-poison-system-directories | ||
80 | + warn for use of native system header directories | ||
81 | --enable-plugin enable plugin support | ||
82 | --enable-host-shared build host code as shared libraries | ||
83 | --disable-libquadmath-support | ||
84 | @@ -31996,6 +31999,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then : | ||
85 | fi | ||
86 | |||
87 | |||
88 | +# Check whether --enable-poison-system-directories was given. | ||
89 | +if test "${enable_poison_system_directories+set}" = set; then : | ||
90 | + enableval=$enable_poison_system_directories; | ||
91 | +else | ||
92 | + enable_poison_system_directories=no | ||
93 | +fi | ||
94 | + | ||
95 | +if test "x${enable_poison_system_directories}" != "xno"; then | ||
96 | + | ||
97 | +$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h | ||
98 | +if test "$enable_poison_system_directories" = "error"; then | ||
99 | +$as_echo "#define POISON_BY_DEFAULT 1" >>confdefs.h | ||
100 | +fi | ||
101 | + | ||
102 | +fi | ||
103 | + | ||
104 | # Substitute configuration variables | ||
105 | |||
106 | |||
107 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
108 | index daf2a708c..6155b83a7 100644 | ||
109 | --- a/gcc/configure.ac | ||
110 | +++ b/gcc/configure.ac | ||
111 | @@ -7435,6 +7435,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs, | ||
112 | [specify that runtime libraries should be | ||
113 | installed in a compiler-specific directory])]) | ||
114 | |||
115 | +AC_ARG_ENABLE([poison-system-directories], | ||
116 | + AS_HELP_STRING([--enable-poison-system-directories], | ||
117 | + [warn for use of native system header directories (no/yes/error)]),, | ||
118 | + [enable_poison_system_directories=no]) | ||
119 | +AC_MSG_NOTICE([poisoned directories $enable_poison_system_directories]) | ||
120 | +if test "x${enable_poison_system_directories}" != "xno"; then | ||
121 | + AC_MSG_NOTICE([poisoned directories enabled]) | ||
122 | + AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], | ||
123 | + [1], | ||
124 | + [Define to warn for use of native system header directories]) | ||
125 | + if test $enable_poison_system_directories = "error"; then | ||
126 | + AC_MSG_NOTICE([poisoned directories are fatal]) | ||
127 | + AC_DEFINE([POISON_BY_DEFAULT], [1], [Define to make poison warnings errors]) | ||
128 | + fi | ||
129 | +fi | ||
130 | + | ||
131 | # Substitute configuration variables | ||
132 | AC_SUBST(subdirs) | ||
133 | AC_SUBST(srcdir) | ||
134 | diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi | ||
135 | index ff6c338be..a8ebfa59a 100644 | ||
136 | --- a/gcc/doc/invoke.texi | ||
137 | +++ b/gcc/doc/invoke.texi | ||
138 | @@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}. | ||
139 | -Wpacked -Wno-packed-bitfield-compat -Wpacked-not-aligned -Wpadded @gol | ||
140 | -Wparentheses -Wno-pedantic-ms-format @gol | ||
141 | -Wpointer-arith -Wno-pointer-compare -Wno-pointer-to-int-cast @gol | ||
142 | +-Wno-poison-system-directories @gol | ||
143 | -Wno-pragmas -Wno-prio-ctor-dtor -Wredundant-decls @gol | ||
144 | -Wrestrict -Wno-return-local-addr -Wreturn-type @gol | ||
145 | -Wno-scalar-storage-order -Wsequence-point @gol | ||
146 | @@ -8029,6 +8030,14 @@ made up of data only and thus requires no special treatment. But, for | ||
147 | most targets, it is made up of code and thus requires the stack to be | ||
148 | made executable in order for the program to work properly. | ||
149 | |||
150 | +@item -Wno-poison-system-directories | ||
151 | +@opindex Wno-poison-system-directories | ||
152 | +Do not warn for @option{-I} or @option{-L} options using system | ||
153 | +directories such as @file{/usr/include} when cross compiling. This | ||
154 | +option is intended for use in chroot environments when such | ||
155 | +directories contain the correct headers and libraries for the target | ||
156 | +system rather than the host. | ||
157 | + | ||
158 | @item -Wfloat-equal | ||
159 | @opindex Wfloat-equal | ||
160 | @opindex Wno-float-equal | ||
161 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc | ||
162 | index beefde7f6..4e6557b3c 100644 | ||
163 | --- a/gcc/gcc.cc | ||
164 | +++ b/gcc/gcc.cc | ||
165 | @@ -1162,6 +1162,8 @@ proper position among the other output files. */ | ||
166 | "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ | ||
167 | "%X %{o*} %{e*} %{N} %{n} %{r}\ | ||
168 | %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ | ||
169 | + %{Wno-poison-system-directories:--no-poison-system-directories} \ | ||
170 | + %{Werror=poison-system-directories:--error-poison-system-directories} \ | ||
171 | %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \ | ||
172 | VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ | ||
173 | %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ | ||
174 | @@ -1257,8 +1259,11 @@ static const char *cpp_unique_options = | ||
175 | static const char *cpp_options = | ||
176 | "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ | ||
177 | %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\ | ||
178 | - %{!fno-working-directory:-fworking-directory}}} %{O*}\ | ||
179 | - %{undef} %{save-temps*:-fpch-preprocess}"; | ||
180 | + %{!fno-working-directory:-fworking-directory}}} %{O*}" | ||
181 | +#ifdef POISON_BY_DEFAULT | ||
182 | + " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}" | ||
183 | +#endif | ||
184 | + " %{undef} %{save-temps*:-fpch-preprocess}"; | ||
185 | |||
186 | /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. | ||
187 | |||
188 | @@ -1287,7 +1292,11 @@ static const char *cc1_options = | ||
189 | %{coverage:-fprofile-arcs -ftest-coverage}\ | ||
190 | %{fprofile-arcs|fprofile-generate*|coverage:\ | ||
191 | %{!fprofile-update=single:\ | ||
192 | - %{pthread:-fprofile-update=prefer-atomic}}}"; | ||
193 | + %{pthread:-fprofile-update=prefer-atomic}}}" | ||
194 | +#ifdef POISON_BY_DEFAULT | ||
195 | + " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}" | ||
196 | +#endif | ||
197 | + ; | ||
198 | |||
199 | static const char *asm_options = | ||
200 | "%{-target-help:%:print-asm-header()} " | ||
201 | diff --git a/gcc/incpath.cc b/gcc/incpath.cc | ||
202 | index 622204a38..5ac03c086 100644 | ||
203 | --- a/gcc/incpath.cc | ||
204 | +++ b/gcc/incpath.cc | ||
205 | @@ -26,6 +26,7 @@ | ||
206 | #include "intl.h" | ||
207 | #include "incpath.h" | ||
208 | #include "cppdefault.h" | ||
209 | +#include "diagnostic-core.h" | ||
210 | |||
211 | /* Microsoft Windows does not natively support inodes. | ||
212 | VMS has non-numeric inodes. */ | ||
213 | @@ -399,6 +400,26 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) | ||
214 | } | ||
215 | fprintf (stderr, _("End of search list.\n")); | ||
216 | } | ||
217 | + | ||
218 | +#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES | ||
219 | + if (flag_poison_system_directories) | ||
220 | + { | ||
221 | + struct cpp_dir *p; | ||
222 | + | ||
223 | + for (p = heads[INC_QUOTE]; p; p = p->next) | ||
224 | + { | ||
225 | + if ((!strncmp (p->name, "/usr/include", 12)) | ||
226 | + || (!strncmp (p->name, "/usr/local/include", 18)) | ||
227 | + || (!strncmp (p->name, "/usr/X11R6/include", 18)) | ||
228 | + || (!strncmp (p->name, "/sw/include", 11)) | ||
229 | + || (!strncmp (p->name, "/opt/include", 12))) | ||
230 | + warning (OPT_Wpoison_system_directories, | ||
231 | + "include location \"%s\" is unsafe for " | ||
232 | + "cross-compilation", | ||
233 | + p->name); | ||
234 | + } | ||
235 | + } | ||
236 | +#endif | ||
237 | } | ||
238 | |||
239 | /* Use given -I paths for #include "..." but not #include <...>, and | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch deleted file mode 100644 index e83f05b8..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | From 34b861e7a4cfd7b1f0d2c0f8cf9bb0b0b81eb61a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:10:06 +0400 | ||
4 | Subject: [PATCH] 64-bit multilib hack. | ||
5 | |||
6 | GCC has internal multilib handling code but it assumes a very specific rigid directory | ||
7 | layout. The build system implementation of multilib layout is very generic and allows | ||
8 | complete customisation of the library directories. | ||
9 | |||
10 | This patch is a partial solution to allow any custom directories to be passed into gcc | ||
11 | and handled correctly. It forces gcc to use the base_libdir (which is the current | ||
12 | directory, "."). We need to do this for each multilib that is configured as we don't | ||
13 | know which compiler options may be being passed into the compiler. Since we have a compiler | ||
14 | per mulitlib at this point that isn't an issue. | ||
15 | |||
16 | The one problem is the target compiler is only going to work for the default multlilib at | ||
17 | this point. Ideally we'd figure out which multilibs were being enabled with which paths | ||
18 | and be able to patch these entries with a complete set of correct paths but this we | ||
19 | don't have such code at this point. This is something the target gcc recipe should do | ||
20 | and override these platform defaults in its build config. | ||
21 | |||
22 | Do same for riscv64, aarch64 & arc | ||
23 | |||
24 | RP 15/8/11 | ||
25 | |||
26 | Upstream-Status: Inappropriate [OE-Specific] | ||
27 | |||
28 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
29 | Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com> | ||
30 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
31 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
32 | --- | ||
33 | gcc/config/aarch64/t-aarch64-linux | 8 ++++---- | ||
34 | gcc/config/arc/t-multilib-linux | 4 ++-- | ||
35 | gcc/config/i386/t-linux64 | 6 ++---- | ||
36 | gcc/config/mips/t-linux64 | 10 +++------- | ||
37 | gcc/config/riscv/t-linux | 6 ++++-- | ||
38 | gcc/config/rs6000/t-linux64 | 5 ++--- | ||
39 | 6 files changed, 17 insertions(+), 22 deletions(-) | ||
40 | |||
41 | diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux | ||
42 | index d0cd546002a..f4056d68372 100644 | ||
43 | --- a/gcc/config/aarch64/t-aarch64-linux | ||
44 | +++ b/gcc/config/aarch64/t-aarch64-linux | ||
45 | @@ -21,8 +21,8 @@ | ||
46 | LIB1ASMSRC = aarch64/lib1funcs.asm | ||
47 | LIB1ASMFUNCS = _aarch64_sync_cache_range | ||
48 | |||
49 | -AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) | ||
50 | -MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
51 | -MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) | ||
52 | +#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be) | ||
53 | +#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu) | ||
54 | +#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu) | ||
55 | |||
56 | -MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) | ||
57 | +#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu_ilp32) | ||
58 | diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux | ||
59 | index ecb9ae6859f..12a164028d4 100644 | ||
60 | --- a/gcc/config/arc/t-multilib-linux | ||
61 | +++ b/gcc/config/arc/t-multilib-linux | ||
62 | @@ -16,9 +16,9 @@ | ||
63 | # along with GCC; see the file COPYING3. If not see | ||
64 | # <http://www.gnu.org/licenses/>. | ||
65 | |||
66 | -MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400 | ||
67 | +#MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400 | ||
68 | |||
69 | -MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 | ||
70 | +#MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 | ||
71 | |||
72 | # Aliases: | ||
73 | MULTILIB_MATCHES += mcpu?arc700=mA7 | ||
74 | diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64 | ||
75 | index 5526ad0e6cc..fa51c88912b 100644 | ||
76 | --- a/gcc/config/i386/t-linux64 | ||
77 | +++ b/gcc/config/i386/t-linux64 | ||
78 | @@ -32,7 +32,5 @@ | ||
79 | # | ||
80 | comma=, | ||
81 | MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG)) | ||
82 | -MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS))) | ||
83 | -MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu) | ||
84 | -MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu) | ||
85 | -MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32) | ||
86 | +MULTILIB_DIRNAMES = . . | ||
87 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
88 | diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64 | ||
89 | index 2fdd8e00407..04f2099250f 100644 | ||
90 | --- a/gcc/config/mips/t-linux64 | ||
91 | +++ b/gcc/config/mips/t-linux64 | ||
92 | @@ -17,10 +17,6 @@ | ||
93 | # <http://www.gnu.org/licenses/>. | ||
94 | |||
95 | MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 | ||
96 | -MULTILIB_DIRNAMES = n32 32 64 | ||
97 | -MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el) | ||
98 | -MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft) | ||
99 | -MULTILIB_OSDIRNAMES = \ | ||
100 | - ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \ | ||
101 | - ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \ | ||
102 | - ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT)) | ||
103 | +MULTILIB_DIRNAMES = . . . | ||
104 | +MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
105 | + | ||
106 | diff --git a/gcc/config/riscv/t-linux b/gcc/config/riscv/t-linux | ||
107 | index 216d2776a18..e4d817621fc 100644 | ||
108 | --- a/gcc/config/riscv/t-linux | ||
109 | +++ b/gcc/config/riscv/t-linux | ||
110 | @@ -1,3 +1,5 @@ | ||
111 | # Only XLEN and ABI affect Linux multilib dir names, e.g. /lib32/ilp32d/ | ||
112 | -MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) | ||
113 | -MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) | ||
114 | +#MULTILIB_DIRNAMES := $(patsubst rv32%,lib32,$(patsubst rv64%,lib64,$(MULTILIB_DIRNAMES))) | ||
115 | +MULTILIB_DIRNAMES := . . | ||
116 | +#MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES)) | ||
117 | +MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
118 | diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64 | ||
119 | index 47e0efd5764..05f5a3f188e 100644 | ||
120 | --- a/gcc/config/rs6000/t-linux64 | ||
121 | +++ b/gcc/config/rs6000/t-linux64 | ||
122 | @@ -26,10 +26,9 @@ | ||
123 | # MULTILIB_OSDIRNAMES according to what is found on the target. | ||
124 | |||
125 | MULTILIB_OPTIONS := m64/m32 | ||
126 | -MULTILIB_DIRNAMES := 64 32 | ||
127 | +MULTILIB_DIRNAMES := . . | ||
128 | MULTILIB_EXTRA_OPTS := | ||
129 | -MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu) | ||
130 | -MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu) | ||
131 | +MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) | ||
132 | |||
133 | rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.cc | ||
134 | $(COMPILE) $< | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch deleted file mode 100644 index e8f21634..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 7f40f8321fb999e9b34d948724517d3fb0d26820 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Thu, 28 Oct 2021 11:33:40 +0100 | ||
4 | Subject: [PATCH] Pass CXXFLAGS_FOR_BUILD in a couple of places to avoid these | ||
5 | errors. | ||
6 | |||
7 | If CXXFLAGS contains something unsupported by the build CXX, we see build failures (e.g. using -fmacro-prefix-map for the target). | ||
8 | |||
9 | 2021-10-28 Richard Purdie <richard.purdie@linuxfoundation.org> | ||
10 | |||
11 | ChangeLog: | ||
12 | |||
13 | * Makefile.in: Regenerate. | ||
14 | * Makefile.tpl: Add missing CXXFLAGS_FOR_BUILD overrides | ||
15 | |||
16 | Upstream-Status: Pending [should be submittable] | ||
17 | |||
18 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | Makefile.in | 2 ++ | ||
22 | Makefile.tpl | 2 ++ | ||
23 | 2 files changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/Makefile.in b/Makefile.in | ||
26 | index 593495e1650..1d9c83cc566 100644 | ||
27 | --- a/Makefile.in | ||
28 | +++ b/Makefile.in | ||
29 | @@ -176,6 +176,7 @@ BUILD_EXPORTS = \ | ||
30 | # built for the build system to override those in BASE_FLAGS_TO_PASS. | ||
31 | EXTRA_BUILD_FLAGS = \ | ||
32 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ | ||
33 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ | ||
34 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" | ||
35 | |||
36 | # This is the list of directories to built for the host system. | ||
37 | @@ -207,6 +208,7 @@ HOST_EXPORTS = \ | ||
38 | CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ | ||
39 | CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ | ||
40 | CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ | ||
41 | + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ | ||
42 | DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ | ||
43 | DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ | ||
44 | LD="$(LD)"; export LD; \ | ||
45 | diff --git a/Makefile.tpl b/Makefile.tpl | ||
46 | index ef58fac2b9a..bab04f335c2 100644 | ||
47 | --- a/Makefile.tpl | ||
48 | +++ b/Makefile.tpl | ||
49 | @@ -179,6 +179,7 @@ BUILD_EXPORTS = \ | ||
50 | # built for the build system to override those in BASE_FLAGS_TO_PASS. | ||
51 | EXTRA_BUILD_FLAGS = \ | ||
52 | CFLAGS="$(CFLAGS_FOR_BUILD)" \ | ||
53 | + CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \ | ||
54 | LDFLAGS="$(LDFLAGS_FOR_BUILD)" | ||
55 | |||
56 | # This is the list of directories to built for the host system. | ||
57 | @@ -210,6 +211,7 @@ HOST_EXPORTS = \ | ||
58 | CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ | ||
59 | CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ | ||
60 | CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ | ||
61 | + CXXFLAGS_FOR_BUILD="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS_FOR_BUILD; \ | ||
62 | DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ | ||
63 | DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ | ||
64 | LD="$(LD)"; export LD; \ | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch deleted file mode 100644 index e34eb2cf..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 5455fc1de74897a27c1199dc5611ec02243e24af Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:17:25 +0400 | ||
4 | Subject: [PATCH] Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B} | ||
5 | |||
6 | Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that | ||
7 | the source can be shared between gcc-cross-initial, | ||
8 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | While compiling gcc-crosssdk-initial-x86_64 on some host, there is | ||
15 | occasionally failure that test the existance of default.h doesn't | ||
16 | work, the reason is tm_include_list='** defaults.h' rather than | ||
17 | tm_include_list='** ./defaults.h' | ||
18 | |||
19 | So we add the test condition for this situation. | ||
20 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
21 | --- | ||
22 | gcc/Makefile.in | 2 +- | ||
23 | gcc/configure | 4 ++-- | ||
24 | gcc/configure.ac | 4 ++-- | ||
25 | gcc/mkconfig.sh | 4 ++-- | ||
26 | 4 files changed, 7 insertions(+), 7 deletions(-) | ||
27 | |||
28 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
29 | index 31ff95500c9..a8277254696 100644 | ||
30 | --- a/gcc/Makefile.in | ||
31 | +++ b/gcc/Makefile.in | ||
32 | @@ -553,7 +553,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@ | ||
33 | TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@ | ||
34 | |||
35 | xmake_file=@xmake_file@ | ||
36 | -tmake_file=@tmake_file@ | ||
37 | +tmake_file=@tmake_file@ ./t-oe | ||
38 | TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@ | ||
39 | TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@ | ||
40 | TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@ | ||
41 | diff --git a/gcc/configure b/gcc/configure | ||
42 | index dc2d59701ad..3fc0e2f5813 100755 | ||
43 | --- a/gcc/configure | ||
44 | +++ b/gcc/configure | ||
45 | @@ -13381,8 +13381,8 @@ for f in $tm_file; do | ||
46 | tm_include_list="${tm_include_list} $f" | ||
47 | ;; | ||
48 | defaults.h ) | ||
49 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
50 | - tm_include_list="${tm_include_list} $f" | ||
51 | + tm_file_list="${tm_file_list} ./$f" | ||
52 | + tm_include_list="${tm_include_list} ./$f" | ||
53 | ;; | ||
54 | * ) | ||
55 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
56 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
57 | index 36ce78924de..46de496b256 100644 | ||
58 | --- a/gcc/configure.ac | ||
59 | +++ b/gcc/configure.ac | ||
60 | @@ -2332,8 +2332,8 @@ for f in $tm_file; do | ||
61 | tm_include_list="${tm_include_list} $f" | ||
62 | ;; | ||
63 | defaults.h ) | ||
64 | - tm_file_list="${tm_file_list} \$(srcdir)/$f" | ||
65 | - tm_include_list="${tm_include_list} $f" | ||
66 | + tm_file_list="${tm_file_list} ./$f" | ||
67 | + tm_include_list="${tm_include_list} ./$f" | ||
68 | ;; | ||
69 | * ) | ||
70 | tm_file_list="${tm_file_list} \$(srcdir)/config/$f" | ||
71 | diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh | ||
72 | index 91cc43f69ff..8de33713cd8 100644 | ||
73 | --- a/gcc/mkconfig.sh | ||
74 | +++ b/gcc/mkconfig.sh | ||
75 | @@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then | ||
76 | if [ $# -ge 1 ]; then | ||
77 | echo '#ifdef IN_GCC' >> ${output}T | ||
78 | for file in "$@"; do | ||
79 | - if test x"$file" = x"defaults.h"; then | ||
80 | + if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then | ||
81 | postpone_defaults_h="yes" | ||
82 | else | ||
83 | echo "# include \"$file\"" >> ${output}T | ||
84 | @@ -106,7 +106,7 @@ esac | ||
85 | |||
86 | # If we postponed including defaults.h, add the #include now. | ||
87 | if test x"$postpone_defaults_h" = x"yes"; then | ||
88 | - echo "# include \"defaults.h\"" >> ${output}T | ||
89 | + echo "# include \"./defaults.h\"" >> ${output}T | ||
90 | fi | ||
91 | |||
92 | # Add multiple inclusion protection guard, part two. | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch deleted file mode 100644 index b08aecc7..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From abc3b82ab24169277f2090e9df1ceac3573142be Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:22:00 +0400 | ||
4 | Subject: [PATCH] cpp: honor sysroot. | ||
5 | |||
6 | Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile | ||
7 | preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location | ||
8 | rather than the --sysroot option specified on the commandline. If access to that directory is | ||
9 | permission denied (unreadable), gcc will error. | ||
10 | |||
11 | This happens when ccache is in use due to the fact it uses preprocessed source files. | ||
12 | |||
13 | The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix, | ||
14 | -isystem, -isysroot happen and the correct sysroot is used. | ||
15 | |||
16 | [YOCTO #2074] | ||
17 | |||
18 | RP 2012/04/13 | ||
19 | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | |||
22 | Upstream-Status: Pending | ||
23 | --- | ||
24 | gcc/cp/lang-specs.h | 2 +- | ||
25 | gcc/gcc.cc | 2 +- | ||
26 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h | ||
29 | index f35c9fab76b..19ddc98ce7f 100644 | ||
30 | --- a/gcc/cp/lang-specs.h | ||
31 | +++ b/gcc/cp/lang-specs.h | ||
32 | @@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see | ||
33 | {".ii", "@c++-cpp-output", 0, 0, 0}, | ||
34 | {"@c++-cpp-output", | ||
35 | "%{!E:%{!M:%{!MM:" | ||
36 | - " cc1plus -fpreprocessed %i %(cc1_options) %2" | ||
37 | + " cc1plus -fpreprocessed %i %I %(cc1_options) %2" | ||
38 | " %{!fsyntax-only:" | ||
39 | " %{fmodule-only:%{!S:-o %g.s%V}}" | ||
40 | " %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}" | ||
41 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc | ||
42 | index ce161d3c853..aa4cf92fb78 100644 | ||
43 | --- a/gcc/gcc.cc | ||
44 | +++ b/gcc/gcc.cc | ||
45 | @@ -1476,7 +1476,7 @@ static const struct compiler default_compilers[] = | ||
46 | %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, | ||
47 | {".i", "@cpp-output", 0, 0, 0}, | ||
48 | {"@cpp-output", | ||
49 | - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
50 | + "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, | ||
51 | {".s", "@assembler", 0, 0, 0}, | ||
52 | {"@assembler", | ||
53 | "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0}, | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch deleted file mode 100644 index b59eed57..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch +++ /dev/null | |||
@@ -1,403 +0,0 @@ | |||
1 | From 4de00af67b57b5440bdf61ab364ad959ad0aeee7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:24:50 +0400 | ||
4 | Subject: [PATCH] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
5 | relative to SYSTEMLIBS_DIR | ||
6 | |||
7 | This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER | ||
8 | relative to SYSTEMLIBS_DIR which can be set in generated headers | ||
9 | This breaks the assumption of hardcoded multilib in gcc | ||
10 | Change is only for the supported architectures in OE including | ||
11 | SH, sparc, alpha for possible future support (if any) | ||
12 | |||
13 | Removes the do_headerfix task in metadata | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Inappropriate [OE configuration] | ||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | gcc/config/aarch64/aarch64-linux.h | 4 ++-- | ||
21 | gcc/config/alpha/linux-elf.h | 4 ++-- | ||
22 | gcc/config/arm/linux-eabi.h | 6 +++--- | ||
23 | gcc/config/arm/linux-elf.h | 2 +- | ||
24 | gcc/config/i386/linux.h | 4 ++-- | ||
25 | gcc/config/i386/linux64.h | 12 ++++++------ | ||
26 | gcc/config/linux.h | 8 ++++---- | ||
27 | gcc/config/loongarch/gnu-user.h | 4 ++-- | ||
28 | gcc/config/microblaze/linux.h | 4 ++-- | ||
29 | gcc/config/mips/linux.h | 18 +++++++++--------- | ||
30 | gcc/config/nios2/linux.h | 4 ++-- | ||
31 | gcc/config/riscv/linux.h | 4 ++-- | ||
32 | gcc/config/rs6000/linux64.h | 15 +++++---------- | ||
33 | gcc/config/rs6000/sysv4.h | 4 ++-- | ||
34 | gcc/config/s390/linux.h | 8 ++++---- | ||
35 | gcc/config/sh/linux.h | 4 ++-- | ||
36 | gcc/config/sparc/linux.h | 2 +- | ||
37 | gcc/config/sparc/linux64.h | 4 ++-- | ||
38 | 18 files changed, 53 insertions(+), 58 deletions(-) | ||
39 | |||
40 | diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h | ||
41 | index 5e4553d79f5..877e8841eb2 100644 | ||
42 | --- a/gcc/config/aarch64/aarch64-linux.h | ||
43 | +++ b/gcc/config/aarch64/aarch64-linux.h | ||
44 | @@ -21,10 +21,10 @@ | ||
45 | #ifndef GCC_AARCH64_LINUX_H | ||
46 | #define GCC_AARCH64_LINUX_H | ||
47 | |||
48 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
49 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
50 | |||
51 | #undef MUSL_DYNAMIC_LINKER | ||
52 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
53 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" | ||
54 | |||
55 | #undef ASAN_CC1_SPEC | ||
56 | #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" | ||
57 | diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h | ||
58 | index 17f16a55910..0a7be38fa63 100644 | ||
59 | --- a/gcc/config/alpha/linux-elf.h | ||
60 | +++ b/gcc/config/alpha/linux-elf.h | ||
61 | @@ -23,8 +23,8 @@ along with GCC; see the file COPYING3. If not see | ||
62 | #define EXTRA_SPECS \ | ||
63 | { "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, | ||
64 | |||
65 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
66 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
67 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
68 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
69 | #if DEFAULT_LIBC == LIBC_UCLIBC | ||
70 | #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" | ||
71 | #elif DEFAULT_LIBC == LIBC_GLIBC | ||
72 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | ||
73 | index 50cc0bc6d08..17c18b27145 100644 | ||
74 | --- a/gcc/config/arm/linux-eabi.h | ||
75 | +++ b/gcc/config/arm/linux-eabi.h | ||
76 | @@ -65,8 +65,8 @@ | ||
77 | GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ | ||
78 | |||
79 | #undef GLIBC_DYNAMIC_LINKER | ||
80 | -#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" | ||
81 | -#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" | ||
82 | +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3" | ||
83 | +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3" | ||
84 | #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT | ||
85 | |||
86 | #define GLIBC_DYNAMIC_LINKER \ | ||
87 | @@ -89,7 +89,7 @@ | ||
88 | #define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" | ||
89 | #endif | ||
90 | #define MUSL_DYNAMIC_LINKER \ | ||
91 | - "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" | ||
92 | + SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" | ||
93 | |||
94 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
95 | use the GNU/Linux version, not the generic BPABI version. */ | ||
96 | diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h | ||
97 | index df3da67c4f0..37456e9d5a4 100644 | ||
98 | --- a/gcc/config/arm/linux-elf.h | ||
99 | +++ b/gcc/config/arm/linux-elf.h | ||
100 | @@ -60,7 +60,7 @@ | ||
101 | |||
102 | #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" | ||
103 | |||
104 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
105 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
106 | |||
107 | #define LINUX_TARGET_LINK_SPEC "%{h*} \ | ||
108 | %{static:-Bstatic} \ | ||
109 | diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h | ||
110 | index 5d99ee56d5b..a76022c9ccc 100644 | ||
111 | --- a/gcc/config/i386/linux.h | ||
112 | +++ b/gcc/config/i386/linux.h | ||
113 | @@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see | ||
114 | <http://www.gnu.org/licenses/>. */ | ||
115 | |||
116 | #define GNU_USER_LINK_EMULATION "elf_i386" | ||
117 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
118 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
119 | |||
120 | #undef MUSL_DYNAMIC_LINKER | ||
121 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" | ||
122 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1" | ||
123 | diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h | ||
124 | index 8681e36f10d..ddce49b6b60 100644 | ||
125 | --- a/gcc/config/i386/linux64.h | ||
126 | +++ b/gcc/config/i386/linux64.h | ||
127 | @@ -27,13 +27,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
128 | #define GNU_USER_LINK_EMULATION64 "elf_x86_64" | ||
129 | #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64" | ||
130 | |||
131 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
132 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" | ||
133 | -#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" | ||
134 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
135 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2" | ||
136 | +#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2" | ||
137 | |||
138 | #undef MUSL_DYNAMIC_LINKER32 | ||
139 | -#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" | ||
140 | +#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1" | ||
141 | #undef MUSL_DYNAMIC_LINKER64 | ||
142 | -#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" | ||
143 | +#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1" | ||
144 | #undef MUSL_DYNAMIC_LINKERX32 | ||
145 | -#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" | ||
146 | +#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1" | ||
147 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
148 | index 74f70793d90..4ce173384ef 100644 | ||
149 | --- a/gcc/config/linux.h | ||
150 | +++ b/gcc/config/linux.h | ||
151 | @@ -99,10 +99,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
152 | GLIBC_DYNAMIC_LINKER must be defined for each target using them, or | ||
153 | GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets | ||
154 | supporting both 32-bit and 64-bit compilation. */ | ||
155 | -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
156 | -#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" | ||
157 | -#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" | ||
158 | -#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0" | ||
159 | +#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
160 | +#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0" | ||
161 | +#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0" | ||
162 | +#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0" | ||
163 | #define BIONIC_DYNAMIC_LINKER "/system/bin/linker" | ||
164 | #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" | ||
165 | #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" | ||
166 | diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h | ||
167 | index 664dc9206ad..082bd7cfc6f 100644 | ||
168 | --- a/gcc/config/loongarch/gnu-user.h | ||
169 | +++ b/gcc/config/loongarch/gnu-user.h | ||
170 | @@ -31,11 +31,11 @@ along with GCC; see the file COPYING3. If not see | ||
171 | |||
172 | #undef GLIBC_DYNAMIC_LINKER | ||
173 | #define GLIBC_DYNAMIC_LINKER \ | ||
174 | - "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1" | ||
175 | + SYSTEMLIBS_DIR "ld-linux-loongarch-" ABI_SPEC ".so.1" | ||
176 | |||
177 | #undef MUSL_DYNAMIC_LINKER | ||
178 | #define MUSL_DYNAMIC_LINKER \ | ||
179 | - "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1" | ||
180 | + SYSTEMLIBS_DIR "ld-musl-loongarch-" ABI_SPEC ".so.1" | ||
181 | |||
182 | #undef GNU_USER_TARGET_LINK_SPEC | ||
183 | #define GNU_USER_TARGET_LINK_SPEC \ | ||
184 | diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h | ||
185 | index 5b1a365eda4..2e63df1ae9c 100644 | ||
186 | --- a/gcc/config/microblaze/linux.h | ||
187 | +++ b/gcc/config/microblaze/linux.h | ||
188 | @@ -28,7 +28,7 @@ | ||
189 | #undef TLS_NEEDS_GOT | ||
190 | #define TLS_NEEDS_GOT 1 | ||
191 | |||
192 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
193 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/ld.so.1" | ||
194 | #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | ||
195 | |||
196 | #if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ | ||
197 | @@ -38,7 +38,7 @@ | ||
198 | #endif | ||
199 | |||
200 | #undef MUSL_DYNAMIC_LINKER | ||
201 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" | ||
202 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" | ||
203 | |||
204 | #undef SUBTARGET_EXTRA_SPECS | ||
205 | #define SUBTARGET_EXTRA_SPECS \ | ||
206 | diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h | ||
207 | index 230b7789bb8..d96d134bfcf 100644 | ||
208 | --- a/gcc/config/mips/linux.h | ||
209 | +++ b/gcc/config/mips/linux.h | ||
210 | @@ -22,29 +22,29 @@ along with GCC; see the file COPYING3. If not see | ||
211 | #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32" | ||
212 | |||
213 | #define GLIBC_DYNAMIC_LINKER32 \ | ||
214 | - "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" | ||
215 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
216 | #define GLIBC_DYNAMIC_LINKER64 \ | ||
217 | - "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}" | ||
218 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
219 | #define GLIBC_DYNAMIC_LINKERN32 \ | ||
220 | - "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}" | ||
221 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}" | ||
222 | |||
223 | #undef UCLIBC_DYNAMIC_LINKER32 | ||
224 | #define UCLIBC_DYNAMIC_LINKER32 \ | ||
225 | - "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" | ||
226 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
227 | #undef UCLIBC_DYNAMIC_LINKER64 | ||
228 | #define UCLIBC_DYNAMIC_LINKER64 \ | ||
229 | - "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}" | ||
230 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}" | ||
231 | #define UCLIBC_DYNAMIC_LINKERN32 \ | ||
232 | - "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" | ||
233 | + "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}" | ||
234 | |||
235 | #undef MUSL_DYNAMIC_LINKER32 | ||
236 | #define MUSL_DYNAMIC_LINKER32 \ | ||
237 | - "/lib/ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
238 | + SYSTEMLIBS_DIR "ld-musl-mips%{mips32r6|mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
239 | #undef MUSL_DYNAMIC_LINKER64 | ||
240 | #define MUSL_DYNAMIC_LINKER64 \ | ||
241 | - "/lib/ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
242 | + SYSTEMLIBS_DIR "ld-musl-mips64%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
243 | #define MUSL_DYNAMIC_LINKERN32 \ | ||
244 | - "/lib/ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
245 | + SYSTEMLIBS_DIR "ld-musl-mipsn32%{mips64r6:r6}%{EL:el}%{msoft-float:-sf}.so.1" | ||
246 | |||
247 | #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" | ||
248 | #define GNU_USER_DYNAMIC_LINKERN32 \ | ||
249 | diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h | ||
250 | index f5dd813acad..7a13e1c9799 100644 | ||
251 | --- a/gcc/config/nios2/linux.h | ||
252 | +++ b/gcc/config/nios2/linux.h | ||
253 | @@ -29,8 +29,8 @@ | ||
254 | #undef CPP_SPEC | ||
255 | #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" | ||
256 | |||
257 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" | ||
258 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" | ||
259 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-nios2.so.1" | ||
260 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-nios2.so.1" | ||
261 | |||
262 | #undef LINK_SPEC | ||
263 | #define LINK_SPEC LINK_SPEC_ENDIAN \ | ||
264 | diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h | ||
265 | index 38803723ba9..d5ef8a96a19 100644 | ||
266 | --- a/gcc/config/riscv/linux.h | ||
267 | +++ b/gcc/config/riscv/linux.h | ||
268 | @@ -22,7 +22,7 @@ along with GCC; see the file COPYING3. If not see | ||
269 | GNU_USER_TARGET_OS_CPP_BUILTINS(); \ | ||
270 | } while (0) | ||
271 | |||
272 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" | ||
273 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" | ||
274 | |||
275 | #define MUSL_ABI_SUFFIX \ | ||
276 | "%{mabi=ilp32:-sf}" \ | ||
277 | @@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see | ||
278 | "%{mabi=lp64d:}" | ||
279 | |||
280 | #undef MUSL_DYNAMIC_LINKER | ||
281 | -#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1" | ||
282 | +#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1" | ||
283 | |||
284 | /* Because RISC-V only has word-sized atomics, it requries libatomic where | ||
285 | others do not. So link libatomic by default, as needed. */ | ||
286 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | ||
287 | index b2a7afabc73..364c1a5b155 100644 | ||
288 | --- a/gcc/config/rs6000/linux64.h | ||
289 | +++ b/gcc/config/rs6000/linux64.h | ||
290 | @@ -339,24 +339,19 @@ extern int dot_symbols; | ||
291 | #undef LINK_OS_DEFAULT_SPEC | ||
292 | #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" | ||
293 | |||
294 | -#define GLIBC_DYNAMIC_LINKER32 "%(dynamic_linker_prefix)/lib/ld.so.1" | ||
295 | - | ||
296 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
297 | #ifdef LINUX64_DEFAULT_ABI_ELFv2 | ||
298 | -#define GLIBC_DYNAMIC_LINKER64 \ | ||
299 | -"%{mabi=elfv1:%(dynamic_linker_prefix)/lib64/ld64.so.1;" \ | ||
300 | -":%(dynamic_linker_prefix)/lib64/ld64.so.2}" | ||
301 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}" | ||
302 | #else | ||
303 | -#define GLIBC_DYNAMIC_LINKER64 \ | ||
304 | -"%{mabi=elfv2:%(dynamic_linker_prefix)/lib64/ld64.so.2;" \ | ||
305 | -":%(dynamic_linker_prefix)/lib64/ld64.so.1}" | ||
306 | +#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}" | ||
307 | #endif | ||
308 | |||
309 | #undef MUSL_DYNAMIC_LINKER32 | ||
310 | #define MUSL_DYNAMIC_LINKER32 \ | ||
311 | - "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
312 | + SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
313 | #undef MUSL_DYNAMIC_LINKER64 | ||
314 | #define MUSL_DYNAMIC_LINKER64 \ | ||
315 | - "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
316 | + SYSTEMLIBS_DIR "ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
317 | |||
318 | #undef DEFAULT_ASM_ENDIAN | ||
319 | #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) | ||
320 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
321 | index 7e2519de5d4..a73954d9de5 100644 | ||
322 | --- a/gcc/config/rs6000/sysv4.h | ||
323 | +++ b/gcc/config/rs6000/sysv4.h | ||
324 | @@ -779,10 +779,10 @@ GNU_USER_TARGET_CC1_SPEC | ||
325 | |||
326 | #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("","le","") | ||
327 | |||
328 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | ||
329 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1" | ||
330 | #undef MUSL_DYNAMIC_LINKER | ||
331 | #define MUSL_DYNAMIC_LINKER \ | ||
332 | - "/lib/ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
333 | + SYSTEMLIBS_DIR "ld-musl-powerpc" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" | ||
334 | |||
335 | #ifndef GNU_USER_DYNAMIC_LINKER | ||
336 | #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER | ||
337 | diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h | ||
338 | index d7b7e7a7b02..0139b4d06ca 100644 | ||
339 | --- a/gcc/config/s390/linux.h | ||
340 | +++ b/gcc/config/s390/linux.h | ||
341 | @@ -72,13 +72,13 @@ along with GCC; see the file COPYING3. If not see | ||
342 | #define MULTILIB_DEFAULTS { "m31" } | ||
343 | #endif | ||
344 | |||
345 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" | ||
346 | -#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1" | ||
347 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1" | ||
348 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64.so.1" | ||
349 | |||
350 | #undef MUSL_DYNAMIC_LINKER32 | ||
351 | -#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1" | ||
352 | +#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-s390.so.1" | ||
353 | #undef MUSL_DYNAMIC_LINKER64 | ||
354 | -#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1" | ||
355 | +#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-s390x.so.1" | ||
356 | |||
357 | #undef LINK_SPEC | ||
358 | #define LINK_SPEC \ | ||
359 | diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h | ||
360 | index d96d077c99e..7d27f9893ee 100644 | ||
361 | --- a/gcc/config/sh/linux.h | ||
362 | +++ b/gcc/config/sh/linux.h | ||
363 | @@ -61,10 +61,10 @@ along with GCC; see the file COPYING3. If not see | ||
364 | |||
365 | #undef MUSL_DYNAMIC_LINKER | ||
366 | #define MUSL_DYNAMIC_LINKER \ | ||
367 | - "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ | ||
368 | + SYSTEMLIBS_DIR "ld-musl-sh" MUSL_DYNAMIC_LINKER_E MUSL_DYNAMIC_LINKER_FP \ | ||
369 | "%{mfdpic:-fdpic}.so.1" | ||
370 | |||
371 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
372 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
373 | |||
374 | #undef SUBTARGET_LINK_EMUL_SUFFIX | ||
375 | #define SUBTARGET_LINK_EMUL_SUFFIX "%{mfdpic:_fd;:_linux}" | ||
376 | diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h | ||
377 | index 6a809e9092d..60603765ad6 100644 | ||
378 | --- a/gcc/config/sparc/linux.h | ||
379 | +++ b/gcc/config/sparc/linux.h | ||
380 | @@ -78,7 +78,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); | ||
381 | When the -shared link option is used a final link is not being | ||
382 | done. */ | ||
383 | |||
384 | -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" | ||
385 | +#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2" | ||
386 | |||
387 | #undef LINK_SPEC | ||
388 | #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \ | ||
389 | diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h | ||
390 | index d08a2ef96fe..e6955da0a5b 100644 | ||
391 | --- a/gcc/config/sparc/linux64.h | ||
392 | +++ b/gcc/config/sparc/linux64.h | ||
393 | @@ -78,8 +78,8 @@ along with GCC; see the file COPYING3. If not see | ||
394 | When the -shared link option is used a final link is not being | ||
395 | done. */ | ||
396 | |||
397 | -#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | ||
398 | -#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | ||
399 | +#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
400 | +#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2" | ||
401 | |||
402 | #ifdef SPARC_BI_ARCH | ||
403 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch deleted file mode 100644 index c9bc38cc..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 5117519c1897a49b09fe7fff213b9c2ea15d37f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:29:11 +0400 | ||
4 | Subject: [PATCH] libtool | ||
5 | |||
6 | libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64 | ||
7 | when running on am x86_64 build host. | ||
8 | |||
9 | This patch stops this speading to libdir in the libstdc++.la file within libtool. | ||
10 | Arguably, it shouldn't be passing this into libtool in the first place but | ||
11 | for now this resolves the nastiest problems this causes. | ||
12 | |||
13 | func_normal_abspath would resolve an empty path to `pwd` so we need | ||
14 | to filter the zero case. | ||
15 | |||
16 | RP 2012/8/24 | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | |||
20 | Upstream-Status: Pending | ||
21 | --- | ||
22 | ltmain.sh | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/ltmain.sh b/ltmain.sh | ||
26 | index 70990740b6c..ee938056bef 100644 | ||
27 | --- a/ltmain.sh | ||
28 | +++ b/ltmain.sh | ||
29 | @@ -6359,6 +6359,10 @@ func_mode_link () | ||
30 | func_warning "ignoring multiple \`-rpath's for a libtool library" | ||
31 | |||
32 | install_libdir="$1" | ||
33 | + if test -n "$install_libdir"; then | ||
34 | + func_normal_abspath "$install_libdir" | ||
35 | + install_libdir=$func_normal_abspath_result | ||
36 | + fi | ||
37 | |||
38 | oldlibs= | ||
39 | if test -z "$rpath"; then | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch deleted file mode 100644 index dd67b115..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 32129f9682d0d27fc67af10f077ad2768935cbe6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:30:32 +0400 | ||
4 | Subject: [PATCH] gcc: armv4: pass fix-v4bx to linker to support EABI. | ||
5 | |||
6 | The LINK_SPEC for linux gets overwritten by linux-eabi.h which | ||
7 | means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result | ||
8 | the option is not passed to linker when chosing march=armv4 | ||
9 | This patch redefines this in linux-eabi.h and reinserts it | ||
10 | for eabi defaulting toolchains. | ||
11 | |||
12 | We might want to send it upstream. | ||
13 | |||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | --- | ||
18 | gcc/config/arm/linux-eabi.h | 6 +++++- | ||
19 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h | ||
22 | index 17c18b27145..8eacb099317 100644 | ||
23 | --- a/gcc/config/arm/linux-eabi.h | ||
24 | +++ b/gcc/config/arm/linux-eabi.h | ||
25 | @@ -91,10 +91,14 @@ | ||
26 | #define MUSL_DYNAMIC_LINKER \ | ||
27 | SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1" | ||
28 | |||
29 | +/* For armv4 we pass --fix-v4bx to linker to support EABI */ | ||
30 | +#undef TARGET_FIX_V4BX_SPEC | ||
31 | +#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}" | ||
32 | + | ||
33 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to | ||
34 | use the GNU/Linux version, not the generic BPABI version. */ | ||
35 | #undef LINK_SPEC | ||
36 | -#define LINK_SPEC EABI_LINK_SPEC \ | ||
37 | +#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC \ | ||
38 | LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ | ||
39 | LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) | ||
40 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch deleted file mode 100644 index 45edc62e..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From bf85b8bbcb4b77725d4c22c1bb25a29f6ff21038 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 29 Mar 2013 09:33:04 +0400 | ||
4 | Subject: [PATCH] Use the multilib config files from ${B} instead of using the | ||
5 | ones from ${S} | ||
6 | |||
7 | Use the multilib config files from ${B} instead of using the ones from ${S} | ||
8 | so that the source can be shared between gcc-cross-initial, | ||
9 | gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build. | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | ||
13 | |||
14 | Upstream-Status: Inappropriate [configuration] | ||
15 | --- | ||
16 | gcc/configure | 22 ++++++++++++++++++---- | ||
17 | gcc/configure.ac | 22 ++++++++++++++++++---- | ||
18 | 2 files changed, 36 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/configure b/gcc/configure | ||
21 | index 3fc0e2f5813..2f0f0e057a9 100755 | ||
22 | --- a/gcc/configure | ||
23 | +++ b/gcc/configure | ||
24 | @@ -13361,10 +13361,20 @@ done | ||
25 | tmake_file_= | ||
26 | for f in ${tmake_file} | ||
27 | do | ||
28 | - if test -f ${srcdir}/config/$f | ||
29 | - then | ||
30 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
31 | - fi | ||
32 | + case $f in | ||
33 | + */t-linux64 ) | ||
34 | + if test -f ./config/$f | ||
35 | + then | ||
36 | + tmake_file_="${tmake_file_} ./config/$f" | ||
37 | + fi | ||
38 | + ;; | ||
39 | + * ) | ||
40 | + if test -f ${srcdir}/config/$f | ||
41 | + then | ||
42 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
43 | + fi | ||
44 | + ;; | ||
45 | + esac | ||
46 | done | ||
47 | tmake_file="${tmake_file_}${omp_device_property_tmake_file}" | ||
48 | |||
49 | @@ -13375,6 +13385,10 @@ tm_file_list="options.h" | ||
50 | tm_include_list="options.h insn-constants.h" | ||
51 | for f in $tm_file; do | ||
52 | case $f in | ||
53 | + */linux64.h ) | ||
54 | + tm_file_list="${tm_file_list} ./config/$f" | ||
55 | + tm_include_list="${tm_include_list} ./config/$f" | ||
56 | + ;; | ||
57 | ./* ) | ||
58 | f=`echo $f | sed 's/^..//'` | ||
59 | tm_file_list="${tm_file_list} $f" | ||
60 | diff --git a/gcc/configure.ac b/gcc/configure.ac | ||
61 | index 46de496b256..6155b83a732 100644 | ||
62 | --- a/gcc/configure.ac | ||
63 | +++ b/gcc/configure.ac | ||
64 | @@ -2312,10 +2312,20 @@ done | ||
65 | tmake_file_= | ||
66 | for f in ${tmake_file} | ||
67 | do | ||
68 | - if test -f ${srcdir}/config/$f | ||
69 | - then | ||
70 | - tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
71 | - fi | ||
72 | + case $f in | ||
73 | + */t-linux64 ) | ||
74 | + if test -f ./config/$f | ||
75 | + then | ||
76 | + tmake_file_="${tmake_file_} ./config/$f" | ||
77 | + fi | ||
78 | + ;; | ||
79 | + * ) | ||
80 | + if test -f ${srcdir}/config/$f | ||
81 | + then | ||
82 | + tmake_file_="${tmake_file_} \$(srcdir)/config/$f" | ||
83 | + fi | ||
84 | + ;; | ||
85 | + esac | ||
86 | done | ||
87 | tmake_file="${tmake_file_}${omp_device_property_tmake_file}" | ||
88 | |||
89 | @@ -2326,6 +2336,10 @@ tm_file_list="options.h" | ||
90 | tm_include_list="options.h insn-constants.h" | ||
91 | for f in $tm_file; do | ||
92 | case $f in | ||
93 | + */linux64.h ) | ||
94 | + tm_file_list="${tm_file_list} ./config/$f" | ||
95 | + tm_include_list="${tm_include_list} ./config/$f" | ||
96 | + ;; | ||
97 | ./* ) | ||
98 | f=`echo $f | sed 's/^..//'` | ||
99 | tm_file_list="${tm_file_list} $f" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch deleted file mode 100644 index 352c6eec..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From e5463727ff028cee5e452da38f5b4c44d52e412e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 20 Feb 2015 09:39:38 +0000 | ||
4 | Subject: [PATCH] Avoid using libdir from .la which usually points to a host | ||
5 | path | ||
6 | |||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | ltmain.sh | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/ltmain.sh b/ltmain.sh | ||
16 | index ee938056bef..9ebc7e3d1e0 100644 | ||
17 | --- a/ltmain.sh | ||
18 | +++ b/ltmain.sh | ||
19 | @@ -5628,6 +5628,9 @@ func_mode_link () | ||
20 | absdir="$abs_ladir" | ||
21 | libdir="$abs_ladir" | ||
22 | else | ||
23 | + # Instead of using libdir from .la which usually points to a host path, | ||
24 | + # use the path the .la is contained in. | ||
25 | + libdir="$abs_ladir" | ||
26 | dir="$libdir" | ||
27 | absdir="$libdir" | ||
28 | fi | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch deleted file mode 100644 index f52e21ed..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 710d1325474e708e6b34eebe09f3f130420af293 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 31 Jan 2023 22:03:38 -0800 | ||
4 | Subject: [PATCH] aarch64: Fix include paths when S != B | ||
5 | |||
6 | aarch64.h gets copied into build directory when built out of tree, in | ||
7 | this case build uses this file but does not find the includes inside it | ||
8 | since they are not found in any of include paths specified in compiler | ||
9 | cmdline. | ||
10 | |||
11 | Fixes build errors like | ||
12 | |||
13 | % g++ -c -isystem/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gcc-cross-aarch64/13.0.1-r0/recipe-sysroot-native/usr/include -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/build -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../include -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../libcpp/include -o build/gencheck.o ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc | ||
14 | In file included from ./tm.h:34, | ||
15 | from ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc:23: | ||
16 | ./config/aarch64/aarch64.h:164:10: fatal error: aarch64-option-extensions.def: No such file or directory | ||
17 | 164 | #include "aarch64-option-extensions.def" | ||
18 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
19 | compilation terminated. | ||
20 | |||
21 | See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105144 | ||
22 | |||
23 | Upstream-Status: Pending | ||
24 | |||
25 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
26 | --- | ||
27 | gcc/config/aarch64/aarch64.h | 8 ++++---- | ||
28 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
29 | |||
30 | diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h | ||
31 | index 155cace6afe..07d68958908 100644 | ||
32 | --- a/gcc/config/aarch64/aarch64.h | ||
33 | +++ b/gcc/config/aarch64/aarch64.h | ||
34 | @@ -161,8 +161,8 @@ | ||
35 | enum class aarch64_feature : unsigned char { | ||
36 | #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) IDENT, | ||
37 | #define AARCH64_ARCH(A, B, IDENT, D, E) IDENT, | ||
38 | -#include "aarch64-option-extensions.def" | ||
39 | -#include "aarch64-arches.def" | ||
40 | +#include "config/aarch64/aarch64-option-extensions.def" | ||
41 | +#include "config/aarch64/aarch64-arches.def" | ||
42 | }; | ||
43 | |||
44 | /* Define unique flags for each of the above. */ | ||
45 | @@ -171,8 +171,8 @@ enum class aarch64_feature : unsigned char { | ||
46 | = aarch64_feature_flags (1) << int (aarch64_feature::IDENT); | ||
47 | #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) HANDLE (IDENT) | ||
48 | #define AARCH64_ARCH(A, B, IDENT, D, E) HANDLE (IDENT) | ||
49 | -#include "aarch64-option-extensions.def" | ||
50 | -#include "aarch64-arches.def" | ||
51 | +#include "config/aarch64/aarch64-option-extensions.def" | ||
52 | +#include "config/aarch64/aarch64-arches.def" | ||
53 | #undef HANDLE | ||
54 | |||
55 | #endif | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch deleted file mode 100644 index b05be59c..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From e8e8a0ab572cfceb9758f99599c0db4c962e49c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 20 Feb 2015 09:39:38 +0000 | ||
4 | Subject: [PATCH] Avoid using libdir from .la which usually points to a host | ||
5 | path | ||
6 | |||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | ltmain.sh | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/ltmain.sh b/ltmain.sh | ||
16 | index ee938056bef..9ebc7e3d1e0 100644 | ||
17 | --- a/ltmain.sh | ||
18 | +++ b/ltmain.sh | ||
19 | @@ -5628,6 +5628,9 @@ func_mode_link () | ||
20 | absdir="$abs_ladir" | ||
21 | libdir="$abs_ladir" | ||
22 | else | ||
23 | + # Instead of using libdir from .la which usually points to a host path, | ||
24 | + # use the path the .la is contained in. | ||
25 | + libdir="$abs_ladir" | ||
26 | dir="$libdir" | ||
27 | absdir="$libdir" | ||
28 | fi | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch deleted file mode 100644 index 61e61ecc..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | From 612801d426e75ff997cfabda380dbe52c2cbc532 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 20 Feb 2015 10:25:11 +0000 | ||
4 | Subject: [PATCH] Ensure target gcc headers can be included | ||
5 | |||
6 | There are a few headers installed as part of the OpenEmbedded | ||
7 | gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe | ||
8 | built for the target architecture, these are within the target | ||
9 | sysroot and not cross/nativesdk; thus they weren't able to be | ||
10 | found by gcc with the existing search paths. Add support for | ||
11 | picking up these headers under the sysroot supplied on the gcc | ||
12 | command line in order to resolve this. | ||
13 | |||
14 | Extend target gcc headers search to musl too | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | gcc/Makefile.in | 2 ++ | ||
22 | gcc/config/linux.h | 8 ++++++++ | ||
23 | gcc/config/rs6000/sysv4.h | 8 ++++++++ | ||
24 | gcc/cppdefault.cc | 4 ++++ | ||
25 | 4 files changed, 22 insertions(+) | ||
26 | |||
27 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
28 | index a8277254696..07fa63b6640 100644 | ||
29 | --- a/gcc/Makefile.in | ||
30 | +++ b/gcc/Makefile.in | ||
31 | @@ -632,6 +632,7 @@ libexecdir = @libexecdir@ | ||
32 | |||
33 | # Directory in which the compiler finds libraries etc. | ||
34 | libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
35 | +libsubdir_target = $(target_noncanonical)/$(version) | ||
36 | # Directory in which the compiler finds executables | ||
37 | libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix) | ||
38 | # Directory in which all plugin resources are installed | ||
39 | @@ -3024,6 +3025,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\" | ||
40 | |||
41 | PREPROCESSOR_DEFINES = \ | ||
42 | -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \ | ||
43 | + -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \ | ||
44 | -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \ | ||
45 | -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ | ||
46 | -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \ | ||
47 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
48 | index 4ce173384ef..8a3cd4f2d34 100644 | ||
49 | --- a/gcc/config/linux.h | ||
50 | +++ b/gcc/config/linux.h | ||
51 | @@ -170,6 +170,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
52 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
53 | #endif | ||
54 | |||
55 | +#ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
56 | +#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
57 | + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
58 | +#else | ||
59 | +#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
60 | +#endif | ||
61 | + | ||
62 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
63 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
64 | { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
65 | @@ -196,6 +203,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
66 | INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
67 | INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
68 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
69 | + INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
70 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
71 | { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
72 | { 0, 0, 0, 0, 0, 0 } \ | ||
73 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
74 | index a73954d9de5..e5dd6538358 100644 | ||
75 | --- a/gcc/config/rs6000/sysv4.h | ||
76 | +++ b/gcc/config/rs6000/sysv4.h | ||
77 | @@ -994,6 +994,13 @@ ncrtn.o%s" | ||
78 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
79 | #endif | ||
80 | |||
81 | +#ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
82 | +#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
83 | + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
84 | +#else | ||
85 | +#define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
86 | +#endif | ||
87 | + | ||
88 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
89 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
90 | { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
91 | @@ -1020,6 +1027,7 @@ ncrtn.o%s" | ||
92 | INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
93 | INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
94 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
95 | + INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
96 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
97 | { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
98 | { 0, 0, 0, 0, 0, 0 } \ | ||
99 | diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc | ||
100 | index 7888300f277..52cf14e92f8 100644 | ||
101 | --- a/gcc/cppdefault.cc | ||
102 | +++ b/gcc/cppdefault.cc | ||
103 | @@ -64,6 +64,10 @@ const struct default_include cpp_include_defaults[] | ||
104 | /* This is the dir for gcc's private headers. */ | ||
105 | { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, | ||
106 | #endif | ||
107 | +#ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
108 | + /* This is the dir for gcc's private headers under the specified sysroot. */ | ||
109 | + { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, | ||
110 | +#endif | ||
111 | #ifdef LOCAL_INCLUDE_DIR | ||
112 | /* /usr/local/include comes before the fixincluded header files. */ | ||
113 | { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch deleted file mode 100644 index 94308b2a..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 9ae49e7b88c208ab79ec9c2fc4a2fa8a3f1e85bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 3 Mar 2015 08:21:19 +0000 | ||
4 | Subject: [PATCH] Don't search host directory during "relink" if $inst_prefix | ||
5 | is provided | ||
6 | |||
7 | http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html | ||
8 | |||
9 | Upstream-Status: Submitted | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | ltmain.sh | 5 +++-- | ||
14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/ltmain.sh b/ltmain.sh | ||
17 | index 9ebc7e3d1e0..7ea79fa8be6 100644 | ||
18 | --- a/ltmain.sh | ||
19 | +++ b/ltmain.sh | ||
20 | @@ -6004,12 +6004,13 @@ func_mode_link () | ||
21 | fi | ||
22 | else | ||
23 | # We cannot seem to hardcode it, guess we'll fake it. | ||
24 | + # Default if $libdir is not relative to the prefix: | ||
25 | add_dir="-L$libdir" | ||
26 | - # Try looking first in the location we're being installed to. | ||
27 | + | ||
28 | if test -n "$inst_prefix_dir"; then | ||
29 | case $libdir in | ||
30 | [\\/]*) | ||
31 | - add_dir="$add_dir -L$inst_prefix_dir$libdir" | ||
32 | + add_dir="-L$inst_prefix_dir$libdir" | ||
33 | ;; | ||
34 | esac | ||
35 | fi | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch deleted file mode 100644 index ce9635ce..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | From bf918db7117f41d3c04162095641165ca241707d Mon Sep 17 00:00:00 2001 | ||
2 | From: Robert Yang <liezhi.yang@windriver.com> | ||
3 | Date: Sun, 5 Jul 2015 20:25:18 -0700 | ||
4 | Subject: [PATCH] libcc1: fix libcc1's install path and rpath | ||
5 | |||
6 | * Install libcc1.so and libcc1plugin.so into | ||
7 | $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we | ||
8 | had done to lto-plugin. | ||
9 | * Fix bad RPATH iussue: | ||
10 | gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file | ||
11 | /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0 | ||
12 | [rpaths] | ||
13 | |||
14 | Upstream-Status: Inappropriate [OE configuration] | ||
15 | |||
16 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
17 | --- | ||
18 | libcc1/Makefile.am | 4 ++-- | ||
19 | libcc1/Makefile.in | 4 ++-- | ||
20 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
21 | |||
22 | diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am | ||
23 | index 6e3a34ff7e2..3f3f6391aba 100644 | ||
24 | --- a/libcc1/Makefile.am | ||
25 | +++ b/libcc1/Makefile.am | ||
26 | @@ -40,8 +40,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ | ||
27 | $(Wc)$(libiberty_normal))) | ||
28 | libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) | ||
29 | |||
30 | -plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin | ||
31 | -cc1libdir = $(libdir)/$(libsuffix) | ||
32 | +cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) | ||
33 | +plugindir = $(cc1libdir) | ||
34 | |||
35 | if ENABLE_PLUGIN | ||
36 | plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la | ||
37 | diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in | ||
38 | index f8f590d71e9..56462492045 100644 | ||
39 | --- a/libcc1/Makefile.in | ||
40 | +++ b/libcc1/Makefile.in | ||
41 | @@ -396,8 +396,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \ | ||
42 | $(Wc)$(libiberty_normal))) | ||
43 | |||
44 | libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty)) | ||
45 | -plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin | ||
46 | -cc1libdir = $(libdir)/$(libsuffix) | ||
47 | +cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) | ||
48 | +plugindir = $(cc1libdir) | ||
49 | @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la libcp1plugin.la | ||
50 | @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la | ||
51 | shared_source = callbacks.cc callbacks.hh connection.cc connection.hh \ | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch deleted file mode 100644 index 3b547195..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch +++ /dev/null | |||
@@ -1,510 +0,0 @@ | |||
1 | From 4fbbd40d7db89cdbeaf93df1e1da692b1f80a5bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 7 Dec 2015 23:39:54 +0000 | ||
4 | Subject: [PATCH] handle sysroot support for nativesdk-gcc | ||
5 | |||
6 | Being able to build a nativesdk gcc is useful, particularly in cases | ||
7 | where the host compiler may be of an incompatible version (or a 32 | ||
8 | bit compiler is needed). | ||
9 | |||
10 | Sadly, building nativesdk-gcc is not straight forward. We install | ||
11 | nativesdk-gcc into a relocatable location and this means that its | ||
12 | library locations can change. "Normal" sysroot support doesn't help | ||
13 | in this case since the values of paths like "libdir" change, not just | ||
14 | base root directory of the system. | ||
15 | |||
16 | In order to handle this we do two things: | ||
17 | |||
18 | a) Add %r into spec file markup which can be used for injected paths | ||
19 | such as SYSTEMLIBS_DIR (see gcc_multilib_setup()). | ||
20 | b) Add other paths which need relocation into a .gccrelocprefix section | ||
21 | which the relocation code will notice and adjust automatically. | ||
22 | |||
23 | Upstream-Status: Inappropriate | ||
24 | RP 2015/7/28 | ||
25 | |||
26 | Extend the gccrelocprefix support to musl config too, this ensures | ||
27 | that gcc will get right bits in SDK installations | ||
28 | |||
29 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
30 | |||
31 | Added PREFIXVAR and EXEC_PREFIXVAR to support runtime relocation. Without | ||
32 | these as part of the gccrelocprefix the system can't do runtime relocation | ||
33 | if the executable is moved. (These paths were missed in the original | ||
34 | implementation.) | ||
35 | |||
36 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | ||
37 | --- | ||
38 | gcc/c-family/c-opts.cc | 4 +-- | ||
39 | gcc/config/linux.h | 24 +++++++-------- | ||
40 | gcc/config/rs6000/sysv4.h | 24 +++++++-------- | ||
41 | gcc/cppdefault.cc | 63 ++++++++++++++++++++++++--------------- | ||
42 | gcc/cppdefault.h | 13 ++++---- | ||
43 | gcc/gcc.cc | 20 +++++++++---- | ||
44 | gcc/incpath.cc | 12 ++++---- | ||
45 | gcc/prefix.cc | 6 ++-- | ||
46 | 8 files changed, 94 insertions(+), 72 deletions(-) | ||
47 | |||
48 | diff --git a/gcc/c-family/c-opts.cc b/gcc/c-family/c-opts.cc | ||
49 | index a341a061758..83b0bef4dbb 100644 | ||
50 | --- a/gcc/c-family/c-opts.cc | ||
51 | +++ b/gcc/c-family/c-opts.cc | ||
52 | @@ -1458,8 +1458,8 @@ add_prefixed_path (const char *suffix, incpath_kind chain) | ||
53 | size_t prefix_len, suffix_len; | ||
54 | |||
55 | suffix_len = strlen (suffix); | ||
56 | - prefix = iprefix ? iprefix : cpp_GCC_INCLUDE_DIR; | ||
57 | - prefix_len = iprefix ? strlen (iprefix) : cpp_GCC_INCLUDE_DIR_len; | ||
58 | + prefix = iprefix ? iprefix : GCC_INCLUDE_DIRVAR; | ||
59 | + prefix_len = iprefix ? strlen (iprefix) : strlen(GCC_INCLUDE_DIRVAR) - 7; | ||
60 | |||
61 | path = (char *) xmalloc (prefix_len + suffix_len + 1); | ||
62 | memcpy (path, prefix, prefix_len); | ||
63 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
64 | index 8a3cd4f2d34..58143dff731 100644 | ||
65 | --- a/gcc/config/linux.h | ||
66 | +++ b/gcc/config/linux.h | ||
67 | @@ -134,53 +134,53 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
68 | * Unfortunately, this is mostly duplicated from cppdefault.cc */ | ||
69 | #if DEFAULT_LIBC == LIBC_MUSL | ||
70 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | ||
71 | - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ | ||
72 | + { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
73 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ | ||
74 | - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ | ||
75 | + { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
76 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ | ||
77 | - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ | ||
78 | + { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
79 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
80 | |||
81 | #ifdef LOCAL_INCLUDE_DIR | ||
82 | #define INCLUDE_DEFAULTS_MUSL_LOCAL \ | ||
83 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ | ||
84 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, | ||
85 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \ | ||
86 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, | ||
87 | #else | ||
88 | #define INCLUDE_DEFAULTS_MUSL_LOCAL | ||
89 | #endif | ||
90 | |||
91 | #ifdef PREFIX_INCLUDE_DIR | ||
92 | #define INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
93 | - { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, | ||
94 | + { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0}, | ||
95 | #else | ||
96 | #define INCLUDE_DEFAULTS_MUSL_PREFIX | ||
97 | #endif | ||
98 | |||
99 | #ifdef CROSS_INCLUDE_DIR | ||
100 | #define INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
101 | - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, | ||
102 | + { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0}, | ||
103 | #else | ||
104 | #define INCLUDE_DEFAULTS_MUSL_CROSS | ||
105 | #endif | ||
106 | |||
107 | #ifdef TOOL_INCLUDE_DIR | ||
108 | #define INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
109 | - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, | ||
110 | + { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0}, | ||
111 | #else | ||
112 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
113 | #endif | ||
114 | |||
115 | #ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
116 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
117 | - { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
118 | + { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0}, | ||
119 | #else | ||
120 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
121 | #endif | ||
122 | |||
123 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
124 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
125 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
126 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, | ||
127 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \ | ||
128 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 }, | ||
129 | #else | ||
130 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | ||
131 | #endif | ||
132 | @@ -205,7 +205,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
133 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
134 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
135 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
136 | - { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
137 | + { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ | ||
138 | { 0, 0, 0, 0, 0, 0 } \ | ||
139 | } | ||
140 | #endif | ||
141 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
142 | index e5dd6538358..b496849b792 100644 | ||
143 | --- a/gcc/config/rs6000/sysv4.h | ||
144 | +++ b/gcc/config/rs6000/sysv4.h | ||
145 | @@ -958,53 +958,53 @@ ncrtn.o%s" | ||
146 | /* Include order changes for musl, same as in generic linux.h. */ | ||
147 | #if DEFAULT_LIBC == LIBC_MUSL | ||
148 | #define INCLUDE_DEFAULTS_MUSL_GPP \ | ||
149 | - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ | ||
150 | + { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
151 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ | ||
152 | - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ | ||
153 | + { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
154 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ | ||
155 | - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ | ||
156 | + { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, \ | ||
157 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
158 | |||
159 | #ifdef LOCAL_INCLUDE_DIR | ||
160 | #define INCLUDE_DEFAULTS_MUSL_LOCAL \ | ||
161 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ | ||
162 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, | ||
163 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, \ | ||
164 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, | ||
165 | #else | ||
166 | #define INCLUDE_DEFAULTS_MUSL_LOCAL | ||
167 | #endif | ||
168 | |||
169 | #ifdef PREFIX_INCLUDE_DIR | ||
170 | #define INCLUDE_DEFAULTS_MUSL_PREFIX \ | ||
171 | - { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, | ||
172 | + { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0}, | ||
173 | #else | ||
174 | #define INCLUDE_DEFAULTS_MUSL_PREFIX | ||
175 | #endif | ||
176 | |||
177 | #ifdef CROSS_INCLUDE_DIR | ||
178 | #define INCLUDE_DEFAULTS_MUSL_CROSS \ | ||
179 | - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, | ||
180 | + { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0}, | ||
181 | #else | ||
182 | #define INCLUDE_DEFAULTS_MUSL_CROSS | ||
183 | #endif | ||
184 | |||
185 | #ifdef TOOL_INCLUDE_DIR | ||
186 | #define INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
187 | - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, | ||
188 | + { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0}, | ||
189 | #else | ||
190 | #define INCLUDE_DEFAULTS_MUSL_TOOL | ||
191 | #endif | ||
192 | |||
193 | #ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
194 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
195 | - { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0}, | ||
196 | + { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0}, | ||
197 | #else | ||
198 | #define INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET | ||
199 | #endif | ||
200 | |||
201 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
202 | #define INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
203 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ | ||
204 | - { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, | ||
205 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 2 }, \ | ||
206 | + { NATIVE_SYSTEM_HEADER_DIRVAR, 0, 0, 0, 1, 0 }, | ||
207 | #else | ||
208 | #define INCLUDE_DEFAULTS_MUSL_NATIVE | ||
209 | #endif | ||
210 | @@ -1029,7 +1029,7 @@ ncrtn.o%s" | ||
211 | INCLUDE_DEFAULTS_MUSL_TOOL \ | ||
212 | INCLUDE_DEFAULTS_MUSL_SUBDIR_TARGET \ | ||
213 | INCLUDE_DEFAULTS_MUSL_NATIVE \ | ||
214 | - { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ | ||
215 | + { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ | ||
216 | { 0, 0, 0, 0, 0, 0 } \ | ||
217 | } | ||
218 | #endif | ||
219 | diff --git a/gcc/cppdefault.cc b/gcc/cppdefault.cc | ||
220 | index 52cf14e92f8..d8977afc05e 100644 | ||
221 | --- a/gcc/cppdefault.cc | ||
222 | +++ b/gcc/cppdefault.cc | ||
223 | @@ -35,6 +35,30 @@ | ||
224 | # undef CROSS_INCLUDE_DIR | ||
225 | #endif | ||
226 | |||
227 | +static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR; | ||
228 | +char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR; | ||
229 | +static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR; | ||
230 | +static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR; | ||
231 | +static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET; | ||
232 | +#ifdef LOCAL_INCLUDE_DIR | ||
233 | +static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR; | ||
234 | +#endif | ||
235 | +#ifdef PREFIX_INCLUDE_DIR | ||
236 | +static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR; | ||
237 | +#endif | ||
238 | +#ifdef FIXED_INCLUDE_DIR | ||
239 | +static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR; | ||
240 | +#endif | ||
241 | +#ifdef CROSS_INCLUDE_DIR | ||
242 | +static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR; | ||
243 | +#endif | ||
244 | +#ifdef TOOL_INCLUDE_DIR | ||
245 | +static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR; | ||
246 | +#endif | ||
247 | +#ifdef NATIVE_SYSTEM_HEADER_DIR | ||
248 | +static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR; | ||
249 | +#endif | ||
250 | + | ||
251 | const struct default_include cpp_include_defaults[] | ||
252 | #ifdef INCLUDE_DEFAULTS | ||
253 | = INCLUDE_DEFAULTS; | ||
254 | @@ -42,17 +66,17 @@ const struct default_include cpp_include_defaults[] | ||
255 | = { | ||
256 | #ifdef GPLUSPLUS_INCLUDE_DIR | ||
257 | /* Pick up GNU C++ generic include files. */ | ||
258 | - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, | ||
259 | + { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1, | ||
260 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
261 | #endif | ||
262 | #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR | ||
263 | /* Pick up GNU C++ target-dependent include files. */ | ||
264 | - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, | ||
265 | + { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1, | ||
266 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, | ||
267 | #endif | ||
268 | #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR | ||
269 | /* Pick up GNU C++ backward and deprecated include files. */ | ||
270 | - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, | ||
271 | + { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1, | ||
272 | GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, | ||
273 | #endif | ||
274 | #ifdef GPLUSPLUS_LIBCXX_INCLUDE_DIR | ||
275 | @@ -62,23 +86,23 @@ const struct default_include cpp_include_defaults[] | ||
276 | #endif | ||
277 | #ifdef GCC_INCLUDE_DIR | ||
278 | /* This is the dir for gcc's private headers. */ | ||
279 | - { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, | ||
280 | + { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, | ||
281 | #endif | ||
282 | #ifdef GCC_INCLUDE_SUBDIR_TARGET | ||
283 | /* This is the dir for gcc's private headers under the specified sysroot. */ | ||
284 | - { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 }, | ||
285 | + { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 }, | ||
286 | #endif | ||
287 | #ifdef LOCAL_INCLUDE_DIR | ||
288 | /* /usr/local/include comes before the fixincluded header files. */ | ||
289 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, | ||
290 | - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, | ||
291 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 }, | ||
292 | + { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 }, | ||
293 | #endif | ||
294 | #ifdef PREFIX_INCLUDE_DIR | ||
295 | - { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 }, | ||
296 | + { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 }, | ||
297 | #endif | ||
298 | #ifdef FIXED_INCLUDE_DIR | ||
299 | /* This is the dir for fixincludes. */ | ||
300 | - { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0, | ||
301 | + { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0, | ||
302 | /* A multilib suffix needs adding if different multilibs use | ||
303 | different headers. */ | ||
304 | #ifdef SYSROOT_HEADERS_SUFFIX_SPEC | ||
305 | @@ -90,33 +114,24 @@ const struct default_include cpp_include_defaults[] | ||
306 | #endif | ||
307 | #ifdef CROSS_INCLUDE_DIR | ||
308 | /* One place the target system's headers might be. */ | ||
309 | - { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 }, | ||
310 | + { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 }, | ||
311 | #endif | ||
312 | #ifdef TOOL_INCLUDE_DIR | ||
313 | /* Another place the target system's headers might be. */ | ||
314 | - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 }, | ||
315 | + { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 }, | ||
316 | #endif | ||
317 | #ifdef NATIVE_SYSTEM_HEADER_DIR | ||
318 | /* /usr/include comes dead last. */ | ||
319 | - { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, | ||
320 | - { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, | ||
321 | + { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 }, | ||
322 | + { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 }, | ||
323 | #endif | ||
324 | { 0, 0, 0, 0, 0, 0 } | ||
325 | }; | ||
326 | #endif /* no INCLUDE_DEFAULTS */ | ||
327 | |||
328 | -#ifdef GCC_INCLUDE_DIR | ||
329 | -const char cpp_GCC_INCLUDE_DIR[] = GCC_INCLUDE_DIR; | ||
330 | -const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8; | ||
331 | -#else | ||
332 | -const char cpp_GCC_INCLUDE_DIR[] = ""; | ||
333 | -const size_t cpp_GCC_INCLUDE_DIR_len = 0; | ||
334 | -#endif | ||
335 | - | ||
336 | /* The configured prefix. */ | ||
337 | -const char cpp_PREFIX[] = PREFIX; | ||
338 | -const size_t cpp_PREFIX_len = sizeof PREFIX - 1; | ||
339 | -const char cpp_EXEC_PREFIX[] = STANDARD_EXEC_PREFIX; | ||
340 | +char PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX; | ||
341 | +char EXEC_PREFIXVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; | ||
342 | |||
343 | /* This value is set by cpp_relocated at runtime */ | ||
344 | const char *gcc_exec_prefix; | ||
345 | diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h | ||
346 | index fb97c0b5814..6267150facc 100644 | ||
347 | --- a/gcc/cppdefault.h | ||
348 | +++ b/gcc/cppdefault.h | ||
349 | @@ -33,7 +33,8 @@ | ||
350 | |||
351 | struct default_include | ||
352 | { | ||
353 | - const char *const fname; /* The name of the directory. */ | ||
354 | + const char *fname; /* The name of the directory. */ | ||
355 | + | ||
356 | const char *const component; /* The component containing the directory | ||
357 | (see update_path in prefix.cc) */ | ||
358 | const char cplusplus; /* When this is non-zero, we should only | ||
359 | @@ -55,17 +56,13 @@ struct default_include | ||
360 | }; | ||
361 | |||
362 | extern const struct default_include cpp_include_defaults[]; | ||
363 | -extern const char cpp_GCC_INCLUDE_DIR[]; | ||
364 | -extern const size_t cpp_GCC_INCLUDE_DIR_len; | ||
365 | +extern char GCC_INCLUDE_DIRVAR[] __attribute__ ((section (".gccrelocprefix"))); | ||
366 | |||
367 | /* The configure-time prefix, i.e., the value supplied as the argument | ||
368 | to --prefix=. */ | ||
369 | -extern const char cpp_PREFIX[]; | ||
370 | +extern char PREFIXVAR[] __attribute__ ((section (".gccrelocprefix"))); | ||
371 | /* The length of the configure-time prefix. */ | ||
372 | -extern const size_t cpp_PREFIX_len; | ||
373 | -/* The configure-time execution prefix. This is typically the lib/gcc | ||
374 | - subdirectory of cpp_PREFIX. */ | ||
375 | -extern const char cpp_EXEC_PREFIX[]; | ||
376 | +extern char EXEC_PREFIXVAR[] __attribute__ ((section (".gccrelocprefix"))); | ||
377 | /* The run-time execution prefix. This is typically the lib/gcc | ||
378 | subdirectory of the actual installation. */ | ||
379 | extern const char *gcc_exec_prefix; | ||
380 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc | ||
381 | index aa4cf92fb78..5569a39a14a 100644 | ||
382 | --- a/gcc/gcc.cc | ||
383 | +++ b/gcc/gcc.cc | ||
384 | @@ -252,6 +252,8 @@ FILE *report_times_to_file = NULL; | ||
385 | #endif | ||
386 | static const char *target_system_root = DEFAULT_TARGET_SYSTEM_ROOT; | ||
387 | |||
388 | +static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR; | ||
389 | + | ||
390 | /* Nonzero means pass the updated target_system_root to the compiler. */ | ||
391 | |||
392 | static int target_system_root_changed; | ||
393 | @@ -575,6 +577,7 @@ or with constant text in a single argument. | ||
394 | %G process LIBGCC_SPEC as a spec. | ||
395 | %R Output the concatenation of target_system_root and | ||
396 | target_sysroot_suffix. | ||
397 | + %r Output the base path target_relocatable_prefix | ||
398 | %S process STARTFILE_SPEC as a spec. A capital S is actually used here. | ||
399 | %E process ENDFILE_SPEC as a spec. A capital E is actually used here. | ||
400 | %C process CPP_SPEC as a spec. | ||
401 | @@ -1627,10 +1630,10 @@ static const char *gcc_libexec_prefix; | ||
402 | gcc_exec_prefix is set because, in that case, we know where the | ||
403 | compiler has been installed, and use paths relative to that | ||
404 | location instead. */ | ||
405 | -static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX; | ||
406 | -static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX; | ||
407 | -static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX; | ||
408 | -static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; | ||
409 | +static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX; | ||
410 | +static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX; | ||
411 | +static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX; | ||
412 | +static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; | ||
413 | |||
414 | /* For native compilers, these are well-known paths containing | ||
415 | components that may be provided by the system. For cross | ||
416 | @@ -1638,9 +1641,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; | ||
417 | static const char *md_exec_prefix = MD_EXEC_PREFIX; | ||
418 | static const char *md_startfile_prefix = MD_STARTFILE_PREFIX; | ||
419 | static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1; | ||
420 | -static const char *const standard_startfile_prefix_1 | ||
421 | +static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix"))) | ||
422 | = STANDARD_STARTFILE_PREFIX_1; | ||
423 | -static const char *const standard_startfile_prefix_2 | ||
424 | +static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix"))) | ||
425 | = STANDARD_STARTFILE_PREFIX_2; | ||
426 | |||
427 | /* A relative path to be used in finding the location of tools | ||
428 | @@ -6676,6 +6679,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part) | ||
429 | } | ||
430 | break; | ||
431 | |||
432 | + case 'r': | ||
433 | + obstack_grow (&obstack, target_relocatable_prefix, | ||
434 | + strlen (target_relocatable_prefix)); | ||
435 | + break; | ||
436 | + | ||
437 | case 'S': | ||
438 | value = do_spec_1 (startfile_spec, 0, NULL); | ||
439 | if (value != 0) | ||
440 | diff --git a/gcc/incpath.cc b/gcc/incpath.cc | ||
441 | index c80f100f476..5ac03c08693 100644 | ||
442 | --- a/gcc/incpath.cc | ||
443 | +++ b/gcc/incpath.cc | ||
444 | @@ -135,7 +135,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, | ||
445 | int relocated = cpp_relocated (); | ||
446 | size_t len; | ||
447 | |||
448 | - if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) | ||
449 | + if (iprefix && (len = strlen(GCC_INCLUDE_DIRVAR) - 7) != 0) | ||
450 | { | ||
451 | /* Look for directories that start with the standard prefix. | ||
452 | "Translate" them, i.e. replace /usr/local/lib/gcc... with | ||
453 | @@ -150,7 +150,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, | ||
454 | now. */ | ||
455 | if (sysroot && p->add_sysroot) | ||
456 | continue; | ||
457 | - if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) | ||
458 | + if (!filename_ncmp (p->fname, GCC_INCLUDE_DIRVAR, len)) | ||
459 | { | ||
460 | char *str = concat (iprefix, p->fname + len, NULL); | ||
461 | if (p->multilib == 1 && imultilib) | ||
462 | @@ -191,7 +191,7 @@ add_standard_paths (const char *sysroot, const char *iprefix, | ||
463 | free (sysroot_no_trailing_dir_separator); | ||
464 | } | ||
465 | else if (!p->add_sysroot && relocated | ||
466 | - && !filename_ncmp (p->fname, cpp_PREFIX, cpp_PREFIX_len)) | ||
467 | + && !filename_ncmp (p->fname, PREFIXVAR, strlen(PREFIXVAR))) | ||
468 | { | ||
469 | static const char *relocated_prefix; | ||
470 | char *ostr; | ||
471 | @@ -208,12 +208,12 @@ add_standard_paths (const char *sysroot, const char *iprefix, | ||
472 | dummy = concat (gcc_exec_prefix, "dummy", NULL); | ||
473 | relocated_prefix | ||
474 | = make_relative_prefix (dummy, | ||
475 | - cpp_EXEC_PREFIX, | ||
476 | - cpp_PREFIX); | ||
477 | + EXEC_PREFIXVAR, | ||
478 | + PREFIXVAR); | ||
479 | free (dummy); | ||
480 | } | ||
481 | ostr = concat (relocated_prefix, | ||
482 | - p->fname + cpp_PREFIX_len, | ||
483 | + p->fname + strlen(PREFIXVAR), | ||
484 | NULL); | ||
485 | str = update_path (ostr, p->component); | ||
486 | free (ostr); | ||
487 | diff --git a/gcc/prefix.cc b/gcc/prefix.cc | ||
488 | index 096ed5afa3d..2526f0ecc39 100644 | ||
489 | --- a/gcc/prefix.cc | ||
490 | +++ b/gcc/prefix.cc | ||
491 | @@ -72,7 +72,9 @@ License along with GCC; see the file COPYING3. If not see | ||
492 | #include "prefix.h" | ||
493 | #include "common/common-target.h" | ||
494 | |||
495 | -static const char *std_prefix = PREFIX; | ||
496 | +char PREFIXVAR1[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX; | ||
497 | + | ||
498 | +static const char *std_prefix = PREFIXVAR1; | ||
499 | |||
500 | static const char *get_key_value (char *); | ||
501 | static char *translate_name (char *); | ||
502 | @@ -212,7 +214,7 @@ translate_name (char *name) | ||
503 | prefix = getenv (key); | ||
504 | |||
505 | if (prefix == 0) | ||
506 | - prefix = PREFIX; | ||
507 | + prefix = PREFIXVAR1; | ||
508 | |||
509 | /* We used to strip trailing DIR_SEPARATORs here, but that can | ||
510 | sometimes yield a result with no separator when one was coded | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch deleted file mode 100644 index 9b05da64..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | From 33a1f07a4417247dc24819d4e583ca09f56d5a7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 7 Dec 2015 23:41:45 +0000 | ||
4 | Subject: [PATCH] Search target sysroot gcc version specific dirs with | ||
5 | multilib. | ||
6 | |||
7 | We install the gcc libraries (such as crtbegin.p) into | ||
8 | <sysroot><libdir>/<target-sys>/5.2.0/ | ||
9 | which is a default search path for GCC (aka multi_suffix in the | ||
10 | code below). <target-sys> is 'machine' in gcc's terminology. We use | ||
11 | these directories so that multiple gcc versions could in theory | ||
12 | co-exist on target. | ||
13 | |||
14 | We only want to build one gcc-cross-canadian per arch and have this work | ||
15 | for all multilibs. <target-sys> can be handled by mapping the multilib | ||
16 | <target-sys> to the one used by gcc-cross-canadian, e.g. | ||
17 | mips64-polkmllib32-linux | ||
18 | is symlinked to by mips64-poky-linux. | ||
19 | |||
20 | The default gcc search path in the target sysroot for a "lib64" mutlilib | ||
21 | is: | ||
22 | |||
23 | <sysroot>/lib32/mips64-poky-linux/5.2.0/ | ||
24 | <sysroot>/lib32/../lib64/ | ||
25 | <sysroot>/usr/lib32/mips64-poky-linux/5.2.0/ | ||
26 | <sysroot>/usr/lib32/../lib64/ | ||
27 | <sysroot>/lib32/ | ||
28 | <sysroot>/usr/lib32/ | ||
29 | |||
30 | which means that the lib32 crtbegin.o will be found and the lib64 ones | ||
31 | will not which leads to compiler failures. | ||
32 | |||
33 | This patch injects a multilib version of that path first so the lib64 | ||
34 | binaries can be found first. With this change the search path becomes: | ||
35 | |||
36 | <sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/ | ||
37 | <sysroot>/lib32/mips64-poky-linux/5.2.0/ | ||
38 | <sysroot>/lib32/../lib64/ | ||
39 | <sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/ | ||
40 | <sysroot>/usr/lib32/mips64-poky-linux/5.2.0/ | ||
41 | <sysroot>/usr/lib32/../lib64/ | ||
42 | <sysroot>/lib32/ | ||
43 | <sysroot>/usr/lib32/ | ||
44 | |||
45 | Upstream-Status: Pending | ||
46 | RP 2015/7/31 | ||
47 | |||
48 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
49 | --- | ||
50 | gcc/gcc.cc | 29 ++++++++++++++++++++++++++++- | ||
51 | 1 file changed, 28 insertions(+), 1 deletion(-) | ||
52 | |||
53 | diff --git a/gcc/gcc.cc b/gcc/gcc.cc | ||
54 | index 5569a39a14a..4598f6cd7c9 100644 | ||
55 | --- a/gcc/gcc.cc | ||
56 | +++ b/gcc/gcc.cc | ||
57 | @@ -2817,7 +2817,7 @@ for_each_path (const struct path_prefix *paths, | ||
58 | if (path == NULL) | ||
59 | { | ||
60 | len = paths->max_len + extra_space + 1; | ||
61 | - len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len); | ||
62 | + len += MAX ((suffix_len + multi_os_dir_len), multiarch_len); | ||
63 | path = XNEWVEC (char, len); | ||
64 | } | ||
65 | |||
66 | @@ -2829,6 +2829,33 @@ for_each_path (const struct path_prefix *paths, | ||
67 | /* Look first in MACHINE/VERSION subdirectory. */ | ||
68 | if (!skip_multi_dir) | ||
69 | { | ||
70 | + if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir)) | ||
71 | + { | ||
72 | + const char *this_multi; | ||
73 | + size_t this_multi_len; | ||
74 | + | ||
75 | + if (pl->os_multilib) | ||
76 | + { | ||
77 | + this_multi = multi_os_dir; | ||
78 | + this_multi_len = multi_os_dir_len; | ||
79 | + } | ||
80 | + else | ||
81 | + { | ||
82 | + this_multi = multi_dir; | ||
83 | + this_multi_len = multi_dir_len; | ||
84 | + } | ||
85 | + | ||
86 | + /* Look in multilib MACHINE/VERSION subdirectory first */ | ||
87 | + if (this_multi_len) | ||
88 | + { | ||
89 | + memcpy (path + len, this_multi, this_multi_len + 1); | ||
90 | + memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1); | ||
91 | + ret = callback (path, callback_info); | ||
92 | + if (ret) | ||
93 | + break; | ||
94 | + } | ||
95 | + } | ||
96 | + | ||
97 | memcpy (path + len, multi_suffix, suffix_len + 1); | ||
98 | ret = callback (path, callback_info); | ||
99 | if (ret) | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch deleted file mode 100644 index 56793e03..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | From d7dc2861840e88a4592817a398a054a886c3f3ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 27 Jun 2017 18:10:54 -0700 | ||
4 | Subject: [PATCH] Add ssp_nonshared to link commandline for musl targets | ||
5 | |||
6 | when -fstack-protector options are enabled we need to | ||
7 | link with ssp_shared on musl since it does not provide | ||
8 | the __stack_chk_fail_local() so essentially it provides | ||
9 | libssp but not libssp_nonshared something like | ||
10 | TARGET_LIBC_PROVIDES_SSP_BUT_NOT_SSP_NONSHARED | ||
11 | where-as for glibc the needed symbols | ||
12 | are already present in libc_nonshared library therefore | ||
13 | we do not need any library helper on glibc based systems | ||
14 | but musl needs the libssp_noshared from gcc | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
19 | --- | ||
20 | gcc/config/linux.h | 7 +++++++ | ||
21 | gcc/config/rs6000/linux.h | 10 ++++++++++ | ||
22 | gcc/config/rs6000/linux64.h | 10 ++++++++++ | ||
23 | 3 files changed, 27 insertions(+) | ||
24 | |||
25 | diff --git a/gcc/config/linux.h b/gcc/config/linux.h | ||
26 | index 58143dff731..d2409ccac26 100644 | ||
27 | --- a/gcc/config/linux.h | ||
28 | +++ b/gcc/config/linux.h | ||
29 | @@ -208,6 +208,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | ||
30 | { GCC_INCLUDE_DIRVAR, "GCC", 0, 1, 0, 0 }, \ | ||
31 | { 0, 0, 0, 0, 0, 0 } \ | ||
32 | } | ||
33 | +#ifdef TARGET_LIBC_PROVIDES_SSP | ||
34 | +#undef LINK_SSP_SPEC | ||
35 | +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ | ||
36 | + "|fstack-protector-strong|fstack-protector-explicit" \ | ||
37 | + ":-lssp_nonshared}" | ||
38 | +#endif | ||
39 | + | ||
40 | #endif | ||
41 | |||
42 | #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ | ||
43 | diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h | ||
44 | index 8c9039ac1e5..259cd485973 100644 | ||
45 | --- a/gcc/config/rs6000/linux.h | ||
46 | +++ b/gcc/config/rs6000/linux.h | ||
47 | @@ -99,6 +99,16 @@ | ||
48 | " -m elf32ppclinux") | ||
49 | #endif | ||
50 | |||
51 | +/* link libssp_nonshared.a with musl */ | ||
52 | +#if DEFAULT_LIBC == LIBC_MUSL | ||
53 | +#ifdef TARGET_LIBC_PROVIDES_SSP | ||
54 | +#undef LINK_SSP_SPEC | ||
55 | +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ | ||
56 | + "|fstack-protector-strong|fstack-protector-explicit" \ | ||
57 | + ":-lssp_nonshared}" | ||
58 | +#endif | ||
59 | +#endif | ||
60 | + | ||
61 | #undef LINK_OS_LINUX_SPEC | ||
62 | #define LINK_OS_LINUX_SPEC LINK_OS_LINUX_EMUL " %{!shared: %{!static: \ | ||
63 | %{!static-pie: \ | ||
64 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | ||
65 | index 364c1a5b155..e33d9ae98e0 100644 | ||
66 | --- a/gcc/config/rs6000/linux64.h | ||
67 | +++ b/gcc/config/rs6000/linux64.h | ||
68 | @@ -372,6 +372,16 @@ extern int dot_symbols; | ||
69 | " -m elf64ppc") | ||
70 | #endif | ||
71 | |||
72 | +/* link libssp_nonshared.a with musl */ | ||
73 | +#if DEFAULT_LIBC == LIBC_MUSL | ||
74 | +#ifdef TARGET_LIBC_PROVIDES_SSP | ||
75 | +#undef LINK_SSP_SPEC | ||
76 | +#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ | ||
77 | + "|fstack-protector-strong|fstack-protector-explicit" \ | ||
78 | + ":-lssp_nonshared}" | ||
79 | +#endif | ||
80 | +#endif | ||
81 | + | ||
82 | #define LINK_OS_LINUX_SPEC32 LINK_OS_LINUX_EMUL32 " %{!shared: %{!static: \ | ||
83 | %{!static-pie: \ | ||
84 | %{rdynamic:-export-dynamic} \ | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch deleted file mode 100644 index bb1699be..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From bf0d7c463e1fab62804556099b56319fe94be1eb Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 6 Jun 2018 12:10:22 -0700 | ||
4 | Subject: [PATCH] Re-introduce spe commandline options | ||
5 | |||
6 | This should ensure that we keep accepting | ||
7 | spe options | ||
8 | |||
9 | Upstream-Status: Inappropriate [SPE port is removed from rs600 port] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | gcc/config/rs6000/rs6000.opt | 13 +++++++++++++ | ||
14 | 1 file changed, 13 insertions(+) | ||
15 | |||
16 | diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt | ||
17 | index 4931d781c4e..3fb87b6f7d5 100644 | ||
18 | --- a/gcc/config/rs6000/rs6000.opt | ||
19 | +++ b/gcc/config/rs6000/rs6000.opt | ||
20 | @@ -348,6 +348,19 @@ mdebug= | ||
21 | Target RejectNegative Joined | ||
22 | -mdebug= Enable debug output. | ||
23 | |||
24 | +; PPC SPE ABI | ||
25 | +mspe | ||
26 | +Target Var(rs6000_spe) Save | ||
27 | +Generate SPE SIMD instructions on E500. | ||
28 | + | ||
29 | +mabi=spe | ||
30 | +Target RejectNegative Var(rs6000_spe_abi) Save | ||
31 | +Use the SPE ABI extensions. | ||
32 | + | ||
33 | +mabi=no-spe | ||
34 | +Target RejectNegative Var(rs6000_spe_abi, 0) | ||
35 | +Do not use the SPE ABI extensions. | ||
36 | + | ||
37 | ; Altivec ABI | ||
38 | mabi=altivec | ||
39 | Target RejectNegative Var(rs6000_altivec_abi) Save | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch deleted file mode 100644 index f3709208..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | From a32c75b37209d6836eaaa943dc6b1207acba5d27 Mon Sep 17 00:00:00 2001 | ||
2 | From: Szabolcs Nagy <nsz@port70.net> | ||
3 | Date: Sat, 24 Oct 2015 20:09:53 +0000 | ||
4 | Subject: [PATCH] libgcc_s: Use alias for __cpu_indicator_init instead of | ||
5 | symver | ||
6 | |||
7 | Adapter from | ||
8 | |||
9 | https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00899.html | ||
10 | |||
11 | This fix was debated but hasnt been applied gcc upstream since | ||
12 | they expect musl to support '@' in symbol versioning which is | ||
13 | a sun/gnu versioning extention. This patch however avoids the | ||
14 | need for the '@' symbols at all | ||
15 | |||
16 | libgcc/Changelog: | ||
17 | |||
18 | 2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com> | ||
19 | |||
20 | * config/i386/cpuinfo.c (__cpu_indicator_init_local): Add. | ||
21 | (__cpu_indicator_init@GCC_4.8.0, __cpu_model@GCC_4.8.0): Remove. | ||
22 | |||
23 | * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): Remove -DUSE_ELF_SYMVER. | ||
24 | |||
25 | gcc/Changelog: | ||
26 | |||
27 | 2015-05-11 Szabolcs Nagy <szabolcs.nagy@arm.com> | ||
28 | |||
29 | * config/i386/i386-expand.c (ix86_expand_builtin): Make __builtin_cpu_init | ||
30 | call __cpu_indicator_init_local instead of __cpu_indicator_init. | ||
31 | |||
32 | Upstream-Status: Pending | ||
33 | |||
34 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
35 | --- | ||
36 | gcc/config/i386/i386-expand.cc | 4 ++-- | ||
37 | libgcc/config/i386/cpuinfo.c | 6 +++--- | ||
38 | libgcc/config/i386/t-linux | 2 +- | ||
39 | 3 files changed, 6 insertions(+), 6 deletions(-) | ||
40 | |||
41 | diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc | ||
42 | index 68978ef8dc2..0c71f36b572 100644 | ||
43 | --- a/gcc/config/i386/i386-expand.cc | ||
44 | +++ b/gcc/config/i386/i386-expand.cc | ||
45 | @@ -12321,10 +12321,10 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, | ||
46 | { | ||
47 | case IX86_BUILTIN_CPU_INIT: | ||
48 | { | ||
49 | - /* Make it call __cpu_indicator_init in libgcc. */ | ||
50 | + /* Make it call __cpu_indicator_init_local in libgcc.a. */ | ||
51 | tree call_expr, fndecl, type; | ||
52 | type = build_function_type_list (integer_type_node, NULL_TREE); | ||
53 | - fndecl = build_fn_decl ("__cpu_indicator_init", type); | ||
54 | + fndecl = build_fn_decl ("__cpu_indicator_init_local", type); | ||
55 | call_expr = build_call_expr (fndecl, 0); | ||
56 | return expand_expr (call_expr, target, mode, EXPAND_NORMAL); | ||
57 | } | ||
58 | diff --git a/libgcc/config/i386/cpuinfo.c b/libgcc/config/i386/cpuinfo.c | ||
59 | index dab1d98060f..cf824b4114a 100644 | ||
60 | --- a/libgcc/config/i386/cpuinfo.c | ||
61 | +++ b/libgcc/config/i386/cpuinfo.c | ||
62 | @@ -63,7 +63,7 @@ __cpu_indicator_init (void) | ||
63 | __cpu_features2); | ||
64 | } | ||
65 | |||
66 | -#if defined SHARED && defined USE_ELF_SYMVER | ||
67 | -__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); | ||
68 | -__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); | ||
69 | +#ifndef SHARED | ||
70 | +int __cpu_indicator_init_local (void) | ||
71 | + __attribute__ ((weak, alias ("__cpu_indicator_init"))); | ||
72 | #endif | ||
73 | diff --git a/libgcc/config/i386/t-linux b/libgcc/config/i386/t-linux | ||
74 | index 8506a635790..564296f788e 100644 | ||
75 | --- a/libgcc/config/i386/t-linux | ||
76 | +++ b/libgcc/config/i386/t-linux | ||
77 | @@ -3,5 +3,5 @@ | ||
78 | # t-slibgcc-elf-ver and t-linux | ||
79 | SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/i386/libgcc-glibc.ver | ||
80 | |||
81 | -HOST_LIBGCC2_CFLAGS += -mlong-double-80 -DUSE_ELF_SYMVER $(CET_FLAGS) | ||
82 | +HOST_LIBGCC2_CFLAGS += -mlong-double-80 $(CET_FLAGS) | ||
83 | CRTSTUFF_T_CFLAGS += $(CET_FLAGS) | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch deleted file mode 100644 index f5f04ae3..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch +++ /dev/null | |||
@@ -1,182 +0,0 @@ | |||
1 | From 4efc42b99c96b026f560b0918de7e237ac3dc8d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Tue, 10 Mar 2020 08:26:53 -0700 | ||
4 | Subject: [PATCH] gentypes/genmodes: Do not use __LINE__ for maintaining | ||
5 | reproducibility | ||
6 | |||
7 | Inserting line numbers into generated code means its not always reproducible wth | ||
8 | differing versions of host gcc. Void the issue by not adding these. | ||
9 | |||
10 | Upstream-Status: Inappropriate [OE Reproducibility specific] | ||
11 | |||
12 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | gcc/gengtype.cc | 6 +++--- | ||
16 | gcc/genmodes.cc | 32 ++++++++++++++++---------------- | ||
17 | 2 files changed, 19 insertions(+), 19 deletions(-) | ||
18 | |||
19 | diff --git a/gcc/gengtype.cc b/gcc/gengtype.cc | ||
20 | index 386ae1b0506..9762e914296 100644 | ||
21 | --- a/gcc/gengtype.cc | ||
22 | +++ b/gcc/gengtype.cc | ||
23 | @@ -1006,7 +1006,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt, | ||
24 | /* Create a fake field with the given type and name. NEXT is the next | ||
25 | field in the chain. */ | ||
26 | #define create_field(next,type,name) \ | ||
27 | - create_field_all (next,type,name, 0, this_file, __LINE__) | ||
28 | + create_field_all (next,type,name, 0, this_file, 0) | ||
29 | |||
30 | /* Like create_field, but the field is only valid when condition COND | ||
31 | is true. */ | ||
32 | @@ -1039,7 +1039,7 @@ create_optional_field_ (pair_p next, type_p type, const char *name, | ||
33 | } | ||
34 | |||
35 | #define create_optional_field(next,type,name,cond) \ | ||
36 | - create_optional_field_(next,type,name,cond,__LINE__) | ||
37 | + create_optional_field_(next,type,name,cond,0) | ||
38 | |||
39 | /* Reverse a linked list of 'struct pair's in place. */ | ||
40 | pair_p | ||
41 | @@ -5238,7 +5238,7 @@ main (int argc, char **argv) | ||
42 | /* These types are set up with #define or else outside of where | ||
43 | we can see them. We should initialize them before calling | ||
44 | read_input_list. */ | ||
45 | -#define POS_HERE(Call) do { pos.file = this_file; pos.line = __LINE__; \ | ||
46 | +#define POS_HERE(Call) do { pos.file = this_file; pos.line = 0; \ | ||
47 | Call;} while (0) | ||
48 | POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos)); | ||
49 | POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos)); | ||
50 | diff --git a/gcc/genmodes.cc b/gcc/genmodes.cc | ||
51 | index 59850bb070a..e187f8542a1 100644 | ||
52 | --- a/gcc/genmodes.cc | ||
53 | +++ b/gcc/genmodes.cc | ||
54 | @@ -440,7 +440,7 @@ complete_all_modes (void) | ||
55 | } | ||
56 | |||
57 | /* For each mode in class CLASS, construct a corresponding complex mode. */ | ||
58 | -#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, __LINE__) | ||
59 | +#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, 0) | ||
60 | static void | ||
61 | make_complex_modes (enum mode_class cl, | ||
62 | const char *file, unsigned int line) | ||
63 | @@ -499,7 +499,7 @@ make_complex_modes (enum mode_class cl, | ||
64 | having as many components as necessary. ORDER is the sorting order | ||
65 | of the mode, with smaller numbers indicating a higher priority. */ | ||
66 | #define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W, ORDER) \ | ||
67 | - make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, __LINE__) | ||
68 | + make_vector_modes (MODE_##C, #PREFIX, W, ORDER, __FILE__, 0) | ||
69 | #define VECTOR_MODES(C, W) VECTOR_MODES_WITH_PREFIX (V, C, W, 0) | ||
70 | static void ATTRIBUTE_UNUSED | ||
71 | make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width, | ||
72 | @@ -552,7 +552,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width, | ||
73 | BYTESIZE bytes in total. */ | ||
74 | #define VECTOR_BOOL_MODE(NAME, COUNT, COMPONENT, BYTESIZE) \ | ||
75 | make_vector_bool_mode (#NAME, COUNT, #COMPONENT, BYTESIZE, \ | ||
76 | - __FILE__, __LINE__) | ||
77 | + __FILE__, 0) | ||
78 | static void ATTRIBUTE_UNUSED | ||
79 | make_vector_bool_mode (const char *name, unsigned int count, | ||
80 | const char *component, unsigned int bytesize, | ||
81 | @@ -574,7 +574,7 @@ make_vector_bool_mode (const char *name, unsigned int count, | ||
82 | /* Input. */ | ||
83 | |||
84 | #define _SPECIAL_MODE(C, N) \ | ||
85 | - make_special_mode (MODE_##C, #N, __FILE__, __LINE__) | ||
86 | + make_special_mode (MODE_##C, #N, __FILE__, 0) | ||
87 | #define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N) | ||
88 | #define CC_MODE(N) _SPECIAL_MODE (CC, N) | ||
89 | |||
90 | @@ -587,7 +587,7 @@ make_special_mode (enum mode_class cl, const char *name, | ||
91 | |||
92 | #define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y) | ||
93 | #define FRACTIONAL_INT_MODE(N, B, Y) \ | ||
94 | - make_int_mode (#N, B, Y, __FILE__, __LINE__) | ||
95 | + make_int_mode (#N, B, Y, __FILE__, 0) | ||
96 | |||
97 | static void | ||
98 | make_int_mode (const char *name, | ||
99 | @@ -628,16 +628,16 @@ make_opaque_mode (const char *name, | ||
100 | } | ||
101 | |||
102 | #define FRACT_MODE(N, Y, F) \ | ||
103 | - make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__) | ||
104 | + make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, 0) | ||
105 | |||
106 | #define UFRACT_MODE(N, Y, F) \ | ||
107 | - make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__) | ||
108 | + make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, 0) | ||
109 | |||
110 | #define ACCUM_MODE(N, Y, I, F) \ | ||
111 | - make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__) | ||
112 | + make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, 0) | ||
113 | |||
114 | #define UACCUM_MODE(N, Y, I, F) \ | ||
115 | - make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__) | ||
116 | + make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, 0) | ||
117 | |||
118 | /* Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT, | ||
119 | FILE, and LINE. */ | ||
120 | @@ -658,7 +658,7 @@ make_fixed_point_mode (enum mode_class cl, | ||
121 | |||
122 | #define FLOAT_MODE(N, Y, F) FRACTIONAL_FLOAT_MODE (N, -1U, Y, F) | ||
123 | #define FRACTIONAL_FLOAT_MODE(N, B, Y, F) \ | ||
124 | - make_float_mode (#N, B, Y, #F, __FILE__, __LINE__) | ||
125 | + make_float_mode (#N, B, Y, #F, __FILE__, 0) | ||
126 | |||
127 | static void | ||
128 | make_float_mode (const char *name, | ||
129 | @@ -675,7 +675,7 @@ make_float_mode (const char *name, | ||
130 | #define DECIMAL_FLOAT_MODE(N, Y, F) \ | ||
131 | FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F) | ||
132 | #define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) \ | ||
133 | - make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__) | ||
134 | + make_decimal_float_mode (#N, B, Y, #F, __FILE__, 0) | ||
135 | |||
136 | static void | ||
137 | make_decimal_float_mode (const char *name, | ||
138 | @@ -690,7 +690,7 @@ make_decimal_float_mode (const char *name, | ||
139 | } | ||
140 | |||
141 | #define RESET_FLOAT_FORMAT(N, F) \ | ||
142 | - reset_float_format (#N, #F, __FILE__, __LINE__) | ||
143 | + reset_float_format (#N, #F, __FILE__, 0) | ||
144 | static void ATTRIBUTE_UNUSED | ||
145 | reset_float_format (const char *name, const char *format, | ||
146 | const char *file, unsigned int line) | ||
147 | @@ -711,7 +711,7 @@ reset_float_format (const char *name, const char *format, | ||
148 | |||
149 | /* __intN support. */ | ||
150 | #define INT_N(M,PREC) \ | ||
151 | - make_int_n (#M, PREC, __FILE__, __LINE__) | ||
152 | + make_int_n (#M, PREC, __FILE__, 0) | ||
153 | static void ATTRIBUTE_UNUSED | ||
154 | make_int_n (const char *m, int bitsize, | ||
155 | const char *file, unsigned int line) | ||
156 | @@ -740,7 +740,7 @@ make_int_n (const char *m, int bitsize, | ||
157 | /* Partial integer modes are specified by relation to a full integer | ||
158 | mode. */ | ||
159 | #define PARTIAL_INT_MODE(M,PREC,NAME) \ | ||
160 | - make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__) | ||
161 | + make_partial_integer_mode (#M, #NAME, PREC, __FILE__, 0) | ||
162 | static void ATTRIBUTE_UNUSED | ||
163 | make_partial_integer_mode (const char *base, const char *name, | ||
164 | unsigned int precision, | ||
165 | @@ -767,7 +767,7 @@ make_partial_integer_mode (const char *base, const char *name, | ||
166 | /* A single vector mode can be specified by naming its component | ||
167 | mode and the number of components. */ | ||
168 | #define VECTOR_MODE_WITH_PREFIX(PREFIX, C, M, N, ORDER) \ | ||
169 | - make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, __LINE__); | ||
170 | + make_vector_mode (MODE_##C, #PREFIX, #M, N, ORDER, __FILE__, 0); | ||
171 | #define VECTOR_MODE(C, M, N) VECTOR_MODE_WITH_PREFIX(V, C, M, N, 0); | ||
172 | static void ATTRIBUTE_UNUSED | ||
173 | make_vector_mode (enum mode_class bclass, | ||
174 | @@ -814,7 +814,7 @@ make_vector_mode (enum mode_class bclass, | ||
175 | |||
176 | /* Adjustability. */ | ||
177 | #define _ADD_ADJUST(A, M, X, C1, C2) \ | ||
178 | - new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__) | ||
179 | + new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, 0) | ||
180 | |||
181 | #define ADJUST_NUNITS(M, X) _ADD_ADJUST (nunits, M, X, RANDOM, RANDOM) | ||
182 | #define ADJUST_BYTESIZE(M, X) _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM) | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch deleted file mode 100644 index cb8969b1..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From c3870d073eb9e5d82f9d3067d0fa15038b69713a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 13 May 2020 15:10:38 -0700 | ||
4 | Subject: [PATCH] libatomic: Do not enforce march on aarch64 | ||
5 | |||
6 | OE passes the right options via gcc compiler cmdline via TUNE_CCARGS | ||
7 | this can conflict between -mcpu settings and -march setting here, since | ||
8 | -mcpu will translate into an appropriate -march, lets depend on that | ||
9 | instead of setting it explicitly | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE-Specific] | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | libatomic/Makefile.am | 1 - | ||
16 | libatomic/Makefile.in | 1 - | ||
17 | 2 files changed, 2 deletions(-) | ||
18 | |||
19 | diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am | ||
20 | index c6c8d81c56a..d959a5d040e 100644 | ||
21 | --- a/libatomic/Makefile.am | ||
22 | +++ b/libatomic/Makefile.am | ||
23 | @@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) | ||
24 | ## On a target-specific basis, include alternates to be selected by IFUNC. | ||
25 | if HAVE_IFUNC | ||
26 | if ARCH_AARCH64_LINUX | ||
27 | -IFUNC_OPTIONS = -march=armv8-a+lse | ||
28 | libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) | ||
29 | libatomic_la_SOURCES += atomic_16.S | ||
30 | |||
31 | diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in | ||
32 | index a0fa3dfc8cc..e70d389874a 100644 | ||
33 | --- a/libatomic/Makefile.in | ||
34 | +++ b/libatomic/Makefile.in | ||
35 | @@ -447,7 +447,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) | ||
36 | libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ | ||
37 | _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_3) \ | ||
38 | $(am__append_4) $(am__append_5) | ||
39 | -@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse | ||
40 | @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 | ||
41 | @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 | ||
42 | @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch deleted file mode 100644 index 11f42c59..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 7bd6e631e4a5273f5ecc41a5a48830a1342e5926 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
3 | Date: Wed, 22 Dec 2021 12:49:25 +0100 | ||
4 | Subject: [PATCH] Fix install path of linux64.h | ||
5 | |||
6 | We add linux64.h to tm includes[1] as a relative path to B. This patch | ||
7 | adapts the install path of linux64.h to match the include in tm.h. | ||
8 | |||
9 | [1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch | ||
10 | |||
11 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
12 | |||
13 | Upstream-Status: Inappropriate [configuration] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | gcc/Makefile.in | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
20 | index 065ce7e9a5b..d4c723968aa 100644 | ||
21 | --- a/gcc/Makefile.in | ||
22 | +++ b/gcc/Makefile.in | ||
23 | @@ -3738,6 +3738,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype | ||
24 | "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ | ||
25 | | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ | ||
26 | base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ | ||
27 | + */linux64.h ) \ | ||
28 | + base=`dirname $$path`;;\ | ||
29 | *) base=`basename $$path` ;; \ | ||
30 | esac; \ | ||
31 | dest=$(plugin_includedir)/$$base; \ | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch deleted file mode 100644 index 2f016598..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 52931ec7a708b58d68e69ce9eb99001ae9f099dd Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 13 May 2020 15:10:38 -0700 | ||
4 | Subject: [PATCH] libatomic: Do not enforce march on aarch64 | ||
5 | |||
6 | OE passes the right options via gcc compiler cmdline via TUNE_CCARGS | ||
7 | this can conflict between -mcpu settings and -march setting here, since | ||
8 | -mcpu will translate into an appropriate -march, lets depend on that | ||
9 | instead of setting it explicitly | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE-Specific] | ||
12 | |||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | libatomic/Makefile.am | 1 - | ||
16 | libatomic/Makefile.in | 1 - | ||
17 | 2 files changed, 2 deletions(-) | ||
18 | |||
19 | diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am | ||
20 | index d88515e4a03..e0e2f8b442a 100644 | ||
21 | --- a/libatomic/Makefile.am | ||
22 | +++ b/libatomic/Makefile.am | ||
23 | @@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) | ||
24 | ## On a target-specific basis, include alternates to be selected by IFUNC. | ||
25 | if HAVE_IFUNC | ||
26 | if ARCH_AARCH64_LINUX | ||
27 | -IFUNC_OPTIONS = -march=armv8-a+lse | ||
28 | libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) | ||
29 | endif | ||
30 | if ARCH_ARM_LINUX | ||
31 | diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in | ||
32 | index 80d25653dc7..7377689ab34 100644 | ||
33 | --- a/libatomic/Makefile.in | ||
34 | +++ b/libatomic/Makefile.in | ||
35 | @@ -434,7 +434,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) | ||
36 | libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ | ||
37 | _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ | ||
38 | $(am__append_3) $(am__append_4) | ||
39 | -@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse | ||
40 | @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 | ||
41 | @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 | ||
42 | @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 -mcx16 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch deleted file mode 100644 index ad826901..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 4623d87d779853a2862ee92a15a41fded81eddb8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Sat, 20 Aug 2022 09:04:14 -0700 | ||
4 | Subject: [PATCH] Avoid hardcoded build paths into ppc libgcc | ||
5 | |||
6 | Avoid encoding build paths into sources used for floating point on powerpc. | ||
7 | (MACHINE=qemuppc bitbake libgcc). | ||
8 | |||
9 | Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html] | ||
10 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | libgcc/config/rs6000/t-float128 | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/libgcc/config/rs6000/t-float128 b/libgcc/config/rs6000/t-float128 | ||
17 | index b09b5664af0..513e63748f1 100644 | ||
18 | --- a/libgcc/config/rs6000/t-float128 | ||
19 | +++ b/libgcc/config/rs6000/t-float128 | ||
20 | @@ -103,7 +103,7 @@ $(ibm128_dec_objs) : INTERNAL_CFLAGS += $(IBM128_CFLAGS_DECIMAL) | ||
21 | $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep) | ||
22 | @src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \ | ||
23 | echo "Create $@"; \ | ||
24 | - (echo "/* file created from $$src */"; \ | ||
25 | + (echo "/* file created from `basename $$src` */"; \ | ||
26 | echo; \ | ||
27 | sed -f $(fp128_sed) < $$src) > $@ | ||
28 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch deleted file mode 100644 index 555be623..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 3e67c9c77e46132c252911bf1e5e4222dfd3aa34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
3 | Date: Wed, 22 Dec 2021 12:49:25 +0100 | ||
4 | Subject: [PATCH] Fix install path of linux64.h | ||
5 | |||
6 | We add linux64.h to tm includes[1] as a relative path to B. This patch | ||
7 | adapts the install path of linux64.h to match the include in tm.h. | ||
8 | |||
9 | [1] 0016-Use-the-multilib-config-files-from-B-instead-of-usin.patch | ||
10 | |||
11 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
12 | |||
13 | Upstream-Status: Inappropriate [configuration] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | gcc/Makefile.in | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/gcc/Makefile.in b/gcc/Makefile.in | ||
20 | index 07fa63b6640..0def7394454 100644 | ||
21 | --- a/gcc/Makefile.in | ||
22 | +++ b/gcc/Makefile.in | ||
23 | @@ -3706,6 +3706,8 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype | ||
24 | "$(srcdir)"/config/* | "$(srcdir)"/common/config/* \ | ||
25 | | "$(srcdir)"/c-family/* | "$(srcdir)"/*.def ) \ | ||
26 | base=`echo "$$path" | sed -e "s|$$srcdirstrip/||"`;; \ | ||
27 | + */linux64.h ) \ | ||
28 | + base=`dirname $$path`;;\ | ||
29 | *) base=`basename $$path` ;; \ | ||
30 | esac; \ | ||
31 | dest=$(plugin_includedir)/$$base; \ | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch b/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch deleted file mode 100644 index bbe2f18f..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | From 9234cdca6ee88badfc00297e72f13dac4e540c79 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Clifton <nickc@redhat.com> | ||
3 | Date: Fri, 1 Jul 2022 15:58:52 +0100 | ||
4 | Subject: [PATCH] Add a recursion limit to the demangle_const function in the | ||
5 | Rust demangler. | ||
6 | |||
7 | libiberty/ | ||
8 | PR demangler/105039 | ||
9 | * rust-demangle.c (demangle_const): Add recursion limit. | ||
10 | |||
11 | Upstream-Status: Backport [https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=9234cdca6ee88badfc00297e72f13dac4e540c79] | ||
12 | --- | ||
13 | libiberty/rust-demangle.c | 29 ++++++++++++++++++++--------- | ||
14 | 1 file changed, 20 insertions(+), 9 deletions(-) | ||
15 | |||
16 | diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c | ||
17 | index bb58d900e27..36afcfae278 100644 | ||
18 | --- a/libiberty/rust-demangle.c | ||
19 | +++ b/libiberty/rust-demangle.c | ||
20 | @@ -126,7 +126,7 @@ parse_integer_62 (struct rust_demangler *rdm) | ||
21 | return 0; | ||
22 | |||
23 | x = 0; | ||
24 | - while (!eat (rdm, '_')) | ||
25 | + while (!eat (rdm, '_') && !rdm->errored) | ||
26 | { | ||
27 | c = next (rdm); | ||
28 | x *= 62; | ||
29 | @@ -1148,6 +1148,15 @@ demangle_const (struct rust_demangler *rdm) | ||
30 | if (rdm->errored) | ||
31 | return; | ||
32 | |||
33 | + if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ||
34 | + { | ||
35 | + ++ rdm->recursion; | ||
36 | + if (rdm->recursion > RUST_MAX_RECURSION_COUNT) | ||
37 | + /* FIXME: There ought to be a way to report | ||
38 | + that the recursion limit has been reached. */ | ||
39 | + goto fail_return; | ||
40 | + } | ||
41 | + | ||
42 | if (eat (rdm, 'B')) | ||
43 | { | ||
44 | backref = parse_integer_62 (rdm); | ||
45 | @@ -1158,7 +1167,7 @@ demangle_const (struct rust_demangler *rdm) | ||
46 | demangle_const (rdm); | ||
47 | rdm->next = old_next; | ||
48 | } | ||
49 | - return; | ||
50 | + goto pass_return; | ||
51 | } | ||
52 | |||
53 | ty_tag = next (rdm); | ||
54 | @@ -1167,7 +1176,7 @@ demangle_const (struct rust_demangler *rdm) | ||
55 | /* Placeholder. */ | ||
56 | case 'p': | ||
57 | PRINT ("_"); | ||
58 | - return; | ||
59 | + goto pass_return; | ||
60 | |||
61 | /* Unsigned integer types. */ | ||
62 | case 'h': | ||
63 | @@ -1200,18 +1209,20 @@ demangle_const (struct rust_demangler *rdm) | ||
64 | break; | ||
65 | |||
66 | default: | ||
67 | - rdm->errored = 1; | ||
68 | - return; | ||
69 | + goto fail_return; | ||
70 | } | ||
71 | |||
72 | - if (rdm->errored) | ||
73 | - return; | ||
74 | - | ||
75 | - if (rdm->verbose) | ||
76 | + if (!rdm->errored && rdm->verbose) | ||
77 | { | ||
78 | PRINT (": "); | ||
79 | PRINT (basic_type (ty_tag)); | ||
80 | } | ||
81 | + | ||
82 | + fail_return: | ||
83 | + rdm->errored = 1; | ||
84 | + pass_return: | ||
85 | + if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ||
86 | + -- rdm->recursion; | ||
87 | } | ||
88 | |||
89 | static void | ||
90 | -- | ||
91 | 2.31.1 | ||
92 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch b/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch deleted file mode 100644 index f3485858..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Avoid encoding build paths into sources used for floating point on powerpc. | ||
2 | (MACHINE=qemuppc bitbake libgcc). | ||
3 | |||
4 | Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599882.html] | ||
5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
6 | |||
7 | Index: gcc-12.1.0/libgcc/config/rs6000/t-float128 | ||
8 | =================================================================== | ||
9 | --- gcc-12.1.0.orig/libgcc/config/rs6000/t-float128 | ||
10 | +++ gcc-12.1.0/libgcc/config/rs6000/t-float128 | ||
11 | @@ -103,7 +103,7 @@ $(ibm128_dec_objs) : INTERNAL_CFLAGS += | ||
12 | $(fp128_softfp_src) : $(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@)) $(fp128_dep) | ||
13 | @src="$(srcdir)/soft-fp/$(subst -sw,,$(subst kf,tf,$@))"; \ | ||
14 | echo "Create $@"; \ | ||
15 | - (echo "/* file created from $$src */"; \ | ||
16 | + (echo "/* file created from `basename $$src` */"; \ | ||
17 | echo; \ | ||
18 | sed -f $(fp128_sed) < $$src) > $@ | ||
19 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch b/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch deleted file mode 100644 index 7f1a2dee..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | Relative paths don't work with -fdebug-prefix-map and friends. This | ||
2 | can lead to paths which the user wanted to be remapped being missed. | ||
3 | Setting -fdebug-prefix-map to work with a relative path isn't practical | ||
4 | either. | ||
5 | |||
6 | Instead, call gcc's realpath function on the incomming path name before | ||
7 | comparing it with the remapping. This means other issues like symlinks | ||
8 | are also accounted for and leads to a more consistent remapping experience. | ||
9 | |||
10 | Upstream-Status: Submitted [https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599885.html] | ||
11 | [Also https://gcc.gnu.org/pipermail/gcc-patches/2022-August/599884.html] | ||
12 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
13 | |||
14 | |||
15 | Index: gcc-12.1.0/gcc/file-prefix-map.cc | ||
16 | =================================================================== | ||
17 | --- gcc-12.1.0.orig/gcc/file-prefix-map.cc | ||
18 | +++ gcc-12.1.0/gcc/file-prefix-map.cc | ||
19 | @@ -70,19 +70,28 @@ remap_filename (file_prefix_map *maps, c | ||
20 | file_prefix_map *map; | ||
21 | char *s; | ||
22 | const char *name; | ||
23 | + char *realname; | ||
24 | size_t name_len; | ||
25 | |||
26 | + if (lbasename (filename) == filename) | ||
27 | + return filename; | ||
28 | + | ||
29 | + realname = lrealpath (filename); | ||
30 | + | ||
31 | for (map = maps; map; map = map->next) | ||
32 | - if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) | ||
33 | + if (filename_ncmp (realname, map->old_prefix, map->old_len) == 0) | ||
34 | break; | ||
35 | - if (!map) | ||
36 | + if (!map) { | ||
37 | + free (realname); | ||
38 | return filename; | ||
39 | - name = filename + map->old_len; | ||
40 | + } | ||
41 | + name = realname + map->old_len; | ||
42 | name_len = strlen (name) + 1; | ||
43 | |||
44 | s = (char *) ggc_alloc_atomic (name_len + map->new_len); | ||
45 | memcpy (s, map->new_prefix, map->new_len); | ||
46 | memcpy (s + map->new_len, name, name_len); | ||
47 | + free (realname); | ||
48 | return s; | ||
49 | } | ||
50 | |||
51 | Index: gcc-12.1.0/libcpp/macro.cc | ||
52 | =================================================================== | ||
53 | --- gcc-12.1.0.orig/libcpp/macro.cc | ||
54 | +++ gcc-12.1.0/libcpp/macro.cc | ||
55 | @@ -563,7 +563,7 @@ _cpp_builtin_macro_text (cpp_reader *pfi | ||
56 | if (!name) | ||
57 | abort (); | ||
58 | } | ||
59 | - if (pfile->cb.remap_filename) | ||
60 | + if (pfile->cb.remap_filename && !pfile->state.in_directive) | ||
61 | name = pfile->cb.remap_filename (name); | ||
62 | len = strlen (name); | ||
63 | buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb deleted file mode 100644 index c1996ab1..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require gcc-target.inc | ||
3 | |||
4 | # Building with thumb enabled on armv4t armv5t fails with | ||
5 | # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs | ||
6 | # | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output | ||
7 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
8 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
9 | |||
10 | ARMFPARCHEXT:armv6 = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" | ||
11 | ARMFPARCHEXT:armv7a = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" | ||
12 | ARMFPARCHEXT:armv7ve = "${@'+fp' if d.getVar('TARGET_FPU') == 'hard' else ''}" | ||
13 | |||
14 | #BBCLASSEXTEND = "nativesdk" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc b/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc deleted file mode 100644 index ac0a5a7b..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | BPN = "libgcc" | ||
2 | |||
3 | require gcc-configure-common.inc | ||
4 | |||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | |||
7 | do_configure () { | ||
8 | install -d ${D}${base_libdir} ${D}${libdir} | ||
9 | mkdir -p ${B}/${BPN} | ||
10 | mkdir -p ${B}/${TARGET_SYS}/${BPN}/ | ||
11 | cd ${B}/${BPN} | ||
12 | chmod a+x ${S}/${BPN}/configure | ||
13 | ${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
14 | } | ||
15 | EXTRACONFFUNCS += "extract_stashed_builddir" | ||
16 | do_configure[depends] += "${COMPILERDEP}" | ||
17 | |||
18 | do_compile () { | ||
19 | cd ${B}/${BPN} | ||
20 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ | ||
21 | } | ||
22 | |||
23 | do_install () { | ||
24 | cd ${B}/${BPN} | ||
25 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ install | ||
26 | |||
27 | # Move libgcc_s into /lib | ||
28 | mkdir -p ${D}${base_libdir} | ||
29 | if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then | ||
30 | mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir} | ||
31 | else | ||
32 | mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true | ||
33 | fi | ||
34 | |||
35 | # install the runtime in /usr/lib/ not in /usr/lib/gcc on target | ||
36 | # so that cross-gcc can find it in the sysroot | ||
37 | |||
38 | mv ${D}${libdir}/gcc/* ${D}${libdir} | ||
39 | rm -rf ${D}${libdir}/gcc/ | ||
40 | # unwind.h is installed here which is shipped in gcc-cross | ||
41 | # as well as target gcc and they are identical so we dont | ||
42 | # ship one with libgcc here | ||
43 | rm -rf ${D}${libdir}/${TARGET_SYS}/${BINV}/include | ||
44 | } | ||
45 | |||
46 | do_install:append:libc-baremetal () { | ||
47 | if [ "${base_libdir}" != "${libdir}" ]; then | ||
48 | rmdir ${D}${base_libdir} | ||
49 | fi | ||
50 | } | ||
51 | do_install:append:libc-newlib () { | ||
52 | if [ "${base_libdir}" != "${libdir}" ]; then | ||
53 | rmdir ${D}${base_libdir} | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | # No rpm package is actually created but -dev depends on it, avoid dnf error | ||
58 | DEV_PKG_DEPENDENCY:libc-baremetal = "" | ||
59 | DEV_PKG_DEPENDENCY:libc-newlib = "" | ||
60 | |||
61 | #BBCLASSEXTEND = "nativesdk" | ||
62 | |||
63 | addtask multilib_install after do_install before do_package do_populate_sysroot | ||
64 | # this makes multilib gcc files findable for target gcc | ||
65 | # e.g. | ||
66 | # /usr/lib/i586-pokymllib32-linux/4.7/ | ||
67 | # by creating this symlink to it | ||
68 | # /usr/lib64/x86_64-poky-linux/4.7/32 | ||
69 | |||
70 | fakeroot python do_multilib_install() { | ||
71 | import re | ||
72 | |||
73 | multilibs = d.getVar('MULTILIB_VARIANTS') | ||
74 | if not multilibs or bb.data.inherits_class('nativesdk', d): | ||
75 | return | ||
76 | |||
77 | binv = d.getVar('BINV') | ||
78 | |||
79 | mlprefix = d.getVar('MLPREFIX') | ||
80 | if ('%slibgcc' % mlprefix) != d.getVar('PN'): | ||
81 | return | ||
82 | |||
83 | if mlprefix: | ||
84 | orig_tune = d.getVar('DEFAULTTUNE_MULTILIB_ORIGINAL') | ||
85 | orig_tune_params = get_tune_parameters(orig_tune, d) | ||
86 | orig_tune_baselib = orig_tune_params['baselib'] | ||
87 | orig_tune_bitness = orig_tune_baselib.replace('lib', '') | ||
88 | if not orig_tune_bitness: | ||
89 | orig_tune_bitness = '32' | ||
90 | |||
91 | src = '../../../' + orig_tune_baselib + '/' + \ | ||
92 | d.getVar('TARGET_SYS_MULTILIB_ORIGINAL') + '/' + binv + '/' | ||
93 | |||
94 | dest = d.getVar('D') + d.getVar('libdir') + '/' + \ | ||
95 | d.getVar('TARGET_SYS') + '/' + binv + '/' + orig_tune_bitness | ||
96 | |||
97 | if os.path.lexists(dest): | ||
98 | os.unlink(dest) | ||
99 | os.symlink(src, dest) | ||
100 | return | ||
101 | |||
102 | |||
103 | for ml in multilibs.split(): | ||
104 | tune = d.getVar('DEFAULTTUNE:virtclass-multilib-' + ml) | ||
105 | if not tune: | ||
106 | bb.warn('DEFAULTTUNE:virtclass-multilib-%s is not defined. Skipping...' % ml) | ||
107 | continue | ||
108 | |||
109 | tune_parameters = get_tune_parameters(tune, d) | ||
110 | tune_baselib = tune_parameters['baselib'] | ||
111 | if not tune_baselib: | ||
112 | bb.warn("Tune %s doesn't have a baselib set. Skipping..." % tune) | ||
113 | continue | ||
114 | |||
115 | tune_arch = tune_parameters['arch'] | ||
116 | tune_bitness = tune_baselib.replace('lib', '') | ||
117 | if not tune_bitness: | ||
118 | tune_bitness = '32' # /lib => 32bit lib | ||
119 | |||
120 | tune_abiextension = tune_parameters['abiextension'] | ||
121 | if tune_abiextension: | ||
122 | libcextension = '-gnu' + tune_abiextension | ||
123 | else: | ||
124 | libcextension = '' | ||
125 | |||
126 | src = '../../../' + tune_baselib + '/' + \ | ||
127 | tune_arch + d.getVar('TARGET_VENDOR') + 'ml' + ml + \ | ||
128 | '-' + d.getVar('TARGET_OS') + libcextension + '/' + binv + '/' | ||
129 | |||
130 | dest = d.getVar('D') + d.getVar('libdir') + '/' + \ | ||
131 | d.getVar('TARGET_SYS') + '/' + binv + '/' + tune_bitness | ||
132 | |||
133 | if os.path.lexists(dest): | ||
134 | os.unlink(dest) | ||
135 | os.symlink(src, dest) | ||
136 | } | ||
137 | |||
138 | def get_original_os(d): | ||
139 | vendoros = d.expand('${TARGET_ARCH}${ORIG_TARGET_VENDOR}-${TARGET_OS}') | ||
140 | for suffix in [d.getVar('ABIEXTENSION'), d.getVar('LIBCEXTENSION')]: | ||
141 | if suffix and vendoros.endswith(suffix): | ||
142 | vendoros = vendoros[:-len(suffix)] | ||
143 | # Arm must use linux-gnueabi not linux as only the former is accepted by gcc | ||
144 | if vendoros.startswith("arm-") and not vendoros.endswith("-gnueabi"): | ||
145 | vendoros = vendoros + "-gnueabi" | ||
146 | return vendoros | ||
147 | |||
148 | ORIG_TARGET_VENDOR := "${TARGET_VENDOR}" | ||
149 | BASETARGET_SYS = "${@get_original_os(d)}" | ||
150 | |||
151 | addtask extra_symlinks after do_multilib_install before do_package do_populate_sysroot | ||
152 | fakeroot python do_extra_symlinks() { | ||
153 | if bb.data.inherits_class('nativesdk', d): | ||
154 | return | ||
155 | |||
156 | targetsys = d.getVar('BASETARGET_SYS') | ||
157 | |||
158 | if targetsys != d.getVar('TARGET_SYS'): | ||
159 | dest = d.getVar('D') + d.getVar('libdir') + '/' + targetsys | ||
160 | src = d.getVar('TARGET_SYS') | ||
161 | if not os.path.lexists(dest) and os.path.lexists(d.getVar('D') + d.getVar('libdir')): | ||
162 | os.symlink(src, dest) | ||
163 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc b/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc deleted file mode 100644 index 8251e3c2..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | # | ||
2 | # Notes on the way the OE cross toolchain now works | ||
3 | # | ||
4 | # We need a libgcc to build glibc. Tranditionally we therefore built | ||
5 | # a non-threaded and non-shared compiler (gcc-cross-initial), then use | ||
6 | # that to build libgcc-initial which is used to build glibc which we can | ||
7 | # then build gcc-cross and libgcc against. | ||
8 | # | ||
9 | # We were able to drop the glibc dependency from gcc-cross, with two tweaks: | ||
10 | |||
11 | # a) specify the minimum glibc version to support in a configure option | ||
12 | # b) create a dummy limits.h file so that later when glibc creates one, | ||
13 | # the headers structure has support for it. We can do this with a simple | ||
14 | # empty file | ||
15 | # | ||
16 | # Once gcc-cross is libc independent, we can use it to build both | ||
17 | # libgcc-initial and then later libgcc. | ||
18 | # | ||
19 | # libgcc-initial is tricky as we need to imitate the non-threaded and | ||
20 | # non-shared case. We can do that by hacking the threading mode back to | ||
21 | # "single" even if gcc reports "posix" and disable libc presence for the | ||
22 | # libgcc-intial build. We have to create the dummy limits.h to avoid | ||
23 | # compiler errors from a missing header. | ||
24 | # | ||
25 | # glibc will fail to link with libgcc-initial due to a missing "exception | ||
26 | # handler" capable libgcc (libgcc_eh.a). Since we know glibc doesn't need | ||
27 | # any exception handler, we can safely symlink to libgcc.a. | ||
28 | # | ||
29 | |||
30 | require libgcc-common.inc | ||
31 | |||
32 | DEPENDS = "virtual/${TARGET_PREFIX}gcc" | ||
33 | |||
34 | LICENSE = "GPL-3.0-with-GCC-exception" | ||
35 | |||
36 | PACKAGES = "" | ||
37 | |||
38 | EXTRA_OECONF += "--disable-shared" | ||
39 | |||
40 | inherit nopackages | ||
41 | |||
42 | # We really only want this built by things that need it, not any recrdeptask | ||
43 | deltask do_build | ||
44 | |||
45 | do_configure:prepend () { | ||
46 | install -d ${STAGING_INCDIR} | ||
47 | touch ${STAGING_INCDIR}/limits.h | ||
48 | sed -i -e 's#INHIBIT_LIBC_CFLAGS =.*#INHIBIT_LIBC_CFLAGS = -Dinhibit_libc#' ${B}/gcc/libgcc.mvars | ||
49 | sed -i -e 's#inhibit_libc = false#inhibit_libc = true#' ${B}/gcc/Makefile | ||
50 | } | ||
51 | |||
52 | do_configure:append () { | ||
53 | sed -i -e 's#thread_header = .*#thread_header = gthr-single.h#' ${B}/${BPN}/Makefile | ||
54 | } | ||
55 | |||
56 | do_install:append () { | ||
57 | ln -s libgcc.a ${D}${libdir}/${TARGET_SYS}/${BINV}/libgcc_eh.a | ||
58 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb deleted file mode 100644 index a259082b..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require libgcc-initial.inc | ||
3 | |||
4 | # Building with thumb enabled on armv6t fails | ||
5 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc.inc b/meta-microblaze/recipes-devtools/gcc/libgcc.inc deleted file mode 100644 index 84a2d930..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc.inc +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | require libgcc-common.inc | ||
2 | |||
3 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ virtual/${MLPREFIX}libc" | ||
4 | |||
5 | do_install:append:class-target () { | ||
6 | if [ "${TCLIBC}" != "glibc" ]; then | ||
7 | case "${TARGET_OS}" in | ||
8 | "linux-musl" | "linux-*spe") extra_target_os="linux";; | ||
9 | "linux-musleabi") extra_target_os="linux-gnueabi";; | ||
10 | *) extra_target_os="linux";; | ||
11 | esac | ||
12 | if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then | ||
13 | ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os | ||
14 | fi | ||
15 | fi | ||
16 | if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then | ||
17 | case "${TARGET_OS}" in | ||
18 | "linux-musleabi") extra_target_os="linux-musleabihf";; | ||
19 | "linux-gnueabi") extra_target_os="linux-gnueabihf";; | ||
20 | esac | ||
21 | if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then | ||
22 | ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os | ||
23 | fi | ||
24 | fi | ||
25 | } | ||
26 | |||
27 | PACKAGES = "\ | ||
28 | ${PN} \ | ||
29 | ${PN}-dev \ | ||
30 | ${PN}-dbg \ | ||
31 | " | ||
32 | |||
33 | # All libgcc source is marked with the exception. | ||
34 | # | ||
35 | LICENSE:${PN} = "GPL-3.0-with-GCC-exception" | ||
36 | LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception" | ||
37 | LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception" | ||
38 | |||
39 | |||
40 | FILES:${PN}-dev = "\ | ||
41 | ${base_libdir}/libgcc*.so \ | ||
42 | ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \ | ||
43 | ${libdir}/${TARGET_SYS}/${BINV}* \ | ||
44 | ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \ | ||
45 | " | ||
46 | |||
47 | do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
48 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
49 | do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
50 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
51 | |||
52 | INSANE_SKIP:${PN}-dev = "staticdev" | ||
53 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb deleted file mode 100644 index f88963b0..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require libgcc.inc | ||
3 | |||
4 | # Building with thumb enabled on armv6t fails | ||
5 | ARM_INSTRUCTION_SET:armv6 = "arm" | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran.inc b/meta-microblaze/recipes-devtools/gcc/libgfortran.inc deleted file mode 100644 index 99fdd89c..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgfortran.inc +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | require gcc-configure-common.inc | ||
2 | |||
3 | EXTRA_OECONF_PATHS = "\ | ||
4 | --with-sysroot=/not/exist \ | ||
5 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | ||
6 | " | ||
7 | |||
8 | # An arm hard float target like raspberrypi4 won't build | ||
9 | # as CFLAGS don't make it to the fortran compiler otherwise | ||
10 | # (the configure script sets FC to $GFORTRAN unconditionally) | ||
11 | export GFORTRAN = "${FC}" | ||
12 | |||
13 | do_configure () { | ||
14 | for target in libbacktrace libgfortran | ||
15 | do | ||
16 | rm -rf ${B}/${TARGET_SYS}/$target/ | ||
17 | mkdir -p ${B}/${TARGET_SYS}/$target/ | ||
18 | cd ${B}/${TARGET_SYS}/$target/ | ||
19 | chmod a+x ${S}/$target/configure | ||
20 | relpath=${@os.path.relpath("${S}", "${B}/${TARGET_SYS}")} | ||
21 | ../$relpath/$target/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
22 | # Easiest way to stop bad RPATHs getting into the library since we have a | ||
23 | # broken libtool here | ||
24 | sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/$target/libtool | ||
25 | done | ||
26 | } | ||
27 | EXTRACONFFUNCS += "extract_stashed_builddir" | ||
28 | do_configure[depends] += "${COMPILERDEP}" | ||
29 | |||
30 | do_compile () { | ||
31 | for target in libbacktrace libgfortran | ||
32 | do | ||
33 | cd ${B}/${TARGET_SYS}/$target/ | ||
34 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$target/ | ||
35 | done | ||
36 | } | ||
37 | |||
38 | do_install () { | ||
39 | cd ${B}/${TARGET_SYS}/libgfortran/ | ||
40 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ install | ||
41 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then | ||
42 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | ||
43 | fi | ||
44 | if [ -d ${D}${infodir} ]; then | ||
45 | rmdir --ignore-fail-on-non-empty -p ${D}${infodir} | ||
46 | fi | ||
47 | chown -R root:root ${D} | ||
48 | } | ||
49 | |||
50 | INHIBIT_DEFAULT_DEPS = "1" | ||
51 | DEPENDS = "gcc-runtime gcc-cross-${TARGET_ARCH}" | ||
52 | |||
53 | #BBCLASSEXTEND = "nativesdk" | ||
54 | |||
55 | PACKAGES = "\ | ||
56 | ${PN}-dbg \ | ||
57 | libgfortran \ | ||
58 | libgfortran-dev \ | ||
59 | libgfortran-staticdev \ | ||
60 | " | ||
61 | |||
62 | LICENSE:${PN} = "GPL-3.0-with-GCC-exception" | ||
63 | LICENSE:${PN}-dev = "GPL-3.0-with-GCC-exception" | ||
64 | LICENSE:${PN}-dbg = "GPL-3.0-with-GCC-exception" | ||
65 | |||
66 | FILES:${PN} = "${libdir}/libgfortran.so.*" | ||
67 | FILES:${PN}-dev = "\ | ||
68 | ${libdir}/libgfortran*.so \ | ||
69 | ${libdir}/libgfortran.spec \ | ||
70 | ${libdir}/libgfortran.la \ | ||
71 | ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \ | ||
72 | ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \ | ||
73 | ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \ | ||
74 | ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ \ | ||
75 | " | ||
76 | FILES:${PN}-staticdev = "${libdir}/libgfortran.a" | ||
77 | |||
78 | INSANE_SKIP:${MLPREFIX}libgfortran-dev = "staticdev" | ||
79 | |||
80 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
81 | do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
82 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata" | ||
83 | |||
84 | python __anonymous () { | ||
85 | f = d.getVar("FORTRAN") | ||
86 | if "fortran" not in f: | ||
87 | raise bb.parse.SkipRecipe("libgfortran needs fortran support to be enabled in the compiler") | ||
88 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb b/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb deleted file mode 100644 index 71dd8b4b..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require recipes-devtools/gcc/gcc-${PV}.inc | ||
2 | require libgfortran.inc | ||
3 | |||
diff --git a/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend b/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend deleted file mode 100644 index d1df2061..00000000 --- a/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | require microblaze-block.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc b/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc deleted file mode 100644 index 67c40845..00000000 --- a/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | COMPATIBLE_HOST:microblaze = "^$" | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-common.inc b/meta-microblaze/recipes-devtools/gdb/gdb-common.inc deleted file mode 100644 index 925b0c2f..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb-common.inc +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | SUMMARY = "GNU debugger" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/gdb/" | ||
3 | DESCRIPTION = "GDB, the GNU Project debugger, allows you to see what is going on inside another program while it executes -- or what another program was doing at the moment it crashed." | ||
4 | SECTION = "devel" | ||
5 | DEPENDS = "expat gmp zlib ncurses virtual/libiconv ${LTTNGUST} bison-native" | ||
6 | |||
7 | LTTNGUST = "lttng-ust" | ||
8 | LTTNGUST:arc = "" | ||
9 | LTTNGUST:aarch64 = "" | ||
10 | LTTNGUST:mipsarch = "" | ||
11 | LTTNGUST:sh4 = "" | ||
12 | |||
13 | inherit autotools texinfo | ||
14 | |||
15 | UPSTREAM_CHECK_GITTAGREGEX = "gdb\-(?P<pver>.+)\-release" | ||
16 | |||
17 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
18 | |||
19 | EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}" | ||
20 | |||
21 | EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \ | ||
22 | --with-curses --disable-multilib --disable-sim \ | ||
23 | --without-guile \ | ||
24 | ${GDBPROPREFIX} ${EXPAT} \ | ||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \ | ||
26 | --disable-rpath \ | ||
27 | --disable-gas --disable-binutils \ | ||
28 | --disable-ld --disable-gold \ | ||
29 | --disable-gprof \ | ||
30 | --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \ | ||
31 | " | ||
32 | |||
33 | PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" | ||
34 | # Use --without-system-readline to compile with readline 5. | ||
35 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline" | ||
36 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3 python3-codecs" | ||
37 | PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace" | ||
38 | # ncurses is already a hard DEPENDS, but would be added here if it weren't | ||
39 | PACKAGECONFIG[tui] = "--enable-tui,--disable-tui" | ||
40 | PACKAGECONFIG[xz] = "--with-lzma --with-liblzma-prefix=${STAGING_DIR_HOST},--without-lzma,xz" | ||
41 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils" | ||
42 | |||
43 | GDBPROPREFIX = "--program-prefix=''" | ||
44 | |||
45 | DISABLE_STATIC = "" | ||
46 | |||
47 | do_configure () { | ||
48 | # override this function to avoid the autoconf/automake/aclocal/autoheader | ||
49 | # calls for now | ||
50 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
51 | oe_runconf | ||
52 | } | ||
53 | |||
54 | # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the | ||
55 | # right bits installed by binutils. Same for bfd.info -- also from binutils. | ||
56 | do_install:append() { | ||
57 | rm -rf ${D}${libdir} | ||
58 | rm -rf ${D}${includedir} | ||
59 | rm -rf ${D}${datadir}/locale | ||
60 | rm -f ${D}${infodir}/bfd.info | ||
61 | } | ||
62 | |||
63 | RRECOMMENDS:gdb:append:linux = " glibc-thread-db " | ||
64 | RRECOMMENDS:gdb:append:linux-gnueabi = " glibc-thread-db " | ||
65 | RRECOMMENDS:gdbserver:append:linux = " glibc-thread-db " | ||
66 | RRECOMMENDS:gdbserver:append:linux-gnueabi = " glibc-thread-db " | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian.inc deleted file mode 100644 index c463574b..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian.inc +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | inherit cross-canadian | ||
2 | inherit python3-dir | ||
3 | inherit pkgconfig | ||
4 | |||
5 | SUMMARY = "GNU debugger (cross-canadian gdb for ${TARGET_ARCH} target)" | ||
6 | PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}" | ||
7 | BPN = "gdb" | ||
8 | |||
9 | DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp \ | ||
10 | virtual/${HOST_PREFIX}gcc virtual/${HOST_PREFIX}binutils virtual/nativesdk-libc" | ||
11 | |||
12 | GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'" | ||
13 | |||
14 | # Overrides PACKAGECONFIG variables in gdb-common.inc | ||
15 | PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" | ||
16 | PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \ | ||
17 | nativesdk-python3-core \ | ||
18 | nativesdk-python3-codecs nativesdk-python3-netclient \ | ||
19 | " | ||
20 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline" | ||
21 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, nativesdk-elfutils" | ||
22 | |||
23 | SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_DATADIR}/gdb" | ||
24 | |||
25 | do_configure:prepend() { | ||
26 | cat > ${WORKDIR}/python << EOF | ||
27 | #! /bin/sh | ||
28 | case "\$2" in | ||
29 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; | ||
30 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; | ||
31 | --exec-prefix) echo "${exec_prefix}" ;; | ||
32 | *) exit 1 ;; | ||
33 | esac | ||
34 | exit 0 | ||
35 | EOF | ||
36 | chmod +x ${WORKDIR}/python | ||
37 | } | ||
38 | |||
39 | # we don't want gdb to provide bfd/iberty/opcodes, which instead will override the | ||
40 | # right bits installed by binutils. | ||
41 | do_install:append() { | ||
42 | rm -rf ${D}${exec_prefix}/lib | ||
43 | cross_canadian_bindirlinks | ||
44 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb deleted file mode 100644 index 4ab2b715..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | require gdb-common.inc | ||
2 | require gdb-cross-canadian.inc | ||
3 | require gdb.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross.inc b/meta-microblaze/recipes-devtools/gdb/gdb-cross.inc deleted file mode 100644 index b418f3a3..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb-cross.inc +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | require gdb-common.inc | ||
2 | |||
3 | DEPENDS = "expat-native gmp-native ncurses-native flex-native bison-native" | ||
4 | |||
5 | inherit python3native pkgconfig | ||
6 | |||
7 | # Overrides PACKAGECONFIG variables in gdb-common.inc | ||
8 | PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}" | ||
9 | PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-native" | ||
10 | PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native" | ||
11 | PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils-native" | ||
12 | |||
13 | do_compile:prepend() { | ||
14 | export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}" | ||
15 | export STAGING_INCDIR="${STAGING_INCDIR_NATIVE}" | ||
16 | } | ||
17 | |||
18 | #EXTRA_OEMAKE += "LDFLAGS='${BUILD_LDFLAGS}'" | ||
19 | |||
20 | GDBPROPREFIX = "" | ||
21 | |||
22 | PN = "gdb-cross-${TARGET_ARCH}" | ||
23 | BPN = "gdb" | ||
24 | |||
25 | # Ignore how TARGET_ARCH is computed. | ||
26 | TARGET_ARCH[vardepvalue] = "${TARGET_ARCH}" | ||
27 | |||
28 | inherit cross | ||
29 | inherit gettext | ||
30 | |||
31 | datadir .= "/gdb-${TARGET_SYS}${TARGET_VENDOR}-${TARGET_OS}" | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb deleted file mode 100644 index 3b654a2f..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | require gdb-cross.inc | ||
2 | require gdb.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb-microblaze.inc b/meta-microblaze/recipes-devtools/gdb/gdb-microblaze.inc index d3618229..4e8993c4 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb-microblaze.inc +++ b/meta-microblaze/recipes-devtools/gdb/gdb-microblaze.inc | |||
@@ -4,14 +4,54 @@ LTTNGUST:microblaze = "" | |||
4 | # Add MicroBlaze patches | 4 | # Add MicroBlaze patches |
5 | FILESEXTRAPATHS:append := ":${THISDIR}/gdb" | 5 | FILESEXTRAPATHS:append := ":${THISDIR}/gdb" |
6 | 6 | ||
7 | # Our changes are all local, no real patch-status | ||
8 | ERROR_QA:remove = "patch-status" | ||
9 | |||
10 | LDFLAGS:append:class-target:microblaze = " -latomic" | ||
11 | |||
7 | SRC_URI:append:microblaze = " \ | 12 | SRC_URI:append:microblaze = " \ |
8 | file://0001-Add-initial-port-of-linux-gdbserver.patch \ | 13 | file://0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch \ |
9 | file://0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch \ | 14 | file://0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch \ |
10 | file://0003-Fix-debug-message-when-register-is-unavailable.patch \ | 15 | file://0003-Initial-port-of-core-reading-support-Added-support-f.patch \ |
11 | file://0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch \ | 16 | file://0004-Fix-debug-message-when-register-is-unavailable.patch \ |
12 | file://0005-Patch-microblaze-Adding-64-bit-MB-support.patch \ | 17 | file://0005-MicroBlaze-native-gdb-port.patch \ |
13 | file://0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch \ | 18 | file://0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch \ |
14 | file://0007-Patch-MicroBlaze-Added-m64-abi-for-64-bit-target-des.patch \ | 19 | file://0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch \ |
15 | file://0008-Patch-MicroBlaze.patch \ | 20 | file://0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch \ |
16 | file://0009-gdb-gdserver-Fix-ABI-settings-for-gdbserver.patch \ | 21 | file://0009-Depth-Total-number-of-inline-functions-refer-inline-.patch \ |
22 | file://0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch \ | ||
23 | file://0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch \ | ||
24 | file://0013-Disable-the-warning-message-for-eh_frame_hdr.patch \ | ||
25 | file://0015-upstream-change-to-garbage-collection-sweep-causes-m.patch \ | ||
26 | file://0016-Add-new-bit-field-instructions.patch \ | ||
27 | file://0019-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
28 | file://0020-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
29 | file://0021-Added-relocations-for-MB-X.patch \ | ||
30 | file://0022-initial-support-for-MicroBlaze-64-bit-m64.patch \ | ||
31 | file://0023-Added-relocations-for-MB-X.patch \ | ||
32 | file://0025-Fixed-address-computation-issues-with-64bit-address-.patch \ | ||
33 | file://0028-fixing-the-long-long-long-mingw-toolchain-issue.patch \ | ||
34 | file://0029-Added-support-to-new-arithmetic-single-register-inst.patch \ | ||
35 | file://0030-double-imml-generation-for-64-bit-values.patch \ | ||
36 | file://0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch \ | ||
37 | file://0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch \ | ||
38 | file://0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch \ | ||
39 | file://0038-MB-binutils-Upstream-port-issues.patch \ | ||
40 | file://0039-Initial-port-of-core-reading-support-Added-support-f.patch \ | ||
41 | file://0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch \ | ||
42 | file://0041-disable-truncated-register-warning-gdb-remote.c.patch \ | ||
43 | file://0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch \ | ||
44 | file://0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch \ | ||
45 | file://0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch \ | ||
46 | file://0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch \ | ||
47 | file://0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch \ | ||
48 | file://0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch \ | ||
49 | file://0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch \ | ||
50 | file://0049-Add-back-R_MICROBLAZE_NONE-for-linker-relaxation-pro.patch \ | ||
51 | file://0050-When-unwinding-pc-value-adjust-return-pc-value.patch \ | ||
52 | file://0051-info-reg-pc-does-not-print-symbolic-value.patch \ | ||
53 | file://0052-Wrong-target-description-accepted-by-microblaze-arch.patch \ | ||
54 | file://0053-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch \ | ||
55 | file://0054-Roll-back-an-improvement-which-inlines-target_gdbarc.patch \ | ||
56 | file://0055-fix-microblaze-linux-nat.patch \ | ||
17 | " | 57 | " |
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb.inc b/meta-microblaze/recipes-devtools/gdb/gdb.inc deleted file mode 100644 index a5dc5545..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb.inc +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | LICENSE = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only" | ||
2 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ | ||
3 | file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ | ||
4 | file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ | ||
5 | file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674" | ||
6 | |||
7 | SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.xz \ | ||
8 | file://0001-make-man-install-relative-to-DESTDIR.patch \ | ||
9 | file://0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \ | ||
10 | file://0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch \ | ||
11 | file://0004-Dont-disable-libreadline.a-when-using-disable-static.patch \ | ||
12 | file://0005-use-asm-sgidefs.h.patch \ | ||
13 | file://0006-Change-order-of-CFLAGS.patch \ | ||
14 | file://0007-resolve-restrict-keyword-conflict.patch \ | ||
15 | file://0008-Fix-invalid-sigprocmask-call.patch \ | ||
16 | file://0009-gdbserver-ctrl-c-handling.patch \ | ||
17 | file://readline-8.2.patch \ | ||
18 | file://0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ | ||
19 | " | ||
20 | SRC_URI[sha256sum] = "0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed" | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch new file mode 100644 index 00000000..bf7b3363 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From fc4e376f932514d9e5e3c04a18952d5900334c09 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 15:07:22 +0530 | ||
4 | Subject: [PATCH 01/54] Add initial port of linux gdbserver add | ||
5 | gdb_proc_service_h to gdbserver microblaze-linux | ||
6 | |||
7 | gdbserver needs to initialise the microblaze registers | ||
8 | |||
9 | other archs use this step to run a *_arch_setup() to carry out all | ||
10 | architecture specific setup - may need to add in future | ||
11 | |||
12 | * add linux-ptrace.o to gdbserver configure | ||
13 | * Update breakpoint opcode | ||
14 | * fix segfault on connecting gdbserver | ||
15 | * add microblaze_linux_memory_remove_breakpoint | ||
16 | * add set_solib_svr4_fetch_link_map_offsets | ||
17 | * add set_gdbarch_fetch_tls_load_module_address | ||
18 | * Force reading of r0 as 0, prevent stores | ||
19 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
21 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
22 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gdbserver/Makefile.in | 1 + | ||
26 | 1 file changed, 1 insertion(+) | ||
27 | |||
28 | diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in | ||
29 | index b597515d428..faf32cd9d42 100644 | ||
30 | --- a/gdbserver/Makefile.in | ||
31 | +++ b/gdbserver/Makefile.in | ||
32 | @@ -180,6 +180,7 @@ SFILES = \ | ||
33 | $(srcdir)/linux-loongarch-low.cc \ | ||
34 | $(srcdir)/linux-low.cc \ | ||
35 | $(srcdir)/linux-m68k-low.cc \ | ||
36 | + $(srcdir)/linux-microblaze-low.cc \ | ||
37 | $(srcdir)/linux-mips-low.cc \ | ||
38 | $(srcdir)/linux-nios2-low.cc \ | ||
39 | $(srcdir)/linux-or1k-low.cc \ | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch deleted file mode 100644 index 16d6cf19..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 8eca28eddcda4ce8a345ca031f43ff1ed6f37089 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 2 Mar 2015 02:27:55 +0000 | ||
4 | Subject: [PATCH 1/9] make man install relative to DESTDIR | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | sim/common/Make-common.in | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in | ||
14 | index 74e5dad3049..9e95c224ba4 100644 | ||
15 | --- a/sim/common/Make-common.in | ||
16 | +++ b/sim/common/Make-common.in | ||
17 | @@ -70,7 +70,7 @@ tooldir = $(libdir)/$(target_alias) | ||
18 | datadir = @datadir@ | ||
19 | datarootdir = @datarootdir@ | ||
20 | mandir = @mandir@ | ||
21 | -man1dir = $(mandir)/man1 | ||
22 | +man1dir = $(DESTDIR)$(mandir)/man1 | ||
23 | infodir = @infodir@ | ||
24 | includedir = @includedir@ | ||
25 | |||
26 | -- | ||
27 | 2.36.1 | ||
28 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch new file mode 100644 index 00000000..02b42cbd --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0002-Add-initial-port-of-linux-gdbserver-add-gdb_proc_ser.patch | |||
@@ -0,0 +1,639 @@ | |||
1 | From fa91dbd8c23e519760213f32de572cbf98ad6bc3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 15:07:22 +0530 | ||
4 | Subject: [PATCH 02/54] Add initial port of linux gdbserver add | ||
5 | gdb_proc_service_h to gdbserver microblaze-linux | ||
6 | |||
7 | gdbserver needs to initialise the microblaze registers | ||
8 | |||
9 | other archs use this step to run a *_arch_setup() to carry out all | ||
10 | architecture specific setup - may need to add in future | ||
11 | |||
12 | * add linux-ptrace.o to gdbserver configure | ||
13 | * Update breakpoint opcode | ||
14 | * fix segfault on connecting gdbserver | ||
15 | * add microblaze_linux_memory_remove_breakpoint | ||
16 | * add set_solib_svr4_fetch_link_map_offsets | ||
17 | * add set_gdbarch_fetch_tls_load_module_address | ||
18 | * Force reading of r0 as 0, prevent stores | ||
19 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
21 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
22 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gdb/configure.host | 2 + | ||
26 | gdb/features/Makefile | 1 + | ||
27 | gdb/features/microblaze-linux.xml | 13 ++ | ||
28 | gdb/microblaze-linux-tdep.c | 29 ++- | ||
29 | gdb/microblaze-tdep.c | 35 +++- | ||
30 | gdb/microblaze-tdep.h | 4 +- | ||
31 | gdb/regformats/microblaze-linux.dat | 64 +++++++ | ||
32 | gdb/regformats/reg-microblaze.dat | 41 +++++ | ||
33 | gdbserver/configure.srv | 10 ++ | ||
34 | gdbserver/linux-microblaze-low.cc | 269 ++++++++++++++++++++++++++++ | ||
35 | 10 files changed, 465 insertions(+), 3 deletions(-) | ||
36 | create mode 100644 gdb/features/microblaze-linux.xml | ||
37 | create mode 100644 gdb/regformats/microblaze-linux.dat | ||
38 | create mode 100644 gdb/regformats/reg-microblaze.dat | ||
39 | create mode 100644 gdbserver/linux-microblaze-low.cc | ||
40 | |||
41 | diff --git a/gdb/configure.host b/gdb/configure.host | ||
42 | index da71675b201..877537d06ef 100644 | ||
43 | --- a/gdb/configure.host | ||
44 | +++ b/gdb/configure.host | ||
45 | @@ -61,6 +61,7 @@ i[34567]86*) gdb_host_cpu=i386 ;; | ||
46 | loongarch*) gdb_host_cpu=loongarch ;; | ||
47 | m68*) gdb_host_cpu=m68k ;; | ||
48 | mips*) gdb_host_cpu=mips ;; | ||
49 | +microblaze*) gdb_host_cpu=microblaze ;; | ||
50 | powerpc* | rs6000) gdb_host_cpu=powerpc ;; | ||
51 | sparcv9 | sparc64) gdb_host_cpu=sparc ;; | ||
52 | s390*) gdb_host_cpu=s390 ;; | ||
53 | @@ -127,6 +128,7 @@ m68*-*-openbsd*) gdb_host=obsd ;; | ||
54 | |||
55 | m88*-*-openbsd*) gdb_host=obsd ;; | ||
56 | |||
57 | +microblaze*-*linux*) gdb_host=linux ;; | ||
58 | mips*-*-linux*) gdb_host=linux ;; | ||
59 | mips*-*-netbsdaout* | mips*-*-knetbsd*-gnu) | ||
60 | gdb_host=nbsd ;; | ||
61 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | ||
62 | index 32341f71815..0af9d67c2f7 100644 | ||
63 | --- a/gdb/features/Makefile | ||
64 | +++ b/gdb/features/Makefile | ||
65 | @@ -46,6 +46,7 @@ | ||
66 | # List of .dat files to create in ../regformats/ | ||
67 | WHICH = mips-linux mips-dsp-linux \ | ||
68 | mips64-linux mips64-dsp-linux \ | ||
69 | + microblaze-linux \ | ||
70 | nios2-linux \ | ||
71 | or1k-linux \ | ||
72 | rs6000/powerpc-32 \ | ||
73 | diff --git a/gdb/features/microblaze-linux.xml b/gdb/features/microblaze-linux.xml | ||
74 | new file mode 100644 | ||
75 | index 00000000000..688a3f83d1e | ||
76 | --- /dev/null | ||
77 | +++ b/gdb/features/microblaze-linux.xml | ||
78 | @@ -0,0 +1,13 @@ | ||
79 | +<?xml version="1.0"?> | ||
80 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
81 | + | ||
82 | + Copying and distribution of this file, with or without modification, | ||
83 | + are permitted in any medium without royalty provided the copyright | ||
84 | + notice and this notice are preserved. --> | ||
85 | + | ||
86 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
87 | +<target> | ||
88 | + <architecture>microblaze</architecture> | ||
89 | + <osabi>GNU/Linux</osabi> | ||
90 | + <xi:include href="microblaze-core.xml"/> | ||
91 | +</target> | ||
92 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
93 | index ae33cb5c014..9160b4ad464 100644 | ||
94 | --- a/gdb/microblaze-linux-tdep.c | ||
95 | +++ b/gdb/microblaze-linux-tdep.c | ||
96 | @@ -37,6 +37,22 @@ | ||
97 | #include "tramp-frame.h" | ||
98 | #include "linux-tdep.h" | ||
99 | |||
100 | +static int microblaze_debug_flag = 0; | ||
101 | + | ||
102 | +static void | ||
103 | +microblaze_debug (const char *fmt, ...) | ||
104 | +{ | ||
105 | + if (microblaze_debug_flag) | ||
106 | + { | ||
107 | + va_list args; | ||
108 | + | ||
109 | + va_start (args, fmt); | ||
110 | + printf_unfiltered ("MICROBLAZE LINUX: "); | ||
111 | + vprintf_unfiltered (fmt, args); | ||
112 | + va_end (args); | ||
113 | + } | ||
114 | +} | ||
115 | + | ||
116 | static int | ||
117 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
118 | struct bp_target_info *bp_tgt) | ||
119 | @@ -50,13 +66,20 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
120 | /* Determine appropriate breakpoint contents and size for this address. */ | ||
121 | bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen); | ||
122 | |||
123 | + /* Make sure we see the memory breakpoints. */ | ||
124 | + scoped_restore restore_memory | ||
125 | + = make_scoped_restore_show_memory_breakpoints (1); | ||
126 | + | ||
127 | val = target_read_memory (addr, old_contents, bplen); | ||
128 | |||
129 | /* If our breakpoint is no longer at the address, this means that the | ||
130 | program modified the code on us, so it is wrong to put back the | ||
131 | old value. */ | ||
132 | if (val == 0 && memcmp (bp, old_contents, bplen) == 0) | ||
133 | - val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen); | ||
134 | + { | ||
135 | + val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen); | ||
136 | + microblaze_debug ("microblaze_linux_memory_remove_breakpoint writing back to memory at addr 0x%lx\n", addr); | ||
137 | + } | ||
138 | |||
139 | return val; | ||
140 | } | ||
141 | @@ -129,6 +152,10 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
142 | /* Trampolines. */ | ||
143 | tramp_frame_prepend_unwinder (gdbarch, | ||
144 | µblaze_linux_sighandler_tramp_frame); | ||
145 | + | ||
146 | + /* Enable TLS support. */ | ||
147 | + set_gdbarch_fetch_tls_load_module_address (gdbarch, | ||
148 | + svr4_fetch_objfile_link_map); | ||
149 | } | ||
150 | |||
151 | void _initialize_microblaze_linux_tdep (); | ||
152 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
153 | index f254a54305c..28a647e940b 100644 | ||
154 | --- a/gdb/microblaze-tdep.c | ||
155 | +++ b/gdb/microblaze-tdep.c | ||
156 | @@ -128,7 +128,38 @@ microblaze_fetch_instruction (CORE_ADDR pc) | ||
157 | constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT; | ||
158 | |||
159 | typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint; | ||
160 | - | ||
161 | +static int | ||
162 | +microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
163 | + struct bp_target_info *bp_tgt) | ||
164 | +{ | ||
165 | + CORE_ADDR addr = bp_tgt->placed_address; | ||
166 | + const unsigned char *bp; | ||
167 | + int val; | ||
168 | + int bplen; | ||
169 | + gdb_byte old_contents[BREAKPOINT_MAX]; | ||
170 | + | ||
171 | + /* Determine appropriate breakpoint contents and size for this address. */ | ||
172 | + bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen); | ||
173 | + if (bp == NULL) | ||
174 | + error (_("Software breakpoints not implemented for this target.")); | ||
175 | + | ||
176 | + /* Make sure we see the memory breakpoints. */ | ||
177 | + scoped_restore restore_memory | ||
178 | + = make_scoped_restore_show_memory_breakpoints (1); | ||
179 | + | ||
180 | + val = target_read_memory (addr, old_contents, bplen); | ||
181 | + | ||
182 | + /* If our breakpoint is no longer at the address, this means that the | ||
183 | + program modified the code on us, so it is wrong to put back the | ||
184 | + old value. */ | ||
185 | + if (val == 0 && memcmp (bp, old_contents, bplen) == 0) | ||
186 | + { | ||
187 | + val = target_write_raw_memory (addr, bp_tgt->shadow_contents, bplen); | ||
188 | + microblaze_debug ("microblaze_linux_memory_remove_breakpoint writing back to memory at addr 0x%lx\n", addr); | ||
189 | + } | ||
190 | + | ||
191 | + return val; | ||
192 | +} | ||
193 | |||
194 | /* Allocate and initialize a frame cache. */ | ||
195 | |||
196 | @@ -714,6 +745,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
197 | microblaze_breakpoint::kind_from_pc); | ||
198 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, | ||
199 | microblaze_breakpoint::bp_from_kind); | ||
200 | + set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
201 | |||
202 | set_gdbarch_frame_args_skip (gdbarch, 8); | ||
203 | |||
204 | @@ -754,4 +786,5 @@ When non-zero, microblaze specific debugging is enabled."), | ||
205 | NULL, | ||
206 | &setdebuglist, &showdebuglist); | ||
207 | |||
208 | + | ||
209 | } | ||
210 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
211 | index 892e5b3b849..e9f57e97c26 100644 | ||
212 | --- a/gdb/microblaze-tdep.h | ||
213 | +++ b/gdb/microblaze-tdep.h | ||
214 | @@ -118,6 +118,8 @@ struct microblaze_frame_cache | ||
215 | |||
216 | /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used. | ||
217 | Only used for native debugging. */ | ||
218 | -#define MICROBLAZE_BREAKPOINT {0xb9, 0xcc, 0x00, 0x60} | ||
219 | +#define MICROBLAZE_BREAKPOINT {0xba, 0x0c, 0x00, 0x18} | ||
220 | +#define MICROBLAZE_BREAKPOINT_LE {0x18, 0x00, 0x0c, 0xba} | ||
221 | + | ||
222 | |||
223 | #endif /* microblaze-tdep.h */ | ||
224 | diff --git a/gdb/regformats/microblaze-linux.dat b/gdb/regformats/microblaze-linux.dat | ||
225 | new file mode 100644 | ||
226 | index 00000000000..b5b49f485cd | ||
227 | --- /dev/null | ||
228 | +++ b/gdb/regformats/microblaze-linux.dat | ||
229 | @@ -0,0 +1,64 @@ | ||
230 | +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: | ||
231 | +# Generated from: microblaze-linux.xml | ||
232 | +name:microblaze_linux | ||
233 | +xmltarget:microblaze-linux.xml | ||
234 | +expedite:r1,rpc | ||
235 | +32:r0 | ||
236 | +32:r1 | ||
237 | +32:r2 | ||
238 | +32:r3 | ||
239 | +32:r4 | ||
240 | +32:r5 | ||
241 | +32:r6 | ||
242 | +32:r7 | ||
243 | +32:r8 | ||
244 | +32:r9 | ||
245 | +32:r10 | ||
246 | +32:r11 | ||
247 | +32:r12 | ||
248 | +32:r13 | ||
249 | +32:r14 | ||
250 | +32:r15 | ||
251 | +32:r16 | ||
252 | +32:r17 | ||
253 | +32:r18 | ||
254 | +32:r19 | ||
255 | +32:r20 | ||
256 | +32:r21 | ||
257 | +32:r22 | ||
258 | +32:r23 | ||
259 | +32:r24 | ||
260 | +32:r25 | ||
261 | +32:r26 | ||
262 | +32:r27 | ||
263 | +32:r28 | ||
264 | +32:r29 | ||
265 | +32:r30 | ||
266 | +32:r31 | ||
267 | +32:rpc | ||
268 | +32:rmsr | ||
269 | +32:rear | ||
270 | +32:resr | ||
271 | +32:rfsr | ||
272 | +32:rbtr | ||
273 | +32:rpvr0 | ||
274 | +32:rpvr1 | ||
275 | +32:rpvr2 | ||
276 | +32:rpvr3 | ||
277 | +32:rpvr4 | ||
278 | +32:rpvr5 | ||
279 | +32:rpvr6 | ||
280 | +32:rpvr7 | ||
281 | +32:rpvr8 | ||
282 | +32:rpvr9 | ||
283 | +32:rpvr10 | ||
284 | +32:rpvr11 | ||
285 | +32:redr | ||
286 | +32:rpid | ||
287 | +32:rzpr | ||
288 | +32:rtlbx | ||
289 | +32:rtlbsx | ||
290 | +32:rtlblo | ||
291 | +32:rtlbhi | ||
292 | +32:slr | ||
293 | +32:shr | ||
294 | diff --git a/gdb/regformats/reg-microblaze.dat b/gdb/regformats/reg-microblaze.dat | ||
295 | new file mode 100644 | ||
296 | index 00000000000..bd8a4384424 | ||
297 | --- /dev/null | ||
298 | +++ b/gdb/regformats/reg-microblaze.dat | ||
299 | @@ -0,0 +1,41 @@ | ||
300 | +name:microblaze | ||
301 | +expedite:r1,pc | ||
302 | +32:r0 | ||
303 | +32:r1 | ||
304 | +32:r2 | ||
305 | +32:r3 | ||
306 | +32:r4 | ||
307 | +32:r5 | ||
308 | +32:r6 | ||
309 | +32:r7 | ||
310 | +32:r8 | ||
311 | +32:r9 | ||
312 | +32:r10 | ||
313 | +32:r11 | ||
314 | +32:r12 | ||
315 | +32:r13 | ||
316 | +32:r14 | ||
317 | +32:r15 | ||
318 | +32:r16 | ||
319 | +32:r17 | ||
320 | +32:r18 | ||
321 | +32:r19 | ||
322 | +32:r20 | ||
323 | +32:r21 | ||
324 | +32:r22 | ||
325 | +32:r23 | ||
326 | +32:r24 | ||
327 | +32:r25 | ||
328 | +32:r26 | ||
329 | +32:r27 | ||
330 | +32:r28 | ||
331 | +32:r29 | ||
332 | +32:r30 | ||
333 | +32:r31 | ||
334 | +32:pc | ||
335 | +32:msr | ||
336 | +32:ear | ||
337 | +32:esr | ||
338 | +32:fsr | ||
339 | +32:slr | ||
340 | +32:shr | ||
341 | diff --git a/gdbserver/configure.srv b/gdbserver/configure.srv | ||
342 | index 9e861a75088..11ce617e72f 100644 | ||
343 | --- a/gdbserver/configure.srv | ||
344 | +++ b/gdbserver/configure.srv | ||
345 | @@ -159,6 +159,16 @@ case "${gdbserver_host}" in | ||
346 | srv_linux_regsets=yes | ||
347 | srv_linux_thread_db=yes | ||
348 | ;; | ||
349 | + | ||
350 | +microblaze*-*-linux*) srv_regobj="microblaze-linux.o" | ||
351 | + srv_tgtobj="$srv_linux_obj linux-microblaze-low.o" | ||
352 | + srv_xmlfiles="microblaze-linux.xml" | ||
353 | + srv_xmlfiles="${srv_xmlfiles} microblaze-core.xml" | ||
354 | + srv_linux_usrregs=yes | ||
355 | + srv_linux_regsets=yes | ||
356 | + srv_linux_thread_db=yes | ||
357 | + ;; | ||
358 | + | ||
359 | mips*-*-linux*) srv_regobj="mips-linux.o" | ||
360 | srv_regobj="${srv_regobj} mips-dsp-linux.o" | ||
361 | srv_regobj="${srv_regobj} mips64-linux.o" | ||
362 | diff --git a/gdbserver/linux-microblaze-low.cc b/gdbserver/linux-microblaze-low.cc | ||
363 | new file mode 100644 | ||
364 | index 00000000000..bf9eecc41ab | ||
365 | --- /dev/null | ||
366 | +++ b/gdbserver/linux-microblaze-low.cc | ||
367 | @@ -0,0 +1,269 @@ | ||
368 | +/* GNU/Linux/Microblaze specific low level interface, for the remote server for | ||
369 | + GDB. | ||
370 | + Copyright (C) 1995-2013 Free Software Foundation, Inc. | ||
371 | + | ||
372 | + This file is part of GDB. | ||
373 | + | ||
374 | + This program is free software; you can redistribute it and/or modify | ||
375 | + it under the terms of the GNU General Public License as published by | ||
376 | + the Free Software Foundation; either version 3 of the License, or | ||
377 | + (at your option) any later version. | ||
378 | + | ||
379 | + This program is distributed in the hope that it will be useful, | ||
380 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
381 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
382 | + GNU General Public License for more details. | ||
383 | + | ||
384 | + You should have received a copy of the GNU General Public License | ||
385 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
386 | + | ||
387 | +#include "server.h" | ||
388 | +#include "linux-low.h" | ||
389 | + | ||
390 | +#include "elf/common.h" | ||
391 | +#include "nat/gdb_ptrace.h" | ||
392 | +#include <endian.h> | ||
393 | + | ||
394 | +#include <asm/ptrace.h> | ||
395 | +#include <sys/procfs.h> | ||
396 | +#include <sys/ptrace.h> | ||
397 | + | ||
398 | +#include "gdb_proc_service.h" | ||
399 | + | ||
400 | + | ||
401 | +static int microblaze_regmap[] = | ||
402 | + {PT_GPR(0), PT_GPR(1), PT_GPR(2), PT_GPR(3), | ||
403 | + PT_GPR(4), PT_GPR(5), PT_GPR(6), PT_GPR(7), | ||
404 | + PT_GPR(8), PT_GPR(9), PT_GPR(10), PT_GPR(11), | ||
405 | + PT_GPR(12), PT_GPR(13), PT_GPR(14), PT_GPR(15), | ||
406 | + PT_GPR(16), PT_GPR(17), PT_GPR(18), PT_GPR(19), | ||
407 | + PT_GPR(20), PT_GPR(21), PT_GPR(22), PT_GPR(23), | ||
408 | + PT_GPR(24), PT_GPR(25), PT_GPR(26), PT_GPR(27), | ||
409 | + PT_GPR(28), PT_GPR(29), PT_GPR(30), PT_GPR(31), | ||
410 | + PT_PC, PT_MSR, PT_EAR, PT_ESR, | ||
411 | + PT_FSR | ||
412 | + }; | ||
413 | + | ||
414 | + | ||
415 | + | ||
416 | +class microblaze_target : public linux_process_target | ||
417 | +{ | ||
418 | +public: | ||
419 | + | ||
420 | + const regs_info *get_regs_info () override; | ||
421 | + | ||
422 | + const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override; | ||
423 | + // CORE_ADDR microblaze_reinsert_addr (regcache *regcache); | ||
424 | + | ||
425 | +protected: | ||
426 | + | ||
427 | + void low_arch_setup () override; | ||
428 | + | ||
429 | + bool low_cannot_fetch_register (int regno) override; | ||
430 | + | ||
431 | + bool low_cannot_store_register (int regno) override; | ||
432 | + | ||
433 | + // bool low_supports_breakpoints () override; | ||
434 | + | ||
435 | + CORE_ADDR low_get_pc (regcache *regcache) override; | ||
436 | + | ||
437 | + void low_set_pc (regcache *regcache, CORE_ADDR newpc) override; | ||
438 | + | ||
439 | + bool low_breakpoint_at (CORE_ADDR pc) override; | ||
440 | +}; | ||
441 | + | ||
442 | +/* The singleton target ops object. */ | ||
443 | + | ||
444 | +static microblaze_target the_microblaze_target; | ||
445 | + | ||
446 | +#define microblaze_num_regs (sizeof (microblaze_regmap) / sizeof (microblaze_regmap[0])) | ||
447 | + | ||
448 | +/* Defined in auto-generated file microblaze-linux.c. */ | ||
449 | +void init_registers_microblaze_linux (void); | ||
450 | +extern const struct target_desc *tdesc_microblaze_linux; | ||
451 | + | ||
452 | +bool | ||
453 | +microblaze_target::low_cannot_store_register (int regno) | ||
454 | +{ | ||
455 | + if (microblaze_regmap[regno] == -1 || regno == 0) | ||
456 | + return 1; | ||
457 | + | ||
458 | + return 0; | ||
459 | +} | ||
460 | + | ||
461 | +bool | ||
462 | +microblaze_target::low_cannot_fetch_register (int regno) | ||
463 | +{ | ||
464 | + return 0; | ||
465 | +} | ||
466 | + | ||
467 | +CORE_ADDR | ||
468 | +microblaze_target::low_get_pc (struct regcache *regcache) | ||
469 | +{ | ||
470 | + unsigned long pc; | ||
471 | + | ||
472 | + collect_register_by_name (regcache, "pc", &pc); | ||
473 | + return (CORE_ADDR) pc; | ||
474 | +} | ||
475 | + | ||
476 | +void | ||
477 | +microblaze_target::low_set_pc (struct regcache *regcache, CORE_ADDR pc) | ||
478 | +{ | ||
479 | + unsigned long newpc = pc; | ||
480 | + | ||
481 | + supply_register_by_name (regcache, "pc", &newpc); | ||
482 | +} | ||
483 | + | ||
484 | +/* dbtrap insn */ | ||
485 | +/* brki r16, 0x18; */ | ||
486 | +static const unsigned long microblaze_breakpoint = 0xba0c0018; | ||
487 | +#define microblaze_breakpoint_len 4 | ||
488 | + | ||
489 | +/* Implementation of linux_target_ops method "sw_breakpoint_from_kind". */ | ||
490 | + | ||
491 | +const gdb_byte * | ||
492 | +microblaze_target::sw_breakpoint_from_kind (int kind, int *size) | ||
493 | +{ | ||
494 | + *size = microblaze_breakpoint_len; | ||
495 | + return (const gdb_byte *) µblaze_breakpoint; | ||
496 | +} | ||
497 | + | ||
498 | +bool | ||
499 | +microblaze_target::low_breakpoint_at (CORE_ADDR where) | ||
500 | +{ | ||
501 | + unsigned long insn; | ||
502 | + | ||
503 | + read_memory (where, (unsigned char *) &insn, 4); | ||
504 | + if (insn == microblaze_breakpoint) | ||
505 | + return 1; | ||
506 | + /* If necessary, recognize more trap instructions here. GDB only uses the | ||
507 | + one. */ | ||
508 | + return 0; | ||
509 | +} | ||
510 | +#if 0 | ||
511 | +CORE_ADDR | ||
512 | +microblaze_target::microblaze_reinsert_addr (struct regcache *regcache) | ||
513 | +{ | ||
514 | + unsigned long pc; | ||
515 | + collect_register_by_name (regcache, "r15", &pc); | ||
516 | + return pc; | ||
517 | +} | ||
518 | +#endif | ||
519 | +#if 0 | ||
520 | +#ifdef HAVE_PTRACE_GETREGS | ||
521 | + | ||
522 | +static void | ||
523 | +microblaze_collect_ptrace_register (struct regcache *regcache, int regno, char *buf) | ||
524 | +{ | ||
525 | + int size = register_size (regcache->tdesc, regno); | ||
526 | + | ||
527 | + memset (buf, 0, sizeof (long)); | ||
528 | + | ||
529 | + if (size < sizeof (long)) | ||
530 | + collect_register (regcache, regno, buf + sizeof (long) - size); | ||
531 | + else | ||
532 | + collect_register (regcache, regno, buf); | ||
533 | +} | ||
534 | + | ||
535 | +static void | ||
536 | +microblaze_supply_ptrace_register (struct regcache *regcache, | ||
537 | + int regno, const char *buf) | ||
538 | +{ | ||
539 | + int size = register_size (regcache->tdesc, regno); | ||
540 | + | ||
541 | + if (regno == 0) { | ||
542 | + unsigned long regbuf_0 = 0; | ||
543 | + /* clobbering r0 so that it is always 0 as enforced by hardware */ | ||
544 | + supply_register (regcache, regno, (const char*)®buf_0); | ||
545 | + } else { | ||
546 | + if (size < sizeof (long)) | ||
547 | + supply_register (regcache, regno, buf + sizeof (long) - size); | ||
548 | + else | ||
549 | + supply_register (regcache, regno, buf); | ||
550 | + } | ||
551 | +} | ||
552 | + | ||
553 | +/* Provide only a fill function for the general register set. ps_lgetregs | ||
554 | + will use this for NPTL support. */ | ||
555 | + | ||
556 | +static void microblaze_fill_gregset (struct regcache *regcache, void *buf) | ||
557 | +{ | ||
558 | + int i; | ||
559 | + | ||
560 | + for (i = 0; i < 32; i++) | ||
561 | + microblaze_collect_ptrace_register (regcache, i, (char *) buf + microblaze_regmap[i]); | ||
562 | +} | ||
563 | + | ||
564 | +static void | ||
565 | +microblaze_store_gregset (struct regcache *regcache, const void *buf) | ||
566 | +{ | ||
567 | + int i; | ||
568 | + | ||
569 | + for (i = 0; i < 32; i++) | ||
570 | + supply_register (regcache, i, (char *) buf + microblaze_regmap[i]); | ||
571 | +} | ||
572 | + | ||
573 | +#endif /* HAVE_PTRACE_GETREGS */ | ||
574 | +#endif | ||
575 | + | ||
576 | +static struct regset_info microblaze_regsets[] = { | ||
577 | +#if 0 | ||
578 | +#ifdef HAVE_PTRACE_GETREGS | ||
579 | + { PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t), GENERAL_REGS, microblaze_fill_gregset, microblaze_store_gregset }, | ||
580 | + { 0, 0, 0, -1, GENERAL_REGS, NULL, NULL }, | ||
581 | +#endif /* HAVE_PTRACE_GETREGS */ | ||
582 | +#endif | ||
583 | + { 0, 0, 0, -1, GENERAL_REGS, NULL, NULL }, | ||
584 | + NULL_REGSET | ||
585 | +}; | ||
586 | + | ||
587 | +static struct usrregs_info microblaze_usrregs_info = | ||
588 | + { | ||
589 | + microblaze_num_regs, | ||
590 | + microblaze_regmap, | ||
591 | + }; | ||
592 | + | ||
593 | +static struct regsets_info microblaze_regsets_info = | ||
594 | + { | ||
595 | + microblaze_regsets, /* regsets */ | ||
596 | + 0, /* num_regsets */ | ||
597 | + NULL, /* disabled_regsets */ | ||
598 | + }; | ||
599 | + | ||
600 | +static struct regs_info microblaze_regs_info = | ||
601 | + { | ||
602 | + NULL, /* regset_bitmap */ | ||
603 | + µblaze_usrregs_info, | ||
604 | + µblaze_regsets_info | ||
605 | + }; | ||
606 | + | ||
607 | +const regs_info * | ||
608 | +microblaze_target::get_regs_info (void) | ||
609 | +{ | ||
610 | + return µblaze_regs_info; | ||
611 | +} | ||
612 | + | ||
613 | +/* Support for hardware single step. */ | ||
614 | + | ||
615 | +static int | ||
616 | +microblaze_supports_hardware_single_step (void) | ||
617 | +{ | ||
618 | + return 1; | ||
619 | +} | ||
620 | + | ||
621 | + | ||
622 | +void | ||
623 | +microblaze_target::low_arch_setup (void) | ||
624 | +{ | ||
625 | + current_process ()->tdesc = tdesc_microblaze_linux; | ||
626 | +} | ||
627 | + | ||
628 | +linux_process_target *the_linux_target = &the_microblaze_target; | ||
629 | + | ||
630 | +void | ||
631 | +initialize_low_arch (void) | ||
632 | +{ | ||
633 | + init_registers_microblaze_linux (); | ||
634 | + initialize_regsets_info (µblaze_regsets_info); | ||
635 | +} | ||
636 | + | ||
637 | -- | ||
638 | 2.34.1 | ||
639 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch deleted file mode 100644 index 8d263de8..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 37d3afd2eaa95c89ad7cb5d0079b017752e4d0ea Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 23 Mar 2016 06:30:09 +0000 | ||
4 | Subject: [PATCH 2/9] mips-linux-nat: Define _ABIO32 if not defined | ||
5 | |||
6 | This helps building gdb on mips64 on musl, since | ||
7 | musl does not provide sgidefs.h this define is | ||
8 | only defined when GCC is using o32 ABI, in that | ||
9 | case gcc emits it as built-in define and hence | ||
10 | it works ok for mips32 | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | gdb/mips-linux-nat.c | 4 ++++ | ||
16 | 1 file changed, 4 insertions(+) | ||
17 | |||
18 | diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c | ||
19 | index 20e12b6889e..6adc61235aa 100644 | ||
20 | --- a/gdb/mips-linux-nat.c | ||
21 | +++ b/gdb/mips-linux-nat.c | ||
22 | @@ -41,6 +41,10 @@ | ||
23 | #ifndef PTRACE_GET_THREAD_AREA | ||
24 | #define PTRACE_GET_THREAD_AREA 25 | ||
25 | #endif | ||
26 | +/* musl does not define and relies on compiler built-in macros for it */ | ||
27 | +#ifndef _ABIO32 | ||
28 | +#define _ABIO32 1 | ||
29 | +#endif | ||
30 | |||
31 | class mips_linux_nat_target final : public linux_nat_trad_target | ||
32 | { | ||
33 | -- | ||
34 | 2.36.1 | ||
35 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0003-Fix-debug-message-when-register-is-unavailable.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0003-Fix-debug-message-when-register-is-unavailable.patch deleted file mode 100644 index d8ba6fca..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0003-Fix-debug-message-when-register-is-unavailable.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 6ecb1de66a6a5f55e69c9b108a3d5a85b0ebf315 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan.rossi@petalogix.com> | ||
3 | Date: Tue, 8 May 2012 18:11:17 +1000 | ||
4 | Subject: [PATCH 3/8] Fix debug message when register is unavailable | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
9 | |||
10 | Conflicts: | ||
11 | gdb/frame.c | ||
12 | --- | ||
13 | gdb/frame.c | 21 ++++++++++++++------- | ||
14 | 1 file changed, 14 insertions(+), 7 deletions(-) | ||
15 | |||
16 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
17 | index ce95cf8343b..c49ab9feab2 100644 | ||
18 | --- a/gdb/frame.c | ||
19 | +++ b/gdb/frame.c | ||
20 | @@ -1261,13 +1261,20 @@ frame_unwind_register_value (frame_info *next_frame, int regnum) | ||
21 | else | ||
22 | { | ||
23 | int i; | ||
24 | - gdb::array_view<const gdb_byte> buf = value_contents (value); | ||
25 | - | ||
26 | - fprintf_unfiltered (&debug_file, " bytes="); | ||
27 | - fprintf_unfiltered (&debug_file, "["); | ||
28 | - for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
29 | - fprintf_unfiltered (&debug_file, "%02x", buf[i]); | ||
30 | - fprintf_unfiltered (&debug_file, "]"); | ||
31 | + const gdb_byte *buf = NULL; | ||
32 | + if (value_entirely_available(value)) { | ||
33 | + gdb::array_view<const gdb_byte> buf = value_contents (value); | ||
34 | + } | ||
35 | + | ||
36 | + fprintf_unfiltered (gdb_stdlog, " bytes="); | ||
37 | + fprintf_unfiltered (gdb_stdlog, "["); | ||
38 | + if (buf != NULL) { | ||
39 | + for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
40 | + fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]); | ||
41 | + } else { | ||
42 | + fprintf_unfiltered (gdb_stdlog, "unavailable"); | ||
43 | + } | ||
44 | + fprintf_unfiltered (gdb_stdlog, "]"); | ||
45 | } | ||
46 | } | ||
47 | |||
48 | -- | ||
49 | 2.37.1 (Apple Git-137.1) | ||
50 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0003-Initial-port-of-core-reading-support-Added-support-f.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0003-Initial-port-of-core-reading-support-Added-support-f.patch new file mode 100644 index 00000000..6e86a773 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0003-Initial-port-of-core-reading-support-Added-support-f.patch | |||
@@ -0,0 +1,301 @@ | |||
1 | From 118ce6c252a56ca592a7fdd40919522be00d5fb4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 16:37:53 +0530 | ||
4 | Subject: [PATCH 03/54] Initial port of core reading support Added support for | ||
5 | reading notes in linux core dumps Support for reading of PRSTATUS and PSINFO | ||
6 | information for rebuilding ".reg" sections of core dumps at run time. | ||
7 | |||
8 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
9 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
10 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/elf32-microblaze.c | 84 +++++++++++++++++++++++++++++++++++++ | ||
14 | gdb/configure.tgt | 2 +- | ||
15 | gdb/microblaze-linux-tdep.c | 17 +++++++- | ||
16 | gdb/microblaze-tdep.c | 48 +++++++++++++++++++++ | ||
17 | gdb/microblaze-tdep.h | 28 +++++++++++++ | ||
18 | 5 files changed, 177 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
21 | index a7e81c70fc8..487ddeafc5a 100644 | ||
22 | --- a/bfd/elf32-microblaze.c | ||
23 | +++ b/bfd/elf32-microblaze.c | ||
24 | @@ -754,6 +754,87 @@ microblaze_elf_is_local_label_name (bfd *abfd, const char *name) | ||
25 | return _bfd_elf_is_local_label_name (abfd, name); | ||
26 | } | ||
27 | |||
28 | +/* Support for core dump NOTE sections. */ | ||
29 | +static bool | ||
30 | +microblaze_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) | ||
31 | +{ | ||
32 | + int offset; | ||
33 | + unsigned int size; | ||
34 | + | ||
35 | + switch (note->descsz) | ||
36 | + { | ||
37 | + default: | ||
38 | + return false; | ||
39 | + | ||
40 | + case 228: /* Linux/MicroBlaze */ | ||
41 | + /* pr_cursig */ | ||
42 | + elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12); | ||
43 | + | ||
44 | + /* pr_pid */ | ||
45 | + elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24); | ||
46 | + | ||
47 | + /* pr_reg */ | ||
48 | + offset = 72; | ||
49 | + size = 50 * 4; | ||
50 | + | ||
51 | + break; | ||
52 | + } | ||
53 | + | ||
54 | + /* Make a ".reg/999" section. */ | ||
55 | + return _bfd_elfcore_make_pseudosection (abfd, ".reg", | ||
56 | + size, note->descpos + offset); | ||
57 | +} | ||
58 | + | ||
59 | +static bool | ||
60 | +microblaze_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) | ||
61 | +{ | ||
62 | + switch (note->descsz) | ||
63 | + { | ||
64 | + default: | ||
65 | + return false; | ||
66 | + | ||
67 | + case 128: /* Linux/MicroBlaze elf_prpsinfo */ | ||
68 | + elf_tdata (abfd)->core->program | ||
69 | + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16); | ||
70 | + elf_tdata (abfd)->core->command | ||
71 | + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80); | ||
72 | + } | ||
73 | + | ||
74 | + /* Note that for some reason, a spurious space is tacked | ||
75 | + onto the end of the args in some (at least one anyway) | ||
76 | + implementations, so strip it off if it exists. */ | ||
77 | + | ||
78 | + { | ||
79 | + char *command = elf_tdata (abfd)->core->command; | ||
80 | + int n = strlen (command); | ||
81 | + | ||
82 | + if (0 < n && command[n - 1] == ' ') | ||
83 | + command[n - 1] = '\0'; | ||
84 | + } | ||
85 | + | ||
86 | + return true; | ||
87 | +} | ||
88 | + | ||
89 | +/* The microblaze linker (like many others) needs to keep track of | ||
90 | + the number of relocs that it decides to copy as dynamic relocs in | ||
91 | + check_relocs for each symbol. This is so that it can later discard | ||
92 | + them if they are found to be unnecessary. We store the information | ||
93 | + in a field extending the regular ELF linker hash table. */ | ||
94 | + | ||
95 | +struct elf32_mb_dyn_relocs | ||
96 | +{ | ||
97 | + struct elf32_mb_dyn_relocs *next; | ||
98 | + | ||
99 | + /* The input section of the reloc. */ | ||
100 | + asection *sec; | ||
101 | + | ||
102 | + /* Total number of relocs copied for the input section. */ | ||
103 | + bfd_size_type count; | ||
104 | + | ||
105 | + /* Number of pc-relative relocs copied for the input section. */ | ||
106 | + bfd_size_type pc_count; | ||
107 | +}; | ||
108 | + | ||
109 | /* ELF linker hash entry. */ | ||
110 | |||
111 | struct elf32_mb_link_hash_entry | ||
112 | @@ -3480,4 +3561,7 @@ microblaze_elf_add_symbol_hook (bfd *abfd, | ||
113 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | ||
114 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | ||
115 | |||
116 | +#define elf_backend_grok_prstatus microblaze_elf_grok_prstatus | ||
117 | +#define elf_backend_grok_psinfo microblaze_elf_grok_psinfo | ||
118 | + | ||
119 | #include "elf32-target.h" | ||
120 | diff --git a/gdb/configure.tgt b/gdb/configure.tgt | ||
121 | index 47a674201f9..d0673abd2b8 100644 | ||
122 | --- a/gdb/configure.tgt | ||
123 | +++ b/gdb/configure.tgt | ||
124 | @@ -415,7 +415,7 @@ mep-*-*) | ||
125 | |||
126 | microblaze*-linux-*|microblaze*-*-linux*) | ||
127 | # Target: Xilinx MicroBlaze running Linux | ||
128 | - gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o solib-svr4.o \ | ||
129 | + gdb_target_obs="microblaze-tdep.o microblaze-linux-tdep.o solib-svr4.o glibc-tdep.o \ | ||
130 | symfile-mem.o linux-tdep.o" | ||
131 | ;; | ||
132 | microblaze*-*-*) | ||
133 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
134 | index 9160b4ad464..17bcb50fd4f 100644 | ||
135 | --- a/gdb/microblaze-linux-tdep.c | ||
136 | +++ b/gdb/microblaze-linux-tdep.c | ||
137 | @@ -36,6 +36,7 @@ | ||
138 | #include "frame-unwind.h" | ||
139 | #include "tramp-frame.h" | ||
140 | #include "linux-tdep.h" | ||
141 | +#include "glibc-tdep.h" | ||
142 | |||
143 | static int microblaze_debug_flag = 0; | ||
144 | |||
145 | @@ -135,11 +136,14 @@ static struct tramp_frame microblaze_linux_sighandler_tramp_frame = | ||
146 | microblaze_linux_sighandler_cache_init | ||
147 | }; | ||
148 | |||
149 | - | ||
150 | static void | ||
151 | microblaze_linux_init_abi (struct gdbarch_info info, | ||
152 | struct gdbarch *gdbarch) | ||
153 | { | ||
154 | + struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
155 | + | ||
156 | + tdep->sizeof_gregset = 200; | ||
157 | + | ||
158 | linux_init_abi (info, gdbarch, 0); | ||
159 | |||
160 | set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
161 | @@ -153,6 +157,17 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
162 | tramp_frame_prepend_unwinder (gdbarch, | ||
163 | µblaze_linux_sighandler_tramp_frame); | ||
164 | |||
165 | + /* BFD target for core files. */ | ||
166 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
167 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
168 | + else | ||
169 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
170 | + | ||
171 | + | ||
172 | + /* Shared library handling. */ | ||
173 | + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
174 | + set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); | ||
175 | + | ||
176 | /* Enable TLS support. */ | ||
177 | set_gdbarch_fetch_tls_load_module_address (gdbarch, | ||
178 | svr4_fetch_objfile_link_map); | ||
179 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
180 | index 28a647e940b..6ab36bd746b 100644 | ||
181 | --- a/gdb/microblaze-tdep.c | ||
182 | +++ b/gdb/microblaze-tdep.c | ||
183 | @@ -665,6 +665,43 @@ microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
184 | tdesc_microblaze_with_stack_protect); | ||
185 | } | ||
186 | |||
187 | +void | ||
188 | +microblaze_supply_gregset (const struct regset *regset, | ||
189 | + struct regcache *regcache, | ||
190 | + int regnum, const void *gregs) | ||
191 | +{ | ||
192 | + const unsigned int *regs = (const unsigned int *)gregs; | ||
193 | + if (regnum >= 0) | ||
194 | + regcache->raw_supply (regnum, regs + regnum); | ||
195 | + | ||
196 | + if (regnum == -1) { | ||
197 | + int i; | ||
198 | + | ||
199 | + for (i = 0; i < 50; i++) { | ||
200 | + regcache->raw_supply (i, regs + i); | ||
201 | + } | ||
202 | + } | ||
203 | +} | ||
204 | + | ||
205 | + | ||
206 | +/* Return the appropriate register set for the core section identified | ||
207 | + by SECT_NAME and SECT_SIZE. */ | ||
208 | + | ||
209 | +static void | ||
210 | +microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
211 | + iterate_over_regset_sections_cb *cb, | ||
212 | + void *cb_data, | ||
213 | + const struct regcache *regcache) | ||
214 | +{ | ||
215 | + struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
216 | + | ||
217 | + cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
218 | + | ||
219 | + cb(".reg2", tdep->sizeof_fpregset, tdep->sizeof_fpregset, tdep->fpregset, NULL, cb_data); | ||
220 | +} | ||
221 | + | ||
222 | + | ||
223 | + | ||
224 | static struct gdbarch * | ||
225 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
226 | { | ||
227 | @@ -716,6 +753,10 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
228 | gdbarch *gdbarch | ||
229 | = gdbarch_alloc (&info, gdbarch_tdep_up (new microblaze_gdbarch_tdep)); | ||
230 | |||
231 | + tdep->gregset = NULL; | ||
232 | + tdep->sizeof_gregset = 0; | ||
233 | + tdep->fpregset = NULL; | ||
234 | + tdep->sizeof_fpregset = 0; | ||
235 | set_gdbarch_long_double_bit (gdbarch, 128); | ||
236 | |||
237 | set_gdbarch_num_regs (gdbarch, MICROBLAZE_NUM_REGS); | ||
238 | @@ -764,6 +805,13 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
239 | frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer); | ||
240 | if (tdesc_data != NULL) | ||
241 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); | ||
242 | + //frame_base_append_sniffer (gdbarch, microblaze_frame_sniffer); | ||
243 | + | ||
244 | + /* If we have register sets, enable the generic core file support. */ | ||
245 | + if (tdep->gregset) { | ||
246 | + set_gdbarch_iterate_over_regset_sections (gdbarch, | ||
247 | + microblaze_iterate_over_regset_sections); | ||
248 | + } | ||
249 | |||
250 | return gdbarch; | ||
251 | } | ||
252 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
253 | index e9f57e97c26..738da4f0531 100644 | ||
254 | --- a/gdb/microblaze-tdep.h | ||
255 | +++ b/gdb/microblaze-tdep.h | ||
256 | @@ -23,8 +23,23 @@ | ||
257 | #include "gdbarch.h" | ||
258 | |||
259 | /* Microblaze architecture-specific information. */ | ||
260 | +struct microblaze_gregset | ||
261 | +{ | ||
262 | + microblaze_gregset() {} | ||
263 | + unsigned int gregs[32]; | ||
264 | + unsigned int fpregs[32]; | ||
265 | + unsigned int pregs[16]; | ||
266 | +}; | ||
267 | + | ||
268 | struct microblaze_gdbarch_tdep : gdbarch_tdep_base | ||
269 | { | ||
270 | + int dummy; // declare something. | ||
271 | + | ||
272 | + /* Register sets. */ | ||
273 | + struct regset *gregset; | ||
274 | + size_t sizeof_gregset; | ||
275 | + struct regset *fpregset; | ||
276 | + size_t sizeof_fpregset; | ||
277 | }; | ||
278 | |||
279 | /* Register numbers. */ | ||
280 | @@ -121,5 +136,18 @@ struct microblaze_frame_cache | ||
281 | #define MICROBLAZE_BREAKPOINT {0xba, 0x0c, 0x00, 0x18} | ||
282 | #define MICROBLAZE_BREAKPOINT_LE {0x18, 0x00, 0x0c, 0xba} | ||
283 | |||
284 | +extern void microblaze_supply_gregset (const struct regset *regset, | ||
285 | + struct regcache *regcache, | ||
286 | + int regnum, const void *gregs); | ||
287 | +extern void microblaze_collect_gregset (const struct regset *regset, | ||
288 | + const struct regcache *regcache, | ||
289 | + int regnum, void *gregs); | ||
290 | +extern void microblaze_supply_fpregset (struct regcache *regcache, | ||
291 | + int regnum, const void *fpregs); | ||
292 | +extern void microblaze_collect_fpregset (const struct regcache *regcache, | ||
293 | + int regnum, void *fpregs); | ||
294 | + | ||
295 | +extern const struct regset * microblaze_regset_from_core_section (struct gdbarch *gdbarch, | ||
296 | + const char *sect_name, size_t sect_size); | ||
297 | |||
298 | #endif /* microblaze-tdep.h */ | ||
299 | -- | ||
300 | 2.34.1 | ||
301 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch deleted file mode 100644 index 7e09404b..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From e689eec672ee8c53b3adb2ade2b5deb9b7cd99d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 30 Apr 2016 18:32:14 -0700 | ||
4 | Subject: [PATCH 3/9] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | gdb/nat/ppc-linux.h | 6 ++++++ | ||
11 | gdbserver/linux-ppc-low.cc | 6 ++++++ | ||
12 | 2 files changed, 12 insertions(+) | ||
13 | |||
14 | diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h | ||
15 | index 1094f6b0be3..d8588a646c2 100644 | ||
16 | --- a/gdb/nat/ppc-linux.h | ||
17 | +++ b/gdb/nat/ppc-linux.h | ||
18 | @@ -18,7 +18,13 @@ | ||
19 | #ifndef NAT_PPC_LINUX_H | ||
20 | #define NAT_PPC_LINUX_H | ||
21 | |||
22 | +#if !defined(__GLIBC__) | ||
23 | +# define pt_regs uapi_pt_regs | ||
24 | +#endif | ||
25 | #include <asm/ptrace.h> | ||
26 | +#if !defined(__GLIBC__) | ||
27 | +# undef pt_regs | ||
28 | +#endif | ||
29 | #include <asm/cputable.h> | ||
30 | |||
31 | /* This sometimes isn't defined. */ | ||
32 | diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc | ||
33 | index 08824887003..69afbae5359 100644 | ||
34 | --- a/gdbserver/linux-ppc-low.cc | ||
35 | +++ b/gdbserver/linux-ppc-low.cc | ||
36 | @@ -23,7 +23,13 @@ | ||
37 | #include "elf/common.h" | ||
38 | #include <sys/uio.h> | ||
39 | #include <elf.h> | ||
40 | +#if !defined(__GLIBC__) | ||
41 | +# define pt_regs uapi_pt_regs | ||
42 | +#endif | ||
43 | #include <asm/ptrace.h> | ||
44 | +#if !defined(__GLIBC__) | ||
45 | +# undef pt_regs | ||
46 | +#endif | ||
47 | |||
48 | #include "arch/ppc-linux-common.h" | ||
49 | #include "arch/ppc-linux-tdesc.h" | ||
50 | -- | ||
51 | 2.36.1 | ||
52 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch deleted file mode 100644 index a1e85e91..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 15ee6a626242efb8f367be49c13e00d0b72317f0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 30 Apr 2016 15:25:03 -0700 | ||
4 | Subject: [PATCH 4/9] Dont disable libreadline.a when using --disable-static | ||
5 | |||
6 | If gdb is configured with --disable-static then this is dutifully passed to | ||
7 | readline which then disables libreadline.a, which causes a problem when gdb | ||
8 | tries to link against that. | ||
9 | |||
10 | To ensure that readline always builds static libraries, pass --enable-static to | ||
11 | the sub-configure. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | Makefile.def | 3 ++- | ||
18 | Makefile.in | 2 +- | ||
19 | 2 files changed, 3 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/Makefile.def b/Makefile.def | ||
22 | index acdcd625ed6..78fc31e1199 100644 | ||
23 | --- a/Makefile.def | ||
24 | +++ b/Makefile.def | ||
25 | @@ -120,7 +120,8 @@ host_modules= { module= libiconv; | ||
26 | missing= install-html; | ||
27 | missing= install-info; }; | ||
28 | host_modules= { module= m4; }; | ||
29 | -host_modules= { module= readline; }; | ||
30 | +host_modules= { module= readline; | ||
31 | + extra_configure_flags='--enable-static';}; | ||
32 | host_modules= { module= sid; }; | ||
33 | host_modules= { module= sim; }; | ||
34 | host_modules= { module= texinfo; no_install= true; }; | ||
35 | diff --git a/Makefile.in b/Makefile.in | ||
36 | index 3aacd2daac9..aa58adada4a 100644 | ||
37 | --- a/Makefile.in | ||
38 | +++ b/Makefile.in | ||
39 | @@ -32791,7 +32791,7 @@ configure-readline: | ||
40 | $$s/$$module_srcdir/configure \ | ||
41 | --srcdir=$${topdir}/$$module_srcdir \ | ||
42 | $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ | ||
43 | - --target=${target_alias} \ | ||
44 | + --target=${target_alias} --enable-static \ | ||
45 | || exit 1 | ||
46 | @endif readline | ||
47 | |||
48 | -- | ||
49 | 2.36.1 | ||
50 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Fix-debug-message-when-register-is-unavailable.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Fix-debug-message-when-register-is-unavailable.patch new file mode 100644 index 00000000..1e6aff76 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Fix-debug-message-when-register-is-unavailable.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From a027a1ce861f93bd00d814d6aef28414069330a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan.rossi@petalogix.com> | ||
3 | Date: Tue, 8 May 2012 18:11:17 +1000 | ||
4 | Subject: [PATCH 04/54] Fix debug message when register is unavailable | ||
5 | |||
6 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
7 | |||
8 | Conflicts: | ||
9 | gdb/frame.c | ||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | gdb/frame.c | 14 +++++++++++--- | ||
13 | 1 file changed, 11 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
16 | index 87fb3d7a2d5..c4d967e01d5 100644 | ||
17 | --- a/gdb/frame.c | ||
18 | +++ b/gdb/frame.c | ||
19 | @@ -1313,12 +1313,20 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum) | ||
20 | else | ||
21 | { | ||
22 | int i; | ||
23 | - gdb::array_view<const gdb_byte> buf = value->contents (); | ||
24 | + | ||
25 | + const gdb_byte *buf = NULL; | ||
26 | + if (value_entirely_available(value)) { | ||
27 | + gdb::array_view<const gdb_byte> buf = value->contents (); | ||
28 | + } | ||
29 | |||
30 | gdb_printf (&debug_file, " bytes="); | ||
31 | gdb_printf (&debug_file, "["); | ||
32 | - for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
33 | - gdb_printf (&debug_file, "%02x", buf[i]); | ||
34 | + if (buf != NULL) { | ||
35 | + for (i = 0; i < register_size (gdbarch, regnum); i++) | ||
36 | + gdb_printf (&debug_file, "%02x", buf[i]); | ||
37 | + } else { | ||
38 | + gdb_printf (&debug_file, "unavailable"); | ||
39 | + } | ||
40 | gdb_printf (&debug_file, "]"); | ||
41 | } | ||
42 | } | ||
43 | -- | ||
44 | 2.34.1 | ||
45 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0005-MicroBlaze-native-gdb-port.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0005-MicroBlaze-native-gdb-port.patch new file mode 100644 index 00000000..a9c6aee4 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0005-MicroBlaze-native-gdb-port.patch | |||
@@ -0,0 +1,834 @@ | |||
1 | From 2e84106b932f40eeaa4ae40b441b9eb7b713b2fa Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 18:53:46 +0530 | ||
4 | Subject: [PATCH 05/54] MicroBlaze native gdb port. | ||
5 | |||
6 | signed-off-by : Mahesh Bodapati <mbodapat@amd.com> | ||
7 | |||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | gdb/Makefile.in | 2 + | ||
11 | gdb/configure.nat | 4 + | ||
12 | gdb/features/microblaze-linux.c | 79 +++++++ | ||
13 | gdb/microblaze-linux-nat.c | 366 ++++++++++++++++++++++++++++++++ | ||
14 | gdb/microblaze-linux-tdep.c | 2 + | ||
15 | gdb/microblaze-linux-tdep.h | 24 +++ | ||
16 | gdb/microblaze-tdep.c | 151 ++++++++++++- | ||
17 | gdb/microblaze-tdep.h | 15 +- | ||
18 | 8 files changed, 629 insertions(+), 14 deletions(-) | ||
19 | create mode 100755 gdb/features/microblaze-linux.c | ||
20 | create mode 100755 gdb/microblaze-linux-nat.c | ||
21 | create mode 100644 gdb/microblaze-linux-tdep.h | ||
22 | |||
23 | diff --git a/gdb/Makefile.in b/gdb/Makefile.in | ||
24 | index 9c0a0bff2cd..1ad975b50ae 100644 | ||
25 | --- a/gdb/Makefile.in | ||
26 | +++ b/gdb/Makefile.in | ||
27 | @@ -1406,6 +1406,7 @@ HFILES_NO_SRCDIR = \ | ||
28 | memory-map.h \ | ||
29 | memrange.h \ | ||
30 | microblaze-tdep.h \ | ||
31 | + microblaze-linux-tdep.h \ | ||
32 | mips-linux-tdep.h \ | ||
33 | mips-netbsd-tdep.h \ | ||
34 | mips-tdep.h \ | ||
35 | @@ -1754,6 +1755,7 @@ ALLDEPFILES = \ | ||
36 | m68k-linux-nat.c \ | ||
37 | m68k-linux-tdep.c \ | ||
38 | m68k-tdep.c \ | ||
39 | + microblaze-linux-nat.c \ | ||
40 | microblaze-linux-tdep.c \ | ||
41 | microblaze-tdep.c \ | ||
42 | mingw-hdep.c \ | ||
43 | diff --git a/gdb/configure.nat b/gdb/configure.nat | ||
44 | index 1dc4206b69c..05003e57020 100644 | ||
45 | --- a/gdb/configure.nat | ||
46 | +++ b/gdb/configure.nat | ||
47 | @@ -274,6 +274,10 @@ case ${gdb_host} in | ||
48 | # Host: Motorola m68k running GNU/Linux. | ||
49 | NATDEPFILES="${NATDEPFILES} m68k-linux-nat.o" | ||
50 | ;; | ||
51 | + microblaze) | ||
52 | + # Host: Microblaze running GNU/Linux. | ||
53 | + NATDEPFILES="${NATDEPFILES} microblaze-linux-nat.o" | ||
54 | + ;; | ||
55 | mips) | ||
56 | # Host: Linux/MIPS | ||
57 | NATDEPFILES="${NATDEPFILES} linux-nat-trad.o \ | ||
58 | diff --git a/gdb/features/microblaze-linux.c b/gdb/features/microblaze-linux.c | ||
59 | new file mode 100755 | ||
60 | index 00000000000..267e12f6d59 | ||
61 | --- /dev/null | ||
62 | +++ b/gdb/features/microblaze-linux.c | ||
63 | @@ -0,0 +1,79 @@ | ||
64 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
65 | + Original: microblaze.xml */ | ||
66 | + | ||
67 | +#include "defs.h" | ||
68 | +#include "osabi.h" | ||
69 | +#include "target-descriptions.h" | ||
70 | + | ||
71 | +struct target_desc *tdesc_microblaze_linux; | ||
72 | +static void | ||
73 | +initialize_tdesc_microblaze_linux (void) | ||
74 | +{ | ||
75 | + target_desc_up result = allocate_target_description (); | ||
76 | + struct tdesc_feature *feature; | ||
77 | + set_tdesc_architecture (result.get(), bfd_scan_arch ("microblaze")); | ||
78 | + set_tdesc_osabi (result.get(), osabi_from_tdesc_string ("GNU/Linux")); | ||
79 | + | ||
80 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze.core"); | ||
81 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
82 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
83 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
84 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
85 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
86 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 32, "int"); | ||
87 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 32, "int"); | ||
88 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 32, "int"); | ||
89 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 32, "int"); | ||
90 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 32, "int"); | ||
91 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 32, "int"); | ||
92 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 32, "int"); | ||
93 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 32, "int"); | ||
94 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 32, "int"); | ||
95 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 32, "int"); | ||
96 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 32, "int"); | ||
97 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 32, "int"); | ||
98 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 32, "int"); | ||
99 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 32, "int"); | ||
100 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 32, "int"); | ||
101 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 32, "int"); | ||
102 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 32, "int"); | ||
103 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 32, "int"); | ||
104 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 32, "int"); | ||
105 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 32, "int"); | ||
106 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 32, "int"); | ||
107 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 32, "int"); | ||
108 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 32, "int"); | ||
109 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 32, "int"); | ||
110 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
111 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
112 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
113 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
114 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
115 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
116 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
117 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
118 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 32, "int"); | ||
119 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
120 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
121 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
122 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
123 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
124 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
125 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
126 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
127 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 32, "int"); | ||
128 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 32, "int"); | ||
129 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
130 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
131 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
132 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
133 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
134 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
135 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
136 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
137 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
138 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
139 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
140 | + | ||
141 | + tdesc_microblaze_linux = result.release(); | ||
142 | +} | ||
143 | diff --git a/gdb/microblaze-linux-nat.c b/gdb/microblaze-linux-nat.c | ||
144 | new file mode 100755 | ||
145 | index 00000000000..a348001a3e2 | ||
146 | --- /dev/null | ||
147 | +++ b/gdb/microblaze-linux-nat.c | ||
148 | @@ -0,0 +1,366 @@ | ||
149 | +/* Native-dependent code for GNU/Linux MicroBlaze. | ||
150 | + Copyright (C) 2021 Free Software Foundation, Inc. | ||
151 | + | ||
152 | + This file is part of GDB. | ||
153 | + | ||
154 | + This program is free software; you can redistribute it and/or modify | ||
155 | + it under the terms of the GNU General Public License as published by | ||
156 | + the Free Software Foundation; either version 3 of the License, or | ||
157 | + (at your option) any later version. | ||
158 | + | ||
159 | + This program is distributed in the hope that it will be useful, | ||
160 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
161 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
162 | + GNU General Public License for more details. | ||
163 | + | ||
164 | + You should have received a copy of the GNU General Public License | ||
165 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
166 | + | ||
167 | +#include "defs.h" | ||
168 | +#include "arch-utils.h" | ||
169 | +#include "dis-asm.h" | ||
170 | +#include "frame.h" | ||
171 | +#include "trad-frame.h" | ||
172 | +#include "symtab.h" | ||
173 | +#include "value.h" | ||
174 | +#include "gdbcmd.h" | ||
175 | +#include "breakpoint.h" | ||
176 | +#include "inferior.h" | ||
177 | +#include "gdbthread.h" | ||
178 | +#include "gdbcore.h" | ||
179 | +#include "regcache.h" | ||
180 | +#include "regset.h" | ||
181 | +#include "target.h" | ||
182 | +#include "frame.h" | ||
183 | +#include "frame-base.h" | ||
184 | +#include "frame-unwind.h" | ||
185 | +#include "osabi.h" | ||
186 | +#include "gdbsupport/gdb_assert.h" | ||
187 | +#include <string.h> | ||
188 | +#include "target-descriptions.h" | ||
189 | +#include "opcodes/microblaze-opcm.h" | ||
190 | +#include "opcodes/microblaze-dis.h" | ||
191 | +#include "gregset.h" | ||
192 | + | ||
193 | +#include "linux-nat.h" | ||
194 | +#include "linux-tdep.h" | ||
195 | +#include "target-descriptions.h" | ||
196 | + | ||
197 | +#include <sys/user.h> | ||
198 | +#include <sys/ioctl.h> | ||
199 | +#include <sys/uio.h> | ||
200 | +#include "gdbsupport/gdb_wait.h" | ||
201 | +#include <fcntl.h> | ||
202 | +#include <sys/procfs.h> | ||
203 | +#include "nat/gdb_ptrace.h" | ||
204 | +#include "nat/linux-ptrace.h" | ||
205 | +#include "inf-ptrace.h" | ||
206 | +#include <algorithm> | ||
207 | +#include <unordered_map> | ||
208 | +#include <list> | ||
209 | +#include <sys/ptrace.h> | ||
210 | + | ||
211 | +/* Prototypes for supply_gregset etc. */ | ||
212 | +#include "gregset.h" | ||
213 | + | ||
214 | +#include "microblaze-tdep.h" | ||
215 | +#include "microblaze-linux-tdep.h" | ||
216 | +#include "inferior.h" | ||
217 | + | ||
218 | +#include "elf/common.h" | ||
219 | + | ||
220 | +#include "auxv.h" | ||
221 | +#include "linux-tdep.h" | ||
222 | + | ||
223 | +#include <sys/ptrace.h> | ||
224 | + | ||
225 | + | ||
226 | +//int have_ptrace_getsetregs=1; | ||
227 | + | ||
228 | +/* MicroBlaze Linux native additions to the default linux support. */ | ||
229 | + | ||
230 | +class microblaze_linux_nat_target final : public linux_nat_target | ||
231 | +{ | ||
232 | +public: | ||
233 | + /* Add our register access methods. */ | ||
234 | + void fetch_registers (struct regcache *regcache, int regnum) override; | ||
235 | + void store_registers (struct regcache *regcache, int regnum) override; | ||
236 | + | ||
237 | + /* Read suitable target description. */ | ||
238 | + const struct target_desc *read_description () override; | ||
239 | +}; | ||
240 | + | ||
241 | +static microblaze_linux_nat_target the_microblaze_linux_nat_target; | ||
242 | + | ||
243 | +static int | ||
244 | +microblaze_register_u_addr (struct gdbarch *gdbarch, int regno) | ||
245 | +{ | ||
246 | + int u_addr = -1; | ||
247 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | ||
248 | + /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace | ||
249 | + * interface, and not the wordsize of the program's ABI. */ | ||
250 | + int wordsize = sizeof (long); | ||
251 | + | ||
252 | + /* General purpose registers occupy 1 slot each in the buffer. */ | ||
253 | + if (regno >= MICROBLAZE_R0_REGNUM | ||
254 | + && regno <= MICROBLAZE_FSR_REGNUM) | ||
255 | + u_addr = ((regno - MICROBLAZE_R0_REGNUM)* wordsize); | ||
256 | + | ||
257 | + return u_addr; | ||
258 | +} | ||
259 | + | ||
260 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) | ||
261 | + from regset GREGS into REGCACHE. */ | ||
262 | + | ||
263 | +static void | ||
264 | +supply_gregset_regnum (struct regcache *regcache, const prgregset_t *gregs, | ||
265 | + int regnum) | ||
266 | +{ | ||
267 | + int i; | ||
268 | + const elf_greg_t *regp = *gregs; | ||
269 | + /* Access all registers */ | ||
270 | + if (regnum == -1) | ||
271 | + { | ||
272 | + /* We fill the general purpose registers. */ | ||
273 | + for (i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) | ||
274 | + regcache->raw_supply (i, regp + i); | ||
275 | + | ||
276 | + /* Supply MICROBLAZE_PC_REGNUM from index 32. */ | ||
277 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); | ||
278 | + | ||
279 | + /* Fill the inaccessible zero register with zero. */ | ||
280 | + regcache->raw_supply_zeroed (0); | ||
281 | + } | ||
282 | + else if (regnum == MICROBLAZE_R0_REGNUM) | ||
283 | + regcache->raw_supply_zeroed (0); | ||
284 | + else if (regnum == MICROBLAZE_PC_REGNUM) | ||
285 | + regcache->raw_supply (MICROBLAZE_PC_REGNUM, regp + 32); | ||
286 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) | ||
287 | + regcache->raw_supply (regnum, regp + regnum); | ||
288 | +} | ||
289 | + | ||
290 | +/* Copy all general purpose registers from regset GREGS into REGCACHE. */ | ||
291 | + | ||
292 | +void | ||
293 | +supply_gregset (struct regcache *regcache, const prgregset_t *gregs) | ||
294 | +{ | ||
295 | + supply_gregset_regnum (regcache, gregs, -1); | ||
296 | +} | ||
297 | + | ||
298 | +/* Copy general purpose register REGNUM (or all gp regs if REGNUM == -1) | ||
299 | + from REGCACHE into regset GREGS. */ | ||
300 | + | ||
301 | +void | ||
302 | +fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) | ||
303 | +{ | ||
304 | + elf_greg_t *regp = *gregs; | ||
305 | + if (regnum == -1) | ||
306 | + { | ||
307 | + /* We fill the general purpose registers. */ | ||
308 | + for (int i = MICROBLAZE_R0_REGNUM + 1; i < MICROBLAZE_FSR_REGNUM; i++) | ||
309 | + regcache->raw_collect (i, regp + i); | ||
310 | + | ||
311 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); | ||
312 | + } | ||
313 | + else if (regnum == MICROBLAZE_R0_REGNUM) | ||
314 | + /* Nothing to do here. */ | ||
315 | + ; | ||
316 | + else if (regnum > MICROBLAZE_R0_REGNUM && regnum < MICROBLAZE_FSR_REGNUM) | ||
317 | + regcache->raw_collect (regnum, regp + regnum); | ||
318 | + else if (regnum == MICROBLAZE_PC_REGNUM) | ||
319 | + regcache->raw_collect (MICROBLAZE_PC_REGNUM, regp + 32); | ||
320 | +} | ||
321 | + | ||
322 | +/* Transfering floating-point registers between GDB, inferiors and cores. | ||
323 | + Since MicroBlaze floating-point registers are the same as GPRs these do | ||
324 | + nothing. */ | ||
325 | + | ||
326 | +void | ||
327 | +supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregs) | ||
328 | +{ | ||
329 | +} | ||
330 | + | ||
331 | +void | ||
332 | +fill_fpregset (const struct regcache *regcache, | ||
333 | + gdb_fpregset_t *fpregs, int regno) | ||
334 | +{ | ||
335 | +} | ||
336 | + | ||
337 | + | ||
338 | +static void | ||
339 | +fetch_register (struct regcache *regcache, int tid, int regno) | ||
340 | +{ | ||
341 | + struct gdbarch *gdbarch = regcache->arch (); | ||
342 | + struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | ||
343 | + /* This isn't really an address. But ptrace thinks of it as one. */ | ||
344 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); | ||
345 | + int bytes_transferred; | ||
346 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; | ||
347 | + | ||
348 | + if (regaddr == -1) | ||
349 | + { | ||
350 | + memset (buf, '\0', register_size (gdbarch, regno)); /* Supply zeroes */ | ||
351 | + regcache->raw_supply (regno, buf); | ||
352 | + return; | ||
353 | + } | ||
354 | + | ||
355 | + /* Read the raw register using sizeof(long) sized chunks. On a | ||
356 | + * 32-bit platform, 64-bit floating-point registers will require two | ||
357 | + * transfers. */ | ||
358 | + for (bytes_transferred = 0; | ||
359 | + bytes_transferred < register_size (gdbarch, regno); | ||
360 | + bytes_transferred += sizeof (long)) | ||
361 | + { | ||
362 | + long l; | ||
363 | + | ||
364 | + errno = 0; | ||
365 | + l = ptrace (PTRACE_PEEKUSER, tid, (PTRACE_TYPE_ARG3) regaddr, 0); | ||
366 | + if (errno == EIO) | ||
367 | + { | ||
368 | + printf("ptrace io error\n"); | ||
369 | + } | ||
370 | + regaddr += sizeof (long); | ||
371 | + if (errno != 0) | ||
372 | + { | ||
373 | + char message[128]; | ||
374 | + sprintf (message, "reading register %s (#%d)", | ||
375 | + gdbarch_register_name (gdbarch, regno), regno); | ||
376 | + perror_with_name (message); | ||
377 | + } | ||
378 | + memcpy (&buf[bytes_transferred], &l, sizeof (l)); | ||
379 | + } | ||
380 | + | ||
381 | + /* Now supply the register. Keep in mind that the regcache's idea | ||
382 | + * of the register's size may not be a multiple of sizeof | ||
383 | + * (long). */ | ||
384 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) | ||
385 | + { | ||
386 | + /* Little-endian values are always found at the left end of the | ||
387 | + * bytes transferred. */ | ||
388 | + regcache->raw_supply (regno, buf); | ||
389 | + } | ||
390 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
391 | + { | ||
392 | + /* Big-endian values are found at the right end of the bytes | ||
393 | + * transferred. */ | ||
394 | + size_t padding = (bytes_transferred - register_size (gdbarch, regno)); | ||
395 | + regcache->raw_supply (regno, buf + padding); | ||
396 | + } | ||
397 | + else | ||
398 | + internal_error (__FILE__, __LINE__, | ||
399 | + _("fetch_register: unexpected byte order: %d"), | ||
400 | + gdbarch_byte_order (gdbarch)); | ||
401 | +} | ||
402 | + | ||
403 | + | ||
404 | +/* This is a wrapper for the fetch_all_gp_regs function. It is | ||
405 | + * responsible for verifying if this target has the ptrace request | ||
406 | + * that can be used to fetch all general-purpose registers at one | ||
407 | + * shot. If it doesn't, then we should fetch them using the | ||
408 | + * old-fashioned way, which is to iterate over the registers and | ||
409 | + * request them one by one. */ | ||
410 | +static void | ||
411 | +fetch_gp_regs (struct regcache *regcache, int tid) | ||
412 | +{ | ||
413 | + int i; | ||
414 | +/* If we've hit this point, it doesn't really matter which | ||
415 | + architecture we are using. We just need to read the | ||
416 | + registers in the "old-fashioned way". */ | ||
417 | + for (i = MICROBLAZE_R0_REGNUM; i <= MICROBLAZE_FSR_REGNUM; i++) | ||
418 | + fetch_register (regcache, tid, i); | ||
419 | +} | ||
420 | + | ||
421 | +/* Return a target description for the current target. */ | ||
422 | + | ||
423 | +const struct target_desc * | ||
424 | +microblaze_linux_nat_target::read_description () | ||
425 | +{ | ||
426 | + return tdesc_microblaze_linux; | ||
427 | +} | ||
428 | + | ||
429 | +/* Fetch REGNUM (or all registers if REGNUM == -1) from the target | ||
430 | + into REGCACHE using PTRACE_GETREGSET. */ | ||
431 | + | ||
432 | +void | ||
433 | +microblaze_linux_nat_target::fetch_registers (struct regcache * regcache, | ||
434 | + int regno) | ||
435 | +{ | ||
436 | + /* Get the thread id for the ptrace call. */ | ||
437 | + int tid = regcache->ptid ().lwp (); | ||
438 | +//int tid = get_ptrace_pid (regcache->ptid()); | ||
439 | +#if 1 | ||
440 | + if (regno == -1) | ||
441 | +#endif | ||
442 | + fetch_gp_regs (regcache, tid); | ||
443 | +#if 1 | ||
444 | + else | ||
445 | + fetch_register (regcache, tid, regno); | ||
446 | +#endif | ||
447 | +} | ||
448 | + | ||
449 | + | ||
450 | +/* Store REGNUM (or all registers if REGNUM == -1) to the target | ||
451 | + from REGCACHE using PTRACE_SETREGSET. */ | ||
452 | + | ||
453 | +void | ||
454 | +microblaze_linux_nat_target::store_registers (struct regcache *regcache, int regno) | ||
455 | +{ | ||
456 | + int tid; | ||
457 | + | ||
458 | + tid = get_ptrace_pid (regcache->ptid ()); | ||
459 | + | ||
460 | + struct gdbarch *gdbarch = regcache->arch (); | ||
461 | + /* This isn't really an address. But ptrace thinks of it as one. */ | ||
462 | + CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); | ||
463 | + int i; | ||
464 | + size_t bytes_to_transfer; | ||
465 | + char buf[MICROBLAZE_MAX_REGISTER_SIZE]; | ||
466 | + | ||
467 | + if (regaddr == -1) | ||
468 | + return; | ||
469 | + | ||
470 | + /* First collect the register. Keep in mind that the regcache's | ||
471 | + * idea of the register's size may not be a multiple of sizeof | ||
472 | + * (long). */ | ||
473 | + memset (buf, 0, sizeof buf); | ||
474 | + bytes_to_transfer = align_up (register_size (gdbarch, regno), sizeof (long)); | ||
475 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE) | ||
476 | + { | ||
477 | + /* Little-endian values always sit at the left end of the buffer. */ | ||
478 | + regcache->raw_collect (regno, buf); | ||
479 | + } | ||
480 | + else if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
481 | + { | ||
482 | + /* Big-endian values sit at the right end of the buffer. */ | ||
483 | + size_t padding = (bytes_to_transfer - register_size (gdbarch, regno)); | ||
484 | + regcache->raw_collect (regno, buf + padding); | ||
485 | + } | ||
486 | + | ||
487 | + for (i = 0; i < bytes_to_transfer; i += sizeof (long)) | ||
488 | + { | ||
489 | + long l; | ||
490 | + | ||
491 | + memcpy (&l, &buf[i], sizeof (l)); | ||
492 | + errno = 0; | ||
493 | + ptrace (PTRACE_POKEUSER, tid, (PTRACE_TYPE_ARG3) regaddr, l); | ||
494 | + regaddr += sizeof (long); | ||
495 | + | ||
496 | + if (errno != 0) | ||
497 | + { | ||
498 | + char message[128]; | ||
499 | + sprintf (message, "writing register %s (#%d)", | ||
500 | + gdbarch_register_name (gdbarch, regno), regno); | ||
501 | + perror_with_name (message); | ||
502 | + } | ||
503 | + } | ||
504 | +} | ||
505 | + | ||
506 | +void _initialize_microblaze_linux_nat (void); | ||
507 | + | ||
508 | +void | ||
509 | +_initialize_microblaze_linux_nat (void) | ||
510 | +{ | ||
511 | + /* Register the target. */ | ||
512 | + linux_target = &the_microblaze_linux_nat_target; | ||
513 | + add_inf_child_target (linux_target); | ||
514 | +} | ||
515 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
516 | index 17bcb50fd4f..5b57bb4d3ba 100644 | ||
517 | --- a/gdb/microblaze-linux-tdep.c | ||
518 | +++ b/gdb/microblaze-linux-tdep.c | ||
519 | @@ -37,6 +37,7 @@ | ||
520 | #include "tramp-frame.h" | ||
521 | #include "linux-tdep.h" | ||
522 | #include "glibc-tdep.h" | ||
523 | +#include "features/microblaze-linux.c" | ||
524 | |||
525 | static int microblaze_debug_flag = 0; | ||
526 | |||
527 | @@ -179,4 +180,5 @@ _initialize_microblaze_linux_tdep () | ||
528 | { | ||
529 | gdbarch_register_osabi (bfd_arch_microblaze, 0, GDB_OSABI_LINUX, | ||
530 | microblaze_linux_init_abi); | ||
531 | + initialize_tdesc_microblaze_linux (); | ||
532 | } | ||
533 | diff --git a/gdb/microblaze-linux-tdep.h b/gdb/microblaze-linux-tdep.h | ||
534 | new file mode 100644 | ||
535 | index 00000000000..a2c744e2961 | ||
536 | --- /dev/null | ||
537 | +++ b/gdb/microblaze-linux-tdep.h | ||
538 | @@ -0,0 +1,24 @@ | ||
539 | +/* Target-dependent code for GNU/Linux on OpenRISC. | ||
540 | + | ||
541 | + Copyright (C) 2021 Free Software Foundation, Inc. | ||
542 | + | ||
543 | + This file is part of GDB. | ||
544 | + | ||
545 | + This program is free software; you can redistribute it and/or modify | ||
546 | + it under the terms of the GNU General Public License as published by | ||
547 | + the Free Software Foundation; either version 3 of the License, or | ||
548 | + (at your option) any later version. | ||
549 | + | ||
550 | + This program is distributed in the hope that it will be useful, | ||
551 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
552 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
553 | + GNU General Public License for more details. | ||
554 | + | ||
555 | + You should have received a copy of the GNU General Public License | ||
556 | + along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
557 | +#ifndef MICROBLAZE_LINUX_TDEP_H | ||
558 | +#define MICROBLAZE_LINUX_TDEP_H | ||
559 | + /* Target descriptions. */ | ||
560 | + extern struct target_desc *tdesc_microblaze_linux; | ||
561 | + | ||
562 | +#endif /* MICROBLAZE_LINUX_TDEP_H */ | ||
563 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
564 | index 6ab36bd746b..066602b385a 100644 | ||
565 | --- a/gdb/microblaze-tdep.c | ||
566 | +++ b/gdb/microblaze-tdep.c | ||
567 | @@ -285,6 +285,7 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, | ||
568 | cache->frameless_p = 0; /* Frame found. */ | ||
569 | save_hidden_pointer_found = 0; | ||
570 | non_stack_instruction_found = 0; | ||
571 | + cache->register_offsets[rd] = -imm; | ||
572 | continue; | ||
573 | } | ||
574 | else if (IS_SPILL_SP(op, rd, ra)) | ||
575 | @@ -431,15 +432,17 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) | ||
576 | if (find_pc_partial_function (start_pc, NULL, &func_start, &func_end)) | ||
577 | { | ||
578 | sal = find_pc_line (func_start, 0); | ||
579 | - | ||
580 | - if (sal.end < func_end | ||
581 | - && start_pc <= sal.end) | ||
582 | + | ||
583 | + if (sal.line !=0 && sal.end <= func_end && start_pc <= sal.end) { | ||
584 | start_pc = sal.end; | ||
585 | + microblaze_debug("start_pc is %d\t sal.end is %d\t func_end is %d\t",start_pc,sal.end,func_end); | ||
586 | + } | ||
587 | } | ||
588 | |||
589 | ostart_pc = microblaze_analyze_prologue (gdbarch, func_start, 0xffffffffUL, | ||
590 | &cache); | ||
591 | |||
592 | + | ||
593 | if (ostart_pc > start_pc) | ||
594 | return ostart_pc; | ||
595 | return start_pc; | ||
596 | @@ -453,6 +456,7 @@ microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache) | ||
597 | struct microblaze_frame_cache *cache; | ||
598 | struct gdbarch *gdbarch = get_frame_arch (next_frame); | ||
599 | int rn; | ||
600 | + CORE_ADDR current_pc; | ||
601 | |||
602 | if (*this_cache) | ||
603 | return (struct microblaze_frame_cache *) *this_cache; | ||
604 | @@ -466,10 +470,17 @@ microblaze_frame_cache (frame_info_ptr next_frame, void **this_cache) | ||
605 | cache->register_offsets[rn] = -1; | ||
606 | |||
607 | /* Call for side effects. */ | ||
608 | - get_frame_func (next_frame); | ||
609 | - | ||
610 | - cache->pc = get_frame_address_in_block (next_frame); | ||
611 | - | ||
612 | + cache->pc = get_frame_func (next_frame); | ||
613 | + | ||
614 | +// cache->pc = get_frame_address_in_block (next_frame); | ||
615 | + current_pc = get_frame_pc (next_frame); | ||
616 | + if (cache->pc) | ||
617 | + microblaze_analyze_prologue (gdbarch, cache->pc, current_pc, cache); | ||
618 | + | ||
619 | + cache->saved_sp = cache->base + cache->framesize; | ||
620 | + cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM] = cache->base; | ||
621 | + cache->register_offsets[MICROBLAZE_SP_REGNUM] = cache->saved_sp; | ||
622 | + | ||
623 | return cache; | ||
624 | } | ||
625 | |||
626 | @@ -494,6 +505,25 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, | ||
627 | struct microblaze_frame_cache *cache = | ||
628 | microblaze_frame_cache (this_frame, this_cache); | ||
629 | |||
630 | +if ((regnum == MICROBLAZE_SP_REGNUM && | ||
631 | + cache->register_offsets[MICROBLAZE_SP_REGNUM]) | ||
632 | + || (regnum == MICROBLAZE_FP_REGNUM && | ||
633 | + cache->register_offsets[MICROBLAZE_SP_REGNUM])) | ||
634 | + | ||
635 | + return frame_unwind_got_constant (this_frame, regnum, | ||
636 | + cache->register_offsets[MICROBLAZE_SP_REGNUM]); | ||
637 | + | ||
638 | +if (regnum == MICROBLAZE_PC_REGNUM) | ||
639 | +{ | ||
640 | + regnum = 15; | ||
641 | + return frame_unwind_got_memory (this_frame, regnum, | ||
642 | + cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM]); | ||
643 | + | ||
644 | +} | ||
645 | +if (regnum == MICROBLAZE_SP_REGNUM) | ||
646 | + regnum = 1; | ||
647 | +#if 0 | ||
648 | + | ||
649 | if (cache->frameless_p) | ||
650 | { | ||
651 | if (regnum == MICROBLAZE_PC_REGNUM) | ||
652 | @@ -506,7 +536,9 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, | ||
653 | else | ||
654 | return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
655 | regnum); | ||
656 | - | ||
657 | +#endif | ||
658 | + return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
659 | + regnum); | ||
660 | } | ||
661 | |||
662 | static const struct frame_unwind microblaze_frame_unwind = | ||
663 | @@ -621,7 +653,106 @@ microblaze_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | ||
664 | return (type->length () == 16); | ||
665 | } | ||
666 | |||
667 | - | ||
668 | +#if 1 | ||
669 | +static std::vector<CORE_ADDR> | ||
670 | +microblaze_software_single_step (struct regcache *regcache) | ||
671 | +{ | ||
672 | + struct gdbarch *arch = regcache->arch (); | ||
673 | + //struct gdbarch_tdep *tdep = gdbarch_tdep (arch); | ||
674 | + static int le_breakp[] = MICROBLAZE_BREAKPOINT_LE; | ||
675 | + static int be_breakp[] = MICROBLAZE_BREAKPOINT; | ||
676 | + enum bfd_endian byte_order = gdbarch_byte_order (arch); | ||
677 | + int *breakp = byte_order == BFD_ENDIAN_BIG ? be_breakp : le_breakp; | ||
678 | +// std::vector<CORE_ADDR> ret = NULL; | ||
679 | + | ||
680 | + /* Save the address and the values of the next_pc and the target */ | ||
681 | + static struct sstep_breaks | ||
682 | + { | ||
683 | + CORE_ADDR address; | ||
684 | + bfd_boolean valid; | ||
685 | + /* Shadow contents. */ | ||
686 | + char data[INST_WORD_SIZE]; | ||
687 | + } stepbreaks[2]; | ||
688 | + int ii; | ||
689 | + | ||
690 | + CORE_ADDR pc; | ||
691 | + std::vector<CORE_ADDR> next_pcs; | ||
692 | + long insn; | ||
693 | + enum microblaze_instr minstr; | ||
694 | + bfd_boolean isunsignednum; | ||
695 | + enum microblaze_instr_type insn_type; | ||
696 | + short delay_slots; | ||
697 | + int imm; | ||
698 | + bfd_boolean immfound = FALSE; | ||
699 | + | ||
700 | + /* Set a breakpoint at the next instruction */ | ||
701 | + /* If the current instruction is an imm, set it at the inst after */ | ||
702 | + /* If the instruction has a delay slot, skip the delay slot */ | ||
703 | + pc = regcache_read_pc (regcache); | ||
704 | + insn = microblaze_fetch_instruction (pc); | ||
705 | + minstr = get_insn_microblaze (insn, &isunsignednum, &insn_type, &delay_slots); | ||
706 | + if (insn_type == immediate_inst) | ||
707 | + { | ||
708 | + int rd, ra, rb; | ||
709 | + immfound = TRUE; | ||
710 | + minstr = microblaze_decode_insn (insn, &rd, &ra, &rb, &imm); | ||
711 | + pc = pc + INST_WORD_SIZE; | ||
712 | + insn = microblaze_fetch_instruction (pc); | ||
713 | + minstr = get_insn_microblaze (insn, &isunsignednum, &insn_type, &delay_slots); | ||
714 | + } | ||
715 | + stepbreaks[0].address = pc + (delay_slots * INST_WORD_SIZE) + INST_WORD_SIZE; | ||
716 | + if (insn_type != return_inst) { | ||
717 | + stepbreaks[0].valid = TRUE; | ||
718 | + } else { | ||
719 | + stepbreaks[0].valid = FALSE; | ||
720 | + } | ||
721 | + | ||
722 | + microblaze_debug ("single-step insn_type=%x insn=%x\n", insn_type, insn); | ||
723 | + /* Now check for branch or return instructions */ | ||
724 | + if (insn_type == branch_inst || insn_type == return_inst) { | ||
725 | + int limm; | ||
726 | + int lrd, lra, lrb; | ||
727 | + int ra, rb; | ||
728 | + bfd_boolean targetvalid; | ||
729 | + bfd_boolean unconditionalbranch; | ||
730 | + microblaze_decode_insn(insn, &lrd, &lra, &lrb, &limm); | ||
731 | + if (lra >= 0 && lra < MICROBLAZE_NUM_REGS) | ||
732 | + ra = regcache_raw_get_unsigned(regcache, lra); | ||
733 | + else | ||
734 | + ra = 0; | ||
735 | + if (lrb >= 0 && lrb < MICROBLAZE_NUM_REGS) | ||
736 | + rb = regcache_raw_get_unsigned(regcache, lrb); | ||
737 | + else | ||
738 | + rb = 0; | ||
739 | + stepbreaks[1].address = microblaze_get_target_address (insn, immfound, imm, pc, ra, rb, &targetvalid, &unconditionalbranch); | ||
740 | + microblaze_debug ("single-step uncondbr=%d targetvalid=%d target=%x\n", unconditionalbranch, targetvalid, stepbreaks[1].address); | ||
741 | + if (unconditionalbranch) | ||
742 | + stepbreaks[0].valid = FALSE; /* This is a unconditional branch: will not come to the next address */ | ||
743 | + if (targetvalid && (stepbreaks[0].valid == FALSE || | ||
744 | + (stepbreaks[0].address != stepbreaks[1].address)) | ||
745 | + && (stepbreaks[1].address != pc)) { | ||
746 | + stepbreaks[1].valid = TRUE; | ||
747 | + } else { | ||
748 | + stepbreaks[1].valid = FALSE; | ||
749 | + } | ||
750 | + } else { | ||
751 | + stepbreaks[1].valid = FALSE; | ||
752 | + } | ||
753 | + | ||
754 | + /* Insert the breakpoints */ | ||
755 | + for (ii = 0; ii < 2; ++ii) | ||
756 | + { | ||
757 | + | ||
758 | + /* ignore invalid breakpoint. */ | ||
759 | + if (stepbreaks[ii].valid) { | ||
760 | + // VEC_safe_push (CORE_ADDR, next_pcs, stepbreaks[ii].address);; | ||
761 | + next_pcs.push_back (stepbreaks[ii].address); | ||
762 | + } | ||
763 | + } | ||
764 | + return next_pcs; | ||
765 | +} | ||
766 | +#endif | ||
767 | + | ||
768 | static int dwarf2_to_reg_map[78] = | ||
769 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ | ||
770 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ | ||
771 | @@ -788,6 +919,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
772 | microblaze_breakpoint::bp_from_kind); | ||
773 | set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
774 | |||
775 | + set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
776 | + | ||
777 | set_gdbarch_frame_args_skip (gdbarch, 8); | ||
778 | |||
779 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | ||
780 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
781 | index 738da4f0531..21f206777f0 100644 | ||
782 | --- a/gdb/microblaze-tdep.h | ||
783 | +++ b/gdb/microblaze-tdep.h | ||
784 | @@ -60,11 +60,11 @@ enum microblaze_regnum | ||
785 | MICROBLAZE_R12_REGNUM, | ||
786 | MICROBLAZE_R13_REGNUM, | ||
787 | MICROBLAZE_R14_REGNUM, | ||
788 | - MICROBLAZE_R15_REGNUM, | ||
789 | + MICROBLAZE_R15_REGNUM,MICROBLAZE_PREV_PC_REGNUM = MICROBLAZE_R15_REGNUM, | ||
790 | MICROBLAZE_R16_REGNUM, | ||
791 | MICROBLAZE_R17_REGNUM, | ||
792 | MICROBLAZE_R18_REGNUM, | ||
793 | - MICROBLAZE_R19_REGNUM, | ||
794 | + MICROBLAZE_R19_REGNUM,MICROBLAZE_FP_REGNUM = MICROBLAZE_R19_REGNUM, | ||
795 | MICROBLAZE_R20_REGNUM, | ||
796 | MICROBLAZE_R21_REGNUM, | ||
797 | MICROBLAZE_R22_REGNUM, | ||
798 | @@ -77,7 +77,8 @@ enum microblaze_regnum | ||
799 | MICROBLAZE_R29_REGNUM, | ||
800 | MICROBLAZE_R30_REGNUM, | ||
801 | MICROBLAZE_R31_REGNUM, | ||
802 | - MICROBLAZE_PC_REGNUM, | ||
803 | + MICROBLAZE_MAX_GPR_REGS, | ||
804 | + MICROBLAZE_PC_REGNUM=32, | ||
805 | MICROBLAZE_MSR_REGNUM, | ||
806 | MICROBLAZE_EAR_REGNUM, | ||
807 | MICROBLAZE_ESR_REGNUM, | ||
808 | @@ -102,17 +103,21 @@ enum microblaze_regnum | ||
809 | MICROBLAZE_RTLBSX_REGNUM, | ||
810 | MICROBLAZE_RTLBLO_REGNUM, | ||
811 | MICROBLAZE_RTLBHI_REGNUM, | ||
812 | - MICROBLAZE_SLR_REGNUM, MICROBLAZE_NUM_CORE_REGS = MICROBLAZE_SLR_REGNUM, | ||
813 | + MICROBLAZE_SLR_REGNUM, | ||
814 | MICROBLAZE_SHR_REGNUM, | ||
815 | - MICROBLAZE_NUM_REGS | ||
816 | + MICROBLAZE_NUM_REGS, MICROBLAZE_NUM_CORE_REGS = MICROBLAZE_NUM_REGS | ||
817 | }; | ||
818 | |||
819 | +/* Big enough to hold the size of the largest register in bytes. */ | ||
820 | +#define MICROBLAZE_MAX_REGISTER_SIZE 64 | ||
821 | + | ||
822 | struct microblaze_frame_cache | ||
823 | { | ||
824 | /* Base address. */ | ||
825 | CORE_ADDR base; | ||
826 | CORE_ADDR pc; | ||
827 | |||
828 | + CORE_ADDR saved_sp; | ||
829 | /* Do we have a frame? */ | ||
830 | int frameless_p; | ||
831 | |||
832 | -- | ||
833 | 2.34.1 | ||
834 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch deleted file mode 100644 index 242099b9..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 25a75aaf29791f4302f0e4452f7ebaf735d4f083 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andre McCurdy <amccurdy@gmail.com> | ||
3 | Date: Sat, 30 Apr 2016 15:29:06 -0700 | ||
4 | Subject: [PATCH 5/9] use <asm/sgidefs.h> | ||
5 | |||
6 | Build fix for MIPS with musl libc | ||
7 | |||
8 | The MIPS specific header <sgidefs.h> is provided by glibc and uclibc | ||
9 | but not by musl. Regardless of the libc, the kernel headers provide | ||
10 | <asm/sgidefs.h> which provides the same definitions, so use that | ||
11 | instead. | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | gdb/mips-linux-nat.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c | ||
22 | index 6adc61235aa..afb40066744 100644 | ||
23 | --- a/gdb/mips-linux-nat.c | ||
24 | +++ b/gdb/mips-linux-nat.c | ||
25 | @@ -31,7 +31,7 @@ | ||
26 | #include "gdb_proc_service.h" | ||
27 | #include "gregset.h" | ||
28 | |||
29 | -#include <sgidefs.h> | ||
30 | +#include <asm/sgidefs.h> | ||
31 | #include "nat/gdb_ptrace.h" | ||
32 | #include <asm/ptrace.h> | ||
33 | #include "inf-ptrace.h" | ||
34 | -- | ||
35 | 2.36.1 | ||
36 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch new file mode 100644 index 00000000..3a069fdf --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Adding-64-bit-MB-support-Added-new-architecture-to-M.patch | |||
@@ -0,0 +1,1891 @@ | |||
1 | From 510b596b8cd25ccb3563555190d5396c7b378522 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Thu, 31 Jan 2019 14:36:00 +0530 | ||
4 | Subject: [PATCH 06/54] Adding 64 bit MB support Added new architecture to | ||
5 | Microblaze 64-bit support to GDB Signed-off-by :Nagaraju Mekala | ||
6 | <nmekala@xilix.com> Signed-off-by :Mahesh Bodapati <mbodapat@xilinx.com> | ||
7 | |||
8 | Conflicts: | ||
9 | gdb/Makefile.in | ||
10 | |||
11 | Conflicts: | ||
12 | bfd/cpu-microblaze.c | ||
13 | gdb/microblaze-tdep.c | ||
14 | ld/Makefile.am | ||
15 | ld/Makefile.in | ||
16 | opcodes/microblaze-dis.c | ||
17 | |||
18 | Conflicts: | ||
19 | bfd/configure | ||
20 | gas/config/tc-microblaze.c | ||
21 | ld/Makefile.in | ||
22 | opcodes/microblaze-opcm.h | ||
23 | |||
24 | Conflicts: | ||
25 | gdb/microblaze-tdep.c | ||
26 | |||
27 | Conflicts: | ||
28 | bfd/elf32-microblaze.c | ||
29 | gas/config/tc-microblaze.c | ||
30 | gdb/features/Makefile | ||
31 | gdb/features/microblaze-with-stack-protect.c | ||
32 | gdb/microblaze-tdep.c | ||
33 | gdb/regformats/microblaze-with-stack-protect.dat | ||
34 | gdbserver/linux-microblaze-low.c | ||
35 | include/elf/common.h | ||
36 | |||
37 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
38 | --- | ||
39 | bfd/Makefile.am | 2 + | ||
40 | bfd/Makefile.in | 3 + | ||
41 | bfd/archures.c | 2 + | ||
42 | bfd/bfd-in2.h | 31 +++- | ||
43 | bfd/config.bfd | 4 + | ||
44 | bfd/configure | 2 + | ||
45 | bfd/cpu-microblaze.c | 55 +++++- | ||
46 | bfd/elf32-microblaze.c | 155 ++++++++++++++-- | ||
47 | bfd/libbfd.h | 3 + | ||
48 | bfd/reloc.c | 20 +++ | ||
49 | bfd/targets.c | 6 + | ||
50 | gdb/features/Makefile | 2 + | ||
51 | gdb/features/microblaze-core.xml | 6 +- | ||
52 | gdb/features/microblaze-stack-protect.xml | 4 +- | ||
53 | gdb/features/microblaze-with-stack-protect.c | 8 +- | ||
54 | gdb/features/microblaze.c | 6 +- | ||
55 | gdb/features/microblaze64-core.xml | 69 ++++++++ | ||
56 | gdb/features/microblaze64-stack-protect.xml | 12 ++ | ||
57 | .../microblaze64-with-stack-protect.c | 79 +++++++++ | ||
58 | .../microblaze64-with-stack-protect.xml | 12 ++ | ||
59 | gdb/features/microblaze64.c | 77 ++++++++ | ||
60 | gdb/features/microblaze64.xml | 11 ++ | ||
61 | gdb/microblaze-linux-tdep.c | 36 +++- | ||
62 | gdb/microblaze-tdep.c | 125 +++++++++---- | ||
63 | gdb/microblaze-tdep.h | 4 +- | ||
64 | include/elf/common.h | 1 + | ||
65 | include/elf/microblaze.h | 4 + | ||
66 | opcodes/microblaze-dis.c | 51 +++++- | ||
67 | opcodes/microblaze-opc.h | 165 +++++++++++++++++- | ||
68 | opcodes/microblaze-opcm.h | 28 ++- | ||
69 | 30 files changed, 896 insertions(+), 87 deletions(-) | ||
70 | create mode 100644 gdb/features/microblaze64-core.xml | ||
71 | create mode 100644 gdb/features/microblaze64-stack-protect.xml | ||
72 | create mode 100644 gdb/features/microblaze64-with-stack-protect.c | ||
73 | create mode 100644 gdb/features/microblaze64-with-stack-protect.xml | ||
74 | create mode 100644 gdb/features/microblaze64.c | ||
75 | create mode 100644 gdb/features/microblaze64.xml | ||
76 | |||
77 | diff --git a/bfd/Makefile.am b/bfd/Makefile.am | ||
78 | index 378c13198d6..089d86b6191 100644 | ||
79 | --- a/bfd/Makefile.am | ||
80 | +++ b/bfd/Makefile.am | ||
81 | @@ -568,6 +568,7 @@ BFD64_BACKENDS = \ | ||
82 | elf64-ppc.lo \ | ||
83 | elf64-riscv.lo \ | ||
84 | elf64-s390.lo \ | ||
85 | + elf64-microblaze.lo \ | ||
86 | elf64-sparc.lo \ | ||
87 | elf64-tilegx.lo \ | ||
88 | elf64-x86-64.lo \ | ||
89 | @@ -615,6 +616,7 @@ BFD64_BACKENDS_CFILES = \ | ||
90 | elf64-nfp.c \ | ||
91 | elf64-ppc.c \ | ||
92 | elf64-s390.c \ | ||
93 | + elf64-microblaze.c \ | ||
94 | elf64-sparc.c \ | ||
95 | elf64-tilegx.c \ | ||
96 | elf64-x86-64.c \ | ||
97 | diff --git a/bfd/Makefile.in b/bfd/Makefile.in | ||
98 | index 8d09f6fa4af..d9fe20f502b 100644 | ||
99 | --- a/bfd/Makefile.in | ||
100 | +++ b/bfd/Makefile.in | ||
101 | @@ -1025,6 +1025,7 @@ BFD64_BACKENDS = \ | ||
102 | elf64-ppc.lo \ | ||
103 | elf64-riscv.lo \ | ||
104 | elf64-s390.lo \ | ||
105 | + elf64-microblaze.lo \ | ||
106 | elf64-sparc.lo \ | ||
107 | elf64-tilegx.lo \ | ||
108 | elf64-x86-64.lo \ | ||
109 | @@ -1072,6 +1073,7 @@ BFD64_BACKENDS_CFILES = \ | ||
110 | elf64-nfp.c \ | ||
111 | elf64-ppc.c \ | ||
112 | elf64-s390.c \ | ||
113 | + elf64-microblaze.c \ | ||
114 | elf64-sparc.c \ | ||
115 | elf64-tilegx.c \ | ||
116 | elf64-x86-64.c \ | ||
117 | @@ -1646,6 +1648,7 @@ distclean-compile: | ||
118 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-ppc.Plo@am__quote@ | ||
119 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-riscv.Plo@am__quote@ | ||
120 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-s390.Plo@am__quote@ | ||
121 | +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-microblaze.Plo@am__quote@ | ||
122 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-sparc.Plo@am__quote@ | ||
123 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-tilegx.Plo@am__quote@ | ||
124 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elf64-x86-64.Plo@am__quote@ | ||
125 | diff --git a/bfd/archures.c b/bfd/archures.c | ||
126 | index b59979e60ac..2994a09bc37 100644 | ||
127 | --- a/bfd/archures.c | ||
128 | +++ b/bfd/archures.c | ||
129 | @@ -515,6 +515,8 @@ DESCRIPTION | ||
130 | . bfd_arch_lm32, {* Lattice Mico32. *} | ||
131 | .#define bfd_mach_lm32 1 | ||
132 | . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} | ||
133 | +.#define bfd_mach_microblaze 1 | ||
134 | +.#define bfd_mach_microblaze64 2 | ||
135 | . bfd_arch_kvx, {* Kalray VLIW core of the MPPA processor family *} | ||
136 | .#define bfd_mach_kv3_unknown 0 | ||
137 | .#define bfd_mach_kv3_1 1 | ||
138 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
139 | index eddb9902f5e..9db63f254a3 100644 | ||
140 | --- a/bfd/bfd-in2.h | ||
141 | +++ b/bfd/bfd-in2.h | ||
142 | @@ -1771,6 +1771,8 @@ enum bfd_architecture | ||
143 | bfd_arch_lm32, /* Lattice Mico32. */ | ||
144 | #define bfd_mach_lm32 1 | ||
145 | bfd_arch_microblaze,/* Xilinx MicroBlaze. */ | ||
146 | +#define bfd_mach_microblaze 1 | ||
147 | +#define bfd_mach_microblaze64 2 | ||
148 | bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ | ||
149 | #define bfd_mach_kv3_unknown 0 | ||
150 | #define bfd_mach_kv3_1 1 | ||
151 | @@ -6461,16 +6463,41 @@ value relative to the read-write small data area anchor */ | ||
152 | expressions of the form "Symbol Op Symbol" */ | ||
153 | BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM, | ||
154 | |||
155 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
156 | +/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
157 | value in two words (with an imm instruction). No relocation is | ||
158 | done here - only used for relaxing */ | ||
159 | - BFD_RELOC_MICROBLAZE_64_NONE, | ||
160 | + BFD_RELOC_MICROBLAZE_32_NONE, | ||
161 | + | ||
162 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
163 | + * +value in two words (with an imml instruction). No relocation is | ||
164 | + * +done here - only used for relaxing */ | ||
165 | + BFD_RELOC_MICROBLAZE_64_PCREL, | ||
166 | + | ||
167 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
168 | + * +value in two words (with an imml instruction). No relocation is | ||
169 | + * +done here - only used for relaxing */ | ||
170 | + BFD_RELOC_MICROBLAZE_64, | ||
171 | + | ||
172 | +/* This is a 64 bit reloc that stores the 32 bit relative | ||
173 | + * +value in two words (with an imml instruction). No relocation is | ||
174 | + * +done here - only used for relaxing */ | ||
175 | + BFD_RELOC_MICROBLAZE_EA64, | ||
176 | + | ||
177 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
178 | + * +value in two words (with an imm instruction). No relocation is | ||
179 | + * +done here - only used for relaxing */ | ||
180 | + BFD_RELOC_MICROBLAZE_64_NONE, | ||
181 | |||
182 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
183 | value in two words (with an imm instruction). The relocation is | ||
184 | PC-relative GOT offset */ | ||
185 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
186 | |||
187 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
188 | +value in two words (with an imml instruction). The relocation is | ||
189 | +PC-relative GOT offset */ | ||
190 | + BFD_RELOC_MICROBLAZE_64_GPC, | ||
191 | + | ||
192 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
193 | value in two words (with an imm instruction). The relocation is | ||
194 | GOT offset */ | ||
195 | diff --git a/bfd/config.bfd b/bfd/config.bfd | ||
196 | index 08129e6a8cb..3a7d427778c 100644 | ||
197 | --- a/bfd/config.bfd | ||
198 | +++ b/bfd/config.bfd | ||
199 | @@ -884,11 +884,15 @@ case "${targ}" in | ||
200 | microblazeel*-*) | ||
201 | targ_defvec=microblaze_elf32_le_vec | ||
202 | targ_selvecs=microblaze_elf32_vec | ||
203 | + targ64_selvecs=microblaze_elf64_vec | ||
204 | + targ64_selvecs=microblaze_elf64_le_vec | ||
205 | ;; | ||
206 | |||
207 | microblaze*-*) | ||
208 | targ_defvec=microblaze_elf32_vec | ||
209 | targ_selvecs=microblaze_elf32_le_vec | ||
210 | + targ64_selvecs=microblaze_elf64_vec | ||
211 | + targ64_selvecs=microblaze_elf64_le_vec | ||
212 | ;; | ||
213 | |||
214 | #ifdef BFD64 | ||
215 | diff --git a/bfd/configure b/bfd/configure | ||
216 | index f0a07ff675f..b2afdcf9bec 100755 | ||
217 | --- a/bfd/configure | ||
218 | +++ b/bfd/configure | ||
219 | @@ -14062,6 +14062,8 @@ do | ||
220 | rx_elf32_linux_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; | ||
221 | s390_elf32_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;; | ||
222 | s390_elf64_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; | ||
223 | + microblaze_elf64_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
224 | + microblaze_elf64_le_vec) tb="$tb elf64-microblaze.lo elf64.lo $elf"; target_size=64 ;; | ||
225 | score_elf32_be_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
226 | score_elf32_le_vec) tb="$tb elf32-score.lo elf32-score7.lo elf32.lo elf64.lo $elf"; want64=true; target_size=64 ;; | ||
227 | sh_coff_vec) tb="$tb coff-sh.lo $coff" ;; | ||
228 | diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c | ||
229 | index c14b170f94b..7557b3de7b3 100644 | ||
230 | --- a/bfd/cpu-microblaze.c | ||
231 | +++ b/bfd/cpu-microblaze.c | ||
232 | @@ -23,13 +23,30 @@ | ||
233 | #include "bfd.h" | ||
234 | #include "libbfd.h" | ||
235 | |||
236 | -const bfd_arch_info_type bfd_microblaze_arch = | ||
237 | +const bfd_arch_info_type bfd_microblaze_arch[] = | ||
238 | +{ | ||
239 | +#if BFD_DEFAULT_TARGET_SIZE == 64 | ||
240 | +{ | ||
241 | + 64, /* 32 bits in a word. */ | ||
242 | + 64, /* 32 bits in an address. */ | ||
243 | + 8, /* 8 bits in a byte. */ | ||
244 | + bfd_arch_microblaze, /* Architecture. */ | ||
245 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
246 | + "microblaze", /* Architecture name. */ | ||
247 | + "MicroBlaze", /* Printable name. */ | ||
248 | + 3, /* Section align power. */ | ||
249 | + false, /* Is this the default architecture ? */ | ||
250 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
251 | + bfd_default_scan, /* String to architecture conversion. */ | ||
252 | + bfd_arch_default_fill, /* Default fill. */ | ||
253 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
254 | +}, | ||
255 | { | ||
256 | 32, /* Bits in a word. */ | ||
257 | 32, /* Bits in an address. */ | ||
258 | 8, /* Bits in a byte. */ | ||
259 | bfd_arch_microblaze, /* Architecture number. */ | ||
260 | - 0, /* Machine number - 0 for now. */ | ||
261 | + bfd_mach_microblaze, /* Machine number - 0 for now. */ | ||
262 | "microblaze", /* Architecture name. */ | ||
263 | "MicroBlaze", /* Printable name. */ | ||
264 | 3, /* Section align power. */ | ||
265 | @@ -39,4 +56,38 @@ const bfd_arch_info_type bfd_microblaze_arch = | ||
266 | bfd_arch_default_fill, /* Default fill. */ | ||
267 | NULL, /* Next in list. */ | ||
268 | 0 /* Maximum offset of a reloc from the start of an insn. */ | ||
269 | +} | ||
270 | +#else | ||
271 | +{ | ||
272 | + 32, /* 32 bits in a word. */ | ||
273 | + 32, /* 32 bits in an address. */ | ||
274 | + 8, /* 8 bits in a byte. */ | ||
275 | + bfd_arch_microblaze, /* Architecture. */ | ||
276 | + bfd_mach_microblaze, /* 32 bit Machine */ | ||
277 | + "microblaze", /* Architecture name. */ | ||
278 | + "MicroBlaze", /* Printable name. */ | ||
279 | + 3, /* Section align power. */ | ||
280 | + true, /* Is this the default architecture ? */ | ||
281 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
282 | + bfd_default_scan, /* String to architecture conversion. */ | ||
283 | + bfd_arch_default_fill, /* Default fill. */ | ||
284 | + &bfd_microblaze_arch[1] /* Next in list. */ | ||
285 | +}, | ||
286 | +{ | ||
287 | + 64, /* 32 bits in a word. */ | ||
288 | + 64, /* 32 bits in an address. */ | ||
289 | + 8, /* 8 bits in a byte. */ | ||
290 | + bfd_arch_microblaze, /* Architecture. */ | ||
291 | + bfd_mach_microblaze64, /* 64 bit Machine */ | ||
292 | + "microblaze", /* Architecture name. */ | ||
293 | + "MicroBlaze", /* Printable name. */ | ||
294 | + 3, /* Section align power. */ | ||
295 | + false, /* Is this the default architecture ? */ | ||
296 | + bfd_default_compatible, /* Architecture comparison function. */ | ||
297 | + bfd_default_scan, /* String to architecture conversion. */ | ||
298 | + bfd_arch_default_fill, /* Default fill. */ | ||
299 | + NULL, /* Next in list. */ | ||
300 | + 0 | ||
301 | +} | ||
302 | +#endif | ||
303 | }; | ||
304 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
305 | index 487ddeafc5a..6ba28e757be 100644 | ||
306 | --- a/bfd/elf32-microblaze.c | ||
307 | +++ b/bfd/elf32-microblaze.c | ||
308 | @@ -114,6 +114,20 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
309 | 0x0000ffff, /* Dest Mask. */ | ||
310 | true), /* PC relative offset? */ | ||
311 | |||
312 | + HOWTO (R_MICROBLAZE_IMML_64, /* Type. */ | ||
313 | + 0, /* Rightshift. */ | ||
314 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
315 | + 16, /* Bitsize. */ | ||
316 | + true, /* PC_relative. */ | ||
317 | + 0, /* Bitpos. */ | ||
318 | + complain_overflow_dont, /* Complain on overflow. */ | ||
319 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
320 | + "R_MICROBLAZE_IMML_64", /* Name. */ | ||
321 | + false, /* Partial Inplace. */ | ||
322 | + 0, /* Source Mask. */ | ||
323 | + 0x0000ffff, /* Dest Mask. */ | ||
324 | + false), /* PC relative offset? */ | ||
325 | + | ||
326 | /* A 64 bit relocation. Table entry not really used. */ | ||
327 | HOWTO (R_MICROBLAZE_64, /* Type. */ | ||
328 | 0, /* Rightshift. */ | ||
329 | @@ -174,7 +188,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
330 | 0x0000ffff, /* Dest Mask. */ | ||
331 | false), /* PC relative offset? */ | ||
332 | |||
333 | - /* This reloc does nothing. Used for relaxation. */ | ||
334 | + HOWTO (R_MICROBLAZE_32_NONE, /* Type. */ | ||
335 | + 0, /* Rightshift. */ | ||
336 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
337 | + 32, /* Bitsize. */ | ||
338 | + true, /* PC_relative. */ | ||
339 | + 0, /* Bitpos. */ | ||
340 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
341 | + NULL, /* Special Function. */ | ||
342 | + "R_MICROBLAZE_32_NONE",/* Name. */ | ||
343 | + false, /* Partial Inplace. */ | ||
344 | + 0, /* Source Mask. */ | ||
345 | + 0, /* Dest Mask. */ | ||
346 | + false), /* PC relative offset? */ | ||
347 | + | ||
348 | + /* This reloc does nothing. Used for relaxation. */ | ||
349 | HOWTO (R_MICROBLAZE_64_NONE, /* Type. */ | ||
350 | 0, /* Rightshift. */ | ||
351 | 0, /* Size. */ | ||
352 | @@ -264,6 +292,21 @@ static reloc_howto_type microblaze_elf_howto_raw[] = | ||
353 | 0x0000ffff, /* Dest Mask. */ | ||
354 | true), /* PC relative offset? */ | ||
355 | |||
356 | + /* A 64 bit GOTPC relocation. Table-entry not really used. */ | ||
357 | + HOWTO (R_MICROBLAZE_GPC_64, /* Type. */ | ||
358 | + 0, /* Rightshift. */ | ||
359 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
360 | + 16, /* Bitsize. */ | ||
361 | + true, /* PC_relative. */ | ||
362 | + 0, /* Bitpos. */ | ||
363 | + complain_overflow_dont, /* Complain on overflow. */ | ||
364 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
365 | + "R_MICROBLAZE_GPC_64", /* Name. */ | ||
366 | + false, /* Partial Inplace. */ | ||
367 | + 0, /* Source Mask. */ | ||
368 | + 0x0000ffff, /* Dest Mask. */ | ||
369 | + true), /* PC relative offset? */ | ||
370 | + | ||
371 | /* A 64 bit GOT relocation. Table-entry not really used. */ | ||
372 | HOWTO (R_MICROBLAZE_GOT_64, /* Type. */ | ||
373 | 0, /* Rightshift. */ | ||
374 | @@ -560,6 +603,9 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
375 | case BFD_RELOC_NONE: | ||
376 | microblaze_reloc = R_MICROBLAZE_NONE; | ||
377 | break; | ||
378 | + case BFD_RELOC_MICROBLAZE_32_NONE: | ||
379 | + microblaze_reloc = R_MICROBLAZE_32_NONE; | ||
380 | + break; | ||
381 | case BFD_RELOC_MICROBLAZE_64_NONE: | ||
382 | microblaze_reloc = R_MICROBLAZE_64_NONE; | ||
383 | break; | ||
384 | @@ -600,9 +646,15 @@ microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
385 | case BFD_RELOC_VTABLE_ENTRY: | ||
386 | microblaze_reloc = R_MICROBLAZE_GNU_VTENTRY; | ||
387 | break; | ||
388 | + case BFD_RELOC_MICROBLAZE_64: | ||
389 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
390 | + break; | ||
391 | case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
392 | microblaze_reloc = R_MICROBLAZE_GOTPC_64; | ||
393 | break; | ||
394 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
395 | + microblaze_reloc = R_MICROBLAZE_GPC_64; | ||
396 | + break; | ||
397 | case BFD_RELOC_MICROBLAZE_64_GOT: | ||
398 | microblaze_reloc = R_MICROBLAZE_GOT_64; | ||
399 | break; | ||
400 | @@ -1564,7 +1616,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, | ||
401 | if (r_symndx == STN_UNDEF || (input_section->flags & SEC_ALLOC) == 0) | ||
402 | { | ||
403 | relocation += addend; | ||
404 | - if (r_type == R_MICROBLAZE_32) | ||
405 | + if (r_type == R_MICROBLAZE_32)// || r_type == R_MICROBLAZE_IMML_64) | ||
406 | bfd_put_32 (input_bfd, relocation, contents + offset); | ||
407 | else | ||
408 | { | ||
409 | @@ -1969,8 +2021,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
410 | else | ||
411 | symval += irel->r_addend; | ||
412 | |||
413 | - if ((symval & 0xffff8000) == 0 | ||
414 | - || (symval & 0xffff8000) == 0xffff8000) | ||
415 | + if ((symval & 0xffff8000) == 0) | ||
416 | { | ||
417 | /* We can delete this instruction. */ | ||
418 | sdata->relax[sdata->relax_count].addr = irel->r_offset; | ||
419 | @@ -2034,15 +2085,44 @@ microblaze_elf_relax_section (bfd *abfd, | ||
420 | irel->r_addend -= calc_fixup (irel->r_addend, 0, sec); | ||
421 | } | ||
422 | break; | ||
423 | - case R_MICROBLAZE_NONE: | ||
424 | + case R_MICROBLAZE_IMML_64: | ||
425 | + { | ||
426 | + /* This was a PC-relative instruction that was | ||
427 | + completely resolved. */ | ||
428 | + int sfix, efix; | ||
429 | + unsigned int val; | ||
430 | + bfd_vma target_address; | ||
431 | + target_address = irel->r_addend + irel->r_offset; | ||
432 | + sfix = calc_fixup (irel->r_offset, 0, sec); | ||
433 | + efix = calc_fixup (target_address, 0, sec); | ||
434 | + | ||
435 | + /* Validate the in-band val. */ | ||
436 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
437 | + if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
438 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
439 | + } | ||
440 | + irel->r_addend -= (efix - sfix); | ||
441 | + /* Should use HOWTO. */ | ||
442 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
443 | + irel->r_addend); | ||
444 | + } | ||
445 | + break; | ||
446 | + case R_MICROBLAZE_32_NONE: | ||
447 | { | ||
448 | /* This was a PC-relative instruction that was | ||
449 | completely resolved. */ | ||
450 | size_t sfix, efix; | ||
451 | + unsigned int val; | ||
452 | bfd_vma target_address; | ||
453 | target_address = irel->r_addend + irel->r_offset; | ||
454 | sfix = calc_fixup (irel->r_offset, 0, sec); | ||
455 | efix = calc_fixup (target_address, 0, sec); | ||
456 | + | ||
457 | + /* Validate the in-band val. */ | ||
458 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
459 | + if (val != irel->r_addend && ELF32_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
460 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
461 | + } | ||
462 | irel->r_addend -= (efix - sfix); | ||
463 | /* Should use HOWTO. */ | ||
464 | microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset, | ||
465 | @@ -2059,8 +2139,8 @@ microblaze_elf_relax_section (bfd *abfd, | ||
466 | sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); | ||
467 | efix = calc_fixup (target_address, 0, sec); | ||
468 | irel->r_addend -= (efix - sfix); | ||
469 | - microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset | ||
470 | - + INST_WORD_SIZE, irel->r_addend); | ||
471 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
472 | + irel->r_addend); | ||
473 | } | ||
474 | break; | ||
475 | } | ||
476 | @@ -2090,9 +2170,50 @@ microblaze_elf_relax_section (bfd *abfd, | ||
477 | irelscanend = irelocs + o->reloc_count; | ||
478 | for (irelscan = irelocs; irelscan < irelscanend; irelscan++) | ||
479 | { | ||
480 | - if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32) | ||
481 | - { | ||
482 | - isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
483 | + if (1 && ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE) | ||
484 | + { | ||
485 | + unsigned int val; | ||
486 | + | ||
487 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
488 | + | ||
489 | + /* hax: We only do the following fixup for debug location lists. */ | ||
490 | + if (strcmp(".debug_loc", o->name)) | ||
491 | + continue; | ||
492 | + | ||
493 | + /* This was a PC-relative instruction that was completely resolved. */ | ||
494 | + if (ocontents == NULL) | ||
495 | + { | ||
496 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
497 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
498 | + else | ||
499 | + { | ||
500 | + /* We always cache the section contents. | ||
501 | + Perhaps, if info->keep_memory is FALSE, we | ||
502 | + should free them, if we are permitted to. */ | ||
503 | + | ||
504 | + if (o->rawsize == 0) | ||
505 | + o->rawsize = o->size; | ||
506 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
507 | + if (ocontents == NULL) | ||
508 | + goto error_return; | ||
509 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
510 | + (file_ptr) 0, | ||
511 | + o->rawsize)) | ||
512 | + goto error_return; | ||
513 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
514 | + } | ||
515 | + } | ||
516 | + val = bfd_get_32 (abfd, ocontents + irelscan->r_offset); | ||
517 | + if (val != irelscan->r_addend) { | ||
518 | + fprintf(stderr, "%d: CORRUPT relax reloc! %x %lx\n", __LINE__, val, irelscan->r_addend); | ||
519 | + } | ||
520 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec); | ||
521 | + microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | ||
522 | + irelscan->r_addend); | ||
523 | + } | ||
524 | + if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)// || ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
525 | + { | ||
526 | + isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
527 | |||
528 | /* Look at the reloc only if the value has been resolved. */ | ||
529 | if (isym->st_shndx == shndx | ||
530 | @@ -2149,7 +2270,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
531 | elf_section_data (o)->this_hdr.contents = ocontents; | ||
532 | } | ||
533 | } | ||
534 | - irelscan->r_addend -= calc_fixup (irel->r_addend | ||
535 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend | ||
536 | + isym->st_value, | ||
537 | 0, | ||
538 | sec); | ||
539 | @@ -3490,6 +3611,14 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, | ||
540 | return true; | ||
541 | } | ||
542 | |||
543 | + | ||
544 | +static bool | ||
545 | +elf_microblaze_object_p (bfd *abfd) | ||
546 | +{ | ||
547 | + /* Set the right machine number for an s390 elf32 file. */ | ||
548 | + return bfd_default_set_arch_mach (abfd, bfd_arch_microblaze, bfd_mach_microblaze); | ||
549 | +} | ||
550 | + | ||
551 | /* Hook called by the linker routine which adds symbols from an object | ||
552 | file. We use it to put .comm items in .sbss, and not .bss. */ | ||
553 | |||
554 | @@ -3560,8 +3689,6 @@ microblaze_elf_add_symbol_hook (bfd *abfd, | ||
555 | #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol | ||
556 | #define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | ||
557 | #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | ||
558 | - | ||
559 | -#define elf_backend_grok_prstatus microblaze_elf_grok_prstatus | ||
560 | -#define elf_backend_grok_psinfo microblaze_elf_grok_psinfo | ||
561 | +#define elf_backend_object_p elf_microblaze_object_p | ||
562 | |||
563 | #include "elf32-target.h" | ||
564 | diff --git a/bfd/libbfd.h b/bfd/libbfd.h | ||
565 | index d5f42f22c08..b0e898bf815 100644 | ||
566 | --- a/bfd/libbfd.h | ||
567 | +++ b/bfd/libbfd.h | ||
568 | @@ -3010,6 +3010,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
569 | "BFD_RELOC_MICROBLAZE_32_ROSDA", | ||
570 | "BFD_RELOC_MICROBLAZE_32_RWSDA", | ||
571 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
572 | + "BFD_RELOC_MICROBLAZE_32_NONE", | ||
573 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
574 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
575 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
576 | @@ -3017,6 +3018,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | ||
577 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
578 | "BFD_RELOC_MICROBLAZE_32_GOTOFF", | ||
579 | "BFD_RELOC_MICROBLAZE_COPY", | ||
580 | + "BFD_RELOC_MICROBLAZE_64", | ||
581 | + "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
582 | "BFD_RELOC_MICROBLAZE_64_TLS", | ||
583 | "BFD_RELOC_MICROBLAZE_64_TLSGD", | ||
584 | "BFD_RELOC_MICROBLAZE_64_TLSLD", | ||
585 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
586 | index 2ac883d0eac..278876e765e 100644 | ||
587 | --- a/bfd/reloc.c | ||
588 | +++ b/bfd/reloc.c | ||
589 | @@ -6694,6 +6694,12 @@ ENUM | ||
590 | ENUMDOC | ||
591 | This is a 32 bit reloc for the microblaze to handle | ||
592 | expressions of the form "Symbol Op Symbol" | ||
593 | +ENUM | ||
594 | + BFD_RELOC_MICROBLAZE_32_NONE | ||
595 | +ENUMDOC | ||
596 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
597 | + value in two words (with an imm instruction). No relocation is | ||
598 | + done here - only used for relaxing | ||
599 | ENUM | ||
600 | BFD_RELOC_MICROBLAZE_64_NONE | ||
601 | ENUMDOC | ||
602 | @@ -7933,6 +7939,20 @@ ENUMX | ||
603 | ENUMDOC | ||
604 | Tilera TILE-Gx Relocations. | ||
605 | |||
606 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
607 | + to two words (uses imml instruction). | ||
608 | +ENUM | ||
609 | +BFD_RELOC_MICROBLAZE_64, | ||
610 | +ENUMDOC | ||
611 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
612 | + value in two words (with an imml instruction). No relocation is | ||
613 | + done here - only used for relaxing | ||
614 | +ENUM | ||
615 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
616 | +ENUMDOC | ||
617 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
618 | + value in two words (with an imml instruction). No relocation is | ||
619 | + done here - only used for relaxing | ||
620 | ENUM | ||
621 | BFD_RELOC_BPF_64 | ||
622 | ENUMX | ||
623 | diff --git a/bfd/targets.c b/bfd/targets.c | ||
624 | index 63b3abbd287..c48c0929157 100644 | ||
625 | --- a/bfd/targets.c | ||
626 | +++ b/bfd/targets.c | ||
627 | @@ -799,6 +799,8 @@ extern const bfd_target mep_elf32_le_vec; | ||
628 | extern const bfd_target metag_elf32_vec; | ||
629 | extern const bfd_target microblaze_elf32_vec; | ||
630 | extern const bfd_target microblaze_elf32_le_vec; | ||
631 | +extern const bfd_target microblaze_elf64_vec; | ||
632 | +extern const bfd_target microblaze_elf64_le_vec; | ||
633 | extern const bfd_target mips_ecoff_be_vec; | ||
634 | extern const bfd_target mips_ecoff_le_vec; | ||
635 | extern const bfd_target mips_ecoff_bele_vec; | ||
636 | @@ -1166,6 +1168,10 @@ static const bfd_target * const _bfd_target_vector[] = | ||
637 | |||
638 | &metag_elf32_vec, | ||
639 | |||
640 | +#ifdef BFD64 | ||
641 | + µblaze_elf64_vec, | ||
642 | + µblaze_elf64_le_vec, | ||
643 | +#endif | ||
644 | µblaze_elf32_vec, | ||
645 | |||
646 | &mips_ecoff_be_vec, | ||
647 | diff --git a/gdb/features/Makefile b/gdb/features/Makefile | ||
648 | index 0af9d67c2f7..ee053b7557c 100644 | ||
649 | --- a/gdb/features/Makefile | ||
650 | +++ b/gdb/features/Makefile | ||
651 | @@ -102,7 +102,9 @@ OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH)) | ||
652 | # to make on the command line. | ||
653 | XMLTOC = \ | ||
654 | microblaze-with-stack-protect.xml \ | ||
655 | + microblaze64-with-stack-protect.xml \ | ||
656 | microblaze.xml \ | ||
657 | + microblaze64.xml \ | ||
658 | mips-dsp-linux.xml \ | ||
659 | mips-linux.xml \ | ||
660 | mips64-dsp-linux.xml \ | ||
661 | diff --git a/gdb/features/microblaze-core.xml b/gdb/features/microblaze-core.xml | ||
662 | index d49aa075bae..ac052365773 100644 | ||
663 | --- a/gdb/features/microblaze-core.xml | ||
664 | +++ b/gdb/features/microblaze-core.xml | ||
665 | @@ -8,7 +8,7 @@ | ||
666 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
667 | <feature name="org.gnu.gdb.microblaze.core"> | ||
668 | <reg name="r0" bitsize="32" regnum="0"/> | ||
669 | - <reg name="r1" bitsize="32" type="data_ptr"/> | ||
670 | + <reg name="r1" bitsize="32"/> | ||
671 | <reg name="r2" bitsize="32"/> | ||
672 | <reg name="r3" bitsize="32"/> | ||
673 | <reg name="r4" bitsize="32"/> | ||
674 | @@ -39,7 +39,7 @@ | ||
675 | <reg name="r29" bitsize="32"/> | ||
676 | <reg name="r30" bitsize="32"/> | ||
677 | <reg name="r31" bitsize="32"/> | ||
678 | - <reg name="rpc" bitsize="32" type="code_ptr"/> | ||
679 | + <reg name="rpc" bitsize="32"/> | ||
680 | <reg name="rmsr" bitsize="32"/> | ||
681 | <reg name="rear" bitsize="32"/> | ||
682 | <reg name="resr" bitsize="32"/> | ||
683 | @@ -64,4 +64,6 @@ | ||
684 | <reg name="rtlbsx" bitsize="32"/> | ||
685 | <reg name="rtlblo" bitsize="32"/> | ||
686 | <reg name="rtlbhi" bitsize="32"/> | ||
687 | + <reg name="slr" bitsize="32"/> | ||
688 | + <reg name="shr" bitsize="32"/> | ||
689 | </feature> | ||
690 | diff --git a/gdb/features/microblaze-stack-protect.xml b/gdb/features/microblaze-stack-protect.xml | ||
691 | index a5ffe2e50b1..b15369e03a4 100644 | ||
692 | --- a/gdb/features/microblaze-stack-protect.xml | ||
693 | +++ b/gdb/features/microblaze-stack-protect.xml | ||
694 | @@ -7,6 +7,6 @@ | ||
695 | |||
696 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
697 | <feature name="org.gnu.gdb.microblaze.stack-protect"> | ||
698 | - <reg name="rslr" bitsize="32"/> | ||
699 | - <reg name="rshr" bitsize="32"/> | ||
700 | + <reg name="slr" bitsize="32"/> | ||
701 | + <reg name="shr" bitsize="32"/> | ||
702 | </feature> | ||
703 | diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c | ||
704 | index 574dc02db67..8ab9565a047 100644 | ||
705 | --- a/gdb/features/microblaze-with-stack-protect.c | ||
706 | +++ b/gdb/features/microblaze-with-stack-protect.c | ||
707 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
708 | |||
709 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
710 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
711 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
712 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
713 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
714 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
715 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
716 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
717 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
718 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
719 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
720 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
721 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
722 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
723 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
724 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
725 | @@ -72,8 +72,8 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
726 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
727 | |||
728 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
729 | - tdesc_create_reg (feature, "rslr", 57, 1, NULL, 32, "int"); | ||
730 | - tdesc_create_reg (feature, "rshr", 58, 1, NULL, 32, "int"); | ||
731 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
732 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
733 | |||
734 | tdesc_microblaze_with_stack_protect = result.release (); | ||
735 | } | ||
736 | diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c | ||
737 | index 8f1fb0a142f..ed12e5bcfd2 100644 | ||
738 | --- a/gdb/features/microblaze.c | ||
739 | +++ b/gdb/features/microblaze.c | ||
740 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze (void) | ||
741 | |||
742 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
743 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
744 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
745 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
746 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
747 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
748 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
749 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze (void) | ||
750 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
751 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
752 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
753 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
754 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
755 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
756 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
757 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
758 | @@ -70,6 +70,8 @@ initialize_tdesc_microblaze (void) | ||
759 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
760 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
761 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
762 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
763 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
764 | |||
765 | tdesc_microblaze = result.release (); | ||
766 | } | ||
767 | diff --git a/gdb/features/microblaze64-core.xml b/gdb/features/microblaze64-core.xml | ||
768 | new file mode 100644 | ||
769 | index 00000000000..96e99e2fb24 | ||
770 | --- /dev/null | ||
771 | +++ b/gdb/features/microblaze64-core.xml | ||
772 | @@ -0,0 +1,69 @@ | ||
773 | +<?xml version="1.0"?> | ||
774 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
775 | + | ||
776 | + Copying and distribution of this file, with or without modification, | ||
777 | + are permitted in any medium without royalty provided the copyright | ||
778 | + notice and this notice are preserved. --> | ||
779 | + | ||
780 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
781 | +<feature name="org.gnu.gdb.microblaze64.core"> | ||
782 | + <reg name="r0" bitsize="64" regnum="0"/> | ||
783 | + <reg name="r1" bitsize="64"/> | ||
784 | + <reg name="r2" bitsize="64"/> | ||
785 | + <reg name="r3" bitsize="64"/> | ||
786 | + <reg name="r4" bitsize="64"/> | ||
787 | + <reg name="r5" bitsize="64"/> | ||
788 | + <reg name="r6" bitsize="64"/> | ||
789 | + <reg name="r7" bitsize="64"/> | ||
790 | + <reg name="r8" bitsize="64"/> | ||
791 | + <reg name="r9" bitsize="64"/> | ||
792 | + <reg name="r10" bitsize="64"/> | ||
793 | + <reg name="r11" bitsize="64"/> | ||
794 | + <reg name="r12" bitsize="64"/> | ||
795 | + <reg name="r13" bitsize="64"/> | ||
796 | + <reg name="r14" bitsize="64"/> | ||
797 | + <reg name="r15" bitsize="64"/> | ||
798 | + <reg name="r16" bitsize="64"/> | ||
799 | + <reg name="r17" bitsize="64"/> | ||
800 | + <reg name="r18" bitsize="64"/> | ||
801 | + <reg name="r19" bitsize="64"/> | ||
802 | + <reg name="r20" bitsize="64"/> | ||
803 | + <reg name="r21" bitsize="64"/> | ||
804 | + <reg name="r22" bitsize="64"/> | ||
805 | + <reg name="r23" bitsize="64"/> | ||
806 | + <reg name="r24" bitsize="64"/> | ||
807 | + <reg name="r25" bitsize="64"/> | ||
808 | + <reg name="r26" bitsize="64"/> | ||
809 | + <reg name="r27" bitsize="64"/> | ||
810 | + <reg name="r28" bitsize="64"/> | ||
811 | + <reg name="r29" bitsize="64"/> | ||
812 | + <reg name="r30" bitsize="64"/> | ||
813 | + <reg name="r31" bitsize="64"/> | ||
814 | + <reg name="rpc" bitsize="64"/> | ||
815 | + <reg name="rmsr" bitsize="32"/> | ||
816 | + <reg name="rear" bitsize="64"/> | ||
817 | + <reg name="resr" bitsize="32"/> | ||
818 | + <reg name="rfsr" bitsize="32"/> | ||
819 | + <reg name="rbtr" bitsize="64"/> | ||
820 | + <reg name="rpvr0" bitsize="32"/> | ||
821 | + <reg name="rpvr1" bitsize="32"/> | ||
822 | + <reg name="rpvr2" bitsize="32"/> | ||
823 | + <reg name="rpvr3" bitsize="32"/> | ||
824 | + <reg name="rpvr4" bitsize="32"/> | ||
825 | + <reg name="rpvr5" bitsize="32"/> | ||
826 | + <reg name="rpvr6" bitsize="32"/> | ||
827 | + <reg name="rpvr7" bitsize="32"/> | ||
828 | + <reg name="rpvr8" bitsize="64"/> | ||
829 | + <reg name="rpvr9" bitsize="64"/> | ||
830 | + <reg name="rpvr10" bitsize="32"/> | ||
831 | + <reg name="rpvr11" bitsize="32"/> | ||
832 | + <reg name="redr" bitsize="32"/> | ||
833 | + <reg name="rpid" bitsize="32"/> | ||
834 | + <reg name="rzpr" bitsize="32"/> | ||
835 | + <reg name="rtlbx" bitsize="32"/> | ||
836 | + <reg name="rtlbsx" bitsize="32"/> | ||
837 | + <reg name="rtlblo" bitsize="32"/> | ||
838 | + <reg name="rtlbhi" bitsize="32"/> | ||
839 | + <reg name="slr" bitsize="64"/> | ||
840 | + <reg name="shr" bitsize="64"/> | ||
841 | +</feature> | ||
842 | diff --git a/gdb/features/microblaze64-stack-protect.xml b/gdb/features/microblaze64-stack-protect.xml | ||
843 | new file mode 100644 | ||
844 | index 00000000000..1bbf5fc3cea | ||
845 | --- /dev/null | ||
846 | +++ b/gdb/features/microblaze64-stack-protect.xml | ||
847 | @@ -0,0 +1,12 @@ | ||
848 | +<?xml version="1.0"?> | ||
849 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
850 | + | ||
851 | + Copying and distribution of this file, with or without modification, | ||
852 | + are permitted in any medium without royalty provided the copyright | ||
853 | + notice and this notice are preserved. --> | ||
854 | + | ||
855 | +<!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
856 | +<feature name="org.gnu.gdb.microblaze64.stack-protect"> | ||
857 | + <reg name="slr" bitsize="64"/> | ||
858 | + <reg name="shr" bitsize="64"/> | ||
859 | +</feature> | ||
860 | diff --git a/gdb/features/microblaze64-with-stack-protect.c b/gdb/features/microblaze64-with-stack-protect.c | ||
861 | new file mode 100644 | ||
862 | index 00000000000..a4de4666c76 | ||
863 | --- /dev/null | ||
864 | +++ b/gdb/features/microblaze64-with-stack-protect.c | ||
865 | @@ -0,0 +1,79 @@ | ||
866 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
867 | + Original: microblaze-with-stack-protect.xml */ | ||
868 | + | ||
869 | +#include "defs.h" | ||
870 | +#include "osabi.h" | ||
871 | +#include "target-descriptions.h" | ||
872 | + | ||
873 | +struct target_desc *tdesc_microblaze64_with_stack_protect; | ||
874 | +static void | ||
875 | +initialize_tdesc_microblaze64_with_stack_protect (void) | ||
876 | +{ | ||
877 | + target_desc_up result = allocate_target_description (); | ||
878 | + struct tdesc_feature *feature; | ||
879 | + | ||
880 | + feature = tdesc_create_feature (result.get() , "org.gnu.gdb.microblaze64.core"); | ||
881 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | ||
882 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | ||
883 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | ||
884 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
885 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
886 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
887 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
888 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
889 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
890 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
891 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
892 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
893 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
894 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
895 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
896 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
897 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
898 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
899 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
900 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
901 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
902 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
903 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
904 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
905 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
906 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
907 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
908 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
909 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
910 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
911 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
912 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
913 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
914 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
915 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "int"); | ||
916 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
917 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
918 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
919 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
920 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
921 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
922 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
923 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
924 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
925 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
926 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
927 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
928 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
929 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
930 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
931 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
932 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
933 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
934 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
935 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
936 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
937 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
938 | + | ||
939 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.stack-protect"); | ||
940 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
941 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
942 | + | ||
943 | + tdesc_microblaze64_with_stack_protect = result.release(); | ||
944 | +} | ||
945 | diff --git a/gdb/features/microblaze64-with-stack-protect.xml b/gdb/features/microblaze64-with-stack-protect.xml | ||
946 | new file mode 100644 | ||
947 | index 00000000000..0e9f01611f3 | ||
948 | --- /dev/null | ||
949 | +++ b/gdb/features/microblaze64-with-stack-protect.xml | ||
950 | @@ -0,0 +1,12 @@ | ||
951 | +<?xml version="1.0"?> | ||
952 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
953 | + | ||
954 | + Copying and distribution of this file, with or without modification, | ||
955 | + are permitted in any medium without royalty provided the copyright | ||
956 | + notice and this notice are preserved. --> | ||
957 | + | ||
958 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
959 | +<target> | ||
960 | + <xi:include href="microblaze64-core.xml"/> | ||
961 | + <xi:include href="microblaze64-stack-protect.xml"/> | ||
962 | +</target> | ||
963 | diff --git a/gdb/features/microblaze64.c b/gdb/features/microblaze64.c | ||
964 | new file mode 100644 | ||
965 | index 00000000000..8ab7a90dd95 | ||
966 | --- /dev/null | ||
967 | +++ b/gdb/features/microblaze64.c | ||
968 | @@ -0,0 +1,77 @@ | ||
969 | +/* THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi:set ro: | ||
970 | + Original: microblaze.xml */ | ||
971 | + | ||
972 | +#include "defs.h" | ||
973 | +#include "osabi.h" | ||
974 | +#include "target-descriptions.h" | ||
975 | + | ||
976 | +struct target_desc *tdesc_microblaze64; | ||
977 | +static void | ||
978 | +initialize_tdesc_microblaze64 (void) | ||
979 | +{ | ||
980 | + target_desc_up result = allocate_target_description (); | ||
981 | + struct tdesc_feature *feature; | ||
982 | + | ||
983 | + feature = tdesc_create_feature (result.get(), "org.gnu.gdb.microblaze64.core"); | ||
984 | + tdesc_create_reg (feature, "r0", 0, 1, NULL, 64, "uint64"); | ||
985 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 64, "uint64"); | ||
986 | + tdesc_create_reg (feature, "r2", 2, 1, NULL, 64, "uint64"); | ||
987 | + tdesc_create_reg (feature, "r3", 3, 1, NULL, 64, "uint64"); | ||
988 | + tdesc_create_reg (feature, "r4", 4, 1, NULL, 64, "uint64"); | ||
989 | + tdesc_create_reg (feature, "r5", 5, 1, NULL, 64, "uint64"); | ||
990 | + tdesc_create_reg (feature, "r6", 6, 1, NULL, 64, "uint64"); | ||
991 | + tdesc_create_reg (feature, "r7", 7, 1, NULL, 64, "uint64"); | ||
992 | + tdesc_create_reg (feature, "r8", 8, 1, NULL, 64, "uint64"); | ||
993 | + tdesc_create_reg (feature, "r9", 9, 1, NULL, 64, "uint64"); | ||
994 | + tdesc_create_reg (feature, "r10", 10, 1, NULL, 64, "uint64"); | ||
995 | + tdesc_create_reg (feature, "r11", 11, 1, NULL, 64, "uint64"); | ||
996 | + tdesc_create_reg (feature, "r12", 12, 1, NULL, 64, "uint64"); | ||
997 | + tdesc_create_reg (feature, "r13", 13, 1, NULL, 64, "uint64"); | ||
998 | + tdesc_create_reg (feature, "r14", 14, 1, NULL, 64, "uint64"); | ||
999 | + tdesc_create_reg (feature, "r15", 15, 1, NULL, 64, "uint64"); | ||
1000 | + tdesc_create_reg (feature, "r16", 16, 1, NULL, 64, "uint64"); | ||
1001 | + tdesc_create_reg (feature, "r17", 17, 1, NULL, 64, "uint64"); | ||
1002 | + tdesc_create_reg (feature, "r18", 18, 1, NULL, 64, "uint64"); | ||
1003 | + tdesc_create_reg (feature, "r19", 19, 1, NULL, 64, "uint64"); | ||
1004 | + tdesc_create_reg (feature, "r20", 20, 1, NULL, 64, "uint64"); | ||
1005 | + tdesc_create_reg (feature, "r21", 21, 1, NULL, 64, "uint64"); | ||
1006 | + tdesc_create_reg (feature, "r22", 22, 1, NULL, 64, "uint64"); | ||
1007 | + tdesc_create_reg (feature, "r23", 23, 1, NULL, 64, "uint64"); | ||
1008 | + tdesc_create_reg (feature, "r24", 24, 1, NULL, 64, "uint64"); | ||
1009 | + tdesc_create_reg (feature, "r25", 25, 1, NULL, 64, "uint64"); | ||
1010 | + tdesc_create_reg (feature, "r26", 26, 1, NULL, 64, "uint64"); | ||
1011 | + tdesc_create_reg (feature, "r27", 27, 1, NULL, 64, "uint64"); | ||
1012 | + tdesc_create_reg (feature, "r28", 28, 1, NULL, 64, "uint64"); | ||
1013 | + tdesc_create_reg (feature, "r29", 29, 1, NULL, 64, "uint64"); | ||
1014 | + tdesc_create_reg (feature, "r30", 30, 1, NULL, 64, "uint64"); | ||
1015 | + tdesc_create_reg (feature, "r31", 31, 1, NULL, 64, "uint64"); | ||
1016 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 64, "uint64"); | ||
1017 | + tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
1018 | + tdesc_create_reg (feature, "rear", 34, 1, NULL, 64, "uint64"); | ||
1019 | + tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
1020 | + tdesc_create_reg (feature, "rfsr", 36, 1, NULL, 32, "int"); | ||
1021 | + tdesc_create_reg (feature, "rbtr", 37, 1, NULL, 64, "uint64"); | ||
1022 | + tdesc_create_reg (feature, "rpvr0", 38, 1, NULL, 32, "int"); | ||
1023 | + tdesc_create_reg (feature, "rpvr1", 39, 1, NULL, 32, "int"); | ||
1024 | + tdesc_create_reg (feature, "rpvr2", 40, 1, NULL, 32, "int"); | ||
1025 | + tdesc_create_reg (feature, "rpvr3", 41, 1, NULL, 32, "int"); | ||
1026 | + tdesc_create_reg (feature, "rpvr4", 42, 1, NULL, 32, "int"); | ||
1027 | + tdesc_create_reg (feature, "rpvr5", 43, 1, NULL, 32, "int"); | ||
1028 | + tdesc_create_reg (feature, "rpvr6", 44, 1, NULL, 32, "int"); | ||
1029 | + tdesc_create_reg (feature, "rpvr7", 45, 1, NULL, 32, "int"); | ||
1030 | + tdesc_create_reg (feature, "rpvr8", 46, 1, NULL, 64, "uint64"); | ||
1031 | + tdesc_create_reg (feature, "rpvr9", 47, 1, NULL, 64, "uint64"); | ||
1032 | + tdesc_create_reg (feature, "rpvr10", 48, 1, NULL, 32, "int"); | ||
1033 | + tdesc_create_reg (feature, "rpvr11", 49, 1, NULL, 32, "int"); | ||
1034 | + tdesc_create_reg (feature, "redr", 50, 1, NULL, 32, "int"); | ||
1035 | + tdesc_create_reg (feature, "rpid", 51, 1, NULL, 32, "int"); | ||
1036 | + tdesc_create_reg (feature, "rzpr", 52, 1, NULL, 32, "int"); | ||
1037 | + tdesc_create_reg (feature, "rtlbx", 53, 1, NULL, 32, "int"); | ||
1038 | + tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
1039 | + tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
1040 | + tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
1041 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
1042 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
1043 | + | ||
1044 | + tdesc_microblaze64 = result.release(); | ||
1045 | +} | ||
1046 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
1047 | new file mode 100644 | ||
1048 | index 00000000000..515d18e65cf | ||
1049 | --- /dev/null | ||
1050 | +++ b/gdb/features/microblaze64.xml | ||
1051 | @@ -0,0 +1,11 @@ | ||
1052 | +<?xml version="1.0"?> | ||
1053 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
1054 | + | ||
1055 | + Copying and distribution of this file, with or without modification, | ||
1056 | + are permitted in any medium without royalty provided the copyright | ||
1057 | + notice and this notice are preserved. --> | ||
1058 | + | ||
1059 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
1060 | +<target> | ||
1061 | + <xi:include href="microblaze64-core.xml"/> | ||
1062 | +</target> | ||
1063 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
1064 | index 5b57bb4d3ba..39592a43f7c 100644 | ||
1065 | --- a/gdb/microblaze-linux-tdep.c | ||
1066 | +++ b/gdb/microblaze-linux-tdep.c | ||
1067 | @@ -40,6 +40,7 @@ | ||
1068 | #include "features/microblaze-linux.c" | ||
1069 | |||
1070 | static int microblaze_debug_flag = 0; | ||
1071 | +int MICROBLAZE_REGISTER_SIZE=4; | ||
1072 | |||
1073 | static void | ||
1074 | microblaze_debug (const char *fmt, ...) | ||
1075 | @@ -55,6 +56,7 @@ microblaze_debug (const char *fmt, ...) | ||
1076 | } | ||
1077 | } | ||
1078 | |||
1079 | +#if 0 | ||
1080 | static int | ||
1081 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1082 | struct bp_target_info *bp_tgt) | ||
1083 | @@ -86,6 +88,8 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1084 | return val; | ||
1085 | } | ||
1086 | |||
1087 | +#endif | ||
1088 | + | ||
1089 | static void | ||
1090 | microblaze_linux_sigtramp_cache (frame_info_ptr next_frame, | ||
1091 | struct trad_frame_cache *this_cache, | ||
1092 | @@ -147,8 +151,8 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
1093 | |||
1094 | linux_init_abi (info, gdbarch, 0); | ||
1095 | |||
1096 | - set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
1097 | - microblaze_linux_memory_remove_breakpoint); | ||
1098 | + // set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
1099 | + // microblaze_linux_memory_remove_breakpoint); | ||
1100 | |||
1101 | /* Shared library handling. */ | ||
1102 | set_solib_svr4_fetch_link_map_offsets (gdbarch, | ||
1103 | @@ -160,10 +164,30 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
1104 | |||
1105 | /* BFD target for core files. */ | ||
1106 | if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
1107 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
1108 | + { | ||
1109 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
1110 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblaze"); | ||
1111 | + MICROBLAZE_REGISTER_SIZE=8; | ||
1112 | + } | ||
1113 | + else | ||
1114 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
1115 | + } | ||
1116 | else | ||
1117 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
1118 | + { | ||
1119 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
1120 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblazeel"); | ||
1121 | + MICROBLAZE_REGISTER_SIZE=8; | ||
1122 | + } | ||
1123 | + else | ||
1124 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
1125 | + } | ||
1126 | |||
1127 | + switch (info.bfd_arch_info->mach) | ||
1128 | + { | ||
1129 | + case bfd_mach_microblaze64: | ||
1130 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
1131 | + break; | ||
1132 | + } | ||
1133 | |||
1134 | /* Shared library handling. */ | ||
1135 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
1136 | @@ -178,7 +202,9 @@ void _initialize_microblaze_linux_tdep (); | ||
1137 | void | ||
1138 | _initialize_microblaze_linux_tdep () | ||
1139 | { | ||
1140 | - gdbarch_register_osabi (bfd_arch_microblaze, 0, GDB_OSABI_LINUX, | ||
1141 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze, GDB_OSABI_LINUX, | ||
1142 | + microblaze_linux_init_abi); | ||
1143 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze64, GDB_OSABI_LINUX, | ||
1144 | microblaze_linux_init_abi); | ||
1145 | initialize_tdesc_microblaze_linux (); | ||
1146 | } | ||
1147 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
1148 | index 066602b385a..9450882e850 100644 | ||
1149 | --- a/gdb/microblaze-tdep.c | ||
1150 | +++ b/gdb/microblaze-tdep.c | ||
1151 | @@ -40,7 +40,9 @@ | ||
1152 | #include "remote.h" | ||
1153 | |||
1154 | #include "features/microblaze-with-stack-protect.c" | ||
1155 | +#include "features/microblaze64-with-stack-protect.c" | ||
1156 | #include "features/microblaze.c" | ||
1157 | +#include "features/microblaze64.c" | ||
1158 | |||
1159 | /* Instruction macros used for analyzing the prologue. */ | ||
1160 | /* This set of instruction macros need to be changed whenever the | ||
1161 | @@ -75,12 +77,13 @@ static const char * const microblaze_register_names[] = | ||
1162 | "rpvr0", "rpvr1", "rpvr2", "rpvr3", "rpvr4", "rpvr5", "rpvr6", | ||
1163 | "rpvr7", "rpvr8", "rpvr9", "rpvr10", "rpvr11", | ||
1164 | "redr", "rpid", "rzpr", "rtlbx", "rtlbsx", "rtlblo", "rtlbhi", | ||
1165 | - "rslr", "rshr" | ||
1166 | + "slr", "shr" | ||
1167 | }; | ||
1168 | |||
1169 | #define MICROBLAZE_NUM_REGS ARRAY_SIZE (microblaze_register_names) | ||
1170 | |||
1171 | static unsigned int microblaze_debug_flag = 0; | ||
1172 | +int reg_size = 4; | ||
1173 | |||
1174 | #define microblaze_debug(fmt, ...) \ | ||
1175 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
1176 | @@ -128,6 +131,15 @@ microblaze_fetch_instruction (CORE_ADDR pc) | ||
1177 | constexpr gdb_byte microblaze_break_insn[] = MICROBLAZE_BREAKPOINT; | ||
1178 | |||
1179 | typedef BP_MANIPULATION (microblaze_break_insn) microblaze_breakpoint; | ||
1180 | +static CORE_ADDR | ||
1181 | +microblaze_store_arguments (struct regcache *regcache, int nargs, | ||
1182 | + struct value **args, CORE_ADDR sp, | ||
1183 | + int struct_return, CORE_ADDR struct_addr) | ||
1184 | +{ | ||
1185 | + error (_("store_arguments not implemented")); | ||
1186 | + return sp; | ||
1187 | +} | ||
1188 | +#if 0 | ||
1189 | static int | ||
1190 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1191 | struct bp_target_info *bp_tgt) | ||
1192 | @@ -146,7 +158,6 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1193 | /* Make sure we see the memory breakpoints. */ | ||
1194 | scoped_restore restore_memory | ||
1195 | = make_scoped_restore_show_memory_breakpoints (1); | ||
1196 | - | ||
1197 | val = target_read_memory (addr, old_contents, bplen); | ||
1198 | |||
1199 | /* If our breakpoint is no longer at the address, this means that the | ||
1200 | @@ -161,6 +172,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
1201 | return val; | ||
1202 | } | ||
1203 | |||
1204 | +#endif | ||
1205 | /* Allocate and initialize a frame cache. */ | ||
1206 | |||
1207 | static struct microblaze_frame_cache * | ||
1208 | @@ -583,11 +595,11 @@ microblaze_extract_return_value (struct type *type, struct regcache *regcache, | ||
1209 | { | ||
1210 | case 1: /* return last byte in the register. */ | ||
1211 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
1212 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 1, 1); | ||
1213 | + memcpy(valbuf, buf + reg_size - 1, 1); | ||
1214 | return; | ||
1215 | case 2: /* return last 2 bytes in register. */ | ||
1216 | regcache->cooked_read (MICROBLAZE_RETVAL_REGNUM, buf); | ||
1217 | - memcpy(valbuf, buf + MICROBLAZE_REGISTER_SIZE - 2, 2); | ||
1218 | + memcpy(valbuf, buf + reg_size - 2, 2); | ||
1219 | return; | ||
1220 | case 4: /* for sizes 4 or 8, copy the required length. */ | ||
1221 | case 8: | ||
1222 | @@ -753,6 +765,12 @@ microblaze_software_single_step (struct regcache *regcache) | ||
1223 | } | ||
1224 | #endif | ||
1225 | |||
1226 | +static void | ||
1227 | +microblaze_write_pc (struct regcache *regcache, CORE_ADDR pc) | ||
1228 | +{ | ||
1229 | + regcache_cooked_write_unsigned (regcache, MICROBLAZE_PC_REGNUM, pc); | ||
1230 | +} | ||
1231 | + | ||
1232 | static int dwarf2_to_reg_map[78] = | ||
1233 | { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ | ||
1234 | 4 /* r4 */, 5 /* r5 */, 6 /* r6 */, 7 /* r7 */, /* 4- 7 */ | ||
1235 | @@ -787,13 +805,14 @@ microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) | ||
1236 | static void | ||
1237 | microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
1238 | { | ||
1239 | + | ||
1240 | register_remote_g_packet_guess (gdbarch, | ||
1241 | 4 * MICROBLAZE_NUM_CORE_REGS, | ||
1242 | - tdesc_microblaze); | ||
1243 | + tdesc_microblaze64); | ||
1244 | |||
1245 | register_remote_g_packet_guess (gdbarch, | ||
1246 | 4 * MICROBLAZE_NUM_REGS, | ||
1247 | - tdesc_microblaze_with_stack_protect); | ||
1248 | + tdesc_microblaze64_with_stack_protect); | ||
1249 | } | ||
1250 | |||
1251 | void | ||
1252 | @@ -801,7 +820,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
1253 | struct regcache *regcache, | ||
1254 | int regnum, const void *gregs) | ||
1255 | { | ||
1256 | - const unsigned int *regs = (const unsigned int *)gregs; | ||
1257 | + const gdb_byte *regs = (const gdb_byte *) gregs; | ||
1258 | if (regnum >= 0) | ||
1259 | regcache->raw_supply (regnum, regs + regnum); | ||
1260 | |||
1261 | @@ -809,7 +828,7 @@ microblaze_supply_gregset (const struct regset *regset, | ||
1262 | int i; | ||
1263 | |||
1264 | for (i = 0; i < 50; i++) { | ||
1265 | - regcache->raw_supply (i, regs + i); | ||
1266 | + regcache->raw_supply (regnum, regs + i); | ||
1267 | } | ||
1268 | } | ||
1269 | } | ||
1270 | @@ -832,6 +851,17 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
1271 | } | ||
1272 | |||
1273 | |||
1274 | +static void | ||
1275 | +make_regs (struct gdbarch *arch) | ||
1276 | +{ | ||
1277 | + struct gdbarch_tdep *tdep = gdbarch_tdep (arch); | ||
1278 | + int mach = gdbarch_bfd_arch_info (arch)->mach; | ||
1279 | + | ||
1280 | + if (mach == bfd_mach_microblaze64) | ||
1281 | + { | ||
1282 | + set_gdbarch_ptr_bit (arch, 64); | ||
1283 | + } | ||
1284 | +} | ||
1285 | |||
1286 | static struct gdbarch * | ||
1287 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1288 | @@ -844,8 +874,15 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1289 | if (arches != NULL) | ||
1290 | return arches->gdbarch; | ||
1291 | if (tdesc == NULL) | ||
1292 | - tdesc = tdesc_microblaze; | ||
1293 | - | ||
1294 | + { | ||
1295 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1296 | + { | ||
1297 | + tdesc = tdesc_microblaze64; | ||
1298 | + reg_size = 8; | ||
1299 | + } | ||
1300 | + else | ||
1301 | + tdesc = tdesc_microblaze; | ||
1302 | + } | ||
1303 | /* Check any target description for validity. */ | ||
1304 | if (tdesc_has_registers (tdesc)) | ||
1305 | { | ||
1306 | @@ -853,31 +890,42 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1307 | int valid_p; | ||
1308 | int i; | ||
1309 | |||
1310 | - feature = tdesc_find_feature (tdesc, | ||
1311 | - "org.gnu.gdb.microblaze.core"); | ||
1312 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1313 | + feature = tdesc_find_feature (tdesc, | ||
1314 | + "org.gnu.gdb.microblaze64.core"); | ||
1315 | + else | ||
1316 | + feature = tdesc_find_feature (tdesc, | ||
1317 | + "org.gnu.gdb.microblaze.core"); | ||
1318 | if (feature == NULL) | ||
1319 | return NULL; | ||
1320 | tdesc_data = tdesc_data_alloc (); | ||
1321 | |||
1322 | valid_p = 1; | ||
1323 | - for (i = 0; i < MICROBLAZE_NUM_CORE_REGS; i++) | ||
1324 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), i, | ||
1325 | - microblaze_register_names[i]); | ||
1326 | - feature = tdesc_find_feature (tdesc, | ||
1327 | - "org.gnu.gdb.microblaze.stack-protect"); | ||
1328 | + for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
1329 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
1330 | + microblaze_register_names[i]); | ||
1331 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
1332 | + feature = tdesc_find_feature (tdesc, | ||
1333 | + "org.gnu.gdb.microblaze64.stack-protect"); | ||
1334 | + else | ||
1335 | + feature = tdesc_find_feature (tdesc, | ||
1336 | + "org.gnu.gdb.microblaze.stack-protect"); | ||
1337 | if (feature != NULL) | ||
1338 | - { | ||
1339 | - valid_p = 1; | ||
1340 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
1341 | - MICROBLAZE_SLR_REGNUM, | ||
1342 | - "rslr"); | ||
1343 | - valid_p &= tdesc_numbered_register (feature, tdesc_data.get (), | ||
1344 | - MICROBLAZE_SHR_REGNUM, | ||
1345 | - "rshr"); | ||
1346 | - } | ||
1347 | + { | ||
1348 | + valid_p = 1; | ||
1349 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
1350 | + MICROBLAZE_SLR_REGNUM, | ||
1351 | + "slr"); | ||
1352 | + valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), | ||
1353 | + MICROBLAZE_SHR_REGNUM, | ||
1354 | + "shr"); | ||
1355 | + } | ||
1356 | |||
1357 | if (!valid_p) | ||
1358 | - return NULL; | ||
1359 | + { | ||
1360 | + // tdesc_data_cleanup (tdesc_data.get ()); | ||
1361 | + return NULL; | ||
1362 | + } | ||
1363 | } | ||
1364 | |||
1365 | /* Allocate space for the new architecture. */ | ||
1366 | @@ -897,7 +945,17 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1367 | /* Register numbers of various important registers. */ | ||
1368 | set_gdbarch_sp_regnum (gdbarch, MICROBLAZE_SP_REGNUM); | ||
1369 | set_gdbarch_pc_regnum (gdbarch, MICROBLAZE_PC_REGNUM); | ||
1370 | + | ||
1371 | + /* Register set. | ||
1372 | + make_regs (gdbarch); */ | ||
1373 | + switch (info.bfd_arch_info->mach) | ||
1374 | + { | ||
1375 | + case bfd_mach_microblaze64: | ||
1376 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
1377 | + break; | ||
1378 | + } | ||
1379 | |||
1380 | + | ||
1381 | /* Map Dwarf2 registers to GDB registers. */ | ||
1382 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
1383 | |||
1384 | @@ -917,7 +975,9 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1385 | microblaze_breakpoint::kind_from_pc); | ||
1386 | set_gdbarch_sw_breakpoint_from_kind (gdbarch, | ||
1387 | microblaze_breakpoint::bp_from_kind); | ||
1388 | - set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
1389 | +// set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
1390 | + | ||
1391 | +// set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
1392 | |||
1393 | set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
1394 | |||
1395 | @@ -925,7 +985,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1396 | |||
1397 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | ||
1398 | |||
1399 | - microblaze_register_g_packet_guesses (gdbarch); | ||
1400 | + //microblaze_register_g_packet_guesses (gdbarch); | ||
1401 | |||
1402 | frame_base_set_default (gdbarch, µblaze_frame_base); | ||
1403 | |||
1404 | @@ -940,12 +1000,11 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
1405 | tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data)); | ||
1406 | //frame_base_append_sniffer (gdbarch, microblaze_frame_sniffer); | ||
1407 | |||
1408 | - /* If we have register sets, enable the generic core file support. */ | ||
1409 | + /* If we have register sets, enable the generic core file support. | ||
1410 | if (tdep->gregset) { | ||
1411 | set_gdbarch_iterate_over_regset_sections (gdbarch, | ||
1412 | microblaze_iterate_over_regset_sections); | ||
1413 | - } | ||
1414 | - | ||
1415 | + }*/ | ||
1416 | return gdbarch; | ||
1417 | } | ||
1418 | |||
1419 | @@ -957,6 +1016,8 @@ _initialize_microblaze_tdep () | ||
1420 | |||
1421 | initialize_tdesc_microblaze_with_stack_protect (); | ||
1422 | initialize_tdesc_microblaze (); | ||
1423 | + initialize_tdesc_microblaze64_with_stack_protect (); | ||
1424 | + initialize_tdesc_microblaze64 (); | ||
1425 | /* Debug this files internals. */ | ||
1426 | add_setshow_zuinteger_cmd ("microblaze", class_maintenance, | ||
1427 | µblaze_debug_flag, _("\ | ||
1428 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
1429 | index 21f206777f0..542cdd82070 100644 | ||
1430 | --- a/gdb/microblaze-tdep.h | ||
1431 | +++ b/gdb/microblaze-tdep.h | ||
1432 | @@ -28,7 +28,7 @@ struct microblaze_gregset | ||
1433 | microblaze_gregset() {} | ||
1434 | unsigned int gregs[32]; | ||
1435 | unsigned int fpregs[32]; | ||
1436 | - unsigned int pregs[16]; | ||
1437 | + unsigned int pregs[18]; | ||
1438 | }; | ||
1439 | |||
1440 | struct microblaze_gdbarch_tdep : gdbarch_tdep_base | ||
1441 | @@ -134,7 +134,7 @@ struct microblaze_frame_cache | ||
1442 | struct trad_frame_saved_reg *saved_regs; | ||
1443 | }; | ||
1444 | /* All registers are 32 bits. */ | ||
1445 | -#define MICROBLAZE_REGISTER_SIZE 4 | ||
1446 | +//#define MICROBLAZE_REGISTER_SIZE 8 | ||
1447 | |||
1448 | /* MICROBLAZE_BREAKPOINT defines the breakpoint that should be used. | ||
1449 | Only used for native debugging. */ | ||
1450 | diff --git a/include/elf/common.h b/include/elf/common.h | ||
1451 | index 244b13361e5..6395f69426f 100644 | ||
1452 | --- a/include/elf/common.h | ||
1453 | +++ b/include/elf/common.h | ||
1454 | @@ -360,6 +360,7 @@ | ||
1455 | #define EM_U16_U8CORE 260 /* LAPIS nX-U16/U8 */ | ||
1456 | #define EM_TACHYUM 261 /* Tachyum */ | ||
1457 | #define EM_56800EF 262 /* NXP 56800EF Digital Signal Controller (DSC) */ | ||
1458 | +#define EM_MB_64 263 /* Xilinx MicroBlaze 32-bit RISC soft processor core */ | ||
1459 | |||
1460 | /* If it is necessary to assign new unofficial EM_* values, please pick large | ||
1461 | random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision | ||
1462 | diff --git a/include/elf/microblaze.h b/include/elf/microblaze.h | ||
1463 | index fecdd7e4831..3306e3c3ad6 100644 | ||
1464 | --- a/include/elf/microblaze.h | ||
1465 | +++ b/include/elf/microblaze.h | ||
1466 | @@ -61,6 +61,10 @@ START_RELOC_NUMBERS (elf_microblaze_reloc_type) | ||
1467 | RELOC_NUMBER (R_MICROBLAZE_TEXTPCREL_64, 30) /* PC-relative TEXT offset. */ | ||
1468 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_64, 31) /* TEXT Entry offset 64-bit. */ | ||
1469 | RELOC_NUMBER (R_MICROBLAZE_TEXTREL_32_LO, 32) /* TEXT Entry offset 32-bit. */ | ||
1470 | + RELOC_NUMBER (R_MICROBLAZE_32_NONE, 33) | ||
1471 | + RELOC_NUMBER (R_MICROBLAZE_IMML_64, 34) | ||
1472 | + RELOC_NUMBER (R_MICROBLAZE_GPC_64, 35) /* GOT entry offset. */ | ||
1473 | + | ||
1474 | END_RELOC_NUMBERS (R_MICROBLAZE_max) | ||
1475 | |||
1476 | /* Global base address names. */ | ||
1477 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
1478 | index 12981abfea1..c910f2ff210 100644 | ||
1479 | --- a/opcodes/microblaze-dis.c | ||
1480 | +++ b/opcodes/microblaze-dis.c | ||
1481 | @@ -33,6 +33,7 @@ | ||
1482 | #define get_field_r1(buf, instr) get_field (buf, instr, RA_MASK, RA_LOW) | ||
1483 | #define get_field_r2(buf, instr) get_field (buf, instr, RB_MASK, RB_LOW) | ||
1484 | #define get_int_field_imm(instr) ((instr & IMM_MASK) >> IMM_LOW) | ||
1485 | +#define get_int_field_imml(instr) ((instr & IMML_MASK) >> IMM_LOW) | ||
1486 | #define get_int_field_r1(instr) ((instr & RA_MASK) >> RA_LOW) | ||
1487 | |||
1488 | #define NUM_STRBUFS 3 | ||
1489 | @@ -73,11 +74,20 @@ get_field_imm (struct string_buf *buf, long instr) | ||
1490 | } | ||
1491 | |||
1492 | static char * | ||
1493 | -get_field_imm5 (struct string_buf *buf, long instr) | ||
1494 | +get_field_imml (struct string_buf *buf, long instr) | ||
1495 | { | ||
1496 | char *p = strbuf (buf); | ||
1497 | |||
1498 | - sprintf (p, "%d", (short)((instr & IMM5_MASK) >> IMM_LOW)); | ||
1499 | + sprintf (p, "%d", (int)((instr & IMML_MASK) >> IMM_LOW)); | ||
1500 | + return p; | ||
1501 | +} | ||
1502 | + | ||
1503 | +static char * | ||
1504 | +get_field_imms (struct string_buf *buf, long instr) | ||
1505 | +{ | ||
1506 | + char *p = strbuf (buf); | ||
1507 | + | ||
1508 | + sprintf (p, "%d", (short)((instr & IMM6_MASK) >> IMM_LOW)); | ||
1509 | return p; | ||
1510 | } | ||
1511 | |||
1512 | @@ -90,6 +100,18 @@ get_field_imm5_mbar (struct string_buf *buf, long instr) | ||
1513 | return p; | ||
1514 | } | ||
1515 | |||
1516 | +static char * | ||
1517 | +get_field_immw (struct string_buf *buf, long instr) | ||
1518 | +{ | ||
1519 | + char *p = strbuf (buf); | ||
1520 | + | ||
1521 | + if (instr & 0x00004000) | ||
1522 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW))); /* bsefi */ | ||
1523 | + else | ||
1524 | + sprintf (p, "%d", (short)(((instr & IMM6_WIDTH_MASK) >> IMM_WIDTH_LOW) - ((instr & IMM6_MASK) >> IMM_LOW) + 1)); /* bsifi */ | ||
1525 | + return p; | ||
1526 | +} | ||
1527 | + | ||
1528 | static char * | ||
1529 | get_field_rfsl (struct string_buf *buf, long instr) | ||
1530 | { | ||
1531 | @@ -296,9 +318,14 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1532 | } | ||
1533 | } | ||
1534 | break; | ||
1535 | - case INST_TYPE_RD_R1_IMM5: | ||
1536 | + case INST_TYPE_RD_R1_IMML: | ||
1537 | + print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
1538 | + get_field_r1(&buf, inst), get_field_imm (&buf, inst)); | ||
1539 | + /* TODO: Also print symbol */ | ||
1540 | + break; | ||
1541 | + case INST_TYPE_RD_R1_IMMS: | ||
1542 | print_func (stream, "\t%s, %s, %s", get_field_rd (&buf, inst), | ||
1543 | - get_field_r1 (&buf, inst), get_field_imm5 (&buf, inst)); | ||
1544 | + get_field_r1(&buf, inst), get_field_imms (&buf, inst)); | ||
1545 | break; | ||
1546 | case INST_TYPE_RD_RFSL: | ||
1547 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
1548 | @@ -402,9 +429,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1549 | } | ||
1550 | } | ||
1551 | break; | ||
1552 | - case INST_TYPE_RD_R2: | ||
1553 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
1554 | - get_field_r2 (&buf, inst)); | ||
1555 | + case INST_TYPE_IMML: | ||
1556 | + print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
1557 | + /* TODO: Also print symbol */ | ||
1558 | + break; | ||
1559 | + case INST_TYPE_RD_R2: | ||
1560 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_r2 (&buf, inst)); | ||
1561 | break; | ||
1562 | case INST_TYPE_R2: | ||
1563 | print_func (stream, "\t%s", get_field_r2 (&buf, inst)); | ||
1564 | @@ -427,7 +457,12 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
1565 | /* For mbar 16 or sleep insn. */ | ||
1566 | case INST_TYPE_NONE: | ||
1567 | break; | ||
1568 | - /* For tuqula instruction */ | ||
1569 | + /* For bit field insns. */ | ||
1570 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
1571 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
1572 | + get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
1573 | + break; | ||
1574 | + /* For tuqula instruction */ | ||
1575 | case INST_TYPE_RD: | ||
1576 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
1577 | break; | ||
1578 | diff --git a/opcodes/microblaze-opc.h b/opcodes/microblaze-opc.h | ||
1579 | index 7398e9e246a..dc78712d67b 100644 | ||
1580 | --- a/opcodes/microblaze-opc.h | ||
1581 | +++ b/opcodes/microblaze-opc.h | ||
1582 | @@ -40,7 +40,7 @@ | ||
1583 | #define INST_TYPE_RD_SPECIAL 11 | ||
1584 | #define INST_TYPE_R1 12 | ||
1585 | /* New instn type for barrel shift imms. */ | ||
1586 | -#define INST_TYPE_RD_R1_IMM5 13 | ||
1587 | +#define INST_TYPE_RD_R1_IMMS 13 | ||
1588 | #define INST_TYPE_RD_RFSL 14 | ||
1589 | #define INST_TYPE_R1_RFSL 15 | ||
1590 | |||
1591 | @@ -59,6 +59,15 @@ | ||
1592 | /* For mbar. */ | ||
1593 | #define INST_TYPE_IMM5 20 | ||
1594 | |||
1595 | +/* For bsefi and bsifi */ | ||
1596 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
1597 | + | ||
1598 | +/* For 64-bit instructions */ | ||
1599 | +#define INST_TYPE_IMML 22 | ||
1600 | +#define INST_TYPE_RD_R1_IMML 23 | ||
1601 | +#define INST_TYPE_R1_IMML 24 | ||
1602 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
1603 | + | ||
1604 | #define INST_TYPE_NONE 25 | ||
1605 | |||
1606 | |||
1607 | @@ -88,11 +97,14 @@ | ||
1608 | #define OPCODE_MASK_H24 0xFC1F07FF /* High 6, bits 20-16 and low 11 bits. */ | ||
1609 | #define OPCODE_MASK_H124 0xFFFF07FF /* High 16, and low 11 bits. */ | ||
1610 | #define OPCODE_MASK_H1234 0xFFFFFFFF /* All 32 bits. */ | ||
1611 | -#define OPCODE_MASK_H3 0xFC000600 /* High 6 bits and bits 21, 22. */ | ||
1612 | +#define OPCODE_MASK_H3 0xFC000700 /* High 6 bits and bits 21, 22, 23. */ | ||
1613 | +#define OPCODE_MASK_H3B 0xFC00E600 /* High 6 bits and bits 16, 17, 18, 21, 22. */ | ||
1614 | #define OPCODE_MASK_H32 0xFC00FC00 /* High 6 bits and bit 16-21. */ | ||
1615 | +#define OPCODE_MASK_H32B 0xFC00E000 /* High 6 bits and bit 16, 17, 18. */ | ||
1616 | #define OPCODE_MASK_H34B 0xFC0000FF /* High 6 bits and low 8 bits. */ | ||
1617 | #define OPCODE_MASK_H35B 0xFC0004FF /* High 6 bits and low 9 bits. */ | ||
1618 | #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */ | ||
1619 | +#define OPCODE_MASK_H8 0xFF000000 /* High 8 bits only. */ | ||
1620 | |||
1621 | /* New Mask for msrset, msrclr insns. */ | ||
1622 | #define OPCODE_MASK_H23N 0xFC1F8000 /* High 6 and bits 11 - 16. */ | ||
1623 | @@ -102,7 +114,7 @@ | ||
1624 | #define DELAY_SLOT 1 | ||
1625 | #define NO_DELAY_SLOT 0 | ||
1626 | |||
1627 | -#define MAX_OPCODES 300 | ||
1628 | +#define MAX_OPCODES 412 | ||
1629 | |||
1630 | const struct op_code_struct | ||
1631 | { | ||
1632 | @@ -120,6 +132,7 @@ const struct op_code_struct | ||
1633 | /* More info about output format here. */ | ||
1634 | } microblaze_opcodes[MAX_OPCODES] = | ||
1635 | { | ||
1636 | + /* 32-bit instructions */ | ||
1637 | {"add", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000000, OPCODE_MASK_H4, add, arithmetic_inst }, | ||
1638 | {"rsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H4, rsub, arithmetic_inst }, | ||
1639 | {"addc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000000, OPCODE_MASK_H4, addc, arithmetic_inst }, | ||
1640 | @@ -156,9 +169,11 @@ const struct op_code_struct | ||
1641 | {"ncget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C006000, OPCODE_MASK_H32, ncget, anyware_inst }, | ||
1642 | {"ncput", INST_TYPE_R1_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C00E000, OPCODE_MASK_H32, ncput, anyware_inst }, | ||
1643 | {"muli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x60000000, OPCODE_MASK_H, muli, mult_inst }, | ||
1644 | - {"bslli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3, bslli, barrel_shift_inst }, | ||
1645 | - {"bsrai", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3, bsrai, barrel_shift_inst }, | ||
1646 | - {"bsrli", INST_TYPE_RD_R1_IMM5, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3, bsrli, barrel_shift_inst }, | ||
1647 | + {"bslli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000400, OPCODE_MASK_H3B, bslli, barrel_shift_inst }, | ||
1648 | + {"bsrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000200, OPCODE_MASK_H3B, bsrai, barrel_shift_inst }, | ||
1649 | + {"bsrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64000000, OPCODE_MASK_H3B, bsrli, barrel_shift_inst }, | ||
1650 | + {"bsefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64004000, OPCODE_MASK_H32B, bsefi, barrel_shift_inst }, | ||
1651 | + {"bsifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64008000, OPCODE_MASK_H32B, bsifi, barrel_shift_inst }, | ||
1652 | {"or", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000000, OPCODE_MASK_H4, microblaze_or, logical_inst }, | ||
1653 | {"and", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000000, OPCODE_MASK_H4, microblaze_and, logical_inst }, | ||
1654 | {"xor", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000000, OPCODE_MASK_H4, microblaze_xor, logical_inst }, | ||
1655 | @@ -260,9 +275,7 @@ const struct op_code_struct | ||
1656 | {"la", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* la translates to addik. */ | ||
1657 | {"tuqula",INST_TYPE_RD, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3000002A, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* tuqula rd translates to addik rd, r0, 42. */ | ||
1658 | {"not", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA800FFFF, OPCODE_MASK_H34, invalid_inst, logical_inst }, /* not translates to xori rd,ra,-1. */ | ||
1659 | - {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
1660 | {"rtb", INST_TYPE_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB6000004, OPCODE_MASK_H1, invalid_inst, return_inst }, /* rtb translates to rts rd, 4. */ | ||
1661 | - {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
1662 | {"lmi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xE8000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, | ||
1663 | {"smi", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xF8000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, | ||
1664 | {"msrset",INST_TYPE_RD_IMM15, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x94100000, OPCODE_MASK_H23N, msrset, special_inst }, | ||
1665 | @@ -418,6 +431,130 @@ const struct op_code_struct | ||
1666 | {"suspend", INST_TYPE_NONE, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBB020004, OPCODE_MASK_HN, invalid_inst, special_inst }, /* translates to mbar 24. */ | ||
1667 | {"swapb", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E0, OPCODE_MASK_H4, swapb, arithmetic_inst }, | ||
1668 | {"swaph", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x900001E2, OPCODE_MASK_H4, swaph, arithmetic_inst }, | ||
1669 | + /* 64-bit instructions */ | ||
1670 | + {"addl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x00000100, OPCODE_MASK_H4, addl, arithmetic_inst }, | ||
1671 | + {"rsubl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000100, OPCODE_MASK_H4, rsubl, arithmetic_inst }, | ||
1672 | + {"addlc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x08000100, OPCODE_MASK_H4, addlc, arithmetic_inst }, | ||
1673 | + {"rsublc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x0C000100, OPCODE_MASK_H4, rsublc, arithmetic_inst }, | ||
1674 | + {"addlk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x10000100, OPCODE_MASK_H4, addlk, arithmetic_inst }, | ||
1675 | + {"rsublk", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000100, OPCODE_MASK_H4, rsublk, arithmetic_inst }, | ||
1676 | + {"addlkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x18000100, OPCODE_MASK_H4, addlkc, arithmetic_inst }, | ||
1677 | + {"rsublkc", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x1C000100, OPCODE_MASK_H4, rsublkc, arithmetic_inst }, | ||
1678 | + {"cmpl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000101, OPCODE_MASK_H4, cmpl, arithmetic_inst }, | ||
1679 | + {"cmplu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000103, OPCODE_MASK_H4, cmplu, arithmetic_inst }, | ||
1680 | + {"addli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x20000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1681 | + {"rsubli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x24000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1682 | + {"addlic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x28000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1683 | + {"rsublic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x2C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1684 | + {"addlik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1685 | + {"rsublik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x34000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1686 | + {"addlikc", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x38000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1687 | + {"rsublikc",INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
1688 | + {"mull", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x40000100, OPCODE_MASK_H4, mull, mult_inst }, | ||
1689 | + {"bslll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000500, OPCODE_MASK_H3, bslll, barrel_shift_inst }, | ||
1690 | + {"bslra", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000300, OPCODE_MASK_H3, bslra, barrel_shift_inst }, | ||
1691 | + {"bslrl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000100, OPCODE_MASK_H3, bslrl, barrel_shift_inst }, | ||
1692 | + {"bsllli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002400, OPCODE_MASK_H3B, bsllli, barrel_shift_inst }, | ||
1693 | + {"bslrai", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002200, OPCODE_MASK_H3B, bslrai, barrel_shift_inst }, | ||
1694 | + {"bslrli", INST_TYPE_RD_R1_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64002000, OPCODE_MASK_H3B, bslrli, barrel_shift_inst }, | ||
1695 | + {"bslefi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x64006000, OPCODE_MASK_H32B, bslefi, barrel_shift_inst }, | ||
1696 | + {"bslifi", INST_TYPE_RD_R1_IMMW_IMMS, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6400a000, OPCODE_MASK_H32B, bslifi, barrel_shift_inst }, | ||
1697 | + {"orl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000100, OPCODE_MASK_H4, orl, logical_inst }, | ||
1698 | + {"andl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x84000100, OPCODE_MASK_H4, andl, logical_inst }, | ||
1699 | + {"xorl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000100, OPCODE_MASK_H4, xorl, logical_inst }, | ||
1700 | + {"andnl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000100, OPCODE_MASK_H4, andnl, logical_inst }, | ||
1701 | + {"pcmplbf", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x80000500, OPCODE_MASK_H4, pcmplbf, logical_inst }, | ||
1702 | + {"pcmpleq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x88000500, OPCODE_MASK_H4, pcmpleq, logical_inst }, | ||
1703 | + {"pcmplne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x8C000500, OPCODE_MASK_H4, pcmplne, logical_inst }, | ||
1704 | + {"srla", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000101, OPCODE_MASK_H34, srla, logical_inst }, | ||
1705 | + {"srlc", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000121, OPCODE_MASK_H34, srlc, logical_inst }, | ||
1706 | + {"srll", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000141, OPCODE_MASK_H34, srll, logical_inst }, | ||
1707 | + {"sextl8", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000160, OPCODE_MASK_H34, sextl8, logical_inst }, | ||
1708 | + {"sextl16", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000161, OPCODE_MASK_H34, sextl16, logical_inst }, | ||
1709 | + {"sextl32", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x90000162, OPCODE_MASK_H34, sextl32, logical_inst }, | ||
1710 | + {"brea", INST_TYPE_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98010000, OPCODE_MASK_H124, brea, branch_inst }, | ||
1711 | + {"bread", INST_TYPE_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98110000, OPCODE_MASK_H124, bread, branch_inst }, | ||
1712 | + {"breald", INST_TYPE_RD_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x98150000, OPCODE_MASK_H24, breald, branch_inst }, | ||
1713 | + {"beaeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000000, OPCODE_MASK_H14, beaeq, branch_inst }, | ||
1714 | + {"bealeq", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D000100, OPCODE_MASK_H14, bealeq, branch_inst }, | ||
1715 | + {"beaeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000000, OPCODE_MASK_H14, beaeqd, branch_inst }, | ||
1716 | + {"bealeqd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F000100, OPCODE_MASK_H14, bealeqd, branch_inst }, | ||
1717 | + {"beane", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200000, OPCODE_MASK_H14, beane, branch_inst }, | ||
1718 | + {"bealne", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D200100, OPCODE_MASK_H14, bealne, branch_inst }, | ||
1719 | + {"beaned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200000, OPCODE_MASK_H14, beaned, branch_inst }, | ||
1720 | + {"bealned", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F200100, OPCODE_MASK_H14, bealned, branch_inst }, | ||
1721 | + {"bealt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400000, OPCODE_MASK_H14, bealt, branch_inst }, | ||
1722 | + {"beallt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D400100, OPCODE_MASK_H14, beallt, branch_inst }, | ||
1723 | + {"bealtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400000, OPCODE_MASK_H14, bealtd, branch_inst }, | ||
1724 | + {"bealltd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F400100, OPCODE_MASK_H14, bealltd, branch_inst }, | ||
1725 | + {"beale", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600000, OPCODE_MASK_H14, beale, branch_inst }, | ||
1726 | + {"bealle", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D600100, OPCODE_MASK_H14, bealle, branch_inst }, | ||
1727 | + {"bealed", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600000, OPCODE_MASK_H14, bealed, branch_inst }, | ||
1728 | + {"bealled", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F600100, OPCODE_MASK_H14, bealled, branch_inst }, | ||
1729 | + {"beagt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800000, OPCODE_MASK_H14, beagt, branch_inst }, | ||
1730 | + {"bealgt", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9D800100, OPCODE_MASK_H14, bealgt, branch_inst }, | ||
1731 | + {"beagtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800000, OPCODE_MASK_H14, beagtd, branch_inst }, | ||
1732 | + {"bealgtd", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9F800100, OPCODE_MASK_H14, bealgtd, branch_inst }, | ||
1733 | + {"beage", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00000, OPCODE_MASK_H14, beage, branch_inst }, | ||
1734 | + {"bealge", INST_TYPE_R1_R2, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9DA00100, OPCODE_MASK_H14, bealge, branch_inst }, | ||
1735 | + {"beaged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00000, OPCODE_MASK_H14, beaged, branch_inst }, | ||
1736 | + {"bealged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00100, OPCODE_MASK_H14, bealged, branch_inst }, | ||
1737 | + {"orli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA0000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1738 | + {"andli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA4000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1739 | + {"xorli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA8000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1740 | + {"andnli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xAC000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
1741 | + {"imml", INST_TYPE_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB2000000, OPCODE_MASK_H8, imml, immediate_inst }, | ||
1742 | + {"breai", INST_TYPE_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8010000, OPCODE_MASK_H12, breai, branch_inst }, | ||
1743 | + {"breaid", INST_TYPE_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8110000, OPCODE_MASK_H12, breaid, branch_inst }, | ||
1744 | + {"brealid", INST_TYPE_RD_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8150000, OPCODE_MASK_H2, brealid, branch_inst }, | ||
1745 | + {"beaeqi", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, beaeqi, branch_inst }, | ||
1746 | + {"bealeqi", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqi */ | ||
1747 | + {"beaeqid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, beaeqid, branch_inst }, | ||
1748 | + {"bealeqid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF000000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaeqid */ | ||
1749 | + {"beanei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, beanei, branch_inst }, | ||
1750 | + {"bealnei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beanei */ | ||
1751 | + {"beaneid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, beaneid, branch_inst }, | ||
1752 | + {"bealneid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF200000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beaneid */ | ||
1753 | + {"bealti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, bealti, branch_inst }, | ||
1754 | + {"beallti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealti */ | ||
1755 | + {"bealtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, bealtid, branch_inst }, | ||
1756 | + {"bealltid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF400000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealtid */ | ||
1757 | + {"bealei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, bealei, branch_inst }, | ||
1758 | + {"beallei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealei */ | ||
1759 | + {"bealeid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, bealeid, branch_inst }, | ||
1760 | + {"bealleid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF600000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to bealeid */ | ||
1761 | + {"beagti", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, beagti, branch_inst }, | ||
1762 | + {"bealgti", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBD800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagti */ | ||
1763 | + {"beagtid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, beagtid, branch_inst }, | ||
1764 | + {"bealgtid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBF800000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagtid */ | ||
1765 | + {"beagei", INST_TYPE_R1_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, beagei, branch_inst }, | ||
1766 | + {"bealgei", INST_TYPE_R1_IMML, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBDA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beagei */ | ||
1767 | + {"beageid", INST_TYPE_R1_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, beageid, branch_inst }, | ||
1768 | + {"bealgeid",INST_TYPE_R1_IMML, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xBFA00000, OPCODE_MASK_H1, invalid_inst, branch_inst }, /* Identical to beageid */ | ||
1769 | + {"ll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000100, OPCODE_MASK_H4, ll, memory_load_inst }, | ||
1770 | + {"llr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xC8000300, OPCODE_MASK_H4, llr, memory_load_inst }, | ||
1771 | + {"sl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000100, OPCODE_MASK_H4, sl, memory_store_inst }, | ||
1772 | + {"slr", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xD8000300, OPCODE_MASK_H4, slr, memory_store_inst }, | ||
1773 | + {"lli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xEC000000, OPCODE_MASK_H, invalid_inst, memory_load_inst }, /* Identical to 32-bit */ | ||
1774 | + {"sli", INST_TYPE_RD_R1_IMM, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xFC000000, OPCODE_MASK_H, invalid_inst, memory_store_inst }, /* Identical to 32-bit */ | ||
1775 | + {"lla", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* lla translates to addlik */ | ||
1776 | + {"dadd", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000400, OPCODE_MASK_H4, dadd, arithmetic_inst }, | ||
1777 | + {"drsub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000480, OPCODE_MASK_H4, drsub, arithmetic_inst }, | ||
1778 | + {"dmul", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000500, OPCODE_MASK_H4, dmul, arithmetic_inst }, | ||
1779 | + {"ddiv", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000580, OPCODE_MASK_H4, ddiv, arithmetic_inst }, | ||
1780 | + {"dcmp.lt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000610, OPCODE_MASK_H4, dcmp_lt, arithmetic_inst }, | ||
1781 | + {"dcmp.eq", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000620, OPCODE_MASK_H4, dcmp_eq, arithmetic_inst }, | ||
1782 | + {"dcmp.le", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000630, OPCODE_MASK_H4, dcmp_le, arithmetic_inst }, | ||
1783 | + {"dcmp.gt", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000640, OPCODE_MASK_H4, dcmp_gt, arithmetic_inst }, | ||
1784 | + {"dcmp.ne", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000650, OPCODE_MASK_H4, dcmp_ne, arithmetic_inst }, | ||
1785 | + {"dcmp.ge", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000660, OPCODE_MASK_H4, dcmp_ge, arithmetic_inst }, | ||
1786 | + {"dcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000600, OPCODE_MASK_H4, dcmp_un, arithmetic_inst }, | ||
1787 | + {"dbl", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000680, OPCODE_MASK_H4, dbl, arithmetic_inst }, | ||
1788 | + {"dlong", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000700, OPCODE_MASK_H4, dlong, arithmetic_inst }, | ||
1789 | + {"dsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000780, OPCODE_MASK_H4, dsqrt, arithmetic_inst }, | ||
1790 | + {"neg", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* neg translates to rsub rd, ra, r0. */ | ||
1791 | + {"sub", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x04000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* sub translates to rsub rd, rb, ra. */ | ||
1792 | + | ||
1793 | {"", 0, 0, 0, 0, 0, 0, 0, 0}, | ||
1794 | }; | ||
1795 | |||
1796 | @@ -438,5 +575,17 @@ char pvr_register_prefix[] = "rpvr"; | ||
1797 | #define MIN_IMM5 ((int) 0x00000000) | ||
1798 | #define MAX_IMM5 ((int) 0x0000001f) | ||
1799 | |||
1800 | +#define MIN_IMM6 ((int) 0x00000000) | ||
1801 | +#define MAX_IMM6 ((int) 0x0000003f) | ||
1802 | + | ||
1803 | +#define MIN_IMM_WIDTH ((int) 0x00000001) | ||
1804 | +#define MAX_IMM_WIDTH ((int) 0x00000020) | ||
1805 | + | ||
1806 | +#define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
1807 | +#define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
1808 | + | ||
1809 | +#define MIN_IMML ((long) 0xffffff8000000000L) | ||
1810 | +#define MAX_IMML ((long) 0x0000007fffffffffL) | ||
1811 | + | ||
1812 | #endif /* MICROBLAZE_OPC */ | ||
1813 | |||
1814 | diff --git a/opcodes/microblaze-opcm.h b/opcodes/microblaze-opcm.h | ||
1815 | index c91b002d951..3923f6258d8 100644 | ||
1816 | --- a/opcodes/microblaze-opcm.h | ||
1817 | +++ b/opcodes/microblaze-opcm.h | ||
1818 | @@ -25,11 +25,12 @@ | ||
1819 | |||
1820 | enum microblaze_instr | ||
1821 | { | ||
1822 | + /* 32-bit instructions */ | ||
1823 | add, rsub, addc, rsubc, addk, rsubk, addkc, rsubkc, clz, cmp, cmpu, | ||
1824 | addi, rsubi, addic, rsubic, addik, rsubik, addikc, rsubikc, mul, | ||
1825 | mulh, mulhu, mulhsu, swapb, swaph, | ||
1826 | idiv, idivu, bsll, bsra, bsrl, get, put, nget, nput, cget, cput, | ||
1827 | - ncget, ncput, muli, bslli, bsrai, bsrli, mului, | ||
1828 | + ncget, ncput, muli, bslli, bsrai, bsrli, bsefi, bsifi, mului, | ||
1829 | /* 'or/and/xor' are C++ keywords. */ | ||
1830 | microblaze_or, microblaze_and, microblaze_xor, | ||
1831 | andn, pcmpbf, pcmpbc, pcmpeq, pcmpne, sra, src, srl, sext8, sext16, | ||
1832 | @@ -39,8 +40,8 @@ enum microblaze_instr | ||
1833 | imm, rtsd, rtid, rtbd, rted, bri, brid, brlid, brai, braid, bralid, | ||
1834 | brki, beqi, beqid, bnei, bneid, blti, bltid, blei, bleid, bgti, | ||
1835 | bgtid, bgei, bgeid, lbu, lbuea, lbur, lhu, lhuea, lhur, lw, lwea, lwr, lwx, | ||
1836 | - sb, sbea, sbr, sh, shea, shr, sw, swea, swr, swx, lbui, lhui, lwi, | ||
1837 | - sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
1838 | + sb, sbea, sbr, sh, shea, shr, sw, swea, swr, swx, lbui, lhui, lwi, lli, | ||
1839 | + sbi, shi, sli, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv, | ||
1840 | fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt, | ||
1841 | /* 'fsqrt' is a glibc:math.h symbol. */ | ||
1842 | fint, microblaze_fsqrt, | ||
1843 | @@ -59,6 +60,18 @@ enum microblaze_instr | ||
1844 | aputd, taputd, caputd, tcaputd, naputd, tnaputd, ncaputd, tncaputd, | ||
1845 | eagetd, teagetd, ecagetd, tecagetd, neagetd, tneagetd, necagetd, tnecagetd, | ||
1846 | eaputd, teaputd, ecaputd, tecaputd, neaputd, tneaputd, necaputd, tnecaputd, | ||
1847 | + | ||
1848 | + /* 64-bit instructions */ | ||
1849 | + addl, rsubl, addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
1850 | + bslll, bslra, bslrl, bsllli, bslrai, bslrli, bslefi, bslifi, orl, andl, xorl, | ||
1851 | + andnl, pcmplbf, pcmpleq, pcmplne, srla, srlc, srll, sextl8, sextl16, sextl32, | ||
1852 | + brea, bread, breald, beaeq, bealeq, beaeqd, bealeqd, beane, bealne, beaned, | ||
1853 | + bealned, bealt, beallt, bealtd, bealltd, beale, bealle, bealed, bealled, beagt, | ||
1854 | + bealgt, beagtd, bealgtd, beage, bealge, beaged, bealged, breai, breaid, brealid, | ||
1855 | + beaeqi, beaeqid, beanei, beaneid, bealti, bealtid, bealei, bealeid, beagti, | ||
1856 | + beagtid, beagei, beageid, imml, ll, llr, sl, slr, | ||
1857 | + dadd, drsub, dmul, ddiv, dcmp_lt, dcmp_eq, dcmp_le, dcmp_gt, dcmp_ne, dcmp_ge, | ||
1858 | + dcmp_un, dbl, dlong, dsqrt, | ||
1859 | invalid_inst | ||
1860 | }; | ||
1861 | |||
1862 | @@ -130,18 +143,25 @@ enum microblaze_instr_type | ||
1863 | #define RB_LOW 11 /* Low bit for RB. */ | ||
1864 | #define IMM_LOW 0 /* Low bit for immediate. */ | ||
1865 | #define IMM_MBAR 21 /* low bit for mbar instruction. */ | ||
1866 | +#define IMM_WIDTH_LOW 6 /* Low bit for immediate width */ | ||
1867 | |||
1868 | #define RD_MASK 0x03E00000 | ||
1869 | #define RA_MASK 0x001F0000 | ||
1870 | #define RB_MASK 0x0000F800 | ||
1871 | #define IMM_MASK 0x0000FFFF | ||
1872 | +#define IMML_MASK 0x00FFFFFF | ||
1873 | |||
1874 | -/* Imm mask for barrel shifts. */ | ||
1875 | +/* Imm masks for barrel shifts. */ | ||
1876 | #define IMM5_MASK 0x0000001F | ||
1877 | +#define IMM6_MASK 0x0000003F | ||
1878 | |||
1879 | /* Imm mask for mbar. */ | ||
1880 | #define IMM5_MBAR_MASK 0x03E00000 | ||
1881 | |||
1882 | +/* Imm masks for extract/insert width. */ | ||
1883 | +#define IMM5_WIDTH_MASK 0x000007C0 | ||
1884 | +#define IMM6_WIDTH_MASK 0x00000FC0 | ||
1885 | + | ||
1886 | /* FSL imm mask for get, put instructions. */ | ||
1887 | #define RFSL_MASK 0x000000F | ||
1888 | |||
1889 | -- | ||
1890 | 2.34.1 | ||
1891 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch deleted file mode 100644 index 58c9b1d0..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | From c0e7c34134aa1f9644075c596a2338a50d3d923e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 30 Apr 2016 15:35:39 -0700 | ||
4 | Subject: [PATCH 6/9] Change order of CFLAGS | ||
5 | |||
6 | Lets us override Werror if need be | ||
7 | |||
8 | Upstream-Status: Inappropriate | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | gdbserver/Makefile.in | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/gdbserver/Makefile.in b/gdbserver/Makefile.in | ||
16 | index 47648b8d962..5599779de57 100644 | ||
17 | --- a/gdbserver/Makefile.in | ||
18 | +++ b/gdbserver/Makefile.in | ||
19 | @@ -156,7 +156,7 @@ WIN32APILIBS = @WIN32APILIBS@ | ||
20 | INTERNAL_CFLAGS_BASE = ${GLOBAL_CFLAGS} \ | ||
21 | ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${CPPFLAGS} $(PTHREAD_CFLAGS) | ||
22 | INTERNAL_WARN_CFLAGS = ${INTERNAL_CFLAGS_BASE} $(WARN_CFLAGS) | ||
23 | -INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) -DGDBSERVER | ||
24 | +INTERNAL_CFLAGS = ${INTERNAL_WARN_CFLAGS} $(WERROR_CFLAGS) ${COMPILER_CFLAGS} -DGDBSERVER | ||
25 | |||
26 | # LDFLAGS is specifically reserved for setting from the command line | ||
27 | # when running make. | ||
28 | -- | ||
29 | 2.36.1 | ||
30 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0007-Patch-MicroBlaze-Added-m64-abi-for-64-bit-target-des.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0007-Patch-MicroBlaze-Added-m64-abi-for-64-bit-target-des.patch deleted file mode 100644 index ec11e7be..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0007-Patch-MicroBlaze-Added-m64-abi-for-64-bit-target-des.patch +++ /dev/null | |||
@@ -1,300 +0,0 @@ | |||
1 | From d2f145ec8e4e149e055adc74e92016447af91806 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Tue, 9 Nov 2021 16:19:17 +0530 | ||
4 | Subject: [PATCH 7/8] [Patch,MicroBlaze] : Added m64 abi for 64 bit target | ||
5 | descriptions. set m64 abi for 64 bit elf. | ||
6 | |||
7 | Conflicts: | ||
8 | gdb/microblaze-tdep.c | ||
9 | gdb/microblaze-tdep.h | ||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
14 | --- | ||
15 | gdb/features/microblaze64.xml | 1 + | ||
16 | gdb/microblaze-tdep.c | 159 ++++++++++++++++++++++++++++++++-- | ||
17 | gdb/microblaze-tdep.h | 13 ++- | ||
18 | 3 files changed, 165 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
21 | index 515d18e65cf..9c1b7d22003 100644 | ||
22 | --- a/gdb/features/microblaze64.xml | ||
23 | +++ b/gdb/features/microblaze64.xml | ||
24 | @@ -7,5 +7,6 @@ | ||
25 | |||
26 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
27 | <target> | ||
28 | + <architecture>microblaze64</architecture> | ||
29 | <xi:include href="microblaze64-core.xml"/> | ||
30 | </target> | ||
31 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
32 | index c347bb9516b..d83072cdaef 100644 | ||
33 | --- a/gdb/microblaze-tdep.c | ||
34 | +++ b/gdb/microblaze-tdep.c | ||
35 | @@ -65,8 +65,95 @@ | ||
36 | #define IS_SAVE_HIDDEN_PTR(op, rd, ra, rb) \ | ||
37 | ((op == add || op == addik) && ra == MICROBLAZE_FIRST_ARGREG && rb == 0) | ||
38 | |||
39 | +static const char *microblaze_abi_string; | ||
40 | + | ||
41 | +static const char *const microblaze_abi_strings[] = { | ||
42 | + "auto", | ||
43 | + "m64", | ||
44 | +}; | ||
45 | + | ||
46 | +enum microblaze_abi | ||
47 | +microblaze_abi (struct gdbarch *gdbarch) | ||
48 | +{ | ||
49 | + microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
50 | + return tdep->microblaze_abi; | ||
51 | +} | ||
52 | /* The registers of the Xilinx microblaze processor. */ | ||
53 | |||
54 | + static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
55 | + static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
56 | + | ||
57 | +static void | ||
58 | +microblaze_abi_update (const char *ignore_args, | ||
59 | + int from_tty, struct cmd_list_element *c) | ||
60 | +{ | ||
61 | + struct gdbarch_info info; | ||
62 | + | ||
63 | + /* Force the architecture to update, and (if it's a microblaze architecture) | ||
64 | + * microblaze_gdbarch_init will take care of the rest. */ | ||
65 | +// gdbarch_info_init (&info); | ||
66 | + gdbarch_update_p (info); | ||
67 | +} | ||
68 | + | ||
69 | + | ||
70 | +static enum microblaze_abi | ||
71 | +global_microblaze_abi (void) | ||
72 | +{ | ||
73 | + int i; | ||
74 | + | ||
75 | + for (i = 0; microblaze_abi_strings[i] != NULL; i++) | ||
76 | + if (microblaze_abi_strings[i] == microblaze_abi_string) | ||
77 | + return (enum microblaze_abi) i; | ||
78 | + | ||
79 | +// internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
80 | +} | ||
81 | + | ||
82 | +static void | ||
83 | +show_microblaze_abi (struct ui_file *file, | ||
84 | + int from_tty, | ||
85 | + struct cmd_list_element *ignored_cmd, | ||
86 | + const char *ignored_value) | ||
87 | +{ | ||
88 | + enum microblaze_abi global_abi = global_microblaze_abi (); | ||
89 | + enum microblaze_abi actual_abi = microblaze_abi (target_gdbarch ()); | ||
90 | + const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
91 | + | ||
92 | +#if 1 | ||
93 | + if (global_abi == MICROBLAZE_ABI_AUTO) | ||
94 | + fprintf_filtered | ||
95 | + (file, | ||
96 | + "The microblaze ABI is set automatically (currently \"%s\").\n", | ||
97 | + actual_abi_str); | ||
98 | + else if (global_abi == actual_abi) | ||
99 | + fprintf_filtered | ||
100 | + (file, | ||
101 | + "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", | ||
102 | + actual_abi_str); | ||
103 | + else | ||
104 | + { | ||
105 | +#endif | ||
106 | + /* Probably shouldn't happen... */ | ||
107 | + fprintf_filtered (file, | ||
108 | + "The (auto detected) microblaze ABI \"%s\" is in use " | ||
109 | + "even though the user setting was \"%s\".\n", | ||
110 | + actual_abi_str, microblaze_abi_strings[global_abi]); | ||
111 | + } | ||
112 | +} | ||
113 | + | ||
114 | +static void | ||
115 | +show_microblaze_command (const char *args, int from_tty) | ||
116 | +{ | ||
117 | + help_list (showmicroblazecmdlist, "show microblaze ", all_commands, gdb_stdout); | ||
118 | +} | ||
119 | + | ||
120 | +static void | ||
121 | +set_microblaze_command (const char *args, int from_tty) | ||
122 | +{ | ||
123 | + printf_unfiltered | ||
124 | + ("\"set microblaze\" must be followed by an appropriate subcommand.\n"); | ||
125 | + help_list (setmicroblazecmdlist, "set microblaze ", all_commands, gdb_stdout); | ||
126 | +} | ||
127 | + | ||
128 | static const char * const microblaze_register_names[] = | ||
129 | { | ||
130 | "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", | ||
131 | @@ -85,9 +172,21 @@ static const char * const microblaze_register_names[] = | ||
132 | static unsigned int microblaze_debug_flag = 0; | ||
133 | int reg_size = 4; | ||
134 | |||
135 | +unsigned int | ||
136 | +microblaze_abi_regsize (struct gdbarch *gdbarch) | ||
137 | +{ | ||
138 | + switch (microblaze_abi (gdbarch)) | ||
139 | + { | ||
140 | + case MICROBLAZE_ABI_M64: | ||
141 | + return 8; | ||
142 | + default: | ||
143 | + return 4; | ||
144 | + } | ||
145 | +} | ||
146 | + | ||
147 | #define microblaze_debug(fmt, ...) \ | ||
148 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
149 | - fmt, ## __VA_ARGS__) | ||
150 | + fmt, ## __VA_ARGS__) | ||
151 | |||
152 | |||
153 | /* Return the name of register REGNUM. */ | ||
154 | @@ -868,15 +967,30 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
155 | { | ||
156 | struct gdbarch *gdbarch; | ||
157 | tdesc_arch_data_up tdesc_data; | ||
158 | + enum microblaze_abi microblaze_abi, found_abi, wanted_abi; | ||
159 | const struct target_desc *tdesc = info.target_desc; | ||
160 | |||
161 | + /* What has the user specified from the command line? */ | ||
162 | + wanted_abi = global_microblaze_abi (); | ||
163 | + if (gdbarch_debug) | ||
164 | + fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
165 | + wanted_abi); | ||
166 | + if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
167 | + microblaze_abi = wanted_abi; | ||
168 | + | ||
169 | /* If there is already a candidate, use it. */ | ||
170 | arches = gdbarch_list_lookup_by_info (arches, &info); | ||
171 | - if (arches != NULL) | ||
172 | + if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
173 | return arches->gdbarch; | ||
174 | + | ||
175 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
176 | + { | ||
177 | + tdesc = tdesc_microblaze64; | ||
178 | + reg_size = 8; | ||
179 | + } | ||
180 | if (tdesc == NULL) | ||
181 | { | ||
182 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
183 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
184 | { | ||
185 | tdesc = tdesc_microblaze64; | ||
186 | reg_size = 8; | ||
187 | @@ -891,7 +1005,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
188 | int valid_p; | ||
189 | int i; | ||
190 | |||
191 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
192 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
193 | feature = tdesc_find_feature (tdesc, | ||
194 | "org.gnu.gdb.microblaze64.core"); | ||
195 | else | ||
196 | @@ -905,7 +1019,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
197 | for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
198 | valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
199 | microblaze_register_names[i]); | ||
200 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
201 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
202 | feature = tdesc_find_feature (tdesc, | ||
203 | "org.gnu.gdb.microblaze64.stack-protect"); | ||
204 | else | ||
205 | @@ -955,7 +1069,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
206 | set_gdbarch_ptr_bit (gdbarch, 64); | ||
207 | break; | ||
208 | } | ||
209 | - | ||
210 | + if(microblaze_abi == MICROBLAZE_ABI_M64) | ||
211 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
212 | |||
213 | /* Map Dwarf2 registers to GDB registers. */ | ||
214 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
215 | @@ -1014,7 +1129,38 @@ void | ||
216 | _initialize_microblaze_tdep () | ||
217 | { | ||
218 | register_gdbarch_init (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
219 | +// static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
220 | +// static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
221 | + | ||
222 | + /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
223 | |||
224 | + add_setshow_prefix_cmd ("microblaze", no_class, | ||
225 | + _("Various microblaze specific commands."), | ||
226 | + _("Various microblaze specific commands."), | ||
227 | + &setmicroblazecmdlist,&showmicroblazecmdlist, | ||
228 | + &setlist,&showlist); | ||
229 | +#if 0 | ||
230 | + add_prefix_cmd ("microblaze", no_class, set_microblaze_command, | ||
231 | + _("Various microblaze specific commands."), | ||
232 | + &setmicroblazecmdlist, "set microblaze ", 0, &setlist); | ||
233 | + | ||
234 | + add_prefix_cmd ("microblaze", no_class, show_microblaze_command, | ||
235 | + _("Various microblaze specific commands."), | ||
236 | + &showmicroblazecmdlist, "show microblaze ", 0, &showlist); | ||
237 | +#endif | ||
238 | + | ||
239 | + /* Allow the user to override the ABI. */ | ||
240 | + add_setshow_enum_cmd ("abi", class_obscure, microblaze_abi_strings, | ||
241 | + µblaze_abi_string, _("\ | ||
242 | +Set the microblaze ABI used by this program."), _("\ | ||
243 | +Show the microblaze ABI used by this program."), _("\ | ||
244 | +This option can be set to one of:\n\ | ||
245 | + auto - the default ABI associated with the current binary\n\ | ||
246 | + m64"), | ||
247 | + microblaze_abi_update, | ||
248 | + show_microblaze_abi, | ||
249 | + &setmicroblazecmdlist, &showmicroblazecmdlist); | ||
250 | + | ||
251 | initialize_tdesc_microblaze_with_stack_protect (); | ||
252 | initialize_tdesc_microblaze (); | ||
253 | initialize_tdesc_microblaze64_with_stack_protect (); | ||
254 | @@ -1029,5 +1175,4 @@ When non-zero, microblaze specific debugging is enabled."), | ||
255 | NULL, | ||
256 | &setdebuglist, &showdebuglist); | ||
257 | |||
258 | - | ||
259 | } | ||
260 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
261 | index f4d810303ca..babd6c36926 100644 | ||
262 | --- a/gdb/microblaze-tdep.h | ||
263 | +++ b/gdb/microblaze-tdep.h | ||
264 | @@ -19,9 +19,17 @@ | ||
265 | |||
266 | #ifndef MICROBLAZE_TDEP_H | ||
267 | #define MICROBLAZE_TDEP_H 1 | ||
268 | - | ||
269 | +#include "objfiles.h" | ||
270 | #include "gdbarch.h" | ||
271 | |||
272 | +struct gdbarch; | ||
273 | +enum microblaze_abi | ||
274 | + { | ||
275 | + MICROBLAZE_ABI_AUTO = 0, | ||
276 | + MICROBLAZE_ABI_M64, | ||
277 | + }; | ||
278 | + | ||
279 | +enum microblaze_abi microblaze_abi (struct gdbarch *gdbarch); | ||
280 | /* Microblaze architecture-specific information. */ | ||
281 | struct microblaze_gregset | ||
282 | { | ||
283 | @@ -35,11 +43,14 @@ struct microblaze_gdbarch_tdep : gdbarch_tdep | ||
284 | { | ||
285 | int dummy; // declare something. | ||
286 | |||
287 | + enum microblaze_abi microblaze_abi {}; | ||
288 | + enum microblaze_abi found_abi {}; | ||
289 | /* Register sets. */ | ||
290 | struct regset *gregset; | ||
291 | size_t sizeof_gregset; | ||
292 | struct regset *fpregset; | ||
293 | size_t sizeof_fpregset; | ||
294 | + int register_size; | ||
295 | }; | ||
296 | |||
297 | /* Register numbers. */ | ||
298 | -- | ||
299 | 2.37.1 (Apple Git-137.1) | ||
300 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch deleted file mode 100644 index bbd1f0b2..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 44fa1ecfbd8a5fe0cfea12a175fa041686842a0c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 10 May 2016 08:47:05 -0700 | ||
4 | Subject: [PATCH 7/9] resolve restrict keyword conflict | ||
5 | |||
6 | GCC detects that we call 'restrict' as param name in function | ||
7 | signatures and complains since both params are called 'restrict' | ||
8 | therefore we use __restrict to denote the C99 keywork | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | gnulib/import/sys_time.in.h | 8 ++++---- | ||
15 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h | ||
18 | index 90a67d18426..664641a1fe8 100644 | ||
19 | --- a/gnulib/import/sys_time.in.h | ||
20 | +++ b/gnulib/import/sys_time.in.h | ||
21 | @@ -93,20 +93,20 @@ struct timeval | ||
22 | # define gettimeofday rpl_gettimeofday | ||
23 | # endif | ||
24 | _GL_FUNCDECL_RPL (gettimeofday, int, | ||
25 | - (struct timeval *restrict, void *restrict) | ||
26 | + (struct timeval *__restrict, void *__restrict) | ||
27 | _GL_ARG_NONNULL ((1))); | ||
28 | _GL_CXXALIAS_RPL (gettimeofday, int, | ||
29 | - (struct timeval *restrict, void *restrict)); | ||
30 | + (struct timeval *__restrict, void *__restrict)); | ||
31 | # else | ||
32 | # if !@HAVE_GETTIMEOFDAY@ | ||
33 | _GL_FUNCDECL_SYS (gettimeofday, int, | ||
34 | - (struct timeval *restrict, void *restrict) | ||
35 | + (struct timeval *__restrict, void *__restrict) | ||
36 | _GL_ARG_NONNULL ((1))); | ||
37 | # endif | ||
38 | /* Need to cast, because on glibc systems, by default, the second argument is | ||
39 | struct timezone *. */ | ||
40 | _GL_CXXALIAS_SYS_CAST (gettimeofday, int, | ||
41 | - (struct timeval *restrict, void *restrict)); | ||
42 | + (struct timeval *__restrict, void *__restrict)); | ||
43 | # endif | ||
44 | _GL_CXXALIASWARN (gettimeofday); | ||
45 | # if defined __cplusplus && defined GNULIB_NAMESPACE | ||
46 | -- | ||
47 | 2.36.1 | ||
48 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch new file mode 100644 index 00000000..27c04153 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0007-these-changes-will-make-64-bit-vectors-as-default-ta.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From b6735e00ff7c60f8e66527402dd541b4217ce38f Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 19 Apr 2021 14:33:27 +0530 | ||
4 | Subject: [PATCH 07/54] these changes will make 64 bit vectors as default | ||
5 | target types when we built gdb with microblaze 64 bit type targets,for | ||
6 | instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64 | ||
7 | |||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | bfd/config.bfd | 8 ++++++++ | ||
11 | 1 file changed, 8 insertions(+) | ||
12 | |||
13 | diff --git a/bfd/config.bfd b/bfd/config.bfd | ||
14 | index 3a7d427778c..9a4b26be8f8 100644 | ||
15 | --- a/bfd/config.bfd | ||
16 | +++ b/bfd/config.bfd | ||
17 | @@ -880,7 +880,15 @@ case "${targ}" in | ||
18 | targ_defvec=metag_elf32_vec | ||
19 | targ_underscore=yes | ||
20 | ;; | ||
21 | + microblazeel*-*64) | ||
22 | + targ_defvec=microblaze_elf64_le_vec | ||
23 | + targ_selvecs=microblaze_elf64_vec | ||
24 | + ;; | ||
25 | |||
26 | + microblaze*-*64) | ||
27 | + targ_defvec=microblaze_elf64_vec | ||
28 | + targ_selvecs=microblaze_elf64_le_vec | ||
29 | + ;; | ||
30 | microblazeel*-*) | ||
31 | targ_defvec=microblaze_elf32_le_vec | ||
32 | targ_selvecs=microblaze_elf32_vec | ||
33 | -- | ||
34 | 2.34.1 | ||
35 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch new file mode 100644 index 00000000..54e53f6f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Added-m64-abi-for-64-bit-target-descriptions.-set-m6.patch | |||
@@ -0,0 +1,4104 @@ | |||
1 | From 89f7a0c3e8b3bc37a37280bacec724f764503f38 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Tue, 9 Nov 2021 16:19:17 +0530 | ||
4 | Subject: [PATCH 08/54] Added m64 abi for 64 bit target descriptions. set m64 | ||
5 | abi for 64 bit elf. | ||
6 | |||
7 | Conflicts: | ||
8 | gdb/microblaze-tdep.c | ||
9 | gdb/microblaze-tdep.h | ||
10 | |||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/elf64-microblaze.c | 3810 ++++++++++++++++++++++++++++++++++++++++ | ||
14 | gdb/microblaze-tdep.c | 160 +- | ||
15 | gdb/microblaze-tdep.h | 13 +- | ||
16 | 3 files changed, 3975 insertions(+), 8 deletions(-) | ||
17 | create mode 100755 bfd/elf64-microblaze.c | ||
18 | |||
19 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
20 | new file mode 100755 | ||
21 | index 00000000000..6cd9753a592 | ||
22 | --- /dev/null | ||
23 | +++ b/bfd/elf64-microblaze.c | ||
24 | @@ -0,0 +1,3810 @@ | ||
25 | +/* Xilinx MicroBlaze-specific support for 32-bit ELF | ||
26 | + | ||
27 | + Copyright (C) 2009-2021 Free Software Foundation, Inc. | ||
28 | + | ||
29 | + This file is part of BFD, the Binary File Descriptor library. | ||
30 | + | ||
31 | + This program is free software; you can redistribute it and/or modify | ||
32 | + it under the terms of the GNU General Public License as published by | ||
33 | + the Free Software Foundation; either version 3 of the License, or | ||
34 | + (at your option) any later version. | ||
35 | + | ||
36 | + This program is distributed in the hope that it will be useful, | ||
37 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
38 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
39 | + GNU General Public License for more details. | ||
40 | + | ||
41 | + You should have received a copy of the GNU General Public License | ||
42 | + along with this program; if not, write to the | ||
43 | + Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, | ||
44 | + Boston, MA 02110-1301, USA. */ | ||
45 | + | ||
46 | + | ||
47 | +#include "sysdep.h" | ||
48 | +#include "bfd.h" | ||
49 | +#include "bfdlink.h" | ||
50 | +#include "libbfd.h" | ||
51 | +#include "elf-bfd.h" | ||
52 | +#include "elf/microblaze.h" | ||
53 | +#include <assert.h> | ||
54 | + | ||
55 | +#define USE_RELA /* Only USE_REL is actually significant, but this is | ||
56 | + here are a reminder... */ | ||
57 | +#define INST_WORD_SIZE 4 | ||
58 | + | ||
59 | +static int ro_small_data_pointer = 0; | ||
60 | +static int rw_small_data_pointer = 0; | ||
61 | + | ||
62 | +static reloc_howto_type * microblaze_elf_howto_table [(int) R_MICROBLAZE_max]; | ||
63 | + | ||
64 | +static reloc_howto_type microblaze_elf_howto_raw[] = | ||
65 | +{ | ||
66 | + /* This reloc does nothing. */ | ||
67 | + HOWTO (R_MICROBLAZE_NONE, /* Type. */ | ||
68 | + 0, /* Rightshift. */ | ||
69 | + 0, /* Size. */ | ||
70 | + 0, /* Bitsize. */ | ||
71 | + false, /* PC_relative. */ | ||
72 | + 0, /* Bitpos. */ | ||
73 | + complain_overflow_dont, /* Complain on overflow. */ | ||
74 | + NULL, /* Special Function. */ | ||
75 | + "R_MICROBLAZE_NONE", /* Name. */ | ||
76 | + false, /* Partial Inplace. */ | ||
77 | + 0, /* Source Mask. */ | ||
78 | + 0, /* Dest Mask. */ | ||
79 | + false), /* PC relative offset? */ | ||
80 | + | ||
81 | + /* A standard 32 bit relocation. */ | ||
82 | + HOWTO (R_MICROBLAZE_32, /* Type. */ | ||
83 | + 0, /* Rightshift. */ | ||
84 | + 4, /* Size. */ | ||
85 | + 32, /* Bitsize. */ | ||
86 | + false, /* PC_relative. */ | ||
87 | + 0, /* Bitpos. */ | ||
88 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
89 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
90 | + "R_MICROBLAZE_32", /* Name. */ | ||
91 | + false, /* Partial Inplace. */ | ||
92 | + 0, /* Source Mask. */ | ||
93 | + 0xffffffff, /* Dest Mask. */ | ||
94 | + false), /* PC relative offset? */ | ||
95 | + | ||
96 | + /* A standard PCREL 32 bit relocation. */ | ||
97 | + HOWTO (R_MICROBLAZE_32_PCREL,/* Type. */ | ||
98 | + 0, /* Rightshift. */ | ||
99 | + 4, /* Size. */ | ||
100 | + 32, /* Bitsize. */ | ||
101 | + true, /* PC_relative. */ | ||
102 | + 0, /* Bitpos. */ | ||
103 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
104 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
105 | + "R_MICROBLAZE_32_PCREL", /* Name. */ | ||
106 | + true, /* Partial Inplace. */ | ||
107 | + 0, /* Source Mask. */ | ||
108 | + 0xffffffff, /* Dest Mask. */ | ||
109 | + true), /* PC relative offset? */ | ||
110 | + | ||
111 | + /* A 64 bit PCREL relocation. Table-entry not really used. */ | ||
112 | + HOWTO (R_MICROBLAZE_64_PCREL,/* Type. */ | ||
113 | + 0, /* Rightshift. */ | ||
114 | + 4, /* Size. */ | ||
115 | + 16, /* Bitsize. */ | ||
116 | + true, /* PC_relative. */ | ||
117 | + 0, /* Bitpos. */ | ||
118 | + complain_overflow_dont, /* Complain on overflow. */ | ||
119 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
120 | + "R_MICROBLAZE_64_PCREL", /* Name. */ | ||
121 | + false, /* Partial Inplace. */ | ||
122 | + 0, /* Source Mask. */ | ||
123 | + 0x0000ffff, /* Dest Mask. */ | ||
124 | + true), /* PC relative offset? */ | ||
125 | + | ||
126 | + /* The low half of a PCREL 32 bit relocation. */ | ||
127 | + HOWTO (R_MICROBLAZE_32_PCREL_LO, /* Type. */ | ||
128 | + 0, /* Rightshift. */ | ||
129 | + 4, /* Size. */ | ||
130 | + 16, /* Bitsize. */ | ||
131 | + true, /* PC_relative. */ | ||
132 | + 0, /* Bitpos. */ | ||
133 | + complain_overflow_signed, /* Complain on overflow. */ | ||
134 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
135 | + "R_MICROBLAZE_32_PCREL_LO", /* Name. */ | ||
136 | + false, /* Partial Inplace. */ | ||
137 | + 0, /* Source Mask. */ | ||
138 | + 0x0000ffff, /* Dest Mask. */ | ||
139 | + true), /* PC relative offset? */ | ||
140 | + | ||
141 | + HOWTO (R_MICROBLAZE_IMML_64, /* Type. */ | ||
142 | + 0, /* Rightshift. */ | ||
143 | + 4, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
144 | + 64, /* Bitsize. */ | ||
145 | + false, /* PC_relative. */ | ||
146 | + 0, /* Bitpos. */ | ||
147 | + complain_overflow_dont, /* Complain on overflow. */ | ||
148 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
149 | + "R_MICROBLAZE_IMML_64", /* Name. */ | ||
150 | + false, /* Partial Inplace. */ | ||
151 | + 0, /* Source Mask. */ | ||
152 | + 0xffffffffffffff, /* Dest Mask. */ | ||
153 | + false), /* PC relative offset? */ | ||
154 | + | ||
155 | + /* A 64 bit relocation. Table entry not really used. */ | ||
156 | + HOWTO (R_MICROBLAZE_64, /* Type. */ | ||
157 | + 0, /* Rightshift. */ | ||
158 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
159 | + 16, /* Bitsize. */ | ||
160 | + false, /* PC_relative. */ | ||
161 | + 0, /* Bitpos. */ | ||
162 | + complain_overflow_dont, /* Complain on overflow. */ | ||
163 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
164 | + "R_MICROBLAZE_64", /* Name. */ | ||
165 | + false, /* Partial Inplace. */ | ||
166 | + 0, /* Source Mask. */ | ||
167 | + 0x0000ffff, /* Dest Mask. */ | ||
168 | + false), /* PC relative offset? */ | ||
169 | + | ||
170 | + /* The low half of a 32 bit relocation. */ | ||
171 | + HOWTO (R_MICROBLAZE_32_LO, /* Type. */ | ||
172 | + 0, /* Rightshift. */ | ||
173 | + 4, /* Size. */ | ||
174 | + 16, /* Bitsize. */ | ||
175 | + false, /* PC_relative. */ | ||
176 | + 0, /* Bitpos. */ | ||
177 | + complain_overflow_signed, /* Complain on overflow. */ | ||
178 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
179 | + "R_MICROBLAZE_32_LO", /* Name. */ | ||
180 | + false, /* Partial Inplace. */ | ||
181 | + 0, /* Source Mask. */ | ||
182 | + 0x0000ffff, /* Dest Mask. */ | ||
183 | + false), /* PC relative offset? */ | ||
184 | + | ||
185 | + /* Read-only small data section relocation. */ | ||
186 | + HOWTO (R_MICROBLAZE_SRO32, /* Type. */ | ||
187 | + 0, /* Rightshift. */ | ||
188 | + 4, /* Size. */ | ||
189 | + 16, /* Bitsize. */ | ||
190 | + false, /* PC_relative. */ | ||
191 | + 0, /* Bitpos. */ | ||
192 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
193 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
194 | + "R_MICROBLAZE_SRO32", /* Name. */ | ||
195 | + false, /* Partial Inplace. */ | ||
196 | + 0, /* Source Mask. */ | ||
197 | + 0x0000ffff, /* Dest Mask. */ | ||
198 | + false), /* PC relative offset? */ | ||
199 | + | ||
200 | + /* Read-write small data area relocation. */ | ||
201 | + HOWTO (R_MICROBLAZE_SRW32, /* Type. */ | ||
202 | + 0, /* Rightshift. */ | ||
203 | + 4, /* Size. */ | ||
204 | + 16, /* Bitsize. */ | ||
205 | + false, /* PC_relative. */ | ||
206 | + 0, /* Bitpos. */ | ||
207 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
208 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
209 | + "R_MICROBLAZE_SRW32", /* Name. */ | ||
210 | + false, /* Partial Inplace. */ | ||
211 | + 0, /* Source Mask. */ | ||
212 | + 0x0000ffff, /* Dest Mask. */ | ||
213 | + false), /* PC relative offset? */ | ||
214 | + | ||
215 | + /* This reloc does nothing. Used for relaxation. */ | ||
216 | + HOWTO (R_MICROBLAZE_32_NONE, /* Type. */ | ||
217 | + 0, /* Rightshift. */ | ||
218 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
219 | + 32, /* Bitsize. */ | ||
220 | + true, /* PC_relative. */ | ||
221 | + 0, /* Bitpos. */ | ||
222 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
223 | + NULL, /* Special Function. */ | ||
224 | + "R_MICROBLAZE_32_NONE",/* Name. */ | ||
225 | + false, /* Partial Inplace. */ | ||
226 | + 0, /* Source Mask. */ | ||
227 | + 0, /* Dest Mask. */ | ||
228 | + false), /* PC relative offset? */ | ||
229 | + | ||
230 | + /* This reloc does nothing. Used for relaxation. */ | ||
231 | + HOWTO (R_MICROBLAZE_64_NONE, /* Type. */ | ||
232 | + 0, /* Rightshift. */ | ||
233 | + 0, /* Size. */ | ||
234 | + 0, /* Bitsize. */ | ||
235 | + true, /* PC_relative. */ | ||
236 | + 0, /* Bitpos. */ | ||
237 | + complain_overflow_dont, /* Complain on overflow. */ | ||
238 | + NULL, /* Special Function. */ | ||
239 | + "R_MICROBLAZE_64_NONE",/* Name. */ | ||
240 | + false, /* Partial Inplace. */ | ||
241 | + 0, /* Source Mask. */ | ||
242 | + 0, /* Dest Mask. */ | ||
243 | + false), /* PC relative offset? */ | ||
244 | + | ||
245 | + /* Symbol Op Symbol relocation. */ | ||
246 | + HOWTO (R_MICROBLAZE_32_SYM_OP_SYM, /* Type. */ | ||
247 | + 0, /* Rightshift. */ | ||
248 | + 4, /* Size. */ | ||
249 | + 32, /* Bitsize. */ | ||
250 | + false, /* PC_relative. */ | ||
251 | + 0, /* Bitpos. */ | ||
252 | + complain_overflow_bitfield, /* Complain on overflow. */ | ||
253 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
254 | + "R_MICROBLAZE_32_SYM_OP_SYM", /* Name. */ | ||
255 | + false, /* Partial Inplace. */ | ||
256 | + 0, /* Source Mask. */ | ||
257 | + 0xffffffff, /* Dest Mask. */ | ||
258 | + false), /* PC relative offset? */ | ||
259 | + | ||
260 | + /* GNU extension to record C++ vtable hierarchy. */ | ||
261 | + HOWTO (R_MICROBLAZE_GNU_VTINHERIT, /* Type. */ | ||
262 | + 0, /* Rightshift. */ | ||
263 | + 4, /* Size. */ | ||
264 | + 0, /* Bitsize. */ | ||
265 | + false, /* PC_relative. */ | ||
266 | + 0, /* Bitpos. */ | ||
267 | + complain_overflow_dont,/* Complain on overflow. */ | ||
268 | + NULL, /* Special Function. */ | ||
269 | + "R_MICROBLAZE_GNU_VTINHERIT", /* Name. */ | ||
270 | + false, /* Partial Inplace. */ | ||
271 | + 0, /* Source Mask. */ | ||
272 | + 0, /* Dest Mask. */ | ||
273 | + false), /* PC relative offset? */ | ||
274 | + | ||
275 | + /* GNU extension to record C++ vtable member usage. */ | ||
276 | + HOWTO (R_MICROBLAZE_GNU_VTENTRY, /* Type. */ | ||
277 | + 0, /* Rightshift. */ | ||
278 | + 4, /* Size. */ | ||
279 | + 0, /* Bitsize. */ | ||
280 | + false, /* PC_relative. */ | ||
281 | + 0, /* Bitpos. */ | ||
282 | + complain_overflow_dont,/* Complain on overflow. */ | ||
283 | + _bfd_elf_rel_vtable_reloc_fn, /* Special Function. */ | ||
284 | + "R_MICROBLAZE_GNU_VTENTRY", /* Name. */ | ||
285 | + false, /* Partial Inplace. */ | ||
286 | + 0, /* Source Mask. */ | ||
287 | + 0, /* Dest Mask. */ | ||
288 | + false), /* PC relative offset? */ | ||
289 | + | ||
290 | + /* A 64 bit GOTPC relocation. Table-entry not really used. */ | ||
291 | + HOWTO (R_MICROBLAZE_GOTPC_64, /* Type. */ | ||
292 | + 0, /* Rightshift. */ | ||
293 | + 4, /* Size. */ | ||
294 | + 16, /* Bitsize. */ | ||
295 | + true, /* PC_relative. */ | ||
296 | + 0, /* Bitpos. */ | ||
297 | + complain_overflow_dont, /* Complain on overflow. */ | ||
298 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
299 | + "R_MICROBLAZE_GOTPC_64", /* Name. */ | ||
300 | + false, /* Partial Inplace. */ | ||
301 | + 0, /* Source Mask. */ | ||
302 | + 0x0000ffff, /* Dest Mask. */ | ||
303 | + true), /* PC relative offset? */ | ||
304 | + | ||
305 | + /* A 64 bit TEXTPCREL relocation. Table-entry not really used. */ | ||
306 | + HOWTO (R_MICROBLAZE_TEXTPCREL_64, /* Type. */ | ||
307 | + 0, /* Rightshift. */ | ||
308 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
309 | + 16, /* Bitsize. */ | ||
310 | + true, /* PC_relative. */ | ||
311 | + 0, /* Bitpos. */ | ||
312 | + complain_overflow_dont, /* Complain on overflow. */ | ||
313 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
314 | + "R_MICROBLAZE_TEXTPCREL_64", /* Name. */ | ||
315 | + false, /* Partial Inplace. */ | ||
316 | + 0, /* Source Mask. */ | ||
317 | + 0x0000ffff, /* Dest Mask. */ | ||
318 | + true), /* PC relative offset? */ | ||
319 | + | ||
320 | + /* A 64 bit GOTPC relocation. Table-entry not really used. */ | ||
321 | + HOWTO (R_MICROBLAZE_GPC_64, /* Type. */ | ||
322 | + 0, /* Rightshift. */ | ||
323 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
324 | + 16, /* Bitsize. */ | ||
325 | + true, /* PC_relative. */ | ||
326 | + 0, /* Bitpos. */ | ||
327 | + complain_overflow_dont, /* Complain on overflow. */ | ||
328 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
329 | + "R_MICROBLAZE_GPC_64", /* Name. */ | ||
330 | + false, /* Partial Inplace. */ | ||
331 | + 0, /* Source Mask. */ | ||
332 | + 0x0000ffff, /* Dest Mask. */ | ||
333 | + true), /* PC relative offset? */ | ||
334 | + | ||
335 | + /* A 64 bit GOT relocation. Table-entry not really used. */ | ||
336 | + HOWTO (R_MICROBLAZE_GOT_64, /* Type. */ | ||
337 | + 0, /* Rightshift. */ | ||
338 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
339 | + 16, /* Bitsize. */ | ||
340 | + false, /* PC_relative. */ | ||
341 | + 0, /* Bitpos. */ | ||
342 | + complain_overflow_dont, /* Complain on overflow. */ | ||
343 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
344 | + "R_MICROBLAZE_GOT_64",/* Name. */ | ||
345 | + false, /* Partial Inplace. */ | ||
346 | + 0, /* Source Mask. */ | ||
347 | + 0x0000ffff, /* Dest Mask. */ | ||
348 | + false), /* PC relative offset? */ | ||
349 | + | ||
350 | + /* A 64 bit TEXTREL relocation. Table-entry not really used. */ | ||
351 | + HOWTO (R_MICROBLAZE_TEXTREL_64, /* Type. */ | ||
352 | + 0, /* Rightshift. */ | ||
353 | + 2, /* Size (0 = byte, 1 = short, 2 = long). */ | ||
354 | + 16, /* Bitsize. */ | ||
355 | + false, /* PC_relative. */ | ||
356 | + 0, /* Bitpos. */ | ||
357 | + complain_overflow_dont, /* Complain on overflow. */ | ||
358 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
359 | + "R_MICROBLAZE_TEXTREL_64",/* Name. */ | ||
360 | + false, /* Partial Inplace. */ | ||
361 | + 0, /* Source Mask. */ | ||
362 | + 0x0000ffff, /* Dest Mask. */ | ||
363 | + false), /* PC relative offset? */ | ||
364 | + | ||
365 | + /* A 64 bit PLT relocation. Table-entry not really used. */ | ||
366 | + HOWTO (R_MICROBLAZE_PLT_64, /* Type. */ | ||
367 | + 0, /* Rightshift. */ | ||
368 | + 4, /* Size. */ | ||
369 | + 16, /* Bitsize. */ | ||
370 | + true, /* PC_relative. */ | ||
371 | + 0, /* Bitpos. */ | ||
372 | + complain_overflow_dont, /* Complain on overflow. */ | ||
373 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
374 | + "R_MICROBLAZE_PLT_64",/* Name. */ | ||
375 | + false, /* Partial Inplace. */ | ||
376 | + 0, /* Source Mask. */ | ||
377 | + 0x0000ffff, /* Dest Mask. */ | ||
378 | + true), /* PC relative offset? */ | ||
379 | + | ||
380 | + /* Table-entry not really used. */ | ||
381 | + HOWTO (R_MICROBLAZE_REL, /* Type. */ | ||
382 | + 0, /* Rightshift. */ | ||
383 | + 4, /* Size. */ | ||
384 | + 16, /* Bitsize. */ | ||
385 | + true, /* PC_relative. */ | ||
386 | + 0, /* Bitpos. */ | ||
387 | + complain_overflow_dont, /* Complain on overflow. */ | ||
388 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
389 | + "R_MICROBLAZE_REL", /* Name. */ | ||
390 | + false, /* Partial Inplace. */ | ||
391 | + 0, /* Source Mask. */ | ||
392 | + 0x0000ffff, /* Dest Mask. */ | ||
393 | + true), /* PC relative offset? */ | ||
394 | + | ||
395 | + /* Table-entry not really used. */ | ||
396 | + HOWTO (R_MICROBLAZE_JUMP_SLOT,/* Type. */ | ||
397 | + 0, /* Rightshift. */ | ||
398 | + 4, /* Size. */ | ||
399 | + 16, /* Bitsize. */ | ||
400 | + true, /* PC_relative. */ | ||
401 | + 0, /* Bitpos. */ | ||
402 | + complain_overflow_dont, /* Complain on overflow. */ | ||
403 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
404 | + "R_MICROBLAZE_JUMP_SLOT", /* Name. */ | ||
405 | + false, /* Partial Inplace. */ | ||
406 | + 0, /* Source Mask. */ | ||
407 | + 0x0000ffff, /* Dest Mask. */ | ||
408 | + true), /* PC relative offset? */ | ||
409 | + | ||
410 | + /* Table-entry not really used. */ | ||
411 | + HOWTO (R_MICROBLAZE_GLOB_DAT,/* Type. */ | ||
412 | + 0, /* Rightshift. */ | ||
413 | + 4, /* Size. */ | ||
414 | + 16, /* Bitsize. */ | ||
415 | + true, /* PC_relative. */ | ||
416 | + 0, /* Bitpos. */ | ||
417 | + complain_overflow_dont, /* Complain on overflow. */ | ||
418 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
419 | + "R_MICROBLAZE_GLOB_DAT", /* Name. */ | ||
420 | + false, /* Partial Inplace. */ | ||
421 | + 0, /* Source Mask. */ | ||
422 | + 0x0000ffff, /* Dest Mask. */ | ||
423 | + true), /* PC relative offset? */ | ||
424 | + | ||
425 | + /* A 64 bit GOT relative relocation. Table-entry not really used. */ | ||
426 | + HOWTO (R_MICROBLAZE_GOTOFF_64, /* Type. */ | ||
427 | + 0, /* Rightshift. */ | ||
428 | + 4, /* Size. */ | ||
429 | + 16, /* Bitsize. */ | ||
430 | + false, /* PC_relative. */ | ||
431 | + 0, /* Bitpos. */ | ||
432 | + complain_overflow_dont, /* Complain on overflow. */ | ||
433 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
434 | + "R_MICROBLAZE_GOTOFF_64", /* Name. */ | ||
435 | + false, /* Partial Inplace. */ | ||
436 | + 0, /* Source Mask. */ | ||
437 | + 0x0000ffff, /* Dest Mask. */ | ||
438 | + false), /* PC relative offset? */ | ||
439 | + | ||
440 | + /* A 32 bit GOT relative relocation. Table-entry not really used. */ | ||
441 | + HOWTO (R_MICROBLAZE_GOTOFF_32, /* Type. */ | ||
442 | + 0, /* Rightshift. */ | ||
443 | + 4, /* Size. */ | ||
444 | + 16, /* Bitsize. */ | ||
445 | + false, /* PC_relative. */ | ||
446 | + 0, /* Bitpos. */ | ||
447 | + complain_overflow_dont, /* Complain on overflow. */ | ||
448 | + bfd_elf_generic_reloc, /* Special Function. */ | ||
449 | + "R_MICROBLAZE_GOTOFF_32", /* Name. */ | ||
450 | + false, /* Partial Inplace. */ | ||
451 | + 0, /* Source Mask. */ | ||
452 | + 0x0000ffff, /* Dest Mask. */ | ||
453 | + false), /* PC relative offset? */ | ||
454 | + | ||
455 | + /* COPY relocation. Table-entry not really used. */ | ||
456 | + HOWTO (R_MICROBLAZE_COPY, /* Type. */ | ||
457 | + 0, /* Rightshift. */ | ||
458 | + 4, /* Size. */ | ||
459 | + 16, /* Bitsize. */ | ||
460 | + false, /* PC_relative. */ | ||
461 | + 0, /* Bitpos. */ | ||
462 | + complain_overflow_dont, /* Complain on overflow. */ | ||
463 | + bfd_elf_generic_reloc,/* Special Function. */ | ||
464 | + "R_MICROBLAZE_COPY", /* Name. */ | ||
465 | + false, /* Partial Inplace. */ | ||
466 | + 0, /* Source Mask. */ | ||
467 | + 0x0000ffff, /* Dest Mask. */ | ||
468 | + false), /* PC relative offset? */ | ||
469 | + | ||
470 | + /* Marker relocs for TLS. */ | ||
471 | + HOWTO (R_MICROBLAZE_TLS, | ||
472 | + 0, /* rightshift */ | ||
473 | + 2, /* size (0 = byte, 1 = short, 2 = long) */ | ||
474 | + 32, /* bitsize */ | ||
475 | + false, /* pc_relative */ | ||
476 | + 0, /* bitpos */ | ||
477 | + complain_overflow_dont, /* complain_on_overflow */ | ||
478 | + bfd_elf_generic_reloc, /* special_function */ | ||
479 | + "R_MICROBLAZE_TLS", /* name */ | ||
480 | + false, /* partial_inplace */ | ||
481 | + 0, /* src_mask */ | ||
482 | + 0x0000ffff, /* dst_mask */ | ||
483 | + false), /* pcrel_offset */ | ||
484 | + | ||
485 | + HOWTO (R_MICROBLAZE_TLSGD, | ||
486 | + 0, /* rightshift */ | ||
487 | + 4, /* size */ | ||
488 | + 32, /* bitsize */ | ||
489 | + false, /* pc_relative */ | ||
490 | + 0, /* bitpos */ | ||
491 | + complain_overflow_dont, /* complain_on_overflow */ | ||
492 | + bfd_elf_generic_reloc, /* special_function */ | ||
493 | + "R_MICROBLAZE_TLSGD", /* name */ | ||
494 | + false, /* partial_inplace */ | ||
495 | + 0, /* src_mask */ | ||
496 | + 0x0000ffff, /* dst_mask */ | ||
497 | + false), /* pcrel_offset */ | ||
498 | + | ||
499 | + HOWTO (R_MICROBLAZE_TLSLD, | ||
500 | + 0, /* rightshift */ | ||
501 | + 2, /* size (0 = byte, 1 = short, 2 = long) */ | ||
502 | + 32, /* bitsize */ | ||
503 | + false, /* pc_relative */ | ||
504 | + 0, /* bitpos */ | ||
505 | + complain_overflow_dont, /* complain_on_overflow */ | ||
506 | + bfd_elf_generic_reloc, /* special_function */ | ||
507 | + "R_MICROBLAZE_TLSLD", /* name */ | ||
508 | + false, /* partial_inplace */ | ||
509 | + 0, /* src_mask */ | ||
510 | + 0x0000ffff, /* dst_mask */ | ||
511 | + false), /* pcrel_offset */ | ||
512 | + | ||
513 | + /* Computes the load module index of the load module that contains the | ||
514 | + definition of its TLS sym. */ | ||
515 | + HOWTO (R_MICROBLAZE_TLSDTPMOD32, | ||
516 | + 0, /* rightshift */ | ||
517 | + 2, /* size (0 = byte, 1 = short, 2 = long) */ | ||
518 | + 32, /* bitsize */ | ||
519 | + false, /* pc_relative */ | ||
520 | + 0, /* bitpos */ | ||
521 | + complain_overflow_dont, /* complain_on_overflow */ | ||
522 | + bfd_elf_generic_reloc, /* special_function */ | ||
523 | + "R_MICROBLAZE_TLSDTPMOD32", /* name */ | ||
524 | + false, /* partial_inplace */ | ||
525 | + 0, /* src_mask */ | ||
526 | + 0x0000ffff, /* dst_mask */ | ||
527 | + false), /* pcrel_offset */ | ||
528 | + | ||
529 | + /* Computes a dtv-relative displacement, the difference between the value | ||
530 | + of sym+add and the base address of the thread-local storage block that | ||
531 | + contains the definition of sym, minus 0x8000. Used for initializing GOT */ | ||
532 | + HOWTO (R_MICROBLAZE_TLSDTPREL32, | ||
533 | + 0, /* rightshift */ | ||
534 | + 4, /* size */ | ||
535 | + 32, /* bitsize */ | ||
536 | + false, /* pc_relative */ | ||
537 | + 0, /* bitpos */ | ||
538 | + complain_overflow_dont, /* complain_on_overflow */ | ||
539 | + bfd_elf_generic_reloc, /* special_function */ | ||
540 | + "R_MICROBLAZE_TLSDTPREL32", /* name */ | ||
541 | + false, /* partial_inplace */ | ||
542 | + 0, /* src_mask */ | ||
543 | + 0x0000ffff, /* dst_mask */ | ||
544 | + false), /* pcrel_offset */ | ||
545 | + | ||
546 | + /* Computes a dtv-relative displacement, the difference between the value | ||
547 | + of sym+add and the base address of the thread-local storage block that | ||
548 | + contains the definition of sym, minus 0x8000. */ | ||
549 | + HOWTO (R_MICROBLAZE_TLSDTPREL64, | ||
550 | + 0, /* rightshift */ | ||
551 | + 4, /* size */ | ||
552 | + 32, /* bitsize */ | ||
553 | + false, /* pc_relative */ | ||
554 | + 0, /* bitpos */ | ||
555 | + complain_overflow_dont, /* complain_on_overflow */ | ||
556 | + bfd_elf_generic_reloc, /* special_function */ | ||
557 | + "R_MICROBLAZE_TLSDTPREL64", /* name */ | ||
558 | + false, /* partial_inplace */ | ||
559 | + 0, /* src_mask */ | ||
560 | + 0x0000ffff, /* dst_mask */ | ||
561 | + false), /* pcrel_offset */ | ||
562 | + | ||
563 | + /* Computes a tp-relative displacement, the difference between the value of | ||
564 | + sym+add and the value of the thread pointer (r13). */ | ||
565 | + HOWTO (R_MICROBLAZE_TLSGOTTPREL32, | ||
566 | + 0, /* rightshift */ | ||
567 | + 4, /* size */ | ||
568 | + 32, /* bitsize */ | ||
569 | + false, /* pc_relative */ | ||
570 | + 0, /* bitpos */ | ||
571 | + complain_overflow_dont, /* complain_on_overflow */ | ||
572 | + bfd_elf_generic_reloc, /* special_function */ | ||
573 | + "R_MICROBLAZE_TLSGOTTPREL32", /* name */ | ||
574 | + false, /* partial_inplace */ | ||
575 | + 0, /* src_mask */ | ||
576 | + 0x0000ffff, /* dst_mask */ | ||
577 | + false), /* pcrel_offset */ | ||
578 | + | ||
579 | + /* Computes a tp-relative displacement, the difference between the value of | ||
580 | + sym+add and the value of the thread pointer (r13). */ | ||
581 | + HOWTO (R_MICROBLAZE_TLSTPREL32, | ||
582 | + 0, /* rightshift */ | ||
583 | + 4, /* size */ | ||
584 | + 32, /* bitsize */ | ||
585 | + false, /* pc_relative */ | ||
586 | + 0, /* bitpos */ | ||
587 | + complain_overflow_dont, /* complain_on_overflow */ | ||
588 | + bfd_elf_generic_reloc, /* special_function */ | ||
589 | + "R_MICROBLAZE_TLSTPREL32", /* name */ | ||
590 | + false, /* partial_inplace */ | ||
591 | + 0, /* src_mask */ | ||
592 | + 0x0000ffff, /* dst_mask */ | ||
593 | + false), /* pcrel_offset */ | ||
594 | + | ||
595 | +}; | ||
596 | + | ||
597 | +#ifndef NUM_ELEM | ||
598 | +#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0]) | ||
599 | +#endif | ||
600 | + | ||
601 | +/* Initialize the microblaze_elf_howto_table, so that linear accesses can be done. */ | ||
602 | + | ||
603 | +static void | ||
604 | +microblaze_elf_howto_init (void) | ||
605 | +{ | ||
606 | + unsigned int i; | ||
607 | + | ||
608 | + for (i = NUM_ELEM (microblaze_elf_howto_raw); i--;) | ||
609 | + { | ||
610 | + unsigned int type; | ||
611 | + | ||
612 | + type = microblaze_elf_howto_raw[i].type; | ||
613 | + | ||
614 | + BFD_ASSERT (type < NUM_ELEM (microblaze_elf_howto_table)); | ||
615 | + | ||
616 | + microblaze_elf_howto_table [type] = & microblaze_elf_howto_raw [i]; | ||
617 | + } | ||
618 | +} | ||
619 | + | ||
620 | +static reloc_howto_type * | ||
621 | +microblaze_elf_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, | ||
622 | + bfd_reloc_code_real_type code) | ||
623 | +{ | ||
624 | + enum elf_microblaze_reloc_type microblaze_reloc = R_MICROBLAZE_NONE; | ||
625 | + | ||
626 | + switch (code) | ||
627 | + { | ||
628 | + case BFD_RELOC_NONE: | ||
629 | + microblaze_reloc = R_MICROBLAZE_NONE; | ||
630 | + break; | ||
631 | + case BFD_RELOC_MICROBLAZE_32_NONE: | ||
632 | + microblaze_reloc = R_MICROBLAZE_32_NONE; | ||
633 | + break; | ||
634 | + case BFD_RELOC_MICROBLAZE_64_NONE: | ||
635 | + microblaze_reloc = R_MICROBLAZE_64_NONE; | ||
636 | + break; | ||
637 | + case BFD_RELOC_32: | ||
638 | + microblaze_reloc = R_MICROBLAZE_32; | ||
639 | + break; | ||
640 | + /* RVA is treated the same as 64 */ | ||
641 | + case BFD_RELOC_RVA: | ||
642 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
643 | + break; | ||
644 | + case BFD_RELOC_32_PCREL: | ||
645 | + microblaze_reloc = R_MICROBLAZE_32_PCREL; | ||
646 | + break; | ||
647 | + case BFD_RELOC_64_PCREL: | ||
648 | + microblaze_reloc = R_MICROBLAZE_64_PCREL; | ||
649 | + break; | ||
650 | + case BFD_RELOC_MICROBLAZE_32_LO_PCREL: | ||
651 | + microblaze_reloc = R_MICROBLAZE_32_PCREL_LO; | ||
652 | + break; | ||
653 | + case BFD_RELOC_64: | ||
654 | + microblaze_reloc = R_MICROBLAZE_64; | ||
655 | + break; | ||
656 | + case BFD_RELOC_MICROBLAZE_32_LO: | ||
657 | + microblaze_reloc = R_MICROBLAZE_32_LO; | ||
658 | + break; | ||
659 | + case BFD_RELOC_MICROBLAZE_32_ROSDA: | ||
660 | + microblaze_reloc = R_MICROBLAZE_SRO32; | ||
661 | + break; | ||
662 | + case BFD_RELOC_MICROBLAZE_32_RWSDA: | ||
663 | + microblaze_reloc = R_MICROBLAZE_SRW32; | ||
664 | + break; | ||
665 | + case BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM: | ||
666 | + microblaze_reloc = R_MICROBLAZE_32_SYM_OP_SYM; | ||
667 | + break; | ||
668 | + case BFD_RELOC_VTABLE_INHERIT: | ||
669 | + microblaze_reloc = R_MICROBLAZE_GNU_VTINHERIT; | ||
670 | + break; | ||
671 | + case BFD_RELOC_VTABLE_ENTRY: | ||
672 | + microblaze_reloc = R_MICROBLAZE_GNU_VTENTRY; | ||
673 | + break; | ||
674 | + case BFD_RELOC_MICROBLAZE_EA64: | ||
675 | + microblaze_reloc = R_MICROBLAZE_IMML_64; | ||
676 | + break; | ||
677 | + case BFD_RELOC_MICROBLAZE_64_GOTPC: | ||
678 | + microblaze_reloc = R_MICROBLAZE_GOTPC_64; | ||
679 | + break; | ||
680 | + case BFD_RELOC_MICROBLAZE_64_GPC: | ||
681 | + microblaze_reloc = R_MICROBLAZE_GPC_64; | ||
682 | + break; | ||
683 | + case BFD_RELOC_MICROBLAZE_64_GOT: | ||
684 | + microblaze_reloc = R_MICROBLAZE_GOT_64; | ||
685 | + break; | ||
686 | + case BFD_RELOC_MICROBLAZE_64_TEXTPCREL: | ||
687 | + microblaze_reloc = R_MICROBLAZE_TEXTPCREL_64; | ||
688 | + break; | ||
689 | + case BFD_RELOC_MICROBLAZE_64_TEXTREL: | ||
690 | + microblaze_reloc = R_MICROBLAZE_TEXTREL_64; | ||
691 | + break; | ||
692 | + case BFD_RELOC_MICROBLAZE_64_PLT: | ||
693 | + microblaze_reloc = R_MICROBLAZE_PLT_64; | ||
694 | + break; | ||
695 | + case BFD_RELOC_MICROBLAZE_64_GOTOFF: | ||
696 | + microblaze_reloc = R_MICROBLAZE_GOTOFF_64; | ||
697 | + break; | ||
698 | + case BFD_RELOC_MICROBLAZE_32_GOTOFF: | ||
699 | + microblaze_reloc = R_MICROBLAZE_GOTOFF_32; | ||
700 | + break; | ||
701 | + case BFD_RELOC_MICROBLAZE_64_TLSGD: | ||
702 | + microblaze_reloc = R_MICROBLAZE_TLSGD; | ||
703 | + break; | ||
704 | + case BFD_RELOC_MICROBLAZE_64_TLSLD: | ||
705 | + microblaze_reloc = R_MICROBLAZE_TLSLD; | ||
706 | + break; | ||
707 | + case BFD_RELOC_MICROBLAZE_32_TLSDTPREL: | ||
708 | + microblaze_reloc = R_MICROBLAZE_TLSDTPREL32; | ||
709 | + break; | ||
710 | + case BFD_RELOC_MICROBLAZE_64_TLSDTPREL: | ||
711 | + microblaze_reloc = R_MICROBLAZE_TLSDTPREL64; | ||
712 | + break; | ||
713 | + case BFD_RELOC_MICROBLAZE_32_TLSDTPMOD: | ||
714 | + microblaze_reloc = R_MICROBLAZE_TLSDTPMOD32; | ||
715 | + break; | ||
716 | + case BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL: | ||
717 | + microblaze_reloc = R_MICROBLAZE_TLSGOTTPREL32; | ||
718 | + break; | ||
719 | + case BFD_RELOC_MICROBLAZE_64_TLSTPREL: | ||
720 | + microblaze_reloc = R_MICROBLAZE_TLSTPREL32; | ||
721 | + break; | ||
722 | + case BFD_RELOC_MICROBLAZE_COPY: | ||
723 | + microblaze_reloc = R_MICROBLAZE_COPY; | ||
724 | + break; | ||
725 | + default: | ||
726 | + return (reloc_howto_type *) NULL; | ||
727 | + } | ||
728 | + | ||
729 | + if (!microblaze_elf_howto_table [R_MICROBLAZE_32]) | ||
730 | + /* Initialize howto table if needed. */ | ||
731 | + microblaze_elf_howto_init (); | ||
732 | + | ||
733 | + return microblaze_elf_howto_table [(int) microblaze_reloc]; | ||
734 | +}; | ||
735 | + | ||
736 | +static reloc_howto_type * | ||
737 | +microblaze_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, | ||
738 | + const char *r_name) | ||
739 | +{ | ||
740 | + unsigned int i; | ||
741 | + | ||
742 | + for (i = 0; i < NUM_ELEM (microblaze_elf_howto_raw); i++) | ||
743 | + if (microblaze_elf_howto_raw[i].name != NULL | ||
744 | + && strcasecmp (microblaze_elf_howto_raw[i].name, r_name) == 0) | ||
745 | + return µblaze_elf_howto_raw[i]; | ||
746 | + | ||
747 | + return NULL; | ||
748 | +} | ||
749 | + | ||
750 | +/* Set the howto pointer for a RCE ELF reloc. */ | ||
751 | + | ||
752 | +static bool | ||
753 | +microblaze_elf_info_to_howto (bfd * abfd, | ||
754 | + arelent * cache_ptr, | ||
755 | + Elf_Internal_Rela * dst) | ||
756 | +{ | ||
757 | + unsigned int r_type; | ||
758 | + | ||
759 | + if (!microblaze_elf_howto_table [R_MICROBLAZE_32]) | ||
760 | + /* Initialize howto table if needed. */ | ||
761 | + microblaze_elf_howto_init (); | ||
762 | + | ||
763 | + r_type = ELF64_R_TYPE (dst->r_info); | ||
764 | + if (r_type >= R_MICROBLAZE_max) | ||
765 | + { | ||
766 | + /* xgettext:c-format */ | ||
767 | + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), | ||
768 | + abfd, r_type); | ||
769 | + bfd_set_error (bfd_error_bad_value); | ||
770 | + return false; | ||
771 | + } | ||
772 | + | ||
773 | + cache_ptr->howto = microblaze_elf_howto_table [r_type]; | ||
774 | + return true; | ||
775 | +} | ||
776 | + | ||
777 | +struct _microblaze_elf_section_data | ||
778 | +{ | ||
779 | + struct bfd_elf_section_data elf; | ||
780 | + /* Count of used relaxation table entries. */ | ||
781 | + size_t relax_count; | ||
782 | + /* Relaxation table. */ | ||
783 | + struct relax_table *relax; | ||
784 | +}; | ||
785 | + | ||
786 | +#define microblaze_elf_section_data(sec) \ | ||
787 | + ((struct _microblaze_elf_section_data *) elf_section_data (sec)) | ||
788 | + | ||
789 | +static bool | ||
790 | +microblaze_elf_new_section_hook (bfd *abfd, asection *sec) | ||
791 | +{ | ||
792 | + if (!sec->used_by_bfd) | ||
793 | + { | ||
794 | + struct _microblaze_elf_section_data *sdata; | ||
795 | + size_t amt = sizeof (*sdata); | ||
796 | + | ||
797 | + sdata = bfd_zalloc (abfd, amt); | ||
798 | + if (sdata == NULL) | ||
799 | + return false; | ||
800 | + sec->used_by_bfd = sdata; | ||
801 | + } | ||
802 | + | ||
803 | + return _bfd_elf_new_section_hook (abfd, sec); | ||
804 | +} | ||
805 | + | ||
806 | +/* Microblaze ELF local labels start with 'L.' or '$L', not '.L'. */ | ||
807 | + | ||
808 | +static bool | ||
809 | +microblaze_elf_is_local_label_name (bfd *abfd, const char *name) | ||
810 | +{ | ||
811 | + if (name[0] == 'L' && name[1] == '.') | ||
812 | + return true; | ||
813 | + | ||
814 | + if (name[0] == '$' && name[1] == 'L') | ||
815 | + return true; | ||
816 | + | ||
817 | + /* With gcc, the labels go back to starting with '.', so we accept | ||
818 | + the generic ELF local label syntax as well. */ | ||
819 | + return _bfd_elf_is_local_label_name (abfd, name); | ||
820 | +} | ||
821 | + | ||
822 | +/* The microblaze linker (like many others) needs to keep track of | ||
823 | + the number of relocs that it decides to copy as dynamic relocs in | ||
824 | + check_relocs for each symbol. This is so that it can later discard | ||
825 | + them if they are found to be unnecessary. We store the information | ||
826 | + in a field extending the regular ELF linker hash table. */ | ||
827 | + | ||
828 | +struct elf64_mb_dyn_relocs | ||
829 | +{ | ||
830 | + struct elf64_mb_dyn_relocs *next; | ||
831 | + | ||
832 | + /* The input section of the reloc. */ | ||
833 | + asection *sec; | ||
834 | + | ||
835 | + /* Total number of relocs copied for the input section. */ | ||
836 | + bfd_size_type count; | ||
837 | + | ||
838 | + /* Number of pc-relative relocs copied for the input section. */ | ||
839 | + bfd_size_type pc_count; | ||
840 | +}; | ||
841 | + | ||
842 | +/* ELF linker hash entry. */ | ||
843 | + | ||
844 | +struct elf64_mb_link_hash_entry | ||
845 | +{ | ||
846 | + struct elf_link_hash_entry elf; | ||
847 | + | ||
848 | + /* Track dynamic relocs copied for this symbol. */ | ||
849 | + struct elf64_mb_dyn_relocs *dyn_relocs; | ||
850 | + | ||
851 | + /* TLS Reference Types for the symbol; Updated by check_relocs */ | ||
852 | +#define TLS_GD 1 /* GD reloc. */ | ||
853 | +#define TLS_LD 2 /* LD reloc. */ | ||
854 | +#define TLS_TPREL 4 /* TPREL reloc, => IE. */ | ||
855 | +#define TLS_DTPREL 8 /* DTPREL reloc, => LD. */ | ||
856 | +#define TLS_TLS 16 /* Any TLS reloc. */ | ||
857 | + unsigned char tls_mask; | ||
858 | + | ||
859 | +}; | ||
860 | + | ||
861 | +#define IS_TLS_GD(x) (x == (TLS_TLS | TLS_GD)) | ||
862 | +#define IS_TLS_LD(x) (x == (TLS_TLS | TLS_LD)) | ||
863 | +#define IS_TLS_DTPREL(x) (x == (TLS_TLS | TLS_DTPREL)) | ||
864 | +#define IS_TLS_NONE(x) (x == 0) | ||
865 | + | ||
866 | +#define elf64_mb_hash_entry(ent) ((struct elf64_mb_link_hash_entry *)(ent)) | ||
867 | + | ||
868 | +/* ELF linker hash table. */ | ||
869 | + | ||
870 | +struct elf64_mb_link_hash_table | ||
871 | +{ | ||
872 | + struct elf_link_hash_table elf; | ||
873 | + | ||
874 | + /* Short-cuts to get to dynamic linker sections. */ | ||
875 | + asection *sgot; | ||
876 | + asection *sgotplt; | ||
877 | + asection *srelgot; | ||
878 | + asection *splt; | ||
879 | + asection *srelplt; | ||
880 | + asection *sdynbss; | ||
881 | + asection *srelbss; | ||
882 | + | ||
883 | + /* Small local sym to section mapping cache. */ | ||
884 | + struct sym_cache sym_sec; | ||
885 | + | ||
886 | + /* TLS Local Dynamic GOT Entry */ | ||
887 | + union { | ||
888 | + bfd_signed_vma refcount; | ||
889 | + bfd_vma offset; | ||
890 | + } tlsld_got; | ||
891 | +}; | ||
892 | + | ||
893 | +/* Nonzero if this section has TLS related relocations. */ | ||
894 | +#define has_tls_reloc sec_flg0 | ||
895 | + | ||
896 | +/* Get the ELF linker hash table from a link_info structure. */ | ||
897 | + | ||
898 | +#define elf64_mb_hash_table(p) \ | ||
899 | + ((is_elf_hash_table ((p)->hash) \ | ||
900 | + && elf_hash_table_id (elf_hash_table (p)) == MICROBLAZE_ELF_DATA) \ | ||
901 | + ? (struct elf64_mb_link_hash_table *) (p)->hash : NULL) | ||
902 | + | ||
903 | +/* Create an entry in a microblaze ELF linker hash table. */ | ||
904 | + | ||
905 | +static struct bfd_hash_entry * | ||
906 | +link_hash_newfunc (struct bfd_hash_entry *entry, | ||
907 | + struct bfd_hash_table *table, | ||
908 | + const char *string) | ||
909 | +{ | ||
910 | + /* Allocate the structure if it has not already been allocated by a | ||
911 | + subclass. */ | ||
912 | + if (entry == NULL) | ||
913 | + { | ||
914 | + entry = bfd_hash_allocate (table, | ||
915 | + sizeof (struct elf64_mb_link_hash_entry)); | ||
916 | + if (entry == NULL) | ||
917 | + return entry; | ||
918 | + } | ||
919 | + | ||
920 | + /* Call the allocation method of the superclass. */ | ||
921 | + entry = _bfd_elf_link_hash_newfunc (entry, table, string); | ||
922 | + if (entry != NULL) | ||
923 | + { | ||
924 | + struct elf64_mb_link_hash_entry *eh; | ||
925 | + | ||
926 | + eh = (struct elf64_mb_link_hash_entry *) entry; | ||
927 | + eh->tls_mask = 0; | ||
928 | + } | ||
929 | + | ||
930 | + return entry; | ||
931 | +} | ||
932 | + | ||
933 | +/* Create a mb ELF linker hash table. */ | ||
934 | + | ||
935 | +static struct bfd_link_hash_table * | ||
936 | +microblaze_elf_link_hash_table_create (bfd *abfd) | ||
937 | +{ | ||
938 | + struct elf64_mb_link_hash_table *ret; | ||
939 | + size_t amt = sizeof (struct elf64_mb_link_hash_table); | ||
940 | + | ||
941 | + ret = (struct elf64_mb_link_hash_table *) bfd_zmalloc (amt); | ||
942 | + if (ret == NULL) | ||
943 | + return NULL; | ||
944 | + | ||
945 | + if (!_bfd_elf_link_hash_table_init (&ret->elf, abfd, link_hash_newfunc, | ||
946 | + sizeof (struct elf64_mb_link_hash_entry), | ||
947 | + MICROBLAZE_ELF_DATA)) | ||
948 | + { | ||
949 | + free (ret); | ||
950 | + return NULL; | ||
951 | + } | ||
952 | + | ||
953 | + return &ret->elf.root; | ||
954 | +} | ||
955 | + | ||
956 | +/* Set the values of the small data pointers. */ | ||
957 | + | ||
958 | +static void | ||
959 | +microblaze_elf_final_sdp (struct bfd_link_info *info) | ||
960 | +{ | ||
961 | + struct bfd_link_hash_entry *h; | ||
962 | + | ||
963 | + h = bfd_link_hash_lookup (info->hash, RO_SDA_ANCHOR_NAME, false, false, true); | ||
964 | + if (h != (struct bfd_link_hash_entry *) NULL | ||
965 | + && h->type == bfd_link_hash_defined) | ||
966 | + ro_small_data_pointer = (h->u.def.value | ||
967 | + + h->u.def.section->output_section->vma | ||
968 | + + h->u.def.section->output_offset); | ||
969 | + | ||
970 | + h = bfd_link_hash_lookup (info->hash, RW_SDA_ANCHOR_NAME, false, false, true); | ||
971 | + if (h != (struct bfd_link_hash_entry *) NULL | ||
972 | + && h->type == bfd_link_hash_defined) | ||
973 | + rw_small_data_pointer = (h->u.def.value | ||
974 | + + h->u.def.section->output_section->vma | ||
975 | + + h->u.def.section->output_offset); | ||
976 | +} | ||
977 | + | ||
978 | +static bfd_vma | ||
979 | +dtprel_base (struct bfd_link_info *info) | ||
980 | +{ | ||
981 | + /* If tls_sec is NULL, we should have signalled an error already. */ | ||
982 | + if (elf_hash_table (info)->tls_sec == NULL) | ||
983 | + return 0; | ||
984 | + return elf_hash_table (info)->tls_sec->vma; | ||
985 | +} | ||
986 | + | ||
987 | +/* The size of the thread control block. */ | ||
988 | +#define TCB_SIZE 8 | ||
989 | + | ||
990 | +/* Output a simple dynamic relocation into SRELOC. */ | ||
991 | + | ||
992 | +static void | ||
993 | +microblaze_elf_output_dynamic_relocation (bfd *output_bfd, | ||
994 | + asection *sreloc, | ||
995 | + unsigned long reloc_index, | ||
996 | + unsigned long indx, | ||
997 | + int r_type, | ||
998 | + bfd_vma offset, | ||
999 | + bfd_vma addend) | ||
1000 | +{ | ||
1001 | + | ||
1002 | + Elf_Internal_Rela rel; | ||
1003 | + | ||
1004 | + rel.r_info = ELF64_R_INFO (indx, r_type); | ||
1005 | + rel.r_offset = offset; | ||
1006 | + rel.r_addend = addend; | ||
1007 | + | ||
1008 | + bfd_elf64_swap_reloca_out (output_bfd, &rel, | ||
1009 | + (sreloc->contents + reloc_index * sizeof (Elf64_External_Rela))); | ||
1010 | +} | ||
1011 | + | ||
1012 | +/* This code is taken from elf64-m32r.c | ||
1013 | + There is some attempt to make this function usable for many architectures, | ||
1014 | + both USE_REL and USE_RELA ['twould be nice if such a critter existed], | ||
1015 | + if only to serve as a learning tool. | ||
1016 | + | ||
1017 | + The RELOCATE_SECTION function is called by the new ELF backend linker | ||
1018 | + to handle the relocations for a section. | ||
1019 | + | ||
1020 | + The relocs are always passed as Rela structures; if the section | ||
1021 | + actually uses Rel structures, the r_addend field will always be | ||
1022 | + zero. | ||
1023 | + | ||
1024 | + This function is responsible for adjust the section contents as | ||
1025 | + necessary, and (if using Rela relocs and generating a | ||
1026 | + relocatable output file) adjusting the reloc addend as | ||
1027 | + necessary. | ||
1028 | + | ||
1029 | + This function does not have to worry about setting the reloc | ||
1030 | + address or the reloc symbol index. | ||
1031 | + | ||
1032 | + LOCAL_SYMS is a pointer to the swapped in local symbols. | ||
1033 | + | ||
1034 | + LOCAL_SECTIONS is an array giving the section in the input file | ||
1035 | + corresponding to the st_shndx field of each local symbol. | ||
1036 | + | ||
1037 | + The global hash table entry for the global symbols can be found | ||
1038 | + via elf_sym_hashes (input_bfd). | ||
1039 | + | ||
1040 | + When generating relocatable output, this function must handle | ||
1041 | + STB_LOCAL/STT_SECTION symbols specially. The output symbol is | ||
1042 | + going to be the section symbol corresponding to the output | ||
1043 | + section, which means that the addend must be adjusted | ||
1044 | + accordingly. */ | ||
1045 | + | ||
1046 | +static int | ||
1047 | +microblaze_elf_relocate_section (bfd *output_bfd, | ||
1048 | + struct bfd_link_info *info, | ||
1049 | + bfd *input_bfd, | ||
1050 | + asection *input_section, | ||
1051 | + bfd_byte *contents, | ||
1052 | + Elf_Internal_Rela *relocs, | ||
1053 | + Elf_Internal_Sym *local_syms, | ||
1054 | + asection **local_sections) | ||
1055 | +{ | ||
1056 | + struct elf64_mb_link_hash_table *htab; | ||
1057 | + Elf_Internal_Shdr *symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; | ||
1058 | + struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); | ||
1059 | + Elf_Internal_Rela *rel, *relend; | ||
1060 | + int endian = (bfd_little_endian (output_bfd)) ? 0 : 2; | ||
1061 | + /* Assume success. */ | ||
1062 | + bool ret = true; | ||
1063 | + asection *sreloc; | ||
1064 | + bfd_vma *local_got_offsets; | ||
1065 | + unsigned int tls_type; | ||
1066 | + | ||
1067 | + if (!microblaze_elf_howto_table[R_MICROBLAZE_max-1]) | ||
1068 | + microblaze_elf_howto_init (); | ||
1069 | + | ||
1070 | + htab = elf64_mb_hash_table (info); | ||
1071 | + if (htab == NULL) | ||
1072 | + return false; | ||
1073 | + | ||
1074 | + local_got_offsets = elf_local_got_offsets (input_bfd); | ||
1075 | + | ||
1076 | + sreloc = elf_section_data (input_section)->sreloc; | ||
1077 | + | ||
1078 | + rel = relocs; | ||
1079 | + relend = relocs + input_section->reloc_count; | ||
1080 | + for (; rel < relend; rel++) | ||
1081 | + { | ||
1082 | + int r_type; | ||
1083 | + reloc_howto_type *howto; | ||
1084 | + unsigned long r_symndx; | ||
1085 | + bfd_vma addend = rel->r_addend; | ||
1086 | + bfd_vma offset = rel->r_offset; | ||
1087 | + struct elf_link_hash_entry *h; | ||
1088 | + Elf_Internal_Sym *sym; | ||
1089 | + asection *sec; | ||
1090 | + const char *sym_name; | ||
1091 | + bfd_reloc_status_type r = bfd_reloc_ok; | ||
1092 | + const char *errmsg = NULL; | ||
1093 | + bool unresolved_reloc = false; | ||
1094 | + | ||
1095 | + h = NULL; | ||
1096 | + r_type = ELF64_R_TYPE (rel->r_info); | ||
1097 | + tls_type = 0; | ||
1098 | + | ||
1099 | + if (r_type < 0 || r_type >= (int) R_MICROBLAZE_max) | ||
1100 | + { | ||
1101 | + /* xgettext:c-format */ | ||
1102 | + _bfd_error_handler (_("%pB: unsupported relocation type %#x"), | ||
1103 | + input_bfd, (int) r_type); | ||
1104 | + bfd_set_error (bfd_error_bad_value); | ||
1105 | + ret = false; | ||
1106 | + continue; | ||
1107 | + } | ||
1108 | + | ||
1109 | + howto = microblaze_elf_howto_table[r_type]; | ||
1110 | + r_symndx = ELF64_R_SYM (rel->r_info); | ||
1111 | + | ||
1112 | + if (bfd_link_relocatable (info)) | ||
1113 | + { | ||
1114 | + /* This is a relocatable link. We don't have to change | ||
1115 | + anything, unless the reloc is against a section symbol, | ||
1116 | + in which case we have to adjust according to where the | ||
1117 | + section symbol winds up in the output section. */ | ||
1118 | + sec = NULL; | ||
1119 | + if (r_symndx >= symtab_hdr->sh_info) | ||
1120 | + /* External symbol. */ | ||
1121 | + continue; | ||
1122 | + | ||
1123 | + /* Local symbol. */ | ||
1124 | + sym = local_syms + r_symndx; | ||
1125 | + sym_name = "<local symbol>"; | ||
1126 | + /* STT_SECTION: symbol is associated with a section. */ | ||
1127 | + if (ELF_ST_TYPE (sym->st_info) != STT_SECTION) | ||
1128 | + /* Symbol isn't associated with a section. Nothing to do. */ | ||
1129 | + continue; | ||
1130 | + | ||
1131 | + sec = local_sections[r_symndx]; | ||
1132 | + addend += sec->output_offset + sym->st_value; | ||
1133 | +#ifndef USE_REL | ||
1134 | + /* This can't be done for USE_REL because it doesn't mean anything | ||
1135 | + and elf_link_input_bfd asserts this stays zero. */ | ||
1136 | + /* rel->r_addend = addend; */ | ||
1137 | +#endif | ||
1138 | + | ||
1139 | +#ifndef USE_REL | ||
1140 | + /* Addends are stored with relocs. We're done. */ | ||
1141 | + continue; | ||
1142 | +#else /* USE_REL */ | ||
1143 | + /* If partial_inplace, we need to store any additional addend | ||
1144 | + back in the section. */ | ||
1145 | + if (!howto->partial_inplace) | ||
1146 | + continue; | ||
1147 | + /* ??? Here is a nice place to call a special_function like handler. */ | ||
1148 | + r = _bfd_relocate_contents (howto, input_bfd, addend, | ||
1149 | + contents + offset); | ||
1150 | +#endif /* USE_REL */ | ||
1151 | + } | ||
1152 | + else | ||
1153 | + { | ||
1154 | + bfd_vma relocation; | ||
1155 | + bool resolved_to_zero; | ||
1156 | + | ||
1157 | + /* This is a final link. */ | ||
1158 | + sym = NULL; | ||
1159 | + sec = NULL; | ||
1160 | + unresolved_reloc = false; | ||
1161 | + | ||
1162 | + if (r_symndx < symtab_hdr->sh_info) | ||
1163 | + { | ||
1164 | + /* Local symbol. */ | ||
1165 | + sym = local_syms + r_symndx; | ||
1166 | + sec = local_sections[r_symndx]; | ||
1167 | + if (sec == 0) | ||
1168 | + continue; | ||
1169 | + sym_name = "<local symbol>"; | ||
1170 | + relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); | ||
1171 | + /* r_addend may have changed if the reference section was | ||
1172 | + a merge section. */ | ||
1173 | + addend = rel->r_addend; | ||
1174 | + } | ||
1175 | + else | ||
1176 | + { | ||
1177 | + /* External symbol. */ | ||
1178 | + bool warned ATTRIBUTE_UNUSED; | ||
1179 | + bool ignored ATTRIBUTE_UNUSED; | ||
1180 | + | ||
1181 | + RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, | ||
1182 | + r_symndx, symtab_hdr, sym_hashes, | ||
1183 | + h, sec, relocation, | ||
1184 | + unresolved_reloc, warned, ignored); | ||
1185 | + sym_name = h->root.root.string; | ||
1186 | + } | ||
1187 | + | ||
1188 | + /* Sanity check the address. */ | ||
1189 | + if (offset > bfd_get_section_limit (input_bfd, input_section)) | ||
1190 | + { | ||
1191 | + r = bfd_reloc_outofrange; | ||
1192 | + goto check_reloc; | ||
1193 | + } | ||
1194 | + | ||
1195 | + resolved_to_zero = (h != NULL | ||
1196 | + && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)); | ||
1197 | + | ||
1198 | + switch ((int) r_type) | ||
1199 | + { | ||
1200 | + case (int) R_MICROBLAZE_SRO32 : | ||
1201 | + { | ||
1202 | + const char *name; | ||
1203 | + | ||
1204 | + /* Only relocate if the symbol is defined. */ | ||
1205 | + if (sec) | ||
1206 | + { | ||
1207 | + name = bfd_section_name (sec); | ||
1208 | + | ||
1209 | + if (strcmp (name, ".sdata2") == 0 | ||
1210 | + || strcmp (name, ".sbss2") == 0) | ||
1211 | + { | ||
1212 | + if (ro_small_data_pointer == 0) | ||
1213 | + microblaze_elf_final_sdp (info); | ||
1214 | + if (ro_small_data_pointer == 0) | ||
1215 | + { | ||
1216 | + ret = false; | ||
1217 | + r = bfd_reloc_undefined; | ||
1218 | + goto check_reloc; | ||
1219 | + } | ||
1220 | + | ||
1221 | + /* At this point `relocation' contains the object's | ||
1222 | + address. */ | ||
1223 | + relocation -= ro_small_data_pointer; | ||
1224 | + /* Now it contains the offset from _SDA2_BASE_. */ | ||
1225 | + r = _bfd_final_link_relocate (howto, input_bfd, | ||
1226 | + input_section, | ||
1227 | + contents, offset, | ||
1228 | + relocation, addend); | ||
1229 | + } | ||
1230 | + else | ||
1231 | + { | ||
1232 | + _bfd_error_handler | ||
1233 | + /* xgettext:c-format */ | ||
1234 | + (_("%pB: the target (%s) of an %s relocation" | ||
1235 | + " is in the wrong section (%pA)"), | ||
1236 | + input_bfd, | ||
1237 | + sym_name, | ||
1238 | + microblaze_elf_howto_table[(int) r_type]->name, | ||
1239 | + sec); | ||
1240 | + /*bfd_set_error (bfd_error_bad_value); ??? why? */ | ||
1241 | + ret = false; | ||
1242 | + continue; | ||
1243 | + } | ||
1244 | + } | ||
1245 | + } | ||
1246 | + break; | ||
1247 | + | ||
1248 | + case (int) R_MICROBLAZE_SRW32 : | ||
1249 | + { | ||
1250 | + const char *name; | ||
1251 | + | ||
1252 | + /* Only relocate if the symbol is defined. */ | ||
1253 | + if (sec) | ||
1254 | + { | ||
1255 | + name = bfd_section_name (sec); | ||
1256 | + | ||
1257 | + if (strcmp (name, ".sdata") == 0 | ||
1258 | + || strcmp (name, ".sbss") == 0) | ||
1259 | + { | ||
1260 | + if (rw_small_data_pointer == 0) | ||
1261 | + microblaze_elf_final_sdp (info); | ||
1262 | + if (rw_small_data_pointer == 0) | ||
1263 | + { | ||
1264 | + ret = false; | ||
1265 | + r = bfd_reloc_undefined; | ||
1266 | + goto check_reloc; | ||
1267 | + } | ||
1268 | + | ||
1269 | + /* At this point `relocation' contains the object's | ||
1270 | + address. */ | ||
1271 | + relocation -= rw_small_data_pointer; | ||
1272 | + /* Now it contains the offset from _SDA_BASE_. */ | ||
1273 | + r = _bfd_final_link_relocate (howto, input_bfd, | ||
1274 | + input_section, | ||
1275 | + contents, offset, | ||
1276 | + relocation, addend); | ||
1277 | + } | ||
1278 | + else | ||
1279 | + { | ||
1280 | + _bfd_error_handler | ||
1281 | + /* xgettext:c-format */ | ||
1282 | + (_("%pB: the target (%s) of an %s relocation" | ||
1283 | + " is in the wrong section (%pA)"), | ||
1284 | + input_bfd, | ||
1285 | + sym_name, | ||
1286 | + microblaze_elf_howto_table[(int) r_type]->name, | ||
1287 | + sec); | ||
1288 | + /*bfd_set_error (bfd_error_bad_value); ??? why? */ | ||
1289 | + ret = false; | ||
1290 | + continue; | ||
1291 | + } | ||
1292 | + } | ||
1293 | + } | ||
1294 | + break; | ||
1295 | + | ||
1296 | + case (int) R_MICROBLAZE_32_SYM_OP_SYM: | ||
1297 | + break; /* Do nothing. */ | ||
1298 | + | ||
1299 | + case (int) R_MICROBLAZE_GOTPC_64: | ||
1300 | + relocation = (htab->elf.sgotplt->output_section->vma | ||
1301 | + + htab->elf.sgotplt->output_offset); | ||
1302 | + relocation -= (input_section->output_section->vma | ||
1303 | + + input_section->output_offset | ||
1304 | + + offset + INST_WORD_SIZE); | ||
1305 | + relocation += addend; | ||
1306 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1307 | + contents + offset + endian); | ||
1308 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1309 | + contents + offset + endian + INST_WORD_SIZE); | ||
1310 | + break; | ||
1311 | + | ||
1312 | + case (int) R_MICROBLAZE_TEXTPCREL_64: | ||
1313 | + relocation = input_section->output_section->vma; | ||
1314 | + relocation -= (input_section->output_section->vma | ||
1315 | + + input_section->output_offset | ||
1316 | + + offset + INST_WORD_SIZE); | ||
1317 | + relocation += addend; | ||
1318 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1319 | + contents + offset + endian); | ||
1320 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1321 | + contents + offset + endian + INST_WORD_SIZE); | ||
1322 | + break; | ||
1323 | + | ||
1324 | + case (int) R_MICROBLAZE_PLT_64: | ||
1325 | + { | ||
1326 | + bfd_vma immediate; | ||
1327 | + if (htab->elf.splt != NULL && h != NULL | ||
1328 | + && h->plt.offset != (bfd_vma) -1) | ||
1329 | + { | ||
1330 | + relocation = (htab->elf.splt->output_section->vma | ||
1331 | + + htab->elf.splt->output_offset | ||
1332 | + + h->plt.offset); | ||
1333 | + unresolved_reloc = false; | ||
1334 | + immediate = relocation - (input_section->output_section->vma | ||
1335 | + + input_section->output_offset | ||
1336 | + + offset + INST_WORD_SIZE); | ||
1337 | + bfd_put_16 (input_bfd, (immediate >> 16) & 0xffff, | ||
1338 | + contents + offset + endian); | ||
1339 | + bfd_put_16 (input_bfd, immediate & 0xffff, | ||
1340 | + contents + offset + endian + INST_WORD_SIZE); | ||
1341 | + } | ||
1342 | + else | ||
1343 | + { | ||
1344 | + relocation -= (input_section->output_section->vma | ||
1345 | + + input_section->output_offset | ||
1346 | + + offset + INST_WORD_SIZE); | ||
1347 | + immediate = relocation; | ||
1348 | + bfd_put_16 (input_bfd, (immediate >> 16) & 0xffff, | ||
1349 | + contents + offset + endian); | ||
1350 | + bfd_put_16 (input_bfd, immediate & 0xffff, | ||
1351 | + contents + offset + endian + INST_WORD_SIZE); | ||
1352 | + } | ||
1353 | + break; | ||
1354 | + } | ||
1355 | + | ||
1356 | + case (int) R_MICROBLAZE_TLSGD: | ||
1357 | + tls_type = (TLS_TLS | TLS_GD); | ||
1358 | + goto dogot; | ||
1359 | + case (int) R_MICROBLAZE_TLSLD: | ||
1360 | + tls_type = (TLS_TLS | TLS_LD); | ||
1361 | + /* Fall through. */ | ||
1362 | + dogot: | ||
1363 | + case (int) R_MICROBLAZE_GOT_64: | ||
1364 | + { | ||
1365 | + bfd_vma *offp; | ||
1366 | + bfd_vma off, off2; | ||
1367 | + unsigned long indx; | ||
1368 | + bfd_vma static_value; | ||
1369 | + | ||
1370 | + bool need_relocs = false; | ||
1371 | + if (htab->elf.sgot == NULL) | ||
1372 | + abort (); | ||
1373 | + | ||
1374 | + indx = 0; | ||
1375 | + offp = NULL; | ||
1376 | + | ||
1377 | + /* 1. Identify GOT Offset; | ||
1378 | + 2. Compute Static Values | ||
1379 | + 3. Process Module Id, Process Offset | ||
1380 | + 4. Fixup Relocation with GOT offset value. */ | ||
1381 | + | ||
1382 | + /* 1. Determine GOT Offset to use : TLS_LD, global, local */ | ||
1383 | + if (IS_TLS_LD (tls_type)) | ||
1384 | + offp = &htab->tlsld_got.offset; | ||
1385 | + else if (h != NULL) | ||
1386 | + { | ||
1387 | + if (htab->elf.sgotplt != NULL | ||
1388 | + && h->got.offset != (bfd_vma) -1) | ||
1389 | + offp = &h->got.offset; | ||
1390 | + else | ||
1391 | + abort (); | ||
1392 | + } | ||
1393 | + else | ||
1394 | + { | ||
1395 | + if (local_got_offsets == NULL) | ||
1396 | + abort (); | ||
1397 | + offp = &local_got_offsets[r_symndx]; | ||
1398 | + } | ||
1399 | + | ||
1400 | + if (!offp) | ||
1401 | + abort (); | ||
1402 | + | ||
1403 | + off = (*offp) & ~1; | ||
1404 | + off2 = off; | ||
1405 | + | ||
1406 | + if (IS_TLS_LD(tls_type) || IS_TLS_GD(tls_type)) | ||
1407 | + off2 = off + 4; | ||
1408 | + | ||
1409 | + /* Symbol index to use for relocs */ | ||
1410 | + if (h != NULL) | ||
1411 | + { | ||
1412 | + bool dyn = | ||
1413 | + elf_hash_table (info)->dynamic_sections_created; | ||
1414 | + | ||
1415 | + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, | ||
1416 | + bfd_link_pic (info), | ||
1417 | + h) | ||
1418 | + && (!bfd_link_pic (info) | ||
1419 | + || !SYMBOL_REFERENCES_LOCAL (info, h))) | ||
1420 | + indx = h->dynindx; | ||
1421 | + } | ||
1422 | + | ||
1423 | + /* Need to generate relocs ? */ | ||
1424 | + if ((bfd_link_pic (info) || indx != 0) | ||
1425 | + && (h == NULL | ||
1426 | + || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT | ||
1427 | + || h->root.type != bfd_link_hash_undefweak)) | ||
1428 | + need_relocs = true; | ||
1429 | + | ||
1430 | + /* 2. Compute/Emit Static value of r-expression */ | ||
1431 | + static_value = relocation + addend; | ||
1432 | + | ||
1433 | + /* 3. Process module-id and offset */ | ||
1434 | + if (! ((*offp) & 1) ) | ||
1435 | + { | ||
1436 | + bfd_vma got_offset; | ||
1437 | + | ||
1438 | + got_offset = (htab->elf.sgot->output_section->vma | ||
1439 | + + htab->elf.sgot->output_offset | ||
1440 | + + off); | ||
1441 | + | ||
1442 | + /* Process module-id */ | ||
1443 | + if (IS_TLS_LD(tls_type)) | ||
1444 | + { | ||
1445 | + if (! bfd_link_pic (info)) | ||
1446 | + bfd_put_32 (output_bfd, 1, | ||
1447 | + htab->elf.sgot->contents + off); | ||
1448 | + else | ||
1449 | + microblaze_elf_output_dynamic_relocation | ||
1450 | + (output_bfd, | ||
1451 | + htab->elf.srelgot, | ||
1452 | + htab->elf.srelgot->reloc_count++, | ||
1453 | + /* symindex= */ 0, R_MICROBLAZE_TLSDTPMOD32, | ||
1454 | + got_offset, 0); | ||
1455 | + } | ||
1456 | + else if (IS_TLS_GD(tls_type)) | ||
1457 | + { | ||
1458 | + if (! need_relocs) | ||
1459 | + bfd_put_32 (output_bfd, 1, | ||
1460 | + htab->elf.sgot->contents + off); | ||
1461 | + else | ||
1462 | + microblaze_elf_output_dynamic_relocation | ||
1463 | + (output_bfd, | ||
1464 | + htab->elf.srelgot, | ||
1465 | + htab->elf.srelgot->reloc_count++, | ||
1466 | + /* symindex= */ indx, R_MICROBLAZE_TLSDTPMOD32, | ||
1467 | + got_offset, indx ? 0 : static_value); | ||
1468 | + } | ||
1469 | + | ||
1470 | + /* Process Offset */ | ||
1471 | + if (htab->elf.srelgot == NULL) | ||
1472 | + abort (); | ||
1473 | + | ||
1474 | + got_offset = (htab->elf.sgot->output_section->vma | ||
1475 | + + htab->elf.sgot->output_offset | ||
1476 | + + off2); | ||
1477 | + if (IS_TLS_LD(tls_type)) | ||
1478 | + { | ||
1479 | + /* For LD, offset should be 0 */ | ||
1480 | + *offp |= 1; | ||
1481 | + bfd_put_32 (output_bfd, 0, | ||
1482 | + htab->elf.sgot->contents + off2); | ||
1483 | + } | ||
1484 | + else if (IS_TLS_GD(tls_type)) | ||
1485 | + { | ||
1486 | + *offp |= 1; | ||
1487 | + static_value -= dtprel_base(info); | ||
1488 | + if (need_relocs) | ||
1489 | + microblaze_elf_output_dynamic_relocation | ||
1490 | + (output_bfd, | ||
1491 | + htab->elf.srelgot, | ||
1492 | + htab->elf.srelgot->reloc_count++, | ||
1493 | + /* symindex= */ indx, R_MICROBLAZE_TLSDTPREL32, | ||
1494 | + got_offset, indx ? 0 : static_value); | ||
1495 | + else | ||
1496 | + bfd_put_32 (output_bfd, static_value, | ||
1497 | + htab->elf.sgot->contents + off2); | ||
1498 | + } | ||
1499 | + else | ||
1500 | + { | ||
1501 | + bfd_put_32 (output_bfd, static_value, | ||
1502 | + htab->elf.sgot->contents + off2); | ||
1503 | + | ||
1504 | + /* Relocs for dyn symbols generated by | ||
1505 | + finish_dynamic_symbols */ | ||
1506 | + if (bfd_link_pic (info) && h == NULL) | ||
1507 | + { | ||
1508 | + *offp |= 1; | ||
1509 | + microblaze_elf_output_dynamic_relocation | ||
1510 | + (output_bfd, | ||
1511 | + htab->elf.srelgot, | ||
1512 | + htab->elf.srelgot->reloc_count++, | ||
1513 | + /* symindex= */ indx, R_MICROBLAZE_REL, | ||
1514 | + got_offset, static_value); | ||
1515 | + } | ||
1516 | + } | ||
1517 | + } | ||
1518 | + | ||
1519 | + /* 4. Fixup Relocation with GOT offset value | ||
1520 | + Compute relative address of GOT entry for applying | ||
1521 | + the current relocation */ | ||
1522 | + relocation = htab->elf.sgot->output_section->vma | ||
1523 | + + htab->elf.sgot->output_offset | ||
1524 | + + off | ||
1525 | + - htab->elf.sgotplt->output_section->vma | ||
1526 | + - htab->elf.sgotplt->output_offset; | ||
1527 | + | ||
1528 | + /* Apply Current Relocation */ | ||
1529 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1530 | + contents + offset + endian); | ||
1531 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1532 | + contents + offset + endian + INST_WORD_SIZE); | ||
1533 | + | ||
1534 | + unresolved_reloc = false; | ||
1535 | + break; | ||
1536 | + } | ||
1537 | + | ||
1538 | + case (int) R_MICROBLAZE_GOTOFF_64: | ||
1539 | + { | ||
1540 | + bfd_vma immediate; | ||
1541 | + unsigned short lo, high; | ||
1542 | + relocation += addend; | ||
1543 | + relocation -= (htab->elf.sgotplt->output_section->vma | ||
1544 | + + htab->elf.sgotplt->output_offset); | ||
1545 | + /* Write this value into correct location. */ | ||
1546 | + immediate = relocation; | ||
1547 | + lo = immediate & 0x0000ffff; | ||
1548 | + high = (immediate >> 16) & 0x0000ffff; | ||
1549 | + bfd_put_16 (input_bfd, high, contents + offset + endian); | ||
1550 | + bfd_put_16 (input_bfd, lo, | ||
1551 | + contents + offset + INST_WORD_SIZE + endian); | ||
1552 | + break; | ||
1553 | + } | ||
1554 | + | ||
1555 | + case (int) R_MICROBLAZE_GOTOFF_32: | ||
1556 | + { | ||
1557 | + relocation += addend; | ||
1558 | + relocation -= (htab->elf.sgotplt->output_section->vma | ||
1559 | + + htab->elf.sgotplt->output_offset); | ||
1560 | + /* Write this value into correct location. */ | ||
1561 | + bfd_put_32 (input_bfd, relocation, contents + offset); | ||
1562 | + break; | ||
1563 | + } | ||
1564 | + | ||
1565 | + case (int) R_MICROBLAZE_TLSDTPREL64: | ||
1566 | + relocation += addend; | ||
1567 | + relocation -= dtprel_base(info); | ||
1568 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1569 | + contents + offset + endian); | ||
1570 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1571 | + contents + offset + endian + INST_WORD_SIZE); | ||
1572 | + break; | ||
1573 | + case (int) R_MICROBLAZE_TEXTREL_64: | ||
1574 | + case (int) R_MICROBLAZE_TEXTREL_32_LO: | ||
1575 | + case (int) R_MICROBLAZE_64_PCREL : | ||
1576 | + case (int) R_MICROBLAZE_64: | ||
1577 | + case (int) R_MICROBLAZE_32: | ||
1578 | + case (int) R_MICROBLAZE_IMML_64: | ||
1579 | + { | ||
1580 | + /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols | ||
1581 | + from removed linkonce sections, or sections discarded by | ||
1582 | + a linker script. */ | ||
1583 | + if (r_symndx == STN_UNDEF || (input_section->flags & SEC_ALLOC) == 0) | ||
1584 | + { | ||
1585 | + relocation += addend; | ||
1586 | + if (r_type == R_MICROBLAZE_32)// || r_type == R_MICROBLAZE_IMML_64) | ||
1587 | + bfd_put_32 (input_bfd, relocation, contents + offset); | ||
1588 | + else if (r_type == R_MICROBLAZE_IMML_64) | ||
1589 | + bfd_put_64 (input_bfd, relocation, contents + offset); | ||
1590 | + else | ||
1591 | + { | ||
1592 | + if (r_type == R_MICROBLAZE_64_PCREL) | ||
1593 | + relocation -= (input_section->output_section->vma | ||
1594 | + + input_section->output_offset | ||
1595 | + + offset + INST_WORD_SIZE); | ||
1596 | + else if (r_type == R_MICROBLAZE_TEXTREL_64 | ||
1597 | + || r_type == R_MICROBLAZE_TEXTREL_32_LO) | ||
1598 | + relocation -= input_section->output_section->vma; | ||
1599 | + | ||
1600 | + if (r_type == R_MICROBLAZE_TEXTREL_32_LO) | ||
1601 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1602 | + contents + offset + endian); | ||
1603 | + | ||
1604 | + unsigned long insn = bfd_get_32 (input_bfd, contents + offset +endian); | ||
1605 | + if ((insn & 0xff000000) == 0xb2000000) | ||
1606 | + { | ||
1607 | + insn &= ~0x00ffffff; | ||
1608 | + insn |= (relocation >> 16) & 0xffffff; | ||
1609 | + bfd_put_32 (input_bfd, insn, | ||
1610 | + contents + offset + endian); | ||
1611 | + } | ||
1612 | + else | ||
1613 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1614 | + contents + offset + endian); | ||
1615 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1616 | + contents + offset + endian + INST_WORD_SIZE); | ||
1617 | + } | ||
1618 | + break; | ||
1619 | + } | ||
1620 | + | ||
1621 | + if ((bfd_link_pic (info) | ||
1622 | + && (h == NULL | ||
1623 | + || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT | ||
1624 | + && !resolved_to_zero) | ||
1625 | + || h->root.type != bfd_link_hash_undefweak) | ||
1626 | + && (!howto->pc_relative | ||
1627 | + || (h != NULL | ||
1628 | + && h->dynindx != -1 | ||
1629 | + && (!info->symbolic | ||
1630 | + || !h->def_regular)))) | ||
1631 | + || (!bfd_link_pic (info) | ||
1632 | + && h != NULL | ||
1633 | + && h->dynindx != -1 | ||
1634 | + && !h->non_got_ref | ||
1635 | + && ((h->def_dynamic | ||
1636 | + && !h->def_regular) | ||
1637 | + || h->root.type == bfd_link_hash_undefweak | ||
1638 | + || h->root.type == bfd_link_hash_undefined))) | ||
1639 | + { | ||
1640 | + Elf_Internal_Rela outrel; | ||
1641 | + bfd_byte *loc; | ||
1642 | + bool skip; | ||
1643 | + | ||
1644 | + /* When generating a shared object, these relocations | ||
1645 | + are copied into the output file to be resolved at run | ||
1646 | + time. */ | ||
1647 | + | ||
1648 | + BFD_ASSERT (sreloc != NULL); | ||
1649 | + | ||
1650 | + skip = false; | ||
1651 | + | ||
1652 | + outrel.r_offset = | ||
1653 | + _bfd_elf_section_offset (output_bfd, info, input_section, | ||
1654 | + rel->r_offset); | ||
1655 | + if (outrel.r_offset == (bfd_vma) -1) | ||
1656 | + skip = true; | ||
1657 | + else if (outrel.r_offset == (bfd_vma) -2) | ||
1658 | + skip = true; | ||
1659 | + outrel.r_offset += (input_section->output_section->vma | ||
1660 | + + input_section->output_offset); | ||
1661 | + | ||
1662 | + if (skip) | ||
1663 | + memset (&outrel, 0, sizeof outrel); | ||
1664 | + /* h->dynindx may be -1 if the symbol was marked to | ||
1665 | + become local. */ | ||
1666 | + else if (h != NULL | ||
1667 | + && ((! info->symbolic && h->dynindx != -1) | ||
1668 | + || !h->def_regular)) | ||
1669 | + { | ||
1670 | + BFD_ASSERT (h->dynindx != -1); | ||
1671 | + outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); | ||
1672 | + outrel.r_addend = addend; | ||
1673 | + } | ||
1674 | + else | ||
1675 | + { | ||
1676 | + if (r_type == R_MICROBLAZE_32 || r_type == R_MICROBLAZE_IMML_64) | ||
1677 | + { | ||
1678 | + outrel.r_info = ELF64_R_INFO (0, R_MICROBLAZE_REL); | ||
1679 | + outrel.r_addend = relocation + addend; | ||
1680 | + } | ||
1681 | + else | ||
1682 | + { | ||
1683 | + BFD_FAIL (); | ||
1684 | + _bfd_error_handler | ||
1685 | + (_("%pB: probably compiled without -fPIC?"), | ||
1686 | + input_bfd); | ||
1687 | + bfd_set_error (bfd_error_bad_value); | ||
1688 | + return false; | ||
1689 | + } | ||
1690 | + } | ||
1691 | + | ||
1692 | + loc = sreloc->contents; | ||
1693 | + loc += sreloc->reloc_count++ * sizeof (Elf64_External_Rela); | ||
1694 | + bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc); | ||
1695 | + break; | ||
1696 | + } | ||
1697 | + else | ||
1698 | + { | ||
1699 | + relocation += addend; | ||
1700 | + if (r_type == R_MICROBLAZE_32) | ||
1701 | + bfd_put_32 (input_bfd, relocation, contents + offset); | ||
1702 | + else if (r_type == R_MICROBLAZE_IMML_64) | ||
1703 | + bfd_put_64 (input_bfd, relocation, contents + offset + endian); | ||
1704 | + else | ||
1705 | + { | ||
1706 | + if (r_type == R_MICROBLAZE_64_PCREL) | ||
1707 | + { | ||
1708 | + if (!input_section->output_section->vma && | ||
1709 | + !input_section->output_offset && !offset) | ||
1710 | + relocation -= (input_section->output_section->vma | ||
1711 | + + input_section->output_offset | ||
1712 | + + offset); | ||
1713 | + else | ||
1714 | + relocation -= (input_section->output_section->vma | ||
1715 | + + input_section->output_offset + offset + INST_WORD_SIZE); | ||
1716 | + } | ||
1717 | + else if (r_type == R_MICROBLAZE_TEXTREL_64 | ||
1718 | + || r_type == R_MICROBLAZE_TEXTREL_32_LO) | ||
1719 | + relocation -= input_section->output_section->vma; | ||
1720 | + | ||
1721 | + if (r_type == R_MICROBLAZE_TEXTREL_32_LO) | ||
1722 | + { | ||
1723 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1724 | + contents + offset + endian); | ||
1725 | + } | ||
1726 | + unsigned long insn = bfd_get_32 (input_bfd, contents + offset +endian); | ||
1727 | + if ((insn & 0xff000000) == 0xb2000000) | ||
1728 | + { | ||
1729 | + insn &= ~0x00ffffff; | ||
1730 | + insn |= (relocation >> 16) & 0xffffff; | ||
1731 | + bfd_put_32 (input_bfd, insn, | ||
1732 | + contents + offset + endian); | ||
1733 | + } | ||
1734 | + else | ||
1735 | + bfd_put_16 (input_bfd, (relocation >> 16) & 0xffff, | ||
1736 | + contents + offset + endian); | ||
1737 | + bfd_put_16 (input_bfd, relocation & 0xffff, | ||
1738 | + contents + offset + endian + INST_WORD_SIZE); | ||
1739 | + } | ||
1740 | + break; | ||
1741 | + } | ||
1742 | + } | ||
1743 | + | ||
1744 | + default : | ||
1745 | + r = _bfd_final_link_relocate (howto, input_bfd, input_section, | ||
1746 | + contents, offset, | ||
1747 | + relocation, addend); | ||
1748 | + break; | ||
1749 | + } | ||
1750 | + } | ||
1751 | + | ||
1752 | + check_reloc: | ||
1753 | + | ||
1754 | + if (r != bfd_reloc_ok) | ||
1755 | + { | ||
1756 | + /* FIXME: This should be generic enough to go in a utility. */ | ||
1757 | + const char *name; | ||
1758 | + | ||
1759 | + if (h != NULL) | ||
1760 | + name = h->root.root.string; | ||
1761 | + else | ||
1762 | + { | ||
1763 | + name = (bfd_elf_string_from_elf_section | ||
1764 | + (input_bfd, symtab_hdr->sh_link, sym->st_name)); | ||
1765 | + if (name == NULL || *name == '\0') | ||
1766 | + name = bfd_section_name (sec); | ||
1767 | + } | ||
1768 | + | ||
1769 | + if (errmsg != NULL) | ||
1770 | + goto common_error; | ||
1771 | + | ||
1772 | + switch (r) | ||
1773 | + { | ||
1774 | + case bfd_reloc_overflow: | ||
1775 | + (*info->callbacks->reloc_overflow) | ||
1776 | + (info, (h ? &h->root : NULL), name, howto->name, | ||
1777 | + (bfd_vma) 0, input_bfd, input_section, offset); | ||
1778 | + break; | ||
1779 | + | ||
1780 | + case bfd_reloc_undefined: | ||
1781 | + (*info->callbacks->undefined_symbol) | ||
1782 | + (info, name, input_bfd, input_section, offset, true); | ||
1783 | + break; | ||
1784 | + | ||
1785 | + case bfd_reloc_outofrange: | ||
1786 | + errmsg = _("internal error: out of range error"); | ||
1787 | + goto common_error; | ||
1788 | + | ||
1789 | + case bfd_reloc_notsupported: | ||
1790 | + errmsg = _("internal error: unsupported relocation error"); | ||
1791 | + goto common_error; | ||
1792 | + | ||
1793 | + case bfd_reloc_dangerous: | ||
1794 | + errmsg = _("internal error: dangerous error"); | ||
1795 | + goto common_error; | ||
1796 | + | ||
1797 | + default: | ||
1798 | + errmsg = _("internal error: unknown error"); | ||
1799 | + /* Fall through. */ | ||
1800 | + common_error: | ||
1801 | + (*info->callbacks->warning) (info, errmsg, name, input_bfd, | ||
1802 | + input_section, offset); | ||
1803 | + break; | ||
1804 | + } | ||
1805 | + } | ||
1806 | + } | ||
1807 | + | ||
1808 | + return ret; | ||
1809 | +} | ||
1810 | + | ||
1811 | +/* Merge backend specific data from an object file to the output | ||
1812 | + object file when linking. | ||
1813 | + | ||
1814 | + Note: We only use this hook to catch endian mismatches. */ | ||
1815 | +static bool | ||
1816 | +microblaze_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd) | ||
1817 | +{ | ||
1818 | + /* Check if we have the same endianess. */ | ||
1819 | + if (! _bfd_generic_verify_endian_match (ibfd, obfd)) | ||
1820 | + return false; | ||
1821 | + | ||
1822 | + return true; | ||
1823 | +} | ||
1824 | + | ||
1825 | + | ||
1826 | +/* Calculate fixup value for reference. */ | ||
1827 | + | ||
1828 | +static size_t | ||
1829 | +calc_fixup (bfd_vma start, bfd_vma size, asection *sec) | ||
1830 | +{ | ||
1831 | + bfd_vma end = start + size; | ||
1832 | + size_t i, fixup = 0; | ||
1833 | + struct _microblaze_elf_section_data *sdata; | ||
1834 | + | ||
1835 | + if (sec == NULL || (sdata = microblaze_elf_section_data (sec)) == NULL) | ||
1836 | + return 0; | ||
1837 | + | ||
1838 | + /* Look for addr in relax table, total fixup value. */ | ||
1839 | + for (i = 0; i < sdata->relax_count; i++) | ||
1840 | + { | ||
1841 | + if (end <= sdata->relax[i].addr) | ||
1842 | + break; | ||
1843 | + if (end != start && start > sdata->relax[i].addr) | ||
1844 | + continue; | ||
1845 | + fixup += sdata->relax[i].size; | ||
1846 | + } | ||
1847 | + return fixup; | ||
1848 | +} | ||
1849 | + | ||
1850 | +/* Read-modify-write into the bfd, an immediate value into appropriate fields of | ||
1851 | + a 32-bit instruction. */ | ||
1852 | +static void | ||
1853 | +microblaze_bfd_write_imm_value_32 (bfd *abfd, bfd_byte *bfd_addr, bfd_vma val) | ||
1854 | +{ | ||
1855 | + unsigned long instr = bfd_get_32 (abfd, bfd_addr); | ||
1856 | + | ||
1857 | + if ((instr & 0xff000000) == 0xb2000000) | ||
1858 | + { | ||
1859 | + instr &= ~0x00ffffff; | ||
1860 | + instr |= (val & 0xffffff); | ||
1861 | + bfd_put_32 (abfd, instr, bfd_addr); | ||
1862 | + } | ||
1863 | + else | ||
1864 | + { | ||
1865 | + instr &= ~0x0000ffff; | ||
1866 | + instr |= (val & 0x0000ffff); | ||
1867 | + bfd_put_32 (abfd, instr, bfd_addr); | ||
1868 | + } | ||
1869 | +} | ||
1870 | + | ||
1871 | +/* Read-modify-write into the bfd, an immediate value into appropriate fields of | ||
1872 | + two consecutive 32-bit instructions. */ | ||
1873 | +static void | ||
1874 | +microblaze_bfd_write_imm_value_64 (bfd *abfd, bfd_byte *bfd_addr, bfd_vma val) | ||
1875 | +{ | ||
1876 | + unsigned long instr_hi; | ||
1877 | + unsigned long instr_lo; | ||
1878 | + | ||
1879 | + instr_hi = bfd_get_32 (abfd, bfd_addr); | ||
1880 | + if ((instr_hi & 0xff000000) == 0xb2000000) | ||
1881 | + { | ||
1882 | + instr_hi &= ~0x00ffffff; | ||
1883 | + instr_hi |= (val >> 16) & 0xffffff; | ||
1884 | + bfd_put_32 (abfd, instr_hi,bfd_addr); | ||
1885 | + } | ||
1886 | + else | ||
1887 | + { | ||
1888 | + instr_hi &= ~0x0000ffff; | ||
1889 | + instr_hi |= ((val >> 16) & 0x0000ffff); | ||
1890 | + bfd_put_32 (abfd, instr_hi, bfd_addr); | ||
1891 | + } | ||
1892 | + instr_lo = bfd_get_32 (abfd, bfd_addr + INST_WORD_SIZE); | ||
1893 | + instr_lo &= ~0x0000ffff; | ||
1894 | + instr_lo |= (val & 0x0000ffff); | ||
1895 | + bfd_put_32 (abfd, instr_lo, bfd_addr + INST_WORD_SIZE); | ||
1896 | +} | ||
1897 | + | ||
1898 | +static bool | ||
1899 | +microblaze_elf_relax_section (bfd *abfd, | ||
1900 | + asection *sec, | ||
1901 | + struct bfd_link_info *link_info, | ||
1902 | + bool *again) | ||
1903 | +{ | ||
1904 | + Elf_Internal_Shdr *symtab_hdr; | ||
1905 | + Elf_Internal_Rela *internal_relocs; | ||
1906 | + Elf_Internal_Rela *irel, *irelend; | ||
1907 | + bfd_byte *contents = NULL; | ||
1908 | + int rel_count; | ||
1909 | + unsigned int shndx; | ||
1910 | + size_t i, sym_index; | ||
1911 | + asection *o; | ||
1912 | + struct elf_link_hash_entry *sym_hash; | ||
1913 | + Elf_Internal_Sym *isymbuf, *isymend; | ||
1914 | + Elf_Internal_Sym *isym; | ||
1915 | + size_t symcount; | ||
1916 | + size_t offset; | ||
1917 | + bfd_vma src, dest; | ||
1918 | + struct _microblaze_elf_section_data *sdata; | ||
1919 | + | ||
1920 | + /* We only do this once per section. We may be able to delete some code | ||
1921 | + by running multiple passes, but it is not worth it. */ | ||
1922 | + *again = false; | ||
1923 | + | ||
1924 | + /* Only do this for a text section. */ | ||
1925 | + if (bfd_link_relocatable (link_info) | ||
1926 | + || (sec->flags & SEC_RELOC) == 0 | ||
1927 | + || (sec->flags & SEC_CODE) == 0 | ||
1928 | + || sec->reloc_count == 0 | ||
1929 | + || (sdata = microblaze_elf_section_data (sec)) == NULL) | ||
1930 | + return true; | ||
1931 | + | ||
1932 | + BFD_ASSERT ((sec->size > 0) || (sec->rawsize > 0)); | ||
1933 | + | ||
1934 | + /* If this is the first time we have been called for this section, | ||
1935 | + initialize the cooked size. */ | ||
1936 | + if (sec->size == 0) | ||
1937 | + sec->size = sec->rawsize; | ||
1938 | + | ||
1939 | + /* Get symbols for this section. */ | ||
1940 | + symtab_hdr = &elf_tdata (abfd)->symtab_hdr; | ||
1941 | + isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; | ||
1942 | + symcount = symtab_hdr->sh_size / sizeof (Elf64_External_Sym); | ||
1943 | + if (isymbuf == NULL) | ||
1944 | + isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr, symcount, | ||
1945 | + 0, NULL, NULL, NULL); | ||
1946 | + BFD_ASSERT (isymbuf != NULL); | ||
1947 | + | ||
1948 | + internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, link_info->keep_memory); | ||
1949 | + if (internal_relocs == NULL) | ||
1950 | + goto error_return; | ||
1951 | + | ||
1952 | + sdata->relax_count = 0; | ||
1953 | + sdata->relax = (struct relax_table *) bfd_malloc ((sec->reloc_count + 1) | ||
1954 | + * sizeof (*sdata->relax)); | ||
1955 | + if (sdata->relax == NULL) | ||
1956 | + goto error_return; | ||
1957 | + | ||
1958 | + irelend = internal_relocs + sec->reloc_count; | ||
1959 | + rel_count = 0; | ||
1960 | + for (irel = internal_relocs; irel < irelend; irel++, rel_count++) | ||
1961 | + { | ||
1962 | + bfd_vma symval; | ||
1963 | + if ((ELF64_R_TYPE (irel->r_info) != (int) R_MICROBLAZE_64_PCREL) | ||
1964 | + && (ELF64_R_TYPE (irel->r_info) != (int) R_MICROBLAZE_64 ) | ||
1965 | +&& (ELF64_R_TYPE (irel->r_info) != (int) R_MICROBLAZE_TEXTREL_64)) | ||
1966 | + continue; /* Can't delete this reloc. */ | ||
1967 | + | ||
1968 | + /* Get the section contents. */ | ||
1969 | + if (contents == NULL) | ||
1970 | + { | ||
1971 | + if (elf_section_data (sec)->this_hdr.contents != NULL) | ||
1972 | + contents = elf_section_data (sec)->this_hdr.contents; | ||
1973 | + else | ||
1974 | + { | ||
1975 | + contents = (bfd_byte *) bfd_malloc (sec->size); | ||
1976 | + if (contents == NULL) | ||
1977 | + goto error_return; | ||
1978 | + if (!bfd_get_section_contents (abfd, sec, contents, | ||
1979 | + (file_ptr) 0, sec->size)) | ||
1980 | + goto error_return; | ||
1981 | + elf_section_data (sec)->this_hdr.contents = contents; | ||
1982 | + } | ||
1983 | + } | ||
1984 | + | ||
1985 | + /* Get the value of the symbol referred to by the reloc. */ | ||
1986 | + if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info) | ||
1987 | + { | ||
1988 | + /* A local symbol. */ | ||
1989 | + asection *sym_sec; | ||
1990 | + | ||
1991 | + isym = isymbuf + ELF64_R_SYM (irel->r_info); | ||
1992 | + if (isym->st_shndx == SHN_UNDEF) | ||
1993 | + sym_sec = bfd_und_section_ptr; | ||
1994 | + else if (isym->st_shndx == SHN_ABS) | ||
1995 | + sym_sec = bfd_abs_section_ptr; | ||
1996 | + else if (isym->st_shndx == SHN_COMMON) | ||
1997 | + sym_sec = bfd_com_section_ptr; | ||
1998 | + else | ||
1999 | + sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx); | ||
2000 | + | ||
2001 | + symval = _bfd_elf_rela_local_sym (abfd, isym, &sym_sec, irel); | ||
2002 | + } | ||
2003 | + else | ||
2004 | + { | ||
2005 | + unsigned long indx; | ||
2006 | + struct elf_link_hash_entry *h; | ||
2007 | + | ||
2008 | + indx = ELF64_R_SYM (irel->r_info) - symtab_hdr->sh_info; | ||
2009 | + h = elf_sym_hashes (abfd)[indx]; | ||
2010 | + BFD_ASSERT (h != NULL); | ||
2011 | + | ||
2012 | + if (h->root.type != bfd_link_hash_defined | ||
2013 | + && h->root.type != bfd_link_hash_defweak) | ||
2014 | + /* This appears to be a reference to an undefined | ||
2015 | + symbol. Just ignore it--it will be caught by the | ||
2016 | + regular reloc processing. */ | ||
2017 | + continue; | ||
2018 | + | ||
2019 | + symval = (h->root.u.def.value | ||
2020 | + + h->root.u.def.section->output_section->vma | ||
2021 | + + h->root.u.def.section->output_offset); | ||
2022 | + } | ||
2023 | + | ||
2024 | + /* If this is a PC-relative reloc, subtract the instr offset from | ||
2025 | + the symbol value. */ | ||
2026 | + if (ELF64_R_TYPE (irel->r_info) == (int) R_MICROBLAZE_64_PCREL) | ||
2027 | + { | ||
2028 | + symval = symval + irel->r_addend | ||
2029 | + - (irel->r_offset | ||
2030 | + + sec->output_section->vma | ||
2031 | + + sec->output_offset); | ||
2032 | + } | ||
2033 | + else if (ELF64_R_TYPE (irel->r_info) == (int) R_MICROBLAZE_TEXTREL_64) | ||
2034 | + { | ||
2035 | + symval = symval + irel->r_addend - (sec->output_section->vma); | ||
2036 | + } | ||
2037 | + else | ||
2038 | + symval += irel->r_addend; | ||
2039 | + | ||
2040 | + if ((symval & 0xffff8000) == 0 | ||
2041 | + || (symval & 0xffff8000) == 0xffff8000) | ||
2042 | + { | ||
2043 | + /* We can delete this instruction. */ | ||
2044 | + sdata->relax[sdata->relax_count].addr = irel->r_offset; | ||
2045 | + sdata->relax[sdata->relax_count].size = INST_WORD_SIZE; | ||
2046 | + sdata->relax_count++; | ||
2047 | + | ||
2048 | + /* Rewrite relocation type. */ | ||
2049 | + switch ((enum elf_microblaze_reloc_type) ELF64_R_TYPE (irel->r_info)) | ||
2050 | + { | ||
2051 | + case R_MICROBLAZE_64_PCREL: | ||
2052 | + irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), | ||
2053 | + (int) R_MICROBLAZE_32_PCREL_LO); | ||
2054 | + break; | ||
2055 | + case R_MICROBLAZE_64: | ||
2056 | + irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), | ||
2057 | + (int) R_MICROBLAZE_32_LO); | ||
2058 | + break; | ||
2059 | + case R_MICROBLAZE_TEXTREL_64: | ||
2060 | + irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), | ||
2061 | + (int) R_MICROBLAZE_TEXTREL_32_LO); | ||
2062 | + break; | ||
2063 | + default: | ||
2064 | + /* Cannot happen. */ | ||
2065 | + BFD_ASSERT (false); | ||
2066 | + } | ||
2067 | + } | ||
2068 | + } /* Loop through all relocations. */ | ||
2069 | + | ||
2070 | + /* Loop through the relocs again, and see if anything needs to change. */ | ||
2071 | + if (sdata->relax_count > 0) | ||
2072 | + { | ||
2073 | + shndx = _bfd_elf_section_from_bfd_section (abfd, sec); | ||
2074 | + rel_count = 0; | ||
2075 | + sdata->relax[sdata->relax_count].addr = sec->size; | ||
2076 | + | ||
2077 | + for (irel = internal_relocs; irel < irelend; irel++, rel_count++) | ||
2078 | + { | ||
2079 | + bfd_vma nraddr; | ||
2080 | + | ||
2081 | + /* Get the new reloc address. */ | ||
2082 | + nraddr = irel->r_offset - calc_fixup (irel->r_offset, 0, sec); | ||
2083 | + switch ((enum elf_microblaze_reloc_type) ELF64_R_TYPE (irel->r_info)) | ||
2084 | + { | ||
2085 | + default: | ||
2086 | + break; | ||
2087 | + case R_MICROBLAZE_64_PCREL: | ||
2088 | + break; | ||
2089 | + case R_MICROBLAZE_64: | ||
2090 | + case R_MICROBLAZE_32_LO: | ||
2091 | + /* If this reloc is against a symbol defined in this | ||
2092 | + section, we must check the addend to see it will put the value in | ||
2093 | + range to be adjusted, and hence must be changed. */ | ||
2094 | + if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info) | ||
2095 | + { | ||
2096 | + isym = isymbuf + ELF64_R_SYM (irel->r_info); | ||
2097 | + /* Only handle relocs against .text. */ | ||
2098 | + if (isym->st_shndx == shndx | ||
2099 | + && ELF64_ST_TYPE (isym->st_info) == STT_SECTION) | ||
2100 | + irel->r_addend -= calc_fixup (irel->r_addend, 0, sec); | ||
2101 | + } | ||
2102 | + break; | ||
2103 | + case R_MICROBLAZE_IMML_64: | ||
2104 | + { | ||
2105 | + /* This was a PC-relative instruction that was | ||
2106 | + completely resolved. */ | ||
2107 | + int sfix, efix; | ||
2108 | + unsigned int val; | ||
2109 | + bfd_vma target_address; | ||
2110 | + target_address = irel->r_addend + irel->r_offset; | ||
2111 | + sfix = calc_fixup (irel->r_offset, 0, sec); | ||
2112 | + efix = calc_fixup (target_address, 0, sec); | ||
2113 | + | ||
2114 | + /* Validate the in-band val. */ | ||
2115 | + val = bfd_get_64 (abfd, contents + irel->r_offset); | ||
2116 | + if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
2117 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
2118 | + } | ||
2119 | + irel->r_addend -= (efix - sfix); | ||
2120 | + /* Should use HOWTO. */ | ||
2121 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
2122 | + irel->r_addend); | ||
2123 | + } | ||
2124 | + break; | ||
2125 | + case R_MICROBLAZE_NONE: | ||
2126 | + case R_MICROBLAZE_32_NONE: | ||
2127 | + { | ||
2128 | + /* This was a PC-relative instruction that was | ||
2129 | + completely resolved. */ | ||
2130 | + size_t sfix, efix; | ||
2131 | + unsigned int val; | ||
2132 | + bfd_vma target_address; | ||
2133 | + target_address = irel->r_addend + irel->r_offset; | ||
2134 | + sfix = calc_fixup (irel->r_offset, 0, sec); | ||
2135 | + efix = calc_fixup (target_address, 0, sec); | ||
2136 | + | ||
2137 | + /* Validate the in-band val. */ | ||
2138 | + val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
2139 | + if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
2140 | + fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
2141 | + } | ||
2142 | + irel->r_addend -= (efix - sfix); | ||
2143 | + /* Should use HOWTO. */ | ||
2144 | + microblaze_bfd_write_imm_value_32 (abfd, contents + irel->r_offset, | ||
2145 | + irel->r_addend); | ||
2146 | + } | ||
2147 | + break; | ||
2148 | + case R_MICROBLAZE_64_NONE: | ||
2149 | + { | ||
2150 | + /* This was a PC-relative 64-bit instruction that was | ||
2151 | + completely resolved. */ | ||
2152 | + size_t sfix, efix; | ||
2153 | + bfd_vma target_address; | ||
2154 | + target_address = irel->r_addend + irel->r_offset + INST_WORD_SIZE; | ||
2155 | + sfix = calc_fixup (irel->r_offset + INST_WORD_SIZE, 0, sec); | ||
2156 | + efix = calc_fixup (target_address, 0, sec); | ||
2157 | + irel->r_addend -= (efix - sfix); | ||
2158 | + microblaze_bfd_write_imm_value_64 (abfd, contents + irel->r_offset, | ||
2159 | + irel->r_addend); | ||
2160 | + } | ||
2161 | + break; | ||
2162 | + } | ||
2163 | + irel->r_offset = nraddr; | ||
2164 | + } /* Change all relocs in this section. */ | ||
2165 | + | ||
2166 | + /* Look through all other sections. */ | ||
2167 | + for (o = abfd->sections; o != NULL; o = o->next) | ||
2168 | + { | ||
2169 | + Elf_Internal_Rela *irelocs; | ||
2170 | + Elf_Internal_Rela *irelscan, *irelscanend; | ||
2171 | + bfd_byte *ocontents; | ||
2172 | + | ||
2173 | + if (o == sec | ||
2174 | + || (o->flags & SEC_RELOC) == 0 | ||
2175 | + || o->reloc_count == 0) | ||
2176 | + continue; | ||
2177 | + | ||
2178 | + /* We always cache the relocs. Perhaps, if info->keep_memory is | ||
2179 | + false, we should free them, if we are permitted to. */ | ||
2180 | + | ||
2181 | + irelocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, true); | ||
2182 | + if (irelocs == NULL) | ||
2183 | + goto error_return; | ||
2184 | + | ||
2185 | + ocontents = NULL; | ||
2186 | + irelscanend = irelocs + o->reloc_count; | ||
2187 | + for (irelscan = irelocs; irelscan < irelscanend; irelscan++) | ||
2188 | + { | ||
2189 | + if (1 && ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_NONE) | ||
2190 | + { | ||
2191 | + unsigned int val; | ||
2192 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2193 | + continue; | ||
2194 | + | ||
2195 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2196 | + | ||
2197 | + /* hax: We only do the following fixup for debug location lists. */ | ||
2198 | + if (strcmp(".debug_loc", o->name)) | ||
2199 | + continue; | ||
2200 | + | ||
2201 | + /* This was a PC-relative instruction that was completely resolved. */ | ||
2202 | + if (ocontents == NULL) | ||
2203 | + { | ||
2204 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2205 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2206 | + else | ||
2207 | + { | ||
2208 | + /* We always cache the section contents. | ||
2209 | + Perhaps, if info->keep_memory is false, we | ||
2210 | + should free them, if we are permitted to. */ | ||
2211 | + | ||
2212 | + if (o->rawsize == 0) | ||
2213 | + o->rawsize = o->size; | ||
2214 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2215 | + if (ocontents == NULL) | ||
2216 | + goto error_return; | ||
2217 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2218 | + (file_ptr) 0, | ||
2219 | + o->rawsize)) | ||
2220 | + goto error_return; | ||
2221 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2222 | + } | ||
2223 | + } | ||
2224 | + | ||
2225 | + val = bfd_get_32 (abfd, ocontents + irelscan->r_offset); | ||
2226 | + if (val != irelscan->r_addend) { | ||
2227 | + fprintf(stderr, "%d: CORRUPT relax reloc! %x %lx\n", __LINE__, val, irelscan->r_addend); | ||
2228 | + } | ||
2229 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec); | ||
2230 | + microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | ||
2231 | + irelscan->r_addend); | ||
2232 | + } | ||
2233 | + if (ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32 | ||
2234 | + || ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
2235 | + { | ||
2236 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2237 | + continue; | ||
2238 | + | ||
2239 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2240 | + | ||
2241 | + /* Look at the reloc only if the value has been resolved. */ | ||
2242 | + if (isym->st_shndx == shndx | ||
2243 | + && (ELF64_ST_TYPE (isym->st_info) == STT_SECTION)) | ||
2244 | + { | ||
2245 | + if (ocontents == NULL) | ||
2246 | + { | ||
2247 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2248 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2249 | + else | ||
2250 | + { | ||
2251 | + /* We always cache the section contents. | ||
2252 | + Perhaps, if info->keep_memory is false, we | ||
2253 | + should free them, if we are permitted to. */ | ||
2254 | + if (o->rawsize == 0) | ||
2255 | + o->rawsize = o->size; | ||
2256 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2257 | + if (ocontents == NULL) | ||
2258 | + goto error_return; | ||
2259 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2260 | + (file_ptr) 0, | ||
2261 | + o->rawsize)) | ||
2262 | + goto error_return; | ||
2263 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2264 | + } | ||
2265 | + | ||
2266 | + } | ||
2267 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend, 0, sec); | ||
2268 | + } | ||
2269 | + else if (ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_SYM_OP_SYM) | ||
2270 | + { | ||
2271 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2272 | + continue; | ||
2273 | + | ||
2274 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2275 | + | ||
2276 | + /* Look at the reloc only if the value has been resolved. */ | ||
2277 | + if (ocontents == NULL) | ||
2278 | + { | ||
2279 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2280 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2281 | + else | ||
2282 | + { | ||
2283 | + /* We always cache the section contents. | ||
2284 | + Perhaps, if info->keep_memory is false, we | ||
2285 | + should free them, if we are permitted to. */ | ||
2286 | + | ||
2287 | + if (o->rawsize == 0) | ||
2288 | + o->rawsize = o->size; | ||
2289 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2290 | + if (ocontents == NULL) | ||
2291 | + goto error_return; | ||
2292 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2293 | + (file_ptr) 0, | ||
2294 | + o->rawsize)) | ||
2295 | + goto error_return; | ||
2296 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2297 | + } | ||
2298 | + } | ||
2299 | + irelscan->r_addend -= calc_fixup (irelscan->r_addend | ||
2300 | + + isym->st_value, | ||
2301 | + 0, | ||
2302 | + sec); | ||
2303 | + } | ||
2304 | + } | ||
2305 | + else if ((ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_PCREL_LO) | ||
2306 | + || (ELF32_R_TYPE (irelscan->r_info) | ||
2307 | + == (int) R_MICROBLAZE_32_LO) | ||
2308 | + || (ELF32_R_TYPE (irelscan->r_info) | ||
2309 | + == (int) R_MICROBLAZE_TEXTREL_32_LO)) | ||
2310 | + { | ||
2311 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2312 | + continue; | ||
2313 | + | ||
2314 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2315 | + | ||
2316 | + /* Look at the reloc only if the value has been resolved. */ | ||
2317 | + if (isym->st_shndx == shndx | ||
2318 | + && (ELF64_ST_TYPE (isym->st_info) == STT_SECTION)) | ||
2319 | + { | ||
2320 | + bfd_vma immediate; | ||
2321 | + bfd_vma target_address; | ||
2322 | + | ||
2323 | + if (ocontents == NULL) | ||
2324 | + { | ||
2325 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2326 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2327 | + else | ||
2328 | + { | ||
2329 | + /* We always cache the section contents. | ||
2330 | + Perhaps, if info->keep_memory is false, we | ||
2331 | + should free them, if we are permitted to. */ | ||
2332 | + if (o->rawsize == 0) | ||
2333 | + o->rawsize = o->size; | ||
2334 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2335 | + if (ocontents == NULL) | ||
2336 | + goto error_return; | ||
2337 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2338 | + (file_ptr) 0, | ||
2339 | + o->rawsize)) | ||
2340 | + goto error_return; | ||
2341 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2342 | + } | ||
2343 | + } | ||
2344 | + | ||
2345 | + unsigned long instr = bfd_get_32 (abfd, ocontents + irelscan->r_offset); | ||
2346 | + immediate = instr & 0x0000ffff; | ||
2347 | + target_address = immediate; | ||
2348 | + offset = calc_fixup (target_address, 0, sec); | ||
2349 | + immediate -= offset; | ||
2350 | + irelscan->r_addend -= offset; | ||
2351 | + microblaze_bfd_write_imm_value_32 (abfd, ocontents + irelscan->r_offset, | ||
2352 | + irelscan->r_addend); | ||
2353 | + } | ||
2354 | + } | ||
2355 | + | ||
2356 | + if (ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_64 | ||
2357 | + || (ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_TEXTREL_64)) | ||
2358 | + { | ||
2359 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2360 | + continue; | ||
2361 | + | ||
2362 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2363 | + | ||
2364 | + /* Look at the reloc only if the value has been resolved. */ | ||
2365 | + if (isym->st_shndx == shndx | ||
2366 | + && (ELF64_ST_TYPE (isym->st_info) == STT_SECTION)) | ||
2367 | + { | ||
2368 | + bfd_vma immediate; | ||
2369 | + | ||
2370 | + if (ocontents == NULL) | ||
2371 | + { | ||
2372 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2373 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2374 | + else | ||
2375 | + { | ||
2376 | + /* We always cache the section contents. | ||
2377 | + Perhaps, if info->keep_memory is false, we | ||
2378 | + should free them, if we are permitted to. */ | ||
2379 | + | ||
2380 | + if (o->rawsize == 0) | ||
2381 | + o->rawsize = o->size; | ||
2382 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2383 | + if (ocontents == NULL) | ||
2384 | + goto error_return; | ||
2385 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2386 | + (file_ptr) 0, | ||
2387 | + o->rawsize)) | ||
2388 | + goto error_return; | ||
2389 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2390 | + } | ||
2391 | + } | ||
2392 | + unsigned long instr_hi = bfd_get_32 (abfd, ocontents | ||
2393 | + + irelscan->r_offset); | ||
2394 | + unsigned long instr_lo = bfd_get_32 (abfd, ocontents | ||
2395 | + + irelscan->r_offset | ||
2396 | + + INST_WORD_SIZE); | ||
2397 | + if ((instr_hi & 0xff000000) == 0xb2000000) | ||
2398 | + immediate = (instr_hi & 0x00ffffff) << 24; | ||
2399 | + else | ||
2400 | + immediate = (instr_hi & 0x0000ffff) << 16; | ||
2401 | + immediate |= (instr_lo & 0x0000ffff); | ||
2402 | + offset = calc_fixup (irelscan->r_addend, 0, sec); | ||
2403 | + immediate -= offset; | ||
2404 | + irelscan->r_addend -= offset; | ||
2405 | + | ||
2406 | + } | ||
2407 | + } | ||
2408 | + else if (ELF64_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_64_PCREL) | ||
2409 | + { | ||
2410 | + if (ELF64_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
2411 | + continue; | ||
2412 | + | ||
2413 | + isym = isymbuf + ELF64_R_SYM (irelscan->r_info); | ||
2414 | + | ||
2415 | + /* Look at the reloc only if the value has been resolved. */ | ||
2416 | + if (isym->st_shndx == shndx | ||
2417 | + && (ELF64_ST_TYPE (isym->st_info) == STT_SECTION)) | ||
2418 | + { | ||
2419 | + bfd_vma immediate; | ||
2420 | + bfd_vma target_address; | ||
2421 | + | ||
2422 | + if (ocontents == NULL) | ||
2423 | + { | ||
2424 | + if (elf_section_data (o)->this_hdr.contents != NULL) | ||
2425 | + ocontents = elf_section_data (o)->this_hdr.contents; | ||
2426 | + else | ||
2427 | + { | ||
2428 | + /* We always cache the section contents. | ||
2429 | + Perhaps, if info->keep_memory is false, we | ||
2430 | + should free them, if we are permitted to. */ | ||
2431 | + if (o->rawsize == 0) | ||
2432 | + o->rawsize = o->size; | ||
2433 | + ocontents = (bfd_byte *) bfd_malloc (o->rawsize); | ||
2434 | + if (ocontents == NULL) | ||
2435 | + goto error_return; | ||
2436 | + if (!bfd_get_section_contents (abfd, o, ocontents, | ||
2437 | + (file_ptr) 0, | ||
2438 | + o->rawsize)) | ||
2439 | + goto error_return; | ||
2440 | + elf_section_data (o)->this_hdr.contents = ocontents; | ||
2441 | + } | ||
2442 | + } | ||
2443 | + unsigned long instr_hi = bfd_get_32 (abfd, ocontents | ||
2444 | + + irelscan->r_offset); | ||
2445 | + unsigned long instr_lo = bfd_get_32 (abfd, ocontents | ||
2446 | + + irelscan->r_offset | ||
2447 | + + INST_WORD_SIZE); | ||
2448 | + if ((instr_hi & 0xff000000) == 0xb2000000) | ||
2449 | + immediate = (instr_hi & 0x00ffffff) << 24; | ||
2450 | + else | ||
2451 | + immediate = (instr_hi & 0x0000ffff) << 16; | ||
2452 | + immediate |= (instr_lo & 0x0000ffff); | ||
2453 | + target_address = immediate; | ||
2454 | + offset = calc_fixup (target_address, 0, sec); | ||
2455 | + immediate -= offset; | ||
2456 | + irelscan->r_addend -= offset; | ||
2457 | + microblaze_bfd_write_imm_value_64 (abfd, ocontents | ||
2458 | + + irelscan->r_offset, immediate); | ||
2459 | + } | ||
2460 | + } | ||
2461 | + } | ||
2462 | + } | ||
2463 | + | ||
2464 | + /* Adjust the local symbols defined in this section. */ | ||
2465 | + isymend = isymbuf + symtab_hdr->sh_info; | ||
2466 | + for (isym = isymbuf; isym < isymend; isym++) | ||
2467 | + { | ||
2468 | + if (isym->st_shndx == shndx) | ||
2469 | + { | ||
2470 | + isym->st_value -= calc_fixup (isym->st_value, 0, sec); | ||
2471 | + if (isym->st_size) | ||
2472 | + isym->st_size -= calc_fixup (isym->st_value, isym->st_size, sec); | ||
2473 | + } | ||
2474 | + } | ||
2475 | + | ||
2476 | + /* Now adjust the global symbols defined in this section. */ | ||
2477 | + isym = isymbuf + symtab_hdr->sh_info; | ||
2478 | + symcount = (symtab_hdr->sh_size / sizeof (Elf64_External_Sym)) - symtab_hdr->sh_info; | ||
2479 | + for (sym_index = 0; sym_index < symcount; sym_index++) | ||
2480 | + { | ||
2481 | + sym_hash = elf_sym_hashes (abfd)[sym_index]; | ||
2482 | + if ((sym_hash->root.type == bfd_link_hash_defined | ||
2483 | + || sym_hash->root.type == bfd_link_hash_defweak) | ||
2484 | + && sym_hash->root.u.def.section == sec) | ||
2485 | + { | ||
2486 | + sym_hash->root.u.def.value -= calc_fixup (sym_hash->root.u.def.value, | ||
2487 | + 0, sec); | ||
2488 | + if (sym_hash->size) | ||
2489 | + sym_hash->size -= calc_fixup (sym_hash->root.u.def.value, | ||
2490 | + sym_hash->size, sec); | ||
2491 | + } | ||
2492 | + } | ||
2493 | + | ||
2494 | + /* Physically move the code and change the cooked size. */ | ||
2495 | + dest = sdata->relax[0].addr; | ||
2496 | + for (i = 0; i < sdata->relax_count; i++) | ||
2497 | + { | ||
2498 | + size_t len; | ||
2499 | + src = sdata->relax[i].addr + sdata->relax[i].size; | ||
2500 | + len = (sdata->relax[i+1].addr - sdata->relax[i].addr | ||
2501 | + - sdata->relax[i].size); | ||
2502 | + | ||
2503 | + memmove (contents + dest, contents + src, len); | ||
2504 | + sec->size -= sdata->relax[i].size; | ||
2505 | + dest += len; | ||
2506 | + } | ||
2507 | + | ||
2508 | + elf_section_data (sec)->relocs = internal_relocs; | ||
2509 | + | ||
2510 | + elf_section_data (sec)->this_hdr.contents = contents; | ||
2511 | + | ||
2512 | + symtab_hdr->contents = (bfd_byte *) isymbuf; | ||
2513 | + } | ||
2514 | + | ||
2515 | + if (internal_relocs != NULL | ||
2516 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
2517 | + free (internal_relocs); | ||
2518 | + | ||
2519 | + if (contents != NULL | ||
2520 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
2521 | + { | ||
2522 | + if (! link_info->keep_memory) | ||
2523 | + free (contents); | ||
2524 | + else | ||
2525 | + { | ||
2526 | + /* Cache the section contents for elf_link_input_bfd. */ | ||
2527 | + elf_section_data (sec)->this_hdr.contents = contents; | ||
2528 | + } | ||
2529 | + } | ||
2530 | + | ||
2531 | + if (sdata->relax_count == 0) | ||
2532 | + { | ||
2533 | + *again = false; | ||
2534 | + free (sdata->relax); | ||
2535 | + sdata->relax = NULL; | ||
2536 | + } | ||
2537 | + else | ||
2538 | + *again = true; | ||
2539 | + return true; | ||
2540 | + | ||
2541 | + error_return: | ||
2542 | + if (isymbuf != NULL | ||
2543 | + && symtab_hdr->contents != (unsigned char *) isymbuf) | ||
2544 | + free (isymbuf); | ||
2545 | + if (internal_relocs != NULL | ||
2546 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
2547 | + free (internal_relocs); | ||
2548 | + if (contents != NULL | ||
2549 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
2550 | + free (contents); | ||
2551 | + free (sdata->relax); | ||
2552 | + sdata->relax = NULL; | ||
2553 | + sdata->relax_count = 0; | ||
2554 | + return false; | ||
2555 | +} | ||
2556 | + | ||
2557 | +/* Return the section that should be marked against GC for a given | ||
2558 | + relocation. */ | ||
2559 | + | ||
2560 | +static asection * | ||
2561 | +microblaze_elf_gc_mark_hook (asection *sec, | ||
2562 | + struct bfd_link_info * info, | ||
2563 | + Elf_Internal_Rela * rel, | ||
2564 | + struct elf_link_hash_entry * h, | ||
2565 | + Elf_Internal_Sym * sym) | ||
2566 | +{ | ||
2567 | + if (h != NULL) | ||
2568 | + switch (ELF64_R_TYPE (rel->r_info)) | ||
2569 | + { | ||
2570 | + case R_MICROBLAZE_GNU_VTINHERIT: | ||
2571 | + case R_MICROBLAZE_GNU_VTENTRY: | ||
2572 | + return NULL; | ||
2573 | + } | ||
2574 | + | ||
2575 | + return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); | ||
2576 | +} | ||
2577 | + | ||
2578 | +/* Update the got entry reference counts for the section being removed. */ | ||
2579 | + | ||
2580 | +static bool | ||
2581 | +microblaze_elf_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED, | ||
2582 | + struct bfd_link_info * info ATTRIBUTE_UNUSED, | ||
2583 | + asection * sec ATTRIBUTE_UNUSED, | ||
2584 | + const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED) | ||
2585 | +{ | ||
2586 | + return true; | ||
2587 | +} | ||
2588 | + | ||
2589 | +/* PIC support. */ | ||
2590 | + | ||
2591 | +#define PLT_ENTRY_SIZE 16 | ||
2592 | + | ||
2593 | +#define PLT_ENTRY_WORD_0 0xb0000000 /* "imm 0". */ | ||
2594 | +#define PLT_ENTRY_WORD_1 0xe9940000 /* "lwi r12,r20,0" - relocated to lwi r12,r20,func@GOT. */ | ||
2595 | +#define PLT_ENTRY_WORD_1_NOPIC 0xe9800000 /* "lwi r12,r0,0" - non-PIC object. */ | ||
2596 | +#define PLT_ENTRY_WORD_2 0x98186000 /* "brad r12". */ | ||
2597 | +#define PLT_ENTRY_WORD_3 0x80000000 /* "nop". */ | ||
2598 | + | ||
2599 | +/* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up | ||
2600 | + shortcuts to them in our hash table. */ | ||
2601 | + | ||
2602 | +static bool | ||
2603 | +update_local_sym_info (bfd *abfd, | ||
2604 | + Elf_Internal_Shdr *symtab_hdr, | ||
2605 | + unsigned long r_symndx, | ||
2606 | + unsigned int tls_type) | ||
2607 | +{ | ||
2608 | + bfd_signed_vma *local_got_refcounts = elf_local_got_refcounts (abfd); | ||
2609 | + unsigned char *local_got_tls_masks; | ||
2610 | + | ||
2611 | + if (local_got_refcounts == NULL) | ||
2612 | + { | ||
2613 | + bfd_size_type size = symtab_hdr->sh_info; | ||
2614 | + | ||
2615 | + size *= (sizeof (*local_got_refcounts) + sizeof (*local_got_tls_masks)); | ||
2616 | + local_got_refcounts = bfd_zalloc (abfd, size); | ||
2617 | + if (local_got_refcounts == NULL) | ||
2618 | + return false; | ||
2619 | + elf_local_got_refcounts (abfd) = local_got_refcounts; | ||
2620 | + } | ||
2621 | + | ||
2622 | + local_got_tls_masks = | ||
2623 | + (unsigned char *) (local_got_refcounts + symtab_hdr->sh_info); | ||
2624 | + local_got_tls_masks[r_symndx] |= tls_type; | ||
2625 | + local_got_refcounts[r_symndx] += 1; | ||
2626 | + | ||
2627 | + return true; | ||
2628 | +} | ||
2629 | +/* Look through the relocs for a section during the first phase. */ | ||
2630 | + | ||
2631 | +static bool | ||
2632 | +microblaze_elf_check_relocs (bfd * abfd, | ||
2633 | + struct bfd_link_info * info, | ||
2634 | + asection * sec, | ||
2635 | + const Elf_Internal_Rela * relocs) | ||
2636 | +{ | ||
2637 | + Elf_Internal_Shdr * symtab_hdr; | ||
2638 | + struct elf_link_hash_entry ** sym_hashes; | ||
2639 | + struct elf_link_hash_entry ** sym_hashes_end; | ||
2640 | + const Elf_Internal_Rela * rel; | ||
2641 | + const Elf_Internal_Rela * rel_end; | ||
2642 | + struct elf64_mb_link_hash_table *htab; | ||
2643 | + asection *sreloc = NULL; | ||
2644 | + | ||
2645 | + if (bfd_link_relocatable (info)) | ||
2646 | + return true; | ||
2647 | + | ||
2648 | + htab = elf64_mb_hash_table (info); | ||
2649 | + if (htab == NULL) | ||
2650 | + return false; | ||
2651 | + | ||
2652 | + symtab_hdr = & elf_tdata (abfd)->symtab_hdr; | ||
2653 | + sym_hashes = elf_sym_hashes (abfd); | ||
2654 | + sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf64_External_Sym); | ||
2655 | + if (!elf_bad_symtab (abfd)) | ||
2656 | + sym_hashes_end -= symtab_hdr->sh_info; | ||
2657 | + | ||
2658 | + rel_end = relocs + sec->reloc_count; | ||
2659 | + | ||
2660 | + for (rel = relocs; rel < rel_end; rel++) | ||
2661 | + { | ||
2662 | + unsigned int r_type; | ||
2663 | + struct elf_link_hash_entry * h; | ||
2664 | + unsigned long r_symndx; | ||
2665 | + unsigned char tls_type = 0; | ||
2666 | + | ||
2667 | + r_symndx = ELF64_R_SYM (rel->r_info); | ||
2668 | + r_type = ELF64_R_TYPE (rel->r_info); | ||
2669 | + | ||
2670 | + if (r_symndx < symtab_hdr->sh_info) | ||
2671 | + h = NULL; | ||
2672 | + else | ||
2673 | + { | ||
2674 | + h = sym_hashes [r_symndx - symtab_hdr->sh_info]; | ||
2675 | + while (h->root.type == bfd_link_hash_indirect | ||
2676 | + || h->root.type == bfd_link_hash_warning) | ||
2677 | + h = (struct elf_link_hash_entry *) h->root.u.i.link; | ||
2678 | + /* PR15323, ref flags aren't set for references in the same | ||
2679 | + object. */ | ||
2680 | + h->root.non_ir_ref_regular = 1; | ||
2681 | + } | ||
2682 | + | ||
2683 | + switch (r_type) | ||
2684 | + { | ||
2685 | + /* This relocation describes the C++ object vtable hierarchy. | ||
2686 | + Reconstruct it for later use during GC. */ | ||
2687 | + case R_MICROBLAZE_GNU_VTINHERIT: | ||
2688 | + if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) | ||
2689 | + return false; | ||
2690 | + break; | ||
2691 | + | ||
2692 | + /* This relocation describes which C++ vtable entries are actually | ||
2693 | + used. Record for later use during GC. */ | ||
2694 | + case R_MICROBLAZE_GNU_VTENTRY: | ||
2695 | + if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) | ||
2696 | + return false; | ||
2697 | + break; | ||
2698 | + | ||
2699 | + /* This relocation requires .plt entry. */ | ||
2700 | + case R_MICROBLAZE_PLT_64: | ||
2701 | + if (h != NULL) | ||
2702 | + { | ||
2703 | + h->needs_plt = 1; | ||
2704 | + h->plt.refcount += 1; | ||
2705 | + } | ||
2706 | + break; | ||
2707 | + | ||
2708 | + /* This relocation requires .got entry. */ | ||
2709 | + case R_MICROBLAZE_TLSGD: | ||
2710 | + tls_type |= (TLS_TLS | TLS_GD); | ||
2711 | + goto dogottls; | ||
2712 | + case R_MICROBLAZE_TLSLD: | ||
2713 | + tls_type |= (TLS_TLS | TLS_LD); | ||
2714 | + /* Fall through. */ | ||
2715 | + dogottls: | ||
2716 | + sec->has_tls_reloc = 1; | ||
2717 | + /* Fall through. */ | ||
2718 | + case R_MICROBLAZE_GOT_64: | ||
2719 | + if (htab->elf.sgot == NULL) | ||
2720 | + { | ||
2721 | + if (htab->elf.dynobj == NULL) | ||
2722 | + htab->elf.dynobj = abfd; | ||
2723 | + if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) | ||
2724 | + return false; | ||
2725 | + } | ||
2726 | + if (h != NULL) | ||
2727 | + { | ||
2728 | + h->got.refcount += 1; | ||
2729 | + elf64_mb_hash_entry (h)->tls_mask |= tls_type; | ||
2730 | + } | ||
2731 | + else | ||
2732 | + { | ||
2733 | + if (! update_local_sym_info(abfd, symtab_hdr, r_symndx, tls_type) ) | ||
2734 | + return false; | ||
2735 | + } | ||
2736 | + break; | ||
2737 | + | ||
2738 | + case R_MICROBLAZE_GOTOFF_64: | ||
2739 | + case R_MICROBLAZE_GOTOFF_32: | ||
2740 | + if (htab->elf.sgot == NULL) | ||
2741 | + { | ||
2742 | + if (htab->elf.dynobj == NULL) | ||
2743 | + htab->elf.dynobj = abfd; | ||
2744 | + if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) | ||
2745 | + return false; | ||
2746 | + } | ||
2747 | + break; | ||
2748 | + | ||
2749 | + case R_MICROBLAZE_64: | ||
2750 | + case R_MICROBLAZE_64_PCREL: | ||
2751 | + case R_MICROBLAZE_32: | ||
2752 | + case R_MICROBLAZE_IMML_64: | ||
2753 | + { | ||
2754 | + if (h != NULL && !bfd_link_pic (info)) | ||
2755 | + { | ||
2756 | + /* we may need a copy reloc. */ | ||
2757 | + h->non_got_ref = 1; | ||
2758 | + | ||
2759 | + /* we may also need a .plt entry. */ | ||
2760 | + h->plt.refcount += 1; | ||
2761 | + if (ELF64_R_TYPE (rel->r_info) != R_MICROBLAZE_64_PCREL) | ||
2762 | + h->pointer_equality_needed = 1; | ||
2763 | + } | ||
2764 | + | ||
2765 | + | ||
2766 | + /* If we are creating a shared library, and this is a reloc | ||
2767 | + against a global symbol, or a non PC relative reloc | ||
2768 | + against a local symbol, then we need to copy the reloc | ||
2769 | + into the shared library. However, if we are linking with | ||
2770 | + -Bsymbolic, we do not need to copy a reloc against a | ||
2771 | + global symbol which is defined in an object we are | ||
2772 | + including in the link (i.e., DEF_REGULAR is set). At | ||
2773 | + this point we have not seen all the input files, so it is | ||
2774 | + possible that DEF_REGULAR is not set now but will be set | ||
2775 | + later (it is never cleared). In case of a weak definition, | ||
2776 | + DEF_REGULAR may be cleared later by a strong definition in | ||
2777 | + a shared library. We account for that possibility below by | ||
2778 | + storing information in the relocs_copied field of the hash | ||
2779 | + table entry. A similar situation occurs when creating | ||
2780 | + shared libraries and symbol visibility changes render the | ||
2781 | + symbol local. | ||
2782 | + | ||
2783 | + If on the other hand, we are creating an executable, we | ||
2784 | + may need to keep relocations for symbols satisfied by a | ||
2785 | + dynamic library if we manage to avoid copy relocs for the | ||
2786 | + symbol. */ | ||
2787 | + | ||
2788 | + if ((bfd_link_pic (info) | ||
2789 | + && (sec->flags & SEC_ALLOC) != 0 | ||
2790 | + && (r_type != R_MICROBLAZE_64_PCREL | ||
2791 | + || (h != NULL | ||
2792 | + && (! info->symbolic | ||
2793 | + || h->root.type == bfd_link_hash_defweak | ||
2794 | + || !h->def_regular)))) | ||
2795 | + || (!bfd_link_pic (info) | ||
2796 | + && (sec->flags & SEC_ALLOC) != 0 | ||
2797 | + && h != NULL | ||
2798 | + && (h->root.type == bfd_link_hash_defweak | ||
2799 | + || !h->def_regular))) | ||
2800 | + { | ||
2801 | + struct elf64_mb_dyn_relocs *p; | ||
2802 | + struct elf64_mb_dyn_relocs **head; | ||
2803 | + | ||
2804 | + /* When creating a shared object, we must copy these | ||
2805 | + relocs into the output file. We create a reloc | ||
2806 | + section in dynobj and make room for the reloc. */ | ||
2807 | + | ||
2808 | + if (sreloc == NULL) | ||
2809 | + { | ||
2810 | + bfd *dynobj; | ||
2811 | + | ||
2812 | + if (htab->elf.dynobj == NULL) | ||
2813 | + htab->elf.dynobj = abfd; | ||
2814 | + dynobj = htab->elf.dynobj; | ||
2815 | + | ||
2816 | + sreloc = _bfd_elf_make_dynamic_reloc_section (sec, dynobj, | ||
2817 | + 2, abfd, 1); | ||
2818 | + if (sreloc == NULL) | ||
2819 | + return false; | ||
2820 | + } | ||
2821 | + | ||
2822 | + /* If this is a global symbol, we count the number of | ||
2823 | + relocations we need for this symbol. */ | ||
2824 | + if (h != NULL) | ||
2825 | + head = &h->dyn_relocs; | ||
2826 | + else | ||
2827 | + { | ||
2828 | + /* Track dynamic relocs needed for local syms too. | ||
2829 | + We really need local syms available to do this | ||
2830 | + easily. Oh well. */ | ||
2831 | + | ||
2832 | + asection *s; | ||
2833 | + Elf_Internal_Sym *isym; | ||
2834 | + void *vpp; | ||
2835 | + | ||
2836 | + isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, | ||
2837 | + abfd, r_symndx); | ||
2838 | + if (isym == NULL) | ||
2839 | + return false; | ||
2840 | + | ||
2841 | + s = bfd_section_from_elf_index (abfd, isym->st_shndx); | ||
2842 | + if (s == NULL) | ||
2843 | + return false; | ||
2844 | + | ||
2845 | + vpp = &elf_section_data (s)->local_dynrel; | ||
2846 | + head = (struct elf64_mb_dyn_relocs **) vpp; | ||
2847 | + } | ||
2848 | + | ||
2849 | + p = *head; | ||
2850 | + if (p == NULL || p->sec != sec) | ||
2851 | + { | ||
2852 | + size_t amt = sizeof *p; | ||
2853 | + p = ((struct elf64_mb_dyn_relocs *) | ||
2854 | + bfd_alloc (htab->elf.dynobj, amt)); | ||
2855 | + if (p == NULL) | ||
2856 | + return false; | ||
2857 | + p->next = *head; | ||
2858 | + *head = p; | ||
2859 | + p->sec = sec; | ||
2860 | + p->count = 0; | ||
2861 | + p->pc_count = 0; | ||
2862 | + } | ||
2863 | + | ||
2864 | + p->count += 1; | ||
2865 | + if (r_type == R_MICROBLAZE_64_PCREL) | ||
2866 | + p->pc_count += 1; | ||
2867 | + } | ||
2868 | + } | ||
2869 | + break; | ||
2870 | + } | ||
2871 | + } | ||
2872 | + | ||
2873 | + return true; | ||
2874 | +} | ||
2875 | + | ||
2876 | +static bool | ||
2877 | +microblaze_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) | ||
2878 | +{ | ||
2879 | + struct elf64_mb_link_hash_table *htab; | ||
2880 | + | ||
2881 | + htab = elf64_mb_hash_table (info); | ||
2882 | + if (htab == NULL) | ||
2883 | + return false; | ||
2884 | + | ||
2885 | + if (!htab->sgot && !_bfd_elf_create_got_section (dynobj, info)) | ||
2886 | + return false; | ||
2887 | + | ||
2888 | + if (!_bfd_elf_create_dynamic_sections (dynobj, info)) | ||
2889 | + return false; | ||
2890 | + | ||
2891 | + htab->splt = bfd_get_linker_section (dynobj, ".plt"); | ||
2892 | + htab->srelplt = bfd_get_linker_section (dynobj, ".rela.plt"); | ||
2893 | + htab->sdynbss = bfd_get_linker_section (dynobj, ".dynbss"); | ||
2894 | + if (!bfd_link_pic (info)) | ||
2895 | + htab->srelbss = bfd_get_linker_section (dynobj, ".rela.bss"); | ||
2896 | + | ||
2897 | + if (!htab->splt || !htab->srelplt || !htab->sdynbss | ||
2898 | + || (!bfd_link_pic (info) && !htab->srelbss)) | ||
2899 | + abort (); | ||
2900 | + | ||
2901 | + return true; | ||
2902 | +} | ||
2903 | + | ||
2904 | +/* Copy the extra info we tack onto an elf_link_hash_entry. */ | ||
2905 | + | ||
2906 | +static void | ||
2907 | +microblaze_elf_copy_indirect_symbol (struct bfd_link_info *info, | ||
2908 | + struct elf_link_hash_entry *dir, | ||
2909 | + struct elf_link_hash_entry *ind) | ||
2910 | +{ | ||
2911 | + struct elf64_mb_link_hash_entry *edir, *eind; | ||
2912 | + | ||
2913 | + edir = (struct elf64_mb_link_hash_entry *) dir; | ||
2914 | + eind = (struct elf64_mb_link_hash_entry *) ind; | ||
2915 | + | ||
2916 | + if (eind->dyn_relocs != NULL) | ||
2917 | + { | ||
2918 | + if (edir->dyn_relocs != NULL) | ||
2919 | + { | ||
2920 | + struct elf64_mb_dyn_relocs **pp; | ||
2921 | + struct elf64_mb_dyn_relocs *p; | ||
2922 | + | ||
2923 | + if (ind->root.type == bfd_link_hash_indirect) | ||
2924 | + abort (); | ||
2925 | + | ||
2926 | + /* Add reloc counts against the weak sym to the strong sym | ||
2927 | + list. Merge any entries against the same section. */ | ||
2928 | + for (pp = &eind->dyn_relocs; (p = *pp) != NULL; ) | ||
2929 | + { | ||
2930 | + struct elf64_mb_dyn_relocs *q; | ||
2931 | + | ||
2932 | + for (q = edir->dyn_relocs; q != NULL; q = q->next) | ||
2933 | + if (q->sec == p->sec) | ||
2934 | + { | ||
2935 | + q->pc_count += p->pc_count; | ||
2936 | + q->count += p->count; | ||
2937 | + *pp = p->next; | ||
2938 | + break; | ||
2939 | + } | ||
2940 | + if (q == NULL) | ||
2941 | + pp = &p->next; | ||
2942 | + } | ||
2943 | + *pp = edir->dyn_relocs; | ||
2944 | + } | ||
2945 | + | ||
2946 | + edir->dyn_relocs = eind->dyn_relocs; | ||
2947 | + eind->dyn_relocs = NULL; | ||
2948 | + } | ||
2949 | + | ||
2950 | + edir->tls_mask |= eind->tls_mask; | ||
2951 | + | ||
2952 | + _bfd_elf_link_hash_copy_indirect (info, dir, ind); | ||
2953 | +} | ||
2954 | + | ||
2955 | +static bool | ||
2956 | +microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, | ||
2957 | + struct elf_link_hash_entry *h) | ||
2958 | +{ | ||
2959 | + struct elf64_mb_link_hash_table *htab; | ||
2960 | + struct elf64_mb_link_hash_entry * eh; | ||
2961 | + struct elf64_mb_dyn_relocs *p; | ||
2962 | + asection *sdynbss; | ||
2963 | + asection *s, *srel; | ||
2964 | + unsigned int power_of_two; | ||
2965 | + bfd *dynobj; | ||
2966 | + | ||
2967 | + htab = elf64_mb_hash_table (info); | ||
2968 | + if (htab == NULL) | ||
2969 | + return false; | ||
2970 | + | ||
2971 | + /* If this is a function, put it in the procedure linkage table. We | ||
2972 | + will fill in the contents of the procedure linkage table later, | ||
2973 | + when we know the address of the .got section. */ | ||
2974 | + if (h->type == STT_FUNC | ||
2975 | + || h->needs_plt) | ||
2976 | + { | ||
2977 | + if (h->plt.refcount <= 0 | ||
2978 | + || SYMBOL_CALLS_LOCAL (info, h) | ||
2979 | + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT | ||
2980 | + && h->root.type == bfd_link_hash_undefweak)) | ||
2981 | + { | ||
2982 | + /* This case can occur if we saw a PLT reloc in an input | ||
2983 | + file, but the symbol was never referred to by a dynamic | ||
2984 | + object, or if all references were garbage collected. In | ||
2985 | + such a case, we don't actually need to build a procedure | ||
2986 | + linkage table, and we can just do a PC32 reloc instead. */ | ||
2987 | + h->plt.offset = (bfd_vma) -1; | ||
2988 | + h->needs_plt = 0; | ||
2989 | + } | ||
2990 | + | ||
2991 | + return true; | ||
2992 | + } | ||
2993 | + else | ||
2994 | + /* It's possible that we incorrectly decided a .plt reloc was | ||
2995 | + needed for an R_MICROBLAZE_64_PCREL reloc to a non-function sym in | ||
2996 | + check_relocs. We can't decide accurately between function and | ||
2997 | + non-function syms in check-relocs; Objects loaded later in | ||
2998 | + the link may change h->type. So fix it now. */ | ||
2999 | + h->plt.offset = (bfd_vma) -1; | ||
3000 | + | ||
3001 | + /* If this is a weak symbol, and there is a real definition, the | ||
3002 | + processor independent code will have arranged for us to see the | ||
3003 | + real definition first, and we can just use the same value. */ | ||
3004 | + if (h->is_weakalias) | ||
3005 | + { | ||
3006 | + struct elf_link_hash_entry *def = weakdef (h); | ||
3007 | + BFD_ASSERT (def->root.type == bfd_link_hash_defined); | ||
3008 | + h->root.u.def.section = def->root.u.def.section; | ||
3009 | + h->root.u.def.value = def->root.u.def.value; | ||
3010 | + return true; | ||
3011 | + } | ||
3012 | + | ||
3013 | + /* This is a reference to a symbol defined by a dynamic object which | ||
3014 | + is not a function. */ | ||
3015 | + | ||
3016 | + /* If we are creating a shared library, we must presume that the | ||
3017 | + only references to the symbol are via the global offset table. | ||
3018 | + For such cases we need not do anything here; the relocations will | ||
3019 | + be handled correctly by relocate_section. */ | ||
3020 | + if (bfd_link_pic (info)) | ||
3021 | + return true; | ||
3022 | + | ||
3023 | + /* If there are no references to this symbol that do not use the | ||
3024 | + GOT, we don't need to generate a copy reloc. */ | ||
3025 | + if (!h->non_got_ref) | ||
3026 | + return true; | ||
3027 | + | ||
3028 | + /* If -z nocopyreloc was given, we won't generate them either. */ | ||
3029 | + if (info->nocopyreloc) | ||
3030 | + { | ||
3031 | + h->non_got_ref = 0; | ||
3032 | + return true; | ||
3033 | + } | ||
3034 | + | ||
3035 | + eh = (struct elf64_mb_link_hash_entry *) h; | ||
3036 | + for (p = eh->dyn_relocs; p != NULL; p = p->next) | ||
3037 | + { | ||
3038 | + s = p->sec->output_section; | ||
3039 | + if (s != NULL && (s->flags & SEC_READONLY) != 0) | ||
3040 | + break; | ||
3041 | + } | ||
3042 | + | ||
3043 | + /* If we didn't find any dynamic relocs in read-only sections, then | ||
3044 | + we'll be keeping the dynamic relocs and avoiding the copy reloc. */ | ||
3045 | + if (p == NULL) | ||
3046 | + { | ||
3047 | + h->non_got_ref = 0; | ||
3048 | + return true; | ||
3049 | + } | ||
3050 | + | ||
3051 | + /* We must allocate the symbol in our .dynbss section, which will | ||
3052 | + become part of the .bss section of the executable. There will be | ||
3053 | + an entry for this symbol in the .dynsym section. The dynamic | ||
3054 | + object will contain position independent code, so all references | ||
3055 | + from the dynamic object to this symbol will go through the global | ||
3056 | + offset table. The dynamic linker will use the .dynsym entry to | ||
3057 | + determine the address it must put in the global offset table, so | ||
3058 | + both the dynamic object and the regular object will refer to the | ||
3059 | + same memory location for the variable. */ | ||
3060 | + | ||
3061 | + /* We must generate a R_MICROBLAZE_COPY reloc to tell the dynamic linker | ||
3062 | + to copy the initial value out of the dynamic object and into the | ||
3063 | + runtime process image. */ | ||
3064 | + dynobj = elf_hash_table (info)->dynobj; | ||
3065 | + BFD_ASSERT (dynobj != NULL); | ||
3066 | + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) | ||
3067 | + { | ||
3068 | + htab->srelbss->size += sizeof (Elf64_External_Rela); | ||
3069 | + h->needs_copy = 1; | ||
3070 | + } | ||
3071 | + | ||
3072 | + /* We need to figure out the alignment required for this symbol. I | ||
3073 | + have no idea how ELF linkers handle this. */ | ||
3074 | + power_of_two = bfd_log2 (h->size); | ||
3075 | + if (power_of_two > 3) | ||
3076 | + power_of_two = 3; | ||
3077 | + | ||
3078 | + sdynbss = htab->sdynbss; | ||
3079 | + /* Apply the required alignment. */ | ||
3080 | + sdynbss->size = BFD_ALIGN (sdynbss->size, (bfd_size_type) (1 << power_of_two)); | ||
3081 | + if (power_of_two > sdynbss->alignment_power) | ||
3082 | + { | ||
3083 | + if (! bfd_set_section_alignment (sdynbss, power_of_two)) | ||
3084 | + return false; | ||
3085 | + } | ||
3086 | + | ||
3087 | + /* Define the symbol as being at this point in the section. */ | ||
3088 | + h->root.u.def.section = s; | ||
3089 | + h->root.u.def.value = s->size; | ||
3090 | + | ||
3091 | + /* Increment the section size to make room for the symbol. */ | ||
3092 | + s->size += h->size; | ||
3093 | + return true; | ||
3094 | +} | ||
3095 | + | ||
3096 | +/* Allocate space in .plt, .got and associated reloc sections for | ||
3097 | + dynamic relocs. */ | ||
3098 | + | ||
3099 | +static bool | ||
3100 | +allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) | ||
3101 | +{ | ||
3102 | + struct bfd_link_info *info; | ||
3103 | + struct elf64_mb_link_hash_table *htab; | ||
3104 | + struct elf64_mb_link_hash_entry *eh; | ||
3105 | + struct elf64_mb_dyn_relocs *p; | ||
3106 | + | ||
3107 | + if (h->root.type == bfd_link_hash_indirect) | ||
3108 | + return true; | ||
3109 | + | ||
3110 | + info = (struct bfd_link_info *) dat; | ||
3111 | + htab = elf64_mb_hash_table (info); | ||
3112 | + if (htab == NULL) | ||
3113 | + return false; | ||
3114 | + | ||
3115 | + if (htab->elf.dynamic_sections_created | ||
3116 | + && h->plt.refcount > 0) | ||
3117 | + { | ||
3118 | + /* Make sure this symbol is output as a dynamic symbol. | ||
3119 | + Undefined weak syms won't yet be marked as dynamic. */ | ||
3120 | + if (h->dynindx == -1 | ||
3121 | + && !h->forced_local) | ||
3122 | + { | ||
3123 | + if (! bfd_elf_link_record_dynamic_symbol (info, h)) | ||
3124 | + return false; | ||
3125 | + } | ||
3126 | + | ||
3127 | + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) | ||
3128 | + { | ||
3129 | + asection *s = htab->elf.splt; | ||
3130 | + | ||
3131 | + /* The first entry in .plt is reserved. */ | ||
3132 | + if (s->size == 0) | ||
3133 | + s->size = PLT_ENTRY_SIZE; | ||
3134 | + | ||
3135 | + h->plt.offset = s->size; | ||
3136 | + | ||
3137 | + /* If this symbol is not defined in a regular file, and we are | ||
3138 | + not generating a shared library, then set the symbol to this | ||
3139 | + location in the .plt. This is required to make function | ||
3140 | + pointers compare as equal between the normal executable and | ||
3141 | + the shared library. */ | ||
3142 | + if (! bfd_link_pic (info) | ||
3143 | + && !h->def_regular) | ||
3144 | + { | ||
3145 | + h->root.u.def.section = s; | ||
3146 | + h->root.u.def.value = h->plt.offset; | ||
3147 | + } | ||
3148 | + | ||
3149 | + /* Make room for this entry. */ | ||
3150 | + s->size += PLT_ENTRY_SIZE; | ||
3151 | + | ||
3152 | + /* We also need to make an entry in the .got.plt section, which | ||
3153 | + will be placed in the .got section by the linker script. */ | ||
3154 | + htab->elf.sgotplt->size += 4; | ||
3155 | + | ||
3156 | + /* We also need to make an entry in the .rel.plt section. */ | ||
3157 | + htab->elf.srelplt->size += sizeof (Elf64_External_Rela); | ||
3158 | + } | ||
3159 | + else | ||
3160 | + { | ||
3161 | + h->plt.offset = (bfd_vma) -1; | ||
3162 | + h->needs_plt = 0; | ||
3163 | + } | ||
3164 | + } | ||
3165 | + else | ||
3166 | + { | ||
3167 | + h->plt.offset = (bfd_vma) -1; | ||
3168 | + h->needs_plt = 0; | ||
3169 | + } | ||
3170 | + | ||
3171 | + eh = (struct elf64_mb_link_hash_entry *) h; | ||
3172 | + if (h->got.refcount > 0) | ||
3173 | + { | ||
3174 | + unsigned int need; | ||
3175 | + asection *s; | ||
3176 | + | ||
3177 | + /* Make sure this symbol is output as a dynamic symbol. | ||
3178 | + Undefined weak syms won't yet be marked as dynamic. */ | ||
3179 | + if (h->dynindx == -1 | ||
3180 | + && !h->forced_local) | ||
3181 | + { | ||
3182 | + if (! bfd_elf_link_record_dynamic_symbol (info, h)) | ||
3183 | + return false; | ||
3184 | + } | ||
3185 | + | ||
3186 | + need = 0; | ||
3187 | + if ((eh->tls_mask & TLS_TLS) != 0) | ||
3188 | + { | ||
3189 | + /* Handle TLS Symbol */ | ||
3190 | + if ((eh->tls_mask & TLS_LD) != 0) | ||
3191 | + { | ||
3192 | + if (!eh->elf.def_dynamic) | ||
3193 | + /* We'll just use htab->tlsld_got.offset. This should | ||
3194 | + always be the case. It's a little odd if we have | ||
3195 | + a local dynamic reloc against a non-local symbol. */ | ||
3196 | + htab->tlsld_got.refcount += 1; | ||
3197 | + else | ||
3198 | + need += 8; | ||
3199 | + } | ||
3200 | + if ((eh->tls_mask & TLS_GD) != 0) | ||
3201 | + need += 8; | ||
3202 | + } | ||
3203 | + else | ||
3204 | + { | ||
3205 | + /* Regular (non-TLS) symbol */ | ||
3206 | + need += 4; | ||
3207 | + } | ||
3208 | + if (need == 0) | ||
3209 | + { | ||
3210 | + h->got.offset = (bfd_vma) -1; | ||
3211 | + } | ||
3212 | + else | ||
3213 | + { | ||
3214 | + s = htab->elf.sgot; | ||
3215 | + h->got.offset = s->size; | ||
3216 | + s->size += need; | ||
3217 | + htab->elf.srelgot->size += need * (sizeof (Elf64_External_Rela) / 4); | ||
3218 | + } | ||
3219 | + } | ||
3220 | + else | ||
3221 | + h->got.offset = (bfd_vma) -1; | ||
3222 | + | ||
3223 | + if (eh->dyn_relocs == NULL) | ||
3224 | + return true; | ||
3225 | + | ||
3226 | + /* In the shared -Bsymbolic case, discard space allocated for | ||
3227 | + dynamic pc-relative relocs against symbols which turn out to be | ||
3228 | + defined in regular objects. For the normal shared case, discard | ||
3229 | + space for pc-relative relocs that have become local due to symbol | ||
3230 | + visibility changes. */ | ||
3231 | + | ||
3232 | + if (bfd_link_pic (info)) | ||
3233 | + { | ||
3234 | + if (h->def_regular | ||
3235 | + && (h->forced_local | ||
3236 | + || info->symbolic)) | ||
3237 | + { | ||
3238 | + struct elf64_mb_dyn_relocs **pp; | ||
3239 | + | ||
3240 | + for (pp = &eh->dyn_relocs; (p = *pp) != NULL; ) | ||
3241 | + { | ||
3242 | + p->count -= p->pc_count; | ||
3243 | + p->pc_count = 0; | ||
3244 | + if (p->count == 0) | ||
3245 | + *pp = p->next; | ||
3246 | + else | ||
3247 | + pp = &p->next; | ||
3248 | + } | ||
3249 | + } | ||
3250 | + else if (UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)) | ||
3251 | + h->dyn_relocs = NULL; | ||
3252 | + } | ||
3253 | + else | ||
3254 | + { | ||
3255 | + /* For the non-shared case, discard space for relocs against | ||
3256 | + symbols which turn out to need copy relocs or are not | ||
3257 | + dynamic. */ | ||
3258 | + | ||
3259 | + if (!h->non_got_ref | ||
3260 | + && ((h->def_dynamic | ||
3261 | + && !h->def_regular) | ||
3262 | + || (htab->elf.dynamic_sections_created | ||
3263 | + && (h->root.type == bfd_link_hash_undefweak | ||
3264 | + || h->root.type == bfd_link_hash_undefined)))) | ||
3265 | + { | ||
3266 | + /* Make sure this symbol is output as a dynamic symbol. | ||
3267 | + Undefined weak syms won't yet be marked as dynamic. */ | ||
3268 | + if (h->dynindx == -1 | ||
3269 | + && !h->forced_local) | ||
3270 | + { | ||
3271 | + if (! bfd_elf_link_record_dynamic_symbol (info, h)) | ||
3272 | + return false; | ||
3273 | + } | ||
3274 | + | ||
3275 | + /* If that succeeded, we know we'll be keeping all the | ||
3276 | + relocs. */ | ||
3277 | + if (h->dynindx != -1) | ||
3278 | + goto keep; | ||
3279 | + } | ||
3280 | + | ||
3281 | + h->dyn_relocs = NULL; | ||
3282 | + | ||
3283 | + keep: ; | ||
3284 | + } | ||
3285 | + | ||
3286 | + /* Finally, allocate space. */ | ||
3287 | + for (p = h->dyn_relocs; p != NULL; p = p->next) | ||
3288 | + { | ||
3289 | + asection *sreloc = elf_section_data (p->sec)->sreloc; | ||
3290 | + sreloc->size += p->count * sizeof (Elf64_External_Rela); | ||
3291 | + } | ||
3292 | + | ||
3293 | + return true; | ||
3294 | +} | ||
3295 | + | ||
3296 | +/* Set the sizes of the dynamic sections. */ | ||
3297 | + | ||
3298 | +static bool | ||
3299 | +microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, | ||
3300 | + struct bfd_link_info *info) | ||
3301 | +{ | ||
3302 | + struct elf64_mb_link_hash_table *htab; | ||
3303 | + bfd *dynobj; | ||
3304 | + asection *s; | ||
3305 | + bfd *ibfd; | ||
3306 | + | ||
3307 | + htab = elf64_mb_hash_table (info); | ||
3308 | + if (htab == NULL) | ||
3309 | + return false; | ||
3310 | + | ||
3311 | + dynobj = htab->elf.dynobj; | ||
3312 | + BFD_ASSERT (dynobj != NULL); | ||
3313 | + | ||
3314 | + /* Set up .got offsets for local syms, and space for local dynamic | ||
3315 | + relocs. */ | ||
3316 | + for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) | ||
3317 | + { | ||
3318 | + bfd_signed_vma *local_got; | ||
3319 | + bfd_signed_vma *end_local_got; | ||
3320 | + bfd_size_type locsymcount; | ||
3321 | + Elf_Internal_Shdr *symtab_hdr; | ||
3322 | + unsigned char *lgot_masks; | ||
3323 | + asection *srel; | ||
3324 | + | ||
3325 | + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) | ||
3326 | + continue; | ||
3327 | + | ||
3328 | + for (s = ibfd->sections; s != NULL; s = s->next) | ||
3329 | + { | ||
3330 | + struct elf_dyn_relocs *p; | ||
3331 | + | ||
3332 | + for (p = ((struct elf64_mb_dyn_relocs *) | ||
3333 | + elf_section_data (s)->local_dynrel); | ||
3334 | + p != NULL; | ||
3335 | + p = p->next) | ||
3336 | + { | ||
3337 | + if (!bfd_is_abs_section (p->sec) | ||
3338 | + && bfd_is_abs_section (p->sec->output_section)) | ||
3339 | + { | ||
3340 | + /* Input section has been discarded, either because | ||
3341 | + it is a copy of a linkonce section or due to | ||
3342 | + linker script /DISCARD/, so we'll be discarding | ||
3343 | + the relocs too. */ | ||
3344 | + } | ||
3345 | + else if (p->count != 0) | ||
3346 | + { | ||
3347 | + srel = elf_section_data (p->sec)->sreloc; | ||
3348 | + srel->size += p->count * sizeof (Elf64_External_Rela); | ||
3349 | + if ((p->sec->output_section->flags & SEC_READONLY) != 0) | ||
3350 | + info->flags |= DF_TEXTREL; | ||
3351 | + } | ||
3352 | + } | ||
3353 | + } | ||
3354 | + | ||
3355 | + local_got = elf_local_got_refcounts (ibfd); | ||
3356 | + if (!local_got) | ||
3357 | + continue; | ||
3358 | + | ||
3359 | + symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; | ||
3360 | + locsymcount = symtab_hdr->sh_info; | ||
3361 | + end_local_got = local_got + locsymcount; | ||
3362 | + lgot_masks = (unsigned char *) end_local_got; | ||
3363 | + s = htab->elf.sgot; | ||
3364 | + srel = htab->elf.srelgot; | ||
3365 | + | ||
3366 | + for (; local_got < end_local_got; ++local_got, ++lgot_masks) | ||
3367 | + { | ||
3368 | + if (*local_got > 0) | ||
3369 | + { | ||
3370 | + unsigned int need = 0; | ||
3371 | + if ((*lgot_masks & TLS_TLS) != 0) | ||
3372 | + { | ||
3373 | + if ((*lgot_masks & TLS_GD) != 0) | ||
3374 | + need += 8; | ||
3375 | + if ((*lgot_masks & TLS_LD) != 0) | ||
3376 | + htab->tlsld_got.refcount += 1; | ||
3377 | + } | ||
3378 | + else | ||
3379 | + need += 4; | ||
3380 | + | ||
3381 | + if (need == 0) | ||
3382 | + { | ||
3383 | + *local_got = (bfd_vma) -1; | ||
3384 | + } | ||
3385 | + else | ||
3386 | + { | ||
3387 | + *local_got = s->size; | ||
3388 | + s->size += need; | ||
3389 | + if (bfd_link_pic (info)) | ||
3390 | + srel->size += need * (sizeof (Elf64_External_Rela) / 4); | ||
3391 | + } | ||
3392 | + } | ||
3393 | + else | ||
3394 | + *local_got = (bfd_vma) -1; | ||
3395 | + } | ||
3396 | + } | ||
3397 | + | ||
3398 | + /* Allocate global sym .plt and .got entries, and space for global | ||
3399 | + sym dynamic relocs. */ | ||
3400 | + elf_link_hash_traverse (elf_hash_table (info), allocate_dynrelocs, info); | ||
3401 | + | ||
3402 | + if (htab->tlsld_got.refcount > 0) | ||
3403 | + { | ||
3404 | + htab->tlsld_got.offset = htab->elf.sgot->size; | ||
3405 | + htab->elf.sgot->size += 8; | ||
3406 | + if (bfd_link_pic (info)) | ||
3407 | + htab->elf.srelgot->size += sizeof (Elf64_External_Rela); | ||
3408 | + } | ||
3409 | + else | ||
3410 | + htab->tlsld_got.offset = (bfd_vma) -1; | ||
3411 | + | ||
3412 | + if (elf_hash_table (info)->dynamic_sections_created) | ||
3413 | + { | ||
3414 | + /* Make space for the trailing nop in .plt. */ | ||
3415 | + if (htab->elf.splt->size > 0) | ||
3416 | + htab->elf.splt->size += 4; | ||
3417 | + } | ||
3418 | + | ||
3419 | + /* The check_relocs and adjust_dynamic_symbol entry points have | ||
3420 | + determined the sizes of the various dynamic sections. Allocate | ||
3421 | + memory for them. */ | ||
3422 | + for (s = dynobj->sections; s != NULL; s = s->next) | ||
3423 | + { | ||
3424 | + const char *name; | ||
3425 | + bool strip = false; | ||
3426 | + | ||
3427 | + if ((s->flags & SEC_LINKER_CREATED) == 0) | ||
3428 | + continue; | ||
3429 | + | ||
3430 | + /* It's OK to base decisions on the section name, because none | ||
3431 | + of the dynobj section names depend upon the input files. */ | ||
3432 | + name = bfd_section_name (s); | ||
3433 | + | ||
3434 | + if (startswith (name, ".rela")) | ||
3435 | + { | ||
3436 | + if (s->size == 0) | ||
3437 | + { | ||
3438 | + /* If we don't need this section, strip it from the | ||
3439 | + output file. This is to handle .rela.bss and | ||
3440 | + .rela.plt. We must create it in | ||
3441 | + create_dynamic_sections, because it must be created | ||
3442 | + before the linker maps input sections to output | ||
3443 | + sections. The linker does that before | ||
3444 | + adjust_dynamic_symbol is called, and it is that | ||
3445 | + function which decides whether anything needs to go | ||
3446 | + into these sections. */ | ||
3447 | + strip = true; | ||
3448 | + } | ||
3449 | + else | ||
3450 | + { | ||
3451 | + /* We use the reloc_count field as a counter if we need | ||
3452 | + to copy relocs into the output file. */ | ||
3453 | + s->reloc_count = 0; | ||
3454 | + } | ||
3455 | + } | ||
3456 | + else if (s != htab->elf.splt | ||
3457 | + && s != htab->elf.sgot | ||
3458 | + && s != htab->elf.sgotplt | ||
3459 | + && s != htab->elf.sdynbss | ||
3460 | + && s != htab->elf.sdynrelro) | ||
3461 | + { | ||
3462 | + /* It's not one of our sections, so don't allocate space. */ | ||
3463 | + continue; | ||
3464 | + } | ||
3465 | + | ||
3466 | + if (strip) | ||
3467 | + { | ||
3468 | + s->flags |= SEC_EXCLUDE; | ||
3469 | + continue; | ||
3470 | + } | ||
3471 | + | ||
3472 | + /* Allocate memory for the section contents. */ | ||
3473 | + /* FIXME: This should be a call to bfd_alloc not bfd_zalloc. | ||
3474 | + Unused entries should be reclaimed before the section's contents | ||
3475 | + are written out, but at the moment this does not happen. Thus in | ||
3476 | + order to prevent writing out garbage, we initialise the section's | ||
3477 | + contents to zero. */ | ||
3478 | + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); | ||
3479 | + if (s->contents == NULL && s->size != 0) | ||
3480 | + return false; | ||
3481 | + } | ||
3482 | + | ||
3483 | + /* ??? Force DF_BIND_NOW? */ | ||
3484 | + info->flags |= DF_BIND_NOW; | ||
3485 | + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); | ||
3486 | +} | ||
3487 | + | ||
3488 | +/* Finish up dynamic symbol handling. We set the contents of various | ||
3489 | + dynamic sections here. */ | ||
3490 | + | ||
3491 | +static bool | ||
3492 | +microblaze_elf_finish_dynamic_symbol (bfd *output_bfd, | ||
3493 | + struct bfd_link_info *info, | ||
3494 | + struct elf_link_hash_entry *h, | ||
3495 | + Elf_Internal_Sym *sym) | ||
3496 | +{ | ||
3497 | + struct elf64_mb_link_hash_table *htab; | ||
3498 | + struct elf64_mb_link_hash_entry *eh = elf64_mb_hash_entry(h); | ||
3499 | + | ||
3500 | + htab = elf64_mb_hash_table (info); | ||
3501 | + if (htab == NULL) | ||
3502 | + return false; | ||
3503 | + | ||
3504 | + if (h->plt.offset != (bfd_vma) -1) | ||
3505 | + { | ||
3506 | + asection *splt; | ||
3507 | + asection *srela; | ||
3508 | + asection *sgotplt; | ||
3509 | + Elf_Internal_Rela rela; | ||
3510 | + bfd_byte *loc; | ||
3511 | + bfd_vma plt_index; | ||
3512 | + bfd_vma got_offset; | ||
3513 | + bfd_vma got_addr; | ||
3514 | + | ||
3515 | + /* This symbol has an entry in the procedure linkage table. Set | ||
3516 | + it up. */ | ||
3517 | + BFD_ASSERT (h->dynindx != -1); | ||
3518 | + | ||
3519 | + splt = htab->elf.splt; | ||
3520 | + srela = htab->elf.srelplt; | ||
3521 | + sgotplt = htab->elf.sgotplt; | ||
3522 | + BFD_ASSERT (splt != NULL && srela != NULL && sgotplt != NULL); | ||
3523 | + | ||
3524 | + plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; /* first entry reserved. */ | ||
3525 | + got_offset = (plt_index + 3) * 4; /* 3 reserved ??? */ | ||
3526 | + got_addr = got_offset; | ||
3527 | + | ||
3528 | + /* For non-PIC objects we need absolute address of the GOT entry. */ | ||
3529 | + if (!bfd_link_pic (info)) | ||
3530 | + got_addr += sgotplt->output_section->vma + sgotplt->output_offset; | ||
3531 | + | ||
3532 | + /* Fill in the entry in the procedure linkage table. */ | ||
3533 | + bfd_put_32 (output_bfd, PLT_ENTRY_WORD_0 + ((got_addr >> 16) & 0xffff), | ||
3534 | + splt->contents + h->plt.offset); | ||
3535 | + if (bfd_link_pic (info)) | ||
3536 | + bfd_put_32 (output_bfd, PLT_ENTRY_WORD_1 + (got_addr & 0xffff), | ||
3537 | + splt->contents + h->plt.offset + 4); | ||
3538 | + else | ||
3539 | + bfd_put_32 (output_bfd, PLT_ENTRY_WORD_1_NOPIC + (got_addr & 0xffff), | ||
3540 | + splt->contents + h->plt.offset + 4); | ||
3541 | + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD_2, | ||
3542 | + splt->contents + h->plt.offset + 8); | ||
3543 | + bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD_3, | ||
3544 | + splt->contents + h->plt.offset + 12); | ||
3545 | + | ||
3546 | + /* Any additions to the .got section??? */ | ||
3547 | + /* bfd_put_32 (output_bfd, | ||
3548 | + splt->output_section->vma + splt->output_offset + h->plt.offset + 4, | ||
3549 | + sgotplt->contents + got_offset); */ | ||
3550 | + | ||
3551 | + /* Fill in the entry in the .rela.plt section. */ | ||
3552 | + rela.r_offset = (sgotplt->output_section->vma | ||
3553 | + + sgotplt->output_offset | ||
3554 | + + got_offset); | ||
3555 | + rela.r_info = ELF64_R_INFO (h->dynindx, R_MICROBLAZE_JUMP_SLOT); | ||
3556 | + rela.r_addend = 0; | ||
3557 | + loc = srela->contents; | ||
3558 | + loc += plt_index * sizeof (Elf64_External_Rela); | ||
3559 | + bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); | ||
3560 | + | ||
3561 | + if (!h->def_regular) | ||
3562 | + { | ||
3563 | + /* Mark the symbol as undefined, rather than as defined in | ||
3564 | + the .plt section. Zero the value. */ | ||
3565 | + sym->st_shndx = SHN_UNDEF; | ||
3566 | + sym->st_value = 0; | ||
3567 | + } | ||
3568 | + } | ||
3569 | + | ||
3570 | + /* h->got.refcount to be checked ? */ | ||
3571 | + if (h->got.offset != (bfd_vma) -1 && | ||
3572 | + ! ((h->got.offset & 1) || | ||
3573 | + IS_TLS_LD(eh->tls_mask) || IS_TLS_GD(eh->tls_mask))) | ||
3574 | + { | ||
3575 | + asection *sgot; | ||
3576 | + asection *srela; | ||
3577 | + bfd_vma offset; | ||
3578 | + | ||
3579 | + /* This symbol has an entry in the global offset table. Set it | ||
3580 | + up. */ | ||
3581 | + | ||
3582 | + sgot = htab->elf.sgot; | ||
3583 | + srela = htab->elf.srelgot; | ||
3584 | + BFD_ASSERT (sgot != NULL && srela != NULL); | ||
3585 | + | ||
3586 | + offset = (sgot->output_section->vma + sgot->output_offset | ||
3587 | + + (h->got.offset &~ (bfd_vma) 1)); | ||
3588 | + | ||
3589 | + /* If this is a -Bsymbolic link, and the symbol is defined | ||
3590 | + locally, we just want to emit a RELATIVE reloc. Likewise if | ||
3591 | + the symbol was forced to be local because of a version file. | ||
3592 | + The entry in the global offset table will already have been | ||
3593 | + initialized in the relocate_section function. */ | ||
3594 | + if (bfd_link_pic (info) | ||
3595 | + && ((info->symbolic && h->def_regular) | ||
3596 | + || h->dynindx == -1)) | ||
3597 | + { | ||
3598 | + asection *sec = h->root.u.def.section; | ||
3599 | + bfd_vma value; | ||
3600 | + | ||
3601 | + value = h->root.u.def.value; | ||
3602 | + if (sec->output_section != NULL) | ||
3603 | + /* PR 21180: If the output section is NULL, then the symbol is no | ||
3604 | + longer needed, and in theory the GOT entry is redundant. But | ||
3605 | + it is too late to change our minds now... */ | ||
3606 | + value += sec->output_section->vma + sec->output_offset; | ||
3607 | + | ||
3608 | + microblaze_elf_output_dynamic_relocation (output_bfd, | ||
3609 | + srela, srela->reloc_count++, | ||
3610 | + /* symindex= */ 0, | ||
3611 | + R_MICROBLAZE_REL, offset, | ||
3612 | + value); | ||
3613 | + } | ||
3614 | + else | ||
3615 | + { | ||
3616 | + microblaze_elf_output_dynamic_relocation (output_bfd, | ||
3617 | + srela, srela->reloc_count++, | ||
3618 | + h->dynindx, | ||
3619 | + R_MICROBLAZE_GLOB_DAT, | ||
3620 | + offset, 0); | ||
3621 | + } | ||
3622 | + | ||
3623 | + bfd_put_32 (output_bfd, (bfd_vma) 0, | ||
3624 | + sgot->contents + (h->got.offset &~ (bfd_vma) 1)); | ||
3625 | + } | ||
3626 | + | ||
3627 | + if (h->needs_copy) | ||
3628 | + { | ||
3629 | + asection *s; | ||
3630 | + Elf_Internal_Rela rela; | ||
3631 | + bfd_byte *loc; | ||
3632 | + | ||
3633 | + /* This symbols needs a copy reloc. Set it up. */ | ||
3634 | + | ||
3635 | + BFD_ASSERT (h->dynindx != -1); | ||
3636 | + | ||
3637 | + rela.r_offset = (h->root.u.def.value | ||
3638 | + + h->root.u.def.section->output_section->vma | ||
3639 | + + h->root.u.def.section->output_offset); | ||
3640 | + rela.r_info = ELF64_R_INFO (h->dynindx, R_MICROBLAZE_COPY); | ||
3641 | + rela.r_addend = 0; | ||
3642 | + if (h->root.u.def.section == htab->elf.sdynrelro) | ||
3643 | + s = htab->elf.sreldynrelro; | ||
3644 | + else | ||
3645 | + s = htab->elf.srelbss; | ||
3646 | + loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela); | ||
3647 | + bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); | ||
3648 | + } | ||
3649 | + | ||
3650 | + /* Mark some specially defined symbols as absolute. */ | ||
3651 | + if (h == htab->elf.hdynamic | ||
3652 | + || h == htab->elf.hgot | ||
3653 | + || h == htab->elf.hplt) | ||
3654 | + sym->st_shndx = SHN_ABS; | ||
3655 | + | ||
3656 | + return true; | ||
3657 | +} | ||
3658 | + | ||
3659 | + | ||
3660 | +/* Finish up the dynamic sections. */ | ||
3661 | + | ||
3662 | +static bool | ||
3663 | +microblaze_elf_finish_dynamic_sections (bfd *output_bfd, | ||
3664 | + struct bfd_link_info *info) | ||
3665 | +{ | ||
3666 | + bfd *dynobj; | ||
3667 | + asection *sdyn, *sgot; | ||
3668 | + struct elf64_mb_link_hash_table *htab; | ||
3669 | + | ||
3670 | + htab = elf64_mb_hash_table (info); | ||
3671 | + if (htab == NULL) | ||
3672 | + return false; | ||
3673 | + | ||
3674 | + dynobj = htab->elf.dynobj; | ||
3675 | + | ||
3676 | + sdyn = bfd_get_linker_section (dynobj, ".dynamic"); | ||
3677 | + | ||
3678 | + if (htab->elf.dynamic_sections_created) | ||
3679 | + { | ||
3680 | + asection *splt; | ||
3681 | + Elf64_External_Dyn *dyncon, *dynconend; | ||
3682 | + | ||
3683 | + dyncon = (Elf64_External_Dyn *) sdyn->contents; | ||
3684 | + dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size); | ||
3685 | + for (; dyncon < dynconend; dyncon++) | ||
3686 | + { | ||
3687 | + Elf_Internal_Dyn dyn; | ||
3688 | + asection *s; | ||
3689 | + bool size; | ||
3690 | + | ||
3691 | + bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn); | ||
3692 | + | ||
3693 | + switch (dyn.d_tag) | ||
3694 | + { | ||
3695 | + case DT_PLTGOT: | ||
3696 | + s = htab->elf.sgotplt; | ||
3697 | + size = false; | ||
3698 | + break; | ||
3699 | + | ||
3700 | + case DT_PLTRELSZ: | ||
3701 | + s = htab->elf.srelplt; | ||
3702 | + size = true; | ||
3703 | + break; | ||
3704 | + | ||
3705 | + case DT_JMPREL: | ||
3706 | + s = htab->elf.srelplt; | ||
3707 | + size = false; | ||
3708 | + break; | ||
3709 | + | ||
3710 | + default: | ||
3711 | + continue; | ||
3712 | + } | ||
3713 | + | ||
3714 | + if (s == NULL) | ||
3715 | + dyn.d_un.d_val = 0; | ||
3716 | + else | ||
3717 | + { | ||
3718 | + if (!size) | ||
3719 | + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; | ||
3720 | + else | ||
3721 | + dyn.d_un.d_val = s->size; | ||
3722 | + } | ||
3723 | + bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); | ||
3724 | + } | ||
3725 | + | ||
3726 | + splt = htab->elf.splt; | ||
3727 | + BFD_ASSERT (splt != NULL && sdyn != NULL); | ||
3728 | + | ||
3729 | + /* Clear the first entry in the procedure linkage table, | ||
3730 | + and put a nop in the last four bytes. */ | ||
3731 | + if (splt->size > 0) | ||
3732 | + { | ||
3733 | + memset (splt->contents, 0, PLT_ENTRY_SIZE); | ||
3734 | + bfd_put_32 (output_bfd, (bfd_vma) 0x80000000 /* nop. */, | ||
3735 | + splt->contents + splt->size - 4); | ||
3736 | + | ||
3737 | + if (splt->output_section != bfd_abs_section_ptr) | ||
3738 | + elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4; | ||
3739 | + } | ||
3740 | + } | ||
3741 | + | ||
3742 | + /* Set the first entry in the global offset table to the address of | ||
3743 | + the dynamic section. */ | ||
3744 | + sgot = htab->elf.sgotplt; | ||
3745 | + if (sgot && sgot->size > 0) | ||
3746 | + { | ||
3747 | + if (sdyn == NULL) | ||
3748 | + bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents); | ||
3749 | + else | ||
3750 | + bfd_put_32 (output_bfd, | ||
3751 | + sdyn->output_section->vma + sdyn->output_offset, | ||
3752 | + sgot->contents); | ||
3753 | + elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; | ||
3754 | + } | ||
3755 | + | ||
3756 | + if (htab->elf.sgot && htab->elf.sgot->size > 0) | ||
3757 | + elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4; | ||
3758 | + | ||
3759 | + return true; | ||
3760 | +} | ||
3761 | + | ||
3762 | +/* Hook called by the linker routine which adds symbols from an object | ||
3763 | + file. We use it to put .comm items in .sbss, and not .bss. */ | ||
3764 | + | ||
3765 | +static bool | ||
3766 | +microblaze_elf_add_symbol_hook (bfd *abfd, | ||
3767 | + struct bfd_link_info *info, | ||
3768 | + Elf_Internal_Sym *sym, | ||
3769 | + const char **namep ATTRIBUTE_UNUSED, | ||
3770 | + flagword *flagsp ATTRIBUTE_UNUSED, | ||
3771 | + asection **secp, | ||
3772 | + bfd_vma *valp) | ||
3773 | +{ | ||
3774 | + if (sym->st_shndx == SHN_COMMON | ||
3775 | + && !bfd_link_relocatable (info) | ||
3776 | + && sym->st_size <= elf_gp_size (abfd)) | ||
3777 | + { | ||
3778 | + /* Common symbols less than or equal to -G nn bytes are automatically | ||
3779 | + put into .sbss. */ | ||
3780 | + *secp = bfd_make_section_old_way (abfd, ".sbss"); | ||
3781 | + if (*secp == NULL | ||
3782 | + || !bfd_set_section_flags (*secp, SEC_IS_COMMON | SEC_SMALL_DATA)) | ||
3783 | + return false; | ||
3784 | + | ||
3785 | + *valp = sym->st_size; | ||
3786 | + } | ||
3787 | + | ||
3788 | + return true; | ||
3789 | +} | ||
3790 | + | ||
3791 | +#define TARGET_LITTLE_SYM microblaze_elf64_le_vec | ||
3792 | +#define TARGET_LITTLE_NAME "elf64-microblazeel" | ||
3793 | + | ||
3794 | +#define TARGET_BIG_SYM microblaze_elf64_vec | ||
3795 | +#define TARGET_BIG_NAME "elf64-microblaze" | ||
3796 | + | ||
3797 | +#define ELF_ARCH bfd_arch_microblaze | ||
3798 | +#define ELF_TARGET_ID MICROBLAZE_ELF_DATA | ||
3799 | +#define ELF_MACHINE_CODE EM_MICROBLAZE | ||
3800 | +#define ELF_MACHINE_ALT1 EM_MICROBLAZE_OLD | ||
3801 | +#define ELF_MAXPAGESIZE 0x1000 | ||
3802 | +#define elf_info_to_howto microblaze_elf_info_to_howto | ||
3803 | +#define elf_info_to_howto_rel NULL | ||
3804 | + | ||
3805 | +#define bfd_elf64_bfd_reloc_type_lookup microblaze_elf_reloc_type_lookup | ||
3806 | +#define bfd_elf64_bfd_is_local_label_name microblaze_elf_is_local_label_name | ||
3807 | +#define bfd_elf64_new_section_hook microblaze_elf_new_section_hook | ||
3808 | +#define elf_backend_relocate_section microblaze_elf_relocate_section | ||
3809 | +#define bfd_elf64_bfd_relax_section microblaze_elf_relax_section | ||
3810 | +#define bfd_elf64_bfd_merge_private_bfd_data microblaze_elf_merge_private_bfd_data | ||
3811 | +#define bfd_elf64_bfd_reloc_name_lookup microblaze_elf_reloc_name_lookup | ||
3812 | + | ||
3813 | +#define elf_backend_gc_mark_hook microblaze_elf_gc_mark_hook | ||
3814 | +#define elf_backend_gc_sweep_hook microblaze_elf_gc_sweep_hook | ||
3815 | +#define elf_backend_check_relocs microblaze_elf_check_relocs | ||
3816 | +#define elf_backend_copy_indirect_symbol microblaze_elf_copy_indirect_symbol | ||
3817 | +#define bfd_elf64_bfd_link_hash_table_create microblaze_elf_link_hash_table_create | ||
3818 | +#define elf_backend_can_gc_sections 1 | ||
3819 | +#define elf_backend_can_refcount 1 | ||
3820 | +#define elf_backend_want_got_plt 1 | ||
3821 | +#define elf_backend_plt_readonly 1 | ||
3822 | +#define elf_backend_got_header_size 12 | ||
3823 | +#define elf_backend_want_dynrelro 1 | ||
3824 | +#define elf_backend_rela_normal 1 | ||
3825 | +#define elf_backend_dtrel_excludes_plt 1 | ||
3826 | + | ||
3827 | +#define elf_backend_adjust_dynamic_symbol microblaze_elf_adjust_dynamic_symbol | ||
3828 | +#define elf_backend_create_dynamic_sections microblaze_elf_create_dynamic_sections | ||
3829 | +#define elf_backend_finish_dynamic_sections microblaze_elf_finish_dynamic_sections | ||
3830 | +#define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol | ||
3831 | +#define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections | ||
3832 | +#define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook | ||
3833 | + | ||
3834 | +#include "elf64-target.h" | ||
3835 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
3836 | index 9450882e850..f265e8fc608 100644 | ||
3837 | --- a/gdb/microblaze-tdep.c | ||
3838 | +++ b/gdb/microblaze-tdep.c | ||
3839 | @@ -65,8 +65,95 @@ | ||
3840 | #define IS_SAVE_HIDDEN_PTR(op, rd, ra, rb) \ | ||
3841 | ((op == add || op == addik) && ra == MICROBLAZE_FIRST_ARGREG && rb == 0) | ||
3842 | |||
3843 | +static const char *microblaze_abi_string; | ||
3844 | + | ||
3845 | +static const char *const microblaze_abi_strings[] = { | ||
3846 | + "auto", | ||
3847 | + "m64", | ||
3848 | +}; | ||
3849 | + | ||
3850 | +enum microblaze_abi | ||
3851 | +microblaze_abi (struct gdbarch *gdbarch) | ||
3852 | +{ | ||
3853 | + microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
3854 | + return tdep->microblaze_abi; | ||
3855 | +} | ||
3856 | /* The registers of the Xilinx microblaze processor. */ | ||
3857 | |||
3858 | + static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
3859 | + static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
3860 | + | ||
3861 | +static void | ||
3862 | +microblaze_abi_update (const char *ignore_args, | ||
3863 | + int from_tty, struct cmd_list_element *c) | ||
3864 | +{ | ||
3865 | + struct gdbarch_info info; | ||
3866 | + | ||
3867 | + /* Force the architecture to update, and (if it's a microblaze architecture) | ||
3868 | + * microblaze_gdbarch_init will take care of the rest. */ | ||
3869 | +// gdbarch_info_init (&info); | ||
3870 | + gdbarch_update_p (info); | ||
3871 | +} | ||
3872 | + | ||
3873 | + | ||
3874 | +static enum microblaze_abi | ||
3875 | +global_microblaze_abi (void) | ||
3876 | +{ | ||
3877 | + int i; | ||
3878 | + | ||
3879 | + for (i = 0; microblaze_abi_strings[i] != NULL; i++) | ||
3880 | + if (microblaze_abi_strings[i] == microblaze_abi_string) | ||
3881 | + return (enum microblaze_abi) i; | ||
3882 | + | ||
3883 | +// internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
3884 | +} | ||
3885 | + | ||
3886 | +static void | ||
3887 | +show_microblaze_abi (struct ui_file *file, | ||
3888 | + int from_tty, | ||
3889 | + struct cmd_list_element *ignored_cmd, | ||
3890 | + const char *ignored_value) | ||
3891 | +{ | ||
3892 | + enum microblaze_abi global_abi = global_microblaze_abi (); | ||
3893 | + enum microblaze_abi actual_abi = microblaze_abi (target_gdbarch ()); | ||
3894 | + const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
3895 | + | ||
3896 | +#if 1 | ||
3897 | + if (global_abi == MICROBLAZE_ABI_AUTO) | ||
3898 | + fprintf_filtered | ||
3899 | + (file, | ||
3900 | + "The microblaze ABI is set automatically (currently \"%s\").\n", | ||
3901 | + actual_abi_str); | ||
3902 | + else if (global_abi == actual_abi) | ||
3903 | + fprintf_filtered | ||
3904 | + (file, | ||
3905 | + "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", | ||
3906 | + actual_abi_str); | ||
3907 | + else | ||
3908 | + { | ||
3909 | +#endif | ||
3910 | + /* Probably shouldn't happen... */ | ||
3911 | + fprintf_filtered (file, | ||
3912 | + "The (auto detected) microblaze ABI \"%s\" is in use " | ||
3913 | + "even though the user setting was \"%s\".\n", | ||
3914 | + actual_abi_str, microblaze_abi_strings[global_abi]); | ||
3915 | + } | ||
3916 | +} | ||
3917 | + | ||
3918 | +static void | ||
3919 | +show_microblaze_command (const char *args, int from_tty) | ||
3920 | +{ | ||
3921 | + help_list (showmicroblazecmdlist, "show microblaze ", all_commands, gdb_stdout); | ||
3922 | +} | ||
3923 | + | ||
3924 | +static void | ||
3925 | +set_microblaze_command (const char *args, int from_tty) | ||
3926 | +{ | ||
3927 | + printf_unfiltered | ||
3928 | + ("\"set microblaze\" must be followed by an appropriate subcommand.\n"); | ||
3929 | + help_list (setmicroblazecmdlist, "set microblaze ", all_commands, gdb_stdout); | ||
3930 | +} | ||
3931 | + | ||
3932 | static const char * const microblaze_register_names[] = | ||
3933 | { | ||
3934 | "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", | ||
3935 | @@ -85,9 +172,21 @@ static const char * const microblaze_register_names[] = | ||
3936 | static unsigned int microblaze_debug_flag = 0; | ||
3937 | int reg_size = 4; | ||
3938 | |||
3939 | +unsigned int | ||
3940 | +microblaze_abi_regsize (struct gdbarch *gdbarch) | ||
3941 | +{ | ||
3942 | + switch (microblaze_abi (gdbarch)) | ||
3943 | + { | ||
3944 | + case MICROBLAZE_ABI_M64: | ||
3945 | + return 8; | ||
3946 | + default: | ||
3947 | + return 4; | ||
3948 | + } | ||
3949 | +} | ||
3950 | + | ||
3951 | #define microblaze_debug(fmt, ...) \ | ||
3952 | debug_prefixed_printf_cond_nofunc (microblaze_debug_flag, "MICROBLAZE", \ | ||
3953 | - fmt, ## __VA_ARGS__) | ||
3954 | + fmt, ## __VA_ARGS__) | ||
3955 | |||
3956 | |||
3957 | /* Return the name of register REGNUM. */ | ||
3958 | @@ -867,15 +966,30 @@ static struct gdbarch * | ||
3959 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
3960 | { | ||
3961 | tdesc_arch_data_up tdesc_data; | ||
3962 | + enum microblaze_abi microblaze_abi, found_abi, wanted_abi; | ||
3963 | const struct target_desc *tdesc = info.target_desc; | ||
3964 | |||
3965 | + /* What has the user specified from the command line? */ | ||
3966 | + wanted_abi = global_microblaze_abi (); | ||
3967 | + if (gdbarch_debug) | ||
3968 | + fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
3969 | + wanted_abi); | ||
3970 | + if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
3971 | + microblaze_abi = wanted_abi; | ||
3972 | + | ||
3973 | /* If there is already a candidate, use it. */ | ||
3974 | arches = gdbarch_list_lookup_by_info (arches, &info); | ||
3975 | - if (arches != NULL) | ||
3976 | + if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
3977 | return arches->gdbarch; | ||
3978 | + | ||
3979 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
3980 | + { | ||
3981 | + tdesc = tdesc_microblaze64; | ||
3982 | + reg_size = 8; | ||
3983 | + } | ||
3984 | if (tdesc == NULL) | ||
3985 | { | ||
3986 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
3987 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
3988 | { | ||
3989 | tdesc = tdesc_microblaze64; | ||
3990 | reg_size = 8; | ||
3991 | @@ -890,7 +1004,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
3992 | int valid_p; | ||
3993 | int i; | ||
3994 | |||
3995 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
3996 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
3997 | feature = tdesc_find_feature (tdesc, | ||
3998 | "org.gnu.gdb.microblaze64.core"); | ||
3999 | else | ||
4000 | @@ -904,7 +1018,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
4001 | for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
4002 | valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
4003 | microblaze_register_names[i]); | ||
4004 | - if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
4005 | + if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
4006 | feature = tdesc_find_feature (tdesc, | ||
4007 | "org.gnu.gdb.microblaze64.stack-protect"); | ||
4008 | else | ||
4009 | @@ -954,7 +1068,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
4010 | set_gdbarch_ptr_bit (gdbarch, 64); | ||
4011 | break; | ||
4012 | } | ||
4013 | - | ||
4014 | + if(microblaze_abi == MICROBLAZE_ABI_M64) | ||
4015 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
4016 | |||
4017 | /* Map Dwarf2 registers to GDB registers. */ | ||
4018 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
4019 | @@ -1014,6 +1129,38 @@ _initialize_microblaze_tdep () | ||
4020 | { | ||
4021 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
4022 | |||
4023 | +// static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
4024 | +// static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
4025 | + | ||
4026 | + /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
4027 | + | ||
4028 | + add_setshow_prefix_cmd ("microblaze", no_class, | ||
4029 | + _("Various microblaze specific commands."), | ||
4030 | + _("Various microblaze specific commands."), | ||
4031 | + &setmicroblazecmdlist,&showmicroblazecmdlist, | ||
4032 | + &setlist,&showlist); | ||
4033 | +#if 0 | ||
4034 | + add_prefix_cmd ("microblaze", no_class, set_microblaze_command, | ||
4035 | + _("Various microblaze specific commands."), | ||
4036 | + &setmicroblazecmdlist, "set microblaze ", 0, &setlist); | ||
4037 | + | ||
4038 | + add_prefix_cmd ("microblaze", no_class, show_microblaze_command, | ||
4039 | + _("Various microblaze specific commands."), | ||
4040 | + &showmicroblazecmdlist, "show microblaze ", 0, &showlist); | ||
4041 | +#endif | ||
4042 | + | ||
4043 | + /* Allow the user to override the ABI. */ | ||
4044 | + add_setshow_enum_cmd ("abi", class_obscure, microblaze_abi_strings, | ||
4045 | + µblaze_abi_string, _("\ | ||
4046 | +Set the microblaze ABI used by this program."), _("\ | ||
4047 | +Show the microblaze ABI used by this program."), _("\ | ||
4048 | +This option can be set to one of:\n\ | ||
4049 | + auto - the default ABI associated with the current binary\n\ | ||
4050 | + m64"), | ||
4051 | + microblaze_abi_update, | ||
4052 | + show_microblaze_abi, | ||
4053 | + &setmicroblazecmdlist, &showmicroblazecmdlist); | ||
4054 | + | ||
4055 | initialize_tdesc_microblaze_with_stack_protect (); | ||
4056 | initialize_tdesc_microblaze (); | ||
4057 | initialize_tdesc_microblaze64_with_stack_protect (); | ||
4058 | @@ -1028,5 +1175,4 @@ When non-zero, microblaze specific debugging is enabled."), | ||
4059 | NULL, | ||
4060 | &setdebuglist, &showdebuglist); | ||
4061 | |||
4062 | - | ||
4063 | } | ||
4064 | diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h | ||
4065 | index 542cdd82070..17a4bb5190c 100644 | ||
4066 | --- a/gdb/microblaze-tdep.h | ||
4067 | +++ b/gdb/microblaze-tdep.h | ||
4068 | @@ -19,9 +19,17 @@ | ||
4069 | |||
4070 | #ifndef MICROBLAZE_TDEP_H | ||
4071 | #define MICROBLAZE_TDEP_H 1 | ||
4072 | - | ||
4073 | +#include "objfiles.h" | ||
4074 | #include "gdbarch.h" | ||
4075 | |||
4076 | +struct gdbarch; | ||
4077 | +enum microblaze_abi | ||
4078 | + { | ||
4079 | + MICROBLAZE_ABI_AUTO = 0, | ||
4080 | + MICROBLAZE_ABI_M64, | ||
4081 | + }; | ||
4082 | + | ||
4083 | +enum microblaze_abi microblaze_abi (struct gdbarch *gdbarch); | ||
4084 | /* Microblaze architecture-specific information. */ | ||
4085 | struct microblaze_gregset | ||
4086 | { | ||
4087 | @@ -35,11 +43,14 @@ struct microblaze_gdbarch_tdep : gdbarch_tdep_base | ||
4088 | { | ||
4089 | int dummy; // declare something. | ||
4090 | |||
4091 | + enum microblaze_abi microblaze_abi {}; | ||
4092 | + enum microblaze_abi found_abi {}; | ||
4093 | /* Register sets. */ | ||
4094 | struct regset *gregset; | ||
4095 | size_t sizeof_gregset; | ||
4096 | struct regset *fpregset; | ||
4097 | size_t sizeof_fpregset; | ||
4098 | + int register_size; | ||
4099 | }; | ||
4100 | |||
4101 | /* Register numbers. */ | ||
4102 | -- | ||
4103 | 2.34.1 | ||
4104 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch deleted file mode 100644 index 3e293276..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 48906e1038e469b429aa35d0f967730a929c3880 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 15 Jan 2023 00:16:25 -0800 | ||
4 | Subject: [PATCH 8/8] Define alignof using _Alignof when using C11 or newer | ||
5 | |||
6 | WG14 N2350 made very clear that it is an UB having type definitions | ||
7 | within "offsetof" [1]. This patch enhances the implementation of macro | ||
8 | alignof_slot to use builtin "_Alignof" to avoid undefined behavior on | ||
9 | when using std=c11 or newer | ||
10 | |||
11 | clang 16+ has started to flag this [2] | ||
12 | |||
13 | Fixes build when using -std >= gnu11 and using clang16+ | ||
14 | |||
15 | Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it | ||
16 | may support C11, exclude those compilers too | ||
17 | |||
18 | gnulib needs this fix and then it will be applied to downstream packages | ||
19 | like gdb [3] | ||
20 | |||
21 | [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm | ||
22 | [2] https://reviews.llvm.org/D133574 | ||
23 | [3] https://public-inbox.org/bug-gnulib/20230114232744.215167-1-raj.khem@gmail.com/T/#u | ||
24 | |||
25 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d404c7dd974cc65f894526f4a1b76bc1dcd8d82] | ||
26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
27 | --- | ||
28 | libiberty/sha1.c | 10 ++++++++++ | ||
29 | 1 file changed, 10 insertions(+) | ||
30 | |||
31 | diff --git a/libiberty/sha1.c b/libiberty/sha1.c | ||
32 | index 504f06d3b9b..790ada82443 100644 | ||
33 | --- a/libiberty/sha1.c | ||
34 | +++ b/libiberty/sha1.c | ||
35 | @@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) | ||
36 | if (len >= 64) | ||
37 | { | ||
38 | #if !_STRING_ARCH_unaligned | ||
39 | +/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 | ||
40 | + <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. | ||
41 | + clang versions < 8.0.0 have the same bug. */ | ||
42 | +#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ | ||
43 | + || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ | ||
44 | + && !defined __clang__) \ | ||
45 | + || (defined __clang__ && __clang_major__ < 8)) | ||
46 | # define alignof(type) offsetof (struct { char c; type x; }, x) | ||
47 | +#else | ||
48 | +# define alignof(type) _Alignof(type) | ||
49 | +#endif | ||
50 | # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0) | ||
51 | if (UNALIGNED_P (buffer)) | ||
52 | while (len > 64) | ||
53 | -- | ||
54 | 2.39.0 | ||
55 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch deleted file mode 100644 index ed1310ce..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 5bdd15553daef7370ca3c1f12d8f14247fdd4907 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yousong Zhou <yszhou4tech@gmail.com> | ||
3 | Date: Fri, 24 Mar 2017 10:36:03 +0800 | ||
4 | Subject: [PATCH 8/9] Fix invalid sigprocmask call | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | The POSIX document says | ||
10 | |||
11 | The pthread_sigmask() and sigprocmask() functions shall fail if: | ||
12 | |||
13 | [EINVAL] | ||
14 | The value of the how argument is not equal to one of the defined values. | ||
15 | |||
16 | and this is how musl-libc is currently doing. Fix the call to be safe | ||
17 | and correct | ||
18 | |||
19 | [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_sigmask.html | ||
20 | |||
21 | gdb/ChangeLog: | ||
22 | 2017-03-24 Yousong Zhou <yszhou4tech@gmail.com> | ||
23 | |||
24 | * common/signals-state-save-restore.c (save_original_signals_state): | ||
25 | Fix invalid sigprocmask call. | ||
26 | |||
27 | Upstream-Status: Pending [not author, cherry-picked from LEDE https://bugs.lede-project.org/index.php?do=details&task_id=637&openedfrom=-1%2Bweek] | ||
28 | Signed-off-by: André Draszik <adraszik@tycoint.com> | ||
29 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
30 | --- | ||
31 | gdbsupport/signals-state-save-restore.cc | 2 +- | ||
32 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
33 | |||
34 | diff --git a/gdbsupport/signals-state-save-restore.cc b/gdbsupport/signals-state-save-restore.cc | ||
35 | index 92e799d3551..a4a0234272a 100644 | ||
36 | --- a/gdbsupport/signals-state-save-restore.cc | ||
37 | +++ b/gdbsupport/signals-state-save-restore.cc | ||
38 | @@ -38,7 +38,7 @@ save_original_signals_state (bool quiet) | ||
39 | int i; | ||
40 | int res; | ||
41 | |||
42 | - res = gdb_sigmask (0, NULL, &original_signal_mask); | ||
43 | + res = gdb_sigmask (SIG_BLOCK, NULL, &original_signal_mask); | ||
44 | if (res == -1) | ||
45 | perror_with_name (("sigprocmask")); | ||
46 | |||
47 | -- | ||
48 | 2.36.1 | ||
49 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0009-Depth-Total-number-of-inline-functions-refer-inline-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0009-Depth-Total-number-of-inline-functions-refer-inline-.patch new file mode 100644 index 00000000..6769e1ee --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0009-Depth-Total-number-of-inline-functions-refer-inline-.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From c37f307714121981fa91766c539913f7912643b7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Thu, 21 Jul 2022 11:45:01 +0530 | ||
4 | Subject: [PATCH 09/54] =?UTF-8?q?Depth:=20Total=20number=20of=20inline=20f?= | ||
5 | =?UTF-8?q?unctions=20[refer=20inline-frame.c]=20state->skipped=5Fframes?= | ||
6 | =?UTF-8?q?=20:=20Number=20of=20inline=20functions=20skipped.=20the=20curr?= | ||
7 | =?UTF-8?q?ent=20unwind=5Fpc=20is=20causing=20an=20issue=20when=20we=20try?= | ||
8 | =?UTF-8?q?=20to=20step=20into=20inline=20functions[Depth=20is=20becoming?= | ||
9 | =?UTF-8?q?=200].=20It=E2=80=99s=20incrementing=20pc=20by=208=20even=20wit?= | ||
10 | =?UTF-8?q?h=20si=20instruction.?= | ||
11 | MIME-Version: 1.0 | ||
12 | Content-Type: text/plain; charset=UTF-8 | ||
13 | Content-Transfer-Encoding: 8bit | ||
14 | |||
15 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
16 | --- | ||
17 | gdb/features/microblaze64.xml | 1 + | ||
18 | gdb/microblaze-tdep.c | 14 +++----------- | ||
19 | 2 files changed, 4 insertions(+), 11 deletions(-) | ||
20 | |||
21 | diff --git a/gdb/features/microblaze64.xml b/gdb/features/microblaze64.xml | ||
22 | index 515d18e65cf..9c1b7d22003 100644 | ||
23 | --- a/gdb/features/microblaze64.xml | ||
24 | +++ b/gdb/features/microblaze64.xml | ||
25 | @@ -7,5 +7,6 @@ | ||
26 | |||
27 | <!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
28 | <target> | ||
29 | + <architecture>microblaze64</architecture> | ||
30 | <xi:include href="microblaze64-core.xml"/> | ||
31 | </target> | ||
32 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
33 | index f265e8fc608..3e541789fac 100644 | ||
34 | --- a/gdb/microblaze-tdep.c | ||
35 | +++ b/gdb/microblaze-tdep.c | ||
36 | @@ -513,16 +513,8 @@ microblaze_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, | ||
37 | static CORE_ADDR | ||
38 | microblaze_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) | ||
39 | { | ||
40 | - gdb_byte buf[4]; | ||
41 | CORE_ADDR pc; | ||
42 | - | ||
43 | - frame_unwind_register (next_frame, MICROBLAZE_PC_REGNUM, buf); | ||
44 | - pc = extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr); | ||
45 | - /* For sentinel frame, return address is actual PC. For other frames, | ||
46 | - return address is pc+8. This is a workaround because gcc does not | ||
47 | - generate correct return address in CIE. */ | ||
48 | - if (frame_relative_level (next_frame) >= 0) | ||
49 | - pc += 8; | ||
50 | + pc=frame_unwind_register_unsigned (next_frame, MICROBLAZE_PC_REGNUM); | ||
51 | return pc; | ||
52 | } | ||
53 | |||
54 | @@ -553,7 +545,6 @@ microblaze_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR start_pc) | ||
55 | ostart_pc = microblaze_analyze_prologue (gdbarch, func_start, 0xffffffffUL, | ||
56 | &cache); | ||
57 | |||
58 | - | ||
59 | if (ostart_pc > start_pc) | ||
60 | return ostart_pc; | ||
61 | return start_pc; | ||
62 | @@ -660,7 +651,8 @@ static const struct frame_unwind microblaze_frame_unwind = | ||
63 | microblaze_frame_this_id, | ||
64 | microblaze_frame_prev_register, | ||
65 | NULL, | ||
66 | - default_frame_sniffer | ||
67 | + default_frame_sniffer, | ||
68 | + NULL, | ||
69 | }; | ||
70 | |||
71 | static CORE_ADDR | ||
72 | -- | ||
73 | 2.34.1 | ||
74 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdb-gdserver-Fix-ABI-settings-for-gdbserver.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdb-gdserver-Fix-ABI-settings-for-gdbserver.patch deleted file mode 100644 index 93f67800..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdb-gdserver-Fix-ABI-settings-for-gdbserver.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 53b76bb548720367032a51a6d604c975b10bb30e Mon Sep 17 00:00:00 2001 | ||
2 | From: Aayush Misra <aayushm@amd.com> | ||
3 | Date: Fri, 29 Mar 2024 14:59:16 +0530 | ||
4 | Subject: [PATCH] gdb/gdserver: Fix ABI settings for gdbserver | ||
5 | |||
6 | --- | ||
7 | gdb/microblaze-tdep.c | 7 ++++--- | ||
8 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
9 | |||
10 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
11 | index 38ba38e8c7d..35cec286d8f 100644 | ||
12 | --- a/gdb/microblaze-tdep.c | ||
13 | +++ b/gdb/microblaze-tdep.c | ||
14 | @@ -1120,12 +1120,13 @@ void _initialize_microblaze_tdep (); | ||
15 | void | ||
16 | _initialize_microblaze_tdep () | ||
17 | { | ||
18 | + //Setting abi to auto manually, should be able to modify in 'arch'_gdbarch_init function | ||
19 | + microblaze_abi_string = microblaze_abi_strings[0]; | ||
20 | + | ||
21 | register_gdbarch_init (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
22 | -// static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
23 | -// static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
24 | |||
25 | - /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
26 | |||
27 | + /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
28 | add_setshow_prefix_cmd ("microblaze", no_class, | ||
29 | _("Various microblaze specific commands."), | ||
30 | _("Various microblaze specific commands."), | ||
31 | -- | ||
32 | 2.34.1 | ||
33 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch deleted file mode 100644 index f53d3bd1..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From bc3b1f6aacf2d8fe66b022fbfcf28cd82c76e52f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 29 Nov 2018 18:00:23 -0800 | ||
4 | Subject: [PATCH 9/9] gdbserver ctrl-c handling | ||
5 | |||
6 | This problem was created by the upstream commit 78708b7c8c | ||
7 | After applying the commit, it will send SIGINT to the process | ||
8 | group(-signal_pid). | ||
9 | But if we use gdbserver send SIGINT, and the attached process is not a | ||
10 | process | ||
11 | group leader, then the "kill (-signal_pid, SIGINT)" returns error and | ||
12 | fails to | ||
13 | interrupt the attached process. | ||
14 | |||
15 | Upstream-Status: Submitted | ||
16 | [https://sourceware.org/bugzilla/show_bug.cgi?id=18945] | ||
17 | |||
18 | Author: Josh Gao | ||
19 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> | ||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
21 | --- | ||
22 | gdbserver/linux-low.cc | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc | ||
26 | index 7726a4a0c36..f750e074a03 100644 | ||
27 | --- a/gdbserver/linux-low.cc | ||
28 | +++ b/gdbserver/linux-low.cc | ||
29 | @@ -5496,7 +5496,7 @@ linux_process_target::request_interrupt () | ||
30 | { | ||
31 | /* Send a SIGINT to the process group. This acts just like the user | ||
32 | typed a ^C on the controlling terminal. */ | ||
33 | - ::kill (-signal_pid, SIGINT); | ||
34 | + ::kill (signal_pid, SIGINT); | ||
35 | } | ||
36 | |||
37 | bool | ||
38 | -- | ||
39 | 2.36.1 | ||
40 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch new file mode 100644 index 00000000..e5c88f01 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch | |||
@@ -0,0 +1,133 @@ | |||
1 | From 6b6632b730808a012738f9eddf621abd6463e317 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 29 Feb 2024 10:53:04 +0530 | ||
4 | Subject: [PATCH 10/54] Fix gdb-14 build errors for microblaze-xilinx-elf | ||
5 | 2023.2 merge | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/elf64-microblaze.c | 12 ++++++++++++ | ||
10 | gdb/frame.c | 2 +- | ||
11 | gdb/microblaze-tdep.c | 17 +++++++++++------ | ||
12 | 3 files changed, 24 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
15 | index 6cd9753a592..119d266f95a 100755 | ||
16 | --- a/bfd/elf64-microblaze.c | ||
17 | +++ b/bfd/elf64-microblaze.c | ||
18 | @@ -750,6 +750,18 @@ microblaze_elf_info_to_howto (bfd * abfd, | ||
19 | return true; | ||
20 | } | ||
21 | |||
22 | +/* Relax table contains information about instructions which can | ||
23 | + be removed by relaxation -- replacing a long address with a | ||
24 | + short address. */ | ||
25 | +struct relax_table | ||
26 | +{ | ||
27 | + /* Address where bytes may be deleted. */ | ||
28 | + bfd_vma addr; | ||
29 | + | ||
30 | + /* Number of bytes to be deleted. */ | ||
31 | + size_t size; | ||
32 | +}; | ||
33 | + | ||
34 | struct _microblaze_elf_section_data | ||
35 | { | ||
36 | struct bfd_elf_section_data elf; | ||
37 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
38 | index c4d967e01d5..8be230e0617 100644 | ||
39 | --- a/gdb/frame.c | ||
40 | +++ b/gdb/frame.c | ||
41 | @@ -1315,7 +1315,7 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum) | ||
42 | int i; | ||
43 | |||
44 | const gdb_byte *buf = NULL; | ||
45 | - if (value_entirely_available(value)) { | ||
46 | + if (value->entirely_available()) { | ||
47 | gdb::array_view<const gdb_byte> buf = value->contents (); | ||
48 | } | ||
49 | |||
50 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
51 | index 3e541789fac..f7d9d6419ce 100644 | ||
52 | --- a/gdb/microblaze-tdep.c | ||
53 | +++ b/gdb/microblaze-tdep.c | ||
54 | @@ -75,7 +75,7 @@ static const char *const microblaze_abi_strings[] = { | ||
55 | enum microblaze_abi | ||
56 | microblaze_abi (struct gdbarch *gdbarch) | ||
57 | { | ||
58 | - microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
59 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
60 | return tdep->microblaze_abi; | ||
61 | } | ||
62 | /* The registers of the Xilinx microblaze processor. */ | ||
63 | @@ -120,12 +120,12 @@ show_microblaze_abi (struct ui_file *file, | ||
64 | |||
65 | #if 1 | ||
66 | if (global_abi == MICROBLAZE_ABI_AUTO) | ||
67 | - fprintf_filtered | ||
68 | + gdb_printf | ||
69 | (file, | ||
70 | "The microblaze ABI is set automatically (currently \"%s\").\n", | ||
71 | actual_abi_str); | ||
72 | else if (global_abi == actual_abi) | ||
73 | - fprintf_filtered | ||
74 | + gdb_printf | ||
75 | (file, | ||
76 | "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", | ||
77 | actual_abi_str); | ||
78 | @@ -133,7 +133,7 @@ show_microblaze_abi (struct ui_file *file, | ||
79 | { | ||
80 | #endif | ||
81 | /* Probably shouldn't happen... */ | ||
82 | - fprintf_filtered (file, | ||
83 | + gdb_printf (file, | ||
84 | "The (auto detected) microblaze ABI \"%s\" is in use " | ||
85 | "even though the user setting was \"%s\".\n", | ||
86 | actual_abi_str, microblaze_abi_strings[global_abi]); | ||
87 | @@ -934,7 +934,7 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
88 | void *cb_data, | ||
89 | const struct regcache *regcache) | ||
90 | { | ||
91 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
92 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
93 | |||
94 | cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
95 | |||
96 | @@ -942,6 +942,8 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
97 | } | ||
98 | |||
99 | |||
100 | +#if 0 | ||
101 | +// compilation errors - function is not actually used ? | ||
102 | static void | ||
103 | make_regs (struct gdbarch *arch) | ||
104 | { | ||
105 | @@ -953,6 +955,7 @@ make_regs (struct gdbarch *arch) | ||
106 | set_gdbarch_ptr_bit (arch, 64); | ||
107 | } | ||
108 | } | ||
109 | +#endif | ||
110 | |||
111 | static struct gdbarch * | ||
112 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
113 | @@ -964,7 +967,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
114 | /* What has the user specified from the command line? */ | ||
115 | wanted_abi = global_microblaze_abi (); | ||
116 | if (gdbarch_debug) | ||
117 | - fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
118 | + gdb_printf (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
119 | wanted_abi); | ||
120 | if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
121 | microblaze_abi = wanted_abi; | ||
122 | @@ -1038,6 +1041,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
123 | gdbarch *gdbarch | ||
124 | = gdbarch_alloc (&info, gdbarch_tdep_up (new microblaze_gdbarch_tdep)); | ||
125 | |||
126 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
127 | + | ||
128 | tdep->gregset = NULL; | ||
129 | tdep->sizeof_gregset = 0; | ||
130 | tdep->fpregset = NULL; | ||
131 | -- | ||
132 | 2.34.1 | ||
133 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch new file mode 100644 index 00000000..d7e51502 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0011-fix-gdb-microblaze-xilinx-elf-crash-issue-on-invocat.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 389711a13933a60323d368d5e5f1f54bd171b16b Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 29 Feb 2024 10:55:16 +0530 | ||
4 | Subject: [PATCH 11/54] fix gdb microblaze-xilinx-elf crash issue on invocation | ||
5 | Regression from merging microblaze 64-bit support | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | gdb/microblaze-tdep.c | 3 +++ | ||
10 | 1 file changed, 3 insertions(+) | ||
11 | |||
12 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
13 | index f7d9d6419ce..d4b9ef837e5 100644 | ||
14 | --- a/gdb/microblaze-tdep.c | ||
15 | +++ b/gdb/microblaze-tdep.c | ||
16 | @@ -1124,6 +1124,9 @@ void _initialize_microblaze_tdep (); | ||
17 | void | ||
18 | _initialize_microblaze_tdep () | ||
19 | { | ||
20 | + //Setting abi to auto manually, should be able to modify in 'arch'_gdbarch_init function | ||
21 | + microblaze_abi_string = microblaze_abi_strings[0]; | ||
22 | + | ||
23 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
24 | |||
25 | // static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
26 | -- | ||
27 | 2.34.1 | ||
28 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0013-Disable-the-warning-message-for-eh_frame_hdr.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0013-Disable-the-warning-message-for-eh_frame_hdr.patch new file mode 100644 index 00000000..8e966788 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0013-Disable-the-warning-message-for-eh_frame_hdr.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From ee4f6d0c1ea82b531d7481692e499fc0b35c88a8 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> | ||
3 | Date: Fri, 22 Jun 2012 01:20:20 +0200 | ||
4 | Subject: [PATCH 13/54] Disable the warning message for eh_frame_hdr | ||
5 | |||
6 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | ||
7 | |||
8 | Conflicts: | ||
9 | bfd/elf-eh-frame.c | ||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | bfd/elf-eh-frame.c | 3 +++ | ||
13 | 1 file changed, 3 insertions(+) | ||
14 | |||
15 | diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c | ||
16 | index bf7a9902355..21029b59632 100644 | ||
17 | --- a/bfd/elf-eh-frame.c | ||
18 | +++ b/bfd/elf-eh-frame.c | ||
19 | @@ -1045,10 +1045,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, | ||
20 | goto success; | ||
21 | |||
22 | free_no_table: | ||
23 | +/* FIXME: Remove the microblaze specifics when relaxing gets fixed. */ | ||
24 | +if (bfd_get_arch(abfd) != bfd_arch_microblaze) { | ||
25 | _bfd_error_handler | ||
26 | /* xgettext:c-format */ | ||
27 | (_("error in %pB(%pA); no .eh_frame_hdr table will be created"), | ||
28 | abfd, sec); | ||
29 | +} | ||
30 | hdr_info->u.dwarf.table = false; | ||
31 | free (sec_info); | ||
32 | success: | ||
33 | -- | ||
34 | 2.34.1 | ||
35 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch new file mode 100644 index 00000000..41118c1a --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0015-upstream-change-to-garbage-collection-sweep-causes-m.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 6531ec7f986fff48b9efc883526018f494cf88fb Mon Sep 17 00:00:00 2001 | ||
2 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
3 | Date: Wed, 27 Feb 2013 13:56:11 +1000 | ||
4 | Subject: [PATCH 15/54] upstream change to garbage collection sweep causes mb | ||
5 | regression | ||
6 | |||
7 | Upstream change for PR13177 now clears the def_regular during gc_sweep of a | ||
8 | section. (All other archs in binutils/bfd/elf32-*.c received an update | ||
9 | to a warning about unresolvable relocations - this warning is not present | ||
10 | in binutils/bfd/elf32-microblaze.c, but this warning check would not | ||
11 | prevent the error being seen) | ||
12 | |||
13 | The visible issue with this change is when running a c++ application | ||
14 | in Petalinux which links libstdc++.so for exception handling it segfaults | ||
15 | on execution. | ||
16 | |||
17 | This does not occur if static linking libstdc++.a, so its during the | ||
18 | relocations for a shared lib with garbage collection this occurs | ||
19 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
21 | |||
22 | Conflicts: | ||
23 | bfd/elflink.c | ||
24 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
25 | --- | ||
26 | bfd/elflink.c | 1 - | ||
27 | 1 file changed, 1 deletion(-) | ||
28 | |||
29 | diff --git a/bfd/elflink.c b/bfd/elflink.c | ||
30 | index ca162145f7e..0524019641e 100644 | ||
31 | --- a/bfd/elflink.c | ||
32 | +++ b/bfd/elflink.c | ||
33 | @@ -6608,7 +6608,6 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) | ||
34 | |||
35 | inf = (struct elf_gc_sweep_symbol_info *) data; | ||
36 | (*inf->hide_symbol) (inf->info, h, true); | ||
37 | - h->def_regular = 0; | ||
38 | h->ref_regular = 0; | ||
39 | h->ref_regular_nonweak = 0; | ||
40 | } | ||
41 | -- | ||
42 | 2.34.1 | ||
43 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0016-Add-new-bit-field-instructions.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0016-Add-new-bit-field-instructions.patch new file mode 100644 index 00000000..30a7322d --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0016-Add-new-bit-field-instructions.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | From 50a52ab3ad64b8525a970744dbb1c5f67dc24886 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Mon, 18 Jul 2016 12:24:28 +0530 | ||
4 | Subject: [PATCH 16/54] Add new bit-field instructions | ||
5 | |||
6 | This patches adds new bsefi and bsifi instructions. | ||
7 | BSEFI- The instruction shall extract a bit field from a | ||
8 | register and place it right-adjusted in the destination register. | ||
9 | The other bits in the destination register shall be set to zero | ||
10 | BSIFI- The instruction shall insert a right-adjusted bit field | ||
11 | from a register at another position in the destination register. | ||
12 | The rest of the bits in the destination register shall be unchanged | ||
13 | |||
14 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | ||
15 | |||
16 | Conflicts: | ||
17 | opcodes/microblaze-dis.c | ||
18 | |||
19 | Conflicts: | ||
20 | gas/config/tc-microblaze.c | ||
21 | opcodes/microblaze-opc.h | ||
22 | |||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gas/config/tc-microblaze.c | 71 +++++++++++++++++++++++++++++++++++++- | ||
26 | opcodes/microblaze-dis.c | 18 +++++++++- | ||
27 | opcodes/microblaze-opc.h | 6 ++++ | ||
28 | 3 files changed, 93 insertions(+), 2 deletions(-) | ||
29 | |||
30 | Index: gdb-14.2/opcodes/microblaze-dis.c | ||
31 | =================================================================== | ||
32 | --- gdb-14.2.orig/opcodes/microblaze-dis.c | ||
33 | +++ gdb-14.2/opcodes/microblaze-dis.c | ||
34 | @@ -113,7 +113,19 @@ get_field_immw (struct string_buf *buf, | ||
35 | } | ||
36 | |||
37 | static char * | ||
38 | -get_field_rfsl (struct string_buf *buf, long instr) | ||
39 | +get_field_imm5width (struct string_buf *buf, long instr) | ||
40 | +{ | ||
41 | + char *p = strbuf (buf); | ||
42 | + | ||
43 | + if (instr & 0x00004000) | ||
44 | + sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) >> IMM_WIDTH_LOW))); /* bsefi */ | ||
45 | + else | ||
46 | + sprintf (p, "%d", (short)(((instr & IMM5_WIDTH_MASK) >> IMM_WIDTH_LOW) - ((instr & IMM5_MASK) >> IMM_LOW) + 1)); /* bsifi */ | ||
47 | + return p; | ||
48 | +} | ||
49 | + | ||
50 | +static char * | ||
51 | +get_field_rfsl (struct string_buf *buf,long instr) | ||
52 | { | ||
53 | char *p = strbuf (buf); | ||
54 | |||
55 | @@ -462,6 +474,10 @@ print_insn_microblaze (bfd_vma memaddr, | ||
56 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
57 | get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
58 | break; | ||
59 | + /* For bit field insns. */ | ||
60 | + case INST_TYPE_RD_R1_IMM5_IMM5: | ||
61 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_imm5width (&buf, inst), get_field_imm5 (&buf, inst)); | ||
62 | + break; | ||
63 | /* For tuqula instruction */ | ||
64 | case INST_TYPE_RD: | ||
65 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
66 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
67 | =================================================================== | ||
68 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
69 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
70 | @@ -68,6 +68,9 @@ | ||
71 | #define INST_TYPE_R1_IMML 24 | ||
72 | #define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
73 | |||
74 | +/* For bsefi and bsifi */ | ||
75 | +#define INST_TYPE_RD_R1_IMM5_IMM5 21 | ||
76 | + | ||
77 | #define INST_TYPE_NONE 25 | ||
78 | |||
79 | |||
80 | @@ -587,5 +590,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
81 | #define MIN_IMML ((long) 0xffffff8000000000L) | ||
82 | #define MAX_IMML ((long) 0x0000007fffffffffL) | ||
83 | |||
84 | +#define MIN_IMM_WIDTH ((int) 0x00000001) | ||
85 | +#define MAX_IMM_WIDTH ((int) 0x00000020) | ||
86 | + | ||
87 | #endif /* MICROBLAZE_OPC */ | ||
88 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0019-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0019-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..dc78da6b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0019-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,150 @@ | |||
1 | From 45f177e5de751f11c2d084c4d836d7f8ef754cb4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 19/54] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | bfd/bfd-in2.h | 10 ++++++++++ | ||
17 | bfd/libbfd.h | 2 ++ | ||
18 | bfd/reloc.c | 12 ++++++++++++ | ||
19 | gas/config/tc-microblaze.h | 4 +++- | ||
20 | ld/Makefile.am | 2 ++ | ||
21 | ld/configure.tgt | 3 +++ | ||
22 | opcodes/microblaze-dis.c | 8 ++++++-- | ||
23 | opcodes/microblaze-opc.h | 11 +++++++---- | ||
24 | 8 files changed, 45 insertions(+), 7 deletions(-) | ||
25 | |||
26 | Index: gdb-14.2/bfd/bfd-in2.h | ||
27 | =================================================================== | ||
28 | --- gdb-14.2.orig/bfd/bfd-in2.h | ||
29 | +++ gdb-14.2/bfd/bfd-in2.h | ||
30 | @@ -6489,12 +6489,22 @@ done here - only used for relaxing */ | ||
31 | BFD_RELOC_MICROBLAZE_64_NONE, | ||
32 | |||
33 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
34 | + * +value in two words (with an imml instruction). No relocation is | ||
35 | + * +done here - only used for relaxing */ | ||
36 | + BFD_RELOC_MICROBLAZE_64, | ||
37 | + | ||
38 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
39 | value in two words (with an imm instruction). The relocation is | ||
40 | PC-relative GOT offset */ | ||
41 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
42 | |||
43 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
44 | value in two words (with an imml instruction). The relocation is | ||
45 | +PC-relative GOT offset */ | ||
46 | + BFD_RELOC_MICROBLAZE_64_GPC, | ||
47 | + | ||
48 | +/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
49 | +value in two words (with an imml instruction). The relocation is | ||
50 | PC-relative GOT offset */ | ||
51 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
52 | |||
53 | Index: gdb-14.2/bfd/libbfd.h | ||
54 | =================================================================== | ||
55 | --- gdb-14.2.orig/bfd/libbfd.h | ||
56 | +++ gdb-14.2/bfd/libbfd.h | ||
57 | @@ -3012,7 +3012,9 @@ static const char *const bfd_reloc_code_ | ||
58 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
59 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
60 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
61 | + "BFD_RELOC_MICROBLAZE_64", | ||
62 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
63 | + "BFD_RELOC_MICROBLAZE_64_GPC", | ||
64 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
65 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
66 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
67 | Index: gdb-14.2/bfd/reloc.c | ||
68 | =================================================================== | ||
69 | --- gdb-14.2.orig/bfd/reloc.c | ||
70 | +++ gdb-14.2/bfd/reloc.c | ||
71 | @@ -6703,6 +6703,12 @@ ENUMDOC | ||
72 | ENUM | ||
73 | BFD_RELOC_MICROBLAZE_64_NONE | ||
74 | ENUMDOC | ||
75 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
76 | + value in two words (with an imml instruction). No relocation is | ||
77 | + done here - only used for relaxing | ||
78 | +ENUM | ||
79 | + BFD_RELOC_MICROBLAZE_64 | ||
80 | +ENUMDOC | ||
81 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
82 | value in two words (with an imm instruction). No relocation is | ||
83 | done here - only used for relaxing | ||
84 | @@ -6710,6 +6716,12 @@ ENUM | ||
85 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
86 | ENUMDOC | ||
87 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
88 | + value in two words (with an imml instruction). No relocation is | ||
89 | + done here - only used for relaxing | ||
90 | +ENUM | ||
91 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
92 | +ENUMDOC | ||
93 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
94 | value in two words (with an imm instruction). The relocation is | ||
95 | PC-relative GOT offset | ||
96 | ENUM | ||
97 | Index: gdb-14.2/opcodes/microblaze-dis.c | ||
98 | =================================================================== | ||
99 | --- gdb-14.2.orig/opcodes/microblaze-dis.c | ||
100 | +++ gdb-14.2/opcodes/microblaze-dis.c | ||
101 | @@ -457,6 +457,10 @@ print_insn_microblaze (bfd_vma memaddr, | ||
102 | case INST_TYPE_R1_R2_SPECIAL: | ||
103 | print_func (stream, "\t%s, %s", get_field_r1 (&buf, inst), | ||
104 | get_field_r2 (&buf, inst)); | ||
105 | + break; | ||
106 | + case INST_TYPE_IMML: | ||
107 | + print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
108 | + /* TODO: Also print symbol */ | ||
109 | break; | ||
110 | case INST_TYPE_RD_IMM15: | ||
111 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
112 | @@ -475,8 +479,8 @@ print_insn_microblaze (bfd_vma memaddr, | ||
113 | get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
114 | break; | ||
115 | /* For bit field insns. */ | ||
116 | - case INST_TYPE_RD_R1_IMM5_IMM5: | ||
117 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_imm5width (&buf, inst), get_field_imm5 (&buf, inst)); | ||
118 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
119 | + print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
120 | break; | ||
121 | /* For tuqula instruction */ | ||
122 | case INST_TYPE_RD: | ||
123 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
124 | =================================================================== | ||
125 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
126 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
127 | @@ -69,7 +69,13 @@ | ||
128 | #define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
129 | |||
130 | /* For bsefi and bsifi */ | ||
131 | -#define INST_TYPE_RD_R1_IMM5_IMM5 21 | ||
132 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
133 | + | ||
134 | +/* For 64-bit instructions */ | ||
135 | +#define INST_TYPE_IMML 22 | ||
136 | +#define INST_TYPE_RD_R1_IMML 23 | ||
137 | +#define INST_TYPE_R1_IMML 24 | ||
138 | +#define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
139 | |||
140 | #define INST_TYPE_NONE 25 | ||
141 | |||
142 | @@ -590,8 +596,5 @@ char pvr_register_prefix[] = "rpvr"; | ||
143 | #define MIN_IMML ((long) 0xffffff8000000000L) | ||
144 | #define MAX_IMML ((long) 0x0000007fffffffffL) | ||
145 | |||
146 | -#define MIN_IMM_WIDTH ((int) 0x00000001) | ||
147 | -#define MAX_IMM_WIDTH ((int) 0x00000020) | ||
148 | - | ||
149 | #endif /* MICROBLAZE_OPC */ | ||
150 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0020-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0020-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..a1efcf41 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0020-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From 8ec9b2fe49c8e1e367213fa0b8d6b6f0fedc3456 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 20/54] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | ld/emulparams/elf64microblaze.sh | 23 +++++++++++++++++++++++ | ||
17 | ld/emulparams/elf64microblazeel.sh | 23 +++++++++++++++++++++++ | ||
18 | 2 files changed, 46 insertions(+) | ||
19 | create mode 100644 ld/emulparams/elf64microblaze.sh | ||
20 | create mode 100644 ld/emulparams/elf64microblazeel.sh | ||
21 | |||
22 | diff --git a/ld/emulparams/elf64microblaze.sh b/ld/emulparams/elf64microblaze.sh | ||
23 | new file mode 100644 | ||
24 | index 00000000000..9c7b0eb7080 | ||
25 | --- /dev/null | ||
26 | +++ b/ld/emulparams/elf64microblaze.sh | ||
27 | @@ -0,0 +1,23 @@ | ||
28 | +SCRIPT_NAME=elfmicroblaze | ||
29 | +OUTPUT_FORMAT="elf64-microblazeel" | ||
30 | +#BIG_OUTPUT_FORMAT="elf64-microblaze" | ||
31 | +LITTLE_OUTPUT_FORMAT="elf64-microblazeel" | ||
32 | +#TEXT_START_ADDR=0 | ||
33 | +NONPAGED_TEXT_START_ADDR=0x28 | ||
34 | +ALIGNMENT=4 | ||
35 | +MAXPAGESIZE=4 | ||
36 | +ARCH=microblaze | ||
37 | +EMBEDDED=yes | ||
38 | + | ||
39 | +NOP=0x80000000 | ||
40 | + | ||
41 | +# Hmmm, there's got to be a better way. This sets the stack to the | ||
42 | +# top of the simulator memory (2^19 bytes). | ||
43 | +#PAGE_SIZE=0x1000 | ||
44 | +#DATA_ADDR=0x10000 | ||
45 | +#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }' | ||
46 | +#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
47 | +#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
48 | + | ||
49 | +TEMPLATE_NAME=elf32 | ||
50 | +#GENERATE_SHLIB_SCRIPT=yes | ||
51 | diff --git a/ld/emulparams/elf64microblazeel.sh b/ld/emulparams/elf64microblazeel.sh | ||
52 | new file mode 100644 | ||
53 | index 00000000000..9c7b0eb7080 | ||
54 | --- /dev/null | ||
55 | +++ b/ld/emulparams/elf64microblazeel.sh | ||
56 | @@ -0,0 +1,23 @@ | ||
57 | +SCRIPT_NAME=elfmicroblaze | ||
58 | +OUTPUT_FORMAT="elf64-microblazeel" | ||
59 | +#BIG_OUTPUT_FORMAT="elf64-microblaze" | ||
60 | +LITTLE_OUTPUT_FORMAT="elf64-microblazeel" | ||
61 | +#TEXT_START_ADDR=0 | ||
62 | +NONPAGED_TEXT_START_ADDR=0x28 | ||
63 | +ALIGNMENT=4 | ||
64 | +MAXPAGESIZE=4 | ||
65 | +ARCH=microblaze | ||
66 | +EMBEDDED=yes | ||
67 | + | ||
68 | +NOP=0x80000000 | ||
69 | + | ||
70 | +# Hmmm, there's got to be a better way. This sets the stack to the | ||
71 | +# top of the simulator memory (2^19 bytes). | ||
72 | +#PAGE_SIZE=0x1000 | ||
73 | +#DATA_ADDR=0x10000 | ||
74 | +#OTHER_RELOCATING_SECTIONS='.stack 0x7000 : { _stack = .; *(.stack) }' | ||
75 | +#$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
76 | +#OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
77 | + | ||
78 | +TEMPLATE_NAME=elf32 | ||
79 | +#GENERATE_SHLIB_SCRIPT=yes | ||
80 | -- | ||
81 | 2.34.1 | ||
82 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0021-Added-relocations-for-MB-X.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0021-Added-relocations-for-MB-X.patch new file mode 100644 index 00000000..caf24b8d --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0021-Added-relocations-for-MB-X.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From 818a103460da557761aacc0d21b9b087721d2d3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 11 Sep 2018 17:30:17 +0530 | ||
4 | Subject: [PATCH 21/54] Added relocations for MB-X | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/bfd-in2.h | ||
8 | gas/config/tc-microblaze.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | |||
13 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
14 | --- | ||
15 | bfd/reloc.c | 26 ++++++++++++++------------ | ||
16 | gas/config/tc-microblaze.c | 11 +++++++++++ | ||
17 | 2 files changed, 25 insertions(+), 12 deletions(-) | ||
18 | |||
19 | Index: gdb-14.2/bfd/reloc.c | ||
20 | =================================================================== | ||
21 | --- gdb-14.2.orig/bfd/reloc.c | ||
22 | +++ gdb-14.2/bfd/reloc.c | ||
23 | @@ -6703,12 +6703,6 @@ ENUMDOC | ||
24 | ENUM | ||
25 | BFD_RELOC_MICROBLAZE_64_NONE | ||
26 | ENUMDOC | ||
27 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
28 | - value in two words (with an imml instruction). No relocation is | ||
29 | - done here - only used for relaxing | ||
30 | -ENUM | ||
31 | - BFD_RELOC_MICROBLAZE_64 | ||
32 | -ENUMDOC | ||
33 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
34 | value in two words (with an imm instruction). No relocation is | ||
35 | done here - only used for relaxing | ||
36 | @@ -6716,12 +6710,6 @@ ENUM | ||
37 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
38 | ENUMDOC | ||
39 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
40 | - value in two words (with an imml instruction). No relocation is | ||
41 | - done here - only used for relaxing | ||
42 | -ENUM | ||
43 | - BFD_RELOC_MICROBLAZE_64_GPC | ||
44 | -ENUMDOC | ||
45 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
46 | value in two words (with an imm instruction). The relocation is | ||
47 | PC-relative GOT offset | ||
48 | ENUM | ||
49 | @@ -7976,6 +7964,20 @@ ENUMX | ||
50 | ENUMDOC | ||
51 | Linux eBPF relocations. | ||
52 | |||
53 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
54 | + to two words (uses imml instruction). | ||
55 | +ENUM | ||
56 | +BFD_RELOC_MICROBLAZE_64, | ||
57 | +ENUMDOC | ||
58 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
59 | + value in two words (with an imml instruction). No relocation is | ||
60 | + done here - only used for relaxing | ||
61 | +ENUM | ||
62 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
63 | +ENUMDOC | ||
64 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
65 | + value in two words (with an imml instruction). No relocation is | ||
66 | + done here - only used for relaxing | ||
67 | ENUM | ||
68 | BFD_RELOC_EPIPHANY_SIMM8 | ||
69 | ENUMDOC | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0022-initial-support-for-MicroBlaze-64-bit-m64.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0022-initial-support-for-MicroBlaze-64-bit-m64.patch new file mode 100644 index 00000000..2023287a --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0022-initial-support-for-MicroBlaze-64-bit-m64.patch | |||
@@ -0,0 +1,113 @@ | |||
1 | From 587d5179ce81a4f67ebec321063f6c3c9b1673cb Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 1 Nov 2021 19:06:53 +0530 | ||
4 | Subject: [PATCH 22/54] initial support for MicroBlaze 64 bit [-m64] | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/elf32-microblaze.c | ||
8 | include/elf/common.h | ||
9 | ld/Makefile.am | ||
10 | ld/Makefile.in | ||
11 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | ||
12 | Mahesh Bodapati<mbodapat@xilinx.com> | ||
13 | |||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | bfd/elf64-microblaze.c | 8 + | ||
17 | bfd/reloc.c | 42 ++- | ||
18 | gas/config/tc-microblaze.c | 558 ++++++++++++++++++++++++++++++++----- | ||
19 | 3 files changed, 507 insertions(+), 101 deletions(-) | ||
20 | |||
21 | Index: gdb-14.2/bfd/elf64-microblaze.c | ||
22 | =================================================================== | ||
23 | --- gdb-14.2.orig/bfd/elf64-microblaze.c | ||
24 | +++ gdb-14.2/bfd/elf64-microblaze.c | ||
25 | @@ -1666,6 +1666,14 @@ microblaze_elf_relocate_section (bfd *ou | ||
26 | outrel.r_info = ELF64_R_INFO (0, R_MICROBLAZE_REL); | ||
27 | outrel.r_addend = relocation + addend; | ||
28 | } | ||
29 | + unsigned long insn = bfd_get_32 (input_bfd, contents + offset +endian); | ||
30 | + if (insn == 0xb2000000 || insn == 0xb2ffffff) | ||
31 | + { | ||
32 | + insn &= ~0x00ffffff; | ||
33 | + insn |= (relocation >> 16) & 0xffffff; | ||
34 | + bfd_put_32 (input_bfd, insn, | ||
35 | + contents + offset + endian); | ||
36 | + } | ||
37 | else | ||
38 | { | ||
39 | BFD_FAIL (); | ||
40 | Index: gdb-14.2/bfd/reloc.c | ||
41 | =================================================================== | ||
42 | --- gdb-14.2.orig/bfd/reloc.c | ||
43 | +++ gdb-14.2/bfd/reloc.c | ||
44 | @@ -6703,13 +6703,31 @@ ENUMDOC | ||
45 | ENUM | ||
46 | BFD_RELOC_MICROBLAZE_64_NONE | ||
47 | ENUMDOC | ||
48 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
49 | + value in two words (with an imml instruction). No relocation is | ||
50 | + done here - only used for relaxing | ||
51 | +ENUM | ||
52 | + BFD_RELOC_MICROBLAZE_64 | ||
53 | +ENUMDOC | ||
54 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
55 | value in two words (with an imm instruction). No relocation is | ||
56 | done here - only used for relaxing | ||
57 | ENUM | ||
58 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
59 | +ENUMDOC | ||
60 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
61 | + value in two words (with an imml instruction). No relocation is | ||
62 | + done here - only used for relaxing | ||
63 | +ENUM | ||
64 | BFD_RELOC_MICROBLAZE_64_GOTPC | ||
65 | ENUMDOC | ||
66 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
67 | + value in two words (with an imml instruction). No relocation is | ||
68 | + done here - only used for relaxing | ||
69 | +ENUM | ||
70 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
71 | +ENUMDOC | ||
72 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
73 | value in two words (with an imm instruction). The relocation is | ||
74 | PC-relative GOT offset | ||
75 | ENUM | ||
76 | @@ -7942,18 +7960,6 @@ ENUMDOC | ||
77 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
78 | to two words (uses imml instruction). | ||
79 | ENUM | ||
80 | -BFD_RELOC_MICROBLAZE_64, | ||
81 | -ENUMDOC | ||
82 | - This is a 64 bit reloc that stores the 64 bit pc relative | ||
83 | - value in two words (with an imml instruction). No relocation is | ||
84 | - done here - only used for relaxing | ||
85 | -ENUM | ||
86 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
87 | -ENUMDOC | ||
88 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
89 | - value in two words (with an imml instruction). No relocation is | ||
90 | - done here - only used for relaxing | ||
91 | -ENUM | ||
92 | BFD_RELOC_BPF_64 | ||
93 | ENUMX | ||
94 | BFD_RELOC_BPF_DISP32 | ||
95 | @@ -7967,18 +7973,6 @@ ENUMDOC | ||
96 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
97 | to two words (uses imml instruction). | ||
98 | ENUM | ||
99 | -BFD_RELOC_MICROBLAZE_64, | ||
100 | -ENUMDOC | ||
101 | - This is a 64 bit reloc that stores the 64 bit pc relative | ||
102 | - value in two words (with an imml instruction). No relocation is | ||
103 | - done here - only used for relaxing | ||
104 | -ENUM | ||
105 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
106 | -ENUMDOC | ||
107 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
108 | - value in two words (with an imml instruction). No relocation is | ||
109 | - done here - only used for relaxing | ||
110 | -ENUM | ||
111 | BFD_RELOC_EPIPHANY_SIMM8 | ||
112 | ENUMDOC | ||
113 | Adapteva EPIPHANY - 8 bit signed pc-relative displacement | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0023-Added-relocations-for-MB-X.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0023-Added-relocations-for-MB-X.patch new file mode 100644 index 00000000..54b0cc45 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0023-Added-relocations-for-MB-X.patch | |||
@@ -0,0 +1,84 @@ | |||
1 | From 4992c1383473b2a37551b7391f1eb836d2a447d3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 11 Sep 2018 17:30:17 +0530 | ||
4 | Subject: [PATCH 23/54] Added relocations for MB-X | ||
5 | |||
6 | Conflicts: | ||
7 | bfd/bfd-in2.h | ||
8 | gas/config/tc-microblaze.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | |||
13 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
14 | --- | ||
15 | bfd/libbfd.h | 2 -- | ||
16 | bfd/reloc.c | 26 ++++++++------- | ||
17 | gas/config/tc-microblaze.c | 68 ++++++++++++-------------------------- | ||
18 | 3 files changed, 36 insertions(+), 60 deletions(-) | ||
19 | |||
20 | Index: gdb-14.2/bfd/libbfd.h | ||
21 | =================================================================== | ||
22 | --- gdb-14.2.orig/bfd/libbfd.h | ||
23 | +++ gdb-14.2/bfd/libbfd.h | ||
24 | @@ -3012,9 +3012,7 @@ static const char *const bfd_reloc_code_ | ||
25 | "BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM", | ||
26 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
27 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
28 | - "BFD_RELOC_MICROBLAZE_64", | ||
29 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
30 | - "BFD_RELOC_MICROBLAZE_64_GPC", | ||
31 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
32 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
33 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
34 | Index: gdb-14.2/bfd/reloc.c | ||
35 | =================================================================== | ||
36 | --- gdb-14.2.orig/bfd/reloc.c | ||
37 | +++ gdb-14.2/bfd/reloc.c | ||
38 | @@ -6669,6 +6669,20 @@ ENUM | ||
39 | ENUMDOC | ||
40 | Address of a GOT entry. | ||
41 | |||
42 | + This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
43 | + to two words (uses imml instruction). | ||
44 | +ENUM | ||
45 | +BFD_RELOC_MICROBLAZE_64, | ||
46 | +ENUMDOC | ||
47 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
48 | + value in two words (with an imml instruction). No relocation is | ||
49 | + done here - only used for relaxing | ||
50 | +ENUM | ||
51 | +BFD_RELOC_MICROBLAZE_64_PCREL, | ||
52 | +ENUMDOC | ||
53 | + This is a 32 bit reloc that stores the 32 bit pc relative | ||
54 | + value in two words (with an imml instruction). No relocation is | ||
55 | + done here - only used for relaxing | ||
56 | ENUM | ||
57 | BFD_RELOC_MICROBLAZE_32_LO | ||
58 | ENUMDOC | ||
59 | @@ -6707,12 +6721,6 @@ ENUMDOC | ||
60 | value in two words (with an imml instruction). No relocation is | ||
61 | done here - only used for relaxing | ||
62 | ENUM | ||
63 | - BFD_RELOC_MICROBLAZE_64 | ||
64 | -ENUMDOC | ||
65 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
66 | - value in two words (with an imm instruction). No relocation is | ||
67 | - done here - only used for relaxing | ||
68 | -ENUM | ||
69 | BFD_RELOC_MICROBLAZE_64_PCREL, | ||
70 | ENUMDOC | ||
71 | This is a 32 bit reloc that stores the 32 bit pc relative | ||
72 | @@ -6725,12 +6733,6 @@ ENUMDOC | ||
73 | value in two words (with an imml instruction). No relocation is | ||
74 | done here - only used for relaxing | ||
75 | ENUM | ||
76 | - BFD_RELOC_MICROBLAZE_64_GPC | ||
77 | -ENUMDOC | ||
78 | - This is a 64 bit reloc that stores the 32 bit pc relative | ||
79 | - value in two words (with an imm instruction). The relocation is | ||
80 | - PC-relative GOT offset | ||
81 | -ENUM | ||
82 | BFD_RELOC_MICROBLAZE_64_GOT | ||
83 | ENUMDOC | ||
84 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0025-Fixed-address-computation-issues-with-64bit-address-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0025-Fixed-address-computation-issues-with-64bit-address-.patch new file mode 100644 index 00000000..e495e207 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0025-Fixed-address-computation-issues-with-64bit-address-.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 33e22262c6c43af6e7e075df0665838b5b3859a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Tue, 9 Oct 2018 10:14:22 +0530 | ||
4 | Subject: [PATCH 25/54] - Fixed address computation issues with 64bit address - | ||
5 | Fixed imml dissassamble issue | ||
6 | |||
7 | Conflicts: | ||
8 | gas/config/tc-microblaze.c | ||
9 | opcodes/microblaze-dis.c | ||
10 | |||
11 | Conflicts: | ||
12 | bfd/elf64-microblaze.c | ||
13 | |||
14 | Conflicts: | ||
15 | bfd/elf64-microblaze.c | ||
16 | |||
17 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
18 | --- | ||
19 | bfd/elf64-microblaze.c | 2 +- | ||
20 | gas/config/tc-microblaze.c | 74 +++++++++++++++++++++++++++++++++----- | ||
21 | 2 files changed, 67 insertions(+), 9 deletions(-) | ||
22 | |||
23 | Index: gdb-14.2/bfd/elf64-microblaze.c | ||
24 | =================================================================== | ||
25 | --- gdb-14.2.orig/bfd/elf64-microblaze.c | ||
26 | +++ gdb-14.2/bfd/elf64-microblaze.c | ||
27 | @@ -2131,7 +2131,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
28 | efix = calc_fixup (target_address, 0, sec); | ||
29 | |||
30 | /* Validate the in-band val. */ | ||
31 | - val = bfd_get_32 (abfd, contents + irel->r_offset); | ||
32 | + val = bfd_get_64 (abfd, contents + irel->r_offset); | ||
33 | if (val != irel->r_addend && ELF64_R_TYPE (irel->r_info) == R_MICROBLAZE_32_NONE) { | ||
34 | fprintf(stderr, "%d: CORRUPT relax reloc %x %lx\n", __LINE__, val, irel->r_addend); | ||
35 | } | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch new file mode 100644 index 00000000..f6598cee --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0028-fixing-the-long-long-long-mingw-toolchain-issue.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 646b229752b9816b25d2b9ffe79b895b69742745 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju Mekala <nmekala@xilix.com> | ||
3 | Date: Thu, 29 Nov 2018 17:59:25 +0530 | ||
4 | Subject: [PATCH 28/54] fixing the long & long long mingw toolchain issue | ||
5 | |||
6 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
7 | --- | ||
8 | gas/config/tc-microblaze.c | 10 +++++----- | ||
9 | opcodes/microblaze-opc.h | 4 ++-- | ||
10 | 2 files changed, 7 insertions(+), 7 deletions(-) | ||
11 | |||
12 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
13 | =================================================================== | ||
14 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
15 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
16 | @@ -593,8 +593,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
17 | #define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
18 | #define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
19 | |||
20 | -#define MIN_IMML ((long) 0xffffff8000000000L) | ||
21 | -#define MAX_IMML ((long) 0x0000007fffffffffL) | ||
22 | +#define MIN_IMML ((long long) 0xffffff8000000000L) | ||
23 | +#define MAX_IMML ((long long) 0x0000007fffffffffL) | ||
24 | |||
25 | #endif /* MICROBLAZE_OPC */ | ||
26 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0029-Added-support-to-new-arithmetic-single-register-inst.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0029-Added-support-to-new-arithmetic-single-register-inst.patch new file mode 100644 index 00000000..8e9585a0 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0029-Added-support-to-new-arithmetic-single-register-inst.patch | |||
@@ -0,0 +1,176 @@ | |||
1 | From 1a9a688939dfbf7cca9685b326c0387672c567b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Nagaraju <nmekala@xilinx.com> | ||
3 | Date: Fri, 23 Aug 2019 16:18:43 +0530 | ||
4 | Subject: [PATCH 29/54] Added support to new arithmetic single register | ||
5 | instructions | ||
6 | |||
7 | Conflicts: | ||
8 | opcodes/microblaze-dis.c | ||
9 | |||
10 | Conflicts: | ||
11 | gas/config/tc-microblaze.c | ||
12 | opcodes/microblaze-dis.c | ||
13 | |||
14 | Conflicts: | ||
15 | gas/config/tc-microblaze.c | ||
16 | signed-off-by:Nagaraju <nmekala@xilinx.com> | ||
17 | Mahesh <mbodapat@xilinx.com> | ||
18 | |||
19 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
20 | --- | ||
21 | gas/config/tc-microblaze.c | 147 ++++++++++++++++++++++++++++++++++++- | ||
22 | opcodes/microblaze-dis.c | 11 +++ | ||
23 | opcodes/microblaze-opc.h | 43 ++++++++++- | ||
24 | opcodes/microblaze-opcm.h | 5 +- | ||
25 | 4 files changed, 200 insertions(+), 6 deletions(-) | ||
26 | |||
27 | Index: gdb-14.2/opcodes/microblaze-dis.c | ||
28 | =================================================================== | ||
29 | --- gdb-14.2.orig/opcodes/microblaze-dis.c | ||
30 | +++ gdb-14.2/opcodes/microblaze-dis.c | ||
31 | @@ -143,6 +143,14 @@ get_field_imm15 (struct string_buf *buf, | ||
32 | return p; | ||
33 | } | ||
34 | |||
35 | +get_field_imm16 (struct string_buf *buf, long instr) | ||
36 | +{ | ||
37 | + char *p = strbuf (buf); | ||
38 | + | ||
39 | + sprintf (p, "%d", (short)((instr & IMM16_MASK) >> IMM_LOW)); | ||
40 | + return p; | ||
41 | +} | ||
42 | + | ||
43 | static char * | ||
44 | get_field_special (struct string_buf *buf, long instr, | ||
45 | const struct op_code_struct *op) | ||
46 | @@ -473,6 +481,9 @@ print_insn_microblaze (bfd_vma memaddr, | ||
47 | /* For mbar 16 or sleep insn. */ | ||
48 | case INST_TYPE_NONE: | ||
49 | break; | ||
50 | + case INST_TYPE_RD_IMML: | ||
51 | + print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
52 | + break; | ||
53 | /* For bit field insns. */ | ||
54 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
55 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
56 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
57 | =================================================================== | ||
58 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
59 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
60 | @@ -78,6 +78,7 @@ | ||
61 | #define INST_TYPE_RD_R1_IMMW_IMMS 21 | ||
62 | |||
63 | #define INST_TYPE_NONE 25 | ||
64 | +#define INST_TYPE_RD_IMML 26 | ||
65 | |||
66 | |||
67 | |||
68 | @@ -93,6 +94,7 @@ | ||
69 | #define IMMVAL_MASK_MFS 0x0000 | ||
70 | |||
71 | #define OPCODE_MASK_H 0xFC000000 /* High 6 bits only. */ | ||
72 | +#define OPCODE_MASK_LIMM 0xFC1F0000 /* High 6 bits and 12-16 bits */ | ||
73 | #define OPCODE_MASK_H1 0xFFE00000 /* High 11 bits. */ | ||
74 | #define OPCODE_MASK_H2 0xFC1F0000 /* High 6 and bits 20-16. */ | ||
75 | #define OPCODE_MASK_H12 0xFFFF0000 /* High 16. */ | ||
76 | @@ -115,6 +117,33 @@ | ||
77 | #define OPCODE_MASK_H34C 0xFC0007E0 /* High 6 bits and bits 21-26. */ | ||
78 | #define OPCODE_MASK_H8 0xFF000000 /* High 8 bits only. */ | ||
79 | |||
80 | +/*Defines to identify 64-bit single reg instructions */ | ||
81 | +#define ADDLI_ONE_REG_MASK 0x68000000 | ||
82 | +#define ADDLIC_ONE_REG_MASK 0x68020000 | ||
83 | +#define ADDLIK_ONE_REG_MASK 0x68040000 | ||
84 | +#define ADDLIKC_ONE_REG_MASK 0x68060000 | ||
85 | +#define RSUBLI_ONE_REG_MASK 0x68010000 | ||
86 | +#define RSUBLIC_ONE_REG_MASK 0x68030000 | ||
87 | +#define RSUBLIK_ONE_REG_MASK 0x68050000 | ||
88 | +#define RSUBLIKC_ONE_REG_MASK 0x68070000 | ||
89 | +#define ORLI_ONE_REG_MASK 0x68100000 | ||
90 | +#define ANDLI_ONE_REG_MASK 0x68110000 | ||
91 | +#define XORLI_ONE_REG_MASK 0x68120000 | ||
92 | +#define ANDLNI_ONE_REG_MASK 0x68130000 | ||
93 | +#define ADDLI_MASK 0x20000000 | ||
94 | +#define ADDLIC_MASK 0x28000000 | ||
95 | +#define ADDLIK_MASK 0x30000000 | ||
96 | +#define ADDLIKC_MASK 0x38000000 | ||
97 | +#define RSUBLI_MASK 0x24000000 | ||
98 | +#define RSUBLIC_MASK 0x2C000000 | ||
99 | +#define RSUBLIK_MASK 0x34000000 | ||
100 | +#define RSUBLIKC_MASK 0x3C000000 | ||
101 | +#define ANDLI_MASK 0xA4000000 | ||
102 | +#define ANDLNI_MASK 0xAC000000 | ||
103 | +#define ORLI_MASK 0xA0000000 | ||
104 | +#define XORLI_MASK 0xA8000000 | ||
105 | + | ||
106 | + | ||
107 | /* New Mask for msrset, msrclr insns. */ | ||
108 | #define OPCODE_MASK_H23N 0xFC1F8000 /* High 6 and bits 11 - 16. */ | ||
109 | /* Mask for mbar insn. */ | ||
110 | @@ -123,7 +152,7 @@ | ||
111 | #define DELAY_SLOT 1 | ||
112 | #define NO_DELAY_SLOT 0 | ||
113 | |||
114 | -#define MAX_OPCODES 412 | ||
115 | +#define MAX_OPCODES 424 | ||
116 | |||
117 | const struct op_code_struct | ||
118 | { | ||
119 | @@ -452,13 +481,21 @@ const struct op_code_struct | ||
120 | {"cmpl", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000101, OPCODE_MASK_H4, cmpl, arithmetic_inst }, | ||
121 | {"cmplu", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x14000103, OPCODE_MASK_H4, cmplu, arithmetic_inst }, | ||
122 | {"addli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x20000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
123 | + {"addli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68000000, OPCODE_MASK_LIMM, addli, arithmetic_inst }, | ||
124 | {"rsubli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x24000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
125 | + {"rsubli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68010000, OPCODE_MASK_LIMM, rsubli, arithmetic_inst }, | ||
126 | {"addlic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x28000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
127 | + {"addlic", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68020000, OPCODE_MASK_LIMM, addlic, arithmetic_inst }, | ||
128 | {"rsublic", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x2C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
129 | + {"rsublic", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68030000, OPCODE_MASK_LIMM, rsublic, arithmetic_inst }, | ||
130 | {"addlik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x30000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
131 | + {"addlik", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68040000, OPCODE_MASK_LIMM, addlik, arithmetic_inst }, | ||
132 | {"rsublik", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x34000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
133 | + {"rsublik", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68050000, OPCODE_MASK_LIMM, rsublik, arithmetic_inst }, | ||
134 | {"addlikc", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x38000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
135 | + {"addlikc", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68060000, OPCODE_MASK_LIMM, addlikc, arithmetic_inst }, | ||
136 | {"rsublikc",INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x3C000000, OPCODE_MASK_H, invalid_inst, arithmetic_inst }, /* Identical to 32-bit */ | ||
137 | + {"rsublikc", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68070000, OPCODE_MASK_LIMM, rsublikc, arithmetic_inst }, | ||
138 | {"mull", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x40000100, OPCODE_MASK_H4, mull, mult_inst }, | ||
139 | {"bslll", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000500, OPCODE_MASK_H3, bslll, barrel_shift_inst }, | ||
140 | {"bslra", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x44000300, OPCODE_MASK_H3, bslra, barrel_shift_inst }, | ||
141 | @@ -509,9 +546,13 @@ const struct op_code_struct | ||
142 | {"beaged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00000, OPCODE_MASK_H14, beaged, branch_inst }, | ||
143 | {"bealged", INST_TYPE_R1_R2, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x9FA00100, OPCODE_MASK_H14, bealged, branch_inst }, | ||
144 | {"orli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA0000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
145 | + {"orli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68100000, OPCODE_MASK_LIMM, orli, arithmetic_inst }, | ||
146 | {"andli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA4000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
147 | + {"andli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68110000, OPCODE_MASK_LIMM, andli, arithmetic_inst }, | ||
148 | {"xorli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xA8000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
149 | + {"xorli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68120000, OPCODE_MASK_LIMM, xorli, arithmetic_inst }, | ||
150 | {"andnli", INST_TYPE_RD_R1_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xAC000000, OPCODE_MASK_H, invalid_inst, logical_inst }, /* Identical to 32-bit */ | ||
151 | + {"andnli", INST_TYPE_RD_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL,0x68130000, OPCODE_MASK_LIMM, andnli, arithmetic_inst }, | ||
152 | {"imml", INST_TYPE_IMML, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB2000000, OPCODE_MASK_H8, imml, immediate_inst }, | ||
153 | {"breai", INST_TYPE_IMM, INST_PC_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8010000, OPCODE_MASK_H12, breai, branch_inst }, | ||
154 | {"breaid", INST_TYPE_IMM, INST_PC_OFFSET, DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0xB8110000, OPCODE_MASK_H12, breaid, branch_inst }, | ||
155 | Index: gdb-14.2/opcodes/microblaze-opcm.h | ||
156 | =================================================================== | ||
157 | --- gdb-14.2.orig/opcodes/microblaze-opcm.h | ||
158 | +++ gdb-14.2/opcodes/microblaze-opcm.h | ||
159 | @@ -62,7 +62,9 @@ enum microblaze_instr | ||
160 | eaputd, teaputd, ecaputd, tecaputd, neaputd, tneaputd, necaputd, tnecaputd, | ||
161 | |||
162 | /* 64-bit instructions */ | ||
163 | - addl, rsubl, addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
164 | + addl, addli, addlic, addlik, addlikc, rsubl, rsubli, rsublic, rsublik, rsublikc, | ||
165 | + addlc, rsublc, addlk, rsublk, addlkc, rsublkc, cmpl, cmplu, mull, | ||
166 | + andli, andnli, orli, xorli, | ||
167 | bslll, bslra, bslrl, bsllli, bslrai, bslrli, bslefi, bslifi, orl, andl, xorl, | ||
168 | andnl, pcmplbf, pcmpleq, pcmplne, srla, srlc, srll, sextl8, sextl16, sextl32, | ||
169 | brea, bread, breald, beaeq, bealeq, beaeqd, bealeqd, beane, bealne, beaned, | ||
170 | @@ -167,5 +169,6 @@ enum microblaze_instr_type | ||
171 | |||
172 | /* Imm mask for msrset, msrclr instructions. */ | ||
173 | #define IMM15_MASK 0x00007FFF | ||
174 | +#define IMM16_MASK 0x0000FFFF | ||
175 | |||
176 | #endif /* MICROBLAZE-OPCM */ | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0030-double-imml-generation-for-64-bit-values.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0030-double-imml-generation-for-64-bit-values.patch new file mode 100644 index 00000000..72b9cc9f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0030-double-imml-generation-for-64-bit-values.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 6967f52fe0ebebb4bdf437cb1e683d9e87a013ff Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 26 Aug 2019 15:29:42 +0530 | ||
4 | Subject: [PATCH 30/54] double imml generation for 64 bit values. | ||
5 | |||
6 | Conflicts: | ||
7 | gas/config/tc-microblaze.c | ||
8 | |||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | gas/config/tc-microblaze.c | 321 ++++++++++++++++++++++++++++++------- | ||
12 | opcodes/microblaze-opc.h | 4 +- | ||
13 | 2 files changed, 262 insertions(+), 63 deletions(-) | ||
14 | |||
15 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
16 | =================================================================== | ||
17 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
18 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
19 | @@ -634,8 +634,8 @@ char pvr_register_prefix[] = "rpvr"; | ||
20 | #define MIN_IMM6_WIDTH ((int) 0x00000001) | ||
21 | #define MAX_IMM6_WIDTH ((int) 0x00000040) | ||
22 | |||
23 | -#define MIN_IMML ((long long) 0xffffff8000000000L) | ||
24 | -#define MAX_IMML ((long long) 0x0000007fffffffffL) | ||
25 | +#define MIN_IMML ((long long) -9223372036854775808) | ||
26 | +#define MAX_IMML ((long long) 9223372036854775807) | ||
27 | |||
28 | #endif /* MICROBLAZE_OPC */ | ||
29 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch new file mode 100644 index 00000000..700ec4c3 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0035-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 9ff4551a70734606139f3ecd146cf0a1c45e0fb0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 8 Nov 2021 22:01:23 +0530 | ||
4 | Subject: [PATCH 35/54] ld/emulparams/elf64microblaze: Fix emulation generation | ||
5 | |||
6 | Compilation fails when building ld-new with: | ||
7 | |||
8 | ldemul.o:(.data.rel+0x820): undefined reference to `ld_elf64microblazeel_emulation' | ||
9 | ldemul.o:(.data.rel+0x828): undefined reference to `ld_elf64microblaze_emulation' | ||
10 | |||
11 | The error appears to be that the elf64 files were referencing the elf32 emulation. | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
14 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
15 | --- | ||
16 | ld/emulparams/elf64microblaze.sh | 2 +- | ||
17 | ld/emulparams/elf64microblazeel.sh | 2 +- | ||
18 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/ld/emulparams/elf64microblaze.sh b/ld/emulparams/elf64microblaze.sh | ||
21 | index 9c7b0eb7080..7b4c7c411bd 100644 | ||
22 | --- a/ld/emulparams/elf64microblaze.sh | ||
23 | +++ b/ld/emulparams/elf64microblaze.sh | ||
24 | @@ -19,5 +19,5 @@ NOP=0x80000000 | ||
25 | #$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
26 | #OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
27 | |||
28 | -TEMPLATE_NAME=elf32 | ||
29 | +TEMPLATE_NAME=elf | ||
30 | #GENERATE_SHLIB_SCRIPT=yes | ||
31 | diff --git a/ld/emulparams/elf64microblazeel.sh b/ld/emulparams/elf64microblazeel.sh | ||
32 | index 9c7b0eb7080..7b4c7c411bd 100644 | ||
33 | --- a/ld/emulparams/elf64microblazeel.sh | ||
34 | +++ b/ld/emulparams/elf64microblazeel.sh | ||
35 | @@ -19,5 +19,5 @@ NOP=0x80000000 | ||
36 | #$@{RELOCATING+ PROVIDE (__stack = 0x7000);@} | ||
37 | #OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = _end + 0x1000);' | ||
38 | |||
39 | -TEMPLATE_NAME=elf32 | ||
40 | +TEMPLATE_NAME=elf | ||
41 | #GENERATE_SHLIB_SCRIPT=yes | ||
42 | -- | ||
43 | 2.34.1 | ||
44 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch new file mode 100644 index 00000000..88c0dc4e --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0036-Invalid-data-offsets-pointer-after-relaxation.-Propo.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From a233cd9a21bc94c47c1d33cc10a9e24a5d5b8126 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 24 Jan 2022 16:04:07 +0530 | ||
4 | Subject: [PATCH 36/54] Invalid data offsets (pointer) after relaxation. | ||
5 | Proposed patch from community member (dednev@rambler.ru) against 2021.1 | ||
6 | [CR-1115232] | ||
7 | |||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | bfd/elf32-microblaze.c | 18 ++++++++++++++++++ | ||
11 | 1 file changed, 18 insertions(+) | ||
12 | |||
13 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
14 | index 6ba28e757be..7a4d35493e9 100644 | ||
15 | --- a/bfd/elf32-microblaze.c | ||
16 | +++ b/bfd/elf32-microblaze.c | ||
17 | @@ -2174,6 +2174,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
18 | { | ||
19 | unsigned int val; | ||
20 | |||
21 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
22 | + continue; | ||
23 | + | ||
24 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
25 | |||
26 | /* hax: We only do the following fixup for debug location lists. */ | ||
27 | @@ -2213,6 +2216,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
28 | } | ||
29 | if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32)// || ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_IMML_64) | ||
30 | { | ||
31 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
32 | + continue; | ||
33 | + | ||
34 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
35 | |||
36 | /* Look at the reloc only if the value has been resolved. */ | ||
37 | @@ -2245,6 +2251,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
38 | } | ||
39 | else if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_32_SYM_OP_SYM) | ||
40 | { | ||
41 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
42 | + continue; | ||
43 | + | ||
44 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
45 | |||
46 | /* Look at the reloc only if the value has been resolved. */ | ||
47 | @@ -2282,6 +2291,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
48 | || (ELF32_R_TYPE (irelscan->r_info) | ||
49 | == (int) R_MICROBLAZE_TEXTREL_32_LO)) | ||
50 | { | ||
51 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
52 | + continue; | ||
53 | + | ||
54 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
55 | |||
56 | /* Look at the reloc only if the value has been resolved. */ | ||
57 | @@ -2328,6 +2340,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
58 | || (ELF32_R_TYPE (irelscan->r_info) | ||
59 | == (int) R_MICROBLAZE_TEXTREL_64)) | ||
60 | { | ||
61 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
62 | + continue; | ||
63 | + | ||
64 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
65 | |||
66 | /* Look at the reloc only if the value has been resolved. */ | ||
67 | @@ -2362,6 +2377,9 @@ microblaze_elf_relax_section (bfd *abfd, | ||
68 | } | ||
69 | else if (ELF32_R_TYPE (irelscan->r_info) == (int) R_MICROBLAZE_64_PCREL) | ||
70 | { | ||
71 | + if (ELF32_R_SYM (irelscan->r_info) >= symtab_hdr->sh_info) | ||
72 | + continue; | ||
73 | + | ||
74 | isym = isymbuf + ELF32_R_SYM (irelscan->r_info); | ||
75 | |||
76 | /* Look at the reloc only if the value has been resolved. */ | ||
77 | -- | ||
78 | 2.34.1 | ||
79 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch new file mode 100644 index 00000000..3cae48dc --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0037-Double-free-with-ld-no-keep-memory.-Proposed-patches.patch | |||
@@ -0,0 +1,107 @@ | |||
1 | From 2d0e4a0b3a9ce2ffebc5892cf34219ac01a2475e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 24 Jan 2022 16:59:19 +0530 | ||
4 | Subject: [PATCH 37/54] Double free with ld --no-keep-memory. Proposed patches | ||
5 | from the community member (dednev@rambler.ru) for 2021.1. [CR-1115233] | ||
6 | |||
7 | Conflicts: | ||
8 | bfd/elf32-microblaze.c | ||
9 | bfd/elf64-microblaze.c | ||
10 | |||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/elf32-microblaze.c | 40 ++++++++++++++++++++++------------------ | ||
14 | 1 file changed, 22 insertions(+), 18 deletions(-) | ||
15 | |||
16 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
17 | index 7a4d35493e9..554a80ae0e4 100644 | ||
18 | --- a/bfd/elf32-microblaze.c | ||
19 | +++ b/bfd/elf32-microblaze.c | ||
20 | @@ -1881,10 +1881,8 @@ microblaze_elf_relax_section (bfd *abfd, | ||
21 | { | ||
22 | Elf_Internal_Shdr *symtab_hdr; | ||
23 | Elf_Internal_Rela *internal_relocs; | ||
24 | - Elf_Internal_Rela *free_relocs = NULL; | ||
25 | Elf_Internal_Rela *irel, *irelend; | ||
26 | bfd_byte *contents = NULL; | ||
27 | - bfd_byte *free_contents = NULL; | ||
28 | int rel_count; | ||
29 | unsigned int shndx; | ||
30 | size_t i, sym_index; | ||
31 | @@ -1928,8 +1926,6 @@ microblaze_elf_relax_section (bfd *abfd, | ||
32 | internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, link_info->keep_memory); | ||
33 | if (internal_relocs == NULL) | ||
34 | goto error_return; | ||
35 | - if (! link_info->keep_memory) | ||
36 | - free_relocs = internal_relocs; | ||
37 | |||
38 | sdata->relax_count = 0; | ||
39 | sdata->relax = (struct relax_table *) bfd_malloc ((sec->reloc_count + 1) | ||
40 | @@ -1957,7 +1953,6 @@ microblaze_elf_relax_section (bfd *abfd, | ||
41 | contents = (bfd_byte *) bfd_malloc (sec->size); | ||
42 | if (contents == NULL) | ||
43 | goto error_return; | ||
44 | - free_contents = contents; | ||
45 | |||
46 | if (!bfd_get_section_contents (abfd, sec, contents, | ||
47 | (file_ptr) 0, sec->size)) | ||
48 | @@ -2473,25 +2468,26 @@ microblaze_elf_relax_section (bfd *abfd, | ||
49 | } | ||
50 | |||
51 | elf_section_data (sec)->relocs = internal_relocs; | ||
52 | - free_relocs = NULL; | ||
53 | |||
54 | elf_section_data (sec)->this_hdr.contents = contents; | ||
55 | - free_contents = NULL; | ||
56 | |||
57 | symtab_hdr->contents = (bfd_byte *) isymbuf; | ||
58 | } | ||
59 | |||
60 | - free (free_relocs); | ||
61 | - free_relocs = NULL; | ||
62 | + if (internal_relocs != NULL | ||
63 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
64 | + free (internal_relocs); | ||
65 | |||
66 | - if (free_contents != NULL) | ||
67 | - { | ||
68 | - if (!link_info->keep_memory) | ||
69 | - free (free_contents); | ||
70 | + if (contents != NULL | ||
71 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
72 | + { | ||
73 | + if (! link_info->keep_memory) | ||
74 | + free (contents); | ||
75 | else | ||
76 | - /* Cache the section contents for elf_link_input_bfd. */ | ||
77 | - elf_section_data (sec)->this_hdr.contents = contents; | ||
78 | - free_contents = NULL; | ||
79 | + { | ||
80 | + /* Cache the section contents for elf_link_input_bfd. */ | ||
81 | + elf_section_data (sec)->this_hdr.contents = contents; | ||
82 | + } | ||
83 | } | ||
84 | |||
85 | if (sdata->relax_count == 0) | ||
86 | @@ -2505,8 +2501,16 @@ microblaze_elf_relax_section (bfd *abfd, | ||
87 | return true; | ||
88 | |||
89 | error_return: | ||
90 | - free (free_relocs); | ||
91 | - free (free_contents); | ||
92 | + | ||
93 | + if (isymbuf != NULL | ||
94 | + && symtab_hdr->contents != (unsigned char *) isymbuf) | ||
95 | + free (isymbuf); | ||
96 | + if (internal_relocs != NULL | ||
97 | + && elf_section_data (sec)->relocs != internal_relocs) | ||
98 | + free (internal_relocs); | ||
99 | + if (contents != NULL | ||
100 | + && elf_section_data (sec)->this_hdr.contents != contents) | ||
101 | + free (contents); | ||
102 | free (sdata->relax); | ||
103 | sdata->relax = NULL; | ||
104 | sdata->relax_count = 0; | ||
105 | -- | ||
106 | 2.34.1 | ||
107 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0038-MB-binutils-Upstream-port-issues.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0038-MB-binutils-Upstream-port-issues.patch new file mode 100644 index 00000000..a27a9807 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0038-MB-binutils-Upstream-port-issues.patch | |||
@@ -0,0 +1,83 @@ | |||
1 | From 06e678ebb6c136c85f73ba8a4a064f9050ae47ce Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Sun, 28 Nov 2021 17:17:15 +0530 | ||
4 | Subject: [PATCH 38/54] MB binutils Upstream port issues. | ||
5 | |||
6 | It's resolving the seg faults with ADDLIK | ||
7 | Conflicts: | ||
8 | bfd/elf64-microblaze.c | ||
9 | |||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | gas/config/tc-microblaze.c | 2 +- | ||
13 | opcodes/microblaze-dis.c | 12 ++++++------ | ||
14 | opcodes/microblaze-opc.h | 2 +- | ||
15 | 3 files changed, 8 insertions(+), 8 deletions(-) | ||
16 | |||
17 | Index: gdb-14.2/opcodes/microblaze-dis.c | ||
18 | =================================================================== | ||
19 | --- gdb-14.2.orig/opcodes/microblaze-dis.c | ||
20 | +++ gdb-14.2/opcodes/microblaze-dis.c | ||
21 | @@ -153,7 +153,7 @@ get_field_imm16 (struct string_buf *buf, | ||
22 | |||
23 | static char * | ||
24 | get_field_special (struct string_buf *buf, long instr, | ||
25 | - const struct op_code_struct *op) | ||
26 | + struct op_code_struct *op) | ||
27 | { | ||
28 | char *p = strbuf (buf); | ||
29 | char *spr; | ||
30 | @@ -226,11 +226,11 @@ get_field_special (struct string_buf *bu | ||
31 | static unsigned long | ||
32 | read_insn_microblaze (bfd_vma memaddr, | ||
33 | struct disassemble_info *info, | ||
34 | - const struct op_code_struct **opr) | ||
35 | + struct op_code_struct **opr) | ||
36 | { | ||
37 | unsigned char ibytes[4]; | ||
38 | int status; | ||
39 | - const struct op_code_struct *op; | ||
40 | + struct op_code_struct *op; | ||
41 | unsigned long inst; | ||
42 | |||
43 | status = info->read_memory_func (memaddr, ibytes, 4, info); | ||
44 | @@ -266,7 +266,7 @@ print_insn_microblaze (bfd_vma memaddr, | ||
45 | fprintf_ftype print_func = info->fprintf_func; | ||
46 | void *stream = info->stream; | ||
47 | unsigned long inst, prev_inst; | ||
48 | - const struct op_code_struct *op, *pop; | ||
49 | + struct op_code_struct *op, *pop; | ||
50 | int immval = 0; | ||
51 | bool immfound = false; | ||
52 | static bfd_vma prev_insn_addr = -1; /* Init the prev insn addr. */ | ||
53 | @@ -518,7 +518,7 @@ get_insn_microblaze (long inst, | ||
54 | enum microblaze_instr_type *insn_type, | ||
55 | short *delay_slots) | ||
56 | { | ||
57 | - const struct op_code_struct *op; | ||
58 | + struct op_code_struct *op; | ||
59 | *isunsignedimm = false; | ||
60 | |||
61 | /* Just a linear search of the table. */ | ||
62 | @@ -560,7 +560,7 @@ microblaze_get_target_address (long inst | ||
63 | bool *targetvalid, | ||
64 | bool *unconditionalbranch) | ||
65 | { | ||
66 | - const struct op_code_struct *op; | ||
67 | + struct op_code_struct *op; | ||
68 | long targetaddr = 0; | ||
69 | |||
70 | *unconditionalbranch = false; | ||
71 | Index: gdb-14.2/opcodes/microblaze-opc.h | ||
72 | =================================================================== | ||
73 | --- gdb-14.2.orig/opcodes/microblaze-opc.h | ||
74 | +++ gdb-14.2/opcodes/microblaze-opc.h | ||
75 | @@ -154,7 +154,7 @@ | ||
76 | |||
77 | #define MAX_OPCODES 424 | ||
78 | |||
79 | -const struct op_code_struct | ||
80 | +struct op_code_struct | ||
81 | { | ||
82 | const char * name; | ||
83 | short inst_type; /* Registers and immediate values involved. */ | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0039-Initial-port-of-core-reading-support-Added-support-f.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0039-Initial-port-of-core-reading-support-Added-support-f.patch new file mode 100644 index 00000000..3372de27 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0039-Initial-port-of-core-reading-support-Added-support-f.patch | |||
@@ -0,0 +1,89 @@ | |||
1 | From e907440fcfce0828efa7b059ef0c6d61c7736d02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 10 Oct 2022 16:37:53 +0530 | ||
4 | Subject: [PATCH 39/54] Initial port of core reading support Added support for | ||
5 | reading notes in linux core dumps Support for reading of PRSTATUS and PSINFO | ||
6 | information for rebuilding ".reg" sections of core dumps at run time. | ||
7 | |||
8 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | ||
9 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | ||
10 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | gdb/microblaze-linux-tdep.c | 11 +++++++++++ | ||
14 | gdb/microblaze-tdep.c | 37 +++++++++++++++++++++++++++++++++++++ | ||
15 | 2 files changed, 48 insertions(+) | ||
16 | |||
17 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
18 | index 39592a43f7c..20daef2ccd4 100644 | ||
19 | --- a/gdb/microblaze-linux-tdep.c | ||
20 | +++ b/gdb/microblaze-linux-tdep.c | ||
21 | @@ -193,6 +193,17 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
22 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
23 | set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); | ||
24 | |||
25 | + /* BFD target for core files. */ | ||
26 | + if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
27 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
28 | + else | ||
29 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
30 | + | ||
31 | + | ||
32 | + /* Shared library handling. */ | ||
33 | + set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
34 | + set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver); | ||
35 | + | ||
36 | /* Enable TLS support. */ | ||
37 | set_gdbarch_fetch_tls_load_module_address (gdbarch, | ||
38 | svr4_fetch_objfile_link_map); | ||
39 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
40 | index d4b9ef837e5..363fee34040 100644 | ||
41 | --- a/gdb/microblaze-tdep.c | ||
42 | +++ b/gdb/microblaze-tdep.c | ||
43 | @@ -957,6 +957,43 @@ make_regs (struct gdbarch *arch) | ||
44 | } | ||
45 | #endif | ||
46 | |||
47 | +void | ||
48 | +microblaze_supply_gregset (const struct regset *regset, | ||
49 | + struct regcache *regcache, | ||
50 | + int regnum, const void *gregs) | ||
51 | +{ | ||
52 | + const unsigned int *regs = (const unsigned int *)gregs; | ||
53 | + if (regnum >= 0) | ||
54 | + regcache->raw_supply (regnum, regs + regnum); | ||
55 | + | ||
56 | + if (regnum == -1) { | ||
57 | + int i; | ||
58 | + | ||
59 | + for (i = 0; i < 50; i++) { | ||
60 | + regcache->raw_supply (i, regs + i); | ||
61 | + } | ||
62 | + } | ||
63 | +} | ||
64 | + | ||
65 | + | ||
66 | +/* Return the appropriate register set for the core section identified | ||
67 | + by SECT_NAME and SECT_SIZE. */ | ||
68 | + | ||
69 | +static void | ||
70 | +microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
71 | + iterate_over_regset_sections_cb *cb, | ||
72 | + void *cb_data, | ||
73 | + const struct regcache *regcache) | ||
74 | +{ | ||
75 | + struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
76 | + | ||
77 | + cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
78 | + | ||
79 | + cb(".reg2", tdep->sizeof_fpregset, tdep->sizeof_fpregset, tdep->fpregset, NULL, cb_data); | ||
80 | +} | ||
81 | + | ||
82 | + | ||
83 | + | ||
84 | static struct gdbarch * | ||
85 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
86 | { | ||
87 | -- | ||
88 | 2.34.1 | ||
89 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch new file mode 100644 index 00000000..3ea09e7e --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0040-Fix-build-issues-after-Xilinx-2023.2-binutils-merge.patch | |||
@@ -0,0 +1,185 @@ | |||
1 | From 73b456c4d8f64ec01b170a49330e6de66716eb1a Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 14 Mar 2024 10:41:33 +0530 | ||
4 | Subject: [PATCH 40/54] Fix build issues after Xilinx 2023.2 binutils merge | ||
5 | |||
6 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/bfd-in2.h | 10 ------ | ||
10 | gdb/microblaze-tdep.c | 71 ++++++++++++++-------------------------- | ||
11 | opcodes/microblaze-dis.c | 10 ------ | ||
12 | 3 files changed, 25 insertions(+), 66 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
15 | index 9dcf233f19f..4b022dbfba1 100644 | ||
16 | --- a/bfd/bfd-in2.h | ||
17 | +++ b/bfd/bfd-in2.h | ||
18 | @@ -6473,11 +6473,6 @@ done here - only used for relaxing */ | ||
19 | * +done here - only used for relaxing */ | ||
20 | BFD_RELOC_MICROBLAZE_64_PCREL, | ||
21 | |||
22 | -/* This is a 64 bit reloc that stores the 32 bit relative | ||
23 | - * +value in two words (with an imml instruction). No relocation is | ||
24 | - * +done here - only used for relaxing */ | ||
25 | - BFD_RELOC_MICROBLAZE_64, | ||
26 | - | ||
27 | /* This is a 64 bit reloc that stores the 32 bit relative | ||
28 | * +value in two words (with an imml instruction). No relocation is | ||
29 | * +done here - only used for relaxing */ | ||
30 | @@ -6503,11 +6498,6 @@ value in two words (with an imml instruction). The relocation is | ||
31 | PC-relative GOT offset */ | ||
32 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
33 | |||
34 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
35 | -value in two words (with an imml instruction). The relocation is | ||
36 | -PC-relative GOT offset */ | ||
37 | - BFD_RELOC_MICROBLAZE_64_GPC, | ||
38 | - | ||
39 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
40 | value in two words (with an imm instruction). The relocation is | ||
41 | GOT offset */ | ||
42 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
43 | index 363fee34040..818306f2197 100644 | ||
44 | --- a/gdb/microblaze-tdep.c | ||
45 | +++ b/gdb/microblaze-tdep.c | ||
46 | @@ -70,6 +70,7 @@ static const char *microblaze_abi_string; | ||
47 | static const char *const microblaze_abi_strings[] = { | ||
48 | "auto", | ||
49 | "m64", | ||
50 | + NULL | ||
51 | }; | ||
52 | |||
53 | enum microblaze_abi | ||
54 | @@ -105,7 +106,7 @@ global_microblaze_abi (void) | ||
55 | if (microblaze_abi_strings[i] == microblaze_abi_string) | ||
56 | return (enum microblaze_abi) i; | ||
57 | |||
58 | -// internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
59 | + internal_error (__FILE__, __LINE__, _("unknown ABI string")); | ||
60 | } | ||
61 | |||
62 | static void | ||
63 | @@ -894,16 +895,31 @@ microblaze_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int reg) | ||
64 | } | ||
65 | |||
66 | static void | ||
67 | -microblaze_register_g_packet_guesses (struct gdbarch *gdbarch) | ||
68 | +microblaze_register_g_packet_guesses (struct gdbarch *gdbarch, enum microblaze_abi abi) | ||
69 | { | ||
70 | |||
71 | - register_remote_g_packet_guess (gdbarch, | ||
72 | - 4 * MICROBLAZE_NUM_CORE_REGS, | ||
73 | - tdesc_microblaze64); | ||
74 | + if (abi == MICROBLAZE_ABI_M64) | ||
75 | + { | ||
76 | + | ||
77 | + register_remote_g_packet_guess (gdbarch, | ||
78 | + 8 * MICROBLAZE_NUM_CORE_REGS, | ||
79 | + tdesc_microblaze64); | ||
80 | + | ||
81 | + register_remote_g_packet_guess (gdbarch, | ||
82 | + 8 * MICROBLAZE_NUM_REGS, | ||
83 | + tdesc_microblaze64_with_stack_protect); | ||
84 | + } | ||
85 | + else | ||
86 | + { | ||
87 | + | ||
88 | + register_remote_g_packet_guess (gdbarch, | ||
89 | + 4 * MICROBLAZE_NUM_CORE_REGS, | ||
90 | + tdesc_microblaze); | ||
91 | |||
92 | - register_remote_g_packet_guess (gdbarch, | ||
93 | - 4 * MICROBLAZE_NUM_REGS, | ||
94 | - tdesc_microblaze64_with_stack_protect); | ||
95 | + register_remote_g_packet_guess (gdbarch, | ||
96 | + 4 * MICROBLAZE_NUM_REGS, | ||
97 | + tdesc_microblaze_with_stack_protect); | ||
98 | + } | ||
99 | } | ||
100 | |||
101 | void | ||
102 | @@ -957,43 +973,6 @@ make_regs (struct gdbarch *arch) | ||
103 | } | ||
104 | #endif | ||
105 | |||
106 | -void | ||
107 | -microblaze_supply_gregset (const struct regset *regset, | ||
108 | - struct regcache *regcache, | ||
109 | - int regnum, const void *gregs) | ||
110 | -{ | ||
111 | - const unsigned int *regs = (const unsigned int *)gregs; | ||
112 | - if (regnum >= 0) | ||
113 | - regcache->raw_supply (regnum, regs + regnum); | ||
114 | - | ||
115 | - if (regnum == -1) { | ||
116 | - int i; | ||
117 | - | ||
118 | - for (i = 0; i < 50; i++) { | ||
119 | - regcache->raw_supply (i, regs + i); | ||
120 | - } | ||
121 | - } | ||
122 | -} | ||
123 | - | ||
124 | - | ||
125 | -/* Return the appropriate register set for the core section identified | ||
126 | - by SECT_NAME and SECT_SIZE. */ | ||
127 | - | ||
128 | -static void | ||
129 | -microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
130 | - iterate_over_regset_sections_cb *cb, | ||
131 | - void *cb_data, | ||
132 | - const struct regcache *regcache) | ||
133 | -{ | ||
134 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
135 | - | ||
136 | - cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
137 | - | ||
138 | - cb(".reg2", tdep->sizeof_fpregset, tdep->sizeof_fpregset, tdep->fpregset, NULL, cb_data); | ||
139 | -} | ||
140 | - | ||
141 | - | ||
142 | - | ||
143 | static struct gdbarch * | ||
144 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
145 | { | ||
146 | @@ -1134,7 +1113,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
147 | |||
148 | set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); | ||
149 | |||
150 | - //microblaze_register_g_packet_guesses (gdbarch); | ||
151 | + // microblaze_register_g_packet_guesses (gdbarch, microblaze_abi); | ||
152 | |||
153 | frame_base_set_default (gdbarch, µblaze_frame_base); | ||
154 | |||
155 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
156 | index 540ddecafd4..00712d5eaf1 100644 | ||
157 | --- a/opcodes/microblaze-dis.c | ||
158 | +++ b/opcodes/microblaze-dis.c | ||
159 | @@ -466,10 +466,6 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
160 | print_func (stream, "\t%s, %s", get_field_r1 (&buf, inst), | ||
161 | get_field_r2 (&buf, inst)); | ||
162 | break; | ||
163 | - case INST_TYPE_IMML: | ||
164 | - print_func (stream, "\t%s", get_field_imml (&buf, inst)); | ||
165 | - /* TODO: Also print symbol */ | ||
166 | - break; | ||
167 | case INST_TYPE_RD_IMM15: | ||
168 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), | ||
169 | get_field_imm15 (&buf, inst)); | ||
170 | @@ -484,12 +480,6 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
171 | case INST_TYPE_RD_IMML: | ||
172 | print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
173 | break; | ||
174 | - /* For bit field insns. */ | ||
175 | - case INST_TYPE_RD_R1_IMMW_IMMS: | ||
176 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst), get_field_r1(&buf, inst), | ||
177 | - get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
178 | - break; | ||
179 | - /* For bit field insns. */ | ||
180 | case INST_TYPE_RD_R1_IMMW_IMMS: | ||
181 | print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
182 | break; | ||
183 | -- | ||
184 | 2.34.1 | ||
185 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0041-disable-truncated-register-warning-gdb-remote.c.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0041-disable-truncated-register-warning-gdb-remote.c.patch new file mode 100644 index 00000000..6f5a5f1e --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0041-disable-truncated-register-warning-gdb-remote.c.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From a96aee31c41e4d851531100a0716401c3464f6ef Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 14 Mar 2024 15:44:56 +0530 | ||
4 | Subject: [PATCH 41/54] disable truncated register warning (gdb/remote.c) | ||
5 | |||
6 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
7 | --- | ||
8 | gdb/remote.c | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/gdb/remote.c b/gdb/remote.c | ||
12 | index ae08c980efc..8055c8f62e6 100644 | ||
13 | --- a/gdb/remote.c | ||
14 | +++ b/gdb/remote.c | ||
15 | @@ -8678,7 +8678,7 @@ remote_target::process_g_packet (struct regcache *regcache) | ||
16 | if (rsa->regs[i].pnum == -1) | ||
17 | continue; | ||
18 | |||
19 | - if (offset >= sizeof_g_packet) | ||
20 | + if (offset >= sizeof_g_packet || (offset + reg_size > sizeof_g_packet)) | ||
21 | rsa->regs[i].in_g_packet = 0; | ||
22 | else if (offset + reg_size > sizeof_g_packet) | ||
23 | error (_("Truncated register %d in remote 'g' packet"), i); | ||
24 | -- | ||
25 | 2.34.1 | ||
26 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch new file mode 100644 index 00000000..0b5f27b4 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0042-Fix-unresolved-conflicts-from-binutils_2_42_merge.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From f9ffc37f48bd9213e89c8821cd07fc679e113007 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 10:20:48 +0530 | ||
4 | Subject: [PATCH 42/54] Fix unresolved conflicts from binutils_2_42_merge | ||
5 | |||
6 | opcodes/microblaze-dis.c | ||
7 | |||
8 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | opcodes/microblaze-dis.c | 15 ++++++++++----- | ||
12 | 1 file changed, 10 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/opcodes/microblaze-dis.c b/opcodes/microblaze-dis.c | ||
15 | index 00712d5eaf1..31dbad46b75 100644 | ||
16 | --- a/opcodes/microblaze-dis.c | ||
17 | +++ b/opcodes/microblaze-dis.c | ||
18 | @@ -478,11 +478,16 @@ print_insn_microblaze (bfd_vma memaddr, struct disassemble_info * info) | ||
19 | case INST_TYPE_NONE: | ||
20 | break; | ||
21 | case INST_TYPE_RD_IMML: | ||
22 | - print_func (stream, "\t%s, %s", get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
23 | - break; | ||
24 | - case INST_TYPE_RD_R1_IMMW_IMMS: | ||
25 | - print_func (stream, "\t%s, %s, %s, %s", get_field_rd (&buf, inst),get_field_r1(&buf, inst),get_field_immw (&buf, inst), get_field_imms (&buf, inst)); | ||
26 | - break; | ||
27 | + print_func (stream, "\t%s, %s", | ||
28 | + get_field_rd (&buf, inst), get_field_imm16 (&buf, inst)); | ||
29 | + break; | ||
30 | + case INST_TYPE_RD_R1_IMMW_IMMS: | ||
31 | + print_func (stream, "\t%s, %s, %s, %s", | ||
32 | + get_field_rd (&buf, inst), | ||
33 | + get_field_r1(&buf, inst), | ||
34 | + get_field_immw (&buf, inst), | ||
35 | + get_field_imms (&buf, inst)); | ||
36 | + break; | ||
37 | /* For tuqula instruction */ | ||
38 | case INST_TYPE_RD: | ||
39 | print_func (stream, "\t%s", get_field_rd (&buf, inst)); | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch new file mode 100644 index 00000000..5e1fb44f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0043-microblaze_gdbarch_init-set-microblaze_abi-based-on-.patch | |||
@@ -0,0 +1,177 @@ | |||
1 | From 03df31becbc7dc6d35189fec3b4b2c7dfd3a8103 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 10:59:40 +0530 | ||
4 | Subject: [PATCH 43/54] microblaze_gdbarch_init: set microblaze_abi based on | ||
5 | wanted_abi and found_abi | ||
6 | |||
7 | Earlier found_abi was declared but not set, instead gdbarch_info info | ||
8 | was checked every time. Also, microblaze_abi remained undefined for 32-bit | ||
9 | machines. As a result, gdb would show 64-bit registers when connecting | ||
10 | to 32-bit targets with all register values garbled (r5 ended up in r2). | ||
11 | This defect is fixed. found_abi is set from gdbarch_info, microblaze_abi | ||
12 | is set based on wanted_abi and found_abi. Now upon connecting to a 32-bit | ||
13 | remote target (mb-qemu) registers have the correct 32-bit size. | ||
14 | |||
15 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
16 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
17 | --- | ||
18 | gdb/microblaze-tdep.c | 73 +++++++++++++++++++------------------------ | ||
19 | 1 file changed, 33 insertions(+), 40 deletions(-) | ||
20 | |||
21 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
22 | index 818306f2197..47863819724 100644 | ||
23 | --- a/gdb/microblaze-tdep.c | ||
24 | +++ b/gdb/microblaze-tdep.c | ||
25 | @@ -116,7 +116,7 @@ show_microblaze_abi (struct ui_file *file, | ||
26 | const char *ignored_value) | ||
27 | { | ||
28 | enum microblaze_abi global_abi = global_microblaze_abi (); | ||
29 | - enum microblaze_abi actual_abi = microblaze_abi (target_gdbarch ()); | ||
30 | + enum microblaze_abi actual_abi = microblaze_abi (current_inferior ()->arch ()); | ||
31 | const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
32 | |||
33 | #if 1 | ||
34 | @@ -203,6 +203,13 @@ microblaze_register_name (struct gdbarch *gdbarch, int regnum) | ||
35 | static struct type * | ||
36 | microblaze_register_type (struct gdbarch *gdbarch, int regnum) | ||
37 | { | ||
38 | + | ||
39 | + int mb_reg_size = microblaze_abi_regsize(gdbarch); | ||
40 | + | ||
41 | + if (gdbarch_debug) | ||
42 | + gdb_printf (gdb_stdlog, "microblaze_register_type: reg_size = %d\n", | ||
43 | + mb_reg_size); | ||
44 | + | ||
45 | if (regnum == MICROBLAZE_SP_REGNUM) | ||
46 | return builtin_type (gdbarch)->builtin_data_ptr; | ||
47 | |||
48 | @@ -980,34 +987,38 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
49 | enum microblaze_abi microblaze_abi, found_abi, wanted_abi; | ||
50 | const struct target_desc *tdesc = info.target_desc; | ||
51 | |||
52 | + /* If there is already a candidate, use it. */ | ||
53 | + arches = gdbarch_list_lookup_by_info (arches, &info); | ||
54 | + if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
55 | + return arches->gdbarch; | ||
56 | + | ||
57 | /* What has the user specified from the command line? */ | ||
58 | wanted_abi = global_microblaze_abi (); | ||
59 | if (gdbarch_debug) | ||
60 | gdb_printf (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
61 | wanted_abi); | ||
62 | + | ||
63 | + found_abi = MICROBLAZE_ABI_AUTO; | ||
64 | + | ||
65 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) | ||
66 | + found_abi = MICROBLAZE_ABI_M64; | ||
67 | + | ||
68 | if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
69 | microblaze_abi = wanted_abi; | ||
70 | - | ||
71 | - /* If there is already a candidate, use it. */ | ||
72 | - arches = gdbarch_list_lookup_by_info (arches, &info); | ||
73 | - if ((arches != NULL) && (microblaze_abi != MICROBLAZE_ABI_M64)) | ||
74 | - return arches->gdbarch; | ||
75 | + else | ||
76 | + microblaze_abi = found_abi; | ||
77 | |||
78 | if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
79 | { | ||
80 | - tdesc = tdesc_microblaze64; | ||
81 | - reg_size = 8; | ||
82 | + tdesc = tdesc_microblaze64; | ||
83 | + reg_size = 8; | ||
84 | } | ||
85 | - if (tdesc == NULL) | ||
86 | + else | ||
87 | { | ||
88 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
89 | - { | ||
90 | - tdesc = tdesc_microblaze64; | ||
91 | - reg_size = 8; | ||
92 | - } | ||
93 | - else | ||
94 | - tdesc = tdesc_microblaze; | ||
95 | + tdesc = tdesc_microblaze; | ||
96 | + reg_size = 4; | ||
97 | } | ||
98 | + | ||
99 | /* Check any target description for validity. */ | ||
100 | if (tdesc_has_registers (tdesc)) | ||
101 | { | ||
102 | @@ -1015,7 +1026,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
103 | int valid_p; | ||
104 | int i; | ||
105 | |||
106 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
107 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
108 | feature = tdesc_find_feature (tdesc, | ||
109 | "org.gnu.gdb.microblaze64.core"); | ||
110 | else | ||
111 | @@ -1029,7 +1040,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
112 | for (i = 0; i < MICROBLAZE_NUM_REGS; i++) | ||
113 | valid_p &= tdesc_numbered_register (feature, tdesc_data.get(), i, | ||
114 | microblaze_register_names[i]); | ||
115 | - if ((info.bfd_arch_info->mach == bfd_mach_microblaze64) || (microblaze_abi == MICROBLAZE_ABI_M64)) | ||
116 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
117 | feature = tdesc_find_feature (tdesc, | ||
118 | "org.gnu.gdb.microblaze64.stack-protect"); | ||
119 | else | ||
120 | @@ -1075,15 +1086,11 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
121 | |||
122 | /* Register set. | ||
123 | make_regs (gdbarch); */ | ||
124 | - switch (info.bfd_arch_info->mach) | ||
125 | - { | ||
126 | - case bfd_mach_microblaze64: | ||
127 | - set_gdbarch_ptr_bit (gdbarch, 64); | ||
128 | - break; | ||
129 | - } | ||
130 | - if(microblaze_abi == MICROBLAZE_ABI_M64) | ||
131 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
132 | set_gdbarch_ptr_bit (gdbarch, 64); | ||
133 | - | ||
134 | + else | ||
135 | + set_gdbarch_ptr_bit (gdbarch, 32); | ||
136 | + | ||
137 | /* Map Dwarf2 registers to GDB registers. */ | ||
138 | set_gdbarch_dwarf2_reg_to_regnum (gdbarch, microblaze_dwarf2_reg_to_regnum); | ||
139 | |||
140 | @@ -1105,8 +1112,6 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
141 | microblaze_breakpoint::bp_from_kind); | ||
142 | // set_gdbarch_memory_remove_breakpoint (gdbarch, microblaze_linux_memory_remove_breakpoint); | ||
143 | |||
144 | -// set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
145 | - | ||
146 | set_gdbarch_software_single_step (gdbarch, microblaze_software_single_step); | ||
147 | |||
148 | set_gdbarch_frame_args_skip (gdbarch, 8); | ||
149 | @@ -1145,9 +1150,6 @@ _initialize_microblaze_tdep () | ||
150 | |||
151 | gdbarch_register (bfd_arch_microblaze, microblaze_gdbarch_init); | ||
152 | |||
153 | -// static struct cmd_list_element *setmicroblazecmdlist = NULL; | ||
154 | -// static struct cmd_list_element *showmicroblazecmdlist = NULL; | ||
155 | - | ||
156 | /* Add root prefix command for all "set microblaze"/"show microblaze" commands. */ | ||
157 | |||
158 | add_setshow_prefix_cmd ("microblaze", no_class, | ||
159 | @@ -1155,15 +1157,6 @@ _initialize_microblaze_tdep () | ||
160 | _("Various microblaze specific commands."), | ||
161 | &setmicroblazecmdlist,&showmicroblazecmdlist, | ||
162 | &setlist,&showlist); | ||
163 | -#if 0 | ||
164 | - add_prefix_cmd ("microblaze", no_class, set_microblaze_command, | ||
165 | - _("Various microblaze specific commands."), | ||
166 | - &setmicroblazecmdlist, "set microblaze ", 0, &setlist); | ||
167 | - | ||
168 | - add_prefix_cmd ("microblaze", no_class, show_microblaze_command, | ||
169 | - _("Various microblaze specific commands."), | ||
170 | - &showmicroblazecmdlist, "show microblaze ", 0, &showlist); | ||
171 | -#endif | ||
172 | |||
173 | /* Allow the user to override the ABI. */ | ||
174 | add_setshow_enum_cmd ("abi", class_obscure, microblaze_abi_strings, | ||
175 | -- | ||
176 | 2.34.1 | ||
177 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch new file mode 100644 index 00000000..f949a982 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0044-Start-bfd_mach_microblaze-values-from-0-0-1-instead-.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 254bd83017b21301c73e7501c71b2cf128ac18d9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 11:36:32 +0530 | ||
4 | Subject: [PATCH 44/54] Start bfd_mach_microblaze values from 0 (0,1) instead | ||
5 | of (1,2) | ||
6 | |||
7 | Before 64-bit support there was only bfd_mach_microblaze (implicitly set to 0), | ||
8 | setting microblaze_mach_microblaze64 to 1 | ||
9 | |||
10 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
11 | --- | ||
12 | bfd/archures.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/bfd/archures.c b/bfd/archures.c | ||
16 | index 2994a09bc37..e552349319f 100644 | ||
17 | --- a/bfd/archures.c | ||
18 | +++ b/bfd/archures.c | ||
19 | @@ -515,8 +515,8 @@ DESCRIPTION | ||
20 | . bfd_arch_lm32, {* Lattice Mico32. *} | ||
21 | .#define bfd_mach_lm32 1 | ||
22 | . bfd_arch_microblaze,{* Xilinx MicroBlaze. *} | ||
23 | -.#define bfd_mach_microblaze 1 | ||
24 | -.#define bfd_mach_microblaze64 2 | ||
25 | +.#define bfd_mach_microblaze 0 | ||
26 | +.#define bfd_mach_microblaze64 1 | ||
27 | . bfd_arch_kvx, {* Kalray VLIW core of the MPPA processor family *} | ||
28 | .#define bfd_mach_kv3_unknown 0 | ||
29 | .#define bfd_mach_kv3_1 1 | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch new file mode 100644 index 00000000..6e4137ef --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0045-Fix-build-issues-bfd-reloc.c-add-missing-relocs-used.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | From b2377a83918c814fd3b6ee2cd46a5f413f97a08e Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 15:37:11 +0530 | ||
4 | Subject: [PATCH 45/54] Fix build issues - bfd/reloc.c add missing relocs used | ||
5 | elsewhere | ||
6 | |||
7 | BFD_RELOC_MICROBLAZE_EA64 | ||
8 | BFD_RELOC_MICROBLAZE_64_GPC | ||
9 | |||
10 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/reloc.c | 16 +++++++++++----- | ||
14 | 1 file changed, 11 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/bfd/reloc.c b/bfd/reloc.c | ||
17 | index fc28e27662f..5afe1518cd0 100644 | ||
18 | --- a/bfd/reloc.c | ||
19 | +++ b/bfd/reloc.c | ||
20 | @@ -6672,13 +6672,19 @@ ENUMDOC | ||
21 | This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
22 | to two words (uses imml instruction). | ||
23 | ENUM | ||
24 | -BFD_RELOC_MICROBLAZE_64, | ||
25 | +BFD_RELOC_MICROBLAZE_64 | ||
26 | ENUMDOC | ||
27 | This is a 64 bit reloc that stores the 64 bit pc relative | ||
28 | value in two words (with an imml instruction). No relocation is | ||
29 | done here - only used for relaxing | ||
30 | ENUM | ||
31 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
32 | +BFD_RELOC_MICROBLAZE_EA64 | ||
33 | +ENUMDOC | ||
34 | + This is a 64 bit reloc that stores the 64 bit pc relative | ||
35 | + value in two words (with an imml instruction). No relocation is | ||
36 | + done here - only used for relaxing | ||
37 | +ENUM | ||
38 | +BFD_RELOC_MICROBLAZE_64_PCREL | ||
39 | ENUMDOC | ||
40 | This is a 32 bit reloc that stores the 32 bit pc relative | ||
41 | value in two words (with an imml instruction). No relocation is | ||
42 | @@ -6721,13 +6727,13 @@ ENUMDOC | ||
43 | value in two words (with an imml instruction). No relocation is | ||
44 | done here - only used for relaxing | ||
45 | ENUM | ||
46 | -BFD_RELOC_MICROBLAZE_64_PCREL, | ||
47 | +BFD_RELOC_MICROBLAZE_64_GOTPC | ||
48 | ENUMDOC | ||
49 | - This is a 32 bit reloc that stores the 32 bit pc relative | ||
50 | + This is a 64 bit reloc that stores the 32 bit pc relative | ||
51 | value in two words (with an imml instruction). No relocation is | ||
52 | done here - only used for relaxing | ||
53 | ENUM | ||
54 | - BFD_RELOC_MICROBLAZE_64_GOTPC | ||
55 | + BFD_RELOC_MICROBLAZE_64_GPC | ||
56 | ENUMDOC | ||
57 | This is a 64 bit reloc that stores the 32 bit pc relative | ||
58 | value in two words (with an imml instruction). No relocation is | ||
59 | -- | ||
60 | 2.34.1 | ||
61 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch new file mode 100644 index 00000000..e9383c6f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0046-Regenerate-bfd-bfd-in2.h-bfd-libbfd.h.patch | |||
@@ -0,0 +1,125 @@ | |||
1 | From 4d201d0a948ab6160f449d41a50a6794dd3efde7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 15:47:56 +0530 | ||
4 | Subject: [PATCH 46/54] Regenerate - bfd/bfd-in2.h bfd/libbfd.h | ||
5 | |||
6 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/bfd-in2.h | 65 +++++++++++++++++++++++++++++---------------------- | ||
10 | 1 file changed, 37 insertions(+), 28 deletions(-) | ||
11 | |||
12 | diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h | ||
13 | index 4b022dbfba1..171de10910c 100644 | ||
14 | --- a/bfd/bfd-in2.h | ||
15 | +++ b/bfd/bfd-in2.h | ||
16 | @@ -1771,8 +1771,8 @@ enum bfd_architecture | ||
17 | bfd_arch_lm32, /* Lattice Mico32. */ | ||
18 | #define bfd_mach_lm32 1 | ||
19 | bfd_arch_microblaze,/* Xilinx MicroBlaze. */ | ||
20 | -#define bfd_mach_microblaze 1 | ||
21 | -#define bfd_mach_microblaze64 2 | ||
22 | +#define bfd_mach_microblaze 0 | ||
23 | +#define bfd_mach_microblaze64 1 | ||
24 | bfd_arch_kvx, /* Kalray VLIW core of the MPPA processor family */ | ||
25 | #define bfd_mach_kv3_unknown 0 | ||
26 | #define bfd_mach_kv3_1 1 | ||
27 | @@ -6440,9 +6440,27 @@ the linker could optimize the movq to a leaq if possible. */ | ||
28 | /* Relative offset within page of GOT slot. */ | ||
29 | BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, | ||
30 | |||
31 | -/* Address of a GOT entry. */ | ||
32 | +/* Address of a GOT entry. | ||
33 | + | ||
34 | +This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
35 | +to two words (uses imml instruction). */ | ||
36 | BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, | ||
37 | |||
38 | +/* This is a 64 bit reloc that stores the 64 bit pc relative | ||
39 | +value in two words (with an imml instruction). No relocation is | ||
40 | +done here - only used for relaxing */ | ||
41 | + BFD_RELOC_MICROBLAZE_64, | ||
42 | + | ||
43 | +/* This is a 64 bit reloc that stores the 64 bit pc relative | ||
44 | +value in two words (with an imml instruction). No relocation is | ||
45 | +done here - only used for relaxing */ | ||
46 | + BFD_RELOC_MICROBLAZE_EA64, | ||
47 | + | ||
48 | +/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
49 | +value in two words (with an imml instruction). No relocation is | ||
50 | +done here - only used for relaxing */ | ||
51 | + BFD_RELOC_MICROBLAZE_64_PCREL, | ||
52 | + | ||
53 | /* This is a 32 bit reloc for the microblaze that stores the | ||
54 | low 16 bits of a value */ | ||
55 | BFD_RELOC_MICROBLAZE_32_LO, | ||
56 | @@ -6468,34 +6486,19 @@ value in two words (with an imm instruction). No relocation is | ||
57 | done here - only used for relaxing */ | ||
58 | BFD_RELOC_MICROBLAZE_32_NONE, | ||
59 | |||
60 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
61 | - * +value in two words (with an imml instruction). No relocation is | ||
62 | - * +done here - only used for relaxing */ | ||
63 | - BFD_RELOC_MICROBLAZE_64_PCREL, | ||
64 | - | ||
65 | -/* This is a 64 bit reloc that stores the 32 bit relative | ||
66 | - * +value in two words (with an imml instruction). No relocation is | ||
67 | - * +done here - only used for relaxing */ | ||
68 | - BFD_RELOC_MICROBLAZE_EA64, | ||
69 | - | ||
70 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
71 | - * +value in two words (with an imm instruction). No relocation is | ||
72 | - * +done here - only used for relaxing */ | ||
73 | - BFD_RELOC_MICROBLAZE_64_NONE, | ||
74 | - | ||
75 | -/* This is a 64 bit reloc that stores the 32 bit pc relative | ||
76 | - * +value in two words (with an imml instruction). No relocation is | ||
77 | - * +done here - only used for relaxing */ | ||
78 | - BFD_RELOC_MICROBLAZE_64, | ||
79 | +/* This is a 32 bit reloc that stores the 32 bit pc relative | ||
80 | +value in two words (with an imml instruction). No relocation is | ||
81 | +done here - only used for relaxing */ | ||
82 | + BFD_RELOC_MICROBLAZE_64_NONE, | ||
83 | |||
84 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
85 | -value in two words (with an imm instruction). The relocation is | ||
86 | -PC-relative GOT offset */ | ||
87 | +value in two words (with an imml instruction). No relocation is | ||
88 | +done here - only used for relaxing */ | ||
89 | BFD_RELOC_MICROBLAZE_64_GOTPC, | ||
90 | |||
91 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
92 | -value in two words (with an imml instruction). The relocation is | ||
93 | -PC-relative GOT offset */ | ||
94 | +value in two words (with an imml instruction). No relocation is | ||
95 | +done here - only used for relaxing */ | ||
96 | BFD_RELOC_MICROBLAZE_64_GPC, | ||
97 | |||
98 | /* This is a 64 bit reloc that stores the 32 bit pc relative | ||
99 | @@ -7199,7 +7202,10 @@ assembler and not (currently) written to any object files. */ | ||
100 | BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA, | ||
101 | BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA, | ||
102 | |||
103 | -/* Tilera TILE-Gx Relocations. */ | ||
104 | +/* Tilera TILE-Gx Relocations. | ||
105 | + | ||
106 | +This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
107 | +to two words (uses imml instruction). */ | ||
108 | BFD_RELOC_TILEGX_HW0, | ||
109 | BFD_RELOC_TILEGX_HW1, | ||
110 | BFD_RELOC_TILEGX_HW2, | ||
111 | @@ -7310,7 +7316,10 @@ assembler and not (currently) written to any object files. */ | ||
112 | BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, | ||
113 | BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD, | ||
114 | |||
115 | -/* Linux eBPF relocations. */ | ||
116 | +/* Linux eBPF relocations. | ||
117 | + | ||
118 | +This is a 64 bit reloc that stores 64-bit thread pointer relative offset | ||
119 | +to two words (uses imml instruction). */ | ||
120 | BFD_RELOC_BPF_64, | ||
121 | BFD_RELOC_BPF_DISP32, | ||
122 | BFD_RELOC_BPF_DISPCALL32, | ||
123 | -- | ||
124 | 2.34.1 | ||
125 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch new file mode 100644 index 00000000..d31eb8ee --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0047-gdb-remote.c-revert-earlier-change-to-process_g_pack.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 2a1036ac7639aa3b67b1f1ad7e1a6e7c4c22704b Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 28 Mar 2024 16:32:22 +0530 | ||
4 | Subject: [PATCH 47/54] gdb/remote.c - revert earlier change to | ||
5 | process_g_packet | ||
6 | |||
7 | When connecting to remote target, gdb (microblaze-xilinx-elf) was | ||
8 | generating Truncated register 29 error when parsing the g packet, | ||
9 | workaround added being reverted. | ||
10 | |||
11 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
12 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
13 | --- | ||
14 | gdb/remote.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/gdb/remote.c b/gdb/remote.c | ||
18 | index 8055c8f62e6..ae08c980efc 100644 | ||
19 | --- a/gdb/remote.c | ||
20 | +++ b/gdb/remote.c | ||
21 | @@ -8678,7 +8678,7 @@ remote_target::process_g_packet (struct regcache *regcache) | ||
22 | if (rsa->regs[i].pnum == -1) | ||
23 | continue; | ||
24 | |||
25 | - if (offset >= sizeof_g_packet || (offset + reg_size > sizeof_g_packet)) | ||
26 | + if (offset >= sizeof_g_packet) | ||
27 | rsa->regs[i].in_g_packet = 0; | ||
28 | else if (offset + reg_size > sizeof_g_packet) | ||
29 | error (_("Truncated register %d in remote 'g' packet"), i); | ||
30 | -- | ||
31 | 2.34.1 | ||
32 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch new file mode 100644 index 00000000..f9cbb4a6 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0048-Fix-build-issues-after-Xilinx-2023.2-binutils-patch-.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 6a5887919f00da84c973ec61c59efcd7d0fb120e Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Mon, 1 Apr 2024 16:21:28 +0530 | ||
4 | Subject: [PATCH 48/54] Fix build issues after Xilinx 2023.2 binutils patch | ||
5 | merge | ||
6 | |||
7 | binutils/readelf.c - duplicate case statement | ||
8 | gas/config/tc-microblaze.c - Missing , between array elements | ||
9 | gas/config/tc-microblaze.c - A whole hunk ended up in wrong function/switch | ||
10 | |||
11 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
12 | --- | ||
13 | bfd/libbfd.h | 6 +- | ||
14 | binutils/readelf.c | 5 - | ||
15 | gas/config/tc-microblaze.c | 375 +++++++++++++++++++------------------ | ||
16 | 3 files changed, 192 insertions(+), 194 deletions(-) | ||
17 | |||
18 | Index: gdb-14.2/bfd/libbfd.h | ||
19 | =================================================================== | ||
20 | --- gdb-14.2.orig/bfd/libbfd.h | ||
21 | +++ gdb-14.2/bfd/libbfd.h | ||
22 | @@ -3005,6 +3005,9 @@ static const char *const bfd_reloc_code_ | ||
23 | "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21", | ||
24 | "BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12", | ||
25 | "BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT", | ||
26 | + "BFD_RELOC_MICROBLAZE_64", | ||
27 | + "BFD_RELOC_MICROBLAZE_EA64", | ||
28 | + "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
29 | "BFD_RELOC_MICROBLAZE_32_LO", | ||
30 | "BFD_RELOC_MICROBLAZE_32_LO_PCREL", | ||
31 | "BFD_RELOC_MICROBLAZE_32_ROSDA", | ||
32 | @@ -3013,13 +3016,12 @@ static const char *const bfd_reloc_code_ | ||
33 | "BFD_RELOC_MICROBLAZE_32_NONE", | ||
34 | "BFD_RELOC_MICROBLAZE_64_NONE", | ||
35 | "BFD_RELOC_MICROBLAZE_64_GOTPC", | ||
36 | + "BFD_RELOC_MICROBLAZE_64_GPC", | ||
37 | "BFD_RELOC_MICROBLAZE_64_GOT", | ||
38 | "BFD_RELOC_MICROBLAZE_64_PLT", | ||
39 | "BFD_RELOC_MICROBLAZE_64_GOTOFF", | ||
40 | "BFD_RELOC_MICROBLAZE_32_GOTOFF", | ||
41 | "BFD_RELOC_MICROBLAZE_COPY", | ||
42 | - "BFD_RELOC_MICROBLAZE_64", | ||
43 | - "BFD_RELOC_MICROBLAZE_64_PCREL", | ||
44 | "BFD_RELOC_MICROBLAZE_64_TLS", | ||
45 | "BFD_RELOC_MICROBLAZE_64_TLSGD", | ||
46 | "BFD_RELOC_MICROBLAZE_64_TLSLD", | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0049-Add-back-R_MICROBLAZE_NONE-for-linker-relaxation-pro.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0049-Add-back-R_MICROBLAZE_NONE-for-linker-relaxation-pro.patch new file mode 100644 index 00000000..76fcef7d --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0049-Add-back-R_MICROBLAZE_NONE-for-linker-relaxation-pro.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From bf491bdb2e4d30c14968be096969da700dedfc64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Wed, 17 Apr 2024 16:14:14 +0530 | ||
4 | Subject: [PATCH 49/54] Add back R_MICROBLAZE_NONE for linker relaxation | ||
5 | processing | ||
6 | |||
7 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | bfd/elf32-microblaze.c | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c | ||
14 | index 554a80ae0e4..ec6613b6572 100644 | ||
15 | --- a/bfd/elf32-microblaze.c | ||
16 | +++ b/bfd/elf32-microblaze.c | ||
17 | @@ -2102,6 +2102,7 @@ microblaze_elf_relax_section (bfd *abfd, | ||
18 | irel->r_addend); | ||
19 | } | ||
20 | break; | ||
21 | + case R_MICROBLAZE_NONE: | ||
22 | case R_MICROBLAZE_32_NONE: | ||
23 | { | ||
24 | /* This was a PC-relative instruction that was | ||
25 | -- | ||
26 | 2.34.1 | ||
27 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0050-When-unwinding-pc-value-adjust-return-pc-value.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0050-When-unwinding-pc-value-adjust-return-pc-value.patch new file mode 100644 index 00000000..c9da78c3 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0050-When-unwinding-pc-value-adjust-return-pc-value.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | From d8b25fd6d8cac000bb8f5ad65ada949447322fca Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Wed, 1 May 2024 11:12:32 +0530 | ||
4 | Subject: [PATCH 50/54] When unwinding pc value, adjust return pc value | ||
5 | |||
6 | A call (branch and link) instruction can include a delay slot, the | ||
7 | value of pc stored in the link register for Microblaze architecture | ||
8 | is the pc value corresponding to last executed instruction (call) | ||
9 | in the caller. The return instruction (branch reg) includes an | ||
10 | offset of 8 so that when function returns execution continues from | ||
11 | the address at : link register + 8, as the instruction in delay slot | ||
12 | (link register + 4) is already executed at the time of call. | ||
13 | |||
14 | Handle this by adjusting pc value during unwind-pc. | ||
15 | |||
16 | Basically restoring code to do this that seems to have been removed | ||
17 | as part of a gdb patch (gdb patch #8, Xilinx Yocto 2023.2) | ||
18 | |||
19 | That patch caused hundreds of regressions in gdb testuite, including | ||
20 | gdb.base/advance.exp, which is now fixed. | ||
21 | |||
22 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
23 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
24 | --- | ||
25 | gdb/microblaze-tdep.c | 24 ++++++++++++++++++------ | ||
26 | 1 file changed, 18 insertions(+), 6 deletions(-) | ||
27 | |||
28 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
29 | index 47863819724..f87e406ada0 100644 | ||
30 | --- a/gdb/microblaze-tdep.c | ||
31 | +++ b/gdb/microblaze-tdep.c | ||
32 | @@ -523,6 +523,12 @@ microblaze_unwind_pc (struct gdbarch *gdbarch, frame_info_ptr next_frame) | ||
33 | { | ||
34 | CORE_ADDR pc; | ||
35 | pc=frame_unwind_register_unsigned (next_frame, MICROBLAZE_PC_REGNUM); | ||
36 | + /* For sentinel frame, return address is actual PC. For other frames, | ||
37 | + return address is pc+8. This is a workaround because gcc does not | ||
38 | + generate correct return address in CIE. */ | ||
39 | + if (frame_relative_level (next_frame) >= 0) | ||
40 | + pc = pc + 8; | ||
41 | + microblaze_debug ("unwind pc = 0x%x\n", (int) pc); | ||
42 | return pc; | ||
43 | } | ||
44 | |||
45 | @@ -615,6 +621,7 @@ microblaze_frame_prev_register (frame_info_ptr this_frame, | ||
46 | struct microblaze_frame_cache *cache = | ||
47 | microblaze_frame_cache (this_frame, this_cache); | ||
48 | |||
49 | +#if 1 | ||
50 | if ((regnum == MICROBLAZE_SP_REGNUM && | ||
51 | cache->register_offsets[MICROBLAZE_SP_REGNUM]) | ||
52 | || (regnum == MICROBLAZE_FP_REGNUM && | ||
53 | @@ -625,15 +632,22 @@ if ((regnum == MICROBLAZE_SP_REGNUM && | ||
54 | |||
55 | if (regnum == MICROBLAZE_PC_REGNUM) | ||
56 | { | ||
57 | - regnum = 15; | ||
58 | + regnum = MICROBLAZE_PREV_PC_REGNUM; | ||
59 | + | ||
60 | + microblaze_debug ("prev pc is r15 @ frame offset 0x%x\n", | ||
61 | + (int) cache->register_offsets[regnum] ); | ||
62 | + | ||
63 | return frame_unwind_got_memory (this_frame, regnum, | ||
64 | cache->register_offsets[MICROBLAZE_PREV_PC_REGNUM]); | ||
65 | - | ||
66 | } | ||
67 | + | ||
68 | if (regnum == MICROBLAZE_SP_REGNUM) | ||
69 | regnum = 1; | ||
70 | -#if 0 | ||
71 | |||
72 | + return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
73 | + regnum); | ||
74 | + | ||
75 | +#else | ||
76 | if (cache->frameless_p) | ||
77 | { | ||
78 | if (regnum == MICROBLAZE_PC_REGNUM) | ||
79 | @@ -646,9 +660,7 @@ if (regnum == MICROBLAZE_SP_REGNUM) | ||
80 | else | ||
81 | return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
82 | regnum); | ||
83 | -#endif | ||
84 | - return trad_frame_get_prev_register (this_frame, cache->saved_regs, | ||
85 | - regnum); | ||
86 | +#endif | ||
87 | } | ||
88 | |||
89 | static const struct frame_unwind microblaze_frame_unwind = | ||
90 | -- | ||
91 | 2.34.1 | ||
92 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0051-info-reg-pc-does-not-print-symbolic-value.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0051-info-reg-pc-does-not-print-symbolic-value.patch new file mode 100644 index 00000000..887ee56e --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0051-info-reg-pc-does-not-print-symbolic-value.patch | |||
@@ -0,0 +1,116 @@ | |||
1 | From 66c0cc9a030667111d4b632314502e868e5e8e37 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 9 May 2024 11:30:22 +0530 | ||
4 | Subject: [PATCH 51/54] info reg pc does not print symbolic value | ||
5 | |||
6 | Problem - Test gdb.base/pc-fp.exp fails | ||
7 | Fix - Change feature/microblaze-core.xml add type=code_ptr for pc | ||
8 | |||
9 | Files changed | ||
10 | features/microblaze-core.xml | ||
11 | features/microblaze.c (generated) | ||
12 | features/microblaze-with-stack-protect.c (generated) | ||
13 | |||
14 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
15 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
16 | --- | ||
17 | gdb/features/microblaze-core.xml | 4 ++-- | ||
18 | gdb/features/microblaze-with-stack-protect.c | 10 ++++++---- | ||
19 | gdb/features/microblaze.c | 8 ++++---- | ||
20 | 3 files changed, 12 insertions(+), 10 deletions(-) | ||
21 | |||
22 | diff --git a/gdb/features/microblaze-core.xml b/gdb/features/microblaze-core.xml | ||
23 | index ac052365773..205cdf94a27 100644 | ||
24 | --- a/gdb/features/microblaze-core.xml | ||
25 | +++ b/gdb/features/microblaze-core.xml | ||
26 | @@ -8,7 +8,7 @@ | ||
27 | <!DOCTYPE feature SYSTEM "gdb-target.dtd"> | ||
28 | <feature name="org.gnu.gdb.microblaze.core"> | ||
29 | <reg name="r0" bitsize="32" regnum="0"/> | ||
30 | - <reg name="r1" bitsize="32"/> | ||
31 | + <reg name="r1" bitsize="32" type="data_ptr"/> | ||
32 | <reg name="r2" bitsize="32"/> | ||
33 | <reg name="r3" bitsize="32"/> | ||
34 | <reg name="r4" bitsize="32"/> | ||
35 | @@ -39,7 +39,7 @@ | ||
36 | <reg name="r29" bitsize="32"/> | ||
37 | <reg name="r30" bitsize="32"/> | ||
38 | <reg name="r31" bitsize="32"/> | ||
39 | - <reg name="rpc" bitsize="32"/> | ||
40 | + <reg name="rpc" bitsize="32" type="code_ptr"/> | ||
41 | <reg name="rmsr" bitsize="32"/> | ||
42 | <reg name="rear" bitsize="32"/> | ||
43 | <reg name="resr" bitsize="32"/> | ||
44 | diff --git a/gdb/features/microblaze-with-stack-protect.c b/gdb/features/microblaze-with-stack-protect.c | ||
45 | index 8ab9565a047..95e3eed1a4e 100644 | ||
46 | --- a/gdb/features/microblaze-with-stack-protect.c | ||
47 | +++ b/gdb/features/microblaze-with-stack-protect.c | ||
48 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
49 | |||
50 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
51 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
52 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
53 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
54 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
55 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
56 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
57 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
58 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
59 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
60 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
61 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
62 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
63 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
64 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
65 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
66 | @@ -70,10 +70,12 @@ initialize_tdesc_microblaze_with_stack_protect (void) | ||
67 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
68 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
69 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
70 | - | ||
71 | - feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
72 | tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
73 | tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
74 | |||
75 | + feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.stack-protect"); | ||
76 | + tdesc_create_reg (feature, "slr", 59, 1, NULL, 32, "int"); | ||
77 | + tdesc_create_reg (feature, "shr", 60, 1, NULL, 32, "int"); | ||
78 | + | ||
79 | tdesc_microblaze_with_stack_protect = result.release (); | ||
80 | } | ||
81 | diff --git a/gdb/features/microblaze.c b/gdb/features/microblaze.c | ||
82 | index ed12e5bcfd2..ff4865b2acc 100644 | ||
83 | --- a/gdb/features/microblaze.c | ||
84 | +++ b/gdb/features/microblaze.c | ||
85 | @@ -14,7 +14,7 @@ initialize_tdesc_microblaze (void) | ||
86 | |||
87 | feature = tdesc_create_feature (result.get (), "org.gnu.gdb.microblaze.core"); | ||
88 | tdesc_create_reg (feature, "r0", 0, 1, NULL, 32, "int"); | ||
89 | - tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "int"); | ||
90 | + tdesc_create_reg (feature, "r1", 1, 1, NULL, 32, "data_ptr"); | ||
91 | tdesc_create_reg (feature, "r2", 2, 1, NULL, 32, "int"); | ||
92 | tdesc_create_reg (feature, "r3", 3, 1, NULL, 32, "int"); | ||
93 | tdesc_create_reg (feature, "r4", 4, 1, NULL, 32, "int"); | ||
94 | @@ -45,7 +45,7 @@ initialize_tdesc_microblaze (void) | ||
95 | tdesc_create_reg (feature, "r29", 29, 1, NULL, 32, "int"); | ||
96 | tdesc_create_reg (feature, "r30", 30, 1, NULL, 32, "int"); | ||
97 | tdesc_create_reg (feature, "r31", 31, 1, NULL, 32, "int"); | ||
98 | - tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "int"); | ||
99 | + tdesc_create_reg (feature, "rpc", 32, 1, NULL, 32, "code_ptr"); | ||
100 | tdesc_create_reg (feature, "rmsr", 33, 1, NULL, 32, "int"); | ||
101 | tdesc_create_reg (feature, "rear", 34, 1, NULL, 32, "int"); | ||
102 | tdesc_create_reg (feature, "resr", 35, 1, NULL, 32, "int"); | ||
103 | @@ -70,8 +70,8 @@ initialize_tdesc_microblaze (void) | ||
104 | tdesc_create_reg (feature, "rtlbsx", 54, 1, NULL, 32, "int"); | ||
105 | tdesc_create_reg (feature, "rtlblo", 55, 1, NULL, 32, "int"); | ||
106 | tdesc_create_reg (feature, "rtlbhi", 56, 1, NULL, 32, "int"); | ||
107 | - tdesc_create_reg (feature, "slr", 57, 1, NULL, 64, "uint64"); | ||
108 | - tdesc_create_reg (feature, "shr", 58, 1, NULL, 64, "uint64"); | ||
109 | + tdesc_create_reg (feature, "slr", 57, 1, NULL, 32, "int"); | ||
110 | + tdesc_create_reg (feature, "shr", 58, 1, NULL, 32, "int"); | ||
111 | |||
112 | tdesc_microblaze = result.release (); | ||
113 | } | ||
114 | -- | ||
115 | 2.34.1 | ||
116 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0052-Wrong-target-description-accepted-by-microblaze-arch.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0052-Wrong-target-description-accepted-by-microblaze-arch.patch new file mode 100644 index 00000000..89318eec --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0052-Wrong-target-description-accepted-by-microblaze-arch.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 0982e0c2733aa773d88876e68320b072e5b2a9ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 9 May 2024 11:34:04 +0530 | ||
4 | Subject: [PATCH 52/54] Wrong target description accepted by microblaze | ||
5 | architecture | ||
6 | |||
7 | Fix - Modify microblaze_gdbarch_init, set tdesc only when it is NULL | ||
8 | |||
9 | Files changed - gdb/microblaze-tdep.c | ||
10 | |||
11 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
12 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
13 | --- | ||
14 | gdb/microblaze-tdep.c | 21 ++++++++++++--------- | ||
15 | 1 file changed, 12 insertions(+), 9 deletions(-) | ||
16 | |||
17 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
18 | index f87e406ada0..4d8c76bcf4c 100644 | ||
19 | --- a/gdb/microblaze-tdep.c | ||
20 | +++ b/gdb/microblaze-tdep.c | ||
21 | @@ -1020,15 +1020,18 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
22 | else | ||
23 | microblaze_abi = found_abi; | ||
24 | |||
25 | - if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
26 | - { | ||
27 | - tdesc = tdesc_microblaze64; | ||
28 | - reg_size = 8; | ||
29 | - } | ||
30 | - else | ||
31 | - { | ||
32 | - tdesc = tdesc_microblaze; | ||
33 | - reg_size = 4; | ||
34 | + if (tdesc == NULL) | ||
35 | + { | ||
36 | + if (microblaze_abi == MICROBLAZE_ABI_M64) | ||
37 | + { | ||
38 | + tdesc = tdesc_microblaze64; | ||
39 | + reg_size = 8; | ||
40 | + } | ||
41 | + else | ||
42 | + { | ||
43 | + tdesc = tdesc_microblaze; | ||
44 | + reg_size = 4; | ||
45 | + } | ||
46 | } | ||
47 | |||
48 | /* Check any target description for validity. */ | ||
49 | -- | ||
50 | 2.34.1 | ||
51 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0053-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0053-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch new file mode 100644 index 00000000..2cb3ff06 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0053-Merge-gdb-microblaze-linux-tdep.c-to-gdb-14-and-fix-.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 31b8744afcb31825083a23bbc08b6e00772ebd07 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 23 May 2024 16:02:59 +0530 | ||
4 | Subject: [PATCH 53/54] Merge gdb/microblaze-linux-tdep.c to gdb-14 and fix | ||
5 | compilation issues. | ||
6 | |||
7 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
8 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
9 | --- | ||
10 | gdb/microblaze-linux-tdep.c | 6 ++++-- | ||
11 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
14 | index 20daef2ccd4..16d3a0b5196 100644 | ||
15 | --- a/gdb/microblaze-linux-tdep.c | ||
16 | +++ b/gdb/microblaze-linux-tdep.c | ||
17 | @@ -48,10 +48,12 @@ microblaze_debug (const char *fmt, ...) | ||
18 | if (microblaze_debug_flag) | ||
19 | { | ||
20 | va_list args; | ||
21 | + string_file file (gdb_stdout->can_emit_style_escape ()); | ||
22 | |||
23 | va_start (args, fmt); | ||
24 | printf_unfiltered ("MICROBLAZE LINUX: "); | ||
25 | - vprintf_unfiltered (fmt, args); | ||
26 | + file.vprintf (fmt, args); | ||
27 | + gdb_stdout->puts_unfiltered (file.string ().c_str ()); | ||
28 | va_end (args); | ||
29 | } | ||
30 | } | ||
31 | @@ -145,7 +147,7 @@ static void | ||
32 | microblaze_linux_init_abi (struct gdbarch_info info, | ||
33 | struct gdbarch *gdbarch) | ||
34 | { | ||
35 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
36 | + struct microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
37 | |||
38 | tdep->sizeof_gregset = 200; | ||
39 | |||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0054-Roll-back-an-improvement-which-inlines-target_gdbarc.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0054-Roll-back-an-improvement-which-inlines-target_gdbarc.patch new file mode 100644 index 00000000..eb6bde20 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0054-Roll-back-an-improvement-which-inlines-target_gdbarc.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 8a7a8b724a87c532096004f43b987c352474a905 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Fri, 19 Jul 2024 12:39:24 +0530 | ||
4 | Subject: [PATCH 54/54] Roll back an improvement which inlines target_gdbarch | ||
5 | () inherited from binutils 2.42 merge that causes compilation issues on gdb | ||
6 | 14.2 | ||
7 | |||
8 | Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
9 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
10 | --- | ||
11 | gdb/microblaze-tdep.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
15 | index 4d8c76bcf4c..cb6697654b0 100644 | ||
16 | --- a/gdb/microblaze-tdep.c | ||
17 | +++ b/gdb/microblaze-tdep.c | ||
18 | @@ -116,7 +116,7 @@ show_microblaze_abi (struct ui_file *file, | ||
19 | const char *ignored_value) | ||
20 | { | ||
21 | enum microblaze_abi global_abi = global_microblaze_abi (); | ||
22 | - enum microblaze_abi actual_abi = microblaze_abi (current_inferior ()->arch ()); | ||
23 | + enum microblaze_abi actual_abi = microblaze_abi ( target_gdbarch () ); | ||
24 | const char *actual_abi_str = microblaze_abi_strings[actual_abi]; | ||
25 | |||
26 | #if 1 | ||
27 | -- | ||
28 | 2.34.1 | ||
29 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0055-fix-microblaze-linux-nat.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0055-fix-microblaze-linux-nat.patch new file mode 100644 index 00000000..a0ac4d39 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0055-fix-microblaze-linux-nat.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | Fix compilation error on Linux native GDB | ||
2 | |||
3 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
4 | |||
5 | Index: gdb-14.2/gdb/microblaze-linux-nat.c | ||
6 | =================================================================== | ||
7 | --- gdb-14.2.orig/gdb/microblaze-linux-nat.c | ||
8 | +++ gdb-14.2/gdb/microblaze-linux-nat.c | ||
9 | @@ -96,7 +96,7 @@ static int | ||
10 | microblaze_register_u_addr (struct gdbarch *gdbarch, int regno) | ||
11 | { | ||
12 | int u_addr = -1; | ||
13 | - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | ||
14 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
15 | /* NOTE: cagney/2003-11-25: This is the word size used by the ptrace | ||
16 | * interface, and not the wordsize of the program's ABI. */ | ||
17 | int wordsize = sizeof (long); | ||
18 | @@ -191,7 +192,7 @@ static void | ||
19 | fetch_register (struct regcache *regcache, int tid, int regno) | ||
20 | { | ||
21 | struct gdbarch *gdbarch = regcache->arch (); | ||
22 | - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); | ||
23 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
24 | /* This isn't really an address. But ptrace thinks of it as one. */ | ||
25 | CORE_ADDR regaddr = microblaze_register_u_addr (gdbarch, regno); | ||
26 | int bytes_transferred; | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch b/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch deleted file mode 100644 index c2db4c0d..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 1add37b567a7dee39d99f37b37802034c3fce9c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andreas Schwab <schwab@linux-m68k.org> | ||
3 | Date: Sun, 20 Mar 2022 14:01:54 +0100 | ||
4 | Subject: [PATCH] Add support for readline 8.2 | ||
5 | |||
6 | In readline 8.2 the type of rl_completer_word_break_characters changed to | ||
7 | include const. | ||
8 | |||
9 | Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=1add37b567a7dee39d99f37b37802034c3fce9c4] | ||
10 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
11 | --- | ||
12 | gdb/completer.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/gdb/completer.c b/gdb/completer.c | ||
16 | index d3900ae2014..a51c16ac7f8 100644 | ||
17 | --- a/gdb/completer.c | ||
18 | +++ b/gdb/completer.c | ||
19 | @@ -36,7 +36,7 @@ | ||
20 | calling a hook instead so we eliminate the CLI dependency. */ | ||
21 | #include "gdbcmd.h" | ||
22 | |||
23 | -/* Needed for rl_completer_word_break_characters() and for | ||
24 | +/* Needed for rl_completer_word_break_characters and for | ||
25 | rl_filename_completion_function. */ | ||
26 | #include "readline/readline.h" | ||
27 | |||
28 | @@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw () | ||
29 | rl_basic_quote_characters = NULL; | ||
30 | } | ||
31 | |||
32 | - return rl_completer_word_break_characters; | ||
33 | + return (char *) rl_completer_word_break_characters; | ||
34 | } | ||
35 | |||
36 | char * | ||
37 | -- | ||
38 | 2.31.1 | ||
39 | |||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb b/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb deleted file mode 100644 index 9c6db4ca..00000000 --- a/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | require gdb-common.inc | ||
2 | |||
3 | inherit gettext pkgconfig | ||
4 | |||
5 | #LDFLAGS:append = " -s" | ||
6 | #export CFLAGS:append=" -L${STAGING_LIBDIR}" | ||
7 | |||
8 | # cross-canadian must not see this | ||
9 | PACKAGES =+ "gdbserver" | ||
10 | FILES:gdbserver = "${bindir}/gdbserver" | ||
11 | |||
12 | require gdb.inc | ||
13 | |||
14 | inherit python3-dir | ||
15 | |||
16 | EXTRA_OEMAKE:append:libc-musl = "\ | ||
17 | gt_cv_func_gnugettext1_libc=yes \ | ||
18 | gt_cv_func_gnugettext2_libc=yes \ | ||
19 | gl_cv_func_working_strerror=yes \ | ||
20 | gl_cv_func_strerror_0_works=yes \ | ||
21 | gl_cv_func_gettimeofday_clobber=no \ | ||
22 | " | ||
23 | |||
24 | do_configure:prepend() { | ||
25 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'python', d)}" ]; then | ||
26 | cat > ${WORKDIR}/python << EOF | ||
27 | #!/bin/sh | ||
28 | case "\$2" in | ||
29 | --includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}${PYTHON_ABI}/" ;; | ||
30 | --ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}${PYTHON_ABI}" ;; | ||
31 | --exec-prefix) echo "${exec_prefix}" ;; | ||
32 | *) exit 1 ;; | ||
33 | esac | ||
34 | exit 0 | ||
35 | EOF | ||
36 | chmod +x ${WORKDIR}/python | ||
37 | fi | ||
38 | } | ||
39 | |||
diff --git a/meta-vitis-tc/COPYING.MIT b/meta-vitis-tc/COPYING.MIT new file mode 100644 index 00000000..7ba8e404 --- /dev/null +++ b/meta-vitis-tc/COPYING.MIT | |||
@@ -0,0 +1,19 @@ | |||
1 | Copyright (c) 2016 Xilinx Inc | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
4 | of this software and associated documentation files (the "Software"), to deal | ||
5 | in the Software without restriction, including without limitation the rights | ||
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
7 | copies of the Software, and to permit persons to whom the Software is | ||
8 | furnished to do so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in | ||
11 | all copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
19 | THE SOFTWARE. | ||
diff --git a/meta-vitis-tc/README.md b/meta-vitis-tc/README.md new file mode 100644 index 00000000..5fd19a27 --- /dev/null +++ b/meta-vitis-tc/README.md | |||
@@ -0,0 +1,55 @@ | |||
1 | # meta-vitis-tc | ||
2 | |||
3 | This layer is used to build various toolchains that may be embedded into | ||
4 | the AMD Vitis (and Vivado) products. | ||
5 | |||
6 | ## Dependencies | ||
7 | |||
8 | This layer depends on: | ||
9 | |||
10 | URI: https://git.yoctoproject.org/poky | ||
11 | layers: meta, meta-poky | ||
12 | branch: scarthgap | ||
13 | |||
14 | URI: https://git.openembedded.org/meta-openembedded | ||
15 | layers: meta-oe | ||
16 | branch: scarthgap | ||
17 | |||
18 | URI: | ||
19 | https://git.yoctoproject.org/meta-xilinx (official version) | ||
20 | https://github.com/Xilinx/meta-xilinx (development and AMD release) | ||
21 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-standalone | ||
22 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) | ||
23 | |||
24 | URI: https://git.yoctoproject.org/meta-arm | ||
25 | layers: meta-arm, meta-arm-toolchain | ||
26 | branch: scarthgap | ||
27 | |||
28 | optionally, you may alwys want to include: | ||
29 | |||
30 | URI: https://git.yoctoproject.org/meta-mingw | ||
31 | layers: meta-mingw | ||
32 | branch: scarthgap | ||
33 | |||
34 | --- | ||
35 | |||
36 | ## Configuring Machines | ||
37 | |||
38 | Baremetal toolchains can be built using: | ||
39 | |||
40 | ``` | ||
41 | $ MACHINE=<toolchain> DISTRO=xilinx-standalone bitbake meta-xilinx-toolchain | ||
42 | ``` | ||
43 | |||
44 | The <toolchain> value should be one of: | ||
45 | aarch32-tc - 32-bit Cortex-A toolchains | ||
46 | aarch64-tc - 64-bit Cortex-A toolchains | ||
47 | arm-rm-tc - ARM Cortex-R and M toolchains | ||
48 | microblaze-tc - Microblaze toolchains | ||
49 | riscv-tc - Risc-V toolchains | ||
50 | |||
51 | Also there is a standalone QEMU SDK: | ||
52 | |||
53 | ``` | ||
54 | $ MACHINE=zynqmp-generic bitbake meta-qemu-xilinx | ||
55 | ``` | ||
diff --git a/meta-vitis-tc/classes/vitis-tc-baremetal-toolchain-scripts.bbclass b/meta-vitis-tc/classes/vitis-tc-baremetal-toolchain-scripts.bbclass new file mode 100644 index 00000000..d56ea096 --- /dev/null +++ b/meta-vitis-tc/classes/vitis-tc-baremetal-toolchain-scripts.bbclass | |||
@@ -0,0 +1,208 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | # Based on the version in oe-core as commit | ||
7 | # a725df1839a23b11ae1bace531d242bfc1ab98e0 | ||
8 | # | ||
9 | # This is optimized specifically for baremetal builds where we have a single | ||
10 | # common toolchain for each multilib. This configuration is unique to | ||
11 | # petalinux prebuilt toolchains and thus not applicable upstream. | ||
12 | |||
13 | # This function creates an environment-setup-script for use in a deployable SDK | ||
14 | toolchain_create_sdk_env_script:xilinx-standalone () { | ||
15 | # Create environment setup script. Remember that $SDKTARGETSYSROOT should | ||
16 | # only be expanded on the target at runtime. | ||
17 | base_sbindir=${10:-${base_sbindir_nativesdk}} | ||
18 | base_bindir=${9:-${base_bindir_nativesdk}} | ||
19 | sbindir=${8:-${sbindir_nativesdk}} | ||
20 | sdkpathnative=${7:-${SDKPATHNATIVE}} | ||
21 | prefix=${6:-${prefix_nativesdk}} | ||
22 | bindir=${5:-${bindir_nativesdk}} | ||
23 | libdir=${4:-${libdir}} | ||
24 | sysroot=${3:-${SDKTARGETSYSROOT}} | ||
25 | multimach_target_sys=${2:-${REAL_MULTIMACH_TARGET_SYS}} | ||
26 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys} | ||
27 | rm -f $script | ||
28 | touch $script | ||
29 | |||
30 | echo '# Check for LD_LIBRARY_PATH being set, which can break SDK and generally is a bad practice' >> $script | ||
31 | echo '# http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80' >> $script | ||
32 | echo '# http://xahlee.info/UnixResource_dir/_/ldpath.html' >> $script | ||
33 | echo '# Only disable this check if you are absolutely know what you are doing!' >> $script | ||
34 | echo 'if [ ! -z "${LD_LIBRARY_PATH:-}" ]; then' >> $script | ||
35 | echo " echo \"Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH'\"" >> $script | ||
36 | echo " echo \"but please check why this was set in the first place and that it's safe to unset.\"" >> $script | ||
37 | echo ' echo "The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set."' >> $script | ||
38 | echo ' echo "For more references see:"' >> $script | ||
39 | echo ' echo " http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80"' >> $script | ||
40 | echo ' echo " http://xahlee.info/UnixResource_dir/_/ldpath.html"' >> $script | ||
41 | echo ' return 1' >> $script | ||
42 | echo 'fi' >> $script | ||
43 | |||
44 | echo "${EXPORT_SDK_PS1}" >> $script | ||
45 | echo 'export SDKTARGETSYSROOT='"$sysroot" >> $script | ||
46 | EXTRAPATH="" | ||
47 | for i in ${CANADIANEXTRAOS}; do | ||
48 | EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${ORIGINAL_TARGET_ARCH}${ORIGINAL_TARGET_VENDOR}-$i" | ||
49 | done | ||
50 | echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${ORIGINAL_TARGET_SYS}"$EXTRAPATH':$PATH' >> $script | ||
51 | echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script | ||
52 | echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig:$SDKTARGETSYSROOT'"$prefix"'/share/pkgconfig' >> $script | ||
53 | echo 'export CONFIG_SITE=${SDKPATH}/site-config-'"${multimach_target_sys}" >> $script | ||
54 | echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script | ||
55 | echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script | ||
56 | echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script | ||
57 | echo 'export OECORE_BASELIB="${baselib}"' >> $script | ||
58 | echo 'export OECORE_TARGET_ARCH="${TARGET_ARCH}"' >>$script | ||
59 | echo 'export OECORE_TARGET_OS="${TARGET_OS}"' >>$script | ||
60 | |||
61 | echo 'unset command_not_found_handle' >> $script | ||
62 | |||
63 | toolchain_shared_env_script | ||
64 | } | ||
65 | |||
66 | toolchain_shared_env_script:xilinx-standalone () { | ||
67 | echo 'export CC="${ORIGINAL_TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT"' >> $script | ||
68 | echo 'export CXX="${ORIGINAL_TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT"' >> $script | ||
69 | echo 'export CPP="${ORIGINAL_TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=$SDKTARGETSYSROOT"' >> $script | ||
70 | echo 'export AS="${ORIGINAL_TARGET_PREFIX}as ${TARGET_AS_ARCH}"' >> $script | ||
71 | echo 'export LD="${ORIGINAL_TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=$SDKTARGETSYSROOT"' >> $script | ||
72 | echo 'export GDB=${ORIGINAL_TARGET_PREFIX}gdb' >> $script | ||
73 | echo 'export STRIP=${ORIGINAL_TARGET_PREFIX}strip' >> $script | ||
74 | echo 'export RANLIB=${ORIGINAL_TARGET_PREFIX}ranlib' >> $script | ||
75 | echo 'export OBJCOPY=${ORIGINAL_TARGET_PREFIX}objcopy' >> $script | ||
76 | echo 'export OBJDUMP=${ORIGINAL_TARGET_PREFIX}objdump' >> $script | ||
77 | echo 'export READELF=${ORIGINAL_TARGET_PREFIX}readelf' >> $script | ||
78 | echo 'export AR=${ORIGINAL_TARGET_PREFIX}ar' >> $script | ||
79 | echo 'export NM=${ORIGINAL_TARGET_PREFIX}nm' >> $script | ||
80 | echo 'export M4=m4' >> $script | ||
81 | echo 'export TARGET_PREFIX=${ORIGINAL_TARGET_PREFIX}' >> $script | ||
82 | echo 'export CONFIGURE_FLAGS="--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"' >> $script | ||
83 | echo 'export CFLAGS="${TARGET_CFLAGS}"' >> $script | ||
84 | echo 'export CXXFLAGS="${TARGET_CXXFLAGS}"' >> $script | ||
85 | echo 'export LDFLAGS="${TARGET_LDFLAGS}"' >> $script | ||
86 | echo 'export CPPFLAGS="${TARGET_CPPFLAGS}"' >> $script | ||
87 | echo 'export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"' >> $script | ||
88 | echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script | ||
89 | echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script | ||
90 | echo 'export ARCH=${ARCH}' >> $script | ||
91 | echo 'export CROSS_COMPILE=${ORIGINAL_TARGET_PREFIX}' >> $script | ||
92 | echo 'export OECORE_TUNE_CCARGS="${TUNE_CCARGS}"' >> $script | ||
93 | |||
94 | cat >> $script <<EOF | ||
95 | |||
96 | # Append environment subscripts | ||
97 | if [ -d "\$OECORE_TARGET_SYSROOT/environment-setup.d" ]; then | ||
98 | for envfile in \$OECORE_TARGET_SYSROOT/environment-setup.d/*.sh; do | ||
99 | . \$envfile | ||
100 | done | ||
101 | fi | ||
102 | if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then | ||
103 | for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do | ||
104 | . \$envfile | ||
105 | done | ||
106 | fi | ||
107 | EOF | ||
108 | } | ||
109 | |||
110 | ##### | ||
111 | # Following is copied from meta-mingw/classes/toolchain-scripts-mingw32.bbclass | ||
112 | # Based off of the oe-core meta/classes/toolchain-scripts.bbclass version as of | ||
113 | # commit acbba477893ef87388effc4679b7f40ee49fc852 | ||
114 | toolchain_create_sdk_env_script:sdkmingw32:xilinx-standalone () { | ||
115 | # Create environment setup script | ||
116 | sdkpathnative=${7:-${SDKPATHNATIVE}} | ||
117 | prefix=${6:-${prefix_nativesdk}} | ||
118 | bindir=${5:-${bindir_nativesdk}} | ||
119 | libdir=${4:-${libdir}} | ||
120 | sysroot=${3:-${SDKTARGETSYSROOT}} | ||
121 | multimach_target_sys=${2:-${REAL_MULTIMACH_TARGET_SYS}} | ||
122 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-$multimach_target_sys}.bat | ||
123 | rm -f $script | ||
124 | touch $script | ||
125 | # Be sure to use the 'short' path, so we can have deeper directories. | ||
126 | echo 'set SDKROOT=%~sdp0%' >> $script | ||
127 | echo 'IF %SDKROOT:~-1%==\ set SDKROOT=%SDKROOT:~0,-1%' >> $script | ||
128 | |||
129 | # Convert to mingw32 subpaths | ||
130 | sysroot='%SDKROOT%'${sysroot##${SDKPATH}} | ||
131 | sdkpathnative='%SDKROOT%'${sdkpathnative##${SDKPATH}} | ||
132 | |||
133 | echo 'set SDKTARGETSYSROOT='"$sysroot" >> $script | ||
134 | EXTRAPATH="" | ||
135 | for i in ${CANADIANEXTRAOS}; do | ||
136 | EXTRAPATH="$EXTRAPATH;$sdkpathnative$bindir/${ORIGINAL_TARGET_ARCH}${ORIGINAL_TARGET_VENDOR}-$i" | ||
137 | done | ||
138 | echo "set PATH=$sdkpathnative$bindir;$sdkpathnative$bindir/../${HOST_SYS}/bin;$sdkpathnative$bindir/${ORIGINAL_TARGET_SYS}"$EXTRAPATH';%PATH%' >> $script | ||
139 | echo 'set PKG_CONFIG_SYSROOT_DIR=%SDKTARGETSYSROOT%' >> $script | ||
140 | echo 'set PKG_CONFIG_PATH=%SDKTARGETSYSROOT%'"$libdir"'/pkgconfig' >> $script | ||
141 | echo 'set CONFIG_SITE=%SDKROOT%/site-config-'"${multimach_target_sys}" >> $script | ||
142 | echo "set OECORE_NATIVE_SYSROOT=$sdkpathnative" >> $script | ||
143 | echo 'set OECORE_TARGET_SYSROOT=%SDKTARGETSYSROOT%' >> $script | ||
144 | echo "set OECORE_ACLOCAL_OPTS=-I $sdkpathnative/usr/share/aclocal" >> $script | ||
145 | echo 'set OECORE_BASELIB=${baselib}' >> $script | ||
146 | echo 'set OECORE_TARGET_ARCH=${TARGET_ARCH}' >> $script | ||
147 | echo 'set OECORE_TARGET_OS=${TARGET_OS}' >> $script | ||
148 | |||
149 | toolchain_shared_env_script | ||
150 | |||
151 | # Change unix '/' to Win32 '\' | ||
152 | sed -e 's,/,\\,g' -i $script | ||
153 | |||
154 | # set has some annoying properties: | ||
155 | # 1) If it is successful %ERRORLEVEL% is unchanged (as opposed to being set | ||
156 | # to 0 to indicate success) | ||
157 | # 2) Making an assignment like "set A=" is considered an error and sets | ||
158 | # %ERRORLEVEL% to 1. | ||
159 | # | ||
160 | # Practically, this means that if any of the set calls make an empty | ||
161 | # assignment that error will be propagated. To prevent this, a command is | ||
162 | # run to ensure that the "exit code" of this script is 0 | ||
163 | echo "@%COMSPEC% /C exit 0 > NUL" >> $script | ||
164 | |||
165 | # Make the file windows friendly... | ||
166 | awk 'sub("$", "\r")' $script > $script.new | ||
167 | mv $script.new $script | ||
168 | } | ||
169 | |||
170 | toolchain_shared_env_script:sdkmingw32:xilinx-standalone () { | ||
171 | echo 'set CC=${ORIGINAL_TARGET_PREFIX}gcc ${TARGET_CC_ARCH} --sysroot=%SDKTARGETSYSROOT%' >> $script | ||
172 | echo 'set CXX=${ORIGINAL_TARGET_PREFIX}g++ ${TARGET_CC_ARCH} --sysroot=%SDKTARGETSYSROOT%' >> $script | ||
173 | echo 'set CPP=${ORIGINAL_TARGET_PREFIX}gcc -E ${TARGET_CC_ARCH} --sysroot=%SDKTARGETSYSROOT%' >> $script | ||
174 | echo 'set AS=${ORIGINAL_TARGET_PREFIX}as ${TARGET_AS_ARCH}' >> $script | ||
175 | echo 'set LD=${ORIGINAL_TARGET_PREFIX}ld ${TARGET_LD_ARCH} --sysroot=%SDKTARGETSYSROOT%' >> $script | ||
176 | echo 'set GDB=${ORIGINAL_TARGET_PREFIX}gdb' >> $script | ||
177 | echo 'set STRIP=${ORIGINAL_TARGET_PREFIX}strip' >> $script | ||
178 | echo 'set RANLIB=${ORIGINAL_TARGET_PREFIX}ranlib' >> $script | ||
179 | echo 'set OBJCOPY=${ORIGINAL_TARGET_PREFIX}objcopy' >> $script | ||
180 | echo 'set OBJDUMP=${ORIGINAL_TARGET_PREFIX}objdump' >> $script | ||
181 | echo 'set AR=${ORIGINAL_TARGET_PREFIX}ar' >> $script | ||
182 | echo 'set NM=${ORIGINAL_TARGET_PREFIX}nm' >> $script | ||
183 | echo 'set M4=m4' >> $script | ||
184 | echo 'set TARGET_PREFIX=${ORIGINAL_TARGET_PREFIX}' >> $script | ||
185 | echo 'set CONFIGURE_FLAGS=--target=${TARGET_SYS} --host=${TARGET_SYS} --build=${SDK_ARCH}-linux --with-libtool-sysroot=%SDKTARGETSYSROOT%' >> $script | ||
186 | echo 'set CFLAGS=${TARGET_CFLAGS}' >> $script | ||
187 | echo 'set CXXFLAGS=${TARGET_CXXFLAGS}' >> $script | ||
188 | echo 'set LDFLAGS=${TARGET_LDFLAGS}' >> $script | ||
189 | echo 'set CPPFLAGS=${TARGET_CPPFLAGS}' >> $script | ||
190 | echo 'set KCFLAGS=--sysroot=%SDKTARGETSYSROOT%' >> $script | ||
191 | echo 'set OECORE_DISTRO_VERSION=${DISTRO_VERSION}' >> $script | ||
192 | echo 'set OECORE_SDK_VERSION=${SDK_VERSION}' >> $script | ||
193 | echo 'set ARCH=${ARCH}' >> $script | ||
194 | echo 'set CROSS_COMPILE=${ORIGINAL_TARGET_PREFIX}' >> $script | ||
195 | |||
196 | cat >> $script <<EOF | ||
197 | |||
198 | @REM Append environment subscripts | ||
199 | |||
200 | @IF EXIST %OECORE_TARGET_SYSROOT%\\environment-setup.d ( | ||
201 | FOR %%x IN (%OECORE_TARGET_SYSROOT%\\environment-setup.d\\*.bat) DO call "%%x" | ||
202 | ) | ||
203 | |||
204 | @IF EXIST %OECORE_NATIVE_SYSROOT%\\environment-setup.d ( | ||
205 | FOR %%x IN (%OECORE_NATIVE_SYSROOT%\\environment-setup.d\\*.bat) DO call "%%x" | ||
206 | ) | ||
207 | EOF | ||
208 | } | ||
diff --git a/meta-vitis-tc/conf/layer.conf b/meta-vitis-tc/conf/layer.conf new file mode 100644 index 00000000..34913777 --- /dev/null +++ b/meta-vitis-tc/conf/layer.conf | |||
@@ -0,0 +1,23 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # Keep layer path so recipes can reference it | ||
5 | VITIS_TC_PATH = "${LAYERDIR}" | ||
6 | |||
7 | # We have a packages directory, add to BBFILES | ||
8 | BBFILES += " \ | ||
9 | ${LAYERDIR}/recipes-*/*/*.bb \ | ||
10 | ${LAYERDIR}/recipes-*/*/*.bbappend" | ||
11 | |||
12 | BBFILE_COLLECTIONS += "vitis-tc" | ||
13 | BBFILE_PRIORITY_vitis-tc = "6" | ||
14 | BBFILE_PATTERN_vitis-tc := "^${LAYERDIR}/" | ||
15 | |||
16 | LAYERDEPENDS_vitis-tc = "\ | ||
17 | core \ | ||
18 | xilinx \ | ||
19 | xilinx-microblaze \ | ||
20 | xilinx-standalone \ | ||
21 | " | ||
22 | |||
23 | LAYERSERIES_COMPAT_vitis-tc = "scarthgap" | ||
diff --git a/meta-vitis-tc/conf/machine/aarch32-tc.conf b/meta-vitis-tc/conf/machine/aarch32-tc.conf new file mode 100644 index 00000000..5b59bc6a --- /dev/null +++ b/meta-vitis-tc/conf/machine/aarch32-tc.conf | |||
@@ -0,0 +1,221 @@ | |||
1 | require conf/machine/include/machine-xilinx-qemu.inc | ||
2 | require conf/multilib.conf | ||
3 | require conf/machine/include/arm/armv7a/tune-cortexa9.inc | ||
4 | require conf/machine/include/baremetal-tc.conf | ||
5 | |||
6 | # Define all of the multilibs supproted by this configuration | ||
7 | MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" | ||
8 | |||
9 | MULTILIBS = "multilib:libarmv5tesoftfp multilib:libarmv5tehard" | ||
10 | MULTILIBS += "multilib:libnofp" | ||
11 | MULTILIBS += "multilib:libv7nofp multilib:libv7fpsoftfp multilib:libv7fphard" | ||
12 | MULTILIBS += "multilib:libv7anofp" | ||
13 | MULTILIBS += "multilib:libv7afpsoftfp" | ||
14 | MULTILIBS += "multilib:libv7afpthf multilib:libv7asimdsoftfp" | ||
15 | MULTILIBS += "multilib:libv7asimdhard multilib:libv7vesimdsoftfp" | ||
16 | MULTILIBS += "multilib:libvtvesimdhf" | ||
17 | MULTILIBS += "multilib:libv8anofp" | ||
18 | MULTILIBS += "multilib:libv8asimdsoftfp multilib:libv8asimdhard" | ||
19 | |||
20 | TUNE_CCARGS = "${TUNE_CCARGS:tune-${DEFAULTTUNE}}" | ||
21 | TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" | ||
22 | |||
23 | # Base configuration | ||
24 | # CFLAGS: | ||
25 | DEFAULTTUNE = "aarch32" | ||
26 | |||
27 | AVAILTUNES += "aarch32" | ||
28 | PACKAGE_EXTRA_ARCHS:tune-aarch32 = "${TUNE_PKGARCH:tune-aarch32}" | ||
29 | BASE_LIB:tune-aarch32 = "lib" | ||
30 | TUNE_FEATURES:tune-aarch32 = "arm" | ||
31 | TUNE_CCARGS:tune-aarch32 = "" | ||
32 | TUNE_PKGARCH:tune-aarch32 = "aarch32" | ||
33 | |||
34 | |||
35 | # arm/v5te/softfp | ||
36 | # CFLAGS: -marm -march=armv5te+fp -mfloat-abi=softfp | ||
37 | DEFAULTTUNE:virtclass-multilib-libarmv5tesoftfp = "armv5tesoftfp" | ||
38 | |||
39 | AVAILTUNES += "armv5tesoftfp" | ||
40 | PACKAGE_EXTRA_ARCHS:tune-armv5tesoftfp = "${TUNE_PKGARCH:tune-armv5tesoftfp}" | ||
41 | BASE_LIB:tune-armv5tesoftfp = "lib/arm/v5te/softfp" | ||
42 | TUNE_FEATURES:tune-armv5tesoftfp = "arm" | ||
43 | TUNE_CCARGS:tune-armv5tesoftfp = "-marm -march=armv5te+fp -mfloat-abi=softfp" | ||
44 | TUNE_PKGARCH:tune-armv5tesoftfp = "armv5tefp" | ||
45 | |||
46 | |||
47 | # arm/v5te/hard | ||
48 | # CFLAGS: -marm -march=armv5te+fp -mfloat-abi=hard | ||
49 | DEFAULTTUNE:virtclass-multilib-libarmv5tehard = "armv5tehard" | ||
50 | |||
51 | AVAILTUNES += "armv5tehard" | ||
52 | PACKAGE_EXTRA_ARCHS:tune-armv5tehard = "${TUNE_PKGARCH:tune-armv5tehard}" | ||
53 | BASE_LIB:tune-armv5tehard = "lib/arm/v5te/hard" | ||
54 | TUNE_FEATURES:tune-armv5tehard = "arm" | ||
55 | TUNE_CCARGS:tune-armv5tehard = "-marm -march=armv5te+fp -mfloat-abi=hard" | ||
56 | TUNE_PKGARCH:tune-armv5tehard = "armv5tefphf" | ||
57 | |||
58 | |||
59 | # thumb/nofp | ||
60 | # CFLAGS: -mthumb -mfloat-abi=soft | ||
61 | DEFAULTTUNE:virtclass-multilib-libnofp = "armnofp" | ||
62 | |||
63 | AVAILTUNES += "armnofp" | ||
64 | PACKAGE_EXTRA_ARCHS:tune-armnofp = "${TUNE_PKGARCH:tune-armnofp}" | ||
65 | BASE_LIB:tune-armnofp = "lib/thumb/nofp" | ||
66 | TUNE_FEATURES:tune-armnofp = "arm" | ||
67 | TUNE_CCARGS:tune-armnofp = "-mthumb -mfloat-abi=soft" | ||
68 | TUNE_PKGARCH:tune-armnofp = "armt" | ||
69 | |||
70 | |||
71 | # thumb/v7/nofp | ||
72 | # CFLAGS: -mthumb -march=armv7 -mfloat-abi=soft | ||
73 | DEFAULTTUNE:virtclass-multilib-libv7nofp = "armv7nofp" | ||
74 | |||
75 | AVAILTUNES += "armv7nofp" | ||
76 | PACKAGE_EXTRA_ARCHS:tune-armv7nofp = "${TUNE_PKGARCH:tune-armv7nofp}" | ||
77 | BASE_LIB:tune-armv7nofp = "lib/thumb/v7/nofp" | ||
78 | TUNE_FEATURES:tune-armv7nofp = "arm" | ||
79 | TUNE_CCARGS:tune-armv7nofp = "-mthumb -march=armv7 -mfloat-abi=soft" | ||
80 | TUNE_PKGARCH:tune-armv7nofp = "armv7t" | ||
81 | |||
82 | |||
83 | # thumb/v7+fp/softfp | ||
84 | # CFLAGS: -mthumb -march=armv7+fp -mfloat-abi=softfp | ||
85 | DEFAULTTUNE:virtclass-multilib-libv7fpsoftfp = "armv7fpsoftfp" | ||
86 | |||
87 | AVAILTUNES += "armv7fpsoftfp" | ||
88 | PACKAGE_EXTRA_ARCHS:tune-armv7fpsoftfp = "${TUNE_PKGARCH:tune-armv7fpsoftfp}" | ||
89 | BASE_LIB:tune-armv7fpsoftfp = "lib/thumb/v7+fp/softfp" | ||
90 | TUNE_FEATURES:tune-armv7fpsoftfp = "arm" | ||
91 | TUNE_CCARGS:tune-armv7fpsoftfp = "-mthumb -march=armv7+fp -mfloat-abi=softfp" | ||
92 | TUNE_PKGARCH:tune-armv7fpsoftfp = "armv7fpt" | ||
93 | |||
94 | |||
95 | # thumb/v7+fp/hard | ||
96 | # CFLAGS: -mthumb -march=armv7+fp -mfloat-abi=hard | ||
97 | DEFAULTTUNE:virtclass-multilib-libv7fphard = "armv7fphard" | ||
98 | |||
99 | AVAILTUNES += "armv7fphard" | ||
100 | PACKAGE_EXTRA_ARCHS:tune-armv7fphard = "${TUNE_PKGARCH:tune-armv7fphard}" | ||
101 | BASE_LIB:tune-armv7fphard = "lib/thumb/v7+fp/hard" | ||
102 | TUNE_FEATURES:tune-armv7fphard = "arm" | ||
103 | TUNE_CCARGS:tune-armv7fphard = "-mthumb -march=armv7+fp -mfloat-abi=hard" | ||
104 | TUNE_PKGARCH:tune-armv7fphard = "armv7fpthf" | ||
105 | |||
106 | |||
107 | # thumb/v7-a/nofp | ||
108 | # CFLAGS: -mthumb -march=armv7-a -mfloat-abi=soft | ||
109 | DEFAULTTUNE:virtclass-multilib-libv7anofp = "armv7anofp" | ||
110 | |||
111 | AVAILTUNES += "armv7anofp" | ||
112 | PACKAGE_EXTRA_ARCHS:tune-armv7anofp = "${TUNE_PKGARCH:tune-armv7anofp}" | ||
113 | BASE_LIB:tune-armv7anofp = "lib/thumb/v7-a/nofp" | ||
114 | TUNE_FEATURES:tune-armv7anofp = "arm" | ||
115 | TUNE_CCARGS:tune-armv7anofp = "-mthumb -march=armv7-a -mfloat-abi=soft" | ||
116 | TUNE_PKGARCH:tune-armv7anofp = "armv7at" | ||
117 | |||
118 | |||
119 | # thumb/v7-a+fp/softfp | ||
120 | # CFLAGS: -mthumb -march=armv7-a+fp -mfloat-abi=softfp | ||
121 | DEFAULTTUNE:virtclass-multilib-libv7afpsoftfp = "armv7afpsoftfp" | ||
122 | |||
123 | AVAILTUNES += "armv7afpsoftfp" | ||
124 | PACKAGE_EXTRA_ARCHS:tune-armv7afpsoftfp = "${TUNE_PKGARCH:tune-armv7afpsoftfp}" | ||
125 | BASE_LIB:tune-armv7afpsoftfp = "lib/thumb/v7-a+fp/softfp" | ||
126 | TUNE_FEATURES:tune-armv7afpsoftfp = "arm" | ||
127 | TUNE_CCARGS:tune-armv7afpsoftfp = "-mthumb -march=armv7-a+fp -mfloat-abi=softfp" | ||
128 | TUNE_PKGARCH:tune-armv7afpsoftfp = "armv7afpt" | ||
129 | |||
130 | |||
131 | # thumb/v7-a+fp/hard | ||
132 | # CFLAGS: -mthumb -march=armv7-a+fp -mfloat-abi=hard | ||
133 | DEFAULTTUNE:virtclass-multilib-libv7afpthf = "armv7afpthf" | ||
134 | |||
135 | AVAILTUNES += "armv7afpthf" | ||
136 | PACKAGE_EXTRA_ARCHS:tune-armv7afpthf = "${TUNE_PKGARCH:tune-armv7afpthf}" | ||
137 | BASE_LIB:tune-armv7afpthf = "lib/thumb/v7-a+fp/hard" | ||
138 | TUNE_FEATURES:tune-armv7afpthf = "arm" | ||
139 | TUNE_CCARGS:tune-armv7afpthf = "-mthumb -march=armv7-a+fp -mfloat-abi=hard" | ||
140 | TUNE_PKGARCH:tune-armv7afpthf = "armv7afpthf" | ||
141 | |||
142 | # thumb/v7-a+simd/softfp | ||
143 | # CFLAGS: -mthumb -march=armv7-a+simd -mfloat-abi=softfp | ||
144 | DEFAULTTUNE:virtclass-multilib-libv7asimdsoftfp = "armv7asimdsoftfp" | ||
145 | |||
146 | AVAILTUNES += "armv7asimdsoftfp" | ||
147 | PACKAGE_EXTRA_ARCHS:tune-armv7asimdsoftfp = "${TUNE_PKGARCH:tune-armv7asimdsoftfp}" | ||
148 | BASE_LIB:tune-armv7asimdsoftfp = "lib/thumb/v7-a+simd/softfp" | ||
149 | TUNE_FEATURES:tune-armv7asimdsoftfp = "arm" | ||
150 | TUNE_CCARGS:tune-armv7asimdsoftfp = "-mthumb -march=armv7-a+simd -mfloat-abi=softfp" | ||
151 | TUNE_PKGARCH:tune-armv7asimdsoftfp = "armv7asimdt" | ||
152 | |||
153 | |||
154 | # thumb/v7-a+simd/hard | ||
155 | # CFLAGS: -mthumb -march=armv7-a+simd -mfloat-abi=hard | ||
156 | DEFAULTTUNE:virtclass-multilib-libv7asimdhard = "armv7asimdhard" | ||
157 | |||
158 | AVAILTUNES += "armv7asimdhard" | ||
159 | PACKAGE_EXTRA_ARCHS:tune-armv7asimdhard = "${TUNE_PKGARCH:tune-armv7asimdhard}" | ||
160 | BASE_LIB:tune-armv7asimdhard = "lib/thumb/v7-a+simd/hard" | ||
161 | TUNE_FEATURES:tune-armv7asimdhard = "arm" | ||
162 | TUNE_CCARGS:tune-armv7asimdhard = "-mthumb -march=armv7-a+simd -mfloat-abi=hard" | ||
163 | TUNE_PKGARCH:tune-armv7asimdhard = "armv7asimdthf" | ||
164 | |||
165 | |||
166 | # thumb/v7ve+simd/softfp | ||
167 | # CFLAGS: -mthumb -march=armv7ve+simd -mfloat-abi=softfp | ||
168 | DEFAULTTUNE:virtclass-multilib-libv7vesimdsoftfp = "armv7vesimdsoftfp" | ||
169 | |||
170 | AVAILTUNES += "armv7vesimdsoftfp" | ||
171 | PACKAGE_EXTRA_ARCHS:tune-armv7vesimdsoftfp = "${TUNE_PKGARCH:tune-armv7vesimdsoftfp}" | ||
172 | BASE_LIB:tune-armv7vesimdsoftfp = "lib/thumb/v7ve+simd/softfp" | ||
173 | TUNE_FEATURES:tune-armv7vesimdsoftfp = "arm" | ||
174 | TUNE_CCARGS:tune-armv7vesimdsoftfp = "-mthumb -march=armv7ve+simd -mfloat-abi=softfp" | ||
175 | TUNE_PKGARCH:tune-armv7vesimdsoftfp = "armv7vesimdt" | ||
176 | |||
177 | # thumb/v7ve+simd/hard | ||
178 | # CFLAGS: -mthumb -march=armv7ve+simd -mfloat-abi=hard | ||
179 | DEFAULTTUNE:virtclass-multilib-libvtvesimdhf = "armvtvesimdhf" | ||
180 | |||
181 | AVAILTUNES += "armvtvesimdhf" | ||
182 | PACKAGE_EXTRA_ARCHS:tune-armvtvesimdhf = "${TUNE_PKGARCH:tune-armvtvesimdhf}" | ||
183 | BASE_LIB:tune-armvtvesimdhf = "lib/thumb/v7ve+simd/hard" | ||
184 | TUNE_FEATURES:tune-armvtvesimdhf = "arm" | ||
185 | TUNE_CCARGS:tune-armvtvesimdhf = "-mthumb -march=armv7ve+simd -mfloat-abi=hard" | ||
186 | TUNE_PKGARCH:tune-armvtvesimdhf = "armv7vesimdthf" | ||
187 | |||
188 | |||
189 | # thumb/v8-a/nofp | ||
190 | # CFLAGS: -mthumb -march=armv8-a -mfloat-abi=soft | ||
191 | DEFAULTTUNE:virtclass-multilib-libv8anofp = "armv8anofp" | ||
192 | |||
193 | AVAILTUNES += "armv8anofp" | ||
194 | PACKAGE_EXTRA_ARCHS:tune-armv8anofp = "${TUNE_PKGARCH:tune-armv8anofp}" | ||
195 | BASE_LIB:tune-armv8anofp = "lib/thumb/v8-a/nofp" | ||
196 | TUNE_FEATURES:tune-armv8anofp = "arm" | ||
197 | TUNE_CCARGS:tune-armv8anofp = "-mthumb -march=armv8-a -mfloat-abi=soft" | ||
198 | TUNE_PKGARCH:tune-armv8anofp = "armv8at" | ||
199 | |||
200 | # thumb/v8-a+simd/softfp | ||
201 | # CFLAGS: -mthumb -march=armv8-a+simd -mfloat-abi=softfp | ||
202 | DEFAULTTUNE:virtclass-multilib-libv8asimdsoftfp = "armv8asimdsoftfp" | ||
203 | |||
204 | AVAILTUNES += "armv8asimdsoftfp" | ||
205 | PACKAGE_EXTRA_ARCHS:tune-armv8asimdsoftfp = "${TUNE_PKGARCH:tune-armv8asimdsoftfp}" | ||
206 | BASE_LIB:tune-armv8asimdsoftfp = "lib/thumb/v8-a+simd/softfp" | ||
207 | TUNE_FEATURES:tune-armv8asimdsoftfp = "arm" | ||
208 | TUNE_CCARGS:tune-armv8asimdsoftfp = "-mthumb -march=armv8-a+simd -mfloat-abi=softfp" | ||
209 | TUNE_PKGARCH:tune-armv8asimdsoftfp = "armv8asimdt" | ||
210 | |||
211 | |||
212 | # thumb/v8-a+simd/hard | ||
213 | # CFLAGS: -mthumb -march=armv8-a+simd -mfloat-abi=hard | ||
214 | DEFAULTTUNE:virtclass-multilib-libv8asimdhard = "armv8asimdhard" | ||
215 | |||
216 | AVAILTUNES += "armv8asimdhard" | ||
217 | PACKAGE_EXTRA_ARCHS:tune-armv8asimdhard = "${TUNE_PKGARCH:tune-armv8asimdhard}" | ||
218 | BASE_LIB:tune-armv8asimdhard = "lib/thumb/v8-a+simd/hard" | ||
219 | TUNE_FEATURES:tune-armv8asimdhard = "arm" | ||
220 | TUNE_CCARGS:tune-armv8asimdhard = "-mthumb -march=armv8-a+simd -mfloat-abi=hard" | ||
221 | TUNE_PKGARCH:tune-armv8asimdhard = "armv8asimdthf" | ||
diff --git a/meta-vitis-tc/conf/machine/aarch64-tc.conf b/meta-vitis-tc/conf/machine/aarch64-tc.conf new file mode 100644 index 00000000..4e8e100f --- /dev/null +++ b/meta-vitis-tc/conf/machine/aarch64-tc.conf | |||
@@ -0,0 +1,35 @@ | |||
1 | require conf/machine/include/machine-xilinx-qemu.inc | ||
2 | require conf/multilib.conf | ||
3 | require conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc | ||
4 | require conf/machine/include/baremetal-tc.conf | ||
5 | |||
6 | # Define ilp32 variant (not in tune files) | ||
7 | TUNEVALID[ilp32] = "ilp32 ABI" | ||
8 | |||
9 | TUNE_CCARGS .= '${@bb.utils.contains("TUNE_FEATURES", "ilp32", " -mabi=ilp32", "", d)}' | ||
10 | |||
11 | # branch-protection=standard is default, see poky/meta/conf/machine/include/arm/arch-arm64.inc | ||
12 | # ilp32 does NOT support PAC/BTI extensions in GCC. | ||
13 | # cc1: sorry, unimplemented: return address signing is only supported for '-mabi=lp64' | ||
14 | TUNE_CCARGS .= '${@bb.utils.contains("TUNE_FEATURES", "ilp32", " -mbranch-protection=none", "", d)}' | ||
15 | |||
16 | # ILP request an alternative machine dictionary | ||
17 | INHERIT += "xlnx-standalone" | ||
18 | PACKAGEQA_EXTRA_MACHDEFFUNCS .= '${@bb.utils.contains("TUNE_FEATURES", "ilp32", " xlnx_ilp32_dict", "", d)}' | ||
19 | |||
20 | # Define all of the multilibs supported by this configuration | ||
21 | MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" | ||
22 | MULTILIBS = "multilib:libilp32" | ||
23 | |||
24 | # Base configuration | ||
25 | # CFLAGS: | ||
26 | DEFAULTTUNE = "cortexa72-cortexa53" | ||
27 | |||
28 | # CFLAGS: -mabi=ilp32 | ||
29 | DEFAULTTUNE:virtclass-multilib-libilp32 = "cortexa72-cortexa53-ilp32" | ||
30 | |||
31 | AVAILTUNES += "cortexa72-cortexa53-ilp32" | ||
32 | ARMPKGARCH:tune-cortexa72-cortexa53-ilp32 = "${ARMPKGARCH:tune-cortexa72-cortexa53}-ilp32" | ||
33 | TUNE_FEATURES:tune-cortexa72-cortexa53-ilp32 = "${TUNE_FEATURES:tune-cortexa72-cortexa53} ilp32" | ||
34 | PACKAGE_EXTRA_ARCHS:tune-cortexa72-cortexa53-ilp32 = "${PACKAGE_EXTRA_ARCHS:tune-cortexa72-cortexa53} cortexa72-cortexa53-ilp32" | ||
35 | BASE_LIB:tune-cortexa72-cortexa53-ilp32 = "lib/ilp32" | ||
diff --git a/meta-vitis-tc/conf/machine/arm-rm-tc.conf b/meta-vitis-tc/conf/machine/arm-rm-tc.conf new file mode 100644 index 00000000..6f0e5fbf --- /dev/null +++ b/meta-vitis-tc/conf/machine/arm-rm-tc.conf | |||
@@ -0,0 +1,275 @@ | |||
1 | require conf/machine/include/machine-xilinx-qemu.inc | ||
2 | require conf/multilib.conf | ||
3 | require conf/machine/include/arm/arch-armv8r.inc | ||
4 | require conf/machine/include/baremetal-tc.conf | ||
5 | |||
6 | # Since we're combining armv7r and armv8r into a single set of multilibs, | ||
7 | # copy the following machine setting to make sure it's available | ||
8 | # From conf/machine/include/arm/arch-armv7r.inc | ||
9 | |||
10 | TUNEVALID[armv7r] = "Enable instructions for ARMv7-r" | ||
11 | TUNE_CCARGS_MARCH = "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', ' -march=armv7-r', '', d)}" | ||
12 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', 'armv7r:', '', d)}" | ||
13 | TUNECONFLICTS[armv7r] = "armv4 armv5 armv6 armv7a" | ||
14 | |||
15 | |||
16 | # Define all of the multilibs supproted by this configuration | ||
17 | MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" | ||
18 | |||
19 | MULTILIBS = "multilib:libarmv5tesoftfp multilib:libarmv5tehard" | ||
20 | MULTILIBS += "multilib:libnofp" | ||
21 | MULTILIBS += "multilib:libv7nofp multilib:libv7fpsoftfp multilib:libv7fphard" | ||
22 | MULTILIBS += "multilib:libv6mnofp" | ||
23 | MULTILIBS += "multilib:libv7mnofp" | ||
24 | MULTILIBS += "multilib:libv7emnofp multilib:libv7emfpsoftfp" | ||
25 | MULTILIBS += "multilib:libv7emfphard multilib:libv7emdpsoftfp" | ||
26 | MULTILIBS += "multilib:libv7emdphard" | ||
27 | MULTILIBS += "multilib:libv8mbasenofp" | ||
28 | MULTILIBS += "multilib:libv8mmainnofp multilib:libv8mmainfpsoftfp multilib:libv8mmainfphard multilib:libv8mmaindpsoftfp multilib:libv8mmaindphard" | ||
29 | |||
30 | TUNE_CCARGS = "${TUNE_CCARGS:tune-${DEFAULTTUNE}}" | ||
31 | TUNE_PKGARCH = "${TUNE_PKGARCH:tune-${DEFAULTTUNE}}" | ||
32 | |||
33 | # Base configuration | ||
34 | # CFLAGS: | ||
35 | DEFAULTTUNE = "armv7r" | ||
36 | |||
37 | AVAILTUNES += "armv7r" | ||
38 | PACKAGE_EXTRA_ARCHS:tune-armv7r = "${TUNE_PKGARCH:tune-armv7r}" | ||
39 | BASE_LIB:tune-armv7r = "lib" | ||
40 | TUNE_FEATURES:tune-armv7r = "arm armv7r" | ||
41 | TUNE_CCARGS:tune-armv7r = "" | ||
42 | TUNE_PKGARCH:tune-armv7r = "armv7r" | ||
43 | |||
44 | |||
45 | # arm/v5te/softfp | ||
46 | # CFLAGS: -marm -march=armv5te+fp -mfloat-abi=softfp | ||
47 | DEFAULTTUNE:virtclass-multilib-libarmv5tesoftfp = "armv5tesoftfp" | ||
48 | |||
49 | AVAILTUNES += "armv5tesoftfp" | ||
50 | PACKAGE_EXTRA_ARCHS:tune-armv5tesoftfp = "${TUNE_PKGARCH:tune-armv5tesoftfp}" | ||
51 | BASE_LIB:tune-armv5tesoftfp = "lib/arm/v5te/softfp" | ||
52 | TUNE_FEATURES:tune-armv5tesoftfp = "arm armv7r" | ||
53 | TUNE_CCARGS:tune-armv5tesoftfp = "-marm -march=armv5te+fp -mfloat-abi=softfp" | ||
54 | TUNE_PKGARCH:tune-armv5tesoftfp = "armv5tefp" | ||
55 | |||
56 | |||
57 | # arm/v5te/hard | ||
58 | # CFLAGS: -marm -march=armv5te+fp -mfloat-abi=hard | ||
59 | DEFAULTTUNE:virtclass-multilib-libarmv5tehard = "armv5tehard" | ||
60 | |||
61 | AVAILTUNES += "armv5tehard" | ||
62 | PACKAGE_EXTRA_ARCHS:tune-armv5tehard = "${TUNE_PKGARCH:tune-armv5tehard}" | ||
63 | BASE_LIB:tune-armv5tehard = "lib/arm/v5te/hard" | ||
64 | TUNE_FEATURES:tune-armv5tehard = "arm armv7r" | ||
65 | TUNE_CCARGS:tune-armv5tehard = "-marm -march=armv5te+fp -mfloat-abi=hard" | ||
66 | TUNE_PKGARCH:tune-armv5tehard = "armv5tefphf" | ||
67 | |||
68 | |||
69 | # thumb/nofp | ||
70 | # CFLAGS: -mthumb -mfloat-abi=soft | ||
71 | DEFAULTTUNE:virtclass-multilib-libnofp = "armnofp" | ||
72 | |||
73 | AVAILTUNES += "armnofp" | ||
74 | PACKAGE_EXTRA_ARCHS:tune-armnofp = "${TUNE_PKGARCH:tune-armnofp}" | ||
75 | BASE_LIB:tune-armnofp = "lib/thumb/nofp" | ||
76 | TUNE_FEATURES:tune-armnofp = "arm armv7r" | ||
77 | TUNE_CCARGS:tune-armnofp = "-mthumb -mfloat-abi=soft" | ||
78 | TUNE_PKGARCH:tune-armnofp = "armt" | ||
79 | |||
80 | |||
81 | # thumb/v7/nofp | ||
82 | # CFLAGS: -mthumb -march=armv7 -mfloat-abi=soft | ||
83 | DEFAULTTUNE:virtclass-multilib-libv7nofp = "armv7nofp" | ||
84 | |||
85 | AVAILTUNES += "armv7nofp" | ||
86 | PACKAGE_EXTRA_ARCHS:tune-armv7nofp = "${TUNE_PKGARCH:tune-armv7nofp}" | ||
87 | BASE_LIB:tune-armv7nofp = "lib/thumb/v7/nofp" | ||
88 | TUNE_FEATURES:tune-armv7nofp ="arm armv7r" | ||
89 | TUNE_CCARGS:tune-armv7nofp = "-mthumb -march=armv7 -mfloat-abi=soft" | ||
90 | TUNE_PKGARCH:tune-armv7nofp = "armv7t" | ||
91 | |||
92 | |||
93 | # thumb/v7+fp/softfp | ||
94 | # CFLAGS: -mthumb -march=armv7+fp -mfloat-abi=softfp | ||
95 | DEFAULTTUNE:virtclass-multilib-libv7fpsoftfp = "armv7fpsoftfp" | ||
96 | |||
97 | AVAILTUNES += "armv7fpsoftfp" | ||
98 | PACKAGE_EXTRA_ARCHS:tune-armv7fpsoftfp = "${TUNE_PKGARCH:tune-armv7fpsoftfp}" | ||
99 | BASE_LIB:tune-armv7fpsoftfp = "lib/thumb/v7+fp/softfp" | ||
100 | TUNE_FEATURES:tune-armv7fpsoftfp ="arm armv7r" | ||
101 | TUNE_CCARGS:tune-armv7fpsoftfp = "-mthumb -march=armv7+fp -mfloat-abi=softfp" | ||
102 | TUNE_PKGARCH:tune-armv7fpsoftfp = "armv7fpt" | ||
103 | |||
104 | |||
105 | # thumb/v7+fp/hard | ||
106 | # CFLAGS: -mthumb -march=armv7+fp -mfloat-abi=hard | ||
107 | DEFAULTTUNE:virtclass-multilib-libv7fphard = "armv7fphard" | ||
108 | |||
109 | AVAILTUNES += "armv7fphard" | ||
110 | PACKAGE_EXTRA_ARCHS:tune-armv7fphard = "${TUNE_PKGARCH:tune-armv7fphard}" | ||
111 | BASE_LIB:tune-armv7fphard = "lib/thumb/v7+fp/hard" | ||
112 | TUNE_FEATURES:tune-armv7fphard ="arm armv7r" | ||
113 | TUNE_CCARGS:tune-armv7fphard = "-mthumb -march=armv7+fp -mfloat-abi=hard" | ||
114 | TUNE_PKGARCH:tune-armv7fphard = "armv7fpthf" | ||
115 | |||
116 | |||
117 | # thumb/v6-m/nofp | ||
118 | # CFLAGS: -mthumb -march=armv6s-m -mfloat-abi=soft | ||
119 | DEFAULTTUNE:virtclass-multilib-libv6mnofp = "armv6mnofp" | ||
120 | |||
121 | # Workaround for this multilib in newlib | ||
122 | # newlib/libc/sys/arm/trap.S:88: Error: lo register required -- `sub ip,sp,ip | ||
123 | EXTRA_OECONF:append:pn-libv6mnofp-newlib = " --disable-newlib-supplied-syscalls" | ||
124 | |||
125 | AVAILTUNES += "armv6mnofp" | ||
126 | PACKAGE_EXTRA_ARCHS:tune-armv6mnofp = "${TUNE_PKGARCH:tune-armv6mnofp}" | ||
127 | BASE_LIB:tune-armv6mnofp = "lib/thumb/v6-m/nofp" | ||
128 | TUNE_FEATURES:tune-armv6mnofp ="arm armv7r" | ||
129 | TUNE_CCARGS:tune-armv6mnofp = "-mthumb -march=armv6s-m -mfloat-abi=soft" | ||
130 | TUNE_PKGARCH:tune-armv6mnofp = "armv6smt" | ||
131 | |||
132 | |||
133 | # thumb/v7-m/nofp | ||
134 | # CFLAGS: -mthumb -march=armv7-m -mfloat-abi=soft | ||
135 | DEFAULTTUNE:virtclass-multilib-libv7mnofp = "armv7mnofp" | ||
136 | |||
137 | AVAILTUNES += "armv7mnofp" | ||
138 | PACKAGE_EXTRA_ARCHS:tune-armv7mnofp = "${TUNE_PKGARCH:tune-armv7mnofp}" | ||
139 | BASE_LIB:tune-armv7mnofp = "lib/thumb/v7-m/nofp" | ||
140 | TUNE_FEATURES:tune-armv7mnofp ="arm armv7r" | ||
141 | TUNE_CCARGS:tune-armv7mnofp = "-mthumb -march=armv7-m -mfloat-abi=soft" | ||
142 | TUNE_PKGARCH:tune-armv7mnofp = "armv7mt" | ||
143 | |||
144 | |||
145 | # thumb/v7e-m/nofp | ||
146 | # CFLAGS: -mthumb -march=armv7e-m -mfloat-abi=soft | ||
147 | DEFAULTTUNE:virtclass-multilib-libv7emnofp = "armv7emnofp" | ||
148 | |||
149 | AVAILTUNES += "armv7emnofp" | ||
150 | PACKAGE_EXTRA_ARCHS:tune-armv7emnofp = "${TUNE_PKGARCH:tune-armv7emnofp}" | ||
151 | BASE_LIB:tune-armv7emnofp = "lib/thumb/v7e-m/nofp" | ||
152 | TUNE_FEATURES:tune-armv7emnofp ="arm armv7r" | ||
153 | TUNE_CCARGS:tune-armv7emnofp = "-mthumb -march=armv7e-m -mfloat-abi=soft" | ||
154 | TUNE_PKGARCH:tune-armv7emnofp = "armv7emt" | ||
155 | |||
156 | |||
157 | # thumb/v7e-m+fp/softfp | ||
158 | # CFLAGS: -mthumb -march=armv7e-m+fp -mfloat-abi=softfp | ||
159 | DEFAULTTUNE:virtclass-multilib-libv7emfpsoftfp = "armv7emfpsoftfp" | ||
160 | |||
161 | AVAILTUNES += "armv7emfpsoftfp" | ||
162 | PACKAGE_EXTRA_ARCHS:tune-armv7emfpsoftfp = "${TUNE_PKGARCH:tune-armv7emfpsoftfp}" | ||
163 | BASE_LIB:tune-armv7emfpsoftfp = "lib/thumb/v7e-m+fp/softfp" | ||
164 | TUNE_FEATURES:tune-armv7emfpsoftfp ="arm armv7r" | ||
165 | TUNE_CCARGS:tune-armv7emfpsoftfp = "-mthumb -march=armv7e-m+fp -mfloat-abi=softfp" | ||
166 | TUNE_PKGARCH:tune-armv7emfpsoftfp = "armv7emfpt" | ||
167 | |||
168 | |||
169 | # thumb/v7e-m+fp/hard | ||
170 | # CFLAGS: -mthumb -march=armv7e-m+fp -mfloat-abi=hard | ||
171 | DEFAULTTUNE:virtclass-multilib-libv7emfphard = "armv7emfphard" | ||
172 | |||
173 | AVAILTUNES += "armv7emfphard" | ||
174 | PACKAGE_EXTRA_ARCHS:tune-armv7emfphard = "${TUNE_PKGARCH:tune-armv7emfphard}" | ||
175 | BASE_LIB:tune-armv7emfphard = "lib/thumb/v7e-m+fp/hard" | ||
176 | TUNE_FEATURES:tune-armv7emfphard ="arm armv7r" | ||
177 | TUNE_CCARGS:tune-armv7emfphard = "-mthumb -march=armv7e-m+fp -mfloat-abi=hard" | ||
178 | TUNE_PKGARCH:tune-armv7emfphard = "armv7emfpthf" | ||
179 | |||
180 | |||
181 | # thumb/v7e-m+dp/softfp | ||
182 | # CFLAGS: -mthumb -march=armv7e-m+fp.dp -mfloat-abi=softfp | ||
183 | DEFAULTTUNE:virtclass-multilib-libv7emdpsoftfp = "armv7emdpsoftfp" | ||
184 | |||
185 | AVAILTUNES += "armv7emdpsoftfp" | ||
186 | PACKAGE_EXTRA_ARCHS:tune-armv7emdpsoftfp = "${TUNE_PKGARCH:tune-armv7emdpsoftfp}" | ||
187 | BASE_LIB:tune-armv7emdpsoftfp = "lib/thumb/v7e-m+dp/softfp" | ||
188 | TUNE_FEATURES:tune-armv7emdpsoftfp ="arm armv7r" | ||
189 | TUNE_CCARGS:tune-armv7emdpsoftfp = "-mthumb -march=armv7e-m+fp.dp -mfloat-abi=softfp" | ||
190 | TUNE_PKGARCH:tune-armv7emdpsoftfp = "armv7emdp" | ||
191 | |||
192 | # thumb/v7e-m+dp/hard | ||
193 | # CFLAGS: -mthumb -march=armv7e-m+fp.dp -mfloat-abi=hard | ||
194 | DEFAULTTUNE:virtclass-multilib-libv7emdphard = "armv7emdphard" | ||
195 | |||
196 | AVAILTUNES += "armv7emdphard" | ||
197 | PACKAGE_EXTRA_ARCHS:tune-armv7emdphard = "${TUNE_PKGARCH:tune-armv7emdphard}" | ||
198 | BASE_LIB:tune-armv7emdphard = "lib/thumb/v7e-m+dp/hard" | ||
199 | TUNE_FEATURES:tune-armv7emdphard ="arm armv7r" | ||
200 | TUNE_CCARGS:tune-armv7emdphard = "-mthumb -march=armv7e-m+fp.dp -mfloat-abi=hard" | ||
201 | TUNE_PKGARCH:tune-armv7emdphard = "armv7emdpthf" | ||
202 | |||
203 | |||
204 | # thumb/v8-m.base/nofp | ||
205 | # CFLAGS: -mthumb -march=armv8-m.base -mfloat-abi=soft | ||
206 | DEFAULTTUNE:virtclass-multilib-libv8mbasenofp = "armv8mbasenofp" | ||
207 | |||
208 | # Workaround for this multilib in newlib | ||
209 | # newlib/libc/sys/arm/trap.S:88: Error: lo register required -- `sub ip,sp,ip' | ||
210 | EXTRA_OECONF:append:pn-libv8mbasenofp-newlib = " --disable-newlib-supplied-syscalls" | ||
211 | |||
212 | AVAILTUNES += "armv8mbasenofp" | ||
213 | PACKAGE_EXTRA_ARCHS:tune-armv8mbasenofp = "${TUNE_PKGARCH:tune-armv8mbasenofp}" | ||
214 | BASE_LIB:tune-armv8mbasenofp = "lib/thumb/v8-m.base/nofp" | ||
215 | TUNE_FEATURES:tune-armv8mbasenofp ="arm armv8r" | ||
216 | TUNE_CCARGS:tune-armv8mbasenofp = "-mthumb -march=armv8-m.base -mfloat-abi=soft" | ||
217 | TUNE_PKGARCH:tune-armv8mbasenofp = "armv8mbaset" | ||
218 | |||
219 | # thumb/v8-m.main/nofp | ||
220 | # CFLAGS: -mthumb -march=armv8-m.main -mfloat-abi=soft | ||
221 | DEFAULTTUNE:virtclass-multilib-libv8mmainnofp = "armv8mmainnofp" | ||
222 | |||
223 | AVAILTUNES += "armv8mmainnofp" | ||
224 | PACKAGE_EXTRA_ARCHS:tune-armv8mmainnofp = "${TUNE_PKGARCH:tune-armv8mmainnofp}" | ||
225 | BASE_LIB:tune-armv8mmainnofp = "lib/thumb/v8-m.main/nofp" | ||
226 | TUNE_FEATURES:tune-armv8mmainnofp ="arm armv8r" | ||
227 | TUNE_CCARGS:tune-armv8mmainnofp = "-mthumb -march=armv8-m.main -mfloat-abi=soft" | ||
228 | TUNE_PKGARCH:tune-armv8mmainnofp = "armv8mmaint" | ||
229 | |||
230 | |||
231 | # thumb/v8-m.main+fp/softfp | ||
232 | # CFLAGS: -mthumb -march=armv8-m.main+fp -mfloat-abi=softfp | ||
233 | DEFAULTTUNE:virtclass-multilib-libv8mmainfpsoftfp = "armv8mmainfpsoftfp" | ||
234 | |||
235 | AVAILTUNES += "armv8mmainfpsoftfp" | ||
236 | PACKAGE_EXTRA_ARCHS:tune-armv8mmainfpsoftfp = "${TUNE_PKGARCH:tune-armv8mmainfpsoftfp}" | ||
237 | BASE_LIB:tune-armv8mmainfpsoftfp = "lib/thumb/v8-m.main+fp/softfp" | ||
238 | TUNE_FEATURES:tune-armv8mmainfpsoftfp ="arm armv8r" | ||
239 | TUNE_CCARGS:tune-armv8mmainfpsoftfp = "-mthumb -march=armv8-m.main+fp -mfloat-abi=softfp" | ||
240 | TUNE_PKGARCH:tune-armv8mmainfpsoftfp = "armv8mmainfpt" | ||
241 | |||
242 | # thumb/v8-m.main+fp/hard | ||
243 | # CFLAGS: -mthumb -march=armv8-m.main+fp -mfloat-abi=hard | ||
244 | DEFAULTTUNE:virtclass-multilib-libv8mmainfphard = "armv8mmainfphard" | ||
245 | |||
246 | AVAILTUNES += "armv8mmainfphard" | ||
247 | PACKAGE_EXTRA_ARCHS:tune-armv8mmainfphard = "${TUNE_PKGARCH:tune-armv8mmainfphard}" | ||
248 | BASE_LIB:tune-armv8mmainfphard = "lib/thumb/v8-m.main+fp/hard" | ||
249 | TUNE_FEATURES:tune-armv8mmainfphard ="arm armv8r" | ||
250 | TUNE_CCARGS:tune-armv8mmainfphard = "-mthumb -march=armv8-m.main+fp -mfloat-abi=hard" | ||
251 | TUNE_PKGARCH:tune-armv8mmainfphard = "armv8mmainfpthf" | ||
252 | |||
253 | |||
254 | # thumb/v8-m.main+dp/softfp | ||
255 | # CFLAGS: -mthumb -march=armv8-m.main+fp.dp -mfloat-abi=softfp | ||
256 | DEFAULTTUNE:virtclass-multilib-libv8mmaindpsoftfp = "armv8mmaindpsoftfp" | ||
257 | |||
258 | AVAILTUNES += "armv8mmaindpsoftfp" | ||
259 | PACKAGE_EXTRA_ARCHS:tune-armv8mmaindpsoftfp = "${TUNE_PKGARCH:tune-armv8mmaindpsoftfp}" | ||
260 | BASE_LIB:tune-armv8mmaindpsoftfp = "lib/thumb/v8-m.main+dp/softfp" | ||
261 | TUNE_FEATURES:tune-armv8mmaindpsoftfp ="arm armv8r" | ||
262 | TUNE_CCARGS:tune-armv8mmaindpsoftfp = "-mthumb -march=armv8-m.main+fp.dp -mfloat-abi=softfp" | ||
263 | TUNE_PKGARCH:tune-armv8mmaindpsoftfp = "armv8mmainfpdpt" | ||
264 | |||
265 | |||
266 | # thumb/v8-m.main+dp/hard | ||
267 | # CFLAGS: -mthumb -march=armv8-m.main+fp.dp -mfloat-abi=hard | ||
268 | DEFAULTTUNE:virtclass-multilib-libv8mmaindphard = "armv8mmaindphard" | ||
269 | |||
270 | AVAILTUNES += "armv8mmaindphard" | ||
271 | PACKAGE_EXTRA_ARCHS:tune-armv8mmaindphard = "${TUNE_PKGARCH:tune-armv8mmaindphard}" | ||
272 | BASE_LIB:tune-armv8mmaindphard = "lib/thumb/v8-m.main+dp/hard" | ||
273 | TUNE_FEATURES:tune-armv8mmaindphard ="arm armv8r" | ||
274 | TUNE_CCARGS:tune-armv8mmaindphard = "-mthumb -march=armv8-m.main+fp.dp -mfloat-abi=hard" | ||
275 | TUNE_PKGARCH:tune-armv8mmaindphard = "armv8mmainfpdpthf" | ||
diff --git a/meta-vitis-tc/conf/machine/include/baremetal-tc.conf b/meta-vitis-tc/conf/machine/include/baremetal-tc.conf new file mode 100644 index 00000000..c9f5c614 --- /dev/null +++ b/meta-vitis-tc/conf/machine/include/baremetal-tc.conf | |||
@@ -0,0 +1,7 @@ | |||
1 | # This is specific to baremetal toolchains only. | ||
2 | # | ||
3 | # Some of the operations we want to do are different then regular Yocto | ||
4 | # Project SDK workflows, so wrap baremetal toolchain items in a custom | ||
5 | # override: | ||
6 | |||
7 | MACHINEOVERRIDES:append = ":baremetal-multilib-tc" | ||
diff --git a/meta-vitis-tc/conf/machine/microblaze-tc.conf b/meta-vitis-tc/conf/machine/microblaze-tc.conf new file mode 100644 index 00000000..38e0b01b --- /dev/null +++ b/meta-vitis-tc/conf/machine/microblaze-tc.conf | |||
@@ -0,0 +1,550 @@ | |||
1 | require conf/machine/include/machine-xilinx-qemu.inc | ||
2 | require conf/multilib.conf | ||
3 | require conf/machine/include/microblaze/arch-microblaze.inc | ||
4 | require conf/machine/include/baremetal-tc.conf | ||
5 | |||
6 | # Set defaults | ||
7 | # pie is not supported on microblaze, disable it to avoid: | ||
8 | # .../microblaze-xilinx-elf/12.2.0/ld: -pie not supported | ||
9 | GCCPIE:microblaze = "" | ||
10 | GLIBCPIE:microblaze = "" | ||
11 | SECURITY_CFLAGS:remove:microblaze = "${SECURITY_PIE_CFLAGS}" | ||
12 | SECURITY_CFLAGS:pn-libgcc:microblaze = "" | ||
13 | |||
14 | # ILP request an alternative machine dictionary | ||
15 | INHERIT += "xlnx-standalone" | ||
16 | PACKAGEQA_EXTRA_MACHDEFFUNCS .= '${@bb.utils.contains("TUNE_FEATURES", "64-bit", " xlnx_mb64_dict", "", d)}' | ||
17 | |||
18 | # GNU hash style not supported | ||
19 | LINKER_HASH_STYLE:microblaze = "" | ||
20 | |||
21 | # Define all of the multilibs supproted by this configuration | ||
22 | MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" | ||
23 | |||
24 | MULTILIBS += "multilib:libmble" | ||
25 | MULTILIBS += "multilib:libmbbs" | ||
26 | MULTILIBS += "multilib:libmbp" | ||
27 | MULTILIBS += "multilib:libmbm" | ||
28 | MULTILIBS += "multilib:libmbfpd" | ||
29 | MULTILIBS += "multilib:libmbmfpd" | ||
30 | MULTILIBS += "multilib:libmbpm" | ||
31 | MULTILIBS += "multilib:libmbpfpd" | ||
32 | MULTILIBS += "multilib:libmbpmfpd" | ||
33 | MULTILIBS += "multilib:libmbbsp" | ||
34 | MULTILIBS += "multilib:libmbbsm" | ||
35 | MULTILIBS += "multilib:libmbbsfpd" | ||
36 | MULTILIBS += "multilib:libmbbsmfpd" | ||
37 | MULTILIBS += "multilib:libmbbspm" | ||
38 | MULTILIBS += "multilib:libmbbspfpd" | ||
39 | MULTILIBS += "multilib:libmbbspmfpd" | ||
40 | MULTILIBS += "multilib:libmblem64" | ||
41 | MULTILIBS += "multilib:libmblebs" | ||
42 | MULTILIBS += "multilib:libmblep" | ||
43 | MULTILIBS += "multilib:libmblem" | ||
44 | MULTILIBS += "multilib:libmblefpd" | ||
45 | MULTILIBS += "multilib:libmblemfpd" | ||
46 | MULTILIBS += "multilib:libmblepm" | ||
47 | MULTILIBS += "multilib:libmblepfpd" | ||
48 | MULTILIBS += "multilib:libmblepmfpd" | ||
49 | MULTILIBS += "multilib:libmblebsp" | ||
50 | MULTILIBS += "multilib:libmblebsm" | ||
51 | MULTILIBS += "multilib:libmblebsfpd" | ||
52 | MULTILIBS += "multilib:libmblebsmfpd" | ||
53 | MULTILIBS += "multilib:libmblebspm" | ||
54 | MULTILIBS += "multilib:libmblebspfpd" | ||
55 | MULTILIBS += "multilib:libmblebspmfpd" | ||
56 | MULTILIBS += "multilib:libmblem64bs" | ||
57 | MULTILIBS += "multilib:libmblem64p" | ||
58 | MULTILIBS += "multilib:libmblem64m" | ||
59 | MULTILIBS += "multilib:libmblem64fpd" | ||
60 | MULTILIBS += "multilib:libmblem64mfpd" | ||
61 | MULTILIBS += "multilib:libmblem64pm" | ||
62 | MULTILIBS += "multilib:libmblem64pfpd" | ||
63 | MULTILIBS += "multilib:libmblem64pmfpd" | ||
64 | MULTILIBS += "multilib:libmblem64bsp" | ||
65 | MULTILIBS += "multilib:libmblem64bsm" | ||
66 | MULTILIBS += "multilib:libmblem64bsfpd" | ||
67 | MULTILIBS += "multilib:libmblem64bsmfpd" | ||
68 | MULTILIBS += "multilib:libmblem64bspm" | ||
69 | MULTILIBS += "multilib:libmblem64bspfpd" | ||
70 | MULTILIBS += "multilib:libmblem64bspmfpd" | ||
71 | |||
72 | |||
73 | # Base configuration | ||
74 | # CFLAGS: | ||
75 | DEFAULTTUNE = "microblaze" | ||
76 | |||
77 | AVAILTUNES += "microblaze" | ||
78 | BASE_LIB:tune-microblaze = "lib" | ||
79 | TUNE_FEATURES:tune-microblaze = "microblaze bigendian" | ||
80 | PACKAGE_EXTRA_ARCHS:tune-microblaze = "${TUNE_PKGARCH}" | ||
81 | |||
82 | |||
83 | # le | ||
84 | # CFLAGS: -mlittle-endian | ||
85 | DEFAULTTUNE:virtclass-multilib-libmble = "microblazele" | ||
86 | |||
87 | AVAILTUNES += "microblazele" | ||
88 | BASE_LIB:tune-microblazele = "lib/le" | ||
89 | TUNE_FEATURES:tune-microblazele = "microblaze" | ||
90 | PACKAGE_EXTRA_ARCHS:tune-microblazele = "${TUNE_PKGARCH}" | ||
91 | |||
92 | |||
93 | # bs | ||
94 | # CFLAGS: -mxl-barrel-shift | ||
95 | DEFAULTTUNE:virtclass-multilib-libmbbs = "microblazebs" | ||
96 | |||
97 | AVAILTUNES += "microblazebs" | ||
98 | BASE_LIB:tune-microblazebs = "lib/bs" | ||
99 | TUNE_FEATURES:tune-microblazebs = "microblaze bigendian barrel-shift" | ||
100 | PACKAGE_EXTRA_ARCHS:tune-microblazebs = "${TUNE_PKGARCH}" | ||
101 | |||
102 | |||
103 | # p | ||
104 | # CFLAGS: -mxl-pattern-compare | ||
105 | DEFAULTTUNE:virtclass-multilib-libmbp = "microblazep" | ||
106 | |||
107 | AVAILTUNES += "microblazep" | ||
108 | BASE_LIB:tune-microblazep = "lib/p" | ||
109 | TUNE_FEATURES:tune-microblazep = "microblaze bigendian pattern-compare" | ||
110 | PACKAGE_EXTRA_ARCHS:tune-microblazep = "${TUNE_PKGARCH}" | ||
111 | |||
112 | |||
113 | # m | ||
114 | # CFLAGS: -mno-xl-soft-mul | ||
115 | DEFAULTTUNE:virtclass-multilib-libmbm = "microblazem" | ||
116 | |||
117 | AVAILTUNES += "microblazem" | ||
118 | BASE_LIB:tune-microblazem = "lib/m" | ||
119 | TUNE_FEATURES:tune-microblazem = "microblaze bigendian multiply-low" | ||
120 | PACKAGE_EXTRA_ARCHS:tune-microblazem = "${TUNE_PKGARCH}" | ||
121 | |||
122 | |||
123 | # fpd | ||
124 | # CFLAGS: -mhard-float | ||
125 | DEFAULTTUNE:virtclass-multilib-libmbfpd = "microblazefpd" | ||
126 | |||
127 | AVAILTUNES += "microblazefpd" | ||
128 | BASE_LIB:tune-microblazefpd = "lib/fpd" | ||
129 | TUNE_FEATURES:tune-microblazefpd = "microblaze bigendian fpu-hard" | ||
130 | PACKAGE_EXTRA_ARCHS:tune-microblazefpd = "${TUNE_PKGARCH}" | ||
131 | |||
132 | |||
133 | # m/fpd | ||
134 | # CFLAGS: -mno-xl-soft-mul -mhard-float | ||
135 | DEFAULTTUNE:virtclass-multilib-libmbmfpd = "microblazemfpd" | ||
136 | |||
137 | AVAILTUNES += "microblazemfpd" | ||
138 | BASE_LIB:tune-microblazemfpd = "lib/m/fpd" | ||
139 | TUNE_FEATURES:tune-microblazemfpd = "microblaze bigendian multiply-low fpu-hard" | ||
140 | PACKAGE_EXTRA_ARCHS:tune-microblazemfpd = "${TUNE_PKGARCH}" | ||
141 | |||
142 | |||
143 | # p/m | ||
144 | # CFLAGS: -mxl-pattern-compare -mno-xl-soft-mul | ||
145 | DEFAULTTUNE:virtclass-multilib-libmbpm = "microblazepm" | ||
146 | |||
147 | AVAILTUNES += "microblazepm" | ||
148 | BASE_LIB:tune-microblazepm = "lib/p/m" | ||
149 | TUNE_FEATURES:tune-microblazepm = "microblaze bigendian pattern-compare multiply-low" | ||
150 | PACKAGE_EXTRA_ARCHS:tune-microblazepm = "${TUNE_PKGARCH}" | ||
151 | |||
152 | |||
153 | # p/fpd | ||
154 | # CFLAGS: -mxl-pattern-compare -mhard-float | ||
155 | DEFAULTTUNE:virtclass-multilib-libmbpfpd = "microblazepfpd" | ||
156 | |||
157 | AVAILTUNES += "microblazepfpd" | ||
158 | BASE_LIB:tune-microblazepfpd = "lib/p/fpd" | ||
159 | TUNE_FEATURES:tune-microblazepfpd = "microblaze bigendian pattern-compare fpu-hard" | ||
160 | PACKAGE_EXTRA_ARCHS:tune-microblazepfpd = "${TUNE_PKGARCH}" | ||
161 | |||
162 | |||
163 | # p/m/fpd | ||
164 | # CFLAGS: -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
165 | DEFAULTTUNE:virtclass-multilib-libmbpmfpd = "microblazepmfpd" | ||
166 | |||
167 | AVAILTUNES += "microblazepmfpd" | ||
168 | BASE_LIB:tune-microblazepmfpd = "lib/p/m/fpd" | ||
169 | TUNE_FEATURES:tune-microblazepmfpd = "microblaze bigendian pattern-compare multiply-low fpu-hard" | ||
170 | PACKAGE_EXTRA_ARCHS:tune-microblazepmfpd = "${TUNE_PKGARCH}" | ||
171 | |||
172 | |||
173 | # bs/p | ||
174 | # CFLAGS: -mxl-barrel-shift -mxl-pattern-compare | ||
175 | DEFAULTTUNE:virtclass-multilib-libmbbsp = "microblazebsp" | ||
176 | |||
177 | AVAILTUNES += "microblazebsp" | ||
178 | BASE_LIB:tune-microblazebsp = "lib/bs/p" | ||
179 | TUNE_FEATURES:tune-microblazebsp = "microblaze bigendian barrel-shift pattern-compare" | ||
180 | PACKAGE_EXTRA_ARCHS:tune-microblazebsp = "${TUNE_PKGARCH}" | ||
181 | |||
182 | |||
183 | # bs/m | ||
184 | # CFLAGS: -mxl-barrel-shift -mno-xl-soft-mul | ||
185 | DEFAULTTUNE:virtclass-multilib-libmbbsm = "microblazebsm" | ||
186 | |||
187 | AVAILTUNES += "microblazebsm" | ||
188 | BASE_LIB:tune-microblazebsm = "lib/bs/m" | ||
189 | TUNE_FEATURES:tune-microblazebsm = "microblaze bigendian barrel-shift multiply-low" | ||
190 | PACKAGE_EXTRA_ARCHS:tune-microblazebsm = "${TUNE_PKGARCH}" | ||
191 | |||
192 | |||
193 | # bs/fpd | ||
194 | # CFLAGS: -mxl-barrel-shift -mhard-float | ||
195 | DEFAULTTUNE:virtclass-multilib-libmbbsfpd = "microblazebsfpd" | ||
196 | |||
197 | AVAILTUNES += "microblazebsfpd" | ||
198 | BASE_LIB:tune-microblazebsfpd = "lib/bs/fpd" | ||
199 | TUNE_FEATURES:tune-microblazebsfpd = "microblaze bigendian barrel-shift fpu-hard" | ||
200 | PACKAGE_EXTRA_ARCHS:tune-microblazebsfpd = "${TUNE_PKGARCH}" | ||
201 | |||
202 | |||
203 | # bs/m/fpd | ||
204 | # CFLAGS: -mxl-barrel-shift -mno-xl-soft-mul -mhard-float | ||
205 | DEFAULTTUNE:virtclass-multilib-libmbbsmfpd = "microblazebsmfpd" | ||
206 | |||
207 | AVAILTUNES += "microblazebsmfpd" | ||
208 | BASE_LIB:tune-microblazebsmfpd = "lib/bs/m/fpd" | ||
209 | TUNE_FEATURES:tune-microblazebsmfpd = "microblaze bigendian barrel-shift multiply-low fpu-hard" | ||
210 | PACKAGE_EXTRA_ARCHS:tune-microblazebsmfpd = "${TUNE_PKGARCH}" | ||
211 | |||
212 | |||
213 | # bs/p/m | ||
214 | # CFLAGS: -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul | ||
215 | DEFAULTTUNE:virtclass-multilib-libmbbspm = "microblazebspm" | ||
216 | |||
217 | AVAILTUNES += "microblazebspm" | ||
218 | BASE_LIB:tune-microblazebspm = "lib/bs/p/m" | ||
219 | TUNE_FEATURES:tune-microblazebspm = "microblaze bigendian barrel-shift pattern-compare multiply-low" | ||
220 | PACKAGE_EXTRA_ARCHS:tune-microblazebspm = "${TUNE_PKGARCH}" | ||
221 | |||
222 | |||
223 | # bs/p/fpd | ||
224 | # CFLAGS: -mxl-barrel-shift -mxl-pattern-compare -mhard-float | ||
225 | DEFAULTTUNE:virtclass-multilib-libmbbspfpd = "microblazebspfpd" | ||
226 | |||
227 | AVAILTUNES += "microblazebspfpd" | ||
228 | BASE_LIB:tune-microblazebspfpd = "lib/bs/p/fpd" | ||
229 | TUNE_FEATURES:tune-microblazebspfpd = "microblaze bigendian barrel-shift pattern-compare fpu-hard" | ||
230 | PACKAGE_EXTRA_ARCHS:tune-microblazebspfpd = "${TUNE_PKGARCH}" | ||
231 | |||
232 | |||
233 | # bs/p/m/fpd | ||
234 | # CFLAGS: -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
235 | DEFAULTTUNE:virtclass-multilib-libmbbspmfpd = "microblazebspmfpd" | ||
236 | |||
237 | AVAILTUNES += "microblazebspmfpd" | ||
238 | BASE_LIB:tune-microblazebspmfpd = "lib/bs/p/m/fpd" | ||
239 | TUNE_FEATURES:tune-microblazebspmfpd = "microblaze bigendian barrel-shift pattern-compare multiply-low fpu-hard" | ||
240 | PACKAGE_EXTRA_ARCHS:tune-microblazebspmfpd = "${TUNE_PKGARCH}" | ||
241 | |||
242 | |||
243 | # le/m64 | ||
244 | # CFLAGS: -mlittle-endian -m64 | ||
245 | DEFAULTTUNE:virtclass-multilib-libmblem64 = "microblazele64" | ||
246 | |||
247 | AVAILTUNES += "microblazele64" | ||
248 | BASE_LIB:tune-microblazele64 = "lib/le/m64" | ||
249 | TUNE_FEATURES:tune-microblazele64 = "microblaze 64-bit" | ||
250 | PACKAGE_EXTRA_ARCHS:tune-microblazele64 = "${TUNE_PKGARCH}" | ||
251 | |||
252 | |||
253 | # le/bs | ||
254 | # CFLAGS: -mlittle-endian -mxl-barrel-shift | ||
255 | DEFAULTTUNE:virtclass-multilib-libmblebs = "microblazelebs" | ||
256 | |||
257 | AVAILTUNES += "microblazelebs" | ||
258 | BASE_LIB:tune-microblazelebs = "lib/le/bs" | ||
259 | TUNE_FEATURES:tune-microblazelebs = "microblaze barrel-shift" | ||
260 | PACKAGE_EXTRA_ARCHS:tune-microblazelebs = "${TUNE_PKGARCH}" | ||
261 | |||
262 | |||
263 | # le/p | ||
264 | # CFLAGS: -mlittle-endian -mxl-pattern-compare | ||
265 | DEFAULTTUNE:virtclass-multilib-libmblep = "microblazelep" | ||
266 | |||
267 | AVAILTUNES += "microblazelep" | ||
268 | BASE_LIB:tune-microblazelep = "lib/le/p" | ||
269 | TUNE_FEATURES:tune-microblazelep = "microblaze pattern-compare" | ||
270 | PACKAGE_EXTRA_ARCHS:tune-microblazelep = "${TUNE_PKGARCH}" | ||
271 | |||
272 | |||
273 | # le/m | ||
274 | # CFLAGS: -mlittle-endian -mno-xl-soft-mul | ||
275 | DEFAULTTUNE:virtclass-multilib-libmblem = "microblazelem" | ||
276 | |||
277 | AVAILTUNES += "microblazelem" | ||
278 | BASE_LIB:tune-microblazelem = "lib/le/m" | ||
279 | TUNE_FEATURES:tune-microblazelem = "microblaze multiply-low" | ||
280 | PACKAGE_EXTRA_ARCHS:tune-microblazelem = "${TUNE_PKGARCH}" | ||
281 | |||
282 | |||
283 | # le/fpd | ||
284 | # CFLAGS: -mlittle-endian -mhard-float | ||
285 | DEFAULTTUNE:virtclass-multilib-libmblefpd = "microblazelefpd" | ||
286 | |||
287 | AVAILTUNES += "microblazelefpd" | ||
288 | BASE_LIB:tune-microblazelefpd = "lib/le/fpd" | ||
289 | TUNE_FEATURES:tune-microblazelefpd = "microblaze fpu-hard" | ||
290 | PACKAGE_EXTRA_ARCHS:tune-microblazelefpd = "${TUNE_PKGARCH}" | ||
291 | |||
292 | |||
293 | # le/m/fpd | ||
294 | # CFLAGS: -mlittle-endian -mno-xl-soft-mul -mhard-float | ||
295 | DEFAULTTUNE:virtclass-multilib-libmblemfpd = "microblazelemfpd" | ||
296 | |||
297 | AVAILTUNES += "microblazelemfpd" | ||
298 | BASE_LIB:tune-microblazelemfpd = "lib/le/m/fpd" | ||
299 | TUNE_FEATURES:tune-microblazelemfpd = "microblaze multiply-low fpu-hard" | ||
300 | PACKAGE_EXTRA_ARCHS:tune-microblazelemfpd = "${TUNE_PKGARCH}" | ||
301 | |||
302 | |||
303 | # le/p/m | ||
304 | # CFLAGS: -mlittle-endian -mxl-pattern-compare -mno-xl-soft-mul | ||
305 | DEFAULTTUNE:virtclass-multilib-libmblepm = "microblazelepm" | ||
306 | |||
307 | AVAILTUNES += "microblazelepm" | ||
308 | BASE_LIB:tune-microblazelepm = "lib/le/p/m" | ||
309 | TUNE_FEATURES:tune-microblazelepm = "microblaze pattern-compare multiply-low" | ||
310 | PACKAGE_EXTRA_ARCHS:tune-microblazelepm = "${TUNE_PKGARCH}" | ||
311 | |||
312 | |||
313 | # le/p/fpd | ||
314 | # CFLAGS: -mlittle-endian -mxl-pattern-compare -mhard-float | ||
315 | DEFAULTTUNE:virtclass-multilib-libmblepfpd = "microblazelepfpd" | ||
316 | |||
317 | AVAILTUNES += "microblazelepfpd" | ||
318 | BASE_LIB:tune-microblazelepfpd = "lib/le/p/fpd" | ||
319 | TUNE_FEATURES:tune-microblazelepfpd = "microblaze pattern-compare fpu-hard" | ||
320 | PACKAGE_EXTRA_ARCHS:tune-microblazelepfpd = "${TUNE_PKGARCH}" | ||
321 | |||
322 | |||
323 | # le/p/m/fpd | ||
324 | # CFLAGS: -mlittle-endian -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
325 | DEFAULTTUNE:virtclass-multilib-libmblepmfpd = "microblazelepmfpd" | ||
326 | |||
327 | AVAILTUNES += "microblazelepmfpd" | ||
328 | BASE_LIB:tune-microblazelepmfpd = "lib/le/p/m/fpd" | ||
329 | TUNE_FEATURES:tune-microblazelepmfpd = "microblaze pattern-compare multiply-low fpu-hard" | ||
330 | PACKAGE_EXTRA_ARCHS:tune-microblazelepmfpd = "${TUNE_PKGARCH}" | ||
331 | |||
332 | |||
333 | # le/bs/p | ||
334 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare | ||
335 | DEFAULTTUNE:virtclass-multilib-libmblebsp = "microblazelebsp" | ||
336 | |||
337 | AVAILTUNES += "microblazelebsp" | ||
338 | BASE_LIB:tune-microblazelebsp = "lib/le/bs/p" | ||
339 | TUNE_FEATURES:tune-microblazelebsp = "microblaze barrel-shift pattern-compare" | ||
340 | PACKAGE_EXTRA_ARCHS:tune-microblazelebsp = "${TUNE_PKGARCH}" | ||
341 | |||
342 | |||
343 | # le/bs/m | ||
344 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mno-xl-soft-mul | ||
345 | DEFAULTTUNE:virtclass-multilib-libmblebsm = "microblazelebsm" | ||
346 | |||
347 | AVAILTUNES += "microblazelebsm" | ||
348 | BASE_LIB:tune-microblazelebsm = "lib/le/bs/m" | ||
349 | TUNE_FEATURES:tune-microblazelebsm = "microblaze barrel-shift multiply-low" | ||
350 | PACKAGE_EXTRA_ARCHS:tune-microblazelebsm = "${TUNE_PKGARCH}" | ||
351 | |||
352 | |||
353 | # le/bs/fpd | ||
354 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mhard-float | ||
355 | DEFAULTTUNE:virtclass-multilib-libmblebsfpd = "microblazelebsfpd" | ||
356 | |||
357 | AVAILTUNES += "microblazelebsfpd" | ||
358 | BASE_LIB:tune-microblazelebsfpd = "lib/le/bs/fpd" | ||
359 | TUNE_FEATURES:tune-microblazelebsfpd = "microblaze barrel-shift fpu-hard" | ||
360 | PACKAGE_EXTRA_ARCHS:tune-microblazelebsfpd = "${TUNE_PKGARCH}" | ||
361 | |||
362 | |||
363 | # le/bs/m/fpd | ||
364 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mno-xl-soft-mul -mhard-float | ||
365 | DEFAULTTUNE:virtclass-multilib-libmblebsmfpd = "microblazelebsmfpd" | ||
366 | |||
367 | AVAILTUNES += "microblazelebsmfpd" | ||
368 | BASE_LIB:tune-microblazelebsmfpd = "lib/le/bs/m/fpd" | ||
369 | TUNE_FEATURES:tune-microblazelebsmfpd = "microblaze barrel-shift multiply-low fpu-hard" | ||
370 | PACKAGE_EXTRA_ARCHS:tune-microblazelebsmfpd = "${TUNE_PKGARCH}" | ||
371 | |||
372 | |||
373 | # le/bs/p/m | ||
374 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul | ||
375 | DEFAULTTUNE:virtclass-multilib-libmblebspm = "microblazelebspm" | ||
376 | |||
377 | AVAILTUNES += "microblazelebspm" | ||
378 | BASE_LIB:tune-microblazelebspm = "lib/le/bs/p/m" | ||
379 | TUNE_FEATURES:tune-microblazelebspm = "microblaze barrel-shift pattern-compare multiply-low" | ||
380 | PACKAGE_EXTRA_ARCHS:tune-microblazelebspm = "${TUNE_PKGARCH}" | ||
381 | |||
382 | |||
383 | # le/bs/p/fpd | ||
384 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mhard-float | ||
385 | DEFAULTTUNE:virtclass-multilib-libmblebspfpd = "microblazelebspfpd" | ||
386 | |||
387 | AVAILTUNES += "microblazelebspfpd" | ||
388 | BASE_LIB:tune-microblazelebspfpd = "lib/le/bs/p/fpd" | ||
389 | TUNE_FEATURES:tune-microblazelebspfpd = "microblaze barrel-shift pattern-compare fpu-hard" | ||
390 | PACKAGE_EXTRA_ARCHS:tune-microblazelebspfpd = "${TUNE_PKGARCH}" | ||
391 | |||
392 | |||
393 | # le/bs/p/m/fpd | ||
394 | # CFLAGS: -mlittle-endian -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
395 | DEFAULTTUNE:virtclass-multilib-libmblebspmfpd = "microblazelebspmfpd" | ||
396 | |||
397 | AVAILTUNES += "microblazelebspmfpd" | ||
398 | BASE_LIB:tune-microblazelebspmfpd = "lib/le/bs/p/m/fpd" | ||
399 | TUNE_FEATURES:tune-microblazelebspmfpd = "microblaze barrel-shift pattern-compare multiply-low fpu-hard" | ||
400 | PACKAGE_EXTRA_ARCHS:tune-microblazelebspmfpd = "${TUNE_PKGARCH}" | ||
401 | |||
402 | |||
403 | # le/m64/bs | ||
404 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift | ||
405 | DEFAULTTUNE:virtclass-multilib-libmblem64bs = "microblazele64bs" | ||
406 | |||
407 | AVAILTUNES += "microblazele64bs" | ||
408 | BASE_LIB:tune-microblazele64bs = "lib/le/m64/bs" | ||
409 | TUNE_FEATURES:tune-microblazele64bs = "microblaze 64-bit barrel-shift" | ||
410 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bs = "${TUNE_PKGARCH}" | ||
411 | |||
412 | |||
413 | # le/m64/p | ||
414 | # CFLAGS: -mlittle-endian -m64 -mxl-pattern-compare | ||
415 | DEFAULTTUNE:virtclass-multilib-libmblem64p = "microblazele64p" | ||
416 | |||
417 | AVAILTUNES += "microblazele64p" | ||
418 | BASE_LIB:tune-microblazele64p = "lib/le/m64/p" | ||
419 | TUNE_FEATURES:tune-microblazele64p = "microblaze 64-bit pattern-compare" | ||
420 | PACKAGE_EXTRA_ARCHS:tune-microblazele64p = "${TUNE_PKGARCH}" | ||
421 | |||
422 | |||
423 | # le/m64/m | ||
424 | # CFLAGS: -mlittle-endian -m64 -mno-xl-soft-mul | ||
425 | DEFAULTTUNE:virtclass-multilib-libmblem64m = "microblazele64m" | ||
426 | |||
427 | AVAILTUNES += "microblazele64m" | ||
428 | BASE_LIB:tune-microblazele64m = "lib/le/m64/m" | ||
429 | TUNE_FEATURES:tune-microblazele64m = "microblaze 64-bit multiply-low" | ||
430 | PACKAGE_EXTRA_ARCHS:tune-microblazele64m = "${TUNE_PKGARCH}" | ||
431 | |||
432 | |||
433 | # le/m64/fpd | ||
434 | # CFLAGS: -mlittle-endian -m64 -mhard-float | ||
435 | DEFAULTTUNE:virtclass-multilib-libmblem64fpd = "microblazele64fpd" | ||
436 | |||
437 | AVAILTUNES += "microblazele64fpd" | ||
438 | BASE_LIB:tune-microblazele64fpd = "lib/le/m64/fpd" | ||
439 | TUNE_FEATURES:tune-microblazele64fpd = "microblaze 64-bit fpu-hard" | ||
440 | PACKAGE_EXTRA_ARCHS:tune-microblazele64fpd = "${TUNE_PKGARCH}" | ||
441 | |||
442 | |||
443 | # le/m64/m/fpd | ||
444 | # CFLAGS: -mlittle-endian -m64 -mno-xl-soft-mul -mhard-float | ||
445 | DEFAULTTUNE:virtclass-multilib-libmblem64mfpd = "microblazele64mfpd" | ||
446 | |||
447 | AVAILTUNES += "microblazele64mfpd" | ||
448 | BASE_LIB:tune-microblazele64mfpd = "lib/le/m64/m/fpd" | ||
449 | TUNE_FEATURES:tune-microblazele64mfpd = "microblaze 64-bit multiply-low fpu-hard" | ||
450 | PACKAGE_EXTRA_ARCHS:tune-microblazele64mfpd = "${TUNE_PKGARCH}" | ||
451 | |||
452 | |||
453 | # le/m64/p/m | ||
454 | # CFLAGS: -mlittle-endian -m64 -mxl-pattern-compare -mno-xl-soft-mul | ||
455 | DEFAULTTUNE:virtclass-multilib-libmblem64pm = "microblazele64pm" | ||
456 | |||
457 | AVAILTUNES += "microblazele64pm" | ||
458 | BASE_LIB:tune-microblazele64pm = "lib/le/m64/p/m" | ||
459 | TUNE_FEATURES:tune-microblazele64pm = "microblaze 64-bit pattern-compare multiply-low" | ||
460 | PACKAGE_EXTRA_ARCHS:tune-microblazele64pm = "${TUNE_PKGARCH}" | ||
461 | |||
462 | |||
463 | # le/m64/p/fpd | ||
464 | # CFLAGS: -mlittle-endian -m64 -mxl-pattern-compare -mhard-float | ||
465 | DEFAULTTUNE:virtclass-multilib-libmblem64pfpd = "microblazele64pfpd" | ||
466 | |||
467 | AVAILTUNES += "microblazele64pfpd" | ||
468 | BASE_LIB:tune-microblazele64pfpd = "lib/le/m64/p/fpd" | ||
469 | TUNE_FEATURES:tune-microblazele64pfpd = "microblaze 64-bit pattern-compare fpu-hard" | ||
470 | PACKAGE_EXTRA_ARCHS:tune-microblazele64pfpd = "${TUNE_PKGARCH}" | ||
471 | |||
472 | |||
473 | # le/m64/p/m/fpd | ||
474 | # CFLAGS: -mlittle-endian -m64 -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
475 | DEFAULTTUNE:virtclass-multilib-libmblem64pmfpd = "microblazele64pmfpd" | ||
476 | |||
477 | AVAILTUNES += "microblazele64pmfpd" | ||
478 | BASE_LIB:tune-microblazele64pmfpd = "lib/le/m64/p/m/fpd" | ||
479 | TUNE_FEATURES:tune-microblazele64pmfpd = "microblaze 64-bit pattern-compare multiply-low fpu-hard" | ||
480 | PACKAGE_EXTRA_ARCHS:tune-microblazele64pmfpd = "${TUNE_PKGARCH}" | ||
481 | |||
482 | |||
483 | # le/m64/bs/p | ||
484 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mxl-pattern-compare | ||
485 | DEFAULTTUNE:virtclass-multilib-libmblem64bsp = "microblazele64bsp" | ||
486 | |||
487 | AVAILTUNES += "microblazele64bsp" | ||
488 | BASE_LIB:tune-microblazele64bsp = "lib/le/m64/bs/p" | ||
489 | TUNE_FEATURES:tune-microblazele64bsp = "microblaze 64-bit barrel-shift pattern-compare" | ||
490 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bsp = "${TUNE_PKGARCH}" | ||
491 | |||
492 | |||
493 | # le/m64/bs/m | ||
494 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mno-xl-soft-mul | ||
495 | DEFAULTTUNE:virtclass-multilib-libmblem64bsm = "microblazele64bsm" | ||
496 | |||
497 | AVAILTUNES += "microblazele64bsm" | ||
498 | BASE_LIB:tune-microblazele64bsm = "lib/le/m64/bs/m" | ||
499 | TUNE_FEATURES:tune-microblazele64bsm = "microblaze 64-bit barrel-shift multiply-low" | ||
500 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bsm = "${TUNE_PKGARCH}" | ||
501 | |||
502 | |||
503 | # le/m64/bs/fpd | ||
504 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mhard-float | ||
505 | DEFAULTTUNE:virtclass-multilib-libmblem64bsfpd = "microblazele64bsfpd" | ||
506 | |||
507 | AVAILTUNES += "microblazele64bsfpd" | ||
508 | BASE_LIB:tune-microblazele64bsfpd = "lib/le/m64/bs/fpd" | ||
509 | TUNE_FEATURES:tune-microblazele64bsfpd = "microblaze 64-bit barrel-shift fpu-hard" | ||
510 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bsfpd = "${TUNE_PKGARCH}" | ||
511 | |||
512 | |||
513 | # le/m64/bs/m/fpd | ||
514 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mno-xl-soft-mul -mhard-float | ||
515 | DEFAULTTUNE:virtclass-multilib-libmblem64bsmfpd = "microblazele64bsmfpd" | ||
516 | |||
517 | AVAILTUNES += "microblazele64bsmfpd" | ||
518 | BASE_LIB:tune-microblazele64bsmfpd = "lib/le/m64/bs/m/fpd" | ||
519 | TUNE_FEATURES:tune-microblazele64bsmfpd = "microblaze 64-bit barrel-shift multiply-low fpu-hard" | ||
520 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bsmfpd = "${TUNE_PKGARCH}" | ||
521 | |||
522 | |||
523 | # le/m64/bs/p/m | ||
524 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul | ||
525 | DEFAULTTUNE:virtclass-multilib-libmblem64bspm = "microblazele64bspm" | ||
526 | |||
527 | AVAILTUNES += "microblazele64bspm" | ||
528 | BASE_LIB:tune-microblazele64bspm = "lib/le/m64/bs/p/m" | ||
529 | TUNE_FEATURES:tune-microblazele64bspm = "microblaze 64-bit barrel-shift pattern-compare multiply-low" | ||
530 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bspm = "${TUNE_PKGARCH}" | ||
531 | |||
532 | |||
533 | # le/m64/bs/p/fpd | ||
534 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mxl-pattern-compare -mhard-float | ||
535 | DEFAULTTUNE:virtclass-multilib-libmblem64bspfpd = "microblazele64bspfpd" | ||
536 | |||
537 | AVAILTUNES += "microblazele64bspfpd" | ||
538 | BASE_LIB:tune-microblazele64bspfpd = "lib/le/m64/bs/p/fpd" | ||
539 | TUNE_FEATURES:tune-microblazele64bspfpd = "microblaze 64-bit barrel-shift pattern-compare fpu-hard" | ||
540 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bspfpd = "${TUNE_PKGARCH}" | ||
541 | |||
542 | |||
543 | # le/m64/bs/p/m/fpd | ||
544 | # CFLAGS: -mlittle-endian -m64 -mxl-barrel-shift -mxl-pattern-compare -mno-xl-soft-mul -mhard-float | ||
545 | DEFAULTTUNE:virtclass-multilib-libmblem64bspmfpd = "microblazele64bspmfpd" | ||
546 | |||
547 | AVAILTUNES += "microblazele64bspmfpd" | ||
548 | BASE_LIB:tune-microblazele64bspmfpd = "lib/le/m64/bs/p/m/fpd" | ||
549 | TUNE_FEATURES:tune-microblazele64bspmfpd = "microblaze 64-bit barrel-shift pattern-compare multiply-low fpu-hard" | ||
550 | PACKAGE_EXTRA_ARCHS:tune-microblazele64bspmfpd = "${TUNE_PKGARCH}" | ||
diff --git a/meta-vitis-tc/conf/machine/riscv-tc.conf b/meta-vitis-tc/conf/machine/riscv-tc.conf new file mode 100644 index 00000000..d53cbbd7 --- /dev/null +++ b/meta-vitis-tc/conf/machine/riscv-tc.conf | |||
@@ -0,0 +1,317 @@ | |||
1 | require conf/machine/include/machine-xilinx-qemu.inc | ||
2 | require conf/multilib.conf | ||
3 | require conf/machine/include/riscv/tune-riscv.inc | ||
4 | require conf/machine/include/baremetal-tc.conf | ||
5 | |||
6 | # Set defaults | ||
7 | # We don't know why pie is not supported, but when enabled results in: | ||
8 | # .../riscv32-xilinx-elf/12.2.0/ld: -pie not supported | ||
9 | GCCPIE:riscv-tc = "" | ||
10 | GLIBCPIE:riscv-tc = "" | ||
11 | SECURITY_CFLAGS:remove:riscv-tc = "${SECURITY_PIE_CFLAGS}" | ||
12 | SECURITY_CFLAGS:pn-libgcc:riscv-tc = "" | ||
13 | |||
14 | # Make 'riscv' a valid tune feature | ||
15 | TUNEVALID[riscv] = "Define the entire architecture family" | ||
16 | TUNE_CCARGS = "${TUNE_CCARGS:tune-${DEFAULTTUNE}}" | ||
17 | |||
18 | # Define all of the multilibs supported by this configuration | ||
19 | MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}" | ||
20 | |||
21 | ############# DEFAULT SET ################## | ||
22 | MULTILIBS = "" | ||
23 | |||
24 | # Base configuration | ||
25 | # CFLAGS: | ||
26 | DEFAULTTUNE = "riscv" | ||
27 | |||
28 | AVAILTUNES += "riscv" | ||
29 | PACKAGE_EXTRA_ARCHS:tune-riscv = "${TUNE_PKGARCH:tune-riscv}" | ||
30 | BASE_LIB:tune-riscv = "lib" | ||
31 | TUNE_FEATURES:tune-riscv = "riscv" | ||
32 | TUNE_CCARGS:tune-riscv = "" | ||
33 | TUNE_PKGARCH:tune-riscv = "riscv32" | ||
34 | TUNE_ARCH:tune-riscv = "riscv32" | ||
35 | |||
36 | ############ GENERATED ############# | ||
37 | # Multilibs defined in recipes-devtools/gcc/gcc-xilinx-standalone-multilib.inc | ||
38 | # Everything below is generated by riscv-convert.sh | ||
39 | MULTILIBS = "" | ||
40 | MULTILIBS += "multilib:librv32iilp32" | ||
41 | MULTILIBS += "multilib:librv32icilp32" | ||
42 | MULTILIBS += "multilib:librv32imilp32" | ||
43 | MULTILIBS += "multilib:librv32imcilp32" | ||
44 | MULTILIBS += "multilib:librv32imacilp32" | ||
45 | MULTILIBS += "multilib:librv32eilp32e" | ||
46 | MULTILIBS += "multilib:librv32imfzicsrilp32f" | ||
47 | MULTILIBS += "multilib:librv32imfczicsrilp32f" | ||
48 | MULTILIBS += "multilib:librv32imafczicsrilp32f" | ||
49 | MULTILIBS += "multilib:librv32imfdczicsrilp32d" | ||
50 | MULTILIBS += "multilib:librv64ilp64" | ||
51 | MULTILIBS += "multilib:librv64iclp64" | ||
52 | MULTILIBS += "multilib:librv64imlp64" | ||
53 | MULTILIBS += "multilib:librv64imclp64" | ||
54 | MULTILIBS += "multilib:librv64imaclp64" | ||
55 | MULTILIBS += "multilib:librv64imfzicsrlp64f" | ||
56 | MULTILIBS += "multilib:librv64imfczicsrlp64f" | ||
57 | MULTILIBS += "multilib:librv64imafczicsrlp64f" | ||
58 | MULTILIBS += "multilib:librv64imfdczicsrlp64d" | ||
59 | |||
60 | # Base configuration | ||
61 | # CFLAGS: | ||
62 | DEFAULTTUNE = "riscv" | ||
63 | |||
64 | AVAILTUNES += "riscv" | ||
65 | PACKAGE_EXTRA_ARCHS:tune-riscv = "${TUNE_PKGARCH:tune-riscv}" | ||
66 | BASE_LIB:tune-riscv = "lib" | ||
67 | TUNE_FEATURES:tune-riscv = "riscv" | ||
68 | TUNE_CCARGS:tune-riscv = "" | ||
69 | TUNE_PKGARCH:tune-riscv = "riscv32" | ||
70 | TUNE_ARCH:tune-riscv = "riscv32" | ||
71 | |||
72 | |||
73 | # rv32i/ilp32 | ||
74 | # CFLAGS: -march=rv32i -mabi=ilp32 | ||
75 | DEFAULTTUNE:virtclass-multilib-librv32iilp32 = "rv32iilp32" | ||
76 | |||
77 | AVAILTUNES += "rv32iilp32" | ||
78 | PACKAGE_EXTRA_ARCHS:tune-rv32iilp32 = "${TUNE_PKGARCH:tune-rv32iilp32}" | ||
79 | BASE_LIB:tune-rv32iilp32 = "lib/rv32i/ilp32" | ||
80 | TUNE_FEATURES:tune-rv32iilp32 = "riscv" | ||
81 | TUNE_CCARGS:tune-rv32iilp32 = " -march=rv32i -mabi=ilp32" | ||
82 | TUNE_PKGARCH:tune-rv32iilp32 = "rv32iilp32" | ||
83 | TUNE_ARCH:tune-rv32iilp32 = "riscv32" | ||
84 | |||
85 | |||
86 | # rv32ic/ilp32 | ||
87 | # CFLAGS: -march=rv32ic -mabi=ilp32 | ||
88 | DEFAULTTUNE:virtclass-multilib-librv32icilp32 = "rv32icilp32" | ||
89 | |||
90 | AVAILTUNES += "rv32icilp32" | ||
91 | PACKAGE_EXTRA_ARCHS:tune-rv32icilp32 = "${TUNE_PKGARCH:tune-rv32icilp32}" | ||
92 | BASE_LIB:tune-rv32icilp32 = "lib/rv32ic/ilp32" | ||
93 | TUNE_FEATURES:tune-rv32icilp32 = "riscv" | ||
94 | TUNE_CCARGS:tune-rv32icilp32 = " -march=rv32ic -mabi=ilp32" | ||
95 | TUNE_PKGARCH:tune-rv32icilp32 = "rv32icilp32" | ||
96 | TUNE_ARCH:tune-rv32icilp32 = "riscv32" | ||
97 | |||
98 | |||
99 | # rv32im/ilp32 | ||
100 | # CFLAGS: -march=rv32im -mabi=ilp32 | ||
101 | DEFAULTTUNE:virtclass-multilib-librv32imilp32 = "rv32imilp32" | ||
102 | |||
103 | AVAILTUNES += "rv32imilp32" | ||
104 | PACKAGE_EXTRA_ARCHS:tune-rv32imilp32 = "${TUNE_PKGARCH:tune-rv32imilp32}" | ||
105 | BASE_LIB:tune-rv32imilp32 = "lib/rv32im/ilp32" | ||
106 | TUNE_FEATURES:tune-rv32imilp32 = "riscv" | ||
107 | TUNE_CCARGS:tune-rv32imilp32 = " -march=rv32im -mabi=ilp32" | ||
108 | TUNE_PKGARCH:tune-rv32imilp32 = "rv32imilp32" | ||
109 | TUNE_ARCH:tune-rv32imilp32 = "riscv32" | ||
110 | |||
111 | |||
112 | # rv32imc/ilp32 | ||
113 | # CFLAGS: -march=rv32imc -mabi=ilp32 | ||
114 | DEFAULTTUNE:virtclass-multilib-librv32imcilp32 = "rv32imcilp32" | ||
115 | |||
116 | AVAILTUNES += "rv32imcilp32" | ||
117 | PACKAGE_EXTRA_ARCHS:tune-rv32imcilp32 = "${TUNE_PKGARCH:tune-rv32imcilp32}" | ||
118 | BASE_LIB:tune-rv32imcilp32 = "lib/rv32imc/ilp32" | ||
119 | TUNE_FEATURES:tune-rv32imcilp32 = "riscv" | ||
120 | TUNE_CCARGS:tune-rv32imcilp32 = " -march=rv32imc -mabi=ilp32" | ||
121 | TUNE_PKGARCH:tune-rv32imcilp32 = "rv32imcilp32" | ||
122 | TUNE_ARCH:tune-rv32imcilp32 = "riscv32" | ||
123 | |||
124 | |||
125 | # rv32imac/ilp32 | ||
126 | # CFLAGS: -march=rv32imac -mabi=ilp32 | ||
127 | DEFAULTTUNE:virtclass-multilib-librv32imacilp32 = "rv32imacilp32" | ||
128 | |||
129 | AVAILTUNES += "rv32imacilp32" | ||
130 | PACKAGE_EXTRA_ARCHS:tune-rv32imacilp32 = "${TUNE_PKGARCH:tune-rv32imacilp32}" | ||
131 | BASE_LIB:tune-rv32imacilp32 = "lib/rv32imac/ilp32" | ||
132 | TUNE_FEATURES:tune-rv32imacilp32 = "riscv" | ||
133 | TUNE_CCARGS:tune-rv32imacilp32 = " -march=rv32imac -mabi=ilp32" | ||
134 | TUNE_PKGARCH:tune-rv32imacilp32 = "rv32imacilp32" | ||
135 | TUNE_ARCH:tune-rv32imacilp32 = "riscv32" | ||
136 | |||
137 | |||
138 | # rv32e/ilp32e | ||
139 | # CFLAGS: -march=rv32e -mabi=ilp32e | ||
140 | DEFAULTTUNE:virtclass-multilib-librv32eilp32e = "rv32eilp32e" | ||
141 | |||
142 | AVAILTUNES += "rv32eilp32e" | ||
143 | PACKAGE_EXTRA_ARCHS:tune-rv32eilp32e = "${TUNE_PKGARCH:tune-rv32eilp32e}" | ||
144 | BASE_LIB:tune-rv32eilp32e = "lib/rv32e/ilp32e" | ||
145 | TUNE_FEATURES:tune-rv32eilp32e = "riscv" | ||
146 | TUNE_CCARGS:tune-rv32eilp32e = " -march=rv32e -mabi=ilp32e" | ||
147 | TUNE_PKGARCH:tune-rv32eilp32e = "rv32eilp32e" | ||
148 | TUNE_ARCH:tune-rv32eilp32e = "riscv32" | ||
149 | |||
150 | |||
151 | # rv32imf_zicsr/ilp32f | ||
152 | # CFLAGS: -march=rv32imf_zicsr -mabi=ilp32f | ||
153 | DEFAULTTUNE:virtclass-multilib-librv32imfzicsrilp32f = "rv32imf_zicsrilp32f" | ||
154 | |||
155 | AVAILTUNES += "rv32imf_zicsrilp32f" | ||
156 | PACKAGE_EXTRA_ARCHS:tune-rv32imf_zicsrilp32f = "${TUNE_PKGARCH:tune-rv32imf_zicsrilp32f}" | ||
157 | BASE_LIB:tune-rv32imf_zicsrilp32f = "lib/rv32imf_zicsr/ilp32f" | ||
158 | TUNE_FEATURES:tune-rv32imf_zicsrilp32f = "riscv" | ||
159 | TUNE_CCARGS:tune-rv32imf_zicsrilp32f = " -march=rv32imf_zicsr -mabi=ilp32f" | ||
160 | TUNE_PKGARCH:tune-rv32imf_zicsrilp32f = "rv32imf_zicsrilp32f" | ||
161 | TUNE_ARCH:tune-rv32imf_zicsrilp32f = "riscv32" | ||
162 | |||
163 | |||
164 | # rv32imfc_zicsr/ilp32f | ||
165 | # CFLAGS: -march=rv32imfc_zicsr -mabi=ilp32f | ||
166 | DEFAULTTUNE:virtclass-multilib-librv32imfczicsrilp32f = "rv32imfc_zicsrilp32f" | ||
167 | |||
168 | AVAILTUNES += "rv32imfc_zicsrilp32f" | ||
169 | PACKAGE_EXTRA_ARCHS:tune-rv32imfc_zicsrilp32f = "${TUNE_PKGARCH:tune-rv32imfc_zicsrilp32f}" | ||
170 | BASE_LIB:tune-rv32imfc_zicsrilp32f = "lib/rv32imfc_zicsr/ilp32f" | ||
171 | TUNE_FEATURES:tune-rv32imfc_zicsrilp32f = "riscv" | ||
172 | TUNE_CCARGS:tune-rv32imfc_zicsrilp32f = " -march=rv32imfc_zicsr -mabi=ilp32f" | ||
173 | TUNE_PKGARCH:tune-rv32imfc_zicsrilp32f = "rv32imfc_zicsrilp32f" | ||
174 | TUNE_ARCH:tune-rv32imfc_zicsrilp32f = "riscv32" | ||
175 | |||
176 | |||
177 | # rv32imafc_zicsr/ilp32f | ||
178 | # CFLAGS: -march=rv32imafc_zicsr -mabi=ilp32f | ||
179 | DEFAULTTUNE:virtclass-multilib-librv32imafczicsrilp32f = "rv32imafc_zicsrilp32f" | ||
180 | |||
181 | AVAILTUNES += "rv32imafc_zicsrilp32f" | ||
182 | PACKAGE_EXTRA_ARCHS:tune-rv32imafc_zicsrilp32f = "${TUNE_PKGARCH:tune-rv32imafc_zicsrilp32f}" | ||
183 | BASE_LIB:tune-rv32imafc_zicsrilp32f = "lib/rv32imafc_zicsr/ilp32f" | ||
184 | TUNE_FEATURES:tune-rv32imafc_zicsrilp32f = "riscv" | ||
185 | TUNE_CCARGS:tune-rv32imafc_zicsrilp32f = " -march=rv32imafc_zicsr -mabi=ilp32f" | ||
186 | TUNE_PKGARCH:tune-rv32imafc_zicsrilp32f = "rv32imafc_zicsrilp32f" | ||
187 | TUNE_ARCH:tune-rv32imafc_zicsrilp32f = "riscv32" | ||
188 | |||
189 | |||
190 | # rv32imfdc_zicsr/ilp32d | ||
191 | # CFLAGS: -march=rv32imfdc_zicsr -mabi=ilp32d | ||
192 | DEFAULTTUNE:virtclass-multilib-librv32imfdczicsrilp32d = "rv32imfdc_zicsrilp32d" | ||
193 | |||
194 | AVAILTUNES += "rv32imfdc_zicsrilp32d" | ||
195 | PACKAGE_EXTRA_ARCHS:tune-rv32imfdc_zicsrilp32d = "${TUNE_PKGARCH:tune-rv32imfdc_zicsrilp32d}" | ||
196 | BASE_LIB:tune-rv32imfdc_zicsrilp32d = "lib/rv32imfdc_zicsr/ilp32d" | ||
197 | TUNE_FEATURES:tune-rv32imfdc_zicsrilp32d = "riscv" | ||
198 | TUNE_CCARGS:tune-rv32imfdc_zicsrilp32d = " -march=rv32imfdc_zicsr -mabi=ilp32d" | ||
199 | TUNE_PKGARCH:tune-rv32imfdc_zicsrilp32d = "rv32imfdc_zicsrilp32d" | ||
200 | TUNE_ARCH:tune-rv32imfdc_zicsrilp32d = "riscv32" | ||
201 | |||
202 | |||
203 | # rv64i/lp64 | ||
204 | # CFLAGS: -march=rv64i -mabi=lp64 | ||
205 | DEFAULTTUNE:virtclass-multilib-librv64ilp64 = "rv64ilp64" | ||
206 | |||
207 | AVAILTUNES += "rv64ilp64" | ||
208 | PACKAGE_EXTRA_ARCHS:tune-rv64ilp64 = "${TUNE_PKGARCH:tune-rv64ilp64}" | ||
209 | BASE_LIB:tune-rv64ilp64 = "lib/rv64i/lp64" | ||
210 | TUNE_FEATURES:tune-rv64ilp64 = "riscv" | ||
211 | TUNE_CCARGS:tune-rv64ilp64 = " -march=rv64i -mabi=lp64" | ||
212 | TUNE_PKGARCH:tune-rv64ilp64 = "rv64ilp64" | ||
213 | TUNE_ARCH:tune-rv64ilp64 = "riscv64" | ||
214 | |||
215 | |||
216 | # rv64ic/lp64 | ||
217 | # CFLAGS: -march=rv64ic -mabi=lp64 | ||
218 | DEFAULTTUNE:virtclass-multilib-librv64iclp64 = "rv64iclp64" | ||
219 | |||
220 | AVAILTUNES += "rv64iclp64" | ||
221 | PACKAGE_EXTRA_ARCHS:tune-rv64iclp64 = "${TUNE_PKGARCH:tune-rv64iclp64}" | ||
222 | BASE_LIB:tune-rv64iclp64 = "lib/rv64ic/lp64" | ||
223 | TUNE_FEATURES:tune-rv64iclp64 = "riscv" | ||
224 | TUNE_CCARGS:tune-rv64iclp64 = " -march=rv64ic -mabi=lp64" | ||
225 | TUNE_PKGARCH:tune-rv64iclp64 = "rv64iclp64" | ||
226 | TUNE_ARCH:tune-rv64iclp64 = "riscv64" | ||
227 | |||
228 | |||
229 | # rv64im/lp64 | ||
230 | # CFLAGS: -march=rv64im -mabi=lp64 | ||
231 | DEFAULTTUNE:virtclass-multilib-librv64imlp64 = "rv64imlp64" | ||
232 | |||
233 | AVAILTUNES += "rv64imlp64" | ||
234 | PACKAGE_EXTRA_ARCHS:tune-rv64imlp64 = "${TUNE_PKGARCH:tune-rv64imlp64}" | ||
235 | BASE_LIB:tune-rv64imlp64 = "lib/rv64im/lp64" | ||
236 | TUNE_FEATURES:tune-rv64imlp64 = "riscv" | ||
237 | TUNE_CCARGS:tune-rv64imlp64 = " -march=rv64im -mabi=lp64" | ||
238 | TUNE_PKGARCH:tune-rv64imlp64 = "rv64imlp64" | ||
239 | TUNE_ARCH:tune-rv64imlp64 = "riscv64" | ||
240 | |||
241 | |||
242 | # rv64imc/lp64 | ||
243 | # CFLAGS: -march=rv64imc -mabi=lp64 | ||
244 | DEFAULTTUNE:virtclass-multilib-librv64imclp64 = "rv64imclp64" | ||
245 | |||
246 | AVAILTUNES += "rv64imclp64" | ||
247 | PACKAGE_EXTRA_ARCHS:tune-rv64imclp64 = "${TUNE_PKGARCH:tune-rv64imclp64}" | ||
248 | BASE_LIB:tune-rv64imclp64 = "lib/rv64imc/lp64" | ||
249 | TUNE_FEATURES:tune-rv64imclp64 = "riscv" | ||
250 | TUNE_CCARGS:tune-rv64imclp64 = " -march=rv64imc -mabi=lp64" | ||
251 | TUNE_PKGARCH:tune-rv64imclp64 = "rv64imclp64" | ||
252 | TUNE_ARCH:tune-rv64imclp64 = "riscv64" | ||
253 | |||
254 | |||
255 | # rv64imac/lp64 | ||
256 | # CFLAGS: -march=rv64imac -mabi=lp64 | ||
257 | DEFAULTTUNE:virtclass-multilib-librv64imaclp64 = "rv64imaclp64" | ||
258 | |||
259 | AVAILTUNES += "rv64imaclp64" | ||
260 | PACKAGE_EXTRA_ARCHS:tune-rv64imaclp64 = "${TUNE_PKGARCH:tune-rv64imaclp64}" | ||
261 | BASE_LIB:tune-rv64imaclp64 = "lib/rv64imac/lp64" | ||
262 | TUNE_FEATURES:tune-rv64imaclp64 = "riscv" | ||
263 | TUNE_CCARGS:tune-rv64imaclp64 = " -march=rv64imac -mabi=lp64" | ||
264 | TUNE_PKGARCH:tune-rv64imaclp64 = "rv64imaclp64" | ||
265 | TUNE_ARCH:tune-rv64imaclp64 = "riscv64" | ||
266 | |||
267 | |||
268 | # rv64imf_zicsr/lp64f | ||
269 | # CFLAGS: -march=rv64imf_zicsr -mabi=lp64f | ||
270 | DEFAULTTUNE:virtclass-multilib-librv64imfzicsrlp64f = "rv64imf_zicsrlp64f" | ||
271 | |||
272 | AVAILTUNES += "rv64imf_zicsrlp64f" | ||
273 | PACKAGE_EXTRA_ARCHS:tune-rv64imf_zicsrlp64f = "${TUNE_PKGARCH:tune-rv64imf_zicsrlp64f}" | ||
274 | BASE_LIB:tune-rv64imf_zicsrlp64f = "lib/rv64imf_zicsr/lp64f" | ||
275 | TUNE_FEATURES:tune-rv64imf_zicsrlp64f = "riscv" | ||
276 | TUNE_CCARGS:tune-rv64imf_zicsrlp64f = " -march=rv64imf_zicsr -mabi=lp64f" | ||
277 | TUNE_PKGARCH:tune-rv64imf_zicsrlp64f = "rv64imf_zicsrlp64f" | ||
278 | TUNE_ARCH:tune-rv64imf_zicsrlp64f = "riscv64" | ||
279 | |||
280 | |||
281 | # rv64imfc_zicsr/lp64f | ||
282 | # CFLAGS: -march=rv64imfc_zicsr -mabi=lp64f | ||
283 | DEFAULTTUNE:virtclass-multilib-librv64imfczicsrlp64f = "rv64imfc_zicsrlp64f" | ||
284 | |||
285 | AVAILTUNES += "rv64imfc_zicsrlp64f" | ||
286 | PACKAGE_EXTRA_ARCHS:tune-rv64imfc_zicsrlp64f = "${TUNE_PKGARCH:tune-rv64imfc_zicsrlp64f}" | ||
287 | BASE_LIB:tune-rv64imfc_zicsrlp64f = "lib/rv64imfc_zicsr/lp64f" | ||
288 | TUNE_FEATURES:tune-rv64imfc_zicsrlp64f = "riscv" | ||
289 | TUNE_CCARGS:tune-rv64imfc_zicsrlp64f = " -march=rv64imfc_zicsr -mabi=lp64f" | ||
290 | TUNE_PKGARCH:tune-rv64imfc_zicsrlp64f = "rv64imfc_zicsrlp64f" | ||
291 | TUNE_ARCH:tune-rv64imfc_zicsrlp64f = "riscv64" | ||
292 | |||
293 | |||
294 | # rv64imafc_zicsr/lp64f | ||
295 | # CFLAGS: -march=rv64imafc_zicsr -mabi=lp64f | ||
296 | DEFAULTTUNE:virtclass-multilib-librv64imafczicsrlp64f = "rv64imafc_zicsrlp64f" | ||
297 | |||
298 | AVAILTUNES += "rv64imafc_zicsrlp64f" | ||
299 | PACKAGE_EXTRA_ARCHS:tune-rv64imafc_zicsrlp64f = "${TUNE_PKGARCH:tune-rv64imafc_zicsrlp64f}" | ||
300 | BASE_LIB:tune-rv64imafc_zicsrlp64f = "lib/rv64imafc_zicsr/lp64f" | ||
301 | TUNE_FEATURES:tune-rv64imafc_zicsrlp64f = "riscv" | ||
302 | TUNE_CCARGS:tune-rv64imafc_zicsrlp64f = " -march=rv64imafc_zicsr -mabi=lp64f" | ||
303 | TUNE_PKGARCH:tune-rv64imafc_zicsrlp64f = "rv64imafc_zicsrlp64f" | ||
304 | TUNE_ARCH:tune-rv64imafc_zicsrlp64f = "riscv64" | ||
305 | |||
306 | |||
307 | # rv64imfdc_zicsr/lp64d | ||
308 | # CFLAGS: -march=rv64imfdc_zicsr -mabi=lp64d | ||
309 | DEFAULTTUNE:virtclass-multilib-librv64imfdczicsrlp64d = "rv64imfdc_zicsrlp64d" | ||
310 | |||
311 | AVAILTUNES += "rv64imfdc_zicsrlp64d" | ||
312 | PACKAGE_EXTRA_ARCHS:tune-rv64imfdc_zicsrlp64d = "${TUNE_PKGARCH:tune-rv64imfdc_zicsrlp64d}" | ||
313 | BASE_LIB:tune-rv64imfdc_zicsrlp64d = "lib/rv64imfdc_zicsr/lp64d" | ||
314 | TUNE_FEATURES:tune-rv64imfdc_zicsrlp64d = "riscv" | ||
315 | TUNE_CCARGS:tune-rv64imfdc_zicsrlp64d = " -march=rv64imfdc_zicsr -mabi=lp64d" | ||
316 | TUNE_PKGARCH:tune-rv64imfdc_zicsrlp64d = "rv64imfdc_zicsrlp64d" | ||
317 | TUNE_ARCH:tune-rv64imfdc_zicsrlp64d = "riscv64" | ||
diff --git a/meta-vitis-tc/files/toolchain-shar-extract.sh b/meta-vitis-tc/files/toolchain-shar-extract.sh new file mode 100644 index 00000000..ec2008c8 --- /dev/null +++ b/meta-vitis-tc/files/toolchain-shar-extract.sh | |||
@@ -0,0 +1,303 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | export LC_ALL=en_US.UTF-8 | ||
4 | #Make sure at least one python is installed | ||
5 | INIT_PYTHON=$(which python3 2>/dev/null ) | ||
6 | [ -z "$INIT_PYTHON" ] && INIT_PYTHON=$(which python2 2>/dev/null) | ||
7 | [ -z "$INIT_PYTHON" ] && echo "Error: The SDK needs a python installed" && exit 1 | ||
8 | |||
9 | # Remove invalid PATH elements first (maybe from a previously setup toolchain now deleted | ||
10 | PATH=`$INIT_PYTHON -c 'import os; print(":".join(e for e in os.environ["PATH"].split(":") if os.path.exists(e)))'` | ||
11 | |||
12 | tweakpath () { | ||
13 | case ":${PATH}:" in | ||
14 | *:"$1":*) | ||
15 | ;; | ||
16 | *) | ||
17 | PATH=$PATH:$1 | ||
18 | esac | ||
19 | } | ||
20 | |||
21 | # Some systems don't have /usr/sbin or /sbin in the cleaned environment PATH but we make need it | ||
22 | # for the system's host tooling checks | ||
23 | tweakpath /usr/sbin | ||
24 | tweakpath /sbin | ||
25 | |||
26 | INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | ||
27 | SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/") | ||
28 | |||
29 | INST_GCC_VER=$(gcc --version 2>/dev/null | sed -ne 's/.* \([0-9]\+\.[0-9]\+\)\.[0-9]\+.*/\1/p') | ||
30 | SDK_GCC_VER='@SDK_GCC_VER@' | ||
31 | |||
32 | verlte () { | ||
33 | [ "$1" = "`printf "$1\n$2" | sort -V | head -n1`" ] | ||
34 | } | ||
35 | |||
36 | verlt() { | ||
37 | [ "$1" = "$2" ] && return 1 || verlte $1 $2 | ||
38 | } | ||
39 | |||
40 | verlt `uname -r` @OLDEST_KERNEL@ | ||
41 | if [ $? = 0 ]; then | ||
42 | echo "Error: The SDK needs a kernel > @OLDEST_KERNEL@" | ||
43 | exit 1 | ||
44 | fi | ||
45 | |||
46 | if [ "$INST_ARCH" != "$SDK_ARCH" ]; then | ||
47 | # Allow for installation of ix86 SDK on x86_64 host | ||
48 | if [ "$INST_ARCH" != x86_64 -o "$SDK_ARCH" != ix86 ]; then | ||
49 | echo "Error: Incompatible SDK installer! Your host is $INST_ARCH and this SDK was built for $SDK_ARCH hosts." | ||
50 | exit 1 | ||
51 | fi | ||
52 | fi | ||
53 | |||
54 | if ! xz -V > /dev/null 2>&1; then | ||
55 | echo "Error: xz is required for installation of this SDK, please install it first" | ||
56 | exit 1 | ||
57 | fi | ||
58 | |||
59 | SDK_BUILD_PATH="@SDKPATH@" | ||
60 | DEFAULT_INSTALL_DIR="@SDKPATHINSTALL@" | ||
61 | SUDO_EXEC="" | ||
62 | EXTRA_TAR_OPTIONS="" | ||
63 | target_sdk_dir="" | ||
64 | answer="" | ||
65 | relocate=1 | ||
66 | savescripts=0 | ||
67 | verbose=0 | ||
68 | publish=0 | ||
69 | listcontents=0 | ||
70 | while getopts ":yd:npDRrSl" OPT; do | ||
71 | case $OPT in | ||
72 | y) | ||
73 | answer="Y" | ||
74 | ;; | ||
75 | d) | ||
76 | target_sdk_dir=$OPTARG | ||
77 | ;; | ||
78 | n) | ||
79 | prepare_buildsystem="no" | ||
80 | ;; | ||
81 | p) | ||
82 | prepare_buildsystem="no" | ||
83 | publish=1 | ||
84 | ;; | ||
85 | D) | ||
86 | verbose=1 | ||
87 | ;; | ||
88 | r) | ||
89 | relocate=2 | ||
90 | ;; | ||
91 | R) | ||
92 | relocate=0 | ||
93 | savescripts=1 | ||
94 | ;; | ||
95 | S) | ||
96 | savescripts=1 | ||
97 | ;; | ||
98 | l) | ||
99 | listcontents=1 | ||
100 | ;; | ||
101 | *) | ||
102 | echo "Usage: $(basename "$0") [-y] [-d <dir>]" | ||
103 | echo " -y Automatic yes to all prompts" | ||
104 | echo " -d <dir> Install the SDK to <dir>" | ||
105 | echo "======== PetaLinux SDK only options ============" | ||
106 | echo " -r Enable runtime relocation, note this is slower" | ||
107 | #echo "======== Extensible SDK only options ============" | ||
108 | #echo " -n Do not prepare the build system" | ||
109 | #echo " -p Publish mode (implies -n)" | ||
110 | echo "======== Advanced DEBUGGING ONLY OPTIONS ========" | ||
111 | echo " -S Save relocation scripts" | ||
112 | echo " -R Do not relocate executables" | ||
113 | echo " -D use set -x to see what is going on" | ||
114 | echo " -l list files that will be extracted" | ||
115 | exit 1 | ||
116 | ;; | ||
117 | esac | ||
118 | done | ||
119 | |||
120 | payload_offset=$(($(grep -na -m1 "^MARKER:$" "$0"|cut -d':' -f1) + 1)) | ||
121 | if [ "$listcontents" = "1" ] ; then | ||
122 | if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then | ||
123 | tail -n +$payload_offset "$0" > sdk.zip | ||
124 | if unzip -l sdk.zip;then | ||
125 | rm sdk.zip | ||
126 | else | ||
127 | rm sdk.zip && exit 1 | ||
128 | fi | ||
129 | else | ||
130 | tail -n +$payload_offset "$0"| tar tvJ || exit 1 | ||
131 | fi | ||
132 | exit | ||
133 | fi | ||
134 | |||
135 | titlestr="@SDK_TITLE@ installer version @SDK_VERSION@" | ||
136 | printf "%s\n" "$titlestr" | ||
137 | printf "%${#titlestr}s\n" | tr " " "=" | ||
138 | |||
139 | if [ $verbose = 1 ] ; then | ||
140 | set -x | ||
141 | fi | ||
142 | |||
143 | @SDK_PRE_INSTALL_COMMAND@ | ||
144 | |||
145 | # SDK_EXTENSIBLE is exposed from the SDK_PRE_INSTALL_COMMAND above | ||
146 | if [ "$SDK_EXTENSIBLE" = "1" ]; then | ||
147 | DEFAULT_INSTALL_DIR="@SDKEXTPATH@" | ||
148 | if [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '4.9' ] || [ "$INST_GCC_VER" = '4.8' -a "$SDK_GCC_VER" = '' ] || \ | ||
149 | [ "$INST_GCC_VER" = '4.9' -a "$SDK_GCC_VER" = '' ]; then | ||
150 | echo "Error: Incompatible SDK installer! Your host gcc version is $INST_GCC_VER and this SDK was built by gcc higher version." | ||
151 | exit 1 | ||
152 | fi | ||
153 | fi | ||
154 | |||
155 | if [ "$target_sdk_dir" = "" ]; then | ||
156 | if [ "$answer" = "Y" ]; then | ||
157 | target_sdk_dir="$DEFAULT_INSTALL_DIR" | ||
158 | else | ||
159 | read -p "Enter target directory for SDK (default: $DEFAULT_INSTALL_DIR): " target_sdk_dir | ||
160 | [ "$target_sdk_dir" = "" ] && target_sdk_dir=$DEFAULT_INSTALL_DIR | ||
161 | fi | ||
162 | fi | ||
163 | |||
164 | eval target_sdk_dir=$(echo "$target_sdk_dir"|sed 's/ /\\ /g') | ||
165 | if [ -d "$target_sdk_dir" ]; then | ||
166 | target_sdk_dir=$(cd "$target_sdk_dir"; pwd) | ||
167 | else | ||
168 | target_sdk_dir=$(readlink -m "$target_sdk_dir") | ||
169 | fi | ||
170 | |||
171 | # limit the length for target_sdk_dir, ensure the relocation behaviour in relocate_sdk.py has right result. | ||
172 | if [ ${#target_sdk_dir} -gt 2048 ]; then | ||
173 | echo "Error: The target directory path is too long!!!" | ||
174 | exit 1 | ||
175 | fi | ||
176 | |||
177 | if [ "$SDK_EXTENSIBLE" = "1" ]; then | ||
178 | # We're going to be running the build system, additional restrictions apply | ||
179 | if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then | ||
180 | echo "The target directory path ($target_sdk_dir) contains illegal" \ | ||
181 | "characters such as spaces, @, \$ or +. Abort!" | ||
182 | exit 1 | ||
183 | fi | ||
184 | # The build system doesn't work well with /tmp on NFS | ||
185 | fs_dev_path="$target_sdk_dir" | ||
186 | while [ ! -d "$fs_dev_path" ] ; do | ||
187 | fs_dev_path=`dirname $fs_dev_path` | ||
188 | done | ||
189 | fs_dev_type=`stat -f -c '%t' "$fs_dev_path"` | ||
190 | if [ "$fsdevtype" = "6969" ] ; then | ||
191 | echo "The target directory path $target_sdk_dir is on NFS, this is not possible. Abort!" | ||
192 | exit 1 | ||
193 | fi | ||
194 | else | ||
195 | if [ -n "$(echo $target_sdk_dir|grep ' ')" ]; then | ||
196 | echo "The target directory path ($target_sdk_dir) contains spaces. Abort!" | ||
197 | exit 1 | ||
198 | fi | ||
199 | fi | ||
200 | |||
201 | if [ -e "$target_sdk_dir/environment-setup-@REAL_MULTIMACH_TARGET_SYS@" ]; then | ||
202 | echo "The directory \"$target_sdk_dir\" already contains a SDK for this architecture." | ||
203 | printf "If you continue, existing files will be overwritten! Proceed [y/N]? " | ||
204 | |||
205 | default_answer="n" | ||
206 | else | ||
207 | printf "You are about to install the SDK to \"$target_sdk_dir\". Proceed [Y/n]? " | ||
208 | |||
209 | default_answer="y" | ||
210 | fi | ||
211 | |||
212 | if [ "$answer" = "" ]; then | ||
213 | read answer | ||
214 | [ "$answer" = "" ] && answer="$default_answer" | ||
215 | else | ||
216 | echo $answer | ||
217 | fi | ||
218 | |||
219 | if [ "$answer" != "Y" -a "$answer" != "y" ]; then | ||
220 | echo "Installation aborted!" | ||
221 | exit 1 | ||
222 | fi | ||
223 | |||
224 | # Try to create the directory (this will not succeed if user doesn't have rights) | ||
225 | mkdir -p $target_sdk_dir >/dev/null 2>&1 | ||
226 | |||
227 | # if don't have the right to access dir, gain by sudo | ||
228 | if [ ! -x $target_sdk_dir -o ! -w $target_sdk_dir -o ! -r $target_sdk_dir ]; then | ||
229 | if [ "$SDK_EXTENSIBLE" = "1" ]; then | ||
230 | echo "Unable to access \"$target_sdk_dir\", will not attempt to use" \ | ||
231 | "sudo as as extensible SDK cannot be used as root." | ||
232 | exit 1 | ||
233 | fi | ||
234 | |||
235 | SUDO_EXEC=$(which "sudo") | ||
236 | if [ -z $SUDO_EXEC ]; then | ||
237 | echo "No command 'sudo' found, please install sudo first. Abort!" | ||
238 | exit 1 | ||
239 | fi | ||
240 | |||
241 | # test sudo could gain root right | ||
242 | $SUDO_EXEC pwd >/dev/null 2>&1 | ||
243 | [ $? -ne 0 ] && echo "Sorry, you are not allowed to execute as root." && exit 1 | ||
244 | |||
245 | # now that we have sudo rights, create the directory | ||
246 | $SUDO_EXEC mkdir -p $target_sdk_dir >/dev/null 2>&1 | ||
247 | fi | ||
248 | |||
249 | printf "Extracting SDK..." | ||
250 | if [ @SDK_ARCHIVE_TYPE@ = "zip" ]; then | ||
251 | tail -n +$payload_offset "$0" > sdk.zip | ||
252 | if $SUDO_EXEC unzip $EXTRA_TAR_OPTIONS sdk.zip -d $target_sdk_dir;then | ||
253 | rm sdk.zip | ||
254 | else | ||
255 | rm sdk.zip && exit 1 | ||
256 | fi | ||
257 | else | ||
258 | tail -n +$payload_offset "$0"| $SUDO_EXEC tar mxJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1 | ||
259 | fi | ||
260 | echo "done" | ||
261 | |||
262 | printf "Setting it up..." | ||
263 | # fix environment paths | ||
264 | real_env_setup_script="" | ||
265 | for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do | ||
266 | if grep -q 'OECORE_NATIVE_SYSROOT=' $env_setup_script; then | ||
267 | # Handle custom env setup scripts that are only named | ||
268 | # environment-setup-* so that they have relocation | ||
269 | # applied - what we want beyond here is the main one | ||
270 | # rather than the one that simply sorts last | ||
271 | real_env_setup_script="$env_setup_script" | ||
272 | fi | ||
273 | $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $env_setup_script | ||
274 | done | ||
275 | if [ -n "$real_env_setup_script" ] ; then | ||
276 | env_setup_script="$real_env_setup_script" | ||
277 | fi | ||
278 | |||
279 | @SDK_POST_INSTALL_COMMAND@ | ||
280 | |||
281 | # delete the relocating script, so that user is forced to re-run the installer | ||
282 | # if he/she wants another location for the sdk | ||
283 | if [ $savescripts = 0 ] ; then | ||
284 | $SUDO_EXEC rm -f ${env_setup_script%/*}/relocate_sdk.py ${env_setup_script%/*}/relocate_sdk.sh ${env_setup_script%/*}/relocate-wrapper.py | ||
285 | fi | ||
286 | |||
287 | # Execute post-relocation script | ||
288 | post_relocate="$target_sdk_dir/post-relocate-setup.sh" | ||
289 | if [ -e "$post_relocate" ]; then | ||
290 | $SUDO_EXEC sed -e "s:@SDKPATH@:$target_sdk_dir:g" -i $post_relocate | ||
291 | $SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@" | ||
292 | $SUDO_EXEC rm -f $post_relocate | ||
293 | fi | ||
294 | |||
295 | echo "SDK has been successfully set up and is ready to be used." | ||
296 | echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g." | ||
297 | for env_setup_script in `ls $target_sdk_dir/environment-setup-*`; do | ||
298 | echo " \$ . $env_setup_script" | ||
299 | done | ||
300 | |||
301 | exit 0 | ||
302 | |||
303 | MARKER: | ||
diff --git a/meta-vitis-tc/files/toolchain-shar-relocate.sh b/meta-vitis-tc/files/toolchain-shar-relocate.sh new file mode 100644 index 00000000..9e07bbda --- /dev/null +++ b/meta-vitis-tc/files/toolchain-shar-relocate.sh | |||
@@ -0,0 +1,126 @@ | |||
1 | for cmd in xargs file; do | ||
2 | if ! command -v $cmd > /dev/null 2>&1; then | ||
3 | echo "The command '$cmd' is required by the relocation script, please install it first. Abort!" | ||
4 | exit 1 | ||
5 | fi | ||
6 | done | ||
7 | |||
8 | # fix dynamic loader paths in all ELF SDK binaries | ||
9 | # allow symlinks to be accessed via the find command too | ||
10 | native_sysroot=$($SUDO_EXEC cat $env_setup_script |grep 'OECORE_NATIVE_SYSROOT='|cut -d'=' -f2|tr -d '"') | ||
11 | dl_path=$($SUDO_EXEC find $native_sysroot/lib/ -maxdepth 1 -name "ld-linux*") | ||
12 | if [ "$dl_path" = "" ] ; then | ||
13 | echo "SDK could not be set up. Relocate script unable to find ld-linux.so. Abort!" | ||
14 | exit 1 | ||
15 | fi | ||
16 | executable_files=$($SUDO_EXEC find $native_sysroot -type f \ | ||
17 | \( -perm -0100 -o -perm -0010 -o -perm -0001 \) -printf "'%h/%f' ") | ||
18 | if [ "x$executable_files" = "x" ]; then | ||
19 | echo "SDK relocate failed, could not get executalbe files" | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
23 | tdir=`mktemp -d` | ||
24 | if [ x$tdir = x ] ; then | ||
25 | echo "SDK relocate failed, could not create a temporary directory" | ||
26 | exit 1 | ||
27 | fi | ||
28 | cat <<EOF >> $tdir/relocate_sdk.sh | ||
29 | #!/bin/sh | ||
30 | for py in python python2 python3 | ||
31 | do | ||
32 | PYTHON=\`which \${py} 2>/dev/null\` | ||
33 | if [ \$? -eq 0 ]; then | ||
34 | break; | ||
35 | fi | ||
36 | done | ||
37 | |||
38 | if [ x\${PYTHON} = "x" ]; then | ||
39 | echo "SDK could not be relocated. No python found." | ||
40 | exit 1 | ||
41 | fi | ||
42 | \${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files | ||
43 | EOF | ||
44 | |||
45 | $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh | ||
46 | $SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh | ||
47 | rm -rf $tdir | ||
48 | # Run for either relocate = 1 or = 2 | ||
49 | if [ $relocate = 1 -o $relocate = 2 ] ; then | ||
50 | $SUDO_EXEC ${env_setup_script%/*}/relocate_sdk.sh | ||
51 | if [ $? -ne 0 ]; then | ||
52 | echo "SDK could not be set up. Relocate script failed. Abort!" | ||
53 | exit 1 | ||
54 | fi | ||
55 | fi | ||
56 | if [ $relocate = 2 ] ; then | ||
57 | tdir=`mktemp -d` | ||
58 | if [ x$tdir = x ] ; then | ||
59 | echo "SDK relocate failed, could not create a temporary directory" | ||
60 | exit 1 | ||
61 | fi | ||
62 | $SUDO_EXEC ${PYTHON} ${env_setup_script%/*}/relocate-wrapper.py $target_sdk_dir > $tdir/relocate.log 2>&1 | ||
63 | if [ $? -ne 0 ]; then | ||
64 | cat $tdir/relocate.log | ||
65 | echo "SDK could not be set up. Runtime-Relocate script failed. Abort!" | ||
66 | rm -rf $tdir | ||
67 | exit 1 | ||
68 | fi | ||
69 | rm -rf $tdir | ||
70 | |||
71 | for env_setup_scripts in `ls $target_sdk_dir/environment-setup-*`; do | ||
72 | cat << EOF > ${env_setup_scripts}.new | ||
73 | if [ -n "\$BASH_SOURCE" ]; then | ||
74 | THIS_SCRIPT=\$BASH_SOURCE | ||
75 | elif [ -n "\$ZSH_NAME" ]; then | ||
76 | THIS_SCRIPT=\$0 | ||
77 | else | ||
78 | THIS_SCRIPT="\$(pwd)/$env_setup_scripts" | ||
79 | if [ ! -e "\$THIS_SCRIPT" ]; then | ||
80 | echo "Error: \$THIS_SCRIPT doesn't exist!" >&2 | ||
81 | echo "Please run this script in sdk directory." >&2 | ||
82 | exit 1 | ||
83 | fi | ||
84 | fi | ||
85 | |||
86 | THIS_SCRIPT=\$(realpath \${THIS_SCRIPT}) | ||
87 | SDK_BASE_PATH=\$(dirname \${THIS_SCRIPT}) | ||
88 | echo "Configuring environment for base path of \$SDK_BASE_PATH" | ||
89 | |||
90 | EOF | ||
91 | cat ${env_setup_scripts} >> ${env_setup_scripts}.new | ||
92 | $SUDO_EXEC sed -e "s:$target_sdk_dir:\${SDK_BASE_PATH}:g" -i ${env_setup_scripts}.new | ||
93 | mv ${env_setup_scripts}.new ${env_setup_scripts} | ||
94 | done | ||
95 | fi | ||
96 | |||
97 | # replace @SDKPATH@ with the new prefix in all text files: configs/scripts/etc. | ||
98 | # replace the host perl with SDK perl. | ||
99 | for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do | ||
100 | $SUDO_EXEC find $replace -type f | ||
101 | done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \ | ||
102 | awk -F': ' '{printf "\"%s\"\n", $1}' | \ | ||
103 | grep -Fv -e "$target_sdk_dir/environment-setup-" \ | ||
104 | -e "$target_sdk_dir/relocate_sdk" \ | ||
105 | -e "$target_sdk_dir/post-relocate-setup" \ | ||
106 | -e "$target_sdk_dir/${0##*/}" | \ | ||
107 | xargs -n100 $SUDO_EXEC sed -i \ | ||
108 | -e "s:$SDK_BUILD_PATH:$target_sdk_dir:g" \ | ||
109 | -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \ | ||
110 | -e "s: /usr/bin/perl: /usr/bin/env perl:g" | ||
111 | |||
112 | if [ $? -ne 0 ]; then | ||
113 | echo "Failed to replace perl. Relocate script failed. Abort!" | ||
114 | exit 1 | ||
115 | fi | ||
116 | |||
117 | # change all symlinks pointing to @SDKPATH@ | ||
118 | for l in $($SUDO_EXEC find $native_sysroot -type l); do | ||
119 | $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l | ||
120 | if [ $? -ne 0 ]; then | ||
121 | echo "Failed to setup symlinks. Relocate script failed. Abort!" | ||
122 | exit 1 | ||
123 | fi | ||
124 | done | ||
125 | |||
126 | echo done | ||
diff --git a/meta-vitis-tc/recipes-core/meta/meta-environment.bbappend b/meta-vitis-tc/recipes-core/meta/meta-environment.bbappend new file mode 100644 index 00000000..061b31f8 --- /dev/null +++ b/meta-vitis-tc/recipes-core/meta/meta-environment.bbappend | |||
@@ -0,0 +1,11 @@ | |||
1 | # If this is a baremetal build, we want to further optimize the toolchain | ||
2 | # scripts | ||
3 | BAREMETAL_ENV = "" | ||
4 | BAREMETAL_ENV:xilinx-standalone:baremetal-multilib-tc = "vitis-tc-baremetal-toolchain-scripts" | ||
5 | |||
6 | inherit ${BAREMETAL_ENV} | ||
7 | |||
8 | ORIGINAL_TARGET_ARCH := "${TARGET_ARCH}" | ||
9 | ORIGINAL_TARGET_VENDOR := "${TARGET_VENDOR}" | ||
10 | ORIGINAL_TARGET_SYS := "${TARGET_SYS}" | ||
11 | ORIGINAL_TARGET_PREFIX := "${TARGET_PREFIX}" | ||
diff --git a/meta-vitis-tc/recipes-core/meta/meta-qemu-xilinx.bb b/meta-vitis-tc/recipes-core/meta/meta-qemu-xilinx.bb new file mode 100644 index 00000000..06c7ff86 --- /dev/null +++ b/meta-vitis-tc/recipes-core/meta/meta-qemu-xilinx.bb | |||
@@ -0,0 +1,75 @@ | |||
1 | SUMMARY = "Meta package for building a installable qemu SDK" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | |||
5 | PLNX_ADD_VAI_SDK = "" | ||
6 | |||
7 | TOOLCHAIN_TARGET_TASK = "" | ||
8 | TOOLCHAIN_HOST_TASK = "nativesdk-sdk-provides-dummy meta-environment-${MACHINE} nativesdk-qemu-xilinx" | ||
9 | |||
10 | MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}" | ||
11 | PACKAGE_ARCH = "${SDK_ARCH}_${SDK_OS}" | ||
12 | PACKAGE_ARCHS = "" | ||
13 | TARGET_ARCH = "none" | ||
14 | TARGET_OS = "none" | ||
15 | |||
16 | SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}" | ||
17 | |||
18 | TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-qemu-xilinx-nativesdk-standalone-${DISTRO_VERSION}" | ||
19 | |||
20 | SDK_TITLE = "QEMU Xilinx" | ||
21 | |||
22 | RDEPENDS = "${TOOLCHAIN_HOST_TASK}" | ||
23 | |||
24 | EXCLUDE_FROM_WORLD = "1" | ||
25 | |||
26 | inherit populate_sdk | ||
27 | inherit toolchain-scripts-base | ||
28 | inherit nopackages | ||
29 | |||
30 | deltask install | ||
31 | deltask populate_sysroot | ||
32 | |||
33 | do_populate_sdk[stamp-extra-info] = "${PACKAGE_ARCH}" | ||
34 | |||
35 | REAL_MULTIMACH_TARGET_SYS = "none" | ||
36 | |||
37 | create_sdk_files:append () { | ||
38 | rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-* | ||
39 | rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-* | ||
40 | rm -f ${SDK_OUTPUT}/${SDKPATH}/version-* | ||
41 | |||
42 | # Generate new (mini) sdk-environment-setup file | ||
43 | script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}} | ||
44 | touch $script | ||
45 | echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script | ||
46 | echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script | ||
47 | echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script | ||
48 | echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script | ||
49 | |||
50 | toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS} | ||
51 | |||
52 | cat >> $script <<EOF | ||
53 | if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then | ||
54 | for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do | ||
55 | . \$envfile | ||
56 | done | ||
57 | fi | ||
58 | # We have to unset this else it can confuse oe-selftest and other tools | ||
59 | # which may also use the overlapping namespace. | ||
60 | unset OECORE_NATIVE_SYSROOT | ||
61 | EOF | ||
62 | |||
63 | if [ "${SDKMACHINE}" = "i686" ]; then | ||
64 | echo 'export NO32LIBS="0"' >>$script | ||
65 | echo 'echo "$BB_ENV_PASSTHROUGH_ADDITIONS" | grep -q "NO32LIBS"' >>$script | ||
66 | echo '[ $? != 0 ] && export BB_ENV_PASSTHROUGH_ADDITIONS="NO32LIBS $BB_ENV_PASSTHROUGH_ADDITIONS"' >>$script | ||
67 | fi | ||
68 | } | ||
69 | |||
70 | # buildtools-tarball doesn't need config site | ||
71 | TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" | ||
72 | |||
73 | # The recipe doesn't need any default deps | ||
74 | INHIBIT_DEFAULT_DEPS = "1" | ||
75 | |||
diff --git a/meta-vitis-tc/recipes-core/meta/meta-xilinx-toolchain.bb b/meta-vitis-tc/recipes-core/meta/meta-xilinx-toolchain.bb new file mode 100644 index 00000000..a276dee7 --- /dev/null +++ b/meta-vitis-tc/recipes-core/meta/meta-xilinx-toolchain.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | SUMMARY = "Meta package for building a Xilinx prebuilt installable toolchain" | ||
2 | LICENSE = "MIT" | ||
3 | |||
4 | FILESEXTRAPATHS:append = ":${VITIS_TC_PATH}/scripts" | ||
5 | |||
6 | SRC_URI += " \ | ||
7 | file://relocate-wrapper.py \ | ||
8 | " | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | |||
11 | inherit populate_sdk | ||
12 | |||
13 | COMPATIBLE_HOST = "${HOST_SYS}" | ||
14 | |||
15 | # This is a bare minimum toolchain, so limit to only the basic host | ||
16 | # dependencies | ||
17 | HOST_DEPENDS = " \ | ||
18 | nativesdk-sdk-provides-dummy \ | ||
19 | " | ||
20 | |||
21 | PLNX_ADD_VAI_SDK = "" | ||
22 | |||
23 | TOOLCHAIN_HOST_TASK = "${HOST_DEPENDS} packagegroup-cross-canadian-${MACHINE}" | ||
24 | TOOLCHAIN_TARGET_TASK:xilinx-standalone:baremetal-multilib-tc = "${@multilib_pkg_extend(d, 'packagegroup-newlib-standalone-sdk-target')}" | ||
25 | |||
26 | TOOLCHAIN_SHAR_EXT_TMPL = "${VITIS_TC_PATH}/files/toolchain-shar-extract.sh" | ||
27 | TOOLCHAIN_SHAR_REL_TMPL = "${VITIS_TC_PATH}/files/toolchain-shar-relocate.sh" | ||
28 | |||
29 | create_sdk_files:append () { | ||
30 | cp ${WORKDIR}/relocate-wrapper.py ${SDK_OUTPUT}/${SDKPATH}/ | ||
31 | } | ||
32 | |||
33 | # The wrappers don't do anything, remove them! | ||
34 | create_sdk_files:append:sdkmingw32 () { | ||
35 | rm -f ${SDK_OUTPUT}/${SDKPATH}/relocate-wrapper.py | ||
36 | rm -f ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py | ||
37 | rm -f ${SDK_OUTPUT}/${SDKPATH}/post-relocate-setup.sh | ||
38 | } | ||
diff --git a/meta-vitis-tc/recipes-core/newlib/libgloss_%.bbappend b/meta-vitis-tc/recipes-core/newlib/libgloss_%.bbappend new file mode 100644 index 00000000..e60d06a6 --- /dev/null +++ b/meta-vitis-tc/recipes-core/newlib/libgloss_%.bbappend | |||
@@ -0,0 +1,13 @@ | |||
1 | # When building multiple, we need to depend on the multilib newlib | ||
2 | DEPENDS:append:xilinx-standalone:baremetal-multilib-tc = " ${MLPREFIX}newlib" | ||
3 | |||
4 | # RISC-V mulitlib compiler expects the newlib to be in the 'libdir', but places it in ${D}/usr/lib | ||
5 | do_install:append:xilinx-standalone:baremetal-multilib-tc () { | ||
6 | if [ "/usr/lib" != "${libdir}" ]; then | ||
7 | for each in ${D}/usr/lib/* ; do | ||
8 | if [ -f ${each} ]; then | ||
9 | mv -v ${each} ${D}/${libdir} | ||
10 | fi | ||
11 | done | ||
12 | fi | ||
13 | } | ||
diff --git a/meta-vitis-tc/recipes-core/newlib/newlib_%.bbappend b/meta-vitis-tc/recipes-core/newlib/newlib_%.bbappend new file mode 100644 index 00000000..455193e6 --- /dev/null +++ b/meta-vitis-tc/recipes-core/newlib/newlib_%.bbappend | |||
@@ -0,0 +1,6 @@ | |||
1 | # Fix for multilib newlib installations | ||
2 | do_install:prepend:xilinx-standalone:baremetal-multilib-tc () { | ||
3 | mkdir -p $(dirname ${D}${libdir}) | ||
4 | mkdir -p $(dirname ${D}${includedir}) | ||
5 | } | ||
6 | |||
diff --git a/meta-vitis-tc/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/meta-vitis-tc/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend new file mode 100644 index 00000000..78df7ae1 --- /dev/null +++ b/meta-vitis-tc/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # Avoid installing all of the alternative toolchains | ||
2 | # due to multilib enabled in the primary toolchain. | ||
3 | |||
4 | RDEPENDS:${PN}:xilinx-standalone:baremetal-multilib-tc = " \ | ||
5 | ${BINUTILS} \ | ||
6 | ${GCC} \ | ||
7 | ${GDB} \ | ||
8 | meta-environment-${MACHINE} \ | ||
9 | " | ||
diff --git a/meta-vitis-tc/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb b/meta-vitis-tc/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb new file mode 100644 index 00000000..5534e1d9 --- /dev/null +++ b/meta-vitis-tc/recipes-core/packagegroups/packagegroup-newlib-standalone-sdk-target.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | COMPATIBLE_HOST = "${HOST_SYS}" | ||
2 | |||
3 | SUMMARY = "Target packages for the standalone SDK" | ||
4 | |||
5 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
6 | |||
7 | inherit packagegroup | ||
8 | |||
9 | RDEPENDS:${PN} = "\ | ||
10 | libgcc-dev \ | ||
11 | libstdc++-dev \ | ||
12 | ${LIBC_DEPENDENCIES} \ | ||
13 | " | ||
diff --git a/meta-vitis-tc/recipes-devtools/binutils/binutils-cross-canadian%.bbappend b/meta-vitis-tc/recipes-devtools/binutils/binutils-cross-canadian%.bbappend new file mode 100644 index 00000000..a4716d7a --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/binutils/binutils-cross-canadian%.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | # When building for petalinux, we want to enable multilib support | ||
2 | EXTRA_OECONF:append:xilinx-standalone:baremetal-multilib-tc = " \ | ||
3 | --enable-multilib \ | ||
4 | " | ||
5 | |||
6 | # PetaLinux adds SIZE to the environment | ||
7 | do_install:append () { | ||
8 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
9 | echo "export SIZE=\"${TARGET_PREFIX}size\"" > ${D}${SDKPATHNATIVE}/environment-setup.d/binutils.sh | ||
10 | } | ||
11 | |||
12 | FILES:${PN} += "${SDKPATHNATIVE}/environment-setup.d/binutils.sh" | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-13/additional-microblaze-multilibs.patch b/meta-vitis-tc/recipes-devtools/gcc/gcc-13/additional-microblaze-multilibs.patch new file mode 100644 index 00000000..e035b8a6 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-13/additional-microblaze-multilibs.patch | |||
@@ -0,0 +1,88 @@ | |||
1 | Change the multilib settings to match the expectations of Vitis and related. | ||
2 | |||
3 | The multilib list is as follows: | ||
4 | |||
5 | .; | ||
6 | le;@mlittle-endian | ||
7 | bs;@mxl-barrel-shift | ||
8 | p;@mxl-pattern-compare | ||
9 | m;@mno-xl-soft-mul | ||
10 | fpd;@mhard-float | ||
11 | m/fpd;@mno-xl-soft-mul@mhard-float | ||
12 | p/m;@mxl-pattern-compare@mno-xl-soft-mul | ||
13 | p/fpd;@mxl-pattern-compare@mhard-float | ||
14 | p/m/fpd;@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
15 | bs/p;@mxl-barrel-shift@mxl-pattern-compare | ||
16 | bs/m;@mxl-barrel-shift@mno-xl-soft-mul | ||
17 | bs/fpd;@mxl-barrel-shift@mhard-float | ||
18 | bs/m/fpd;@mxl-barrel-shift@mno-xl-soft-mul@mhard-float | ||
19 | bs/p/m;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul | ||
20 | bs/p/fpd;@mxl-barrel-shift@mxl-pattern-compare@mhard-float | ||
21 | bs/p/m/fpd;@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
22 | le/m64;@mlittle-endian@m64 | ||
23 | le/bs;@mlittle-endian@mxl-barrel-shift | ||
24 | le/p;@mlittle-endian@mxl-pattern-compare | ||
25 | le/m;@mlittle-endian@mno-xl-soft-mul | ||
26 | le/fpd;@mlittle-endian@mhard-float | ||
27 | le/m/fpd;@mlittle-endian@mno-xl-soft-mul@mhard-float | ||
28 | le/p/m;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul | ||
29 | le/p/fpd;@mlittle-endian@mxl-pattern-compare@mhard-float | ||
30 | le/p/m/fpd;@mlittle-endian@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
31 | le/bs/p;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare | ||
32 | le/bs/m;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul | ||
33 | le/bs/fpd;@mlittle-endian@mxl-barrel-shift@mhard-float | ||
34 | le/bs/m/fpd;@mlittle-endian@mxl-barrel-shift@mno-xl-soft-mul@mhard-float | ||
35 | le/bs/p/m;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul | ||
36 | le/bs/p/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mhard-float | ||
37 | le/bs/p/m/fpd;@mlittle-endian@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
38 | le/m64/bs;@mlittle-endian@m64@mxl-barrel-shift | ||
39 | le/m64/p;@mlittle-endian@m64@mxl-pattern-compare | ||
40 | le/m64/m;@mlittle-endian@m64@mno-xl-soft-mul | ||
41 | le/m64/fpd;@mlittle-endian@m64@mhard-float | ||
42 | le/m64/m/fpd;@mlittle-endian@m64@mno-xl-soft-mul@mhard-float | ||
43 | le/m64/p/m;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul | ||
44 | le/m64/p/fpd;@mlittle-endian@m64@mxl-pattern-compare@mhard-float | ||
45 | le/m64/p/m/fpd;@mlittle-endian@m64@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
46 | le/m64/bs/p;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare | ||
47 | le/m64/bs/m;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul | ||
48 | le/m64/bs/fpd;@mlittle-endian@m64@mxl-barrel-shift@mhard-float | ||
49 | le/m64/bs/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mno-xl-soft-mul@mhard-float | ||
50 | le/m64/bs/p/m;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul | ||
51 | le/m64/bs/p/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mhard-float | ||
52 | le/m64/bs/p/m/fpd;@mlittle-endian@m64@mxl-barrel-shift@mxl-pattern-compare@mno-xl-soft-mul@mhard-float | ||
53 | |||
54 | As part of this the order of the multilibs was changes from upstream to make | ||
55 | it easier to avoid big-endian m64, which is not supported by the toolchain. | ||
56 | |||
57 | Upstream-Status: Inappropriate [AMD Microblaze specific] | ||
58 | |||
59 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
60 | |||
61 | Index: gcc-12.2.0/gcc/config/microblaze/t-microblaze | ||
62 | =================================================================== | ||
63 | --- gcc-12.2.0.orig/gcc/config/microblaze/t-microblaze | ||
64 | +++ gcc-12.2.0/gcc/config/microblaze/t-microblaze | ||
65 | @@ -1,17 +1,11 @@ | ||
66 | -MULTILIB_OPTIONS = m64 mxl-barrel-shift mlittle-endian mno-xl-soft-mul mxl-multiply-high | ||
67 | -#MULTILIB_DIRNAMES = m64 bs le m mh | ||
68 | -MULTILIB_DIRNAMES = . . . . . | ||
69 | -MULTILIB_EXCEPTIONS = *m64/mxl-multiply-high mxl-multiply-high | ||
70 | -MULTILIB_EXCEPTIONS += *m64 | ||
71 | -MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift | ||
72 | -MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul | ||
73 | -MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul | ||
74 | -MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul | ||
75 | -MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mno-xl-soft-mul/mxl-multiply-high | ||
76 | -MULTILIB_EXCEPTIONS += *m64/mno-xl-soft-mul/mxl-multiply-high | ||
77 | +MULTILIB_OPTIONS = mlittle-endian m64 mxl-barrel-shift mxl-pattern-compare mno-xl-soft-mul mhard-float | ||
78 | +MULTILIB_DIRNAMES = le m64 bs p m fpd | ||
79 | +MULTILIB_EXCEPTIONS = mxl-multiply-high | ||
80 | MULTILIB_EXCEPTIONS += *mxl-barrel-shift/mxl-multiply-high mxl-multiply-high | ||
81 | MULTILIB_EXCEPTIONS += *mlittle-endian/mxl-multiply-high mxl-multiply-high | ||
82 | -MULTILIB_EXCEPTIONS += *m64/mxl-barrel-shift/mlittle-endian/mxl-multiply-high | ||
83 | +MULTILIB_EXCEPTIONS += *mxl-pattern-compare*/*mxl-multiply-high* | ||
84 | +# Big endian m64 is not supported | ||
85 | +MULTILIB_EXCEPTIONS += m64* | ||
86 | |||
87 | # Extra files | ||
88 | microblaze-c.o: $(srcdir)/config/microblaze/microblaze-c.cc \ | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-13/riscv-multilib-generator-python.patch b/meta-vitis-tc/recipes-devtools/gcc/gcc-13/riscv-multilib-generator-python.patch new file mode 100644 index 00000000..ba08945c --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-13/riscv-multilib-generator-python.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Use python3 instead of python when calling the mutlib-generator | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
6 | |||
7 | Index: gcc-13.3.0/gcc/config/riscv/multilib-generator | ||
8 | =================================================================== | ||
9 | --- gcc-13.3.0.orig/gcc/config/riscv/multilib-generator | ||
10 | +++ gcc-13.3.0/gcc/config/riscv/multilib-generator | ||
11 | @@ -1,4 +1,4 @@ | ||
12 | -#!/usr/bin/env python | ||
13 | +#!/usr/bin/env python3 | ||
14 | |||
15 | # RISC-V multilib list generator. | ||
16 | # Copyright (C) 2011-2023 Free Software Foundation, Inc. | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend b/meta-vitis-tc/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend new file mode 100644 index 00000000..4ee8fde2 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-cross-canadian_%.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | require gcc-xilinx-standalone-multilib.inc | ||
2 | |||
3 | # We want to use the stock multilib configs, when available | ||
4 | EXTRACONFFUNCS:xilinx-standalone:baremetal-multilib-tc = "" | ||
5 | |||
6 | EXTRA_OECONF:append:xilinx-standalone:baremetal-multilib-tc = " \ | ||
7 | --enable-multilib \ | ||
8 | " | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-cross_%.bbappend b/meta-vitis-tc/recipes-devtools/gcc/gcc-cross_%.bbappend new file mode 100644 index 00000000..e27a2228 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-cross_%.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | require gcc-xilinx-standalone-multilib.inc | ||
2 | |||
3 | # We want to use the stock multilib configs, when available | ||
4 | EXTRACONFFUNCS:xilinx-standalone:baremetal-multilib-tc = "" | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-vitis-tc/recipes-devtools/gcc/gcc-runtime_%.bbappend new file mode 100644 index 00000000..fd2ebbca --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-runtime_%.bbappend | |||
@@ -0,0 +1,35 @@ | |||
1 | # Both arm and armv7r/armv8r overrides are set w/ cortex r5 | ||
2 | # So only set rmprofile if armv*r is defined. | ||
3 | ARM_PROFILE = "aprofile" | ||
4 | ARM_PROFILE:armv7r = "rmprofile" | ||
5 | ARM_PROFILE:armv8r = "rmprofile" | ||
6 | |||
7 | EXTRA_OECONF:append:xilinx-standalone:arm:class-target:baremetal-multilib-tc = " \ | ||
8 | --with-multilib-list=${ARM_PROFILE} \ | ||
9 | " | ||
10 | |||
11 | do_install:append:xilinx-standalone:class-target:baremetal-multilib-tc () { | ||
12 | # The multilibs have different headers, so stop combining them! | ||
13 | if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then | ||
14 | rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} | ||
15 | fi | ||
16 | |||
17 | # link the C++ header into the place that multilib gcc expects | ||
18 | # C++ compiler looks at usr/include/c++/version/canonical-arch/mlib | ||
19 | if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then | ||
20 | mlib=${BASE_LIB:tune-${DEFAULTTUNE}} | ||
21 | mlib=${mlib##lib/} | ||
22 | |||
23 | link_name=${D}${includedir}/c++/${BINV}/${TARGET_SYS_MULTILIB_ORIGINAL}/${mlib} | ||
24 | target=${D}${includedir}/c++/${BINV}/${TARGET_SYS} | ||
25 | |||
26 | echo mkdir -p $link_name | ||
27 | mkdir -p $link_name | ||
28 | for each in bits ext ; do | ||
29 | relpath=$(python3 -c "import os.path; print(os.path.relpath('$target/$each', '$(dirname $link_name/$each)'))") | ||
30 | |||
31 | echo ln -s $relpath $link_name/$each | ||
32 | ln -s $relpath $link_name/$each | ||
33 | done | ||
34 | fi | ||
35 | } | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-source_13.%.bbappend b/meta-vitis-tc/recipes-devtools/gcc/gcc-source_13.%.bbappend new file mode 100644 index 00000000..e38dd8b3 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-source_13.%.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | FILESEXTRAPATHS:append := ":${THISDIR}/gcc-13" | ||
2 | SRC_URI += " \ | ||
3 | file://additional-microblaze-multilibs.patch \ | ||
4 | file://riscv-multilib-generator-python.patch \ | ||
5 | " | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/gcc-xilinx-standalone-multilib.inc b/meta-vitis-tc/recipes-devtools/gcc/gcc-xilinx-standalone-multilib.inc new file mode 100644 index 00000000..c69e0745 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/gcc-xilinx-standalone-multilib.inc | |||
@@ -0,0 +1,23 @@ | |||
1 | # Both arm and armv*r overrides are set w/ cortex r5 | ||
2 | # So only set rmprofile if armv*r is defined. | ||
3 | ARM_PROFILE = "aprofile" | ||
4 | ARM_PROFILE:armv7r = "rmprofile" | ||
5 | ARM_PROFILE:armv8r = "rmprofile" | ||
6 | EXTRA_OECONF:append:xilinx-standalone:arm:baremetal-multilib-tc = " \ | ||
7 | --with-multilib-list=${ARM_PROFILE} \ | ||
8 | " | ||
9 | |||
10 | # RISC V configuration | ||
11 | RISCV_MULTILIB = "\ | ||
12 | rv32i-ilp32--;rv32ic-ilp32--;rv32im-ilp32--;rv32imc-ilp32--;rv32imac-ilp32--;rv32e-ilp32e--;\ | ||
13 | rv32imf-ilp32f--;rv32imfc-ilp32f--;rv32imafc-ilp32f--;rv32imfdc-ilp32d--;\ | ||
14 | rv64i-lp64--;rv64ic-lp64--;rv64im-lp64--;rv64imc-lp64--;rv64imac-lp64--;\ | ||
15 | rv64imf-lp64f--;rv64imfc-lp64f--;rv64imafc-lp64f--;rv64imfdc-lp64d--\ | ||
16 | " | ||
17 | |||
18 | EXTRA_OECONF:append:xilinx-standalone:riscv32:baremetal-multilib-tc = " \ | ||
19 | --with-multilib-generator='${RISCV_MULTILIB}' \ | ||
20 | " | ||
21 | EXTRA_OECONF:append:xilinx-standalone:riscv64:baremetal-multilib-tc = " \ | ||
22 | --with-multilib-generator='${RISCV_MULTILIB}' \ | ||
23 | " | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/mb-convert-head.sh b/meta-vitis-tc/recipes-devtools/gcc/mb-convert-head.sh new file mode 100755 index 00000000..b59dff1e --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/mb-convert-head.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | # Call using: | ||
4 | #../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert-head.sh | ||
5 | |||
6 | # Then copy the output into the special microblaze-tc BSP | ||
7 | |||
8 | sed -e 's,;, ,' | | ||
9 | while read mlib args ; do | ||
10 | if [ $mlib = '.' ]; then | ||
11 | continue | ||
12 | fi | ||
13 | multilib="libmb$(echo $mlib | sed -e 's,/,,g')" | ||
14 | |||
15 | echo 'MULTILIBS += "multilib:'${multilib}'"' | ||
16 | done | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/mb-convert.sh b/meta-vitis-tc/recipes-devtools/gcc/mb-convert.sh new file mode 100755 index 00000000..ab689444 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/mb-convert.sh | |||
@@ -0,0 +1,60 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | # Call using: | ||
4 | #../microblaze/sysroots/x86_64-oesdk-linux/usr/bin/microblaze-xilinx-elf/microblaze-xilinx-elf-gcc -print-multi-lib | mb-convert.sh | ||
5 | |||
6 | # Then copy the output into the special microblaze-tc BSP | ||
7 | |||
8 | mlib_to_feature() { | ||
9 | feature_base="microblaze" | ||
10 | feature_endian=" bigendian" | ||
11 | feature_barrel="" | ||
12 | feature_pattern="" | ||
13 | feature_multiply="" | ||
14 | feature_multiplyhigh="" | ||
15 | feature_sixtyfour="" | ||
16 | feature_math="" | ||
17 | while read feature ; do | ||
18 | case $feature in | ||
19 | le) feature_endian="";; | ||
20 | bs) feature_barrel=" barrel-shift";; | ||
21 | p) feature_pattern=" pattern-compare";; | ||
22 | m) if [ -z ${feature_multiplyhigh} ]; then feature_multiply=" multiply-low" ; fi ;; | ||
23 | mh) feature_multiply="" ; feature_multiplyhigh=" multiply-high";; | ||
24 | m64) feature_sixtyfour=" 64-bit";; | ||
25 | fpd) feature_math=" fpu-hard";; | ||
26 | *) echo "UNKNOWN $feature";; | ||
27 | esac | ||
28 | done | ||
29 | echo "${feature_base}${feature_sixtyfour}${feature_endian}${feature_barrel}${feature_pattern}${feature_multiply}${feature_multiplyhigh}${feature_math}" | ||
30 | } | ||
31 | |||
32 | sed -e 's,;, ,' | | ||
33 | while read mlib args ; do | ||
34 | if [ $mlib = '.' ]; then | ||
35 | echo '# Base configuration' | ||
36 | echo '# CFLAGS:' | ||
37 | echo 'DEFAULTTUNE = "microblaze"' | ||
38 | echo | ||
39 | echo 'AVAILTUNES += "microblaze"' | ||
40 | echo 'BASE_LIB:tune-microblaze = "lib"' | ||
41 | echo 'TUNE_FEATURES:tune-microblaze = "microblaze bigendian"' | ||
42 | echo 'PACKAGE_EXTRA_ARCHS:tune-microblaze = "${TUNE_PKGARCH}"' | ||
43 | continue | ||
44 | fi | ||
45 | |||
46 | cflags=$(echo $args | sed -e 's,@, -,g') | ||
47 | multilib="libmb$(echo $mlib | sed -e 's,/,,g')" | ||
48 | tune="microblaze$(echo $mlib | sed -e 's,m64,64,' -e 's,/,,g')" | ||
49 | features=$(echo $mlib | sed -e 's,/, ,g' | xargs -n 1 echo | mlib_to_feature) | ||
50 | echo | ||
51 | echo | ||
52 | echo "# $mlib" | ||
53 | echo "# CFLAGS:${cflags}" | ||
54 | echo "DEFAULTTUNE:virtclass-multilib-$multilib = \"$tune\"" | ||
55 | echo | ||
56 | echo "AVAILTUNES += \"$tune\"" | ||
57 | echo "BASE_LIB:tune-$tune = \"lib/$mlib\"" | ||
58 | echo "TUNE_FEATURES:tune-$tune = \"${features}\"" | ||
59 | echo "PACKAGE_EXTRA_ARCHS:tune-$tune = \"\${TUNE_PKGARCH}\"" | ||
60 | done | ||
diff --git a/meta-vitis-tc/recipes-devtools/gcc/riscv-convert.sh b/meta-vitis-tc/recipes-devtools/gcc/riscv-convert.sh new file mode 100755 index 00000000..aa01fee0 --- /dev/null +++ b/meta-vitis-tc/recipes-devtools/gcc/riscv-convert.sh | |||
@@ -0,0 +1,56 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | # Call using: | ||
4 | #../riscv/sysroots/x86_64-oesdk-linux/usr/bin/riscv-xilinx-elf/riscv-xilinx-elf-gcc -print-multi-lib | riscv-convert.sh | ||
5 | |||
6 | # Then copy the output into the special riscv-tc BSP | ||
7 | |||
8 | tempfile=`mktemp` | ||
9 | |||
10 | echo "MULTILIBS = \"\"" | ||
11 | |||
12 | sed -e 's,;, ,' | | ||
13 | while read mlib args ; do | ||
14 | if [ $mlib = '.' ]; then | ||
15 | echo '# Base configuration' >> $tempfile | ||
16 | echo '# CFLAGS:' >> $tempfile | ||
17 | echo 'DEFAULTTUNE = "riscv"' >> $tempfile | ||
18 | echo >> $tempfile | ||
19 | echo 'AVAILTUNES += "riscv"' >> $tempfile | ||
20 | echo 'PACKAGE_EXTRA_ARCHS:tune-riscv = "${TUNE_PKGARCH:tune-riscv}"' >> $tempfile | ||
21 | echo 'BASE_LIB:tune-riscv = "lib"' >> $tempfile | ||
22 | echo 'TUNE_FEATURES:tune-riscv = "riscv"' >> $tempfile | ||
23 | echo 'TUNE_CCARGS:tune-riscv = ""' >> $tempfile | ||
24 | echo 'TUNE_PKGARCH:tune-riscv = "riscv32"' >> $tempfile | ||
25 | echo 'TUNE_ARCH:tune-riscv = "riscv32"' >> $tempfile | ||
26 | continue | ||
27 | fi | ||
28 | |||
29 | cflags=$(echo $args | sed -e 's,@, -,g') | ||
30 | multilib="lib$(echo $mlib | sed -e 's,/,,g' -e 's,_,,g')" | ||
31 | tune="$(echo $mlib | sed -e 's,/,,g')" | ||
32 | case $mlib in | ||
33 | .) arch="riscv32" ;; | ||
34 | rv32*) arch="riscv32" ;; | ||
35 | rv64*) arch="riscv64" ;; | ||
36 | *) arch="unknwon" ;; | ||
37 | esac | ||
38 | echo "MULTILIBS += \"multilib:${multilib}\"" | ||
39 | echo >> $tempfile | ||
40 | echo >> $tempfile | ||
41 | echo "# $mlib" >> $tempfile | ||
42 | echo "# CFLAGS:${cflags}" >> $tempfile | ||
43 | echo "DEFAULTTUNE:virtclass-multilib-$multilib = \"$tune\"" >> $tempfile | ||
44 | echo >> $tempfile | ||
45 | echo "AVAILTUNES += \"$tune\"" >> $tempfile | ||
46 | echo "PACKAGE_EXTRA_ARCHS:tune-$tune = \"\${TUNE_PKGARCH:tune-$tune}\"" >> $tempfile | ||
47 | echo "BASE_LIB:tune-$tune = \"lib/$mlib\"" >> $tempfile | ||
48 | echo "TUNE_FEATURES:tune-$tune = \"riscv\"" >> $tempfile | ||
49 | echo "TUNE_CCARGS:tune-$tune = \"$cflags\"" >> $tempfile | ||
50 | echo "TUNE_PKGARCH:tune-$tune = \"$tune\"" >> $tempfile | ||
51 | echo "TUNE_ARCH:tune-$tune = \"$arch\"" >> $tempfile | ||
52 | done | ||
53 | |||
54 | echo | ||
55 | cat $tempfile | ||
56 | rm $tempfile | ||
diff --git a/meta-vitis-tc/scripts/relocate-wrapper.py b/meta-vitis-tc/scripts/relocate-wrapper.py new file mode 100755 index 00000000..d6c63edf --- /dev/null +++ b/meta-vitis-tc/scripts/relocate-wrapper.py | |||
@@ -0,0 +1,247 @@ | |||
1 | #!/usr/bin/env python3 | ||
2 | # | ||
3 | # Copyright (c) 2012 Intel Corporation | ||
4 | # | ||
5 | # SPDX-License-Identifier: GPL-2.0-only | ||
6 | # | ||
7 | # AUTHORS | ||
8 | # Laurentiu Palcu <laurentiu.palcu@intel.com> | ||
9 | # | ||
10 | |||
11 | # Copyright (C) 2019-2020, Xilinx, Inc. All rights reserved. | ||
12 | # Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved. | ||
13 | # | ||
14 | # DESCRIPTION | ||
15 | # Runtime-relocation wrapper scripting based on YP relocation scripting | ||
16 | # | ||
17 | # AUTHORS | ||
18 | # Mark Hatle <mark.hatle@amd.com> | ||
19 | |||
20 | import struct | ||
21 | import sys | ||
22 | import stat | ||
23 | import os | ||
24 | import re | ||
25 | import errno | ||
26 | |||
27 | if sys.version < '3': | ||
28 | def b(x): | ||
29 | return x | ||
30 | else: | ||
31 | def b(x): | ||
32 | return x.encode(sys.getfilesystemencoding()) | ||
33 | |||
34 | old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##")) | ||
35 | |||
36 | def get_arch(): | ||
37 | global endian_prefix | ||
38 | f.seek(0) | ||
39 | e_ident =f.read(16) | ||
40 | ei_mag0,ei_mag1_3,ei_class,ei_data,ei_version = struct.unpack("<B3sBBB9x", e_ident) | ||
41 | |||
42 | # ei_data = 1 for little-endian & 0 for big-endian | ||
43 | if ei_data == 1: | ||
44 | endian_prefix = '<' | ||
45 | else: | ||
46 | endian_prefix = '>' | ||
47 | |||
48 | if (ei_mag0 != 0x7f and ei_mag1_3 != "ELF") or ei_class == 0: | ||
49 | return 0 | ||
50 | |||
51 | if ei_class == 1: | ||
52 | return 32 | ||
53 | elif ei_class == 2: | ||
54 | return 64 | ||
55 | |||
56 | def parse_elf_header(f): | ||
57 | global e_type, e_machine, e_version, e_entry, e_phoff, e_shoff, e_flags,\ | ||
58 | e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx | ||
59 | |||
60 | f.seek(0) | ||
61 | elf_header = f.read(64) | ||
62 | |||
63 | if arch == 32: | ||
64 | # 32bit | ||
65 | hdr_fmt = endian_prefix + "HHILLLIHHHHHH" | ||
66 | hdr_size = 52 | ||
67 | else: | ||
68 | # 64bit | ||
69 | hdr_fmt = endian_prefix + "HHIQQQIHHHHHH" | ||
70 | hdr_size = 64 | ||
71 | |||
72 | e_type, e_machine, e_version, e_entry, e_phoff, e_shoff, e_flags,\ | ||
73 | e_ehsize, e_phentsize, e_phnum, e_shentsize, e_shnum, e_shstrndx =\ | ||
74 | struct.unpack(hdr_fmt, elf_header[16:hdr_size]) | ||
75 | |||
76 | def is_elf_executable(f): | ||
77 | global interp | ||
78 | |||
79 | rc = False | ||
80 | |||
81 | if arch == 32: | ||
82 | ph_fmt = endian_prefix + "IIIIIIII" | ||
83 | else: | ||
84 | ph_fmt = endian_prefix + "IIQQQQQQ" | ||
85 | |||
86 | """ look for PT_INTERP section """ | ||
87 | for i in range(0,e_phnum): | ||
88 | f.seek(e_phoff + i * e_phentsize) | ||
89 | ph_hdr = f.read(e_phentsize) | ||
90 | if arch == 32: | ||
91 | # 32bit | ||
92 | p_type, p_offset, p_vaddr, p_paddr, p_filesz,\ | ||
93 | p_memsz, p_flags, p_align = struct.unpack(ph_fmt, ph_hdr) | ||
94 | else: | ||
95 | # 64bit | ||
96 | p_type, p_flags, p_offset, p_vaddr, p_paddr, \ | ||
97 | p_filesz, p_memsz, p_align = struct.unpack(ph_fmt, ph_hdr) | ||
98 | |||
99 | """ change interpreter """ | ||
100 | if p_type == 3: | ||
101 | # PT_INTERP section | ||
102 | f.seek(p_offset) | ||
103 | # External SDKs with mixed pre-compiled binaries should not get | ||
104 | # relocated so look for some variant of /lib | ||
105 | fname = f.read(11) | ||
106 | if fname.startswith(b("/lib/")) or fname.startswith(b("/lib64/")) or \ | ||
107 | fname.startswith(b("/lib32/")) or fname.startswith(b("/usr/lib32/")) or \ | ||
108 | fname.startswith(b("/usr/lib32/")) or fname.startswith(b("/usr/lib64/")): | ||
109 | break | ||
110 | if p_filesz == 0: | ||
111 | break | ||
112 | rc = True | ||
113 | # Store the interpretor name to global interp | ||
114 | f.seek(p_offset) | ||
115 | chars = [] | ||
116 | while True: | ||
117 | c = f.read(1) | ||
118 | if c == b'\x00': | ||
119 | interp = (b''.join(chars)).decode('utf-8') | ||
120 | break | ||
121 | chars.append(c) | ||
122 | break | ||
123 | |||
124 | return rc | ||
125 | |||
126 | # MAIN | ||
127 | if len(sys.argv) < 2: | ||
128 | print('%s: <path>' % sys.argv[0]) | ||
129 | sys.exit(-1) | ||
130 | |||
131 | # In python > 3, strings may also contain Unicode characters. So, convert | ||
132 | # them to bytes | ||
133 | if sys.version_info < (3,): | ||
134 | process_path = sys.argv[1] | ||
135 | else: | ||
136 | process_path = sys.argv[1] | ||
137 | |||
138 | process_path = os.path.realpath(process_path) | ||
139 | |||
140 | for root, _, files in os.walk(process_path): | ||
141 | for file in files: | ||
142 | if file.endswith('.real'): | ||
143 | continue | ||
144 | |||
145 | e = os.path.join(root, file) | ||
146 | |||
147 | if not os.path.isfile(e) or not os.access(e, os.X_OK) or os.path.islink(e): | ||
148 | continue | ||
149 | |||
150 | if os.path.dirname(e).endswith('/lib') and (os.path.basename(e).startswith('libc-') or os.path.basename(e).startswith('libc.so')): | ||
151 | # Special case, don't wrap this... | ||
152 | continue | ||
153 | |||
154 | if os.path.dirname(e).endswith('/lib') and os.path.basename(e).startswith('libpthread-'): | ||
155 | # Special case, don't wrap this... | ||
156 | continue | ||
157 | |||
158 | perms = os.stat(e)[stat.ST_MODE] | ||
159 | if os.access(e, os.R_OK): | ||
160 | perms = None | ||
161 | else: | ||
162 | os.chmod(e, perms|stat.S_IRWXU) | ||
163 | |||
164 | try: | ||
165 | f = open(e, "r+b") | ||
166 | except IOError: | ||
167 | exctype, ioex = sys.exc_info()[:2] | ||
168 | if ioex.errno == errno.ETXTBSY: | ||
169 | print("Could not open %s. File used by another process.\nPlease "\ | ||
170 | "make sure you exit all processes that might use any SDK "\ | ||
171 | "binaries." % e) | ||
172 | else: | ||
173 | print("Could not open %s: %s(%d)" % (e, ioex.strerror, ioex.errno)) | ||
174 | sys.exit(-1) | ||
175 | |||
176 | # Save old size and do a size check at the end. Just a safety measure. | ||
177 | old_size = os.path.getsize(e) | ||
178 | if old_size >= 64: | ||
179 | arch = get_arch() | ||
180 | if arch: | ||
181 | parse_elf_header(f) | ||
182 | |||
183 | if is_elf_executable(f): | ||
184 | dirpath = os.path.dirname(e) | ||
185 | destfile = os.path.join(dirpath, file + '.real') | ||
186 | |||
187 | wrapper = os.path.join(dirpath, 'execwrapper.sh') | ||
188 | |||
189 | if not os.path.exists(wrapper): | ||
190 | #print('write %s' % wrapper) | ||
191 | with open(wrapper, "w+") as wrapperf: | ||
192 | ldso = os.path.basename(interp) | ||
193 | libbasepath = os.path.dirname(interp) # should be /lib | ||
194 | libdirname = os.path.basename(libbasepath) # lib or lib32 or lib64 or .... | ||
195 | basepath = os.path.dirname(libbasepath) # should be / | ||
196 | |||
197 | libpath = os.path.join(basepath, 'usr', libdirname) | ||
198 | |||
199 | # Generate relative names to the path of the execwrapper | ||
200 | libbasepath = os.path.relpath(libbasepath, dirpath) | ||
201 | libpath = os.path.relpath(libpath, dirpath) | ||
202 | |||
203 | print('') | ||
204 | print('wrapper: %s' % wrapper) | ||
205 | print('ldso = %s' % ldso) | ||
206 | print('lib = %s' % libdirname) | ||
207 | print('libpath = %s' % libbasepath) | ||
208 | print('usrlibpath = %s' % libpath) | ||
209 | print('') | ||
210 | |||
211 | wrapperf.write('#!/bin/bash\n') | ||
212 | wrapperf.write('# Written by Mark Hatle <mark.hatle@amd.com>\n') | ||
213 | wrapperf.write('# Copyright (C) 2019-2020, Xilinx, Inc. All rights reserved\n') | ||
214 | wrapperf.write('# Copyright (C) 2023-2024, Advanced Micro Devices, Inc. All rights reserved\n') | ||
215 | wrapperf.write('#\n') | ||
216 | wrapperf.write('# SPDX-License-Identifier: GPL-2.0-only\n') | ||
217 | wrapperf.write('LDSO=%s\n' % ldso) | ||
218 | wrapperf.write('LIBBASEPATH=%s\n' % libbasepath) | ||
219 | wrapperf.write('LIBPATH=%s\n' % libpath) | ||
220 | wrapperf.write('executable=$(basename $0)\n') | ||
221 | wrapperf.write('wrapper=$0\n') | ||
222 | wrapperf.write('BASEPATH=$(dirname ${wrapper})\n') | ||
223 | wrapperf.write('if [ ! -x $0 ]; then\n') | ||
224 | wrapperf.write(' wrapper=$(which $0)\n') | ||
225 | wrapperf.write('fi\n') | ||
226 | wrapperf.write('if [ -h $0 ]; then\n') | ||
227 | wrapperf.write(' executable=$(basename "$(readlink $0)" )\n') | ||
228 | wrapperf.write(' BASEPATH=$(dirname "$(realpath $0)")\n') | ||
229 | wrapperf.write('fi\n') | ||
230 | wrapperf.write('LIBBASEPATH=$(realpath ${BASEPATH}/${LIBBASEPATH})\n') | ||
231 | wrapperf.write('LIBPATH=$(realpath ${BASEPATH}/${LIBPATH})\n') | ||
232 | wrapperf.write('export COLLECT_GCC=${COLLECT_GCC%%.real}\n') | ||
233 | wrapperf.write('exec ${LIBBASEPATH}/${LDSO} --library-path ${LIBPATH}:${LIBBASEPATH} ${BASEPATH}/${executable}.real $@\n') | ||
234 | #print('chmod %s 0775' % wrapper) | ||
235 | os.chmod(wrapper, 0o775) | ||
236 | |||
237 | print('%s -> %s' % (e, destfile)) | ||
238 | #print('mv %s %s' % (e, destfile)) | ||
239 | os.rename(e, destfile) | ||
240 | #print('ln %s %s' % (wrapper, e)) | ||
241 | os.link(wrapper, e) | ||
242 | |||
243 | """ change permissions back """ | ||
244 | if perms: | ||
245 | os.chmod(e, perms) | ||
246 | |||
247 | f.close() | ||
diff --git a/meta-xilinx-bsp/README.md b/meta-xilinx-bsp/README.md index 2d869913..3002355c 100644 --- a/meta-xilinx-bsp/README.md +++ b/meta-xilinx-bsp/README.md | |||
@@ -1,66 +1,31 @@ | |||
1 | # meta-xilinx-bsp | 1 | # meta-xilinx-bsp |
2 | 2 | ||
3 | This layer enables AMD Xilinx MicroBlaze, Zynq, ZynqMP and Versal device | 3 | This layer enables AMD MicroBlaze, Zynq, ZynqMP and Versal device |
4 | evaluation boards and provides related metadata. | 4 | evaluation boards and provides related metadata. |
5 | 5 | ||
6 | ## Additional documentation | 6 | ## Additional documentation |
7 | 7 | ||
8 | * [Building Image Instructions](../README.building.md) | 8 | * [Building Image Instructions](../README.building.md) |
9 | * [Booting Image Instructions](../README.booting.md) | 9 | * [Booting Image Instructions](../README.booting.md) |
10 | --- | ||
11 | 10 | ||
12 | ## AMD Xilinx Evaluation Boards BSP Machines files | ||
13 | |||
14 | The following boards are supported by the meta-xilinx-bsp layer: | ||
15 | |||
16 | > **Variable usage examples:** | ||
17 | > | ||
18 | > Machine Configuration file: `MACHINE = "zcu102-zynqmp"` | ||
19 | > | ||
20 | > Reference XSA: `HDF_MACHINE = "zcu102-zynqmp"` | ||
21 | > | ||
22 | > HW Board Device tree: `YAML_DT_BOARD_FLAGS = "{BOARD zcu102-rev1.0}"` | ||
23 | |||
24 | | Devices | Evaluation Board | Machine Configuration file | Reference XSA | HW Board Device tree | QEMU tested | HW tested | | ||
25 | |------------|-------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------------|-------------------------------------|-------------|-----------| | ||
26 | | MicroBlaze | [KC705](https://www.xilinx.com/products/boards-and-kits/ek-k7-kc705-g.html) | [kc705-microblazeel](conf/machine/kc705-microblazeel.conf) | `kc705-microblazeel` | `kc705-full` | Yes | Yes | | ||
27 | | | [AC701](https://www.xilinx.com/products/boards-and-kits/ek-a7-ac701-g.html) | [ac701-microblazeel](conf/machine/ac701-microblazeel.conf) | `ac701-microblazeel` | `ac701-full` | Yes | Yes | | ||
28 | | | [KCU105](https://www.xilinx.com/products/boards-and-kits/kcu105.html) | [kcu105-microblazeel](conf/machine/kcu105-microblazeel.conf) | `kcu105-microblazeel` | `kcu105` | Yes | Yes | | ||
29 | | | [VCU118](https://www.xilinx.com/products/boards-and-kits/vcu118.html) | [vcu118-microblazeel](conf/machine/vcu118-microblazeel.conf) | `vcu118-microblazeel` | `vcu118-rev2.0` | Yes | Yes | | ||
30 | | Zynq-7000 | [ZC702](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc702-g.html) | [zc702-zynq7](conf/machine/zc702-zynq7.conf) | `zc702-zynq7` | `zc702` | Yes | Yes | | ||
31 | | | [ZC706](https://www.xilinx.com/products/boards-and-kits/ek-z7-zc706-g.html) | [zc706-zynq7](conf/machine/zc706-zynq7.conf) | `zc706-zynq7` | `zc706` | Yes | Yes | | ||
32 | | ZynqMP | [ZCU102](https://www.xilinx.com/products/boards-and-kits/ek-u1-zcu102-g.html) | [zcu102-zynqmp](conf/machine/zcu102-zynqmp.conf) | `zcu102-zynqmp` | `zcu102-rev1.0` | Yes | Yes | | ||
33 | | | [ZCU104](https://www.xilinx.com/products/boards-and-kits/zcu104.html) | [zcu104-zynqmp](conf/machine/zcu104-zynqmp.conf) | `zcu104-zynqmp` | `zcu104-revc` | Yes | Yes | | ||
34 | | | [ZCU106](https://www.xilinx.com/products/boards-and-kits/zcu106.html) | [zcu106-zynqmp](conf/machine/zcu106-zynqmp.conf) | `zcu106-zynqmp` | `zcu106-reva` | Yes | Yes | | ||
35 | | | [ZCU111](https://www.xilinx.com/products/boards-and-kits/zcu111.html) | [zcu111-zynqmp](conf/machine/zcu111-zynqmp.conf) | `zcu111-zynqmp` | `zcu111-reva` | Yes | Yes | | ||
36 | | | [ZCU208](https://www.xilinx.com/products/boards-and-kits/zcu208.html) | [zcu208-zynqmp](conf/machine/zcu208-zynqmp.conf) | `zcu208-zynqmp` | `zcu208-reva` | Yes | Yes | | ||
37 | | | [ZCU216](https://www.xilinx.com/products/boards-and-kits/zcu216.html) | [zcu216-zynqmp](conf/machine/zcu216-zynqmp.conf) | `zcu216-zynqmp` | `zcu216-reva` | Yes | Yes | | ||
38 | | | [ZCU670](https://www.xilinx.com/products/boards-and-kits/zcu670.html) | [zcu670-zynqmp](conf/machine/zcu670-zynqmp.conf) | `zcu670-zynqmp` | `zcu670-revb` | Yes | Yes | | ||
39 | | Versal | [VCK190](https://www.xilinx.com/products/boards-and-kits/vck190.html) | [vck190-versal](conf/machine/vck190-versal.conf) | `vck190-versal` | `versal-vck190-reva-x-ebm-01-reva` | Yes | Yes | | ||
40 | | | [VMK180](https://www.xilinx.com/products/boards-and-kits/vmk180.html) | [vmk180-versal](conf/machine/vmk180-versal.conf) | `vmk180-versal` | `versal-vmk180-reva-x-ebm-01-reva` | Yes | Yes | | ||
41 | | | [VCK5000](https://www.xilinx.com/products/boards-and-kits/vck5000.html) | [vck5000-versal](conf/machine/vck5000-versal.conf) | `vck5000-versal` | `versal-vck5000-reva-x-ebm-01-reva` | No | No | | ||
42 | | | [VPK120](https://www.xilinx.com/products/boards-and-kits/vpk120.html) | [vpk120-versal](conf/machine/vpk120-versal.conf) | `vpk120-versal` | `versal-vpk120-reva` | Yes | Yes | | ||
43 | | | [VPK180](https://www.xilinx.com/products/boards-and-kits/vpk180.html) | [vpk180-versal](conf/machine/vpk180-versal.conf) | `vpk180-versal` | `versal-vpk180-reva` | Yes | Yes | | ||
44 | | | [VEK280](https://www.xilinx.com/products/boards-and-kits/vek280.html) | [vek280-versal](conf/machine/vek280-versal.conf) | `vek280-versal` | `versal-vek280-revb` | Yes | Yes | | ||
45 | | | [VHK158](https://www.xilinx.com/products/boards-and-kits/vhk158.html) | [vhk158-versal](conf/machine/vhk158-versal.conf) | `vhk158-versal` | `versal-vhk158-reva` | Yes | Yes | | ||
46 | |||
47 | > **Note:** Additional information on Xilinx architectures can be found at: | ||
48 | https://www.xilinx.com/products/silicon-devices.html | ||
49 | --- | ||
50 | ## Dependencies | 11 | ## Dependencies |
51 | 12 | ||
52 | This layer depends on: | 13 | This layer depends on: |
53 | 14 | ||
54 | URI: https://git.yoctoproject.org/poky | 15 | URI: https://git.yoctoproject.org/poky |
55 | layers: meta, meta-poky | 16 | layers: meta, meta-poky |
56 | branch: langdale | 17 | branch: scarthgap |
57 | 18 | ||
58 | URI: https://git.openembedded.org/meta-openembedded | 19 | URI: https://git.openembedded.org/meta-openembedded |
59 | layers: meta-oe | 20 | layers: meta-oe |
60 | branch: langdale | 21 | branch: scarthgap |
22 | |||
23 | URI: https://git.yoctoproject.org/meta-arm | ||
24 | layers: meta-arm, meta-arm-toolchain | ||
25 | branch: scarthgap | ||
61 | 26 | ||
62 | URI: | 27 | URI: |
63 | https://git.yoctoproject.org/meta-xilinx (official version) | 28 | https://git.yoctoproject.org/meta-xilinx (official version) |
64 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 29 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
65 | layers: meta-xilinx-microblaze, meta-xilinx-core | 30 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-standalone |
66 | branch: langdale or amd xilinx release version (e.g. rel-v2023.1) | 31 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-xilinx-bsp/conf/machine/ac701-microblazeel.conf b/meta-xilinx-bsp/conf/machine/ac701-microblazeel.conf deleted file mode 100644 index 27cb3939..00000000 --- a/meta-xilinx-bsp/conf/machine/ac701-microblazeel.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: ac701-microblazeel | ||
3 | #@DESCRIPTION: Machine configuration for the AC701 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'ac701-microblazeel:']['ac701-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 AC701 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 ac701-full}" | ||
20 | |||
21 | # Yocto FS-Boot variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "MIG_7SERIES_0" | ||
25 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
26 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
27 | |||
28 | # Yocto KERNEL Variables | ||
29 | UBOOT_ENTRYPOINT ?= "0x80000000" | ||
30 | UBOOT_LOADADDRESS ?= "0x80000000" | ||
31 | |||
32 | # ac701-microblazeel Serial Console | ||
33 | SERIAL_CONSOLES ?= "115200;ttyUL0" | ||
34 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
35 | |||
36 | # Set DDR Base address for u-boot-xlnx-scr variables | ||
37 | DDR_BASEADDR ?= "0x80000000" | ||
38 | SKIP_APPEND_BASEADDR ?= "0" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | require conf/machine/microblaze-generic.conf | ||
42 | |||
43 | # This machine conf file uses ac701-microblazeel xsa as reference input. | ||
44 | # User can override with ac701 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "ac701-microblazeel" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ac701_microblazeel']['ac701-microblazeel' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/kc705-microblazeel.conf b/meta-xilinx-bsp/conf/machine/kc705-microblazeel.conf deleted file mode 100644 index f3236f07..00000000 --- a/meta-xilinx-bsp/conf/machine/kc705-microblazeel.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: kc705-microblazeel | ||
3 | #@DESCRIPTION: Machine configuration for the KC705 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'kc705-microblazeel:']['kc705-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 kc705-full}" | ||
20 | |||
21 | # Yocto FS-Boot variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "MIG_7SERIES_0" | ||
25 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_emc_0" | ||
26 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
27 | |||
28 | # Yocto KERNEL Variables | ||
29 | UBOOT_ENTRYPOINT ?= "0x80000000" | ||
30 | UBOOT_LOADADDRESS ?= "0x80000000" | ||
31 | |||
32 | # kc705-microblazeel Serial Console | ||
33 | SERIAL_CONSOLES ?= "115200;ttyUL0" | ||
34 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
35 | |||
36 | # Set DDR Base address for u-boot-xlnx-scr variables | ||
37 | DDR_BASEADDR ?= "0x80000000" | ||
38 | SKIP_APPEND_BASEADDR ?= "0" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | require conf/machine/microblaze-generic.conf | ||
42 | |||
43 | # This machine conf file uses kc705-microblazeel xsa as reference input. | ||
44 | # User can override with kc705 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "kc705-microblazeel" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' kc705_microblazeel']['kc705-microblazeel' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/kcu105-microblazeel.conf b/meta-xilinx-bsp/conf/machine/kcu105-microblazeel.conf deleted file mode 100644 index a866f87c..00000000 --- a/meta-xilinx-bsp/conf/machine/kcu105-microblazeel.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: kcu105-microblazeel | ||
3 | #@DESCRIPTION: Machine configuration for the KCU105 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'kcu105-microblazeel:']['kcu105-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 KCU105 device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "DDR4_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 kcu105}" | ||
20 | |||
21 | # Yocto FS-Boot variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "DDR4_0" | ||
25 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
26 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
27 | |||
28 | # Yocto KERNEL Variables | ||
29 | UBOOT_ENTRYPOINT ?= "0x80000000" | ||
30 | UBOOT_LOADADDRESS ?= "0x80000000" | ||
31 | |||
32 | # kcu105-microblazeel Serial Console | ||
33 | SERIAL_CONSOLES ?= "115200;ttyUL0" | ||
34 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
35 | |||
36 | # Set DDR Base address for u-boot-xlnx-scr variables | ||
37 | DDR_BASEADDR ?= "0x80000000" | ||
38 | SKIP_APPEND_BASEADDR ?= "0" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | require conf/machine/microblaze-generic.conf | ||
42 | |||
43 | # This machine conf file uses kcu105-microblazeel xsa as reference input. | ||
44 | # User can override with kcu105 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "kcu105-microblazeel" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' kcu105_microblazeel']['kcu105-microblazeel' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-mh-div-generic.conf b/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-mh-div-generic.conf deleted file mode 100644 index 96b4e6d1..00000000 --- a/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-mh-div-generic.conf +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: microblazeel-v11.0-bs-cmp-mh-div-generic | ||
3 | #@DESCRIPTION: microblazeel-v11.0-bs-cmp-mh-div | ||
4 | |||
5 | TUNE_FEATURES:tune-microblaze ?= "microblaze v11.0 barrel-shift pattern-compare reorder divide-hard multiply-high" | ||
6 | |||
7 | require conf/machine/microblaze-generic.conf | ||
diff --git a/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-ml-generic.conf b/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-ml-generic.conf deleted file mode 100644 index cf83acf8..00000000 --- a/meta-xilinx-bsp/conf/machine/microblazeel-v11.0-bs-cmp-ml-generic.conf +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: microblazeel-v11.0-bs-cmp-ml-generic | ||
3 | #@DESCRIPTION: microblazeel-v11.0-bs-cmp-ml | ||
4 | |||
5 | TUNE_FEATURES:tune-microblaze ?= "microblaze v11.0 barrel-shift reorder pattern-compare multiply-low" | ||
6 | |||
7 | require conf/machine/microblaze-generic.conf | ||
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-cg.conf b/meta-xilinx-bsp/conf/machine/qemu-zynqmp-cg.conf deleted file mode 100644 index cb92bc71..00000000 --- a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-cg.conf +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: QEMU ZynqMP CG machine | ||
3 | #@DESCRIPTION: Machine configuration for running a ZynqMP CG system on QEMU w/ testimage | ||
4 | |||
5 | # This machine is NOT designed to be inherited by other machines or used as an | ||
6 | # example of how to create a machine. It is only useful for running testimage | ||
7 | # with runqemu. | ||
8 | |||
9 | #### Preamble | ||
10 | MACHINEOVERRIDES =. "${@['', 'qemu-zynqmp-cg:']['qemu-zynqmp-cg' !='${MACHINE}']}" | ||
11 | #### Regular settings follow | ||
12 | |||
13 | # The following is from conf/machine/include/qemu.inc, but we can not use it | ||
14 | # as it changes other values that need to come from the distro and the | ||
15 | # AMD machine settings | ||
16 | XSERVER ?= "xserver-xorg \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ | ||
18 | xf86-video-fbdev \ | ||
19 | xf86-video-modesetting \ | ||
20 | " | ||
21 | |||
22 | MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" | ||
23 | |||
24 | MACHINEOVERRIDES =. "qemuall:" | ||
25 | |||
26 | IMAGE_FSTYPES += "tar.bz2 ext4" | ||
27 | |||
28 | # Don't include kernels in standard images | ||
29 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" | ||
30 | |||
31 | # Provide the nfs server kernel module for all qemu images | ||
32 | KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc" | ||
33 | KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" | ||
34 | KERNEL_FEATURES:append:pn-linux-xlnx = " features/nfsd/nfsd-enable.scc" | ||
35 | |||
36 | |||
37 | # Now include the generic machine which already supports QEMU booting | ||
38 | require conf/machine/zynqmp-cg-generic.conf | ||
39 | |||
40 | #### No additional settings should be after the Postamble | ||
41 | #### Postamble | ||
42 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' qemu_zynqmp_cg']['qemu-zynqmp-cg' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-dr.conf b/meta-xilinx-bsp/conf/machine/qemu-zynqmp-dr.conf deleted file mode 100644 index 5fcb3541..00000000 --- a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-dr.conf +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: QEMU ZynqMP DR machine | ||
3 | #@DESCRIPTION: Machine configuration for running a ZynqMP DR system on QEMU w/ testimage | ||
4 | |||
5 | # This machine is NOT designed to be inherited by other machines or used as an | ||
6 | # example of how to create a machine. It is only useful for running testimage | ||
7 | # with runqemu. | ||
8 | |||
9 | #### Preamble | ||
10 | MACHINEOVERRIDES =. "${@['', 'qemu-zynqmp-dr:']['qemu-zynqmp-dr' !='${MACHINE}']}" | ||
11 | #### Regular settings follow | ||
12 | |||
13 | # The following is from conf/machine/include/qemu.inc, but we can not use it | ||
14 | # as it changes other values that need to come from the distro and the | ||
15 | # AMD machine settings | ||
16 | XSERVER ?= "xserver-xorg \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ | ||
18 | xf86-video-fbdev \ | ||
19 | xf86-video-modesetting \ | ||
20 | " | ||
21 | |||
22 | MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" | ||
23 | |||
24 | MACHINEOVERRIDES =. "qemuall:" | ||
25 | |||
26 | IMAGE_FSTYPES += "tar.bz2 ext4" | ||
27 | |||
28 | # Don't include kernels in standard images | ||
29 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" | ||
30 | |||
31 | # Provide the nfs server kernel module for all qemu images | ||
32 | KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc" | ||
33 | KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" | ||
34 | KERNEL_FEATURES:append:pn-linux-xlnx = " features/nfsd/nfsd-enable.scc" | ||
35 | |||
36 | |||
37 | # Now include the generic machine which already supports QEMU booting | ||
38 | require conf/machine/zynqmp-dr-generic.conf | ||
39 | |||
40 | #### No additional settings should be after the Postamble | ||
41 | #### Postamble | ||
42 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' qemu_zynqmp_dr']['qemu-zynqmp-dr' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-eg.conf b/meta-xilinx-bsp/conf/machine/qemu-zynqmp-eg.conf deleted file mode 100644 index 5f4b972c..00000000 --- a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-eg.conf +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: QEMU ZynqMP EG machine | ||
3 | #@DESCRIPTION: Machine configuration for running a ZynqMP EG system on QEMU w/ testimage | ||
4 | |||
5 | # This machine is NOT designed to be inherited by other machines or used as an | ||
6 | # example of how to create a machine. It is only useful for running testimage | ||
7 | # with runqemu. | ||
8 | |||
9 | #### Preamble | ||
10 | MACHINEOVERRIDES =. "${@['', 'qemu-zynqmp-eg:']['qemu-zynqmp-eg' !='${MACHINE}']}" | ||
11 | #### Regular settings follow | ||
12 | |||
13 | # The following is from conf/machine/include/qemu.inc, but we can not use it | ||
14 | # as it changes other values that need to come from the distro and the | ||
15 | # AMD machine settings | ||
16 | XSERVER ?= "xserver-xorg \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ | ||
18 | xf86-video-fbdev \ | ||
19 | xf86-video-modesetting \ | ||
20 | " | ||
21 | |||
22 | MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" | ||
23 | |||
24 | MACHINEOVERRIDES =. "qemuall:" | ||
25 | |||
26 | IMAGE_FSTYPES += "tar.bz2 ext4" | ||
27 | |||
28 | # Don't include kernels in standard images | ||
29 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" | ||
30 | |||
31 | # Provide the nfs server kernel module for all qemu images | ||
32 | KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc" | ||
33 | KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" | ||
34 | KERNEL_FEATURES:append:pn-linux-xlnx = " features/nfsd/nfsd-enable.scc" | ||
35 | |||
36 | |||
37 | # Now include the generic machine which already supports QEMU booting | ||
38 | require conf/machine/zynqmp-eg-generic.conf | ||
39 | |||
40 | #### No additional settings should be after the Postamble | ||
41 | #### Postamble | ||
42 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' qemu_zynqmp_eg']['qemu-zynqmp-eg' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-ev.conf b/meta-xilinx-bsp/conf/machine/qemu-zynqmp-ev.conf deleted file mode 100644 index 6058bfa4..00000000 --- a/meta-xilinx-bsp/conf/machine/qemu-zynqmp-ev.conf +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: QEMU ZynqMP EV machine | ||
3 | #@DESCRIPTION: Machine configuration for running a ZynqMP EV system on QEMU w/ testimage | ||
4 | |||
5 | # This machine is NOT designed to be inherited by other machines or used as an | ||
6 | # example of how to create a machine. It is only useful for running testimage | ||
7 | # with runqemu. | ||
8 | |||
9 | #### Preamble | ||
10 | MACHINEOVERRIDES =. "${@['', 'qemu-zynqmp-ev:']['qemu-zynqmp-ev' !='${MACHINE}']}" | ||
11 | #### Regular settings follow | ||
12 | |||
13 | # The following is from conf/machine/include/qemu.inc, but we can not use it | ||
14 | # as it changes other values that need to come from the distro and the | ||
15 | # AMD machine settings | ||
16 | XSERVER ?= "xserver-xorg \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ | ||
18 | xf86-video-fbdev \ | ||
19 | xf86-video-modesetting \ | ||
20 | " | ||
21 | |||
22 | MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" | ||
23 | |||
24 | MACHINEOVERRIDES =. "qemuall:" | ||
25 | |||
26 | IMAGE_FSTYPES += "tar.bz2 ext4" | ||
27 | |||
28 | # Don't include kernels in standard images | ||
29 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" | ||
30 | |||
31 | # Provide the nfs server kernel module for all qemu images | ||
32 | KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc" | ||
33 | KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" | ||
34 | KERNEL_FEATURES:append:pn-linux-xlnx = " features/nfsd/nfsd-enable.scc" | ||
35 | |||
36 | |||
37 | # Now include the generic machine which already supports QEMU booting | ||
38 | require conf/machine/zynqmp-ev-generic.conf | ||
39 | |||
40 | #### No additional settings should be after the Postamble | ||
41 | #### Postamble | ||
42 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' qemu_zynqmp_ev']['qemu-zynqmp-ev' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/qemu-zynqmp.conf b/meta-xilinx-bsp/conf/machine/qemu-zynqmp.conf deleted file mode 100644 index 91a96ede..00000000 --- a/meta-xilinx-bsp/conf/machine/qemu-zynqmp.conf +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: QEMU ZynqMP machine | ||
3 | #@DESCRIPTION: Machine configuration for running a ZynqMP system on QEMU w/ testimage | ||
4 | |||
5 | # This machine is NOT designed to be inherited by other machines or used as an | ||
6 | # example of how to create a machine. It is only useful for running testimage | ||
7 | # with runqemu. | ||
8 | |||
9 | #### Preamble | ||
10 | MACHINEOVERRIDES =. "${@['', 'qemu-zynqmp:']['qemu-zynqmp' !='${MACHINE}']}" | ||
11 | #### Regular settings follow | ||
12 | |||
13 | # The following is from conf/machine/include/qemu.inc, but we can not use it | ||
14 | # as it changes other values that need to come from the distro and the | ||
15 | # AMD machine settings | ||
16 | XSERVER ?= "xserver-xorg \ | ||
17 | ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast xserver-xorg-extension-glx', '', d)} \ | ||
18 | xf86-video-fbdev \ | ||
19 | xf86-video-modesetting \ | ||
20 | " | ||
21 | |||
22 | MACHINE_FEATURES = "alsa bluetooth usbgadget screen vfat" | ||
23 | |||
24 | MACHINEOVERRIDES =. "qemuall:" | ||
25 | |||
26 | IMAGE_FSTYPES += "tar.bz2 ext4" | ||
27 | |||
28 | # Don't include kernels in standard images | ||
29 | RDEPENDS:${KERNEL_PACKAGE_NAME}-base = "" | ||
30 | |||
31 | # Provide the nfs server kernel module for all qemu images | ||
32 | KERNEL_FEATURES:append:pn-linux-yocto = " features/nfsd/nfsd-enable.scc" | ||
33 | KERNEL_FEATURES:append:pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" | ||
34 | KERNEL_FEATURES:append:pn-linux-xlnx = " features/nfsd/nfsd-enable.scc" | ||
35 | |||
36 | |||
37 | # Now include the generic machine which already supports QEMU booting | ||
38 | require conf/machine/zynqmp-generic.conf | ||
39 | |||
40 | # This may break standalone runqemu, but allows testimage to work | ||
41 | QB_XILINX_SERIAL = "" | ||
42 | |||
43 | #### No additional settings should be after the Postamble | ||
44 | #### Postamble | ||
45 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' qemu_zynqmp']['qemu-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf b/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf deleted file mode 100644 index e3df1d26..00000000 --- a/meta-xilinx-bsp/conf/machine/sp701-microblazeel.conf +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
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/conf/machine/vck190-versal.conf b/meta-xilinx-bsp/conf/machine/vck190-versal.conf deleted file mode 100644 index ed049268..00000000 --- a/meta-xilinx-bsp/conf/machine/vck190-versal.conf +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vck190-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VCK190 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vck190-versal:']['vck190-versal' !='${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 versal-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
15 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vck190-reva-x-ebm-01-reva}" | ||
16 | |||
17 | # Yocto arm-trusted-firmware(TF-A) variables | ||
18 | ATF_CONSOLE ?= "pl011" | ||
19 | TFA_BL33_LOAD ?= "0x8000000" | ||
20 | |||
21 | # Yocto PLM variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
24 | |||
25 | # Yocto KERNEL Variables | ||
26 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
27 | UBOOT_LOADADDRESS ?= "0x200000" | ||
28 | |||
29 | # vck190-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VCK190 board uses Versal AI Core device hence use soc variant based generic | ||
35 | # machine inclusion | ||
36 | require conf/machine/versal-ai-core-generic.conf | ||
37 | |||
38 | # This machine conf file uses vck190-versal xsa as reference input. | ||
39 | # User can override with vck190 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vck190-versal" | ||
42 | |||
43 | #### No additional settings should be after the Postamble | ||
44 | #### Postamble | ||
45 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vck190_versal']['vck190-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vcu118-microblazeel.conf b/meta-xilinx-bsp/conf/machine/vcu118-microblazeel.conf deleted file mode 100644 index bfd60336..00000000 --- a/meta-xilinx-bsp/conf/machine/vcu118-microblazeel.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vcu118-microblazeel | ||
3 | #@DESCRIPTION: Machine configuration for the VCU118 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vcu118-microblazeel:']['vcu118-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 VCU118 device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "DDR4_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 vcu118-rev2.0}" | ||
20 | |||
21 | # Yocto FS-Boot variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "DDR4_0" | ||
25 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
26 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
27 | |||
28 | # Yocto KERNEL Variables | ||
29 | UBOOT_ENTRYPOINT ?= "0x80000000" | ||
30 | UBOOT_LOADADDRESS ?= "0x80000000" | ||
31 | |||
32 | # vcu118-microblazeel Serial Console | ||
33 | SERIAL_CONSOLES ?= "115200;ttyUL0" | ||
34 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
35 | |||
36 | # Set DDR Base address for u-boot-xlnx-scr variables | ||
37 | DDR_BASEADDR ?= "0x80000000" | ||
38 | SKIP_APPEND_BASEADDR ?= "0" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | require conf/machine/microblaze-generic.conf | ||
42 | |||
43 | # This machine conf file uses vcu118-microblazeel xsa as reference input. | ||
44 | # User can override with vcu118 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "vcu118-microblazeel" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vcu118_microblazeel']['vcu118-microblazeel' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vek280-versal.conf b/meta-xilinx-bsp/conf/machine/vek280-versal.conf deleted file mode 100644 index ffe2fcb7..00000000 --- a/meta-xilinx-bsp/conf/machine/vek280-versal.conf +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | XILINX_DEPRECATED[vek280-versal] = "${@'vek280-versal is not supported in 2023.2' if d.getVar("XILINX_RELEASE_VERSION") == 'v2023.2' else ''}" | ||
2 | |||
3 | #@TYPE: Machine | ||
4 | #@NAME: vek280-versal | ||
5 | #@DESCRIPTION: Machine configuration for the VEK280 evaluation boards. | ||
6 | |||
7 | #### Preamble | ||
8 | MACHINEOVERRIDES =. "${@['', 'vek280-versal:']['vek280-versal' !='${MACHINE}']}" | ||
9 | #### Regular settings follow | ||
10 | |||
11 | # Variables that changes based on hw design or board specific requirement must be | ||
12 | # defined before calling the required inclusion file else pre-expansion value | ||
13 | # defined in versal-generic.conf will be set. | ||
14 | |||
15 | # Yocto device-tree variables | ||
16 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
17 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vek280-revb}" | ||
18 | |||
19 | # Yocto arm-trusted-firmware(TF-A) variables | ||
20 | ATF_CONSOLE ?= "pl011" | ||
21 | TFA_BL33_LOAD ?= "0x8000000" | ||
22 | |||
23 | # Yocto PLM variables | ||
24 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
25 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
26 | |||
27 | # Yocto KERNEL Variables | ||
28 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
29 | UBOOT_LOADADDRESS ?= "0x200000" | ||
30 | |||
31 | # vek280-versal Serial Console | ||
32 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
33 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
34 | |||
35 | # Required generic machine inclusion | ||
36 | require conf/machine/versal-ai-edge-generic.conf | ||
37 | |||
38 | # This machine conf file uses vek280-versal xsa as reference input. | ||
39 | # User can override with vek280 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vek280-versal" | ||
42 | |||
43 | # VEK280 board has 12GB memory only but default versal-generic has QB_MEM set to | ||
44 | # 8G, Hence we need set 12G in QB_MEM. | ||
45 | QB_MEM = "-m 12G" | ||
46 | |||
47 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb" | ||
48 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | ||
49 | |||
50 | # Yocto MACHINE_FEATURES Variable | ||
51 | MACHINE_FEATURES += "vdu" | ||
52 | |||
53 | #### No additional settings should be after the Postamble | ||
54 | #### Postamble | ||
55 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vek280_versal']['vek280-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vmk180-versal.conf b/meta-xilinx-bsp/conf/machine/vmk180-versal.conf deleted file mode 100644 index 0f474f78..00000000 --- a/meta-xilinx-bsp/conf/machine/vmk180-versal.conf +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vmk180-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VMK180 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vmk180-versal:']['vmk180-versal' !='${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 versal-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
15 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vmk180-reva-x-ebm-01-reva}" | ||
16 | |||
17 | # Yocto arm-trusted-firmware(TF-A) variables | ||
18 | ATF_CONSOLE ?= "pl011" | ||
19 | TFA_BL33_LOAD ?= "0x8000000" | ||
20 | |||
21 | # Yocto PLM variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
24 | |||
25 | # Yocto KERNEL Variables | ||
26 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
27 | UBOOT_LOADADDRESS ?= "0x200000" | ||
28 | |||
29 | # vmk180-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VMK180 board uses Versal Prime device hence use soc variant based generic | ||
35 | # machine inclusion | ||
36 | require conf/machine/versal-prime-generic.conf | ||
37 | |||
38 | # This machine conf file uses vmk180-versal xsa as reference input. | ||
39 | # User can override with vmk180 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vmk180-versal" | ||
42 | |||
43 | #### No additional settings should be after the Postamble | ||
44 | #### Postamble | ||
45 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vmk180_versal']['vmk180-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vpk120-versal.conf b/meta-xilinx-bsp/conf/machine/vpk120-versal.conf deleted file mode 100644 index e200d42d..00000000 --- a/meta-xilinx-bsp/conf/machine/vpk120-versal.conf +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vpk120-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VPK120 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vpk120-versal:']['vpk120-versal' !='${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 versal-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
15 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vpk120-reva}" | ||
16 | |||
17 | # Yocto arm-trusted-firmware(TF-A) variables | ||
18 | ATF_CONSOLE ?= "pl011" | ||
19 | TFA_BL33_LOAD ?= "0x8000000" | ||
20 | |||
21 | # Yocto PLM variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
24 | |||
25 | # Yocto KERNEL Variables | ||
26 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
27 | UBOOT_LOADADDRESS ?= "0x200000" | ||
28 | |||
29 | # vpk120-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VPK120 board uses Versal Premium device hence use soc variant based generic | ||
35 | # machine inclusion | ||
36 | require conf/machine/versal-premium-generic.conf | ||
37 | |||
38 | # This machine conf file uses vpk120-versal xsa as reference input. | ||
39 | # User can override with vpk120 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vpk120-versal" | ||
42 | |||
43 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vpk120.dtb" | ||
44 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | ||
45 | |||
46 | #### No additional settings should be after the Postamble | ||
47 | #### Postamble | ||
48 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vpk120_versal']['vpk120-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vpk180-versal.conf b/meta-xilinx-bsp/conf/machine/vpk180-versal.conf deleted file mode 100644 index 92630e97..00000000 --- a/meta-xilinx-bsp/conf/machine/vpk180-versal.conf +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vpk180-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VPK180 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vpk180-versal:']['vpk180-versal' !='${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 versal-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
15 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vpk180-reva}" | ||
16 | |||
17 | # Yocto arm-trusted-firmware(TF-A) variables | ||
18 | ATF_CONSOLE ?= "pl011" | ||
19 | TFA_BL33_LOAD ?= "0x8000000" | ||
20 | |||
21 | # Yocto PLM variables | ||
22 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
23 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "versal_cips_0_pspmc_0_psv_sbsauart_0" | ||
24 | |||
25 | # Yocto KERNEL Variables | ||
26 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
27 | UBOOT_LOADADDRESS ?= "0x200000" | ||
28 | |||
29 | # vpk180-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VPK180 board uses Versal Premium device hence use soc variant based generic | ||
35 | # machine inclusion | ||
36 | require conf/machine/versal-premium-generic.conf | ||
37 | |||
38 | # This machine conf file uses vpk180-versal xsa as reference input. | ||
39 | # User can override with vpk180 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vpk180-versal" | ||
42 | |||
43 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vpk180.dtb" | ||
44 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | ||
45 | |||
46 | #### No additional settings should be after the Postamble | ||
47 | #### Postamble | ||
48 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vpk180_versal']['vpk180-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf deleted file mode 100644 index a9dbe800..00000000 --- a/meta-xilinx-bsp/conf/machine/zc1254-zynqmp.conf +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zc1254-zynqmp | ||
3 | #@DESCRIPTION: Machine support for ZC1254 Evaluation Board. | ||
4 | # | ||
5 | |||
6 | require conf/machine/zynqmp-dr-generic.conf | ||
7 | |||
8 | # Add board compatibility override | ||
9 | MACHINEOVERRIDES .= ":zc1254" | ||
10 | |||
11 | KERNEL_DEVICETREE = "xilinx/zynqmp-zc1254-revA.dtb" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf b/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf deleted file mode 100644 index 1db0616f..00000000 --- a/meta-xilinx-bsp/conf/machine/zc702-zynq7.conf +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zc702-zynq7 | ||
3 | #@DESCRIPTION: Machine configuration for the ZC702 evaluation boards. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zc702-zynq7:']['zc702-zynq7' !='${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 zynq-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zc702}" | ||
17 | |||
18 | # Yocto FSBL variables | ||
19 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1" | ||
20 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1" | ||
21 | |||
22 | # Yocto KERNEL Variables | ||
23 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
24 | UBOOT_LOADADDRESS ?= "0x200000" | ||
25 | |||
26 | # zc702-zynq7 Serial Console | ||
27 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
28 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
29 | |||
30 | # Required generic machine inclusion | ||
31 | require conf/machine/zynq-generic.conf | ||
32 | |||
33 | # This eval board machine conf file uses zc702-zynq7 xsa as reference input. | ||
34 | # User can override with zc702 custom xsa using HDF_BASE and HDF_PATH variables | ||
35 | # from local.conf. | ||
36 | HDF_MACHINE = "zc702-zynq7" | ||
37 | |||
38 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
39 | # the xsa. User can enable explicitly if required from local.conf. | ||
40 | # KERNEL_DEVICETREE = "zynq-zc702.dtb" | ||
41 | |||
42 | #### No additional settings should be after the Postamble | ||
43 | #### Postamble | ||
44 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zc702_zynq7']['zc702-zynq7' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf b/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf deleted file mode 100644 index 7e0525d1..00000000 --- a/meta-xilinx-bsp/conf/machine/zc706-zynq7.conf +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zc706-zynq7 | ||
3 | #@DESCRIPTION: Machine configuration for the ZC706 evaluation boards. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zc706-zynq7:']['zc706-zynq7' !='${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 zynq-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zc706}" | ||
17 | |||
18 | # Yocto FSBL variables | ||
19 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1" | ||
20 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1" | ||
21 | |||
22 | # Yocto KERNEL Variables | ||
23 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
24 | UBOOT_LOADADDRESS ?= "0x200000" | ||
25 | |||
26 | # zc706-zynq7 Serial Console | ||
27 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
28 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
29 | |||
30 | # Required generic machine inclusion | ||
31 | require conf/machine/zynq-generic.conf | ||
32 | |||
33 | # This eval board machine conf file uses zc702-zynq7 xsa as reference input. | ||
34 | # User can override with zc702 custom xsa using HDF_BASE and HDF_PATH variables | ||
35 | # from local.conf. | ||
36 | HDF_MACHINE = "zc706-zynq7" | ||
37 | |||
38 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
39 | # the xsa. User can enable explicitly if required from local.conf. | ||
40 | # KERNEL_DEVICETREE = "zynq-zc706.dtb" | ||
41 | |||
42 | #### No additional settings should be after the Postamble | ||
43 | #### Postamble | ||
44 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zc706_zynq7']['zc706-zynq7' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf deleted file mode 100644 index acd2544a..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu102-zynqmp.conf +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu102-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU102 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu102-zynqmp:']['zcu102-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu102-rev1.0}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu102-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU102 board uses ZynqMP EG device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-eg-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu102-zynqmp xsa as reference input. | ||
44 | # User can override with zcu102 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu102-zynqmp" | ||
47 | |||
48 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
49 | # the xsa. User can enable explicitly if required from local.conf. | ||
50 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu102-rev1.0.dtb" | ||
51 | |||
52 | #### No additional settings should be after the Postamble | ||
53 | #### Postamble | ||
54 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu102_zynqmp']['zcu102-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf deleted file mode 100644 index bff853b8..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu104-zynqmp.conf +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu104-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU104 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu104-zynqmp:']['zcu104-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu104-revc}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu104-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU104 board uses ZynqMP EV device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-ev-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu104-zynqmp xsa as reference input. | ||
44 | # User can override with zcu104 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu104-zynqmp" | ||
47 | |||
48 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
49 | # the xsa. User can enable explicitly if required from local.conf. | ||
50 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu104-revC.dtb" | ||
51 | |||
52 | # Yocto IMAGE_FEATURES Variable | ||
53 | MACHINE_HWCODECS = "libvcu-omxil" | ||
54 | IMAGE_FEATURES += "hwcodecs" | ||
55 | |||
56 | #### No additional settings should be after the Postamble | ||
57 | #### Postamble | ||
58 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu104_zynqmp']['zcu104-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf deleted file mode 100644 index cc2c6083..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu106-zynqmp.conf +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu106-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU106 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu106-zynqmp:']['zcu106-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu106-reva}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu106-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU106 board uses ZynqMP EV device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-ev-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu106-zynqmp xsa as reference input. | ||
44 | # User can override with zcu106 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu106-zynqmp" | ||
47 | |||
48 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
49 | # the xsa. User can enable explicitly if required from local.conf. | ||
50 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu106-revA.dtb" | ||
51 | |||
52 | # Yocto IMAGE_FEATURES Variable | ||
53 | MACHINE_HWCODECS = "libvcu-omxil" | ||
54 | IMAGE_FEATURES += "hwcodecs" | ||
55 | |||
56 | #### No additional settings should be after the Postamble | ||
57 | #### Postamble | ||
58 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu106_zynqmp']['zcu106-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf deleted file mode 100644 index 77da93ca..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu111-zynqmp.conf +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu111-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU111 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu111-zynqmp:']['zcu111-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu111-reva}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu111-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU111 board uses ZynqMP DR device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-dr-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu111-zynqmp xsa as reference input. | ||
44 | # User can override with zcu111 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu111-zynqmp" | ||
47 | |||
48 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
49 | # the xsa. User can enable explicitly if required from local.conf. | ||
50 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu111-revA.dtb" | ||
51 | |||
52 | #### No additional settings should be after the Postamble | ||
53 | #### Postamble | ||
54 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu111_zynqmp']['zcu111-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf deleted file mode 100644 index 18aa3eee..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | XILINX_DEPRECATED[zcu1275-zynqmp] = "${@'zcu1275-zynqmp is not supported in 2023.2' if d.getVar("XILINX_RELEASE_VERSION") == 'v2023.2' else ''}" | ||
2 | |||
3 | #@TYPE: Machine | ||
4 | #@NAME: zcu1275-zynqmp | ||
5 | #@DESCRIPTION: Machine configuration for the ZCU1275 evaluation board. | ||
6 | |||
7 | #### Preamble | ||
8 | MACHINEOVERRIDES =. "${@['', 'zcu1275-zynqmp:']['zcu1275-zynqmp' !='${MACHINE}']}" | ||
9 | #### Regular settings follow | ||
10 | |||
11 | # Yocto device-tree variables | ||
12 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
13 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
14 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu1275-revb}" | ||
15 | |||
16 | # Yocto arm-trusted-firmware(TF-A) variables | ||
17 | ATF_CONSOLE ?= "cadence" | ||
18 | TFA_BL33_LOAD ?= "0x8000000" | ||
19 | |||
20 | # Yocto PMUFW variables | ||
21 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
22 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
23 | |||
24 | # Yocto FSBL variables | ||
25 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
26 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
27 | |||
28 | # Yocto KERNEL Variables | ||
29 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
30 | UBOOT_LOADADDRESS ?= "0x200000" | ||
31 | |||
32 | # zcu1275-zynqmp Serial Console | ||
33 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
34 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
35 | |||
36 | # Required generic machine inclusion | ||
37 | # ZCU1275 board uses ZynqMP DR device hence use soc variant based generic machine | ||
38 | # inclusion | ||
39 | require conf/machine/zynqmp-dr-generic.conf | ||
40 | |||
41 | # This eval board machine conf file uses zcu1275-zynqmp xsa as reference input. | ||
42 | # User can override with zcu1275 custom xsa using HDF_BASE and HDF_PATH variables | ||
43 | # from local.conf. | ||
44 | HDF_MACHINE = "zcu1275-zynqmp" | ||
45 | |||
46 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
47 | # the xsa. User can enable explicitly if required from local.conf. | ||
48 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1275-revB.dtb" | ||
49 | |||
50 | #### No additional settings should be after the Postamble | ||
51 | #### Postamble | ||
52 | PACKAGE_EXTRA_ARCHS:append = "${@['', 'zcu1275_zynqmp']['zcu1275-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf deleted file mode 100644 index 6fba3619..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | XILINX_DEPRECATED[zcu1285-zynqmp] = "${@'zcu1285-zynqmp is not supported in 2023.2' if d.getVar("XILINX_RELEASE_VERSION") == 'v2023.2' else ''}" | ||
2 | |||
3 | #@TYPE: Machine | ||
4 | #@NAME: zcu1285-zynqmp | ||
5 | #@DESCRIPTION: Machine configuration for the ZCU1285 evaluation board. | ||
6 | |||
7 | #### Preamble | ||
8 | MACHINEOVERRIDES =. "${@['', 'zcu1285-zynqmp:']['zcu1285-zynqmp' !='${MACHINE}']}" | ||
9 | #### Regular settings follow | ||
10 | |||
11 | # Variables that changes based on hw design or board specific requirement must be | ||
12 | # defined before calling the required inclusion file else pre-expansion value | ||
13 | # defined in zynqmp-generic.conf will be set. | ||
14 | |||
15 | # Yocto device-tree variables | ||
16 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
17 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu1285-reva}" | ||
19 | |||
20 | # Yocto arm-trusted-firmware(TF-A) variables | ||
21 | ATF_CONSOLE ?= "cadence" | ||
22 | TFA_BL33_LOAD ?= "0x8000000" | ||
23 | |||
24 | # Yocto PMUFW variables | ||
25 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
26 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
27 | |||
28 | # Yocto FSBL variables | ||
29 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
30 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
31 | |||
32 | # Yocto KERNEL Variables | ||
33 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
34 | UBOOT_LOADADDRESS ?= "0x200000" | ||
35 | |||
36 | # zcu1285-zynqmp Serial Console | ||
37 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
38 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | # ZCU1285 board uses ZynqMP DR device hence use soc variant based generic machine | ||
42 | # inclusion | ||
43 | require conf/machine/zynqmp-dr-generic.conf | ||
44 | |||
45 | # This eval board machine conf file uses zcu1285-zynqmp xsa as reference input. | ||
46 | # User can override with zcu1285 custom xsa using HDF_BASE and HDF_PATH variables | ||
47 | # from local.conf. | ||
48 | HDF_MACHINE = "zcu1285-zynqmp" | ||
49 | |||
50 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
51 | # the xsa. User can enable explicitly if required from local.conf. | ||
52 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu1285-revA.dtb" | ||
53 | |||
54 | #### No additional settings should be after the Postamble | ||
55 | #### Postamble | ||
56 | PACKAGE_EXTRA_ARCHS:append = "${@['', 'zcu1285_zynqmp']['zcu1285-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf deleted file mode 100644 index 7bb2c9db..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu208-zynqmp.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu208-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU208 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu208-zynqmp:']['zcu208-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu208-reva}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu208-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU208 board uses ZynqMP DR device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-dr-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu208-zynqmp xsa as reference input. | ||
44 | # User can override with zcu208 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu208-zynqmp" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu208_zynqmp']['zcu208-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf deleted file mode 100644 index f4e1619d..00000000 --- a/meta-xilinx-bsp/conf/machine/zcu216-zynqmp.conf +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zcu216-zynqmp | ||
3 | #@DESCRIPTION: Machine configuration for the ZCU216 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zcu216-zynqmp:']['zcu216-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu216-reva}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # zcu216-zynqmp Serial Console | ||
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | ||
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | |||
38 | # Required generic machine inclusion | ||
39 | # ZCU216 board uses ZynqMP DR device hence use soc variant based generic machine | ||
40 | # inclusion | ||
41 | require conf/machine/zynqmp-dr-generic.conf | ||
42 | |||
43 | # This eval board machine conf file uses zcu216-zynqmp xsa as reference input. | ||
44 | # User can override with zcu216 custom xsa using HDF_BASE and HDF_PATH variables | ||
45 | # from local.conf. | ||
46 | HDF_MACHINE = "zcu216-zynqmp" | ||
47 | |||
48 | #### No additional settings should be after the Postamble | ||
49 | #### Postamble | ||
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu216_zynqmp']['zcu216-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend b/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend deleted file mode 100644 index c6c92fe7..00000000 --- a/meta-xilinx-bsp/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_%.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | EXTRA_OEMAKE:append:vc-p-a2197-00-versal =" VERSAL_PLATFORM=silicon" | ||
2 | |||
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend deleted file mode 100644 index 7acda75e..00000000 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bbappend +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
2 | |||
3 | # device tree sources for the various machines | ||
4 | COMPATIBLE_MACHINE:qemu-zynq7 = ".*" | ||
5 | SRC_URI:append:qemu-zynq7 = " file://qemu-zynq7.dts" | ||
6 | |||
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/pnc.dtsi b/meta-xilinx-bsp/recipes-bsp/device-tree/files/pnc.dtsi deleted file mode 100644 index 760b76be..00000000 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/files/pnc.dtsi +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | / { | ||
2 | reserved-memory { | ||
3 | #address-cells = <2>; | ||
4 | #size-cells = <2>; | ||
5 | ranges; | ||
6 | |||
7 | pnc-reserved-memory@70000000{ | ||
8 | compatible = "pnc,secure-memory"; | ||
9 | reg = <0x0 0x70000000 0x0 0x0FF00000>; | ||
10 | no-map; | ||
11 | }; | ||
12 | }; | ||
13 | }; | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/device-tree/files/qemu-zynq7.dts b/meta-xilinx-bsp/recipes-bsp/device-tree/files/qemu-zynq7.dts deleted file mode 100644 index cd0694d6..00000000 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/files/qemu-zynq7.dts +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /dts-v1/; | ||
2 | /include/ "zynq-7000.dtsi" | ||
3 | /include/ "zynq-7000-qspi-dummy.dtsi" | ||
4 | |||
5 | / { | ||
6 | model = "Zynq A9 QEMU"; | ||
7 | compatible = "qemu,xilinx-zynq-a9", "xlnx,zynq-7000"; | ||
8 | |||
9 | aliases { | ||
10 | ethernet0 = &gem0; | ||
11 | serial0 = &uart1; | ||
12 | }; | ||
13 | |||
14 | memory { | ||
15 | device_type = "memory"; | ||
16 | reg = <0x0 0x40000000>; | ||
17 | }; | ||
18 | |||
19 | chosen { | ||
20 | bootargs = "earlyprintk"; | ||
21 | stdout-path = "serial0:115200n8"; | ||
22 | }; | ||
23 | }; | ||
24 | |||
25 | &amba { | ||
26 | /* Setup a fixed 25 MHz clock (100Mbps) to trick the ethernet driver */ | ||
27 | fixednetclk: clock { | ||
28 | #clock-cells = <0>; | ||
29 | compatible = "fixed-clock"; | ||
30 | clock-frequency = <25000000>; | ||
31 | }; | ||
32 | }; | ||
33 | |||
34 | &gem0 { | ||
35 | status = "okay"; | ||
36 | clocks = <&clkc 30>, <&clkc 30>, <&fixednetclk>, <&fixednetclk>, <&clkc 30>; | ||
37 | phy-mode = "rgmii-id"; | ||
38 | phy-handle = <ðernet_phy>; | ||
39 | |||
40 | ethernet_phy: ethernet-phy@23 { | ||
41 | device_type = "ethernet-phy"; | ||
42 | reg = <23>; | ||
43 | }; | ||
44 | }; | ||
45 | |||
46 | &sdhci0 { | ||
47 | status = "okay"; | ||
48 | }; | ||
49 | |||
50 | &uart1 { | ||
51 | status = "okay"; | ||
52 | }; | ||
53 | |||
54 | &qspi { | ||
55 | status = "okay"; | ||
56 | is-dual = <1>; | ||
57 | primary_flash: ps7-qspi@0 { | ||
58 | #address-cells = <1>; | ||
59 | #size-cells = <1>; | ||
60 | compatible = "st,m25p80"; | ||
61 | reg = <0x0>; | ||
62 | spi-max-frequency = <50000000>; | ||
63 | partition@0x00000000 { | ||
64 | label = "boot"; | ||
65 | reg = <0x00000000 0x00500000>; | ||
66 | }; | ||
67 | partition@0x00500000 { | ||
68 | label = "bootenv"; | ||
69 | reg = <0x00500000 0x00020000>; | ||
70 | }; | ||
71 | partition@0x00520000 { | ||
72 | label = "config"; | ||
73 | reg = <0x00520000 0x00020000>; | ||
74 | }; | ||
75 | partition@0x00540000 { | ||
76 | label = "image"; | ||
77 | reg = <0x00540000 0x00a80000>; | ||
78 | }; | ||
79 | partition@0x00fc0000 { | ||
80 | label = "spare"; | ||
81 | reg = <0x00fc0000 0x00000000>; | ||
82 | }; | ||
83 | }; | ||
84 | }; | ||
85 | |||
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 deleted file mode 100644 index 0d2ca87d..00000000 --- a/meta-xilinx-bsp/recipes-bsp/device-tree/files/system-vek280.dtsi +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
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-bsp/recipes-bsp/dfx-mgr/dfx-mgr_%.bbappend b/meta-xilinx-bsp/recipes-bsp/dfx-mgr/dfx-mgr_%.bbappend deleted file mode 100644 index 8fdf14bb..00000000 --- a/meta-xilinx-bsp/recipes-bsp/dfx-mgr/dfx-mgr_%.bbappend +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | FILESEXTRAPATHS:append := ":${THISDIR}/files" | ||
2 | |||
3 | SRC_URI += "file://zcu106-xlnx-firmware-detect" | ||
4 | |||
5 | PACKAGE_ARCH:zcu106-zynqmp = "${MACHINE_ARCH}" | ||
6 | |||
7 | # ZCU106 eval board firmware detection script. | ||
8 | do_install:append:zcu106-zynqmp () { | ||
9 | install -m 0755 ${WORKDIR}/zcu106-xlnx-firmware-detect ${D}${bindir}/xlnx-firmware-detect | ||
10 | } | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/dfx-mgr/files/zcu106-xlnx-firmware-detect b/meta-xilinx-bsp/recipes-bsp/dfx-mgr/files/zcu106-xlnx-firmware-detect deleted file mode 100644 index ef5654cc..00000000 --- a/meta-xilinx-bsp/recipes-bsp/dfx-mgr/files/zcu106-xlnx-firmware-detect +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | # Copyright (C) 2022 Xilinx, Inc. All rights reserved. | ||
4 | # Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved. | ||
5 | # | ||
6 | # SPDX-License-Identifier: MIT | ||
7 | |||
8 | # read values from dfx-mgr conf file | ||
9 | conffile="/etc/dfx-mgrd/daemon.conf" | ||
10 | if [ ! -f "${conffile}" ]; then | ||
11 | echo "dfx-mgrd configuration file not found: ${conffile}" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | fwbasedir=$(grep "firmware_location" ${conffile} | sed 's/.*:.*\[\"\(.*\)\"\],\?/\1/') | ||
16 | if [ -z "${fwbasedir}" ]; then | ||
17 | echo "Property 'firmware_location' not found in ${conffile}" | ||
18 | exit 1 | ||
19 | fi | ||
20 | |||
21 | fwfile=$(grep "default_accel" ${conffile} | sed 's/.*:.*\"\(.*\)\",\?/\1/') | ||
22 | if [ -z "${fwfile}" ]; then | ||
23 | echo "Property 'default_accel' not found in ${conffile}" | ||
24 | exit 1 | ||
25 | fi | ||
26 | |||
27 | # check if default firmware is already set and present | ||
28 | if [ -f "${fwfile}" ]; then | ||
29 | fwname=$(cat ${fwfile}) | ||
30 | fwdir="${fwbasedir}/${fwname}" | ||
31 | if [ -n "${fwname}" ] && [ -d "${fwdir}" ]; then | ||
32 | echo "Default firmware detected: ${fwname}" | ||
33 | exit 0 | ||
34 | fi | ||
35 | fi | ||
36 | |||
37 | # search for firmware based on EEPROM board id | ||
38 | echo "Trying to detect default firmware based on EEPROM..." | ||
39 | |||
40 | #check if board is a zcu106 eval board product | ||
41 | eeprom=$(ls /sys/bus/i2c/devices/*54/eeprom 2> /dev/null) | ||
42 | if [ -n "${eeprom}" ]; then | ||
43 | boardid=`dd if=$eeprom bs=1 count=6 skip=208 2>/dev/null | tr '[:upper:]' '[:lower:]'` | ||
44 | revision=`dd if=$eeprom bs=1 count=3 skip=224 2>/dev/null | tr '[:upper:]' '[:lower:]'` | ||
45 | |||
46 | fwname="${boardid}-${revision}" | ||
47 | fwdir="${fwbasedir}/${fwname}" | ||
48 | |||
49 | fixed_rev=2.0 | ||
50 | var=$(awk 'BEGIN{ print "'$fixed_rev'"<"'$revision'" }') | ||
51 | |||
52 | if [ "${boardid}" == "zcu106" ] && [ "${var}" -eq 1 ] ;then | ||
53 | revision=2.0 | ||
54 | echo "later than 2.0 board revisions are supported in 2.0 bit and dtbo files" | ||
55 | fwname="${boardid}-${revision}" | ||
56 | fwdir="${fwbasedir}/${fwname}" | ||
57 | echo "${fwname}" > "${fwfile}" | ||
58 | exit 1 | ||
59 | elif [ ! -d "${fwdir}" ] ; then | ||
60 | echo "No default firmware named ${fwname} found in ${fwbasedir} , Loading rev1.0 bitstream and dtbo as default " | ||
61 | revision=1.0 | ||
62 | fwname=$(ls ${fwbasedir} | grep ${revision}) | ||
63 | fwdir="${fwbasedir}/${fwname}" | ||
64 | echo "${fwname}" > "${fwfile}" | ||
65 | exit 1 | ||
66 | fi | ||
67 | |||
68 | echo "Default firmware detected: ${fwname}" | ||
69 | echo "${fwname}" > "${fwfile}" | ||
70 | exit 0 | ||
71 | fi | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend b/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend index 6a23dc47..c4b6c4ef 100644 --- a/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend +++ b/meta-xilinx-bsp/recipes-bsp/embeddedsw/fsbl-firmware_%.bbappend | |||
@@ -7,14 +7,10 @@ PMU_CONF_BASE_NAME ?= "${PMU_CONF_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAG | |||
7 | DEPENDS:append:zynqmp = " virtual/${TARGET_PREFIX}binutils" | 7 | DEPENDS:append:zynqmp = " virtual/${TARGET_PREFIX}binutils" |
8 | 8 | ||
9 | do_compile:append:zynqmp () { | 9 | do_compile:append:zynqmp () { |
10 | if [ -z "${SYSTEM_DTFILE}" ]; then | 10 | ${OBJCOPY} --dump-section .sys_cfg_data=${B}/${PMU_CONF_NAME}.bin ${B}/${ESW_COMPONENT} |
11 | ${OBJCOPY} --dump-section .sys_cfg_data=${B}/${PMU_CONF_NAME}.bin ${B}/${ESW_COMPONENT} | ||
12 | fi | ||
13 | } | 11 | } |
14 | 12 | ||
15 | do_deploy:append:zynqmp () { | 13 | do_deploy:append:zynqmp () { |
16 | if [ -z "${SYSTEM_DTFILE}" ]; then | 14 | install -Dm 0644 ${B}/${PMU_CONF_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_BASE_NAME}.bin |
17 | install -Dm 0644 ${B}/${PMU_CONF_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_BASE_NAME}.bin | 15 | ln -s ${PMU_CONF_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_NAME}.bin |
18 | ln -s ${PMU_CONF_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_CONF_NAME}.bin | ||
19 | fi | ||
20 | } | 16 | } |
diff --git a/meta-xilinx-bsp/recipes-bsp/u-boot/files/kc705-microblazeel.cfg b/meta-xilinx-bsp/recipes-bsp/u-boot/files/kc705-microblazeel.cfg deleted file mode 100644 index 8fb38950..00000000 --- a/meta-xilinx-bsp/recipes-bsp/u-boot/files/kc705-microblazeel.cfg +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
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 KC705 evaluation board | ||
18 | # | ||
19 | CONFIG_SYS_FLASH_PROTECTION=y | ||
20 | CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y | ||
21 | CONFIG_SYS_FLASH_CFI=y | ||
22 | CONFIG_FLASH_CFI_DRIVER=y | ||
23 | CONFIG_CMD_FLASH=y | ||
24 | CONFIG_CMD_IMLS=y | ||
25 | CONFIG_MTD_NOR_FLASH=y | ||
26 | CONFIG_MTD_DEVICE=y | ||
27 | # CONFIG_CMD_SPI is not set | ||
28 | # CONFIG_CMD_SF is not set | ||
29 | # CONFIG_SPI_FLASH is not set | ||
30 | # CONFIG_SPI_FLASH_BAR is not set | ||
31 | # CONFIG_DM_SPI_FLASH is not set | ||
32 | # CONFIG_DM_SPI is not set | ||
33 | # CONFIG_SPI_FLASH_SPANSION is not set | ||
34 | # CONFIG_SPI_FLASH_STMICRO is not set | ||
35 | # CONFIG_SPI_FLASH_WINBOND is not set | ||
36 | # CONFIG_SPI_FLASH_MACRONIX is not set | ||
37 | # CONFIG_SPI is not set | ||
38 | # CONFIG_SPI_FLASH_ISSI is not set | ||
39 | # CONFIG_XILINX_SPI is not set \ No newline at end of file | ||
diff --git a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend b/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend deleted file mode 100644 index 23b1eb50..00000000 --- a/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
2 | |||
3 | SRC_URI:append:kc705-microblazeel = " \ | ||
4 | file://kc705-microblazeel.cfg \ | ||
5 | " \ No newline at end of file | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx-dev.bbappend b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx-dev.bbappend deleted file mode 100644 index 5f4db309..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx-dev.bbappend +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | # MicroBlaze BSP fragments | ||
2 | KERNEL_FEATURES:append:kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" | ||
3 | |||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.cfg b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.cfg deleted file mode 100644 index 05452ce9..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.cfg +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | #........................................................................ | ||
4 | # WARNING | ||
5 | # | ||
6 | # This file is a kernel configuration fragment, and not a full kernel | ||
7 | # configuration file. The final kernel 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 kernel configuration, please | ||
12 | # refer the product documentation. | ||
13 | # | ||
14 | #........................................................................ | ||
15 | |||
16 | # | ||
17 | # Definitions for MICROBLAZE | ||
18 | # | ||
19 | CONFIG_XILINX_MICROBLAZE0_FAMILY="artix7" | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.scc b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.scc deleted file mode 100644 index 6d551461..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/ac701-microblazeel/ac701-microblazeel.scc +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | define KFEATURE_DESCRIPTION "Kernel Config for AC701 machine BSP" | ||
4 | define KFEATURE_COMPATIBILITY AC701 board | ||
5 | |||
6 | kconf hardware ac701-microblazeel.cfg | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.cfg b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.cfg deleted file mode 100644 index c25a48e1..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.cfg +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | #........................................................................ | ||
4 | # WARNING | ||
5 | # | ||
6 | # This file is a kernel configuration fragment, and not a full kernel | ||
7 | # configuration file. The final kernel 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 kernel configuration, please | ||
12 | # refer the product documentation. | ||
13 | # | ||
14 | #........................................................................ | ||
15 | |||
16 | # | ||
17 | # Definitions for MICROBLAZE | ||
18 | # | ||
19 | CONFIG_XILINX_MICROBLAZE0_FAMILY="virtexuplus" | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.scc b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.scc deleted file mode 100644 index 29261805..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx/linux-xlnx-bsp-kmeta/bsp/vcu118-microblazeel/vcu118-microblazeel.scc +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | |||
3 | define KFEATURE_DESCRIPTION "Kernel Config for VCU118 machine BSP" | ||
4 | define KFEATURE_COMPATIBILITY VCU118 board | ||
5 | |||
6 | kconf hardware vcu118-microblazeel.cfg | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_%.bbappend b/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_%.bbappend deleted file mode 100644 index 627f6661..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_%.bbappend +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | SRC_URI:append = " \ | ||
4 | file://linux-xlnx-bsp-kmeta;type=kmeta;name=linux-xlnx-bsp-kmeta;destsuffix=linux-xlnx-bsp-kmeta \ | ||
5 | " | ||
6 | |||
7 | # MicroBlaze BSP fragments | ||
8 | KERNEL_FEATURES:append:kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" | ||
9 | KERNEL_FEATURES:append:ac701-microblazeel = " bsp/ac701-microblazeel/ac701-microblazeel.scc" | ||
10 | KERNEL_FEATURES:append:vcu118-microblazeel = " bsp/vcu118-microblazeel/vcu118-microblazeel.scc" | ||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend b/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend deleted file mode 100644 index 0233531d..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-dev.bbappend +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | KMACHINE:s3adsp1800-qemu-microblazeeb = "qemumicroblazeeb" | ||
4 | |||
5 | # Default kernel config fragements for specific machines | ||
6 | KERNEL_FEATURES:append:kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" | ||
7 | |||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-tiny_%.bbappend b/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-tiny_%.bbappend deleted file mode 100644 index 0233531d..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto-tiny_%.bbappend +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | KMACHINE:s3adsp1800-qemu-microblazeeb = "qemumicroblazeeb" | ||
4 | |||
5 | # Default kernel config fragements for specific machines | ||
6 | KERNEL_FEATURES:append:kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" | ||
7 | |||
diff --git a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto_%.bbappend deleted file mode 100644 index 0233531d..00000000 --- a/meta-xilinx-bsp/recipes-kernel/linux/linux-yocto_%.bbappend +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | KMACHINE:s3adsp1800-qemu-microblazeeb = "qemumicroblazeeb" | ||
4 | |||
5 | # Default kernel config fragements for specific machines | ||
6 | KERNEL_FEATURES:append:kc705-microblazeel = " bsp/xilinx/kc705-microblazeel-features/kc705-microblazeel-features.scc" | ||
7 | |||
diff --git a/meta-xilinx-contrib/README.md b/meta-xilinx-contrib/README.md index 30dc3282..c3ccd68c 100644 --- a/meta-xilinx-contrib/README.md +++ b/meta-xilinx-contrib/README.md | |||
@@ -1,6 +1,6 @@ | |||
1 | # meta-xilinx-contrib | 1 | # meta-xilinx-contrib |
2 | 2 | ||
3 | This layer is a contribution layer enables AMD Xilinx MicroBlaze, Zynq, ZynqMP | 3 | This layer is a contribution layer enables AMD MicroBlaze, Zynq, ZynqMP |
4 | and Versal devices and provides related metadata. | 4 | and Versal devices and provides related metadata. |
5 | Any patches from open source contributors for vendor board can be added here. | 5 | Any patches from open source contributors for vendor board can be added here. |
6 | 6 | ||
@@ -10,7 +10,7 @@ The following boards are supported by the meta-xilinx-contrib layer: | |||
10 | 10 | ||
11 | | Devices | Vendor Board Variant | Machine Configuration file | HW Board Device tree | QEMU tested | HW tested | | 11 | | Devices | Vendor Board Variant | Machine Configuration file | HW Board Device tree | QEMU tested | HW tested | |
12 | |------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|----------------------|-------------|-----------| | 12 | |------------|----------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|----------------------|-------------|-----------| |
13 | | MicroBlaze | [Xilinx ML605 (QEMU)](https://www.digikey.com/en/products/detail/amd-xilinx/EK-V6-ML605-G/2175174) | [ml605-qemu-microblazeel](conf/machine/ml605-qemu-microblazeel.conf) | NA | No | NA | | 13 | | MicroBlaze | [AMD ML605 (QEMU)](https://www.digikey.com/en/products/detail/amd-xilinx/EK-V6-ML605-G/2175174) | [ml605-qemu-microblazeel](conf/machine/ml605-qemu-microblazeel.conf) | NA | No | NA | |
14 | | Zynq-7000 | NA | NA | NA | | | | 14 | | Zynq-7000 | NA | NA | NA | | | |
15 | | ZynqMP | NA | NA | NA | | | | 15 | | ZynqMP | NA | NA | NA | | | |
16 | | Versal | NA | NA | NA | | | | 16 | | Versal | NA | NA | NA | | | |
@@ -21,14 +21,18 @@ This layer depends on: | |||
21 | 21 | ||
22 | URI: https:///git.yoctoproject.org/poky | 22 | URI: https:///git.yoctoproject.org/poky |
23 | layers: meta, meta-poky | 23 | layers: meta, meta-poky |
24 | branch: langdale | 24 | branch: scarthgap |
25 | 25 | ||
26 | URI: https://git.openembedded.org/meta-openembedded | 26 | URI: https://git.openembedded.org/meta-openembedded |
27 | layers: meta-oe | 27 | layers: meta-oe |
28 | branch: langdale | 28 | branch: scarthgap |
29 | |||
30 | URI: https://git.yoctoproject.org/meta-arm | ||
31 | layers: meta-arm, meta-arm-toolchain | ||
32 | branch: scarthgap | ||
29 | 33 | ||
30 | URI: | 34 | URI: |
31 | https://git.yoctoproject.org/meta-xilinx (official version) | 35 | https://git.yoctoproject.org/meta-xilinx (official version) |
32 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 36 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
33 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-vendor | 37 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-vendor |
34 | branch: langdale or amd xilinx release version (e.g. rel-v2023.1) | 38 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend b/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend deleted file mode 100644 index 4653c93a..00000000 --- a/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | COMPATIBLE_MACHINE:zybo-linux-bd-zynq7 = "^$" | ||
2 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-dev.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 00000000..8b41f24a --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-dev.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-tiny_%.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-tiny_%.bbappend new file mode 100644 index 00000000..8b41f24a --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto-tiny_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..8b41f24a --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-yocto_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | # MicroBlaze KMACHINEs | ||
2 | KMACHINE:ml605-qemu-microblazeel = "qemumicroblazeel" | ||
3 | |||
diff --git a/meta-xilinx-core/README.md b/meta-xilinx-core/README.md index ec5b663b..945a76a7 100644 --- a/meta-xilinx-core/README.md +++ b/meta-xilinx-core/README.md | |||
@@ -10,11 +10,15 @@ This layer depends on: | |||
10 | 10 | ||
11 | URI: https://git.yoctoproject.org/poky | 11 | URI: https://git.yoctoproject.org/poky |
12 | layers: meta, meta-poky | 12 | layers: meta, meta-poky |
13 | branch: langdale | 13 | branch: scarthgap |
14 | 14 | ||
15 | URI: https://git.openembedded.org/meta-openembedded | 15 | URI: https://git.openembedded.org/meta-openembedded |
16 | layers: meta-oe | 16 | layers: meta-oe |
17 | branch: langdale | 17 | branch: scarthgap |
18 | |||
19 | URI: https://git.yoctoproject.org/meta-arm | ||
20 | layers: meta-arm, meta-arm-toolchain | ||
21 | branch: scarthgap | ||
18 | --- | 22 | --- |
19 | 23 | ||
20 | ## Configuring Machines | 24 | ## Configuring Machines |
@@ -36,13 +40,13 @@ Zynqmp-generic requires pmu-firmware. The firmware can be passed directly | |||
36 | as a path to a binary: PMU_FILE, you may use the generic built version | 40 | as a path to a binary: PMU_FILE, you may use the generic built version |
37 | by including meta-xilinx-standalone, the XSCT version by adding | 41 | by including meta-xilinx-standalone, the XSCT version by adding |
38 | meta-xilinx-tools or the DTB workflow version using | 42 | meta-xilinx-tools or the DTB workflow version using |
39 | meta-xilinx-standalone-experimental. | 43 | meta-xilinx-standalone-sdt. |
40 | 44 | ||
41 | Versal-generic requires both PLM and PSM firmware to be specified. They can | 45 | Versal-generic requires both PLM and PSM firmware to be specified. They can |
42 | be specified as a path to a binary using PLM_FILE and PSM_FILE. Or they can | 46 | be specified as a path to a binary using PLM_FILE and PSM_FILE. Or they can |
43 | be generated by including meta-xilinx-standalone, the XSCT version by adding | 47 | be generated by including meta-xilinx-standalone, the XSCT version by adding |
44 | meta-xilinx-tools or the DTB workflow version using | 48 | meta-xilinx-tools or the DTB workflow version using |
45 | meta-xilinx-standalone-experimental. Additionally some configurations may | 49 | meta-xilinx-standalone-sdt. Additionally some configurations may |
46 | require you to specify the path to a PDI file using PDI_PATH. The XSCT | 50 | require you to specify the path to a PDI file using PDI_PATH. The XSCT |
47 | version will extract the PDI automatically. | 51 | version will extract the PDI automatically. |
48 | --- | 52 | --- |
diff --git a/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass index ed4c1f87..5020b02b 100644 --- a/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass +++ b/meta-xilinx-core/classes-recipe/amd_spi_image.bbclass | |||
@@ -5,6 +5,8 @@ | |||
5 | # | 5 | # |
6 | 6 | ||
7 | QSPI_SIZE ?= "0x2280000" | 7 | QSPI_SIZE ?= "0x2280000" |
8 | QSPI_VERSION ?= "" | ||
9 | QSPI_IMAGE_VERSION ?= "" | ||
8 | 10 | ||
9 | # Register values | 11 | # Register values |
10 | IDN_REG ?= "0x4D554241" | 12 | IDN_REG ?= "0x4D554241" |
@@ -60,7 +62,7 @@ def generate_spi_image(d): | |||
60 | qspi_data.write(b'\xFF' * qspi_size) | 62 | qspi_data.write(b'\xFF' * qspi_size) |
61 | 63 | ||
62 | # Image Selector - Primary, Backup, Image A and Image B | 64 | # Image Selector - Primary, Backup, Image A and Image B |
63 | imgsel_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgsel-"+d.getVar("MACHINE")+".bin" | 65 | imgsel_file = d.getVar("DEPLOY_DIR_IMAGE")+"/image-selector-"+d.getVar("MACHINE")+".bin" |
64 | try: | 66 | try: |
65 | with open(imgsel_file, "rb") as il: | 67 | with open(imgsel_file, "rb") as il: |
66 | imgsel = il.read(-1) | 68 | imgsel = il.read(-1) |
@@ -103,7 +105,7 @@ def generate_spi_image(d): | |||
103 | qspi_data.write(bootbin) | 105 | qspi_data.write(bootbin) |
104 | 106 | ||
105 | # Recovery Image & Recovery Image Backup | 107 | # Recovery Image & Recovery Image Backup |
106 | imgrcry_file = d.getVar("DEPLOY_DIR_IMAGE")+"/imgrcry-"+d.getVar("MACHINE")+".bin" | 108 | imgrcry_file = d.getVar("DEPLOY_DIR_IMAGE")+"/image-recovery-"+d.getVar("MACHINE")+".bin" |
107 | try: | 109 | try: |
108 | with open(imgrcry_file, "rb") as iy: | 110 | with open(imgrcry_file, "rb") as iy: |
109 | imgrcry = iy.read(-1) | 111 | imgrcry = iy.read(-1) |
@@ -116,12 +118,8 @@ def generate_spi_image(d): | |||
116 | qspi_data.write(imgrcry) | 118 | qspi_data.write(imgrcry) |
117 | 119 | ||
118 | # Version string and checksum | 120 | # Version string and checksum |
119 | version = d.getVar("QSPI_IMAGE_VERSION") | 121 | version = d.getVar('QSPI_IMAGE_VERSION') |
120 | date = time.strftime("%m%d%H%M") | 122 | qspi_version = f"{version}\x00" |
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) | 123 | qspi_data.seek(version_offset) |
126 | qspi_data.write(qspi_version.encode()) | 124 | qspi_data.write(qspi_version.encode()) |
127 | 125 | ||
diff --git a/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass index 188d594b..d4a01048 100644 --- a/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass +++ b/meta-xilinx-core/classes-recipe/dfx_user_dts.bbclass | |||
@@ -255,8 +255,12 @@ do_install() { | |||
255 | # doesn't have any driver then user can load pdi/bit/bin file. | 255 | # doesn't have any driver then user can load pdi/bit/bin file. |
256 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then | 256 | if [ `ls ${S}/*.dtbo | wc -l` -eq 1 ]; then |
257 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 257 | install -Dm 0644 ${S}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
258 | elif [ `ls ${S}/${DTBO_PATH}/*.dtbo | wc -l` -eq 1 ]; then | ||
259 | install -Dm 0644 ${S}/${DTBO_PATH}/*.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
258 | elif [ `ls ${S}/*.dtbo | wc -l` -gt 1 ]; then | 260 | 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)" | 261 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/*.dtbo)" |
262 | elif [ `ls ${S}/${DTBO_PATH}/*.dtbo | wc -l` -gt 1 ]; then | ||
263 | bbfatal "Multiple DTBO found, use the right DTBO in SRC_URI from the following:\n$(basename -a ${S}/${DTBO_PATH}/*.dtbo)" | ||
260 | elif [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 264 | 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 | 265 | install -Dm 0644 ${B}/${USER_DTS_FILE}.dtbo ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.dtbo |
262 | else | 266 | else |
@@ -272,12 +276,20 @@ do_install() { | |||
272 | if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then | 276 | if [ "${SOC_FAMILY}" = "zynq" ] || [ "${SOC_FAMILY}" = "zynqmp" ]; then |
273 | if [ `ls ${S}/*.bit | wc -l` -gt 1 ]; then | 277 | 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)" | 278 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/*.bit)" |
279 | elif [ `ls ${S}/${BIT_PATH}/*.bit | wc -l` -gt 1 ]; then | ||
280 | bbfatal "Multiple .bit found, use the right .bit in SRC_URI from the following:\n$(basename -a ${S}/${BIT_PATH}/*.bit)" | ||
275 | elif [ `ls ${S}/*.bin | wc -l` -gt 1 ]; then | 281 | 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)" | 282 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/*.bin)" |
283 | elif [ `ls ${S}/${BIN_PATH}/*.bin | wc -l` -gt 1 ]; then | ||
284 | bbfatal "Multiple .bin found, use the right .bin in SRC_URI from the following:\n$(basename -a ${S}/${BIN_PATH}/*.bin)" | ||
277 | elif [ `ls ${S}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 285 | 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}/ | 286 | install -Dm 0644 ${S}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
287 | elif [ `ls ${S}/${BIT_PATH}/*.bit | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
288 | install -Dm 0644 ${S}/${BIT_PATH}/*.bit ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
279 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then | 289 | elif [ `ls ${S}/*.bin | wc -l` -eq 1 ]; then |
280 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | 290 | install -Dm 0644 ${S}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
291 | elif [ `ls ${S}/${BIN_PATH}/*.bin | wc -l` -eq 1 ]; then | ||
292 | install -Dm 0644 ${S}/${BIN_PATH}/*.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
281 | elif [ -f ${B}/${PN}.bin ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 293 | 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 | 294 | install -Dm 0644 ${B}/${PN}.bin ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.bin |
283 | else | 295 | else |
@@ -295,10 +307,16 @@ do_install() { | |||
295 | if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then | 307 | if [ "${SOC_FAMILY}" != "zynq" ] && [ "${SOC_FAMILY}" != "zynqmp" ]; then |
296 | if [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 308 | 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}/ | 309 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ |
310 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -eq 1 ] && [ ! -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
311 | install -Dm 0644 ${S}/${PDI_PATH}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/ | ||
298 | elif [ `ls ${S}/*.pdi | wc -l` -gt 1 ]; then | 312 | 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)" | 313 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/*.pdi)" |
314 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -gt 1 ]; then | ||
315 | bbfatal "Multiple PDI found, use the right PDI in SRC_URI from the following:\n$(basename -a ${S}/${PDI_PATH}/*.pdi)" | ||
300 | elif [ `ls ${S}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | 316 | 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 | 317 | install -Dm 0644 ${S}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi |
318 | elif [ `ls ${S}/${PDI_PATH}/*.pdi | wc -l` -eq 1 ] && [ -f ${B}/${USER_DTS_FILE}.dtbo ]; then | ||
319 | install -Dm 0644 ${S}/${PDI_PATH}/*.pdi ${D}/${nonarch_base_libdir}/firmware/xilinx/${PN}/${PN}.pdi | ||
302 | else | 320 | else |
303 | bbwarn "A PDI file with '.pdi' expected but not found" | 321 | bbwarn "A PDI file with '.pdi' expected but not found" |
304 | fi | 322 | fi |
diff --git a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass index a0ea1531..df7016d4 100644 --- a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass | |||
@@ -23,10 +23,26 @@ QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ | |||
23 | QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ | 23 | QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ |
24 | d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" | 24 | d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" |
25 | 25 | ||
26 | # https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings | ||
26 | # https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes | 27 | # https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes |
27 | # https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes | 28 | # https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes |
28 | QB_BOOT_MODE ?= "-boot mode=5" | 29 | QB_BOOT_MODE ?= "-boot mode=5" |
29 | 30 | ||
31 | |||
32 | # ZynqMP or Versal SD and eMMC drive index. | ||
33 | # Note: Do not set drive index based on boot mode some boards may have primary | ||
34 | # boot mode as QSPI/OSPI and secondary boot mode as SD/eMMC. | ||
35 | # | ||
36 | # SoC Device Drive Index | ||
37 | # Zynq-7000, ZynqMP, Versal SD0 0 | ||
38 | # ZynqMP, Versal SD1 1 | ||
39 | # ZynqMP, Versal eMMC0(secondary boot only) 2 | ||
40 | # ZynqMP, Versal eMMC1 3 | ||
41 | |||
42 | QB_SD_DRIVE_INDEX ?= "1" | ||
43 | QB_SD_DRIVE_INDEX:zynq ?= "0" | ||
44 | QB_SD_DRIVE_INDEX:versal-net ?= "0" | ||
45 | |||
30 | inherit qemuboot | 46 | inherit qemuboot |
31 | 47 | ||
32 | def qemu_target_binary(data): | 48 | def qemu_target_binary(data): |
@@ -78,6 +94,7 @@ def qemu_rootfs_params(data, param): | |||
78 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | 94 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" |
79 | soc_family = data.getVar('SOC_FAMILY') or "" | 95 | soc_family = data.getVar('SOC_FAMILY') or "" |
80 | tune_features = (data.getVar('TUNE_FEATURES') or []).split() | 96 | tune_features = (data.getVar('TUNE_FEATURES') or []).split() |
97 | sd_index = data.getVar('QB_SD_DRIVE_INDEX') or "" | ||
81 | if 'microblaze' in tune_features: | 98 | if 'microblaze' in tune_features: |
82 | soc_family = 'microblaze' | 99 | soc_family = 'microblaze' |
83 | 100 | ||
@@ -101,12 +118,6 @@ def qemu_rootfs_params(data, param): | |||
101 | return fstype_dict[soc_family] | 118 | return fstype_dict[soc_family] |
102 | 119 | ||
103 | elif param == 'rootfs-opt': | 120 | elif param == 'rootfs-opt': |
104 | sd_index = "1" | ||
105 | if soc_family == 'zynq': | ||
106 | sd_index = "0" | ||
107 | if soc_family == 'versal-net': | ||
108 | sd_index = "0" | ||
109 | |||
110 | # Device is using a disk | 121 | # Device is using a disk |
111 | if not initramfs_image: | 122 | if not initramfs_image: |
112 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) | 123 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) |
diff --git a/meta-xilinx-core/classes/xilinx-deprecated.bbclass b/meta-xilinx-core/classes/xilinx-deprecated.bbclass index 1aee2fe1..c7509feb 100644 --- a/meta-xilinx-core/classes/xilinx-deprecated.bbclass +++ b/meta-xilinx-core/classes/xilinx-deprecated.bbclass | |||
@@ -14,5 +14,6 @@ python xilinx_deprecated_config_eventhandler () { | |||
14 | if msg_source == "doc": | 14 | if msg_source == "doc": |
15 | continue | 15 | continue |
16 | msg = d.getVarFlag('XILINX_DEPRECATED', msg_source) or "" | 16 | msg = d.getVarFlag('XILINX_DEPRECATED', msg_source) or "" |
17 | bb.warn('%s: %s' % (msg_source, msg)) | 17 | if msg: |
18 | bb.warn('%s: %s' % (msg_source, msg)) | ||
18 | } | 19 | } |
diff --git a/meta-xilinx-core/classes/xilinx-vars.bbclass b/meta-xilinx-core/classes/xilinx-vars.bbclass index 51d3cd87..e19918ca 100644 --- a/meta-xilinx-core/classes/xilinx-vars.bbclass +++ b/meta-xilinx-core/classes/xilinx-vars.bbclass | |||
@@ -6,15 +6,6 @@ xilinx_variables_config_eventhandler[eventmask] = "bb.event.ConfigParsed" | |||
6 | # It's up to the base sytem to define the variables being used here, we're | 6 | # It's up to the base sytem to define the variables being used here, we're |
7 | # only going to check them. | 7 | # only going to check them. |
8 | python xilinx_variables_config_eventhandler () { | 8 | python xilinx_variables_config_eventhandler () { |
9 | # Verify HDF_MACHINE | ||
10 | hdf_prior = d.getVar('HDF_MACHINE_PRIOR') | ||
11 | hdf_final = d.getVar('HDF_MACHINE') | ||
12 | |||
13 | if hdf_prior and hdf_prior != hdf_final: | ||
14 | bb.fatal("HDF_MACHINE is set to %s, it appears you intended %s. " \ | ||
15 | "This is usually as a result of specifying it in the local.conf or before the 'require' in the machine .conf file. " \ | ||
16 | "See meta-xilinx-core/conf/machine/README." % (hdf_final, hdf_prior)) | ||
17 | |||
18 | # Verify DEFAULTTUNE | 9 | # Verify DEFAULTTUNE |
19 | tune_prior = d.getVar('DEFAULTTUNE_PRIOR') | 10 | tune_prior = d.getVar('DEFAULTTUNE_PRIOR') |
20 | tune_final = d.getVar('DEFAULTTUNE') | 11 | tune_final = d.getVar('DEFAULTTUNE') |
@@ -26,7 +17,7 @@ python xilinx_variables_config_eventhandler () { | |||
26 | 17 | ||
27 | # Verify 'xilinx' is in LICENSE_FLAGS_ACCEPTED | 18 | # Verify 'xilinx' is in LICENSE_FLAGS_ACCEPTED |
28 | license_flags = d.getVar('LICENSE_FLAGS_ACCEPTED') or "" | 19 | license_flags = d.getVar('LICENSE_FLAGS_ACCEPTED') or "" |
29 | if 'xilinx' not in license_flags.split(): | 20 | if all(license not in license_flags.split() for license in ['xilinx', 'xilinx_pmu-rom-native']) : |
30 | bb.warn("The ZynqMP pmu-rom is not enabled, qemu may not be able to emulate a ZynqMP system without it. " \ | 21 | bb.warn("The ZynqMP pmu-rom is not enabled, qemu may not be able to emulate a ZynqMP system without it. " \ |
31 | "To enable this you must add 'xilinx' to the LICENSE_FLAGS_ACCEPTED to indicate you accept the software license.") | 22 | "To enable this you must add 'xilinx' to the LICENSE_FLAGS_ACCEPTED to indicate you accept the software license.") |
32 | } | 23 | } |
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index 2aa0a1a1..399011a7 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -22,7 +22,7 @@ xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bb \ | |||
22 | xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bbappend \ | 22 | xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bbappend \ |
23 | " | 23 | " |
24 | 24 | ||
25 | LAYERDEPENDS_xilinx = "core" | 25 | LAYERDEPENDS_xilinx = "core meta-arm" |
26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" | 26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" |
27 | 27 | ||
28 | LAYERSERIES_COMPAT_xilinx = "scarthgap" | 28 | LAYERSERIES_COMPAT_xilinx = "scarthgap" |
@@ -42,7 +42,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | |||
42 | *->xserver-xorg \ | 42 | *->xserver-xorg \ |
43 | " | 43 | " |
44 | 44 | ||
45 | XILINX_RELEASE_VERSION ??= "v2024.1" | 45 | XILINX_RELEASE_VERSION ??= "v2024.2" |
46 | 46 | ||
47 | BUILDCFG_VARS:append = " XILINX_RELEASE_VERSION" | 47 | BUILDCFG_VARS:append = " XILINX_RELEASE_VERSION" |
48 | 48 | ||
@@ -55,13 +55,20 @@ XILINX_ATF_VERSION[v2022.2] = "2.6-xilinx-v2022.2%" | |||
55 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" | 55 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" |
56 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" | 56 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" |
57 | XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%" | 57 | XILINX_ATF_VERSION[v2024.1] = "2.10-xilinx-v2024.1%" |
58 | PREFERRED_VERSION_arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 58 | XILINX_ATF_VERSION[v2024.2] = "2.10-xilinx-v2024.2%" |
59 | PREFERRED_VERSION_virtual/arm-trusted-firmware ?= "${@d.getVarFlag('XILINX_ATF_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | ||
60 | |||
61 | # The name of the software has changed to match upstream ARM | ||
62 | XILINX_ATF_PROVIDERS[v2024.2] = "trusted-firmware-a" | ||
63 | PREFERRED_PROVIDER_virtual/arm-trusted-firmware = "${@d.getVarFlag('XILINX_ATF_PROVIDERS', d.getVar('XILINX_RELEASE_VERSION')) or 'arm-trusted-firmware'}" | ||
64 | |||
59 | 65 | ||
60 | XILINX_UBOOT_VERSION[v2022.1] = "1:2021.01-xilinx-v2022.1%" | 66 | XILINX_UBOOT_VERSION[v2022.1] = "1:2021.01-xilinx-v2022.1%" |
61 | XILINX_UBOOT_VERSION[v2022.2] = "1:2022.01-xilinx-v2022.2%" | 67 | XILINX_UBOOT_VERSION[v2022.2] = "1:2022.01-xilinx-v2022.2%" |
62 | XILINX_UBOOT_VERSION[v2023.1] = "1:2023.01-xilinx-v2023.1%" | 68 | XILINX_UBOOT_VERSION[v2023.1] = "1:2023.01-xilinx-v2023.1%" |
63 | XILINX_UBOOT_VERSION[v2023.2] = "1:2023.01-xilinx-v2023.2%" | 69 | XILINX_UBOOT_VERSION[v2023.2] = "1:2023.01-xilinx-v2023.2%" |
64 | XILINX_UBOOT_VERSION[v2024.1] = "1:2024.01-xilinx-v2024.1%" | 70 | XILINX_UBOOT_VERSION[v2024.1] = "1:2024.01-xilinx-v2024.1%" |
71 | XILINX_UBOOT_VERSION[v2024.2] = "1:2024.01-xilinx-v2024.2%" | ||
65 | 72 | ||
66 | 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'}" |
67 | 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'}" |
@@ -71,6 +78,7 @@ XILINX_LINUX_VERSION[v2022.2] = "5.15.36%" | |||
71 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30%" | 78 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30%" |
72 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60%" | 79 | XILINX_LINUX_VERSION[v2023.2] = "6.1.60%" |
73 | XILINX_LINUX_VERSION[v2024.1] = "6.6.10%" | 80 | XILINX_LINUX_VERSION[v2024.1] = "6.6.10%" |
81 | XILINX_LINUX_VERSION[v2024.2] = "6.6.40%" | ||
74 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 82 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
75 | 83 | ||
76 | # XRT/ZOCL | 84 | # XRT/ZOCL |
@@ -78,7 +86,8 @@ XRT_ZOCL_VERSION[v2022.1] = "202210.2.13.479" | |||
78 | XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0" | 86 | XRT_ZOCL_VERSION[v2022.2] = "202220.2.14.0" |
79 | XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" | 87 | XRT_ZOCL_VERSION[v2023.1] = "202310.2.15.0" |
80 | XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" | 88 | XRT_ZOCL_VERSION[v2023.2] = "202320.2.16.0" |
81 | XRT_ZOCL_VERSION[v2024.1] = "202410.2.17.0" | 89 | XRT_ZOCL_VERSION[v2024.1] = "202410.2.17.319" |
90 | XRT_ZOCL_VERSION[v2024.2] = "202420.2.18.0" | ||
82 | PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 91 | PREFERRED_VERSION_xrt ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
83 | PREFERRED_VERSION_zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 92 | PREFERRED_VERSION_zocl ?= "${@d.getVarFlag('XRT_ZOCL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
84 | 93 | ||
@@ -88,6 +97,7 @@ AIEFAL_VERSION[v2022.2] = "1.4" | |||
88 | AIEFAL_VERSION[v2023.1] = "1.5" | 97 | AIEFAL_VERSION[v2023.1] = "1.5" |
89 | AIEFAL_VERSION[v2023.2] = "1.5" | 98 | AIEFAL_VERSION[v2023.2] = "1.5" |
90 | AIEFAL_VERSION[v2024.1] = "1.6" | 99 | AIEFAL_VERSION[v2024.1] = "1.6" |
100 | AIEFAL_VERSION[v2024.2] = "1.7" | ||
91 | PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 101 | PREFERRED_VERSION_aiefal ?= "${@d.getVarFlag('AIEFAL_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
92 | 102 | ||
93 | AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3" | 103 | AI_ENGINE_DRIVER_VERSION[v2022.1] = "3.3" |
@@ -95,6 +105,7 @@ AI_ENGINE_DRIVER_VERSION[v2022.2] = "3.3" | |||
95 | AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" | 105 | AI_ENGINE_DRIVER_VERSION[v2023.1] = "3.4" |
96 | AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" | 106 | AI_ENGINE_DRIVER_VERSION[v2023.2] = "3.4" |
97 | AI_ENGINE_DRIVER_VERSION[v2024.1] = "3.5" | 107 | AI_ENGINE_DRIVER_VERSION[v2024.1] = "3.5" |
108 | AI_ENGINE_DRIVER_VERSION[v2024.2] = "3.6" | ||
98 | PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 109 | PREFERRED_VERSION_ai-engine-driver ?= "${@d.getVarFlag('AI_ENGINE_DRIVER_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
99 | 110 | ||
100 | # Add support to eSDK for gen-machine-conf if it exists | 111 | # Add support to eSDK for gen-machine-conf if it exists |
diff --git a/meta-xilinx-core/conf/machine/README b/meta-xilinx-core/conf/machine/README index f664a2f0..5db8fa8f 100644 --- a/meta-xilinx-core/conf/machine/README +++ b/meta-xilinx-core/conf/machine/README | |||
@@ -44,7 +44,6 @@ MACHINEOVERRIDES =. "${@['', 'my-example:']['my-example' != '${MACHINE}']}" | |||
44 | 44 | ||
45 | require conf/machine/zynqmp-generic.conf | 45 | require conf/machine/zynqmp-generic.conf |
46 | 46 | ||
47 | HDF_MACHINE = "zcu102-zynqmp" | ||
48 | MACHINE_FEATURES += "pci" | 47 | MACHINE_FEATURES += "pci" |
49 | 48 | ||
50 | #### No additional settings should be after the Postamble | 49 | #### No additional settings should be after the Postamble |
@@ -67,7 +66,6 @@ DEFAULTTUNE ?= "aarch64" | |||
67 | 66 | ||
68 | require conf/machine/zynqmp-generic.conf | 67 | require conf/machine/zynqmp-generic.conf |
69 | 68 | ||
70 | HDF_MACHINE = "zcu102-zynqmp" | ||
71 | MACHINE_FEATURES += "pci" | 69 | MACHINE_FEATURES += "pci" |
72 | 70 | ||
73 | #### No additional settings should be after the Postamble | 71 | #### No additional settings should be after the Postamble |
@@ -88,7 +86,6 @@ TUNE_FEATURES:tune-microblaze ?= "microblaze v8.50 barrel-shift reorder pattern- | |||
88 | 86 | ||
89 | require conf/machine/microblaze-generic.conf | 87 | require conf/machine/microblaze-generic.conf |
90 | 88 | ||
91 | HDF_MACHINE = "ml605" | ||
92 | SERIAL_CONSOLE = "115200,ttyUL0" | 89 | SERIAL_CONSOLE = "115200,ttyUL0" |
93 | 90 | ||
94 | #### No additional settings should be after the Postamble | 91 | #### No additional settings should be after the Postamble |
@@ -149,12 +146,17 @@ local.conf | |||
149 | System wide setting: | 146 | System wide setting: |
150 | TUNE_FEATURES:tune-<tune> - Specific tune features | 147 | TUNE_FEATURES:tune-<tune> - Specific tune features |
151 | 148 | ||
149 | XILINX_WITH_ESW = "xsct" or "sdt" - Specify xsct or sdt workflow | ||
150 | |||
152 | external-hdf recipe from meta-xilinx-tools: | 151 | external-hdf recipe from meta-xilinx-tools: |
153 | HDF_MACHINE - Machine to load from reference defign xsa using hdf-examples recipe | 152 | XILINX_XSCT_VERSION - Version of the XSCT tool and associated ESW software |
154 | HDF_EXT - Only ".xsa" externsion is supported, legacy variable. | 153 | HDF_URI - URL for the .xsa file |
155 | HDF_BASE - Download protocol (file://, git://, http:// or https://) protocol if | 154 | HDF_URI[sha256sum] - sha256sum of the .xsa |
156 | not using the default external-hdf repository. | 155 | |
157 | HDF_PATH - Path to the repository or XSA file | 156 | sdt-artifacts recipe from meta-xilinx-standalone-sdt: |
157 | SDT_URI - URI for the system device tree artifacts (usually a tarball) | ||
158 | SDT_URI[sha256sum] - sha256sum of the SDT artifacts file | ||
159 | SDT_URI[S] - the 'S' (source) directory where the artifacts are extracted | ||
158 | 160 | ||
159 | fs-boot recipe from meta-xilinx-tools: | 161 | fs-boot recipe from meta-xilinx-tools: |
160 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot - YAML based uart stdin configuration for | 162 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot - YAML based uart stdin configuration for |
@@ -208,15 +210,3 @@ HAS_PLATFORM_INIT - List of defconfig files available for u-boot only for SPL bo | |||
208 | u-boot-xlnx-scr recipe from meta-xilinx-core: | 210 | u-boot-xlnx-scr recipe from meta-xilinx-core: |
209 | DDR_BASEADDR - Base address for DDR used for loading the images from u-boot env. | 211 | DDR_BASEADDR - Base address for DDR used for loading the images from u-boot env. |
210 | SKIP_APPEND_BASEADDR - Skip appending ${DDR_BASEADDR} for image offsets. | 212 | SKIP_APPEND_BASEADDR - Skip appending ${DDR_BASEADDR} for image offsets. |
211 | |||
212 | Varibable set after required inclusion file: | ||
213 | Varibables that does not intend to change must be set before required inclusion | ||
214 | file. | ||
215 | |||
216 | external-hdf recipe from meta-xilinx-tools: | ||
217 | HDF_MACHINE - Used by the recipe to find the correct XSA | ||
218 | HDF_EXT - only xsa is supported, legacy variable | ||
219 | HDF_BASE - protocol if not using the default external-hdf repository | ||
220 | HDF_PATH - path to the repository or XSA file | ||
221 | |||
222 | ...and more... | ||
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc index 904b4861..cf890a51 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc | |||
@@ -1,5 +1,3 @@ | |||
1 | # HDF_MACHINE should be set _AFTER_ this has been loaded | ||
2 | HDF_MACHINE_PRIOR := "${HDF_MACHINE}" | ||
3 | INHERIT += "xilinx-vars" | 1 | INHERIT += "xilinx-vars" |
4 | INHERIT += "xilinx-deprecated" | 2 | INHERIT += "xilinx-deprecated" |
5 | 3 | ||
@@ -14,7 +12,7 @@ IMAGE_FSTYPES ?= "tar.gz cpio cpio.gz cpio.gz.u-boot" | |||
14 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" | 12 | PREFERRED_PROVIDER_virtual/kernel ??= "linux-xlnx" |
15 | 13 | ||
16 | # Device tree Configuration | 14 | # Device tree Configuration |
17 | PREFERRED_PROVIDER_virtual/dtb ??= "device-tree" | 15 | PREFERRED_PROVIDER_virtual/dtb ??= "${@'device-tree' if d.getVar('XILINX_WITH_ESW') else ''}" |
18 | 16 | ||
19 | # U-Boot Configuration | 17 | # U-Boot Configuration |
20 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" | 18 | PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-xlnx" |
@@ -27,8 +25,6 @@ PREFERRED_PROVIDER_nativesdk-u-boot-tools ??= "nativesdk-u-boot-tools-xlnx" | |||
27 | PREFERRED_PROVIDER_libmetal ?= "libmetal-xlnx" | 25 | PREFERRED_PROVIDER_libmetal ?= "libmetal-xlnx" |
28 | PREFERRED_PROVIDER_open-amp ?= "open-amp-xlnx" | 26 | PREFERRED_PROVIDER_open-amp ?= "open-amp-xlnx" |
29 | 27 | ||
30 | do_image_wic[depends] += "${@' '.join('%s:do_deploy' % r for r in (d.getVar('WIC_DEPENDS') or "").split())}" | ||
31 | |||
32 | UBOOT_SUFFIX ?= "bin" | 28 | UBOOT_SUFFIX ?= "bin" |
33 | 29 | ||
34 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" | 30 | UBOOT_BINARY ?= "u-boot.${UBOOT_SUFFIX}" |
@@ -61,12 +57,9 @@ WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.bi | |||
61 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' virtual/dtb', '', d)}" | 57 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' virtual/dtb', '', d)}" |
62 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" | 58 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" |
63 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" | 59 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" |
64 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'atf-uboot.ub', ' arm-trusted-firmware', '', d)}" | ||
65 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' virtual/kernel', '', d)}" | 60 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' virtual/kernel', '', d)}" |
66 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' virtual/kernel', '', d)}" | 61 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' virtual/kernel', '', d)}" |
67 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' virtual/kernel', '', d)}" | 62 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' virtual/kernel', '', d)}" |
68 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.bin', ' virtual/bootloader', '', d)}" | ||
69 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.elf', ' virtual/bootloader', '', d)}" | ||
70 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', '${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot', ' ${INITRAMFS_IMAGE}', '', d)}" | 63 | WKS_FILE_DEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', '${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot', ' ${INITRAMFS_IMAGE}', '', d)}" |
71 | 64 | ||
72 | # Automatically add IMAGE_BOOT_FILES to /boot via packages | 65 | # Automatically add IMAGE_BOOT_FILES to /boot via packages |
@@ -74,9 +67,6 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INST | |||
74 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' ${PREFERRED_PROVIDER_virtual/dtb}', '', d)}" | 67 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'system.dtb', ' ${PREFERRED_PROVIDER_virtual/dtb}', '', d)}" |
75 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" | 68 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'boot.scr', ' u-boot-xlnx-scr', '', d)}" |
76 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" | 69 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uEnv.txt', ' u-boot-xlnx-uenv', '', d)}" |
77 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'atf-uboot.ub', ' arm-trusted-firmware', '', d)}" | ||
78 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.bin', ' ${PREFERRED_PROVIDER_virtual/bootloader}-bin', '', d)}" | ||
79 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'u-boot.elf', ' ${PREFERRED_PROVIDER_virtual/bootloader}-elf', '', d)}" | ||
80 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' kernel-image-image', '', d)}" | 70 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'Image', ' kernel-image-image', '', d)}" |
81 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' kernel-image-uimage', '', d)}" | 71 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'uImage', ' kernel-image-uimage', '', d)}" |
82 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' kernel-image-zimage', '', d)}" | 72 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS .= "${@bb.utils.contains('IMAGE_BOOT_FILES_INSTALLED', 'zImage', ' kernel-image-zimage', '', d)}" |
@@ -90,6 +80,17 @@ IMAGE_BOOT_FILES ?= "${@get_default_image_boot_files(d)}" | |||
90 | def get_default_image_boot_files(d): | 80 | def get_default_image_boot_files(d): |
91 | files = [] | 81 | files = [] |
92 | 82 | ||
83 | esw_type = d.getVar('XILINX_WITH_ESW') or '' | ||
84 | if esw_type: | ||
85 | if 'zynq' in d.getVar('OVERRIDES').split(':'): | ||
86 | files.append('boot.bin') | ||
87 | if 'zynqmp' in d.getVar('OVERRIDES').split(':'): | ||
88 | files.append('boot.bin') | ||
89 | if 'versal' in d.getVar('OVERRIDES').split(':'): | ||
90 | files.append('boot.bin') | ||
91 | if 'versal-net' in d.getVar('OVERRIDES').split(':'): | ||
92 | files.append('boot.bin') | ||
93 | |||
93 | # kernel images | 94 | # kernel images |
94 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) | 95 | kerneltypes = set((d.getVar("KERNEL_IMAGETYPE") or "").split()) |
95 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) | 96 | kerneltypes |= set((d.getVar("KERNEL_IMAGETYPES") or "").split()) |
@@ -103,6 +104,7 @@ def get_default_image_boot_files(d): | |||
103 | 104 | ||
104 | # device trees (device-tree only), these are first as they are likely desired over the kernel ones | 105 | # device trees (device-tree only), these are first as they are likely desired over the kernel ones |
105 | if "device-tree" in (d.getVar("PREFERRED_PROVIDER_virtual/dtb") or ""): | 106 | if "device-tree" in (d.getVar("PREFERRED_PROVIDER_virtual/dtb") or ""): |
107 | files.append("system.dtb") | ||
106 | files.append("devicetree/*.dtb;devicetree/") | 108 | files.append("devicetree/*.dtb;devicetree/") |
107 | files.append("devicetree/*.dtbo;devicetree/") | 109 | files.append("devicetree/*.dtbo;devicetree/") |
108 | 110 | ||
@@ -115,6 +117,34 @@ def get_default_image_boot_files(d): | |||
115 | 117 | ||
116 | return " ".join(files) | 118 | return " ".join(files) |
117 | 119 | ||
120 | EXTRA_IMAGEDEPENDS += "${@get_default_extra_imagedepends(d)}" | ||
121 | |||
122 | def get_default_extra_imagedepends(d): | ||
123 | depends = [] | ||
124 | |||
125 | # Add firmware dependencies | ||
126 | esw_type = d.getVar('XILINX_WITH_ESW') or '' | ||
127 | if esw_type: | ||
128 | depends.append('libyaml-native') | ||
129 | depends.append('python3-cython-native') | ||
130 | depends.append('python3-pyyaml-native') | ||
131 | if 'microblaze' in d.getVar('OVERRIDES').split(':'): | ||
132 | depends.append('virtual/bitstream') | ||
133 | if 'zynq' in d.getVar('OVERRIDES').split(':'): | ||
134 | depends.append('virtual/boot-bin') | ||
135 | if 'zynqmp' in d.getVar('OVERRIDES').split(':'): | ||
136 | depends.append('virtual/boot-bin') | ||
137 | if 'versal' in d.getVar('OVERRIDES').split(':'): | ||
138 | depends.append('virtual/boot-bin') | ||
139 | depends.append('virtual/cdo') | ||
140 | if 'versal-net' in d.getVar('OVERRIDES').split(':'): | ||
141 | depends.append('virtual/boot-bin') | ||
142 | depends.append('virtual/cdo') | ||
143 | |||
144 | return " ".join(depends) | ||
145 | |||
146 | |||
147 | |||
118 | XSERVER_EXT ?= "" | 148 | XSERVER_EXT ?= "" |
119 | 149 | ||
120 | FPGA_MNGR_RECONFIG_ENABLE ?= "1" | 150 | FPGA_MNGR_RECONFIG_ENABLE ?= "1" |
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc index c450b542..e75f556b 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc | |||
@@ -9,7 +9,7 @@ PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" | |||
9 | MACHINEOVERRIDES =. "qemuboot-xilinx:" | 9 | MACHINEOVERRIDES =. "qemuboot-xilinx:" |
10 | 10 | ||
11 | # depend on qemu-helper-native, which will depend on QEMU | 11 | # depend on qemu-helper-native, which will depend on QEMU |
12 | EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" | 12 | EXTRA_IMAGEDEPENDS += "qemu-devicetrees-native qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" |
13 | 13 | ||
14 | # Use the xilinx specific version for these users | 14 | # Use the xilinx specific version for these users |
15 | IMAGE_CLASSES += "qemuboot-xilinx" | 15 | IMAGE_CLASSES += "qemuboot-xilinx" |
@@ -21,5 +21,5 @@ IMAGE_CLASSES += "qemuboot-xilinx" | |||
21 | # QB_XILINX_SERIAL that will allow us to define serial ports for qemu | 21 | # QB_XILINX_SERIAL that will allow us to define serial ports for qemu |
22 | # emulated boards that may not match the standard Linux behavior. | 22 | # emulated boards that may not match the standard Linux behavior. |
23 | # | 23 | # |
24 | QB_XILINX_SERIAL ?= "" | 24 | QB_XILINX_SERIAL ??= "" |
25 | QB_OPT_APPEND += "${QB_XILINX_SERIAL}" | 25 | QB_OPT_APPEND += "${QB_XILINX_SERIAL} -nodefaults" |
diff --git a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc index b3216426..197a998d 100644 --- a/meta-xilinx-core/conf/machine/include/soc-tune-include.inc +++ b/meta-xilinx-core/conf/machine/include/soc-tune-include.inc | |||
@@ -7,6 +7,7 @@ TUNEFILE[cortexr5hf] = "conf/machine/include/arm/armv7r/tune-cortexr5.inc" | |||
7 | TUNEFILE[cortexr52] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" | 7 | TUNEFILE[cortexr52] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" |
8 | TUNEFILE[cortexr52hf] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" | 8 | TUNEFILE[cortexr52hf] = "conf/machine/include/arm/armv8r/tune-cortexr52.inc" |
9 | TUNEFILE[cortexa9thf-neon] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" | 9 | TUNEFILE[cortexa9thf-neon] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" |
10 | TUNEFILE[cortexa9] = "conf/machine/include/arm/armv7a/tune-cortexa9.inc" | ||
10 | TUNEFILE[armv8a] = "conf/machine/include/arm/arch-armv8a.inc" | 11 | TUNEFILE[armv8a] = "conf/machine/include/arm/arch-armv8a.inc" |
11 | TUNEFILE[cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa53.inc" | 12 | TUNEFILE[cortexa53] = "conf/machine/include/arm/armv8a/tune-cortexa53.inc" |
12 | TUNEFILE[cortexa72] = "conf/machine/include/arm/armv8a/tune-cortexa72.inc" | 13 | TUNEFILE[cortexa72] = "conf/machine/include/arm/armv8a/tune-cortexa72.inc" |
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal-net.inc b/meta-xilinx-core/conf/machine/include/soc-versal-net.inc index b59bdacc..f7898e0d 100644 --- a/meta-xilinx-core/conf/machine/include/soc-versal-net.inc +++ b/meta-xilinx-core/conf/machine/include/soc-versal-net.inc | |||
@@ -7,8 +7,6 @@ require soc-tune-include.inc | |||
7 | # Linux Configuration | 7 | # Linux Configuration |
8 | KERNEL_IMAGETYPE ?= "Image" | 8 | KERNEL_IMAGETYPE ?= "Image" |
9 | 9 | ||
10 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | ||
11 | |||
12 | UBOOT_ELF ?= "u-boot.elf" | 10 | UBOOT_ELF ?= "u-boot.elf" |
13 | 11 | ||
14 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | 12 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version |
diff --git a/meta-xilinx-core/conf/machine/include/soc-versal.inc b/meta-xilinx-core/conf/machine/include/soc-versal.inc index daa129af..1fcb412a 100644 --- a/meta-xilinx-core/conf/machine/include/soc-versal.inc +++ b/meta-xilinx-core/conf/machine/include/soc-versal.inc | |||
@@ -15,8 +15,6 @@ require soc-tune-include.inc | |||
15 | # Linux Configuration | 15 | # Linux Configuration |
16 | KERNEL_IMAGETYPE ?= "Image" | 16 | KERNEL_IMAGETYPE ?= "Image" |
17 | 17 | ||
18 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | ||
19 | |||
20 | UBOOT_ELF ?= "u-boot.elf" | 18 | UBOOT_ELF ?= "u-boot.elf" |
21 | 19 | ||
22 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version | 20 | # Default, if multiconfig is off, call plm/psm-firmware directly, otherwise call the versal-fw multiconfig version |
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynq.inc b/meta-xilinx-core/conf/machine/include/soc-zynq.inc index e456a31f..587a0d5a 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynq.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynq.inc | |||
@@ -8,15 +8,4 @@ require soc-tune-include.inc | |||
8 | KERNEL_IMAGETYPE ?= "uImage" | 8 | KERNEL_IMAGETYPE ?= "uImage" |
9 | KERNEL_IMAGETYPES += "zImage" | 9 | KERNEL_IMAGETYPES += "zImage" |
10 | 10 | ||
11 | # WIC Specific dependencies | ||
12 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin" | ||
13 | |||
14 | UBOOT_ELF ?= "u-boot.elf" | 11 | UBOOT_ELF ?= "u-boot.elf" |
15 | |||
16 | # Default, if multiconfig is off, the fsbl is in the regular deploydir, otherwise | ||
17 | # it is located under a multiconfig specific deploydir | ||
18 | FSBL_DEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '', 'fsbl-firmware:do_deploy', d)}" | ||
19 | FSBL_MCDEPENDS ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', 'mc::fsbl-fw:fsbl-firmware:do_deploy', '', d)}" | ||
20 | FSBL_DEPLOY_DIR ?= "${@bb.utils.contains('BBMULTICONFIG', 'fsbl-fw', '${TOPDIR}/tmp-fsbl-fw/deploy/images/${MACHINE}', '${DEPLOY_DIR_IMAGE}', d)}" | ||
21 | FSBL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
22 | FSBL_IMAGE_NAME ?= "fsbl-${MACHINE}" | ||
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc index a9c3ad73..aee5c19c 100644 --- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc +++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc | |||
@@ -16,8 +16,6 @@ KERNEL_IMAGETYPE ?= "Image" | |||
16 | # Support multilib on zynqmp | 16 | # Support multilib on zynqmp |
17 | DEFAULTTUNE:virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" | 17 | DEFAULTTUNE:virtclass-multilib-lib32 ?= "armv7vethf-neon-vfpv4" |
18 | 18 | ||
19 | WIC_DEPENDS ?= "virtual/kernel virtual/bootloader virtual/boot-bin virtual/arm-trusted-firmware" | ||
20 | |||
21 | UBOOT_SUFFIX ?= "bin" | 19 | UBOOT_SUFFIX ?= "bin" |
22 | 20 | ||
23 | XSERVER_EXT:zynqmp ?= "xf86-video-armsoc" | 21 | XSERVER_EXT:zynqmp ?= "xf86-video-armsoc" |
diff --git a/meta-xilinx-core/conf/machine/microblaze-generic.conf b/meta-xilinx-core/conf/machine/microblaze-generic.conf index 8fb40070..39059511 100644 --- a/meta-xilinx-core/conf/machine/microblaze-generic.conf +++ b/meta-xilinx-core/conf/machine/microblaze-generic.conf | |||
@@ -2,11 +2,6 @@ | |||
2 | #@NAME: microblaze-generic | 2 | #@NAME: microblaze-generic |
3 | #@DESCRIPTION: Machine configuration for the microblaze-generic devices | 3 | #@DESCRIPTION: Machine configuration for the microblaze-generic devices |
4 | 4 | ||
5 | # Deprecated board config | ||
6 | USE_BOARD = "${@"conf/machine/include/xilinx-board-pre.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | ||
7 | require ${USE_BOARD} | ||
8 | unset USE_BOARD | ||
9 | |||
10 | #### Preamble | 5 | #### Preamble |
11 | MACHINEOVERRIDES =. "${@['', 'microblaze-generic:']['microblaze-generic' != '${MACHINE}']}" | 6 | MACHINEOVERRIDES =. "${@['', 'microblaze-generic:']['microblaze-generic' != '${MACHINE}']}" |
12 | #### Regular settings follow | 7 | #### Regular settings follow |
@@ -19,21 +14,6 @@ DEFAULTTUNE ?= "microblaze" | |||
19 | # defined before calling the required inclusion file else pre-expansion value | 14 | # defined before calling the required inclusion file else pre-expansion value |
20 | # defined in local.conf without machine override will not be reflected. | 15 | # defined in local.conf without machine override will not be reflected. |
21 | 16 | ||
22 | # Yocto Microblaze device-tree variables | ||
23 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "axi_uartlite_0" | ||
24 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "DDR4_0" | ||
25 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
26 | DTC_FLAGS:pn-device-tree ?= "" | ||
27 | XSCTH_PROC:pn-device-tree ?= "microblaze_0" | ||
28 | YAML_DT_BOARD_FLAGS ?= "{BOARD kcu105}" | ||
29 | |||
30 | # Yocto Microblaze FS-Boot variables | ||
31 | YAML_SERIAL_CONSOLE_STDIN:pn-fs-boot ?= "axi_uartlite_0" | ||
32 | YAML_SERIAL_CONSOLE_STDOUT:pn-fs-boot ?= "axi_uartlite_0" | ||
33 | YAML_MAIN_MEMORY_CONFIG:pn-fs-boot ?= "DDR4_0" | ||
34 | YAML_FLASH_MEMORY_CONFIG:pn-fs-boot ?= "axi_quad_spi_0" | ||
35 | XSCTH_PROC:pn-fs-boot ?= "microblaze_0" | ||
36 | |||
37 | # Yocto Microblaze u-boot-xlnx variables | 17 | # Yocto Microblaze u-boot-xlnx variables |
38 | UBOOT_MACHINE ?= "microblaze-generic_defconfig" | 18 | UBOOT_MACHINE ?= "microblaze-generic_defconfig" |
39 | UBOOT_INITIAL_ENV = "" | 19 | UBOOT_INITIAL_ENV = "" |
@@ -46,7 +26,6 @@ KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}" | |||
46 | 26 | ||
47 | # Microblaze Serial Console settings | 27 | # Microblaze Serial Console settings |
48 | SERIAL_CONSOLES ?= "115200;ttyUL0" | 28 | SERIAL_CONSOLES ?= "115200;ttyUL0" |
49 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
50 | 29 | ||
51 | require conf/machine/include/soc-tune-include.inc | 30 | require conf/machine/include/soc-tune-include.inc |
52 | require conf/machine/include/machine-xilinx-default.inc | 31 | require conf/machine/include/machine-xilinx-default.inc |
@@ -60,27 +39,12 @@ MB_MACHINE_ARCH = "${@[d.getVar('TUNE_PKGARCH'), d.getVar('TUNE_PKGARCH') + '-ge | |||
60 | 39 | ||
61 | MACHINE_ARCH = "${@['${MB_MACHINE_ARCH}', '${DEF_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" | 40 | MACHINE_ARCH = "${@['${MB_MACHINE_ARCH}', '${DEF_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" |
62 | 41 | ||
63 | # microblaze-generic.conf uses kcu105-microblazeel xsa as reference input. | ||
64 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
65 | # local.conf. | ||
66 | HDF_MACHINE = "kcu105-microblazeel" | ||
67 | |||
68 | MACHINE_FEATURES = "" | 42 | MACHINE_FEATURES = "" |
69 | 43 | ||
70 | KERNEL_IMAGETYPE ?= "linux.bin.ub" | 44 | KERNEL_IMAGETYPE ?= "linux.bin.ub" |
71 | KERNEL_IMAGETYPES = "" | 45 | KERNEL_IMAGETYPES = "" |
72 | 46 | ||
73 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
74 | |||
75 | IMAGE_BOOT_FILES += " \ | ||
76 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
77 | " | ||
78 | |||
79 | EXTRA_IMAGEDEPENDS += " \ | 47 | EXTRA_IMAGEDEPENDS += " \ |
80 | libyaml-native \ | ||
81 | python3-cython-native \ | ||
82 | python3-pyyaml-native \ | ||
83 | virtual/bitstream \ | ||
84 | virtual/bootloader \ | 48 | virtual/bootloader \ |
85 | virtual/elfrealloc \ | 49 | virtual/elfrealloc \ |
86 | u-boot-xlnx-scr \ | 50 | u-boot-xlnx-scr \ |
@@ -89,9 +53,9 @@ EXTRA_IMAGEDEPENDS += " \ | |||
89 | IMAGE_FSTYPES += "cpio.gz" | 53 | IMAGE_FSTYPES += "cpio.gz" |
90 | 54 | ||
91 | # Microblaze QEMU Configurations | 55 | # Microblaze QEMU Configurations |
92 | QB_MEM = "-m 2G" | 56 | QB_MEM ?= "-m 2G" |
93 | QB_KERNEL_CMDLINE_APPEND = "console=ttyUL0,115200 root=/dev/ram0 rw" | 57 | QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" |
94 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 58 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" |
95 | 59 | ||
96 | # This will work with the default runqemu, as the first serial port is the | 60 | # This will work with the default runqemu, as the first serial port is the |
97 | # correct console | 61 | # correct console |
@@ -99,13 +63,8 @@ QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | |||
99 | # One total serial port defined in this model (according to the generated dts) | 63 | # One total serial port defined in this model (according to the generated dts) |
100 | # | 64 | # |
101 | # hw serial0 axi_uartlite_0 (40600000) - linux serial0 (ttyUL0) | 65 | # hw serial0 axi_uartlite_0 (40600000) - linux serial0 (ttyUL0) |
102 | QB_XILINX_SERIAL = "" | 66 | QB_XILINX_SERIAL ?= "" |
103 | 67 | ||
104 | #### No additional settings should be after the Postamble | 68 | #### No additional settings should be after the Postamble |
105 | #### Postamble | 69 | #### Postamble |
106 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${MB_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" | 70 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ${MB_MACHINE_ARCH}']['microblaze-generic' != "${MACHINE}"]}" |
107 | |||
108 | # Deprecated board config | ||
109 | USE_BOARD = "${@"conf/machine/include/xilinx-board-post.inc" if d.getVar("BOARD") or d.getVar("BOARD_VARIANT") else ""}" | ||
110 | require ${USE_BOARD} | ||
111 | unset USE_BOARD | ||
diff --git a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf index 2b4f94d2..0d7f3223 100644 --- a/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-ai-edge-generic.conf | |||
@@ -8,9 +8,9 @@ MACHINE_FEATURES += "aie vdu" | |||
8 | 8 | ||
9 | # VEK280 board has 12GB memory only but default versal-generic has QB_MEM set to | 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. | 10 | # 8G, Hence we need set 12G in QB_MEM. |
11 | QB_MEM = "-m 12G" | 11 | QB_MEM ?= "-m 12G" |
12 | 12 | ||
13 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb" | 13 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vek280.dtb" |
14 | 14 | ||
15 | #### No additional settings should be after the Postamble | 15 | #### No additional settings should be after the Postamble |
16 | #### Postamble | 16 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-common.conf b/meta-xilinx-core/conf/machine/versal-common.conf new file mode 100644 index 00000000..bc530d63 --- /dev/null +++ b/meta-xilinx-core/conf/machine/versal-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: versal-common | ||
3 | #@DESCRIPTION: Machine configuration for a common Versal filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'versal-common:']['versal-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa72" | ||
10 | |||
11 | require conf/machine/versal-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "aie vdu" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_common']['versal-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf index 3ae4b800..9aa47892 100644 --- a/meta-xilinx-core/conf/machine/versal-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-generic.conf | |||
@@ -10,12 +10,6 @@ MACHINEOVERRIDES =. "${@['', 'versal-generic:']['versal-generic' != '${MACHINE}' | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto Versal device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
15 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
16 | DTC_FLAGS:pn-device-tree = "-@" | ||
17 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-vck190-reva-x-ebm-01-reva}" | ||
18 | |||
19 | # Yocto Versal u-boot-xlnx variables | 13 | # Yocto Versal u-boot-xlnx variables |
20 | UBOOT_MACHINE ?= "xilinx_versal_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_versal_virt_defconfig" |
21 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
@@ -23,68 +17,44 @@ BOOTMODE ?= "generic.root" | |||
23 | # Yocto Versal arm-trusted-firmware(TF-A) variables | 17 | # Yocto Versal arm-trusted-firmware(TF-A) variables |
24 | TFA_BL33_LOAD ?= "0x8000000" | 18 | TFA_BL33_LOAD ?= "0x8000000" |
25 | 19 | ||
26 | # Yocto Versal PLM variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "CIPS_0_pspmc_0_psv_sbsauart_0" | ||
29 | |||
30 | # Yocto Versal KERNEL Variables | 20 | # Yocto Versal KERNEL Variables |
31 | UBOOT_ENTRYPOINT ?= "0x200000" | 21 | UBOOT_ENTRYPOINT ?= "0x200000" |
32 | UBOOT_LOADADDRESS ?= "0x200000" | 22 | UBOOT_LOADADDRESS ?= "0x200000" |
33 | 23 | ||
34 | # Versal Serial Console | 24 | # Versal Serial Console |
35 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | 25 | SERIAL_CONSOLES ?= "115200;ttyAMA0" |
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | 26 | ||
38 | require conf/machine/include/soc-versal.inc | 27 | require conf/machine/include/soc-versal.inc |
39 | require conf/machine/include/machine-xilinx-default.inc | 28 | require conf/machine/include/machine-xilinx-default.inc |
40 | require conf/machine/include/machine-xilinx-qemu.inc | 29 | require conf/machine/include/machine-xilinx-qemu.inc |
41 | 30 | ||
42 | # versal-generic.conf uses vck190-versal xsa as reference input. | ||
43 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
44 | # local.conf. | ||
45 | HDF_MACHINE = "vck190-versal" | ||
46 | |||
47 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" | 31 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" |
48 | 32 | ||
49 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
50 | |||
51 | # Default SD image build onfiguration, use qemu-sd to pad | 33 | # Default SD image build onfiguration, use qemu-sd to pad |
52 | IMAGE_CLASSES += "image-types-xilinx-qemu" | 34 | IMAGE_CLASSES += "image-types-xilinx-qemu" |
53 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 35 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
54 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" | 36 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" |
55 | 37 | ||
56 | EXTRA_IMAGEDEPENDS += " \ | 38 | EXTRA_IMAGEDEPENDS += " \ |
57 | libyaml-native \ | ||
58 | python3-cython-native \ | ||
59 | python3-pyyaml-native \ | ||
60 | arm-trusted-firmware \ | ||
61 | virtual/boot-bin \ | ||
62 | virtual/bootloader \ | ||
63 | virtual/psm-firmware \ | ||
64 | virtual/plm \ | ||
65 | u-boot-xlnx-scr \ | 39 | u-boot-xlnx-scr \ |
66 | qemu-devicetrees:do_deploy \ | ||
67 | virtual/cdo:do_deploy \ | ||
68 | " | 40 | " |
69 | 41 | ||
70 | IMAGE_BOOT_FILES += " \ | 42 | IMAGE_BOOT_FILES += " \ |
71 | boot.bin \ | ||
72 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
73 | Image \ | 43 | Image \ |
74 | boot.scr \ | 44 | boot.scr \ |
75 | " | 45 | " |
76 | 46 | ||
77 | # Versal QEMU Configurations | 47 | # Versal QEMU Configurations |
78 | # This machine has a QEMU model, runqemu setup: | 48 | # This machine has a QEMU model, runqemu setup: |
79 | QB_MEM = "-m 8G" | 49 | QB_MEM ?= "-m 8G" |
80 | QB_DEFAULT_KERNEL = "none" | 50 | QB_DEFAULT_KERNEL ?= "none" |
81 | # Iteration appears to be eth0 then eth1 | 51 | # Iteration appears to be eth0 then eth1 |
82 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@ -net nic" | 52 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@ -net nic" |
83 | QB_KERNEL_CMDLINE_APPEND ?= "" | 53 | QB_KERNEL_CMDLINE_APPEND ?= "" |
84 | 54 | ||
85 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 55 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
86 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" | 56 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" |
87 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | 57 | QEMU_HW_DTB_PMC ?= "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" |
88 | 58 | ||
89 | # Four total serial ports defined in this model (according to the dts) | 59 | # Four total serial ports defined in this model (according to the dts) |
90 | # | 60 | # |
@@ -93,7 +63,7 @@ QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | |||
93 | # hw serial2 pl011 (ff000000) - linux serial0 (ttyAMA0) | 63 | # hw serial2 pl011 (ff000000) - linux serial0 (ttyAMA0) |
94 | # hw serial3 pl011 (ff010000) - linux serial1 (ttyAMA1) (disabled) | 64 | # hw serial3 pl011 (ff010000) - linux serial1 (ttyAMA1) (disabled) |
95 | # ? dcc ? - linux serial2 (????) | 65 | # ? dcc ? - linux serial2 (????) |
96 | QB_XILINX_SERIAL = "-serial null -serial null -serial mon:stdio -serial null" | 66 | QB_XILINX_SERIAL ?= "-serial null -serial null -serial mon:stdio -serial null" |
97 | 67 | ||
98 | QB_OSPI_FILE ??= "" | 68 | QB_OSPI_FILE ??= "" |
99 | 69 | ||
@@ -119,7 +89,7 @@ QB_FW_FILES = " \ | |||
119 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ | 89 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ |
120 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ | 90 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ |
121 | " | 91 | " |
122 | QB_PLM_OPT += "${@'' if d.getVar('QB_OSPI_FILE') else d.getVar('QB_FW_FILES')}" | 92 | QB_PLM_OPT += "${@d.getVar('QB_FW_FILES') if d.getVar('QB_OSPI_FILE') == '' else ''}" |
123 | 93 | ||
124 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" | 94 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" |
125 | 95 | ||
diff --git a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf index 9fef78f3..805df7fc 100644 --- a/meta-xilinx-core/conf/machine/versal-hbm-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-hbm-generic.conf | |||
@@ -6,9 +6,9 @@ require conf/machine/versal-generic.conf | |||
6 | 6 | ||
7 | # VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G, | 7 | # VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G, |
8 | # Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM | 8 | # Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM |
9 | QB_MEM = "-m 32G" | 9 | QB_MEM ?= "-m 32G" |
10 | 10 | ||
11 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb" | 11 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb" |
12 | 12 | ||
13 | #### No additional settings should be after the Postamble | 13 | #### No additional settings should be after the Postamble |
14 | #### Postamble | 14 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/versal-net-common.conf b/meta-xilinx-core/conf/machine/versal-net-common.conf new file mode 100644 index 00000000..efde0bbb --- /dev/null +++ b/meta-xilinx-core/conf/machine/versal-net-common.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: versal-net-common | ||
3 | #@DESCRIPTION: Machine configuration for a common versal-net filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'versal-net-common:']['versal-net-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa78" | ||
10 | |||
11 | require conf/machine/versal-net-generic.conf | ||
12 | |||
13 | #### No additional settings should be after the Postamble | ||
14 | #### Postamble | ||
15 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' versal_net_common']['versal-net-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf index d6524510..b26fb5e1 100644 --- a/meta-xilinx-core/conf/machine/versal-net-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf | |||
@@ -10,12 +10,6 @@ MACHINEOVERRIDES =. "${@['', 'versal-net-generic:']['versal-net-generic' != '${M | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto Versal device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | ||
15 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
16 | DTC_FLAGS:pn-device-tree = "-@" | ||
17 | YAML_DT_BOARD_FLAGS ?= "{BOARD versal-net-ipp-rev1.9}" | ||
18 | |||
19 | # Yocto Versal u-boot-xlnx variables | 13 | # Yocto Versal u-boot-xlnx variables |
20 | UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_versal_net_virt_defconfig" |
21 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
@@ -23,68 +17,44 @@ BOOTMODE ?= "generic.root" | |||
23 | # Yocto Versal arm-trusted-firmware(TF-A) variables | 17 | # Yocto Versal arm-trusted-firmware(TF-A) variables |
24 | TFA_BL33_LOAD ?= "0x8000000" | 18 | TFA_BL33_LOAD ?= "0x8000000" |
25 | 19 | ||
26 | # Yocto Versal PLM variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-plm-firmware ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-plm-firmware ?= "psx_wizard_0_psxl_0_psx_sbsauart_0" | ||
29 | |||
30 | # Yocto Versal KERNEL Variables | 20 | # Yocto Versal KERNEL Variables |
31 | UBOOT_ENTRYPOINT ?= "0x200000" | 21 | UBOOT_ENTRYPOINT ?= "0x200000" |
32 | UBOOT_LOADADDRESS ?= "0x200000" | 22 | UBOOT_LOADADDRESS ?= "0x200000" |
33 | 23 | ||
34 | # Versal Serial Console | 24 | # Versal Serial Console |
35 | SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1" | 25 | SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;ttyAMA1" |
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
37 | 26 | ||
38 | require conf/machine/include/soc-versal-net.inc | 27 | require conf/machine/include/soc-versal-net.inc |
39 | require conf/machine/include/machine-xilinx-default.inc | 28 | require conf/machine/include/machine-xilinx-default.inc |
40 | require conf/machine/include/machine-xilinx-qemu.inc | 29 | require conf/machine/include/machine-xilinx-qemu.inc |
41 | 30 | ||
42 | # versal-net-generic.conf uses a qemu only xsa as reference input. | ||
43 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
44 | # local.conf. | ||
45 | HDF_MACHINE = "versal-net-generic" | ||
46 | |||
47 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" | 31 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost" |
48 | 32 | ||
49 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
50 | |||
51 | # Default SD image build onfiguration, use qemu-sd to pad | 33 | # Default SD image build onfiguration, use qemu-sd to pad |
52 | IMAGE_CLASSES += "image-types-xilinx-qemu" | 34 | IMAGE_CLASSES += "image-types-xilinx-qemu" |
53 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 35 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
54 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" | 36 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot.qemu-sd-fatimg'}" |
55 | 37 | ||
56 | EXTRA_IMAGEDEPENDS += " \ | 38 | EXTRA_IMAGEDEPENDS += " \ |
57 | libyaml-native \ | ||
58 | python3-cython-native \ | ||
59 | python3-pyyaml-native \ | ||
60 | arm-trusted-firmware \ | ||
61 | virtual/boot-bin \ | ||
62 | virtual/bootloader \ | ||
63 | virtual/psm-firmware \ | ||
64 | virtual/plm \ | ||
65 | u-boot-xlnx-scr \ | 39 | u-boot-xlnx-scr \ |
66 | qemu-devicetrees:do_deploy \ | ||
67 | virtual/cdo:do_deploy \ | ||
68 | " | 40 | " |
69 | 41 | ||
70 | IMAGE_BOOT_FILES += " \ | 42 | IMAGE_BOOT_FILES += " \ |
71 | boot.bin \ | ||
72 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
73 | Image \ | 43 | Image \ |
74 | boot.scr \ | 44 | boot.scr \ |
75 | " | 45 | " |
76 | 46 | ||
77 | # Versal QEMU Configurations | 47 | # Versal QEMU Configurations |
78 | # This machine has a QEMU model, runqemu setup: | 48 | # This machine has a QEMU model, runqemu setup: |
79 | QB_MEM = "-m 8G" | 49 | QB_MEM ?= "-m 8G" |
80 | QB_DEFAULT_KERNEL = "none" | 50 | QB_DEFAULT_KERNEL ?= "none" |
81 | # Iteration appears to be eth0 then eth1 | 51 | # Iteration appears to be eth0 then eth1 |
82 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@ -net nic" | 52 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@ -net nic" |
83 | QB_KERNEL_CMDLINE_APPEND ?= "" | 53 | QB_KERNEL_CMDLINE_APPEND ?= "" |
84 | 54 | ||
85 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 55 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
86 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-net-psx-spp-1.4.dtb" | 56 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/board-versal-net-psx-spp-1.4.dtb" |
87 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" | 57 | QEMU_HW_DTB_PMC ?= "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" |
88 | 58 | ||
89 | # Four total serial ports defined in this model (according to the dts) | 59 | # Four total serial ports defined in this model (according to the dts) |
90 | # | 60 | # |
@@ -92,7 +62,7 @@ QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmx-virt.dtb" | |||
92 | # hw serial1 xps-uartlite (0xf0310000) - | 62 | # hw serial1 xps-uartlite (0xf0310000) - |
93 | # hw serial2 pl011 (0xf1920000) - linux serial0 (ttyAMA0) | 63 | # hw serial2 pl011 (0xf1920000) - linux serial0 (ttyAMA0) |
94 | # hw serial3 pl011 (0xf1930000) - linux serial1 (ttyAMA1) | 64 | # hw serial3 pl011 (0xf1930000) - linux serial1 (ttyAMA1) |
95 | QB_XILINX_SERIAL = "-serial null -serial null -serial mon:stdio -serial null" | 65 | QB_XILINX_SERIAL ?= "-serial null -serial null -serial mon:stdio -serial null" |
96 | 66 | ||
97 | QB_OSPI_FILE ??= "" | 67 | QB_OSPI_FILE ??= "" |
98 | 68 | ||
@@ -114,11 +84,11 @@ QB_PLM_OPT = " \ | |||
114 | " | 84 | " |
115 | 85 | ||
116 | QB_FW_FILES = " \ | 86 | QB_FW_FILES = " \ |
117 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw \ | 87 | -device loader,file=${DEPLOY_DIR_IMAGE}/BOOT-${MACHINE}_bh.bin,addr=0xF201E000,force-raw=on \ |
118 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw \ | 88 | -device loader,file=${DEPLOY_DIR_IMAGE}/CDO/pmc_cdo.bin,addr=0xf2000000,force-raw=on \ |
119 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ | 89 | -device loader,file=${DEPLOY_DIR_IMAGE}/plm-${MACHINE}.elf,cpu-num=1 \ |
120 | " | 90 | " |
121 | QB_PLM_OPT += "${@'' if d.getVar('QB_OSPI_FILE') else d.getVar('QB_FW_FILES')}" | 91 | QB_PLM_OPT += "${@d.getVar('QB_FW_FILES') if d.getVar('QB_OSPI_FILE') == '' else ''}" |
122 | 92 | ||
123 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" | 93 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" |
124 | 94 | ||
diff --git a/meta-xilinx-core/conf/machine/zynq-common.conf b/meta-xilinx-core/conf/machine/zynq-common.conf new file mode 100644 index 00000000..f54b6e5b --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynq-common.conf | |||
@@ -0,0 +1,15 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynq-common | ||
3 | #@DESCRIPTION: Machine configuration for a common Zynq7 filesystem devices | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynq-common:']['zynq-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa9thf-neon" | ||
10 | |||
11 | require conf/machine/zynq-generic.conf | ||
12 | |||
13 | #### No additional settings should be after the Postamble | ||
14 | #### Postamble | ||
15 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynq_common']['zynq-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf index 3dea2012..8442e4e3 100644 --- a/meta-xilinx-core/conf/machine/zynq-generic.conf +++ b/meta-xilinx-core/conf/machine/zynq-generic.conf | |||
@@ -10,21 +10,10 @@ MACHINEOVERRIDES =. "${@['', 'zynq-generic:']['zynq-generic' != '${MACHINE}']}" | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto Zynq-7000 device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0" | ||
16 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
17 | DTC_FLAGS:pn-device-tree = "-@" | ||
18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zc702}" | ||
19 | |||
20 | # Yocto Zynq-7000 u-boot-xlnx variables | 13 | # Yocto Zynq-7000 u-boot-xlnx variables |
21 | UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig" |
22 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
23 | 16 | ||
24 | # Yocto Zynq-7000 FSBL variables | ||
25 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1" | ||
26 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1" | ||
27 | |||
28 | # Yocto KERNEL Variables | 17 | # Yocto KERNEL Variables |
29 | UBOOT_ENTRYPOINT ?= "0x200000" | 18 | UBOOT_ENTRYPOINT ?= "0x200000" |
30 | UBOOT_LOADADDRESS ?= "0x200000" | 19 | UBOOT_LOADADDRESS ?= "0x200000" |
@@ -32,34 +21,18 @@ KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}" | |||
32 | 21 | ||
33 | # Zynq-7000 Serial Console settings | 22 | # Zynq-7000 Serial Console settings |
34 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 23 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
35 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
36 | 24 | ||
37 | require conf/machine/include/soc-zynq.inc | 25 | require conf/machine/include/soc-zynq.inc |
38 | require conf/machine/include/machine-xilinx-default.inc | 26 | require conf/machine/include/machine-xilinx-default.inc |
39 | require conf/machine/include/machine-xilinx-qemu.inc | 27 | require conf/machine/include/machine-xilinx-qemu.inc |
40 | 28 | ||
41 | # zynq-generic.conf uses zc702-zynq7 xsa as reference input. | ||
42 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
43 | # local.conf. | ||
44 | HDF_MACHINE = "zc702-zynq7" | ||
45 | |||
46 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" | 29 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget" |
47 | 30 | ||
48 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
49 | |||
50 | EXTRA_IMAGEDEPENDS += " \ | 31 | EXTRA_IMAGEDEPENDS += " \ |
51 | libyaml-native \ | ||
52 | python3-cython-native \ | ||
53 | python3-pyyaml-native \ | ||
54 | virtual/fsbl \ | ||
55 | virtual/boot-bin \ | ||
56 | virtual/bootloader \ | ||
57 | u-boot-xlnx-scr \ | 32 | u-boot-xlnx-scr \ |
58 | " | 33 | " |
59 | 34 | ||
60 | IMAGE_BOOT_FILES += " \ | 35 | IMAGE_BOOT_FILES += " \ |
61 | boot.bin \ | ||
62 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
63 | boot.scr \ | 36 | boot.scr \ |
64 | uImage \ | 37 | uImage \ |
65 | " | 38 | " |
@@ -70,10 +43,10 @@ IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' | |||
70 | 43 | ||
71 | # Zynq-7000 QEMU Configurations | 44 | # Zynq-7000 QEMU Configurations |
72 | # This machine has a QEMU model, runqemu setup: | 45 | # This machine has a QEMU model, runqemu setup: |
73 | QB_MEM = "-m 1024" | 46 | QB_MEM ?= "-m 1024" |
74 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 47 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" |
75 | 48 | ||
76 | QB_KERNEL_ROOT = "/dev/mmcblk0p2" | 49 | QB_KERNEL_ROOT ?= "/dev/mmcblk0p2" |
77 | 50 | ||
78 | # Side effect of not-enabled serial port is we have to lock | 51 | # Side effect of not-enabled serial port is we have to lock |
79 | # the second (console) to mon:stdio. | 52 | # the second (console) to mon:stdio. |
@@ -82,7 +55,7 @@ QB_KERNEL_ROOT = "/dev/mmcblk0p2" | |||
82 | # | 55 | # |
83 | # hw uart0 xuartps (e0000000) - | 56 | # hw uart0 xuartps (e0000000) - |
84 | # hw uart1 xuartps (e0001000) - linux serial0 (ttyPS0) | 57 | # hw uart1 xuartps (e0001000) - linux serial0 (ttyPS0) |
85 | QB_XILINX_SERIAL = "-serial null -serial mon:stdio" | 58 | QB_XILINX_SERIAL ?= "-serial null -serial mon:stdio" |
86 | 59 | ||
87 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) | 60 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) |
88 | QB_OPT_APPEND += " \ | 61 | QB_OPT_APPEND += " \ |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-common.conf b/meta-xilinx-core/conf/machine/zynqmp-common.conf new file mode 100644 index 00000000..e2e112f9 --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynqmp-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynqmp-common | ||
3 | #@DESCRIPTION: Machine configuration for a common ZynqMP (MPSOC) filesystem devices w/o mali400 | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynqmp-common:']['zynqmp-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa53" | ||
10 | |||
11 | require conf/machine/zynqmp-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "vcu rfsoc" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_common']['zynqmp-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf index b5a2f832..15a48102 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf | |||
@@ -10,13 +10,6 @@ MACHINEOVERRIDES =. "${@['', 'zynqmp-generic:']['zynqmp-generic' != '${MACHINE}' | |||
10 | # defined before calling the required inclusion file else pre-expansion value | 10 | # defined before calling the required inclusion file else pre-expansion value |
11 | # defined in local.conf without machine override will not be reflected. | 11 | # defined in local.conf without machine override will not be reflected. |
12 | 12 | ||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | DT_PADDING_SIZE:pn-device-tree ?= "0x1000" | ||
17 | DTC_FLAGS:pn-device-tree = "-@" | ||
18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu102-rev1.0}" | ||
19 | |||
20 | # Yocto ZynqMP u-boot-xlnx variables | 13 | # Yocto ZynqMP u-boot-xlnx variables |
21 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" | 14 | UBOOT_MACHINE ?= "xilinx_zynqmp_virt_defconfig" |
22 | BOOTMODE ?= "generic.root" | 15 | BOOTMODE ?= "generic.root" |
@@ -30,31 +23,17 @@ SPL_BINARY ?= "" | |||
30 | # Yocto ZynqMP arm-trusted-firmware(TF-A) variables | 23 | # Yocto ZynqMP arm-trusted-firmware(TF-A) variables |
31 | TFA_BL33_LOAD ?= "0x8000000" | 24 | TFA_BL33_LOAD ?= "0x8000000" |
32 | 25 | ||
33 | # Yocto ZynqMP PMUFW variables | ||
34 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_0" | ||
35 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_0" | ||
36 | |||
37 | # Yocto ZynqMP FSBL variables | ||
38 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_0" | ||
39 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | ||
40 | |||
41 | # Yocto ZynqMP KERNEL Variables | 26 | # Yocto ZynqMP KERNEL Variables |
42 | UBOOT_ENTRYPOINT ?= "0x200000" | 27 | UBOOT_ENTRYPOINT ?= "0x200000" |
43 | UBOOT_LOADADDRESS ?= "0x200000" | 28 | UBOOT_LOADADDRESS ?= "0x200000" |
44 | 29 | ||
45 | # ZynqMP Serial Console | 30 | # ZynqMP Serial Console |
46 | SERIAL_CONSOLES ?= "115200;ttyPS0 115200;ttyPS1" | 31 | SERIAL_CONSOLES ?= "115200;ttyPS0 115200;ttyPS1" |
47 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
48 | 32 | ||
49 | require conf/machine/include/soc-zynqmp.inc | 33 | require conf/machine/include/soc-zynqmp.inc |
50 | require conf/machine/include/machine-xilinx-default.inc | 34 | require conf/machine/include/machine-xilinx-default.inc |
51 | require conf/machine/include/machine-xilinx-qemu.inc | 35 | require conf/machine/include/machine-xilinx-qemu.inc |
52 | 36 | ||
53 | # zynqmp-generic.conf uses zcu102-zynqmp xsa as reference input. | ||
54 | # User can override with custom xsa using HDF_BASE and HDF_PATH variables from | ||
55 | # local.conf. | ||
56 | HDF_MACHINE = "zcu102-zynqmp" | ||
57 | |||
58 | # Machine features must result in a superset | 37 | # Machine features must result in a superset |
59 | # Basic features: | 38 | # Basic features: |
60 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" | 39 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" |
@@ -64,40 +43,28 @@ IMAGE_CLASSES += "image-types-xilinx-qemu" | |||
64 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 43 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
65 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" | 44 | IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz.u-boot'}" |
66 | 45 | ||
67 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}" | ||
68 | |||
69 | EXTRA_IMAGEDEPENDS += " \ | 46 | EXTRA_IMAGEDEPENDS += " \ |
70 | libyaml-native \ | ||
71 | python3-cython-native \ | ||
72 | python3-pyyaml-native \ | ||
73 | virtual/fsbl \ | ||
74 | virtual/pmu-firmware \ | ||
75 | arm-trusted-firmware \ | ||
76 | virtual/boot-bin \ | ||
77 | virtual/bootloader \ | 47 | virtual/bootloader \ |
78 | qemu-devicetrees:do_deploy \ | ||
79 | u-boot-xlnx-uenv \ | 48 | u-boot-xlnx-uenv \ |
80 | u-boot-xlnx-scr \ | 49 | u-boot-xlnx-scr \ |
81 | " | 50 | " |
82 | 51 | ||
83 | IMAGE_BOOT_FILES += " \ | 52 | IMAGE_BOOT_FILES += " \ |
84 | boot.bin \ | ||
85 | ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \ | ||
86 | boot.scr \ | 53 | boot.scr \ |
87 | Image \ | 54 | Image \ |
88 | " | 55 | " |
89 | 56 | ||
90 | # ZynqMP QEMU Configurations | 57 | # ZynqMP QEMU Configurations |
91 | # This machine has a QEMU model, runqemu setup: | 58 | # This machine has a QEMU model, runqemu setup: |
92 | QB_MEM = "-m 4096" | 59 | QB_MEM ?= "-m 4096" |
93 | # Iteration appears to be eth3, eth2, eth1, eth0 | 60 | # Iteration appears to be eth3, eth2, eth1, eth0 |
94 | QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" | 61 | QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" |
95 | 62 | ||
96 | # Set variables for QEMU DTB PATH, PS DTB and PMU DTB for zynqmp_generic, this | 63 | # Set variables for QEMU DTB PATH, PS DTB and PMU DTB for zynqmp_generic, this |
97 | # allows user to use different QEMU HW DTB to match their board. | 64 | # allows user to use different QEMU HW DTB to match their board. |
98 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 65 | QEMU_HW_DTB_PATH ?= "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
99 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/zcu102-arm.dtb" | 66 | QEMU_HW_DTB_PS ?= "${QEMU_HW_DTB_PATH}/zcu102-arm.dtb" |
100 | QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb" | 67 | QEMU_HW_DTB_PMU ?= "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb" |
101 | 68 | ||
102 | # Two total serial ports defined in this model (according to the dts) | 69 | # Two total serial ports defined in this model (according to the dts) |
103 | # | 70 | # |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf b/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf new file mode 100644 index 00000000..7b5dc68c --- /dev/null +++ b/meta-xilinx-core/conf/machine/zynqmp-mali-common.conf | |||
@@ -0,0 +1,17 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: zynqmp-mali-common | ||
3 | #@DESCRIPTION: Machine configuration for a common ZynqMP (MPSOC) filesystem devices w/ mali400 | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'zynqmp-mali-common:']['zynqmp-mali-common' != '${MACHINE}']}" | ||
7 | #### Regular settings follow | ||
8 | |||
9 | DEFAULTTUNE = "cortexa53" | ||
10 | |||
11 | require conf/machine/zynqmp-generic.conf | ||
12 | |||
13 | MACHINE_FEATURES += "mali400 vcu" | ||
14 | |||
15 | #### No additional settings should be after the Postamble | ||
16 | #### Postamble | ||
17 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynqmp_mali_common']['zynqmp-mali-common' != "${MACHINE}"]}" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend index 7dcee565..7d374291 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/device-tree.bbappend | |||
@@ -3,19 +3,19 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | |||
3 | # openamp.dtsi is in the WORKDIR | 3 | # openamp.dtsi is in the WORKDIR |
4 | DT_INCLUDE:append = " ${WORKDIR}" | 4 | DT_INCLUDE:append = " ${WORKDIR}" |
5 | 5 | ||
6 | do_configure[vardeps] += "ENABLE_OPENAMP_DTSI OPENAMP_EXTRA_OVERLAYS" | 6 | do_configure[vardeps] += "ENABLE_OPENAMP_DTSI OPENAMP_EXTRA_DT_INCLUDE_FILES" |
7 | 7 | ||
8 | OPENAMP_EXTRA_OVERLAYS:zynq = "zynq-openamp.dtsi" | 8 | OPENAMP_EXTRA_DT_INCLUDE_FILES ?= "" |
9 | OPENAMP_EXTRA_OVERLAYS:zynqmp = "zynqmp-openamp.dtsi" | 9 | OPENAMP_EXTRA_DT_INCLUDE_FILES:zynqmp = "zynqmp-openamp.dtsi" |
10 | OPENAMP_EXTRA_OVERLAYS:versal = "versal-openamp.dtsi" | 10 | OPENAMP_EXTRA_DT_INCLUDE_FILES:versal = "versal-openamp.dtsi" |
11 | OPENAMP_EXTRA_OVERLAYS:versal-net = "versal-net-openamp.dtsi" | 11 | OPENAMP_EXTRA_DT_INCLUDE_FILES:versal-net = "versal-net-openamp.dtsi" |
12 | 12 | ||
13 | def set_openamp_extra_overlays(d): | 13 | def set_openamp_extra_dt_include_files(d): |
14 | distro_features = d.getVar('DISTRO_FEATURES', True) | 14 | distro_features = d.getVar('DISTRO_FEATURES', True) |
15 | enable_openamp_dtsi = d.getVar('ENABLE_OPENAMP_DTSI') | 15 | enable_openamp_dtsi = d.getVar('ENABLE_OPENAMP_DTSI') |
16 | if 'openamp' in distro_features and enable_openamp_dtsi == '1': | 16 | if 'openamp' in distro_features and enable_openamp_dtsi == '1': |
17 | return ' ${OPENAMP_EXTRA_OVERLAYS}' | 17 | return ' ${OPENAMP_EXTRA_DT_INCLUDE_FILES}' |
18 | else: | 18 | else: |
19 | return '' | 19 | return '' |
20 | 20 | ||
21 | EXTRA_OVERLAYS:append = "${@set_openamp_extra_overlays(d)}" | 21 | EXTRA_DT_INCLUDE_FILES:append = "${@set_openamp_extra_dt_include_files(d)}" |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi index a918faf2..a1c939eb 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-net-openamp.dtsi | |||
@@ -53,7 +53,7 @@ | |||
53 | reg = <0x0 0xeba00000 0x0 0x10000>; | 53 | reg = <0x0 0xeba00000 0x0 0x10000>; |
54 | status = "okay"; | 54 | status = "okay"; |
55 | compatible = "mmio-sram"; | 55 | compatible = "mmio-sram"; |
56 | power-domain = <&versal_net_firmware 0x183180cb>; | 56 | power-domains = <&versal_net_firmware 0x183180cb>; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | tcm_0b: tcm_0b@eba10000 { | 59 | tcm_0b: tcm_0b@eba10000 { |
@@ -61,7 +61,7 @@ | |||
61 | reg = <0x0 0xeba10000 0x0 0x8000>; | 61 | reg = <0x0 0xeba10000 0x0 0x8000>; |
62 | status = "okay"; | 62 | status = "okay"; |
63 | compatible = "mmio-sram"; | 63 | compatible = "mmio-sram"; |
64 | power-domain = <&versal_net_firmware 0x183180cc>; | 64 | power-domains = <&versal_net_firmware 0x183180cc>; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | tcm_0c: tcm_0b@eba20000 { | 67 | tcm_0c: tcm_0b@eba20000 { |
@@ -69,7 +69,7 @@ | |||
69 | reg = <0x0 0xeba20000 0x0 0x8000>; | 69 | reg = <0x0 0xeba20000 0x0 0x8000>; |
70 | status = "okay"; | 70 | status = "okay"; |
71 | compatible = "mmio-sram"; | 71 | compatible = "mmio-sram"; |
72 | power-domain = <&versal_net_firmware 0x183180cd>; | 72 | power-domains = <&versal_net_firmware 0x183180cd>; |
73 | }; | 73 | }; |
74 | 74 | ||
75 | tcm_1a: tcm_0a@eba40000 { | 75 | tcm_1a: tcm_0a@eba40000 { |
@@ -77,7 +77,7 @@ | |||
77 | reg = <0x0 0xeba40000 0x0 0x10000>; | 77 | reg = <0x0 0xeba40000 0x0 0x10000>; |
78 | status = "okay"; | 78 | status = "okay"; |
79 | compatible = "mmio-sram"; | 79 | compatible = "mmio-sram"; |
80 | power-domain = <&versal_net_firmware 0x183180ce>; | 80 | power-domains = <&versal_net_firmware 0x183180ce>; |
81 | }; | 81 | }; |
82 | 82 | ||
83 | tcm_1b: tcm_0b@eba50000 { | 83 | tcm_1b: tcm_0b@eba50000 { |
@@ -85,7 +85,7 @@ | |||
85 | reg = <0x0 0xeba50000 0x0 0x8000>; | 85 | reg = <0x0 0xeba50000 0x0 0x8000>; |
86 | status = "okay"; | 86 | status = "okay"; |
87 | compatible = "mmio-sram"; | 87 | compatible = "mmio-sram"; |
88 | power-domain = <&versal_net_firmware 0x183180cf>; | 88 | power-domains = <&versal_net_firmware 0x183180cf>; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | tcm_1c: tcm_0b@eba60000 { | 91 | tcm_1c: tcm_0b@eba60000 { |
@@ -93,7 +93,7 @@ | |||
93 | reg = <0x0 0xeba60000 0x0 0x8000>; | 93 | reg = <0x0 0xeba60000 0x0 0x8000>; |
94 | status = "okay"; | 94 | status = "okay"; |
95 | compatible = "mmio-sram"; | 95 | compatible = "mmio-sram"; |
96 | power-domain = <&versal_net_firmware 0x183180d0>; | 96 | power-domains = <&versal_net_firmware 0x183180d0>; |
97 | }; | 97 | }; |
98 | 98 | ||
99 | r52ss { | 99 | r52ss { |
@@ -110,7 +110,7 @@ | |||
110 | ranges; | 110 | ranges; |
111 | sram = <&tcm_0a>, <&tcm_0b>, <&tcm_0c>; | 111 | sram = <&tcm_0a>, <&tcm_0b>, <&tcm_0c>; |
112 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 112 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
113 | power-domain = <&versal_net_firmware 0x181100BF>; | 113 | power-domains = <&versal_net_firmware 0x181100BF>; |
114 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 114 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
115 | mbox-names = "tx", "rx"; | 115 | mbox-names = "tx", "rx"; |
116 | }; | 116 | }; |
@@ -121,7 +121,7 @@ | |||
121 | ranges; | 121 | ranges; |
122 | sram = <&tcm_1a>, <&tcm_1b>, <&tcm_1c>; | 122 | sram = <&tcm_1a>, <&tcm_1b>, <&tcm_1c>; |
123 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | 123 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; |
124 | power-domain = <&versal_net_firmware 0x181100C0>; | 124 | power-domains = <&versal_net_firmware 0x181100C0>; |
125 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | 125 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; |
126 | mbox-names = "tx", "rx"; | 126 | mbox-names = "tx", "rx"; |
127 | }; | 127 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi index 01e337c7..b21b4096 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/versal-openamp.dtsi | |||
@@ -52,7 +52,7 @@ | |||
52 | reg = <0x0 0xffe00000 0x0 0x10000>; | 52 | reg = <0x0 0xffe00000 0x0 0x10000>; |
53 | status = "okay"; | 53 | status = "okay"; |
54 | compatible = "mmio-sram"; | 54 | compatible = "mmio-sram"; |
55 | power-domain = <&versal_firmware 0x1831800b>; | 55 | power-domains = <&versal_firmware 0x1831800b>; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | tcm_0b: tcm_0b@ffe20000 { | 58 | tcm_0b: tcm_0b@ffe20000 { |
@@ -60,7 +60,7 @@ | |||
60 | reg = <0x0 0xffe20000 0x0 0x10000>; | 60 | reg = <0x0 0xffe20000 0x0 0x10000>; |
61 | status = "okay"; | 61 | status = "okay"; |
62 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
63 | power-domain = <&versal_firmware 0x1831800c>; | 63 | power-domains = <&versal_firmware 0x1831800c>; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | tcm_1a: tcm_1a@ffe90000 { | 66 | tcm_1a: tcm_1a@ffe90000 { |
@@ -68,7 +68,7 @@ | |||
68 | reg = <0x0 0xffe90000 0x0 0x10000>; | 68 | reg = <0x0 0xffe90000 0x0 0x10000>; |
69 | status = "okay"; | 69 | status = "okay"; |
70 | compatible = "mmio-sram"; | 70 | compatible = "mmio-sram"; |
71 | power-domain = <&versal_firmware 0x1831800d>; | 71 | power-domains = <&versal_firmware 0x1831800d>; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | tcm_1b: tcm_1b@ffeb0000 { | 74 | tcm_1b: tcm_1b@ffeb0000 { |
@@ -76,7 +76,7 @@ | |||
76 | reg = <0x0 0xffeb0000 0x0 0x10000>; | 76 | reg = <0x0 0xffeb0000 0x0 0x10000>; |
77 | status = "okay"; | 77 | status = "okay"; |
78 | compatible = "mmio-sram"; | 78 | compatible = "mmio-sram"; |
79 | power-domain = <&versal_firmware 0x1831800e>; | 79 | power-domains = <&versal_firmware 0x1831800e>; |
80 | }; | 80 | }; |
81 | 81 | ||
82 | rf5ss@ff9a0000 { | 82 | rf5ss@ff9a0000 { |
@@ -94,7 +94,7 @@ | |||
94 | ranges; | 94 | ranges; |
95 | sram = <&tcm_0a>, <&tcm_0b>; | 95 | sram = <&tcm_0a>, <&tcm_0b>; |
96 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 96 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
97 | power-domain = <&versal_firmware 0x18110005>; | 97 | power-domains = <&versal_firmware 0x18110005>; |
98 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 98 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
99 | mbox-names = "tx", "rx"; | 99 | mbox-names = "tx", "rx"; |
100 | }; | 100 | }; |
@@ -105,7 +105,7 @@ | |||
105 | ranges; | 105 | ranges; |
106 | sram = <&tcm_1a>, <&tcm_1b>; | 106 | sram = <&tcm_1a>, <&tcm_1b>; |
107 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | 107 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; |
108 | power-domain = <&versal_firmware 0x18110006>; | 108 | power-domains = <&versal_firmware 0x18110006>; |
109 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | 109 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; |
110 | mbox-names = "tx", "rx"; | 110 | mbox-names = "tx", "rx"; |
111 | }; | 111 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts deleted file mode 100644 index b5d238ff..00000000 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp-overlay.dts +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-License-Identifier: MIT | ||
3 | * | ||
4 | * dts overlay file for Zynq OpenAMP | ||
5 | * | ||
6 | * Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | /dts-v1/; | ||
11 | /plugin/; | ||
12 | |||
13 | #include "zynq-openamp.dtsi" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi deleted file mode 100644 index 0e822202..00000000 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynq-openamp.dtsi +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-License-Identifier: MIT | ||
3 | * | ||
4 | * dts file for Zynq OpenAMP | ||
5 | * | ||
6 | * Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | &{/} { | ||
11 | reserved-memory { | ||
12 | #address-cells = <1>; | ||
13 | #size-cells = <1>; | ||
14 | ranges; | ||
15 | vdev0vring0: vdev0vring0@3e800000 { | ||
16 | no-map; | ||
17 | compatible = "shared-dma-pool"; | ||
18 | reg = <0x3e800000 0x4000>; | ||
19 | }; | ||
20 | vdev0vring1: vdev0vring1@3e804000 { | ||
21 | no-map; | ||
22 | compatible = "shared-dma-pool"; | ||
23 | reg = <0x3e804000 0x4000>; | ||
24 | }; | ||
25 | vdev0buffer: vdev0buffer@3e808000 { | ||
26 | no-map; | ||
27 | compatible = "shared-dma-pool"; | ||
28 | reg = <0x3e808000 0x100000>; | ||
29 | }; | ||
30 | rproc_0_reserved: rproc@3e000000 { | ||
31 | no-map; | ||
32 | compatible = "shared-dma-pool"; | ||
33 | reg = <0x3e000000 0x800000>; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | remoteproc0: remoteproc@0 { | ||
38 | compatible = "xlnx,zynq_remoteproc"; | ||
39 | firmware = "firmware"; | ||
40 | memory-region = <&rproc_0_reserved>, <&vdev0buffer>, <&vdev0vring0>, <&vdev0vring1>; | ||
41 | interrupt-parent = <&intc>; | ||
42 | }; | ||
43 | }; | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi index 8ef72656..1ad51fef 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/files/zynqmp-openamp.dtsi | |||
@@ -52,7 +52,7 @@ | |||
52 | reg = <0x0 0xffe00000 0x0 0x10000>; | 52 | reg = <0x0 0xffe00000 0x0 0x10000>; |
53 | status = "okay"; | 53 | status = "okay"; |
54 | compatible = "mmio-sram"; | 54 | compatible = "mmio-sram"; |
55 | power-domain = <&zynqmp_firmware 15>; | 55 | power-domains = <&zynqmp_firmware 15>; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | tcm_0b: tcm_0b@ffe20000 { | 58 | tcm_0b: tcm_0b@ffe20000 { |
@@ -60,14 +60,14 @@ | |||
60 | reg = <0x0 0xffe20000 0x0 0x10000>; | 60 | reg = <0x0 0xffe20000 0x0 0x10000>; |
61 | status = "okay"; | 61 | status = "okay"; |
62 | compatible = "mmio-sram"; | 62 | compatible = "mmio-sram"; |
63 | power-domain = <&zynqmp_firmware 16>; | 63 | power-domains = <&zynqmp_firmware 16>; |
64 | }; | 64 | }; |
65 | tcm_1a: tcm_0a@ffe90000 { | 65 | tcm_1a: tcm_0a@ffe90000 { |
66 | no-map; | 66 | no-map; |
67 | reg = <0x0 0xffe90000 0x0 0x10000>; | 67 | reg = <0x0 0xffe90000 0x0 0x10000>; |
68 | status = "okay"; | 68 | status = "okay"; |
69 | compatible = "mmio-sram"; | 69 | compatible = "mmio-sram"; |
70 | power-domain = <&zynqmp_firmware 17>; | 70 | power-domains = <&zynqmp_firmware 17>; |
71 | }; | 71 | }; |
72 | 72 | ||
73 | tcm_1b: tcm_0b@ffeb0000 { | 73 | tcm_1b: tcm_0b@ffeb0000 { |
@@ -75,7 +75,7 @@ | |||
75 | reg = <0x0 0xffeb0000 0x0 0x10000>; | 75 | reg = <0x0 0xffeb0000 0x0 0x10000>; |
76 | status = "okay"; | 76 | status = "okay"; |
77 | compatible = "mmio-sram"; | 77 | compatible = "mmio-sram"; |
78 | power-domain = <&zynqmp_firmware 18>; | 78 | power-domains = <&zynqmp_firmware 18>; |
79 | }; | 79 | }; |
80 | rf5ss@ff9a0000 { | 80 | rf5ss@ff9a0000 { |
81 | compatible = "xlnx,zynqmp-r5-remoteproc"; | 81 | compatible = "xlnx,zynqmp-r5-remoteproc"; |
@@ -92,7 +92,7 @@ | |||
92 | ranges; | 92 | ranges; |
93 | sram = <&tcm_0a>, <&tcm_0b>; | 93 | sram = <&tcm_0a>, <&tcm_0b>; |
94 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; | 94 | memory-region = <&rproc_0_reserved>, <&rpu0vdev0buffer>, <&rpu0vdev0vring0>, <&rpu0vdev0vring1>; |
95 | power-domain = <&zynqmp_firmware 7>; | 95 | power-domains = <&zynqmp_firmware 7>; |
96 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; | 96 | mboxes = <&ipi_mailbox_rpu0 0>, <&ipi_mailbox_rpu0 1>; |
97 | mbox-names = "tx", "rx"; | 97 | mbox-names = "tx", "rx"; |
98 | }; | 98 | }; |
@@ -103,7 +103,7 @@ | |||
103 | ranges; | 103 | ranges; |
104 | sram = <&tcm_1a>, <&tcm_1b>; | 104 | sram = <&tcm_1a>, <&tcm_1b>; |
105 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; | 105 | memory-region = <&rproc_1_reserved>, <&rpu1vdev0buffer>, <&rpu1vdev0vring0>, <&rpu1vdev0vring1>; |
106 | power-domain = <&zynqmp_firmware 8>; | 106 | power-domains = <&zynqmp_firmware 8>; |
107 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; | 107 | mboxes = <&ipi_mailbox_rpu1 0>, <&ipi_mailbox_rpu1 1>; |
108 | mbox-names = "tx", "rx"; | 108 | mbox-names = "tx", "rx"; |
109 | }; | 109 | }; |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb index 9f481fec..7b626ee3 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-bsp/device-tree/open-amp-device-tree.bb | |||
@@ -5,8 +5,6 @@ LICENSE = "MIT" | |||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
6 | 6 | ||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | file://zynq-openamp.dtsi \ | ||
9 | file://zynq-openamp-overlay.dts \ | ||
10 | file://zynqmp-openamp.dtsi \ | 8 | file://zynqmp-openamp.dtsi \ |
11 | file://zynqmp-openamp-overlay.dts \ | 9 | file://zynqmp-openamp-overlay.dts \ |
12 | file://versal-openamp.dtsi \ | 10 | file://versal-openamp.dtsi \ |
@@ -18,7 +16,6 @@ SRC_URI = " \ | |||
18 | # We don't have anything to include from the kernel | 16 | # We don't have anything to include from the kernel |
19 | KERNEL_INCLUDE = "" | 17 | KERNEL_INCLUDE = "" |
20 | 18 | ||
21 | COMPATIBLE_MACHINE:zynq = "${MACHINE}" | ||
22 | COMPATIBLE_MACHINE:zynqmp = "${MACHINE}" | 19 | COMPATIBLE_MACHINE:zynqmp = "${MACHINE}" |
23 | COMPATIBLE_MACHINE:versal = "${MACHINE}" | 20 | COMPATIBLE_MACHINE:versal = "${MACHINE}" |
24 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" | 21 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb new file mode 100644 index 00000000..13992ebc --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-core/packagegroups/packagegroup-openamp.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | DESCRIPTION = "OpenAMP supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
4 | |||
5 | # We don't support Zynq | ||
6 | COMPATIBLE_MACHINE:zynq = "$^" | ||
7 | |||
8 | inherit packagegroup features_check | ||
9 | |||
10 | REQUIRED_DISTRO_FEATURES = "openamp" | ||
11 | |||
12 | PACKAGES = "\ | ||
13 | packagegroup-openamp-echo-test \ | ||
14 | packagegroup-openamp-matrix-mul \ | ||
15 | packagegroup-openamp-rpc-demo \ | ||
16 | packagegroup-openamp \ | ||
17 | " | ||
18 | |||
19 | RDEPENDS:${PN}-echo-test = "rpmsg-echo-test" | ||
20 | RDEPENDS:${PN}-echo-test:append:zcu102-zynqmp = " openamp-fw-echo-testd" | ||
21 | |||
22 | RDEPENDS:${PN}-matrix-mul = "rpmsg-mat-mul" | ||
23 | RDEPENDS:${PN}-matrix-mul:append:zcu102-zynqmp = " openamp-fw-mat-muld" | ||
24 | |||
25 | RDEPENDS:${PN}-rpc-demo = "rpmsg-proxy-app" | ||
26 | RDEPENDS:${PN}-rpc-demo:append:zcu102-zynqmp = " openamp-fw-rpc-demo" | ||
27 | |||
28 | RDEPENDS:${PN}:append = " ${@'open-amp-device-tree' if d.getVar('ENABLE_OPENAMP_DTSI') != '1' else ''}" | ||
29 | |||
30 | RDEPENDS:${PN}:append = " \ | ||
31 | libmetal \ | ||
32 | libmetal-demos \ | ||
33 | open-amp \ | ||
34 | open-amp-demos \ | ||
35 | packagegroup-openamp-echo-test \ | ||
36 | packagegroup-openamp-matrix-mul \ | ||
37 | packagegroup-openamp-rpc-demo \ | ||
38 | " | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.1.bb index a03912d7..9ca9cbc1 100644 --- 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 | |||
@@ -1,8 +1,8 @@ | |||
1 | SRCBRANCH ?= "2024" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "e2fdb4fecbebe41b4cd1c0b4fbfa3496bcded485" | 2 | SRCREV = "9e9997221ddd335c31cf881edf7026c762024a58" |
3 | BRANCH = "xlnx_rel_v2024.1" | 3 | BRANCH = "xlnx_rel_v2024.1" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" |
5 | PV = "${SRCBRANCH}+git" | 5 | PV .= "+git" |
6 | 6 | ||
7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" | 7 | REPO = "git://github.com/Xilinx/libmetal.git;protocol=https" |
8 | 8 | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.2.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.2.bb new file mode 100644 index 00000000..bcde904d --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/libmetal/libmetal-xlnx_v2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SRCBRANCH ?= "2024" | ||
2 | SRCREV = "e2fdb4fecbebe41b4cd1c0b4fbfa3496bcded485" | ||
3 | BRANCH = "xlnx_rel_v2024.2" | ||
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=f4d5df0f12dcea1b1a0124219c0dbab4" | ||
5 | PV .= "+git" | ||
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 index 94535abc..29d4bc4f 100644 --- 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 | |||
@@ -1,8 +1,8 @@ | |||
1 | SRCBRANCH ?= "2024" | 1 | SRCBRANCH ?= "2024" |
2 | SRCREV = "dbf0857389190f4c4cedfb77bd1f9bdd7ab404f3" | 2 | SRCREV = "699ad2c5b9236d61aae1b89e2857361db1bfeb95" |
3 | BRANCH = "xlnx_rel_v2024.1" | 3 | BRANCH = "xlnx_rel_v2024.1" |
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" | 4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" |
5 | PV = "${SRCBRANCH}+git" | 5 | PV .= "+git" |
6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" | 6 | REPO = "git://github.com/Xilinx/open-amp.git;protocol=https" |
7 | 7 | ||
8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc | 8 | include ${LAYER_PATH_openamp-layer}/recipes-openamp/open-amp/open-amp.inc |
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.2.bb b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.2.bb new file mode 100644 index 00000000..06c2ecbc --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-openamp/open-amp/open-amp-xlnx_v2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SRCBRANCH ?= "2024" | ||
2 | SRCREV = "47caef116ccbf5d5a9778082a98fe8f3710b549c" | ||
3 | BRANCH = "xlnx_rel_v2024.2" | ||
4 | LIC_FILES_CHKSUM ?= "file://LICENSE.md;md5=ab88daf995c0bd0071c2e1e55f3d3505" | ||
5 | PV .= "+git" | ||
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_202210.2.13.479.bbappend index 0e7f3693..0e7f3693 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_202210.2.13.479.bbappend | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202220.2.14.0.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202220.2.14.0.bbappend new file mode 100644 index 00000000..0e7f3693 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202220.2.14.0.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For versal devices with the ai-engine | ||
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend index 362dc45a..a7ab6bb8 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202310.2.15.0.bbappend | |||
@@ -1,2 +1,9 @@ | |||
1 | # Older xrt requires a manual dependency on libmetal | 1 | # Use libmetal for systems with AIE |
2 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libmetal', '', d)}" | 2 | # For versal devices with the ai-engine |
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal libmetal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
9 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend index 362dc45a..a7ab6bb8 100644 --- a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202320.2.16.0.bbappend | |||
@@ -1,2 +1,9 @@ | |||
1 | # Older xrt requires a manual dependency on libmetal | 1 | # Use libmetal for systems with AIE |
2 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libmetal', '', d)}" | 2 | # For versal devices with the ai-engine |
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal libmetal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
9 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend new file mode 100644 index 00000000..0e7f3693 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt/xrt_202410.2.17.319.bbappend | |||
@@ -0,0 +1,8 @@ | |||
1 | # Use libmetal for systems with AIE | ||
2 | # For versal devices with the ai-engine | ||
3 | PACKAGE_ARCH_orig := "${PACKAGE_ARCH}" | ||
4 | PACKAGE_ARCH = "${@bb.utils.contains('MACHINE_FEATURES', 'aie', '${MACHINE_ARCH}', '${PACKAGE_ARCH_orig}', d)}" | ||
5 | EXTRA_OECMAKE .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
6 | TARGET_CXXFLAGS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
7 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
8 | RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'aie', ' libxaiengine aiefal', '', d)}" | ||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch new file mode 100644 index 00000000..3fa4d6ec --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Accelerate-picture-composition.patch | |||
@@ -0,0 +1,1058 @@ | |||
1 | From 015f8a54f7e5a754e1cefba1aa7b1f6992a8aa9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Tue, 16 Jul 2024 19:48:47 +0000 | ||
4 | Subject: [PATCH] xf86-video-armosc: Accelerate picture composition | ||
5 | |||
6 | Introduce Repulsion - simplistic GPU accelerated compositor to back RandR | ||
7 | display manipulation features. This library is inspired by Glamor extension | ||
8 | https://www.freedesktop.org/wiki/Software/Glamor/. Unfortunately Glamor | ||
9 | doesn't work as is on ARM Mali-400 MP due to the lack of required features | ||
10 | and several bugs in Mali EGL/GLES implementation. | ||
11 | |||
12 | Install and manage picture compositor hooks. | ||
13 | |||
14 | Provide access to dma-buf fd from ARSOC buffer object. | ||
15 | |||
16 | Attach shadow buffer object to corresponding pixmap. | ||
17 | |||
18 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
19 | --- | ||
20 | src/Makefile.am | 3 +- | ||
21 | src/armsoc_driver.c | 145 ++++++++++ | ||
22 | src/armsoc_driver.h | 7 + | ||
23 | src/armsoc_dumb.c | 8 + | ||
24 | src/armsoc_dumb.h | 1 + | ||
25 | src/armsoc_exa.c | 18 +- | ||
26 | src/armsoc_repulsion.c | 624 +++++++++++++++++++++++++++++++++++++++++ | ||
27 | src/armsoc_repulsion.h | 67 +++++ | ||
28 | 8 files changed, 867 insertions(+), 6 deletions(-) | ||
29 | create mode 100644 src/armsoc_repulsion.c | ||
30 | create mode 100644 src/armsoc_repulsion.h | ||
31 | |||
32 | diff --git a/src/Makefile.am b/src/Makefile.am | ||
33 | index db5f110..cd4f795 100644 | ||
34 | --- a/src/Makefile.am | ||
35 | +++ b/src/Makefile.am | ||
36 | @@ -38,7 +38,7 @@ ERROR_CFLAGS = -Werror -Wall -Wdeclaration-after-statement -Wvla \ | ||
37 | AM_CFLAGS = @XORG_CFLAGS@ $(ERROR_CFLAGS) | ||
38 | armsoc_drv_la_LTLIBRARIES = armsoc_drv.la | ||
39 | armsoc_drv_la_LDFLAGS = -module -avoid-version -no-undefined | ||
40 | -armsoc_drv_la_LIBADD = @XORG_LIBS@ | ||
41 | +armsoc_drv_la_LIBADD = -lMali @XORG_LIBS@ | ||
42 | armsoc_drv_ladir = @moduledir@/drivers | ||
43 | DRMMODE_SRCS = drmmode_exynos/drmmode_exynos.c \ | ||
44 | drmmode_pl111/drmmode_pl111.c \ | ||
45 | @@ -54,4 +54,5 @@ armsoc_drv_la_SOURCES = \ | ||
46 | armsoc_dri2.c \ | ||
47 | armsoc_driver.c \ | ||
48 | armsoc_dumb.c \ | ||
49 | + armsoc_repulsion.c \ | ||
50 | $(DRMMODE_SRCS) | ||
51 | diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c | ||
52 | index a4a1ba3..f5b8f21 100644 | ||
53 | --- a/src/armsoc_driver.c | ||
54 | +++ b/src/armsoc_driver.c | ||
55 | @@ -42,6 +42,7 @@ | ||
56 | #include <pixman.h> | ||
57 | |||
58 | #include "armsoc_driver.h" | ||
59 | +#include "armsoc_repulsion.h" | ||
60 | |||
61 | #include "micmap.h" | ||
62 | |||
63 | @@ -971,6 +972,138 @@ ARMSOCAccelInit(ScreenPtr pScreen) | ||
64 | pARMSOC->dri = FALSE; | ||
65 | } | ||
66 | |||
67 | +#define ARMSOC_ACCEL_MIN_DIMS 200 | ||
68 | + | ||
69 | +/** | ||
70 | + * Classify compositor input to figure out if we can accelerate composition | ||
71 | + */ | ||
72 | +static Bool | ||
73 | +ARMSOCCanAccelerateComposition(CARD8 op, | ||
74 | + PicturePtr src, | ||
75 | + PicturePtr mask, | ||
76 | + PicturePtr dest, | ||
77 | + CARD16 width, | ||
78 | + CARD16 height) | ||
79 | +{ | ||
80 | + /* We only support source to destination pixmap copy */ | ||
81 | + if (op != PictOpSrc) | ||
82 | + return FALSE; | ||
83 | + | ||
84 | + /* | ||
85 | + * Don't accelerate small picture compositions, e.g. toolbars, cursor, | ||
86 | + * icons, etc. | ||
87 | + */ | ||
88 | + if (width < ARMSOC_ACCEL_MIN_DIMS || height < ARMSOC_ACCEL_MIN_DIMS) | ||
89 | + return FALSE; | ||
90 | + | ||
91 | + /* Check source picture */ | ||
92 | + if (!src || !src->pDrawable) | ||
93 | + return FALSE; | ||
94 | + | ||
95 | + /* Check destination picture constraints */ | ||
96 | + if (!dest || !dest->pDrawable || dest->pDrawable->type != DRAWABLE_PIXMAP) | ||
97 | + return FALSE; | ||
98 | + | ||
99 | + /* We don't support masking */ | ||
100 | + if (mask) | ||
101 | + return FALSE; | ||
102 | + | ||
103 | + /* | ||
104 | + * We expect source transform to be assigned, otherwise there is not much | ||
105 | + * to accelerate | ||
106 | + */ | ||
107 | + if (!src->transform) | ||
108 | + return FALSE; | ||
109 | + | ||
110 | + /* We expect buffer object to be assigned to source */ | ||
111 | + if (!draw2pix(src->pDrawable)) | ||
112 | + return FALSE; | ||
113 | + | ||
114 | + /* We expect buffer object to be assigned to destination */ | ||
115 | + if (!draw2pix(dest->pDrawable)) | ||
116 | + return FALSE; | ||
117 | + | ||
118 | + return TRUE; | ||
119 | +} | ||
120 | + | ||
121 | +/** | ||
122 | + * This callback will be invoked every time xserver needs to combine 2 | ||
123 | + * pictures. Our special interest is the case when we need to blit draw buffer | ||
124 | + * into shadow buffer while performing rotation or reflection. Without | ||
125 | + * acceleration such composition will end up in tons of matrix multiplications | ||
126 | + * for every pixel, which is obviously very slow. Here we need to detect such | ||
127 | + * cases and accelerate the composition on the GPU. | ||
128 | + */ | ||
129 | +static void | ||
130 | +ARMSOCComposite(CARD8 op, | ||
131 | + PicturePtr src, | ||
132 | + PicturePtr mask, | ||
133 | + PicturePtr dest, | ||
134 | + INT16 x_src, | ||
135 | + INT16 y_src, | ||
136 | + INT16 x_mask, | ||
137 | + INT16 y_mask, | ||
138 | + INT16 x_dest, | ||
139 | + INT16 y_dest, | ||
140 | + CARD16 width, | ||
141 | + CARD16 height) | ||
142 | +{ | ||
143 | + ScreenPtr pScreen = dest->pDrawable->pScreen; | ||
144 | + PictureScreenPtr ps = GetPictureScreen(pScreen); | ||
145 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
146 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
147 | + struct armsoc_bo *src_bo = NULL, *dest_bo = NULL; | ||
148 | + float xform_matrix[3][3] = {}; | ||
149 | + | ||
150 | + Bool can_accelerate = | ||
151 | + ARMSOCCanAccelerateComposition(op, src, mask, dest, width, height); | ||
152 | + | ||
153 | + | ||
154 | + if (can_accelerate) { | ||
155 | + /* Transpose, scale & adjust transformation matrix */ | ||
156 | + int x, y; | ||
157 | + for (y = 0; y < 3; ++y) | ||
158 | + for (x = 0; x < 3; ++x) | ||
159 | + xform_matrix[x][y] = | ||
160 | + (float)src->transform->matrix[y][x] / 65536.f; | ||
161 | + /* | ||
162 | + * TODO: Figure out coordinate system where these sins make sence, | ||
163 | + * insted of just reversing them | ||
164 | + */ | ||
165 | + xform_matrix[0][1] = -xform_matrix[0][1]; | ||
166 | + xform_matrix[1][0] = -xform_matrix[1][0]; | ||
167 | + } | ||
168 | + | ||
169 | + /* Extract source buffer object */ | ||
170 | + if (can_accelerate) { | ||
171 | + PixmapPtr pm = draw2pix(src->pDrawable); | ||
172 | + src_bo = ARMSOCPixmapBo(pm); | ||
173 | + } | ||
174 | + | ||
175 | + /* Extract destination buffer object */ | ||
176 | + if (can_accelerate) { | ||
177 | + PixmapPtr pm = draw2pix(dest->pDrawable); | ||
178 | + dest_bo = ARMSOCPixmapBo(pm); | ||
179 | + } | ||
180 | + | ||
181 | + if (can_accelerate && | ||
182 | + armsoc_repulsion_composite(pARMSOC->repulsion, | ||
183 | + src_bo, | ||
184 | + dest_bo, | ||
185 | + xform_matrix)) { | ||
186 | + } else { | ||
187 | + /* Fallback to saved compositor if accelerated composition fails */ | ||
188 | + pARMSOC->composite_proc(op, src, mask, dest, | ||
189 | + x_src, y_src, x_mask, y_mask, | ||
190 | + x_dest, y_dest, width, height); | ||
191 | + } | ||
192 | + | ||
193 | + if (ps->Composite != ARMSOCComposite) { | ||
194 | + pARMSOC->composite_proc = ps->Composite; | ||
195 | + ps->Composite = ARMSOCComposite; | ||
196 | + } | ||
197 | +} | ||
198 | + | ||
199 | /** | ||
200 | * The driver's ScreenInit() function, called at the start of each server | ||
201 | * generation. Fill in pScreen, map the frame buffer, save state, | ||
202 | @@ -986,6 +1119,7 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
203 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
204 | VisualPtr visual; | ||
205 | xf86CrtcConfigPtr xf86_config; | ||
206 | + PictureScreenPtr ps; | ||
207 | int j; | ||
208 | const char *fbdev; | ||
209 | int depth; | ||
210 | @@ -1174,6 +1308,13 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
211 | pARMSOC->lockFD = -1; | ||
212 | } | ||
213 | |||
214 | + pARMSOC->repulsion = armsoc_repulsion_init(); | ||
215 | + | ||
216 | + ps = GetPictureScreen(pScreen); | ||
217 | + pARMSOC->composite_proc = ps->Composite; | ||
218 | + | ||
219 | + ps->Composite = ARMSOCComposite; | ||
220 | + | ||
221 | TRACE_EXIT(); | ||
222 | return TRUE; | ||
223 | |||
224 | @@ -1250,6 +1391,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL) | ||
225 | |||
226 | TRACE_ENTER(); | ||
227 | |||
228 | + armsoc_repulsion_release(pARMSOC->repulsion); | ||
229 | + | ||
230 | drmmode_screen_fini(pScrn); | ||
231 | drmmode_cursor_fini(pScreen); | ||
232 | |||
233 | @@ -1294,6 +1437,8 @@ ARMSOCCloseScreen(CLOSE_SCREEN_ARGS_DECL) | ||
234 | pARMSOC->lockFD = -1; | ||
235 | } | ||
236 | |||
237 | + armsoc_repulsion_release(pARMSOC->repulsion); | ||
238 | + | ||
239 | TRACE_EXIT(); | ||
240 | |||
241 | return ret; | ||
242 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
243 | index eae76ca..20b0f80 100644 | ||
244 | --- a/src/armsoc_driver.h | ||
245 | +++ b/src/armsoc_driver.h | ||
246 | @@ -38,6 +38,7 @@ | ||
247 | #include "xf86drm.h" | ||
248 | #include <errno.h> | ||
249 | #include "armsoc_exa.h" | ||
250 | +#include "armsoc_repulsion.h" | ||
251 | |||
252 | /* Apparently not used by X server */ | ||
253 | #define ARMSOC_VERSION 1000 | ||
254 | @@ -183,6 +184,12 @@ struct ARMSOCRec { | ||
255 | /* Size of the swap chain. Set to 1 if DRI2SwapLimit unsupported, | ||
256 | * driNumBufs if early display enabled, otherwise driNumBufs-1 */ | ||
257 | unsigned int swap_chain_size; | ||
258 | + | ||
259 | + /* GPU accelerated picture compositor, AKA Repulsion */ | ||
260 | + struct ARMSOCRepulsion *repulsion; | ||
261 | + | ||
262 | + /* SW (pixman based) picture compositor fallback */ | ||
263 | + CompositeProcPtr composite_proc; | ||
264 | }; | ||
265 | |||
266 | /* | ||
267 | diff --git a/src/armsoc_dumb.c b/src/armsoc_dumb.c | ||
268 | index 7e6dbd9..3c16ed2 100644 | ||
269 | --- a/src/armsoc_dumb.c | ||
270 | +++ b/src/armsoc_dumb.c | ||
271 | @@ -130,6 +130,14 @@ int armsoc_bo_has_dmabuf(struct armsoc_bo *bo) | ||
272 | return bo->dmabuf >= 0; | ||
273 | } | ||
274 | |||
275 | +int armsoc_bo_get_dmabuf(struct armsoc_bo *bo) | ||
276 | +{ | ||
277 | + if (!armsoc_bo_has_dmabuf(bo)) | ||
278 | + armsoc_bo_set_dmabuf(bo); | ||
279 | + | ||
280 | + return bo->dmabuf; | ||
281 | +} | ||
282 | + | ||
283 | struct armsoc_bo *armsoc_bo_new_with_dim(struct armsoc_device *dev, | ||
284 | uint32_t width, uint32_t height, uint8_t depth, | ||
285 | uint8_t bpp, enum armsoc_buf_type buf_type) | ||
286 | diff --git a/src/armsoc_dumb.h b/src/armsoc_dumb.h | ||
287 | index a299ccf..3b687c7 100644 | ||
288 | --- a/src/armsoc_dumb.h | ||
289 | +++ b/src/armsoc_dumb.h | ||
290 | @@ -89,6 +89,7 @@ void armsoc_bo_unreference(struct armsoc_bo *bo); | ||
291 | int armsoc_bo_set_dmabuf(struct armsoc_bo *bo); | ||
292 | void armsoc_bo_clear_dmabuf(struct armsoc_bo *bo); | ||
293 | int armsoc_bo_has_dmabuf(struct armsoc_bo *bo); | ||
294 | +int armsoc_bo_get_dmabuf(struct armsoc_bo *bo); | ||
295 | int armsoc_bo_clear(struct armsoc_bo *bo); | ||
296 | int armsoc_bo_rm_fb(struct armsoc_bo *bo); | ||
297 | int armsoc_bo_resize(struct armsoc_bo *bo, uint32_t new_width, | ||
298 | diff --git a/src/armsoc_exa.c b/src/armsoc_exa.c | ||
299 | index a310727..7edf0ac 100644 | ||
300 | --- a/src/armsoc_exa.c | ||
301 | +++ b/src/armsoc_exa.c | ||
302 | @@ -161,10 +161,16 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
303 | ScrnInfoPtr pScrn = pix2scrn(pPixmap); | ||
304 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
305 | enum armsoc_buf_type buf_type = ARMSOC_BO_NON_SCANOUT; | ||
306 | + struct armsoc_bo *fb_bo = NULL; | ||
307 | |||
308 | /* Only modify specified fields, keeping all others intact. */ | ||
309 | - if (pPixData) | ||
310 | + if (pPixData) { | ||
311 | pPixmap->devPrivate.ptr = pPixData; | ||
312 | + if (pARMSOC->shadow && pPixData == armsoc_bo_map(pARMSOC->shadow)) | ||
313 | + fb_bo = pARMSOC->shadow; | ||
314 | + else if (pPixData == armsoc_bo_map(pARMSOC->scanout)) | ||
315 | + fb_bo = pARMSOC->scanout; | ||
316 | + } | ||
317 | |||
318 | if (devKind > 0) | ||
319 | pPixmap->devKind = devKind; | ||
320 | @@ -173,7 +179,7 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
321 | * We can't accelerate this pixmap, and don't ever want to | ||
322 | * see it again.. | ||
323 | */ | ||
324 | - if (pPixData && pPixData != armsoc_bo_map(pARMSOC->scanout)) { | ||
325 | + if (pPixData && fb_bo && pPixData != armsoc_bo_map(fb_bo)) { | ||
326 | /* scratch-pixmap (see GetScratchPixmapHeader()) gets recycled, | ||
327 | * so could have a previous bo! | ||
328 | * Pixmap drops ref on its old bo */ | ||
329 | @@ -185,10 +191,10 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
330 | } | ||
331 | |||
332 | /* Replacing the pixmap's current bo with the scanout bo */ | ||
333 | - if (pPixData == armsoc_bo_map(pARMSOC->scanout) && priv->bo != pARMSOC->scanout) { | ||
334 | + if (fb_bo && pPixData == armsoc_bo_map(fb_bo) && priv->bo != fb_bo) { | ||
335 | struct armsoc_bo *old_bo = priv->bo; | ||
336 | |||
337 | - priv->bo = pARMSOC->scanout; | ||
338 | + priv->bo = fb_bo; | ||
339 | /* pixmap takes a ref on its new bo */ | ||
340 | armsoc_bo_reference(priv->bo); | ||
341 | |||
342 | @@ -225,7 +231,9 @@ ARMSOCModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, | ||
343 | if (!pPixmap->drawable.width || !pPixmap->drawable.height) | ||
344 | return TRUE; | ||
345 | |||
346 | - assert(priv->bo); | ||
347 | + if(!priv->bo) | ||
348 | + return FALSE; | ||
349 | + | ||
350 | if (armsoc_bo_width(priv->bo) != pPixmap->drawable.width || | ||
351 | armsoc_bo_height(priv->bo) != pPixmap->drawable.height || | ||
352 | armsoc_bo_bpp(priv->bo) != pPixmap->drawable.bitsPerPixel) { | ||
353 | diff --git a/src/armsoc_repulsion.c b/src/armsoc_repulsion.c | ||
354 | new file mode 100644 | ||
355 | index 0000000..1a7c0cd | ||
356 | --- /dev/null | ||
357 | +++ b/src/armsoc_repulsion.c | ||
358 | @@ -0,0 +1,624 @@ | ||
359 | +/* | ||
360 | + * Copyright (C) 2024 AMD, Inc. | ||
361 | + * | ||
362 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
363 | + * copy of this software and associated documentation files (the "Software"), | ||
364 | + * to deal in the Software without restriction, including without limitation | ||
365 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
366 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
367 | + * Software is furnished to do so, subject to the following conditions: | ||
368 | + * | ||
369 | + * The above copyright notice and this permission notice (including the next | ||
370 | + * paragraph) shall be included in all copies or substantial portions of the | ||
371 | + * Software. | ||
372 | + * | ||
373 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
374 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
375 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
376 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
377 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
378 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
379 | + * SOFTWARE. | ||
380 | + * | ||
381 | + * Author: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
382 | + * | ||
383 | + */ | ||
384 | + | ||
385 | +#include "armsoc_repulsion.h" | ||
386 | + | ||
387 | +#include <stdlib.h> | ||
388 | +#include <drm_fourcc.h> | ||
389 | + | ||
390 | +#define EGL_GL_PROTOTYPES 1 | ||
391 | +#include <EGL/egl.h> | ||
392 | +#define EGL_EGLEXT_PROTOTYPES 1 | ||
393 | +#include <EGL/eglext.h> | ||
394 | +#include <GLES2/gl2.h> | ||
395 | +#define GL_GLEXT_PROTOTYPES 1 | ||
396 | +#include <GLES2/gl2ext.h> | ||
397 | + | ||
398 | +#include <xf86.h> | ||
399 | + | ||
400 | +/* ----------------------------------------------------------------------------- | ||
401 | + * Utilities | ||
402 | + */ | ||
403 | + | ||
404 | +#define INFO_LOG(fmt, ...) \ | ||
405 | +do { xf86DrvMsg(0, X_INFO, fmt "\n", ##__VA_ARGS__); } while (0) | ||
406 | + | ||
407 | +#define WARN_LOG(fmt, ...) \ | ||
408 | +do { xf86DrvMsg(0, X_WARNING, "WARNING: " fmt "\n", ##__VA_ARGS__); } while (0) | ||
409 | + | ||
410 | +#define ERROR_LOG(fmt, ...) \ | ||
411 | +do { xf86DrvMsg(0, X_ERROR, "ERROR: " fmt "\n", ##__VA_ARGS__); } while (0) | ||
412 | + | ||
413 | +/** | ||
414 | + * struct RepulsiveVertex - vertex data used for rendering | ||
415 | + * @pos: vertex position in the screen coordinate space | ||
416 | + * @uv: texture coordinate bound to this vertex | ||
417 | + */ | ||
418 | +struct RepulsiveVertex { | ||
419 | + GLfloat pos[3]; | ||
420 | + GLfloat uv[2]; | ||
421 | +}; | ||
422 | + | ||
423 | +/** | ||
424 | + * struct ARMSOCRepulsion - GPU acceleration data | ||
425 | + * @egl: EGL specific bits | ||
426 | + * @egl.display: EGL display connection | ||
427 | + * @egl.context: EGL context | ||
428 | + * @egl.surface: primary EGL surface | ||
429 | + * @gles: OpenGL ES related bits | ||
430 | + * @gles.vbo: Vertex buffer object | ||
431 | + * @gles.ibo: Index buffer object | ||
432 | + * @gles.texture: External texture object | ||
433 | + * @gles.proj_location: Shader location for projection matrix | ||
434 | + * @gles.xform_location: Shader location for transformation matrix | ||
435 | + * @gles.vertices: Array of vertices used in rendering | ||
436 | + */ | ||
437 | +struct ARMSOCRepulsion { | ||
438 | + struct { | ||
439 | + EGLDisplay display; | ||
440 | + EGLContext context; | ||
441 | + EGLSurface surface; | ||
442 | + } egl; | ||
443 | + struct { | ||
444 | + GLuint vbo; | ||
445 | + GLuint ibo; | ||
446 | + GLuint texture; | ||
447 | + GLuint program; | ||
448 | + GLint proj_location; | ||
449 | + GLint xform_location; | ||
450 | + struct RepulsiveVertex vertices[4]; | ||
451 | + } gles; | ||
452 | +}; | ||
453 | + | ||
454 | +/* ----------------------------------------------------------------------------- | ||
455 | + * GLES2 Functions | ||
456 | + */ | ||
457 | + | ||
458 | +static const char *vertex_shader = " \ | ||
459 | +precision highp float; \ | ||
460 | + \ | ||
461 | +uniform mat3 u_projection; \ | ||
462 | +uniform mat3 u_transform; \ | ||
463 | +attribute vec3 a_position; \ | ||
464 | +attribute vec2 a_texcoord; \ | ||
465 | + \ | ||
466 | +varying vec2 v_texcoord; \ | ||
467 | + \ | ||
468 | +void main() \ | ||
469 | +{ \ | ||
470 | + gl_Position.xyz = u_transform * u_projection * a_position; \ | ||
471 | + gl_Position.w = 1.0; \ | ||
472 | + v_texcoord = a_texcoord; \ | ||
473 | +} \ | ||
474 | +"; | ||
475 | + | ||
476 | +static const char *fragment_shader = " \ | ||
477 | +#extension GL_OES_EGL_image_external : require\n \ | ||
478 | +precision highp float; \ | ||
479 | + \ | ||
480 | +uniform samplerExternalOES texture; \ | ||
481 | +varying vec2 v_texcoord; \ | ||
482 | + \ | ||
483 | +void main() \ | ||
484 | +{ \ | ||
485 | + gl_FragColor = texture2D(texture, v_texcoord); \ | ||
486 | +} \ | ||
487 | +"; | ||
488 | + | ||
489 | +#define SHADER_POSITION_ATTR_SLOT 0 | ||
490 | +#define SHADER_TEX_COOR_ATTR_SLOT 1 | ||
491 | + | ||
492 | +static void armsoc_repulsion_gles_log(GLenum source, GLenum type, GLuint id, | ||
493 | + GLenum severity, GLsizei length, | ||
494 | + const GLchar *message, const void *data) | ||
495 | +{ | ||
496 | + switch (severity) { | ||
497 | + case GL_DEBUG_SEVERITY_HIGH_KHR: | ||
498 | + ERROR_LOG("GLES2: %s", message); | ||
499 | + break; | ||
500 | + case GL_DEBUG_SEVERITY_MEDIUM_KHR: | ||
501 | + WARN_LOG("GLES2: %s", message); | ||
502 | + break; | ||
503 | + default: | ||
504 | + INFO_LOG("GLES2: %s", message); | ||
505 | + }; | ||
506 | +} | ||
507 | + | ||
508 | +static const char* gles_error_str(GLenum err) | ||
509 | +{ | ||
510 | + switch (err) { | ||
511 | + case GL_NO_ERROR: return "no error"; | ||
512 | + case GL_INVALID_ENUM: return "invalid enum"; | ||
513 | + case GL_INVALID_VALUE: return "invalid value"; | ||
514 | + case GL_INVALID_OPERATION: return "invalid operation"; | ||
515 | + case GL_OUT_OF_MEMORY: return "out of memory"; | ||
516 | + case GL_INVALID_FRAMEBUFFER_OPERATION: return "invalid fb operation"; | ||
517 | + default: return "unknowm error"; | ||
518 | + } | ||
519 | +}; | ||
520 | + | ||
521 | +static int armsoc_repulsion_compile_shader(struct ARMSOCRepulsion *repulsion) | ||
522 | +{ | ||
523 | + GLuint vs, fs; | ||
524 | + GLint status, texture; | ||
525 | + GLenum err; | ||
526 | + | ||
527 | + vs = glCreateShader(GL_VERTEX_SHADER); | ||
528 | + if (!vs) { | ||
529 | + err = glGetError(); | ||
530 | + return err == GL_NO_ERROR ? -1 : err; | ||
531 | + } | ||
532 | + glShaderSource(vs, 1, &vertex_shader, NULL); | ||
533 | + glCompileShader(vs); | ||
534 | + glGetShaderiv(vs, GL_COMPILE_STATUS, &status); | ||
535 | + if (status == GL_FALSE) { | ||
536 | + GLint max_len = 1024; | ||
537 | + GLchar err_log[1024]; | ||
538 | + glGetShaderInfoLog(vs, max_len, &max_len, &err_log[0]); | ||
539 | + ERROR_LOG("VS: %s", err_log); | ||
540 | + err = glGetError(); | ||
541 | + return err == GL_NO_ERROR ? -1 : err; | ||
542 | + } | ||
543 | + | ||
544 | + fs = glCreateShader(GL_FRAGMENT_SHADER); | ||
545 | + if (!fs) { | ||
546 | + err = glGetError(); | ||
547 | + return err == GL_NO_ERROR ? -1 : err; | ||
548 | + } | ||
549 | + glShaderSource(fs, 1, &fragment_shader, NULL); | ||
550 | + glCompileShader(fs); | ||
551 | + glGetShaderiv(fs, GL_COMPILE_STATUS, &status); | ||
552 | + if (status == GL_FALSE) { | ||
553 | + err = glGetError(); | ||
554 | + return err == GL_NO_ERROR ? -1 : err; | ||
555 | + } | ||
556 | + | ||
557 | + repulsion->gles.program = glCreateProgram(); | ||
558 | + if (!repulsion->gles.program) { | ||
559 | + err = glGetError(); | ||
560 | + return err == GL_NO_ERROR ? -1 : err; | ||
561 | + } | ||
562 | + glAttachShader(repulsion->gles.program, vs); | ||
563 | + glAttachShader(repulsion->gles.program, fs); | ||
564 | + glBindAttribLocation(repulsion->gles.program, SHADER_POSITION_ATTR_SLOT, | ||
565 | + "a_position"); | ||
566 | + glBindAttribLocation(repulsion->gles.program, SHADER_TEX_COOR_ATTR_SLOT, | ||
567 | + "a_texcoord"); | ||
568 | + glLinkProgram(repulsion->gles.program); | ||
569 | + glDetachShader(repulsion->gles.program, vs); | ||
570 | + glDetachShader(repulsion->gles.program, fs); | ||
571 | + glGetProgramiv(repulsion->gles.program, GL_LINK_STATUS, &status); | ||
572 | + if (status == GL_FALSE) { | ||
573 | + err = glGetError(); | ||
574 | + return err == GL_NO_ERROR ? -1 : err; | ||
575 | + } | ||
576 | + glUseProgram(repulsion->gles.program); | ||
577 | + glEnableVertexAttribArray(SHADER_POSITION_ATTR_SLOT); | ||
578 | + glEnableVertexAttribArray(SHADER_TEX_COOR_ATTR_SLOT); | ||
579 | + | ||
580 | + repulsion->gles.proj_location = | ||
581 | + glGetUniformLocation(repulsion->gles.program, "u_projection"); | ||
582 | + repulsion->gles.xform_location = | ||
583 | + glGetUniformLocation(repulsion->gles.program, "u_transform"); | ||
584 | + | ||
585 | + texture = glGetUniformLocation(repulsion->gles.program, "texture"); | ||
586 | + glUniform1i(texture, 0); | ||
587 | + glActiveTexture(GL_TEXTURE0); | ||
588 | + | ||
589 | + return GL_NO_ERROR; | ||
590 | +} | ||
591 | + | ||
592 | +static int armsoc_repulsion_create_vbo(struct ARMSOCRepulsion *repulsion) | ||
593 | +{ | ||
594 | + glGenBuffers(1, &repulsion->gles.vbo); | ||
595 | + glBindBuffer(GL_ARRAY_BUFFER, repulsion->gles.vbo); | ||
596 | + | ||
597 | + return GL_NO_ERROR; | ||
598 | +} | ||
599 | + | ||
600 | +static int armsoc_repulsion_create_ibo(struct ARMSOCRepulsion *repulsion) | ||
601 | +{ | ||
602 | + static const GLushort indices[] = {0, 1, 2, 0, 2, 3}; | ||
603 | + | ||
604 | + glGenBuffers(1, &repulsion->gles.ibo); | ||
605 | + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, repulsion->gles.ibo); | ||
606 | + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, | ||
607 | + GL_STATIC_DRAW); | ||
608 | + | ||
609 | + return GL_NO_ERROR; | ||
610 | +} | ||
611 | + | ||
612 | +static int armsoc_repulsion_create_texture(struct ARMSOCRepulsion *repulsion) | ||
613 | +{ | ||
614 | + glGenTextures(1, &repulsion->gles.texture); | ||
615 | + glBindTexture(GL_TEXTURE_EXTERNAL_OES, repulsion->gles.texture); | ||
616 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | ||
617 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | ||
618 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, | ||
619 | + GL_CLAMP_TO_EDGE); | ||
620 | + glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, | ||
621 | + GL_CLAMP_TO_EDGE); | ||
622 | + | ||
623 | + return GL_NO_ERROR; | ||
624 | +} | ||
625 | + | ||
626 | +static int armsoc_repulsion_init_gles(struct ARMSOCRepulsion *repulsion) | ||
627 | +{ | ||
628 | + int rc; | ||
629 | + | ||
630 | + glEnable(GL_DEBUG_OUTPUT_KHR); | ||
631 | + glDebugMessageCallbackKHR(armsoc_repulsion_gles_log, repulsion); | ||
632 | + | ||
633 | + rc = armsoc_repulsion_compile_shader(repulsion); | ||
634 | + if (rc != GL_NO_ERROR) { | ||
635 | + ERROR_LOG("Failed to compile shader: 0x%04x (%s)", | ||
636 | + rc, gles_error_str(rc)); | ||
637 | + return rc; | ||
638 | + } | ||
639 | + | ||
640 | + rc = armsoc_repulsion_create_vbo(repulsion); | ||
641 | + if (rc != GL_NO_ERROR) { | ||
642 | + ERROR_LOG("Failed to create vertex buffer: 0x%04x (%s)", | ||
643 | + rc, gles_error_str(rc)); | ||
644 | + return rc; | ||
645 | + } | ||
646 | + | ||
647 | + rc = armsoc_repulsion_create_ibo(repulsion); | ||
648 | + if (rc != GL_NO_ERROR) { | ||
649 | + ERROR_LOG("Failed to create index buffer: 0x%04x (%s)", | ||
650 | + rc, gles_error_str(rc)); | ||
651 | + return rc; | ||
652 | + } | ||
653 | + | ||
654 | + rc = armsoc_repulsion_create_texture(repulsion); | ||
655 | + if (rc != GL_NO_ERROR) { | ||
656 | + ERROR_LOG("Failed to create texture: 0x%04x (%s)", | ||
657 | + rc, gles_error_str(rc)); | ||
658 | + return rc; | ||
659 | + } | ||
660 | + | ||
661 | + return GL_NO_ERROR; | ||
662 | +} | ||
663 | + | ||
664 | +static void armsoc_repulsion_release_texture(struct ARMSOCRepulsion *repulsion) | ||
665 | +{ | ||
666 | + glDeleteTextures(1, &repulsion->gles.texture); | ||
667 | +} | ||
668 | + | ||
669 | +static void armsoc_repulsion_release_ibo(struct ARMSOCRepulsion *repulsion) | ||
670 | +{ | ||
671 | + glDeleteBuffers(1, &repulsion->gles.ibo); | ||
672 | +} | ||
673 | + | ||
674 | +static void armsoc_repulsion_release_vbo(struct ARMSOCRepulsion *repulsion) | ||
675 | +{ | ||
676 | + glDeleteBuffers(1, &repulsion->gles.vbo); | ||
677 | +} | ||
678 | + | ||
679 | +static void armsoc_repulsion_release_shader(struct ARMSOCRepulsion *repulsion) | ||
680 | +{ | ||
681 | + glDeleteProgram(repulsion->gles.program); | ||
682 | +} | ||
683 | + | ||
684 | +static void armsoc_repulsion_release_gles(struct ARMSOCRepulsion *repulsion) | ||
685 | +{ | ||
686 | + armsoc_repulsion_release_texture(repulsion); | ||
687 | + armsoc_repulsion_release_ibo(repulsion); | ||
688 | + armsoc_repulsion_release_vbo(repulsion); | ||
689 | + armsoc_repulsion_release_shader(repulsion); | ||
690 | +} | ||
691 | + | ||
692 | +/* ----------------------------------------------------------------------------- | ||
693 | + * EGL Functions | ||
694 | + */ | ||
695 | + | ||
696 | +static const char* egl_error_str(EGLint err) | ||
697 | +{ | ||
698 | + switch (err) { | ||
699 | + case EGL_SUCCESS: return "no error"; | ||
700 | + case EGL_NOT_INITIALIZED: return "not initialized"; | ||
701 | + case EGL_BAD_ACCESS: return "bad access"; | ||
702 | + case EGL_BAD_ALLOC: return "bad alloc"; | ||
703 | + case EGL_BAD_CONFIG: return "bad config"; | ||
704 | + case EGL_BAD_CONTEXT: return "bad context"; | ||
705 | + case EGL_BAD_CURRENT_SURFACE: return "bad current surface"; | ||
706 | + case EGL_BAD_DISPLAY: return "bad display"; | ||
707 | + case EGL_BAD_MATCH: return "bad match"; | ||
708 | + case EGL_BAD_NATIVE_PIXMAP: return "bad native pixmap"; | ||
709 | + case EGL_BAD_NATIVE_WINDOW: return "bad native window"; | ||
710 | + case EGL_BAD_PARAMETER: return "bad parameter"; | ||
711 | + case EGL_BAD_SURFACE: return "bad surface"; | ||
712 | + case EGL_CONTEXT_LOST: return "context lost"; | ||
713 | + default: return "unknowm error"; | ||
714 | + } | ||
715 | +}; | ||
716 | + | ||
717 | +static int armsoc_repulsion_init_egl(struct ARMSOCRepulsion *repulsion) | ||
718 | +{ | ||
719 | + static const EGLint config_attrs[] = { | ||
720 | + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, | ||
721 | + EGL_CONFORMANT, EGL_OPENGL_ES2_BIT, | ||
722 | + EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, | ||
723 | + EGL_DEPTH_SIZE, 8, | ||
724 | + EGL_RED_SIZE, 8, | ||
725 | + EGL_GREEN_SIZE, 8, | ||
726 | + EGL_BLUE_SIZE, 8, | ||
727 | + EGL_ALPHA_SIZE, 8, | ||
728 | + EGL_NONE | ||
729 | + }; | ||
730 | + static const EGLint context_attrs[] = { | ||
731 | + EGL_CONTEXT_CLIENT_VERSION, 2, | ||
732 | + EGL_NONE | ||
733 | + }; | ||
734 | + EGLint count; | ||
735 | + EGLConfig config; | ||
736 | + | ||
737 | + repulsion->egl.display = eglGetDisplay(EGL_DEFAULT_DISPLAY); | ||
738 | + if (repulsion->egl.display == EGL_NO_DISPLAY) | ||
739 | + return eglGetError(); | ||
740 | + | ||
741 | + if(!eglInitialize(repulsion->egl.display, NULL, NULL)) | ||
742 | + return eglGetError(); | ||
743 | + | ||
744 | + if (!eglChooseConfig(repulsion->egl.display, config_attrs, &config, 1, | ||
745 | + &count)) | ||
746 | + return eglGetError(); | ||
747 | + | ||
748 | + if (!eglBindAPI(EGL_OPENGL_ES_API)) | ||
749 | + return eglGetError(); | ||
750 | + | ||
751 | + repulsion->egl.context = eglCreateContext(repulsion->egl.display, config, | ||
752 | + EGL_NO_CONTEXT, context_attrs); | ||
753 | + if (repulsion->egl.context == EGL_NO_CONTEXT) | ||
754 | + return eglGetError(); | ||
755 | + | ||
756 | + repulsion->egl.surface = eglCreatePbufferSurface(repulsion->egl.display, | ||
757 | + config, NULL); | ||
758 | + if (repulsion->egl.surface == EGL_NO_SURFACE) | ||
759 | + return eglGetError(); | ||
760 | + | ||
761 | + if (!eglMakeCurrent(repulsion->egl.display, repulsion->egl.surface, | ||
762 | + repulsion->egl.surface, repulsion->egl.context)) | ||
763 | + return eglGetError(); | ||
764 | + | ||
765 | + if (!eglSwapInterval(repulsion->egl.display, 0)) | ||
766 | + return eglGetError(); | ||
767 | + | ||
768 | + return EGL_SUCCESS; | ||
769 | +} | ||
770 | + | ||
771 | +static void armsoc_repulsion_release_egl(struct ARMSOCRepulsion *repulsion) | ||
772 | +{ | ||
773 | + if (repulsion->egl.surface != EGL_NO_SURFACE) | ||
774 | + eglDestroySurface(repulsion->egl.display, repulsion->egl.surface); | ||
775 | + | ||
776 | + if (repulsion->egl.context) | ||
777 | + eglDestroyContext(repulsion->egl.display, repulsion->egl.context); | ||
778 | + | ||
779 | + if (repulsion->egl.display) | ||
780 | + eglTerminate(repulsion->egl.display); | ||
781 | + | ||
782 | + repulsion->egl.display = EGL_NO_DISPLAY; | ||
783 | +} | ||
784 | + | ||
785 | +static EGLint armsoc_repulsion_guess_bo_format(struct armsoc_bo *bo) | ||
786 | +{ | ||
787 | + switch(armsoc_bo_bpp(bo)) { | ||
788 | + case 16: | ||
789 | + return DRM_FORMAT_RGB565; | ||
790 | + case 32: | ||
791 | + return DRM_FORMAT_ARGB8888; | ||
792 | + default: | ||
793 | + return 0; | ||
794 | + } | ||
795 | +} | ||
796 | + | ||
797 | +static EGLImageKHR | ||
798 | +armsoc_repulsion_create_egl_image(struct ARMSOCRepulsion *repulsion, | ||
799 | + struct armsoc_bo *bo) | ||
800 | +{ | ||
801 | + const EGLint attributes[] = { | ||
802 | + EGL_WIDTH, armsoc_bo_width(bo), | ||
803 | + EGL_HEIGHT, armsoc_bo_height(bo), | ||
804 | + EGL_LINUX_DRM_FOURCC_EXT, armsoc_repulsion_guess_bo_format(bo), | ||
805 | + EGL_DMA_BUF_PLANE0_FD_EXT, armsoc_bo_get_dmabuf(bo), | ||
806 | + EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, | ||
807 | + EGL_DMA_BUF_PLANE0_PITCH_EXT, armsoc_bo_pitch(bo), | ||
808 | + EGL_NONE | ||
809 | + }; | ||
810 | + | ||
811 | + return eglCreateImageKHR(repulsion->egl.display, EGL_NO_CONTEXT, | ||
812 | + EGL_LINUX_DMA_BUF_EXT, NULL, attributes); | ||
813 | +} | ||
814 | + | ||
815 | +static void | ||
816 | +armsoc_repulsion_destroy_egl_image(struct ARMSOCRepulsion *repulsion, | ||
817 | + EGLImageKHR img) | ||
818 | +{ | ||
819 | + eglDestroyImageKHR(repulsion->egl.display, img); | ||
820 | +} | ||
821 | + | ||
822 | +/* ----------------------------------------------------------------------------- | ||
823 | + * Repulsion API | ||
824 | + */ | ||
825 | + | ||
826 | +bool armsoc_repulsion_composite(struct ARMSOCRepulsion *repulsion, | ||
827 | + struct armsoc_bo *src, | ||
828 | + struct armsoc_bo *dest, | ||
829 | + float xform_matrix[3][3]) | ||
830 | +{ | ||
831 | + GLuint tex, fbo; | ||
832 | + GLenum status; | ||
833 | + EGLImageKHR dest_img, src_img; | ||
834 | + GLsizei width, height; | ||
835 | + static GLfloat proj_matrix[3][3] = { | ||
836 | + { 2.f, 0.f, 0.f }, | ||
837 | + { 0.f, 2.f, 0.f }, | ||
838 | + { -1.f, -1.f, 0.f }, | ||
839 | + }; | ||
840 | + | ||
841 | + if (!repulsion || !src || !dest) | ||
842 | + return false; | ||
843 | + | ||
844 | + dest_img = armsoc_repulsion_create_egl_image(repulsion, dest); | ||
845 | + if (dest_img == EGL_NO_IMAGE_KHR) { | ||
846 | + EGLint err = eglGetError(); | ||
847 | + ERROR_LOG("Failed to create dest EGL image: 0x%04x (%s)", | ||
848 | + err, egl_error_str(err)); | ||
849 | + return false; | ||
850 | + } | ||
851 | + src_img = armsoc_repulsion_create_egl_image(repulsion, src); | ||
852 | + if (src_img == EGL_NO_IMAGE_KHR) { | ||
853 | + EGLint err = eglGetError(); | ||
854 | + ERROR_LOG("Failed to create src EGL image: 0x%04x (%s)", | ||
855 | + err, egl_error_str(err)); | ||
856 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
857 | + return false; | ||
858 | + } | ||
859 | + | ||
860 | + glGenTextures(1, &tex); | ||
861 | + glBindTexture(GL_TEXTURE_2D, tex); | ||
862 | + glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, dest_img); | ||
863 | + | ||
864 | + glGenFramebuffers(1, &fbo); | ||
865 | + glBindFramebuffer(GL_FRAMEBUFFER, fbo); | ||
866 | + | ||
867 | + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | ||
868 | + GL_TEXTURE_2D, tex, 0); | ||
869 | + | ||
870 | + status = glCheckFramebufferStatus(GL_FRAMEBUFFER); | ||
871 | + if (status != GL_FRAMEBUFFER_COMPLETE) { | ||
872 | + ERROR_LOG("Failed to complete framebuffer"); | ||
873 | + glDeleteFramebuffers(1, &fbo); | ||
874 | + glDeleteTextures(1, &tex); | ||
875 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
876 | + armsoc_repulsion_destroy_egl_image(repulsion, src_img); | ||
877 | + return false; | ||
878 | + } | ||
879 | + | ||
880 | + width = armsoc_bo_width(dest); | ||
881 | + height = armsoc_bo_height(dest); | ||
882 | + proj_matrix[0][0] = 2.f / width; | ||
883 | + proj_matrix[1][1] = 2.f / height; | ||
884 | + | ||
885 | + glUniformMatrix3fv(repulsion->gles.proj_location, 1, false, | ||
886 | + &proj_matrix[0][0]); | ||
887 | + | ||
888 | + glUniformMatrix3fv(repulsion->gles.xform_location, 1, false, | ||
889 | + &xform_matrix[0][0]); | ||
890 | + | ||
891 | + glViewport(0, 0, width, height); | ||
892 | + | ||
893 | + glClearColor(0.f, 0.f, 1.f, 1.f); | ||
894 | + glClear(GL_COLOR_BUFFER_BIT); | ||
895 | + | ||
896 | + glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, src_img); | ||
897 | + | ||
898 | + repulsion->gles.vertices[0].pos[0] = 0.f; | ||
899 | + repulsion->gles.vertices[0].pos[1] = height; | ||
900 | + repulsion->gles.vertices[0].pos[2] = 1.f; | ||
901 | + repulsion->gles.vertices[0].uv[0] = 0.f; | ||
902 | + repulsion->gles.vertices[0].uv[1] = 1.f; | ||
903 | + | ||
904 | + repulsion->gles.vertices[1].pos[0] = 0.f; | ||
905 | + repulsion->gles.vertices[1].pos[1] = 0.f; | ||
906 | + repulsion->gles.vertices[1].pos[2] = 1.f; | ||
907 | + repulsion->gles.vertices[1].uv[0] = 0.f; | ||
908 | + repulsion->gles.vertices[1].uv[1] = 0.f; | ||
909 | + | ||
910 | + repulsion->gles.vertices[2].pos[0] = width; | ||
911 | + repulsion->gles.vertices[2].pos[1] = 0.f; | ||
912 | + repulsion->gles.vertices[2].pos[2] = 1.f; | ||
913 | + repulsion->gles.vertices[2].uv[0] = 1.f; | ||
914 | + repulsion->gles.vertices[2].uv[1] = 0.f; | ||
915 | + | ||
916 | + repulsion->gles.vertices[3].pos[0] = width; | ||
917 | + repulsion->gles.vertices[3].pos[1] = height; | ||
918 | + repulsion->gles.vertices[3].pos[2] = 1.f; | ||
919 | + repulsion->gles.vertices[3].uv[0] = 1.f; | ||
920 | + repulsion->gles.vertices[3].uv[1] = 1.f; | ||
921 | + | ||
922 | + glBufferData(GL_ARRAY_BUFFER, sizeof(repulsion->gles.vertices), | ||
923 | + repulsion->gles.vertices, GL_STATIC_DRAW); | ||
924 | + | ||
925 | + glVertexAttribPointer(SHADER_POSITION_ATTR_SLOT, 3, GL_FLOAT, GL_FALSE, | ||
926 | + sizeof(*repulsion->gles.vertices), (const void *)(0)); | ||
927 | + glVertexAttribPointer(SHADER_TEX_COOR_ATTR_SLOT, 2, GL_FLOAT, GL_FALSE, | ||
928 | + sizeof(*repulsion->gles.vertices), | ||
929 | + (const void *)(sizeof(repulsion->gles.vertices->pos))); | ||
930 | + | ||
931 | + glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); | ||
932 | + | ||
933 | + glFinish(); | ||
934 | + | ||
935 | + glBindFramebuffer(GL_FRAMEBUFFER, 0); | ||
936 | + glDeleteFramebuffers(1, &fbo); | ||
937 | + glDeleteTextures(1, &tex); | ||
938 | + | ||
939 | + armsoc_repulsion_destroy_egl_image(repulsion, src_img); | ||
940 | + armsoc_repulsion_destroy_egl_image(repulsion, dest_img); | ||
941 | + | ||
942 | + return true; | ||
943 | +} | ||
944 | + | ||
945 | +struct ARMSOCRepulsion *armsoc_repulsion_init(void) | ||
946 | +{ | ||
947 | + int rc; | ||
948 | + struct ARMSOCRepulsion *repulsion = calloc(1, sizeof(*repulsion)); | ||
949 | + if (!repulsion) { | ||
950 | + ERROR_LOG("Out of memory"); | ||
951 | + return NULL; | ||
952 | + } | ||
953 | + | ||
954 | + rc = armsoc_repulsion_init_egl(repulsion); | ||
955 | + if (rc != EGL_SUCCESS) { | ||
956 | + ERROR_LOG("Failed to initialize EGL: 0x%04x (%s)", | ||
957 | + rc, egl_error_str(rc)); | ||
958 | + armsoc_repulsion_release(repulsion); | ||
959 | + return NULL; | ||
960 | + } | ||
961 | + | ||
962 | + rc = armsoc_repulsion_init_gles(repulsion); | ||
963 | + if (rc != GL_NO_ERROR) { | ||
964 | + ERROR_LOG("Failed to initialize GLES: 0x%04x (%s)", | ||
965 | + rc, gles_error_str(rc)); | ||
966 | + armsoc_repulsion_release(repulsion); | ||
967 | + return NULL; | ||
968 | + } | ||
969 | + | ||
970 | + INFO_LOG("Repulsion initialized"); | ||
971 | + | ||
972 | + return repulsion; | ||
973 | +} | ||
974 | + | ||
975 | +void armsoc_repulsion_release(struct ARMSOCRepulsion *repulsion) | ||
976 | +{ | ||
977 | + if (!repulsion) | ||
978 | + return; | ||
979 | + armsoc_repulsion_release_gles(repulsion); | ||
980 | + armsoc_repulsion_release_egl(repulsion); | ||
981 | + free(repulsion); | ||
982 | +} | ||
983 | diff --git a/src/armsoc_repulsion.h b/src/armsoc_repulsion.h | ||
984 | new file mode 100644 | ||
985 | index 0000000..b5e57df | ||
986 | --- /dev/null | ||
987 | +++ b/src/armsoc_repulsion.h | ||
988 | @@ -0,0 +1,67 @@ | ||
989 | +/* | ||
990 | + * Copyright (C) 2024 AMD, Inc. | ||
991 | + * | ||
992 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
993 | + * copy of this software and associated documentation files (the "Software"), | ||
994 | + * to deal in the Software without restriction, including without limitation | ||
995 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
996 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
997 | + * Software is furnished to do so, subject to the following conditions: | ||
998 | + * | ||
999 | + * The above copyright notice and this permission notice (including the next | ||
1000 | + * paragraph) shall be included in all copies or substantial portions of the | ||
1001 | + * Software. | ||
1002 | + * | ||
1003 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
1004 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
1005 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
1006 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
1007 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
1008 | + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
1009 | + * SOFTWARE. | ||
1010 | + * | ||
1011 | + * Author: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
1012 | + * | ||
1013 | + */ | ||
1014 | + | ||
1015 | +#ifndef ARMSOC_REPULSION_H_ | ||
1016 | +#define ARMSOC_REPULSION_H_ | ||
1017 | + | ||
1018 | +#include <stdbool.h> | ||
1019 | +#include "armsoc_dumb.h" | ||
1020 | + | ||
1021 | +struct ARMSOCRepulsion; | ||
1022 | + | ||
1023 | +/** | ||
1024 | + * Initialize armsoc repulsion compositor. | ||
1025 | + * | ||
1026 | + * Return: pointer to new ARMSOCRepulsion object on success, NULL otherwise. | ||
1027 | + */ | ||
1028 | +struct ARMSOCRepulsion *armsoc_repulsion_init(void); | ||
1029 | + | ||
1030 | +/** | ||
1031 | + * Release armsoc repulsion compositor and free all resources. | ||
1032 | + * @repulsion: pointer to previously allocated ARMSOCRepulsion object. | ||
1033 | + */ | ||
1034 | +void armsoc_repulsion_release(struct ARMSOCRepulsion *repulsion); | ||
1035 | + | ||
1036 | +/** | ||
1037 | + * Perform 2 image composition. | ||
1038 | + * @repulsion: pointer to ARMSOCRepulsion object. | ||
1039 | + * @src: source buffer object. | ||
1040 | + * @dest: destination buffer object. | ||
1041 | + * @xform_matrix: transformation matrix to apply to source image before copying | ||
1042 | + * it into destination. | ||
1043 | + * | ||
1044 | + * This function performs GPU accelerated copy of @src buffer into @dest buffer | ||
1045 | + * while applying linear transformation. | ||
1046 | + * | ||
1047 | + * Return: pointer to new ARMSOCRepulsion object on success, NULL otherwise. | ||
1048 | + */ | ||
1049 | +bool armsoc_repulsion_composite(struct ARMSOCRepulsion *repulsion, | ||
1050 | + struct armsoc_bo *src, | ||
1051 | + struct armsoc_bo *dest, | ||
1052 | + float xform_matrix[3][3]); | ||
1053 | + | ||
1054 | + | ||
1055 | +#endif // ARMSOC_REPULSION_H_ | ||
1056 | -- | ||
1057 | 2.25.1 | ||
1058 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch new file mode 100644 index 00000000..9cc186de --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armosc-Option-to-control-acceleration.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 83047c38b0a9e8cc535eba580ca28497f1bee544 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Fri, 19 Jul 2024 14:10:22 -0700 | ||
4 | Subject: [PATCH] xf86-video-armosc: Option to control acceleration | ||
5 | |||
6 | Add xorg config option to enable / disable GPU accelerated picture | ||
7 | composition. Enable acceleration by default. | ||
8 | |||
9 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
10 | --- | ||
11 | man/armsoc.man | 6 ++++++ | ||
12 | src/armsoc_driver.c | 20 +++++++++++++++----- | ||
13 | src/armsoc_driver.h | 3 +++ | ||
14 | 3 files changed, 24 insertions(+), 5 deletions(-) | ||
15 | |||
16 | diff --git a/man/armsoc.man b/man/armsoc.man | ||
17 | index d85c2fa..cdeb19e 100644 | ||
18 | --- a/man/armsoc.man | ||
19 | +++ b/man/armsoc.man | ||
20 | @@ -69,6 +69,12 @@ Default: NULL | ||
21 | Use the umplock module for cross-process access synchronization. It should be only enabled for Mali400 | ||
22 | .IP | ||
23 | Default: Umplock is Disabled | ||
24 | +.TP | ||
25 | +.BI "Option \*qAccelerateComposition\*q \*q" boolean \*q | ||
26 | +Accelerate picture composition on GPU. | ||
27 | +.IP | ||
28 | +Default: Accelerated composition is Enabled | ||
29 | + | ||
30 | |||
31 | .SH DRM DEVICE SELECTION | ||
32 | |||
33 | diff --git a/src/armsoc_driver.c b/src/armsoc_driver.c | ||
34 | index f5b8f21..15cc620 100644 | ||
35 | --- a/src/armsoc_driver.c | ||
36 | +++ b/src/armsoc_driver.c | ||
37 | @@ -110,6 +110,7 @@ enum { | ||
38 | OPTION_DRI_NUM_BUF, | ||
39 | OPTION_INIT_FROM_FBDEV, | ||
40 | OPTION_UMP_LOCK, | ||
41 | + OPTION_ACCELERATE_COMPOSITION, | ||
42 | }; | ||
43 | |||
44 | /** Supported options. */ | ||
45 | @@ -122,6 +123,8 @@ static const OptionInfoRec ARMSOCOptions[] = { | ||
46 | { OPTION_DRI_NUM_BUF, "DRI2MaxBuffers", OPTV_INTEGER, {-1}, FALSE }, | ||
47 | { OPTION_INIT_FROM_FBDEV, "InitFromFBDev", OPTV_STRING, {0}, FALSE }, | ||
48 | { OPTION_UMP_LOCK, "UMP_LOCK", OPTV_BOOLEAN, {0}, FALSE }, | ||
49 | + { OPTION_ACCELERATE_COMPOSITION, "AccelerateComposition", OPTV_BOOLEAN, | ||
50 | + {0}, FALSE }, | ||
51 | { -1, NULL, OPTV_NONE, {0}, FALSE } | ||
52 | }; | ||
53 | |||
54 | @@ -871,6 +874,10 @@ ARMSOCPreInit(ScrnInfoPtr pScrn, int flags) | ||
55 | armsocDebug = xf86ReturnOptValBool(pARMSOC->pOptionInfo, | ||
56 | OPTION_DEBUG, FALSE); | ||
57 | |||
58 | + /* Should we enable GPU accelerated picture composition? */ | ||
59 | + pARMSOC->enable_repulsion = xf86ReturnOptValBool(pARMSOC->pOptionInfo, | ||
60 | + OPTION_ACCELERATE_COMPOSITION, TRUE); | ||
61 | + | ||
62 | if (!xf86GetOptValInteger(pARMSOC->pOptionInfo, OPTION_DRI_NUM_BUF, | ||
63 | &driNumBufs)) { | ||
64 | /* Default to double buffering */ | ||
65 | @@ -1119,7 +1126,6 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
66 | struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
67 | VisualPtr visual; | ||
68 | xf86CrtcConfigPtr xf86_config; | ||
69 | - PictureScreenPtr ps; | ||
70 | int j; | ||
71 | const char *fbdev; | ||
72 | int depth; | ||
73 | @@ -1308,12 +1314,16 @@ ARMSOCScreenInit(SCREEN_INIT_ARGS_DECL) | ||
74 | pARMSOC->lockFD = -1; | ||
75 | } | ||
76 | |||
77 | - pARMSOC->repulsion = armsoc_repulsion_init(); | ||
78 | + if (pARMSOC->enable_repulsion) { | ||
79 | + PictureScreenPtr ps; | ||
80 | + | ||
81 | + pARMSOC->repulsion = armsoc_repulsion_init(); | ||
82 | |||
83 | - ps = GetPictureScreen(pScreen); | ||
84 | - pARMSOC->composite_proc = ps->Composite; | ||
85 | + ps = GetPictureScreen(pScreen); | ||
86 | + pARMSOC->composite_proc = ps->Composite; | ||
87 | |||
88 | - ps->Composite = ARMSOCComposite; | ||
89 | + ps->Composite = ARMSOCComposite; | ||
90 | + } | ||
91 | |||
92 | TRACE_EXIT(); | ||
93 | return TRUE; | ||
94 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
95 | index 20b0f80..27e978e 100644 | ||
96 | --- a/src/armsoc_driver.h | ||
97 | +++ b/src/armsoc_driver.h | ||
98 | @@ -185,6 +185,9 @@ struct ARMSOCRec { | ||
99 | * driNumBufs if early display enabled, otherwise driNumBufs-1 */ | ||
100 | unsigned int swap_chain_size; | ||
101 | |||
102 | + /* Enable GPU accelerated picture compositor? */ | ||
103 | + Bool enable_repulsion; | ||
104 | + | ||
105 | /* GPU accelerated picture compositor, AKA Repulsion */ | ||
106 | struct ARMSOCRepulsion *repulsion; | ||
107 | |||
108 | -- | ||
109 | 2.25.1 | ||
110 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch new file mode 100644 index 00000000..8a1a8ca7 --- /dev/null +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch | |||
@@ -0,0 +1,141 @@ | |||
1 | From 8c62932a848c3c9eef8b663a24d90026687d5b02 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Thu, 13 Jun 2024 17:37:46 -0700 | ||
4 | Subject: [PATCH] xf86-video-armsoc: Add shadow buffer hooks | ||
5 | |||
6 | Add shadow buffer management callbacks. These callbacks are required for | ||
7 | RandR extension to operate. Implement the shadow buffer as a dumb DRM | ||
8 | framebuffer. Use the shadow buffer as page flip souce. Fix armsoc_dri2.c | ||
9 | file mode (drop exec bits). | ||
10 | |||
11 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
12 | --- | ||
13 | src/armsoc_dri2.c | 3 ++ | ||
14 | src/armsoc_driver.h | 3 ++ | ||
15 | src/drmmode_display.c | 65 +++++++++++++++++++++++++++++++++++++++++++ | ||
16 | 3 files changed, 71 insertions(+) | ||
17 | mode change 100755 => 100644 src/armsoc_dri2.c | ||
18 | |||
19 | diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c | ||
20 | old mode 100755 | ||
21 | new mode 100644 | ||
22 | index dc502e4..af5d074 | ||
23 | --- a/src/armsoc_dri2.c | ||
24 | +++ b/src/armsoc_dri2.c | ||
25 | @@ -853,6 +853,9 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw, | ||
26 | (armsoc_bo_height(src_bo) == armsoc_bo_height(dst_bo)); | ||
27 | |||
28 | if (do_flip) { | ||
29 | + if (pARMSOC->shadow) | ||
30 | + src_fb_id = armsoc_bo_get_fb(pARMSOC->shadow); | ||
31 | + | ||
32 | DEBUG_MSG("FLIPPING: FB%d -> FB%d", src_fb_id, dst_fb_id); | ||
33 | cmd->type = DRI2_FLIP_COMPLETE; | ||
34 | |||
35 | diff --git a/src/armsoc_driver.h b/src/armsoc_driver.h | ||
36 | index ef2836f..eae76ca 100644 | ||
37 | --- a/src/armsoc_driver.h | ||
38 | +++ b/src/armsoc_driver.h | ||
39 | @@ -149,6 +149,9 @@ struct ARMSOCRec { | ||
40 | /** Scan-out buffer. */ | ||
41 | struct armsoc_bo *scanout; | ||
42 | |||
43 | + /** Rotation shadow buffer */ | ||
44 | + struct armsoc_bo *shadow; | ||
45 | + | ||
46 | /** Pointer to the options for this screen. */ | ||
47 | OptionInfoPtr pOptionInfo; | ||
48 | |||
49 | diff --git a/src/drmmode_display.c b/src/drmmode_display.c | ||
50 | index 39fa75c..f054b3a 100644 | ||
51 | --- a/src/drmmode_display.c | ||
52 | +++ b/src/drmmode_display.c | ||
53 | @@ -333,6 +333,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, | ||
54 | goto cleanup; | ||
55 | } | ||
56 | |||
57 | + if (pARMSOC->shadow) | ||
58 | + fb_id = armsoc_bo_get_fb(pARMSOC->shadow); | ||
59 | + | ||
60 | if (crtc->funcs->gamma_set) | ||
61 | crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, | ||
62 | crtc->gamma_blue, crtc->gamma_size); | ||
63 | @@ -860,6 +863,65 @@ drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, | ||
64 | } | ||
65 | #endif | ||
66 | |||
67 | +static void* | ||
68 | +drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height) | ||
69 | +{ | ||
70 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
71 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
72 | + struct armsoc_bo *bo; | ||
73 | + int ret; | ||
74 | + | ||
75 | + bo = armsoc_bo_new_with_dim(pARMSOC->dev, width, height, | ||
76 | + pScrn->bitsPerPixel, pScrn->bitsPerPixel, ARMSOC_BO_SCANOUT); | ||
77 | + if (!bo) | ||
78 | + return NULL; | ||
79 | + | ||
80 | + /* We will use this bo as a scanout, so add it as a framebuffer */ | ||
81 | + ret = armsoc_bo_add_fb(bo); | ||
82 | + if (ret) { | ||
83 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
84 | + "failed to add framebuffer: %s\n", strerror(-ret)); | ||
85 | + armsoc_bo_unreference(bo); | ||
86 | + return NULL; | ||
87 | + } | ||
88 | + | ||
89 | + pARMSOC->shadow = bo; | ||
90 | + | ||
91 | + return bo; | ||
92 | +} | ||
93 | + | ||
94 | +static PixmapPtr | ||
95 | +drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) | ||
96 | +{ | ||
97 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
98 | + ScreenPtr pScreen = pScrn->pScreen; | ||
99 | + struct armsoc_bo *bo = data; | ||
100 | + PixmapPtr pixmap; | ||
101 | + | ||
102 | + pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, armsoc_bo_depth(bo), 0); | ||
103 | + if (!pixmap) { | ||
104 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to create pixmap.\n"); | ||
105 | + return NULL; | ||
106 | + } | ||
107 | + (*pScreen->ModifyPixmapHeader)(pixmap, armsoc_bo_width(bo), | ||
108 | + armsoc_bo_height(bo), armsoc_bo_depth(bo), armsoc_bo_bpp(bo), | ||
109 | + armsoc_bo_pitch(bo), armsoc_bo_map(bo)); | ||
110 | + | ||
111 | + return pixmap; | ||
112 | +} | ||
113 | + | ||
114 | +static void | ||
115 | +drmmode_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data) | ||
116 | +{ | ||
117 | + ScrnInfoPtr pScrn = crtc->scrn; | ||
118 | + struct ARMSOCRec *pARMSOC = ARMSOCPTR(pScrn); | ||
119 | + struct armsoc_bo *bo = data; | ||
120 | + | ||
121 | + armsoc_bo_unreference(bo); | ||
122 | + | ||
123 | + pARMSOC->shadow = NULL; | ||
124 | +} | ||
125 | + | ||
126 | static const xf86CrtcFuncsRec drmmode_crtc_funcs = { | ||
127 | .dpms = drmmode_crtc_dpms, | ||
128 | .set_mode_major = drmmode_set_mode_major, | ||
129 | @@ -870,6 +932,9 @@ static const xf86CrtcFuncsRec drmmode_crtc_funcs = { | ||
130 | #if 1 == ARMSOC_SUPPORT_GAMMA | ||
131 | .gamma_set = drmmode_gamma_set, | ||
132 | #endif | ||
133 | + .shadow_allocate = drmmode_shadow_allocate, | ||
134 | + .shadow_create = drmmode_shadow_create, | ||
135 | + .shadow_destroy = drmmode_shadow_destroy, | ||
136 | }; | ||
137 | |||
138 | |||
139 | -- | ||
140 | 2.25.1 | ||
141 | |||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend index f7b52f58..9f8af267 100644 --- a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-graphics/xorg-driver/xf86-video-armsoc_%.bbappend | |||
@@ -2,4 +2,12 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/xf86-video-armsoc:" | |||
2 | 2 | ||
3 | SRC_URI:append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ | 3 | SRC_URI:append = " file://0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch \ |
4 | file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \ | 4 | file://0001-armsoc_driver.c-Bypass-the-exa-layer-to-free-the-roo.patch \ |
5 | " | 5 | file://0001-xf86-video-armsoc-Add-shadow-buffer-hooks.patch \ |
6 | " | ||
7 | EXTRA_MALI400_SRC = " file://0001-xf86-video-armosc-Accelerate-picture-composition.patch \ | ||
8 | file://0001-xf86-video-armosc-Option-to-control-acceleration.patch \ | ||
9 | " | ||
10 | SRC_URI:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${EXTRA_MALI400_SRC}', '', d)}" | ||
11 | |||
12 | DEPENDS:append = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', ' libmali-xlnx', '', d)}" | ||
13 | |||
diff --git a/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend b/meta-xilinx-core/dynamic-layers/virtualization-layer/recipes-kernel/lopper/lopper_git.bbappend index 8a2b7a46..6de745a5 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,9 +1,9 @@ | |||
1 | SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=v0.2024.x;protocol=https" | 1 | SRC_URI = "git://github.com/devicetree-org/lopper.git;branch=master;protocol=https" |
2 | SRCREV = "4fb08575157d7712e0cd50e9e9c07620bc9f8b4b" | 2 | SRCREV = "c0facd087263a24a83f7fad917884348db03175d" |
3 | 3 | ||
4 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" | 4 | FILESEXTRAPATHS:prepend := "${THISDIR}/lopper:" |
5 | 5 | ||
6 | BASEVERSION = "1.1.0" | 6 | BASEVERSION = "1.2.0" |
7 | 7 | ||
8 | RDEPENDS:${PN} += " \ | 8 | RDEPENDS:${PN} += " \ |
9 | python3-ruamel-yaml \ | 9 | python3-ruamel-yaml \ |
diff --git a/meta-xilinx-core/gen-machine-conf b/meta-xilinx-core/gen-machine-conf | |||
Subproject e3968c5d6b1d02b2c1fa51de838f0757bca1c16 | Subproject 3e691e28bf47876fb7e0c4be3c62be6b9d46bf8 | ||
diff --git a/meta-xilinx-core/lib/devtool/boot-jtag.py b/meta-xilinx-core/lib/devtool/boot-jtag.py index 247851ec..2d8a7d8f 100644 --- a/meta-xilinx-core/lib/devtool/boot-jtag.py +++ b/meta-xilinx-core/lib/devtool/boot-jtag.py | |||
@@ -8,12 +8,9 @@ | |||
8 | # yocto generated images on HW via jtag boot mode. | 8 | # yocto generated images on HW via jtag boot mode. |
9 | 9 | ||
10 | import os | 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 | 11 | import glob |
12 | import logging | ||
13 | from devtool import setup_tinfoil | ||
17 | 14 | ||
18 | logger = logging.getLogger('devtool') | 15 | logger = logging.getLogger('devtool') |
19 | 16 | ||
@@ -24,8 +21,8 @@ def bootjtag(args, config, basepath, workspace): | |||
24 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') | 21 | print('\nINFO: Please specify the target image name. \n\nExample: --image core-image-minimal or petalinux-image-minimal') |
25 | return | 22 | return |
26 | 23 | ||
27 | # Get required boot variables | ||
28 | tinfoil = setup_tinfoil(basepath=basepath) | 24 | tinfoil = setup_tinfoil(basepath=basepath) |
25 | # Get required boot variables | ||
29 | try: | 26 | try: |
30 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') | 27 | rd = tinfoil.parse_recipe('u-boot-xlnx-scr') |
31 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') | 28 | deploy_dir = rd.getVar('DEPLOY_DIR_IMAGE') |
@@ -39,6 +36,7 @@ def bootjtag(args, config, basepath, workspace): | |||
39 | rootfs_load_addr = rd.getVar('RAMDISK_IMAGE_ADDRESS') | 36 | rootfs_load_addr = rd.getVar('RAMDISK_IMAGE_ADDRESS') |
40 | machine_features = rd.getVar('MACHINE_FEATURES') | 37 | machine_features = rd.getVar('MACHINE_FEATURES') |
41 | boot_mode = rd.getVar('BOOTMODE') | 38 | boot_mode = rd.getVar('BOOTMODE') |
39 | image_name_suffix = rd.getVar('IMAGE_NAME_SUFFIX') | ||
42 | finally: | 40 | finally: |
43 | tinfoil.shutdown() | 41 | tinfoil.shutdown() |
44 | 42 | ||
@@ -99,7 +97,7 @@ def bootjtag(args, config, basepath, workspace): | |||
99 | data['kernel'] = os.path.join(deploy_dir, kernel_img_name) | 97 | data['kernel'] = os.path.join(deploy_dir, kernel_img_name) |
100 | 98 | ||
101 | if not args.norootfs: | 99 | if not args.norootfs: |
102 | data['rfs'] = os.path.join(deploy_dir, args.image + '-' + machine + '.cpio.gz.u-boot') | 100 | data['rfs'] = os.path.join(deploy_dir, args.image + '-' + machine + image_name_suffix + '.cpio.gz.u-boot') |
103 | 101 | ||
104 | # Check if all the required boot images exists | 102 | # Check if all the required boot images exists |
105 | for key in data: | 103 | for key in data: |
@@ -258,19 +256,19 @@ def bootjtag(args, config, basepath, workspace): | |||
258 | 256 | ||
259 | def register_commands(subparsers, context): | 257 | def register_commands(subparsers, context): |
260 | """Register devtool subcommands from this plugin""" | 258 | """Register devtool subcommands from this plugin""" |
261 | parser_bootjtag = subparsers.add_parser('boot-jtag', | 259 | parser_bootjtag = subparsers.add_parser('boot-jtag', |
262 | help='Script to deploy target images on HW via JTAG boot mode.', | 260 | help='Script to deploy target images on HW via JTAG boot mode.', |
263 | description='Script to deploy target images on HW via JTAG boot mode. \ | 261 | description='Script to deploy target images on HW via JTAG boot mode. \ |
264 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') | 262 | Example command: MACHINE=zcu102-zynqmp devtool boot-jtag --image ${image_name} --hw_server ${hw_server}') |
265 | required = parser_bootjtag.add_argument_group('required arguments') | 263 | required = parser_bootjtag.add_argument_group('required arguments') |
266 | required.add_argument('--image', | 264 | required.add_argument('--image', |
267 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') | 265 | help='Specify target image name. Example: core-image-minimal or petalinux-image-minimal') |
268 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', | 266 | parser_bootjtag.add_argument('--hw_server', nargs='?', default='TCP:localhost:3121', |
269 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ | 267 | help='URL description of hw_server/TCF agent and port number. (default: %(default)s) \ |
270 | Example: --hw_server TCP:puffball12:3121') | 268 | Example: --hw_server TCP:puffball12:3121') |
271 | 269 | ||
272 | parser_bootjtag.add_argument('-v', '--verbose', | 270 | parser_bootjtag.add_argument('-v', '--verbose', |
273 | help='verbose mode', action="store_true") | 271 | help='verbose mode', action="store_true") |
274 | parser_bootjtag.add_argument('-n', '--norootfs', | 272 | parser_bootjtag.add_argument('-n', '--norootfs', |
275 | help='Don\'t include rootfs', action='store_true') | 273 | help='Don\'t include rootfs', action='store_true') |
276 | parser_bootjtag.set_defaults(func=bootjtag, no_workspace=True) | 274 | 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.3.bb index 63718813..828a3ca1 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.3.bb | |||
@@ -6,9 +6,9 @@ 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 = "xlnx_rel_v2024.1" | 9 | BRANCH = "master" |
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 = "1bd7d7405b484d808176c6e711691a846c18b4f0" |
12 | 12 | ||
13 | RDEPENDS:${PN} += "freeipmi" | 13 | RDEPENDS:${PN} += "freeipmi" |
14 | 14 | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/python-async.inc b/meta-xilinx-core/recipes-apps/raft/python-async.inc new file mode 100644 index 00000000..fde86460 --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/python-async.inc | |||
@@ -0,0 +1,14 @@ | |||
1 | SUMMARY = "Python framework to process interdependent tasks in a pool of workers" | ||
2 | HOMEPAGE = "http://github.com/gitpython-developers/async" | ||
3 | SECTION = "devel/python" | ||
4 | LICENSE = "BSD-3-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://PKG-INFO;beginline=8;endline=8;md5=88df8e78b9edfd744953862179f2d14e" | ||
6 | |||
7 | inherit pypi | ||
8 | |||
9 | SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b" | ||
10 | SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051" | ||
11 | |||
12 | RDEPENDS:${PN} += "${PYTHON_PN}-threading" | ||
13 | |||
14 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb b/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb new file mode 100644 index 00000000..0da5fdec --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/python3-async_0.6.2.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | inherit setuptools3 | ||
2 | require python-async.inc | ||
diff --git a/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb b/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb new file mode 100644 index 00000000..a287d8ce --- /dev/null +++ b/meta-xilinx-core/recipes-apps/raft/raft_2024.1.bb | |||
@@ -0,0 +1,65 @@ | |||
1 | SUMMARY = "RAFT python application" | ||
2 | LICENSE = "MIT & BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = " \ | ||
4 | file://${WORKDIR}/git/LICENSE;md5=cc21c526211d34984839aa67dd16f172 \ | ||
5 | file://${WORKDIR}/git/docs/LICENSE;md5=d8f0ffdbc8d019bc821a5a07bdca1406 \ | ||
6 | " | ||
7 | BRANCH = "2024.1" | ||
8 | SRC_URI = "git://github.com/Xilinx/RAFT;protocol=https;branch=${BRANCH}" | ||
9 | SRCREV = "87ea8f4c5ac52fcbc465f41e681fc77aaee9a285" | ||
10 | |||
11 | inherit update-rc.d systemd | ||
12 | |||
13 | S = "${WORKDIR}/git" | ||
14 | COMPATIBLE_MACHINE = "^$" | ||
15 | COMPATIBLE_MACHINE:zcu208-zynqmp = "${MACHINE}" | ||
16 | COMPATIBLE_MACHINE:zcu216-zynqmp = "${MACHINE}" | ||
17 | COMPATIBLE_MACHINE:system-controller = "${MACHINE}" | ||
18 | |||
19 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
20 | |||
21 | INITSCRIPT_NAME = "raft-startup" | ||
22 | INITSCRIPT_PARAMS = "start 99 S ." | ||
23 | |||
24 | SYSTEMD_PACKAGES = "${PN}" | ||
25 | SYSTEMD_SERVICE:${PN} = "raft-startup.service" | ||
26 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
27 | |||
28 | DEPENDS += "libmetal" | ||
29 | |||
30 | RDEPENDS:${PN} += "\ | ||
31 | python3 \ | ||
32 | python3-pyro4 \ | ||
33 | python3-cffi \ | ||
34 | python3-serpent \ | ||
35 | bash \ | ||
36 | " | ||
37 | |||
38 | PACKAGECONFIG[raftnotebooks] = "enabled,disabled,,packagegroup-xilinx-jupyter" | ||
39 | PACKAGECONFIG[raftstartup] = "enabled,disabled,,librfdc librfclk libmetal" | ||
40 | PACKAGECONFIG[raftstartupsc] = "enabled,disabled,,python3-psutil python3-periphery" | ||
41 | |||
42 | do_install() { | ||
43 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
44 | SYSCONFDIR=${D}${sysconfdir}/init.d/ | ||
45 | else | ||
46 | SYSCONFDIR='' | ||
47 | fi | ||
48 | oe_runmake install DESTDIR=${D}\ | ||
49 | NOTEBOOKS=${@bb.utils.contains('PACKAGECONFIG','raftnotebooks','enabled','', d)}\ | ||
50 | STARTUPSC=${@bb.utils.contains('PACKAGECONFIG','raftstartupsc','enabled','',d)}\ | ||
51 | STARTUP=${@bb.utils.contains('PACKAGECONFIG','raftstartup','enabled','',d)}\ | ||
52 | BINDIR=${D}${bindir}\ | ||
53 | SYSTEM_UNIT_DIR=${D}${systemd_system_unitdir}\ | ||
54 | SYSCONF_DIR=${SYSCONFDIR} | ||
55 | } | ||
56 | |||
57 | PACKAGECONFIG:append:zcu208-zynqmp = "raftnotebooks raftstartup" | ||
58 | PACKAGECONFIG:append:zcu216-zynqmp = "raftnotebooks raftstartup" | ||
59 | PACKAGECONFIG:append:system-controller = "raftstartupsc" | ||
60 | |||
61 | FILES:${PN} += " \ | ||
62 | ${datadir}/raft/* \ | ||
63 | ${datadir}/notebooks \ | ||
64 | ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/*', '', d)} \ | ||
65 | " | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb new file mode 100644 index 00000000..a99f296a --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.6.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | ||
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.2.inc | ||
5 | |||
6 | SECTION = "libs" | ||
7 | |||
8 | AIEDIR ?= "${S}/driver" | ||
9 | S = "${WORKDIR}/git" | ||
10 | I = "${AIEDIR}/include" | ||
11 | |||
12 | IOBACKENDS ?= "Linux" | ||
13 | |||
14 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
15 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
16 | |||
17 | PROVIDES = "libxaiengine" | ||
18 | RPROVIDES:${PN} = "libxaiengine" | ||
19 | |||
20 | # The makefile isn't ready for parallel execution at the moment | ||
21 | PARALLEL_MAKE = "-j 1" | ||
22 | |||
23 | CFLAGS += "-Wall -Wextra" | ||
24 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
25 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
26 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
27 | |||
28 | |||
29 | do_compile(){ | ||
30 | oe_runmake | ||
31 | } | ||
32 | |||
33 | do_install(){ | ||
34 | install -d ${D}${includedir} | ||
35 | install ${I}/*.h ${D}${includedir}/ | ||
36 | install -d ${D}${includedir}/xaiengine | ||
37 | install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/ | ||
38 | install -d ${D}${libdir} | ||
39 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | ||
40 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc new file mode 100644 index 00000000..9ccc7621 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc | |||
@@ -0,0 +1,11 @@ | |||
1 | SECTION = "libs" | ||
2 | |||
3 | REPO ?= "git://github.com/Xilinx/aie-rt.git;protocol=https" | ||
4 | |||
5 | BRANCH ?= "xlnx_rel_v2024.2" | ||
6 | SRCREV ?= "8845d962e5b30b576c87dcf6635fb84a90ef1e36" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=04a153cae61a8a606fc79dff49c2c897" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb new file mode 100644 index 00000000..2e60941b --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.7.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | ||
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | ||
3 | |||
4 | require aie-rt-2024.2.inc | ||
5 | |||
6 | SECTION = "devel" | ||
7 | |||
8 | XAIEFAL_DIR ?= "fal" | ||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | IOBACKENDS ?= "Linux" | ||
12 | |||
13 | PROVIDES = "aiefal" | ||
14 | ALLOW_EMPTY:${PN} = "1" | ||
15 | |||
16 | inherit pkgconfig cmake | ||
17 | |||
18 | DEPENDS = "libxaiengine" | ||
19 | |||
20 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
21 | |||
22 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF -DFAL_LINUX=ON " | ||
23 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
24 | |||
25 | FILES:${PN}-demos = " \ | ||
26 | ${bindir}/* \ | ||
27 | " | ||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc index 67b97613..485d3b17 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc | |||
@@ -75,9 +75,6 @@ EXTRA_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.get | |||
75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | 75 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" |
76 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | 76 | EXTRA_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" |
77 | 77 | ||
78 | ATF_PROVENCORE = "SPD=pncd SPD_PNCD_NS_IRQ=51 ZYNQMP_BL32_MEM_BASE=0x70000000 ZYNQMP_BL32_MEM_SIZE=0x0FF00000" | ||
79 | EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'provencore', ' ${ATF_PROVENCORE}', '', d)}" | ||
80 | |||
81 | TFA_BL33_LOAD ?= "" | 78 | TFA_BL33_LOAD ?= "" |
82 | EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" | 79 | EXTRA_OEMAKE:append = "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" |
83 | 80 | ||
@@ -129,3 +126,19 @@ FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub" | |||
129 | # Disable buildpaths QA check warnings for Versal. | 126 | # Disable buildpaths QA check warnings for Versal. |
130 | INSANE_SKIP:${PN}:append:versal = " buildpaths" | 127 | INSANE_SKIP:${PN}:append:versal = " buildpaths" |
131 | INSANE_SKIP:${PN}:append:versal-net = " buildpaths" | 128 | INSANE_SKIP:${PN}:append:versal-net = " buildpaths" |
129 | |||
130 | python() { | ||
131 | soc_family = d.getVar('SOC_FAMILY') | ||
132 | atf_console = d.getVar('ATF_CONSOLE') | ||
133 | |||
134 | # See plat/xilinx/<soc_family>/platform.mk | ||
135 | if soc_family and soc_family == "zynqmp": | ||
136 | if not atf_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]: | ||
137 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (atf_console)) | ||
138 | elif soc_family and soc_family == "versal": | ||
139 | if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
140 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console)) | ||
141 | elif soc_family and soc_family == "versal-net": | ||
142 | if not atf_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
143 | raise bb.parse.SkipRecipe('ATF_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (atf_console)) | ||
144 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb index f3457640..9fd9c34a 100644 --- a/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/base-pdi/base-pdi_1.0.bb | |||
@@ -4,6 +4,8 @@ LICENSE = "CLOSED" | |||
4 | 4 | ||
5 | PROVIDES = "virtual/base-pdi" | 5 | PROVIDES = "virtual/base-pdi" |
6 | 6 | ||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
7 | COMPATIBLE_MACHINE = "^$" | 9 | COMPATIBLE_MACHINE = "^$" |
8 | COMPATIBLE_MACHINE:microblaze = ".*" | 10 | COMPATIBLE_MACHINE:microblaze = ".*" |
9 | COMPATIBLE_MACHINE:versal = ".*" | 11 | COMPATIBLE_MACHINE:versal = ".*" |
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb deleted file mode 100644 index f61761f4..00000000 --- a/meta-xilinx-core/recipes-bsp/bitstream/bitstream.bb +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | # We never want to prefer this over another provider | ||
9 | DEFAULT_PREFERENCE = "-1" | ||
10 | |||
11 | PROVIDES = "virtual/bitstream" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "$^" | ||
14 | COMPATIBLE_MACHINE:zynq = ".*" | ||
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
16 | |||
17 | # Since we're just copying, we can run any config | ||
18 | COMPATIBLE_HOST = ".*" | ||
19 | |||
20 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
21 | |||
22 | # Path where the bitstream can be found | ||
23 | BITSTREAM_PATH ?= "" | ||
24 | |||
25 | inherit deploy | ||
26 | |||
27 | do_install() { | ||
28 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
29 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
30 | exit 1 | ||
31 | fi | ||
32 | |||
33 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/. | ||
34 | } | ||
35 | |||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
38 | do_deploy() { | ||
39 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
40 | if ${SHOULD_DEPLOY}; then | ||
41 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/. | ||
42 | fi | ||
43 | } | ||
44 | |||
45 | def check_bitstream_vars(d): | ||
46 | # If BITSTREAM_PATH is not defined, we error and instruct the user | ||
47 | # Don't cache this, as the items on disk can change! | ||
48 | d.setVar('BB_DONT_CACHE', '1') | ||
49 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
50 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README.") | ||
51 | |||
52 | if not d.getVar('BITSTREAM_PATH'): | ||
53 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
54 | |||
55 | python() { | ||
56 | # Need to allow bbappends to change the check | ||
57 | check_bitstream_vars(d) | ||
58 | } | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb new file mode 100644 index 00000000..97965279 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bitstream/bitstream_1.0.bb | |||
@@ -0,0 +1,76 @@ | |||
1 | DESCRIPTION = "Recipe to provide a bitstream via virtual/bitstream" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | INHIBIT_DEFAULT_DEPS = "1" | ||
7 | |||
8 | BITSTREAM_PATH_DEPENDS ??= "" | ||
9 | DEPENDS += "${BITSTREAM_PATH_DEPENDS}" | ||
10 | |||
11 | # We never want to prefer this over another provider | ||
12 | DEFAULT_PREFERENCE = "-1" | ||
13 | |||
14 | PROVIDES = "virtual/bitstream" | ||
15 | |||
16 | COMPATIBLE_MACHINE = "$^" | ||
17 | COMPATIBLE_MACHINE:zynq = ".*" | ||
18 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
19 | |||
20 | # Since we're just copying, we can run any config | ||
21 | COMPATIBLE_HOST = ".*" | ||
22 | |||
23 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
24 | |||
25 | # Path where the bitstream can be found | ||
26 | BITSTREAM_PATH ?= "" | ||
27 | |||
28 | inherit deploy | ||
29 | |||
30 | BITSTREAM_NAME ?= "download" | ||
31 | BITSTREAM_NAME:microblaze ?= "system" | ||
32 | |||
33 | BITSTREAM_BASE_NAME ?= "${BITSTREAM_NAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
34 | |||
35 | SYSROOT_DIRS += "/boot/bitstream" | ||
36 | |||
37 | do_install() { | ||
38 | if [ ! -e ${BITSTREAM_PATH} ]; then | ||
39 | echo "Unable to find BITSTREAM_PATH (${BITSTREAM_PATH})" | ||
40 | exit 1 | ||
41 | fi | ||
42 | install -d ${D}/boot/bitstream/ | ||
43 | install -Dm 0644 ${BITSTREAM_PATH} ${D}/boot/bitstream/${BITSTREAM_BASE_NAME}.bit | ||
44 | } | ||
45 | |||
46 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
47 | SHOULD_DEPLOY = "${@'false' if (d.getVar('BITSTREAM_PATH')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
48 | do_deploy() { | ||
49 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
50 | if ${SHOULD_DEPLOY}; then | ||
51 | install -Dm 0644 ${BITSTREAM_PATH} ${DEPLOYDIR}/${BITSTREAM_BASE_NAME}.bit | ||
52 | fi | ||
53 | } | ||
54 | |||
55 | addtask deploy before do_build after do_install | ||
56 | |||
57 | FILES:${PN} += "/boot/bitstream/*.bit" | ||
58 | |||
59 | def check_bitstream_vars(d): | ||
60 | # Assuming if BITSTREAM_PATH_DEPENDS exists, that the file will be available later. | ||
61 | if not d.getVar('BITSTREAM_PATH_DEPENDS'): | ||
62 | # Don't cache this, as the items on disk can change! | ||
63 | d.setVar('BB_DONT_CACHE', '1') | ||
64 | |||
65 | # If BITSTREAM_PATH is not found or defined, we error and instruct the user | ||
66 | if not d.getVar('BITSTREAM_PATH'): | ||
67 | raise bb.parse.SkipRecipe("Something is depending on virtual/bitstream and you have not provided a bitstream using BITSTREAM_PATH variable.\n See the meta-xilinx-core README.") | ||
68 | |||
69 | if d.getVar('BITSTREAM_PATH') and not os.path.exists(d.getVar('BITSTREAM_PATH')): | ||
70 | raise bb.parse.SkipRecipe("The expected bitstream file %s is not available.\nSee the meta-xilinx-core README." % d.getVar('BITSTREAM_PATH')) | ||
71 | |||
72 | python() { | ||
73 | # Need to allow bbappends to change the check | ||
74 | check_bitstream_vars(d) | ||
75 | } | ||
76 | |||
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb index 98eebc3e..f4a96f41 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb +++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-header.bb | |||
@@ -9,7 +9,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" | |||
9 | 9 | ||
10 | BOOTBIN_VER_MAIN ?= "" | 10 | BOOTBIN_VER_MAIN ?= "" |
11 | 11 | ||
12 | BOOTBIN_VER_SUFFIX ?= "${@(d.getVar('XILINX_VER_BUILD') or '')[:8] if d.getVar('XILINX_VER_UPDATE') != 'release' and not d.getVar('XILINX_VER_UPDATE').startswith('update') else ''}" | ||
13 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" | 12 | BOOTBIN_VER_FILE = "bootbin-version-header.txt" |
14 | BOOTBIN_VER_MAX_LEN = "36" | 13 | BOOTBIN_VER_MAX_LEN = "36" |
15 | 14 | ||
@@ -17,12 +16,16 @@ BOOTBIN_MANIFEST_FILE ?= "bootbin-version-header.manifest" | |||
17 | 16 | ||
18 | inherit deploy image-artifact-names | 17 | inherit deploy image-artifact-names |
19 | 18 | ||
19 | IMAGE_NAME_SUFFIX = "" | ||
20 | |||
20 | python do_configure() { | 21 | python do_configure() { |
21 | if d.getVar("BOOTBIN_VER_SUFFIX"): | 22 | |
22 | version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX") | 23 | if not 'version' in locals(): |
24 | version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN") | ||
25 | version += d.getVar("IMAGE_VERSION_SUFFIX") | ||
23 | 26 | ||
24 | if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")): | 27 | if len(version) > int(d.getVar("BOOTBIN_VER_MAX_LEN")): |
25 | bb.error("version string too long") | 28 | bb.fatal("version string too long") |
26 | 29 | ||
27 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: | 30 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: |
28 | f.write(version.encode("utf-8").hex()) | 31 | f.write(version.encode("utf-8").hex()) |
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb index af30a17d..765d35e8 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb +++ b/meta-xilinx-core/recipes-bsp/bootbin/bootbin-version-string.bb | |||
@@ -15,9 +15,14 @@ BOOTBIN_VER_FILE = "bootbin-version-string.txt" | |||
15 | 15 | ||
16 | inherit deploy image-artifact-names | 16 | inherit deploy image-artifact-names |
17 | 17 | ||
18 | IMAGE_NAME_SUFFIX = "" | ||
19 | |||
18 | python do_configure() { | 20 | python do_configure() { |
19 | if d.getVar("BOOTBIN_VER_SUFFIX"): | 21 | |
20 | version = version + "-" + d.getVar("BOOTBIN_VER_SUFFIX") | 22 | if not 'version' in locals(): |
23 | version = d.getVar("MACHINE") + "-v" + d.getVar("BOOTBIN_VER_MAIN") | ||
24 | version += d.getVar("IMAGE_VERSION_SUFFIX") | ||
25 | |||
21 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: | 26 | with open(d.expand("${B}/${BOOTBIN_VER_FILE}"), "w") as f: |
22 | f.write(version) | 27 | f.write(version) |
23 | } | 28 | } |
diff --git a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb index e53d21f7..b9236f55 100644 --- a/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb | |||
@@ -7,6 +7,8 @@ LICENSE = "BSD" | |||
7 | 7 | ||
8 | include machine-xilinx-${SOC_FAMILY}.inc | 8 | include machine-xilinx-${SOC_FAMILY}.inc |
9 | 9 | ||
10 | BOOTBIN_INCLUDE ?= "" | ||
11 | |||
10 | inherit deploy | 12 | inherit deploy |
11 | 13 | ||
12 | # Don't allow building for microblaze MACHINE | 14 | # Don't allow building for microblaze MACHINE |
@@ -18,10 +20,11 @@ COMPATIBLE_MACHINE:versal-net = ".*" | |||
18 | 20 | ||
19 | PROVIDES = "virtual/boot-bin" | 21 | PROVIDES = "virtual/boot-bin" |
20 | 22 | ||
21 | DEPENDS += "bootgen-native" | 23 | DEPENDS += "bootgen-native u-boot-xlnx-scr" |
22 | 24 | ||
23 | # There is no bitstream recipe, so really depend on virtual/bitstream | 25 | # There is no bitstream recipe, so really depend on virtual/bitstream |
24 | DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream')}" | 26 | # We need to refer to virtual/arm-trusted-firmware and not arm-trusted-firmware as there may be multiple providers |
27 | DEPENDS += "${@(d.getVar('BIF_PARTITION_ATTR') or "").replace('bitstream', 'virtual/bitstream').replace('arm-trusted-firmware', 'virtual/arm-trusted-firmware')}" | ||
25 | 28 | ||
26 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 29 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
27 | 30 | ||
@@ -45,8 +48,17 @@ BOOTGEN_ARCH_DEFAULT:versal-net = "versalnet" | |||
45 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" | 48 | BOOTGEN_ARCH ?= "${BOOTGEN_ARCH_DEFAULT}" |
46 | BOOTGEN_EXTRA_ARGS ?= "" | 49 | BOOTGEN_EXTRA_ARGS ?= "" |
47 | 50 | ||
51 | QEMU_FLASH_TYPE ?= "qspi" | ||
52 | BOOTSCR_DEP = '' | ||
53 | BOOTSCR_DEP:versal = 'u-boot-xlnx-scr:do_deploy' | ||
54 | BOOTSCR_DEP:versal-net = 'u-boot-xlnx-scr:do_deploy' | ||
55 | |||
56 | BIF_BITSTREAM_ATTR ?= "${@bb.utils.contains('MACHINE_FEATURES', 'fpga-overlay', '', 'bitstream', d)}" | ||
57 | |||
48 | do_patch[noexec] = "1" | 58 | do_patch[noexec] = "1" |
49 | 59 | ||
60 | do_compile[depends] .= " ${BOOTSCR_DEP}" | ||
61 | |||
50 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): | 62 | def create_bif(config, attrflags, attrimage, ids, common_attr, biffd, d): |
51 | arch = d.getVar("SOC_FAMILY") | 63 | arch = d.getVar("SOC_FAMILY") |
52 | bb.error("create_bif function not defined for arch: %s" % (arch)) | 64 | bb.error("create_bif function not defined for arch: %s" % (arch)) |
@@ -177,6 +189,18 @@ do_compile() { | |||
177 | fi | 189 | fi |
178 | } | 190 | } |
179 | 191 | ||
192 | do_compile:append:versal() { | ||
193 | dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin | ||
194 | dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc | ||
195 | dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc | ||
196 | } | ||
197 | |||
198 | do_compile:append:versal-net() { | ||
199 | dd if=/dev/zero bs=256M count=1 > ${B}/qemu-${QEMU_FLASH_TYPE}.bin | ||
200 | dd if=${B}/BOOT.bin of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=0 conv=notrunc | ||
201 | dd if=${DEPLOY_DIR_IMAGE}/boot.scr of=${B}/qemu-${QEMU_FLASH_TYPE}.bin bs=1 seek=66584576 conv=notrunc | ||
202 | } | ||
203 | |||
180 | do_install() { | 204 | do_install() { |
181 | install -d ${D}/boot | 205 | install -d ${D}/boot |
182 | install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin | 206 | install -m 0644 ${B}/BOOT.bin ${D}/boot/BOOT.bin |
@@ -184,7 +208,7 @@ do_install() { | |||
184 | 208 | ||
185 | inherit image-artifact-names | 209 | inherit image-artifact-names |
186 | 210 | ||
187 | QEMUQSPI_BASE_NAME ?= "QEMU_qspi-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 211 | QEMU_FLASH_IMAGE_NAME ?= "qemu-${QEMU_FLASH_TYPE}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
188 | 212 | ||
189 | BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 213 | BOOTBIN_BASE_NAME ?= "BOOT-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
190 | 214 | ||
@@ -199,12 +223,18 @@ do_deploy:append:versal () { | |||
199 | 223 | ||
200 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin | 224 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin |
201 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin | 225 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin |
226 | |||
227 | install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin | ||
228 | ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin | ||
202 | } | 229 | } |
203 | 230 | ||
204 | do_deploy:append:versal-net () { | 231 | do_deploy:append:versal-net () { |
205 | 232 | ||
206 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin | 233 | install -m 0644 ${B}/BOOT_bh.bin ${DEPLOYDIR}/${BOOTBIN_BASE_NAME}_bh.bin |
207 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin | 234 | ln -sf ${BOOTBIN_BASE_NAME}_bh.bin ${DEPLOYDIR}/BOOT-${MACHINE}_bh.bin |
235 | |||
236 | install -m 0644 ${B}/qemu-${QEMU_FLASH_TYPE}.bin ${DEPLOYDIR}/${QEMU_FLASH_IMAGE_NAME}.bin | ||
237 | ln -sf ${QEMU_FLASH_IMAGE_NAME}.bin ${DEPLOYDIR}/qemu-${QEMU_FLASH_TYPE}-${MACHINE}.bin | ||
208 | } | 238 | } |
209 | 239 | ||
210 | FILES:${PN} += "/boot/BOOT.bin" | 240 | FILES:${PN} += "/boot/BOOT.bin" |
diff --git a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb index b52c7853..17d8af8c 100644 --- a/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb +++ b/meta-xilinx-core/recipes-bsp/cdo/extract-cdo_1.0.bb | |||
@@ -37,4 +37,4 @@ do_deploy() { | |||
37 | install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin | 37 | install -m 0644 ${B}/pmc_cdo.bin ${DEPLOYDIR}/pmc_cdo.bin |
38 | } | 38 | } |
39 | 39 | ||
40 | addtask do_deploy after do_compile | 40 | addtask deploy before do_build after do_install |
diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 4783a329..fbe85f96 100644 --- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb | |||
@@ -23,6 +23,9 @@ inherit devicetree image-artifact-names | |||
23 | SYSTEM_DTFILE ??= "" | 23 | SYSTEM_DTFILE ??= "" |
24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" | 24 | CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" |
25 | 25 | ||
26 | SYSTEM_DTFILE_DEPENDS ??= "" | ||
27 | DEPENDS += "${SYSTEM_DTFILE_DEPENDS}" | ||
28 | |||
26 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" | 29 | BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" |
27 | 30 | ||
28 | EXTRA_DT_FILES ?= "" | 31 | EXTRA_DT_FILES ?= "" |
@@ -31,12 +34,12 @@ EXTRA_DTFILES_BUNDLE ?= "" | |||
31 | UBOOT_DT_FILES ?= "" | 34 | UBOOT_DT_FILES ?= "" |
32 | UBOOT_DTFILE_PREFIX ?= "system-top" | 35 | UBOOT_DTFILE_PREFIX ?= "system-top" |
33 | UBOOT_DTFILES_BUNDLE ?= "" | 36 | UBOOT_DTFILES_BUNDLE ?= "" |
34 | EXTRA_OVERLAYS ?= "" | 37 | EXTRA_DT_INCLUDE_FILES ?= "" |
35 | 38 | ||
36 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" | 39 | SYSTEM_DTFILE[doc] = "System Device Tree which accepts at 0...1 dts file" |
37 | CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" | 40 | CONFIG_DTFILE[doc] = "Domain Specific Device Tree which accepts 0...1 dts file" |
38 | EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" | 41 | EXTRA_DT_FILES[doc] = "Add extra files to DT_FILES_PATH, it accepts 1...n dtsi files and adds to SRC_URI" |
39 | EXTRA_OVERLAYS[doc] = "Add extra files to DT_FILES_PATH and adds a #include for each to the BASE_DTS, it access 1..n dtsi files and adds to SRC_URI" | 42 | EXTRA_DT_INCLUDE_FILES[doc] = "Add extra files to DT_FILES_PATH and adds a #include for each to the BASE_DTS, it access 1..n dtsi files and adds to SRC_URI" |
40 | 43 | ||
41 | # There should only be ONE CONFIG_DTFILE listed | 44 | # There should only be ONE CONFIG_DTFILE listed |
42 | # These need to be passed in from global, not from a bbappend | 45 | # These need to be passed in from global, not from a bbappend |
@@ -44,7 +47,7 @@ FILESEXTRAPATHS:prepend := "${@'%s:' % os.path.dirname(d.getVar('CONFIG_DTFILE') | |||
44 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" | 47 | SRC_URI:append := " ${@'file://%s' % os.path.basename(d.getVar('CONFIG_DTFILE') or '') if (d.getVar('CONFIG_DTFILE')) else ''}" |
45 | 48 | ||
46 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" | 49 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_FILES') or "").split()])}" |
47 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_OVERLAYS') or "").split()])}" | 50 | SRC_URI:append = " ${@" ".join(["file://%s" % f for f in (d.getVar('EXTRA_DT_INCLUDE_FILES') or "").split()])}" |
48 | 51 | ||
49 | COMPATIBLE_MACHINE:zynq = ".*" | 52 | COMPATIBLE_MACHINE:zynq = ".*" |
50 | COMPATIBLE_MACHINE:zynqmp = ".*" | 53 | COMPATIBLE_MACHINE:zynqmp = ".*" |
@@ -62,7 +65,7 @@ DTB_FILE_NAME ?= "${BASE_DTS}.dtb" | |||
62 | 65 | ||
63 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" | 66 | DTB_BASE_NAME ?= "${MACHINE}-system${IMAGE_VERSION_SUFFIX}" |
64 | 67 | ||
65 | # Copy the EXTRA_DT_FILES and EXTRA_OVERLAYS files in prepend operation so that | 68 | # Copy the EXTRA_DT_FILES and EXTRA_DT_INCLUDE_FILES files in prepend operation so that |
66 | # it can be preprocessed. | 69 | # it can be preprocessed. |
67 | do_configure:prepend () { | 70 | do_configure:prepend () { |
68 | # Create DT_FILES_PATH directory if doesn't exist during prepend operation. | 71 | # Create DT_FILES_PATH directory if doesn't exist during prepend operation. |
@@ -70,7 +73,7 @@ do_configure:prepend () { | |||
70 | mkdir -p ${DT_FILES_PATH} | 73 | mkdir -p ${DT_FILES_PATH} |
71 | fi | 74 | fi |
72 | 75 | ||
73 | for f in ${EXTRA_DT_FILES} ${EXTRA_OVERLAYS}; do | 76 | for f in ${EXTRA_DT_FILES} ${EXTRA_DT_INCLUDE_FILES}; do |
74 | if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then | 77 | if [ "$(realpath ${WORKDIR}/${f})" != "$(realpath ${DT_FILES_PATH}/`basename ${f}`)" ]; then |
75 | cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ | 78 | cp ${WORKDIR}/${f} ${DT_FILES_PATH}/ |
76 | fi | 79 | fi |
@@ -78,12 +81,12 @@ do_configure:prepend () { | |||
78 | } | 81 | } |
79 | 82 | ||
80 | do_configure:append () { | 83 | do_configure:append () { |
81 | for f in ${EXTRA_OVERLAYS}; do | 84 | for f in ${EXTRA_DT_INCLUDE_FILES}; do |
82 | if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then | 85 | if [ ! -e ${DT_FILES_PATH}/${BASE_DTS}.dts ]; then |
83 | if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then | 86 | if [ -e ${DT_FILES_PATH}/${BASE_DTS}.dtb ]; then |
84 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" | 87 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must use a 'dts' and not 'dtb' in CONFIG_DTFILE" |
85 | else | 88 | else |
86 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts" | 89 | bberror "Unable to find ${BASE_DTS}.dts, to use EXTRA_DT_INCLUDE_FILES you must set a valid CONFIG_DTFILE or use system-top.dts" |
87 | fi | 90 | fi |
88 | exit 1 | 91 | exit 1 |
89 | fi | 92 | fi |
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb new file mode 100644 index 00000000..88dec7b8 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_2024.2.bb | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "Xilinx dfx-mgr libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and Binaries" | ||
3 | |||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d67bcef754e935bf77b6d7051bd62b5e" | ||
6 | |||
7 | REPO ?= "git://github.com/Xilinx/dfx-mgr.git;protocol=https" | ||
8 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
9 | SRC_URI = "${REPO};${BRANCHARG}" | ||
10 | |||
11 | BRANCH = "xlnx_rel_v2024.2" | ||
12 | SRCREV = "839e8e646c54a63326e36c48a7bd879f5e8efa31" | ||
13 | SOMAJOR = "2" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
20 | COMPATIBLE_MACHINE:versal = ".*" | ||
21 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | inherit cmake update-rc.d systemd | ||
26 | |||
27 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm systemd" | ||
28 | RDEPENDS:${PN} += " freeipmi" | ||
29 | EXTRA_OECMAKE += " \ | ||
30 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
31 | " | ||
32 | |||
33 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
34 | INITSCRIPT_PARAMS = "start 99 S ." | ||
35 | |||
36 | SYSTEMD_PACKAGES="${PN}" | ||
37 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
38 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
39 | |||
40 | |||
41 | do_install(){ | ||
42 | install -d ${D}${bindir} | ||
43 | install -d ${D}${libdir} | ||
44 | install -d ${D}${includedir} | ||
45 | install -d ${D}${base_libdir}/firmware/xilinx | ||
46 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
47 | |||
48 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
49 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
50 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
51 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
52 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
53 | |||
54 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
55 | |||
56 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
57 | |||
58 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
59 | install -d ${D}${sysconfdir}/init.d/ | ||
60 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
61 | fi | ||
62 | |||
63 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
64 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
65 | |||
66 | install -d ${D}${systemd_system_unitdir} | ||
67 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
68 | } | ||
69 | |||
70 | PACKAGES =+ "libdfx-mgr" | ||
71 | |||
72 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
73 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
74 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb new file mode 100644 index 00000000..e87e8793 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgrcry.bb | |||
@@ -0,0 +1,69 @@ | |||
1 | DESCRIPTION = "Image Recovery" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/imgrcry" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | COMPATIBLE_MACHINE = "^$" | ||
10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
11 | |||
12 | # Since we're just copying, we can run any config | ||
13 | COMPATIBLE_HOST = ".*" | ||
14 | |||
15 | # Default expects the user to provide the imagerecovery in the deploy | ||
16 | # directory, named "image-recovery-${MACHINE}.bin" and "image-recovery-${MACHINE}.bin" | ||
17 | # A machine, multiconfig, or local.conf should override this | ||
18 | IMGRCRY_DEPENDS ??= "" | ||
19 | IMGRCRY_MCDEPENDS ??= "" | ||
20 | IMGRCRY_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
21 | IMGRCRY_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
22 | IMGRCRY_IMAGE_NAME ??= "image-recovery-${MACHINE}" | ||
23 | |||
24 | # Default is for the multilib case (without the extension .bin) | ||
25 | IMGRCRY_FILE ??= "${IMGRCRY_DEPLOY_DIR}/${IMGRCRY_IMAGE_NAME}" | ||
26 | IMGRCRY_FILE[vardepsexclude] = "IMGRCRY_DEPLOY_DIR" | ||
27 | |||
28 | do_fetch[depends] += "${IMGRCRY_DEPENDS}" | ||
29 | do_fetch[mcdepends] += "${IMGRCRY_MCDEPENDS}" | ||
30 | |||
31 | inherit deploy | ||
32 | |||
33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGRCRY_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
35 | do_deploy() { | ||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | if ${SHOULD_DEPLOY}; then | ||
38 | install -Dm 0644 ${IMGRCRY_FILE}.bin ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.bin | ||
39 | install -Dm 0644 ${IMGRCRY_FILE}.elf ${DEPLOYDIR}/${IMGRCRY_IMAGE_NAME}.elf | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | addtask deploy before do_build after do_install | ||
44 | |||
45 | INSANE_SKIP:${PN} = "arch" | ||
46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
50 | |||
51 | def check_imgrcry_variables(d): | ||
52 | # If both are blank, the user MUST pass in the path to the firmware! | ||
53 | if not d.getVar('IMGRCRY_DEPENDS') and not d.getVar('IMGRCRY_MCDEPENDS'): | ||
54 | # Don't cache this, as the items on disk can change! | ||
55 | d.setVar('BB_DONT_CACHE', '1') | ||
56 | |||
57 | if not os.path.exists(d.getVar('IMGRCRY_FILE') + ".bin"): | ||
58 | if not d.getVar('WITHIN_EXT_SDK'): | ||
59 | raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGRCRY_FILE to the path with a precompiled IMGRCRY binary." % d.getVar('IMGRCRY_FILE')) | ||
60 | else: | ||
61 | # We found the file, so be sure to track it | ||
62 | d.setVar('SRC_URI', 'file://${IMGRCRY_FILE}.bin') | ||
63 | d.setVarFlag('do_install', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
64 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
65 | |||
66 | python() { | ||
67 | # Need to allow bbappends to change the check | ||
68 | check_imgrcry_variables(d) | ||
69 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb new file mode 100644 index 00000000..0c0f1549 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/imgsel.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | DESCRIPTION = "Image Selector" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/imgsel" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | COMPATIBLE_MACHINE = "^$" | ||
10 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
11 | |||
12 | # Since we're just copying, we can run any config | ||
13 | COMPATIBLE_HOST = ".*" | ||
14 | |||
15 | # Default expects the user to provide the imageselector in the deploy | ||
16 | # directory, named "image-selector-${MACHINE}.bin" and "image-selector-${MACHINE}.bin" | ||
17 | # A machine, multiconfig, or local.conf should override this | ||
18 | IMGSEL_DEPENDS ??= "" | ||
19 | IMGSEL_MCDEPENDS ??= "" | ||
20 | IMGSEL_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | ||
21 | IMGSEL_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | ||
22 | IMGSEL_IMAGE_NAME ??= "image-selector-${MACHINE}" | ||
23 | |||
24 | # Default is for the multilib case (without the extension .bin) | ||
25 | IMGSEL_FILE ??= "${IMGSEL_DEPLOY_DIR}/${IMGSEL_IMAGE_NAME}" | ||
26 | IMGSEL_FILE[vardepsexclude] = "IMGSEL_DEPLOY_DIR" | ||
27 | |||
28 | do_fetch[depends] += "${IMGSEL_DEPENDS}" | ||
29 | do_fetch[mcdepends] += "${IMGSEL_MCDEPENDS}" | ||
30 | |||
31 | inherit deploy | ||
32 | |||
33 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
34 | SHOULD_DEPLOY = "${@'false' if (d.getVar('IMGSEL_FILE')).startswith(d.getVar('DEPLOY_DIR_IMAGE')) else 'true'}" | ||
35 | do_deploy() { | ||
36 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | ||
37 | if ${SHOULD_DEPLOY}; then | ||
38 | install -Dm 0644 ${IMGSEL_FILE}.bin ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.bin | ||
39 | install -Dm 0644 ${IMGSEL_FILE}.elf ${DEPLOYDIR}/${IMGSEL_IMAGE_NAME}.elf | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | addtask deploy before do_build after do_install | ||
44 | |||
45 | INSANE_SKIP:${PN} = "arch" | ||
46 | INSANE_SKIP:${PN}-dbg = "arch" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
50 | |||
51 | #SYSROOT_DIRS += "/boot" | ||
52 | #FILES:${PN} = "/boot/${PN}.bin" | ||
53 | |||
54 | def check_imgsel_variables(d): | ||
55 | # If both are blank, the user MUST pass in the path to the firmware! | ||
56 | if not d.getVar('IMGSEL_DEPENDS') and not d.getVar('IMGSEL_MCDEPENDS'): | ||
57 | # Don't cache this, as the items on disk can change! | ||
58 | d.setVar('BB_DONT_CACHE', '1') | ||
59 | |||
60 | if not os.path.exists(d.getVar('IMGSEL_FILE') + ".bin"): | ||
61 | if not d.getVar('WITHIN_EXT_SDK'): | ||
62 | raise bb.parse.SkipRecipe("The expected file %s.bin is not available.\nSet IMGSEL_FILE to the path with a precompiled IMGSEL binary." % d.getVar('IMGSEL_FILE')) | ||
63 | else: | ||
64 | # We found the file, so be sure to track it | ||
65 | d.setVar('SRC_URI', 'file://${IMGSEL_FILE}.bin') | ||
66 | d.setVarFlag('do_install', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
67 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
68 | |||
69 | python() { | ||
70 | # Need to allow bbappends to change the check | ||
71 | check_imgsel_variables(d) | ||
72 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb new file mode 100644 index 00000000..3a097b24 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_2024.2.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | SUMMARY = "Xilinx libdfx library" | ||
2 | DESCRIPTION = "Xilinx libdfx Library and headers" | ||
3 | |||
4 | LICENSE = "MIT & GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7" | ||
6 | |||
7 | BRANCH ?= "xlnx_rel_v2024.2" | ||
8 | REPO ?= "git://github.com/Xilinx/libdfx.git;protocol=https" | ||
9 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
10 | SRC_URI = "${REPO};${BRANCHARG}" | ||
11 | SRCREV = "af8d735fae286e7bc94c830a86c960598a4ac014" | ||
12 | |||
13 | # Don't allow building for Zynq and Microblaze MACHINE unless it is supported. | ||
14 | COMPATIBLE_MACHINE = "^$" | ||
15 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
16 | COMPATIBLE_MACHINE:versal = ".*" | ||
17 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit cmake | ||
22 | |||
23 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
24 | # so updates will work properly. | ||
25 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb new file mode 100644 index 00000000..e6ba4938 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.10.0-xilinx-v2024.2.bb | |||
@@ -0,0 +1,154 @@ | |||
1 | require recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | ||
2 | |||
3 | DEPENDS:remove:zynqmp:qemuall = " optee-os" | ||
4 | DEPENDS:remove:versal:qemuall = " optee-os" | ||
5 | DEPENDS:remove:versal-net:qemuall = " optee-os" | ||
6 | |||
7 | # Xilinx TF-A v2.10 | ||
8 | SRC_URI_TRUSTED_FIRMWARE_A = "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https" | ||
9 | SRCREV_tfa = "14cea4616b6edaceabb607c7c92332436a1699e5" | ||
10 | SRCBRANCH = "xlnx_rebase_v2.10" | ||
11 | |||
12 | LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde" | ||
13 | |||
14 | # mbedtls-3.4.1 is not enabled in this configuration | ||
15 | |||
16 | # The following are Xilinx specific settings | ||
17 | PROVIDES = "virtual/arm-trusted-firmware" | ||
18 | |||
19 | COMPATIBLE_MACHINE ?= "^$" | ||
20 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
21 | COMPATIBLE_MACHINE:versal = ".*" | ||
22 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
23 | |||
24 | ### Platform Settings | ||
25 | TFA_PLATFORM:zynqmp = "zynqmp" | ||
26 | TFA_PLATFORM:versal = "versal" | ||
27 | TFA_PLATFORM:versal-net = "versal_net" | ||
28 | |||
29 | |||
30 | ### Console settings | ||
31 | TFA_CONSOLE_DEFAULT = "" | ||
32 | TFA_CONSOLE_DEFAULT:zynqmp = "cadence" | ||
33 | TFA_CONSOLE_DEFAULT:versal = "pl011" | ||
34 | TFA_CONSOLE_DEFAULT:versal-net = "pl011" | ||
35 | |||
36 | # Use old name for compatibility | ||
37 | ATF_CONSOLE ?= "${TFA_CONSOLE_DEFAULT}" | ||
38 | |||
39 | # Old name to new name | ||
40 | TFA_CONSOLE ?= "${ATF_CONSOLE}" | ||
41 | |||
42 | TFA_CONSOLE_OEMAKE = "" | ||
43 | TFA_CONSOLE_OEMAKE:append:zynqmp = "${@' ZYNQMP_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
44 | TFA_CONSOLE_OEMAKE:append:versal = "${@' VERSAL_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
45 | TFA_CONSOLE_OEMAKE:append:versal-net = "${@' VERSAL_NET_CONSOLE=${TFA_CONSOLE}' if d.getVar('TFA_CONSOLE', True) != '' else ''}" | ||
46 | |||
47 | EXTRA_OEMAKE += "${TFA_CONSOLE_OEMAKE}" | ||
48 | |||
49 | |||
50 | ### Debug settings | ||
51 | DEBUG_ATF_DEFAULT = "" | ||
52 | DEBUG_ATF_DEFAULT:versal = "1" | ||
53 | DEBUG_ATF_DEFAULT:versal-net = "1" | ||
54 | DEBUG_ATF ?= "${DEBUG_ATF_DEFAULT}" | ||
55 | |||
56 | # Translate old to new name | ||
57 | TFA_DEBUG = "${DEBUG_ATF}" | ||
58 | |||
59 | |||
60 | ### Mem Settings | ||
61 | ATF_MEM_BASE ?= "" | ||
62 | ATF_MEM_SIZE ?= "" | ||
63 | |||
64 | TFA_MEM_BASE ?= "${ATF_MEM_BASE}" | ||
65 | TFA_MEM_SIZE ?= "${ATF_MEM_SIZE}" | ||
66 | |||
67 | TFA_MEM_OEMAKE = "" | ||
68 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
69 | TFA_MEM_OEMAKE:append:zynqmp = "${@' ZYNQMP_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
70 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
71 | TFA_MEM_OEMAKE:append:versal = "${@' VERSAL_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
72 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_BASE=${ATF_MEM_BASE}' if d.getVar('ATF_MEM_BASE', True) != '' else ''}" | ||
73 | TFA_MEM_OEMAKE:append:versal-net = "${@' VERSAL_NET_ATF_MEM_SIZE=${ATF_MEM_SIZE}' if d.getVar('ATF_MEM_SIZE', True) != '' else ''}" | ||
74 | |||
75 | EXTRA_OEMAKE += "${TFA_MEM_OEMAKE}" | ||
76 | |||
77 | |||
78 | ### Preloaded Base | ||
79 | TFA_BL33_LOAD ?= "" | ||
80 | EXTRA_OEMAKE += "${@' PRELOADED_BL33_BASE=${TFA_BL33_LOAD}' if d.getVar('TFA_BL33_LOAD', True) != '' else ''}" | ||
81 | |||
82 | |||
83 | # Workaround for bl31.elf has a LOAD segment with RWX permissions | ||
84 | EXTRA_OEMAKE += ' TF_LDFLAGS="--no-warn-rwx-segments --fatal-warnings -O1 --gc-sections"' | ||
85 | |||
86 | # We use bl31 | ||
87 | TFA_BUILD_TARGET = "bl31" | ||
88 | TFA_INSTALL_TARGET = "bl31" | ||
89 | |||
90 | inherit image-artifact-names | ||
91 | |||
92 | # arm-trusted-firmware instead of ${PN} for compatibility | ||
93 | ATF_BASE_NAME ?= "arm-trusted-firmware-${PKGE}-${PKGV}-${PKGR}${IMAGE_VERSION_SUFFIX}" | ||
94 | |||
95 | do_install:append() { | ||
96 | # The first TFA_INSTALL_TARGET found will be copied as the standard boot firmware | ||
97 | for atfbin in ${TFA_INSTALL_TARGET} ; do | ||
98 | install -d ${D}/boot | ||
99 | if [ -e ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ]; then | ||
100 | ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf ${D}/boot/${ATF_BASE_NAME}.elf | ||
101 | ln -sf ${ATF_BASE_NAME}.elf ${D}/boot/arm-trusted-firmware.elf | ||
102 | ln ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.bin | ||
103 | ln -sf ${ATF_BASE_NAME}.bin ${D}/boot/arm-trusted-firmware.bin | ||
104 | |||
105 | # Get the entry point address from the elf. | ||
106 | BL31_BASE_ADDR=$(${READELF} -h ${D}/boot/${ATF_BASE_NAME}.elf | egrep -m 1 -i "entry point.*?0x" | sed -r 's/.*?(0x.*?)/\1/g') | ||
107 | mkimage -A arm64 -O arm-trusted-firmware -T kernel -C none \ | ||
108 | -a $BL31_BASE_ADDR -e $BL31_BASE_ADDR \ | ||
109 | -d ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin ${D}/boot/${ATF_BASE_NAME}.ub | ||
110 | ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/arm-trusted-firmware.ub | ||
111 | ln -sf ${ATF_BASE_NAME}.ub ${D}/boot/atf-uboot.ub | ||
112 | break | ||
113 | fi | ||
114 | done | ||
115 | } | ||
116 | |||
117 | inherit deploy | ||
118 | |||
119 | DEPENDS += "u-boot-mkimage-native" | ||
120 | |||
121 | do_deploy() { | ||
122 | # Copy the /boot items to deploy | ||
123 | install -d ${DEPLOYDIR} | ||
124 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.elf ${DEPLOYDIR}/${ATF_BASE_NAME}.elf | ||
125 | ln -sf ${ATF_BASE_NAME}.elf ${DEPLOYDIR}/arm-trusted-firmware.elf | ||
126 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.bin ${DEPLOYDIR}/${ATF_BASE_NAME}.bin | ||
127 | ln -sf ${ATF_BASE_NAME}.bin ${DEPLOYDIR}/arm-trusted-firmware.bin | ||
128 | |||
129 | install -m 0644 ${D}/boot/${ATF_BASE_NAME}.ub ${DEPLOYDIR}/${ATF_BASE_NAME}.ub | ||
130 | ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/arm-trusted-firmware.ub | ||
131 | ln -sf ${ATF_BASE_NAME}.ub ${DEPLOYDIR}/atf-uboot.ub | ||
132 | } | ||
133 | |||
134 | addtask deploy before do_build after do_compile | ||
135 | |||
136 | SYSROOT_DIRS += "/boot" | ||
137 | FILES:${PN} += "/boot/*.elf /boot/*.bin /boot/*.ub" | ||
138 | RPROVIDES:${PN} += "arm-trusted-firmware" | ||
139 | |||
140 | python() { | ||
141 | soc_family = d.getVar('SOC_FAMILY') | ||
142 | tfa_console = d.getVar('TFA_CONSOLE') | ||
143 | |||
144 | # See plat/xilinx/<soc_family>/platform.mk | ||
145 | if soc_family and soc_family == "zynqmp": | ||
146 | if not tfa_console in [ 'cadence', 'cadence0', 'cadence1', 'dcc' ]: | ||
147 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for ZynqMP, only cadence, cadence0, cadence1, and dcc are valid options.' % (tfa_console)) | ||
148 | elif soc_family and soc_family == "versal": | ||
149 | if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
150 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console)) | ||
151 | elif soc_family and soc_family == "versal-net": | ||
152 | if not tfa_console in [ 'pl011', 'pl011_0', 'pl011_1', 'dcc' ]: | ||
153 | raise bb.parse.SkipRecipe('TFA_CONSOLE (%s) is not configured properly for Versal-Net, only pl011, pl011_0, pl011_1, and dcc are valid options.' % (tfa_console)) | ||
154 | } | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb new file mode 100644 index 00000000..4214fdd9 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2024.01-xilinx-v2024.2.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2024.2.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-xlnx-2024.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc new file mode 100644 index 00000000..feb9bbcd --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2024.2.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBRANCH = "xlnx_rebase_v2024.01" | ||
2 | |||
3 | SRCREV = "7f6ec94aac7eacfec07bd45c83a6d17df4b7d383" | ||
4 | |||
5 | LICENSE = "GPL-2.0-or-later" | ||
6 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
7 | |||
8 | # u-boot-xlnx has support for these | ||
9 | HAS_PLATFORM_INIT ?= " \ | ||
10 | xilinx_zynqmp_virt_config \ | ||
11 | xilinx_zynq_virt_defconfig \ | ||
12 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
13 | " | ||
14 | |||
15 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
16 | |||
17 | FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot-v2024.01:" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc index bbf4125f..7eac6bfd 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-blob.inc | |||
@@ -9,7 +9,6 @@ IMPORT_CC_DTBS ?= "" | |||
9 | CC_DTBS_DUP ?= "" | 9 | CC_DTBS_DUP ?= "" |
10 | IMPORT_CC_UBOOT_DTBS ?= "" | 10 | IMPORT_CC_UBOOT_DTBS ?= "" |
11 | 11 | ||
12 | DEPENDS:append:eval-brd-sc-zynqmp = " uboot-device-tree" | ||
13 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" | 12 | MKIMAGE_DTBLOB_OPTS ?= "-E -B 0x8" |
14 | 13 | ||
15 | # Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' | 14 | # Everything is swtiched on with UBOOT_IMAGE_BLOB = '1' |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr.bb index 678ae236..e13413a1 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 | |||
@@ -39,6 +39,9 @@ DDR_BASEADDR ?= "0x0" | |||
39 | DDR_BASEADDR:microblaze ?= "0x80000000" | 39 | DDR_BASEADDR:microblaze ?= "0x80000000" |
40 | PRE_BOOTENV ?= "" | 40 | PRE_BOOTENV ?= "" |
41 | 41 | ||
42 | # Set debfault SD boot device to mmc 0 interface | ||
43 | SDBOOTDEV ?= "0" | ||
44 | |||
42 | SRC_URI = " \ | 45 | SRC_URI = " \ |
43 | file://boot.cmd.sd.zynq \ | 46 | file://boot.cmd.sd.zynq \ |
44 | file://boot.cmd.sd.zynqmp \ | 47 | file://boot.cmd.sd.zynqmp \ |
@@ -81,7 +84,7 @@ DEVICETREE_OVERLAY_OFFSET:zynqmp ??= "0x100000" | |||
81 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" | 84 | DEVICETREE_OVERLAY_OFFSET:zynq ??= "0x100000" |
82 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" | 85 | DEVICETREE_OVERLAY_OFFSET:versal ??= "0x1000" |
83 | DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" | 86 | DEVICETREE_OVERLAY_OFFSET:versal-net ??= "0x1000" |
84 | DEVICETREE_OVERLAY_PADSIZE ??= "0xf00000" | 87 | DEVICETREE_OVERLAY_PADSIZE ??= "0x1f00000" |
85 | 88 | ||
86 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ | 89 | DEVICETREE_OVERLAY_ADDRESS ?= "${@hex(int(append_baseaddr(d,d.getVar('DEVICETREE_OVERLAY_OFFSET')),16) \ |
87 | + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" | 90 | + int(d.getVar('DEVICETREE_OVERLAY_PADSIZE'),16))}" |
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 e09bdfa9..f60a1ea9 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic | |||
@@ -13,7 +13,6 @@ rootfs_name=@@RAMDISK_IMAGE@@ | |||
13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' | 13 | setenv get_bootargs 'fdt addr $fdtcontroladdr;fdt get value bootargs /chosen bootargs;' |
14 | setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi' | 14 | setenv update_bootargs 'if test -n ${launch_ramdisk_init} && test ${bootargs} = "";then if run get_bootargs;then setenv bootargs "\$bootargs launch_ramdisk_init=${launch_ramdisk_init} $extrabootargs";fi;fi' |
15 | 15 | ||
16 | |||
17 | for boot_target in ${boot_targets}; | 16 | for boot_target in ${boot_targets}; |
18 | do | 17 | do |
19 | echo "Trying to load boot images from ${boot_target}" | 18 | echo "Trying to load boot images from ${boot_target}" |
@@ -83,4 +82,15 @@ do | |||
83 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | 82 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; |
84 | echo "Booting using Separate images failed" | 83 | echo "Booting using Separate images failed" |
85 | fi | 84 | fi |
85 | if test "${boot_target}" = "nor" || test "${boot_target}" = "nor0"; then | ||
86 | cp.b @@QSPI_FIT_IMAGE_OFFSET@@ @@FIT_IMAGE_LOAD_ADDRESS@@ @@QSPI_FIT_IMAGE_SIZE@@ | ||
87 | bootm @@FIT_IMAGE_LOAD_ADDRESS@@; | ||
88 | echo "Booting using Fit image failed" | ||
89 | |||
90 | cp.b @@QSPI_KERNEL_OFFSET@@ @@KERNEL_LOAD_ADDRESS@@ @@QSPI_KERNEL_SIZE@@ | ||
91 | cp.b @@QSPI_RAMDISK_OFFSET@@ @@RAMDISK_IMAGE_ADDRESS@@ @@QSPI_RAMDISK_SIZE@@ | ||
92 | run update_bootargs | ||
93 | @@KERNEL_BOOTCMD@@ @@KERNEL_LOAD_ADDRESS@@ @@RAMDISK_IMAGE_ADDRESS@@ @@DEVICETREE_ADDRESS@@; | ||
94 | echo "Booting using Separate images failed" | ||
95 | fi | ||
86 | done | 96 | done |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root index ed12f941..a3ec1286 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-scr/boot.cmd.generic.root | |||
@@ -9,6 +9,7 @@ ramdisk_name=@@RAMDISK_IMAGE1@@ | |||
9 | rootfs_name=@@RAMDISK_IMAGE@@ | 9 | rootfs_name=@@RAMDISK_IMAGE@@ |
10 | @@PRE_BOOTENV@@ | 10 | @@PRE_BOOTENV@@ |
11 | 11 | ||
12 | |||
12 | for boot_target in ${boot_targets}; | 13 | for boot_target in ${boot_targets}; |
13 | do | 14 | do |
14 | echo "Trying to load boot images from ${boot_target}" | 15 | echo "Trying to load boot images from ${boot_target}" |
@@ -43,17 +44,17 @@ do | |||
43 | fi | 44 | fi |
44 | echo "Checking for /${kernel_name}" | 45 | echo "Checking for /${kernel_name}" |
45 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then | 46 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${kernel_name}; then |
46 | echo "Loading ${kernel_name}"; | 47 | echo "Loading ${kernel_name} at @@KERNEL_LOAD_ADDRESS@@"; |
47 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; | 48 | fatload ${devtype} ${devnum}:${distro_bootpart} @@KERNEL_LOAD_ADDRESS@@ ${kernel_name}; |
48 | fi | 49 | fi |
49 | echo "Checking for /system.dtb" | 50 | echo "Checking for /system.dtb" |
50 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then | 51 | if test -e ${devtype} ${devnum}:${distro_bootpart} /system.dtb; then |
51 | echo "Loading system.dtb"; | 52 | echo "Loading system.dtb at @@DEVICETREE_ADDRESS@@"; |
52 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; | 53 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_ADDRESS@@ system.dtb; |
53 | fi | 54 | fi |
54 | echo "Checking for /devicetree/openamp.dtbo" | 55 | echo "Checking for /devicetree/openamp.dtbo" |
55 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then | 56 | if test -e ${devtype} ${devnum}:${distro_bootpart} /devicetree/openamp.dtbo; then |
56 | echo "Loading and merging openamp.dtbo into device tree"; | 57 | echo "Loading and merging openamp.dtbo into device tree at @@DEVICETREE_OVERLAY_ADDRESS@@"; |
57 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; | 58 | fatload ${devtype} ${devnum}:${distro_bootpart} @@DEVICETREE_OVERLAY_ADDRESS@@ devicetree/openamp.dtbo; |
58 | fdt addr @@DEVICETREE_ADDRESS@@ | 59 | fdt addr @@DEVICETREE_ADDRESS@@ |
59 | fdt resize 8192 | 60 | fdt resize 8192 |
@@ -61,7 +62,7 @@ do | |||
61 | fi | 62 | fi |
62 | echo "Checking for /${ramdisk_name}" | 63 | echo "Checking for /${ramdisk_name}" |
63 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then | 64 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${ramdisk_name} && test "${skip_tinyramdisk}" != "yes"; then |
64 | echo "Loading ${ramdisk_name}"; | 65 | echo "Loading ${ramdisk_name} at @@RAMDISK_IMAGE_ADDRESS@@"; |
65 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; | 66 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${ramdisk_name}; |
66 | fdt addr @@DEVICETREE_ADDRESS@@ | 67 | fdt addr @@DEVICETREE_ADDRESS@@ |
67 | fdt get value bootargs /chosen bootargs | 68 | fdt get value bootargs /chosen bootargs |
@@ -70,7 +71,7 @@ do | |||
70 | fi | 71 | fi |
71 | echo "Checking for /${rootfs_name}" | 72 | echo "Checking for /${rootfs_name}" |
72 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then | 73 | if test -e ${devtype} ${devnum}:${distro_bootpart} /${rootfs_name} && test "${skip_ramdisk}" != "yes"; then |
73 | echo "Loading ${rootfs_name}"; | 74 | echo "Loading ${rootfs_name} at @@RAMDISK_IMAGE_ADDRESS@@"; |
74 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; | 75 | fatload ${devtype} ${devnum}:${distro_bootpart} @@RAMDISK_IMAGE_ADDRESS@@ ${rootfs_name}; |
75 | fdt addr @@DEVICETREE_ADDRESS@@ | 76 | fdt addr @@DEVICETREE_ADDRESS@@ |
76 | fdt get value bootargs /chosen bootargs | 77 | fdt get value bootargs /chosen bootargs |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb index 1efc5392..dafaab25 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-uenv.bb | |||
@@ -16,7 +16,7 @@ def remove_task_from_depends(d): | |||
16 | extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or '' | 16 | extra_imagedepends = d.getVar('EXTRA_IMAGEDEPENDS') or '' |
17 | uenv_depends = '' | 17 | uenv_depends = '' |
18 | for imagedepend in extra_imagedepends.split(): | 18 | for imagedepend in extra_imagedepends.split(): |
19 | if imagedepend == d.getVar("BPN"): | 19 | if imagedepend == d.getVar("BPN") or '': |
20 | continue | 20 | continue |
21 | elif ':' in imagedepend: | 21 | elif ':' in imagedepend: |
22 | uenv_depends += ' %s' % imagedepend.split(':')[0] | 22 | uenv_depends += ' %s' % imagedepend.split(':')[0] |
@@ -25,16 +25,16 @@ def remove_task_from_depends(d): | |||
25 | return uenv_depends | 25 | return uenv_depends |
26 | 26 | ||
27 | def uboot_boot_cmd(d): | 27 | def uboot_boot_cmd(d): |
28 | if d.getVar("KERNEL_IMAGETYPE") in ["uImage", "fitImage"]: | 28 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["uImage", "fitImage"]: |
29 | return "bootm" | 29 | return "bootm" |
30 | if d.getVar("KERNEL_IMAGETYPE") in ["zImage"]: | 30 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["zImage"]: |
31 | return "bootz" | 31 | return "bootz" |
32 | if d.getVar("KERNEL_IMAGETYPE") in ["Image"]: | 32 | if (d.getVar("KERNEL_IMAGETYPE") or '') in ["Image"]: |
33 | return "booti" | 33 | return "booti" |
34 | raise bb.parse.SkipRecipe("Unsupport kernel image type") | 34 | raise bb.parse.SkipRecipe("Unsupport kernel image type") |
35 | 35 | ||
36 | def get_sdbootdev(d): | 36 | def get_sdbootdev(d): |
37 | if d.getVar("SOC_FAMILY") in ["zynqmp"]: | 37 | if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]: |
38 | return "${devnum}" | 38 | return "${devnum}" |
39 | else: | 39 | else: |
40 | return "0" | 40 | return "0" |
@@ -43,24 +43,24 @@ def uenv_populate(d): | |||
43 | # populate the environment values | 43 | # populate the environment values |
44 | env = {} | 44 | env = {} |
45 | 45 | ||
46 | env["machine_name"] = d.getVar("MACHINE") | 46 | env["machine_name"] = d.getVar("MACHINE") or '' |
47 | 47 | ||
48 | env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") | 48 | env["kernel_image"] = d.getVar("KERNEL_IMAGETYPE") or '' |
49 | env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") | 49 | env["kernel_load_address"] = d.getVar("KERNEL_LOAD_ADDRESS") or '' |
50 | 50 | ||
51 | env["devicetree_image"] = boot_files_dtb_filepath(d) | 51 | env["devicetree_image"] = boot_files_dtb_filepath(d) |
52 | env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") | 52 | env["devicetree_load_address"] = d.getVar("DEVICETREE_LOAD_ADDRESS") or '' |
53 | env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") | 53 | env["devicetree_overlay_load_address" ] = d.getVar("DEVICETREE_OVERLAY_LOAD_ADDRESS") or '' |
54 | 54 | ||
55 | env["bootargs"] = d.getVar("KERNEL_BOOTARGS") | 55 | env["bootargs"] = d.getVar("KERNEL_BOOTARGS") or '' |
56 | 56 | ||
57 | env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}" | 57 | env["loadkernel"] = "fatload mmc " + get_sdbootdev(d) + " ${kernel_load_address} ${kernel_image}" |
58 | env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}" | 58 | env["loaddtb"] = "fatload mmc " + get_sdbootdev(d) + " ${devicetree_load_address} ${devicetree_image}" |
59 | env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi" | 59 | env["loaddtbo"] = "if test -e mmc " + get_sdbootdev(d) + " /devicetree/openamp.dtbo; then fatload mmc " + get_sdbootdev(d) + " ${devicetree_overlay_load_address} /devicetree/openamp.dtbo ; fdt addr ${devicetree_load_address} ; fdt resize 8192 ; fdt apply ${devicetree_overlay_load_address} ; fi" |
60 | env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}" | 60 | env["bootkernel"] = "run loadkernel && run loaddtb && run loaddtbo && " + uboot_boot_cmd(d) + " ${kernel_load_address} - ${devicetree_load_address}" |
61 | 61 | ||
62 | if d.getVar("SOC_FAMILY") in ["zynqmp"]: | 62 | if (d.getVar("SOC_FAMILY") or '') in ["zynqmp"]: |
63 | env["bootkernel"] = "setenv bootargs " + d.getVar("KERNEL_BOOTARGS") + " ; " + env["bootkernel"] | 63 | env["bootkernel"] = "setenv bootargs " + (d.getVar("KERNEL_BOOTARGS") or '') + " ; " + env["bootkernel"] |
64 | 64 | ||
65 | # default uenvcmd does not load bitstream | 65 | # default uenvcmd does not load bitstream |
66 | env["uenvcmd"] = "run bootkernel" | 66 | env["uenvcmd"] = "run bootkernel" |
@@ -89,7 +89,8 @@ KERNEL_LOAD_ADDRESS:zynq = "0x2080000" | |||
89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" | 89 | KERNEL_LOAD_ADDRESS:zynqmp = "0x200000" |
90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" | 90 | DEVICETREE_LOAD_ADDRESS:zynq = "0x2000000" |
91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" | 91 | DEVICETREE_LOAD_ADDRESS:zynqmp = "0x4000000" |
92 | DEVICETREE_OVERLAY_LOAD_ADDRESS = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | 92 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynq = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" |
93 | DEVICETREE_OVERLAY_LOAD_ADDRESS:zynqmp = "${@hex(int(d.getVar("DEVICETREE_LOAD_ADDRESS"),16) + 0xf00000)}" | ||
93 | 94 | ||
94 | python do_compile() { | 95 | python do_compile() { |
95 | env = uenv_populate(d) | 96 | env = uenv_populate(d) |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.bb new file mode 100644 index 00000000..bcadf1e4 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2024.01-xilinx-v2024.2.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.2.inc | ||
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc deleted file mode 100644 index b1bcc143..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2.inc +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | SUMMARY = "TCP / IP networking and traffic control utilities" | ||
2 | DESCRIPTION = "Iproute2 is a collection of utilities for controlling \ | ||
3 | TCP / IP networking and traffic control in Linux. Of the utilities ip \ | ||
4 | and tc are the most important. ip controls IPv4 and IPv6 \ | ||
5 | configuration and tc stands for traffic control." | ||
6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" | ||
7 | SECTION = "base" | ||
8 | LICENSE = "GPL-2.0-or-later" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" | ||
11 | |||
12 | DEPENDS = "flex-native bison-native iptables libcap" | ||
13 | |||
14 | inherit update-alternatives bash-completion pkgconfig | ||
15 | |||
16 | CLEANBROKEN = "1" | ||
17 | |||
18 | PACKAGECONFIG ??= "tipc elf devlink" | ||
19 | PACKAGECONFIG[tipc] = ",,libmnl," | ||
20 | PACKAGECONFIG[elf] = ",,elfutils," | ||
21 | PACKAGECONFIG[devlink] = ",,libmnl," | ||
22 | PACKAGECONFIG[rdma] = ",,libmnl," | ||
23 | |||
24 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" | ||
25 | |||
26 | EXTRA_OEMAKE = "\ | ||
27 | CC='${CC}' \ | ||
28 | KERNEL_INCLUDE=${STAGING_INCDIR} \ | ||
29 | DOCDIR=${docdir}/iproute2 \ | ||
30 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ | ||
31 | SBINDIR='${base_sbindir}' \ | ||
32 | LIBDIR='${libdir}' \ | ||
33 | " | ||
34 | |||
35 | do_configure:append () { | ||
36 | sh configure ${STAGING_INCDIR} | ||
37 | # Explicitly disable ATM support | ||
38 | sed -i -e '/TC_CONFIG_ATM/d' config.mk | ||
39 | } | ||
40 | |||
41 | do_install () { | ||
42 | oe_runmake DESTDIR=${D} install | ||
43 | mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 | ||
44 | install -d ${D}${datadir} | ||
45 | mv ${D}/share/* ${D}${datadir}/ || true | ||
46 | rm ${D}/share -rf || true | ||
47 | } | ||
48 | |||
49 | # The .so files in iproute2-tc are modules, not traditional libraries | ||
50 | INSANE_SKIP:${PN}-tc = "dev-so" | ||
51 | |||
52 | IPROUTE2_PACKAGES =+ "\ | ||
53 | ${PN}-devlink \ | ||
54 | ${PN}-genl \ | ||
55 | ${PN}-ifstat \ | ||
56 | ${PN}-ip \ | ||
57 | ${PN}-lnstat \ | ||
58 | ${PN}-nstat \ | ||
59 | ${PN}-rtacct \ | ||
60 | ${PN}-ss \ | ||
61 | ${PN}-tc \ | ||
62 | ${PN}-tipc \ | ||
63 | ${PN}-rdma \ | ||
64 | " | ||
65 | |||
66 | PACKAGE_BEFORE_PN = "${IPROUTE2_PACKAGES}" | ||
67 | RDEPENDS:${PN} += "${PN}-ip" | ||
68 | |||
69 | FILES:${PN}-tc = "${base_sbindir}/tc* \ | ||
70 | ${libdir}/tc/*.so" | ||
71 | FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ | ||
72 | ${base_sbindir}/ctstat \ | ||
73 | ${base_sbindir}/rtstat" | ||
74 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" | ||
75 | FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" | ||
76 | FILES:${PN}-genl = "${base_sbindir}/genl" | ||
77 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" | ||
78 | FILES:${PN}-nstat = "${base_sbindir}/nstat" | ||
79 | FILES:${PN}-ss = "${base_sbindir}/ss" | ||
80 | FILES:${PN}-tipc = "${base_sbindir}/tipc" | ||
81 | FILES:${PN}-devlink = "${base_sbindir}/devlink" | ||
82 | FILES:${PN}-rdma = "${base_sbindir}/rdma" | ||
83 | |||
84 | ALTERNATIVE:${PN}-ip = "ip" | ||
85 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" | ||
86 | ALTERNATIVE_LINK_NAME[ip] = "${base_sbindir}/ip" | ||
87 | ALTERNATIVE_PRIORITY = "100" | ||
88 | |||
89 | ALTERNATIVE:${PN}-tc = "tc" | ||
90 | ALTERNATIVE_LINK_NAME[tc] = "${base_sbindir}/tc" | ||
91 | ALTERNATIVE_PRIORITY_${PN}-tc = "100" | ||
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch deleted file mode 100644 index 74e3de1c..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001 | ||
2 | From: Baruch Siach <baruch@tkos.co.il> | ||
3 | Date: Thu, 22 Dec 2016 15:26:30 +0200 | ||
4 | Subject: [PATCH] libc-compat.h: add musl workaround | ||
5 | |||
6 | The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and | ||
7 | __USE_MISC) to solve conflicts with libc provided headers. This patch makes | ||
8 | libc-compat.h work for musl libc as well. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Taken From: | ||
13 | https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch | ||
14 | |||
15 | Signed-off-by: Baruch Siach <baruch@tkos.co.il> | ||
16 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
17 | |||
18 | --- | ||
19 | include/uapi/linux/libc-compat.h | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h | ||
23 | index a159991..22198fa 100644 | ||
24 | --- a/include/uapi/linux/libc-compat.h | ||
25 | +++ b/include/uapi/linux/libc-compat.h | ||
26 | @@ -50,10 +50,12 @@ | ||
27 | #define _LIBC_COMPAT_H | ||
28 | |||
29 | /* We have included glibc headers... */ | ||
30 | -#if defined(__GLIBC__) | ||
31 | +#if 1 | ||
32 | +#define __USE_MISC | ||
33 | |||
34 | /* Coordinate with glibc net/if.h header. */ | ||
35 | #if defined(_NET_IF_H) && defined(__USE_MISC) | ||
36 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 | ||
37 | |||
38 | /* GLIBC headers included first so don't define anything | ||
39 | * that would already be defined. */ | ||
diff --git a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb b/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb deleted file mode 100644 index 99a74339..00000000 --- a/meta-xilinx-core/recipes-connectivity/iproute2/iproute2_5.15.0.bb +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | require iproute2.inc | ||
2 | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ | ||
4 | file://0001-libc-compat.h-add-musl-workaround.patch \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[sha256sum] = "38e3e4a5f9a7f5575c015027a10df097c149111eeb739993128e5b2b35b291ff" | ||
8 | |||
9 | # CFLAGS are computed in Makefile and reference CCOPTS | ||
10 | # | ||
11 | EXTRA_OEMAKE:append = " CCOPTS='${CFLAGS}'" | ||
diff --git a/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb b/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb deleted file mode 100644 index 334b786b..00000000 --- a/meta-xilinx-core/recipes-connectivity/slirp/libslirp_git.bb +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
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-core/packagegroups/packagegroup-lmsensors.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-lmsensors.bb new file mode 100644 index 00000000..d6df0b13 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-lmsensors.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | DESCRIPTION = "PetaLinux packages that provides tools and drivers for monitoring temperatures, voltage" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | LMSENSORS_PACKAGES = " \ | ||
8 | lmsensors-sensors \ | ||
9 | lmsensors-libsensors \ | ||
10 | lmsensors-sensorsdetect \ | ||
11 | " | ||
12 | |||
13 | RDEPENDS:${PN} = "${LMSENSORS_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb new file mode 100644 index 00000000..9378e372 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-networking-stack.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "Packages to extend network stack" | ||
2 | |||
3 | inherit packagegroup | ||
4 | |||
5 | NETWORKING_STACK_PACKAGES = " \ | ||
6 | ethtool \ | ||
7 | phytool \ | ||
8 | netcat \ | ||
9 | net-tools \ | ||
10 | dnsmasq \ | ||
11 | iproute2 \ | ||
12 | iptables \ | ||
13 | rpcbind \ | ||
14 | iperf2 \ | ||
15 | iperf3 \ | ||
16 | " | ||
17 | |||
18 | RDEPENDS:${PN} = "${NETWORKING_STACK_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb new file mode 100644 index 00000000..2742b99e --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-opencv.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | DESCRIPTION = "PetaLinux opencv supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | OPENCV_PACKAGES = " \ | ||
8 | opencv \ | ||
9 | libopencv-core \ | ||
10 | libopencv-highgui \ | ||
11 | libopencv-imgproc \ | ||
12 | libopencv-objdetect \ | ||
13 | libopencv-ml \ | ||
14 | libopencv-calib3d \ | ||
15 | libopencv-ccalib \ | ||
16 | " | ||
17 | |||
18 | RDEPENDS:${PN} = "${OPENCV_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb new file mode 100644 index 00000000..45862a87 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-audio.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "ASLA supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | ALSA_PACKAGES = " \ | ||
8 | libasound \ | ||
9 | alsa-plugins \ | ||
10 | alsa-tools \ | ||
11 | alsa-utils \ | ||
12 | alsa-utils-scripts \ | ||
13 | sox \ | ||
14 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)} \ | ||
15 | " | ||
16 | RDEPENDS:${PN} = "${ALSA_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb new file mode 100644 index 00000000..90131e32 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-benchmarks.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "Packages for Benchmarks" | ||
2 | |||
3 | inherit packagegroup | ||
4 | |||
5 | BENCHMARKS_EXTRAS = " \ | ||
6 | hdparm \ | ||
7 | iotop \ | ||
8 | nicstat \ | ||
9 | lmbench \ | ||
10 | iptraf \ | ||
11 | net-snmp \ | ||
12 | lsof \ | ||
13 | babeltrace \ | ||
14 | sysstat \ | ||
15 | dool \ | ||
16 | dhrystone \ | ||
17 | linpack \ | ||
18 | whetstone \ | ||
19 | iperf3 \ | ||
20 | " | ||
21 | RDEPENDS:${PN} = "${BENCHMARKS_EXTRAS}" | ||
diff --git a/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb new file mode 100644 index 00000000..26aa26a2 --- /dev/null +++ b/meta-xilinx-core/recipes-core/packagegroups/packagegroup-xilinx-gstreamer.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "GStreamer packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | |||
7 | GSTREAMER_PACKAGES = " \ | ||
8 | gstreamer1.0 \ | ||
9 | gstreamer1.0-python \ | ||
10 | gstreamer1.0-meta-base \ | ||
11 | gstreamer1.0-plugins-base \ | ||
12 | gstreamer1.0-plugins-good \ | ||
13 | gstreamer1.0-plugins-bad \ | ||
14 | gstreamer1.0-rtsp-server \ | ||
15 | gst-shark \ | ||
16 | gstd \ | ||
17 | gst-perf \ | ||
18 | gstreamer1.0-omx \ | ||
19 | " | ||
20 | |||
21 | RDEPENDS:${PN} = "${GSTREAMER_PACKAGES}" | ||
diff --git a/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.1.bb b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.2.bb index 3c68f10d..ba6d829d 100644 --- a/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.1.bb +++ b/meta-xilinx-core/recipes-devtools/bootgen/bootgen_2024.2.bb | |||
@@ -10,8 +10,8 @@ DEPENDS += "openssl" | |||
10 | RDEPENDS:${PN} += "openssl" | 10 | RDEPENDS:${PN} += "openssl" |
11 | 11 | ||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | 12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" |
13 | BRANCH = "xlnx_rel_v2024.1" | 13 | BRANCH = "xlnx_rel_v2024.2" |
14 | SRCREV = "92e09bf37ea17d7b1f0e102a2548f27fb768651c" | 14 | SRCREV = "6f448fece5d999985128fd454ae047e065a5e45d" |
15 | 15 | ||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
17 | SRC_URI = "${REPO};${BRANCHARG}" | 17 | SRC_URI = "${REPO};${BRANCHARG}" |
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb new file mode 100644 index 00000000..75295dec --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-bokeh_3.5.1.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | SUMMARY = "Interactive plots and applications in the browser from Python" | ||
2 | HOMEPAGE = "https://bokeh.org" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4d2241e774601133cb2c58ae1277f9a5" | ||
5 | |||
6 | DEPENDS += " \ | ||
7 | python3-colorama-native \ | ||
8 | python3-setuptools-git-versioning-native \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[sha256sum] = "21dbe86842b24d83c73a1aef2de346a1a7c11c437015d6e9d180a1637e6e8197" | ||
12 | |||
13 | inherit pypi python_setuptools_build_meta | ||
14 | |||
15 | RDEPENDS:${PN} = " \ | ||
16 | python3-colorama \ | ||
17 | python3-contourpy \ | ||
18 | python3-jinja2 \ | ||
19 | python3-numpy \ | ||
20 | python3-packaging \ | ||
21 | python3-pandas \ | ||
22 | python3-pillow \ | ||
23 | python3-pyyaml \ | ||
24 | python3-tornado \ | ||
25 | python3-typing-extensions \ | ||
26 | python3-xyzservices \ | ||
27 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb new file mode 100644 index 00000000..5f21b002 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-contourpy_1.2.1.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | SUMMARY = "Python library for calculating contours of 2D quadrilateral grids" | ||
2 | HOMEPAGE = "https://github.com/contourpy/contourpy" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a051d5dfc6ccbc7bbe3e626d65156784" | ||
5 | |||
6 | DEPENDS += " \ | ||
7 | meson-native \ | ||
8 | python3-pybind11-native \ | ||
9 | " | ||
10 | |||
11 | SRC_URI[sha256sum] = "4d8908b3bee1c889e547867ca4cdc54e5ab6be6d3e078556814a22457f49423c" | ||
12 | |||
13 | inherit pypi python_mesonpy | ||
14 | |||
15 | RDEPENDS:${PN} = "python3-numpy" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb new file mode 100644 index 00000000..33987e68 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-mercantile_1.2.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | SUMMARY = "Web mercator XYZ tile utilities" | ||
2 | HOMEPAGE = "https://github.com/mapbox/mercantile" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=11e1a3a1ec3801b170b9152c135e8f74 \ | ||
5 | file://docs/license.rst;md5=083a4719b463be5b728fd0e3f47db7e7" | ||
6 | |||
7 | SRC_URI[sha256sum] = "fa3c6db15daffd58454ac198b31887519a19caccee3f9d63d17ae7ff61b3b56b" | ||
8 | |||
9 | inherit pypi setuptools3 | ||
10 | |||
11 | RDEPENDS:${PN} += " \ | ||
12 | python3-click \ | ||
13 | python3-core \ | ||
14 | python3-json \ | ||
15 | python3-logging \ | ||
16 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb new file mode 100644 index 00000000..3c03069b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-pybind11_2.13.1.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | SUMMARY = "Seamless operability between C++11 and Python" | ||
2 | LICENSE = "BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=774f65abd8a7fe3124be2cdf766cd06f" | ||
4 | |||
5 | SRC_URI[sha256sum] = "65be498b1cac516161add1508e65375674916bebf2570d057dc9c3c7bcbbc7b0" | ||
6 | |||
7 | inherit pypi python_setuptools_build_meta | ||
8 | |||
9 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb b/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb new file mode 100644 index 00000000..53f04b77 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-setuptools-git-versioning_2.0.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Use git repo data for building a version number according PEP-440" | ||
2 | HOMEPAGE = "https://setuptools-git-versioning.readthedocs.io" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=92e79e3a844e66731724600f3ac9c0d8" | ||
5 | |||
6 | SRC_URI[sha256sum] = "85b5fbe7bda8e9c24bbd9e587a9d4b91129417f4dd3e11e3c0d5f3f835fc4d4d" | ||
7 | |||
8 | inherit pypi setuptools3 | ||
9 | |||
10 | RDEPENDS:${PN} += " \ | ||
11 | python3-core \ | ||
12 | python3-datetime \ | ||
13 | python3-logging \ | ||
14 | python3-packaging \ | ||
15 | python3-pprint \ | ||
16 | python3-setuptools \ | ||
17 | python3-tomllib \ | ||
18 | " | ||
19 | |||
20 | BBCLASSEXTEND += "native" | ||
diff --git a/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb b/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb new file mode 100644 index 00000000..3e9b7ee1 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/python/python3-xyzservices_2024.6.0.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Source of XYZ tiles providers" | ||
2 | HOMEPAGE = "https://github.com/geopandas/xyzservices" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=6a3e440ffacb99f21fa410467c048574" | ||
5 | |||
6 | DEPENDS += "python3-setuptools-scm-native" | ||
7 | |||
8 | SRC_URI[sha256sum] = "58c1bdab4257d2551b9ef91cd48571f77b7c4d2bc45bf5e3c05ac97b3a4d7282" | ||
9 | |||
10 | inherit pypi python_setuptools_build_meta | ||
11 | |||
12 | FILES:${PN} += "${prefix}" | ||
13 | |||
14 | RDEPENDS:${PN} += " \ | ||
15 | python3-core \ | ||
16 | python3-json \ | ||
17 | python3-mercantile \ | ||
18 | python3-netclient \ | ||
19 | python3-requests \ | ||
20 | " | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch index f310edfa..77b13aa2 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch +++ b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | |||
@@ -35,14 +35,45 @@ if '-bootbin' in APU_args: | |||
35 | if PMU_args and PLM_args: | 35 | if PMU_args and PLM_args: |
36 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") | 36 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") |
37 | 37 | ||
38 | if ('--help' in APU_args) or (not PMU_args and not PLM_args): | 38 | help_options = ['-h', '-help', '--help'] |
39 | print("AMD FPGA QEMU multiarch wrapper\nVersion 2024.1\n\nUsage:") | 39 | def help(status): |
40 | print("AMD FPGA QEMU multiarch wrapper\nVersion 2024.2\n\nUsage:") | ||
40 | print(f" {sys.argv[0]} <APU options> [-pmu-args <pmu options>]") | 41 | print(f" {sys.argv[0]} <APU options> [-pmu-args <pmu options>]") |
41 | print(f" {sys.argv[0]} <APU options> [-plm-args <plm options>]\n") | 42 | print(f" {sys.argv[0]} <APU options> [-plm-args <plm options>]\n") |
42 | sys.exit(1) | 43 | if status == 0: |
44 | print(f"\n") | ||
45 | if set(PMU_args).intersection(set(help_options)): | ||
46 | print(f"PMU Options:\n") | ||
47 | pmu_args_s = ' '.join(PMU_args) | ||
48 | help_cmd = f'{binpath}/qemu-system-microblazeel {pmu_args_s}' | ||
49 | elif set(PLM_args).intersection(set(help_options)): | ||
50 | print(f"PLM Options:\n") | ||
51 | plm_args_s = ' '.join(PLM_args) | ||
52 | help_cmd = f'{binpath}/qemu-system-microblazeel {plm_args_s}' | ||
53 | else: | ||
54 | if not set(APU_args).intersection(set(help_options)): | ||
55 | APU_args.append('-help') | ||
56 | print(f"APU Options:\n") | ||
57 | print(f" -bootbin <boot.bin> - Use a boot.bin instead of individual firmware, device trees and bootloader\n") | ||
58 | apu_args_s = ' '.join(APU_args) | ||
59 | help_cmd = f'{binpath}/qemu-system-aarch64 {apu_args_s}' | ||
60 | |||
61 | print(f"{help_cmd}\n") | ||
62 | process = subprocess.Popen(help_cmd, shell=True, stderr=subprocess.PIPE) | ||
63 | status = process.wait() | ||
64 | sys.exit(status) | ||
65 | |||
66 | if set(APU_args).intersection(set(help_options)) or set(PMU_args).intersection(set(help_options)) or set(PLM_args).intersection(set(help_options)): | ||
67 | help(0) | ||
68 | |||
69 | if not PMU_args and not PLM_args: | ||
70 | help(1) | ||
43 | 71 | ||
44 | if PMU_args: | 72 | if PMU_args: |
45 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | 73 | try: |
74 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | ||
75 | except: | ||
76 | PMU_rom = "" | ||
46 | 77 | ||
47 | if not os.path.exists(PMU_rom): | 78 | if not os.path.exists(PMU_rom): |
48 | sys.exit(f'\nERROR: Missing PMU ROM: {PMU_rom}' | 79 | sys.exit(f'\nERROR: Missing PMU ROM: {PMU_rom}' |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch new file mode 100644 index 00000000..ff7f64ad --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 84986d94277de2ac853cb613c37dbafe485f0981 Mon Sep 17 00:00:00 2001 | ||
2 | From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
3 | Date: Fri, 6 Oct 2023 18:41:14 +0300 | ||
4 | Subject: [PATCH 1/2] python: rename QEMUMonitorProtocol.cmd() to cmd_raw() | ||
5 | |||
6 | Having cmd() and command() methods in one class doesn't look good. | ||
7 | Rename cmd() to cmd_raw(), to show its meaning better. | ||
8 | |||
9 | We also want to rename command() to cmd() in future, so this commit is | ||
10 | a necessary step. | ||
11 | |||
12 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
13 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
14 | Message-id: 20231006154125.1068348-5-vsementsov@yandex-team.ru | ||
15 | Signed-off-by: John Snow <jsnow@redhat.com> | ||
16 | |||
17 | Upstream-Status: Backport (37274707f6f3868fae7e0055d9a703006fc142d0) | ||
18 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
19 | --- | ||
20 | python/qemu/machine/machine.py | 2 +- | ||
21 | python/qemu/qmp/legacy.py | 8 ++------ | ||
22 | tests/qemu-iotests/iotests.py | 2 +- | ||
23 | 3 files changed, 4 insertions(+), 8 deletions(-) | ||
24 | |||
25 | diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py | ||
26 | index c16a0b6fed..82fa8cdddf 100644 | ||
27 | --- a/python/qemu/machine/machine.py | ||
28 | +++ b/python/qemu/machine/machine.py | ||
29 | @@ -686,7 +686,7 @@ def qmp(self, cmd: str, | ||
30 | conv_keys = True | ||
31 | |||
32 | qmp_args = self._qmp_args(conv_keys, args) | ||
33 | - ret = self._qmp.cmd(cmd, args=qmp_args) | ||
34 | + ret = self._qmp.cmd_raw(cmd, args=qmp_args) | ||
35 | if cmd == 'quit' and 'error' not in ret and 'return' in ret: | ||
36 | self._quit_issued = True | ||
37 | return ret | ||
38 | diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py | ||
39 | index e1e9383978..e5fa1ce9c4 100644 | ||
40 | --- a/python/qemu/qmp/legacy.py | ||
41 | +++ b/python/qemu/qmp/legacy.py | ||
42 | @@ -194,21 +194,17 @@ def cmd_obj(self, qmp_cmd: QMPMessage) -> QMPMessage: | ||
43 | ) | ||
44 | ) | ||
45 | |||
46 | - def cmd(self, name: str, | ||
47 | - args: Optional[Dict[str, object]] = None, | ||
48 | - cmd_id: Optional[object] = None) -> QMPMessage: | ||
49 | + def cmd_raw(self, name: str, | ||
50 | + args: Optional[Dict[str, object]] = None) -> QMPMessage: | ||
51 | """ | ||
52 | Build a QMP command and send it to the QMP Monitor. | ||
53 | |||
54 | :param name: command name (string) | ||
55 | :param args: command arguments (dict) | ||
56 | - :param cmd_id: command id (dict, list, string or int) | ||
57 | """ | ||
58 | qmp_cmd: QMPMessage = {'execute': name} | ||
59 | if args: | ||
60 | qmp_cmd['arguments'] = args | ||
61 | - if cmd_id: | ||
62 | - qmp_cmd['id'] = cmd_id | ||
63 | return self.cmd_obj(qmp_cmd) | ||
64 | |||
65 | def command(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
66 | diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py | ||
67 | index ef66fbd62b..8ffd9fb660 100644 | ||
68 | --- a/tests/qemu-iotests/iotests.py | ||
69 | +++ b/tests/qemu-iotests/iotests.py | ||
70 | @@ -460,7 +460,7 @@ def __init__(self, *args: str, instance_id: str = 'a', qmp: bool = False): | ||
71 | def qmp(self, cmd: str, args: Optional[Dict[str, object]] = None) \ | ||
72 | -> QMPMessage: | ||
73 | assert self._qmp is not None | ||
74 | - return self._qmp.cmd(cmd, args) | ||
75 | + return self._qmp.cmd_raw(cmd, args) | ||
76 | |||
77 | def get_qmp(self) -> QEMUMonitorProtocol: | ||
78 | assert self._qmp is not None | ||
79 | -- | ||
80 | 2.34.1 | ||
81 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch new file mode 100644 index 00000000..e776a537 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-python-qemu-rename-command-to-cmd.patch | |||
@@ -0,0 +1,1011 @@ | |||
1 | From a7037d9661d40351b15d8c8bf209b512a7b5047e Mon Sep 17 00:00:00 2001 | ||
2 | From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
3 | Date: Fri, 6 Oct 2023 18:41:15 +0300 | ||
4 | Subject: [PATCH 2/2] python/qemu: rename command() to cmd() | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Use a shorter name. We are going to move in iotests from qmp() to | ||
10 | command() where possible. But command() is longer than qmp() and don't | ||
11 | look better. Let's rename. | ||
12 | |||
13 | You can simply grep for '\.command(' and for 'def command(' to check | ||
14 | that everything is updated (command() in tests/docker/docker.py is | ||
15 | unrelated). | ||
16 | |||
17 | Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | ||
18 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
19 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
20 | Reviewed-by: Cédric Le Goater <clg@kaod.org> | ||
21 | Reviewed-by: Juan Quintela <quintela@redhat.com> | ||
22 | Message-id: 20231006154125.1068348-6-vsementsov@yandex-team.ru | ||
23 | [vsementsov: also update three occurrences in | ||
24 | tests/avocado/machine_aspeed.py and keep r-b] | ||
25 | Signed-off-by: John Snow <jsnow@redhat.com> | ||
26 | |||
27 | Upstream-status: Backport (684750ab4f8a3ad69512b71532408be3ac2547d4) | ||
28 | |||
29 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
30 | --- | ||
31 | docs/devel/testing.rst | 10 +- | ||
32 | python/qemu/machine/machine.py | 8 +- | ||
33 | python/qemu/qmp/legacy.py | 2 +- | ||
34 | python/qemu/qmp/qmp_shell.py | 11 +- | ||
35 | python/qemu/utils/qemu_ga_client.py | 2 +- | ||
36 | python/qemu/utils/qom.py | 8 +- | ||
37 | python/qemu/utils/qom_common.py | 2 +- | ||
38 | python/qemu/utils/qom_fuse.py | 6 +- | ||
39 | scripts/cpu-x86-uarch-abi.py | 4 +- | ||
40 | scripts/device-crash-test | 8 +- | ||
41 | scripts/render_block_graph.py | 8 +- | ||
42 | tests/avocado/avocado_qemu/__init__.py | 4 +- | ||
43 | tests/avocado/cpu_queries.py | 5 +- | ||
44 | tests/avocado/hotplug_cpu.py | 10 +- | ||
45 | tests/avocado/info_usernet.py | 4 +- | ||
46 | tests/avocado/machine_arm_integratorcp.py | 6 +- | ||
47 | tests/avocado/machine_aspeed.py | 12 +- | ||
48 | tests/avocado/machine_m68k_nextcube.py | 4 +- | ||
49 | tests/avocado/machine_mips_malta.py | 6 +- | ||
50 | tests/avocado/machine_s390_ccw_virtio.py | 28 ++-- | ||
51 | tests/avocado/migration.py | 10 +- | ||
52 | tests/avocado/pc_cpu_hotplug_props.py | 2 +- | ||
53 | tests/avocado/version.py | 4 +- | ||
54 | tests/avocado/virtio_check_params.py | 6 +- | ||
55 | tests/avocado/virtio_version.py | 5 +- | ||
56 | tests/avocado/x86_cpu_model_versions.py | 13 +- | ||
57 | tests/migration/guestperf/engine.py | 150 +++++++++++----------- | ||
58 | tests/qemu-iotests/256 | 34 ++--- | ||
59 | tests/qemu-iotests/257 | 36 +++--- | ||
60 | 29 files changed, 207 insertions(+), 201 deletions(-) | ||
61 | |||
62 | diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst | ||
63 | index b6ad21bed1..dddf1d6140 100644 | ||
64 | --- a/docs/devel/testing.rst | ||
65 | +++ b/docs/devel/testing.rst | ||
66 | @@ -1014,8 +1014,8 @@ class. Here's a simple usage example: | ||
67 | """ | ||
68 | def test_qmp_human_info_version(self): | ||
69 | self.vm.launch() | ||
70 | - res = self.vm.command('human-monitor-command', | ||
71 | - command_line='info version') | ||
72 | + res = self.vm.cmd('human-monitor-command', | ||
73 | + command_line='info version') | ||
74 | self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)') | ||
75 | |||
76 | To execute your test, run: | ||
77 | @@ -1065,15 +1065,15 @@ and hypothetical example follows: | ||
78 | first_machine.launch() | ||
79 | second_machine.launch() | ||
80 | |||
81 | - first_res = first_machine.command( | ||
82 | + first_res = first_machine.cmd( | ||
83 | 'human-monitor-command', | ||
84 | command_line='info version') | ||
85 | |||
86 | - second_res = second_machine.command( | ||
87 | + second_res = second_machine.cmd( | ||
88 | 'human-monitor-command', | ||
89 | command_line='info version') | ||
90 | |||
91 | - third_res = self.get_vm(name='third_machine').command( | ||
92 | + third_res = self.get_vm(name='third_machine').cmd( | ||
93 | 'human-monitor-command', | ||
94 | command_line='info version') | ||
95 | |||
96 | diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py | ||
97 | index 82fa8cdddf..0c48b76731 100644 | ||
98 | --- a/python/qemu/machine/machine.py | ||
99 | +++ b/python/qemu/machine/machine.py | ||
100 | @@ -691,16 +691,16 @@ def qmp(self, cmd: str, | ||
101 | self._quit_issued = True | ||
102 | return ret | ||
103 | |||
104 | - def command(self, cmd: str, | ||
105 | - conv_keys: bool = True, | ||
106 | - **args: Any) -> QMPReturnValue: | ||
107 | + def cmd(self, cmd: str, | ||
108 | + conv_keys: bool = True, | ||
109 | + **args: Any) -> QMPReturnValue: | ||
110 | """ | ||
111 | Invoke a QMP command. | ||
112 | On success return the response dict. | ||
113 | On failure raise an exception. | ||
114 | """ | ||
115 | qmp_args = self._qmp_args(conv_keys, args) | ||
116 | - ret = self._qmp.command(cmd, **qmp_args) | ||
117 | + ret = self._qmp.cmd(cmd, **qmp_args) | ||
118 | if cmd == 'quit': | ||
119 | self._quit_issued = True | ||
120 | return ret | ||
121 | diff --git a/python/qemu/qmp/legacy.py b/python/qemu/qmp/legacy.py | ||
122 | index e5fa1ce9c4..22a2b5616e 100644 | ||
123 | --- a/python/qemu/qmp/legacy.py | ||
124 | +++ b/python/qemu/qmp/legacy.py | ||
125 | @@ -207,7 +207,7 @@ def cmd_raw(self, name: str, | ||
126 | qmp_cmd['arguments'] = args | ||
127 | return self.cmd_obj(qmp_cmd) | ||
128 | |||
129 | - def command(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
130 | + def cmd(self, cmd: str, **kwds: object) -> QMPReturnValue: | ||
131 | """ | ||
132 | Build and send a QMP command to the monitor, report errors if any | ||
133 | """ | ||
134 | diff --git a/python/qemu/qmp/qmp_shell.py b/python/qemu/qmp/qmp_shell.py | ||
135 | index 619ab42ced..08240c16f8 100644 | ||
136 | --- a/python/qemu/qmp/qmp_shell.py | ||
137 | +++ b/python/qemu/qmp/qmp_shell.py | ||
138 | @@ -194,11 +194,12 @@ def close(self) -> None: | ||
139 | super().close() | ||
140 | |||
141 | def _fill_completion(self) -> None: | ||
142 | - cmds = self.cmd('query-commands') | ||
143 | - if 'error' in cmds: | ||
144 | - return | ||
145 | - for cmd in cmds['return']: | ||
146 | - self._completer.append(cmd['name']) | ||
147 | + try: | ||
148 | + cmds = cast(List[Dict[str, str]], self.cmd('query-commands')) | ||
149 | + for cmd in cmds: | ||
150 | + self._completer.append(cmd['name']) | ||
151 | + except ExecuteError: | ||
152 | + pass | ||
153 | |||
154 | def _completer_setup(self) -> None: | ||
155 | self._completer = QMPCompleter() | ||
156 | diff --git a/python/qemu/utils/qemu_ga_client.py b/python/qemu/utils/qemu_ga_client.py | ||
157 | index d8411bb2d0..9a665e6e99 100644 | ||
158 | --- a/python/qemu/utils/qemu_ga_client.py | ||
159 | +++ b/python/qemu/utils/qemu_ga_client.py | ||
160 | @@ -64,7 +64,7 @@ | ||
161 | class QemuGuestAgent(QEMUMonitorProtocol): | ||
162 | def __getattr__(self, name: str) -> Callable[..., Any]: | ||
163 | def wrapper(**kwds: object) -> object: | ||
164 | - return self.command('guest-' + name.replace('_', '-'), **kwds) | ||
165 | + return self.cmd('guest-' + name.replace('_', '-'), **kwds) | ||
166 | return wrapper | ||
167 | |||
168 | |||
169 | diff --git a/python/qemu/utils/qom.py b/python/qemu/utils/qom.py | ||
170 | index bcf192f477..426a0f245f 100644 | ||
171 | --- a/python/qemu/utils/qom.py | ||
172 | +++ b/python/qemu/utils/qom.py | ||
173 | @@ -84,7 +84,7 @@ def __init__(self, args: argparse.Namespace): | ||
174 | self.value = args.value | ||
175 | |||
176 | def run(self) -> int: | ||
177 | - rsp = self.qmp.command( | ||
178 | + rsp = self.qmp.cmd( | ||
179 | 'qom-set', | ||
180 | path=self.path, | ||
181 | property=self.prop, | ||
182 | @@ -129,7 +129,7 @@ def __init__(self, args: argparse.Namespace): | ||
183 | self.prop = tmp[1] | ||
184 | |||
185 | def run(self) -> int: | ||
186 | - rsp = self.qmp.command( | ||
187 | + rsp = self.qmp.cmd( | ||
188 | 'qom-get', | ||
189 | path=self.path, | ||
190 | property=self.prop | ||
191 | @@ -231,8 +231,8 @@ def _list_node(self, path: str) -> None: | ||
192 | if item.child: | ||
193 | continue | ||
194 | try: | ||
195 | - rsp = self.qmp.command('qom-get', path=path, | ||
196 | - property=item.name) | ||
197 | + rsp = self.qmp.cmd('qom-get', path=path, | ||
198 | + property=item.name) | ||
199 | print(f" {item.name}: {rsp} ({item.type})") | ||
200 | except ExecuteError as err: | ||
201 | print(f" {item.name}: <EXCEPTION: {err!s}> ({item.type})") | ||
202 | diff --git a/python/qemu/utils/qom_common.py b/python/qemu/utils/qom_common.py | ||
203 | index 80da1b2304..dd2c8b1908 100644 | ||
204 | --- a/python/qemu/utils/qom_common.py | ||
205 | +++ b/python/qemu/utils/qom_common.py | ||
206 | @@ -140,7 +140,7 @@ def qom_list(self, path: str) -> List[ObjectPropertyInfo]: | ||
207 | """ | ||
208 | :return: a strongly typed list from the 'qom-list' command. | ||
209 | """ | ||
210 | - rsp = self.qmp.command('qom-list', path=path) | ||
211 | + rsp = self.qmp.cmd('qom-list', path=path) | ||
212 | # qom-list returns List[ObjectPropertyInfo] | ||
213 | assert isinstance(rsp, list) | ||
214 | return [ObjectPropertyInfo.make(x) for x in rsp] | ||
215 | diff --git a/python/qemu/utils/qom_fuse.py b/python/qemu/utils/qom_fuse.py | ||
216 | index 8dcd59fcde..cf7e344bd5 100644 | ||
217 | --- a/python/qemu/utils/qom_fuse.py | ||
218 | +++ b/python/qemu/utils/qom_fuse.py | ||
219 | @@ -137,7 +137,7 @@ def read(self, path: str, size: int, offset: int, fh: IO[bytes]) -> bytes: | ||
220 | if path == '': | ||
221 | path = '/' | ||
222 | try: | ||
223 | - data = str(self.qmp.command('qom-get', path=path, property=prop)) | ||
224 | + data = str(self.qmp.cmd('qom-get', path=path, property=prop)) | ||
225 | data += '\n' # make values shell friendly | ||
226 | except ExecuteError as err: | ||
227 | raise FuseOSError(EPERM) from err | ||
228 | @@ -152,8 +152,8 @@ def readlink(self, path: str) -> Union[bool, str]: | ||
229 | return False | ||
230 | path, prop = path.rsplit('/', 1) | ||
231 | prefix = '/'.join(['..'] * (len(path.split('/')) - 1)) | ||
232 | - return prefix + str(self.qmp.command('qom-get', path=path, | ||
233 | - property=prop)) | ||
234 | + return prefix + str(self.qmp.cmd('qom-get', path=path, | ||
235 | + property=prop)) | ||
236 | |||
237 | def getattr(self, path: str, | ||
238 | fh: Optional[IO[bytes]] = None) -> Mapping[str, object]: | ||
239 | diff --git a/scripts/cpu-x86-uarch-abi.py b/scripts/cpu-x86-uarch-abi.py | ||
240 | index 82ff07582f..379a3c64bd 100644 | ||
241 | --- a/scripts/cpu-x86-uarch-abi.py | ||
242 | +++ b/scripts/cpu-x86-uarch-abi.py | ||
243 | @@ -94,8 +94,8 @@ | ||
244 | |||
245 | for name in sorted(names): | ||
246 | cpu = shell.cmd("query-cpu-model-expansion", | ||
247 | - { "type": "static", | ||
248 | - "model": { "name": name }}) | ||
249 | + { "type": "static", | ||
250 | + "model": { "name": name }}) | ||
251 | |||
252 | got = {} | ||
253 | for (feature, present) in cpu["return"]["model"]["props"].items(): | ||
254 | diff --git a/scripts/device-crash-test b/scripts/device-crash-test | ||
255 | index b74d887331..9bf9d0d6e6 100755 | ||
256 | --- a/scripts/device-crash-test | ||
257 | +++ b/scripts/device-crash-test | ||
258 | @@ -269,14 +269,14 @@ def formatTestCase(t): | ||
259 | |||
260 | def qomListTypeNames(vm, **kwargs): | ||
261 | """Run qom-list-types QMP command, return type names""" | ||
262 | - types = vm.command('qom-list-types', **kwargs) | ||
263 | + types = vm.cmd('qom-list-types', **kwargs) | ||
264 | return [t['name'] for t in types] | ||
265 | |||
266 | |||
267 | def infoQDM(vm): | ||
268 | """Parse 'info qdm' output""" | ||
269 | args = {'command-line': 'info qdm'} | ||
270 | - devhelp = vm.command('human-monitor-command', **args) | ||
271 | + devhelp = vm.cmd('human-monitor-command', **args) | ||
272 | for l in devhelp.split('\n'): | ||
273 | l = l.strip() | ||
274 | if l == '' or l.endswith(':'): | ||
275 | @@ -304,9 +304,9 @@ class QemuBinaryInfo(object): | ||
276 | # there's no way to query DeviceClass::user_creatable using QMP, | ||
277 | # so use 'info qdm': | ||
278 | self.no_user_devs = set([d['name'] for d in infoQDM(vm, ) if d['no-user']]) | ||
279 | - self.machines = list(m['name'] for m in vm.command('query-machines')) | ||
280 | + self.machines = list(m['name'] for m in vm.cmd('query-machines')) | ||
281 | self.user_devs = self.alldevs.difference(self.no_user_devs) | ||
282 | - self.kvm_available = vm.command('query-kvm')['enabled'] | ||
283 | + self.kvm_available = vm.cmd('query-kvm')['enabled'] | ||
284 | finally: | ||
285 | vm.shutdown() | ||
286 | |||
287 | diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py | ||
288 | index 8f731a5cfe..3e1a2e3fa7 100755 | ||
289 | --- a/scripts/render_block_graph.py | ||
290 | +++ b/scripts/render_block_graph.py | ||
291 | @@ -43,13 +43,13 @@ def render_block_graph(qmp, filename, format='png'): | ||
292 | representation in @format into "@filename.@format" | ||
293 | ''' | ||
294 | |||
295 | - bds_nodes = qmp.command('query-named-block-nodes') | ||
296 | + bds_nodes = qmp.cmd('query-named-block-nodes') | ||
297 | bds_nodes = {n['node-name']: n for n in bds_nodes} | ||
298 | |||
299 | - job_nodes = qmp.command('query-block-jobs') | ||
300 | + job_nodes = qmp.cmd('query-block-jobs') | ||
301 | job_nodes = {n['device']: n for n in job_nodes} | ||
302 | |||
303 | - block_graph = qmp.command('x-debug-query-block-graph') | ||
304 | + block_graph = qmp.cmd('x-debug-query-block-graph') | ||
305 | |||
306 | graph = Digraph(comment='Block Nodes Graph') | ||
307 | graph.format = format | ||
308 | @@ -94,7 +94,7 @@ class LibvirtGuest(): | ||
309 | def __init__(self, name): | ||
310 | self.name = name | ||
311 | |||
312 | - def command(self, cmd): | ||
313 | + def cmd(self, cmd): | ||
314 | # only supports qmp commands without parameters | ||
315 | m = {'execute': cmd} | ||
316 | ar = ['virsh', 'qemu-monitor-command', self.name, json.dumps(m)] | ||
317 | diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py | ||
318 | index 33090903f1..1a4d40a46f 100644 | ||
319 | --- a/tests/avocado/avocado_qemu/__init__.py | ||
320 | +++ b/tests/avocado/avocado_qemu/__init__.py | ||
321 | @@ -408,8 +408,8 @@ class LinuxSSHMixIn: | ||
322 | |||
323 | def ssh_connect(self, username, credential, credential_is_key=True): | ||
324 | self.ssh_logger = logging.getLogger('ssh') | ||
325 | - res = self.vm.command('human-monitor-command', | ||
326 | - command_line='info usernet') | ||
327 | + res = self.vm.cmd('human-monitor-command', | ||
328 | + command_line='info usernet') | ||
329 | port = get_info_usernet_hostfwd_port(res) | ||
330 | self.assertIsNotNone(port) | ||
331 | self.assertGreater(port, 0) | ||
332 | diff --git a/tests/avocado/cpu_queries.py b/tests/avocado/cpu_queries.py | ||
333 | index cf69f69b11..86c2d5c92d 100644 | ||
334 | --- a/tests/avocado/cpu_queries.py | ||
335 | +++ b/tests/avocado/cpu_queries.py | ||
336 | @@ -23,12 +23,13 @@ def test(self): | ||
337 | self.vm.add_args('-S') | ||
338 | self.vm.launch() | ||
339 | |||
340 | - cpus = self.vm.command('query-cpu-definitions') | ||
341 | + cpus = self.vm.cmd('query-cpu-definitions') | ||
342 | for c in cpus: | ||
343 | self.log.info("Checking CPU: %s", c) | ||
344 | self.assertNotIn('', c['unavailable-features'], c['name']) | ||
345 | |||
346 | for c in cpus: | ||
347 | model = {'name': c['name']} | ||
348 | - e = self.vm.command('query-cpu-model-expansion', model=model, type='full') | ||
349 | + e = self.vm.cmd('query-cpu-model-expansion', model=model, | ||
350 | + type='full') | ||
351 | self.assertEquals(e['model']['name'], c['name']) | ||
352 | diff --git a/tests/avocado/hotplug_cpu.py b/tests/avocado/hotplug_cpu.py | ||
353 | index 6374bf1b54..292bb43e4d 100644 | ||
354 | --- a/tests/avocado/hotplug_cpu.py | ||
355 | +++ b/tests/avocado/hotplug_cpu.py | ||
356 | @@ -29,9 +29,9 @@ def test(self): | ||
357 | with self.assertRaises(AssertionError): | ||
358 | self.ssh_command('test -e /sys/devices/system/cpu/cpu1') | ||
359 | |||
360 | - self.vm.command('device_add', | ||
361 | - driver='Haswell-x86_64-cpu', | ||
362 | - socket_id=0, | ||
363 | - core_id=1, | ||
364 | - thread_id=0) | ||
365 | + self.vm.cmd('device_add', | ||
366 | + driver='Haswell-x86_64-cpu', | ||
367 | + socket_id=0, | ||
368 | + core_id=1, | ||
369 | + thread_id=0) | ||
370 | self.ssh_command('test -e /sys/devices/system/cpu/cpu1') | ||
371 | diff --git a/tests/avocado/info_usernet.py b/tests/avocado/info_usernet.py | ||
372 | index fdc4d90c42..e1aa7a6e0a 100644 | ||
373 | --- a/tests/avocado/info_usernet.py | ||
374 | +++ b/tests/avocado/info_usernet.py | ||
375 | @@ -22,8 +22,8 @@ def test_hostfwd(self): | ||
376 | self.require_netdev('user') | ||
377 | self.vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22') | ||
378 | self.vm.launch() | ||
379 | - res = self.vm.command('human-monitor-command', | ||
380 | - command_line='info usernet') | ||
381 | + res = self.vm.cmd('human-monitor-command', | ||
382 | + command_line='info usernet') | ||
383 | port = get_info_usernet_hostfwd_port(res) | ||
384 | self.assertIsNotNone(port, | ||
385 | ('"info usernet" output content does not seem to ' | ||
386 | diff --git a/tests/avocado/machine_arm_integratorcp.py b/tests/avocado/machine_arm_integratorcp.py | ||
387 | index 1ffe1073ef..87f5cf3953 100644 | ||
388 | --- a/tests/avocado/machine_arm_integratorcp.py | ||
389 | +++ b/tests/avocado/machine_arm_integratorcp.py | ||
390 | @@ -81,9 +81,9 @@ def test_framebuffer_tux_logo(self): | ||
391 | self.boot_integratorcp() | ||
392 | framebuffer_ready = 'Console: switching to colour frame buffer device' | ||
393 | wait_for_console_pattern(self, framebuffer_ready) | ||
394 | - self.vm.command('human-monitor-command', command_line='stop') | ||
395 | - self.vm.command('human-monitor-command', | ||
396 | - command_line='screendump %s' % screendump_path) | ||
397 | + self.vm.cmd('human-monitor-command', command_line='stop') | ||
398 | + self.vm.cmd('human-monitor-command', | ||
399 | + command_line='screendump %s' % screendump_path) | ||
400 | logger = logging.getLogger('framebuffer') | ||
401 | |||
402 | cpu_count = 1 | ||
403 | diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py | ||
404 | index 724ee72c02..68619bbbdc 100644 | ||
405 | --- a/tests/avocado/machine_aspeed.py | ||
406 | +++ b/tests/avocado/machine_aspeed.py | ||
407 | @@ -181,8 +181,8 @@ def test_arm_ast2500_evb_buildroot(self): | ||
408 | 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); | ||
409 | exec_command_and_wait_for_pattern(self, | ||
410 | 'cat /sys/class/hwmon/hwmon1/temp1_input', '0') | ||
411 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
412 | - property='temperature', value=18000); | ||
413 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
414 | + property='temperature', value=18000); | ||
415 | exec_command_and_wait_for_pattern(self, | ||
416 | 'cat /sys/class/hwmon/hwmon1/temp1_input', '18000') | ||
417 | |||
418 | @@ -213,8 +213,8 @@ def test_arm_ast2600_evb_buildroot(self): | ||
419 | 'i2c i2c-3: new_device: Instantiated device lm75 at 0x4d'); | ||
420 | exec_command_and_wait_for_pattern(self, | ||
421 | 'cat /sys/class/hwmon/hwmon0/temp1_input', '0') | ||
422 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
423 | - property='temperature', value=18000); | ||
424 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
425 | + property='temperature', value=18000); | ||
426 | exec_command_and_wait_for_pattern(self, | ||
427 | 'cat /sys/class/hwmon/hwmon0/temp1_input', '18000') | ||
428 | |||
429 | @@ -357,8 +357,8 @@ def test_arm_ast2600_evb_sdk(self): | ||
430 | 'i2c i2c-5: new_device: Instantiated device lm75 at 0x4d'); | ||
431 | self.ssh_command_output_contains( | ||
432 | 'cat /sys/class/hwmon/hwmon19/temp1_input', '0') | ||
433 | - self.vm.command('qom-set', path='/machine/peripheral/tmp-test', | ||
434 | - property='temperature', value=18000); | ||
435 | + self.vm.cmd('qom-set', path='/machine/peripheral/tmp-test', | ||
436 | + property='temperature', value=18000); | ||
437 | self.ssh_command_output_contains( | ||
438 | 'cat /sys/class/hwmon/hwmon19/temp1_input', '18000') | ||
439 | |||
440 | diff --git a/tests/avocado/machine_m68k_nextcube.py b/tests/avocado/machine_m68k_nextcube.py | ||
441 | index 6790e7d9cd..d6da2fbb01 100644 | ||
442 | --- a/tests/avocado/machine_m68k_nextcube.py | ||
443 | +++ b/tests/avocado/machine_m68k_nextcube.py | ||
444 | @@ -43,8 +43,8 @@ def check_bootrom_framebuffer(self, screenshot_path): | ||
445 | # 'displaysurface_create 1120x832' trace-event. | ||
446 | time.sleep(2) | ||
447 | |||
448 | - self.vm.command('human-monitor-command', | ||
449 | - command_line='screendump %s' % screenshot_path) | ||
450 | + self.vm.cmd('human-monitor-command', | ||
451 | + command_line='screendump %s' % screenshot_path) | ||
452 | |||
453 | @skipUnless(PIL_AVAILABLE, 'Python PIL not installed') | ||
454 | def test_bootrom_framebuffer_size(self): | ||
455 | diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py | ||
456 | index 92233451c5..9bd54518bf 100644 | ||
457 | --- a/tests/avocado/machine_mips_malta.py | ||
458 | +++ b/tests/avocado/machine_mips_malta.py | ||
459 | @@ -71,9 +71,9 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_count): | ||
460 | framebuffer_ready = 'Console: switching to colour frame buffer device' | ||
461 | wait_for_console_pattern(self, framebuffer_ready, | ||
462 | failure_message='Kernel panic - not syncing') | ||
463 | - self.vm.command('human-monitor-command', command_line='stop') | ||
464 | - self.vm.command('human-monitor-command', | ||
465 | - command_line='screendump %s' % screendump_path) | ||
466 | + self.vm.cmd('human-monitor-command', command_line='stop') | ||
467 | + self.vm.cmd('human-monitor-command', | ||
468 | + command_line='screendump %s' % screendump_path) | ||
469 | logger = logging.getLogger('framebuffer') | ||
470 | |||
471 | match_threshold = 0.95 | ||
472 | diff --git a/tests/avocado/machine_s390_ccw_virtio.py b/tests/avocado/machine_s390_ccw_virtio.py | ||
473 | index e7a2a20ba6..e1f493bc44 100644 | ||
474 | --- a/tests/avocado/machine_s390_ccw_virtio.py | ||
475 | +++ b/tests/avocado/machine_s390_ccw_virtio.py | ||
476 | @@ -107,10 +107,10 @@ def test_s390x_devices(self): | ||
477 | 'dd if=/dev/hwrng of=/dev/null bs=1k count=10', | ||
478 | '10+0 records out') | ||
479 | self.clear_guest_dmesg() | ||
480 | - self.vm.command('device_del', id='rn1') | ||
481 | + self.vm.cmd('device_del', id='rn1') | ||
482 | self.wait_for_crw_reports() | ||
483 | self.clear_guest_dmesg() | ||
484 | - self.vm.command('device_del', id='rn2') | ||
485 | + self.vm.cmd('device_del', id='rn2') | ||
486 | self.wait_for_crw_reports() | ||
487 | exec_command_and_wait_for_pattern(self, | ||
488 | 'dd if=/dev/hwrng of=/dev/null bs=1k count=10', | ||
489 | @@ -132,8 +132,8 @@ def test_s390x_devices(self): | ||
490 | '0x0000000c') | ||
491 | # add another device | ||
492 | self.clear_guest_dmesg() | ||
493 | - self.vm.command('device_add', driver='virtio-net-ccw', | ||
494 | - devno='fe.0.4711', id='net_4711') | ||
495 | + self.vm.cmd('device_add', driver='virtio-net-ccw', | ||
496 | + devno='fe.0.4711', id='net_4711') | ||
497 | self.wait_for_crw_reports() | ||
498 | exec_command_and_wait_for_pattern(self, 'for i in 1 2 3 4 5 6 7 ; do ' | ||
499 | 'if [ -e /sys/bus/ccw/devices/*4711 ]; then break; fi ;' | ||
500 | @@ -141,7 +141,7 @@ def test_s390x_devices(self): | ||
501 | '0.0.4711') | ||
502 | # and detach it again | ||
503 | self.clear_guest_dmesg() | ||
504 | - self.vm.command('device_del', id='net_4711') | ||
505 | + self.vm.cmd('device_del', id='net_4711') | ||
506 | self.vm.event_wait(name='DEVICE_DELETED', | ||
507 | match={'data': {'device': 'net_4711'}}) | ||
508 | self.wait_for_crw_reports() | ||
509 | @@ -151,10 +151,10 @@ def test_s390x_devices(self): | ||
510 | # test the virtio-balloon device | ||
511 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
512 | 'MemTotal: 115640 kB') | ||
513 | - self.vm.command('human-monitor-command', command_line='balloon 96') | ||
514 | + self.vm.cmd('human-monitor-command', command_line='balloon 96') | ||
515 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
516 | 'MemTotal: 82872 kB') | ||
517 | - self.vm.command('human-monitor-command', command_line='balloon 128') | ||
518 | + self.vm.cmd('human-monitor-command', command_line='balloon 128') | ||
519 | exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', | ||
520 | 'MemTotal: 115640 kB') | ||
521 | |||
522 | @@ -245,7 +245,7 @@ def test_s390x_fedora(self): | ||
523 | '12+0 records out') | ||
524 | with tempfile.NamedTemporaryFile(suffix='.ppm', | ||
525 | prefix='qemu-scrdump-') as ppmfile: | ||
526 | - self.vm.command('screendump', filename=ppmfile.name) | ||
527 | + self.vm.cmd('screendump', filename=ppmfile.name) | ||
528 | ppmfile.seek(0) | ||
529 | line = ppmfile.readline() | ||
530 | self.assertEqual(line, b"P6\n") | ||
531 | @@ -261,16 +261,16 @@ def test_s390x_fedora(self): | ||
532 | # Hot-plug a virtio-crypto device and see whether it gets accepted | ||
533 | self.log.info("Test hot-plug virtio-crypto device") | ||
534 | self.clear_guest_dmesg() | ||
535 | - self.vm.command('object-add', qom_type='cryptodev-backend-builtin', | ||
536 | - id='cbe0') | ||
537 | - self.vm.command('device_add', driver='virtio-crypto-ccw', id='crypdev0', | ||
538 | - cryptodev='cbe0', devno='fe.0.2342') | ||
539 | + self.vm.cmd('object-add', qom_type='cryptodev-backend-builtin', | ||
540 | + id='cbe0') | ||
541 | + self.vm.cmd('device_add', driver='virtio-crypto-ccw', id='crypdev0', | ||
542 | + cryptodev='cbe0', devno='fe.0.2342') | ||
543 | exec_command_and_wait_for_pattern(self, | ||
544 | 'while ! (dmesg -c | grep Accelerator.device) ; do' | ||
545 | ' sleep 1 ; done', 'Accelerator device is ready') | ||
546 | exec_command_and_wait_for_pattern(self, 'lscss', '0.0.2342') | ||
547 | - self.vm.command('device_del', id='crypdev0') | ||
548 | - self.vm.command('object-del', id='cbe0') | ||
549 | + self.vm.cmd('device_del', id='crypdev0') | ||
550 | + self.vm.cmd('object-del', id='cbe0') | ||
551 | exec_command_and_wait_for_pattern(self, | ||
552 | 'while ! (dmesg -c | grep Start.virtcrypto_remove) ; do' | ||
553 | ' sleep 1 ; done', 'Start virtcrypto_remove.') | ||
554 | diff --git a/tests/avocado/migration.py b/tests/avocado/migration.py | ||
555 | index fdc1d234fb..09b62f813e 100644 | ||
556 | --- a/tests/avocado/migration.py | ||
557 | +++ b/tests/avocado/migration.py | ||
558 | @@ -30,7 +30,7 @@ class MigrationTest(QemuSystemTest): | ||
559 | |||
560 | @staticmethod | ||
561 | def migration_finished(vm): | ||
562 | - return vm.command('query-migrate')['status'] in ('completed', 'failed') | ||
563 | + return vm.cmd('query-migrate')['status'] in ('completed', 'failed') | ||
564 | |||
565 | def assert_migration(self, src_vm, dst_vm): | ||
566 | wait.wait_for(self.migration_finished, | ||
567 | @@ -41,10 +41,10 @@ def assert_migration(self, src_vm, dst_vm): | ||
568 | timeout=self.timeout, | ||
569 | step=0.1, | ||
570 | args=(dst_vm,)) | ||
571 | - self.assertEqual(src_vm.command('query-migrate')['status'], 'completed') | ||
572 | - self.assertEqual(dst_vm.command('query-migrate')['status'], 'completed') | ||
573 | - self.assertEqual(dst_vm.command('query-status')['status'], 'running') | ||
574 | - self.assertEqual(src_vm.command('query-status')['status'],'postmigrate') | ||
575 | + self.assertEqual(src_vm.cmd('query-migrate')['status'], 'completed') | ||
576 | + self.assertEqual(dst_vm.cmd('query-migrate')['status'], 'completed') | ||
577 | + self.assertEqual(dst_vm.cmd('query-status')['status'], 'running') | ||
578 | + self.assertEqual(src_vm.cmd('query-status')['status'],'postmigrate') | ||
579 | |||
580 | def do_migrate(self, dest_uri, src_uri=None): | ||
581 | dest_vm = self.get_vm('-incoming', dest_uri) | ||
582 | diff --git a/tests/avocado/pc_cpu_hotplug_props.py b/tests/avocado/pc_cpu_hotplug_props.py | ||
583 | index 52b878188e..b56f51d02a 100644 | ||
584 | --- a/tests/avocado/pc_cpu_hotplug_props.py | ||
585 | +++ b/tests/avocado/pc_cpu_hotplug_props.py | ||
586 | @@ -32,4 +32,4 @@ def test_no_die_id(self): | ||
587 | self.vm.add_args('-smp', '1,sockets=2,cores=2,threads=2,maxcpus=8') | ||
588 | self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0') | ||
589 | self.vm.launch() | ||
590 | - self.assertEquals(len(self.vm.command('query-cpus-fast')), 2) | ||
591 | + self.assertEquals(len(self.vm.cmd('query-cpus-fast')), 2) | ||
592 | diff --git a/tests/avocado/version.py b/tests/avocado/version.py | ||
593 | index dd775955eb..93ffdf3d97 100644 | ||
594 | --- a/tests/avocado/version.py | ||
595 | +++ b/tests/avocado/version.py | ||
596 | @@ -20,6 +20,6 @@ class Version(QemuSystemTest): | ||
597 | def test_qmp_human_info_version(self): | ||
598 | self.vm.add_args('-nodefaults') | ||
599 | self.vm.launch() | ||
600 | - res = self.vm.command('human-monitor-command', | ||
601 | - command_line='info version') | ||
602 | + res = self.vm.cmd('human-monitor-command', | ||
603 | + command_line='info version') | ||
604 | self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)') | ||
605 | diff --git a/tests/avocado/virtio_check_params.py b/tests/avocado/virtio_check_params.py | ||
606 | index 4093da8a67..f4314ef824 100644 | ||
607 | --- a/tests/avocado/virtio_check_params.py | ||
608 | +++ b/tests/avocado/virtio_check_params.py | ||
609 | @@ -51,8 +51,8 @@ def query_virtqueue(self, vm, dev_type_name): | ||
610 | error = None | ||
611 | props = None | ||
612 | |||
613 | - output = vm.command('human-monitor-command', | ||
614 | - command_line = 'info qtree') | ||
615 | + output = vm.cmd('human-monitor-command', | ||
616 | + command_line = 'info qtree') | ||
617 | props_list = DEV_TYPES[dev_type_name].values(); | ||
618 | pattern = self.make_pattern(props_list) | ||
619 | res = re.findall(pattern, output) | ||
620 | @@ -121,7 +121,7 @@ def test_machine_types(self): | ||
621 | # collect all machine types except 'none', 'isapc', 'microvm' | ||
622 | with QEMUMachine(self.qemu_bin) as vm: | ||
623 | vm.launch() | ||
624 | - machines = [m['name'] for m in vm.command('query-machines')] | ||
625 | + machines = [m['name'] for m in vm.cmd('query-machines')] | ||
626 | vm.shutdown() | ||
627 | machines.remove('none') | ||
628 | machines.remove('isapc') | ||
629 | diff --git a/tests/avocado/virtio_version.py b/tests/avocado/virtio_version.py | ||
630 | index c84e48813a..afe5e828b5 100644 | ||
631 | --- a/tests/avocado/virtio_version.py | ||
632 | +++ b/tests/avocado/virtio_version.py | ||
633 | @@ -48,7 +48,8 @@ def pci_modern_device_id(virtio_devid): | ||
634 | return virtio_devid + 0x1040 | ||
635 | |||
636 | def devtype_implements(vm, devtype, implements): | ||
637 | - return devtype in [d['name'] for d in vm.command('qom-list-types', implements=implements)] | ||
638 | + return devtype in [d['name'] for d in | ||
639 | + vm.cmd('qom-list-types', implements=implements)] | ||
640 | |||
641 | def get_pci_interfaces(vm, devtype): | ||
642 | interfaces = ('pci-express-device', 'conventional-pci-device') | ||
643 | @@ -78,7 +79,7 @@ def run_device(self, devtype, opts=None, machine='pc'): | ||
644 | vm.add_args('-S') | ||
645 | vm.launch() | ||
646 | |||
647 | - pcibuses = vm.command('query-pci') | ||
648 | + pcibuses = vm.cmd('query-pci') | ||
649 | alldevs = [dev for bus in pcibuses for dev in bus['devices']] | ||
650 | devfortest = [dev for dev in alldevs | ||
651 | if dev['qdev_id'] == 'devfortest'] | ||
652 | diff --git a/tests/avocado/x86_cpu_model_versions.py b/tests/avocado/x86_cpu_model_versions.py | ||
653 | index a6edf74c1c..9e07b8a55d 100644 | ||
654 | --- a/tests/avocado/x86_cpu_model_versions.py | ||
655 | +++ b/tests/avocado/x86_cpu_model_versions.py | ||
656 | @@ -84,7 +84,8 @@ def test_4_0_alias_compatibility(self): | ||
657 | # with older QEMU versions that didn't have the versioned CPU model | ||
658 | self.vm.add_args('-S') | ||
659 | self.vm.launch() | ||
660 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
661 | + cpus = dict((m['name'], m) for m in | ||
662 | + self.vm.cmd('query-cpu-definitions')) | ||
663 | |||
664 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
665 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
666 | @@ -115,7 +116,8 @@ def test_4_1_alias(self): | ||
667 | self.vm.add_args('-S') | ||
668 | self.vm.launch() | ||
669 | |||
670 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
671 | + cpus = dict((m['name'], m) for m in | ||
672 | + self.vm.cmd('query-cpu-definitions')) | ||
673 | |||
674 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
675 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
676 | @@ -220,7 +222,8 @@ def test_none_alias(self): | ||
677 | self.vm.add_args('-S') | ||
678 | self.vm.launch() | ||
679 | |||
680 | - cpus = dict((m['name'], m) for m in self.vm.command('query-cpu-definitions')) | ||
681 | + cpus = dict((m['name'], m) for m in | ||
682 | + self.vm.cmd('query-cpu-definitions')) | ||
683 | |||
684 | self.assertFalse(cpus['Cascadelake-Server']['static'], | ||
685 | 'unversioned Cascadelake-Server CPU model must not be static') | ||
686 | @@ -246,8 +249,8 @@ class CascadelakeArchCapabilities(avocado_qemu.QemuSystemTest): | ||
687 | :avocado: tags=arch:x86_64 | ||
688 | """ | ||
689 | def get_cpu_prop(self, prop): | ||
690 | - cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path') | ||
691 | - return self.vm.command('qom-get', path=cpu_path, property=prop) | ||
692 | + cpu_path = self.vm.cmd('query-cpus-fast')[0].get('qom-path') | ||
693 | + return self.vm.cmd('qom-get', path=cpu_path, property=prop) | ||
694 | |||
695 | def test_4_1(self): | ||
696 | """ | ||
697 | diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py | ||
698 | index e69d16a62c..da96ca034a 100644 | ||
699 | --- a/tests/migration/guestperf/engine.py | ||
700 | +++ b/tests/migration/guestperf/engine.py | ||
701 | @@ -77,7 +77,7 @@ def _cpu_timing(self, pid): | ||
702 | return TimingRecord(pid, now, 1000 * (stime + utime) / jiffies_per_sec) | ||
703 | |||
704 | def _migrate_progress(self, vm): | ||
705 | - info = vm.command("query-migrate") | ||
706 | + info = vm.cmd("query-migrate") | ||
707 | |||
708 | if "ram" not in info: | ||
709 | info["ram"] = {} | ||
710 | @@ -109,7 +109,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
711 | src_vcpu_time = [] | ||
712 | src_pid = src.get_pid() | ||
713 | |||
714 | - vcpus = src.command("query-cpus-fast") | ||
715 | + vcpus = src.cmd("query-cpus-fast") | ||
716 | src_threads = [] | ||
717 | for vcpu in vcpus: | ||
718 | src_threads.append(vcpu["thread-id"]) | ||
719 | @@ -128,82 +128,82 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
720 | if self._verbose: | ||
721 | print("Starting migration") | ||
722 | if scenario._auto_converge: | ||
723 | - resp = src.command("migrate-set-capabilities", | ||
724 | - capabilities = [ | ||
725 | - { "capability": "auto-converge", | ||
726 | - "state": True } | ||
727 | - ]) | ||
728 | - resp = src.command("migrate-set-parameters", | ||
729 | - cpu_throttle_increment=scenario._auto_converge_step) | ||
730 | + resp = src.cmd("migrate-set-capabilities", | ||
731 | + capabilities = [ | ||
732 | + { "capability": "auto-converge", | ||
733 | + "state": True } | ||
734 | + ]) | ||
735 | + resp = src.cmd("migrate-set-parameters", | ||
736 | + cpu_throttle_increment=scenario._auto_converge_step) | ||
737 | |||
738 | if scenario._post_copy: | ||
739 | - resp = src.command("migrate-set-capabilities", | ||
740 | - capabilities = [ | ||
741 | - { "capability": "postcopy-ram", | ||
742 | - "state": True } | ||
743 | - ]) | ||
744 | - resp = dst.command("migrate-set-capabilities", | ||
745 | - capabilities = [ | ||
746 | - { "capability": "postcopy-ram", | ||
747 | - "state": True } | ||
748 | - ]) | ||
749 | - | ||
750 | - resp = src.command("migrate-set-parameters", | ||
751 | - max_bandwidth=scenario._bandwidth * 1024 * 1024) | ||
752 | - | ||
753 | - resp = src.command("migrate-set-parameters", | ||
754 | - downtime_limit=scenario._downtime) | ||
755 | + resp = src.cmd("migrate-set-capabilities", | ||
756 | + capabilities = [ | ||
757 | + { "capability": "postcopy-ram", | ||
758 | + "state": True } | ||
759 | + ]) | ||
760 | + resp = dst.cmd("migrate-set-capabilities", | ||
761 | + capabilities = [ | ||
762 | + { "capability": "postcopy-ram", | ||
763 | + "state": True } | ||
764 | + ]) | ||
765 | + | ||
766 | + resp = src.cmd("migrate-set-parameters", | ||
767 | + max_bandwidth=scenario._bandwidth * 1024 * 1024) | ||
768 | + | ||
769 | + resp = src.cmd("migrate-set-parameters", | ||
770 | + downtime_limit=scenario._downtime) | ||
771 | |||
772 | if scenario._compression_mt: | ||
773 | - resp = src.command("migrate-set-capabilities", | ||
774 | - capabilities = [ | ||
775 | - { "capability": "compress", | ||
776 | - "state": True } | ||
777 | - ]) | ||
778 | - resp = src.command("migrate-set-parameters", | ||
779 | - compress_threads=scenario._compression_mt_threads) | ||
780 | - resp = dst.command("migrate-set-capabilities", | ||
781 | - capabilities = [ | ||
782 | - { "capability": "compress", | ||
783 | - "state": True } | ||
784 | - ]) | ||
785 | - resp = dst.command("migrate-set-parameters", | ||
786 | - decompress_threads=scenario._compression_mt_threads) | ||
787 | + resp = src.cmd("migrate-set-capabilities", | ||
788 | + capabilities = [ | ||
789 | + { "capability": "compress", | ||
790 | + "state": True } | ||
791 | + ]) | ||
792 | + resp = src.cmd("migrate-set-parameters", | ||
793 | + compress_threads=scenario._compression_mt_threads) | ||
794 | + resp = dst.cmd("migrate-set-capabilities", | ||
795 | + capabilities = [ | ||
796 | + { "capability": "compress", | ||
797 | + "state": True } | ||
798 | + ]) | ||
799 | + resp = dst.cmd("migrate-set-parameters", | ||
800 | + decompress_threads=scenario._compression_mt_threads) | ||
801 | |||
802 | if scenario._compression_xbzrle: | ||
803 | - resp = src.command("migrate-set-capabilities", | ||
804 | - capabilities = [ | ||
805 | - { "capability": "xbzrle", | ||
806 | - "state": True } | ||
807 | - ]) | ||
808 | - resp = dst.command("migrate-set-capabilities", | ||
809 | - capabilities = [ | ||
810 | - { "capability": "xbzrle", | ||
811 | - "state": True } | ||
812 | - ]) | ||
813 | - resp = src.command("migrate-set-parameters", | ||
814 | - xbzrle_cache_size=( | ||
815 | - hardware._mem * | ||
816 | - 1024 * 1024 * 1024 / 100 * | ||
817 | - scenario._compression_xbzrle_cache)) | ||
818 | + resp = src.cmd("migrate-set-capabilities", | ||
819 | + capabilities = [ | ||
820 | + { "capability": "xbzrle", | ||
821 | + "state": True } | ||
822 | + ]) | ||
823 | + resp = dst.cmd("migrate-set-capabilities", | ||
824 | + capabilities = [ | ||
825 | + { "capability": "xbzrle", | ||
826 | + "state": True } | ||
827 | + ]) | ||
828 | + resp = src.cmd("migrate-set-parameters", | ||
829 | + xbzrle_cache_size=( | ||
830 | + hardware._mem * | ||
831 | + 1024 * 1024 * 1024 / 100 * | ||
832 | + scenario._compression_xbzrle_cache)) | ||
833 | |||
834 | if scenario._multifd: | ||
835 | - resp = src.command("migrate-set-capabilities", | ||
836 | - capabilities = [ | ||
837 | - { "capability": "multifd", | ||
838 | - "state": True } | ||
839 | - ]) | ||
840 | - resp = src.command("migrate-set-parameters", | ||
841 | - multifd_channels=scenario._multifd_channels) | ||
842 | - resp = dst.command("migrate-set-capabilities", | ||
843 | - capabilities = [ | ||
844 | - { "capability": "multifd", | ||
845 | - "state": True } | ||
846 | - ]) | ||
847 | - resp = dst.command("migrate-set-parameters", | ||
848 | - multifd_channels=scenario._multifd_channels) | ||
849 | - | ||
850 | - resp = src.command("migrate", uri=connect_uri) | ||
851 | + resp = src.cmd("migrate-set-capabilities", | ||
852 | + capabilities = [ | ||
853 | + { "capability": "multifd", | ||
854 | + "state": True } | ||
855 | + ]) | ||
856 | + resp = src.cmd("migrate-set-parameters", | ||
857 | + multifd_channels=scenario._multifd_channels) | ||
858 | + resp = dst.cmd("migrate-set-capabilities", | ||
859 | + capabilities = [ | ||
860 | + { "capability": "multifd", | ||
861 | + "state": True } | ||
862 | + ]) | ||
863 | + resp = dst.cmd("migrate-set-parameters", | ||
864 | + multifd_channels=scenario._multifd_channels) | ||
865 | + | ||
866 | + resp = src.cmd("migrate", uri=connect_uri) | ||
867 | |||
868 | post_copy = False | ||
869 | paused = False | ||
870 | @@ -228,7 +228,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
871 | |||
872 | if progress._status in ("completed", "failed", "cancelled"): | ||
873 | if progress._status == "completed" and paused: | ||
874 | - dst.command("cont") | ||
875 | + dst.cmd("cont") | ||
876 | if progress_history[-1] != progress: | ||
877 | progress_history.append(progress) | ||
878 | |||
879 | @@ -256,13 +256,13 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
880 | if progress._ram._iterations > scenario._max_iters: | ||
881 | if self._verbose: | ||
882 | print("No completion after %d iterations over RAM" % scenario._max_iters) | ||
883 | - src.command("migrate_cancel") | ||
884 | + src.cmd("migrate_cancel") | ||
885 | continue | ||
886 | |||
887 | if time.time() > (start + scenario._max_time): | ||
888 | if self._verbose: | ||
889 | print("No completion after %d seconds" % scenario._max_time) | ||
890 | - src.command("migrate_cancel") | ||
891 | + src.cmd("migrate_cancel") | ||
892 | continue | ||
893 | |||
894 | if (scenario._post_copy and | ||
895 | @@ -270,7 +270,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
896 | not post_copy): | ||
897 | if self._verbose: | ||
898 | print("Switching to post-copy after %d iterations" % scenario._post_copy_iters) | ||
899 | - resp = src.command("migrate-start-postcopy") | ||
900 | + resp = src.cmd("migrate-start-postcopy") | ||
901 | post_copy = True | ||
902 | |||
903 | if (scenario._pause and | ||
904 | @@ -278,7 +278,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri): | ||
905 | not paused): | ||
906 | if self._verbose: | ||
907 | print("Pausing VM after %d iterations" % scenario._pause_iters) | ||
908 | - resp = src.command("stop") | ||
909 | + resp = src.cmd("stop") | ||
910 | paused = True | ||
911 | |||
912 | def _is_ppc64le(self): | ||
913 | diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 | ||
914 | index d7e67f4a05..f34af6cef7 100755 | ||
915 | --- a/tests/qemu-iotests/256 | ||
916 | +++ b/tests/qemu-iotests/256 | ||
917 | @@ -40,25 +40,25 @@ with iotests.FilePath('img0') as img0_path, \ | ||
918 | def create_target(filepath, name, size): | ||
919 | basename = os.path.basename(filepath) | ||
920 | nodename = "file_{}".format(basename) | ||
921 | - log(vm.command('blockdev-create', job_id='job1', | ||
922 | - options={ | ||
923 | - 'driver': 'file', | ||
924 | - 'filename': filepath, | ||
925 | - 'size': 0, | ||
926 | - })) | ||
927 | + log(vm.cmd('blockdev-create', job_id='job1', | ||
928 | + options={ | ||
929 | + 'driver': 'file', | ||
930 | + 'filename': filepath, | ||
931 | + 'size': 0, | ||
932 | + })) | ||
933 | vm.run_job('job1') | ||
934 | - log(vm.command('blockdev-add', driver='file', | ||
935 | - node_name=nodename, filename=filepath)) | ||
936 | - log(vm.command('blockdev-create', job_id='job2', | ||
937 | - options={ | ||
938 | - 'driver': iotests.imgfmt, | ||
939 | - 'file': nodename, | ||
940 | - 'size': size, | ||
941 | - })) | ||
942 | + log(vm.cmd('blockdev-add', driver='file', | ||
943 | + node_name=nodename, filename=filepath)) | ||
944 | + log(vm.cmd('blockdev-create', job_id='job2', | ||
945 | + options={ | ||
946 | + 'driver': iotests.imgfmt, | ||
947 | + 'file': nodename, | ||
948 | + 'size': size, | ||
949 | + })) | ||
950 | vm.run_job('job2') | ||
951 | - log(vm.command('blockdev-add', driver=iotests.imgfmt, | ||
952 | - node_name=name, | ||
953 | - file=nodename)) | ||
954 | + log(vm.cmd('blockdev-add', driver=iotests.imgfmt, | ||
955 | + node_name=name, | ||
956 | + file=nodename)) | ||
957 | |||
958 | log('--- Preparing images & VM ---\n') | ||
959 | vm.add_object('iothread,id=iothread0') | ||
960 | diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 | ||
961 | index e7e7a2317e..7d3720b8e5 100755 | ||
962 | --- a/tests/qemu-iotests/257 | ||
963 | +++ b/tests/qemu-iotests/257 | ||
964 | @@ -160,26 +160,26 @@ class Drive: | ||
965 | file_node_name = "file_{}".format(basename) | ||
966 | vm = self.vm | ||
967 | |||
968 | - log(vm.command('blockdev-create', job_id='bdc-file-job', | ||
969 | - options={ | ||
970 | - 'driver': 'file', | ||
971 | - 'filename': self.path, | ||
972 | - 'size': 0, | ||
973 | - })) | ||
974 | + log(vm.cmd('blockdev-create', job_id='bdc-file-job', | ||
975 | + options={ | ||
976 | + 'driver': 'file', | ||
977 | + 'filename': self.path, | ||
978 | + 'size': 0, | ||
979 | + })) | ||
980 | vm.run_job('bdc-file-job') | ||
981 | - log(vm.command('blockdev-add', driver='file', | ||
982 | - node_name=file_node_name, filename=self.path)) | ||
983 | - | ||
984 | - log(vm.command('blockdev-create', job_id='bdc-fmt-job', | ||
985 | - options={ | ||
986 | - 'driver': fmt, | ||
987 | - 'file': file_node_name, | ||
988 | - 'size': size, | ||
989 | - })) | ||
990 | + log(vm.cmd('blockdev-add', driver='file', | ||
991 | + node_name=file_node_name, filename=self.path)) | ||
992 | + | ||
993 | + log(vm.cmd('blockdev-create', job_id='bdc-fmt-job', | ||
994 | + options={ | ||
995 | + 'driver': fmt, | ||
996 | + 'file': file_node_name, | ||
997 | + 'size': size, | ||
998 | + })) | ||
999 | vm.run_job('bdc-fmt-job') | ||
1000 | - log(vm.command('blockdev-add', driver=fmt, | ||
1001 | - node_name=name, | ||
1002 | - file=file_node_name)) | ||
1003 | + log(vm.cmd('blockdev-add', driver=fmt, | ||
1004 | + node_name=name, | ||
1005 | + file=file_node_name)) | ||
1006 | self.fmt = fmt | ||
1007 | self.size = size | ||
1008 | self.node = name | ||
1009 | -- | ||
1010 | 2.34.1 | ||
1011 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc index 3e56e349..26327ba3 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees.inc | |||
@@ -14,12 +14,12 @@ REPO ?= "git://github.com/Xilinx/qemu-devicetrees.git;protocol=https" | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
15 | SRC_URI = "${REPO};${BRANCHARG}" | 15 | SRC_URI = "${REPO};${BRANCHARG}" |
16 | 16 | ||
17 | SRC_URI += "file://0001-versal-Reorder-serial-ports.patch" | ||
18 | SRC_URI += "file://0001-versal-net-Reorder-serial-port.patch" | ||
19 | |||
17 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
18 | 21 | ||
19 | # Don't need to do anything | 22 | do_install[noexec] = '1' |
20 | do_install() { | ||
21 | : | ||
22 | } | ||
23 | 23 | ||
24 | do_deploy() { | 24 | do_deploy() { |
25 | # single-arch dtbs | 25 | # single-arch dtbs |
@@ -33,4 +33,7 @@ do_deploy() { | |||
33 | done | 33 | done |
34 | } | 34 | } |
35 | 35 | ||
36 | addtask deploy after do_install | 36 | addtask deploy after do_install before do_build |
37 | |||
38 | COMPATIBLE_HOST:class-target = "none" | ||
39 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch new file mode 100644 index 00000000..23ed3659 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-Reorder-serial-ports.patch | |||
@@ -0,0 +1,1466 @@ | |||
1 | From 2da2588a1dda1fd7fd2f6fc89db13cc5694d793e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Sat, 24 Aug 2024 11:23:18 -0600 | ||
4 | Subject: [PATCH] versal: Reorder serial ports | ||
5 | |||
6 | This change affects the order of the serial ports when calling qemu. | ||
7 | Previously the serial ports 0 & 1 were the PMC (firmware) uartlite, | ||
8 | while the standard serial pors were 2 & 3. Reverse this order to | ||
9 | ensure that the first two serial ports are the ones used by Linux. | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | --- | ||
13 | board-versal-pmc-virt-alt.dts | 230 ++++++++++++++++ | ||
14 | board-versal-ps-vck190-alt.dts | 58 ++++ | ||
15 | board-versal-ps-virt-alt.dts | 354 +++++++++++++++++++++++++ | ||
16 | versal-pmc-alt.dtsi | 40 +++ | ||
17 | versal-pmc-ppu-alt.dtsi | 252 ++++++++++++++++++ | ||
18 | versal-ps-iou-alt.dtsi | 467 +++++++++++++++++++++++++++++++++ | ||
19 | 6 files changed, 1401 insertions(+) | ||
20 | create mode 100644 board-versal-pmc-virt-alt.dts | ||
21 | create mode 100644 board-versal-ps-vck190-alt.dts | ||
22 | create mode 100644 board-versal-ps-virt-alt.dts | ||
23 | create mode 100644 versal-pmc-alt.dtsi | ||
24 | create mode 100644 versal-pmc-ppu-alt.dtsi | ||
25 | create mode 100644 versal-ps-iou-alt.dtsi | ||
26 | |||
27 | diff --git a/board-versal-pmc-virt-alt.dts b/board-versal-pmc-virt-alt.dts | ||
28 | new file mode 100644 | ||
29 | index 00000000..52d23c83 | ||
30 | --- /dev/null | ||
31 | +++ b/board-versal-pmc-virt-alt.dts | ||
32 | @@ -0,0 +1,230 @@ | ||
33 | +/* | ||
34 | + * Versal Virtual PMC board device tree | ||
35 | + * | ||
36 | + * Copyright (c) 2016, Xilinx Inc | ||
37 | + * All rights reserved. | ||
38 | + * | ||
39 | + * Redistribution and use in source and binary forms, with or without | ||
40 | + * modification, are permitted provided that the following conditions are met: | ||
41 | + * * Redistributions of source code must retain the above copyright | ||
42 | + * notice, this list of conditions and the following disclaimer. | ||
43 | + * * Redistributions in binary form must reproduce the above copyright | ||
44 | + * notice, this list of conditions and the following disclaimer in the | ||
45 | + * documentation and/or other materials provided with the distribution. | ||
46 | + * * Neither the name of the <organization> nor the | ||
47 | + * names of its contributors may be used to endorse or promote products | ||
48 | + * derived from this software without specific prior written permission. | ||
49 | + * | ||
50 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
51 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
52 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
53 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
54 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
55 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
56 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
57 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
58 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
59 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
60 | + */ | ||
61 | + | ||
62 | +/dts-v1/; | ||
63 | + | ||
64 | +#ifndef VERSAL_NPI_OVERRIDE | ||
65 | + #include "versal-npi-memmap.dtsh" | ||
66 | +#endif | ||
67 | + | ||
68 | +#define VERSAL_NPI_GENERIC | ||
69 | + | ||
70 | +#include "versal.dtsh" | ||
71 | + | ||
72 | +#ifndef MULTI_ARCH | ||
73 | +#include "versal-pmc-alt.dtsi" | ||
74 | +#include "versal-psm.dtsi" | ||
75 | +#include "versal-ddrmc.dtsi" | ||
76 | +#include "versal-ps-iou-alt.dtsi" | ||
77 | +#include "versal-pmc-ppu-cpus.dtsi" | ||
78 | +#include "versal-psm-cpu.dtsi" | ||
79 | + | ||
80 | +/ { | ||
81 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
82 | + MEM_REGION(ddr, 0x0, MM_TOP_DDR, 0x00000000, MM_TOP_DDR_SIZE, &ddr_mem) // 2 GB | ||
83 | + MEM_SPEC(ddr_2, MM_TOP_DDR_2_H, MM_TOP_DDR_2_L, MM_TOP_DDR_2, | ||
84 | + MM_TOP_DDR_2_SIZE_H, MM_TOP_DDR_2_SIZE_L, &ddr_2_mem) // 32 GB | ||
85 | + | ||
86 | + /* Dummy APUs. */ | ||
87 | + cpu0: apu@0 { | ||
88 | + }; | ||
89 | + cpu1: apu@1 { | ||
90 | + }; | ||
91 | + rpu_cpu0: rpu_cpu0 { | ||
92 | + }; | ||
93 | + rpu_cpu1: rpu_cpu1 { | ||
94 | + }; | ||
95 | +#ifndef HAVE_DDRMC_CPUS | ||
96 | + ddrmc_ub0: ddrmc_ub@0 { | ||
97 | + #interrupt-cells = <1>; | ||
98 | + interrupt-controller; | ||
99 | + }; | ||
100 | + ddrmc_ub1: ddrmc_ub@1 { | ||
101 | + #interrupt-cells = <1>; | ||
102 | + interrupt-controller; | ||
103 | + }; | ||
104 | +#endif | ||
105 | + /* Dummy GIC. */ | ||
106 | + gic: apu_gic@0 { | ||
107 | + #interrupt-cells = <3>; | ||
108 | + interrupt-controller; | ||
109 | + }; | ||
110 | +}; | ||
111 | + | ||
112 | +&pmc_qspi_0 { | ||
113 | + SPI_FLASH(qspi_flash_lcs_lb,"m25qu02gcbb", 0x02000000, 0x0 0x0) | ||
114 | + SPI_FLASH(qspi_flash_lcs_ub,"m25qu02gcbb", 0x02000000, 0x2 0x1) | ||
115 | + SPI_FLASH(qspi_flash_ucs_lb,"m25qu02gcbb", 0x02000000, 0x1 0x0) | ||
116 | + SPI_FLASH(qspi_flash_ucs_ub,"m25qu02gcbb", 0x02000000, 0x3 0x1) | ||
117 | +}; | ||
118 | + | ||
119 | +&ospi { | ||
120 | + SPI_FLASH(ospi_flash_lcs_lb, "mt35xu01gbba", 0x02000000, 0x0 0x0) | ||
121 | + SPI_FLASH(ospi_flash_lcs_ub, "mt35xu01gbba", 0x02000000, 0x1 0x0) | ||
122 | + SPI_FLASH(ospi_flash_ucs_lb, "mt35xu01gbba", 0x02000000, 0x2 0x0) | ||
123 | + SPI_FLASH(ospi_flash_ucs_ub, "mt35xu01gbba", 0x02000000, 0x3 0x0) | ||
124 | +}; | ||
125 | + | ||
126 | +#else | ||
127 | +#include "versal-icnt.dtsi" | ||
128 | +#include "versal-rams.dtsi" | ||
129 | +#include "versal-pmc-ppu-cpus.dtsi" | ||
130 | +#include "versal-psm-cpu.dtsi" | ||
131 | + | ||
132 | +/ { | ||
133 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
134 | + MEM_REGION(ddr, 0x0, 0x00000000, 0x00000000, 0x80000000, &ddr_mem) | ||
135 | + | ||
136 | + ps_pmc_rp: ps_pmc_rp@0 { | ||
137 | + doc-name = "Remote-port PMC-PS"; | ||
138 | + compatible = "remote-port"; | ||
139 | + chrdev-id = "ps-pmc-rp"; | ||
140 | + }; | ||
141 | + rp_pmc_ppu0: rp_pmc_ppu0@0 { | ||
142 | + compatible = "remote-port-gpio"; | ||
143 | + remote-ports = <&ps_pmc_rp 1>; | ||
144 | + interrupts-extended = < &pmc_ppu0 0 >; | ||
145 | + }; | ||
146 | + rp_pmc_ppu1: rp_pmc_ppu1@0 { | ||
147 | + compatible = "remote-port-gpio"; | ||
148 | + remote-ports = <&ps_pmc_rp 2>; | ||
149 | + interrupts-extended = < &pmc_ppu1 0 >; | ||
150 | + }; | ||
151 | + pmc_global: rp_pmc_global@0 { | ||
152 | + compatible = "remote-port-gpio"; | ||
153 | + remote-ports = <&ps_pmc_rp 3>; | ||
154 | + #gpio-cells = <1>; | ||
155 | + num-gpios = <16>; | ||
156 | + }; | ||
157 | + lmb_pmc_ppu0: lmb_pmc_ppu0@0 { | ||
158 | + rp_lmb_pmc_ppu0@0 { | ||
159 | + compatible = "remote-port-memory-master"; | ||
160 | + remote-ports = <&ps_pmc_rp 4>; | ||
161 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
162 | + }; | ||
163 | + }; | ||
164 | + lmb_pmc_ppu1: lmb_pmc_ppu1@0 { | ||
165 | + rp_lmb_pmc_ppu1@0 { | ||
166 | + compatible = "remote-port-memory-master"; | ||
167 | + remote-ports = <&ps_pmc_rp 5>; | ||
168 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
169 | + }; | ||
170 | + }; | ||
171 | + crl: crl@MM_CRL { | ||
172 | + compatible = "remote-port-gpio"; | ||
173 | + remote-ports = <&ps_pmc_rp 6>; | ||
174 | + #gpio-cells = <1>; | ||
175 | + num-gpios = <35>; | ||
176 | + }; | ||
177 | + pmc_clk_rst: pmc_clk_rst@0 { | ||
178 | + compatible = "remote-port-gpio"; | ||
179 | + remote-ports = <&ps_pmc_rp 7>; | ||
180 | + #gpio-cells = <1>; | ||
181 | + num-gpios = <30>; | ||
182 | + }; | ||
183 | + rp_psm0: rp_psm0@0 { | ||
184 | + compatible = "remote-port-gpio"; | ||
185 | + remote-ports = <&ps_pmc_rp 8>; | ||
186 | + interrupts-extended = < &psm0 0 >; | ||
187 | + }; | ||
188 | +#ifdef MM_NPI_DDRMC_MAIN_0 | ||
189 | + rp_ddrmc_ub0: rp_ddrmc_ub@0 { | ||
190 | + compatible = "remote-port-gpio"; | ||
191 | + remote-ports = <&ps_pmc_rp 9>; | ||
192 | +# ifdef HAVE_DDRMC_CPUS | ||
193 | + interrupts-extended = < &ddrmc_ub0 0 >; | ||
194 | +# endif | ||
195 | + }; | ||
196 | + | ||
197 | + npi_ddrmc_ub0: rp_npi_ddrmc_ub@0 { | ||
198 | + compatible = "remote-port-gpio"; | ||
199 | + remote-ports = <&ps_pmc_rp 11>; | ||
200 | + #gpio-cells = <1>; | ||
201 | + }; | ||
202 | +#endif | ||
203 | +#ifdef MM_NPI_DDRMC_MAIN_1 | ||
204 | + rp_ddrmc_ub1: rp_ddrmc_ub@1 { | ||
205 | + compatible = "remote-port-gpio"; | ||
206 | + remote-ports = <&ps_pmc_rp 10>; | ||
207 | + # ifdef HAVE_DDRMC_CPUS | ||
208 | + interrupts-extended = < &ddrmc_ub1 0 >; | ||
209 | + # endif | ||
210 | + }; | ||
211 | + | ||
212 | + npi_ddrmc_ub1: rp_npi_ddrmc_ub@1 { | ||
213 | + compatible = "remote-port-gpio"; | ||
214 | + remote-ports = <&ps_pmc_rp 12>; | ||
215 | + #gpio-cells = <1>; | ||
216 | + }; | ||
217 | +#endif | ||
218 | + lmb_psm: lmb_psm@0 { | ||
219 | + rp_lmb_psm@0 { | ||
220 | + compatible = "remote-port-memory-master"; | ||
221 | + remote-ports = <&ps_pmc_rp 13>; | ||
222 | + reg = < 0x0 0x0 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF /* -1 */ >; | ||
223 | + }; | ||
224 | + }; | ||
225 | + | ||
226 | + /* Dummy stub to avoid ifdefs in the interrupt-map. */ | ||
227 | + pmc_gic_proxy: pmc_gic_proxy { | ||
228 | + doc-ignore = <1>; | ||
229 | + #interrupt-cells = <3>; | ||
230 | + interrupt-controller; | ||
231 | + }; | ||
232 | + psm_gic_proxy: psm_gic_proxy { | ||
233 | + doc-ignore = <1>; | ||
234 | + #interrupt-cells = <3>; | ||
235 | + interrupt-controller; | ||
236 | + }; | ||
237 | + psm0_io_intc: psm0_io_intc { | ||
238 | + doc-ignore = <1>; | ||
239 | + #interrupt-cells = <1>; | ||
240 | + interrupt-controller; | ||
241 | + }; | ||
242 | + pmc_ppu1_io_intc: pmc_ppu1_io_intc { | ||
243 | + doc-ignore = <1>; | ||
244 | + #interrupt-cells = <1>; | ||
245 | + interrupt-controller; | ||
246 | + }; | ||
247 | +}; | ||
248 | +#endif | ||
249 | + | ||
250 | +/ { | ||
251 | + /* | ||
252 | + * FIXME: This legacy hook will reset the entire PMC instance | ||
253 | + * meaning PSM and PMC MicroBlazes for multi-arch and all | ||
254 | + * devices for single-arch. | ||
255 | + * Once the CPU reset infrastructure is improved, we should | ||
256 | + * remove this. | ||
257 | + */ | ||
258 | + pmc_reset: pmc_reset@ { | ||
259 | + compatible = "qemu,reset-device"; | ||
260 | + gpios = <&pmc_clk_rst CRP_RST_PS_PMC_SRST>; | ||
261 | + }; | ||
262 | +}; | ||
263 | diff --git a/board-versal-ps-vck190-alt.dts b/board-versal-ps-vck190-alt.dts | ||
264 | new file mode 100644 | ||
265 | index 00000000..b61d3d5c | ||
266 | --- /dev/null | ||
267 | +++ b/board-versal-ps-vck190-alt.dts | ||
268 | @@ -0,0 +1,58 @@ | ||
269 | +/* | ||
270 | + * Versal Virtual vck190 board device tree | ||
271 | + * | ||
272 | + * Copyright (c) 2020, Xilinx Inc | ||
273 | + * All rights reserved. | ||
274 | + * | ||
275 | + * Redistribution and use in source and binary forms, with or without | ||
276 | + * modification, are permitted provided that the following conditions are met: | ||
277 | + * * Redistributions of source code must retain the above copyright | ||
278 | + * notice, this list of conditions and the following disclaimer. | ||
279 | + * * Redistributions in binary form must reproduce the above copyright | ||
280 | + * notice, this list of conditions and the following disclaimer in the | ||
281 | + * documentation and/or other materials provided with the distribution. | ||
282 | + * * Neither the name of the <organization> nor the | ||
283 | + * names of its contributors may be used to endorse or promote products | ||
284 | + * derived from this software without specific prior written permission. | ||
285 | + * | ||
286 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
287 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
288 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
289 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
290 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
291 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
292 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
293 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
294 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
295 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
296 | + */ | ||
297 | +#include "board-versal-ps-virt-alt.dts" | ||
298 | +#include "versal-silicon-freq.dtsi" | ||
299 | + | ||
300 | +/{ | ||
301 | + MEM_REGION64(ddr_3, MM_TOP_DDR_CH1_H, MM_TOP_DDR_CH1_L, MM_TOP_DDR_CH1, | ||
302 | + 0x2, 0x0, &ddr_3_mem) // 8 GB | ||
303 | +}; | ||
304 | + | ||
305 | +&ps_i2c1 { | ||
306 | + i2cswitch@74 { | ||
307 | + #address-cells = <1>; | ||
308 | + #size-cells = <0>; | ||
309 | + compatible = "nxp,pca9548"; | ||
310 | + reg = <0x74>; | ||
311 | + chip-enable = <0x1>; | ||
312 | + i2c@0 { | ||
313 | + #address-cells = <1>; | ||
314 | + #size-cells = <0>; | ||
315 | + reg = <0>; | ||
316 | + eeprom@54 { | ||
317 | + compatible = "at,24c08"; | ||
318 | + reg = <0x54>; | ||
319 | + }; | ||
320 | + }; | ||
321 | + }; | ||
322 | +}; | ||
323 | + | ||
324 | +&ospi_flash_lcs_lb { | ||
325 | + compatible = "mt35xu02gbba"; | ||
326 | +}; | ||
327 | diff --git a/board-versal-ps-virt-alt.dts b/board-versal-ps-virt-alt.dts | ||
328 | new file mode 100644 | ||
329 | index 00000000..7585d196 | ||
330 | --- /dev/null | ||
331 | +++ b/board-versal-ps-virt-alt.dts | ||
332 | @@ -0,0 +1,354 @@ | ||
333 | +/* | ||
334 | + * Versal Virtual PS board device tree | ||
335 | + * | ||
336 | + * Copyright (c) 2016-2022, Xilinx Inc. | ||
337 | + * Copyright (C) 2022-2024, Advanced Micro Devices, Inc. | ||
338 | + * All rights reserved. | ||
339 | + * | ||
340 | + * Redistribution and use in source and binary forms, with or without | ||
341 | + * modification, are permitted provided that the following conditions are met: | ||
342 | + * * Redistributions of source code must retain the above copyright | ||
343 | + * notice, this list of conditions and the following disclaimer. | ||
344 | + * * Redistributions in binary form must reproduce the above copyright | ||
345 | + * notice, this list of conditions and the following disclaimer in the | ||
346 | + * documentation and/or other materials provided with the distribution. | ||
347 | + * * Neither the name of the <organization> nor the | ||
348 | + * names of its contributors may be used to endorse or promote products | ||
349 | + * derived from this software without specific prior written permission. | ||
350 | + * | ||
351 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
352 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
353 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
354 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
355 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
356 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
357 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
358 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
359 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
360 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
361 | + */ | ||
362 | +#ifndef __BOARD_VERSAL_PS_VIRT__ | ||
363 | +#define __BOARD_VERSAL_PS_VIRT__ | ||
364 | + | ||
365 | +/dts-v1/; | ||
366 | +#ifndef VERSAL_NPI_OVERRIDE | ||
367 | + #include "versal-npi-memmap.dtsh" | ||
368 | +#endif | ||
369 | + | ||
370 | +#ifndef NUM_APUS | ||
371 | +/* Base platform has 2 APUs. */ | ||
372 | +#define NUM_APUS 2 | ||
373 | +#endif | ||
374 | + | ||
375 | +#define HAS_SMMU | ||
376 | +#define HAVE_APU_GIC | ||
377 | + | ||
378 | +#ifndef RPU_GIC_INTERRUPT_TARGET_STEM | ||
379 | +#ifdef MULTI_ARCH | ||
380 | + #define RPU_GIC_INTERRUPT_TARGET_STEM rpu_intc_redirect_ | ||
381 | +#else | ||
382 | + #define RPU_GIC_INTERRUPT_TARGET_STEM rpu_cpu | ||
383 | +#endif | ||
384 | +#endif | ||
385 | + | ||
386 | +#define VERSAL_NPI_GENERIC | ||
387 | + | ||
388 | +#include "versal.dtsh" | ||
389 | + | ||
390 | +#include "versal-pmc.dtsi" | ||
391 | +#include "versal-psm.dtsi" | ||
392 | +#include "versal-ddrmc.dtsi" | ||
393 | +#ifdef VERSAL_PSX | ||
394 | +#include "versal-psx-apu.dtsi" | ||
395 | +#else | ||
396 | +#include "versal-ps-apu.dtsi" | ||
397 | +#include "versal-ps-rpu.dtsi" | ||
398 | +#include "versal-boot-init.dtsi" | ||
399 | +#endif | ||
400 | +#include "versal-ps-iou-alt.dtsi" | ||
401 | +#include "versal-virtio-mmio.dtsi" | ||
402 | +#include "versal-boot-init.dtsi" | ||
403 | +#include "versal-gty.dtsi" | ||
404 | +#include "versal-silicon-freq.dtsi" | ||
405 | + | ||
406 | +/ { | ||
407 | +#ifdef MULTI_ARCH | ||
408 | + ps_pmc_rp: ps_pmc_rp@0 { | ||
409 | + doc-status = "complete"; | ||
410 | + doc-name = "Remote-port PMC"; | ||
411 | + doc-subdtb = "board-versal-pmc-virt.dtb"; | ||
412 | + compatible = "remote-port"; | ||
413 | + chrdev-id = "ps-pmc-rp"; | ||
414 | + }; | ||
415 | + pmc_ppu0: rp_pmc_ppu0@0 { | ||
416 | + compatible = "remote-port-gpio"; | ||
417 | + remote-ports = <&ps_pmc_rp 1>; | ||
418 | + #interrupt-cells = <1>; | ||
419 | + interrupt-controller; | ||
420 | + }; | ||
421 | + pmc_ppu1: rp_pmc_ppu1@0 { | ||
422 | + compatible = "remote-port-gpio"; | ||
423 | + remote-ports = <&ps_pmc_rp 2>; | ||
424 | + #interrupt-cells = <1>; | ||
425 | + interrupt-controller; | ||
426 | + }; | ||
427 | + rp_pmc_global: rp_pmc_global@0 { | ||
428 | + compatible = "remote-port-gpio"; | ||
429 | + remote-ports = <&ps_pmc_rp 3>; | ||
430 | + gpio-controller; | ||
431 | + #gpio-cells = <1>; | ||
432 | + num-gpios = <16>; | ||
433 | + | ||
434 | + /* We only need to proxy GPIO 1 and 2 (PPU1 RST and WAKE). */ | ||
435 | + gpios = < &dummy1 0 | ||
436 | + &pmc_global 1 | ||
437 | + &pmc_global 2 >; | ||
438 | + }; | ||
439 | + rp_lmb_pmc_ppu0: rp_lmb_pmc_ppu0@0 { | ||
440 | + compatible = "remote-port-memory-slave"; | ||
441 | + remote-ports = <&ps_pmc_rp 4>; | ||
442 | + mr = <&lmb_pmc_ppu0>; | ||
443 | + }; | ||
444 | + rp_lmb_pmc_ppu1: rp_lmb_pmc_ppu1@0 { | ||
445 | + compatible = "remote-port-memory-slave"; | ||
446 | + remote-ports = <&ps_pmc_rp 5>; | ||
447 | + mr = <&lmb_pmc_ppu1>; | ||
448 | + }; | ||
449 | + rp_crl: rp_crl@0 { | ||
450 | + compatible = "remote-port-gpio"; | ||
451 | + remote-ports = <&ps_pmc_rp 6>; | ||
452 | + gpio-controller; | ||
453 | + #gpio-cells = <1>; | ||
454 | + num-gpios = <35>; | ||
455 | + | ||
456 | + gpios = < | ||
457 | + &crl 0 | ||
458 | + &crl 1 | ||
459 | + &crl 2 | ||
460 | + &crl 3 | ||
461 | + &crl 4 | ||
462 | + &crl 5 | ||
463 | + &crl 6 | ||
464 | + &crl 7 | ||
465 | + &crl 8 | ||
466 | + &crl 9 | ||
467 | + &crl 10 | ||
468 | + &crl 11 | ||
469 | + &crl 12 | ||
470 | + &crl 13 | ||
471 | + &crl 14 | ||
472 | + &crl 15 | ||
473 | + &crl 16 | ||
474 | + &crl 17 | ||
475 | + &crl 18 | ||
476 | + &crl 19 | ||
477 | + &crl 20 | ||
478 | + &crl 21 | ||
479 | + &crl 22 | ||
480 | + &crl 23 | ||
481 | + &crl 24 | ||
482 | + &crl 25 | ||
483 | + &crl 26 | ||
484 | + &crl 27 | ||
485 | + &crl 28 | ||
486 | + &crl 29 | ||
487 | + &crl 30 | ||
488 | + &crl 31 | ||
489 | + &dummy1 0 | ||
490 | + &dummy1 0 | ||
491 | + &crl 34 >; | ||
492 | + }; | ||
493 | + rp_pmc_clk_rst: rp_pmc_clk_rst@0 { | ||
494 | + compatible = "remote-port-gpio"; | ||
495 | + remote-ports = <&ps_pmc_rp 7>; | ||
496 | + gpio-controller; | ||
497 | + #gpio-cells = <1>; | ||
498 | + num-gpios = <30>; | ||
499 | + | ||
500 | + gpios = < &pmc_clk_rst 0 &pmc_clk_rst 1 | ||
501 | + &pmc_clk_rst 2 &pmc_clk_rst 3 | ||
502 | + &pmc_clk_rst 4 &pmc_clk_rst 5 | ||
503 | + &pmc_clk_rst 6 &pmc_clk_rst 7 | ||
504 | + &pmc_clk_rst 8 &pmc_clk_rst 9 | ||
505 | + &pmc_clk_rst 10 &pmc_clk_rst 11 | ||
506 | + &pmc_clk_rst 12 &pmc_clk_rst 13 | ||
507 | + &pmc_clk_rst 14 &pmc_clk_rst 15 | ||
508 | + &pmc_clk_rst 16 &pmc_clk_rst 17 | ||
509 | + &pmc_clk_rst 18 &pmc_clk_rst 19 | ||
510 | + &pmc_clk_rst 20 &pmc_clk_rst 21 | ||
511 | + &pmc_clk_rst 22 &pmc_clk_rst 23 | ||
512 | + &pmc_clk_rst 24 &pmc_clk_rst 25 | ||
513 | + &pmc_clk_rst 26 &pmc_clk_rst 27 | ||
514 | + &pmc_clk_rst 28 &pmc_clk_rst 29 | ||
515 | + >; | ||
516 | + }; | ||
517 | + psm0: rp_psm0@0 { | ||
518 | + compatible = "remote-port-gpio"; | ||
519 | + remote-ports = <&ps_pmc_rp 8>; | ||
520 | + #interrupt-cells = <1>; | ||
521 | + interrupt-controller; | ||
522 | + }; | ||
523 | +#ifdef MM_NPI_DDRMC_MAIN_0 | ||
524 | + ddrmc_ub0: rp_ddrmc@0 { | ||
525 | + compatible = "remote-port-gpio"; | ||
526 | + remote-ports = <&ps_pmc_rp 9>; | ||
527 | + #interrupt-cells = <1>; | ||
528 | + interrupt-controller; | ||
529 | + }; | ||
530 | + rp_npi_ddrmc_ub0: rp_npi_ddrmc_ub@0 { | ||
531 | + compatible = "remote-port-gpio"; | ||
532 | + remote-ports = <&ps_pmc_rp 11>; | ||
533 | + gpios = < &npi_ddrmc_ub0 0 >; | ||
534 | + }; | ||
535 | +#endif | ||
536 | +#ifdef MM_NPI_DDRMC_MAIN_1 | ||
537 | + ddrmc_ub1: rp_ddrmc@1 { | ||
538 | + compatible = "remote-port-gpio"; | ||
539 | + remote-ports = <&ps_pmc_rp 10>; | ||
540 | + #interrupt-cells = <1>; | ||
541 | + interrupt-controller; | ||
542 | + }; | ||
543 | + rp_npi_ddrmc_ub1: rp_npi_ddrmc_ub@1 { | ||
544 | + compatible = "remote-port-gpio"; | ||
545 | + remote-ports = <&ps_pmc_rp 12>; | ||
546 | + gpios = < &npi_ddrmc_ub1 0 >; | ||
547 | + }; | ||
548 | +#endif | ||
549 | + rp_lmb_psm: rp_lmb_psm@0 { | ||
550 | + compatible = "remote-port-memory-slave"; | ||
551 | + remote-ports = <&ps_pmc_rp 13>; | ||
552 | + mr = <&lmb_psm>; | ||
553 | + }; | ||
554 | + | ||
555 | +#define RPU_INTC_REDIRECT(NCPU, PSMOUT, RPUN) \ | ||
556 | +glue(rpu_intc_redirect_, NCPU): glue(rpu_intc_redirect, NCPU)@NCPU { \ | ||
557 | + #interrupt-cells = <1>; \ | ||
558 | + compatible = "xlnx,zynqmp-intc-redirect"; \ | ||
559 | + interrupt-controller; \ | ||
560 | + interrupts-extended = <glue(&rpu_cpu,NCPU) 0>; \ | ||
561 | + gpios = <&psm_global PSMOUT &rpu_ctrl RPUN>; \ | ||
562 | +}; | ||
563 | + | ||
564 | + amba_rpu: amba_rpu@0 { | ||
565 | + RPU_INTC_REDIRECT(0, 4, 6) | ||
566 | + RPU_INTC_REDIRECT(1, 5, 7) | ||
567 | + }; | ||
568 | + | ||
569 | +#else | ||
570 | + /* Single ARCH PS board has no PPU MicroBlazes. */ | ||
571 | + pmc_ppu0: dummy_ppu0@0 { | ||
572 | + #interrupt-cells = <1>; | ||
573 | + }; | ||
574 | + pmc_ppu1: dummy_ppu1@0 { | ||
575 | + #interrupt-cells = <1>; | ||
576 | + }; | ||
577 | + psm0: dummy_ppu0@0 { | ||
578 | + #interrupt-cells = <1>; | ||
579 | + }; | ||
580 | + ddrmc_ub0: dummy_ddrmc0@0 { | ||
581 | + #interrupt-cells = <1>; | ||
582 | + }; | ||
583 | + ddrmc_ub1: dummy_ddrmc1@0 { | ||
584 | + #interrupt-cells = <1>; | ||
585 | + }; | ||
586 | +#endif | ||
587 | + | ||
588 | + /* FIXME: Once we add the NOC, these should be attached to it. */ | ||
589 | + MEM_REGION(ddr, 0x0, MM_TOP_DDR, 0x00000000, MM_TOP_DDR_SIZE, &ddr_mem) // 2 GB | ||
590 | + MEM_SPEC(ddr_2, MM_TOP_DDR_2_H, MM_TOP_DDR_2_L, MM_TOP_DDR_2, | ||
591 | + MM_TOP_DDR_2_SIZE_H, MM_TOP_DDR_2_SIZE_L, &ddr_2_mem) // 32 GB | ||
592 | + mdio0: mdio { | ||
593 | + #address-cells = <1>; | ||
594 | + #size-cells = <0>; | ||
595 | + #priority-cells = <0>; | ||
596 | + compatible="mdio"; | ||
597 | + phy0: phy@1 { | ||
598 | + compatible = "dp83867"; | ||
599 | + device_type = "ethernet-phy"; | ||
600 | + reg = <1>; | ||
601 | + }; | ||
602 | + phy1: phy@2 { | ||
603 | + compatible = "88e1118r"; | ||
604 | + device_type = "ethernet-phy"; | ||
605 | + reg = <2>; | ||
606 | + }; | ||
607 | + }; | ||
608 | +}; | ||
609 | + | ||
610 | +/* | ||
611 | + * One flash for each SPI-master to match prebuilt system.dtb in BSP | ||
612 | + * xilinx-versal-virt-2019.1 | ||
613 | + */ | ||
614 | +#define BDEV_SPI_FLASH(_NAME, _COMPAT, _SIZEM, _REGVAL) \ | ||
615 | +_NAME: _NAME@0 { \ | ||
616 | + #address-cells = <1>; \ | ||
617 | + #size-cells = <1>; \ | ||
618 | + #priority-cells = <0>; \ | ||
619 | + #bus-cells = <1>; \ | ||
620 | + compatible = _COMPAT, "st,m25p80"; \ | ||
621 | + spi-max-frequency = <50000000>; \ | ||
622 | + reg = <_REGVAL>; \ | ||
623 | + blockdev-node-name = #_NAME; \ | ||
624 | + _NAME@0x00000000 { \ | ||
625 | + label = #_NAME; \ | ||
626 | + reg = <0x00000000 _SIZEM>; \ | ||
627 | + }; \ | ||
628 | +}; | ||
629 | + | ||
630 | +&spi0 { | ||
631 | + BDEV_SPI_FLASH(spi0_flash0, "m25p80", 0x00100000, 0x0 0x0) | ||
632 | +}; | ||
633 | + | ||
634 | +&spi1 { | ||
635 | + BDEV_SPI_FLASH(spi1_flash0, "m25p80", 0x00100000, 0x0 0x0) | ||
636 | +}; | ||
637 | + | ||
638 | +/* | ||
639 | + * Use 2Gbit QSPI flashes to allow verification of Image-searching | ||
640 | + * in ROM upto 256MB. | ||
641 | + */ | ||
642 | +#define DI_SPI_FLASH(_DI, _NAME, _COMPAT, _SIZEM, _REGVAL) \ | ||
643 | +_NAME: _NAME@0 { \ | ||
644 | + #address-cells = <1>; \ | ||
645 | + #size-cells = <1>; \ | ||
646 | + #priority-cells = <0>; \ | ||
647 | + #bus-cells = <1>; \ | ||
648 | + compatible = _COMPAT, "st,m25p80"; \ | ||
649 | + spi-max-frequency = <50000000>; \ | ||
650 | + reg = <_REGVAL>; \ | ||
651 | + drive-index = <_DI>; \ | ||
652 | + _NAME@0x00000000 { \ | ||
653 | + label = #_NAME; \ | ||
654 | + reg = <0x00000000 _SIZEM>; \ | ||
655 | + }; \ | ||
656 | +}; | ||
657 | + | ||
658 | +&pmc_qspi_0 { | ||
659 | + DI_SPI_FLASH(0, qspi_flash_lcs_lb, "m25qu02gcbb", 0x02000000, 0x0 0x0) | ||
660 | + DI_SPI_FLASH(1, qspi_flash_lcs_ub, "m25qu02gcbb", 0x02000000, 0x2 0x1) | ||
661 | + DI_SPI_FLASH(2, qspi_flash_ucs_lb, "m25qu02gcbb", 0x02000000, 0x1 0x0) | ||
662 | + DI_SPI_FLASH(3, qspi_flash_ucs_ub, "m25qu02gcbb", 0x02000000, 0x3 0x1) | ||
663 | +}; | ||
664 | + | ||
665 | +&ospi { | ||
666 | + DI_SPI_FLASH(4, ospi_flash_lcs_lb, "mt35xu01gbba", 0x02000000, 0x0 0x0) | ||
667 | + DI_SPI_FLASH(5, ospi_flash_lcs_ub, "mt35xu01gbba", 0x02000000, 0x1 0x0) | ||
668 | + DI_SPI_FLASH(6, ospi_flash_ucs_lb, "mt35xu01gbba", 0x02000000, 0x2 0x0) | ||
669 | + DI_SPI_FLASH(7, ospi_flash_ucs_ub, "mt35xu01gbba", 0x02000000, 0x3 0x0) | ||
670 | +}; | ||
671 | + | ||
672 | +&gem0 { | ||
673 | + mdio = <&mdio0>; | ||
674 | +}; | ||
675 | + | ||
676 | +&gem1 { | ||
677 | + mdio = <&mdio0>; | ||
678 | +}; | ||
679 | + | ||
680 | +&pmc_tap { | ||
681 | + /* | ||
682 | + * Default device: xcvc1902 | ||
683 | + */ | ||
684 | + idcode = <0x14CA8093>; | ||
685 | +}; | ||
686 | +#endif | ||
687 | diff --git a/versal-pmc-alt.dtsi b/versal-pmc-alt.dtsi | ||
688 | new file mode 100644 | ||
689 | index 00000000..8236911b | ||
690 | --- /dev/null | ||
691 | +++ b/versal-pmc-alt.dtsi | ||
692 | @@ -0,0 +1,40 @@ | ||
693 | +/* | ||
694 | + * Versal PMC | ||
695 | + * | ||
696 | + * Copyright (c) 2016, Xilinx Inc. | ||
697 | + * All rights reserved. | ||
698 | + * | ||
699 | + * Redistribution and use in source and binary forms, with or without | ||
700 | + * modification, are permitted provided that the following conditions are met: | ||
701 | + * * Redistributions of source code must retain the above copyright | ||
702 | + * notice, this list of conditions and the following disclaimer. | ||
703 | + * * Redistributions in binary form must reproduce the above copyright | ||
704 | + * notice, this list of conditions and the following disclaimer in the | ||
705 | + * documentation and/or other materials provided with the distribution. | ||
706 | + * * Neither the name of the <organization> nor the | ||
707 | + * names of its contributors may be used to endorse or promote products | ||
708 | + * derived from this software without specific prior written permission. | ||
709 | + * | ||
710 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
711 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
712 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
713 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
714 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
715 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
716 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
717 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
718 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
719 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
720 | + */ | ||
721 | + | ||
722 | +#include "versal.dtsh" | ||
723 | + | ||
724 | +#include "versal-icnt.dtsi" | ||
725 | +#include "versal-rams.dtsi" | ||
726 | +#include "versal-pmc-ppu-alt.dtsi" | ||
727 | +#include "versal-pmc-iou.dtsi" | ||
728 | +#include "versal-pmc-sys.dtsi" | ||
729 | +#include "versal-pmc-sec.dtsi" | ||
730 | +#include "versal-pmc-npi.dtsi" | ||
731 | +#include "versal-pmc-pl.dtsi" | ||
732 | +#include "versal-pmc-bat.dtsi" | ||
733 | diff --git a/versal-pmc-ppu-alt.dtsi b/versal-pmc-ppu-alt.dtsi | ||
734 | new file mode 100644 | ||
735 | index 00000000..726413f4 | ||
736 | --- /dev/null | ||
737 | +++ b/versal-pmc-ppu-alt.dtsi | ||
738 | @@ -0,0 +1,252 @@ | ||
739 | +/* | ||
740 | + * Versal PMC PPU block | ||
741 | + * | ||
742 | + * Copyright (c) 2016, Xilinx Inc. | ||
743 | + * All rights reserved. | ||
744 | + * | ||
745 | + * Redistribution and use in source and binary forms, with or without | ||
746 | + * modification, are permitted provided that the following conditions are met: | ||
747 | + * * Redistributions of source code must retain the above copyright | ||
748 | + * notice, this list of conditions and the following disclaimer. | ||
749 | + * * Redistributions in binary form must reproduce the above copyright | ||
750 | + * notice, this list of conditions and the following disclaimer in the | ||
751 | + * documentation and/or other materials provided with the distribution. | ||
752 | + * * Neither the name of the <organization> nor the | ||
753 | + * names of its contributors may be used to endorse or promote products | ||
754 | + * derived from this software without specific prior written permission. | ||
755 | + * | ||
756 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
757 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
758 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
759 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
760 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
761 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
762 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
763 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
764 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
765 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
766 | + */ | ||
767 | + | ||
768 | +#include "versal.dtsh" | ||
769 | + | ||
770 | +#define CREATE_PPU_IOMOD(X) \ | ||
771 | + pmc_ppu ## X ## _io_module: io-module@00 { \ | ||
772 | + doc-status = "complete"; \ | ||
773 | + #address-cells = <2>; \ | ||
774 | + #size-cells = <1>; \ | ||
775 | + #priority-cells = <0>; \ | ||
776 | + compatible = "xlnx,iomodule-1.02.a", "syscon", "simple-bus"; \ | ||
777 | + container = <&lmb_pmc_ppu ## X>; \ | ||
778 | + priority = <0xffffffff>; \ | ||
779 | + xlnx,freq = <0x47868c0>; \ | ||
780 | + xlnx,instance = "iomodule_1"; \ | ||
781 | + xlnx,io-mask = <0xfffe0000>; \ | ||
782 | + xlnx,lmb-awidth = <0x20>; \ | ||
783 | + xlnx,lmb-dwidth = <0x20>; \ | ||
784 | + xlnx,mask = <0xffffff80>; \ | ||
785 | + xlnx,use-io-bus = <0x1>; \ | ||
786 | + \ | ||
787 | + pmc_ppu ## X ## _io_intc: pmc_ppu ## X ## _intc@0C { \ | ||
788 | + #interrupt-cells = <1>; \ | ||
789 | + compatible = "xlnx,io-intc-1.02.a", "xlnx,io_intc"; \ | ||
790 | + interrupt-controller ; \ | ||
791 | + interrupts-extended = <&pmc_ppu ## X 0>; \ | ||
792 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(0C) 0x4 0x0 MM_PMC_PPU ## X ## _IOM(30) 0x10 0x0 MM_PMC_PPU ## X ## _IOM(80) 0x7C>; \ | ||
793 | + xlnx,intc-addr-width = <0x20>; \ | ||
794 | + xlnx,intc-base-vectors = <0x0>; \ | ||
795 | + xlnx,intc-has-fast = <0x0>; \ | ||
796 | + xlnx,intc-intr-size = <0x10>; \ | ||
797 | + xlnx,intc-level-edge = <0x0>; \ | ||
798 | + xlnx,intc-positive = <0xffff>; \ | ||
799 | + xlnx,intc-use-ext-intr = <0x1>; \ | ||
800 | + }; \ | ||
801 | + \ | ||
802 | + pmc_ppu ## X ## _io_gpi1: pmc_ppu ## X ## _gpi@20 { \ | ||
803 | + #gpio-cells = <1>; \ | ||
804 | + gpio-controller; \ | ||
805 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
806 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
807 | + interrupts = <11>; \ | ||
808 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(20) 0x4>; \ | ||
809 | + xlnx,gpi-interrupt = <0x1>; \ | ||
810 | + xlnx,gpi-size = <0x20>; \ | ||
811 | + xlnx,use-gpi = <0x1>; \ | ||
812 | + }; \ | ||
813 | + pmc_ppu ## X ## _io_gpi2: pmc_ppu ## X ## _gpi@24 { \ | ||
814 | + #gpio-cells = <1>; \ | ||
815 | + gpio-controller; \ | ||
816 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
817 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
818 | + interrupts = <12>; \ | ||
819 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(24) 0x4>; \ | ||
820 | + xlnx,gpi-interrupt = <0x1>; \ | ||
821 | + xlnx,gpi-size = <0x20>; \ | ||
822 | + xlnx,use-gpi = <0x1>; \ | ||
823 | + }; \ | ||
824 | + pmc_ppu ## X ## _io_gpi3: pmc_ppu ## X ## _gpi@28 { \ | ||
825 | + #gpio-cells = <1>; \ | ||
826 | + gpio-controller; \ | ||
827 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
828 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
829 | + interrupts = <13>; \ | ||
830 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(28) 0x4>; \ | ||
831 | + xlnx,gpi-interrupt = <0x1>; \ | ||
832 | + xlnx,gpi-size = <0x20>; \ | ||
833 | + xlnx,use-gpi = <0x1>; \ | ||
834 | + }; \ | ||
835 | + pmc_ppu ## X ## _io_gpi4: pmc_ppu ## X ## _gpi@2c { \ | ||
836 | + #gpio-cells = <1>; \ | ||
837 | + gpio-controller; \ | ||
838 | + compatible = "xlnx,io-gpi-1.02.a", "xlnx,io_gpi"; \ | ||
839 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
840 | + interrupts = <14>; \ | ||
841 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(2c) 0x4>; \ | ||
842 | + xlnx,gpi-interrupt = <0x1>; \ | ||
843 | + xlnx,gpi-size = <0x20>; \ | ||
844 | + xlnx,use-gpi = <0x1>; \ | ||
845 | + }; \ | ||
846 | + \ | ||
847 | + pmc_ppu ## X ## _io_gpo1: pmc_ppu ## X ## _gpo@10 { \ | ||
848 | + #gpio-cells = <1>; \ | ||
849 | + gpio-controller; \ | ||
850 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
851 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(10) 0x4>; \ | ||
852 | + xlnx,gpo-init = <0x0>; \ | ||
853 | + xlnx,gpo-size = <0x9>; \ | ||
854 | + xlnx,use-gpo = <0x1>; \ | ||
855 | + }; \ | ||
856 | + pmc_ppu ## X ## _io_gpo2: pmc_ppu ## X ## _gpo@14 { \ | ||
857 | + #gpio-cells = <1>; \ | ||
858 | + gpio-controller; \ | ||
859 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
860 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(14) 0x4>; \ | ||
861 | + xlnx,gpo-init = <0x0>; \ | ||
862 | + xlnx,gpo-size = <0x20>; \ | ||
863 | + xlnx,use-gpo = <0x1>; \ | ||
864 | + }; \ | ||
865 | + pmc_ppu ## X ## _io_gpo3: pmc_ppu ## X ## _gpo@18 { \ | ||
866 | + #gpio-cells = <1>; \ | ||
867 | + gpio-controller; \ | ||
868 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
869 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(18) 0x4>; \ | ||
870 | + xlnx,gpo-init = <0x0>; \ | ||
871 | + xlnx,gpo-size = <0x20>; \ | ||
872 | + xlnx,use-gpo = <0x1>; \ | ||
873 | + }; \ | ||
874 | + pmc_ppu ## X ## _io_gpo4: pmc_ppu ## X ## _gpo@1c { \ | ||
875 | + #gpio-cells = <1>; \ | ||
876 | + gpio-controller; \ | ||
877 | + compatible = "xlnx,io-gpo-1.02.a", "xlnx,io_gpo"; \ | ||
878 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(1c) 0x4>; \ | ||
879 | + xlnx,gpo-init = <0x0>; \ | ||
880 | + xlnx,gpo-size = <0x20>; \ | ||
881 | + xlnx,use-gpo = <0x1>; \ | ||
882 | + }; \ | ||
883 | + \ | ||
884 | + pmc_ppu ## X ## _io_pit1: pmc_ppu ## X ## _pit@40 { \ | ||
885 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
886 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
887 | + interrupts = <3>; \ | ||
888 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(40) 0xc>; \ | ||
889 | + xlnx,pit-interrupt = <0x1>; \ | ||
890 | + xlnx,pit-prescaler = <0x9>; \ | ||
891 | + xlnx,pit-readable = <0x1>; \ | ||
892 | + xlnx,pit-size = <0x20>; \ | ||
893 | + xlnx,use-pit = <0x1>; \ | ||
894 | + frequency = <460000000>; \ | ||
895 | + gpios = <&pmc_ppu ## X ## _io_gpo1 1 &pmc_ppu ## X ## _io_pit2 0>; \ | ||
896 | + gpio-names = "ps_config","ps_hit_in"; \ | ||
897 | + gpio-controller; \ | ||
898 | + #gpio-cells = <1>; \ | ||
899 | + }; \ | ||
900 | + pmc_ppu ## X ## _io_pit2: pmc_ppu ## X ## _pit@50 { \ | ||
901 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
902 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
903 | + interrupts = <4>; \ | ||
904 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(50) 0xc>; \ | ||
905 | + xlnx,pit-interrupt = <0x1>; \ | ||
906 | + xlnx,pit-prescaler = <0x9>; \ | ||
907 | + xlnx,pit-readable = <0x1>; \ | ||
908 | + xlnx,pit-size = <0x20>; \ | ||
909 | + xlnx,use-pit = <0x1>; \ | ||
910 | + frequency = <460000000>; \ | ||
911 | + gpio-controller; \ | ||
912 | + #gpio-cells = <1>; \ | ||
913 | + }; \ | ||
914 | + pmc_ppu ## X ## _io_pit3: pmc_ppu ## X ## _pit@60 { \ | ||
915 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
916 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
917 | + interrupts = <5>; \ | ||
918 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(60) 0xc>; \ | ||
919 | + xlnx,pit-interrupt = <0x1>; \ | ||
920 | + xlnx,pit-prescaler = <0x9>; \ | ||
921 | + xlnx,pit-readable = <0x1>; \ | ||
922 | + xlnx,pit-size = <0x20>; \ | ||
923 | + xlnx,use-pit = <0x1>; \ | ||
924 | + frequency = <460000000>; \ | ||
925 | + gpios = <&pmc_ppu ## X ## _io_gpo1 6 &pmc_ppu ## X ## _io_pit4 0>; \ | ||
926 | + gpio-names = "ps_config","ps_hit_in"; \ | ||
927 | + gpio-controller; \ | ||
928 | + #gpio-cells = <1>; \ | ||
929 | + }; \ | ||
930 | + pmc_ppu ## X ## _io_pit4: pmc_ppu ## X ## _pit@70 { \ | ||
931 | + compatible = "xlnx,io-pit-1.02.a", "xlnx,io_pit"; \ | ||
932 | + interrupt-parent = <&pmc_ppu ## X ## _io_intc>; \ | ||
933 | + interrupts = <6>; \ | ||
934 | + reg = <0x0 MM_PMC_PPU ## X ## _IOM(70) 0xc>; \ | ||
935 | + xlnx,pit-interrupt = <0x1>; \ | ||
936 | + xlnx,pit-prescaler = <0x9>; \ | ||
937 | + xlnx,pit-readable = <0x1>; \ | ||
938 | + xlnx,pit-size = <0x20>; \ | ||
939 | + xlnx,use-pit = <0x1>; \ | ||
940 | + frequency = <460000000>; \ | ||
941 | + gpio-controller; \ | ||
942 | + #gpio-cells = <1>; \ | ||
943 | + }; \ | ||
944 | + } | ||
945 | + | ||
946 | +/ { | ||
947 | + /* MDM UARTs. We put them here for instantiation ordering purposes | ||
948 | + * making sure that -serial command line options refer to these | ||
949 | + * first. | ||
950 | + */ | ||
951 | + ppu0_mdm_uart@MM_PMC_PPU0_MDM_HSD { | ||
952 | + doc-status = "complete"; | ||
953 | + compatible = "xlnx,xps-uartlite"; | ||
954 | + reg-extended = <&lmb_pmc_ppu0 0x0 MM_PMC_PPU0_MDM_HSD 0x0 0x10 0x1>; | ||
955 | + chardev = "serial2"; | ||
956 | + }; | ||
957 | + | ||
958 | + ppu1_mdm_uart@MM_PMC_PPU1_MDM_HSD { | ||
959 | + doc-status = "complete"; | ||
960 | + compatible = "xlnx,xps-uartlite"; | ||
961 | + reg-extended = <&lmb_pmc_ppu1 0x0 MM_PMC_PPU1_MDM_HSD 0x0 0x10 0x1>; | ||
962 | + chardev = "serial3"; | ||
963 | + }; | ||
964 | +}; | ||
965 | + | ||
966 | +&lmb_pmc_ppu0 { | ||
967 | + doc-name = "LMB PPU0"; | ||
968 | + doc-status = "complete"; | ||
969 | + CREATE_PPU_IOMOD(0); | ||
970 | +}; | ||
971 | + | ||
972 | +&lmb_pmc_ppu1 { | ||
973 | + doc-name = "LMB PPU1"; | ||
974 | + doc-status = "complete"; | ||
975 | + CREATE_PPU_IOMOD(1); | ||
976 | +}; | ||
977 | + | ||
978 | +&amba_pmc_ppu { | ||
979 | + pmc_gic_proxy: pmc_gic_proxy@0 { | ||
980 | + doc-status = "complete"; | ||
981 | + #interrupt-cells = <3>; | ||
982 | + interrupt-controller; | ||
983 | + | ||
984 | + compatible = "xlnx,zynqmp-gicp"; | ||
985 | + reg = <0x0 MM_PMC_GIC_PROXY 0x0 MM_PMC_GIC_PROXY_SIZE 0x0>; | ||
986 | + interrupt-parent = <&pmc_ppu1_io_intc>; | ||
987 | + interrupts = <IRQ_PPU1_INTC_PMC_GICP>; | ||
988 | + }; | ||
989 | +}; | ||
990 | + | ||
991 | diff --git a/versal-ps-iou-alt.dtsi b/versal-ps-iou-alt.dtsi | ||
992 | new file mode 100644 | ||
993 | index 00000000..a6c22b86 | ||
994 | --- /dev/null | ||
995 | +++ b/versal-ps-iou-alt.dtsi | ||
996 | @@ -0,0 +1,467 @@ | ||
997 | +/* | ||
998 | + * Versal PS IOU | ||
999 | + * | ||
1000 | + * Copyright (C) 2016-2022, Xilinx, Inc. | ||
1001 | + * Copyright (C) 2023, Advanced Micro Devices, Inc. | ||
1002 | + * All rights reserved. | ||
1003 | + * | ||
1004 | + * Redistribution and use in source and binary forms, with or without | ||
1005 | + * modification, are permitted provided that the following conditions are met: | ||
1006 | + * * Redistributions of source code must retain the above copyright | ||
1007 | + * notice, this list of conditions and the following disclaimer. | ||
1008 | + * * Redistributions in binary form must reproduce the above copyright | ||
1009 | + * notice, this list of conditions and the following disclaimer in the | ||
1010 | + * documentation and/or other materials provided with the distribution. | ||
1011 | + * * Neither the name of the <organization> nor the | ||
1012 | + * names of its contributors may be used to endorse or promote products | ||
1013 | + * derived from this software without specific prior written permission. | ||
1014 | + * | ||
1015 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
1016 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
1017 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
1018 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
1019 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
1020 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
1021 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
1022 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
1023 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
1024 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
1025 | + */ | ||
1026 | + | ||
1027 | +#include "versal.dtsh" | ||
1028 | + | ||
1029 | +#define GEM(g_name, g_base, g_size, g_dma, g_irq, rst_idx, pwr_idx) \ | ||
1030 | +g_name: ethernet@g_base { \ | ||
1031 | + #address-cells = <1>; \ | ||
1032 | + #size-cells = <0>; \ | ||
1033 | + #priority-cells = <0>; \ | ||
1034 | + compatible = "cdns,gem"; \ | ||
1035 | + interrupts = <g_irq g_irq>; \ | ||
1036 | + dma = <g_dma>; \ | ||
1037 | + memattr = <& ## g_name ## _memattr_smid>; \ | ||
1038 | + memattr-write = <& ## g_name ## _w_memattr_smid>; \ | ||
1039 | + reg = <0x0 g_base 0x0 g_size 0x0>; \ | ||
1040 | + num-priority-queues = <2>; \ | ||
1041 | + reset-gpios = <&crl rst_idx>; \ | ||
1042 | + power-gpios = <&psm_local pwr_idx>; \ | ||
1043 | +} | ||
1044 | + | ||
1045 | +// FIXME: Add support for SMIDs | ||
1046 | +#define ZDMA_CHANNEL(zname, zdomain, zbase, zirq, zbuswidth, zdma, mid, num) \ | ||
1047 | +zname ## _mattr: zname ## mattr { \ | ||
1048 | + compatible = "qemu:memory-transaction-attr"; \ | ||
1049 | + requester-id = <mid>; \ | ||
1050 | +}; \ | ||
1051 | + \ | ||
1052 | +zname: dma-controller@zbase { \ | ||
1053 | + compatible = "xlnx,zdma"; \ | ||
1054 | + reg = <0x0 zbase 0x0 MM_ADMA_CH0_SIZE 0x0>; \ | ||
1055 | + bus-width = <zbuswidth>; \ | ||
1056 | + has-parity = <1>; \ | ||
1057 | + interrupts = <zirq>; \ | ||
1058 | + #stream-id-cells = <0x1>; \ | ||
1059 | + dma = <zdma>; \ | ||
1060 | + memattr = <& ## zname ## _mattr>; \ | ||
1061 | + reset-gpios = < &crl CRL_RST_ADMA >; \ | ||
1062 | + #gpio-cells = <1>; \ | ||
1063 | + gpio-names = "memattr-secure"; \ | ||
1064 | + gpios = <&lpd_slcr_secure num>; \ | ||
1065 | +} | ||
1066 | + | ||
1067 | +/* | ||
1068 | + * Our XRAM model only has the correctable interrupt line. | ||
1069 | + * All instances connect to a single line in the GIC. | ||
1070 | + * | ||
1071 | + * To support shared memories for co-sim, we provide the | ||
1072 | + * actual RAMs externally and not from the XRAMC model. | ||
1073 | + */ | ||
1074 | +#define XRAM_CTRL(n) xram_ctrl_ ## n { \ | ||
1075 | + compatible = "xlnx,versal-xramc"; \ | ||
1076 | + reg = <0x0 (MM_XRAM + 0x## n ##0000) 0 0x10000 0x0 >; \ | ||
1077 | + interrupts = <XRAM_IRQ_0>; \ | ||
1078 | + alloc-ram = <0>; \ | ||
1079 | +} | ||
1080 | + | ||
1081 | +&amba_fpd { | ||
1082 | +#ifdef MM_FPD_FPD_APU | ||
1083 | + apu_ctrl: apu_ctrl@MM_FPD_FPD_APU { | ||
1084 | + compatible = "xlnx,versal-apu-ctrl"; | ||
1085 | + reg = <0x0 MM_FPD_FPD_APU 0x0 MM_FPD_FPD_APU_SIZE 0x0>; | ||
1086 | + cpu0 = <&cpu0>; | ||
1087 | + cpu1 = <&cpu1>; | ||
1088 | + #gpio-cells = <1>; | ||
1089 | + }; | ||
1090 | +#endif | ||
1091 | + | ||
1092 | + afi_fm@MM_FPD_FPD_AFIFM0 { | ||
1093 | + compatible = "xlnx,versal-afi-fm"; | ||
1094 | + reg = <0x0 MM_FPD_FPD_AFIFM0 0x0 MM_FPD_FPD_AFIFM0_SIZE 0x0>; | ||
1095 | + }; | ||
1096 | + | ||
1097 | + afi_fm@MM_FPD_FPD_AFIFM2 { | ||
1098 | + compatible = "xlnx,versal-afi-fm"; | ||
1099 | + reg = <0x0 MM_FPD_FPD_AFIFM2 0x0 MM_FPD_FPD_AFIFM2_SIZE 0x0>; | ||
1100 | + }; | ||
1101 | + | ||
1102 | +#ifdef MM_FPD_FPD_GPCCI | ||
1103 | + cci_reg@MM_FPD_FPD_GPCCI { | ||
1104 | + compatible = "xlnx,cci_reg"; | ||
1105 | + reg = <0x0 MM_FPD_FPD_GPCCI 0x0 MM_FPD_FPD_MAINCCI_SIZE 0x0>; | ||
1106 | + }; | ||
1107 | +#endif | ||
1108 | + | ||
1109 | +#ifdef MM_FPD_FPD_MAINCCI | ||
1110 | + cci500@MM_FPD_FPD_MAINCCI { | ||
1111 | + compatible = "xlnx,cci500"; | ||
1112 | + reg = <0x0 MM_FPD_FPD_MAINCCI 0x0 MM_FPD_FPD_MAINCCI_SIZE 0x0>; | ||
1113 | + }; | ||
1114 | +#endif | ||
1115 | + | ||
1116 | + cpm_crcpm@MM_CPM_CPM_CRCPM { | ||
1117 | + compatible = "xlnx,versal_cpm_crcpm"; | ||
1118 | + reg = <0x0 MM_CPM_CPM_CRCPM 0x0 MM_CPM_CPM_CRCPM_SIZE 0x0>; | ||
1119 | + }; | ||
1120 | + | ||
1121 | + cpm_pcsr@MM_CPM_CPM_PCSR { | ||
1122 | + compatible = "xlnx,versal_cpm_pcsr"; | ||
1123 | + reg = <0x0 MM_CPM_CPM_PCSR 0x0 MM_CPM_CPM_PCSR_SIZE 0x0>; | ||
1124 | + }; | ||
1125 | + | ||
1126 | + cpm_slcr_secure@MM_CPM_CPM_SLCR_SECURE { | ||
1127 | + compatible = "xlnx.cpm_slcr_secure"; | ||
1128 | + reg = <0x0 MM_CPM_CPM_SLCR_SECURE 0x0 MM_CPM_CPM_SLCR_SECURE_SIZE 0x0>; | ||
1129 | + }; | ||
1130 | + | ||
1131 | + fpd_slcr@MM_FPD_FPD_SLCR { | ||
1132 | + compatible = "xlnx,versal-fpd-slcr"; | ||
1133 | + interrupts = <SLCR_FPD_APB_IRQ_0>; | ||
1134 | + reg = <0x0 MM_FPD_FPD_SLCR 0x0 MM_FPD_FPD_SLCR_SIZE 0x0>; | ||
1135 | + }; | ||
1136 | + | ||
1137 | + fpd_slcr_secure@MM_FPD_FPD_SLCR { | ||
1138 | + compatible = "xlnx,versal-fpd-slcr-secure"; | ||
1139 | + interrupts = <SLCR_SECURE_FPD_APB_IRQ_0>; | ||
1140 | + reg = <0x0 MM_FPD_FPD_SLCR_SECURE 0x0 MM_FPD_FPD_SLCR_SECURE_SIZE 0x0>; | ||
1141 | + }; | ||
1142 | + | ||
1143 | +#ifdef MM_FPD_FPD_WWDT | ||
1144 | + wwdt0: watchdog@MM_FPD_FPD_WWDT { | ||
1145 | + compatible = "xlnx,versal-wwdt"; | ||
1146 | + reg = <0x0 MM_FPD_FPD_WWDT 0x0 MM_FPD_FPD_WWDT_SIZE 0x0>; | ||
1147 | + /* IRQ order must match the QEMU model */ | ||
1148 | + interrupts = <FP_WDT_IRQ_0 | ||
1149 | + FPD_WWDT_RST_PENDING_IRQ_0 | ||
1150 | + FPD_GWDT_WS0_IRQ_0 | ||
1151 | + FPD_GWDT_WS1_IRQ_0>; | ||
1152 | + pclk = <100000000>; | ||
1153 | + reset-gpios = <&crf 27>; | ||
1154 | + }; | ||
1155 | +#endif | ||
1156 | +#ifdef MM_FPD_INTFPD_CONFIG | ||
1157 | + intfpd: intfpd@MM_FPD_INTFPD_CONFIG { | ||
1158 | + compatible = "xlnx-intfpd-config"; | ||
1159 | + reg = <0x0 MM_FPD_INTFPD_CONFIG 0x0 MM_FPD_INTFPD_CONFIG_SIZE 0x0>; | ||
1160 | + interrupts = < | ||
1161 | + #if FPD_APB_INT_IRQ_0 | ||
1162 | + FPD_APB_INT_IRQ_0 | ||
1163 | + #elif INT_FPD_IRQ_0 | ||
1164 | + INT_FPD_IRQ_0 | ||
1165 | + #endif | ||
1166 | + >; | ||
1167 | + }; | ||
1168 | +#endif | ||
1169 | +}; | ||
1170 | + | ||
1171 | +&amba_lpd { | ||
1172 | + GEM(gem0, MM_GEM0, MM_GEM0_SIZE, &smmu_tbu0, GEM0_IRQ_0, CRL_RST_GEM0, PLR_PWR_GEM0); | ||
1173 | + GEM(gem1, MM_GEM1, MM_GEM1_SIZE, &smmu_tbu0, GEM1_IRQ_0, CRL_RST_GEM1, PLR_PWR_GEM1); | ||
1174 | + | ||
1175 | + serial0: serial@MM_UART0 { | ||
1176 | + compatible = "pl011"; | ||
1177 | + interrupts = <UART0_IRQ_0>; | ||
1178 | + reg = <0x0 MM_UART0 0x0 MM_UART0_SIZE 0x0 >; | ||
1179 | + reset-gpios = < &crl CRL_RST_UART0 >; | ||
1180 | + chardev = "serial0"; | ||
1181 | + }; | ||
1182 | + serial1: serial@MM_UART1 { | ||
1183 | + compatible = "pl011"; | ||
1184 | + interrupts = <UART1_IRQ_0>; | ||
1185 | + reg = <0x0 MM_UART1 0x0 MM_UART1_SIZE 0x0 >; | ||
1186 | + reset-gpios = < &crl CRL_RST_UART1 >; | ||
1187 | + chardev = "serial1"; | ||
1188 | + }; | ||
1189 | + | ||
1190 | + canfdbus0: canfdbus@0 { | ||
1191 | + compatible = "can-bus"; | ||
1192 | + }; | ||
1193 | + | ||
1194 | + can0: can@MM_CANFD0 { | ||
1195 | + compatible = "xlnx,versal-canfd"; | ||
1196 | + rx-fifo0 = <0x40>; | ||
1197 | + rx-fifo1 = <0x40>; | ||
1198 | + enable-rx-fifo1 = <0x1>; | ||
1199 | + canfdbus = <&canfdbus0>; | ||
1200 | + interrupts = <CAN0_IRQ_0>; | ||
1201 | + reg = <0x0 MM_CANFD0 0x0 MM_CANFD0_SIZE 0x0>; | ||
1202 | + reset-gpios = <&crl CRL_RST_CAN0>; | ||
1203 | + }; | ||
1204 | + can1: can@MM_CANFD1 { | ||
1205 | + compatible = "xlnx,versal-canfd"; | ||
1206 | + rx-fifo0 = <0x40>; | ||
1207 | + rx-fifo1 = <0x40>; | ||
1208 | + enable-rx-fifo1 = <0x1>; | ||
1209 | + canfdbus = <&canfdbus0>; | ||
1210 | + interrupts = <CAN1_IRQ_0>; | ||
1211 | + reg = <0x0 MM_CANFD1 0x0 MM_CANFD1_SIZE 0x0>; | ||
1212 | + reset-gpios = <&crl CRL_RST_CAN1>; | ||
1213 | + }; | ||
1214 | + | ||
1215 | + crl: crl@MM_CRL { | ||
1216 | + compatible = "xlnx,versal-crl"; | ||
1217 | + reg = <0x0 MM_CRL 0x0 MM_CRL_SIZE 0x0>; | ||
1218 | + gpio-controller; | ||
1219 | + #gpio-cells = <1>; | ||
1220 | + }; | ||
1221 | + | ||
1222 | + lpd_iou_slcr: slcr@MM_LPD_IOU_SLCR { | ||
1223 | + compatible = "xlnx,versal-lpd-iou-slcr"; | ||
1224 | + reg = <0x0 MM_LPD_IOU_SLCR 0x0 MM_LPD_IOU_SLCR_SIZE 0x0>; | ||
1225 | + }; | ||
1226 | + | ||
1227 | +#ifdef MM_RPU | ||
1228 | + rpu_ctrl: rpu_ctrl@MM_RPU { | ||
1229 | + compatible = "xlnx,versal-rpu"; | ||
1230 | + reg-extended = <&amba_lpd 0x0 MM_RPU 0x0 MM_RPU_SIZE 0x0 | ||
1231 | + &amba_r5_0 0x0 0x0 0x0 0x80000 0x0 | ||
1232 | + &amba 0x0 MM_R5_0_ATCM 0x0 0x60000 0x0 | ||
1233 | + &amba_r5_1 0x0 0x0 0x0 0x80000 0x0 | ||
1234 | + &amba 0x0 0xFFE90000 0x0 0x50000 0x0>; | ||
1235 | + rpu0 = <&rpu_cpu0>; | ||
1236 | + rpu1 = <&rpu_cpu1>; | ||
1237 | + | ||
1238 | + gpio-controller; | ||
1239 | + #gpio-cells = <1>; | ||
1240 | + | ||
1241 | + gpios = < &crl CRL_RST_CPU_R5_0 &crl CRL_RST_CPU_R5_1 | ||
1242 | + &psm_local 42 &psm_local 43 | ||
1243 | + >; | ||
1244 | + }; | ||
1245 | +#endif | ||
1246 | + | ||
1247 | + ipi: ipi@MM_IPI { | ||
1248 | + compatible = "xlnx,versal-ipi"; | ||
1249 | + reg = <0x0 MM_IPI 0x0 MM_IPI_SIZE 0x0>; | ||
1250 | + | ||
1251 | + /* Interrupt ordering here needs to match | ||
1252 | + * QEMU's sysbus-irq output order. */ | ||
1253 | + interrupts = <IPI_PSM_IRQ_0 | ||
1254 | + IPI_PMC_IRQ_0 | ||
1255 | + IPI0_IRQ_0 IPI1_IRQ_0 | ||
1256 | + IPI2_IRQ_0 IPI3_IRQ_0 | ||
1257 | + IPI4_IRQ_0 IPI5_IRQ_0 | ||
1258 | + IPI6_IRQ_0 | ||
1259 | + IPI_PMC_NOBUF_IRQ_0 | ||
1260 | + IPI_APB_IRQ_0>; | ||
1261 | + reset-gpios = <&crl CRL_RST_IPI>; | ||
1262 | + }; | ||
1263 | + | ||
1264 | + spi0: spi@MM_SPI0 { | ||
1265 | + compatible = "cdns,spi-r1p6"; | ||
1266 | + interrupts = <SPI0_IRQ_0>; | ||
1267 | + num-ss-bits = <4>; | ||
1268 | + reg = <0x0 MM_SPI0 0x0 MM_SPI0_SIZE 0x0 >; | ||
1269 | + | ||
1270 | + #address-cells = <1>; /* For child; must match SPI_FLASH() */ | ||
1271 | + #size-cells = <0>; | ||
1272 | + #bus-cells = <1>; | ||
1273 | + reset-gpios = <&crl CRL_RST_SPI0>; | ||
1274 | + }; | ||
1275 | + spi1: spi@MM_SPI1 { | ||
1276 | + compatible = "cdns,spi-r1p6"; | ||
1277 | + interrupts = <SPI1_IRQ_0>; | ||
1278 | + num-ss-bits = <4>; | ||
1279 | + reg = <0x0 MM_SPI1 0x0 MM_SPI1_SIZE 0x0 >; | ||
1280 | + | ||
1281 | + #address-cells = <1>; /* For child; must match SPI_FLASH() */ | ||
1282 | + #size-cells = <0>; | ||
1283 | + #bus-cells = <1>; | ||
1284 | + reset-gpios = <&crl CRL_RST_SPI1>; | ||
1285 | + }; | ||
1286 | + | ||
1287 | + dwc3_0: usb2@USB2_0_XHCI { | ||
1288 | + compatible = "usb_dwc3"; | ||
1289 | + reg = <0x0 MM_USB_DWC3_0 0x0 MM_USB_DWC3_0_SIZE 0x0 0x0 MM_USB_XHCI 0x0 MM_USB_XHCI_SIZE 0x0>; | ||
1290 | + interrupts = <USB2_IRQ_0 USB2_IRQ_1 USB2_IRQ_2 USB2_IRQ_3>; | ||
1291 | + dma = <&smmu_tbu0>; | ||
1292 | + memattr = <&usb0_memattr>; | ||
1293 | + reset-gpios = <&crl CRL_RST_USB0>; | ||
1294 | + intrs = <4>; | ||
1295 | + slots = <2>; | ||
1296 | + }; | ||
1297 | + | ||
1298 | + ttc0: timer@MM_TTC0 { | ||
1299 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1300 | + interrupts = <TTC0_IRQ_0 TTC0_IRQ_1 TTC0_IRQ_2>; | ||
1301 | + reg = <0x0 MM_TTC0 0x0 MM_TTC0_SIZE 0x0>; | ||
1302 | + width = <32>; | ||
1303 | + reset-gpios = < &crl CRL_RST_TTC0 >; | ||
1304 | + }; | ||
1305 | + ttc1: timer@MM_TTC1 { | ||
1306 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1307 | + interrupts = <TTC1_IRQ_0 TTC1_IRQ_1 TTC1_IRQ_2>; | ||
1308 | + reg = <0x0 MM_TTC1 0x0 MM_TTC1_SIZE 0x0>; | ||
1309 | + width = <32>; | ||
1310 | + reset-gpios = < &crl CRL_RST_TTC1 >; | ||
1311 | + }; | ||
1312 | + ttc2: timer@MM_TTC2 { | ||
1313 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1314 | + interrupts = <TTC2_IRQ_0 TTC2_IRQ_1 TTC2_IRQ_2>; | ||
1315 | + reg = <0x0 MM_TTC2 0x0 MM_TTC2_SIZE 0x0>; | ||
1316 | + width = <32>; | ||
1317 | + reset-gpios = < &crl CRL_RST_TTC2 >; | ||
1318 | + }; | ||
1319 | + ttc3: timer@MM_TTC3 { | ||
1320 | + compatible = "xlnx,ps7-ttc-1.00.a"; | ||
1321 | + interrupts = <TTC3_IRQ_0 TTC3_IRQ_1 TTC3_IRQ_2>; | ||
1322 | + reg = <0x0 MM_TTC3 0x0 MM_TTC3_SIZE 0x0>; | ||
1323 | + width = <32>; | ||
1324 | + reset-gpios = < &crl CRL_RST_TTC3 >; | ||
1325 | + }; | ||
1326 | + | ||
1327 | + ZDMA_CHANNEL(adma0, adma, MM_ADMA_CH0, ADMA_IRQ_0, 128, &smmu_tbu0, SMID_DMA0_CH0, 0x0); | ||
1328 | + ZDMA_CHANNEL(adma1, adma, MM_ADMA_CH1, ADMA_IRQ_1, 128, &smmu_tbu0, SMID_DMA0_CH1, 0x1); | ||
1329 | + ZDMA_CHANNEL(adma2, adma, MM_ADMA_CH2, ADMA_IRQ_2, 128, &smmu_tbu0, SMID_DMA0_CH2, 0x2); | ||
1330 | + ZDMA_CHANNEL(adma3, adma, MM_ADMA_CH3, ADMA_IRQ_3, 128, &smmu_tbu0, SMID_DMA0_CH3, 0x3); | ||
1331 | + ZDMA_CHANNEL(adma4, adma, MM_ADMA_CH4, ADMA_IRQ_4, 128, &smmu_tbu0, SMID_DMA0_CH4, 0x4); | ||
1332 | + ZDMA_CHANNEL(adma5, adma, MM_ADMA_CH5, ADMA_IRQ_5, 128, &smmu_tbu0, SMID_DMA0_CH5, 0x5); | ||
1333 | + ZDMA_CHANNEL(adma6, adma, MM_ADMA_CH6, ADMA_IRQ_6, 128, &smmu_tbu0, SMID_DMA0_CH6, 0x6); | ||
1334 | + ZDMA_CHANNEL(adma7, adma, MM_ADMA_CH7, ADMA_IRQ_7, 128, &smmu_tbu0, SMID_DMA0_CH7, 0x7); | ||
1335 | + | ||
1336 | + afi_fm@MM_LPD_AFIFM4 { | ||
1337 | + compatible = "xlnx,versal-afi-fm"; | ||
1338 | + reg = <0x0 MM_LPD_AFIFM4 0x0 MM_LPD_AFIFM4_SIZE 0x0>; | ||
1339 | + }; | ||
1340 | + | ||
1341 | + lpd_i2c_wrapper { | ||
1342 | +#ifdef MM_PS_I2C0 | ||
1343 | + ps_i2c0: ps_i2c0@MM_PS_I2C0 { | ||
1344 | + #address-cells = <1>; | ||
1345 | + #size-cells = <0>; | ||
1346 | + compatible = "xlnx,ps7-i2c-1.00.a", "cdns,i2c-r1p10"; | ||
1347 | + interrupts = <I2C0_IRQ_0>; | ||
1348 | + reg-extended = <&amba_lpd 0x0 MM_PS_I2C0 0x0 MM_PS_I2C0_SIZE 0x0>; | ||
1349 | + reset-gpios = <&crl CRL_RST_I2C0>; | ||
1350 | + }; | ||
1351 | + ps_i2c1: ps_i2c0@MM_PS_I2C1 { | ||
1352 | + #address-cells = <1>; | ||
1353 | + #size-cells = <0>; | ||
1354 | + compatible = "xlnx,ps7-i2c-1.00.a", "cdns,i2c-r1p10"; | ||
1355 | + interrupts = <I2C1_IRQ_0>; | ||
1356 | + reg-extended = <&amba_lpd 0x0 MM_PS_I2C1 0x0 MM_PS_I2C1_SIZE 0x0>; | ||
1357 | + reset-gpios = <&crl CRL_RST_I2C1>; | ||
1358 | + }; | ||
1359 | +#endif | ||
1360 | + }; | ||
1361 | + | ||
1362 | + ocm_ctrl0: ocm_ctrl@OCM { | ||
1363 | + compatible = "xlnx,zynqmp-ocmc"; | ||
1364 | + interrupts = <OCMINTR_IRQ_0>; | ||
1365 | + memsize = <MM_OCM_MEM_SIZE>; | ||
1366 | + reg = <0x0 MM_OCM 0x0 MM_OCM_SIZE 0x0>; | ||
1367 | + reset-gpios = <&crl CRL_RST_OCM>; | ||
1368 | + }; | ||
1369 | + | ||
1370 | +#ifdef MM_XRAM_SLCR | ||
1371 | + xram_slcr@MM_XRAM_SLCR { | ||
1372 | + compatible = "xlnx,xram_slcr"; | ||
1373 | + reg = <0x0 MM_XRAM_SLCR 0x0 MM_XRAM_SLCR_SIZE 0x0>; | ||
1374 | + }; | ||
1375 | +#endif | ||
1376 | + | ||
1377 | + lpd_slcr@MM_LPD_SLCR { | ||
1378 | + compatible = "xlnx,versal-lpd-slcr"; | ||
1379 | + reg = <0x0 MM_LPD_SLCR 0x0 MM_LPD_SLCR_SIZE 0x0>; | ||
1380 | + }; | ||
1381 | + | ||
1382 | + lpd_slcr_secure: lpd_slcr_secure@MM_LPD_SLCR_SECURE { | ||
1383 | + compatible = "xlnx,versal-lpd-slcr-secure"; | ||
1384 | + reg = <0x0 MM_LPD_SLCR_SECURE 0x0 MM_LPD_SLCR_SECURE_SIZE 0x0>; | ||
1385 | + gpio-controller; | ||
1386 | + #gpio-cells = <1>; | ||
1387 | + }; | ||
1388 | + | ||
1389 | + lpd_iou_slcr_secure: lpd_iou_slcr_secure@MM_LPD_IOU_SECURE_SLCR { | ||
1390 | + compatible = "xlnx,versal-lpd-iou-slcr-secure"; | ||
1391 | + reg = <0x0 MM_LPD_IOU_SECURE_SLCR 0x0 MM_LPD_IOU_SECURE_SLCR_SIZE 0x0>; | ||
1392 | + memattr-gem0 = <&gem0_memattr_smid>; | ||
1393 | + memattr-write-gem0 = <&gem0_w_memattr_smid>; | ||
1394 | + memattr-gem1 = <&gem1_memattr_smid>; | ||
1395 | + memattr-write-gem1 = <&gem1_w_memattr_smid>; | ||
1396 | + }; | ||
1397 | + | ||
1398 | +#ifdef MM_WWDT | ||
1399 | + lpd_wwdt: wwdt@MM_WWDT { | ||
1400 | + compatible = "xlnx,versal-wwdt"; | ||
1401 | + reg = <0x0 MM_WWDT 0x0 MM_WWDT_SIZE 0x0>; | ||
1402 | + /* IRQ order must match the QEMU model */ | ||
1403 | + interrupts = <WWDT_IRQ_0 | ||
1404 | + WWDT_RST_PENDING_IRQ_0 | ||
1405 | + GWDT_WS0_IRQ_0 | ||
1406 | + GWDT_WS1_IRQ_0>; | ||
1407 | + pclk = <100000000>; | ||
1408 | + reset-gpios = <&crl CRL_RST_SWDT>; | ||
1409 | + }; | ||
1410 | +#endif | ||
1411 | + | ||
1412 | + lpd_gpio: lpd_gpio@MM_PS_GPIO { | ||
1413 | + #gpio-cells = <1>; | ||
1414 | + compatible = "xlnx,zynqmp-gpio"; | ||
1415 | + gpio-controller; | ||
1416 | + interrupts = <GPIO_IRQ_0>; | ||
1417 | + reg = <0x0 MM_PS_GPIO 0x0 MM_PS_GPIO_SIZE 0x0>; | ||
1418 | + reset-gpios = < &crl CRL_RST_GPIO >; | ||
1419 | + }; | ||
1420 | +#ifdef MM_INTLPD_CONFIG | ||
1421 | + intlpd: intlpd@MM_INTLPD_CONFIG { | ||
1422 | + compatible = "xlnx-intlpd-config"; | ||
1423 | + reg = <0x0 MM_INTLPD_CONFIG 0x0 MM_INTLPD_CONFIG_SIZE 0x0>; | ||
1424 | + interrupts = <INT_LPD_IRQ_0>; | ||
1425 | + }; | ||
1426 | +#endif | ||
1427 | +}; | ||
1428 | + | ||
1429 | +&amba_xram { | ||
1430 | + XRAM_CTRL(0); | ||
1431 | + XRAM_CTRL(1); | ||
1432 | + XRAM_CTRL(2); | ||
1433 | + XRAM_CTRL(3); | ||
1434 | +}; | ||
1435 | + | ||
1436 | +&amba_root { | ||
1437 | + /* These devices need to be created before the CPUs. */ | ||
1438 | + crf: crf@MM_FPD_CRF { | ||
1439 | + compatible = "xlnx,versal-crf"; | ||
1440 | + reg-extended = <&amba_fpd 0x0 MM_FPD_CRF 0x0 MM_FPD_CRF_SIZE 0x0>; | ||
1441 | + gpio-controller; | ||
1442 | + #gpio-cells = <1>; | ||
1443 | + }; | ||
1444 | +}; | ||
1445 | + | ||
1446 | +/ { | ||
1447 | + /* Reset domains. */ | ||
1448 | + lpd_reset_domain@0 { | ||
1449 | + compatible = "qemu,reset-domain"; | ||
1450 | + mr0 = <&amba_lpd>; | ||
1451 | + reset-gpios = < &pmc_clk_rst CRP_RST_PS_PS_SRST | ||
1452 | + &pmc_clk_rst CRP_RST_PS_PS_POR >; | ||
1453 | + }; | ||
1454 | + | ||
1455 | + fpd_reset_domain@0 { | ||
1456 | + compatible = "qemu,reset-domain"; | ||
1457 | + mr0 = <&amba_fpd>; | ||
1458 | + reset-gpios = < &pmc_clk_rst CRP_RST_PS_PS_SRST | ||
1459 | + &pmc_clk_rst CRP_RST_PS_PS_POR | ||
1460 | + &crl CRL_RST_FPD_POR | ||
1461 | + &crl CRL_RST_FPD_SRST >; | ||
1462 | + }; | ||
1463 | +}; | ||
1464 | -- | ||
1465 | 2.34.1 | ||
1466 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch new file mode 100644 index 00000000..97262ae4 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees/0001-versal-net-Reorder-serial-port.patch | |||
@@ -0,0 +1,291 @@ | |||
1 | From 58fdfde013dfabf3a9f2c83525c00a6f057768f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 4 Oct 2024 15:49:46 -0600 | ||
4 | Subject: [PATCH] versal-net: Reorder serial port | ||
5 | |||
6 | This commit requires the corresponding "versal: Reorder serial ports" | ||
7 | |||
8 | This change affects the order of the serial ports when calling qemu. | ||
9 | Previously the serial ports 0 & 1 were the PMC (firmware) uartlite, | ||
10 | while the standard serial pors were 2 & 3. Reverse this order to | ||
11 | ensure that the first two serial ports are the ones used by Linux. | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | --- | ||
15 | board-versal-net-psx-spp-1.4-alt.dts | 36 ++++++++ | ||
16 | board-versal-net-psx-virt-alt.dts | 130 +++++++++++++++++++++++++++ | ||
17 | board-versal-pmx-virt-alt.dts | 82 +++++++++++++++++ | ||
18 | 3 files changed, 248 insertions(+) | ||
19 | create mode 100644 board-versal-net-psx-spp-1.4-alt.dts | ||
20 | create mode 100644 board-versal-net-psx-virt-alt.dts | ||
21 | create mode 100644 board-versal-pmx-virt-alt.dts | ||
22 | |||
23 | diff --git a/board-versal-net-psx-spp-1.4-alt.dts b/board-versal-net-psx-spp-1.4-alt.dts | ||
24 | new file mode 100644 | ||
25 | index 00000000..770a388e | ||
26 | --- /dev/null | ||
27 | +++ b/board-versal-net-psx-spp-1.4-alt.dts | ||
28 | @@ -0,0 +1,36 @@ | ||
29 | +/* | ||
30 | + * Versal Net PSX device tree. | ||
31 | + * | ||
32 | + * Copyright (c) 2022, Xilinx Inc | ||
33 | + * All rights reserved. | ||
34 | + * | ||
35 | + * Redistribution and use in source and binary forms, with or without | ||
36 | + * modification, are permitted provided that the following conditions are met: | ||
37 | + * * Redistributions of source code must retain the above copyright | ||
38 | + * notice, this list of conditions and the following disclaimer. | ||
39 | + * * Redistributions in binary form must reproduce the above copyright | ||
40 | + * notice, this list of conditions and the following disclaimer in the | ||
41 | + * documentation and/or other materials provided with the distribution. | ||
42 | + * * Neither the name of the <organization> nor the | ||
43 | + * names of its contributors may be used to endorse or promote products | ||
44 | + * derived from this software without specific prior written permission. | ||
45 | + * | ||
46 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
47 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
48 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
49 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
50 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
51 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
52 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
53 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
54 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
55 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
56 | + */ | ||
57 | + | ||
58 | +#define VERSAL_NET_APU_CPU_FREQ 100000000 | ||
59 | + | ||
60 | +#include "board-versal-net-psx-virt-alt.dts" | ||
61 | + | ||
62 | +&pmc_tap { | ||
63 | + platform-ver = <0x5>; | ||
64 | +}; | ||
65 | diff --git a/board-versal-net-psx-virt-alt.dts b/board-versal-net-psx-virt-alt.dts | ||
66 | new file mode 100644 | ||
67 | index 00000000..7ee4ad9d | ||
68 | --- /dev/null | ||
69 | +++ b/board-versal-net-psx-virt-alt.dts | ||
70 | @@ -0,0 +1,130 @@ | ||
71 | +/* | ||
72 | + * Versal-Net Virtual PSX board device tree. | ||
73 | + * | ||
74 | + * Copyright (c) 2021-2022, Xilinx Inc. | ||
75 | + * Copyright (C) 2022-2024, Advanced Micro Devices, Inc. | ||
76 | + * All rights reserved. | ||
77 | + * | ||
78 | + * Redistribution and use in source and binary forms, with or without | ||
79 | + * modification, are permitted provided that the following conditions are met: | ||
80 | + * * Redistributions of source code must retain the above copyright | ||
81 | + * notice, this list of conditions and the following disclaimer. | ||
82 | + * * Redistributions in binary form must reproduce the above copyright | ||
83 | + * notice, this list of conditions and the following disclaimer in the | ||
84 | + * documentation and/or other materials provided with the distribution. | ||
85 | + * * Neither the name of the <organization> nor the | ||
86 | + * names of its contributors may be used to endorse or promote products | ||
87 | + * derived from this software without specific prior written permission. | ||
88 | + * | ||
89 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
90 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
91 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
92 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
93 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
94 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
95 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
96 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
97 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
98 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
99 | + */ | ||
100 | + | ||
101 | +#ifndef NUM_APUS | ||
102 | +#define NUM_APUS 16 | ||
103 | +#endif | ||
104 | +#define VERSAL_NET_APU_CPU_FREQ 100000000 | ||
105 | + | ||
106 | +#define NUM_APUS_PER_CLUSTER 4 | ||
107 | + | ||
108 | +#define VERSAL_NPI_GENERIC | ||
109 | +#define VERSAL_PSX | ||
110 | +#define VERSAL_NET | ||
111 | +#define VERSAL_NPI_OVERRIDE | ||
112 | + | ||
113 | +/* TODO: Add GIC interrupt redirection support. */ | ||
114 | +#define RPU_GIC_INTERRUPT_TARGET_STEM rpu_cpu | ||
115 | + | ||
116 | +#define APU_CPU_MODEL "cortex-a78-arm-cpu" | ||
117 | +#define RPU_CPU_MODEL "cortex-r52-arm-cpu" | ||
118 | + | ||
119 | +#include "include/versal-net/npi-memmap.dtsh" | ||
120 | +#include "include/versal-net/fpd-memmap.dtsh" | ||
121 | +#include "board-versal-ps-virt-alt.dts" | ||
122 | +#include "versal-psx.dtsi" | ||
123 | +#include "versal-net-psmx.dtsi" | ||
124 | +#include "versal-psx-rpu.dtsi" | ||
125 | +#include "versal-net-boot-init.dtsi" | ||
126 | +#include "versal-net-hnic.dtsi" | ||
127 | +#include "versal-pmx-shared-overlay.dtsi" | ||
128 | +#include "versal-pmx-system-overlay.dtsi" | ||
129 | +#include "versal-psx-shared-overlay.dtsi" | ||
130 | + | ||
131 | +#ifndef VERSAL_NET_APU_CPU_FREQ | ||
132 | + #define VERSAL_NET_APU_CPU_FREQ 2720000 | ||
133 | +#endif | ||
134 | + | ||
135 | +#define SET_CPU_FREQ(n, f) \ | ||
136 | +&cpu ## n { \ | ||
137 | + generic-timer-frequency = <f>; \ | ||
138 | +} | ||
139 | + | ||
140 | +SET_CPU_FREQ(0, VERSAL_NET_APU_CPU_FREQ); | ||
141 | +SET_CPU_FREQ(1, VERSAL_NET_APU_CPU_FREQ); | ||
142 | +SET_CPU_FREQ(2, VERSAL_NET_APU_CPU_FREQ); | ||
143 | +SET_CPU_FREQ(3, VERSAL_NET_APU_CPU_FREQ); | ||
144 | +SET_CPU_FREQ(4, VERSAL_NET_APU_CPU_FREQ); | ||
145 | +SET_CPU_FREQ(5, VERSAL_NET_APU_CPU_FREQ); | ||
146 | +SET_CPU_FREQ(6, VERSAL_NET_APU_CPU_FREQ); | ||
147 | +SET_CPU_FREQ(7, VERSAL_NET_APU_CPU_FREQ); | ||
148 | +#if (NUM_APUS >= 16) | ||
149 | +SET_CPU_FREQ(8, VERSAL_NET_APU_CPU_FREQ); | ||
150 | +SET_CPU_FREQ(9, VERSAL_NET_APU_CPU_FREQ); | ||
151 | +SET_CPU_FREQ(10,VERSAL_NET_APU_CPU_FREQ); | ||
152 | +SET_CPU_FREQ(11,VERSAL_NET_APU_CPU_FREQ); | ||
153 | +SET_CPU_FREQ(12,VERSAL_NET_APU_CPU_FREQ); | ||
154 | +SET_CPU_FREQ(13,VERSAL_NET_APU_CPU_FREQ); | ||
155 | +SET_CPU_FREQ(14,VERSAL_NET_APU_CPU_FREQ); | ||
156 | +SET_CPU_FREQ(15,VERSAL_NET_APU_CPU_FREQ); | ||
157 | +#endif | ||
158 | +#if (NUM_APUS >= 32) | ||
159 | +SET_CPU_FREQ(16, VERSAL_NET_APU_CPU_FREQ); | ||
160 | +SET_CPU_FREQ(17, VERSAL_NET_APU_CPU_FREQ); | ||
161 | +SET_CPU_FREQ(18, VERSAL_NET_APU_CPU_FREQ); | ||
162 | +SET_CPU_FREQ(19, VERSAL_NET_APU_CPU_FREQ); | ||
163 | +SET_CPU_FREQ(20, VERSAL_NET_APU_CPU_FREQ); | ||
164 | +SET_CPU_FREQ(21, VERSAL_NET_APU_CPU_FREQ); | ||
165 | +SET_CPU_FREQ(22, VERSAL_NET_APU_CPU_FREQ); | ||
166 | +SET_CPU_FREQ(23, VERSAL_NET_APU_CPU_FREQ); | ||
167 | +SET_CPU_FREQ(24, VERSAL_NET_APU_CPU_FREQ); | ||
168 | +SET_CPU_FREQ(25, VERSAL_NET_APU_CPU_FREQ); | ||
169 | +SET_CPU_FREQ(26, VERSAL_NET_APU_CPU_FREQ); | ||
170 | +SET_CPU_FREQ(27, VERSAL_NET_APU_CPU_FREQ); | ||
171 | +SET_CPU_FREQ(28, VERSAL_NET_APU_CPU_FREQ); | ||
172 | +SET_CPU_FREQ(29, VERSAL_NET_APU_CPU_FREQ); | ||
173 | +SET_CPU_FREQ(30, VERSAL_NET_APU_CPU_FREQ); | ||
174 | +SET_CPU_FREQ(31, VERSAL_NET_APU_CPU_FREQ); | ||
175 | +#endif | ||
176 | + | ||
177 | +&rpu_ctrl_a { | ||
178 | + tcm-mr = <&s_axi_tcm_a>; | ||
179 | +}; | ||
180 | +&rpu_ctrl_a0 { | ||
181 | + core = <&rpu_cpu0>; | ||
182 | +}; | ||
183 | +&rpu_ctrl_a1 { | ||
184 | + core = <&rpu_cpu1>; | ||
185 | +}; | ||
186 | + | ||
187 | +&rpu_ctrl_b { | ||
188 | + tcm-mr = <&s_axi_tcm_b>; | ||
189 | +}; | ||
190 | +&rpu_ctrl_b0 { | ||
191 | + core = <&rpu_cpu2>; | ||
192 | +}; | ||
193 | +&rpu_ctrl_b1 { | ||
194 | + core = <&rpu_cpu3>; | ||
195 | +}; | ||
196 | + | ||
197 | +&pmc_tap { | ||
198 | + idcode = <0x14D80093>; | ||
199 | + platform-ver = <0x5>; | ||
200 | +}; | ||
201 | diff --git a/board-versal-pmx-virt-alt.dts b/board-versal-pmx-virt-alt.dts | ||
202 | new file mode 100644 | ||
203 | index 00000000..7a4679d0 | ||
204 | --- /dev/null | ||
205 | +++ b/board-versal-pmx-virt-alt.dts | ||
206 | @@ -0,0 +1,82 @@ | ||
207 | +/* | ||
208 | + * Versal Virtual PMC board device tree | ||
209 | + * | ||
210 | + * Copyright (c) 2016, Xilinx Inc | ||
211 | + * All rights reserved. | ||
212 | + * | ||
213 | + * Redistribution and use in source and binary forms, with or without | ||
214 | + * modification, are permitted provided that the following conditions are met: | ||
215 | + * * Redistributions of source code must retain the above copyright | ||
216 | + * notice, this list of conditions and the following disclaimer. | ||
217 | + * * Redistributions in binary form must reproduce the above copyright | ||
218 | + * notice, this list of conditions and the following disclaimer in the | ||
219 | + * documentation and/or other materials provided with the distribution. | ||
220 | + * * Neither the name of the <organization> nor the | ||
221 | + * names of its contributors may be used to endorse or promote products | ||
222 | + * derived from this software without specific prior written permission. | ||
223 | + * | ||
224 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
225 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
226 | + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
227 | + * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY | ||
228 | + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
229 | + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
230 | + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
231 | + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
232 | + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
233 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
234 | + */ | ||
235 | + | ||
236 | +#define VERSAL_PMX | ||
237 | +#define VERSAL_NET | ||
238 | +#define NUM_APUS 16 | ||
239 | +#define NUM_APUS_PER_CLUSTER 4 | ||
240 | +#define VERSAL_NPI_OVERRIDE | ||
241 | + | ||
242 | +#include "include/versal-net/npi-memmap.dtsh" | ||
243 | +#include "include/versal-net/fpd-memmap.dtsh" | ||
244 | +#include "board-versal-pmc-virt-alt.dts" | ||
245 | +#include "versal-pmx-shared-overlay.dtsi" | ||
246 | + | ||
247 | +#ifndef MULTI_ARCH | ||
248 | +/* | ||
249 | + * The single-arch setup has the entire system except | ||
250 | + * the ARM cores. So we need to add the missing dummy | ||
251 | + * ARM cores (pmc-virt.dts already has 0 - 1) and include | ||
252 | + * the PSX and PMX system overlays. | ||
253 | + */ | ||
254 | +#include "versal-pmx-system-overlay.dtsi" | ||
255 | +#include "versal-psx.dtsi" | ||
256 | +#include "versal-psx-shared-overlay.dtsi" | ||
257 | +#include "versal-net-psmx.dtsi" | ||
258 | + | ||
259 | +/ { | ||
260 | + /* Dummy APUs. */ | ||
261 | + cpu2: apu@2 { }; | ||
262 | + cpu3: apu@3 { }; | ||
263 | + cpu4: apu@4 { }; | ||
264 | + cpu5: apu@5 { }; | ||
265 | + cpu6: apu@6 { }; | ||
266 | + cpu7: apu@7 { }; | ||
267 | +#if (NUM_APUS >= 16) | ||
268 | + cpu8: apu@8 { }; | ||
269 | + cpu9: apu@9 { }; | ||
270 | + cpu10: apu@10 { }; | ||
271 | + cpu11: apu@11 { }; | ||
272 | + cpu12: apu@12 { }; | ||
273 | + cpu13: apu@13 { }; | ||
274 | + cpu14: apu@14 { }; | ||
275 | + cpu15: apu@15 { }; | ||
276 | +#endif | ||
277 | + /* Dummy GICs. */ | ||
278 | + rpu_gic_a: rpu_gic_a@0 { | ||
279 | + gpio_controller ; | ||
280 | + #gpio-cells = <1>; | ||
281 | + }; | ||
282 | + | ||
283 | + rpu_gic_b: rpu_gic_b@0 { | ||
284 | + gpio_controller ; | ||
285 | + #gpio-cells = <1>; | ||
286 | + }; | ||
287 | +}; | ||
288 | +#endif | ||
289 | -- | ||
290 | 2.34.1 | ||
291 | |||
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 deleted file mode 100644 index d10504d3..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
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-devicetrees_2024.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.2.bb new file mode 100644 index 00000000..5780aed1 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2024.2" | ||
5 | SRCREV ?= "a6eeb7ec0fdb765ab0057d95eb6201d97359eff9" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc index 179903c5..da62c8b7 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc | |||
@@ -8,8 +8,8 @@ COMPATIBLE_HOST:arm = "null" | |||
8 | # x86_64 is needed to build nativesdks | 8 | # x86_64 is needed to build nativesdks |
9 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64" | 9 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64" |
10 | 10 | ||
11 | BRANCH = "xlnx_rel_v2024.1" | 11 | BRANCH = "xlnx_rel_v2024.2" |
12 | SRCREV = "2319c870e754148ec3b9d40be0d3dbee959c3251" | 12 | SRCREV = "01482fa113dcbfa785feb7d513df50d15ec4c5df" |
13 | 13 | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ |
15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" | 15 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f" |
@@ -72,6 +72,13 @@ SRC_URI += "\ | |||
72 | # Patch doesn't apply to 8.1.0 | 72 | # Patch doesn't apply to 8.1.0 |
73 | # file://fixmips.patch | 73 | # file://fixmips.patch |
74 | 74 | ||
75 | # Additional patches to match Scarthgap, which requires a slightly newer qmp interface | ||
76 | SRC_URI += "\ | ||
77 | file://0001-python-rename-QEMUMonitorProtocol.cmd-to-cmd_raw.patch \ | ||
78 | file://0002-python-qemu-rename-command-to-cmd.patch \ | ||
79 | " | ||
80 | |||
81 | |||
75 | S = "${WORKDIR}/git" | 82 | S = "${WORKDIR}/git" |
76 | 83 | ||
77 | # Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc | 84 | # Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc |
diff --git a/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend b/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend new file mode 100644 index 00000000..d0bbaa0a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/tcf-agent/tcf-agent_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | # On a Zynq system hardware breakpoints are limited, so used software | ||
2 | CFLAGS:append:zynq = " -DENABLE_HardwareBreakpoints=0" | ||
diff --git a/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in b/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in new file mode 100644 index 00000000..ba8c8f21 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/x11-common/xserver-nodm-init/xserver-nodm.conf.in | |||
@@ -0,0 +1,8 @@ | |||
1 | # common environment file for sysvinit and systemd | ||
2 | |||
3 | LD_LIBRARY_PATH=/usr/lib/headless:${LD_LIBRARY_PATH} | ||
4 | XSERVER=/usr/bin/Xorg | ||
5 | DISPLAY=:0 | ||
6 | ARGS=" -br -pn @BLANK_ARGS@ @NO_CURSOR_ARG@ " | ||
7 | HOME=@HOME@ | ||
8 | USER=@USER@ | ||
diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch new file mode 100644 index 00000000..8c086ddb --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg/0001-xf86Rotate.c-Add-required-NULL-check.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From e94754360160cfe4faada7b9a523e57004b39e74 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
3 | Date: Thu, 15 Aug 2024 15:48:21 -0700 | ||
4 | Subject: [PATCH] xf86Rotate.c: Add required NULL check | ||
5 | |||
6 | Add missing NULL check on BlockHandler callback before invoking it. There | ||
7 | is no guarantee that said callback is always defined. | ||
8 | |||
9 | Fixes xorg crash on startup when screen rotation is specified in the config | ||
10 | file. | ||
11 | |||
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Anatoliy Klymenko <anatoliy.klymenko@amd.com> | ||
15 | --- | ||
16 | hw/xfree86/modes/xf86Rotate.c | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c | ||
20 | index ea9c43c..43eab53 100644 | ||
21 | --- a/hw/xfree86/modes/xf86Rotate.c | ||
22 | +++ b/hw/xfree86/modes/xf86Rotate.c | ||
23 | @@ -230,7 +230,8 @@ xf86RotateBlockHandler(ScreenPtr pScreen, void *pTimeout) | ||
24 | |||
25 | xf86RotateRedisplay(pScreen); | ||
26 | |||
27 | - (*pScreen->BlockHandler) (pScreen, pTimeout); | ||
28 | + if (pScreen->BlockHandler) | ||
29 | + (*pScreen->BlockHandler) (pScreen, pTimeout); | ||
30 | |||
31 | /* Re-wrap if we still need this hook */ | ||
32 | if (xf86_config->rotation_damage != NULL) { | ||
33 | -- | ||
34 | 2.25.1 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend index dc6a75c6..ebf7cd9e 100644 --- a/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend +++ b/meta-xilinx-core/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend | |||
@@ -3,6 +3,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | |||
3 | SRC_URI += " \ | 3 | SRC_URI += " \ |
4 | file://monitor-hotplug.sh \ | 4 | file://monitor-hotplug.sh \ |
5 | file://99-monitor-hotplug.rules \ | 5 | file://99-monitor-hotplug.rules \ |
6 | file://0001-xf86Rotate.c-Add-required-NULL-check.patch \ | ||
6 | " | 7 | " |
7 | 8 | ||
8 | do_install:append() { | 9 | do_install:append() { |
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb index 22f363c9..3aaac030 100644 --- a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb +++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_6.6.10.bb | |||
@@ -23,4 +23,3 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | |||
23 | COMPATIBLE_MACHINE = "^$" | 23 | COMPATIBLE_MACHINE = "^$" |
24 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 24 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
25 | COMPATIBLE_MACHINE:versal = "versal" | 25 | COMPATIBLE_MACHINE:versal = "versal" |
26 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.10.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.40.bb index 318a3cc0..d6b4d565 100644 --- a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.10.bb +++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_6.6.40.bb | |||
@@ -8,9 +8,9 @@ PV .= "+git" | |||
8 | 8 | ||
9 | S = "${WORKDIR}/git" | 9 | S = "${WORKDIR}/git" |
10 | 10 | ||
11 | BRANCH ?= "xlnx_rel_v2024.1" | 11 | BRANCH ?= "xlnx_rel_v2024.2" |
12 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | 12 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" |
13 | SRCREV = "edd297762e0bac3f4c5b64ef67244968e22020e2" | 13 | SRCREV = "4bb89eb3f3062eac8de1aa2b7e64d7f861e18caa" |
14 | 14 | ||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
16 | SRC_URI = "${REPO};${BRANCHARG}" | 16 | SRC_URI = "${REPO};${BRANCHARG}" |
@@ -23,4 +23,3 @@ EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | |||
23 | COMPATIBLE_MACHINE = "^$" | 23 | COMPATIBLE_MACHINE = "^$" |
24 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | 24 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" |
25 | COMPATIBLE_MACHINE:versal = "versal" | 25 | COMPATIBLE_MACHINE:versal = "versal" |
26 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb b/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb new file mode 100644 index 00000000..806d2515 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi21/kernel-module-hdmi21_2024.2.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Xilinx HDMI 2.1 FMC linux kernel module" | ||
2 | DESCRIPTION = "Out-of-tree HDMI 2.1 FMC kernel modules provider for aarch64 devices" | ||
3 | SECTION = "PETALINUX/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | inherit module | ||
8 | |||
9 | SRC_BRANCH = "master" | ||
10 | INHIBIT_PACKAGE_STRIP = "1" | ||
11 | |||
12 | SRC_URI = "git://github.com/Xilinx/hdmi21-modules.git;protocol=https;branch=${SRC_BRANCH}" | ||
13 | |||
14 | SRCREV = "26a1d40723c58783f7aedba028a208ab9410df5f" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
20 | COMPATIBLE_MACHINE:versal = "versal" | ||
21 | |||
22 | # The inherit of module.bbclass will automatically name module packages with | ||
23 | # "kernel-module-" prefix as required by the oe-core build environment. | ||
diff --git a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch b/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch deleted file mode 100644 index 38b61071..00000000 --- a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent/meson.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
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 deleted file mode 100644 index bee78918..00000000 --- a/meta-xilinx-core/recipes-kernel/libtraceevent/libtraceevent_1.7.3.bb +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | # Copyright (C) 2022 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "API to access the kernel tracefs directory" | ||
5 | HOMEPAGE = "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/" | ||
6 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSES/GPL-2.0;md5=e6a75371ba4d16749254a51215d13f97 \ | ||
8 | file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd" | ||
9 | SECTION = "libs" | ||
10 | |||
11 | SRCREV = "dd148189b74da3e2f45c7e536319fec97cb71213" | ||
12 | SRC_URI = "git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git;branch=${BPN};protocol=https \ | ||
13 | file://meson.patch" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit meson pkgconfig | ||
18 | |||
19 | EXTRA_OEMESON = "-Ddocs=false" | ||
20 | |||
21 | PACKAGES += "${PN}-plugins" | ||
22 | |||
23 | FILES:${PN}-plugins += "${libdir}/traceevent/plugins" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg new file mode 100644 index 00000000..b6db5f90 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.cfg | |||
@@ -0,0 +1,2 @@ | |||
1 | CONFIG_SENSORS_TPS53679=m | ||
2 | |||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc new file mode 100644 index 00000000..25ef4034 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/linux-xlnx-kmeta/features/hwmon/hwmon_modules.scc | |||
@@ -0,0 +1,2 @@ | |||
1 | # SPDX-License-Identifier: MIT | ||
2 | kconf hardware hwmon_modules.cfg | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb index 71ac690e..4558101a 100644 --- a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.10-v2024.1.bb | |||
@@ -9,11 +9,3 @@ KCONF_AUDIT_LEVEL="0" | |||
9 | include linux-xlnx.inc | 9 | include linux-xlnx.inc |
10 | 10 | ||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | 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/linux/linux-xlnx_6.6.40-v2024.2.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.40-v2024.2.bb new file mode 100644 index 00000000..e862f747 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_6.6.40-v2024.2.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | LINUX_VERSION = "6.6.40" | ||
2 | YOCTO_META ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=yocto-kmeta" | ||
3 | KBRANCH="xlnx_rebase_v6.6_LTS" | ||
4 | SRCREV = "2b7f6f70a62a52a467bed030a27c2ada879106e9" | ||
5 | SRCREV_meta = "5d0809d0d939c7738cb6e5391126c73fd0e4e865" | ||
6 | |||
7 | KCONF_AUDIT_LEVEL="0" | ||
8 | |||
9 | include linux-xlnx.inc | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc b/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc deleted file mode 100644 index 491f54c3..00000000 --- a/meta-xilinx-core/recipes-kernel/perf/perf-perl.inc +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
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 deleted file mode 100644 index 9164d93a..00000000 --- a/meta-xilinx-core/recipes-kernel/perf/perf.bb +++ /dev/null | |||
@@ -1,414 +0,0 @@ | |||
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 deleted file mode 100755 index 0362f2d8..00000000 --- a/meta-xilinx-core/recipes-kernel/perf/perf/sort-pmuevents.py +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
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/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 deleted file mode 100644 index fac2d719..00000000 --- a/meta-xilinx-core/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
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-utils/mb-realoc/files/mb-realoc b/meta-xilinx-core/recipes-utils/mb-realoc/files/mb-realoc new file mode 100755 index 00000000..158560f1 --- /dev/null +++ b/meta-xilinx-core/recipes-utils/mb-realoc/files/mb-realoc | |||
@@ -0,0 +1,239 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # FILE: | ||
4 | # mb-realoc | ||
5 | # | ||
6 | # DESCRIPTION: | ||
7 | # Takes a fully linked and relocated ELF file, and turns it into an | ||
8 | # executable blob that can be run from any valid memory. The ELF image | ||
9 | # (loadable segments only) is converted to a payload. The blob copies | ||
10 | # the payload to the correct address in memory, and then launches it. | ||
11 | # | ||
12 | # MODIFICATION: | ||
13 | # | ||
14 | # LICENSING: | ||
15 | # Copyright (c) 2013 Xilinx Inc. All rights reserved. | ||
16 | # | ||
17 | |||
18 | |||
19 | # Default values for main variables | ||
20 | BLOB_LOAD_ADDR=0x0 | ||
21 | INFILE="" | ||
22 | BLOBNAME="" | ||
23 | JUMP_OFFSET= | ||
24 | |||
25 | # OTher useful vars | ||
26 | TMP_BINFILE=$$.bin | ||
27 | PAYLOAD_SECTION=.payload | ||
28 | BLOBSTUB=/tmp/blobstub-$$ | ||
29 | |||
30 | function usage { | ||
31 | |||
32 | echo "Generate a PIC executable blob that copies the payload to its linked address and executes it." | ||
33 | # echo "Generate a PIC executable blob that copies the payload to its" | ||
34 | # echo "linked address and executes it. The blob itself may be loaded" | ||
35 | # echo "to any physical address and executed, provided that" | ||
36 | # echo " 1) The payload's linked address is writeable" | ||
37 | # echo " 2) The blob's and payload's addresses don't overlap" | ||
38 | # echo "tGenerates blobname.[srec|elf|bin] files into the working directory" | ||
39 | echo "" | ||
40 | echo "Usage:" | ||
41 | echo " mb-realoc [OPTIONS] -i PAYLOAD.elf -o BLOB_NAME" | ||
42 | echo "" | ||
43 | echo "Required:" | ||
44 | echo " -i, --input PAYLOAD[.elf] the fully relocated ELF file that will be the" | ||
45 | echo " payload." | ||
46 | echo " -o, --output BLOB_NAME basename of the resulting blob files." | ||
47 | echo "" | ||
48 | echo "Optional:" | ||
49 | echo " -h, --help show function usage" | ||
50 | echo " -j, --jump-offset OFFS Offset from load address to jump (auto-detect)" | ||
51 | echo " -l, --load LOAD_ADDR address at which FS-boot will load the stub+payload" | ||
52 | echo "" | ||
53 | } | ||
54 | |||
55 | function parse_args { | ||
56 | |||
57 | args=$(getopt -o "j:hi:l:o:" --long "jump-offset:,help,input:,load:,output" -- "$@") | ||
58 | |||
59 | [ $? -ne 0 ] && usage && exit -1 | ||
60 | |||
61 | eval set -- "${args}" | ||
62 | |||
63 | while true; do | ||
64 | case $1 in | ||
65 | -h | --help) usage; exit 0; ;; | ||
66 | -l | --load) BLOB_LOAD_ADDR=$2; | ||
67 | shift; shift; | ||
68 | ;; | ||
69 | -i | --input) INFILE=$2; | ||
70 | shift; shift; | ||
71 | ;; | ||
72 | -j | --jump-offset) JUMP_OFFSET=$2; | ||
73 | shift; shift; | ||
74 | ;; | ||
75 | -o | --output) BLOBNAME=$2; | ||
76 | shift; shift; | ||
77 | ;; | ||
78 | --) shift; break; ;; | ||
79 | *) usage; exit -1; | ||
80 | ;; | ||
81 | esac | ||
82 | done | ||
83 | |||
84 | [ ! -z "$@" ] && echo "ERROR: Extra parameters: $@" && usage && exit -1 | ||
85 | |||
86 | if [ "${INFILE}" == "" -o "${BLOBNAME}" == "" ]; then | ||
87 | echo "Error: Required parameters not provided" | ||
88 | usage && exit -1 | ||
89 | fi | ||
90 | } | ||
91 | |||
92 | function get_elf_addr_and_size { | ||
93 | |||
94 | # Get load address of payload ELF file | ||
95 | ELF_LMA=0x$(${CROSS_COMPILE}objdump --headers $INFILE | grep -w "\.data" | awk '{print $5}') | ||
96 | |||
97 | # Generate binary image of payload | ||
98 | ${CROSS_COMPILE}objcopy -R .note -R .comment -R .note.gnu.build-id -O binary $INFILE $TMP_BINFILE | ||
99 | |||
100 | # Work out its size | ||
101 | ELF_SIZE=$(${CROSS_COMPILE}size --target binary ${TMP_BINFILE} | grep "${TMP_BINFILE}" | cut -f 4) | ||
102 | |||
103 | } | ||
104 | |||
105 | function get_elf_jump_offset { | ||
106 | entry_point=$(${CROSS_COMPILE}readelf -h ${INFILE} | awk '/Entry point/ {print $4}') | ||
107 | JUMP_OFFSET=$(printf "0x%08x" $((${entry_point} - ${ELF_LMA}))) | ||
108 | } | ||
109 | |||
110 | function create_blobstub:microblaze { | ||
111 | |||
112 | cat > ${BLOBSTUB}.s.in << __eof | ||
113 | /* | ||
114 | // blobstub.s.in | ||
115 | // template for relocatable code blob mechanism | ||
116 | // | ||
117 | // LICENSING: | ||
118 | // Copyright (c) 2013 Xilinx Inc. All rights reserved. | ||
119 | */ | ||
120 | .section .text | ||
121 | |||
122 | .org 0x0 | ||
123 | |||
124 | .globl bootstub | ||
125 | .global _start | ||
126 | .func bootstub | ||
127 | |||
128 | _start: | ||
129 | bootstub: | ||
130 | brlid r5, locator; /* r5 gets address of bootstub */ | ||
131 | nop; | ||
132 | locator: | ||
133 | addi r5, r5, 0x100; /* Shift up to start of payload */ | ||
134 | lwi r6, r5, 0; /* Destination of payload */ | ||
135 | lwi r7, r5, 4; /* Length of payload */ | ||
136 | lwi r9, r5, 8; /* boot offset */ | ||
137 | addi r5, r5, 0xc; /* Start of payload */ | ||
138 | add r4, r6, r0; /* Save payload destination (for jump) */ | ||
139 | |||
140 | addi r7, r7, 0x3; /* Convert length to words */ | ||
141 | srl r7, r7; /* Rounded up */ | ||
142 | srl r7, r7; | ||
143 | |||
144 | or r10, r0, r0; /* Setup r10 for incrementing address offset */ | ||
145 | copyloop: | ||
146 | beqi r7, copy_done; /* Finished copying? */ | ||
147 | lw r8, r5, r10; /* Read word from payload */ | ||
148 | sw r8, r6, r10; /* Write to destination */ | ||
149 | addi r10, r10, 4; /* Increment ptr offset */ | ||
150 | brid copyloop; /* Loop with delay slot */ | ||
151 | addi r7, r7, -1; /* Decrement copy count */ | ||
152 | |||
153 | copy_done: | ||
154 | add r4, r4, r9; /* Apply any boot offset */ | ||
155 | bra r4; /* Launch payload */ | ||
156 | |||
157 | .align 2 | ||
158 | .org 0x100 | ||
159 | payload: | ||
160 | .int @destination@ | ||
161 | .int @bytecount@ | ||
162 | .int @jump_offset@ | ||
163 | |||
164 | .end bootstub | ||
165 | |||
166 | __eof | ||
167 | |||
168 | } | ||
169 | |||
170 | function build_blobstub { | ||
171 | # Substitute address and size of payload into blobstub | ||
172 | # source file | ||
173 | sed -e "s/@destination@/${ELF_LMA}/" \ | ||
174 | -e "s/@bytecount@/${ELF_SIZE}/" \ | ||
175 | -e "s/@jump_offset@/${JUMP_OFFSET}/" ${BLOBSTUB}.s.in > ${BLOBSTUB}.s | ||
176 | |||
177 | # Build the blobstub | ||
178 | ${CROSS_COMPILE}as -o ${BLOBSTUB}.o ${BLOBSTUB}.s | ||
179 | |||
180 | # Remove blobstub assembly file and template | ||
181 | rm ${BLOBSTUB}.s.in | ||
182 | rm ${BLOBSTUB}.s | ||
183 | } | ||
184 | |||
185 | function insert_payload { | ||
186 | |||
187 | # Add the payload in a new section | ||
188 | ${CROSS_COMPILE}objcopy --add-section=${PAYLOAD_SECTION}=${TMP_BINFILE}\ | ||
189 | --adjust-section-vma=${PAYLOAD_SECTION}=0x10C \ | ||
190 | --set-section-flags=${PAYLOAD_SECTION}=alloc,load,data \ | ||
191 | ${BLOBSTUB}.o ${BLOBNAME}.elf | ||
192 | |||
193 | # Remove temporary binary image and blobstub object file | ||
194 | rm ${TMP_BINFILE} | ||
195 | rm ${BLOBSTUB}.o | ||
196 | } | ||
197 | |||
198 | function relocate_blob { | ||
199 | # Relocate the entire package to the desired FS-boot load address | ||
200 | ${CROSS_COMPILE}objcopy --change-addresses=${BLOB_LOAD_ADDR} ${BLOBNAME}.elf | ||
201 | } | ||
202 | |||
203 | function generate_output_files { | ||
204 | ${CROSS_COMPILE}objcopy -O srec ${BLOBNAME}.elf ${BLOBNAME}.srec | ||
205 | ${CROSS_COMPILE}objcopy -O binary ${BLOBNAME}.elf ${BLOBNAME}.bin | ||
206 | } | ||
207 | |||
208 | function xlnx_readelf { | ||
209 | ${CROSS_COMPILE}readelf $@ | ||
210 | } | ||
211 | |||
212 | parse_args "$@" | ||
213 | |||
214 | if [ ! -f $INFILE ]; then | ||
215 | echo "Error: ${INFILE} does not exist" | ||
216 | exit -1; | ||
217 | fi | ||
218 | |||
219 | get_elf_addr_and_size | ||
220 | [ -z "${JUMP_OFFSET}" ] && get_elf_jump_offset | ||
221 | |||
222 | echo "INFO: Payload load address:$ELF_LMA" | ||
223 | echo "INFO: Payload size:$ELF_SIZE" | ||
224 | echo "INFO: Jump offset:$JUMP_OFFSET" | ||
225 | |||
226 | PETALINUX_ARCH=$(xlnx_readelf -e ${INFILE} | grep "Machine:" | awk '{print $2}') | ||
227 | echo "ELF ARCH is ${PETALINUX_ARCH}" | ||
228 | |||
229 | if [ "${PETALINUX_ARCH}" == "Xilinx" ]; then | ||
230 | create_blobstub:microblaze | ||
231 | build_blobstub | ||
232 | insert_payload | ||
233 | relocate_blob | ||
234 | else | ||
235 | echo "Architecture is not Microblaze" | ||
236 | rm ${TMP_BINFILE} | ||
237 | ${CROSS_COMPILE}objcopy $INFILE ${BLOBNAME}.elf | ||
238 | fi | ||
239 | generate_output_files | ||
diff --git a/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb b/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb new file mode 100644 index 00000000..f3b53c25 --- /dev/null +++ b/meta-xilinx-core/recipes-utils/mb-realoc/mb-realoc.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | DESCRIPTION = "mb-realoc" | ||
2 | |||
3 | LICENSE = "CLOSED" | ||
4 | |||
5 | PROVIDES = "virtual/elfrealloc" | ||
6 | |||
7 | inherit deploy | ||
8 | |||
9 | SRC_URI:append = " file://mb-realoc" | ||
10 | |||
11 | PV = "0.1" | ||
12 | |||
13 | ELF_LOAD_ADDR ?= "0" | ||
14 | ELF_JUMP_OFFSET ?= "" | ||
15 | ELF_INFILE ?= "${DEPLOY_DIR_IMAGE}/u-boot.elf" | ||
16 | OUTFILE_NAME ?= "u-boot-s" | ||
17 | B = "${WORKDIR}" | ||
18 | |||
19 | PARALLEL_MAKE="" | ||
20 | |||
21 | do_configure[noexec]="1" | ||
22 | do_compile[depends] = "virtual/bootloader:do_deploy" | ||
23 | |||
24 | do_compile() { | ||
25 | export CROSS_COMPILE="${TARGET_PREFIX}" | ||
26 | ${WORKDIR}/mb-realoc -l ${ELF_LOAD_ADDR} -i ${ELF_INFILE} -o ${OUTFILE_NAME} | ||
27 | } | ||
28 | |||
29 | do_install[noexec] = "1" | ||
30 | |||
31 | do_deploy() { | ||
32 | install -d ${DEPLOYDIR} | ||
33 | install -m 0644 ${WORKDIR}/${OUTFILE_NAME}.bin ${DEPLOYDIR}/${OUTFILE_NAME}.bin | ||
34 | } | ||
35 | |||
36 | addtask deploy after do_compile | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb new file mode 100644 index 00000000..6e280009 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xclbinutil-native_202420.2.18.0.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) - minimal native build for xclbinutil" | ||
2 | DESCRIPTION = "Native build of xclbinutil using XRT codebase" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | FILESEXTRAPATHS:append := ":${THISDIR}/xrt" | ||
7 | |||
8 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
9 | LIC_FILES_CHKSUM = " \ | ||
10 | file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | ||
11 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
12 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
13 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
14 | file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
15 | file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 \ | ||
16 | " | ||
17 | |||
18 | S = "${WORKDIR}/git/src" | ||
19 | |||
20 | inherit cmake pkgconfig native | ||
21 | |||
22 | DEPENDS = "libdrm-native opencl-headers-native ocl-icd-native boost-native rapidjson-native protobuf-native python3-pybind11-native systemtap-native" | ||
23 | |||
24 | EXTRA_OECMAKE += " -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMANDS=ON" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${bindir} | ||
28 | install -Dm 0755 ${WORKDIR}/build/runtime_src/tools/xclbinutil/xclbinutil ${D}${bindir} | ||
29 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt-202420.2.18.0.inc b/meta-xilinx-core/recipes-xrt/xrt/xrt-202420.2.18.0.inc new file mode 100644 index 00000000..27522dd8 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt-202420.2.18.0.inc | |||
@@ -0,0 +1,6 @@ | |||
1 | REPO ?= "gitsm://github.com/Xilinx/XRT.git;protocol=https" | ||
2 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
3 | SRC_URI = "${REPO};${BRANCHARG};name=xrt" | ||
4 | |||
5 | BRANCH = "2024.2" | ||
6 | SRCREV_xrt = "d05b18dc38cc6804ecb4b3dbe6de23f158319567" | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb index cad8ccee..0ee4d137 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202310.2.15.0.bb | |||
@@ -15,6 +15,7 @@ LIC_FILES_CHKSUM = "file://../LICENSE;md5=da5408f748bce8a9851dac18e66f4bcf \ | |||
15 | COMPATIBLE_MACHINE ?= "^$" | 15 | COMPATIBLE_MACHINE ?= "^$" |
16 | COMPATIBLE_MACHINE:zynqmp = ".*" | 16 | COMPATIBLE_MACHINE:zynqmp = ".*" |
17 | COMPATIBLE_MACHINE:versal = ".*" | 17 | COMPATIBLE_MACHINE:versal = ".*" |
18 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
18 | 19 | ||
19 | S = "${WORKDIR}/git/src" | 20 | S = "${WORKDIR}/git/src" |
20 | 21 | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb index 5824ae9c..946b6551 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202320.2.16.0.bb | |||
@@ -16,6 +16,7 @@ LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | |||
16 | COMPATIBLE_MACHINE ?= "^$" | 16 | COMPATIBLE_MACHINE ?= "^$" |
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | 17 | COMPATIBLE_MACHINE:zynqmp = ".*" |
18 | COMPATIBLE_MACHINE:versal = ".*" | 18 | COMPATIBLE_MACHINE:versal = ".*" |
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
19 | 20 | ||
20 | S = "${WORKDIR}/git/src" | 21 | S = "${WORKDIR}/git/src" |
21 | 22 | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb index 7f211e6f..ff058db3 100644 --- a/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202410.2.17.319.bb | |||
@@ -16,6 +16,7 @@ LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | |||
16 | COMPATIBLE_MACHINE ?= "^$" | 16 | COMPATIBLE_MACHINE ?= "^$" |
17 | COMPATIBLE_MACHINE:zynqmp = ".*" | 17 | COMPATIBLE_MACHINE:zynqmp = ".*" |
18 | COMPATIBLE_MACHINE:versal = ".*" | 18 | COMPATIBLE_MACHINE:versal = ".*" |
19 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
19 | 20 | ||
20 | S = "${WORKDIR}/git/src" | 21 | S = "${WORKDIR}/git/src" |
21 | 22 | ||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb new file mode 100644 index 00000000..d538f947 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/xrt_202420.2.18.0.bb | |||
@@ -0,0 +1,60 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) libraries" | ||
2 | DESCRIPTION = "Xilinx Runtime User Space Libraries and headers" | ||
3 | |||
4 | require xrt-${PV}.inc | ||
5 | |||
6 | LICENSE = "GPL-2.0-or-later & Apache-2.0 & MIT" | ||
7 | LIC_FILES_CHKSUM = "file://../LICENSE;md5=de2c993ac479f02575bcbfb14ef9b485 \ | ||
8 | file://runtime_src/core/edge/drm/zocl/LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8 \ | ||
9 | file://runtime_src/core/pcie/driver/linux/xocl/LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://runtime_src/core/pcie/linux/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
11 | file://runtime_src/core/tools/xbutil2/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | ||
12 | file://runtime_src/core/common/elf/LICENSE.txt;md5=b996e8b74af169e7e72e22d9e7d05b06 " | ||
13 | |||
14 | COMPATIBLE_HOST = "^$" | ||
15 | COMPATIBLE_HOST:aarch64 = ".*" | ||
16 | |||
17 | S = "${WORKDIR}/git/src" | ||
18 | |||
19 | inherit cmake pkgconfig | ||
20 | |||
21 | BBCLASSEXTEND = "native nativesdk" | ||
22 | |||
23 | PACKAGECONFIG ??= "aie" | ||
24 | PACKAGECONFIG[aie] = ",,libxaiengine aiefal,libxaiengine aiefal" | ||
25 | |||
26 | # util-linux is for libuuid-dev. | ||
27 | DEPENDS = "libdrm opencl-headers ocl-icd opencl-clhpp boost util-linux git-replacement-native protobuf-native protobuf elfutils libffi rapidjson systemtap libdfx" | ||
28 | RDEPENDS:${PN} = "bash ocl-icd boost-system boost-filesystem zocl (= ${PV})" | ||
29 | |||
30 | EXTRA_OECMAKE += " \ | ||
31 | -DCMAKE_BUILD_TYPE=Release \ | ||
32 | -DCMAKE_EXPORT_COMPILE_COMANDS=ON \ | ||
33 | -DXRT_LIBDFX=true \ | ||
34 | " | ||
35 | |||
36 | EXTRA_OECMAKE .= "${@bb.utils.contains('PACKAGECONFIG', 'aie', ' -DXRT_AIE_BUILD=true', '', d)}" | ||
37 | TARGET_CXXFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'aie', ' -DXRT_ENABLE_AIE -DFAL_LINUX=on', '', d)}" | ||
38 | |||
39 | # Systems with AIE also require libmetal, this is implemented in the dynamic-layers | ||
40 | # See: meta-xilinx-core/dynamic-layers/openamp-layer/recipes-xrt/xrt_gt.bbappend | ||
41 | # Note: If meta-openamp is not available, AIE will not be enabled. | ||
42 | |||
43 | FILES_SOLIBSDEV = "" | ||
44 | FILES:${PN} += "\ | ||
45 | ${libdir}/lib*.so \ | ||
46 | ${libdir}/lib*.so.* \ | ||
47 | ${libdir}/ps_kernels_lib \ | ||
48 | /lib/*.so* \ | ||
49 | ${datadir}" | ||
50 | INSANE_SKIP:${PN} += "dev-so" | ||
51 | |||
52 | pkg_postinst_ontarget:${PN}() { | ||
53 | #!/bin/sh | ||
54 | if [ ! -e /etc/OpenCL/vendors/xilinx.icd ]; then | ||
55 | echo "INFO: Creating ICD entry for Xilinx Platform" | ||
56 | mkdir -p /etc/OpenCL/vendors | ||
57 | echo "libxilinxopencl.so" > /etc/OpenCL/vendors/xilinx.icd | ||
58 | chmod -R 755 /etc/OpenCL | ||
59 | fi | ||
60 | } | ||
diff --git a/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb b/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb new file mode 100644 index 00000000..e5efd89c --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/zocl/zocl_202420.2.18.0.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | SUMMARY = "Xilinx Runtime(XRT) driver module" | ||
2 | DESCRIPTION = "Xilinx Runtime driver module provides memory management and compute unit schedule" | ||
3 | |||
4 | COMPATIBLE_MACHINE:microblaze = "none" | ||
5 | |||
6 | PROVIDES += "zocl" | ||
7 | |||
8 | require recipes-xrt/xrt/xrt-${PV}.inc | ||
9 | |||
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=7d040f51aae6ac6208de74e88a3795f8" | ||
11 | LICENSE = "GPL-2.0-or-later & Apache-2.0" | ||
12 | |||
13 | COMPATIBLE_MACHINE ?= "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = ".*" | ||
15 | COMPATIBLE_MACHINE:versal = ".*" | ||
16 | COMPATIBLE_MACHINE:versal-net = ".*" | ||
17 | |||
18 | S = "${WORKDIR}/git/src/runtime_src/core/edge/drm/zocl" | ||
19 | |||
20 | inherit module | ||
21 | |||
22 | pkg_postinst_ontarget:${PN}() { | ||
23 | #!/bin/sh | ||
24 | echo "Unloading old XRT Linux kernel modules" | ||
25 | ( rmmod zocl || true ) > /dev/null 2>&1 | ||
26 | echo "Loading new XRT Linux kernel modules" | ||
27 | modprobe zocl | ||
28 | } | ||
diff --git a/meta-xilinx-demos/README.md b/meta-xilinx-demos/README.md new file mode 100644 index 00000000..1bbe744a --- /dev/null +++ b/meta-xilinx-demos/README.md | |||
@@ -0,0 +1,64 @@ | |||
1 | # meta-xilinx-demos | ||
2 | |||
3 | This layer contains demos recipes and packagegroup for PL firmware, openamp, | ||
4 | jupyter notebook, ros, qt5, multimedia, sdfec etc for AMD Adaptive SoC's and | ||
5 | FPGA's target images. | ||
6 | |||
7 | > **Note:** Some of the demos recipes and packagegroup are moved from meta-petalinux | ||
8 | > layer to meta-xilinx-demos layer and these packagegroup are renamed. | ||
9 | |||
10 | ## How to enable demos for target image | ||
11 | |||
12 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
13 | |||
14 | 2. Add meta-xilinx-demos to bblayers.conf as shown below. | ||
15 | ``` | ||
16 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-demos | ||
17 | ``` | ||
18 | |||
19 | 3. Add required demos recipes or packagegroup to target image using IMAGE_INSTALL | ||
20 | variable to the end of the conf/local.conf file as shown below. For example | ||
21 | include gpio-demo application. | ||
22 | ``` | ||
23 | IMAGE_INSTALL:append = " gpio-demo" | ||
24 | ``` | ||
25 | |||
26 | 4. Continue [Building Instructions](../README.building.md) from step 5. | ||
27 | |||
28 | ## Dependencies | ||
29 | |||
30 | This layer depends on: | ||
31 | |||
32 | URI: https://git.yoctoproject.org/poky | ||
33 | layers: meta, meta-poky | ||
34 | branch: scarthgap | ||
35 | |||
36 | URI: https://git.openembedded.org/meta-openembedded | ||
37 | layers: meta-oe, meta-perl, meta-python, meta-filesystems, meta-gnome, | ||
38 | meta-multimedia, meta-networking, meta-webserver, meta-xfce, | ||
39 | meta-initramfs. | ||
40 | branch: scarthgap | ||
41 | |||
42 | URI: | ||
43 | https://git.yoctoproject.org/meta-xilinx (official version) | ||
44 | https://github.com/Xilinx/meta-xilinx (development and AMD release) | ||
45 | layers: meta-xilinx-core, meta-xilinx-microblaze, meta-xilinx-bsp, | ||
46 | meta-xilinx-standalone. | ||
47 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) | ||
48 | |||
49 | URI: https://github.com/Xilinx/meta-jupyter | ||
50 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) | ||
51 | |||
52 | URI: https://github.com/OpenAMP/meta-openamp | ||
53 | branch: scarthgap | ||
54 | |||
55 | URI: https://github.com/meta-qt5/meta-qt5 | ||
56 | branch: scarthgap | ||
57 | |||
58 | URI: https://github.com/Xilinx/meta-ros | ||
59 | layers: meta-ros-common, meta-ros2, meta-ros2-jazzy | ||
60 | branch: AMD release version (e.g. rel-v2024.2) | ||
61 | |||
62 | URI: https://git.yoctoproject.org/meta-arm | ||
63 | layers: meta-arm, meta-arm-toolchain | ||
64 | branch: scarthgap | ||
diff --git a/meta-xilinx-demos/classes/jupyter-examples.bbclass b/meta-xilinx-demos/classes/jupyter-examples.bbclass new file mode 100644 index 00000000..962f45b2 --- /dev/null +++ b/meta-xilinx-demos/classes/jupyter-examples.bbclass | |||
@@ -0,0 +1,17 @@ | |||
1 | S = "${WORKDIR}" | ||
2 | |||
3 | FILES:${PN} += "${JUPYTER_DIR}" | ||
4 | |||
5 | RDEPENDS:${PN} ?= "packagegroup-xilinx-jupyter" | ||
6 | |||
7 | JUPYTER_DIR ?= "${datadir}/example-notebooks" | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}/${JUPYTER_DIR}/${PN} | ||
11 | install -m 0755 ${S}/*.ipynb ${D}/${JUPYTER_DIR}/${PN}/ | ||
12 | } | ||
13 | |||
14 | EXCLUDE_FROM_WORLD = "1" | ||
15 | |||
16 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
17 | |||
diff --git a/meta-xilinx-demos/conf/layer.conf b/meta-xilinx-demos/conf/layer.conf new file mode 100644 index 00000000..1f4b6b64 --- /dev/null +++ b/meta-xilinx-demos/conf/layer.conf | |||
@@ -0,0 +1,27 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have a packages directory, add to BBFILES | ||
5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" | ||
6 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bbappend" | ||
7 | |||
8 | BBFILE_COLLECTIONS += "xilinx-demos" | ||
9 | BBFILE_PATTERN_xilinx-demos = "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_xilinx-demos = "5" | ||
11 | |||
12 | LAYERDEPENDS_xilinx-demos = "core" | ||
13 | LAYERRECOMMENDS_xilinx-demos = "openembedded-layer" | ||
14 | |||
15 | LAYERSERIES_COMPAT_xilinx-demos = "scarthgap" | ||
16 | |||
17 | # Define dynamic layers | ||
18 | BBFILES_DYNAMIC += " \ | ||
19 | jupyter-layer:${LAYERDIR}/dynamic-layers/meta-jupyter/recipes-*/*/*.bb \ | ||
20 | jupyter-layer:${LAYERDIR}/dynamic-layers/meta-jupyter/recipes-*/*/*.bbappend \ | ||
21 | openamp-layer:${LAYERDIR}/dynamic-layers/meta-openamp/recipes-*/*/*.bb \ | ||
22 | openamp-layer:${LAYERDIR}/dynamic-layers/meta-openamp/recipes-*/*/*.bbappend \ | ||
23 | ros-common-layer:${LAYERDIR}/dynamic-layers/meta-ros/meta-ros-common/recipes-*/*/*.bb \ | ||
24 | ros-common-layer:${LAYERDIR}/dynamic-layers/meta-ros/meta-ros-common/recipes-*/*/*.bbappend \ | ||
25 | ros-common-layer:${LAYERDIR}/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-*/*/*.bb \ | ||
26 | ros-common-layer:${LAYERDIR}/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-*/*/*.bbappend \ | ||
27 | " | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-core/packagegroups/packagegroup-xilinx-jupyter.bb b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-core/packagegroups/packagegroup-xilinx-jupyter.bb new file mode 100644 index 00000000..efc1b543 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-core/packagegroups/packagegroup-xilinx-jupyter.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | DESCRIPTION = "Required packges for running jupyter notebook with python3 " | ||
2 | |||
3 | inherit packagegroup | ||
4 | |||
5 | JUPYTER_NOTEBOOK_PACKAGES = " \ | ||
6 | packagegroup-python3-jupyter \ | ||
7 | python3-core \ | ||
8 | python3-ipywidgets \ | ||
9 | python3-pydot \ | ||
10 | liberation-fonts \ | ||
11 | ttf-bitstream-vera \ | ||
12 | start-jupyter \ | ||
13 | " | ||
14 | |||
15 | RDEPENDS:${PN} = "${JUPYTER_NOTEBOOK_PACKAGES}" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/files/LICENSE b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/files/LICENSE new file mode 100644 index 00000000..e09f3af7 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/files/LICENSE | |||
@@ -0,0 +1,27 @@ | |||
1 | Copyright (c) 2019, Xilinx | ||
2 | All rights reserved. | ||
3 | |||
4 | Redistribution and use in source and binary forms, with or without | ||
5 | modification, are permitted provided that the following conditions are met: | ||
6 | |||
7 | * Redistributions of source code must retain the above copyright notice, this | ||
8 | list of conditions and the following disclaimer. | ||
9 | |||
10 | * Redistributions in binary form must reproduce the above copyright notice, | ||
11 | this list of conditions and the following disclaimer in the documentation | ||
12 | and/or other materials provided with the distribution. | ||
13 | |||
14 | * Neither the name of the copyright holder nor the names of its | ||
15 | contributors may be used to endorse or promote products derived from | ||
16 | this software without specific prior written permission. | ||
17 | |||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/pm-notebooks_1.0.bb b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/pm-notebooks_1.0.bb new file mode 100644 index 00000000..2c00c316 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-example/pm-notebooks/pm-notebooks_1.0.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | DESCRIPTION = "Jupyter notebook examples for Platform Management (PM) in Versal devices" | ||
2 | LICENSE = "BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://../../LICENSE;md5=268f2517fdae6d70f4ea4c55c4090aa8" | ||
4 | |||
5 | inherit jupyter-examples | ||
6 | |||
7 | SRC_URI = "git://github.com/Xilinx/platform-management-notebooks.git;branch=xlnx_rel_v2023.2;protocol=https \ | ||
8 | file://LICENSE \ | ||
9 | " | ||
10 | |||
11 | SRCREV = "c502be361b6857e21ab903f31c9ead69e3a0d9ba" | ||
12 | |||
13 | S = "${WORKDIR}/git/pm-notebooks" | ||
14 | |||
15 | COMPATIBLE_MACHINE = "^$" | ||
16 | COMPATIBLE_MACHINE:versal = "versal" | ||
17 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
18 | |||
19 | RDEPENDS:${PN} = " \ | ||
20 | packagegroup-xilinx-jupyter \ | ||
21 | python3-ipywidgets \ | ||
22 | python3-pydot \ | ||
23 | graphviz \ | ||
24 | " | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${JUPYTER_DIR}/pm-notebooks | ||
28 | install -d ${D}/${JUPYTER_DIR}/pm-notebooks/pmutil | ||
29 | install -d ${D}/${JUPYTER_DIR}/pm-notebooks/pmutil/data | ||
30 | |||
31 | install -m 0644 ${S}/README ${D}/${JUPYTER_DIR}/pm-notebooks | ||
32 | install -m 0755 ${S}/*.ipynb ${D}/${JUPYTER_DIR}/pm-notebooks | ||
33 | install -m 0755 ${S}/pmutil/*.py ${D}/${JUPYTER_DIR}/pm-notebooks/pmutil | ||
34 | install -m 0755 ${S}/pmutil/data/*.png ${D}/${JUPYTER_DIR}/pm-notebooks/pmutil/data | ||
35 | } | ||
36 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.service b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.service new file mode 100644 index 00000000..8f5c25e6 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=jupyter setup scripts | ||
3 | Requires=network-online.target | ||
4 | After=network-online.target | ||
5 | |||
6 | [Service] | ||
7 | ExecStart=/sbin/start-jupyter.sh | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=default.target | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.sh b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.sh new file mode 100755 index 00000000..f712c8ed --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter-setup.sh | |||
@@ -0,0 +1,119 @@ | |||
1 | #!/bin/sh | ||
2 | #/etc/init.d/jupyterlab-start: start jupyterlab daemon | ||
3 | |||
4 | ### BEGIN INIT INFO | ||
5 | # Provides: jupyter-lab | ||
6 | # Default-Start: 3 5 | ||
7 | # Default-Stop: 0 1 2 6 | ||
8 | # Short-Description: Start Jupyter Lab server as petalinux user | ||
9 | ### END INIT INFO | ||
10 | |||
11 | OWNER="petalinux" | ||
12 | GROUP="petalinux" | ||
13 | HOME=`(cd ~petalinux && pwd) || echo 'none'` | ||
14 | NBDIR="${HOME}/notebooks" | ||
15 | |||
16 | DAEMON_PATH="/sbin/start-jupyter.sh" | ||
17 | DAEMON_NAME=`basename $DAEMON_PATH` | ||
18 | PIDFILE="/var/run/${DAEMON_NAME}.pid" | ||
19 | |||
20 | PATH=/bin:/usr/bin:/sbin:/usr/sbin | ||
21 | |||
22 | . /etc/init.d/functions | ||
23 | |||
24 | wait_for_ip() { | ||
25 | echo -n "Waiting for IP address..." | ||
26 | |||
27 | for i in {1..20} | ||
28 | do | ||
29 | echo -n "." | ||
30 | ip=$(ip -4 addr show eth0 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
31 | [ -n "$ip" ] && break | ||
32 | if [ -d /sys/class/net/eth1 ]; then | ||
33 | ip=$(ip -4 addr show eth1 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
34 | [ -n "$ip" ] && break | ||
35 | fi | ||
36 | sleep 2 | ||
37 | done | ||
38 | |||
39 | if [ -z $ip ]; then | ||
40 | echo " TIMEOUT" | ||
41 | else | ||
42 | echo " SUCCESS" | ||
43 | fi | ||
44 | } | ||
45 | |||
46 | log_begin_msg() { | ||
47 | echo -n $* | ||
48 | } | ||
49 | |||
50 | log_end_msg() { | ||
51 | if [ "$1" = "0" ]; then | ||
52 | echo ' OK' | ||
53 | else | ||
54 | echo ' ERROR' | ||
55 | fi | ||
56 | } | ||
57 | |||
58 | log_daemon_msg() { | ||
59 | echo $* | ||
60 | } | ||
61 | |||
62 | log_progress_msg() { | ||
63 | echo $* | ||
64 | } | ||
65 | |||
66 | test -x $DAEMON_PATH || exit 0 | ||
67 | |||
68 | case "$1" in | ||
69 | start) | ||
70 | log_begin_msg "Starting jupyter-lab server daemon... " | ||
71 | |||
72 | # Various jupter paths are incorrect if this daemon is run as part of the | ||
73 | # init process. Override the directories with these environment variables. | ||
74 | export JUPYTER_CONFIG_DIR="${HOME}/.jupyter" | ||
75 | export JUPYTER_DATA_DIR="${HOME}/.local/share/jupyter" | ||
76 | export JUPYTER_RUNTIME_DIR="${HOME}/.local/share/jupyter/runtime" | ||
77 | export HOME="${HOME}" | ||
78 | |||
79 | # check owner and group are valid | ||
80 | id $OWNER > /dev/null 2>&1 | ||
81 | if [ "$?" = "1" ]; then echo "'$OWNER': no such owner... ERROR" ; exit 1 ; fi | ||
82 | grep $GROUP /etc/group > /dev/null | ||
83 | if [ "$?" = "1" ]; then echo "'$GROUP': no such group... ERROR" ; exit 1 ; fi | ||
84 | |||
85 | # create nb dir if it doesn't exist | ||
86 | if [ ! -d "$NBDIR" ] ; then install -o $OWNER -g $GROUP -d $NBDIR ; fi | ||
87 | |||
88 | # start the daemon | ||
89 | wait_for_ip | ||
90 | start-stop-daemon -S -c $OWNER:$GROUP -m -p $PIDFILE -x $DAEMON_NAME & | ||
91 | log_end_msg $? | ||
92 | ;; | ||
93 | |||
94 | stop) | ||
95 | log_begin_msg "Stopping jupyter-lab server daemon..." | ||
96 | start-stop-daemon -K -q -p $PIDFILE | ||
97 | log_end_msg $? | ||
98 | ;; | ||
99 | |||
100 | restart) | ||
101 | $0 force-reload | ||
102 | ;; | ||
103 | |||
104 | force-reload) | ||
105 | log_daemon_msg "Restarting jupyter-lab server daemon" | ||
106 | $0 stop | ||
107 | $0 start | ||
108 | ;; | ||
109 | |||
110 | status) | ||
111 | status $DAEMON_PATH | ||
112 | ;; | ||
113 | |||
114 | *) | ||
115 | echo "usage: $0 {start|stop|restart|force-reload|status}" | ||
116 | exit 1 | ||
117 | esac | ||
118 | |||
119 | exit 0 | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter_server_config.py b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter_server_config.py new file mode 100644 index 00000000..7cca31e7 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/jupyter_server_config.py | |||
@@ -0,0 +1,5 @@ | |||
1 | c.ServerApp.port = 8888 | ||
2 | c.ServerApp.iopub_data_rate_limit = 100000000 | ||
3 | c.ServerApp.allow_root=True | ||
4 | c.ServerApp.open_browser=False | ||
5 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/overrides.json b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/overrides.json new file mode 100644 index 00000000..3d39e80e --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/overrides.json | |||
@@ -0,0 +1,5 @@ | |||
1 | { | ||
2 | "@jupyterlab/apputils-extension:themes": { | ||
3 | "theme": "JupyterLab Dark" | ||
4 | } | ||
5 | } | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/start-jupyter.sh b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/start-jupyter.sh new file mode 100755 index 00000000..0a8d737a --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab/start-jupyter.sh | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/bin/bash | ||
2 | #******************************************************************************* | ||
3 | # | ||
4 | # Copyright (C) 2019 Xilinx, Inc. All rights reserved. | ||
5 | # | ||
6 | # Permission is hereby granted, free of charge, to any person obtaining | ||
7 | # a copy of this software and associated documentation files (the | ||
8 | # "Software"), to deal in the Software without restriction, including | ||
9 | # without limitation the rights to use, copy, modify, merge, publish, | ||
10 | # distribute, sublicense, and/or sell copies of the Software, and to | ||
11 | # permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
12 | # | ||
13 | # The above copyright notice and this permission notice shall be | ||
14 | # included in all copies or substantial portions of the Software. | ||
15 | # | ||
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
20 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
21 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
22 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
23 | # | ||
24 | #********************************************************************** | ||
25 | |||
26 | ip=$(ip -4 addr show eth0 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
27 | |||
28 | if [ -z "$ip" ] && [ -d /sys/class/net/eth1 ] ; then | ||
29 | ip=$(ip -4 addr show eth1 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
30 | fi | ||
31 | |||
32 | if [ -z $ip ]; then | ||
33 | echo "ERROR: Invalid IP address" | ||
34 | exit 1 | ||
35 | fi | ||
36 | |||
37 | jupyter-lab --no-browser --allow-root --ip=$ip | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab_1.0.bb b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab_1.0.bb new file mode 100644 index 00000000..240e8267 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyterlab/start-jupyterlab_1.0.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | # | ||
2 | # This is the jupyter-lab startup daemon | ||
3 | # | ||
4 | |||
5 | SUMMARY = "Start Jupyter-lab server at system boot" | ||
6 | |||
7 | SRC_URI = " \ | ||
8 | file://jupyter_server_config.py \ | ||
9 | file://jupyter-setup.sh \ | ||
10 | file://jupyter-setup.service \ | ||
11 | file://overrides.json \ | ||
12 | file://start-jupyter.sh \ | ||
13 | " | ||
14 | |||
15 | LICENSE = "MIT" | ||
16 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
17 | |||
18 | JUPYTER_STARTUP_PACKAGES += " \ | ||
19 | python3-jupyterlab \ | ||
20 | bash \ | ||
21 | procps \ | ||
22 | " | ||
23 | |||
24 | RDEPENDS:${PN} = " ${JUPYTER_STARTUP_PACKAGES}" | ||
25 | |||
26 | PROVIDES = "start-jupyter" | ||
27 | RPROVIDES:${PN} = "start-jupyter" | ||
28 | |||
29 | inherit update-rc.d systemd | ||
30 | |||
31 | INITSCRIPT_NAME = "jupyter-setup.sh" | ||
32 | INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ." | ||
33 | |||
34 | SYSTEMD_PACKAGES="${PN}" | ||
35 | SYSTEMD_SERVICE:${PN}="jupyter-setup.service" | ||
36 | SYSTEMD_AUTO_ENABLE:${PN}="disable" | ||
37 | |||
38 | S = "${WORKDIR}" | ||
39 | |||
40 | do_install() { | ||
41 | install -d ${D}${datadir}/jupyter/lab/settings | ||
42 | install -m 0644 ${WORKDIR}/overrides.json ${D}${datadir}/jupyter/lab/settings/ | ||
43 | |||
44 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
45 | install -d ${D}${sysconfdir}/init.d/ | ||
46 | install -m 0755 ${WORKDIR}/jupyter-setup.sh ${D}${sysconfdir}/init.d/jupyter-setup.sh | ||
47 | fi | ||
48 | |||
49 | install -d ${D}${systemd_system_unitdir} | ||
50 | install -m 0644 ${WORKDIR}/jupyter-setup.service ${D}${systemd_system_unitdir} | ||
51 | |||
52 | install -d ${D}${systemd_user_unitdir} | ||
53 | install -m 0644 ${WORKDIR}/jupyter-setup.service ${D}${systemd_user_unitdir} | ||
54 | |||
55 | install -d ${D}${base_sbindir} | ||
56 | install -m 0755 ${WORKDIR}/start-jupyter.sh ${D}${base_sbindir}/start-jupyter.sh | ||
57 | |||
58 | install -d ${D}${sysconfdir}/jupyter/ | ||
59 | install -m 0644 ${WORKDIR}/jupyter_server_config.py ${D}${sysconfdir}/jupyter | ||
60 | } | ||
61 | |||
62 | FILES:${PN} += " \ | ||
63 | ${base_sbindir} \ | ||
64 | ${datadir}/jupyter/lab/settings \ | ||
65 | ${systemd_user_unitdir} \ | ||
66 | " | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.service b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.service new file mode 100644 index 00000000..8f5c25e6 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.service | |||
@@ -0,0 +1,10 @@ | |||
1 | [Unit] | ||
2 | Description=jupyter setup scripts | ||
3 | Requires=network-online.target | ||
4 | After=network-online.target | ||
5 | |||
6 | [Service] | ||
7 | ExecStart=/sbin/start-jupyter.sh | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=default.target | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.sh b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.sh new file mode 100755 index 00000000..7084f8a2 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-setup.sh | |||
@@ -0,0 +1,119 @@ | |||
1 | #!/bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: | ||
4 | # Required-Start: $remote_fs $syslog | ||
5 | # Required-Stop: $remote_fs $syslog | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 0 1 6 | ||
8 | # Short-Description: Start daemon at boot time | ||
9 | # Description: Enable service provided by daemon. | ||
10 | ### END INIT INFO | ||
11 | |||
12 | dir="" | ||
13 | cmd="start-jupyter.sh" | ||
14 | user="" | ||
15 | |||
16 | name="jupyter-setup" | ||
17 | pid_file="/var/run/$name.pid" | ||
18 | stdout_log="/var/log/$name.log" | ||
19 | stderr_log="/var/log/$name.err" | ||
20 | |||
21 | wait_for_ip() { | ||
22 | echo -n "Waiting for IP address..." | ||
23 | |||
24 | for i in {1..20} | ||
25 | do | ||
26 | echo -n "." | ||
27 | ip=$(ip -4 addr show eth0 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
28 | [ -n "$ip" ] && break | ||
29 | if [ -d /sys/class/net/eth1 ]; then | ||
30 | ip=$(ip -4 addr show eth1 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
31 | [ -n "$ip" ] && break | ||
32 | fi | ||
33 | sleep 2 | ||
34 | done | ||
35 | |||
36 | if [ -z $ip ]; then | ||
37 | echo " TIMEOUT" | ||
38 | else | ||
39 | echo " SUCCESS" | ||
40 | fi | ||
41 | } | ||
42 | |||
43 | get_pid() { | ||
44 | cat "$pid_file" | ||
45 | } | ||
46 | |||
47 | is_running() { | ||
48 | [ -f "$pid_file" ] && (ps -o"pid" | grep '^ '`get_pid`'$') > /dev/null 2>&1 | ||
49 | } | ||
50 | |||
51 | case "$1" in | ||
52 | start) | ||
53 | if is_running; then | ||
54 | echo "Already started" | ||
55 | else | ||
56 | echo "Starting $name" | ||
57 | cd "$dir" | ||
58 | wait_for_ip | ||
59 | $cmd & | ||
60 | echo $! > "$pid_file" | ||
61 | if ! is_running; then | ||
62 | echo "Unable to start, see $stdout_log and $stderr_log" | ||
63 | exit 1 | ||
64 | fi | ||
65 | fi | ||
66 | ;; | ||
67 | stop) | ||
68 | if is_running; then | ||
69 | echo -n "Stopping $name.." | ||
70 | kill `get_pid` | ||
71 | for i in 1 2 3 4 5 6 7 8 9 10 | ||
72 | # for i in `seq 10` | ||
73 | do | ||
74 | if ! is_running; then | ||
75 | break | ||
76 | fi | ||
77 | |||
78 | echo -n "." | ||
79 | sleep 1 | ||
80 | done | ||
81 | echo | ||
82 | |||
83 | if is_running; then | ||
84 | echo "Not stopped; may still be shutting down or shutdown may have failed" | ||
85 | exit 1 | ||
86 | else | ||
87 | echo "Stopped" | ||
88 | if [ -f "$pid_file" ]; then | ||
89 | rm "$pid_file" | ||
90 | fi | ||
91 | fi | ||
92 | else | ||
93 | echo "Not running" | ||
94 | fi | ||
95 | ;; | ||
96 | restart) | ||
97 | $0 stop | ||
98 | if is_running; then | ||
99 | echo "Unable to stop, will not attempt to start" | ||
100 | exit 1 | ||
101 | fi | ||
102 | $0 start | ||
103 | ;; | ||
104 | status) | ||
105 | if is_running; then | ||
106 | echo "Running" | ||
107 | else | ||
108 | echo "Stopped" | ||
109 | exit 1 | ||
110 | fi | ||
111 | ;; | ||
112 | *) | ||
113 | echo "Usage: $0 {start|stop|restart|status}" | ||
114 | exit 1 | ||
115 | ;; | ||
116 | esac | ||
117 | |||
118 | exit 0 | ||
119 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-variables.sh b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-variables.sh new file mode 100644 index 00000000..0ab9dc6b --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter-variables.sh | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/bash | ||
2 | export BOARD="PLACEHOLDER" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter_notebook_config.py b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter_notebook_config.py new file mode 100644 index 00000000..1a7a6961 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/jupyter_notebook_config.py | |||
@@ -0,0 +1,5 @@ | |||
1 | c.NotebookApp.notebook_dir = '/usr/share/example-notebooks' | ||
2 | c.NotebookApp.allow_root=True | ||
3 | c.NotebookApp.open_browser=False | ||
4 | |||
5 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/start-jupyter.sh b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/start-jupyter.sh new file mode 100755 index 00000000..3db0ca13 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb/start-jupyter.sh | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/bin/bash | ||
2 | #******************************************************************************* | ||
3 | # | ||
4 | # Copyright (C) 2019 Xilinx, Inc. All rights reserved. | ||
5 | # | ||
6 | # Permission is hereby granted, free of charge, to any person obtaining | ||
7 | # a copy of this software and associated documentation files (the | ||
8 | # "Software"), to deal in the Software without restriction, including | ||
9 | # without limitation the rights to use, copy, modify, merge, publish, | ||
10 | # distribute, sublicense, and/or sell copies of the Software, and to | ||
11 | # permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
12 | # | ||
13 | # The above copyright notice and this permission notice shall be | ||
14 | # included in all copies or substantial portions of the Software. | ||
15 | # | ||
16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
17 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
19 | # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | ||
20 | # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | ||
21 | # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
22 | # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
23 | # | ||
24 | #********************************************************************** | ||
25 | |||
26 | |||
27 | ip=$(ip -4 addr show eth0 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
28 | |||
29 | if [ -z "$ip" ] && [ -d /sys/class/net/eth1 ] ; then | ||
30 | ip=$(ip -4 addr show eth1 | grep -oE "inet ([0-9]{1,3}[\.]){3}[0-9]{1,3}" | cut -d ' ' -f2) | ||
31 | fi | ||
32 | |||
33 | if [ -z $ip ]; then | ||
34 | echo "ERROR: Invalid IP address" | ||
35 | exit 1 | ||
36 | fi | ||
37 | |||
38 | jupyter nbextension enable --py widgetsnbextension | ||
39 | jupyter notebook --no-browser --allow-root --ip=$ip | ||
40 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb_1.0.bb b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb_1.0.bb new file mode 100644 index 00000000..42cae9c5 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-jupyter/recipes-utils/start-jupyternb/start-jupyternb_1.0.bb | |||
@@ -0,0 +1,54 @@ | |||
1 | SUMMARY = "Start Jupyter at system boot" | ||
2 | |||
3 | SRC_URI = " file://start-jupyter.sh \ | ||
4 | file://jupyter-setup.sh \ | ||
5 | file://jupyter_notebook_config.py \ | ||
6 | file://jupyter-setup.service \ | ||
7 | " | ||
8 | |||
9 | LICENSE = "Proprietary" | ||
10 | LIC_FILES_CHKSUM = "file://start-jupyter.sh;beginline=2;endline=24;md5=f29b6e59838b939312f578e77087ada3" | ||
11 | |||
12 | JUPYTER_STARTUP_PACKAGES += " \ | ||
13 | python3-jupyter-core \ | ||
14 | bash \ | ||
15 | " | ||
16 | |||
17 | inherit update-rc.d systemd | ||
18 | PROVIDES = "start-jupyter" | ||
19 | RPROVIDES:${PN} = "start-jupyter" | ||
20 | |||
21 | RDEPENDS:${PN} = " ${JUPYTER_STARTUP_PACKAGES}" | ||
22 | |||
23 | INITSCRIPT_NAME = "jupyter-setup.sh" | ||
24 | INITSCRIPT_PARAMS = "start 99 S ." | ||
25 | |||
26 | SYSTEMD_PACKAGES="${PN}" | ||
27 | SYSTEMD_SERVICE:${PN}="jupyter-setup.service" | ||
28 | SYSTEMD_AUTO_ENABLE:${PN}="disable" | ||
29 | |||
30 | S = "${WORKDIR}" | ||
31 | |||
32 | FILES:${PN} += "${base_sbindir} ${systemd_user_unitdir} ${datadir}" | ||
33 | |||
34 | do_install() { | ||
35 | |||
36 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
37 | install -d ${D}${sysconfdir}/init.d/ | ||
38 | install -m 0755 ${WORKDIR}/jupyter-setup.sh ${D}${sysconfdir}/init.d/jupyter-setup.sh | ||
39 | fi | ||
40 | |||
41 | install -d ${D}${systemd_system_unitdir} | ||
42 | install -m 0644 ${WORKDIR}/jupyter-setup.service ${D}${systemd_system_unitdir} | ||
43 | |||
44 | install -d ${D}${systemd_user_unitdir} | ||
45 | install -m 0644 ${WORKDIR}/jupyter-setup.service ${D}${systemd_user_unitdir} | ||
46 | |||
47 | install -d ${D}${base_sbindir} | ||
48 | install -m 0755 ${WORKDIR}/start-jupyter.sh ${D}${base_sbindir}/start-jupyter.sh | ||
49 | |||
50 | install -d ${D}${sysconfdir}/jupyter/ | ||
51 | install -m 0644 ${WORKDIR}/jupyter_notebook_config.py ${D}${sysconfdir}/jupyter | ||
52 | |||
53 | install -d ${D}${datadir}/example-notebooks | ||
54 | } | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-openamp/recipes-example/openamp/openamp-demo-notebooks_0.1.bb b/meta-xilinx-demos/dynamic-layers/meta-openamp/recipes-example/openamp/openamp-demo-notebooks_0.1.bb new file mode 100644 index 00000000..4c4ff2d8 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-openamp/recipes-example/openamp/openamp-demo-notebooks_0.1.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | DESCRIPTION = "Jupyter notebooks for openAMP" | ||
2 | LICENSE = "BSD-3-Clause" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=268f2517fdae6d70f4ea4c55c4090aa8" | ||
4 | |||
5 | inherit jupyter-examples | ||
6 | |||
7 | REPO ?= "git://github.com/Xilinx/OpenAMP-notebooks.git;protocol=https" | ||
8 | SRCREV ?= "30b76d864261e5dd321fadfaf74b933b7cd88892" | ||
9 | BRANCH ?= "main" | ||
10 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" | ||
11 | SRC_URI = "${REPO};${BRANCHARG}" | ||
12 | PV .= "+git" | ||
13 | S = "${WORKDIR}/git/openamp" | ||
14 | |||
15 | COMPATIBLE_MACHINE = "^$" | ||
16 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
17 | COMPATIBLE_MACHINE:versal = "versal" | ||
18 | COMPATIBLE_MACHINE:versal-net = "versal-net" | ||
19 | |||
20 | DEPENDS += " packagegroup-xilinx-jupyter \ | ||
21 | packagegroup-openamp" | ||
22 | |||
23 | RDEPENDS:${PN} = " packagegroup-xilinx-jupyter \ | ||
24 | packagegroup-openamp" | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}/${JUPYTER_DIR}/openamp-notebooks | ||
28 | install -d ${D}/${JUPYTER_DIR}/openamp-notebooks/pics | ||
29 | |||
30 | install -m 0755 ${S}/*.ipynb ${D}/${JUPYTER_DIR}/openamp-notebooks | ||
31 | install -m 0755 ${S}/pics/*.png ${D}/${JUPYTER_DIR}/openamp-notebooks/pics | ||
32 | } | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-xilinx-ros.bb b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-xilinx-ros.bb new file mode 100644 index 00000000..30237599 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros-common/recipes-core/packagegroups/packagegroup-xilinx-ros.bb | |||
@@ -0,0 +1,167 @@ | |||
1 | DESCRIPTION = "Packages for ROS2 Base and Demos including some basic pub/sub examples" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup | ||
6 | inherit ros_distro_${ROS_DISTRO} | ||
7 | |||
8 | PROVIDES = "${PACKAGES}" | ||
9 | |||
10 | PACKAGES += "${PN}-base ${PN}-demo ${PN}-control" | ||
11 | |||
12 | SUMMARY:${PN}-dev = "ROS packages required for on target development" | ||
13 | ROS_BUILDESSENTIAL_PACKAGES = "\ | ||
14 | ament-lint-auto \ | ||
15 | ament-cmake-auto \ | ||
16 | ament-cmake-core \ | ||
17 | ament-cmake-cppcheck \ | ||
18 | ament-cmake-cpplint \ | ||
19 | ament-cmake-export-definitions \ | ||
20 | ament-cmake-export-dependencies \ | ||
21 | ament-cmake-export-include-directories \ | ||
22 | ament-cmake-export-interfaces \ | ||
23 | ament-cmake-export-libraries \ | ||
24 | ament-cmake-export-link-flags \ | ||
25 | ament-cmake-export-targets \ | ||
26 | ament-cmake-gmock \ | ||
27 | ament-cmake-gtest \ | ||
28 | ament-cmake-include-directories \ | ||
29 | ament-cmake-libraries \ | ||
30 | ament-cmake \ | ||
31 | ament-cmake-pytest \ | ||
32 | ament-cmake-python \ | ||
33 | ament-cmake-ros \ | ||
34 | ament-cmake-target-dependencies \ | ||
35 | ament-cmake-test \ | ||
36 | ament-cmake-version \ | ||
37 | ament-cmake-uncrustify \ | ||
38 | ament-cmake-flake8 \ | ||
39 | ament-cmake-pep257 \ | ||
40 | ament-copyright \ | ||
41 | ament-cpplint \ | ||
42 | ament-flake8 \ | ||
43 | ament-index-python \ | ||
44 | ament-lint-cmake \ | ||
45 | ament-mypy \ | ||
46 | ament-package \ | ||
47 | ament-pclint \ | ||
48 | ament-pep257 \ | ||
49 | ament-pycodestyle \ | ||
50 | ament-pyflakes \ | ||
51 | ament-uncrustify \ | ||
52 | ament-xmllint \ | ||
53 | cmake \ | ||
54 | eigen3-cmake-module \ | ||
55 | fastcdr \ | ||
56 | fastrtps-cmake-module \ | ||
57 | fastrtps \ | ||
58 | foonathan-memory-vendor \ | ||
59 | gmock-vendor \ | ||
60 | gtest-vendor \ | ||
61 | libyaml \ | ||
62 | libyaml-vendor \ | ||
63 | packagegroup-core-buildessential \ | ||
64 | python-cmake-module \ | ||
65 | python3-catkin-pkg \ | ||
66 | python3-colcon-common-extensions \ | ||
67 | python3-empy \ | ||
68 | python3 \ | ||
69 | python3-pytest \ | ||
70 | rcutils \ | ||
71 | rmw-implementation-cmake \ | ||
72 | rosidl-cmake \ | ||
73 | rosidl-default-generators \ | ||
74 | rosidl-generator-c \ | ||
75 | rosidl-generator-cpp \ | ||
76 | rosidl-generator-dds-idl \ | ||
77 | rosidl-generator-py \ | ||
78 | rosidl-parser \ | ||
79 | rosidl-runtime-c \ | ||
80 | rosidl-runtime-cpp \ | ||
81 | rosidl-typesupport-c \ | ||
82 | rosidl-typesupport-cpp \ | ||
83 | rosidl-typesupport-fastrtps-cpp \ | ||
84 | rosidl-typesupport-interface \ | ||
85 | rosidl-typesupport-introspection-c \ | ||
86 | rosidl-typesupport-introspection-cpp \ | ||
87 | " | ||
88 | |||
89 | SUMMARY:${PN}-base = "ROS_BASE_PACKAGES includes ROS base packages" | ||
90 | ROS_BASE_PACKAGES = "\ | ||
91 | ros-base \ | ||
92 | cyclonedds \ | ||
93 | rmw-cyclonedds-cpp \ | ||
94 | tmux \ | ||
95 | python3-argcomplete \ | ||
96 | glibc-utils \ | ||
97 | localedef \ | ||
98 | rt-tests \ | ||
99 | stress \ | ||
100 | xrt-dev \ | ||
101 | xrt \ | ||
102 | kernel-module-zocl \ | ||
103 | opencl-headers-dev \ | ||
104 | opencl-clhpp-dev \ | ||
105 | " | ||
106 | |||
107 | SUMMARY:${PN}-demo = "ROS_DEMO_PACKAGES includes ROS examples demos packages" | ||
108 | ROS_DEMO_PACKAGES = "\ | ||
109 | examples-rclcpp-minimal-action-client \ | ||
110 | examples-rclcpp-minimal-action-server \ | ||
111 | examples-rclcpp-minimal-client \ | ||
112 | examples-rclcpp-minimal-composition \ | ||
113 | examples-rclcpp-minimal-publisher \ | ||
114 | examples-rclcpp-minimal-service \ | ||
115 | examples-rclcpp-minimal-subscriber \ | ||
116 | examples-rclcpp-minimal-timer \ | ||
117 | examples-rclcpp-multithreaded-executor \ | ||
118 | examples-rclpy-executors \ | ||
119 | examples-rclpy-minimal-action-server \ | ||
120 | examples-rclpy-minimal-client \ | ||
121 | examples-rclpy-minimal-publisher \ | ||
122 | examples-rclpy-minimal-service \ | ||
123 | examples-rclpy-minimal-subscriber \ | ||
124 | demo-nodes-cpp \ | ||
125 | demo-nodes-cpp-rosnative \ | ||
126 | " | ||
127 | |||
128 | SUMMARY:${PN}-control = "ROS_CONTROL_PACKAGES includes ROS control packages" | ||
129 | ROS_CONTROL_PACKAGES = "\ | ||
130 | controller-interface \ | ||
131 | controller-manager \ | ||
132 | controller-manager-msgs \ | ||
133 | hardware-interface \ | ||
134 | ros2-control \ | ||
135 | ros2controlcli \ | ||
136 | ros2-control-test-assets \ | ||
137 | transmission-interface \ | ||
138 | " | ||
139 | |||
140 | RDEPENDS:${PN}-base:aarch64 = "\ | ||
141 | ${ROS_BASE_PACKAGES} \ | ||
142 | " | ||
143 | |||
144 | RDEPENDS:${PN}-demo:aarch64 = "\ | ||
145 | ${ROS_BASE_PACKAGES} \ | ||
146 | ${ROS_DEMO_PACKAGES} \ | ||
147 | " | ||
148 | |||
149 | #RDEPENDS:${PN}-control:aarch64 = "\ | ||
150 | # ${ROS_BASE_PACKAGES} \ | ||
151 | # ${ROS_CONTROL_PACKAGES} \ | ||
152 | #" | ||
153 | |||
154 | RDEPENDS:${PN}-dev:aarch64 = "\ | ||
155 | ${ROS_BUILDESSENTIAL_PACKAGES} \ | ||
156 | " | ||
157 | |||
158 | # TODO | ||
159 | # 1. Due to failing hardware-interfaces disable ${PN}-control | ||
160 | |||
161 | RDEPENDS:${PN}:aarch64 = "\ | ||
162 | ${PN}-demo \ | ||
163 | rqt-runtime-monitor \ | ||
164 | " | ||
165 | |||
166 | IMAGE_LINGUAS = "en-us" | ||
167 | GLIBC_GENERATE_LOCALES = "en_US.UTF-8" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/ament-lint/ament-flake8_0.17.0-2.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/ament-lint/ament-flake8_0.17.0-2.bbappend new file mode 100644 index 00000000..c22346fa --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/ament-lint/ament-flake8_0.17.0-2.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | # Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. | ||
2 | |||
3 | ROS_EXEC_DEPENDS:remove = " \ | ||
4 | python3-flake8-builtins \ | ||
5 | python3-flake8-comprehensions \ | ||
6 | python3-flake8-docstrings \ | ||
7 | python3-flake8-import-order \ | ||
8 | python3-flake8-quotes \ | ||
9 | " \ No newline at end of file | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/common-interfaces/sensor-msgs-py_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/common-interfaces/sensor-msgs-py_%.bbappend new file mode 100644 index 00000000..5c360dbe --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/common-interfaces/sensor-msgs-py_%.bbappend | |||
@@ -0,0 +1 @@ | |||
LICENSE = "BSD-3-Clause" | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/orocos-kdl-vendor/orocos-kdl-vendor_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/orocos-kdl-vendor/orocos-kdl-vendor_%.bbappend new file mode 100644 index 00000000..35f4207f --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/orocos-kdl-vendor/orocos-kdl-vendor_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | SRC_URI:remove = "file://0001-CMakeLists.txt-fetch-orocos-kdl-with-bitbake-fetcher.patch" | ||
2 | SRCREV_release:forcevariable = "adca6201616af928533d70faea6042fe0239e898" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/liblz4-vendor_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/liblz4-vendor_%.bbappend new file mode 100644 index 00000000..f5378ca6 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/liblz4-vendor_%.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | LICENSE = "Apache-2.0 & BSD-3-Clause & GPL-2.0-only" | ||
2 | ROS_EXEC_DEPENDS:remove = "${ROS_UNRESOLVED_DEP-liblz4}" | ||
3 | DEPENDS:remove = "${ROS_UNRESOLVED_DEP-liblz4-dev}" | ||
4 | INSANE_SKIP:${PN} += "dev-so" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor/0001-fix-include-dir.patch b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor/0001-fix-include-dir.patch new file mode 100644 index 00000000..35650c23 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor/0001-fix-include-dir.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From f15236807f0b5ac96979840a12cd0be0c115f055 Mon Sep 17 00:00:00 2001 | ||
2 | From: Trevor Woerner <trevor.woerner@amd.com> | ||
3 | Date: Thu, 12 Sep 2024 15:21:33 -0400 | ||
4 | Subject: [PATCH] fix include dir | ||
5 | |||
6 | Upstream-Status: inappropriate | ||
7 | Signed-off-by: Trevor Woerner <trevor.woerner@amd.com> | ||
8 | --- | ||
9 | CMakeLists.txt | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index d5789b292025..e5e97fa9fa0f 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -43,7 +43,7 @@ macro(build_mcap_vendor) | ||
17 | src/main.cpp | ||
18 | ) | ||
19 | |||
20 | - set(_mcap_include_dir ${mcap_SOURCE_DIR}/cpp/mcap/include) | ||
21 | + set(_mcap_include_dir ${mcap_vendor_SOURCE_DIR}/mcap/cpp/mcap/include) | ||
22 | file(GLOB _mcap_installed_headers ${_mcap_include_dir}/mcap/*.hpp) | ||
23 | |||
24 | target_include_directories(mcap PUBLIC | ||
25 | -- | ||
26 | 2.44.0.478.g7774cfed6261 | ||
27 | |||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor_%.bbappend new file mode 100644 index 00000000..dc63cf76 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/mcap-vendor_%.bbappend | |||
@@ -0,0 +1,6 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | B = "${S}" | ||
4 | SRC_URI:remove = "file://0001-CMakeLists.txt-fetch-dependencies-with-bitbake-fetch.patch" | ||
5 | SRC_URI:append = " file://0001-fix-include-dir.patch" | ||
6 | SRCREV_release:forcevariable = "6884e7ba7d29d8db98ad2bbf09a6875bf5141e19" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/rosbag2-compression-zstd_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/rosbag2-compression-zstd_%.bbappend new file mode 100644 index 00000000..b99de447 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/rosbag2-compression-zstd_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | SRC_URI:remove = "file://0001-CMakeLists.txt-drop-dependency-on-zstd_vendor.patch" | ||
2 | SRCREV = "3f3c01609c3bef74cfc3f3229b0d57964c6bd465" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/shared-queues-vendor_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/shared-queues-vendor_%.bbappend new file mode 100644 index 00000000..69b50386 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/rosbag2/shared-queues-vendor_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | SRC_URI:remove = "file://0001-CMakeLists.txt-fetch-readerwriterqueue-and-concurren.patch" | ||
2 | SRCREV_release:forcevariable = "fea3a738733673c927d77631a735157993ff6395" | ||
diff --git a/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/yaml-cpp-vendor/yaml-cpp-vendor_%.bbappend b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/yaml-cpp-vendor/yaml-cpp-vendor_%.bbappend new file mode 100644 index 00000000..33e2a0c7 --- /dev/null +++ b/meta-xilinx-demos/dynamic-layers/meta-ros/meta-ros2-jazzy/recipes-bbappends/yaml-cpp-vendor/yaml-cpp-vendor_%.bbappend | |||
@@ -0,0 +1 @@ | |||
INSANE_SKIP:${PN} += "dev-so" | |||
diff --git a/meta-xilinx-demos/recipes-apps/sdfec/sdfec_1.1.bb b/meta-xilinx-demos/recipes-apps/sdfec/sdfec_1.1.bb new file mode 100644 index 00000000..ac8303aa --- /dev/null +++ b/meta-xilinx-demos/recipes-apps/sdfec/sdfec_1.1.bb | |||
@@ -0,0 +1,36 @@ | |||
1 | # | ||
2 | # This file is the sdfec recipe. | ||
3 | # | ||
4 | |||
5 | SUMMARY = "sdfec applications" | ||
6 | |||
7 | LICENSE = "MIT" | ||
8 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
9 | |||
10 | SRC_URI = "git://github.com/Xilinx/linux-examples.git;protocol=https;branch=xlnx_rel_v2024.1" | ||
11 | SRCREV = "84b31cb194325640a631380ed8bfc1db21bab883" | ||
12 | |||
13 | inherit features_check | ||
14 | |||
15 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
16 | |||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
18 | |||
19 | S = "${WORKDIR}/git/sd-fec-1.1" | ||
20 | |||
21 | DEPENDS += "libgpiod" | ||
22 | |||
23 | TARGETS_APPS ?= "sdfec-demo sdfec-interrupts sdfec-multi-ldpc-codes" | ||
24 | |||
25 | do_compile() { | ||
26 | for app_name in ${TARGETS_APPS}; do | ||
27 | oe_runmake -C ${S}/$app_name/files | ||
28 | done | ||
29 | } | ||
30 | |||
31 | do_install() { | ||
32 | install -d ${D}${bindir} | ||
33 | for app_name in ${TARGETS_APPS}; do | ||
34 | install -m 0755 ${S}/$app_name/files/$app_name ${D}${bindir} | ||
35 | done | ||
36 | } | ||
diff --git a/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-matchbox.bb b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-matchbox.bb new file mode 100644 index 00000000..334f646e --- /dev/null +++ b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-matchbox.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | DESCRIPTION = "Matchbox related packages" | ||
2 | |||
3 | inherit packagegroup features_check | ||
4 | |||
5 | REQUIRED_DISTRO_FEATURES = "x11" | ||
6 | |||
7 | FILEMANAGER ?= "pcmanfm" | ||
8 | |||
9 | MATCHBOX_PACKAGES = " \ | ||
10 | matchbox-config-gtk \ | ||
11 | matchbox-desktop \ | ||
12 | matchbox-keyboard \ | ||
13 | matchbox-keyboard-applet \ | ||
14 | matchbox-panel-2 \ | ||
15 | matchbox-session \ | ||
16 | matchbox-terminal \ | ||
17 | matchbox-theme-sato \ | ||
18 | matchbox-session-sato \ | ||
19 | matchbox-wm \ | ||
20 | settings-daemon \ | ||
21 | adwaita-icon-theme \ | ||
22 | l3afpad \ | ||
23 | ${FILEMANAGER} \ | ||
24 | shutdown-desktop \ | ||
25 | ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)} \ | ||
26 | " | ||
27 | |||
28 | RDEPENDS:${PN} = "packagegroup-core-x11 ${MATCHBOX_PACKAGES}" | ||
diff --git a/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-multimedia.bb b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-multimedia.bb new file mode 100644 index 00000000..fcebff04 --- /dev/null +++ b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-multimedia.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | DESCRIPTION = "Packages for out of box multimedia experience" | ||
2 | |||
3 | # Can not be all arch due to libdrm | ||
4 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
5 | |||
6 | inherit packagegroup features_check | ||
7 | |||
8 | REQUIRED_DISTRO_FEATURES = "x11" | ||
9 | |||
10 | MULTIMEDIA_PACKAGES = " \ | ||
11 | packagegroup-xilinx-gstreamer \ | ||
12 | packagegroup-xilinx-matchbox \ | ||
13 | packagegroup-core-x11 \ | ||
14 | libdrm \ | ||
15 | libdrm-tests \ | ||
16 | packagegroup-xilinx-qt \ | ||
17 | ffmpeg \ | ||
18 | " | ||
19 | |||
20 | RDEPENDS:${PN} = "${MULTIMEDIA_PACKAGES}" | ||
diff --git a/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-qt.bb b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-qt.bb new file mode 100644 index 00000000..6b795c08 --- /dev/null +++ b/meta-xilinx-demos/recipes-core/packagegroups/packagegroup-xilinx-qt.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | DESCRIPTION = "Qt packages" | ||
2 | |||
3 | # Workaround for DISTRO_FEATURES wayland only set on 64-bit ARM machines | ||
4 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
5 | |||
6 | inherit packagegroup features_check | ||
7 | |||
8 | PACKAGES = "${PN} ${PN}-extended" | ||
9 | PROVIDES = "${PACKAGES}" | ||
10 | |||
11 | ANY_OF_DISTRO_FEATURES = "x11 fbdev wayland" | ||
12 | |||
13 | QT_PACKAGES = " \ | ||
14 | qtbase \ | ||
15 | qtbase-plugins \ | ||
16 | qtbase-examples \ | ||
17 | qtquickcontrols-qmlplugins \ | ||
18 | qtcharts \ | ||
19 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'qtwayland', '', d)} \ | ||
20 | " | ||
21 | RDEPENDS:${PN} = "${QT_PACKAGES}" | ||
22 | |||
23 | QT_EXTENDED_PACKAGES = " \ | ||
24 | ruby \ | ||
25 | qtbase-mkspecs \ | ||
26 | qtbase-plugins \ | ||
27 | qtsystems-mkspecs \ | ||
28 | qttranslations-qtbase \ | ||
29 | qttranslations-qthelp \ | ||
30 | qtconnectivity-mkspecs \ | ||
31 | qttranslations-qtconnectivity \ | ||
32 | qtdeclarative-mkspecs \ | ||
33 | qttranslations-qtdeclarative \ | ||
34 | qtimageformats-plugins \ | ||
35 | qtlocation-mkspecs \ | ||
36 | qtlocation-plugins \ | ||
37 | qttranslations-qtmultimedia \ | ||
38 | qtscript-mkspecs \ | ||
39 | qttranslations-qtscript \ | ||
40 | qtsensors-mkspecs \ | ||
41 | qtsensors-plugins \ | ||
42 | qtserialport-mkspecs \ | ||
43 | qtsvg-mkspecs \ | ||
44 | qtsvg-plugins \ | ||
45 | qtwebsockets-mkspecs \ | ||
46 | qttranslations-qtwebsockets \ | ||
47 | qtwebchannel-mkspecs \ | ||
48 | qtxmlpatterns-mkspecs \ | ||
49 | qttranslations-qtxmlpatterns \ | ||
50 | qtwebkit-mkspecs \ | ||
51 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'qtx11extras', '', d)} \ | ||
52 | qtgraphicaleffects-qmlplugins \ | ||
53 | " | ||
54 | |||
55 | RDEPENDS:${PN}-extended = "${QT_PACKAGES} ${QT_EXTENDED_PACKAGES}" | ||
diff --git a/meta-xilinx-demos/recipes-examples/gpio-demo/files/Makefile b/meta-xilinx-demos/recipes-examples/gpio-demo/files/Makefile new file mode 100644 index 00000000..9106be1b --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/gpio-demo/files/Makefile | |||
@@ -0,0 +1,14 @@ | |||
1 | APP = gpio-demo | ||
2 | |||
3 | # Add any other object files to this list below | ||
4 | APP_OBJS = gpio-demo.o | ||
5 | |||
6 | all: $(APP) | ||
7 | |||
8 | $(APP): $(APP_OBJS) | ||
9 | $(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS) | ||
10 | |||
11 | clean: | ||
12 | -rm -f $(APP) *.elf *.gdb *.o | ||
13 | |||
14 | |||
diff --git a/meta-xilinx-demos/recipes-examples/gpio-demo/files/gpio-demo.c b/meta-xilinx-demos/recipes-examples/gpio-demo/files/gpio-demo.c new file mode 100644 index 00000000..4e17779d --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/gpio-demo/files/gpio-demo.c | |||
@@ -0,0 +1,355 @@ | |||
1 | /* | ||
2 | * | ||
3 | * gpio-demo app | ||
4 | * | ||
5 | * Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. | ||
6 | * | ||
7 | * Permission is hereby granted, free of charge, to any person | ||
8 | * obtaining a copy of this software and associated documentation | ||
9 | * files (the "Software"), to deal in the Software without restriction, | ||
10 | * including without limitation the rights to use, copy, modify, merge, | ||
11 | * publish, distribute, sublicense, and/or sell copies of the Software, | ||
12 | * and to permit persons to whom the Software is furnished to do so, | ||
13 | * subject to the following conditions: | ||
14 | * | ||
15 | * The above copyright notice and this permission notice shall be included | ||
16 | * in all copies or substantial portions of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
21 | * IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
24 | * | ||
25 | * Except as contained in this notice, the name of the Xilinx shall not be used | ||
26 | * in advertising or otherwise to promote the sale, use or other dealings in this | ||
27 | * Software without prior written authorization from Xilinx. | ||
28 | * | ||
29 | */ | ||
30 | |||
31 | #include <stdio.h> | ||
32 | #include <stdlib.h> | ||
33 | #include <unistd.h> | ||
34 | #include <string.h> | ||
35 | #include <errno.h> | ||
36 | #include <fcntl.h> | ||
37 | #include <signal.h> | ||
38 | |||
39 | #define GPIO_ROOT "/sys/class/gpio" | ||
40 | #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) | ||
41 | |||
42 | static enum {NONE, IN, OUT, CYLON, KIT} gpio_opt = NONE; | ||
43 | |||
44 | static const unsigned long cylon[] = { | ||
45 | 0x00000080, 0x00000040, 0x00000020, 0x00000010, | ||
46 | 0x00000008, 0x00000004, 0x00000002, 0x00000001, | ||
47 | 0x00000002, 0x00000004, 0x00000008, | ||
48 | 0x00000010, 0x00000020, 0x00000040, 0x00000080, | ||
49 | }; | ||
50 | |||
51 | static const unsigned long kit[] = { | ||
52 | 0x000000e0, 0x00000070, 0x00000038, 0x0000001c, | ||
53 | 0x0000000e, 0x00000007, 0x00000003, 0x00000001, | ||
54 | 0x00000003, 0x00000007, 0x0000000e, | ||
55 | 0x0000001c, 0x00000038, 0x00000070, 0x000000e0, | ||
56 | }; | ||
57 | |||
58 | static int gl_gpio_base = 0; | ||
59 | |||
60 | static void usage (char *argv0) | ||
61 | { | ||
62 | char *basename = strrchr(argv0, '/'); | ||
63 | if (!basename) | ||
64 | basename = argv0; | ||
65 | |||
66 | fprintf(stderr, | ||
67 | "Usage: %s [-g GPIO_BASE] COMMAND\n" | ||
68 | "\twhere COMMAND is one of:\n" | ||
69 | "\t\t-i\t\tInput value from GPIO and print it\n" | ||
70 | "\t\t-o\tVALUE\tOutput value to GPIO\n" | ||
71 | "\t\t-c\t\tCylon test pattern\n" | ||
72 | "\t\t-k\t\t KIT test pattern\n" | ||
73 | "\tGPIO_BASE indicates which GPIO chip to talk to (The number can be \n" | ||
74 | "\tfound at /sys/class/gpio/gpiochipN).\n" | ||
75 | "\tThe highest gpiochipN is the first gpio listed in the dts file, \n" | ||
76 | "\tand the lowest gpiochipN is the last gpio listed in the dts file.\n" | ||
77 | "\tE.g.If the gpiochip240 is the LED_8bit gpio, and I want to output '1' \n" | ||
78 | "\tto the LED_8bit gpio, the command should be:\n" | ||
79 | "\t\tgpio-demo -g 240 -o 1\n" | ||
80 | "\n" | ||
81 | "\tgpio-demo written by Xilinx Inc.\n" | ||
82 | "\n" | ||
83 | , basename); | ||
84 | exit(-2); | ||
85 | } | ||
86 | |||
87 | static int open_gpio_channel(int gpio_base) | ||
88 | { | ||
89 | char gpio_nchan_file[128]; | ||
90 | int gpio_nchan_fd; | ||
91 | int gpio_max; | ||
92 | int nchannel; | ||
93 | char nchannel_str[5]; | ||
94 | char *cptr; | ||
95 | int c; | ||
96 | char channel_str[5]; | ||
97 | |||
98 | char *gpio_export_file = "/sys/class/gpio/export"; | ||
99 | int export_fd=0; | ||
100 | |||
101 | /* Check how many channels the GPIO chip has */ | ||
102 | sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base); | ||
103 | gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY); | ||
104 | if (gpio_nchan_fd < 0) { | ||
105 | fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno)); | ||
106 | return -1; | ||
107 | } | ||
108 | read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str)); | ||
109 | close(gpio_nchan_fd); | ||
110 | nchannel=(int)strtoul(nchannel_str, &cptr, 0); | ||
111 | if (cptr == nchannel_str) { | ||
112 | fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str); | ||
113 | exit(1); | ||
114 | } | ||
115 | |||
116 | /* Open files for each GPIO channel */ | ||
117 | export_fd=open(gpio_export_file, O_WRONLY); | ||
118 | if (export_fd < 0) { | ||
119 | fprintf(stderr, "Cannot open GPIO to export %d\n", gpio_base); | ||
120 | return -1; | ||
121 | } | ||
122 | |||
123 | gpio_max = gpio_base + nchannel; | ||
124 | for(c = gpio_base; c < gpio_max; c++) { | ||
125 | sprintf(channel_str, "%d", c); | ||
126 | write(export_fd, channel_str, (strlen(channel_str)+1)); | ||
127 | } | ||
128 | close(export_fd); | ||
129 | return nchannel; | ||
130 | } | ||
131 | |||
132 | static int close_gpio_channel(int gpio_base) | ||
133 | { | ||
134 | char gpio_nchan_file[128]; | ||
135 | int gpio_nchan_fd; | ||
136 | int gpio_max; | ||
137 | int nchannel; | ||
138 | char nchannel_str[5]; | ||
139 | char *cptr; | ||
140 | int c; | ||
141 | char channel_str[5]; | ||
142 | |||
143 | char *gpio_unexport_file = "/sys/class/gpio/unexport"; | ||
144 | int unexport_fd=0; | ||
145 | |||
146 | /* Check how many channels the GPIO chip has */ | ||
147 | sprintf(gpio_nchan_file, "%s/gpiochip%d/ngpio", GPIO_ROOT, gpio_base); | ||
148 | gpio_nchan_fd = open(gpio_nchan_file, O_RDONLY); | ||
149 | if (gpio_nchan_fd < 0) { | ||
150 | fprintf(stderr, "Failed to open %s: %s\n", gpio_nchan_file, strerror(errno)); | ||
151 | return -1; | ||
152 | } | ||
153 | read(gpio_nchan_fd, nchannel_str, sizeof(nchannel_str)); | ||
154 | close(gpio_nchan_fd); | ||
155 | nchannel=(int)strtoul(nchannel_str, &cptr, 0); | ||
156 | if (cptr == nchannel_str) { | ||
157 | fprintf(stderr, "Failed to change %s into GPIO channel number\n", nchannel_str); | ||
158 | exit(1); | ||
159 | } | ||
160 | |||
161 | /* Close opened files for each GPIO channel */ | ||
162 | unexport_fd=open(gpio_unexport_file, O_WRONLY); | ||
163 | if (unexport_fd < 0) { | ||
164 | fprintf(stderr, "Cannot close GPIO by writing unexport %d\n", gpio_base); | ||
165 | return -1; | ||
166 | } | ||
167 | |||
168 | gpio_max = gpio_base + nchannel; | ||
169 | for(c = gpio_base; c < gpio_max; c++) { | ||
170 | sprintf(channel_str, "%d", c); | ||
171 | write(unexport_fd, channel_str, (strlen(channel_str)+1)); | ||
172 | } | ||
173 | close(unexport_fd); | ||
174 | return 0; | ||
175 | } | ||
176 | |||
177 | static int set_gpio_direction(int gpio_base, int nchannel, char *direction) | ||
178 | { | ||
179 | char gpio_dir_file[128]; | ||
180 | int direction_fd=0; | ||
181 | int gpio_max; | ||
182 | int c; | ||
183 | |||
184 | gpio_max = gpio_base + nchannel; | ||
185 | for(c = gpio_base; c < gpio_max; c++) { | ||
186 | sprintf(gpio_dir_file, "/sys/class/gpio/gpio%d/direction",c); | ||
187 | direction_fd=open(gpio_dir_file, O_RDWR); | ||
188 | if (direction_fd < 0) { | ||
189 | fprintf(stderr, "Cannot open the direction file for GPIO %d\n", c); | ||
190 | return 1; | ||
191 | } | ||
192 | write(direction_fd, direction, (strlen(direction)+1)); | ||
193 | close(direction_fd); | ||
194 | } | ||
195 | return 0; | ||
196 | } | ||
197 | |||
198 | static int set_gpio_value(int gpio_base, int nchannel, int value) | ||
199 | { | ||
200 | char gpio_val_file[128]; | ||
201 | int val_fd=0; | ||
202 | int gpio_max; | ||
203 | char val_str[2]; | ||
204 | int c; | ||
205 | |||
206 | gpio_max = gpio_base + nchannel; | ||
207 | |||
208 | for(c = gpio_base; c < gpio_max; c++) { | ||
209 | sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c); | ||
210 | val_fd=open(gpio_val_file, O_RDWR); | ||
211 | if (val_fd < 0) { | ||
212 | fprintf(stderr, "Cannot open the value file of GPIO %d\n", c); | ||
213 | return -1; | ||
214 | } | ||
215 | sprintf(val_str,"%d", (value & 1)); | ||
216 | write(val_fd, val_str, sizeof(val_str)); | ||
217 | close(val_fd); | ||
218 | value >>= 1; | ||
219 | } | ||
220 | return 0; | ||
221 | } | ||
222 | |||
223 | static int get_gpio_value(int gpio_base, int nchannel) | ||
224 | { | ||
225 | char gpio_val_file[128]; | ||
226 | int val_fd=0; | ||
227 | int gpio_max; | ||
228 | char val_str[2]; | ||
229 | char *cptr; | ||
230 | int value = 0; | ||
231 | int c; | ||
232 | |||
233 | gpio_max = gpio_base + nchannel; | ||
234 | |||
235 | for(c = gpio_max-1; c >= gpio_base; c--) { | ||
236 | sprintf(gpio_val_file, "/sys/class/gpio/gpio%d/value",c); | ||
237 | val_fd=open(gpio_val_file, O_RDWR); | ||
238 | if (val_fd < 0) { | ||
239 | fprintf(stderr, "Cannot open GPIO to export %d\n", c); | ||
240 | return -1; | ||
241 | } | ||
242 | read(val_fd, val_str, sizeof(val_str)); | ||
243 | value <<= 1; | ||
244 | value += (int)strtoul(val_str, &cptr, 0); | ||
245 | if (cptr == optarg) { | ||
246 | fprintf(stderr, "Failed to change %s into integer", val_str); | ||
247 | } | ||
248 | close(val_fd); | ||
249 | } | ||
250 | return value; | ||
251 | } | ||
252 | |||
253 | void signal_handler(int sig) | ||
254 | { | ||
255 | switch (sig) { | ||
256 | case SIGTERM: | ||
257 | case SIGHUP: | ||
258 | case SIGQUIT: | ||
259 | case SIGINT: | ||
260 | close_gpio_channel(gl_gpio_base); | ||
261 | exit(0) ; | ||
262 | default: | ||
263 | break; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | int main(int argc, char *argv[]) | ||
268 | { | ||
269 | extern char *optarg; | ||
270 | char *cptr; | ||
271 | int gpio_value = 0; | ||
272 | int nchannel = 0; | ||
273 | |||
274 | int c; | ||
275 | int i; | ||
276 | |||
277 | opterr = 0; | ||
278 | |||
279 | while ((c = getopt(argc, argv, "g:io:ck")) != -1) { | ||
280 | switch (c) { | ||
281 | case 'g': | ||
282 | gl_gpio_base = (int)strtoul(optarg, &cptr, 0); | ||
283 | if (cptr == optarg) | ||
284 | usage(argv[0]); | ||
285 | break; | ||
286 | case 'i': | ||
287 | gpio_opt = IN; | ||
288 | break; | ||
289 | case 'o': | ||
290 | gpio_opt = OUT; | ||
291 | gpio_value = (int)strtoul(optarg, &cptr, 0); | ||
292 | if (cptr == optarg) | ||
293 | usage(argv[0]); | ||
294 | break; | ||
295 | case 'c': | ||
296 | gpio_opt = CYLON; | ||
297 | break; | ||
298 | case 'k': | ||
299 | gpio_opt = KIT; | ||
300 | break; | ||
301 | case '?': | ||
302 | usage(argv[0]); | ||
303 | default: | ||
304 | usage(argv[0]); | ||
305 | |||
306 | } | ||
307 | } | ||
308 | |||
309 | if (gl_gpio_base == 0) { | ||
310 | usage(argv[0]); | ||
311 | } | ||
312 | |||
313 | nchannel = open_gpio_channel(gl_gpio_base); | ||
314 | signal(SIGTERM, signal_handler); /* catch kill signal */ | ||
315 | signal(SIGHUP, signal_handler); /* catch hang up signal */ | ||
316 | signal(SIGQUIT, signal_handler); /* catch quit signal */ | ||
317 | signal(SIGINT, signal_handler); /* catch a CTRL-c signal */ | ||
318 | switch (gpio_opt) { | ||
319 | case IN: | ||
320 | set_gpio_direction(gl_gpio_base, nchannel, "in"); | ||
321 | gpio_value=get_gpio_value(gl_gpio_base, nchannel); | ||
322 | fprintf(stdout,"0x%08X\n", gpio_value); | ||
323 | break; | ||
324 | case OUT: | ||
325 | set_gpio_direction(gl_gpio_base, nchannel, "out"); | ||
326 | set_gpio_value(gl_gpio_base, nchannel, gpio_value); | ||
327 | break; | ||
328 | case CYLON: | ||
329 | #define CYLON_DELAY_USECS (10000) | ||
330 | set_gpio_direction(gl_gpio_base, nchannel, "out"); | ||
331 | for (;;) { | ||
332 | for(i=0; i < ARRAY_SIZE(cylon); i++) { | ||
333 | gpio_value=(int)cylon[i]; | ||
334 | set_gpio_value(gl_gpio_base, nchannel, gpio_value); | ||
335 | } | ||
336 | usleep(CYLON_DELAY_USECS); | ||
337 | } | ||
338 | case KIT: | ||
339 | #define KIT_DELAY_USECS (10000) | ||
340 | set_gpio_direction(gl_gpio_base, nchannel, "out"); | ||
341 | for (;;) { | ||
342 | for (i=0; i<ARRAY_SIZE(kit); i++) { | ||
343 | gpio_value=(int)kit[i]; | ||
344 | set_gpio_value(gl_gpio_base, nchannel, gpio_value); | ||
345 | } | ||
346 | usleep(KIT_DELAY_USECS); | ||
347 | } | ||
348 | default: | ||
349 | break; | ||
350 | } | ||
351 | close_gpio_channel(gl_gpio_base); | ||
352 | return 0; | ||
353 | } | ||
354 | |||
355 | |||
diff --git a/meta-xilinx-demos/recipes-examples/gpio-demo/gpio-demo.bb b/meta-xilinx-demos/recipes-examples/gpio-demo/gpio-demo.bb new file mode 100644 index 00000000..912e0cd4 --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/gpio-demo/gpio-demo.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | # | ||
2 | # This is the GPIO-DEMO apllication recipe | ||
3 | # | ||
4 | # | ||
5 | |||
6 | SUMMARY = "gpio-demo application" | ||
7 | SECTION = "PETALINUX/apps" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | SRC_URI = "file://gpio-demo.c \ | ||
11 | file://Makefile \ | ||
12 | " | ||
13 | S = "${WORKDIR}" | ||
14 | CFLAGS:prepend = "-I ${S}/include" | ||
15 | do_compile() { | ||
16 | oe_runmake | ||
17 | } | ||
18 | do_install() { | ||
19 | install -d ${D}${bindir} | ||
20 | install -m 0755 ${S}/gpio-demo ${D}${bindir} | ||
21 | |||
22 | } | ||
23 | |||
diff --git a/meta-xilinx-demos/recipes-examples/peekpoke/files/Makefile b/meta-xilinx-demos/recipes-examples/peekpoke/files/Makefile new file mode 100644 index 00000000..29fb5cdf --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/peekpoke/files/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | PEEK = peek | ||
2 | POKE = poke | ||
3 | |||
4 | # Add any other object files to this list below | ||
5 | PEEK_OBJS = peek.o | ||
6 | POKE_OBJS = poke.o | ||
7 | |||
8 | all: $(PEEK) $(POKE) | ||
9 | |||
10 | $(POKE): $(POKE_OBJS) | ||
11 | $(CC) $(LDFLAGS) -o $@ $(POKE_OBJS) $(LDLIBS) | ||
12 | |||
13 | $(PEEK): $(PEEK_OBJS) | ||
14 | $(CC) $(LDFLAGS) -o $@ $(PEEK_OBJS) $(LDLIBS) | ||
15 | |||
16 | clean: | ||
17 | -rm -f $(POKE) $(PEEK) *.elf *.gdb *.o | ||
18 | |||
19 | |||
diff --git a/meta-xilinx-demos/recipes-examples/peekpoke/files/peek.c b/meta-xilinx-demos/recipes-examples/peekpoke/files/peek.c new file mode 100644 index 00000000..53bd1d1c --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/peekpoke/files/peek.c | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * peek utility - for those who remember the good old days! | ||
3 | * | ||
4 | * | ||
5 | * Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. | ||
6 | * | ||
7 | * Permission is hereby granted, free of charge, to any person | ||
8 | * obtaining a copy of this software and associated documentation | ||
9 | * files (the "Software"), to deal in the Software without restriction, | ||
10 | * including without limitation the rights to use, copy, modify, merge, | ||
11 | * publish, distribute, sublicense, and/or sell copies of the Software, | ||
12 | * and to permit persons to whom the Software is furnished to do so, | ||
13 | * subject to the following conditions: | ||
14 | * | ||
15 | * The above copyright notice and this permission notice shall be included | ||
16 | * in all copies or substantial portions of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
21 | * IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
22 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
23 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
24 | * | ||
25 | * Except as contained in this notice, the name of the Xilinx shall not be used | ||
26 | * in advertising or otherwise to promote the sale, use or other dealings in this | ||
27 | * Software without prior written authorization from Xilinx. | ||
28 | * | ||
29 | */ | ||
30 | |||
31 | #include <stdio.h> | ||
32 | #include <stdlib.h> | ||
33 | #include <unistd.h> | ||
34 | #include <sys/mman.h> | ||
35 | #include <fcntl.h> | ||
36 | #include <stdint.h> | ||
37 | |||
38 | void usage(char *prog) | ||
39 | { | ||
40 | printf("usage: %s ADDR\n",prog); | ||
41 | printf("\n"); | ||
42 | printf("ADDR may be specified as hex values\n"); | ||
43 | } | ||
44 | |||
45 | |||
46 | int main(int argc, char *argv[]) | ||
47 | { | ||
48 | int fd; | ||
49 | void *ptr; | ||
50 | uint64_t addr, page_addr, page_offset; | ||
51 | uint64_t page_size=sysconf(_SC_PAGESIZE); | ||
52 | |||
53 | if(argc!=2) { | ||
54 | usage(argv[0]); | ||
55 | exit(-1); | ||
56 | } | ||
57 | |||
58 | fd=open("/dev/mem",O_RDONLY); | ||
59 | if(fd<1) { | ||
60 | perror(argv[0]); | ||
61 | exit(-1); | ||
62 | } | ||
63 | |||
64 | addr=strtoul(argv[1],NULL,0); | ||
65 | page_addr=(addr & ~(page_size-1)); | ||
66 | page_offset=addr-page_addr; | ||
67 | |||
68 | ptr=mmap(NULL,page_size,PROT_READ,MAP_SHARED,fd,(addr & ~(page_size-1))); | ||
69 | if((int64_t)ptr==-1) { | ||
70 | perror(argv[0]); | ||
71 | exit(-1); | ||
72 | } | ||
73 | |||
74 | printf("0x%08lx\n",*((uint64_t *)(ptr+page_offset))); | ||
75 | return 0; | ||
76 | } | ||
diff --git a/meta-xilinx-demos/recipes-examples/peekpoke/files/poke.c b/meta-xilinx-demos/recipes-examples/peekpoke/files/poke.c new file mode 100644 index 00000000..6948bca7 --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/peekpoke/files/poke.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * poke utility - for those who remember the good old days! | ||
3 | * Fixed by Pascal Bos from Nikhef, to be able to use this | ||
4 | * in 64 bit registers. | ||
5 | * | ||
6 | * Copyright (C) 2013 - 2016 Xilinx, Inc. All rights reserved. | ||
7 | * | ||
8 | * Permission is hereby granted, free of charge, to any person | ||
9 | * obtaining a copy of this software and associated documentation | ||
10 | * files (the "Software"), to deal in the Software without restriction, | ||
11 | * including without limitation the rights to use, copy, modify, merge, | ||
12 | * publish, distribute, sublicense, and/or sell copies of the Software, | ||
13 | * and to permit persons to whom the Software is furnished to do so, | ||
14 | * subject to the following conditions: | ||
15 | * | ||
16 | * The above copyright notice and this permission notice shall be included | ||
17 | * in all copies or substantial portions of the Software. | ||
18 | * | ||
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
22 | * IN NO EVENT SHALL XILINX BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
23 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
24 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
25 | * | ||
26 | * Except as contained in this notice, the name of the Xilinx shall not be used | ||
27 | * in advertising or otherwise to promote the sale, use or other dealings in this | ||
28 | * Software without prior written authorization from Xilinx. | ||
29 | * | ||
30 | */ | ||
31 | |||
32 | #include <stdio.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <unistd.h> | ||
35 | #include <stdint.h> | ||
36 | #include <sys/mman.h> | ||
37 | #include <fcntl.h> | ||
38 | |||
39 | void usage(char *prog) | ||
40 | { | ||
41 | printf("usage: %s ADDR VAL\n",prog); | ||
42 | printf("\n"); | ||
43 | printf("ADDR and VAL may be specified as hex values\n"); | ||
44 | } | ||
45 | |||
46 | int main(int argc, char *argv[]) | ||
47 | { | ||
48 | int fd; | ||
49 | void *ptr; | ||
50 | uint64_t val; | ||
51 | uint64_t addr, page_addr, page_offset; | ||
52 | uint64_t page_size=sysconf(_SC_PAGESIZE); | ||
53 | |||
54 | fd=open("/dev/mem",O_RDWR); | ||
55 | if(fd<1) { | ||
56 | perror(argv[0]); | ||
57 | exit(-1); | ||
58 | } | ||
59 | |||
60 | if(argc!=3) { | ||
61 | usage(argv[0]); | ||
62 | exit(-1); | ||
63 | } | ||
64 | |||
65 | addr=strtoul(argv[1],NULL,0); | ||
66 | val=strtoul(argv[2],NULL,0); | ||
67 | |||
68 | page_addr=(addr & ~(page_size-1)); | ||
69 | page_offset=addr-page_addr; | ||
70 | |||
71 | ptr=mmap(NULL,page_size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,(addr & ~(page_size-1))); | ||
72 | if((int64_t)ptr==-1) { | ||
73 | perror(argv[0]); | ||
74 | exit(-1); | ||
75 | } | ||
76 | |||
77 | *((uint64_t *)(ptr+page_offset))=val; | ||
78 | return 0; | ||
79 | } | ||
diff --git a/meta-xilinx-demos/recipes-examples/peekpoke/peekpoke.bb b/meta-xilinx-demos/recipes-examples/peekpoke/peekpoke.bb new file mode 100644 index 00000000..3949598e --- /dev/null +++ b/meta-xilinx-demos/recipes-examples/peekpoke/peekpoke.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | # | ||
2 | # This is the peekpoke apllication recipe | ||
3 | # | ||
4 | # | ||
5 | |||
6 | SUMMARY = "peekpoke application" | ||
7 | SECTION = "PETALINUX/apps" | ||
8 | LICENSE = "MIT" | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
10 | SRC_URI = "file://peek.c \ | ||
11 | file://poke.c \ | ||
12 | file://Makefile \ | ||
13 | " | ||
14 | S = "${WORKDIR}" | ||
15 | CFLAGS:prepend = "-I ${S}/include" | ||
16 | do_compile() { | ||
17 | oe_runmake | ||
18 | } | ||
19 | do_install() { | ||
20 | install -d ${D}${bindir} | ||
21 | install -m 0755 ${S}/peek ${D}${bindir} | ||
22 | install -m 0755 ${S}/poke ${D}${bindir} | ||
23 | |||
24 | } | ||
25 | |||
diff --git a/meta-xilinx-demos/recipes-firmware/vek280-pl-bram-uart-gpio-fw/vek280-pl-bram-uart-gpio-fw_1.0-2024.2.bb b/meta-xilinx-demos/recipes-firmware/vek280-pl-bram-uart-gpio-fw/vek280-pl-bram-uart-gpio-fw_1.0-2024.2.bb new file mode 100644 index 00000000..045b88d5 --- /dev/null +++ b/meta-xilinx-demos/recipes-firmware/vek280-pl-bram-uart-gpio-fw/vek280-pl-bram-uart-gpio-fw_1.0-2024.2.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "VEK280 Segemented Configuration(DFx Full) firmware using dfx_user_dts bbclass" | ||
2 | DESCRIPTION = "VEK280 Segemented Configuration(DFx Full) PL AXI BRAM, AXI GPIO and AXI UART firmware application" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | inherit dfx_user_dts | ||
7 | |||
8 | SRC_URI = "https://petalinux.xilinx.com/sswreleases/rel-v2024.2/sdt/2024.2/2024.2_1106_1_11061206/external/vek280-pl-bram-gpio-fw/vek280-pl-bram-gpio-fw_2024.2_1106_1.tar.gz" | ||
9 | |||
10 | SRC_URI[sha256sum] = "bf7688694a27a0f81e7d59d16c2b819994aa5fb8adfb0d94656da4040e4bc279" | ||
11 | |||
12 | COMPATIBLE_MACHINE:versal-vek280-sdt-seg = "${MACHINE}" | ||
13 | COMPATIBLE_MACHINE:versal-vek280-sdt-seg-ospi = "${MACHINE}" | ||
14 | |||
15 | # When do_upack is exectuted it will extract tar file with original directory | ||
16 | # name so set the FW_DIR pointing to pdi and dtsi files. | ||
17 | FW_DIR = "vek280-pl-bram-gpio-fw" | ||
18 | |||
19 | # fw files doesn't install on rootfs using dfx_user_dts bbclass using artifactory | ||
20 | # method. To workaround this issue we are using copy_fw_files pre-functions. | ||
21 | # copy_fw_files prefuncs needs to be called before find_firmware_file to update | ||
22 | # the firmware-name to ${PN}. | ||
23 | do_configure[prefuncs] =+ "copy_fw_files" | ||
24 | python copy_fw_files () { | ||
25 | import shutil | ||
26 | fw_file_src = d.getVar('WORKDIR') + '/' + d.getVar("FW_DIR") | ||
27 | fw_file_dest = d.getVar('S') | ||
28 | shutil.copytree(fw_file_src, fw_file_dest, dirs_exist_ok=True) | ||
29 | } | ||
diff --git a/meta-xilinx-demos/recipes-firmware/zcu104-pl-vcu-fw/zcu104-pl-vcu-fw_1.0-2024.2.bb b/meta-xilinx-demos/recipes-firmware/zcu104-pl-vcu-fw/zcu104-pl-vcu-fw_1.0-2024.2.bb new file mode 100644 index 00000000..0dcb2be2 --- /dev/null +++ b/meta-xilinx-demos/recipes-firmware/zcu104-pl-vcu-fw/zcu104-pl-vcu-fw_1.0-2024.2.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | SUMMARY = "ZCU104 full pl firmware using dfx_user_dts bbclass" | ||
2 | DESCRIPTION = "ZCU104 full PL VCU firmware application" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
5 | |||
6 | inherit dfx_user_dts | ||
7 | |||
8 | SRC_URI = "https://petalinux.xilinx.com/sswreleases/rel-v2024.2/sdt/2024.2/2024.2_1106_1_11061206/external/zcu104-pl-vcu-fw/zcu104-pl-vcu-fw_2024.2_1106_1.tar.gz" | ||
9 | |||
10 | SRC_URI[sha256sum] = "1eef872153d2373c944c20752bc374e371159395a42d8353bd1a397fadc59231" | ||
11 | |||
12 | |||
13 | COMPATIBLE_MACHINE:zynqmp-zcu104-sdt-full = "${MACHINE}" | ||
14 | |||
15 | # When do_upack is exectuted it will extract tar file with original directory | ||
16 | # name so set the FW_DIR pointing to pdi and dtsi files. | ||
17 | FW_DIR = "zcu104-pl-vcu-fw" | ||
18 | |||
19 | # fw files doesn't install on rootfs using dfx_user_dts bbclass using artifactory | ||
20 | # method. To workaround this issue we are using copy_fw_files pre-functions. | ||
21 | # copy_fw_files prefuncs needs to be called before find_firmware_file to update | ||
22 | # the firmware-name to ${PN}. | ||
23 | do_configure[prefuncs] =+ "copy_fw_files" | ||
24 | python copy_fw_files () { | ||
25 | import shutil | ||
26 | fw_file_src = d.getVar('WORKDIR') + '/' + d.getVar("FW_DIR") | ||
27 | fw_file_dest = d.getVar('S') | ||
28 | shutil.copytree(fw_file_src, fw_file_dest, dirs_exist_ok=True) | ||
29 | } | ||
diff --git a/meta-xilinx-demos/scripts/generate-machines-sdt.sh b/meta-xilinx-demos/scripts/generate-machines-sdt.sh new file mode 100755 index 00000000..aaeef385 --- /dev/null +++ b/meta-xilinx-demos/scripts/generate-machines-sdt.sh | |||
@@ -0,0 +1,79 @@ | |||
1 | #! /bin/bash -e | ||
2 | |||
3 | ### The following table controls the automatic generated of the firmware demos | ||
4 | ### Machine Recipe | ||
5 | #M# vek280-pl-bram-gpio-fw recipes-firmware/vek280-pl-bram-uart-gpio-fw/vek280-pl-bram-uart-gpio-fw_1.0-2024.2.bb | ||
6 | #M# zcu104-pl-vcu-fw recipes-firmware/zcu104-pl-vcu-fw/zcu104-pl-vcu-fw_1.0-2024.2.bb | ||
7 | |||
8 | this=$(realpath $0) | ||
9 | |||
10 | if [ $# -lt 2 ]; then | ||
11 | echo "$0: <conf_path> <machine_url_index> [machine]" >&2 | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | conf_path=$(realpath $1) | ||
16 | if [ ! -d ${conf_path} ]; then | ||
17 | mkdir -p ${conf_path} | ||
18 | fi | ||
19 | |||
20 | |||
21 | mach_index=$(realpath $2) | ||
22 | count=0 | ||
23 | while read mach_id mach_url; do | ||
24 | if [ ${mach_id} = '#' ]; then | ||
25 | continue | ||
26 | fi | ||
27 | |||
28 | MACHINE_ID[$count]=${mach_id} | ||
29 | MACHINE_URL[$count]=${mach_url} | ||
30 | |||
31 | count=$(expr $count + 1) | ||
32 | done < ${mach_index} | ||
33 | |||
34 | |||
35 | # Load in the arrays from this script | ||
36 | count=0 | ||
37 | while read marker machine recipe ; do | ||
38 | if [ "${marker}" != "#M#" ]; then | ||
39 | continue | ||
40 | fi | ||
41 | |||
42 | MACHINES[$count]=${machine} | ||
43 | RECIPES[$count]=${recipe} | ||
44 | for mach in ${!MACHINE_ID[@]}; do | ||
45 | if [ ${MACHINE_ID[${mach}]} = ${machine} ]; then | ||
46 | URLS[$count]=${MACHINE_URL[${mach}]} | ||
47 | break | ||
48 | fi | ||
49 | done | ||
50 | if [ -z "${URLS[$count]}" ]; then | ||
51 | echo "ERROR: Unable to find ${machine} in ${mach_index}" >&2 | ||
52 | exit 1 | ||
53 | fi | ||
54 | |||
55 | count=$(expr $count + 1) | ||
56 | done < ${this} | ||
57 | |||
58 | |||
59 | for mach in ${!MACHINES[@]}; do | ||
60 | if [ -n "$3" -a "$3" != "${MACHINES[${mach}]}" ]; then | ||
61 | continue | ||
62 | fi | ||
63 | |||
64 | echo "Machine: ${MACHINES[${mach}]}" | ||
65 | echo "Recipe: ${RECIPES[${mach}]}" | ||
66 | echo "URL: ${URLS[${mach}]}" | ||
67 | echo | ||
68 | |||
69 | url=${URLS[${mach}]} | ||
70 | url=$(echo $url | sed 's,https://petalinux.xilinx.com/sswreleases/.*/sdt,https://artifactory.xilinx.com/artifactory/petalinux-hwproj-dev/sdt,') | ||
71 | |||
72 | wget $url -O ${conf_path}/output.sdt | ||
73 | sha=$(sha256sum ${conf_path}/output.sdt | cut -d ' ' -f 1) | ||
74 | rm -f ${conf_path}/output.sdt | ||
75 | |||
76 | sed -e 's,SRC_URI = .*,SRC_URI = "'${URLS[${mach}]}'",' \ | ||
77 | -e 's,SRC_URI\[sha256sum\] = .*,SRC_URI\[sha256sum\] = "'${sha}'",' \ | ||
78 | -i $(dirname $0)/../${RECIPES[${mach}]} | ||
79 | done | ||
diff --git a/meta-xilinx-mali400/README.md b/meta-xilinx-mali400/README.md new file mode 100644 index 00000000..98824889 --- /dev/null +++ b/meta-xilinx-mali400/README.md | |||
@@ -0,0 +1,59 @@ | |||
1 | # meta-xilinx-mali400 | ||
2 | |||
3 | This layer contains recipes for MALI-400 GPU drivers and user space libraries for | ||
4 | AMD Zynq UltraScale+ MPSoC EG/EV devices which has MALI-400 GPU. It also includes | ||
5 | support for open source DRM LIMA drivers. | ||
6 | |||
7 | > **Note:** | ||
8 | > 1. `MACHINE_FEATURES += "mali400"` is included in machine conf files for EG/EV | ||
9 | > devices by gen-machineconf tools. If user is not using gen-machineconf to | ||
10 | > generate the machine conf files then add it manually. | ||
11 | > 2. MALI-400 and DRM LIMA driver are mutually exclusive. | ||
12 | |||
13 | ## How to enable MALI-400 drivers | ||
14 | |||
15 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
16 | |||
17 | 2. Enable libmali DISTRO_FEATURE and mali400 MACHINE_FEATURES by adding these | ||
18 | variables to the end of the conf/local.conf file as shown below. | ||
19 | ``` | ||
20 | DISTRO_FEATURES:append = " libmali" | ||
21 | MACHINE_FEATURES += "mali400" | ||
22 | ``` | ||
23 | |||
24 | 3. Continue [Building Instructions](../README.building.md) from step 5. | ||
25 | |||
26 | ## How to enable DRM LIMA drivers | ||
27 | |||
28 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
29 | |||
30 | 2. Remove libmali DISTRO_FEATURE and enable mali400 MACHINE_FEATURES by adding | ||
31 | these variables to the end of the conf/local.conf file as shown below. | ||
32 | ``` | ||
33 | DISTRO_FEATURES:remove = " libmali" | ||
34 | MACHINE_FEATURES += "mali400" | ||
35 | ``` | ||
36 | |||
37 | 3. Continue [Building Instructions](../README.building.md) from step 5. | ||
38 | |||
39 | ## Dependencies | ||
40 | |||
41 | This layer depends on: | ||
42 | |||
43 | URI: https://git.yoctoproject.org/poky | ||
44 | layers: meta, meta-poky | ||
45 | branch: scarthgap | ||
46 | |||
47 | URI: https://git.openembedded.org/meta-openembedded | ||
48 | layers: meta-oe | ||
49 | branch: scarthgap | ||
50 | |||
51 | URI: https://git.yoctoproject.org/meta-arm | ||
52 | layers: meta-arm, meta-arm-toolchain | ||
53 | branch: scarthgap | ||
54 | |||
55 | URI: | ||
56 | https://git.yoctoproject.org/meta-xilinx (official version) | ||
57 | https://github.com/Xilinx/meta-xilinx (development and AMD release) | ||
58 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-standalone | ||
59 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) | ||
diff --git a/meta-xilinx-mali400/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb b/meta-xilinx-mali400/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb index 7f5fba0b..b0fe3c79 100644 --- a/meta-xilinx-mali400/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb +++ b/meta-xilinx-mali400/recipes-graphics/libgles/libmali-xlnx_r9p0-01rel0.bb | |||
@@ -13,8 +13,8 @@ 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_v2024.1" | 16 | BRANCH ?= "xlnx_rel_v2024.2" |
17 | SRCREV ?= "b3a772aad859cdadc8513b11c3e995546c20e75e" | 17 | SRCREV ?= "644dc96597172e3cf15aea63b4ee947d421810aa" |
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
19 | 19 | ||
20 | SRC_URI = " \ | 20 | SRC_URI = " \ |
@@ -55,6 +55,7 @@ USE_FB = "${@bb.utils.contains("DISTRO_FEATURES", "fbdev", "yes", "no", d)}" | |||
55 | USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" | 55 | USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}" |
56 | 56 | ||
57 | MONOLITHIC_LIBMALI = "libMali.so.9.0" | 57 | MONOLITHIC_LIBMALI = "libMali.so.9.0" |
58 | MONOLITHIC_LIBMALI_MVL = "libMali.so.9" | ||
58 | 59 | ||
59 | do_install() { | 60 | do_install() { |
60 | #Identify the ARCH type | 61 | #Identify the ARCH type |
@@ -88,6 +89,11 @@ do_install() { | |||
88 | 89 | ||
89 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/headless/${MONOLITHIC_LIBMALI} | 90 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/headless/${MONOLITHIC_LIBMALI} |
90 | ln -snf headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | 91 | ln -snf headless/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} |
92 | ln -snf ${MONOLITHIC_LIBMALI} ${D}${libdir}/headless/${MONOLITHIC_LIBMALI_MVL} | ||
93 | |||
94 | # install gbm | ||
95 | install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/ | ||
96 | install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc | ||
91 | 97 | ||
92 | if [ "${USE_FB}" = "yes" ]; then | 98 | if [ "${USE_FB}" = "yes" ]; then |
93 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/fbdev/${MONOLITHIC_LIBMALI} | 99 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/fbdev/${MONOLITHIC_LIBMALI} ${D}${libdir}/fbdev/${MONOLITHIC_LIBMALI} |
@@ -105,8 +111,6 @@ do_install() { | |||
105 | sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if (1)/' ${D}${includedir}/EGL/eglplatform.h | 111 | sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if (1)/' ${D}${includedir}/EGL/eglplatform.h |
106 | fi | 112 | fi |
107 | if [ "${USE_WL}" = "yes" ]; then | 113 | if [ "${USE_WL}" = "yes" ]; then |
108 | install -m 0644 ${S}/${PV}/glesHeaders/GBM/gbm.h ${D}${includedir}/ | ||
109 | install -m 0644 ${WORKDIR}/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc | ||
110 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/wayland/${MONOLITHIC_LIBMALI} | 114 | install -Dm 0644 ${S}/${PV}/${ARCH_PLATFORM_DIR}/wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/wayland/${MONOLITHIC_LIBMALI} |
111 | if [ "${MALI_BACKEND_DEFAULT}" = "wayland" ]; then | 115 | if [ "${MALI_BACKEND_DEFAULT}" = "wayland" ]; then |
112 | ln -snf wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} | 116 | ln -snf wayland/${MONOLITHIC_LIBMALI} ${D}${libdir}/${MONOLITHIC_LIBMALI} |
diff --git a/meta-xilinx-multimedia/conf/layer.conf b/meta-xilinx-multimedia/conf/layer.conf index 0787f87c..ccc5800e 100644 --- a/meta-xilinx-multimedia/conf/layer.conf +++ b/meta-xilinx-multimedia/conf/layer.conf | |||
@@ -9,7 +9,13 @@ BBFILE_COLLECTIONS += "xilinx-multimedia" | |||
9 | BBFILE_PATTERN_xilinx-multimedia = "^${LAYERDIR}/" | 9 | BBFILE_PATTERN_xilinx-multimedia = "^${LAYERDIR}/" |
10 | BBFILE_PRIORITY_xilinx-multimedia = "5" | 10 | BBFILE_PRIORITY_xilinx-multimedia = "5" |
11 | 11 | ||
12 | AYERDEPENDS_xilinx-multimedia = "core" | 12 | LAYERDEPENDS_xilinx-multimedia = "core" |
13 | LAYERRECOMMENDS_xilinx-multimedia = "openembedded-layer" | 13 | LAYERRECOMMENDS_xilinx-multimedia = "openembedded-layer" |
14 | 14 | ||
15 | LAYERSERIES_COMPAT_xilinx-multimedia = "scarthgap" | 15 | LAYERSERIES_COMPAT_xilinx-multimedia = "scarthgap" |
16 | |||
17 | # Define dynamic layers | ||
18 | BBFILES_DYNAMIC += " \ | ||
19 | jupyter-layer:${LAYERDIR}/dynamic-layers/meta-jupyter/recipes-*/*/*.bb \ | ||
20 | jupyter-layer:${LAYERDIR}/dynamic-layers/meta-jupyter/recipes-*/*/*.bbappend \ | ||
21 | " | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-multimedia-notebooks_0.1.inc b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-multimedia-notebooks_0.1.inc index 38e23371..1142391d 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-multimedia-notebooks_0.1.inc +++ b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-multimedia-notebooks_0.1.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | BRANCH ?= "xlnx_rel_v2024.1" | 1 | BRANCH ?= "xlnx_rel_v2024.2" |
2 | REPO ?= "git://github.com/Xilinx/multimedia-notebooks.git;protocol=https" | 2 | REPO ?= "git://github.com/Xilinx/multimedia-notebooks.git;protocol=https" |
3 | SRCREV ?= "ef7a7236144a04977cb5bb800d6d7cf319e52b58" | 3 | SRCREV ?= "ef7a7236144a04977cb5bb800d6d7cf319e52b58" |
4 | 4 | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vcu-examples_0.1.bb b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vcu-examples_0.1.bb index 3741c4d4..3741c4d4 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vcu-examples_0.1.bb +++ b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vcu-examples_0.1.bb | |||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vcu-notebooks_0.1.bb b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vcu-notebooks_0.1.bb index 35510d6b..2d39f34e 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vcu-notebooks_0.1.bb +++ b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vcu-notebooks_0.1.bb | |||
@@ -13,7 +13,7 @@ inherit features_check | |||
13 | REQUIRED_MACHINE_FEATURES = "vcu" | 13 | REQUIRED_MACHINE_FEATURES = "vcu" |
14 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
15 | 15 | ||
16 | RDEPENDS:${PN} = "packagegroup-petalinux-jupyter packagegroup-petalinux-gstreamer gstreamer-vcu-examples start-jupyter" | 16 | RDEPENDS:${PN} = "packagegroup-xilinx-jupyter packagegroup-xilinx-gstreamer gstreamer-vcu-examples start-jupyter" |
17 | 17 | ||
18 | EXTRA_OEMAKE = 'D=${D} JUPYTER_DIR=${JUPYTER_DIR}' | 18 | EXTRA_OEMAKE = 'D=${D} JUPYTER_DIR=${JUPYTER_DIR}' |
19 | 19 | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vdu-examples_0.1.bb b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vdu-examples_0.1.bb index 8469412e..8469412e 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vdu-examples_0.1.bb +++ b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vdu-examples_0.1.bb | |||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vdu-notebooks_0.1.bb b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vdu-notebooks_0.1.bb index caca36bb..28bbca90 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-vdu-notebooks_0.1.bb +++ b/meta-xilinx-multimedia/dynamic-layers/meta-jupyter/recipes-multimedia/gstreamer/gstreamer-vdu-notebooks_0.1.bb | |||
@@ -13,7 +13,7 @@ inherit features_check | |||
13 | REQUIRED_MACHINE_FEATURES = "vdu" | 13 | REQUIRED_MACHINE_FEATURES = "vdu" |
14 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 14 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
15 | 15 | ||
16 | RDEPENDS:${PN} = "packagegroup-petalinux-jupyter packagegroup-petalinux-gstreamer gstreamer-vdu-examples start-jupyter" | 16 | RDEPENDS:${PN} = "packagegroup-xilinx-jupyter packagegroup-xilinx-gstreamer gstreamer-vdu-examples start-jupyter" |
17 | 17 | ||
18 | EXTRA_OEMAKE = 'D=${D} JUPYTER_DIR=${JUPYTER_DIR}' | 18 | EXTRA_OEMAKE = 'D=${D} JUPYTER_DIR=${JUPYTER_DIR}' |
19 | 19 | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gst-devtools_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gst-devtools_1.22.%.bbappend index 13f7a700..a73b2c89 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gst-devtools_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gst-devtools_1.22.%.bbappend | |||
@@ -1,4 +1,4 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | SRC_URI:append = " \ | 3 | SRC_URI:append = " \ |
4 | file://0001-connect-has-a-different-signature-on-musl.patch \ | 4 | file://0001-connect-has-a-different-signature-on-musl.patch \ |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-xilinx-1.20.5.inc b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-xilinx-1.22.%.inc index 04c025fc..25409d1e 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-xilinx-1.20.5.inc +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer-xilinx-1.22.%.inc | |||
@@ -1,9 +1,9 @@ | |||
1 | BRANCH ?= "xlnx-rebase-v1.20.5" | 1 | BRANCH ?= "xlnx-rebase-v1.22.12" |
2 | REPO ?= "git://github.com/Xilinx/gstreamer.git;protocol=https" | 2 | REPO ?= "git://github.com/Xilinx/gstreamer.git;protocol=https" |
3 | 3 | ||
4 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" | 4 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" |
5 | 5 | ||
6 | PV = "1.20.5+git" | 6 | PV = "1.22.12+git" |
7 | 7 | ||
8 | # We need a common PRSERV_PV_AUTOINC for all variations of gstreamer packages | 8 | # We need a common PRSERV_PV_AUTOINC for all variations of gstreamer packages |
9 | # Need to inject a custom setting, so based on package.bbclass version | 9 | # Need to inject a custom setting, so based on package.bbclass version |
@@ -24,5 +24,5 @@ SRC_URI = " \ | |||
24 | ${REPO};${BRANCHARG};name=gstreamer-xlnx \ | 24 | ${REPO};${BRANCHARG};name=gstreamer-xlnx \ |
25 | " | 25 | " |
26 | 26 | ||
27 | SRCREV_gstreamer-xlnx = "5126254d77401b9673602ddcb617ff9e958dd295" | 27 | SRCREV_gstreamer-xlnx = "d036bef6c66d7e2351e0f7252d653bca137efe90" |
28 | SRCREV_FORMAT = "gstreamer-xlnx" | 28 | SRCREV_FORMAT = "gstreamer-xlnx" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-libav_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.%.bbappend index 180f25c2..f157a7cb 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-libav_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.22.%.bbappend | |||
@@ -1,3 +1,3 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gst-libav" | 3 | S = "${WORKDIR}/git/subprojects/gst-libav" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-omx_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.%.bbappend index 29049cae..25ffe106 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-omx_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.22.%.bbappend | |||
@@ -1,4 +1,4 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gst-omx" | 3 | S = "${WORKDIR}/git/subprojects/gst-omx" |
4 | 4 | ||
@@ -8,20 +8,27 @@ DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', ' libvcu-omxil', '', | |||
8 | RDEPENDS:${PN} .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' libvdu-omxil', '', d)}" | 8 | RDEPENDS:${PN} .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' libvdu-omxil', '', d)}" |
9 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' libvdu-omxil', '', d)}" | 9 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' libvdu-omxil', '', d)}" |
10 | 10 | ||
11 | RDEPENDS:${PN} .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu2', ' libvcu2-omxil', '', d)}" | ||
12 | DEPENDS .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu2', ' libvcu2-omxil', '', d)}" | ||
13 | |||
11 | EXTRA_OECONF .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', ' --with-omx-header-path=${STAGING_INCDIR}/vcu-omx-il', '', d)}" | 14 | EXTRA_OECONF .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', ' --with-omx-header-path=${STAGING_INCDIR}/vcu-omx-il', '', d)}" |
12 | EXTRA_OEMESON .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', ' -Dheader_path=${STAGING_INCDIR}/vcu-omx-il', '', d)}" | 15 | EXTRA_OEMESON .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', ' -Dheader_path=${STAGING_INCDIR}/vcu-omx-il', '', d)}" |
13 | 16 | ||
14 | EXTRA_OECONF .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' --with-omx-header-path=${STAGING_INCDIR}/vdu-omx-il', '', d)}" | 17 | EXTRA_OECONF .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' --with-omx-header-path=${STAGING_INCDIR}/vdu-omx-il', '', d)}" |
15 | EXTRA_OEMESON .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' -Dheader_path=${STAGING_INCDIR}/vdu-omx-il', '', d)}" | 18 | EXTRA_OEMESON .= "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', ' -Dheader_path=${STAGING_INCDIR}/vdu-omx-il', '', d)}" |
16 | 19 | ||
20 | EXTRA_OECONF .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu2', ' --with-omx-header-path=${STAGING_INCDIR}/vcu2-omx-il', '', d)}" | ||
21 | EXTRA_OEMESON .= "${@bb.utils.contains('MACHINE_FEATURES', 'vcu2', ' -Dheader_path=${STAGING_INCDIR}/vcu2-omx-il', '', d)}" | ||
22 | |||
17 | DEFAULT_GSTREAMER_1_0_OMX_TARGET := "${GSTREAMER_1_0_OMX_TARGET}" | 23 | DEFAULT_GSTREAMER_1_0_OMX_TARGET := "${GSTREAMER_1_0_OMX_TARGET}" |
18 | VCU_GSTREAMER_1_0_OMX_TARGET = "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', 'zynqultrascaleplus', '${DEFAULT_GSTREAMER_1_0_OMX_TARGET}', d)}" | 24 | VCU_GSTREAMER_1_0_OMX_TARGET = "${@bb.utils.contains('MACHINE_FEATURES', 'vcu', 'zynqultrascaleplus', '${DEFAULT_GSTREAMER_1_0_OMX_TARGET}', d)}" |
19 | VDU_GSTREAMER_1_0_OMX_TARGET = "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', 'versal', '${VCU_GSTREAMER_1_0_OMX_TARGET}', d)}" | 25 | VDU_GSTREAMER_1_0_OMX_TARGET = "${@bb.utils.contains('MACHINE_FEATURES', 'vdu', 'versal', '${VCU_GSTREAMER_1_0_OMX_TARGET}', d)}" |
20 | GSTREAMER_1_0_OMX_TARGET = "${VDU_GSTREAMER_1_0_OMX_TARGET}" | 26 | VCU2_GSTREAMER_1_0_OMX_TARGET = "${@bb.utils.contains('MACHINE_FEATURES', 'vcu2', 'versalgen2', '${VDU_GSTREAMER_1_0_OMX_TARGET}', d)}" |
27 | GSTREAMER_1_0_OMX_TARGET = "${VCU2_GSTREAMER_1_0_OMX_TARGET}" | ||
21 | 28 | ||
22 | DEFAULT_GSTREAMER_1_0_OMX_CORE_NAME := "${GSTREAMER_1_0_OMX_CORE_NAME}" | 29 | DEFAULT_GSTREAMER_1_0_OMX_CORE_NAME := "${GSTREAMER_1_0_OMX_CORE_NAME}" |
23 | GSTREAMER_1_0_OMX_CORE_NAME = "${@bb.utils.contains_any('MACHINE_FEATURES', 'vcu vdu', '${libdir}/libOMX.allegro.core.so.1', '${DEFAULT_GSTREAMER_1_0_OMX_CORE_NAME}', d)}" | 30 | GSTREAMER_1_0_OMX_CORE_NAME = "${@bb.utils.contains_any('MACHINE_FEATURES', 'vcu vdu vcu2', '${libdir}/libOMX.allegro.core.so.1', '${DEFAULT_GSTREAMER_1_0_OMX_CORE_NAME}', d)}" |
24 | 31 | ||
25 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | 32 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" |
26 | PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | 33 | PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" |
27 | PACKAGE_ARCH = "${@bb.utils.contains_any('MACHINE_FEATURES', 'vcu vdu', '${MACHINE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | 34 | PACKAGE_ARCH = "${@bb.utils.contains_any('MACHINE_FEATURES', 'vcu vdu vcu2', '${MACHINE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-bad_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend index 7c503292..2775d0f8 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-bad_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.22.%.bbappend | |||
@@ -1,4 +1,4 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | SRC_URI:append = " \ | 3 | SRC_URI:append = " \ |
4 | file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ | 4 | file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \ |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-base_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend index 18e43bca..f709b204 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-base_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.22.%.bbappend | |||
@@ -1,4 +1,4 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | SRC_URI:append = " \ | 3 | SRC_URI:append = " \ |
4 | file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ | 4 | file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-good_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.%.bbappend index b5db44a6..2d86bffb 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-good_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.%.bbappend | |||
@@ -1,9 +1,10 @@ | |||
1 | PACKAGECONFIG:append = " vpx" | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | |||
3 | require gstreamer-xilinx-1.20.5.inc | ||
4 | 2 | ||
5 | SRC_URI:append = " \ | 3 | SRC_URI:append = " \ |
6 | file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ | 4 | file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ |
5 | file://0001-v4l2-Define-ioctl_req_t-for-posix-linux-case.patch \ | ||
7 | " | 6 | " |
8 | 7 | ||
8 | PACKAGECONFIG:append = " vpx" | ||
9 | |||
9 | S = "${WORKDIR}/git/subprojects/gst-plugins-good" | 10 | S = "${WORKDIR}/git/subprojects/gst-plugins-good" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-ugly_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.%.bbappend index 349efb29..575086f4 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-plugins-ugly_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.22.%.bbappend | |||
@@ -1,3 +1,3 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gst-plugins-ugly" | 3 | S = "${WORKDIR}/git/subprojects/gst-plugins-ugly" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-python_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.%.bbappend index 11253676..cae17237 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-python_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-python_1.22.%.bbappend | |||
@@ -1,4 +1,4 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gst-python" | 3 | S = "${WORKDIR}/git/subprojects/gst-python" |
4 | 4 | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-rtsp-server_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.%.bbappend index a32f9d5b..dfa5635c 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-rtsp-server_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.22.%.bbappend | |||
@@ -1,3 +1,3 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gst-rtsp-server" | 3 | S = "${WORKDIR}/git/subprojects/gst-rtsp-server" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-vaapi_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.%.bbappend index f468e94f..28427eac 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0-vaapi_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.22.%.bbappend | |||
@@ -1,3 +1,3 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | S = "${WORKDIR}/git/subprojects/gstreamer-vaapi" | 3 | S = "${WORKDIR}/git/subprojects/gstreamer-vaapi" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0_1.20.5.bbappend b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0_1.22.%.bbappend index d26d567b..6f2f79a4 100644 --- a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/FIXME/gstreamer1.0_1.20.5.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0_1.22.%.bbappend | |||
@@ -1,12 +1,11 @@ | |||
1 | require gstreamer-xilinx-1.20.5.inc | 1 | require gstreamer-xilinx-1.22.%.inc |
2 | 2 | ||
3 | SRC_URI:append = " \ | 3 | SRC_URI:append = " \ |
4 | file://run-ptest \ | 4 | file://run-ptest \ |
5 | file://0001-tests-respect-the-idententaion-used-in-meson.patch;striplevel=3 \ | 5 | file://0001-tests-respect-the-idententaion-used-in-meson.patch \ |
6 | file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \ | 6 | file://0002-tests-add-support-for-install-the-tests.patch \ |
7 | file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \ | 7 | file://0003-tests-use-a-dictionaries-for-environment.patch \ |
8 | file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \ | 8 | file://0004-tests-add-helper-script-to-run-the-installed_tests.patch \ |
9 | file://0005-bin-Fix-race-conditions-in-tests.patch;striplevel=3 \ | ||
10 | " | 9 | " |
11 | 10 | ||
12 | PACKAGECONFIG:append = " tracer-hooks coretracers" | 11 | PACKAGECONFIG:append = " tracer-hooks coretracers" |
diff --git a/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch new file mode 100644 index 00000000..182663ec --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/files/0001-v4l-utils-Add-support-for-new-media-bus-codes.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 1e1afa48034869d4a1520c405b56c3a574b3f4ba 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 | Signed-off-by: Adrian Fiergolski <Adrian.Fiergolski@fastree3d.com> | ||
11 | --- | ||
12 | include/linux/media-bus-format.h | 11 +++++++++++ | ||
13 | 1 file changed, 11 insertions(+) | ||
14 | |||
15 | diff --git a/include/linux/media-bus-format.h b/include/linux/media-bus-format.h | ||
16 | index f05f747e..45f6707d 100644 | ||
17 | --- a/include/linux/media-bus-format.h | ||
18 | +++ b/include/linux/media-bus-format.h | ||
19 | @@ -121,6 +121,17 @@ | ||
20 | #define MEDIA_BUS_FMT_YUV16_1X48 0x202a | ||
21 | #define MEDIA_BUS_FMT_UYYVYY16_0_5X48 0x202b | ||
22 | |||
23 | +/* YUV: Xilinx Specific - next is 0x2108 */ | ||
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_UYYVYY16_4X32 0x2105 | ||
30 | +#define MEDIA_BUS_FMT_VUY16_1X48 0x2106 | ||
31 | +#define MEDIA_BUS_FMT_UYVY16_2X32 0x2107 | ||
32 | + | ||
33 | + | ||
34 | /* Bayer - next is 0x3021 */ | ||
35 | #define MEDIA_BUS_FMT_SBGGR8_1X8 0x3001 | ||
36 | #define MEDIA_BUS_FMT_SGBRG8_1X8 0x3013 | ||
37 | -- | ||
38 | 2.34.1 | ||
39 | |||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend index 3d177bce..3d177bce 100644 --- a/meta-xilinx-core/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/v4l-utils_%.bbappend | |||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch index 42b108fe..42b108fe 100644 --- a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch +++ b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/yavta/0001-Add-support-for-3-planar-YUV444P-8bpc.patch | |||
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-multimedia/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch index 5dfbfa2e..5dfbfa2e 100644 --- a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch +++ b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/yavta/0002-Add-support-3-planar-YUV-444-10bpc-pixel-format-in-c.patch | |||
diff --git a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/yavta_%.bbappend index 52eab13d..52eab13d 100644 --- a/meta-xilinx-core/recipes-multimedia/v4l2apps/yavta_%.bbappend +++ b/meta-xilinx-multimedia/recipes-multimedia/v4l2apps/yavta_%.bbappend | |||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu/kernel-module-vcu_2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu/kernel-module-vcu_2024.2.bb new file mode 100644 index 00000000..91b1d1be --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu/kernel-module-vcu_2024.2.bb | |||
@@ -0,0 +1,38 @@ | |||
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-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | PV .= "+git" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
12 | |||
13 | BRANCH = "xlnx_rel_v2024.2" | ||
14 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
15 | SRCREV = "91d19a16308a438596138d30d8174e148fc45584" | ||
16 | |||
17 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
18 | SRC_URI = " \ | ||
19 | ${REPO};${BRANCHARG} \ | ||
20 | file://99-vcu-enc-dec.rules \ | ||
21 | " | ||
22 | |||
23 | inherit module features_check | ||
24 | |||
25 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
26 | |||
27 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
28 | |||
29 | RDEPENDS:${PN} = "vcu-firmware" | ||
30 | |||
31 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
32 | |||
33 | do_install:append() { | ||
34 | install -d ${D}${sysconfdir}/udev/rules.d | ||
35 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
36 | } | ||
37 | |||
38 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.2.bb new file mode 100644 index 00000000..6137f9e3 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu/libvcu-omxil_1.1.2-xilinx-v2024.2.bb | |||
@@ -0,0 +1,53 @@ | |||
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 | # Recipe has been renamed | ||
7 | PROVIDES += "libomxil-xlnx" | ||
8 | |||
9 | # Version from core/core_version.mk | ||
10 | PV .= "+git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2024.2" | ||
13 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
14 | SRCREV = "b259cf0b3eaa1b0b17d2e807f233bfef5b9dbddd" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | S = "${WORKDIR}/git" | ||
20 | |||
21 | inherit features_check | ||
22 | |||
23 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
24 | |||
25 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
26 | |||
27 | DEPENDS = "vcu-ctrlsw" | ||
28 | RDEPENDS:${PN} = "libvcu-ctrlsw" | ||
29 | |||
30 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
31 | |||
32 | EXTRA_OEMAKE = " \ | ||
33 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
34 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
35 | " | ||
36 | |||
37 | do_install() { | ||
38 | install -d ${D}${libdir} | ||
39 | install -d ${D}${includedir}/vcu-omx-il | ||
40 | |||
41 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
42 | |||
43 | oe_runmake install INSTALL_PATH=${D}${bindir} | ||
44 | |||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
46 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
47 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
48 | } | ||
49 | |||
50 | # These libraries shouldn't get installed in world builds unless something | ||
51 | # explicitly depends upon them. | ||
52 | |||
53 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-ctrlsw_1.0.80-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-ctrlsw_1.0.80-xilinx-v2024.2.bb new file mode 100644 index 00000000..7e4f209a --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-ctrlsw_1.0.80-xilinx-v2024.2.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU encoder/decoded software API" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd" | ||
5 | |||
6 | # Recipe has been renamed | ||
7 | PROVIDES += "libvcu-xlnx" | ||
8 | |||
9 | PV .= "+git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2024.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
13 | SRCREV = "bcb5ff5f77f2a8ea8222eb64b69c1f9f730cc6b1" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit features_check | ||
21 | |||
22 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
23 | |||
24 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
25 | |||
26 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
27 | RDEPENDS:libvcu-ctrlsw = "kernel-module-vcu" | ||
28 | |||
29 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
30 | |||
31 | do_install() { | ||
32 | install -d ${D}${libdir} | ||
33 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include INSTALL_PATH=${D}/${bindir} | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | PACKAGES =+ "libvcu-ctrlsw" | ||
41 | FILES:libvcu-ctrlsw += "${libdir}/liballegro*.so.*" | ||
42 | |||
43 | # These libraries shouldn't get installed in world builds unless something | ||
44 | # explicitly depends upon them. | ||
45 | |||
46 | EXCLUDE_FROM_WORLD = "1" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-firmware_20240325-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-firmware_20240325-xilinx-v2024.2.bb new file mode 100644 index 00000000..4eb810e4 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu/vcu-firmware_20240325-xilinx-v2024.2.bb | |||
@@ -0,0 +1,41 @@ | |||
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 | PV .= "+git" | ||
7 | |||
8 | S = "${WORKDIR}/git" | ||
9 | |||
10 | BRANCH ?= "xlnx_rel_v2024.2" | ||
11 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
12 | SRCREV = "83d64885c681e835dd7d54064c6c2f66c46071d3" | ||
13 | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
15 | SRC_URI = "${REPO};${BRANCHARG}" | ||
16 | |||
17 | inherit features_check | ||
18 | |||
19 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | do_compile[noexec] = "1" | ||
24 | |||
25 | do_install() { | ||
26 | install -Dm 0644 ${S}/1.0.0/lib/firmware/al5d_b.fw ${D}${nonarch_base_libdir}/firmware/al5d_b.fw | ||
27 | install -Dm 0644 ${S}/1.0.0/lib/firmware/al5d.fw ${D}${nonarch_base_libdir}/firmware/al5d.fw | ||
28 | install -Dm 0644 ${S}/1.0.0/lib/firmware/al5e_b.fw ${D}${nonarch_base_libdir}/firmware/al5e_b.fw | ||
29 | install -Dm 0644 ${S}/1.0.0/lib/firmware/al5e.fw ${D}${nonarch_base_libdir}/firmware/al5e.fw | ||
30 | } | ||
31 | |||
32 | # Inhibit warnings about files being stripped | ||
33 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
34 | INHIBIT_PACKAGE_STRIP = "1" | ||
35 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
36 | |||
37 | # These libraries shouldn't get installed in world builds unless something | ||
38 | # explicitly depends upon them. | ||
39 | EXCLUDE_FROM_WORLD = "1" | ||
40 | |||
41 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu2/files/99-vcu2-codec.rules b/meta-xilinx-multimedia/recipes-multimedia/vcu2/files/99-vcu2-codec.rules new file mode 100644 index 00000000..54ae765d --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu2/files/99-vcu2-codec.rules | |||
@@ -0,0 +1,4 @@ | |||
1 | # Allegro VCU2 Encode, Decoder module drivers | ||
2 | SUBSYSTEM=="allegro_encode_class", KERNEL=="al_e2xx", MODE="0660", GROUP="video" | ||
3 | SUBSYSTEM=="allegro_decode_class", KERNEL=="al_d3xx", MODE="0660", GROUP="video" | ||
4 | |||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu2/kernel-module-vcu2_2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu2/kernel-module-vcu2_2024.2.bb new file mode 100644 index 00000000..a8e336a8 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu2/kernel-module-vcu2_2024.2.bb | |||
@@ -0,0 +1,36 @@ | |||
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 | PV .= "+git" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
12 | |||
13 | BRANCH = "xlnx_rel_v2024.2" | ||
14 | REPO = "git://github.com/Xilinx/vcu2-modules.git;protocol=https" | ||
15 | SRCREV = "a0b6bd20dfd986a0877e75ff86effe422be26d42" | ||
16 | |||
17 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
18 | SRC_URI = " \ | ||
19 | ${REPO};${BRANCHARG} \ | ||
20 | file://99-vcu2-codec.rules \ | ||
21 | " | ||
22 | |||
23 | inherit module features_check | ||
24 | |||
25 | REQUIRED_MACHINE_FEATURES = "vcu2" | ||
26 | |||
27 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR} KDIR=${STAGING_KERNEL_BUILDDIR}" | ||
28 | |||
29 | RDEPENDS:${PN} = "vcu2-firmware" | ||
30 | |||
31 | do_install:append() { | ||
32 | install -d ${D}${sysconfdir}/udev/rules.d | ||
33 | install -m 0644 ${WORKDIR}/99-vcu2-codec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu2/libvcu2-omxil_1.1.2-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu2/libvcu2-omxil_1.1.2-xilinx-v2024.2.bb new file mode 100644 index 00000000..bf181345 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu2/libvcu2-omxil_1.1.2-xilinx-v2024.2.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU2" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU2" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd" | ||
5 | |||
6 | # Version from core/core_version.mk | ||
7 | PV .= "+git" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2024.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu2-omx-il.git;protocol=https" | ||
11 | SRCREV = "130d56172f768e5d2f8c8a3aa75fcbad581ab2d9" | ||
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 = "vcu2" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | DEPENDS = "vcu2-ctrlsw" | ||
25 | RDEPENDS:${PN} = "libvcu2-ctrlsw" | ||
26 | |||
27 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu2-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}/vcu2-omx-il | ||
37 | |||
38 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu2-omx-il | ||
39 | |||
40 | install -Dm 0755 ${S}/bin/omx_decoder.exe ${D}/${bindir}/omx_decoder | ||
41 | install -Dm 0755 ${S}/bin/omx_encoder.exe ${D}/${bindir}/omx_encoder | ||
42 | |||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
46 | } | ||
47 | |||
48 | # These libraries shouldn't get installed in world builds unless something | ||
49 | # explicitly depends upon them. | ||
50 | |||
51 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-ctrlsw_1.0.62-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-ctrlsw_1.0.62-xilinx-v2024.2.bb new file mode 100644 index 00000000..fbc33d88 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-ctrlsw_1.0.62-xilinx-v2024.2.bb | |||
@@ -0,0 +1,49 @@ | |||
1 | SUMMARY = "Control Software for VCU2" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU2 encoder/decoder software API" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=003bf8ee942bb6256905b58e9b1b19c2" | ||
5 | |||
6 | PV .= "+git" | ||
7 | |||
8 | BRANCH ?= "xlnx_rel_v2024.2" | ||
9 | REPO ?= "git://github.com/Xilinx/vcu2-ctrl-sw.git;protocol=https" | ||
10 | SRCREV = "95b5e23881359964e7fbbf97fd754a91b6975a9b" | ||
11 | |||
12 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
13 | SRC_URI = "${REPO};${BRANCHARG}" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit features_check | ||
18 | |||
19 | REQUIRED_MACHINE_FEATURES = "vcu2" | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | #RDEPENDS:${PN} = "kernel-module-vcu2" | ||
24 | #RDEPENDS:libvcu2-ctrlsw = "kernel-module-vcu2" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -Dm 0755 ${S}/bin/AL_Encoder.exe ${D}/${bindir}/ctrlsw_encoder | ||
30 | install -Dm 0755 ${S}/bin/AL_Decoder.exe ${D}/${bindir}/ctrlsw_decoder | ||
31 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
32 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
33 | oe_libinstall -C ${S}/bin/ -so liballegro_app ${D}/${libdir}/ | ||
34 | oe_libinstall -C ${S}/bin/ -so liballegro_conv_yuv ${D}/${libdir}/ | ||
35 | |||
36 | install -d ${D}${includedir}/vcu2-ctrl-sw/include | ||
37 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu2-ctrl-sw/include | ||
38 | } | ||
39 | |||
40 | PACKAGES =+ "libvcu2-ctrlsw" | ||
41 | FILES:libvcu2-ctrlsw += "${libdir}/liballegro*.so.*" | ||
42 | |||
43 | # These libraries shouldn't get installed in world builds unless something | ||
44 | # explicitly depends upon them. | ||
45 | |||
46 | EXCLUDE_FROM_WORLD = "1" | ||
47 | |||
48 | # Disable buildpaths QA check warnings. | ||
49 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-firmware_20240329-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-firmware_20240329-xilinx-v2024.2.bb new file mode 100644 index 00000000..de6998fe --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vcu2/vcu2-firmware_20240329-xilinx-v2024.2.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Firmware for VCU2" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU2" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=19975964707b2e6e3baf7acf31d2bef0" | ||
5 | |||
6 | PV .= "+git" | ||
7 | |||
8 | S = "${WORKDIR}/git" | ||
9 | |||
10 | BRANCH ?="xlnx_rel_v2024.2" | ||
11 | REPO ?= "git://github.com/Xilinx/vcu2-firmware.git;protocol=https" | ||
12 | SRCREV = "83190f880978648c981d06778317985fc893eac4" | ||
13 | |||
14 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
15 | SRC_URI = "${REPO};${BRANCHARG}" | ||
16 | |||
17 | inherit features_check | ||
18 | |||
19 | REQUIRED_MACHINE_FEATURES = "vcu2" | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | do_compile[noexec] = "1" | ||
24 | |||
25 | do_install() { | ||
26 | install -Dm 0644 ${S}/decoder_firmware.bin ${D}${nonarch_base_libdir}/firmware/ald3xx.fw | ||
27 | install -Dm 0644 ${S}/encoder_firmware.bin ${D}${nonarch_base_libdir}/firmware/ale2xx.fw | ||
28 | } | ||
29 | |||
30 | # Inhibit warnings about files being stripped | ||
31 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
32 | INHIBIT_PACKAGE_STRIP = "1" | ||
33 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" | ||
34 | |||
35 | # These libraries shouldn't get installed in world builds unless something | ||
36 | # explicitly depends upon them. | ||
37 | EXCLUDE_FROM_WORLD = "1" | ||
38 | |||
39 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vdu/kernel-module-vdu_2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vdu/kernel-module-vdu_2024.2.bb new file mode 100644 index 00000000..2e784e3c --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vdu/kernel-module-vdu_2024.2.bb | |||
@@ -0,0 +1,34 @@ | |||
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 = "GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | PV .= "+git" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2024.2" | ||
13 | REPO ?= "git://github.com/Xilinx/vdu-modules.git;protocol=https" | ||
14 | SRCREV ?= "25773344ce1e539e7136c5a30cdee98a6cf490a8" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG} \ | ||
18 | file://99-vdu-enc-dec.rules \ | ||
19 | " | ||
20 | |||
21 | inherit module features_check | ||
22 | |||
23 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
24 | |||
25 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
26 | |||
27 | RDEPENDS:${PN} = "vdu-firmware" | ||
28 | |||
29 | do_install:append() { | ||
30 | install -d ${D}${sysconfdir}/udev/rules.d | ||
31 | install -m 0644 ${WORKDIR}/99-vdu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.2.bb new file mode 100644 index 00000000..0fb0d1ea --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vdu/libvdu-omxil_1.1.2-xilinx-v2024.2.bb | |||
@@ -0,0 +1,49 @@ | |||
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 | PV .= "+git" | ||
7 | |||
8 | BRANCH ?= "xlnx_rel_v2024.2" | ||
9 | REPO ?= "git://github.com/Xilinx/vdu-omx-il.git;protocol=https" | ||
10 | SRCREV ?= "af9c6e8935799f4dcd579b0164dd05eb039b569d" | ||
11 | |||
12 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
13 | SRC_URI = "${REPO};${BRANCHARG}" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/git" | ||
17 | |||
18 | inherit autotools features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | DEPENDS = "vdu-ctrlsw" | ||
25 | RDEPENDS:${PN} = "libvdu-ctrlsw" | ||
26 | |||
27 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vdu-ctrl-sw/include" | ||
28 | |||
29 | do_compile[dirs] = "${S}" | ||
30 | do_install[dirs] = "${S}" | ||
31 | |||
32 | EXTRA_OEMAKE = " \ | ||
33 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
34 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
35 | INSTALL_PATH=${D}${bindir} \ | ||
36 | INCLUDE_INST_PATH=${D}${includedir} \ | ||
37 | " | ||
38 | |||
39 | do_install:append() { | ||
40 | install -d ${D}${libdir} | ||
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 | } | ||
45 | |||
46 | # These libraries shouldn't get installed in world builds unless something | ||
47 | # explicitly depends upon them. | ||
48 | |||
49 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-ctrlsw_1.0.79-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-ctrlsw_1.0.79-xilinx-v2024.2.bb new file mode 100644 index 00000000..7134e7e0 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-ctrlsw_1.0.79-xilinx-v2024.2.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | SUMMARY = "Control Software for VDU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VDU deconder software API" | ||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=002a0a92906100955ea6ed02dcd2c2cd" | ||
5 | |||
6 | # Recipe has been renamed | ||
7 | PROVIDES += "libvdu-ctrlsw" | ||
8 | |||
9 | PV .= "+git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2024.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vdu-ctrl-sw.git;protocol=https" | ||
13 | SRCREV ?= "361a822a223dc430ca44641be148fe1cbc13dd10" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | B = "${S}" | ||
20 | |||
21 | inherit autotools features_check | ||
22 | |||
23 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
24 | |||
25 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
26 | |||
27 | RDEPENDS:${PN} = "kernel-module-vdu" | ||
28 | RDEPENDS:libvdu-ctrlsw = "kernel-module-vdu" | ||
29 | |||
30 | do_compile[dirs] = "${S}" | ||
31 | do_install[dirs] = "${S}" | ||
32 | |||
33 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
34 | EXTRA_OEMAKE +=" INSTALL_HDR_PATH=${D}${includedir}/vdu-ctrl-sw/include INSTALL_PATH=${D}${bindir}" | ||
35 | |||
36 | do_install:append() { | ||
37 | |||
38 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
39 | } | ||
40 | |||
41 | PACKAGES =+ "libvdu-ctrlsw" | ||
42 | FILES:libvdu-ctrlsw += "${libdir}/liballegro*.so.*" | ||
43 | |||
44 | # These libraries shouldn't get installed in world builds unless something | ||
45 | # explicitly depends upon them. | ||
46 | |||
47 | EXCLUDE_FROM_WORLD = "1" | ||
48 | |||
49 | # Disable buildpaths QA check warnings. | ||
50 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.2.bb b/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.2.bb new file mode 100644 index 00000000..75bc21d9 --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/vdu/vdu-firmware_20240216-xilinx-v2024.2.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 | PV .= "+git" | ||
7 | |||
8 | S = "${WORKDIR}/git" | ||
9 | B = "${S}" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2024.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vdu-firmware.git;protocol=https" | ||
13 | SRCREV ?= "724de80630edcb87d865d69f1a6c0dc61c3f9f12" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit autotools features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vdu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
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-standalone-experimental b/meta-xilinx-standalone-experimental deleted file mode 120000 index 57cd8cff..00000000 --- a/meta-xilinx-standalone-experimental +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | meta-xilinx-standalone-sdt \ No newline at end of file | ||
diff --git a/meta-xilinx-standalone-experimental/conf/layer.conf b/meta-xilinx-standalone-experimental/conf/layer.conf new file mode 100644 index 00000000..73375a00 --- /dev/null +++ b/meta-xilinx-standalone-experimental/conf/layer.conf | |||
@@ -0,0 +1,21 @@ | |||
1 | # We have a conf and classes directory, add to BBPATH | ||
2 | BBPATH .= ":${LAYERDIR}" | ||
3 | |||
4 | # We have recipes-* directories, add to BBFILES | ||
5 | #BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | ||
6 | # ${LAYERDIR}/recipes-*/*/*.bbappend \ | ||
7 | # ${LAYERDIR}/recipes-*/*.bb \ | ||
8 | # ${LAYERDIR}/recipes-*/*.bbappend \ | ||
9 | # " | ||
10 | |||
11 | BBFILE_COLLECTIONS += "xilinx-standalone-experimental" | ||
12 | BBFILE_PATTERN_xilinx-standalone-experimental = "^${LAYERDIR}/" | ||
13 | BBFILE_PRIORITY_xilinx-standalone-experimental = "7" | ||
14 | |||
15 | LAYERDEPENDS_xilinx-standalone-experimental = "core \ | ||
16 | xilinx \ | ||
17 | xilinx-standalone \ | ||
18 | xilinx-microblaze \ | ||
19 | " | ||
20 | |||
21 | LAYERSERIES_COMPAT_xilinx-standalone-experimental = "scarthgap" | ||
diff --git a/meta-xilinx-standalone-sdt/README.md b/meta-xilinx-standalone-sdt/README.md index d2d54c2e..97141332 100644 --- a/meta-xilinx-standalone-sdt/README.md +++ b/meta-xilinx-standalone-sdt/README.md | |||
@@ -1,155 +1,10 @@ | |||
1 | # meta-xilinx-standalone-sdt | 1 | # meta-xilinx-standalone-sdt |
2 | 2 | ||
3 | This layer contains System Device Tree items that are related to the | 3 | This layer contains System Device Tree build metadata such as multiconfig operating |
4 | meta-xilinx-standalone layer. | 4 | environment(baremetal, freertos etc) boot firmware drivers, libraries and |
5 | applications recipes. | ||
5 | 6 | ||
6 | ## Build Instructions | 7 | See [SDT Build Instructions](README.sdt.bsp.md) for SDT build workflows. |
7 | |||
8 | The Yocto Project setup for the System Device Tree (SDT) workflow is as follows. | ||
9 | Be sure to read everything below. | ||
10 | |||
11 | > **Pre-requisites:** | ||
12 | > * To use this layer you must REMOVE meta-xilinx-tools from your project. | ||
13 | meta-xilinx-tools is not compatible with this SDT approach. You may | ||
14 | also have to remove other layers that depend on meta-xilinx-tools, such as | ||
15 | meta-kria and meta-system-controller. | ||
16 | > * Follow [System Device Tree Instructions](https://github.com/Xilinx/system-device-tree-xlnx/blob/master/README.md) | ||
17 | > to generate the SDT output. | ||
18 | > * To use the SDT 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. | ||
21 | |||
22 | 1. Follow [Building Instructions](../README.building.md) upto step 2. | ||
23 | |||
24 | 2. Clone the meta-openamp repository. | ||
25 | |||
26 | ``` | ||
27 | $ git clone -b <rel-version> https://github.com/Xilinx/meta-openamp | ||
28 | ``` | ||
29 | 3. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) | ||
30 | from step 3 to step 4. | ||
31 | |||
32 | 4. Remove meta-xilinx-tools and meta-xilinx-tools dependency layers(such as | ||
33 | meta-kria and meta-system-controller if included in bblayers.conf), then add | ||
34 | the meta-xilinx-standalone-sdt and meta-openamp layer. | ||
35 | |||
36 | > **Note:** SDT builds for following devices are not supported in 2024.1 release. | ||
37 | > * Zynq 7000 | ||
38 | > * MicoBlaze | ||
39 | > * Kria | ||
40 | > * System Controller | ||
41 | |||
42 | ``` | ||
43 | $ bitbake-layers remove-layer meta-xilinx-tools | ||
44 | $ bitbake-layers remove-layer meta-kria | ||
45 | $ bitbake-layers remove-layer meta-system-controller | ||
46 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-standalone-sdt | ||
47 | $ bitbake-layers add-layer ./<path-to-layer>/meta-openamp | ||
48 | ``` | ||
49 | |||
50 | 5. Export gen-machineconf tool. | ||
51 | ``` | ||
52 | $ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf | ||
53 | ``` | ||
54 | |||
55 | 6. Run the script from the build or ${TOPDIR} directory. This step describes | ||
56 | System Device Tree (SDT) with and without pl overlays. Configruations are same | ||
57 | for both SDT with and without pl overlays except for linux dts content. | ||
58 | |||
59 | > **Note:** | ||
60 | > 1. The -l option will automatically add the necessary parameters to the | ||
61 | local.conf file. If you need to re-run this comment, you just clear the | ||
62 | parameters from the end of the file. Without the -l option the items are | ||
63 | printed to the screen and must be manually added to your conf/local.conf | ||
64 | > 2. The --soc-family argument is an optional argument and user can skip this. | ||
65 | > 3. By default minimal set of multiconfigs are generated by gen-machineconf tool. | ||
66 | > To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use | ||
67 | > `--multiconfigfull` option. | ||
68 | |||
69 | a. Without SDT pl overlay: | ||
70 | ``` | ||
71 | $ gen-machineconf --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf | ||
72 | ``` | ||
73 | |||
74 | b. With SDT pl overlay: | ||
75 | To generate SDT pl overlay run gen-machineconf command with | ||
76 | `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully | ||
77 | pl.dtsi will be generated under <conf>/dts/${MACHINE}/pl-overlay-{full|dfx} | ||
78 | directory. User can use this pl.dtsi as input to full or dfx static firmware | ||
79 | recipes. | ||
80 | |||
81 | > **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User | ||
82 | > needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output | ||
83 | > artifacts to DFx partial firmware recipes. | ||
84 | |||
85 | * ZynqMP Full bitstream or Versal Segmented Configuration: | ||
86 | ``` | ||
87 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g full | ||
88 | ``` | ||
89 | |||
90 | * ZynqMP or Versal DFx: | ||
91 | ``` | ||
92 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf> -l conf/local.conf -g dfx | ||
93 | ``` | ||
94 | |||
95 | For example, zynqmp: | ||
96 | ``` | ||
97 | $ gen-machineconf --soc-family zynqmp --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf | ||
98 | ``` | ||
99 | The following will be written to the end of the conf/local.conf file: | ||
100 | |||
101 | ``` | ||
102 | # Use the newly generated MACHINE | ||
103 | MACHINE = "xlnx-zynqmp-zcu102-rev1-0" | ||
104 | |||
105 | # Avoid errors in some baremetal configs as these layers may be present | ||
106 | # but are not used. Note the following lines are optional and can be | ||
107 | # safetly disabled. | ||
108 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
109 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
110 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
111 | |||
112 | # Each generated multiconfig defines it's own TMPDIR, either edit the | ||
113 | # multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below | ||
114 | #MC_TMPDIR_PREFIX = "${TOPDIR}/tmp" | ||
115 | ``` | ||
116 | |||
117 | For example, versal: | ||
118 | ``` | ||
119 | $ gen-machineconf --soc-family versal --hw-description <path_to_sdtgen_output_directory> -c conf/ -l conf/local.conf | ||
120 | ``` | ||
121 | |||
122 | The following will be written to the end of the conf/local.conf file: | ||
123 | |||
124 | ``` | ||
125 | # Use the newly generated MACHINE | ||
126 | MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva" | ||
127 | |||
128 | # Avoid errors in some baremetal configs as these layers may be present | ||
129 | # but are not used. Note the following lines are optional and can be | ||
130 | # safetly disabled. | ||
131 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
132 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
133 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
134 | |||
135 | # Each generated multiconfig defines it's own TMPDIR, either edit the | ||
136 | # multiconfig files, or uncomment and adjust MC_TMPDIR_PREFIX below | ||
137 | #MC_TMPDIR_PREFIX = "${TOPDIR}/tmp" | ||
138 | ``` | ||
139 | > **Bitbake Performance Note:** | ||
140 | Each BBMULTICONFIG value requires all of the recipes to be parsed for that | ||
141 | configuration. Thus each multiconfig will add more parsing time. A long list | ||
142 | can lead to a very slow parse (many minutes). To speed up parsing, it is | ||
143 | suggested that you trim this down to only the configurations you require. | ||
144 | A minimum configuration is included with the generated configuration. | ||
145 | |||
146 | |||
147 | 7. Build your project, You should now be able to build your project normally. | ||
148 | See the Yocto Project documentation if you have questions on how to work with | ||
149 | the multiconfig recipes. The following is a simple build for testing. | ||
150 | |||
151 | 8. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) | ||
152 | from step 6. | ||
153 | 8 | ||
154 | ## Dependencies | 9 | ## Dependencies |
155 | 10 | ||
@@ -163,18 +18,22 @@ This layer depends on: | |||
163 | layers: meta-oe | 18 | layers: meta-oe |
164 | branch: scarthgap | 19 | branch: scarthgap |
165 | 20 | ||
21 | URI: https://git.yoctoproject.org/meta-arm | ||
22 | layers: meta-arm, meta-arm-toolchain | ||
23 | branch: scarthgap | ||
24 | |||
166 | URI: | 25 | URI: |
167 | https://git.yoctoproject.org/meta-xilinx (official version) | 26 | https://git.yoctoproject.org/meta-xilinx (official version) |
168 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 27 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
169 | layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone | 28 | layers: meta-xilinx-core, meta-xilinx-bsp, meta-xilinx-standalone |
170 | branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2) | 29 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
171 | 30 | ||
172 | URI: | 31 | URI: |
173 | https://git.yoctoproject.org/meta-virtualization (official version) | 32 | https://git.yoctoproject.org/meta-virtualization (official version) |
174 | https://github.com/Xilinx/meta-virtualization (development and amd xilinx release) | 33 | https://github.com/Xilinx/meta-virtualization (development and AMD release) |
175 | branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2) | 34 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
176 | 35 | ||
177 | URI: | 36 | URI: |
178 | https://github.com/OpenAMP/meta-openamp (official version) | 37 | https://github.com/OpenAMP/meta-openamp (official version) |
179 | https://github.com/Xilinx/meta-openamp (development and amd xilinx release) | 38 | https://github.com/Xilinx/meta-openamp (development and AMD release) |
180 | branch: scarthgap or amd xilinx release version (e.g. rel-v2024.2) | 39 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-xilinx-standalone-sdt/README.sdt.bsp.md b/meta-xilinx-standalone-sdt/README.sdt.bsp.md index 2b2ce4b0..db9bac0a 100644 --- a/meta-xilinx-standalone-sdt/README.sdt.bsp.md +++ b/meta-xilinx-standalone-sdt/README.sdt.bsp.md | |||
@@ -1,46 +1,163 @@ | |||
1 | # SDT BSP | 1 | # AMD SDT BSP Machines files |
2 | 2 | ||
3 | This section describes the SDT BSP settings which must be added to the generated | 3 | This section describes the SDT BSP machine files generation. |
4 | machine configuration file, following [Build Instructions](README.md) step 4, in | ||
5 | order to use the runqemu command. | ||
6 | 4 | ||
7 | ## SDT BSP settings | 5 | ## SDT Build Instructions |
8 | 6 | ||
9 | The following board settings need to be added in sdt machine configuration file | 7 | The Yocto Project setup for the System Device Tree (SDT) workflow is as follows. |
10 | to define which QEMU device trees should be used. | 8 | Be sure to read everything below. |
11 | 9 | ||
12 | > **Variable usage examples:** | 10 | > **Pre-requisites:** |
11 | > * Follow [System Device Tree Instructions](https://github.com/Xilinx/system-device-tree-xlnx/blob/master/README.md) | ||
12 | > to generate the SDT output. | ||
13 | > * To use the SDT version of the embedded software (firmware) as well as system | ||
14 | > configuration, you must build through gen-machineconf tool. This tool is passed | ||
15 | > a output of system device tree directory. | ||
16 | > * meta-xilinx-standalone-sdt layer depends on meta-openamp layer make sure | ||
17 | > meta-openamp is cloned and add using `bitbake-layers` command. | ||
18 | |||
19 | > **Note:** SDT builds for following devices are not supported in 2024.2 release. | ||
20 | > * MicroBlaze | ||
21 | |||
22 | 1. Follow [Building Instructions](../README.building.md) upto step 6. | ||
23 | |||
24 | 2. Export gen-machineconf tool. | ||
25 | ``` | ||
26 | $ export PATH=$PATH:<ABSOLUTE_PATH>/gen-machine-conf | ||
27 | ``` | ||
28 | |||
29 | 3. Run the script from the build or ${TOPDIR} directory. This step describes | ||
30 | System Device Tree (SDT) with and without pl overlays. Configruations are same | ||
31 | for both SDT with and without pl overlays except for linux dts content. | ||
32 | |||
33 | > **Note:** | ||
34 | > 1. The -c option should point either <path-to-machine-bsp-layer>/conf or <path-to-build-directory>/build/conf | ||
35 | > directory. | ||
36 | > 2. The -l option will automatically add the necessary parameters to the | ||
37 | local.conf file. If you need to re-run this comment, you just clear the | ||
38 | parameters from the end of the file. Without the -l option the items are | ||
39 | printed to the screen and must be manually added to your conf/local.conf | ||
40 | > 3. The --soc-family argument is an optional argument and user can skip this. | ||
41 | > 4. By default minimal set of multiconfigs are generated by gen-machineconf tool. | ||
42 | > To enable full multiconfig(APU/RPU baremetal or FreeRTOS) then use | ||
43 | > `--multiconfigfull` option. | ||
44 | |||
45 | > **Recommended SDT Machine nomenclature:** | ||
46 | > | ||
47 | > 1. Machine Configuration file nomenclature: `<soc-family>-<board-name>-sdt-<design-name>` | ||
48 | > * Example: `MACHINE = "versal-vek280-sdt-seg"` | ||
13 | > | 49 | > |
14 | > QEMU Device tree deploy directory: `QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch"` | 50 | > 2. BSP Reference design name: |
15 | > | 51 | > * `full` - Zynq-7000/ZynqMP full bitstream loading Vivado design. |
16 | > QEMU PMU Device tree: `QEMU_HW_DTB_PMU = "${QEMU_HW_DTB_PATH}/zynqmp-pmu.dtb"` | 52 | > * `dfx` - ZynqMP/Versal full bitstream loading Vivado design. |
17 | > | 53 | > * `seg` - Versal Segmented Configuration Vivado design. |
18 | > QEMU PS Device tree: `QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb"` | ||
19 | > | 54 | > |
20 | > QEMU PMC Board Device tree: `QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb"` | 55 | > **Note:** In machine file nomencalutre `<soc-family>-<board-name>-sdt-<design-name>` |
56 | > If design-name suffix is not set or defined then it is treated as flat design | ||
57 | > without dynamic PL configuration. | ||
58 | |||
59 | a. Without SDT pl overlay: | ||
60 | ``` | ||
61 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> | ||
62 | ``` | ||
63 | |||
64 | b. With SDT pl overlay: | ||
65 | To generate SDT pl overlay run gen-machineconf command with | ||
66 | `-g {full|dfx}` option. Once SDT pl overlay command is executed successfully | ||
67 | pl.dtsi will be generated under <conf-directory>/dts/${MACHINE}/pl-overlay-{full|dfx} | ||
68 | directory. User can use this pl.dtsi as input to full or dfx static firmware | ||
69 | recipes. See https://github.com/Xilinx/meta-xilinx/blob/master/docs/README.dfx.user.dts.md | ||
70 | for more details. | ||
71 | |||
72 | > **Note:** DFx partial dtsi is not processed by gen-machineconf(lopper) tool, User | ||
73 | > needs to use the *_partial.dtsi and *_partial.pdi/bit from sdtgen output | ||
74 | > artifacts to DFx partial firmware recipes. | ||
75 | |||
76 | * Zynq-700 or ZynqMP Full bitstream or Versal Segmented Configuration: | ||
77 | ``` | ||
78 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> -g full | ||
79 | ``` | ||
80 | |||
81 | * ZynqMP or Versal DFx: | ||
82 | ``` | ||
83 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> -g dfx | ||
84 | ``` | ||
85 | |||
86 | For example, Zynq-7000: | ||
87 | ``` | ||
88 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> | ||
89 | ``` | ||
90 | The following will be written to the end of the <path-to-build-directory>/build/conf/local.conf file: | ||
91 | |||
92 | ``` | ||
93 | # Use the newly generated MACHINE | ||
94 | MACHINE = "zynq-zc702-sdt" | ||
95 | |||
96 | # Avoid errors in some baremetal configs as these layers may be present | ||
97 | # but are not used. Note the following lines are optional and can be | ||
98 | # safetly disabled. | ||
99 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
100 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
101 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
102 | ``` | ||
103 | |||
104 | For example, ZynqMP: | ||
105 | ``` | ||
106 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> | ||
107 | ``` | ||
108 | The following will be written to the end of the <path-to-build-directory>/conf/local.conf file: | ||
109 | |||
110 | ``` | ||
111 | # Use the newly generated MACHINE | ||
112 | MACHINE = "zynqmp-zcu102-sdt" | ||
113 | |||
114 | # Avoid errors in some baremetal configs as these layers may be present | ||
115 | # but are not used. Note the following lines are optional and can be | ||
116 | # safetly disabled. | ||
117 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
118 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
119 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
120 | ``` | ||
121 | |||
122 | For example, Versal: | ||
123 | ``` | ||
124 | $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> | ||
125 | ``` | ||
126 | |||
127 | The following will be written to the end of the <path-to-build-directory>/conf/local.conf file: | ||
128 | |||
129 | ``` | ||
130 | # Use the newly generated MACHINE | ||
131 | MACHINE = "versal-vmk180-sdt" | ||
132 | |||
133 | # Avoid errors in some baremetal configs as these layers may be present | ||
134 | # but are not used. Note the following lines are optional and can be | ||
135 | # safetly disabled. | ||
136 | SKIP_META_VIRT_SANITY_CHECK = "1" | ||
137 | SKIP_META_SECURITY_SANITY_CHECK = "1" | ||
138 | SKIP_META_TPM_SANITY_CHECK = "1" | ||
139 | ``` | ||
140 | |||
141 | > **Bitbake Performance Note:** | ||
142 | Each BBMULTICONFIG value requires all of the recipes to be parsed for that | ||
143 | configuration. Thus each multiconfig will add more parsing time. A long list | ||
144 | can lead to a very slow parse (many minutes). To speed up parsing, it is | ||
145 | suggested that you trim this down to only the configurations you require. | ||
146 | A minimum configuration is included with the generated configuration. | ||
147 | |||
148 | 4. Build your project, You should now be able to build your project normally. | ||
149 | See the Yocto Project documentation if you have questions on how to work with | ||
150 | the multiconfig recipes. The following is a simple build for testing. | ||
151 | |||
152 | 5. Continue [Building Instructions](https://github.com/Xilinx/meta-xilinx/blob/master/README.building.md) | ||
153 | from step 8. | ||
154 | |||
155 | >**Note:** Only AMD eval boards have the dtsi in System Device Tree repo, for custom | ||
156 | > board user has to follow one of the following methods. | ||
157 | > 1. Patch System Device Tree to include the custom board dtsi and include the | ||
158 | > custom board dtsi during sdtgen build step. | ||
159 | > `% sdtgen set_dt_param -board_dts <custom-board-dtsi-name>` | ||
21 | > | 160 | > |
22 | > QEMU Memory: Some boards for example VEK280 and VH158 memory configurations are | 161 | > 2. Create a custom board dtsi file and use EXTRA_DT_INCLUDE_FILES variable to |
23 | > different, Hence we need to adjust the same in QB_MEM to match board dtsi files. | 162 | > include the custom board dtsi to final dtb. Here is the example usage. |
24 | > Below are some examples. | 163 | > `EXTRA_DT_INCLUDE_FILES:append = " <path-to-directory>/<custom-board>.dtsi"` |
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-sdt/README.sdt.mc.build.md b/meta-xilinx-standalone-sdt/README.sdt.mc.build.md new file mode 100644 index 00000000..33283577 --- /dev/null +++ b/meta-xilinx-standalone-sdt/README.sdt.mc.build.md | |||
@@ -0,0 +1,40 @@ | |||
1 | # AMD SDT Multiconfig Build Instructions | ||
2 | |||
3 | This readme describes how to build multiconfig baremetal baremetal or freertos | ||
4 | applications. Once the applications are built it can be package and deploy baremetal | ||
5 | or freertos application elf or bin files to linux root filesystem under /lib/firmware | ||
6 | directory. | ||
7 | |||
8 | ## How to configure and build multiconfig baremetal or freertos applications | ||
9 | |||
10 | 1. Follow [SDT Building Instructions](README.sdt.bsp.md) upto step 3. | ||
11 | |||
12 | 2. By default minimal set of multiconfigs are generated by gen-machineconf tool. | ||
13 | To build multiconfig(APU/RPU baremetal or FreeRTOS) use `--multiconfigfull` | ||
14 | option to enable full multiconfig(avaiable all APU/RPU cores). | ||
15 | > **Note:** | ||
16 | > 1. To enable multiconfigs for selected APU/PRU cores then use `--meunuconfig` | ||
17 | > options from gen-machineconf tool to generate the Kconfig menu and go to | ||
18 | > `Multiconfig Targets` to make the selection. | ||
19 | > 2. Example usage: | ||
20 | > ``` | ||
21 | > $ gen-machineconf parse-sdt --hw-description <path_to_sdtgen_output_directory> -c <conf-directory> -l <path-to-build-directory>/build/conf/local.conf --machine-name <soc-family>-<board-name>-sdt-<design-name> --multiconfig --menuconfig | ||
22 | > ``` | ||
23 | |||
24 | 3. Run following command to build multiconfig baremetal baremetal or freertos applications. | ||
25 | > **Note:** See [recipes-applications](./recipes-applications/) directory for | ||
26 | > list of available multiconfig applications. | ||
27 | |||
28 | * Usage: | ||
29 | ``` | ||
30 | $ bitbake mc:<soc-family>-<board-name>-sdt-<design-name>-<apu-or-rpu>-<cpu-core-number>-<baremetal-or-freertos>:<application-recipe-name> | ||
31 | ``` | ||
32 | * Example: | ||
33 | ``` | ||
34 | $ bitbake mc:versal-vek280-sdt-cortexr5-0-freertos:freertos-hello-world | ||
35 | ``` | ||
36 | |||
37 | 4. Follow [Firware Packaging Instructions](../docs/README.fw.package.md) if you | ||
38 | need to package the multiconfig applications to linux rootfs or Follow | ||
39 | [SDT Building Instructions](README.sdt.bsp.md) and continue from step 5 to build | ||
40 | target images. | ||
diff --git a/meta-xilinx-standalone-sdt/classes-global/sanity-meta-xilinx-standalone-sdt.bbclass b/meta-xilinx-standalone-sdt/classes-global/sanity-meta-xilinx-standalone-sdt.bbclass index dcafe02b..4234f38b 100644 --- a/meta-xilinx-standalone-sdt/classes-global/sanity-meta-xilinx-standalone-sdt.bbclass +++ b/meta-xilinx-standalone-sdt/classes-global/sanity-meta-xilinx-standalone-sdt.bbclass | |||
@@ -1,10 +1,10 @@ | |||
1 | addhandler security_bbappend_distrocheck | 1 | addhandler standalone_sdt_bbappend_distrocheck |
2 | security_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck" | 2 | standalone_sdt_bbappend_distrocheck[eventmask] = "bb.event.SanityCheck" |
3 | python security_bbappend_distrocheck() { | 3 | python standalone_sdt_bbappend_distrocheck() { |
4 | skip_check = e.data.getVar('SKIP_META_XILINX_TOOLS_SANITY_CHECK') == "1" | 4 | skip_check = e.data.getVar('SKIP_META_XILINX_STANDALONE_SDT_SANITY_CHECK') == "1" |
5 | if e.data.getVar('XILINX_WITH_ESW') != 'sdt' and not skip_check: | 5 | if e.data.getVar('XILINX_WITH_ESW') != 'sdt' and not skip_check: |
6 | bb.warn("You have included the meta-xilinx-standalone-sdt layer, but \ | 6 | bb.warn("You have included the meta-xilinx-standalone-sdt layer, but \ |
7 | it has not been enabled using XILINX_WITH_ESW in your configuration. Some \ | 7 | it has not been enabled using XILINX_WITH_ESW in your configuration. Some \ |
8 | bbappend files and preferred version setting may not take effect. See the \ | 8 | bbappend files and preferred version setting may not take effect. See the \ |
9 | meta-security README for details on enabling security support.") | 9 | meta-xilinx-standalone-sdt README for details.") |
10 | } | 10 | } |
diff --git a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass index abd08a5d..76245cf7 100644 --- a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass +++ b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass | |||
@@ -142,11 +142,6 @@ python do_generate_driver_data() { | |||
142 | bb.error("Couldn't find source dir %s" % d.getVar('OECMAKE_SOURCEPATH')) | 142 | bb.error("Couldn't find source dir %s" % d.getVar('OECMAKE_SOURCEPATH')) |
143 | 143 | ||
144 | os.chdir(d.getVar('B')) | 144 | os.chdir(d.getVar('B')) |
145 | command = ["lopper"] + ["-f"] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] | 145 | command = ["lopper"] + ["-f"] + ["-O"] + [src_dir[0]] + [system_dt[0]] + ["--"] + ["baremetalconfig_xlnx.py"] + [machine] + [src_dir[0]] |
146 | subprocess.run(command, check = True) | 146 | subprocess.run(command, check = True) |
147 | src_file = glob.glob('*_g.c') | ||
148 | if src_file and os.path.exists(src_file[0]): | ||
149 | bb.note("Generated config file for driver %s" % driver_name) | ||
150 | command = ["install"] + ["-m"] + ["0755"] + [src_file[0]] + [src_dir[0]] | ||
151 | subprocess.run(command, check = True) | ||
152 | } | 147 | } |
diff --git a/meta-xilinx-standalone-sdt/conf/distro/xilinx-freertos.conf b/meta-xilinx-standalone-sdt/conf/distro/xilinx-freertos.conf index 84638022..88779faa 100644 --- a/meta-xilinx-standalone-sdt/conf/distro/xilinx-freertos.conf +++ b/meta-xilinx-standalone-sdt/conf/distro/xilinx-freertos.conf | |||
@@ -1,5 +1,8 @@ | |||
1 | require conf/distro/xilinx-standalone.inc | 1 | require conf/distro/xilinx-standalone.inc |
2 | 2 | ||
3 | # Make sure any users get the xilinx-standalone distro override | ||
4 | DISTROOVERRIDES =. "xilinx-standalone:" | ||
5 | |||
3 | DISTRO_NAME:append = " (freertos)" | 6 | DISTRO_NAME:append = " (freertos)" |
4 | 7 | ||
5 | XLNX_CMAKE_SYSTEM_NAME = "FreeRTOS" | 8 | XLNX_CMAKE_SYSTEM_NAME = "FreeRTOS" |
diff --git a/meta-xilinx-standalone-sdt/conf/layer.conf b/meta-xilinx-standalone-sdt/conf/layer.conf index 805e002c..5685f4e4 100644 --- a/meta-xilinx-standalone-sdt/conf/layer.conf +++ b/meta-xilinx-standalone-sdt/conf/layer.conf | |||
@@ -25,9 +25,6 @@ LAYERDEPENDS_xilinx-standalone-sdt = "core \ | |||
25 | 25 | ||
26 | LAYERSERIES_COMPAT_xilinx-standalone-sdt = "scarthgap" | 26 | LAYERSERIES_COMPAT_xilinx-standalone-sdt = "scarthgap" |
27 | 27 | ||
28 | # Set this to enable this layer | ||
29 | XILINX_WITH_ESW ?= "sdt" | ||
30 | |||
31 | # Sanity check for meta-xilinx-standalone layer. | 28 | # Sanity check for meta-xilinx-standalone layer. |
32 | # Setting SKIP_META_XILINX_STANDALONE_SANITY_CHECK to "1" would skip the bbappend files check. | 29 | # Setting SKIP_META_XILINX_STANDALONE_SANITY_CHECK to "1" would skip the bbappend files check. |
33 | INHERIT += "sanity-meta-xilinx-standalone-sdt" | 30 | INHERIT += "sanity-meta-xilinx-standalone-sdt" |
diff --git a/meta-xilinx-standalone-sdt/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.2.bb new file mode 100644 index 00000000..4287bb0a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/ddr-self-refresh/ddr-self-refresh_2024.2.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-sdt/recipes-applications/empty-application/empty-application_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/empty-application/empty-application_2024.2.bb new file mode 100644 index 00000000..2c70796a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/empty-application/empty-application_2024.2.bb | |||
@@ -0,0 +1,43 @@ | |||
1 | inherit esw deploy python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/empty_application/src/" | ||
4 | |||
5 | DEPENDS += "libxil 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 | install -m 0644 ${CUSTOM_SRCFILE}/* ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | cp -rf ${S}/scripts/linker_files/ ${S}/${ESW_COMPONENT_SRC}/linker_files | ||
15 | ) | ||
16 | } | ||
17 | |||
18 | CUSTOM_APP_IMAGE_NAME ??= "custom-application" | ||
19 | |||
20 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
21 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
22 | |||
23 | inherit image-artifact-names | ||
24 | |||
25 | CUSTOM_APP_BASE_NAME ?= "${CUSTOM_APP_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${BB_CURRENT_MC}${IMAGE_VERSION_SUFFIX}" | ||
26 | |||
27 | ESW_COMPONENT ??= "empty_application.elf" | ||
28 | |||
29 | do_compile:append() { | ||
30 | ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/empty_application.bin | ||
31 | } | ||
32 | |||
33 | do_install() { | ||
34 | : | ||
35 | } | ||
36 | |||
37 | do_deploy() { | ||
38 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.elf | ||
39 | ln -sf ${CUSTOM_APP_BASE_NAME}.elf ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.elf | ||
40 | install -m 0644 ${B}/empty_application.bin ${DEPLOYDIR}/${CUSTOM_APP_BASE_NAME}.bin | ||
41 | ln -sf ${CUSTOM_APP_BASE_NAME}.bin ${DEPLOYDIR}/${CUSTOM_APP_IMAGE_NAME}-${MACHINE}-${BB_CURRENT_MC}.bin | ||
42 | } | ||
43 | addtask deploy before do_build after do_install | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-applications/freertos-hello-world/freertos-hello-world_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-hello-world/freertos-hello-world_2024.2.bb new file mode 100644 index 00000000..97d2ba0a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-hello-world/freertos-hello-world_2024.2.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-sdt/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.2.bb new file mode 100644 index 00000000..58d5b9c7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-echo-server/freertos-lwip-echo-server_2024.2.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-sdt/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.2.bb new file mode 100644 index 00000000..5c00254c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-tcp-perf-client/freertos-lwip-tcp-perf-client_2024.2.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-sdt/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.2.bb new file mode 100644 index 00000000..910a6fa2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-tcp-perf-server/freertos-lwip-tcp-perf-server_2024.2.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-sdt/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.2.bb new file mode 100644 index 00000000..c20d640d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-udp-perf-client/freertos-lwip-udp-perf-client_2024.2.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-sdt/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.2.bb new file mode 100644 index 00000000..194b0565 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/freertos-lwip-udp-perf-server/freertos-lwip-udp-perf-server_2024.2.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-sdt/recipes-applications/hello-world/hello-world_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/hello-world/hello-world_2024.2.bb new file mode 100644 index 00000000..ee0afec5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/hello-world/hello-world_2024.2.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-sdt/recipes-applications/lwip-echo-server/lwip-echo-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/lwip-echo-server/lwip-echo-server_2024.2.bb new file mode 100644 index 00000000..f3397f7f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/lwip-echo-server/lwip-echo-server_2024.2.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-sdt/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.2.bb new file mode 100644 index 00000000..bc90046e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/lwip-tcp-perf-client/lwip-tcp-perf-client_2024.2.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-sdt/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.2.bb new file mode 100644 index 00000000..5c9cd5fa --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/lwip-tcp-perf-server/lwip-tcp-perf-server_2024.2.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-sdt/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.2.bb new file mode 100644 index 00000000..2855b08c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/lwip-udp-perf-client/lwip-udp-perf-client_2024.2.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-sdt/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.2.bb new file mode 100644 index 00000000..149e7a6c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/lwip-udp-perf-server/lwip-udp-perf-server_2024.2.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-sdt/recipes-applications/memory-tests/memory-tests_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/memory-tests/memory-tests_2024.2.bb new file mode 100644 index 00000000..8420171b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/memory-tests/memory-tests_2024.2.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-sdt/recipes-applications/openamp-fw/openamp-fw.inc b/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc index 398f8dce..137532b7 100644 --- a/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc +++ b/meta-xilinx-standalone-sdt/recipes-applications/openamp-fw/openamp-fw.inc | |||
@@ -2,26 +2,43 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
2 | LICENSE = "MIT" | 2 | LICENSE = "MIT" |
3 | INSANE_SKIP:${PN} = "arch" | 3 | INSANE_SKIP:${PN} = "arch" |
4 | 4 | ||
5 | FW_LIB_DIR = "/lib/firmware" | 5 | COMPATIBLE_HOST = ".*" |
6 | |||
7 | FW_LIB_DIR = "${nonarch_base_libdir}/firmware" | ||
8 | INSANE_SKIP:${PN} = "arch" | ||
6 | 9 | ||
7 | OPENAMP_FW_SRC_NAME ?= "rpmsg-echo.out" | 10 | OPENAMP_FW_SRC_NAME ?= "rpmsg-echo.out" |
8 | OPENAMP_FW_NAME ?= "image_echo_test" | 11 | OPENAMP_FW_NAME ?= "image_echo_test" |
9 | 12 | ||
10 | FW_MACHINE:zynqmp = "cortexr5-0-zynqmp" | 13 | FW_MACHINE:zynqmp = "cortexr5-0" |
11 | FW_MACHINE:versal = "cortexr5-0-versal" | 14 | FW_MACHINE:versal = "cortexr5-0" |
12 | FW_MACHINE:versal-net = "cortexr52-0-versal-net" | 15 | FW_MACHINE:versal-net = "cortexr52-0" |
13 | FW_OS ?= "baremetal" | 16 | FW_OS ?= "baremetal" |
14 | 17 | ||
15 | OPENAMP_FW_DEPLOY_DIR ?= "${MC_TMPDIR_PREFIX}-${FW_MACHINE}-${FW_OS}/deploy/images/${MACHINE}" | 18 | FW_TARGET ?= "${MACHINE}-${FW_MACHINE}-${FW_OS}" |
19 | |||
20 | OPENAMP_FW_DEPLOY_DIR ?= "-${FW_TARGET}/deploy/images/${MACHINE}/" | ||
21 | |||
16 | DEPENDS = " open-amp-xlnx " | 22 | DEPENDS = " open-amp-xlnx " |
17 | do_install[mcdepends] += "mc::${FW_MACHINE}-${FW_OS}:open-amp-xlnx:do_deploy" | 23 | do_install[mcdepends] += "mc::${FW_TARGET}:open-amp-xlnx:do_deploy" |
18 | do_install() { | 24 | do_install() { |
19 | install -d ${D}${FW_LIB_DIR} | 25 | src=${TMPDIR}${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME} |
20 | src=${OPENAMP_FW_DEPLOY_DIR}/${OPENAMP_FW_SRC_NAME} | ||
21 | dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME} | 26 | dest=${D}${FW_LIB_DIR}/${OPENAMP_FW_NAME} |
27 | if [ ! -e $src ]; then | ||
28 | bberror "Multiconfig firmware $src is not found. Set OPENAMP_FW_DEPLOY_DIR:pn-${PN} if necessary." | ||
29 | exit 1 | ||
30 | fi | ||
31 | install -d ${D}${FW_LIB_DIR} | ||
22 | install -m 0644 ${src} ${dest} | 32 | install -m 0644 ${src} ${dest} |
23 | } | 33 | } |
24 | 34 | ||
25 | do_compile[noexec] = "1" | 35 | do_compile[noexec] = "1" |
26 | 36 | ||
27 | FILES:${PN} = "/lib/firmware/${OPENAMP_FW_NAME}" | 37 | FILES:${PN} = "${FW_LIB_DIR}/${OPENAMP_FW_NAME}" |
38 | |||
39 | python() { | ||
40 | multiconfigs = (d.getVar('BBMULTICONFIG') or '').split() | ||
41 | fw_target = d.getVar('FW_TARGET') | ||
42 | if not fw_target in multiconfigs: | ||
43 | raise bb.parse.SkipRecipe("Required multiconfig %s is not available. Either add the multiconfig to your configuration or adjust FW_TARGET:pn-%s." % (fw_target, d.getVar('PN'))) | ||
44 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-applications/peripheral-tests/peripheral-tests_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/peripheral-tests/peripheral-tests_2024.2.bb new file mode 100644 index 00000000..d8bedfe5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/peripheral-tests/peripheral-tests_2024.2.bb | |||
@@ -0,0 +1,53 @@ | |||
1 | inherit esw python3native esw_apps_common | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_apps/peripheral_tests/src/" | ||
4 | |||
5 | DEPENDS += "libxil xiltimer" | ||
6 | |||
7 | ESW_EXECUTABLE_NAME = "peripheral_tests" | ||
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 | python do_generate_app_data() { | ||
20 | import glob, subprocess, os | ||
21 | |||
22 | system_dt = glob.glob(d.getVar('DTS_FILE')) | ||
23 | srcdir = glob.glob(d.getVar('S')) | ||
24 | src_dir = glob.glob(d.getVar('OECMAKE_SOURCEPATH')) | ||
25 | machine = d.getVar('ESW_MACHINE') | ||
26 | |||
27 | if len(system_dt) == 0: | ||
28 | bb.error("Couldn't find device tree %s" % d.getVar('DTS_FILE')) | ||
29 | |||
30 | if len(src_dir) == 0: | ||
31 | bb.error("Couldn't find source dir %s" % d.getVar('OECMAKE_SOURCEPATH')) | ||
32 | |||
33 | driver_name = d.getVar('REQUIRED_MACHINE_FEATURES') | ||
34 | command = ["lopper"] + ["-f"] + ["-O"] + [src_dir[0]] + [system_dt[0]] + ["--"] + ["baremetal_gentestapp_xlnx"] + [machine] + [srcdir[0]] | ||
35 | subprocess.run(command, check = True) | ||
36 | } | ||
37 | addtask do_generate_app_data before do_configure after do_prepare_recipe_sysroot | ||
38 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
39 | |||
40 | do_compile:append() { | ||
41 | ${OBJCOPY} -O binary ${B}/${ESW_EXECUTABLE_NAME}.elf ${B}/${ESW_EXECUTABLE_NAME}.bin | ||
42 | } | ||
43 | |||
44 | do_install() { | ||
45 | : | ||
46 | } | ||
47 | |||
48 | do_deploy() { | ||
49 | install -Dm 0644 ${B}/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${APP_IMAGE_NAME}.elf | ||
50 | ln -sf ${APP_IMAGE_NAME}.elf ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.elf | ||
51 | install -m 0644 ${B}/${ESW_EXECUTABLE_NAME}.bin ${DEPLOYDIR}/${APP_IMAGE_NAME}.bin | ||
52 | ln -sf ${APP_IMAGE_NAME}.bin ${DEPLOYDIR}/${BPN}-${MACHINE}-${BB_CURRENT_MC}.bin | ||
53 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-applications/srec-bootloader/srec-bootloader_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/srec-bootloader/srec-bootloader_2024.2.bb new file mode 100644 index 00000000..03ada8c1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/srec-bootloader/srec-bootloader_2024.2.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-sdt/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.2.bb new file mode 100644 index 00000000..e6f29570 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/srec-spi-bootloader/srec-spi-bootloader_2024.2.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-sdt/recipes-applications/zynq-dram-test/zynq-dram-test_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/zynq-dram-test/zynq-dram-test_2024.2.bb new file mode 100644 index 00000000..8e0b0c06 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/zynq-dram-test/zynq-dram-test_2024.2.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-sdt/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.2.bb new file mode 100644 index 00000000..25215801 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-applications/zynqmp-dram-test/zynqmp-dram-test_2024.2.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-sdt/recipes-bsp/base-pdi/base-pdi_%.bbappend b/meta-xilinx-standalone-sdt/recipes-bsp/base-pdi/base-pdi_%.bbappend new file mode 100644 index 00000000..a868f78f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/base-pdi/base-pdi_%.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@'base-pdi_sdt.inc' if d.getVar('XILINX_WITH_ESW') == 'sdt' else ''} | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/base-pdi/base-pdi_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/base-pdi/base-pdi_sdt.inc new file mode 100644 index 00000000..3a8e2dca --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/base-pdi/base-pdi_sdt.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | # Unset SRC_URI and use the PDI_PATH from PDI_PATH_DEPENDS (usually sdt-artifacts) SYSROOT_DIR | ||
2 | |||
3 | SRC_URI = "" | ||
4 | |||
5 | PDI_PATH_DEPENDS ??= "" | ||
6 | DEPENDS += "${PDI_PATH_DEPENDS}" | ||
7 | |||
8 | PDI_SKIP_CHECK = "1" | ||
9 | |||
10 | do_install() { | ||
11 | if [ -f ${PDI_PATH} ]; then | ||
12 | install -d ${D}/boot | ||
13 | install -m 0644 ${PDI_PATH} ${D}/boot/base-design.pdi | ||
14 | else | ||
15 | bbfatal "No base pdi supplied" | ||
16 | fi | ||
17 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/device-tree.bbappend b/meta-xilinx-standalone-sdt/recipes-bsp/device-tree/device-tree.bbappend index 449a69c8..745b5656 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/device-tree.bbappend +++ b/meta-xilinx-standalone-sdt/recipes-bsp/device-tree/device-tree.bbappend | |||
@@ -1 +1,2 @@ | |||
1 | COMPATIBLE_HOST:xilinx-freertos = "${HOST_SYS}" | 1 | COMPATIBLE_HOST:xilinx-freertos = "${HOST_SYS}" |
2 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb new file mode 100644 index 00000000..f99db010 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | # Can't depend on esw since this is needed for setup! | ||
2 | inherit xlnx-embeddedsw | ||
3 | |||
4 | S = "${WORKDIR}/git" | ||
5 | B = "${WORKDIR}/build" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | # Installing this recipe should install the lopper tools and such | ||
10 | DEPENDS = "lopper xilinx-lops" | ||
11 | |||
12 | COMPATIBLE_HOST:forcevariable = ".*" | ||
13 | |||
14 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" | ||
15 | |||
16 | do_configure[noexec] = '1' | ||
17 | do_compile[noexec] = '1' | ||
18 | |||
19 | do_install() { | ||
20 | # The configuration step requires only the yaml files, make them | ||
21 | # available to the SDK | ||
22 | cd ${S}${ESW_COMPONENT_SRC} | ||
23 | for each in `find . -name *.yaml` ; do | ||
24 | mkdir -p $(dirname ${D}/${datadir}/embeddedsw${ESW_COMPONENT_SRC}$each) | ||
25 | install -m 0644 $each ${D}/${datadir}/embeddedsw${ESW_COMPONENT_SRC}$each | ||
26 | done | ||
27 | } | ||
28 | |||
29 | FILES:${PN} += "${datadir}/embeddedsw" | ||
30 | |||
31 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/fsbl-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/fsbl-firmware_sdt.inc index 5b2cceba..2c96b04f 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/fsbl-firmware_sdt.inc +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/fsbl-firmware_sdt.inc | |||
@@ -1,50 +1,43 @@ | |||
1 | inherit esw | 1 | inherit esw |
2 | 2 | ||
3 | # Not compatible with Zynq | 3 | # Not compatible with Zynq |
4 | COMPATIBLE_MACHINE:zynq = "none" | ||
5 | COMPATIBLE_MACHINE:microblaze = "none" | 4 | COMPATIBLE_MACHINE:microblaze = "none" |
6 | 5 | ||
7 | ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src" | 6 | ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src" |
8 | ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src" | 7 | ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src" |
9 | ESW_COMPONENT_SRC:zynqmp = "/lib/sw_apps/zynqmp_fsbl/src" | 8 | ESW_COMPONENT_SRC:zynqmp = "/lib/sw_apps/zynqmp_fsbl/src" |
10 | 9 | ||
11 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" | 10 | ESW_FSBL_DEPENDS = "xilstandalone xiltimer xilffs" |
11 | ESW_FSBL_DEPENDS:append:zynq = " xilrsa" | ||
12 | ESW_FSBL_DEPENDS:append:zynqmp = " xilsecure xilpm" | ||
13 | |||
14 | DEPENDS += "${PSU_INIT_DEPENDS} ${ESW_FSBL_DEPENDS}" | ||
12 | 15 | ||
13 | CFLAGS:append:aarch64 = " -DARMA53_64" | 16 | CFLAGS:append:aarch64 = " -DARMA53_64" |
14 | CFLAGS:append:armv7r = " -DARMR5" | 17 | CFLAGS:append:armv7r = " -DARMR5" |
15 | 18 | ||
16 | python() { | 19 | # These files usually come in from sdt-artifacts (SYSTEM_DTFILE_DEPENDS) |
17 | psu_init_path = d.getVar('PSU_INIT_PATH') | 20 | FSBL_PS_INIT_C:zynq = "ps7_init.c" |
18 | if not psu_init_path: | 21 | FSBL_PS_INIT_C:zynqmp = "psu_init.c" |
19 | psu_init_path = os.path.dirname(d.getVar('SYSTEM_DTFILE')) | 22 | FSBL_PS_INIT_H:zynq = "ps7_init.h" |
20 | 23 | FSBL_PS_INIT_H:zynqmp = "psu_init.h" | |
21 | psu_init_c = os.path.join(psu_init_path, 'psu_init.c') | ||
22 | psu_init_h = os.path.join(psu_init_path, 'psu_init.h') | ||
23 | |||
24 | add_path = False | ||
25 | if os.path.exists(psu_init_c): | ||
26 | d.appendVar('SRC_URI', ' file://psu_init.c') | ||
27 | add_path = True | ||
28 | 24 | ||
29 | if os.path.exists(psu_init_h): | 25 | SYSTEM_DTFILE_DEPENDS ??= "" |
30 | d.appendVar('SRC_URI', ' file://psu_init.h') | 26 | PSU_INIT_DEPENDS ?= "${SYSTEM_DTFILE_DEPENDS}" |
31 | add_path = True | 27 | PSU_INIT_PATH ?= "${SYSTEM_DTFILE_DIR}" |
32 | 28 | PSU_INIT_PATH[doc] = "Path to psu_init or ps7_init files, defaults to system device tree output directory" | |
33 | if add_path: | ||
34 | d.prependVar('FILESEXTRAPATHS', '%s:' % psu_init_path) | ||
35 | } | ||
36 | 29 | ||
37 | do_configure:prepend() { | 30 | do_configure:prepend() { |
38 | if [ -e ${WORKDIR}/psu_init.c ]; then | 31 | if [ -e ${PSU_INIT_PATH}/${FSBL_PS_INIT_C} ]; then |
39 | install -m 0644 ${WORKDIR}/psu_init.c ${S}/${ESW_COMPONENT_SRC} | 32 | install -m 0644 ${PSU_INIT_PATH}/${FSBL_PS_INIT_C} ${S}/${ESW_COMPONENT_SRC} |
40 | else | 33 | else |
41 | bbwarn "Using the default psu_init.c, this may not work correctly." | 34 | bbfatal "Using the default ${FSBL_PS_INIT_C}, this may not work correctly. Looking for ${PSU_INIT_PATH}/${FSBL_PS_INIT_C}" |
42 | fi | 35 | fi |
43 | 36 | ||
44 | if [ -e ${WORKDIR}/psu_init.h ]; then | 37 | if [ -e ${PSU_INIT_PATH}/${FSBL_PS_INIT_H} ]; then |
45 | install -m 0644 ${WORKDIR}/psu_init.h ${S}/${ESW_COMPONENT_SRC} | 38 | install -m 0644 ${PSU_INIT_PATH}/${FSBL_PS_INIT_H} ${S}/${ESW_COMPONENT_SRC} |
46 | else | 39 | else |
47 | bbwarn "Using the default psu_init.h, this may not work correctly." | 40 | bbfatal "Using the default ${FSBL_PS_INIT_H}, this may not work correctly. Looking for ${PSU_INIT_PATH}/${FSBL_PS_INIT_H}" |
48 | fi | 41 | fi |
49 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} | 42 | install -m 0644 ${S}/cmake/UserConfig.cmake ${S}/${ESW_COMPONENT_SRC} |
50 | } | 43 | } |
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/image-recovery/image-recovery_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-bsp/image-recovery/image-recovery_2024.2.bb new file mode 100644 index 00000000..f7183cef --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/image-recovery/image-recovery_2024.2.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | inherit esw esw_apps_common | ||
2 | |||
3 | COMPATIBLE_MACHINE = ".*" | ||
4 | COMPATIBLE_HOST = ".*" | ||
5 | |||
6 | python () { | ||
7 | |||
8 | raise bb.parse.SkipRecipe(" \n \ | ||
9 | image-recovery is not currently supported in the SDT build flow\n \ | ||
10 | \n \ | ||
11 | Please set the following variables to provide an image-recovery binary: \n \ | ||
12 | IMGRCRY_MCDEPENDS = \"\" \n \ | ||
13 | IMGRCRY_DEPLOY_DIR = \"/path/to/image-recovery/\" \n \ | ||
14 | IMGRCRY_IMAGE_NAME = \"image-recovery-file.bin\" \n \ | ||
15 | NOTE: The IMGRCRY_DEPLOY_DIR should contain both .bin and .elf versions of the file \n \ | ||
16 | ") | ||
17 | |||
18 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/image-selector/image-selector_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-bsp/image-selector/image-selector_2024.2.bb new file mode 100644 index 00000000..69aebf06 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/image-selector/image-selector_2024.2.bb | |||
@@ -0,0 +1,48 @@ | |||
1 | inherit esw python3native esw_apps_common deploy | ||
2 | |||
3 | DEPENDS += "libxil xiltimer bootgen-native" | ||
4 | |||
5 | RCONFLICTS:${PN} = "image-selector-xsct" | ||
6 | |||
7 | ESW_COMPONENT_SRC = "/src/" | ||
8 | ESW_EXECUTABLE_NAME = "imgsel" | ||
9 | |||
10 | SRC_URI:append = " git://github.com/Xilinx/image-selector.git;protocol=https;branch=main;destsuffix=image-selector;name=image-selector" | ||
11 | SRCREV_image-selector = "809441712855a64a35496192c180e31328a78b7b" | ||
12 | |||
13 | do_configure:prepend() { | ||
14 | ( | ||
15 | cd ${S} | ||
16 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${WORKDIR}/${BPN}/${ESW_COMPONENT_SRC} | ||
17 | install -m 0644 *.cmake ${WORKDIR}/${BPN}/${ESW_COMPONENT_SRC}/ | ||
18 | install -m 0644 ${S}/cmake/UserConfig.cmake ${WORKDIR}/${BPN}/${ESW_COMPONENT_SRC} | ||
19 | ) | ||
20 | } | ||
21 | |||
22 | OECMAKE_SOURCEPATH = "${WORKDIR}/${BPN}/${ESW_COMPONENT_SRC}" | ||
23 | |||
24 | do_compile:append () { | ||
25 | cat > ${WORKDIR}/${PN}.bif << EOF | ||
26 | the_ROM_image: | ||
27 | { | ||
28 | [bootloader,destination_cpu=a53-0] ${B}/${ESW_EXECUTABLE_NAME}.elf | ||
29 | } | ||
30 | EOF | ||
31 | |||
32 | bootgen -image ${WORKDIR}/${PN}.bif -arch ${SOC_FAMILY} -w -o ${B}/${PN}.bin | ||
33 | |||
34 | printf "* ${PN}\nSRCREV: ${SRCREV}\nBRANCH: ${BRANCH}\n\n" > ${S}/${PN}.manifest | ||
35 | } | ||
36 | |||
37 | do_install[noexec] = "1" | ||
38 | |||
39 | do_deploy() { | ||
40 | install -Dm 0644 ${B}/${ESW_EXECUTABLE_NAME}.elf ${DEPLOYDIR}/${PN}.elf | ||
41 | ln -sf ${PN}.elf ${DEPLOYDIR}/${PN}-${MACHINE}.elf | ||
42 | install -Dm 0644 ${B}/${PN}.bin ${DEPLOYDIR}/${PN}.bin | ||
43 | ln -sf ${PN}.bin ${DEPLOYDIR}/${PN}-${MACHINE}.bin | ||
44 | |||
45 | install -Dm 0644 ${S}/${PN}.manifest ${DEPLOYDIR}/${PN}-${MACHINE}.manifest | ||
46 | } | ||
47 | |||
48 | addtask deploy before do_build after do_install | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/sdt-artifacts/sdt-artifacts.bb b/meta-xilinx-standalone-sdt/recipes-bsp/sdt-artifacts/sdt-artifacts.bb new file mode 100644 index 00000000..9c45c3ef --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-bsp/sdt-artifacts/sdt-artifacts.bb | |||
@@ -0,0 +1,81 @@ | |||
1 | SUMMARY = "Recipe to download SDT artifacts and extract to directory" | ||
2 | LICENSE = "MIT" | ||
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
4 | |||
5 | PROVIDES = "virtual/sdt" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | inherit deploy image-artifact-names | ||
10 | |||
11 | # The user is expected to define SDT_URI, and SDT_URI[sha256sum]. Optionally | ||
12 | # they may also define SDT_URI[S] to define the unpacking path. | ||
13 | SDT_URI[doc] = "URI for the System Device Tree file(s), usually a tarball bundle of files" | ||
14 | |||
15 | # Add compatibility with previous gen-machine-conf output | ||
16 | SYSTEM_DTFILE_DIR ??= "" | ||
17 | |||
18 | SDT_URI ??= "${@'file://${SYSTEM_DTFILE_DIR}' if d.getVar('SYSTEM_DTFILE_DIR') else ''}" | ||
19 | |||
20 | SRC_URI = "${SDT_URI}" | ||
21 | SRC_URI[sha256sum] = "${@d.getVarFlag('SDT_URI', 'sha256sum') or 'undefined'}" | ||
22 | |||
23 | COMPATIBLE_HOST:xilinx-standalone = "${HOST_SYS}" | ||
24 | PACKAGE_ARCH ?= "${MACHINE_ARCH}" | ||
25 | |||
26 | # Don't set S = "${WORKDIR}/git" as we need this to work for other protocols | ||
27 | S = "${@d.getVarFlag('SDT_URI', 'S') or '${WORKDIR}'}" | ||
28 | |||
29 | do_configure[noexec] = "1" | ||
30 | do_compile[noexec] = "1" | ||
31 | |||
32 | python () { | ||
33 | if not d.getVar('SDT_URI'): | ||
34 | raise bb.parse.SkipRecipe("SDT_URI must be specified. See recipe for instructions.") | ||
35 | } | ||
36 | |||
37 | do_install() { | ||
38 | install -d ${D}${datadir}/sdt/${MACHINE} | ||
39 | if [ "${S}" = "${WORKDIR}" ]; then | ||
40 | # If we just copying everything, then we'll copy build components. | ||
41 | # This fallback is for the case where the user provides each of the | ||
42 | # files instead of a tarball. It shouldn't be used, but is here just | ||
43 | # in case. | ||
44 | for files in ${S}/* ; do | ||
45 | if [ -f $files ]; then | ||
46 | cp --preserve=mode,timestamps $files ${D}${datadir}/sdt/${MACHINE}/. | ||
47 | fi | ||
48 | done | ||
49 | else | ||
50 | cp --preserve=mode,timestamps -R ${S}/* ${D}${datadir}/sdt/${MACHINE}/. | ||
51 | fi | ||
52 | } | ||
53 | |||
54 | # Artifacts has plm.elf, psm.elf or other aie elf hence we need to strip and skip | ||
55 | # the packages. | ||
56 | INSANE_SKIP += "arch" | ||
57 | INHIBIT_SYSROOT_STRIP = "1" | ||
58 | INHIBIT_PACKAGE_STRIP = "1" | ||
59 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
60 | |||
61 | FILES:${PN} = "${datadir}/sdt/${MACHINE}" | ||
62 | |||
63 | do_deploy() { | ||
64 | install -d ${DEPLOYDIR}/system-dt${IMAGE_VERSION_SUFFIX} | ||
65 | if [ "${S}" = "${WORKDIR}" ]; then | ||
66 | # If we just copying everything, then we'll copy build components. | ||
67 | # This fallback is for the case where the user provides each of the | ||
68 | # files instead of a tarball. It shouldn't be used, but is here just | ||
69 | # in case. | ||
70 | for files in ${S}/* ; do | ||
71 | if [ -f $files ]; then | ||
72 | cp --preserve=mode,timestamps $files ${DEPLOYDIR}/system-dt${IMAGE_VERSION_SUFFIX}/. | ||
73 | fi | ||
74 | done | ||
75 | else | ||
76 | cp --preserve=mode,timestamps -R ${S}/* ${DEPLOYDIR}/system-dt${IMAGE_VERSION_SUFFIX}/. | ||
77 | fi | ||
78 | ln -s system-dt${IMAGE_VERSION_SUFFIX} ${DEPLOYDIR}/system-dt | ||
79 | } | ||
80 | |||
81 | addtask deploy after do_install before do_build | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/aiefal_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/aiefal_2024.2.bb new file mode 100644 index 00000000..7d7b76ac --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/aiefal_2024.2.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | inherit cmake ccmake | ||
2 | |||
3 | COMPATIBLE_HOST = "aarch64-xilinx-elf" | ||
4 | |||
5 | require ../../meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | B = "${WORKDIR}/build" | ||
9 | |||
10 | EXTRA_OECMAKE += "-DYOCTO=ON" | ||
11 | DEPENDS += "xilstandalone xiltimer aienginev2" | ||
12 | |||
13 | ESW_COMPONENT_SRC = "/fal/src/" | ||
14 | |||
15 | OECMAKE_SOURCEPATH = "${S}/${ESW_COMPONENT_SRC}" | ||
16 | XLNX_CMAKE_SYSTEM_NAME ?= "Generic" | ||
17 | XLNX_CMAKE_BSP_VARS ?= "" | ||
18 | |||
19 | cmake_do_generate_toolchain_file:append() { | ||
20 | cat >> ${WORKDIR}/toolchain.cmake <<EOF | ||
21 | include(CMakeForceCompiler) | ||
22 | CMAKE_FORCE_C_COMPILER("${OECMAKE_C_COMPILER}" GNU) | ||
23 | CMAKE_FORCE_CXX_COMPILER("${OECMAKE_CXX_COMPILER}" GNU) | ||
24 | set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) | ||
25 | set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake) | ||
26 | set( CMAKE_LIBRARY_PATH ${B}) | ||
27 | add_definitions( "${XLNX_CMAKE_BSP_VARS} -DSDT" ) | ||
28 | EOF | ||
29 | } | ||
30 | |||
31 | do_install() { | ||
32 | install -d ${D}${includedir} | ||
33 | cp -r ${B}/include/xaiefal ${D}${includedir} | ||
34 | } | ||
35 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/aienginev2_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/aienginev2_2024.2.bb new file mode 100644 index 00000000..68853d57 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/aienginev2_2024.2.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | inherit cmake ccmake | ||
2 | |||
3 | COMPATIBLE_HOST = "aarch64-xilinx-elf" | ||
4 | |||
5 | require ../../meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2024.2.inc | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | B = "${WORKDIR}/build" | ||
9 | |||
10 | EXTRA_OECMAKE += "-DYOCTO=ON" | ||
11 | DEPENDS += "xilstandalone xiltimer" | ||
12 | |||
13 | ESW_COMPONENT_SRC = "/driver/src/" | ||
14 | ESW_COMPONENT_NAME = "libaienginev2.a" | ||
15 | |||
16 | OECMAKE_SOURCEPATH = "${S}/${ESW_COMPONENT_SRC}" | ||
17 | XLNX_CMAKE_SYSTEM_NAME ?= "Generic" | ||
18 | XLNX_CMAKE_BSP_VARS ?= "" | ||
19 | |||
20 | cmake_do_generate_toolchain_file:append() { | ||
21 | cat >> ${WORKDIR}/toolchain.cmake <<EOF | ||
22 | include(CMakeForceCompiler) | ||
23 | CMAKE_FORCE_C_COMPILER("${OECMAKE_C_COMPILER}" GNU) | ||
24 | CMAKE_FORCE_CXX_COMPILER("${OECMAKE_CXX_COMPILER}" GNU) | ||
25 | set( CMAKE_SYSTEM_NAME "${XLNX_CMAKE_SYSTEM_NAME}" ) | ||
26 | set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${S}/cmake) | ||
27 | set( CMAKE_LIBRARY_PATH ${B}) | ||
28 | add_definitions( "${XLNX_CMAKE_BSP_VARS} -DSDT" ) | ||
29 | EOF | ||
30 | } | ||
31 | |||
32 | do_install() { | ||
33 | install -d ${D}${libdir} | ||
34 | install -d ${D}${includedir} | ||
35 | install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir} | ||
36 | install -m 0644 ${B}/include/*.h ${D}${includedir} | ||
37 | cp -r ${B}/include/xaiengine ${D}${includedir} | ||
38 | } | ||
39 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/audio-formatter_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/audio-formatter_2024.2.bb new file mode 100644 index 00000000..0ebdc46a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/audio-formatter_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "audio-formatter" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/audio_formatter/src/" | ||
11 | ESW_COMPONENT_NAME = "libaudio_formatter.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-sdt/recipes-drivers/avbuf_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/avbuf_2024.2.bb new file mode 100644 index 00000000..7edd2d9d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/avbuf_2024.2.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "avbuf" | ||
4 | |||
5 | inherit esw | ||
6 | |||
7 | DEPENDS += "xilstandalone" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/avbuf/src/" | ||
10 | ESW_COMPONENT_NAME = "libavbuf.a" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axicdma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axicdma-example_2024.2.bb new file mode 100644 index 00000000..1846b291 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axicdma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axicdma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axicdma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axicdma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axicdma_2024.2.bb new file mode 100644 index 00000000..47111dc5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axicdma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axicdma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axicdma/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxicdma.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-sdt/recipes-drivers/axidma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axidma-example_2024.2.bb new file mode 100644 index 00000000..68a26f45 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axidma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axidma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axidma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axidma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axidma_2024.2.bb new file mode 100644 index 00000000..c385d13f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axidma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axidma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axidma/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxidma.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-sdt/recipes-drivers/axiethernet-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axiethernet-example_2024.2.bb new file mode 100644 index 00000000..04c2c151 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axiethernet-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axiethernet" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axiethernet/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axiethernet_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axiethernet_2024.2.bb new file mode 100644 index 00000000..0b635859 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axiethernet_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axiethernet" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axiethernet/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxiethernet.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-sdt/recipes-drivers/axipcie_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axipcie_2024.2.bb new file mode 100644 index 00000000..a587d2ea --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axipcie_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "axipcie" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axipcie/src/" | ||
11 | ESW_COMPONENT_NAME = "libaxipcie.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-sdt/recipes-drivers/axipmon-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axipmon-example_2024.2.bb new file mode 100644 index 00000000..4aa716e7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axipmon-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axipmon" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axipmon/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axipmon_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axipmon_2024.2.bb new file mode 100644 index 00000000..ff2eae91 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axipmon_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axipmon" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axipmon/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxipmon.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-sdt/recipes-drivers/axis-switch_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axis-switch_2024.2.bb new file mode 100644 index 00000000..b34dedb0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axis-switch_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axis-switch" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axis_switch/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxis_switch.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-sdt/recipes-drivers/axivdma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axivdma-example_2024.2.bb new file mode 100644 index 00000000..2866c02b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axivdma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axivdma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axivdma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/axivdma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/axivdma_2024.2.bb new file mode 100644 index 00000000..15268629 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/axivdma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "axivdma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/axivdma/src/" | ||
10 | ESW_COMPONENT_NAME = "libaxivdma.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-sdt/recipes-drivers/bram-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/bram-example_2024.2.bb new file mode 100644 index 00000000..a3145467 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/bram-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "bram" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/bram/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/bram_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/bram_2024.2.bb new file mode 100644 index 00000000..3c81c619 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/bram_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "bram" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/bram/src/" | ||
10 | ESW_COMPONENT_NAME = "libbram.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-sdt/recipes-drivers/can-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/can-example_2024.2.bb new file mode 100644 index 00000000..115852fa --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/can-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "can" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/can/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/can_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/can_2024.2.bb new file mode 100644 index 00000000..eb7fc473 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/can_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "can" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/can/src/" | ||
10 | ESW_COMPONENT_NAME = "libcan.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-sdt/recipes-drivers/canfd-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/canfd-example_2024.2.bb new file mode 100644 index 00000000..84276569 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/canfd-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "canfd" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canfd/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/canfd_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/canfd_2024.2.bb new file mode 100644 index 00000000..5f2e6ea8 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/canfd_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "canfd" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canfd/src/" | ||
10 | ESW_COMPONENT_NAME = "libcanfd.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-sdt/recipes-drivers/canps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/canps-example_2024.2.bb new file mode 100644 index 00000000..574dc563 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/canps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "canps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/canps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/canps_2024.2.bb new file mode 100644 index 00000000..c9f61cd2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/canps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "canps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/canps/src/" | ||
10 | ESW_COMPONENT_NAME = "libcanps.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-sdt/recipes-drivers/cframe_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/cframe_2024.2.bb new file mode 100644 index 00000000..6ffdf85d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/cframe_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "cframe" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/cframe/src/" | ||
10 | ESW_COMPONENT_NAME = "libcframe.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-sdt/recipes-drivers/cfupmc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/cfupmc_2024.2.bb new file mode 100644 index 00000000..3cb675bc --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/cfupmc_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "cfupmc" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/cfupmc/src/" | ||
10 | ESW_COMPONENT_NAME = "libcfupmc.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-sdt/recipes-drivers/clk-wiz-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/clk-wiz-example_2024.2.bb new file mode 100644 index 00000000..71ffdc32 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/clk-wiz-example_2024.2.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-sdt/recipes-drivers/clk-wiz_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/clk-wiz_2024.2.bb new file mode 100644 index 00000000..ae0453a1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/clk-wiz_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "clk-wiz" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clk_wiz/src/" | ||
10 | ESW_COMPONENT_NAME = "libclk_wiz.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-sdt/recipes-drivers/clockps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/clockps-example_2024.2.bb new file mode 100644 index 00000000..f9c5bce6 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/clockps-example_2024.2.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | inherit esw deploy features_check | ||
2 | |||
3 | ESW_COMPONENT_SRC = "XilinxProcessorIPLib/drivers/clockps/examples/" | ||
4 | |||
5 | REQUIRED_MACHINE_FEATURES = "clockps" | ||
6 | |||
7 | DEPENDS += "libxil xiltimer resetps" | ||
8 | |||
9 | inherit python3native | ||
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 | CLOCKPS_EX_IMAGE_NAME ??= "${BPN}" | ||
20 | |||
21 | inherit image-artifact-names | ||
22 | |||
23 | CLOCKPS_EX_NAME ?= "${CLOCKPS_EX_IMAGE_NAME}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | ||
24 | |||
25 | ESW_COMPONENT ??= "*.elf" | ||
26 | |||
27 | addtask deploy before do_build after do_install | ||
28 | |||
29 | do_install() { | ||
30 | install -d ${D}/${base_libdir}/firmware | ||
31 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
32 | } | ||
33 | |||
34 | do_deploy() { | ||
35 | install -d ${DEPLOYDIR}/${BPN}/ | ||
36 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
37 | } | ||
38 | addtask deploy before do_build after do_package | ||
39 | |||
40 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/clockps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/clockps_2024.2.bb new file mode 100644 index 00000000..3a464480 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/clockps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "clockps" | ||
4 | |||
5 | inherit esw | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/clockps/src/" | ||
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-sdt/recipes-drivers/common_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/common_2024.2.bb new file mode 100644 index 00000000..10635f7f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/common_2024.2.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "common" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | PACKAGECONFIG ?= "${@bb.utils.contains("MACHINE_FEATURES", "clockps", "clockps", "", d)} \ | ||
10 | ${@bb.utils.contains("MACHINE_FEATURES", "scugic", "scugic", "", d)} \ | ||
11 | ${@bb.utils.contains("MACHINE_FEATURES", "intc", "intc", "", d)}" | ||
12 | PACKAGECONFIG[clockps] = "${RECIPE_SYSROOT}/usr/lib/libclockps.a,,clockps,," | ||
13 | PACKAGECONFIG[scugic] = "${RECIPE_SYSROOT}/usr/lib/libscugic.a,,scugic,," | ||
14 | PACKAGECONFIG[intc] = "${RECIPE_SYSROOT}/usr/lib/libintc.a,,intc,," | ||
15 | |||
16 | ESW_COMPONENT_SRC = "/lib/bsp/standalone/src/common/intr/" | ||
17 | ESW_COMPONENT_NAME = "libcommon.a" | ||
18 | |||
19 | do_configure:prepend() { | ||
20 | ( | ||
21 | cd ${S}/${ESW_COMPONENT_SRC}/ | ||
22 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/intc/src/ | ||
23 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/XilinxProcessorIPLib/drivers/scugic/src/ | ||
24 | ) | ||
25 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/coresightps-dcc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/coresightps-dcc_2024.2.bb new file mode 100644 index 00000000..9110b51e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/coresightps-dcc_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "coresightps-dcc" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/coresightps_dcc/src/" | ||
10 | ESW_COMPONENT_NAME = "libcoresightps_dcc.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-sdt/recipes-drivers/csi2tx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/csi2tx_2024.2.bb new file mode 100644 index 00000000..638ff85d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/csi2tx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "csi2tx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csi2tx/src/" | ||
11 | ESW_COMPONENT_NAME = "libcsi2tx.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-sdt/recipes-drivers/csi2txss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/csi2txss_2024.2.bb new file mode 100644 index 00000000..0c438681 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/csi2txss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "csi2txss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csi2txss/src/" | ||
11 | ESW_COMPONENT_NAME = "libcsi2txss.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-sdt/recipes-drivers/csi_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/csi_2024.2.bb new file mode 100644 index 00000000..6b1ccfb7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/csi_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "csi" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csi/src/" | ||
11 | ESW_COMPONENT_NAME = "libcsi.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-sdt/recipes-drivers/csudma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/csudma-example_2024.2.bb new file mode 100644 index 00000000..5706967a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/csudma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "csudma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csudma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/csudma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/csudma_2024.2.bb new file mode 100644 index 00000000..8283ce8d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/csudma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "csudma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/csudma/src/" | ||
10 | ESW_COMPONENT_NAME = "libcsudma.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-sdt/recipes-drivers/ddrcpsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ddrcpsu_2024.2.bb new file mode 100644 index 00000000..4728b6c5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ddrcpsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ddrcpsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ddrcpsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libddrcpsu.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-sdt/recipes-drivers/devcfg-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/devcfg-example_2024.2.bb new file mode 100644 index 00000000..dd70e09d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/devcfg-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "devcfg" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/devcfg/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/devcfg_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/devcfg_2024.2.bb new file mode 100644 index 00000000..4b794d22 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/devcfg_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "devcfg" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/devcfg/src/" | ||
10 | ESW_COMPONENT_NAME = "libdevcfg.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-sdt/recipes-drivers/dfeccf-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeccf-example_2024.2.bb new file mode 100644 index 00000000..fd01b757 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeccf-example_2024.2.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-sdt/recipes-drivers/dfeccf_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeccf_2024.2.bb new file mode 100644 index 00000000..86a55b9f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeccf_2024.2.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-sdt/recipes-drivers/dfeequ-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeequ-example_2024.2.bb new file mode 100644 index 00000000..0f4d45be --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeequ-example_2024.2.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-sdt/recipes-drivers/dfeequ_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeequ_2024.2.bb new file mode 100644 index 00000000..8ad43c1b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeequ_2024.2.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-sdt/recipes-drivers/dfemix-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfemix-example_2024.2.bb new file mode 100644 index 00000000..9149e9c4 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfemix-example_2024.2.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-sdt/recipes-drivers/dfemix_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfemix_2024.2.bb new file mode 100644 index 00000000..31c7b8ed --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfemix_2024.2.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-sdt/recipes-drivers/dfeofdm-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeofdm-example_2024.2.bb new file mode 100644 index 00000000..661c2768 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeofdm-example_2024.2.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-sdt/recipes-drivers/dfeofdm_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeofdm_2024.2.bb new file mode 100644 index 00000000..a02ceae7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeofdm_2024.2.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-sdt/recipes-drivers/dfeprach-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeprach-example_2024.2.bb new file mode 100644 index 00000000..10ac2029 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeprach-example_2024.2.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-sdt/recipes-drivers/dfeprach_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfeprach_2024.2.bb new file mode 100644 index 00000000..0890ff3b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfeprach_2024.2.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-sdt/recipes-drivers/dfxasm-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfxasm-example_2024.2.bb new file mode 100644 index 00000000..974dd48b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfxasm-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dfxasm" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfxasm/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dfxasm_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dfxasm_2024.2.bb new file mode 100644 index 00000000..81f2157b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dfxasm_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dfxasm" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dfxasm/src/" | ||
10 | ESW_COMPONENT_NAME = "libdfxasm.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-sdt/recipes-drivers/dmaps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dmaps-example_2024.2.bb new file mode 100644 index 00000000..40d08e4b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dmaps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dmaps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dmaps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dmaps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dmaps_2024.2.bb new file mode 100644 index 00000000..1dcd8404 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dmaps_2024.2.bb | |||
@@ -0,0 +1,18 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dmaps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dmaps/src/" | ||
10 | ESW_COMPONENT_NAME = "libdmaps.a" | ||
11 | |||
12 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
13 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
14 | |||
15 | do_configure:prepend() { | ||
16 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S} | ||
17 | install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/ | ||
18 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dp12_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp12_2024.2.bb new file mode 100644 index 00000000..d3e102a1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp12_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp12" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp12/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp12.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-sdt/recipes-drivers/dp12rxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp12rxss_2024.2.bb new file mode 100644 index 00000000..2304e259 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp12rxss_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp12rxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common dp12 iic iicps" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | |||
11 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp12rxss/src/" | ||
12 | ESW_COMPONENT_NAME = "libdp12rxss.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-sdt/recipes-drivers/dp12txss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp12txss_2024.2.bb new file mode 100644 index 00000000..b2aaf9d0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp12txss_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp12txss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone dual-splitter vtc dp12 tmrctr" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | |||
11 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp12txss/src/" | ||
12 | ESW_COMPONENT_NAME = "libdp12txss.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-sdt/recipes-drivers/dp14_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp14_2024.2.bb new file mode 100644 index 00000000..8b9e1ef7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp14_2024.2.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 video-common" | ||
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-sdt/recipes-drivers/dp14rxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp14rxss_2024.2.bb new file mode 100644 index 00000000..d3942a6e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp14rxss_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp14rxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common dp14 iic iicps" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp22-rx-dp", "hdcp22-rx-dp", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14rxss/src/" | ||
13 | ESW_COMPONENT_NAME = "libdp14rxss.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dp14txss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp14txss_2024.2.bb new file mode 100644 index 00000000..2553e788 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp14txss_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp14txss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone dual-splitter vtc dp14 tmrctr" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp22-tx-dp", "hdcp22-tx-dp", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp14txss/src/" | ||
13 | ESW_COMPONENT_NAME = "libdp14txss.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dp21_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp21_2024.2.bb new file mode 100644 index 00000000..0398c202 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp21_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp21" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp21/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp21.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-sdt/recipes-drivers/dp21rxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp21rxss_2024.2.bb new file mode 100644 index 00000000..ec939378 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp21rxss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp21rxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp21rxss/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp21rxss.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-sdt/recipes-drivers/dp21txss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dp21txss_2024.2.bb new file mode 100644 index 00000000..714fa146 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dp21txss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dp21txss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dp21txss/src/" | ||
11 | ESW_COMPONENT_NAME = "libdp21txss.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-sdt/recipes-drivers/dpdma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dpdma_2024.2.bb new file mode 100644 index 00000000..3adb88a6 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dpdma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dpdma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common avbuf" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dpdma/src/" | ||
10 | ESW_COMPONENT_NAME = "libdpdma.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-sdt/recipes-drivers/dphy_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dphy_2024.2.bb new file mode 100644 index 00000000..c0a32a38 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dphy_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dphy" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dphy/src/" | ||
11 | ESW_COMPONENT_NAME = "libdphy.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-sdt/recipes-drivers/dppsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dppsu_2024.2.bb new file mode 100644 index 00000000..87cca884 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dppsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "dppsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dppsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libdppsu.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-sdt/recipes-drivers/dsi2rx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dsi2rx_2024.2.bb new file mode 100644 index 00000000..ffea6eb4 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dsi2rx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dsi2rx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dsi2rx/src/" | ||
11 | ESW_COMPONENT_NAME = "libdsi2rx.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-sdt/recipes-drivers/dsi_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dsi_2024.2.bb new file mode 100644 index 00000000..ab2a81fa --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dsi_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dsi" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dsi/src/" | ||
11 | ESW_COMPONENT_NAME = "libdsi.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-sdt/recipes-drivers/dsirxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dsirxss_2024.2.bb new file mode 100644 index 00000000..169037f3 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dsirxss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dsirxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dsirxss/src/" | ||
11 | ESW_COMPONENT_NAME = "libdsirxss.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-sdt/recipes-drivers/dsitxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dsitxss_2024.2.bb new file mode 100644 index 00000000..9e16aa61 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dsitxss_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dsitxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone dsi" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "dphy", "dphy", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "mipi-tx-phy", "mipi-tx-phy", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dsitxss/src/" | ||
13 | ESW_COMPONENT_NAME = "libdsitxss.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/dual-splitter_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/dual-splitter_2024.2.bb new file mode 100644 index 00000000..45d546f7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/dual-splitter_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "dual-splitter" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/dual_splitter/src/" | ||
11 | ESW_COMPONENT_NAME = "libdual_splitter.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-sdt/recipes-drivers/emaclite-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/emaclite-example_2024.2.bb new file mode 100644 index 00000000..6ed717fb --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/emaclite-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "emaclite" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emaclite/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/emaclite_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/emaclite_2024.2.bb new file mode 100644 index 00000000..9ceb477f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/emaclite_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "emaclite" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emaclite/src/" | ||
10 | ESW_COMPONENT_NAME = "libemaclite.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-sdt/recipes-drivers/emacps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/emacps-example_2024.2.bb new file mode 100644 index 00000000..2c57eafe --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/emacps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "emacps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emacps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/emacps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/emacps_2024.2.bb new file mode 100644 index 00000000..8ed85984 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/emacps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "emacps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/emacps/src/" | ||
10 | ESW_COMPONENT_NAME = "libemacps.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-sdt/recipes-drivers/emc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/emc_2024.2.bb new file mode 100644 index 00000000..0f46f99b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/emc_2024.2.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-sdt/recipes-drivers/gpio-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/gpio-example_2024.2.bb new file mode 100644 index 00000000..3f79cfec --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/gpio-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "gpio" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpio/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/gpio_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/gpio_2024.2.bb new file mode 100644 index 00000000..83a746b7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/gpio_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "gpio" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpio/src/" | ||
10 | ESW_COMPONENT_NAME = "libgpio.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-sdt/recipes-drivers/gpiops-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/gpiops-example_2024.2.bb new file mode 100644 index 00000000..cc2e1703 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/gpiops-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "gpiops" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpiops/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/gpiops_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/gpiops_2024.2.bb new file mode 100644 index 00000000..4bd63d1e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/gpiops_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "gpiops" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/gpiops/src/" | ||
10 | ESW_COMPONENT_NAME = "libgpiops.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-sdt/recipes-drivers/hdcp1x_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp1x_2024.2.bb new file mode 100644 index 00000000..d3090048 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp1x_2024.2.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp1x" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone tmrctr" | ||
9 | |||
10 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "v-hdmirx1", "v-hdmirx1", "",d)}" | ||
11 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "v-hdmitx1", "v-hdmitx1", "",d)}" | ||
12 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "v-hdmirx", "v-hdmirx", "",d)}" | ||
13 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "v-hdmitx", "v-hdmitx", "",d)}" | ||
14 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "dp12", "dp12", "",d)}" | ||
15 | DEPENDS += " ${@bb.utils.contains_any("MACHINE_FEATURES", "dp14", "dp14", "",d)}" | ||
16 | |||
17 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp1x/src/" | ||
18 | ESW_COMPONENT_NAME = "libhdcp1x.a" | ||
19 | |||
20 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
21 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-cipher-dp_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-cipher-dp_2024.2.bb new file mode 100644 index 00000000..01ab14c9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-cipher-dp_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-cipher-dp" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_cipher_dp/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_cipher_dp.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-sdt/recipes-drivers/hdcp22-cipher_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-cipher_2024.2.bb new file mode 100644 index 00000000..7899f880 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-cipher_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-cipher" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_cipher/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_cipher.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-sdt/recipes-drivers/hdcp22-common_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-common_2024.2.bb new file mode 100644 index 00000000..05bb66ef --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-common_2024.2.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-common" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_common/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_common.a" | ||
12 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-mmult_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-mmult_2024.2.bb new file mode 100644 index 00000000..8dff5e6b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-mmult_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-mmult" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_mmult/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_mmult.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-sdt/recipes-drivers/hdcp22-rng_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rng_2024.2.bb new file mode 100644 index 00000000..96bab361 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rng_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-rng" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_rng/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_rng.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-sdt/recipes-drivers/hdcp22-rx-dp_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rx-dp_2024.2.bb new file mode 100644 index 00000000..fba6bd9d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rx-dp_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-rx-dp" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone tmrctr hdcp22-common hdcp22-cipher-dp hdcp22-mmult hdcp22-rng" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_rx_dp/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_rx_dp.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-sdt/recipes-drivers/hdcp22-rx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rx_2024.2.bb new file mode 100644 index 00000000..67832580 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-rx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-rx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone tmrctr hdcp22-common hdcp22-cipher hdcp22-mmult hdcp22-rng" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_rx/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_rx.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-sdt/recipes-drivers/hdcp22-tx-dp_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-tx-dp_2024.2.bb new file mode 100644 index 00000000..1054d500 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-tx-dp_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-tx-dp" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone tmrctr hdcp22-common hdcp22-cipher-dp hdcp22-rng" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_tx_dp/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_tx_dp.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-sdt/recipes-drivers/hdcp22-tx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-tx_2024.2.bb new file mode 100644 index 00000000..9a96606a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hdcp22-tx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "hdcp22-tx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone tmrctr hdcp22-common hdcp22-cipher hdcp22-rng" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/hdcp22_tx/src/" | ||
11 | ESW_COMPONENT_NAME = "libhdcp22_tx.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-sdt/recipes-drivers/hwicap_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/hwicap_2024.2.bb new file mode 100644 index 00000000..37d70f6a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/hwicap_2024.2.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-sdt/recipes-drivers/i2srx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/i2srx_2024.2.bb new file mode 100644 index 00000000..27333e13 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/i2srx_2024.2.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-sdt/recipes-drivers/i2stx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/i2stx_2024.2.bb new file mode 100644 index 00000000..ca09a7f0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/i2stx_2024.2.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-sdt/recipes-drivers/i3c_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/i3c_2024.2.bb new file mode 100644 index 00000000..e4185d58 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/i3c_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "i3c" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/i3c/src/" | ||
11 | ESW_COMPONENT_NAME = "libi3c.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-sdt/recipes-drivers/i3cpsx-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/i3cpsx-example_2024.2.bb new file mode 100644 index 00000000..699b9d97 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/i3cpsx-example_2024.2.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-sdt/recipes-drivers/i3cpsx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/i3cpsx_2024.2.bb new file mode 100644 index 00000000..7b88520d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/i3cpsx_2024.2.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-sdt/recipes-drivers/iic-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/iic-example_2024.2.bb new file mode 100644 index 00000000..b781b82c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/iic-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "iic" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/iic/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/iic_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/iic_2024.2.bb new file mode 100644 index 00000000..7011f90b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/iic_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "iic" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/iic/src/" | ||
10 | ESW_COMPONENT_NAME = "libiic.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-sdt/recipes-drivers/iicps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/iicps-example_2024.2.bb new file mode 100644 index 00000000..e9df1cbd --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/iicps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "iicps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/iicps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/iicps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/iicps_2024.2.bb new file mode 100644 index 00000000..e96dc2ac --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/iicps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "iicps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/iicps/src/" | ||
10 | ESW_COMPONENT_NAME = "libiicps.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-sdt/recipes-drivers/intc-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/intc-example_2024.2.bb new file mode 100644 index 00000000..0b4b95a8 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/intc-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "intc" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/intc/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/intc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/intc_2024.2.bb new file mode 100644 index 00000000..331c2e32 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/intc_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "intc" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/intc/src/" | ||
10 | ESW_COMPONENT_NAME = "libintc.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-sdt/recipes-drivers/iomodule_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/iomodule_2024.2.bb new file mode 100644 index 00000000..1f625521 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/iomodule_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "iomodule" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/iomodule/src/" | ||
10 | ESW_COMPONENT_NAME = "libiomodule.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-sdt/recipes-drivers/ipipsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ipipsu-example_2024.2.bb new file mode 100644 index 00000000..0b31601d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ipipsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ipipsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ipipsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/ipipsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ipipsu_2024.2.bb new file mode 100644 index 00000000..3e2ccc0b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ipipsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ipipsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ipipsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libipipsu.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-sdt/recipes-drivers/llfifo-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/llfifo-example_2024.2.bb new file mode 100644 index 00000000..6b1c211a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/llfifo-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "llfifo" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/llfifo/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/llfifo_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/llfifo_2024.2.bb new file mode 100644 index 00000000..1fb76b18 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/llfifo_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "llfifo" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/llfifo/src/" | ||
10 | ESW_COMPONENT_NAME = "libllfifo.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-sdt/recipes-drivers/mbox-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mbox-example_2024.2.bb new file mode 100644 index 00000000..3c4870b4 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mbox-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mbox" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mbox/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/mbox_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mbox_2024.2.bb new file mode 100644 index 00000000..5c1b8393 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mbox_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mbox" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mbox/src/" | ||
10 | ESW_COMPONENT_NAME = "libmbox.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-sdt/recipes-drivers/mcdma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mcdma-example_2024.2.bb new file mode 100644 index 00000000..64979470 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mcdma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mcdma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mcdma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/mcdma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mcdma_2024.2.bb new file mode 100644 index 00000000..f13a7e54 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mcdma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mcdma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mcdma/src/" | ||
10 | ESW_COMPONENT_NAME = "libmcdma.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-sdt/recipes-drivers/mipi-rx-phy_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mipi-rx-phy_2024.2.bb new file mode 100644 index 00000000..f3fe328e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mipi-rx-phy_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "mipi-rx-phy" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mipi_rx_phy/src/" | ||
11 | ESW_COMPONENT_NAME = "libmipi_rx_phy.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-sdt/recipes-drivers/mipi-tx-phy_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mipi-tx-phy_2024.2.bb new file mode 100644 index 00000000..c7ecb399 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mipi-tx-phy_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "mipi-tx-phy" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mipi_tx_phy/src/" | ||
11 | ESW_COMPONENT_NAME = "libmipi_tx_phy.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-sdt/recipes-drivers/mipicsiss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mipicsiss_2024.2.bb new file mode 100644 index 00000000..05bc5f05 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mipicsiss_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "mipicsiss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone csi iic" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "dphy", "dphy", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "mipi-rx-phy", "mipi-rx-phy", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mipicsiss/src/" | ||
13 | ESW_COMPONENT_NAME = "libmipicsiss.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/mutex-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mutex-example_2024.2.bb new file mode 100644 index 00000000..fc0527da --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mutex-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mutex" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mutex/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/mutex_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/mutex_2024.2.bb new file mode 100644 index 00000000..98abc948 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/mutex_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "mutex" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/mutex/src/" | ||
10 | ESW_COMPONENT_NAME = "libmutex.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-sdt/recipes-drivers/nandps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/nandps_2024.2.bb new file mode 100644 index 00000000..ce3f7898 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/nandps_2024.2.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-sdt/recipes-drivers/nandpsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/nandpsu-example_2024.2.bb new file mode 100644 index 00000000..8b7a88b5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/nandpsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "nandpsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/nandpsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/nandpsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/nandpsu_2024.2.bb new file mode 100644 index 00000000..6d2a71c5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/nandpsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "nandpsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/nandpsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libnandpsu.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-sdt/recipes-drivers/ospipsv-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ospipsv-example_2024.2.bb new file mode 100644 index 00000000..0ded4fd2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ospipsv-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ospipsv" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ospipsv/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/ospipsv_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ospipsv_2024.2.bb new file mode 100644 index 00000000..f0548efc --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ospipsv_2024.2.bb | |||
@@ -0,0 +1,19 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ospipsv" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ospipsv/src/" | ||
10 | ESW_COMPONENT_NAME = "libospipsv.a" | ||
11 | |||
12 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
13 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
14 | |||
15 | do_configure:prepend() { | ||
16 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S} | ||
17 | install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/ | ||
18 | } | ||
19 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu-example_2024.2.bb new file mode 100644 index 00000000..23895fba --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "pciepsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/pciepsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu_2024.2.bb new file mode 100644 index 00000000..ccedb1df --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/pciepsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "pciepsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/pciepsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libpciepsu.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-sdt/recipes-drivers/prc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/prc_2024.2.bb new file mode 100644 index 00000000..12390ae2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/prc_2024.2.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-sdt/recipes-drivers/prd_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/prd_2024.2.bb new file mode 100644 index 00000000..9ea7b2d8 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/prd_2024.2.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-sdt/recipes-drivers/qspips-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/qspips-example_2024.2.bb new file mode 100644 index 00000000..674b879a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/qspips-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "qspips" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspips/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/qspips_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/qspips_2024.2.bb new file mode 100644 index 00000000..fa28d901 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/qspips_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "qspips" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspips/src/" | ||
10 | ESW_COMPONENT_NAME = "libqspips.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-sdt/recipes-drivers/qspipsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/qspipsu-example_2024.2.bb new file mode 100644 index 00000000..21231450 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/qspipsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "qspipsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspipsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/qspipsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/qspipsu_2024.2.bb new file mode 100644 index 00000000..5b4b1614 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/qspipsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "qspipsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/qspipsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libqspipsu.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-sdt/recipes-drivers/resetps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/resetps-example_2024.2.bb new file mode 100644 index 00000000..243393bb --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/resetps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "resetps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/resetps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/resetps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/resetps_2024.2.bb new file mode 100644 index 00000000..c753c666 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/resetps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "resetps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/resetps/src/" | ||
10 | ESW_COMPONENT_NAME = "libresetps.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-sdt/recipes-drivers/rfdc-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/rfdc-example_2024.2.bb new file mode 100644 index 00000000..973e5177 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/rfdc-example_2024.2.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-sdt/recipes-drivers/rfdc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/rfdc_2024.2.bb new file mode 100644 index 00000000..cfc106b6 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/rfdc_2024.2.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-sdt/recipes-drivers/rtcpsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/rtcpsu-example_2024.2.bb new file mode 100644 index 00000000..ac386c4c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/rtcpsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "rtcpsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rtcpsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/rtcpsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/rtcpsu_2024.2.bb new file mode 100644 index 00000000..7b96bf16 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/rtcpsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "rtcpsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/rtcpsu/src/" | ||
10 | ESW_COMPONENT_NAME = "librtcpsu.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-sdt/recipes-drivers/scugic-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/scugic-example_2024.2.bb new file mode 100644 index 00000000..cbef3ce9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/scugic-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "scugic" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scugic/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/scugic_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/scugic_2024.2.bb new file mode 100644 index 00000000..f079354d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/scugic_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "scugic" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/scugic/src/" | ||
10 | ESW_COMPONENT_NAME = "libscugic.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-sdt/recipes-drivers/scutimer_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/scutimer_2024.2.bb new file mode 100644 index 00000000..9e101058 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/scutimer_2024.2.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-sdt/recipes-drivers/scuwdt_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/scuwdt_2024.2.bb new file mode 100644 index 00000000..757a5de1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/scuwdt_2024.2.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-sdt/recipes-drivers/sd-fec_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sd-fec_2024.2.bb new file mode 100644 index 00000000..e4f61219 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sd-fec_2024.2.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-sdt/recipes-drivers/sdi-common_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sdi-common_2024.2.bb new file mode 100644 index 00000000..828a9ac9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sdi-common_2024.2.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "sdi-common" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sdi_common/src/" | ||
11 | ESW_COMPONENT_NAME = "libsdi_common.a" | ||
12 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/sdiaud_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sdiaud_2024.2.bb new file mode 100644 index 00000000..192a71d7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sdiaud_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "sdiaud" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sdiaud/src/" | ||
11 | ESW_COMPONENT_NAME = "libsdiaud.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-sdt/recipes-drivers/sdps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sdps-example_2024.2.bb new file mode 100644 index 00000000..550d664b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sdps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sdps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sdps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/sdps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sdps_2024.2.bb new file mode 100644 index 00000000..4caf0e63 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sdps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sdps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sdps/src/" | ||
10 | ESW_COMPONENT_NAME = "libsdps.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-sdt/recipes-drivers/spdif_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/spdif_2024.2.bb new file mode 100644 index 00000000..34331128 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/spdif_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "spdif" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spdif/src/" | ||
11 | ESW_COMPONENT_NAME = "libspdif.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-sdt/recipes-drivers/spi_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/spi_2024.2.bb new file mode 100644 index 00000000..3e564725 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/spi_2024.2.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-sdt/recipes-drivers/spips-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/spips-example_2024.2.bb new file mode 100644 index 00000000..71ead5d3 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/spips-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "spips" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spips/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/spips_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/spips_2024.2.bb new file mode 100644 index 00000000..ca02fda0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/spips_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "spips" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/spips/src/" | ||
10 | ESW_COMPONENT_NAME = "libspips.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-sdt/recipes-drivers/sysmon-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmon-example_2024.2.bb new file mode 100644 index 00000000..5bc007ad --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmon-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmon" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmon/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/sysmon_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmon_2024.2.bb new file mode 100644 index 00000000..5353f6f8 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmon_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmon" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmon/src/" | ||
10 | ESW_COMPONENT_NAME = "libsysmon.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-sdt/recipes-drivers/sysmonpsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsu-example_2024.2.bb new file mode 100644 index 00000000..2c76a978 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmonpsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmonpsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsu_2024.2.bb new file mode 100644 index 00000000..871a77a3 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmonpsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmonpsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libsysmonpsu.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-sdt/recipes-drivers/sysmonpsv-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsv-example_2024.2.bb new file mode 100644 index 00000000..edce2794 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsv-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmonpsv" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmonpsv/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsv_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsv_2024.2.bb new file mode 100644 index 00000000..2c693809 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/sysmonpsv_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "sysmonpsv" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone ${@'scugic' if d.getVar('ESW_MACHINE') != 'psv_pmc_0' and d.getVar('ESW_MACHINE') != 'psv_psm_0' else ''}" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/sysmonpsv/src/" | ||
10 | ESW_COMPONENT_NAME = "libsysmonpsv.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-sdt/recipes-drivers/tft_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/tft_2024.2.bb new file mode 100644 index 00000000..d8dcff08 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/tft_2024.2.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-sdt/recipes-drivers/tmr-inject_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/tmr-inject_2024.2.bb new file mode 100644 index 00000000..dbf3d364 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/tmr-inject_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "tmr-inject" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tmr_inject/src/" | ||
10 | ESW_COMPONENT_NAME = "libtmr_inject.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-sdt/recipes-drivers/tmr-manager_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/tmr-manager_2024.2.bb new file mode 100644 index 00000000..dd91fed7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/tmr-manager_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "tmr-manager" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tmr_manager/src/" | ||
10 | ESW_COMPONENT_NAME = "libtmr_manager.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-sdt/recipes-drivers/tmrctr-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/tmrctr-example_2024.2.bb new file mode 100644 index 00000000..8224d6fe --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/tmrctr-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "tmrctr" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tmrctr/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/tmrctr_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/tmrctr_2024.2.bb new file mode 100644 index 00000000..cf94a9d0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/tmrctr_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "tmrctr" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/tmrctr/src/" | ||
10 | ESW_COMPONENT_NAME = "libtmrctr.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-sdt/recipes-drivers/trafgen-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/trafgen-example_2024.2.bb new file mode 100644 index 00000000..84c5618c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/trafgen-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "trafgen" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trafgen/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/trafgen_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/trafgen_2024.2.bb new file mode 100644 index 00000000..77d000db --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/trafgen_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "trafgen" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/trafgen/src/" | ||
10 | ESW_COMPONENT_NAME = "libtrafgen.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-sdt/recipes-drivers/trngpsv_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/trngpsv_2024.2.bb new file mode 100644 index 00000000..1651ede2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/trngpsv_2024.2.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-sdt/recipes-drivers/trngpsx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/trngpsx_2024.2.bb new file mode 100644 index 00000000..7699dfe5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/trngpsx_2024.2.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-sdt/recipes-drivers/ttcps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ttcps-example_2024.2.bb new file mode 100644 index 00000000..d294c383 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ttcps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ttcps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ttcps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/ttcps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ttcps_2024.2.bb new file mode 100644 index 00000000..ea520656 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ttcps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "ttcps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ttcps/src/" | ||
10 | ESW_COMPONENT_NAME = "libttcps.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-sdt/recipes-drivers/uartlite-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartlite-example_2024.2.bb new file mode 100644 index 00000000..9aa0f598 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartlite-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartlite" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartlite/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartlite_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartlite_2024.2.bb new file mode 100644 index 00000000..5998e092 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartlite_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartlite" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartlite/src/" | ||
10 | ESW_COMPONENT_NAME = "libuartlite.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} stdin | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC} | ||
15 | install -m 0755 xuartlite_g.c ${S}/${ESW_COMPONENT_SRC} | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartns550-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartns550-example_2024.2.bb new file mode 100644 index 00000000..d81ce77b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartns550-example_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartns550" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartns550/examples/" | ||
6 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartns550_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartns550_2024.2.bb new file mode 100644 index 00000000..a08763cb --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartns550_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartns550" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartns550/src/" | ||
10 | ESW_COMPONENT_NAME = "libuartns550.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} stdin | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC} | ||
15 | install -m 0755 xuartns550_g.c ${S}/${ESW_COMPONENT_SRC} | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartps-example_2024.2.bb new file mode 100644 index 00000000..bbff466d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartps_2024.2.bb new file mode 100644 index 00000000..932be9eb --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartps_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartps/src/" | ||
10 | ESW_COMPONENT_NAME = "libuartps.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} stdin | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | install -m 0755 xuartps_g.c ${S}/${ESW_COMPONENT_SRC}/ | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv-example_2024.2.bb new file mode 100644 index 00000000..78f878a6 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv-example_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartpsv" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartpsv/examples/" | ||
6 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv_2024.2.bb new file mode 100644 index 00000000..01e48caa --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/uartpsv_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "uartpsv" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/uartpsv/src/" | ||
10 | ESW_COMPONENT_NAME = "libuartpsv.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} stdin | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | install -m 0755 xuartpsv_g.c ${S}/${ESW_COMPONENT_SRC}/ | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/ufspsxc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/ufspsxc_2024.2.bb new file mode 100644 index 00000000..2c52f967 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/ufspsxc_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "ufspsxc" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/ufspsxc/src/" | ||
11 | ESW_COMPONENT_NAME = "libufspsxc.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-sdt/recipes-drivers/usb-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/usb-example_2024.2.bb new file mode 100644 index 00000000..0d4e113a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/usb-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "usb" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usb/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/usb_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/usb_2024.2.bb new file mode 100644 index 00000000..9dac8cba --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/usb_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "usb" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usb/src/" | ||
10 | ESW_COMPONENT_NAME = "libusb.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-sdt/recipes-drivers/usbps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/usbps_2024.2.bb new file mode 100644 index 00000000..c4a2fff0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/usbps_2024.2.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-sdt/recipes-drivers/usbpsu-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/usbpsu-example_2024.2.bb new file mode 100644 index 00000000..4eb9bc93 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/usbpsu-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "usbpsu" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usbpsu/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/usbpsu_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/usbpsu_2024.2.bb new file mode 100644 index 00000000..194b1f0f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/usbpsu_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "usbpsu" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/usbpsu/src/" | ||
10 | ESW_COMPONENT_NAME = "libusbpsu.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-sdt/recipes-drivers/v-axi4s-remap_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-axi4s-remap_2024.2.bb new file mode 100644 index 00000000..cd5fbccd --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-axi4s-remap_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-axi4s-remap" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone " | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_axi4s_remap/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_axi4s_remap.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-sdt/recipes-drivers/v-csc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-csc_2024.2.bb new file mode 100644 index 00000000..068a43e9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-csc_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-csc" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_csc/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_csc.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-sdt/recipes-drivers/v-deinterlacer_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-deinterlacer_2024.2.bb new file mode 100644 index 00000000..741fdd91 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-deinterlacer_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-deinterlacer" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_deinterlacer/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_deinterlacer.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-sdt/recipes-drivers/v-demosaic-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-demosaic-example_2024.2.bb new file mode 100644 index 00000000..cf2cdf6f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-demosaic-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-demosaic" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_demosaic/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-demosaic_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-demosaic_2024.2.bb new file mode 100644 index 00000000..79ef55f2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-demosaic_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-demosaic" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_demosaic/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_demosaic.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-sdt/recipes-drivers/v-frmbuf-rd-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-rd-example_2024.2.bb new file mode 100644 index 00000000..fc13c194 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-rd-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-frmbuf-rd" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_frmbuf_rd/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-rd_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-rd_2024.2.bb new file mode 100644 index 00000000..91ee34d8 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-rd_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-frmbuf-rd" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_frmbuf_rd/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_frmbuf_rd.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | install -m 0755 xv_frmbufrd_g.c ${S}/${ESW_COMPONENT_SRC}/ | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr-example_2024.2.bb new file mode 100644 index 00000000..87a1be53 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-frmbuf-wr" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_frmbuf_wr/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr_2024.2.bb new file mode 100644 index 00000000..d88ac592 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-frmbuf-wr_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-frmbuf-wr" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_frmbuf_wr/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_frmbuf_wr.a" | ||
11 | |||
12 | do_configure:prepend() { | ||
13 | LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetalconfig_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | install -m 0755 xv_frmbufwr_g.c ${S}/${ESW_COMPONENT_SRC}/ | ||
16 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut-example_2024.2.bb new file mode 100644 index 00000000..4d5dcf03 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-gamma-lut" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_gamma_lut/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut_2024.2.bb new file mode 100644 index 00000000..8cf95c9d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-gamma-lut_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-gamma-lut" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_gamma_lut/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_gamma_lut.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-sdt/recipes-drivers/v-hcresampler_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hcresampler_2024.2.bb new file mode 100644 index 00000000..1731f984 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hcresampler_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-hcresampler" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hcresampler/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_hcresampler.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-sdt/recipes-drivers/v-hdmi-common_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmi-common_2024.2.bb new file mode 100644 index 00000000..f6b191a7 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmi-common_2024.2.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 video-common" | ||
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-sdt/recipes-drivers/v-hdmiphy1_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmiphy1_2024.2.bb new file mode 100644 index 00000000..2b99a40a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmiphy1_2024.2.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 video-common" | ||
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-sdt/recipes-drivers/v-hdmirx1_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirx1_2024.2.bb new file mode 100644 index 00000000..4035ff1c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirx1_2024.2.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 video-common v-hdmi-common" | ||
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-sdt/recipes-drivers/v-hdmirx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirx_2024.2.bb new file mode 100644 index 00000000..c7d4d96b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmirx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common v-hdmi-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirx/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmirx.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-sdt/recipes-drivers/v-hdmirxss1_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirxss1_2024.2.bb new file mode 100644 index 00000000..a1139a5d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirxss1_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmirxss1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-hdmi-common v-hdmirx1 tmrctr" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp22-rx", "hdcp22-rx", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirxss1/src/" | ||
13 | ESW_COMPONENT_NAME = "libv_hdmirxss1.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirxss_2024.2.bb new file mode 100644 index 00000000..5b703988 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmirxss_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmirxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-hdmirx v-hdmi-common" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | |||
11 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmirxss/src/" | ||
12 | ESW_COMPONENT_NAME = "libv_hdmirxss.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-sdt/recipes-drivers/v-hdmitx1_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitx1_2024.2.bb new file mode 100644 index 00000000..c8e0e041 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitx1_2024.2.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 video-common v-hdmi-common" | ||
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-sdt/recipes-drivers/v-hdmitx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitx_2024.2.bb new file mode 100644 index 00000000..d3de4af1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmitx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common v-hdmi-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitx/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_hdmitx.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-sdt/recipes-drivers/v-hdmitxss1_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitxss1_2024.2.bb new file mode 100644 index 00000000..7d86f9c6 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitxss1_2024.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmitxss1" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-hdmitx1 vtc tmrctr v-hdmi-common" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp22-tx", "hdcp22-tx", "",d)}" | ||
11 | |||
12 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitxss1/src/" | ||
13 | ESW_COMPONENT_NAME = "libv_hdmitxss1.a" | ||
14 | |||
15 | addtask do_generate_driver_data before do_configure after do_prepare_recipe_sysroot | ||
16 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitxss_2024.2.bb new file mode 100644 index 00000000..7dfbb3b5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hdmitxss_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-hdmitxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-hdmitx vtc v-hdmi-common" | ||
9 | DEPENDS += " ${@bb.utils.contains("MACHINE_FEATURES", "hdcp1x", "hdcp1x", "",d)}" | ||
10 | |||
11 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hdmitxss/src/" | ||
12 | ESW_COMPONENT_NAME = "libv_hdmitxss.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-sdt/recipes-drivers/v-hscaler_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-hscaler_2024.2.bb new file mode 100644 index 00000000..b239380e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-hscaler_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-hscaler" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_hscaler/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_hscaler.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-sdt/recipes-drivers/v-letterbox_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-letterbox_2024.2.bb new file mode 100644 index 00000000..f5ad5f4e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-letterbox_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-letterbox" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_letterbox/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_letterbox.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-sdt/recipes-drivers/v-mix-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-mix-example_2024.2.bb new file mode 100644 index 00000000..8bafbf00 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-mix-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-mix" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_mix/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-mix_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-mix_2024.2.bb new file mode 100644 index 00000000..acc19bd0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-mix_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-mix" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_mix/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_mix.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-sdt/recipes-drivers/v-multi-scaler-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-multi-scaler-example_2024.2.bb new file mode 100644 index 00000000..28660316 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-multi-scaler-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-multi-scaler" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_multi_scaler/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-multi-scaler_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-multi-scaler_2024.2.bb new file mode 100644 index 00000000..bd725dbe --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-multi-scaler_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-multi-scaler" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_multi_scaler/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_multi_scaler.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-sdt/recipes-drivers/v-scenechange-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-scenechange-example_2024.2.bb new file mode 100644 index 00000000..2859de79 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-scenechange-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-scenechange" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_scenechange/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/v-scenechange_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-scenechange_2024.2.bb new file mode 100644 index 00000000..77cf9189 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-scenechange_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-scenechange" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_scenechange/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_scenechange.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-sdt/recipes-drivers/v-sdirx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-sdirx_2024.2.bb new file mode 100644 index 00000000..39d54f2e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-sdirx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-sdirx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common sdi-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_sdirx/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_sdirx.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-sdt/recipes-drivers/v-sdirxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-sdirxss_2024.2.bb new file mode 100644 index 00000000..bba5be70 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-sdirxss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-sdirxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-sdirx" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_sdirxss/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_sdirxss.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-sdt/recipes-drivers/v-sditx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-sditx_2024.2.bb new file mode 100644 index 00000000..4ee47426 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-sditx_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-sditx" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone video-common sdi-common" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_sditx/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_sditx.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-sdt/recipes-drivers/v-sditxss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-sditxss_2024.2.bb new file mode 100644 index 00000000..b3f7e2e9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-sditxss_2024.2.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | |||
2 | inherit features_check | ||
3 | |||
4 | REQUIRED_MACHINE_FEATURES = "v-sditxss" | ||
5 | |||
6 | inherit esw python3native | ||
7 | |||
8 | DEPENDS += "xilstandalone v-sditx vtc" | ||
9 | |||
10 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_sditxss/src/" | ||
11 | ESW_COMPONENT_NAME = "libv_sditxss.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-sdt/recipes-drivers/v-tpg_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-tpg_2024.2.bb new file mode 100644 index 00000000..6ea70db1 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-tpg_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-tpg" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_tpg/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_tpg.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-sdt/recipes-drivers/v-vcresampler_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-vcresampler_2024.2.bb new file mode 100644 index 00000000..45913cdc --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-vcresampler_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-vcresampler" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_vcresampler/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_vcresampler.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-sdt/recipes-drivers/v-vscaler_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-vscaler_2024.2.bb new file mode 100644 index 00000000..9528d2e0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-vscaler_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "v-vscaler" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/v_vscaler/src/" | ||
10 | ESW_COMPONENT_NAME = "libv_vscaler.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-sdt/recipes-drivers/v-warp-filter_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-warp-filter_2024.2.bb new file mode 100644 index 00000000..f908ce55 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-warp-filter_2024.2.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-sdt/recipes-drivers/v-warp-init_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/v-warp-init_2024.2.bb new file mode 100644 index 00000000..ff04ec35 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/v-warp-init_2024.2.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-sdt/recipes-drivers/video-common_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/video-common_2024.2.bb new file mode 100644 index 00000000..278dee8a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/video-common_2024.2.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "video-common" | ||
4 | |||
5 | inherit esw | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/video_common/src/" | ||
10 | ESW_COMPONENT_NAME = "libvideo_common.a" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/vphy_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/vphy_2024.2.bb new file mode 100644 index 00000000..c24aaee3 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/vphy_2024.2.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 video-common" | ||
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-sdt/recipes-drivers/vprocss-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/vprocss-example_2024.2.bb new file mode 100644 index 00000000..d9050ec4 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/vprocss-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "vprocss" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/vprocss/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/vprocss_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/vprocss_2024.2.bb new file mode 100644 index 00000000..26b2852f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/vprocss_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "vprocss" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common gpio axis-switch axivdma v-csc v-deinterlacer v-hcresampler v-vcresampler v-hscaler v-vscaler v-letterbox" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/vprocss/src/" | ||
10 | ESW_COMPONENT_NAME = "libvprocss.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-sdt/recipes-drivers/vtc_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/vtc_2024.2.bb new file mode 100644 index 00000000..a82ae5ee --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/vtc_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "vtc" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone video-common" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/vtc/src/" | ||
10 | ESW_COMPONENT_NAME = "libvtc.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-sdt/recipes-drivers/wdtps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/wdtps-example_2024.2.bb new file mode 100644 index 00000000..610a7476 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/wdtps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "wdtps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/wdtps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/wdtps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/wdtps_2024.2.bb new file mode 100644 index 00000000..2c900038 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/wdtps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "wdtps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/wdtps/src/" | ||
10 | ESW_COMPONENT_NAME = "libwdtps.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-sdt/recipes-drivers/wdttb-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/wdttb-example_2024.2.bb new file mode 100644 index 00000000..cad6ca20 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/wdttb-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "wdttb" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/wdttb/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/wdttb_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/wdttb_2024.2.bb new file mode 100644 index 00000000..33331c32 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/wdttb_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "wdttb" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/wdttb/src/" | ||
10 | ESW_COMPONENT_NAME = "libwdttb.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-sdt/recipes-drivers/xadcps-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xadcps-example_2024.2.bb new file mode 100644 index 00000000..f8878144 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xadcps-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xadcps" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xadcps/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/xadcps_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xadcps_2024.2.bb new file mode 100644 index 00000000..85800a27 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xadcps_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xadcps" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xadcps/src/" | ||
10 | ESW_COMPONENT_NAME = "libxadcps.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-sdt/recipes-drivers/xdmapcie-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xdmapcie-example_2024.2.bb new file mode 100644 index 00000000..26983a8f --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xdmapcie-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xdmapcie" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xdmapcie/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/xdmapcie_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xdmapcie_2024.2.bb new file mode 100644 index 00000000..cab8e9d0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xdmapcie_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xdmapcie" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xdmapcie/src/" | ||
10 | ESW_COMPONENT_NAME = "libxdmapcie.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-sdt/recipes-drivers/xxvethernet-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xxvethernet-example_2024.2.bb new file mode 100644 index 00000000..d6a87183 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xxvethernet-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xxvethernet" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xxvethernet/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/xxvethernet_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/xxvethernet_2024.2.bb new file mode 100644 index 00000000..491eb07c --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/xxvethernet_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "xxvethernet" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone" | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/xxvethernet/src/" | ||
10 | ESW_COMPONENT_NAME = "libxxvethernet.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-sdt/recipes-drivers/zdma-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/zdma-example_2024.2.bb new file mode 100644 index 00000000..e74e3279 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/zdma-example_2024.2.bb | |||
@@ -0,0 +1,5 @@ | |||
1 | inherit esw_examples features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "zdma" | ||
4 | |||
5 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/zdma/examples/" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-drivers/zdma_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-drivers/zdma_2024.2.bb new file mode 100644 index 00000000..e987f560 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-drivers/zdma_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit features_check | ||
2 | |||
3 | REQUIRED_MACHINE_FEATURES = "zdma" | ||
4 | |||
5 | inherit esw python3native | ||
6 | |||
7 | DEPENDS += "xilstandalone " | ||
8 | |||
9 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/zdma/src/" | ||
10 | ESW_COMPONENT_NAME = "libzdma.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-sdt/recipes-libraries/freertos10-xilinx_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/freertos10-xilinx_2024.2.bb new file mode 100644 index 00000000..22d7955e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/freertos10-xilinx_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/ThirdParty/bsp/freertos10_xilinx/src/" | ||
4 | ESW_COMPONENT_NAME = "libfreertos.a" | ||
5 | |||
6 | DEPENDS += "libxil xilstandalone xiltimer" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | ) | ||
15 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.2.bb new file mode 100644 index 00000000..2eb08307 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/libxil_2024.2.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | inherit esw python3native features_check | ||
2 | |||
3 | LIBXIL_CONFIG ??= "" | ||
4 | include ${LIBXIL_CONFIG} | ||
5 | |||
6 | # The python code allows us to use an include above, instead of require | ||
7 | # as it enforces that the file will be available for inclusion. It also | ||
8 | # gives the user feedback if something isn't configured properly. | ||
9 | python () { | ||
10 | libxil_cfg = d.getVar("LIBXIL_CONFIG") | ||
11 | if libxil_cfg: | ||
12 | bbpath = d.getVar('BBPATH') | ||
13 | libxil_path = bb.utils.which(bbpath, libxil_cfg) | ||
14 | if libxil_path: | ||
15 | return | ||
16 | else: | ||
17 | d.setVar('BB_DONT_CACHE', '1') | ||
18 | bb.parse.SkipRecipe("LIBXIL_CONFIG (%s) was not found." % libxil_cfg) | ||
19 | else: | ||
20 | d.setVar('BB_DONT_CACHE', '1') | ||
21 | raise bb.parse.SkipRecipe("No LIBXIL_CONFIG set.") | ||
22 | } | ||
23 | |||
24 | ESW_COMPONENT_SRC = "/XilinxProcessorIPLib/drivers/" | ||
25 | ESW_COMPONENT_NAME = "libxil.a" | ||
26 | |||
27 | DEPENDS += "xilstandalone " | ||
28 | MACHINE_FEATURES:remove = "aiengine dfeccf dfeequ dfemix dfeprach rfdc dfeofdm" | ||
29 | REQUIRED_MACHINE_FEATURES = "${MACHINE_FEATURES}" | ||
30 | PACKAGECONFIG ?= "${MACHINE_FEATURES}" | ||
31 | |||
32 | do_compile() { | ||
33 | # Combines the .a archives produced by all of the dependent items | ||
34 | cd ${RECIPE_SYSROOT}/usr/lib/ | ||
35 | echo create libxil.a > libxil.mri | ||
36 | for each in ${REQUIRED_MACHINE_FEATURES}; do | ||
37 | each=$(echo $each | sed 's/-/_/g') | ||
38 | if [ -e lib$each.a ]; then | ||
39 | echo addlib lib$each.a >> libxil.mri | ||
40 | fi | ||
41 | done | ||
42 | echo “save” >> libxil.mri | ||
43 | echo “end” >> libxil.mri | ||
44 | ${AR} -M <libxil.mri | ||
45 | cp libxil.a ${B} | ||
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-sdt/recipes-libraries/lwip_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/lwip_2024.2.bb new file mode 100644 index 00000000..e70dfa11 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/lwip_2024.2.bb | |||
@@ -0,0 +1,34 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/ThirdParty/sw_services/lwip220/src/" | ||
4 | ESW_COMPONENT_NAME = "liblwip220.a" | ||
5 | |||
6 | DEPENDS += "libxil" | ||
7 | DEPENDS:append:xilinx-freertos = "freertos10-xilinx" | ||
8 | |||
9 | EXTRA_OECMAKE += "-Dlwip220_api_mode=RAW_API" | ||
10 | EXTRA_OECMAKE += "-Dlwip220_dhcp_does_arp_check=ON" | ||
11 | EXTRA_OECMAKE += "-Dlwip220_dhcp=ON" | ||
12 | EXTRA_OECMAKE += "-Dlwip220_pbuf_pool_size=2048" | ||
13 | EXTRA_OECMAKE += "-Dlwip220_ipv6_enable=OFF" | ||
14 | EXTRA_OECMAKE:append:xilinx-freertos = " -Dlwip220_api_mode=SOCKET_API" | ||
15 | |||
16 | do_configure:prepend() { | ||
17 | # This script should also not rely on relative paths and such | ||
18 | ( | ||
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 | install -m 0755 xtopology_g.c ${S}/${ESW_COMPONENT_SRC}/ | ||
23 | ) | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | install -m 0755 ${B}/${ESW_COMPONENT_NAME} ${D}${libdir} | ||
30 | install -m 0644 ${B}/include/*.h ${D}${includedir} | ||
31 | cp -r ${B}/include/arch/ ${D}${includedir} | ||
32 | cp -r ${B}/include/include/lwip/ ${D}${includedir} | ||
33 | cp -r ${B}/include/netif/ ${D}${includedir} | ||
34 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilffs-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilffs-example_2024.2.bb new file mode 100644 index 00000000..cae39d17 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilffs-example_2024.2.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | # Requires by dependency xilffs | ||
4 | REQUIRED_MACHINE_FEATURES = "sdps" | ||
5 | |||
6 | ESW_COMPONENT_SRC = "/lib/sw_services/xilffs/examples/" | ||
7 | |||
8 | DEPENDS += "xilffs xiltimer" | ||
9 | |||
10 | do_configure:prepend() { | ||
11 | ( | ||
12 | cd ${S} | ||
13 | lopper ${DTS_FILE} -- baremetallinker_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
14 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
15 | ) | ||
16 | } | ||
17 | |||
18 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
19 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
20 | |||
21 | do_install() { | ||
22 | install -d ${D}/${base_libdir}/firmware | ||
23 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
24 | } | ||
25 | |||
26 | do_deploy() { | ||
27 | install -d ${DEPLOYDIR}/${BPN}/ | ||
28 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
29 | } | ||
30 | addtask deploy before do_build after do_package | ||
31 | |||
32 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilffs_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilffs_2024.2.bb new file mode 100644 index 00000000..b7e0784a --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilffs_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilffs/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilffs.a" | ||
5 | |||
6 | PACKAGECONFIG ??= "read_only word_access" | ||
7 | PACKAGECONFIG[use_mkfs] ="-DXILFFS_use_mkfs=ON,-DXILFFS_use_mkfs=OFF,," | ||
8 | PACKAGECONFIG[read_only] ="-DXILFFS_read_only=ON,-DXILFFS_read_only=OFF,," | ||
9 | PACKAGECONFIG[word_access]="-DXILFFS_word_access=ON,-DXILFFS_word_access=OFF,," | ||
10 | |||
11 | EXTRA_OECMAKE += "${@'-DXILFFS_num_logical_vol=10 -DXILFFS_enable_multi_partition=ON' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else ''}" | ||
12 | |||
13 | DEPENDS += "xilstandalone libxil" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga-example_2024.2.bb new file mode 100644 index 00000000..a3fb1560 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga-example_2024.2.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilfpga/examples/" | ||
4 | |||
5 | DEPENDS += "xilfpga" | ||
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 | ) | ||
13 | } | ||
14 | |||
15 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
16 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${D}/${base_libdir}/firmware | ||
20 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
21 | } | ||
22 | |||
23 | do_deploy() { | ||
24 | install -d ${DEPLOYDIR}/${BPN}/ | ||
25 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
26 | } | ||
27 | addtask deploy before do_build after do_package | ||
28 | |||
29 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga_2024.2.bb new file mode 100644 index 00000000..6eaf40ac --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilfpga_2024.2.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilfpga/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilfpga.a" | ||
5 | |||
6 | DEPENDS += "libxil xilsecure" | ||
7 | DEPENDS += "libxil ${@'xilmailbox' if d.getVar('MACHINE') == 'versal-generic' else ''}" | ||
8 | |||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilloader_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilloader_2024.2.bb new file mode 100644 index 00000000..4f01407e --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilloader_2024.2.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilloader/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilloader.a" | ||
5 | |||
6 | #DEPENDS += "xilstandalone libxil xilpdi xilffs xilsecure xilpuf xilplmi" | ||
7 | DEPENDS += "xilstandalone libxil xilpm xilpdi xilffs xilsecure xilpuf xilsem" | ||
8 | |||
9 | DEPENDS += "cframe" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox-example_2024.2.bb new file mode 100644 index 00000000..600369ad --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox-example_2024.2.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilmailbox/examples/" | ||
4 | |||
5 | DEPENDS += "xilmailbox" | ||
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 | ) | ||
13 | } | ||
14 | |||
15 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
16 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
17 | |||
18 | do_generate_eglist () { | ||
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 | |||
24 | addtask generate_eglist before do_configure after do_prepare_recipe_sysroot | ||
25 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
26 | |||
27 | do_install() { | ||
28 | install -d ${D}/${base_libdir}/firmware | ||
29 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
30 | } | ||
31 | |||
32 | do_deploy() { | ||
33 | install -d ${DEPLOYDIR}/${BPN}/ | ||
34 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
35 | } | ||
36 | addtask deploy before do_build after do_package | ||
37 | |||
38 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox_2024.2.bb new file mode 100644 index 00000000..77115515 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilmailbox_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilmailbox/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilmailbox.a" | ||
5 | |||
6 | DEPENDS += "xilstandalone libxil xiltimer" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | ) | ||
15 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilnvm-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilnvm-example_2024.2.bb new file mode 100644 index 00000000..bd001f64 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilnvm-example_2024.2.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilnvm/examples/" | ||
4 | |||
5 | PACKAGECONFIG ??= "client server" | ||
6 | PACKAGECONFIG[client] ="-DXILNVM_mode="client",," | ||
7 | PACKAGECONFIG[server] ="-DXILNVM_mode="server",," | ||
8 | |||
9 | DEPENDS += "xilnvm" | ||
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-sdt/recipes-libraries/xilnvm_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilnvm_2024.2.bb new file mode 100644 index 00000000..8aa1250d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilnvm_2024.2.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-sdt/recipes-libraries/xilpdi_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilpdi_2024.2.bb new file mode 100644 index 00000000..c008b069 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilpdi_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpdi/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilpdi.a" | ||
5 | |||
6 | DEPENDS += "xilstandalone libxil" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilplmi_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilplmi_2024.2.bb new file mode 100644 index 00000000..cb3b7831 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilplmi_2024.2.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-sdt/recipes-libraries/xilpm_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilpm_2024.2.bb new file mode 100644 index 00000000..ee6faa13 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilpm_2024.2.bb | |||
@@ -0,0 +1,38 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpm/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilpm.a" | ||
5 | |||
6 | DEPENDS += "libxil ${@'xilplmi cframe' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else ''}" | ||
7 | |||
8 | def lopper_args(d): | ||
9 | lopper_cmd_append = "" | ||
10 | flags = [ | ||
11 | "APU_AS_OVERLAY_CONFIG_MASTER", | ||
12 | "APU_AS_POWER_MANAGEMENT_MASTER", | ||
13 | "APU_AS_RESET_MANAGEMENT_MASTER", | ||
14 | "RPU0_AS_OVERLAY_CONFIG_MASTER", | ||
15 | "RPU0_AS_POWER_MANAGEMENT_MASTER", | ||
16 | "RPU0_AS_RESET_MANAGEMENT_MASTER", | ||
17 | "RPU1_AS_OVERLAY_CONFIG_MASTER", | ||
18 | "RPU1_AS_POWER_MANAGEMENT_MASTER", | ||
19 | "RPU1_AS_RESET_MANAGEMENT_MASTER" | ||
20 | ] | ||
21 | |||
22 | for flag in flags: | ||
23 | value = d.getVar("XILPM_" + flag) | ||
24 | if value: | ||
25 | lopper_cmd_append += "XILPM_" + flag.lower() + ":" + value.lower() + " " | ||
26 | |||
27 | return lopper_cmd_append | ||
28 | |||
29 | LOPPER_CMD_APPEND = "${@lopper_args(d)}" | ||
30 | |||
31 | do_configure:prepend:zynqmp() { | ||
32 | # This script should also not rely on relative paths and such | ||
33 | ( | ||
34 | cd ${S} | ||
35 | lopper -f --enhanced --werror ${DTS_FILE} -- generate_config_object pm_cfg_obj.c ${ESW_MACHINE} ${LOPPER_CMD_APPEND} | ||
36 | install -m 0755 pm_cfg_obj.c ${S}/${ESW_COMPONENT_SRC}/zynqmp/client/common/ | ||
37 | ) | ||
38 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilpuf-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilpuf-example_2024.2.bb new file mode 100644 index 00000000..bbe2920b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilpuf-example_2024.2.bb | |||
@@ -0,0 +1,33 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/examples/" | ||
4 | |||
5 | PACKAGECONFIG ??= "client server" | ||
6 | PACKAGECONFIG[client] ="-DXILPUF_Mode="client",," | ||
7 | PACKAGECONFIG[server] ="-DXILPUF_Mode="server",," | ||
8 | |||
9 | DEPENDS += "xilpuf xilsecure xilmailbox xilnvm xilplmi" | ||
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-sdt/recipes-libraries/xilpuf_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilpuf_2024.2.bb new file mode 100644 index 00000000..84765a39 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilpuf_2024.2.bb | |||
@@ -0,0 +1,10 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilpuf/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilpuf.a" | ||
5 | |||
6 | PACKAGECONFIG ??= "client server" | ||
7 | PACKAGECONFIG[client] ="-DXILPUF_Mode="client",," | ||
8 | PACKAGECONFIG[server] ="-DXILPUF_Mode="server",," | ||
9 | |||
10 | DEPENDS += "libxil xiltimer ${@'xilplmi' if d.getVar('ESW_MACHINE') == 'psv_pmc_0' else 'xilmailbox'}" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.1.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.1.bb new file mode 100644 index 00000000..3337dce9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.1.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilrsa/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilrsa.a" | ||
5 | |||
6 | DEPENDS += "libxil" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | ) | ||
15 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.2.bb new file mode 100644 index 00000000..3337dce9 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilrsa_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilrsa/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilrsa.a" | ||
5 | |||
6 | DEPENDS += "libxil" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | ) | ||
15 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilsecure-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilsecure-example_2024.2.bb new file mode 100644 index 00000000..a2b4b7a5 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilsecure-example_2024.2.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-sdt/recipes-libraries/xilsecure_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilsecure_2024.2.bb new file mode 100644 index 00000000..be22ba90 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilsecure_2024.2.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-sdt/recipes-libraries/xilsem_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilsem_2024.2.bb new file mode 100644 index 00000000..3631d7f0 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilsem_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilsem/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilsem.a" | ||
5 | |||
6 | DEPENDS += "xilstandalone libxil" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilskey-example_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilskey-example_2024.2.bb new file mode 100644 index 00000000..a42d6fd2 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilskey-example_2024.2.bb | |||
@@ -0,0 +1,29 @@ | |||
1 | inherit esw deploy | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilskey/examples/" | ||
4 | |||
5 | DEPENDS += "xilskey xilsecure" | ||
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 | ) | ||
13 | } | ||
14 | |||
15 | ESW_CUSTOM_LINKER_FILE ?= "None" | ||
16 | EXTRA_OECMAKE = "-DCUSTOM_LINKER_FILE=${@d.getVar('ESW_CUSTOM_LINKER_FILE')}" | ||
17 | |||
18 | do_install() { | ||
19 | install -d ${D}/${base_libdir}/firmware | ||
20 | install -m 0755 ${B}/*.elf ${D}/${base_libdir}/firmware | ||
21 | } | ||
22 | |||
23 | do_deploy() { | ||
24 | install -d ${DEPLOYDIR}/${BPN}/ | ||
25 | install -Dm 0644 ${WORKDIR}/package/${base_libdir}/firmware/*.elf ${DEPLOYDIR}/${BPN}/ | ||
26 | } | ||
27 | addtask deploy before do_build after do_package | ||
28 | |||
29 | FILES:${PN} = "${base_libdir}/firmware/*.elf" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilskey_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilskey_2024.2.bb new file mode 100644 index 00000000..84782554 --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilskey_2024.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | inherit esw | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xilskey/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilskey.a" | ||
5 | |||
6 | DEPENDS += "libxil" | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb new file mode 100644 index 00000000..a4b0037b --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/bsp/standalone/src/" | ||
4 | ESW_COMPONENT_NAME = "libxilstandalone.a" | ||
5 | |||
6 | DEPENDS += "libgloss" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- baremetal_bspconfig_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} | ||
13 | install -m 0755 MemConfig.cmake ${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} | ||
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/ | ||
19 | ) | ||
20 | |||
21 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xiltimer_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xiltimer_2024.2.bb new file mode 100644 index 00000000..dd19671d --- /dev/null +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xiltimer_2024.2.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | inherit esw python3native | ||
2 | |||
3 | ESW_COMPONENT_SRC = "/lib/sw_services/xiltimer/src/" | ||
4 | ESW_COMPONENT_NAME = "libxiltimer.a" | ||
5 | |||
6 | DEPENDS += "libxil" | ||
7 | |||
8 | do_configure:prepend() { | ||
9 | # This script should also not rely on relative paths and such | ||
10 | ( | ||
11 | cd ${S} | ||
12 | lopper ${DTS_FILE} -- bmcmake_metadata_xlnx.py ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} | ||
13 | install -m 0755 *.cmake ${S}/${ESW_COMPONENT_SRC}/ | ||
14 | ) | ||
15 | } | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend b/meta-xilinx-standalone-sdt/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend index 5434c9a5..7147c71e 100644 --- a/meta-xilinx-standalone-sdt/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend +++ b/meta-xilinx-standalone-sdt/recipes-openamp/libmetal/libmetal-xlnx_%.bbappend | |||
@@ -1 +1 @@ | |||
require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/libmetal/libmetal-xlnx.inc | require ${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-sdt/recipes-openamp/libmetal/libmetal-xlnx.inc | ||
diff --git a/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend b/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend index ca167bd1..ee0aa58b 100644 --- a/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend +++ b/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/open-amp-xlnx_%.bbappend | |||
@@ -1 +1 @@ | |||
require ${@'${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-experimental/recipes-openamp/open-amp/open-amp-xlnx.inc' if d.getVar('XILINX_WITH_ESW') == 'sdt' else ''} | require ${@'${LAYER_PATH_openamp-layer}/vendor/xilinx/meta-xilinx-standalone-sdt/recipes-openamp/open-amp/open-amp-xlnx.inc' if d.getVar('XILINX_WITH_ESW') == 'sdt' else ''} | ||
diff --git a/meta-xilinx-standalone/README.md b/meta-xilinx-standalone/README.md index a1955d5b..888bef23 100644 --- a/meta-xilinx-standalone/README.md +++ b/meta-xilinx-standalone/README.md | |||
@@ -64,8 +64,12 @@ This layer depends on: | |||
64 | layers: meta-oe | 64 | layers: meta-oe |
65 | branch: scarthgap | 65 | branch: scarthgap |
66 | 66 | ||
67 | URI: https://git.yoctoproject.org/meta-arm | ||
68 | layers: meta-arm, meta-arm-toolchain | ||
69 | branch: scarthgap | ||
70 | |||
67 | URI: | 71 | URI: |
68 | https://git.yoctoproject.org/meta-xilinx (official version) | 72 | https://git.yoctoproject.org/meta-xilinx (official version) |
69 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 73 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
70 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-bsp | 74 | layers: meta-xilinx-microblaze, meta-xilinx-core, meta-xilinx-bsp |
71 | branch: scarthgap or amd xilinx release version (e.g. rel-v2023.1) | 75 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass index 879233d0..6a6faf01 100644 --- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass +++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | |||
@@ -10,6 +10,7 @@ ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" | |||
10 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" | 10 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" |
11 | 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" | 12 | ESW_BRANCH[2024.1] = "xlnx_rel_v2024.1" |
13 | ESW_BRANCH[2024.2] = "xlnx_rel_v2024.2" | ||
13 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" | 14 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" |
14 | 15 | ||
15 | ESW_REV[git] = "${AUTOREV}" | 16 | ESW_REV[git] = "${AUTOREV}" |
@@ -18,6 +19,7 @@ ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" | |||
18 | ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" | 19 | ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" |
19 | ESW_REV[2023.2] = "e847e1935dca630615e5f7dc694365a44b89699c" | 20 | ESW_REV[2023.2] = "e847e1935dca630615e5f7dc694365a44b89699c" |
20 | ESW_REV[2024.1] = "b173d246826f662b9a98215d8f39e93d39d699b4" | 21 | ESW_REV[2024.1] = "b173d246826f662b9a98215d8f39e93d39d699b4" |
22 | ESW_REV[2024.2] = "6e4d0b89d2958994ab9b3531eb4c6e648a63f201" | ||
21 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'INVALID'}" | 23 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'INVALID'}" |
22 | 24 | ||
23 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" | 25 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" |
@@ -30,6 +32,7 @@ LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' | |||
30 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' | 32 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' |
31 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_update] = '9fceecdbcad88698f265578f3d4cb26c' | 33 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_update] = '9fceecdbcad88698f265578f3d4cb26c' |
32 | LIC_FILES_CHKSUM[xlnx_rel_v2024.1] = '0dcabd3719e5ac33f7c03f0d77d473f2' | 34 | LIC_FILES_CHKSUM[xlnx_rel_v2024.1] = '0dcabd3719e5ac33f7c03f0d77d473f2' |
35 | LIC_FILES_CHKSUM[xlnx_rel_v2024.2] = '689662801a76c14d0cb57ae169cbec7c' | ||
33 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" | 36 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" |
34 | 37 | ||
35 | SRC_URI = "${EMBEDDEDSW_SRCURI}" | 38 | SRC_URI = "${EMBEDDEDSW_SRCURI}" |
diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf b/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf index dfc8fa08..8e1d6edf 100644 --- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf +++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.conf | |||
@@ -2,12 +2,6 @@ require conf/distro/xilinx-standalone.inc | |||
2 | 2 | ||
3 | DISTRO_NAME:append = " (lto)" | 3 | DISTRO_NAME:append = " (lto)" |
4 | 4 | ||
5 | # By default we want to optimize for size. | ||
6 | FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" | ||
7 | |||
8 | # Workaround for microblaze -Os bug | ||
9 | FULL_OPTIMIZATION:microblaze = "-O2 -pipe ${DEBUG_FLAGS}" | ||
10 | |||
11 | # We also need to use Link Time Optimization for many items, make this the | 5 | # We also need to use Link Time Optimization for many items, make this the |
12 | # default. | 6 | # default. |
13 | ESW_CFLAGS += " -Os -flto -ffat-lto-objects" | 7 | ESW_CFLAGS += " -Os -flto -ffat-lto-objects" |
diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc index 4d591707..17b9430d 100644 --- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc +++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc | |||
@@ -49,3 +49,19 @@ BB_SIGNATURE_HANDLER ?= "OEEquivHash" | |||
49 | BB_HASHSERVE ??= "auto" | 49 | BB_HASHSERVE ??= "auto" |
50 | 50 | ||
51 | MACHINE_FEATURES_BACKFILL_CONSIDERED += "rtc qemu-usermode" | 51 | MACHINE_FEATURES_BACKFILL_CONSIDERED += "rtc qemu-usermode" |
52 | |||
53 | # Prevent warnings about 'buildpaths' | ||
54 | # After investigation it appears a debuginfo directory path to the build | ||
55 | # directory is being inserted into the objects. This path is not actually | ||
56 | # being referred to by any components. Why this is happening is unknown, | ||
57 | # so we avoid the warning as we know this is not an actual issue. | ||
58 | WARN_QA:remove = "buildpaths" | ||
59 | |||
60 | # By default PetaLinux uses the own-mirror class to access cached version of | ||
61 | # the software. While this distribution configuration is not PetaLinux, nor | ||
62 | # should it require PetaLinux to operating properly, including the same mirror | ||
63 | # configuration will unify the Linux and non-Linux (baremetal) configurations. | ||
64 | # Do this via include so if meta-petalinux is not part of the build this will | ||
65 | # not error. This also allows the user to choose to handle the download | ||
66 | # mirroring in their own way for non-PetaLinux like configs. | ||
67 | include conf/distro/include/petalinux-mirrors.conf | ||
diff --git a/meta-xilinx-standalone/conf/layer.conf b/meta-xilinx-standalone/conf/layer.conf index 8087d5a6..17289851 100644 --- a/meta-xilinx-standalone/conf/layer.conf +++ b/meta-xilinx-standalone/conf/layer.conf | |||
@@ -17,9 +17,6 @@ LAYERRECOMMENDS_xilinx-standalone = "xilinx-microblaze" | |||
17 | 17 | ||
18 | LAYERSERIES_COMPAT_xilinx-standalone = "scarthgap" | 18 | LAYERSERIES_COMPAT_xilinx-standalone = "scarthgap" |
19 | 19 | ||
20 | # Set this to enable this layer | ||
21 | #XILINX_WITH_ESW = "generic" | ||
22 | |||
23 | # Sanity check for meta-xilinx-standalone layer. | 20 | # Sanity check for meta-xilinx-standalone layer. |
24 | # Setting SKIP_META_XILINX_STANDALONE_SANITY_CHECK to "1" would skip the bbappend files check. | 21 | # Setting SKIP_META_XILINX_STANDALONE_SANITY_CHECK to "1" would skip the bbappend files check. |
25 | INHERIT += "sanity-meta-xilinx-standalone" | 22 | INHERIT += "sanity-meta-xilinx-standalone" |
@@ -31,3 +28,6 @@ INHERIT += "sanity-meta-xilinx-standalone" | |||
31 | META_XILINX_STANDALONE_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-xilinx-standalone-default-versions.inc" | 28 | META_XILINX_STANDALONE_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-xilinx-standalone-default-versions.inc" |
32 | 29 | ||
33 | USER_CLASSES:append = " meta-xilinx-standalone-cfg" | 30 | USER_CLASSES:append = " meta-xilinx-standalone-cfg" |
31 | |||
32 | # Allow other layers to find the root of this layer if necessary | ||
33 | LAYERBASE_xilinx-standalone = "${LAYERDIR}" | ||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-examples.inc b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-examples.inc new file mode 100644 index 00000000..ffb70044 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-examples.inc | |||
@@ -0,0 +1,25 @@ | |||
1 | LICENSE = "BSD" | ||
2 | |||
3 | inherit xlnx-embeddedsw features_check | ||
4 | |||
5 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
6 | |||
7 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
8 | |||
9 | DEPENDS = "librfdc" | ||
10 | RDEPENDS:${PN} = "librfdc" | ||
11 | |||
12 | PACKAGES = "${PN}-dbg ${PN}" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | B = "${WORKDIR}/build" | ||
16 | |||
17 | FLAG = "" | ||
18 | FLAG:zcu111-zynqmp = "-DXPS_BOARD_ZCU111" | ||
19 | |||
20 | RFDC_SUBDIR = "XilinxProcessorIPLib/drivers/rfdc/examples" | ||
21 | |||
22 | do_compile:prepend () { | ||
23 | cd ${S}/${RFDC_SUBDIR} | ||
24 | cp Makefile.Linux Makefile | ||
25 | } | ||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.1.bb new file mode 100644 index 00000000..0f0ad56d --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.1.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-intr application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile() { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-intr RFDC_OBJS=xrfdc_intr_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-intr ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.2.bb new file mode 100644 index 00000000..0f0ad56d --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2023.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-intr application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile() { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-intr RFDC_OBJS=xrfdc_intr_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-intr ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.1.bb new file mode 100644 index 00000000..0f0ad56d --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.1.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-intr application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile() { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-intr RFDC_OBJS=xrfdc_intr_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-intr ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.2.bb new file mode 100644 index 00000000..0f0ad56d --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-intr_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-intr application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile() { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-intr RFDC_OBJS=xrfdc_intr_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-intr ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.1.bb new file mode 100644 index 00000000..a1376370 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.1.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-read-write application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile () { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-read-write RFDC_OBJS=xrfdc_read_write_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-read-write ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.2.bb new file mode 100644 index 00000000..a1376370 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2023.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-read-write application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile () { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-read-write RFDC_OBJS=xrfdc_read_write_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-read-write ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.1.bb new file mode 100644 index 00000000..a1376370 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.1.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-read-write application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile () { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-read-write RFDC_OBJS=xrfdc_read_write_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-read-write ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.2.bb new file mode 100644 index 00000000..a1376370 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-read-write_2024.2.bb | |||
@@ -0,0 +1,13 @@ | |||
1 | SUMMARY = "Simple rfdc-read-write application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile () { | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-read-write RFDC_OBJS=xrfdc_read_write_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-read-write ${D}${bindir} | ||
12 | } | ||
13 | |||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.1.bb new file mode 100644 index 00000000..97b5e701 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.1.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Simple rfdc-selftest application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile (){ | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-selftest RFDC_OBJS=xrfdc_selftest_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-selftest ${D}${bindir} | ||
12 | } | ||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.2.bb new file mode 100644 index 00000000..97b5e701 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2023.2.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Simple rfdc-selftest application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile (){ | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-selftest RFDC_OBJS=xrfdc_selftest_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-selftest ${D}${bindir} | ||
12 | } | ||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.1.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.1.bb new file mode 100644 index 00000000..97b5e701 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.1.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Simple rfdc-selftest application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile (){ | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-selftest RFDC_OBJS=xrfdc_selftest_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-selftest ${D}${bindir} | ||
12 | } | ||
diff --git a/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.2.bb b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.2.bb new file mode 100644 index 00000000..97b5e701 --- /dev/null +++ b/meta-xilinx-standalone/recipes-apps/rfdc-examples/rfdc-selftest_2024.2.bb | |||
@@ -0,0 +1,12 @@ | |||
1 | SUMMARY = "Simple rfdc-selftest application" | ||
2 | |||
3 | require rfdc-examples.inc | ||
4 | |||
5 | do_compile (){ | ||
6 | make all BOARD_FLAG=${FLAG} OUTS=${B}/rfdc-selftest RFDC_OBJS=xrfdc_selftest_example.o | ||
7 | } | ||
8 | |||
9 | do_install() { | ||
10 | install -d ${D}${bindir} | ||
11 | install -m 0755 ${B}/rfdc-selftest ${D}${bindir} | ||
12 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/0001-versal_fw-Fixup-core-makefiles.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/0001-versal_fw-Fixup-core-makefiles.patch new file mode 100644 index 00000000..4bc191c1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/0001-versal_fw-Fixup-core-makefiles.patch | |||
@@ -0,0 +1,101 @@ | |||
1 | From d6e56e20bac608d28aa386dad12a279f1e434db9 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 d735f64530..dbd363447d 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 | @@ -50,11 +52,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 284e2fa5fc..be1df32525 100644 | ||
47 | --- a/lib/sw_apps/versal_plm/misc/versal_net/Makefile | ||
48 | +++ b/lib/sw_apps/versal_plm/misc/versal_net/Makefile | ||
49 | @@ -8,6 +8,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 | @@ -58,11 +60,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=v11.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=v11.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 92d95d0896..acc20bcccf 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.34.1 | ||
101 | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/makefile-skip-copy_bsp.sh.patch b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/makefile-skip-copy_bsp.sh.patch new file mode 100644 index 00000000..4ce521cd --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/2024.2+git/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.2+git-generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.2+git-generic.inc new file mode 100644 index 00000000..7a0a35da --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.2+git-generic.inc | |||
@@ -0,0 +1,10 @@ | |||
1 | SKIP_MSG = "" | ||
2 | SKIP_MSG:zynq = "Generic support for zynq is not available" | ||
3 | SKIP_RECIPE[fsbl-firmware] = "${SKIP_MSG}" | ||
4 | |||
5 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/${PV}:${FILE_DIRNAME}/embeddedsw" | ||
6 | |||
7 | SRC_URI += " \ | ||
8 | file://makefile-skip-copy_bsp.sh.patch \ | ||
9 | file://fsbl-fixups.patch \ | ||
10 | " | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.2.bb new file mode 100644 index 00000000..3c57ee8c --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2024.2.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require fsbl-firmware.inc | ||
2 | require ${@'fsbl-firmware_generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
3 | require ${@'fsbl-firmware_${PV}-generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry-meta-xilinx-standalone.inc new file mode 100644 index 00000000..9ea52037 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry-meta-xilinx-standalone.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | # Default imgrcry configuration, using fsbl multiconfig | ||
2 | IMGRCRY_DEPENDS ?= "" | ||
3 | IMGRCRY_MCDEPENDS ?= "mc::${MACHINE}-cortexa53-fsbl:image-recovery:do_deploy" | ||
4 | IMGRCRY_DEPLOY_DIR ?= "${TOPDIR}/tmp-${MACHINE}-cortexa53-fsbl/deploy/images/${MACHINE}/" | ||
5 | IMGRCRY_IMAGE_NAME ?= "image-recovery-${MACHINE}" | ||
6 | |||
7 | def check_imgrcry_variables(d): | ||
8 | # If both are blank, the user MUST pass in the path to the firmware! | ||
9 | if not d.getVar('IMGRCRY_DEPENDS') and not d.getVar('IMGRCRY_MCDEPENDS'): | ||
10 | # Don't cache this, as the items on disk can change! | ||
11 | d.setVar('BB_DONT_CACHE', '1') | ||
12 | |||
13 | if not os.path.exists(d.getVar('IMGRCRY_FILE') + ".bin"): | ||
14 | raise bb.parse.SkipRecipe("Could not open image recovery file: %s.bin" % d.getVar('IMGRCRY_FILE')) | ||
15 | else: | ||
16 | # We found the file, so be sure to track it | ||
17 | d.setVar('SRC_URI', 'file://${IMGRCRY_FILE}.bin') | ||
18 | d.setVarFlag('do_install', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
19 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGRCRY_FILE}.bin:True') | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry.bbappend new file mode 100644 index 00000000..62bd70d7 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgrcry.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@'imgrcry-meta-xilinx-standalone.inc' if d.getVar('XILINX_WITH_ESW') == 'sdt' else ''} | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel-meta-xilinx-standalone.inc new file mode 100644 index 00000000..fdc252d1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel-meta-xilinx-standalone.inc | |||
@@ -0,0 +1,19 @@ | |||
1 | # Default imgsel configuration, using fsbl multiconfig | ||
2 | IMGSEL_DEPENDS ?= "" | ||
3 | IMGSEL_MCDEPENDS ?= "mc::${MACHINE}-cortexa53-fsbl:image-selector:do_deploy" | ||
4 | IMGSEL_DEPLOY_DIR ?= "${TOPDIR}/tmp-${MACHINE}-cortexa53-fsbl/deploy/images/${MACHINE}/" | ||
5 | IMGSEL_IMAGE_NAME ?= "image-selector-${MACHINE}" | ||
6 | |||
7 | def check_imgsel_variables(d): | ||
8 | # If both are blank, the user MUST pass in the path to the firmware! | ||
9 | if not d.getVar('IMGSEL_DEPENDS') and not d.getVar('IMGSEL_MCDEPENDS'): | ||
10 | # Don't cache this, as the items on disk can change! | ||
11 | d.setVar('BB_DONT_CACHE', '1') | ||
12 | |||
13 | if not os.path.exists(d.getVar('IMGSEL_FILE') + ".bin"): | ||
14 | raise bb.parse.SkipRecipe("Could not open image selector file: %s.bin" % d.getVar('IMGSEL_FILE')) | ||
15 | else: | ||
16 | # We found the file, so be sure to track it | ||
17 | d.setVar('SRC_URI', 'file://${IMGSEL_FILE}.bin') | ||
18 | d.setVarFlag('do_install', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
19 | d.setVarFlag('do_deploy', 'file-checksums', '${IMGSEL_FILE}.bin:True') | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel.bbappend b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel.bbappend new file mode 100644 index 00000000..540a3963 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/imgsel.bbappend | |||
@@ -0,0 +1 @@ | |||
require ${@'imgsel-meta-xilinx-standalone.inc' if d.getVar('XILINX_WITH_ESW') == 'sdt' else ''} | |||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2+git-generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2+git-generic.inc new file mode 100644 index 00000000..7416dfb5 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2+git-generic.inc | |||
@@ -0,0 +1,27 @@ | |||
1 | # Separate build directories for versal and versal-net | ||
2 | SOC_DIR = "versal" | ||
3 | SOC_DIR:versal-net = "versal_net" | ||
4 | B = "${S}/lib/sw_apps/versal_plm/src/${SOC_DIR}" | ||
5 | |||
6 | BSP_DIR ?= "${B}/../../misc/versal_plm_bsp" | ||
7 | |||
8 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/${PV}:${FILE_DIRNAME}/embeddedsw" | ||
9 | |||
10 | SRC_URI += " \ | ||
11 | file://makefile-skip-copy_bsp.sh.patch \ | ||
12 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
13 | " | ||
14 | |||
15 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
16 | |||
17 | do_configure() { | ||
18 | # manually do the copy_bsp step first, so as to be able to fix up use of | ||
19 | # mb-* commands | ||
20 | ${B}/../../misc/${SOC_DIR}/copy_bsp.sh | ||
21 | } | ||
22 | |||
23 | do_compile() { | ||
24 | oe_runmake | ||
25 | |||
26 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
27 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2.bb new file mode 100644 index 00000000..d945aa26 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2024.2.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require plm-firmware.inc | ||
2 | require ${@'plm-firmware_generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
3 | require ${@'plm-firmware_${PV}-generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2+git-generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2+git-generic.inc new file mode 100644 index 00000000..935f6e32 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2+git-generic.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/${PV}:${FILE_DIRNAME}/embeddedsw" | ||
2 | |||
3 | SRC_URI += " \ | ||
4 | file://makefile-skip-copy_bsp.sh.patch \ | ||
5 | file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ | ||
6 | " | ||
7 | |||
8 | EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra ${ESW_CFLAGS}" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2.bb new file mode 100644 index 00000000..3ec0c10f --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2024.2.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require pmu-firmware.inc | ||
2 | require ${@'pmu-firmware_generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
3 | require ${@'pmu-firmware_${PV}-generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2+git-generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2+git-generic.inc new file mode 100644 index 00000000..7ba3707e --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2+git-generic.inc | |||
@@ -0,0 +1,32 @@ | |||
1 | # Separate build directories for versal and versal-net | ||
2 | SOC_DIR = "versal" | ||
3 | SOC_DIR:versal-net = "versal_net" | ||
4 | B = "${S}/lib/sw_apps/versal_psmfw/src/${SOC_DIR}" | ||
5 | |||
6 | BSP_DIR ?= "${B}/../../misc/versal_psmfw_bsp" | ||
7 | |||
8 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw/${PV}:${FILE_DIRNAME}/embeddedsw" | ||
9 | |||
10 | SRC_URI += " \ | ||
11 | file://makefile-skip-copy_bsp.sh.patch \ | ||
12 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
13 | " | ||
14 | |||
15 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
16 | |||
17 | # Override default since we're in a subdirectory deeper now... | ||
18 | do_configure() { | ||
19 | # manually do the copy_bsp step first, so as to be able to fix up use of | ||
20 | # mb-* commands | ||
21 | if [ ${SOC_DIR} != "versal" ]; then | ||
22 | ${B}/../../misc/${SOC_DIR}/copy_bsp.sh | ||
23 | else | ||
24 | ${B}/../../misc/copy_bsp.sh | ||
25 | fi | ||
26 | } | ||
27 | |||
28 | do_compile() { | ||
29 | oe_runmake | ||
30 | |||
31 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
32 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2.bb new file mode 100644 index 00000000..ffa0a596 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2024.2.bb | |||
@@ -0,0 +1,3 @@ | |||
1 | require psm-firmware.inc | ||
2 | require ${@'psm-firmware_generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
3 | require ${@'psm-firmware_${PV}-generic.inc' if d.getVar('XILINX_WITH_ESW') == 'generic' else ''} | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.1.bb new file mode 100644 index 00000000..04415f5e --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeccf library" | ||
2 | SECTION = "libdfeccf" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeccf" | ||
18 | |||
19 | DFECCF_SUBDIR = "XilinxProcessorIPLib/drivers/dfeccf/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFECCF_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFECCF_SUBDIR} | ||
31 | oe_libinstall -so libdfeccf ${D}${libdir} | ||
32 | install -m 0644 xdfeccf_hw.h ${D}${includedir}/xdfeccf_hw.h | ||
33 | install -m 0644 xdfeccf.h ${D}${includedir}/xdfeccf.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.2.bb new file mode 100644 index 00000000..04415f5e --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeccf library" | ||
2 | SECTION = "libdfeccf" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeccf" | ||
18 | |||
19 | DFECCF_SUBDIR = "XilinxProcessorIPLib/drivers/dfeccf/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFECCF_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFECCF_SUBDIR} | ||
31 | oe_libinstall -so libdfeccf ${D}${libdir} | ||
32 | install -m 0644 xdfeccf_hw.h ${D}${includedir}/xdfeccf_hw.h | ||
33 | install -m 0644 xdfeccf.h ${D}${includedir}/xdfeccf.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.1.bb new file mode 100644 index 00000000..04415f5e --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeccf library" | ||
2 | SECTION = "libdfeccf" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeccf" | ||
18 | |||
19 | DFECCF_SUBDIR = "XilinxProcessorIPLib/drivers/dfeccf/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFECCF_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFECCF_SUBDIR} | ||
31 | oe_libinstall -so libdfeccf ${D}${libdir} | ||
32 | install -m 0644 xdfeccf_hw.h ${D}${includedir}/xdfeccf_hw.h | ||
33 | install -m 0644 xdfeccf.h ${D}${includedir}/xdfeccf.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.2.bb new file mode 100644 index 00000000..04415f5e --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeccf/libdfeccf_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeccf library" | ||
2 | SECTION = "libdfeccf" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeccf" | ||
18 | |||
19 | DFECCF_SUBDIR = "XilinxProcessorIPLib/drivers/dfeccf/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFECCF_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFECCF_SUBDIR} | ||
31 | oe_libinstall -so libdfeccf ${D}${libdir} | ||
32 | install -m 0644 xdfeccf_hw.h ${D}${includedir}/xdfeccf_hw.h | ||
33 | install -m 0644 xdfeccf.h ${D}${includedir}/xdfeccf.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.1.bb new file mode 100644 index 00000000..298621fa --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeequ library" | ||
2 | SECTION = "libdfeequ" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeequ" | ||
18 | |||
19 | DFEEQU_SUBDIR = "XilinxProcessorIPLib/drivers/dfeequ/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEEQU_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEEQU_SUBDIR} | ||
31 | oe_libinstall -so libdfeequ ${D}${libdir} | ||
32 | install -m 0644 xdfeequ_hw.h ${D}${includedir}/xdfeequ_hw.h | ||
33 | install -m 0644 xdfeequ.h ${D}${includedir}/xdfeequ.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.2.bb new file mode 100644 index 00000000..298621fa --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeequ library" | ||
2 | SECTION = "libdfeequ" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeequ" | ||
18 | |||
19 | DFEEQU_SUBDIR = "XilinxProcessorIPLib/drivers/dfeequ/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEEQU_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEEQU_SUBDIR} | ||
31 | oe_libinstall -so libdfeequ ${D}${libdir} | ||
32 | install -m 0644 xdfeequ_hw.h ${D}${includedir}/xdfeequ_hw.h | ||
33 | install -m 0644 xdfeequ.h ${D}${includedir}/xdfeequ.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.1.bb new file mode 100644 index 00000000..298621fa --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeequ library" | ||
2 | SECTION = "libdfeequ" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeequ" | ||
18 | |||
19 | DFEEQU_SUBDIR = "XilinxProcessorIPLib/drivers/dfeequ/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEEQU_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEEQU_SUBDIR} | ||
31 | oe_libinstall -so libdfeequ ${D}${libdir} | ||
32 | install -m 0644 xdfeequ_hw.h ${D}${includedir}/xdfeequ_hw.h | ||
33 | install -m 0644 xdfeequ.h ${D}${includedir}/xdfeequ.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.2.bb new file mode 100644 index 00000000..298621fa --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeequ/libdfeequ_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeequ library" | ||
2 | SECTION = "libdfeequ" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeequ" | ||
18 | |||
19 | DFEEQU_SUBDIR = "XilinxProcessorIPLib/drivers/dfeequ/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEEQU_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEEQU_SUBDIR} | ||
31 | oe_libinstall -so libdfeequ ${D}${libdir} | ||
32 | install -m 0644 xdfeequ_hw.h ${D}${includedir}/xdfeequ_hw.h | ||
33 | install -m 0644 xdfeequ.h ${D}${includedir}/xdfeequ.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.1.bb new file mode 100644 index 00000000..cac04c14 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfemix library" | ||
2 | SECTION = "libdfemix" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfemix" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfemix/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfemix ${D}${libdir} | ||
32 | install -m 0644 xdfemix_hw.h ${D}${includedir}/xdfemix_hw.h | ||
33 | install -m 0644 xdfemix.h ${D}${includedir}/xdfemix.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.2.bb new file mode 100644 index 00000000..cac04c14 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfemix library" | ||
2 | SECTION = "libdfemix" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfemix" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfemix/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfemix ${D}${libdir} | ||
32 | install -m 0644 xdfemix_hw.h ${D}${includedir}/xdfemix_hw.h | ||
33 | install -m 0644 xdfemix.h ${D}${includedir}/xdfemix.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.1.bb new file mode 100644 index 00000000..cac04c14 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfemix library" | ||
2 | SECTION = "libdfemix" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfemix" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfemix/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfemix ${D}${libdir} | ||
32 | install -m 0644 xdfemix_hw.h ${D}${includedir}/xdfemix_hw.h | ||
33 | install -m 0644 xdfemix.h ${D}${includedir}/xdfemix.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.2.bb new file mode 100644 index 00000000..cac04c14 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfemix/libdfemix_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfemix library" | ||
2 | SECTION = "libdfemix" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfemix" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfemix/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfemix ${D}${libdir} | ||
32 | install -m 0644 xdfemix_hw.h ${D}${includedir}/xdfemix_hw.h | ||
33 | install -m 0644 xdfemix.h ${D}${includedir}/xdfemix.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.1.bb new file mode 100644 index 00000000..e183b853 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeofdm library" | ||
2 | SECTION = "libdfeofdm" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeofdm" | ||
18 | |||
19 | DFEOFDM_SUBDIR = "XilinxProcessorIPLib/drivers/dfeofdm/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEOFDM_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEOFDM_SUBDIR} | ||
31 | oe_libinstall -so libdfeofdm ${D}${libdir} | ||
32 | install -m 0644 xdfeofdm_hw.h ${D}${includedir}/xdfeofdm_hw.h | ||
33 | install -m 0644 xdfeofdm.h ${D}${includedir}/xdfeofdm.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.2.bb new file mode 100644 index 00000000..e183b853 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeofdm library" | ||
2 | SECTION = "libdfeofdm" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeofdm" | ||
18 | |||
19 | DFEOFDM_SUBDIR = "XilinxProcessorIPLib/drivers/dfeofdm/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEOFDM_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEOFDM_SUBDIR} | ||
31 | oe_libinstall -so libdfeofdm ${D}${libdir} | ||
32 | install -m 0644 xdfeofdm_hw.h ${D}${includedir}/xdfeofdm_hw.h | ||
33 | install -m 0644 xdfeofdm.h ${D}${includedir}/xdfeofdm.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.1.bb new file mode 100644 index 00000000..e183b853 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeofdm library" | ||
2 | SECTION = "libdfeofdm" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeofdm" | ||
18 | |||
19 | DFEOFDM_SUBDIR = "XilinxProcessorIPLib/drivers/dfeofdm/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEOFDM_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEOFDM_SUBDIR} | ||
31 | oe_libinstall -so libdfeofdm ${D}${libdir} | ||
32 | install -m 0644 xdfeofdm_hw.h ${D}${includedir}/xdfeofdm_hw.h | ||
33 | install -m 0644 xdfeofdm.h ${D}${includedir}/xdfeofdm.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.2.bb new file mode 100644 index 00000000..e183b853 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeofdm/libdfeofdm_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeofdm library" | ||
2 | SECTION = "libdfeofdm" | ||
3 | LICENSE = "BSD-3-Clause" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeofdm" | ||
18 | |||
19 | DFEOFDM_SUBDIR = "XilinxProcessorIPLib/drivers/dfeofdm/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEOFDM_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEOFDM_SUBDIR} | ||
31 | oe_libinstall -so libdfeofdm ${D}${libdir} | ||
32 | install -m 0644 xdfeofdm_hw.h ${D}${includedir}/xdfeofdm_hw.h | ||
33 | install -m 0644 xdfeofdm.h ${D}${includedir}/xdfeofdm.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.1.bb new file mode 100644 index 00000000..570dc6f1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeprach library" | ||
2 | SECTION = "libdfeprach" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeprach" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfeprach/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfeprach ${D}${libdir} | ||
32 | install -m 0644 xdfeprach_hw.h ${D}${includedir}/xdfeprach_hw.h | ||
33 | install -m 0644 xdfeprach.h ${D}${includedir}/xdfeprach.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.2.bb new file mode 100644 index 00000000..570dc6f1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeprach library" | ||
2 | SECTION = "libdfeprach" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeprach" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfeprach/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfeprach ${D}${libdir} | ||
32 | install -m 0644 xdfeprach_hw.h ${D}${includedir}/xdfeprach_hw.h | ||
33 | install -m 0644 xdfeprach.h ${D}${includedir}/xdfeprach.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.1.bb new file mode 100644 index 00000000..570dc6f1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeprach library" | ||
2 | SECTION = "libdfeprach" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeprach" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfeprach/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfeprach ${D}${libdir} | ||
32 | install -m 0644 xdfeprach_hw.h ${D}${includedir}/xdfeprach_hw.h | ||
33 | install -m 0644 xdfeprach.h ${D}${includedir}/xdfeprach.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.2.bb new file mode 100644 index 00000000..570dc6f1 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/libdfeprach/libdfeprach_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux dfeprach library" | ||
2 | SECTION = "libdfeprach" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "libdfeprach" | ||
18 | |||
19 | DFEMIX_SUBDIR = "XilinxProcessorIPLib/drivers/dfeprach/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${DFEMIX_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${DFEMIX_SUBDIR} | ||
31 | oe_libinstall -so libdfeprach ${D}${libdir} | ||
32 | install -m 0644 xdfeprach_hw.h ${D}${includedir}/xdfeprach_hw.h | ||
33 | install -m 0644 xdfeprach.h ${D}${includedir}/xdfeprach.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.1.bb new file mode 100644 index 00000000..04ae540d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.1.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Linux rfclk library" | ||
2 | SECTION = "librfclk" | ||
3 | |||
4 | inherit pkgconfig xlnx-embeddedsw features_check | ||
5 | |||
6 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
7 | |||
8 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | PROVIDES = "librfclk" | ||
15 | |||
16 | RFCLK_SUBDIR = "XilinxProcessorIPLib/drivers/board_common/src/rfclk/src" | ||
17 | |||
18 | do_compile:prepend() { | ||
19 | cd ${S}/${RFCLK_SUBDIR} | ||
20 | cp Makefile.Linux Makefile | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${libdir} | ||
25 | install -d ${D}${includedir} | ||
26 | |||
27 | cd ${S}/${RFCLK_SUBDIR} | ||
28 | oe_libinstall -so librfclk ${D}${libdir} | ||
29 | install -m 0644 xrfclk.h ${D}${includedir}/xrfclk.h | ||
30 | install -m 0644 xrfclk_LMK_conf.h ${D}${includedir}/xrfclk_LMK_conf.h | ||
31 | install -m 0644 xrfclk_LMX_conf.h ${D}${includedir}/xrfclk_LMX_conf.h | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${libdir}/*.so.*" | ||
35 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.2.bb new file mode 100644 index 00000000..04ae540d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2023.2.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Linux rfclk library" | ||
2 | SECTION = "librfclk" | ||
3 | |||
4 | inherit pkgconfig xlnx-embeddedsw features_check | ||
5 | |||
6 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
7 | |||
8 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | PROVIDES = "librfclk" | ||
15 | |||
16 | RFCLK_SUBDIR = "XilinxProcessorIPLib/drivers/board_common/src/rfclk/src" | ||
17 | |||
18 | do_compile:prepend() { | ||
19 | cd ${S}/${RFCLK_SUBDIR} | ||
20 | cp Makefile.Linux Makefile | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${libdir} | ||
25 | install -d ${D}${includedir} | ||
26 | |||
27 | cd ${S}/${RFCLK_SUBDIR} | ||
28 | oe_libinstall -so librfclk ${D}${libdir} | ||
29 | install -m 0644 xrfclk.h ${D}${includedir}/xrfclk.h | ||
30 | install -m 0644 xrfclk_LMK_conf.h ${D}${includedir}/xrfclk_LMK_conf.h | ||
31 | install -m 0644 xrfclk_LMX_conf.h ${D}${includedir}/xrfclk_LMX_conf.h | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${libdir}/*.so.*" | ||
35 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.1.bb new file mode 100644 index 00000000..04ae540d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.1.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Linux rfclk library" | ||
2 | SECTION = "librfclk" | ||
3 | |||
4 | inherit pkgconfig xlnx-embeddedsw features_check | ||
5 | |||
6 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
7 | |||
8 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | PROVIDES = "librfclk" | ||
15 | |||
16 | RFCLK_SUBDIR = "XilinxProcessorIPLib/drivers/board_common/src/rfclk/src" | ||
17 | |||
18 | do_compile:prepend() { | ||
19 | cd ${S}/${RFCLK_SUBDIR} | ||
20 | cp Makefile.Linux Makefile | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${libdir} | ||
25 | install -d ${D}${includedir} | ||
26 | |||
27 | cd ${S}/${RFCLK_SUBDIR} | ||
28 | oe_libinstall -so librfclk ${D}${libdir} | ||
29 | install -m 0644 xrfclk.h ${D}${includedir}/xrfclk.h | ||
30 | install -m 0644 xrfclk_LMK_conf.h ${D}${includedir}/xrfclk_LMK_conf.h | ||
31 | install -m 0644 xrfclk_LMX_conf.h ${D}${includedir}/xrfclk_LMX_conf.h | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${libdir}/*.so.*" | ||
35 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.2.bb new file mode 100644 index 00000000..04ae540d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfclk/librfclk_2024.2.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | SUMMARY = "Linux rfclk library" | ||
2 | SECTION = "librfclk" | ||
3 | |||
4 | inherit pkgconfig xlnx-embeddedsw features_check | ||
5 | |||
6 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
7 | |||
8 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | PROVIDES = "librfclk" | ||
15 | |||
16 | RFCLK_SUBDIR = "XilinxProcessorIPLib/drivers/board_common/src/rfclk/src" | ||
17 | |||
18 | do_compile:prepend() { | ||
19 | cd ${S}/${RFCLK_SUBDIR} | ||
20 | cp Makefile.Linux Makefile | ||
21 | } | ||
22 | |||
23 | do_install() { | ||
24 | install -d ${D}${libdir} | ||
25 | install -d ${D}${includedir} | ||
26 | |||
27 | cd ${S}/${RFCLK_SUBDIR} | ||
28 | oe_libinstall -so librfclk ${D}${libdir} | ||
29 | install -m 0644 xrfclk.h ${D}${includedir}/xrfclk.h | ||
30 | install -m 0644 xrfclk_LMK_conf.h ${D}${includedir}/xrfclk_LMK_conf.h | ||
31 | install -m 0644 xrfclk_LMX_conf.h ${D}${includedir}/xrfclk_LMX_conf.h | ||
32 | } | ||
33 | |||
34 | FILES:${PN} = "${libdir}/*.so.*" | ||
35 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.1.bb b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.1.bb new file mode 100644 index 00000000..35cd2a1a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux rfdc library" | ||
2 | SECTION = "librfdc" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "librfdc" | ||
18 | |||
19 | RFDC_SUBDIR = "XilinxProcessorIPLib/drivers/rfdc/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${RFDC_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${RFDC_SUBDIR} | ||
31 | oe_libinstall -so librfdc ${D}${libdir} | ||
32 | install -m 0644 xrfdc_hw.h ${D}${includedir}/xrfdc_hw.h | ||
33 | install -m 0644 xrfdc.h ${D}${includedir}/xrfdc.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.2.bb b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.2.bb new file mode 100644 index 00000000..35cd2a1a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2023.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux rfdc library" | ||
2 | SECTION = "librfdc" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "librfdc" | ||
18 | |||
19 | RFDC_SUBDIR = "XilinxProcessorIPLib/drivers/rfdc/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${RFDC_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${RFDC_SUBDIR} | ||
31 | oe_libinstall -so librfdc ${D}${libdir} | ||
32 | install -m 0644 xrfdc_hw.h ${D}${includedir}/xrfdc_hw.h | ||
33 | install -m 0644 xrfdc.h ${D}${includedir}/xrfdc.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.1.bb b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.1.bb new file mode 100644 index 00000000..35cd2a1a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux rfdc library" | ||
2 | SECTION = "librfdc" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "librfdc" | ||
18 | |||
19 | RFDC_SUBDIR = "XilinxProcessorIPLib/drivers/rfdc/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${RFDC_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${RFDC_SUBDIR} | ||
31 | oe_libinstall -so librfdc ${D}${libdir} | ||
32 | install -m 0644 xrfdc_hw.h ${D}${includedir}/xrfdc_hw.h | ||
33 | install -m 0644 xrfdc.h ${D}${includedir}/xrfdc.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.2.bb b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.2.bb new file mode 100644 index 00000000..35cd2a1a --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/librfdc/librfdc_2024.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | SUMMARY = "Linux rfdc library" | ||
2 | SECTION = "librfdc" | ||
3 | LICENSE = "BSD" | ||
4 | |||
5 | inherit pkgconfig xlnx-embeddedsw features_check | ||
6 | |||
7 | REQUIRED_MACHINE_FEATURES = "rfsoc" | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
10 | |||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
14 | |||
15 | DEPENDS = "libmetal" | ||
16 | |||
17 | PROVIDES = "librfdc" | ||
18 | |||
19 | RFDC_SUBDIR = "XilinxProcessorIPLib/drivers/rfdc/src" | ||
20 | |||
21 | do_compile:prepend() { | ||
22 | cd ${S}/${RFDC_SUBDIR} | ||
23 | cp Makefile.Linux Makefile | ||
24 | } | ||
25 | |||
26 | do_install() { | ||
27 | install -d ${D}${libdir} | ||
28 | install -d ${D}${includedir} | ||
29 | |||
30 | cd ${S}/${RFDC_SUBDIR} | ||
31 | oe_libinstall -so librfdc ${D}${libdir} | ||
32 | install -m 0644 xrfdc_hw.h ${D}${includedir}/xrfdc_hw.h | ||
33 | install -m 0644 xrfdc.h ${D}${includedir}/xrfdc.h | ||
34 | } | ||
35 | |||
36 | FILES:${PN} = "${libdir}/*.so.*" | ||
37 | FILES:${PN}-dev = "${libdir}/*.so ${includedir}/*" | ||
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend index d9c4ad18..282d22c8 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend | |||
@@ -9,6 +9,7 @@ EXTRA_OECONF:append:class-target:xilinx-standalone = " \ | |||
9 | --enable-plugins \ | 9 | --enable-plugins \ |
10 | --with-gnu-as \ | 10 | --with-gnu-as \ |
11 | --disable-libitm \ | 11 | --disable-libitm \ |
12 | --disable-tm-clone-registry \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | EXTRA_OECONF:append:aarch64:class-target:xilinx-standalone = " \ | 15 | EXTRA_OECONF:append:aarch64:class-target:xilinx-standalone = " \ |
@@ -28,7 +29,6 @@ EXTRA_OECONF:append:armv8r:class-target:xilinx-standalone = " \ | |||
28 | 29 | ||
29 | EXTRA_OECONF:append:microblaze:class-target:xilinx-standalone = " \ | 30 | EXTRA_OECONF:append:microblaze:class-target:xilinx-standalone = " \ |
30 | --without-long-double-128 \ | 31 | --without-long-double-128 \ |
31 | --disable-tm-clone-registry \ | ||
32 | " | 32 | " |
33 | 33 | ||
34 | # Changes local to gcc-runtime... | 34 | # Changes local to gcc-runtime... |
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc index 956bb419..173d47f7 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-xilinx-standalone.inc | |||
@@ -5,6 +5,7 @@ EXTRA_OECONF:append:xilinx-standalone = " \ | |||
5 | --enable-plugins \ | 5 | --enable-plugins \ |
6 | --with-gnu-as \ | 6 | --with-gnu-as \ |
7 | --disable-libitm \ | 7 | --disable-libitm \ |
8 | --disable-tm-clone-registry \ | ||
8 | " | 9 | " |
9 | 10 | ||
10 | EXTRA_OECONF:append:aarch64:xilinx-standalone = " \ | 11 | EXTRA_OECONF:append:aarch64:xilinx-standalone = " \ |
@@ -24,5 +25,4 @@ EXTRA_OECONF:append:armv8r:xilinx-standalone = " \ | |||
24 | 25 | ||
25 | EXTRA_OECONF:append:microblaze:xilinx-standalone = " \ | 26 | EXTRA_OECONF:append:microblaze:xilinx-standalone = " \ |
26 | --without-long-double-128 \ | 27 | --without-long-double-128 \ |
27 | --disable-tm-clone-registry \ | ||
28 | " | 28 | " |
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend index be68197e..fe295243 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/libgcc_%.bbappend | |||
@@ -2,7 +2,7 @@ require gcc-configure-xilinx-standalone.inc | |||
2 | 2 | ||
3 | COMPATIBLE_HOST:xilinx-standalone = "${HOST_SYS}" | 3 | COMPATIBLE_HOST:xilinx-standalone = "${HOST_SYS}" |
4 | 4 | ||
5 | EXTRA_OECONF:append:xilinx-standalone:microblaze:class-target = " \ | 5 | EXTRA_OECONF:append:xilinx-standalone:class-target = " \ |
6 | --disable-tm-clone-registry \ | 6 | --disable-tm-clone-registry \ |
7 | " | 7 | " |
8 | 8 | ||
diff --git a/meta-xilinx-vendor/README.md b/meta-xilinx-vendor/README.md index 1903df17..b6b82d62 100644 --- a/meta-xilinx-vendor/README.md +++ b/meta-xilinx-vendor/README.md | |||
@@ -1,7 +1,7 @@ | |||
1 | # meta-xilinx-vendor | 1 | # meta-xilinx-vendor |
2 | 2 | ||
3 | This layer enables third party vendor boards for AMD Xilinx MicroBlaze, Zynq, | 3 | This layer enables third party vendor boards for AMD MicroBlaze, Zynq, ZynqMP and |
4 | ZynqMP and Versal devices and provides related metadata. | 4 | Versal devices and provides related metadata. |
5 | 5 | ||
6 | ## Supported Boards/Machines | 6 | ## Supported Boards/Machines |
7 | 7 | ||
@@ -9,11 +9,8 @@ ZynqMP and Versal devices and provides related metadata. | |||
9 | 9 | ||
10 | > **Variable usage examples:** | 10 | > **Variable usage examples:** |
11 | > | 11 | > |
12 | > Machine Configuration file: `MACHINE = "ultra96-zynqmp"` | 12 | > Machine Configuration file: `MACHINE = "microzed-zynq7"` |
13 | > | 13 | > |
14 | > Reference XSA: `HDF_MACHINE = "ultra96-zynqmp"` | ||
15 | > | ||
16 | > HW Board Device tree: `YAML_DT_BOARD_FLAGS = "{BOARD avnet-ultra96-rev1}"` | ||
17 | 14 | ||
18 | | Devices | Vendor Evaluation Board | Machine Configuration file | Reference XSA | HW Board Device tree | QEMU tested | HW tested | | 15 | | Devices | Vendor Evaluation Board | Machine Configuration file | Reference XSA | HW Board Device tree | QEMU tested | HW tested | |
19 | |------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|------------------|----------------------|-------------|-----------| | 16 | |------------|-------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|------------------|----------------------|-------------|-----------| |
@@ -24,29 +21,36 @@ ZynqMP and Versal devices and provides related metadata. | |||
24 | | | [Avnet/Digilent ZedBoard](https://www.xilinx.com/products/boards-and-kits/1-8dyf-11.html) | [zedboard-zynq7](conf/machine/zedboard-zynq7.conf) | NA | NA | No | No | | 21 | | | [Avnet/Digilent ZedBoard](https://www.xilinx.com/products/boards-and-kits/1-8dyf-11.html) | [zedboard-zynq7](conf/machine/zedboard-zynq7.conf) | NA | NA | No | No | |
25 | | | [Digilent Zybo](https://www.xilinx.com/support/university/boards-portfolio/xup-boards/DigilentZYBO.html) | [zybo-zynq7](conf/machine/zybo-zynq7.conf) | NA | `zynq-zybo.dtb` | No | No | | 22 | | | [Digilent Zybo](https://www.xilinx.com/support/university/boards-portfolio/xup-boards/DigilentZYBO.html) | [zybo-zynq7](conf/machine/zybo-zynq7.conf) | NA | `zynq-zybo.dtb` | No | No | |
26 | | | [Digilent Zybo Linux BD](https://www.xilinx.com/support/university/boards-portfolio/xup-boards/DigilentZYBO.html) | [zybo-linux-bd-zynq7](conf/machine/zybo-linux-bd-zynq7.conf) | NA | NA | No | No | | 23 | | | [Digilent Zybo Linux BD](https://www.xilinx.com/support/university/boards-portfolio/xup-boards/DigilentZYBO.html) | [zybo-linux-bd-zynq7](conf/machine/zybo-linux-bd-zynq7.conf) | NA | NA | No | No | |
27 | | ZynqMP | [Avent Ultra96 v1](https://www.xilinx.com/products/boards-and-kits/1-vad4rl.html) | [ultra96-zynqmp](conf/machine/ultra96-zynqmp.conf) | `ultra96-zynqmp` | `avnet-ultra96-rev1` | Yes | Yes | | ||
28 | | Versal | NA | NA | NA | NA | NA | NA | | 24 | | Versal | NA | NA | NA | NA | NA | NA | |
29 | 25 | ||
30 | > **Note:** | 26 | > **Note:** |
31 | ``` | 27 | ``` |
32 | 1. For Zybo Linux BD reference design refer meta-xilinx-contrib layer. | 28 | 1. For Zybo Linux BD reference design refer meta-xilinx-contrib layer. |
33 | 2. Ultra96 Machine configuration file is unsupported and is compatible with v1 board only. Refer to meta-avnet for v2 board. | 29 | 2. Ultra96 v1 is no longer supported. Refer to https://github.com/Avnet/meta-avnet for v2 board. |
34 | ``` | 30 | ``` |
35 | 31 | ||
32 | ## AMD Vendor board XSCT Build Instructions | ||
33 | |||
34 | Follow [XSCT Build Instructions](https://github.com/Xilinx/meta-xilinx-tools/blob/master/README.xsct.bsp.md) | ||
35 | |||
36 | ## Dependencies | 36 | ## Dependencies |
37 | 37 | ||
38 | This layer depends on: | 38 | This layer depends on: |
39 | 39 | ||
40 | URI: https://git.yoctoproject.org/poky | 40 | URI: https://git.yoctoproject.org/poky |
41 | layers: meta, meta-poky | 41 | layers: meta, meta-poky |
42 | branch: langdale | 42 | branch: scarthgap |
43 | 43 | ||
44 | URI: https://git.openembedded.org/meta-openembedded | 44 | URI: https://git.openembedded.org/meta-openembedded |
45 | layers: meta-oe | 45 | layers: meta-oe |
46 | branch: langdale | 46 | branch: scarthgap |
47 | |||
48 | URI: https://git.yoctoproject.org/meta-arm | ||
49 | layers: meta-arm, meta-arm-toolchain | ||
50 | branch: scarthgap | ||
47 | 51 | ||
48 | URI: | 52 | URI: |
49 | https://git.yoctoproject.org/meta-xilinx (official version) | 53 | https://git.yoctoproject.org/meta-xilinx (official version) |
50 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 54 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
51 | layers: meta-xilinx-microblaze, meta-xilinx-core | 55 | layers: meta-xilinx-microblaze, meta-xilinx-core |
52 | branch: langdale or amd xilinx release version (e.g. rel-v2023.1) | 56 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
diff --git a/meta-xilinx-vendor/conf/machine/ultra96-zynqmp.conf b/meta-xilinx-vendor/conf/machine/ultra96-zynqmp.conf deleted file mode 100644 index d0b95cac..00000000 --- a/meta-xilinx-vendor/conf/machine/ultra96-zynqmp.conf +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: ultra96-zynqmp | ||
3 | #@DESCRIPTION: Machine support for Ultra96 Evaluation Board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'ultra96-zynqmp:']['ultra96-zynqmp' !='${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 zynqmp-generic.conf will be set. | ||
12 | |||
13 | # Yocto device-tree variables | ||
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_1" | ||
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | ||
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD avnet-ultra96-rev1}" | ||
17 | |||
18 | # Yocto arm-trusted-firmware(TF-A) variables | ||
19 | ATF_CONSOLE ?= "cadence1" | ||
20 | TFA_BL33_LOAD ?= "0x8000000" | ||
21 | |||
22 | # Yocto PMUFW variables | ||
23 | YAML_SERIAL_CONSOLE_STDIN:pn-pmu-firmware ?= "psu_uart_1" | ||
24 | YAML_SERIAL_CONSOLE_STDOUT:pn-pmu-firmware ?= "psu_uart_1" | ||
25 | |||
26 | # Yocto FSBL variables | ||
27 | YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "psu_uart_1" | ||
28 | YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_1" | ||
29 | |||
30 | # Yocto KERNEL Variables | ||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | ||
32 | UBOOT_LOADADDRESS ?= "0x200000" | ||
33 | |||
34 | # ultra96-zynqmp Serial Console | ||
35 | # In Ultra96 uart1 is the primary uart device but DTG set the serial0 alias | ||
36 | # to uart1, hence we are using ttyPS0 for Ultra96. | ||
37 | SERIAL_CONSOLES ?= "115200;ttyPS1 115200;ttyPS0" | ||
38 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
39 | |||
40 | # Required generic machine inclusion | ||
41 | # Ultra96 board uses ZynqMP EG device hence use soc variant based generic machine | ||
42 | # inclusion | ||
43 | require conf/machine/zynqmp-eg-generic.conf | ||
44 | |||
45 | # This eval board machine conf file uses ultra96-zynqmp xsa as reference input. | ||
46 | # User can override with ultra96 custom xsa using HDF_BASE and HDF_PATH variables | ||
47 | # from local.conf. | ||
48 | HDF_MACHINE = "ultra96-zynqmp" | ||
49 | |||
50 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
51 | # the xsa. User can enable explicitly if required from local.conf. | ||
52 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu100-revC.dtb" | ||
53 | |||
54 | # Ultra96 has 2GB memory only but default zynqmp-generic has QB_MEM set to 4G, | ||
55 | # Hence set QB_MEM to 2GB. | ||
56 | QB_MEM = "-m 2G" | ||
57 | |||
58 | # Ultra96 board uses ultra96-arm.dtb as QEMU HW PS DTB. | ||
59 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/ultra96-arm.dtb" | ||
60 | |||
61 | # Both psu_uart_0 and psu_uart_1 are defined, but 1 is the primary uart. | ||
62 | # | ||
63 | # hw ps7_uart_0 (0xFF000000) - linux serial1 (ttyPS1) | ||
64 | # hw ps7_uart_1 (0xFF010000) - linux serial0 (ttyPS0) | ||
65 | # ? dcc / axi_uart16550_0 ? - linux serial2 | ||
66 | QB_XILINX_SERIAL = "-serial null -serial mon:stdio" | ||
67 | |||
68 | # KERNEL_DEVICETREE is disabled as we use board device tree from DTG to match | ||
69 | # the xsa. User can enable explicitly if required from local.conf. | ||
70 | # KERNEL_DEVICETREE = "xilinx/zynqmp-zcu100-revC.dtb" | ||
71 | |||
72 | # Enable bluetooth and wifi module | ||
73 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += " \ | ||
74 | linux-firmware-wl18xx \ | ||
75 | linux-firmware-ti-bt-wl180x \ | ||
76 | " | ||
77 | |||
78 | #### No additional settings should be after the Postamble | ||
79 | #### Postamble | ||
80 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' ultra96_zynqmp']['ultra96-zynqmp' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-vendor/dynamic-layers/meta-xilinx-tools/recipes-bsp/embeddedsw/pmu-firmware_%.bbappend b/meta-xilinx-vendor/dynamic-layers/meta-xilinx-tools/recipes-bsp/embeddedsw/pmu-firmware_%.bbappend deleted file mode 100644 index f2c2c09f..00000000 --- a/meta-xilinx-vendor/dynamic-layers/meta-xilinx-tools/recipes-bsp/embeddedsw/pmu-firmware_%.bbappend +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # Ultra96 Compiler Flags | ||
2 | ULTRA96_VERSION ?= "1" | ||
3 | YAML_COMPILER_FLAGS:append:ultra96-zynqmp = " \ | ||
4 | -DBOARD_SHUTDOWN_PIN=2 \ | ||
5 | -DBOARD_SHUTDOWN_PIN_STATE=0 \ | ||
6 | -DENABLE_MOD_ULTRA96 \ | ||
7 | ${@bb.utils.contains('ULTRA96_VERSION', '2', ' -DULTRA96_VERSION=2 ', ' -DULTRA96_VERSION=1 ', d)} \ | ||
8 | " | ||
diff --git a/meta-xilinx-vendor/recipes-core/init-ifupdown/files/interfaces b/meta-xilinx-vendor/recipes-core/init-ifupdown/files/interfaces deleted file mode 100644 index 8daba016..00000000 --- a/meta-xilinx-vendor/recipes-core/init-ifupdown/files/interfaces +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) | ||
2 | |||
3 | # The loopback interface | ||
4 | auto lo | ||
5 | iface lo inet loopback | ||
6 | |||
7 | # Wireless interfaces | ||
8 | auto wlan0 | ||
9 | iface wlan0 inet dhcp | ||
10 | wireless_mode managed | ||
11 | wireless_essid any | ||
12 | wpa-driver wext | ||
13 | wpa-conf /etc/wpa_supplicant.conf | ||
14 | |||
15 | iface atml0 inet dhcp | ||
16 | |||
17 | # Wired or wireless interfaces | ||
18 | auto eth0 | ||
19 | iface eth0 inet dhcp | ||
20 | iface eth1 inet dhcp | ||
21 | |||
22 | # Ethernet/RNDIS gadget (g_ether) | ||
23 | # ... or on host side, usbnet and random hwaddr | ||
24 | iface usb0 inet static | ||
25 | address 192.168.7.2 | ||
26 | netmask 255.255.255.0 | ||
27 | network 192.168.7.0 | ||
28 | gateway 192.168.7.1 | ||
29 | |||
30 | # Bluetooth networking | ||
31 | iface bnep0 inet dhcp | ||
32 | |||
diff --git a/meta-xilinx-vendor/recipes-core/init-ifupdown/init-ifupdown_%.bbappend b/meta-xilinx-vendor/recipes-core/init-ifupdown/init-ifupdown_%.bbappend deleted file mode 100644 index 2638026c..00000000 --- a/meta-xilinx-vendor/recipes-core/init-ifupdown/init-ifupdown_%.bbappend +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | FILESEXTRAPATHS:prepend:ultra96 := "${THISDIR}/files:" | ||
diff --git a/meta-xilinx-virtualization/README.build.xen.md b/meta-xilinx-virtualization/README.build.xen.md new file mode 100644 index 00000000..2176f8db --- /dev/null +++ b/meta-xilinx-virtualization/README.build.xen.md | |||
@@ -0,0 +1,120 @@ | |||
1 | # Xen Build Instructions | ||
2 | |||
3 | The Yocto Project setup for AMD Xen configurations workflow is as follows. Be sure | ||
4 | to read everything below. | ||
5 | |||
6 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
7 | |||
8 | 2. Clone the meta-security repository. | ||
9 | ``` | ||
10 | $ cd ../sources | ||
11 | $ git clone -b <release-branch> https://git.yoctoproject.org/meta-security | ||
12 | $ cd - | ||
13 | ``` | ||
14 | |||
15 | 3. Add xilinx-virtualization, security and tpm layer to bblayers.conf as shown below. | ||
16 | ``` | ||
17 | $ bitbake-layers add-layer ./<path-to-layer>/meta-security | ||
18 | $ bitbake-layers add-layer ./<path-to-layer>/meta-security/meta-tpm | ||
19 | $ bitbake-layers add-layer ./<path-to-layer>/meta-xilinx/meta-xilinx-virtualization | ||
20 | ``` | ||
21 | |||
22 | 4. The following variables needs to be added to the end of the conf/local.conf file. | ||
23 | ``` | ||
24 | # Xen variables | ||
25 | BOOTMODE = "xen" | ||
26 | ENABLE_XEN_UBOOT_SCR = "1" | ||
27 | ENABLE_XEN_DTSI = "1" | ||
28 | ENABLE_XEN_QEMU_DTSI = "1" | ||
29 | |||
30 | # Default Xen Serial Console is serial0, if you are using serial1 then set as show below. | ||
31 | XEN_SERIAL_CONSOLES = "serial1" | ||
32 | |||
33 | # Variables for Xen JTAG or SD INITRD boot modes but this is not required for SD WIC image. | ||
34 | IMAGE_FSTYPES += "cpio.gz" | ||
35 | RAMDISK_IMAGE = "rootfs.cpio.gz" | ||
36 | |||
37 | # Variables for Xen SD WIC image boot flow. | ||
38 | IMAGE_FSTYPES += "wic" | ||
39 | WKS_FILES = "xilinx-default-sd.wks" | ||
40 | |||
41 | DISTRO_FEATURES:append = " multiarch security tpm virtualization vmsep xen" | ||
42 | |||
43 | IMAGE_FEATURES += "ssh-server-openssh" | ||
44 | |||
45 | DISTRO_FEATURES:append = " systemd" | ||
46 | VIRTUAL-RUNTIME_init_manager = "systemd" | ||
47 | DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" | ||
48 | |||
49 | IMAGE_INSTALL:append = " \ | ||
50 | kernel-module-xen-blkback \ | ||
51 | kernel-module-xen-gntalloc \ | ||
52 | kernel-module-xen-gntdev \ | ||
53 | kernel-module-xen-netback \ | ||
54 | kernel-module-xen-wdt \ | ||
55 | xen \ | ||
56 | xen-tools \ | ||
57 | xen-tools-xenstat \ | ||
58 | ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \ | ||
59 | " | ||
60 | ``` | ||
61 | |||
62 | 5. Continue [Building Instructions](../README.building.md) from step 5. | ||
63 | |||
64 | ## Xen Boot Instructions | ||
65 | |||
66 | > **Note:** | ||
67 | > * This README provides instructions for Xen Dom0 only. | ||
68 | |||
69 | 1. Follow [Booting Instructions](../README.booting.md) upto step 2. | ||
70 | |||
71 | 2. Verify Xen Dom0 is up and running on QEMU or target as shown below. | ||
72 | |||
73 | ``` | ||
74 | Poky (Yocto Project Reference Distro) 4.1.4 zynqmp-generic hvc0 | ||
75 | |||
76 | zynqmp-generic login: root | ||
77 | root@zynqmp-generic:~# xl list | ||
78 | Name ID Mem VCPUs State Time(s) | ||
79 | Domain-0 0 1500 1 r----- 123.5 | ||
80 | root@zynqmp-generic:~# xl info | ||
81 | host : zynqmp-generic | ||
82 | release : 6.1.0-xilinx-v2024.1 | ||
83 | version : #1 SMP Thu Dec 21 07:00:11 UTC 2023 | ||
84 | machine : aarch64 | ||
85 | nr_cpus : 4 | ||
86 | max_cpu_id : 3 | ||
87 | nr_nodes : 1 | ||
88 | cores_per_socket : 1 | ||
89 | threads_per_core : 1 | ||
90 | cpu_mhz : 99.990 | ||
91 | hw_caps : 00000000:00000000:00000000:00000000:00000000:00000000:00000000:00000000 | ||
92 | virt_caps : hvm hvm_directio hap iommu_hap_pt_share vpmu gnttab-v1 | ||
93 | total_memory : 4095 | ||
94 | free_memory : 2529 | ||
95 | sharing_freed_memory : 0 | ||
96 | sharing_used_memory : 0 | ||
97 | outstanding_claims : 0 | ||
98 | free_cpus : 0 | ||
99 | xen_major : 4 | ||
100 | xen_minor : 17 | ||
101 | xen_extra : .0 | ||
102 | xen_version : 4.17.0 | ||
103 | xen_caps : xen-3.0-aarch64 xen-3.0-armv7l | ||
104 | xen_scheduler : credit2 | ||
105 | xen_pagesize : 4096 | ||
106 | platform_params : virt_start=0x200000 | ||
107 | xen_changeset : Tue Dec 12 10:08:40 2023 +0100 git:38eebc6e5c-dirty | ||
108 | xen_commandline : console=dtuart dtuart=serial0 dom0_mem=1500M dom0_max_vcpus=1 bootscrub=0 vwfi=native | ||
109 | cc_compiler : aarch64-poky-linux-gcc (GCC) 12.2.0 | ||
110 | cc_compile_by : santraju | ||
111 | cc_compile_domain : | ||
112 | cc_compile_date : 2023-12-12 | ||
113 | build_id : 5e2952e1dd06c52a2a09ada7476333c48d88a285 | ||
114 | xend_config_format : 4 | ||
115 | root@zynqmp-generic:~# | ||
116 | ``` | ||
117 | |||
118 | ## References | ||
119 | |||
120 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor | ||
diff --git a/meta-xilinx-virtualization/README.md b/meta-xilinx-virtualization/README.md index 5b66ea38..ad019fee 100644 --- a/meta-xilinx-virtualization/README.md +++ b/meta-xilinx-virtualization/README.md | |||
@@ -1,128 +1,10 @@ | |||
1 | # meta-xilinx-vendor | 1 | # meta-xilinx-virtualization |
2 | 2 | ||
3 | This layer enables AMD Xilinx Xen configurations and features for ZynqMP and | 3 | This layer enables AMD Xen configurations and features for ZynqMP and |
4 | Versal devices and also provides related metadata. | 4 | Versal devices and also provides related metadata. |
5 | 5 | ||
6 | ## Xen Build Instructions | 6 | See [Xen Build Instructions](README.build.xen.md) to configure and build xen |
7 | 7 | images. | |
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 | 8 | ||
127 | ## Dependencies | 9 | ## Dependencies |
128 | 10 | ||
@@ -130,25 +12,25 @@ This layer depends on: | |||
130 | 12 | ||
131 | URI: https://git.yoctoproject.org/poky | 13 | URI: https://git.yoctoproject.org/poky |
132 | layers: meta, meta-poky | 14 | layers: meta, meta-poky |
133 | branch: langdale | 15 | branch: scarthgap |
134 | 16 | ||
135 | URI: https://git.openembedded.org/meta-openembedded | 17 | URI: https://git.openembedded.org/meta-openembedded |
136 | layers: meta-oe, meta-python, meta-filesystems, meta-networking. | 18 | layers: meta-oe, meta-python, meta-filesystems, meta-networking. |
137 | branch: langdale | 19 | branch: scarthgap |
138 | 20 | ||
139 | URI: | 21 | URI: |
140 | https://git.yoctoproject.org/meta-xilinx (official version) | 22 | https://git.yoctoproject.org/meta-xilinx (official version) |
141 | https://github.com/Xilinx/meta-xilinx (development and amd xilinx release) | 23 | https://github.com/Xilinx/meta-xilinx (development and AMD release) |
142 | layers: meta-xilinx-core, meta-xilinx-standalone | 24 | layers: meta-xilinx-core, meta-xilinx-standalone |
143 | branch: langdale or amd xilinx release version (e.g. rel-v2024.1) | 25 | branch: scarthgap or AMD release version (e.g. rel-v2024.2) |
144 | 26 | ||
145 | URI: https://git.yoctoproject.org/meta-virtualization | 27 | URI: https://git.yoctoproject.org/meta-virtualization |
146 | branch: langdale | 28 | branch: scarthgap |
147 | 29 | ||
148 | URI: https://git.yoctoproject.org/meta-security | 30 | URI: https://git.yoctoproject.org/meta-security |
149 | layers: meta-tpm | 31 | layers: meta-tpm |
150 | branch: langdale | 32 | branch: scarthgap |
151 | |||
152 | ## References | ||
153 | 33 | ||
154 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842530/Xen+Hypervisor | 34 | URI: https://git.yoctoproject.org/meta-arm |
35 | layers: meta-arm, meta-arm-toolchain | ||
36 | branch: scarthgap | ||
diff --git a/meta-xilinx-virtualization/conf/layer.conf b/meta-xilinx-virtualization/conf/layer.conf index 29506eab..1ce8ccfe 100644 --- a/meta-xilinx-virtualization/conf/layer.conf +++ b/meta-xilinx-virtualization/conf/layer.conf | |||
@@ -19,5 +19,6 @@ LAYERDEPENDS_xilinx-virtualization = "\ | |||
19 | LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" | 19 | LAYERSERIES_COMPAT_xilinx-virtualization = "scarthgap" |
20 | 20 | ||
21 | XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" | 21 | XILINX_XEN_VERSION[v2024.1] = "4.18+stable-xilinx+git%" |
22 | XILINX_XEN_VERSION[v2024.2] = "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 ?= "${@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%'}" | 24 | 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-core/packagegroups/packagegroup-xen.bb b/meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb new file mode 100644 index 00000000..4fecbcae --- /dev/null +++ b/meta-xilinx-virtualization/recipes-core/packagegroups/packagegroup-xen.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "Xen supported packages" | ||
2 | |||
3 | PACKAGE_ARCH = "${TUNE_PKGARCH}" | ||
4 | |||
5 | inherit packagegroup features_check | ||
6 | |||
7 | REQUIRED_DISTRO_FEATURES = "xen" | ||
8 | |||
9 | XEN_EXTRA_PACKAGES = " \ | ||
10 | kernel-module-xen-blkback \ | ||
11 | kernel-module-xen-gntalloc \ | ||
12 | kernel-module-xen-gntdev \ | ||
13 | kernel-module-xen-netback \ | ||
14 | kernel-module-xen-wdt \ | ||
15 | xen \ | ||
16 | xen-tools \ | ||
17 | xen-tools-xenstat \ | ||
18 | ${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-aarch64 qemu-keymaps', 'qemu', d)} \ | ||
19 | " | ||
20 | |||
21 | RDEPENDS:${PN} = "${XEN_EXTRA_PACKAGES}" | ||
diff --git a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc index e7bc8d7e..aa308f41 100644 --- a/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-tools-xilinx.inc | |||
@@ -1,3 +1,5 @@ | |||
1 | QEMU_SYSTEM:aarch64 = "qemu-system-aarch64" | ||
2 | |||
1 | # Only include the sysvinit scripts if sysvinit is enabled. | 3 | # Only include the sysvinit scripts if sysvinit is enabled. |
2 | do_install:append () { | 4 | do_install:append () { |
3 | if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then | 5 | if [ -e ${D}/usr/lib/xen/bin/pygrub ]; then |
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 index 4d4b1588..7c563d32 100644 --- a/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc +++ b/meta-xilinx-virtualization/recipes-extended/xen/xen-xilinx_4.18.inc | |||
@@ -1,4 +1,4 @@ | |||
1 | SRCREV = "c4ff3360900b7428ca31de2425763acfe7ad9c21" | 1 | SRCREV = "c9de96c0cbe9b2f2aa5e55a0e1e645ca72865102" |
2 | XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" | 2 | XEN_URI = "git://github.com/Xilinx/xen.git;protocol=https" |
3 | XEN_BRANCH = "xlnx_rebase_4.18" | 3 | XEN_BRANCH = "xlnx_rebase_4.18" |
4 | 4 | ||