diff options
336 files changed, 10761 insertions, 865 deletions
diff --git a/meta-dpdk/COPYING.MIT b/meta-dpdk/COPYING.MIT deleted file mode 100644 index fb950dc6..00000000 --- a/meta-dpdk/COPYING.MIT +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
2 | of this software and associated documentation files (the "Software"), to deal | ||
3 | in the Software without restriction, including without limitation the rights | ||
4 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
5 | copies of the Software, and to permit persons to whom the Software is | ||
6 | furnished to do so, subject to the following conditions: | ||
7 | |||
8 | The above copyright notice and this permission notice shall be included in | ||
9 | all copies or substantial portions of the Software. | ||
10 | |||
11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
14 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
16 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
17 | THE SOFTWARE. | ||
diff --git a/meta-dpdk/LICENSE b/meta-dpdk/LICENSE deleted file mode 100644 index e57d3b90..00000000 --- a/meta-dpdk/LICENSE +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | All metadata files (including, but not limited to bb, bbappend, | ||
2 | bbclass, inc and conf files) are MIT licensed unless otherwise stated. | ||
3 | Source code included in tree for individual recipes is under the | ||
4 | LICENSE stated in the associated recipe (.bb file) unless otherwise | ||
5 | stated. | ||
diff --git a/meta-dpdk/README b/meta-dpdk/README deleted file mode 100644 index 1b256d02..00000000 --- a/meta-dpdk/README +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | meta-dpdk | ||
2 | ========= | ||
3 | |||
4 | This README file contains information on building the DPDK package. | ||
5 | |||
6 | This is a fork of meta-dpdk, git://git.yoctoproject.org/meta-dpdk | ||
7 | langdale branch as of commit bd1b4f10262f12dd66a91383757ccba4eeda0b08. | ||
8 | |||
9 | The software in this fork is specific to the AMD Embedded versal-net. | ||
10 | |||
11 | Dependencies | ||
12 | ============ | ||
13 | |||
14 | This layer depends on: | ||
15 | |||
16 | URI: git://git.openembedded.org/bitbake | ||
17 | branch: master | ||
18 | |||
19 | URI: git://git.openembedded.org/openembedded-core | ||
20 | layers: meta | ||
21 | branch: master | ||
22 | |||
23 | |||
24 | Guidelines for submitting patches | ||
25 | ==================================== | ||
26 | |||
27 | Please submit any patches against this fork of meta-dpdk to the meta-xilinx | ||
28 | mailing list (meta-xilinx@lists.yoctoproject.org). | ||
29 | |||
30 | Regardless of how you submit a patch or patchset, the patches should | ||
31 | at minimum follow the suggestions outlined in the 'Submitting a Change | ||
32 | to the Yocto Project' section in the Yocto Project Development Manual. | ||
33 | Specifically, they should: | ||
34 | |||
35 | - Include a 'Signed-off-by:' line. A commit can't legally be pulled | ||
36 | in without this. | ||
37 | |||
38 | - Provide a single-line, short summary of the change. This short | ||
39 | description should be prefixed by the BSP or recipe name, as | ||
40 | appropriate, followed by a colon. Capitalize the first character | ||
41 | of the summary (following the colon). | ||
42 | |||
43 | - For the body of the commit message, provide detailed information | ||
44 | that describes what you changed, why you made the change, and the | ||
45 | approach you used. | ||
46 | |||
47 | - If the change addresses a specific bug or issue that is associated | ||
48 | with a bug-tracking ID, include a reference to that ID in your | ||
49 | detailed description in the following format: [YOCTO #<bug-id>]. | ||
50 | |||
51 | - Pay attention to line length - please don't allow any particular | ||
52 | line in the commit message to stretch past 72 characters. | ||
53 | |||
54 | - For any non-trivial patch, provide information about how you | ||
55 | tested the patch, and for any non-trivial or non-obvious testing | ||
56 | setup, provide details of that setup. | ||
diff --git a/meta-dpdk/conf/layer.conf b/meta-dpdk/conf/layer.conf deleted file mode 100644 index 2b33f7a9..00000000 --- a/meta-dpdk/conf/layer.conf +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
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 | |||
8 | BBFILE_COLLECTIONS += "dpdk" | ||
9 | BBFILE_PATTERN_dpdk := "^${LAYERDIR}/" | ||
10 | BBFILE_PRIORITY_dpdk = "5" | ||
11 | |||
12 | LAYERDEPENDS_dpdk = "core" | ||
13 | |||
14 | # This should only be incremented on significant changes that will | ||
15 | # cause compatibility issues with other layers | ||
16 | LAYERVERSION_dpdk = "1" | ||
17 | LAYERSERIES_COMPAT_dpdk = "kirkstone langdale" | ||
18 | |||
19 | BBFILES_DYNAMIC += " \ | ||
20 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bb \ | ||
21 | clang-layer:${LAYERDIR}/dynamic-layers/clang-layer/*/*/*.bbappend \ | ||
22 | petalinux:${LAYERDIR}/dynamic-layers/petalinux/recipes-*/*/*.bb \ | ||
23 | petalinux:${LAYERDIR}/dynamic-layers/petalinux/recipes-*/*/*.bbappend \ | ||
24 | " | ||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch deleted file mode 100644 index 32a88b20..00000000 --- a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0001-configure-skip-toolchain-checks.patch +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | From 53f8a8dffa571de99b50f1a7b757cfd7d8c24d21 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 17 Oct 2022 15:44:16 +0800 | ||
4 | Subject: [PATCH 1/4] configure: skip toolchain checks | ||
5 | |||
6 | Current logic fetch full command line along with the tool. i.e | ||
7 | gcc -m64 -march=skylake -mtune=generic ... | ||
8 | |||
9 | Which throws ERROR: Cannot find tool -m64 | ||
10 | |||
11 | So need to re-write for loop, so it can work in cross-compilation | ||
12 | environment too. | ||
13 | |||
14 | Upstream-Status: Inappropriate | ||
15 | |||
16 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
17 | --- | ||
18 | configure | 12 ++++++------ | ||
19 | 1 file changed, 6 insertions(+), 6 deletions(-) | ||
20 | |||
21 | diff --git a/configure b/configure | ||
22 | index 70fdfdf..48d1ea5 100755 | ||
23 | --- a/configure | ||
24 | +++ b/configure | ||
25 | @@ -38,12 +38,12 @@ check_toolchain() | ||
26 | : ${EMACS=emacs} | ||
27 | : ${ARCH_INCLUDES=} | ||
28 | |||
29 | - for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do | ||
30 | - if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then | ||
31 | - echo "*** ERROR: Cannot find tool ${TOOL}" ; | ||
32 | - exit 1; | ||
33 | - fi; | ||
34 | - done | ||
35 | + #for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4; do | ||
36 | + # if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then | ||
37 | + # echo "*** ERROR: Cannot find tool ${TOOL}" ; | ||
38 | + # exit 1; | ||
39 | + # fi; | ||
40 | + #done | ||
41 | |||
42 | clang_version=$($CLANG --version | grep -Po '(?<=clang version )[[:digit:]]+') | ||
43 | echo "Found clang binary '$CLANG' with version $clang_version (from '$($CLANG --version | head -n 1)')" | ||
44 | -- | ||
45 | 2.25.1 | ||
46 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch deleted file mode 100644 index 2e667836..00000000 --- a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 2840cf0b89497f545fae2eed7ece3f3c5fc558e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 17 Oct 2022 15:50:34 +0800 | ||
4 | Subject: [PATCH 2/4] Makefile: It does not detect libbpf header from sysroot | ||
5 | |||
6 | So adding sysroot headers path. | ||
7 | |||
8 | Upstream-Status: OE-Specific | ||
9 | |||
10 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
11 | --- | ||
12 | lib/common.mk | 2 +- | ||
13 | lib/libxdp/Makefile | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/lib/common.mk b/lib/common.mk | ||
17 | index 56c0406..ab0bad8 100644 | ||
18 | --- a/lib/common.mk | ||
19 | +++ b/lib/common.mk | ||
20 | @@ -55,7 +55,7 @@ LIBXDP_SOURCES := $(wildcard $(LIBXDP_DIR)/*.[ch] $(LIBXDP_DIR)/*.in) | ||
21 | KERN_USER_H ?= $(wildcard common_kern_user.h) | ||
22 | |||
23 | CFLAGS += -I$(HEADER_DIR) -I$(LIB_DIR)/util $(ARCH_INCLUDES) | ||
24 | -BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) | ||
25 | +BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES) -I${STAGING_INCDIR}/ | ||
26 | |||
27 | BPF_HEADERS := $(wildcard $(HEADER_DIR)/bpf/*.h) $(wildcard $(HEADER_DIR)/xdp/*.h) | ||
28 | |||
29 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
30 | index 358b751..8f459d8 100644 | ||
31 | --- a/lib/libxdp/Makefile | ||
32 | +++ b/lib/libxdp/Makefile | ||
33 | @@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc | ||
34 | TEMPLATED_SOURCES := xdp-dispatcher.c | ||
35 | |||
36 | CFLAGS += -I$(HEADER_DIR) | ||
37 | -BPF_CFLAGS += -I$(HEADER_DIR) | ||
38 | +BPF_CFLAGS += -I$(HEADER_DIR) -I${STAGING_INCDIR}/ | ||
39 | |||
40 | |||
41 | ifndef BUILD_STATIC_ONLY | ||
42 | -- | ||
43 | 2.25.1 | ||
44 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch deleted file mode 100644 index 41c57f6e..00000000 --- a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0003-Makefile-fix-KeyError-failure.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 157546fbc4f18751c52b3c8788879c05cf253331 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 17 Oct 2022 16:02:46 +0800 | ||
4 | Subject: [PATCH 3/4] Makefile: fix KeyError failure | ||
5 | |||
6 | Error: | ||
7 | Exception: KeyError: 'getpwuid(): uid not found: 11857215' | ||
8 | |||
9 | Upstream-Status: Inappropriate | ||
10 | |||
11 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
12 | --- | ||
13 | lib/libxdp/Makefile | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
17 | index 8f459d8..9a340a3 100644 | ||
18 | --- a/lib/libxdp/Makefile | ||
19 | +++ b/lib/libxdp/Makefile | ||
20 | @@ -55,7 +55,7 @@ install: all | ||
21 | $(Q)install -d -m 0755 $(DESTDIR)$(BPF_OBJECT_DIR) | ||
22 | $(Q)install -m 0644 $(LIB_HEADERS) $(DESTDIR)$(HDRDIR)/ | ||
23 | $(Q)install -m 0644 $(PC_FILE) $(DESTDIR)$(LIBDIR)/pkgconfig/ | ||
24 | - $(Q)cp -fpR $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) | ||
25 | + $(Q)cp -fpR --no-preserve=ownership $(SHARED_LIBS) $(STATIC_LIBS) $(DESTDIR)$(LIBDIR) | ||
26 | $(Q)install -m 0755 $(XDP_OBJS) $(DESTDIR)$(BPF_OBJECT_DIR) | ||
27 | $(if $(MAN_FILES),$(Q)install -m 0755 -d $(DESTDIR)$(MANDIR)/man3) | ||
28 | $(if $(MAN_FILES),$(Q)install -m 0644 $(MAN_FILES) $(DESTDIR)$(MANDIR)/man3) | ||
29 | -- | ||
30 | 2.25.1 | ||
31 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch deleted file mode 100644 index b1e15e52..00000000 --- a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools/0004-Makefile-fix-libxdp.pc-error.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 46b3ff797135574aa0ee42f633a281d44f48da95 Mon Sep 17 00:00:00 2001 | ||
2 | From: Naveen Saini <naveen.kumar.saini@intel.com> | ||
3 | Date: Mon, 17 Oct 2022 16:05:15 +0800 | ||
4 | Subject: [PATCH 4/4] Makefile: fix libxdp.pc error | ||
5 | |||
6 | Error: | ||
7 | do_populate_sysroot: QA Issue: libxdp.pc failed sanity test (tmpdir) in | ||
8 | path ... xdp-tools/1.2.8-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig] | ||
9 | |||
10 | Upstream-Status: Inappropriate | ||
11 | |||
12 | Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> | ||
13 | --- | ||
14 | lib/libxdp/Makefile | 4 ++-- | ||
15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/lib/libxdp/Makefile b/lib/libxdp/Makefile | ||
18 | index 9a340a3..bc39177 100644 | ||
19 | --- a/lib/libxdp/Makefile | ||
20 | +++ b/lib/libxdp/Makefile | ||
21 | @@ -76,8 +76,8 @@ $(OBJDIR)/libxdp.so.$(LIBXDP_VERSION): $(SHARED_OBJS) | ||
22 | $^ $(LDFLAGS) $(LDLIBS) -o $@ | ||
23 | |||
24 | $(OBJDIR)/libxdp.pc: | ||
25 | - $(Q)sed -e "s|@PREFIX@|$(PREFIX)|" \ | ||
26 | - -e "s|@LIBDIR@|$(LIBDIR)|" \ | ||
27 | + $(Q)sed -e "s|@PREFIX@|$(prefix)|" \ | ||
28 | + -e "s|@LIBDIR@|$(libdir)|" \ | ||
29 | -e "s|@VERSION@|$(TOOLS_VERSION)|" \ | ||
30 | < libxdp.pc.template > $@ | ||
31 | |||
32 | -- | ||
33 | 2.25.1 | ||
34 | |||
diff --git a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb b/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb deleted file mode 100644 index 7cd49a0b..00000000 --- a/meta-dpdk/dynamic-layers/clang-layer/recipes-support/xdp-tools/xdp-tools_1.2.8.bb +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | SUMMARY = "Utilities and example programs for use with XDP" | ||
2 | HOMEPAGE = "https://github.com/xdp-project/xdp-tools" | ||
3 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & BSD-2-Clause" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9ee53f8d06bbdb4c11b1557ecc4f8cd5 \ | ||
5 | file://LICENSES/GPL-2.0;md5=994331978b428511800bfbd17eea3001 \ | ||
6 | file://LICENSES/LGPL-2.1;md5=b370887980db5dd40659b50909238dbd \ | ||
7 | file://LICENSES/BSD-2-Clause;md5=5d6306d1b08f8df623178dfd81880927" | ||
8 | |||
9 | DEPENDS += " libbpf clang-native zlib elfutils libpcap" | ||
10 | |||
11 | SRC_URI = "git://github.com/xdp-project/xdp-tools.git;branch=v1.2;protocol=https \ | ||
12 | file://0001-configure-skip-toolchain-checks.patch \ | ||
13 | file://0002-Makefile-It-does-not-detect-libbpf-header-from-sysro.patch \ | ||
14 | file://0003-Makefile-fix-KeyError-failure.patch \ | ||
15 | file://0004-Makefile-fix-libxdp.pc-error.patch \ | ||
16 | " | ||
17 | |||
18 | SRCREV = "d4ff1f9bcf8b03556b625ab6e16958598482e861" | ||
19 | |||
20 | S = "${WORKDIR}/git" | ||
21 | |||
22 | inherit pkgconfig | ||
23 | |||
24 | EXTRA_OEMAKE += "PREFIX=${D}${prefix} LIBDIR=${D}${libdir} BUILD_STATIC_ONLY=1 PRODUCTION=1" | ||
25 | |||
26 | CFLAGS += "-fPIC" | ||
27 | |||
28 | export STAGING_INCDIR | ||
29 | |||
30 | do_install () { | ||
31 | oe_runmake install | ||
32 | |||
33 | # Remove object files *.o | ||
34 | rm -rf ${D}/${libdir}/bpf | ||
35 | } | ||
36 | |||
37 | RDEPENDS:${PN} += "bash" | ||
diff --git a/meta-dpdk/dynamic-layers/petalinux/recipes-core/images/petalinux-image-everything.bbappend b/meta-dpdk/dynamic-layers/petalinux/recipes-core/images/petalinux-image-everything.bbappend deleted file mode 100644 index 732b1b45..00000000 --- a/meta-dpdk/dynamic-layers/petalinux/recipes-core/images/petalinux-image-everything.bbappend +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | COMMON_INSTALL:append:versal-net = " dpdk libmcdi" | ||
2 | |||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk.inc b/meta-dpdk/recipes-extended/dpdk/dpdk.inc deleted file mode 100644 index 9ce9737e..00000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk.inc +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | DESCRIPTION = "Data Plane Development Kit" | ||
2 | HOMEPAGE = "http://dpdk.org" | ||
3 | |||
4 | LICENSE = "BSD-3-Clause & LGPL-2.1-only & GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://license/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
6 | file://license/lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ | ||
7 | file://license/bsd-3-clause.txt;md5=0f00d99239d922ffd13cabef83b33444" | ||
8 | |||
9 | SRC_URI = "git://dpdk.org/dpdk${STABLE};branch=${BRANCH} \ | ||
10 | " | ||
11 | |||
12 | CVE_PRODUCT = "data_plane_development_kit" | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/dpdk_22.11.0.bb b/meta-dpdk/recipes-extended/dpdk/dpdk_22.11.0.bb deleted file mode 100644 index abce8d16..00000000 --- a/meta-dpdk/recipes-extended/dpdk/dpdk_22.11.0.bb +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | include dpdk.inc | ||
2 | |||
3 | SRC_URI = "git://github.com/Xilinx-CNS/cns-dpdk-next-sfc.git;branch=${BRANCH};protocol=https" | ||
4 | |||
5 | BRANCH = "cdx_22.11" | ||
6 | SRCREV = "92339d519b50996915e7dbb5b8246b34febcba93" | ||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | # kernel module is provide by dpdk-module recipe, so disable here | ||
10 | EXTRA_OEMESON = " \ | ||
11 | -Denable_kmods=false \ | ||
12 | -Dexamples=cdma_demo,cdx_test \ | ||
13 | " | ||
14 | |||
15 | COMPATIBLE_MACHINE = "null" | ||
16 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" | ||
17 | COMPATIBLE_HOST:libc-musl:class-target = "null" | ||
18 | COMPATIBLE_HOST:linux-gnux32 = "null" | ||
19 | |||
20 | PACKAGECONFIG ??= " " | ||
21 | PACKAGECONFIG[afxdp] = ",,libbpf xdp-tools" | ||
22 | PACKAGECONFIG[libvirt] = ",,libvirt" | ||
23 | |||
24 | RDEPENDS:${PN} += "pciutils python3-core" | ||
25 | RDEPENDS:${PN}-examples += "bash" | ||
26 | DEPENDS = "numactl python3-pyelftools-native" | ||
27 | |||
28 | inherit meson pkgconfig | ||
29 | |||
30 | INSTALL_PATH = "${prefix}/share/dpdk" | ||
31 | |||
32 | do_write_config:append(){ | ||
33 | sed -i "/\[properties\]/a platform = \'cdx\'" ${WORKDIR}/meson.cross | ||
34 | } | ||
35 | |||
36 | do_install:append(){ | ||
37 | # remove source files | ||
38 | rm -rf ${D}/${INSTALL_PATH}/examples/* | ||
39 | |||
40 | # Install examples | ||
41 | install -m 0755 -d ${D}/${INSTALL_PATH}/examples/ | ||
42 | for dirname in ${B}/examples/dpdk-* | ||
43 | do | ||
44 | if [ ! -d ${dirname} ] && [ -x ${dirname} ]; then | ||
45 | install -m 0755 ${dirname} ${D}/${INSTALL_PATH}/examples/ | ||
46 | fi | ||
47 | done | ||
48 | |||
49 | } | ||
50 | |||
51 | PACKAGES =+ "${PN}-examples ${PN}-tools" | ||
52 | |||
53 | FILES:${PN} += " ${bindir}/dpdk-testpmd \ | ||
54 | ${bindir}/dpdk-proc-info \ | ||
55 | ${libdir}/*.so* \ | ||
56 | ${libdir}/dpdk/pmds-22.0/*.so* \ | ||
57 | " | ||
58 | FILES:${PN}-examples = " \ | ||
59 | ${INSTALL_PATH}/examples/* \ | ||
60 | " | ||
61 | |||
62 | FILES:${PN}-tools = " \ | ||
63 | ${bindir}/dpdk-pdump \ | ||
64 | ${bindir}/dpdk-test \ | ||
65 | ${bindir}/dpdk-test-* \ | ||
66 | ${bindir}/dpdk-*.py \ | ||
67 | " | ||
68 | |||
69 | CVE_PRODUCT = "data_plane_development_kit" | ||
70 | |||
71 | INSANE_SKIP:${PN} = "dev-so" | ||
diff --git a/meta-dpdk/recipes-extended/dpdk/libmcdi_0.1.0.bb b/meta-dpdk/recipes-extended/dpdk/libmcdi_0.1.0.bb deleted file mode 100644 index 0bc9a849..00000000 --- a/meta-dpdk/recipes-extended/dpdk/libmcdi_0.1.0.bb +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | DESCRIPTION = "Management Controller Driver Interface library" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://COPYING.MIT;md5=838c366f69b72c5df05c96dff79b35f2" | ||
5 | |||
6 | SRC_URI = "git://github.com/Xilinx-CNS/mcdi-lib.git;branch=${BRANCH};protocol=https" | ||
7 | BRANCH = "master" | ||
8 | SRCREV = "db448189e5fcb38b4750faf6afe243d7998863bc" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | COMPATIBLE_MACHINE = "^$" | ||
13 | COMPATIBLE_MACHINE:versal-net = "${MACHINE}" | ||
14 | |||
15 | MCDI_PATH_EXAMPLES = "${datadir}/${BPN}/examples" | ||
16 | |||
17 | do_compile() { | ||
18 | oe_runmake all CC="${CC}" CROSS_COMPILE="${TARGET_PREFIX}" | ||
19 | } | ||
20 | |||
21 | do_install() { | ||
22 | oe_runmake install prefix="${prefix}" DESTDIR="${D}" | ||
23 | |||
24 | install -d ${D}/${MCDI_PATH_EXAMPLES} | ||
25 | install -m 0755 ${B}/example/mcdi_example_app ${D}/${MCDI_PATH_EXAMPLES} | ||
26 | install -m 0755 ${B}/init/init_app ${D}/${MCDI_PATH_EXAMPLES} | ||
27 | } | ||
28 | |||
29 | PACKAGES =+ "${PN}-examples" | ||
30 | |||
31 | FILES:${PN}-examples = " \ | ||
32 | ${MCDI_PATH_EXAMPLES}/* \ | ||
33 | " | ||
diff --git a/meta-microblaze/conf/layer.conf b/meta-microblaze/conf/layer.conf index bccf61d0..951e8f1c 100644 --- a/meta-microblaze/conf/layer.conf +++ b/meta-microblaze/conf/layer.conf | |||
@@ -11,7 +11,7 @@ BBFILE_PRIORITY_xilinx-microblaze = "5" | |||
11 | 11 | ||
12 | LAYERDEPENDS_xilinx-microblaze = "core" | 12 | LAYERDEPENDS_xilinx-microblaze = "core" |
13 | 13 | ||
14 | LAYERSERIES_COMPAT_xilinx-microblaze = "langdale" | 14 | LAYERSERIES_COMPAT_xilinx-microblaze = "mickledore" |
15 | 15 | ||
16 | # Microblaze does not support stack-protector! | 16 | # Microblaze does not support stack-protector! |
17 | SECURITY_STACK_PROTECTOR:microblaze = "" | 17 | SECURITY_STACK_PROTECTOR:microblaze = "" |
@@ -19,3 +19,17 @@ SECURITY_STACK_PROTECTOR:microblaze = "" | |||
19 | OLDEST_KERNEL:microblaze = "3.15" | 19 | OLDEST_KERNEL:microblaze = "3.15" |
20 | 20 | ||
21 | INHERIT += "rust_microblaze" | 21 | INHERIT += "rust_microblaze" |
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 = "" | ||
32 | MICROBLAZE_SKIP_MSG:microblaze = "This recipe does not currently work on microblaze." | ||
33 | |||
34 | # ../../../alsa-lib-1.2.9/src/control/control.c:3648:1: error: symver is only supported on ELF platforms | ||
35 | SKIP_RECIPE[alsa-lib] = "${MICROBLAZE_SKIP_MSG}" | ||
diff --git a/meta-microblaze/recipes-core/glibc/glibc_2.36.bbappend b/meta-microblaze/recipes-core/glibc/glibc_%.bbappend index d42bcca5..d42bcca5 100644 --- a/meta-microblaze/recipes-core/glibc/glibc_2.36.bbappend +++ b/meta-microblaze/recipes-core/glibc/glibc_%.bbappend | |||
diff --git a/meta-microblaze/recipes-core/newlib/libgloss_4.2.%.bbappend b/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend index 15be1732..15be1732 100644 --- a/meta-microblaze/recipes-core/newlib/libgloss_4.2.%.bbappend +++ b/meta-microblaze/recipes-core/newlib/libgloss_%.bbappend | |||
diff --git a/meta-microblaze/recipes-core/newlib/newlib_4.2.%.bbappend b/meta-microblaze/recipes-core/newlib/newlib_%.bbappend index d30e61ec..d30e61ec 100644 --- a/meta-microblaze/recipes-core/newlib/newlib_4.2.%.bbappend +++ b/meta-microblaze/recipes-core/newlib/newlib_%.bbappend | |||
diff --git a/meta-microblaze/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend b/meta-microblaze/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend index 27001c4a..8be39fe2 100644 --- a/meta-microblaze/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend +++ b/meta-microblaze/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend | |||
@@ -3,8 +3,12 @@ RUSTTOOLS:microblaze ?= "" | |||
3 | GSTEXAMPLES:microblaze ?= "" | 3 | GSTEXAMPLES:microblaze ?= "" |
4 | X11GLTOOLS:microblaze ?= "" | 4 | X11GLTOOLS:microblaze ?= "" |
5 | 3GTOOLS:microblaze ?= "" | 5 | 3GTOOLS:microblaze ?= "" |
6 | KEXECTOOLS:microblaze = "" | ||
6 | 7 | ||
7 | RDEPENDS:${PN}:remove:microblaze = "\ | 8 | RDEPENDS:${PN}:remove:microblaze = "\ |
9 | alsa-utils-amixer \ | ||
10 | alsa-utils-aplay \ | ||
11 | ltp \ | ||
8 | connman-tools \ | 12 | connman-tools \ |
9 | connman-tests \ | 13 | connman-tests \ |
10 | connman-client \ | 14 | connman-client \ |
diff --git a/meta-microblaze/recipes-core/systemd/files/0001-architecture-Add-Microblaze-architecture-to-systemd-.patch b/meta-microblaze/recipes-core/systemd/files/0001-architecture-Add-Microblaze-architecture-to-systemd-.patch index a29214d5..88373e2b 100644 --- a/meta-microblaze/recipes-core/systemd/files/0001-architecture-Add-Microblaze-architecture-to-systemd-.patch +++ b/meta-microblaze/recipes-core/systemd/files/0001-architecture-Add-Microblaze-architecture-to-systemd-.patch | |||
@@ -8,6 +8,8 @@ Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> | |||
8 | Applied to current version of systemd | 8 | Applied to current version of systemd |
9 | Reworked to split microblaze and microblazeel | 9 | Reworked to split microblaze and microblazeel |
10 | 10 | ||
11 | Upstream-Status: Pending | ||
12 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | 13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
12 | --- | 14 | --- |
13 | src/basic/architecture.c | 3 +++ | 15 | src/basic/architecture.c | 3 +++ |
diff --git a/meta-microblaze/recipes-core/systemd/files/microblaze-disable-stack-protector.patch b/meta-microblaze/recipes-core/systemd/files/microblaze-disable-stack-protector.patch index ecbf1f79..157b008a 100644 --- a/meta-microblaze/recipes-core/systemd/files/microblaze-disable-stack-protector.patch +++ b/meta-microblaze/recipes-core/systemd/files/microblaze-disable-stack-protector.patch | |||
@@ -1,28 +1,37 @@ | |||
1 | Microblaze does not support stack-protector: | 1 | From ec286a0b613a9fa487be75b7c1c01e5c8ce62a1a Mon Sep 17 00:00:00 2001 |
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 22 Sep 2023 11:01:16 -0600 | ||
4 | Subject: [PATCH] meson.build: Microblaze does not support stack-protector | ||
2 | 5 | ||
3 | | cc1: warning: '-fstack-protector' not supported for this target | 6 | | cc1: warning: '-fstack-protector' not supported for this target |
4 | | ninja: build stopped: subcommand failed. | 7 | | ninja: build stopped: subcommand failed. |
5 | 8 | ||
9 | Upstream-Status: Inappropriate [Configuration] | ||
10 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | 11 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> |
12 | --- | ||
13 | meson.build | 3 --- | ||
14 | 1 file changed, 3 deletions(-) | ||
7 | 15 | ||
8 | Index: git/meson.build | 16 | diff --git a/meson.build b/meson.build |
9 | =================================================================== | 17 | index 395eca1943..8b87c5b3a2 100644 |
10 | --- git.orig/meson.build | 18 | --- a/meson.build |
11 | +++ git/meson.build | 19 | +++ b/meson.build |
12 | @@ -403,7 +403,6 @@ possible_link_flags = [ | 20 | @@ -405,14 +405,11 @@ possible_common_cc_flags = [ |
13 | '-Wl,--fatal-warnings', | ||
14 | '-Wl,-z,now', | ||
15 | '-Wl,-z,relro', | ||
16 | - '-fstack-protector', | ||
17 | ] | ||
18 | 21 | ||
19 | if get_option('b_sanitize') == 'none' | ||
20 | @@ -423,8 +422,6 @@ possible_cc_flags = possible_common_cc_f | ||
21 | '-fdiagnostics-show-option', | 22 | '-fdiagnostics-show-option', |
22 | '-fno-common', | 23 | '-fno-common', |
23 | '-fno-strict-aliasing', | ||
24 | - '-fstack-protector', | 24 | - '-fstack-protector', |
25 | - '-fstack-protector-strong', | 25 | - '-fstack-protector-strong', |
26 | '-fvisibility=hidden', | 26 | '-fstrict-flex-arrays', |
27 | '--param=ssp-buffer-size=4', | 27 | '--param=ssp-buffer-size=4', |
28 | ] | 28 | ] |
29 | |||
30 | possible_common_link_flags = [ | ||
31 | - '-fstack-protector', | ||
32 | ] | ||
33 | |||
34 | c_args = get_option('c_args') | ||
35 | -- | ||
36 | 2.34.1 | ||
37 | |||
diff --git a/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch b/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch index 8cb618ec..3862803b 100644 --- a/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch +++ b/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch | |||
@@ -1,40 +1,49 @@ | |||
1 | For microblaze, replace the ONCE macro | 1 | From 239d51b5b02ba766f34b3fce9803f8fd13097471 Mon Sep 17 00:00:00 2001 |
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 22 Sep 2023 11:09:50 -0600 | ||
4 | Subject: [PATCH] macro-funcamental.h: Microblaze does not have atomic | ||
5 | functions | ||
2 | 6 | ||
3 | For some reason the systemd developers decided that needed to hardcode | 7 | For some reason the systemd developers decided that needed to hardcode |
4 | the usage of __sync_bool_compare_and_swap, however not all architectures | 8 | the usage of __atomic_exchange functions, however not all architectures |
5 | define this. Microblaze is one such architecture, so we fall back to | 9 | define this. Microblaze is one such architecture, so we fall back to |
6 | a less 'safe' way of doing the work. However a quick inspection of | 10 | a less safe way of doing the same thing. A quick inspection of |
7 | the ONCE users shows that even if we end up with a race condition the | 11 | the ONCE users show that even if we end up with a race condition the |
8 | worst expected behavior could be multiple log messages. | 12 | worst expected behavior could be multiple log messages. |
9 | 13 | ||
10 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | 14 | Upstream-Status: Pending |
11 | 15 | ||
12 | Index: git/src/fundamental/macro-fundamental.h | 16 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
13 | =================================================================== | 17 | --- |
14 | --- git.orig/src/fundamental/macro-fundamental.h | 18 | src/fundamental/macro-fundamental.h | 17 +++++++++++++++++ |
15 | +++ git/src/fundamental/macro-fundamental.h | 19 | 1 file changed, 17 insertions(+) |
16 | @@ -109,11 +109,28 @@ | 20 | |
21 | diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h | ||
22 | index 1d49765fce..f45f55cdfe 100644 | ||
23 | --- a/src/fundamental/macro-fundamental.h | ||
24 | +++ b/src/fundamental/macro-fundamental.h | ||
25 | @@ -116,11 +116,28 @@ | ||
17 | * on this macro will run concurrently to all other code conditionalized | 26 | * on this macro will run concurrently to all other code conditionalized |
18 | * the same way, there's no ordering or completion enforced. */ | 27 | * the same way, there's no ordering or completion enforced. */ |
19 | #define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) | 28 | #define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) |
20 | +#if !defined (__microblaze__) | 29 | +#if !defined (__microblaze__) |
21 | #define __ONCE(o) \ | 30 | #define __ONCE(o) \ |
22 | ({ \ | 31 | ({ \ |
23 | static sd_bool (o) = sd_false; \ | 32 | static bool (o) = false; \ |
24 | __sync_bool_compare_and_swap(&(o), sd_false, sd_true); \ | 33 | __atomic_exchange_n(&(o), true, __ATOMIC_SEQ_CST); \ |
25 | }) | 34 | }) |
26 | +#else | 35 | +#else |
27 | + /* Microblaze does not contain __sync_bool_compare_and_swap, so we do it | 36 | + /* Microblaze does not contain __atomic_exchange_n*, so we do it |
28 | + * the old fashioned way. Note, it's possible that ONCE may run more | 37 | + * the old fashioned way. Note, it's possible that ONCE may run more |
29 | + * then ONCE due to possible races, however it is not expected to cause | 38 | + * then ONCE due to possible races, however it is not expected to cause |
30 | + * an issue. */ | 39 | + * an issue with systemd usage. */ |
31 | +#define __ONCE(o) \ | 40 | +#define __ONCE(o) \ |
32 | + ({ \ | 41 | + ({ \ |
33 | + static bool (o) = sd_false; \ | 42 | + static bool (o) = false; \ |
34 | + bool rc = sd_false; \ | 43 | + bool rc = false; \ |
35 | + if ((o) == sd_false) { \ | 44 | + if ((o) == false) { \ |
36 | + (o) = sd_true; \ | 45 | + (o) = true; \ |
37 | + rc = sd_true; \ | 46 | + rc = true; \ |
38 | + } \ | 47 | + } \ |
39 | + rc; \ | 48 | + rc; \ |
40 | + }) | 49 | + }) |
@@ -42,3 +51,6 @@ Index: git/src/fundamental/macro-fundamental.h | |||
42 | 51 | ||
43 | #undef MAX | 52 | #undef MAX |
44 | #define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b)) | 53 | #define MAX(a, b) __MAX(UNIQ, (a), UNIQ, (b)) |
54 | -- | ||
55 | 2.34.1 | ||
56 | |||
diff --git a/meta-microblaze/recipes-core/systemd/files/microblaze-syscalls.patch b/meta-microblaze/recipes-core/systemd/files/microblaze-syscalls.patch index 3bf75d32..75e0300b 100644 --- a/meta-microblaze/recipes-core/systemd/files/microblaze-syscalls.patch +++ b/meta-microblaze/recipes-core/systemd/files/microblaze-syscalls.patch | |||
@@ -1,12 +1,24 @@ | |||
1 | Add microblaze syscalls to systemd | 1 | From 2bd273c3a474b04b60c08c98fb7859fce28eac6d Mon Sep 17 00:00:00 2001 |
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Fri, 22 Sep 2023 10:26:47 -0600 | ||
4 | Subject: [PATCH] syscalls-microblaze.txt: Add microblaze syscalls to systemd | ||
2 | 5 | ||
3 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | 6 | Upstream-Status: Pending |
4 | 7 | ||
5 | Index: git/src/basic/meson.build | 8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
6 | =================================================================== | 9 | --- |
7 | --- git.orig/src/basic/meson.build | 10 | src/basic/meson.build | 1 + |
8 | +++ git/src/basic/meson.build | 11 | src/basic/missing_syscall_def.h | 33 ++ |
9 | @@ -347,6 +347,7 @@ arch_list = [ | 12 | src/basic/missing_syscalls.py | 2 + |
13 | src/basic/syscalls-microblaze.txt | 598 ++++++++++++++++++++++++++++++ | ||
14 | 4 files changed, 634 insertions(+) | ||
15 | create mode 100644 src/basic/syscalls-microblaze.txt | ||
16 | |||
17 | diff --git a/src/basic/meson.build b/src/basic/meson.build | ||
18 | index 3af013b014..e77f7cef16 100644 | ||
19 | --- a/src/basic/meson.build | ||
20 | +++ b/src/basic/meson.build | ||
21 | @@ -190,6 +190,7 @@ arch_list = [ | ||
10 | 'ia64', | 22 | 'ia64', |
11 | 'loongarch64', | 23 | 'loongarch64', |
12 | 'm68k', | 24 | 'm68k', |
@@ -14,10 +26,10 @@ Index: git/src/basic/meson.build | |||
14 | 'mips64', | 26 | 'mips64', |
15 | 'mips64n32', | 27 | 'mips64n32', |
16 | 'mipso32', | 28 | 'mipso32', |
17 | Index: git/src/basic/missing_syscall_def.h | 29 | diff --git a/src/basic/missing_syscall_def.h b/src/basic/missing_syscall_def.h |
18 | =================================================================== | 30 | index 402fdd00dc..94f41c1522 100644 |
19 | --- git.orig/src/basic/missing_syscall_def.h | 31 | --- a/src/basic/missing_syscall_def.h |
20 | +++ git/src/basic/missing_syscall_def.h | 32 | +++ b/src/basic/missing_syscall_def.h |
21 | @@ -16,6 +16,7 @@ | 33 | @@ -16,6 +16,7 @@ |
22 | # elif defined(__ia64__) | 34 | # elif defined(__ia64__) |
23 | # elif defined(__loongarch64) | 35 | # elif defined(__loongarch64) |
@@ -26,7 +38,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
26 | # elif defined(_MIPS_SIM) | 38 | # elif defined(_MIPS_SIM) |
27 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 39 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
28 | # elif _MIPS_SIM == _MIPS_SIM_NABI32 | 40 | # elif _MIPS_SIM == _MIPS_SIM_NABI32 |
29 | @@ -58,6 +59,8 @@ | 41 | @@ -59,6 +60,8 @@ |
30 | # define systemd_NR_bpf 280 | 42 | # define systemd_NR_bpf 280 |
31 | # elif defined(__m68k__) | 43 | # elif defined(__m68k__) |
32 | # define systemd_NR_bpf 354 | 44 | # define systemd_NR_bpf 354 |
@@ -35,7 +47,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
35 | # elif defined(_MIPS_SIM) | 47 | # elif defined(_MIPS_SIM) |
36 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 48 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
37 | # define systemd_NR_bpf 4355 | 49 | # define systemd_NR_bpf 4355 |
38 | @@ -124,6 +127,8 @@ assert_cc(__NR_bpf == systemd_NR_bpf); | 50 | @@ -127,6 +130,8 @@ assert_cc(__NR_bpf == systemd_NR_bpf); |
39 | # define systemd_NR_close_range 436 | 51 | # define systemd_NR_close_range 436 |
40 | # elif defined(__m68k__) | 52 | # elif defined(__m68k__) |
41 | # define systemd_NR_close_range 436 | 53 | # define systemd_NR_close_range 436 |
@@ -44,7 +56,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
44 | # elif defined(_MIPS_SIM) | 56 | # elif defined(_MIPS_SIM) |
45 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 57 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
46 | # define systemd_NR_close_range 4436 | 58 | # define systemd_NR_close_range 4436 |
47 | @@ -190,6 +195,8 @@ assert_cc(__NR_close_range == systemd_NR | 59 | @@ -195,6 +200,8 @@ assert_cc(__NR_close_range == systemd_NR_close_range); |
48 | # define systemd_NR_copy_file_range 285 | 60 | # define systemd_NR_copy_file_range 285 |
49 | # elif defined(__m68k__) | 61 | # elif defined(__m68k__) |
50 | # define systemd_NR_copy_file_range 376 | 62 | # define systemd_NR_copy_file_range 376 |
@@ -53,16 +65,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
53 | # elif defined(_MIPS_SIM) | 65 | # elif defined(_MIPS_SIM) |
54 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 66 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
55 | # define systemd_NR_copy_file_range 4360 | 67 | # define systemd_NR_copy_file_range 4360 |
56 | @@ -256,6 +263,8 @@ assert_cc(__NR_copy_file_range == system | 68 | @@ -263,6 +270,8 @@ assert_cc(__NR_copy_file_range == systemd_NR_copy_file_range); |
57 | # define systemd_NR_epoll_pwait2 441 | ||
58 | # elif defined(__m68k__) | ||
59 | # define systemd_NR_epoll_pwait2 441 | ||
60 | +# elif defined(__microblaze__) | ||
61 | +# define systemd_NR_epoll_pwait2 441 | ||
62 | # elif defined(_MIPS_SIM) | ||
63 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | ||
64 | # define systemd_NR_epoll_pwait2 4441 | ||
65 | @@ -322,6 +331,8 @@ assert_cc(__NR_epoll_pwait2 == systemd_N | ||
66 | # define systemd_NR_getrandom 278 | 69 | # define systemd_NR_getrandom 278 |
67 | # elif defined(__m68k__) | 70 | # elif defined(__m68k__) |
68 | # define systemd_NR_getrandom 352 | 71 | # define systemd_NR_getrandom 352 |
@@ -71,7 +74,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
71 | # elif defined(_MIPS_SIM) | 74 | # elif defined(_MIPS_SIM) |
72 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 75 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
73 | # define systemd_NR_getrandom 4353 | 76 | # define systemd_NR_getrandom 4353 |
74 | @@ -388,6 +399,8 @@ assert_cc(__NR_getrandom == systemd_NR_g | 77 | @@ -331,6 +340,8 @@ assert_cc(__NR_getrandom == systemd_NR_getrandom); |
75 | # define systemd_NR_memfd_create 279 | 78 | # define systemd_NR_memfd_create 279 |
76 | # elif defined(__m68k__) | 79 | # elif defined(__m68k__) |
77 | # define systemd_NR_memfd_create 353 | 80 | # define systemd_NR_memfd_create 353 |
@@ -80,7 +83,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
80 | # elif defined(_MIPS_SIM) | 83 | # elif defined(_MIPS_SIM) |
81 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 84 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
82 | # define systemd_NR_memfd_create 4354 | 85 | # define systemd_NR_memfd_create 4354 |
83 | @@ -454,6 +467,8 @@ assert_cc(__NR_memfd_create == systemd_N | 86 | @@ -399,6 +410,8 @@ assert_cc(__NR_memfd_create == systemd_NR_memfd_create); |
84 | # define systemd_NR_mount_setattr 442 | 87 | # define systemd_NR_mount_setattr 442 |
85 | # elif defined(__m68k__) | 88 | # elif defined(__m68k__) |
86 | # define systemd_NR_mount_setattr 442 | 89 | # define systemd_NR_mount_setattr 442 |
@@ -89,7 +92,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
89 | # elif defined(_MIPS_SIM) | 92 | # elif defined(_MIPS_SIM) |
90 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 93 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
91 | # define systemd_NR_mount_setattr 4442 | 94 | # define systemd_NR_mount_setattr 4442 |
92 | @@ -520,6 +535,8 @@ assert_cc(__NR_mount_setattr == systemd_ | 95 | @@ -467,6 +480,8 @@ assert_cc(__NR_mount_setattr == systemd_NR_mount_setattr); |
93 | # define systemd_NR_move_mount 429 | 96 | # define systemd_NR_move_mount 429 |
94 | # elif defined(__m68k__) | 97 | # elif defined(__m68k__) |
95 | # define systemd_NR_move_mount 429 | 98 | # define systemd_NR_move_mount 429 |
@@ -98,7 +101,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
98 | # elif defined(_MIPS_SIM) | 101 | # elif defined(_MIPS_SIM) |
99 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 102 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
100 | # define systemd_NR_move_mount 4429 | 103 | # define systemd_NR_move_mount 4429 |
101 | @@ -586,6 +603,8 @@ assert_cc(__NR_move_mount == systemd_NR_ | 104 | @@ -535,6 +550,8 @@ assert_cc(__NR_move_mount == systemd_NR_move_mount); |
102 | # define systemd_NR_name_to_handle_at 264 | 105 | # define systemd_NR_name_to_handle_at 264 |
103 | # elif defined(__m68k__) | 106 | # elif defined(__m68k__) |
104 | # define systemd_NR_name_to_handle_at 340 | 107 | # define systemd_NR_name_to_handle_at 340 |
@@ -107,7 +110,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
107 | # elif defined(_MIPS_SIM) | 110 | # elif defined(_MIPS_SIM) |
108 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 111 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
109 | # define systemd_NR_name_to_handle_at 4339 | 112 | # define systemd_NR_name_to_handle_at 4339 |
110 | @@ -652,6 +671,8 @@ assert_cc(__NR_name_to_handle_at == syst | 113 | @@ -603,6 +620,8 @@ assert_cc(__NR_name_to_handle_at == systemd_NR_name_to_handle_at); |
111 | # define systemd_NR_open_tree 428 | 114 | # define systemd_NR_open_tree 428 |
112 | # elif defined(__m68k__) | 115 | # elif defined(__m68k__) |
113 | # define systemd_NR_open_tree 428 | 116 | # define systemd_NR_open_tree 428 |
@@ -116,7 +119,16 @@ Index: git/src/basic/missing_syscall_def.h | |||
116 | # elif defined(_MIPS_SIM) | 119 | # elif defined(_MIPS_SIM) |
117 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 120 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
118 | # define systemd_NR_open_tree 4428 | 121 | # define systemd_NR_open_tree 4428 |
119 | @@ -784,6 +805,8 @@ assert_cc(__NR_openat2 == systemd_NR_ope | 122 | @@ -671,6 +690,8 @@ assert_cc(__NR_open_tree == systemd_NR_open_tree); |
123 | # define systemd_NR_openat2 437 | ||
124 | # elif defined(__m68k__) | ||
125 | # define systemd_NR_openat2 437 | ||
126 | +# elif defined(__microblaze__) | ||
127 | +# define systemd_NR_openat2 437 | ||
128 | # elif defined(_MIPS_SIM) | ||
129 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | ||
130 | # define systemd_NR_openat2 4437 | ||
131 | @@ -739,6 +760,8 @@ assert_cc(__NR_openat2 == systemd_NR_openat2); | ||
120 | # define systemd_NR_pidfd_open 434 | 132 | # define systemd_NR_pidfd_open 434 |
121 | # elif defined(__m68k__) | 133 | # elif defined(__m68k__) |
122 | # define systemd_NR_pidfd_open 434 | 134 | # define systemd_NR_pidfd_open 434 |
@@ -125,7 +137,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
125 | # elif defined(_MIPS_SIM) | 137 | # elif defined(_MIPS_SIM) |
126 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 138 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
127 | # define systemd_NR_pidfd_open 4434 | 139 | # define systemd_NR_pidfd_open 4434 |
128 | @@ -850,6 +873,8 @@ assert_cc(__NR_pidfd_open == systemd_NR_ | 140 | @@ -807,6 +830,8 @@ assert_cc(__NR_pidfd_open == systemd_NR_pidfd_open); |
129 | # define systemd_NR_pidfd_send_signal 424 | 141 | # define systemd_NR_pidfd_send_signal 424 |
130 | # elif defined(__m68k__) | 142 | # elif defined(__m68k__) |
131 | # define systemd_NR_pidfd_send_signal 424 | 143 | # define systemd_NR_pidfd_send_signal 424 |
@@ -134,7 +146,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
134 | # elif defined(_MIPS_SIM) | 146 | # elif defined(_MIPS_SIM) |
135 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 147 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
136 | # define systemd_NR_pidfd_send_signal 4424 | 148 | # define systemd_NR_pidfd_send_signal 4424 |
137 | @@ -916,6 +941,8 @@ assert_cc(__NR_pidfd_send_signal == syst | 149 | @@ -875,6 +900,8 @@ assert_cc(__NR_pidfd_send_signal == systemd_NR_pidfd_send_signal); |
138 | # define systemd_NR_pkey_mprotect 288 | 150 | # define systemd_NR_pkey_mprotect 288 |
139 | # elif defined(__m68k__) | 151 | # elif defined(__m68k__) |
140 | # define systemd_NR_pkey_mprotect 381 | 152 | # define systemd_NR_pkey_mprotect 381 |
@@ -143,7 +155,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
143 | # elif defined(_MIPS_SIM) | 155 | # elif defined(_MIPS_SIM) |
144 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 156 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
145 | # define systemd_NR_pkey_mprotect 4363 | 157 | # define systemd_NR_pkey_mprotect 4363 |
146 | @@ -982,6 +1009,8 @@ assert_cc(__NR_pkey_mprotect == systemd_ | 158 | @@ -943,6 +970,8 @@ assert_cc(__NR_pkey_mprotect == systemd_NR_pkey_mprotect); |
147 | # define systemd_NR_renameat2 276 | 159 | # define systemd_NR_renameat2 276 |
148 | # elif defined(__m68k__) | 160 | # elif defined(__m68k__) |
149 | # define systemd_NR_renameat2 351 | 161 | # define systemd_NR_renameat2 351 |
@@ -152,7 +164,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
152 | # elif defined(_MIPS_SIM) | 164 | # elif defined(_MIPS_SIM) |
153 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 165 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
154 | # define systemd_NR_renameat2 4351 | 166 | # define systemd_NR_renameat2 4351 |
155 | @@ -1048,6 +1077,8 @@ assert_cc(__NR_renameat2 == systemd_NR_r | 167 | @@ -1011,6 +1040,8 @@ assert_cc(__NR_renameat2 == systemd_NR_renameat2); |
156 | # define systemd_NR_setns 268 | 168 | # define systemd_NR_setns 268 |
157 | # elif defined(__m68k__) | 169 | # elif defined(__m68k__) |
158 | # define systemd_NR_setns 344 | 170 | # define systemd_NR_setns 344 |
@@ -161,7 +173,7 @@ Index: git/src/basic/missing_syscall_def.h | |||
161 | # elif defined(_MIPS_SIM) | 173 | # elif defined(_MIPS_SIM) |
162 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 174 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
163 | # define systemd_NR_setns 4344 | 175 | # define systemd_NR_setns 4344 |
164 | @@ -1114,6 +1145,8 @@ assert_cc(__NR_setns == systemd_NR_setns | 176 | @@ -1079,6 +1110,8 @@ assert_cc(__NR_setns == systemd_NR_setns); |
165 | # define systemd_NR_statx 291 | 177 | # define systemd_NR_statx 291 |
166 | # elif defined(__m68k__) | 178 | # elif defined(__m68k__) |
167 | # define systemd_NR_statx 379 | 179 | # define systemd_NR_statx 379 |
@@ -170,11 +182,11 @@ Index: git/src/basic/missing_syscall_def.h | |||
170 | # elif defined(_MIPS_SIM) | 182 | # elif defined(_MIPS_SIM) |
171 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 183 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
172 | # define systemd_NR_statx 4366 | 184 | # define systemd_NR_statx 4366 |
173 | Index: git/src/basic/missing_syscalls.py | 185 | diff --git a/src/basic/missing_syscalls.py b/src/basic/missing_syscalls.py |
174 | =================================================================== | 186 | index 5ccf02adec..e09023abe1 100644 |
175 | --- git.orig/src/basic/missing_syscalls.py | 187 | --- a/src/basic/missing_syscalls.py |
176 | +++ git/src/basic/missing_syscalls.py | 188 | +++ b/src/basic/missing_syscalls.py |
177 | @@ -64,6 +64,8 @@ DEF_TEMPLATE_B = '''\ | 189 | @@ -63,6 +63,8 @@ DEF_TEMPLATE_B = '''\ |
178 | # define systemd_NR_{syscall} {nr_loongarch64} | 190 | # define systemd_NR_{syscall} {nr_loongarch64} |
179 | # elif defined(__m68k__) | 191 | # elif defined(__m68k__) |
180 | # define systemd_NR_{syscall} {nr_m68k} | 192 | # define systemd_NR_{syscall} {nr_m68k} |
@@ -183,10 +195,11 @@ Index: git/src/basic/missing_syscalls.py | |||
183 | # elif defined(_MIPS_SIM) | 195 | # elif defined(_MIPS_SIM) |
184 | # if _MIPS_SIM == _MIPS_SIM_ABI32 | 196 | # if _MIPS_SIM == _MIPS_SIM_ABI32 |
185 | # define systemd_NR_{syscall} {nr_mipso32} | 197 | # define systemd_NR_{syscall} {nr_mipso32} |
186 | Index: git/src/basic/syscalls-microblaze.txt | 198 | diff --git a/src/basic/syscalls-microblaze.txt b/src/basic/syscalls-microblaze.txt |
187 | =================================================================== | 199 | new file mode 100644 |
200 | index 0000000000..3fc4cd6aef | ||
188 | --- /dev/null | 201 | --- /dev/null |
189 | +++ git/src/basic/syscalls-microblaze.txt | 202 | +++ b/src/basic/syscalls-microblaze.txt |
190 | @@ -0,0 +1,598 @@ | 203 | @@ -0,0 +1,598 @@ |
191 | +_llseek 140 | 204 | +_llseek 140 |
192 | +_newselect 142 | 205 | +_newselect 142 |
@@ -786,3 +799,6 @@ Index: git/src/basic/syscalls-microblaze.txt | |||
786 | +waitpid 7 | 799 | +waitpid 7 |
787 | +write 4 | 800 | +write 4 |
788 | +writev 146 | 801 | +writev 146 |
802 | -- | ||
803 | 2.34.1 | ||
804 | |||
diff --git a/meta-microblaze/recipes-core/util-linux/util-linux/util-linux-microblaze.patch b/meta-microblaze/recipes-core/util-linux/util-linux/util-linux-microblaze.patch new file mode 100644 index 00000000..07712c98 --- /dev/null +++ b/meta-microblaze/recipes-core/util-linux/util-linux/util-linux-microblaze.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | SECCOMP / Audit support needs to know about the microblaze architecture. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
6 | |||
7 | --- util-linux-2.39.1/include/audit-arch.h.orig 2023-08-23 14:55:54.318732126 -0600 | ||
8 | +++ util-linux-2.39.1/include/audit-arch.h 2023-08-23 15:02:51.058552660 -0600 | ||
9 | @@ -57,6 +57,8 @@ | ||
10 | # else | ||
11 | # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64 | ||
12 | # endif | ||
13 | +#elif __microblaze__ | ||
14 | +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MICROBLAZE | ||
15 | #else | ||
16 | # error Unknown target architecture | ||
17 | #endif | ||
diff --git a/meta-microblaze/recipes-core/util-linux/util-linux_%.bbappend b/meta-microblaze/recipes-core/util-linux/util-linux_%.bbappend new file mode 100644 index 00000000..7774dda5 --- /dev/null +++ b/meta-microblaze/recipes-core/util-linux/util-linux_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/util-linux" | ||
2 | SRC_URI:append:microblaze = " file://util-linux-microblaze.patch" | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch index d5fa21ce..f026e828 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0001-Add-wdc.ext.clear-and-wdc.ext.flush-insns.patch | |||
@@ -7,6 +7,8 @@ Added two new instructions, wdc.ext.clear and wdc.ext.flush, | |||
7 | to enable MicroBlaze to flush an external cache, which is | 7 | to enable MicroBlaze to flush an external cache, which is |
8 | used with the new coherency support for multiprocessing. | 8 | used with the new coherency support for multiprocessing. |
9 | 9 | ||
10 | Upstream-Status: Pending | ||
11 | |||
10 | Signed-off-by:nagaraju <nmekala@xilix.com> | 12 | Signed-off-by:nagaraju <nmekala@xilix.com> |
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
12 | --- | 14 | --- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-mlittle-endian-and-mbig-endian-flags.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-mlittle-endian-and-mbig-endian-flags.patch index 836d5b08..0b1236aa 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-mlittle-endian-and-mbig-endian-flags.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0002-Add-mlittle-endian-and-mbig-endian-flags.patch | |||
@@ -9,6 +9,8 @@ as options. | |||
9 | Updated show usage for MicroBlaze specific assembler options | 9 | Updated show usage for MicroBlaze specific assembler options |
10 | to include new entries. | 10 | to include new entries. |
11 | 11 | ||
12 | Upstream-Status: Pending | ||
13 | |||
12 | Signed-off-by:nagaraju <nmekala@xilix.com> | 14 | Signed-off-by:nagaraju <nmekala@xilix.com> |
13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 15 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
14 | --- | 16 | --- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0003-Disable-the-warning-message-for-eh_frame_hdr.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0003-Disable-the-warning-message-for-eh_frame_hdr.patch index 156f5c78..1c24a3d4 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0003-Disable-the-warning-message-for-eh_frame_hdr.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0003-Disable-the-warning-message-for-eh_frame_hdr.patch | |||
@@ -3,6 +3,8 @@ From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> | |||
3 | Date: Fri, 22 Jun 2012 01:20:20 +0200 | 3 | Date: Fri, 22 Jun 2012 01:20:20 +0200 |
4 | Subject: [PATCH 03/34] Disable the warning message for eh_frame_hdr | 4 | Subject: [PATCH 03/34] Disable the warning message for eh_frame_hdr |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
6 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | 8 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> |
7 | 9 | ||
8 | Conflicts: | 10 | Conflicts: |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch index e0bd25b9..d645db9f 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0004-LOCAL-Fix-relaxation-of-assembler-resolved-reference.patch | |||
@@ -10,6 +10,8 @@ Subject: [PATCH 04/34] [LOCAL]: Fix relaxation of assembler resolved | |||
10 | This is a workaround for design flaws in the assembler to | 10 | This is a workaround for design flaws in the assembler to |
11 | linker interface with regards to linker relaxation. | 11 | linker interface with regards to linker relaxation. |
12 | 12 | ||
13 | Upstream-Status: Pending | ||
14 | |||
13 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | 15 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> |
14 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
15 | 17 | ||
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0005-upstream-change-to-garbage-collection-sweep-causes-m.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0005-upstream-change-to-garbage-collection-sweep-causes-m.patch index 20dd1859..55fcf92a 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0005-upstream-change-to-garbage-collection-sweep-causes-m.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0005-upstream-change-to-garbage-collection-sweep-causes-m.patch | |||
@@ -17,6 +17,8 @@ on execution. | |||
17 | This does not occur if static linking libstdc++.a, so its during the | 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 | 18 | relocations for a shared lib with garbage collection this occurs |
19 | 19 | ||
20 | Upstream-Status: Pending | ||
21 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 22 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
21 | 23 | ||
22 | Conflicts: | 24 | Conflicts: |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0006-Fix-bug-in-TLSTPREL-Relocation.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0006-Fix-bug-in-TLSTPREL-Relocation.patch index 68a5d684..827b5a41 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0006-Fix-bug-in-TLSTPREL-Relocation.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0006-Fix-bug-in-TLSTPREL-Relocation.patch | |||
@@ -8,6 +8,10 @@ When the fixup is applied the addend is not added at the correct offset | |||
8 | of the instruction. The offset is hard coded considering its big endian | 8 | of the instruction. The offset is hard coded considering its big endian |
9 | and it fails for Little endian. This patch allows support for both | 9 | and it fails for Little endian. This patch allows support for both |
10 | big & little-endian compilers | 10 | big & little-endian compilers |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | bfd/elf32-microblaze.c | 4 ++-- | 16 | bfd/elf32-microblaze.c | 4 ++-- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 17 | 1 file changed, 2 insertions(+), 2 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0007-Added-Address-extension-instructions.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0007-Added-Address-extension-instructions.patch index ffaf6236..d33a64e1 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0007-Added-Address-extension-instructions.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0007-Added-Address-extension-instructions.patch | |||
@@ -18,6 +18,10 @@ ChangeLog: | |||
18 | 18 | ||
19 | Conflicts: | 19 | Conflicts: |
20 | opcodes/microblaze-opcm.h | 20 | opcodes/microblaze-opcm.h |
21 | Upstream-Status: Pending | ||
22 | |||
23 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
24 | |||
21 | --- | 25 | --- |
22 | opcodes/microblaze-opc.h | 11 +++++++++++ | 26 | opcodes/microblaze-opc.h | 11 +++++++++++ |
23 | opcodes/microblaze-opcm.h | 10 +++++----- | 27 | opcodes/microblaze-opcm.h | 10 +++++----- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0008-Add-new-bit-field-instructions.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0008-Add-new-bit-field-instructions.patch index 3966566d..d2e6424b 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0008-Add-new-bit-field-instructions.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0008-Add-new-bit-field-instructions.patch | |||
@@ -19,6 +19,10 @@ Conflicts: | |||
19 | Conflicts: | 19 | Conflicts: |
20 | gas/config/tc-microblaze.c | 20 | gas/config/tc-microblaze.c |
21 | opcodes/microblaze-opc.h | 21 | opcodes/microblaze-opc.h |
22 | Upstream-Status: Pending | ||
23 | |||
24 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
25 | |||
22 | --- | 26 | --- |
23 | gas/config/tc-microblaze.c | 71 +++++++++++++++++++++++++++++++++++++- | 27 | gas/config/tc-microblaze.c | 71 +++++++++++++++++++++++++++++++++++++- |
24 | opcodes/microblaze-dis.c | 20 +++++++++-- | 28 | opcodes/microblaze-dis.c | 20 +++++++++-- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0009-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0009-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch index 47caf9ed..ec3ee897 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0009-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0009-Patch-Microblaze-fixed-bug-in-GCC-so-that-It-will-su.patch | |||
@@ -4,6 +4,10 @@ Date: Fri, 29 Sep 2017 18:00:23 +0530 | |||
4 | Subject: [PATCH 09/34] [Patch,Microblaze]: fixed bug in GCC so that It will | 4 | Subject: [PATCH 09/34] [Patch,Microblaze]: fixed bug in GCC so that It will |
5 | support .long 0U and .long 0u | 5 | support .long 0U and .long 0u |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gas/expr.c | 9 +++++++++ | 12 | gas/expr.c | 9 +++++++++ |
9 | 1 file changed, 9 insertions(+) | 13 | 1 file changed, 9 insertions(+) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0010-fixing-the-constant-range-check-issue.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0010-fixing-the-constant-range-check-issue.patch index 1b279f7e..339e598c 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0010-fixing-the-constant-range-check-issue.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0010-fixing-the-constant-range-check-issue.patch | |||
@@ -4,6 +4,10 @@ Date: Mon, 16 Oct 2017 15:44:23 +0530 | |||
4 | Subject: [PATCH 10/34] fixing the constant range check issue sample error: not | 4 | Subject: [PATCH 10/34] fixing the constant range check issue sample error: not |
5 | in range ffffffff80000000..7fffffff, not ffffffff70000000 | 5 | in range ffffffff80000000..7fffffff, not ffffffff70000000 |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gas/config/tc-microblaze.c | 2 +- | 12 | gas/config/tc-microblaze.c | 2 +- |
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0011-Patch-Microblaze-Compiler-will-give-error-messages-i.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0011-Patch-Microblaze-Compiler-will-give-error-messages-i.patch index 81949e66..4228d3a2 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0011-Patch-Microblaze-Compiler-will-give-error-messages-i.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0011-Patch-Microblaze-Compiler-will-give-error-messages-i.patch | |||
@@ -4,6 +4,10 @@ Date: Wed, 21 Feb 2018 12:32:02 +0530 | |||
4 | Subject: [PATCH 11/34] [Patch,Microblaze]: Compiler will give error messages | 4 | Subject: [PATCH 11/34] [Patch,Microblaze]: Compiler will give error messages |
5 | in more detail for mxl-gp-opt flag.. | 5 | in more detail for mxl-gp-opt flag.. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | ld/ldmain.c | 12 ++++++++++++ | 12 | ld/ldmain.c | 12 ++++++++++++ |
9 | 1 file changed, 12 insertions(+) | 13 | 1 file changed, 12 insertions(+) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0012-Patch-MicroBlaze-initial-support-for-MicroBlaze-64-b.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0012-Patch-MicroBlaze-initial-support-for-MicroBlaze-64-b.patch index e0166274..f1115743 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0012-Patch-MicroBlaze-initial-support-for-MicroBlaze-64-b.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0012-Patch-MicroBlaze-initial-support-for-MicroBlaze-64-b.patch | |||
@@ -11,6 +11,10 @@ Conflicts: | |||
11 | ld/Makefile.in | 11 | ld/Makefile.in |
12 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> | 12 | signed-off-by:Nagaraju Mekala<nmekala@xilinx.com> |
13 | Mahesh Bodapati<mbodapat@xilinx.com> | 13 | Mahesh Bodapati<mbodapat@xilinx.com> |
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
17 | |||
14 | --- | 18 | --- |
15 | bfd/Makefile.am | 2 + | 19 | bfd/Makefile.am | 2 + |
16 | bfd/Makefile.in | 3 + | 20 | bfd/Makefile.in | 3 + |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0013-Patch-Microblaze-negl-instruction-is-overriding-rsub.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0013-Patch-Microblaze-negl-instruction-is-overriding-rsub.patch index 01aff144..762e7823 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0013-Patch-Microblaze-negl-instruction-is-overriding-rsub.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0013-Patch-Microblaze-negl-instruction-is-overriding-rsub.patch | |||
@@ -4,6 +4,10 @@ Date: Tue, 11 Sep 2018 13:48:33 +0530 | |||
4 | Subject: [PATCH 13/34] [Patch,Microblaze] : negl instruction is overriding | 4 | Subject: [PATCH 13/34] [Patch,Microblaze] : negl instruction is overriding |
5 | rsubl,fixed it by changing the instruction order... | 5 | rsubl,fixed it by changing the instruction order... |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | opcodes/microblaze-opc.h | 4 ++-- | 12 | opcodes/microblaze-opc.h | 4 ++-- |
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0014-Added-relocations-for-MB-X.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0014-Added-relocations-for-MB-X.patch index 404081e0..12e33a85 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0014-Added-relocations-for-MB-X.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0014-Added-relocations-for-MB-X.patch | |||
@@ -9,6 +9,10 @@ Conflicts: | |||
9 | 9 | ||
10 | Conflicts: | 10 | Conflicts: |
11 | gas/config/tc-microblaze.c | 11 | gas/config/tc-microblaze.c |
12 | Upstream-Status: Pending | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
15 | |||
12 | --- | 16 | --- |
13 | bfd/bfd-in2.h | 9 +++- | 17 | bfd/bfd-in2.h | 9 +++- |
14 | bfd/libbfd.h | 4 +- | 18 | bfd/libbfd.h | 4 +- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0015-Fixed-MB-x-relocation-issues.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0015-Fixed-MB-x-relocation-issues.patch index e93e3476..91f37443 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0015-Fixed-MB-x-relocation-issues.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0015-Fixed-MB-x-relocation-issues.patch | |||
@@ -10,6 +10,10 @@ Conflicts: | |||
10 | 10 | ||
11 | Conflicts: | 11 | Conflicts: |
12 | gas/config/tc-microblaze.c | 12 | gas/config/tc-microblaze.c |
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
16 | |||
13 | --- | 17 | --- |
14 | bfd/elf64-microblaze.c | 48 ++++++++++-- | 18 | bfd/elf64-microblaze.c | 48 ++++++++++-- |
15 | gas/config/tc-microblaze.c | 155 ++++++++++++++++++++++++++----------- | 19 | gas/config/tc-microblaze.c | 155 ++++++++++++++++++++++++++----------- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0016-Fixing-the-branch-related-issues.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0016-Fixing-the-branch-related-issues.patch index f3a7267d..df6c3d90 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0016-Fixing-the-branch-related-issues.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0016-Fixing-the-branch-related-issues.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 16/34] Fixing the branch related issues | |||
5 | 5 | ||
6 | Conflicts: | 6 | Conflicts: |
7 | bfd/elf64-microblaze.c | 7 | bfd/elf64-microblaze.c |
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
8 | --- | 12 | --- |
9 | bfd/elf64-microblaze.c | 3 +++ | 13 | bfd/elf64-microblaze.c | 3 +++ |
10 | 1 file changed, 3 insertions(+) | 14 | 1 file changed, 3 insertions(+) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0017-Fixed-address-computation-issues-with-64bit-address.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0017-Fixed-address-computation-issues-with-64bit-address.patch index 4c0496c3..b986fba6 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0017-Fixed-address-computation-issues-with-64bit-address.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0017-Fixed-address-computation-issues-with-64bit-address.patch | |||
@@ -13,6 +13,10 @@ Conflicts: | |||
13 | 13 | ||
14 | Conflicts: | 14 | Conflicts: |
15 | bfd/elf64-microblaze.c | 15 | bfd/elf64-microblaze.c |
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
19 | |||
16 | --- | 20 | --- |
17 | bfd/bfd-in2.h | 5 +++ | 21 | bfd/bfd-in2.h | 5 +++ |
18 | bfd/elf64-microblaze.c | 12 +++---- | 22 | bfd/elf64-microblaze.c | 12 +++---- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0018-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0018-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch index 6a70dbfb..19ebc0b0 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0018-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0018-Patch-MicroBlaze-Adding-new-relocation-to-support-64.patch | |||
@@ -4,6 +4,10 @@ Date: Tue, 2 Nov 2021 17:28:24 +0530 | |||
4 | Subject: [PATCH 18/34] [Patch,MicroBlaze : Adding new relocation to support | 4 | Subject: [PATCH 18/34] [Patch,MicroBlaze : Adding new relocation to support |
5 | 64bit rodata. | 5 | 64bit rodata. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | bfd/elf64-microblaze.c | 11 +++++++-- | 12 | bfd/elf64-microblaze.c | 11 +++++++-- |
9 | gas/config/tc-microblaze.c | 49 ++++++++++++++++++++++++++++++++++---- | 13 | gas/config/tc-microblaze.c | 49 ++++++++++++++++++++++++++++++++++---- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0019-fixing-the-.bss-relocation-issue.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0019-fixing-the-.bss-relocation-issue.patch index 5826f0a3..69aaa651 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0019-fixing-the-.bss-relocation-issue.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0019-fixing-the-.bss-relocation-issue.patch | |||
@@ -8,6 +8,10 @@ Conflicts: | |||
8 | 8 | ||
9 | Conflicts: | 9 | Conflicts: |
10 | bfd/elf64-microblaze.c | 10 | bfd/elf64-microblaze.c |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | bfd/elf64-microblaze.c | 41 +++++++++++++++++++++++++++++------------ | 16 | bfd/elf64-microblaze.c | 41 +++++++++++++++++++++++++++++------------ |
13 | 1 file changed, 29 insertions(+), 12 deletions(-) | 17 | 1 file changed, 29 insertions(+), 12 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0020-Fixed-the-bug-in-the-R_MICROBLAZE_64_NONE-relocation.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0020-Fixed-the-bug-in-the-R_MICROBLAZE_64_NONE-relocation.patch index 21fab2de..ff1702cf 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0020-Fixed-the-bug-in-the-R_MICROBLAZE_64_NONE-relocation.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0020-Fixed-the-bug-in-the-R_MICROBLAZE_64_NONE-relocation.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 20/34] Fixed the bug in the R_MICROBLAZE_64_NONE relocation. | |||
6 | 6 | ||
7 | Conflicts: | 7 | Conflicts: |
8 | bfd/elf64-microblaze.c | 8 | bfd/elf64-microblaze.c |
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
9 | --- | 13 | --- |
10 | bfd/elf32-microblaze.c | 4 ++-- | 14 | bfd/elf32-microblaze.c | 4 ++-- |
11 | bfd/elf64-microblaze.c | 4 ++-- | 15 | bfd/elf64-microblaze.c | 4 ++-- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0021-Revert-ld-Remove-unused-expression-state.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0021-Revert-ld-Remove-unused-expression-state.patch index ab7f2077..3d877b69 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0021-Revert-ld-Remove-unused-expression-state.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0021-Revert-ld-Remove-unused-expression-state.patch | |||
@@ -13,6 +13,10 @@ Conflicts: | |||
13 | Conflicts: | 13 | Conflicts: |
14 | ld/ldexp.c | 14 | ld/ldexp.c |
15 | ld/ldexp.h | 15 | ld/ldexp.h |
16 | Upstream-Status: Pending | ||
17 | |||
18 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
19 | |||
16 | --- | 20 | --- |
17 | ld/ldexp.c | 8 +++++--- | 21 | ld/ldexp.c | 8 +++++--- |
18 | ld/ldexp.h | 1 + | 22 | ld/ldexp.h | 1 + |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0022-fixing-the-long-long-long-mingw-toolchain-issue.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0022-fixing-the-long-long-long-mingw-toolchain-issue.patch index bfb68360..073aa49c 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0022-fixing-the-long-long-long-mingw-toolchain-issue.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0022-fixing-the-long-long-long-mingw-toolchain-issue.patch | |||
@@ -3,6 +3,10 @@ From: Nagaraju Mekala <nmekala@xilix.com> | |||
3 | Date: Thu, 29 Nov 2018 17:59:25 +0530 | 3 | Date: Thu, 29 Nov 2018 17:59:25 +0530 |
4 | Subject: [PATCH 22/34] fixing the long & long long mingw toolchain issue | 4 | Subject: [PATCH 22/34] fixing the long & long long mingw toolchain issue |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gas/config/tc-microblaze.c | 10 +++++----- | 11 | gas/config/tc-microblaze.c | 10 +++++----- |
8 | opcodes/microblaze-opc.h | 4 ++-- | 12 | opcodes/microblaze-opc.h | 4 ++-- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-support-to-new-arithmetic-single-register-inst.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-support-to-new-arithmetic-single-register-inst.patch index 0b8c83cd..74b0f42a 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-support-to-new-arithmetic-single-register-inst.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0023-Added-support-to-new-arithmetic-single-register-inst.patch | |||
@@ -15,6 +15,10 @@ Conflicts: | |||
15 | gas/config/tc-microblaze.c | 15 | gas/config/tc-microblaze.c |
16 | signed-off-by:Nagaraju <nmekala@xilinx.com> | 16 | signed-off-by:Nagaraju <nmekala@xilinx.com> |
17 | Mahesh <mbodapat@xilinx.com> | 17 | Mahesh <mbodapat@xilinx.com> |
18 | Upstream-Status: Pending | ||
19 | |||
20 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
21 | |||
18 | --- | 22 | --- |
19 | gas/config/tc-microblaze.c | 147 ++++++++++++++++++++++++++++++++++++- | 23 | gas/config/tc-microblaze.c | 147 ++++++++++++++++++++++++++++++++++++- |
20 | opcodes/microblaze-dis.c | 11 +++ | 24 | opcodes/microblaze-dis.c | 11 +++ |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0024-Patch-MicroBlaze-double-imml-generation-for-64-bit-v.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0024-Patch-MicroBlaze-double-imml-generation-for-64-bit-v.patch index 6d0df558..2ce165bc 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0024-Patch-MicroBlaze-double-imml-generation-for-64-bit-v.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0024-Patch-MicroBlaze-double-imml-generation-for-64-bit-v.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 24/34] [Patch,MicroBlaze] : double imml generation for 64 bit | |||
6 | 6 | ||
7 | Conflicts: | 7 | Conflicts: |
8 | gas/config/tc-microblaze.c | 8 | gas/config/tc-microblaze.c |
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
9 | --- | 13 | --- |
10 | gas/config/tc-microblaze.c | 321 ++++++++++++++++++++++++++++++------- | 14 | gas/config/tc-microblaze.c | 321 ++++++++++++++++++++++++++++++------- |
11 | opcodes/microblaze-opc.h | 4 +- | 15 | opcodes/microblaze-opc.h | 4 +- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch index 74fcea81..c4ece2fe 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0025-Fixed-bug-in-generation-of-IMML-instruction-for-the.patch | |||
@@ -4,6 +4,10 @@ Date: Wed, 3 Nov 2021 12:13:32 +0530 | |||
4 | Subject: [PATCH 25/34] Fixed bug in generation of IMML instruction for the | 4 | Subject: [PATCH 25/34] Fixed bug in generation of IMML instruction for the |
5 | 5 | ||
6 | new MB-64 instructions with single register. | 6 | new MB-64 instructions with single register. |
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gas/config/tc-microblaze.c | 50 +++++++++++++++++++++++++++++++++++--- | 12 | gas/config/tc-microblaze.c | 50 +++++++++++++++++++++++++++++++++++--- |
9 | 1 file changed, 47 insertions(+), 3 deletions(-) | 13 | 1 file changed, 47 insertions(+), 3 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch index 8058c6a6..c17019d1 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0026-Patch-MicroBlaze-m64-This-patch-will-remove-imml-0-a.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 26/34] [Patch,MicroBlaze m64] : This patch will remove imml 0 | |||
5 | and imml -1 instructions when the offset is less than 16 bit for Type A | 5 | and imml -1 instructions when the offset is less than 16 bit for Type A |
6 | branch EA instructions. | 6 | branch EA instructions. |
7 | 7 | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
8 | --- | 12 | --- |
9 | gas/config/tc-microblaze.c | 6 ++---- | 13 | gas/config/tc-microblaze.c | 6 ++---- |
10 | 1 file changed, 2 insertions(+), 4 deletions(-) | 14 | 1 file changed, 2 insertions(+), 4 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0027-Patch-MicroBlaze-improper-address-mapping-of-PROVIDE.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0027-Patch-MicroBlaze-improper-address-mapping-of-PROVIDE.patch index 50819300..9bddd54b 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0027-Patch-MicroBlaze-improper-address-mapping-of-PROVIDE.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0027-Patch-MicroBlaze-improper-address-mapping-of-PROVIDE.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 27/34] [Patch,MicroBlaze] : improper address mapping of | |||
6 | need to override PROVIDE symbols if symbols are defined in libraries and | 6 | need to override PROVIDE symbols if symbols are defined in libraries and |
7 | linker so I am disabling override for PROVIDE symbols. | 7 | linker so I am disabling override for PROVIDE symbols. |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
9 | --- | 13 | --- |
10 | ld/ldlang.c | 12 +++++++++--- | 14 | ld/ldlang.c | 12 +++++++++--- |
11 | 1 file changed, 9 insertions(+), 3 deletions(-) | 15 | 1 file changed, 9 insertions(+), 3 deletions(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0028-Patch-microblaze-Changing-the-long-to-long-long-as-i.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0028-Patch-microblaze-Changing-the-long-to-long-long-as-i.patch index c7c4f1d1..eba1a4ef 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0028-Patch-microblaze-Changing-the-long-to-long-long-as-i.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0028-Patch-microblaze-Changing-the-long-to-long-long-as-i.patch | |||
@@ -8,6 +8,10 @@ Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | |||
8 | 8 | ||
9 | Conflicts: | 9 | Conflicts: |
10 | gas/config/tc-microblaze.c | 10 | gas/config/tc-microblaze.c |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | gas/config/tc-microblaze.c | 2 +- | 16 | gas/config/tc-microblaze.c | 2 +- |
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 17 | 1 file changed, 1 insertion(+), 1 deletion(-) |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch index 205f04fe..1e42dc60 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch | |||
@@ -11,6 +11,8 @@ Patch reverts the change away from const, and implements a newer | |||
11 | dynamic handler that passes the correct argument value based on word | 11 | dynamic handler that passes the correct argument value based on word |
12 | size. | 12 | size. |
13 | 13 | ||
14 | Upstream-Status: Pending | ||
15 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | 16 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> |
15 | --- | 17 | --- |
16 | gas/config/tc-microblaze.c | 16 +++++++++++++--- | 18 | gas/config/tc-microblaze.c | 16 +++++++++++++--- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0030-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0030-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch index bfb65224..450f65f7 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0030-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0030-ld-emulparams-elf64microblaze-Fix-emulation-generati.patch | |||
@@ -10,6 +10,8 @@ ldemul.o:(.data.rel+0x828): undefined reference to `ld_elf64microblaze_emulation | |||
10 | 10 | ||
11 | The error appears to be that the elf64 files were referencing the elf32 emulation. | 11 | The error appears to be that the elf64 files were referencing the elf32 emulation. |
12 | 12 | ||
13 | Upstream-Status: Pending | ||
14 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | 15 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> |
14 | --- | 16 | --- |
15 | ld/emulparams/elf64microblaze.sh | 2 +- | 17 | ld/emulparams/elf64microblaze.sh | 2 +- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0031-Patch-MicroBlaze-Invalid-data-offsets-pointer-after-.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0031-Patch-MicroBlaze-Invalid-data-offsets-pointer-after-.patch index cb31c0d7..2a16e274 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0031-Patch-MicroBlaze-Invalid-data-offsets-pointer-after-.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0031-Patch-MicroBlaze-Invalid-data-offsets-pointer-after-.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 31/34] [Patch,MicroBlaze] : Invalid data offsets (pointer) | |||
5 | after relaxation. Proposed patch from community member (dednev@rambler.ru) | 5 | after relaxation. Proposed patch from community member (dednev@rambler.ru) |
6 | against 2021.1 [CR-1115232] | 6 | against 2021.1 [CR-1115232] |
7 | 7 | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
8 | --- | 12 | --- |
9 | bfd/elf32-microblaze.c | 18 ++++++++++++++++++ | 13 | bfd/elf32-microblaze.c | 18 ++++++++++++++++++ |
10 | bfd/elf64-microblaze.c | 17 +++++++++++++++++ | 14 | bfd/elf64-microblaze.c | 17 +++++++++++++++++ |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch index e9556bf5..58c3d784 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0032-Patch-MicroBlaze-Double-free-with-ld-no-keep-memory.patch | |||
@@ -8,6 +8,10 @@ Subject: [PATCH 32/34] [Patch,MicroBlaze] : Double free with ld | |||
8 | Conflicts: | 8 | Conflicts: |
9 | bfd/elf32-microblaze.c | 9 | bfd/elf32-microblaze.c |
10 | bfd/elf64-microblaze.c | 10 | bfd/elf64-microblaze.c |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | bfd/elf32-microblaze.c | 40 ++++++++++++++++++++++------------------ | 16 | bfd/elf32-microblaze.c | 40 ++++++++++++++++++++++------------------ |
13 | bfd/elf64-microblaze.c | 38 ++++++++++++++++++++------------------ | 17 | bfd/elf64-microblaze.c | 38 ++++++++++++++++++++------------------ |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0033-Patch-MB-MB-binutils-Upstream-port-issues.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0033-Patch-MB-MB-binutils-Upstream-port-issues.patch index f70ca3f2..f91fcbc6 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0033-Patch-MB-MB-binutils-Upstream-port-issues.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0033-Patch-MB-MB-binutils-Upstream-port-issues.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 33/34] [Patch,MB]: MB binutils Upstream port issues. | |||
6 | It's resolving the seg faults with ADDLIK | 6 | It's resolving the seg faults with ADDLIK |
7 | Conflicts: | 7 | Conflicts: |
8 | bfd/elf64-microblaze.c | 8 | bfd/elf64-microblaze.c |
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | |||
9 | --- | 13 | --- |
10 | bfd/elf64-microblaze.c | 248 ++++++++++++++++++++++++++++--------- | 14 | bfd/elf64-microblaze.c | 248 ++++++++++++++++++++++++++++--------- |
11 | gas/config/tc-microblaze.c | 2 +- | 15 | gas/config/tc-microblaze.c | 2 +- |
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch index 4428823f..4483a89e 100644 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch +++ b/meta-microblaze/recipes-devtools/binutils/binutils/0034-Patch-MicroBlaze-By-default-the-linker-will-generate.patch | |||
@@ -1,17 +1,20 @@ | |||
1 | From 652c69cca5a9da92369378674707cdc59988bcc3 Mon Sep 17 00:00:00 2001 | 1 | From 9e0ee97de976d840819e2fa27d0baa7a6aa8e7d4 Mon Sep 17 00:00:00 2001 |
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
3 | Date: Fri, 28 Oct 2022 13:57:48 +0530 | 3 | Date: Fri, 28 Oct 2022 13:57:48 +0530 |
4 | Subject: [PATCH 34/34] [Patch,MicroBlaze] : By default the linker will | 4 | Subject: [PATCH 34/34] By default the linker will generate warnings if it is |
5 | generate warnings if it is creating an executable stack or a segment with | 5 | creating an executable stack or a segment with all three of read, write and |
6 | all three of read, write and execute permissions. These settings are not | 6 | execute permissions. These settings are not appropriate for all targets |
7 | appropriate for all targets | 7 | |
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
8 | 11 | ||
9 | --- | 12 | --- |
10 | ld/configure.tgt | 1 + | 13 | ld/configure.tgt | 1 + |
11 | 1 file changed, 1 insertion(+) | 14 | 1 file changed, 1 insertion(+) |
12 | 15 | ||
13 | diff --git a/ld/configure.tgt b/ld/configure.tgt | 16 | diff --git a/ld/configure.tgt b/ld/configure.tgt |
14 | index 80ffbcf23b3..198cd0f71e4 100644 | 17 | index e3fd0c2452b..6d6db66b99b 100644 |
15 | --- a/ld/configure.tgt | 18 | --- a/ld/configure.tgt |
16 | +++ b/ld/configure.tgt | 19 | +++ b/ld/configure.tgt |
17 | @@ -55,6 +55,7 @@ if test "${ac_default_ld_warn_rwx_segments}" = unset; then | 20 | @@ -55,6 +55,7 @@ if test "${ac_default_ld_warn_rwx_segments}" = unset; then |
@@ -19,9 +22,9 @@ index 80ffbcf23b3..198cd0f71e4 100644 | |||
19 | hppa*-*-* | \ | 22 | hppa*-*-* | \ |
20 | mips*-*-* | \ | 23 | mips*-*-* | \ |
21 | + microblaze*-*-* | \ | 24 | + microblaze*-*-* | \ |
22 | sparc*-*-*) | 25 | sparc*-*-* | \ |
26 | v850*-*-*) | ||
23 | ac_default_ld_warn_rwx_segments=0 | 27 | ac_default_ld_warn_rwx_segments=0 |
24 | ;; | ||
25 | -- | 28 | -- |
26 | 2.37.1 (Apple Git-137.1) | 29 | 2.17.1 |
27 | 30 | ||
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc new file mode 100644 index 00000000..0dbbecad --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12.2.inc | |||
@@ -0,0 +1,114 @@ | |||
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_CHECK_IGNORE += "CVE-2021-37322" | ||
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-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch index 1099a0e8..f8985752 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0001-LOCAL-Testsuite-builtins-tests-require-fpic.patch | |||
@@ -2,6 +2,8 @@ From 376b0ee790231a99fe50b50e20070c104bbba0d8 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/53] LOCAL]: Testsuite - builtins tests require fpic |
5 | Upstream-Status: Pending | ||
6 | |||
5 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 7 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
6 | 8 | ||
7 | Conflicts: | 9 | Conflicts: |
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-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch index 061dfc86..5302b942 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-12/0002-LOCAL-Quick-fail-g-.dg-opt-memcpy1.C.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 02/53] [LOCAL]: Quick fail g++.dg/opt/memcpy1.C This | |||
6 | for microblaze. This speeds up the testsuite without removing it from the | 6 | for microblaze. This speeds up the testsuite without removing it from the |
7 | FAIL reports. | 7 | FAIL reports. |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
9 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | 11 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> |
10 | --- | 12 | --- |
11 | gcc/testsuite/g++.dg/opt/memcpy1.C | 4 ++++ | 13 | gcc/testsuite/g++.dg/opt/memcpy1.C | 4 ++++ |
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-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch index 1b5d428e..89fe0ff6 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-12/0003-LOCAL-For-dejagnu-static-testing-on-qemu-suppress-wa.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 03/53] [LOCAL]: For dejagnu static testing on qemu, suppress | |||
6 | with method used by powerpc. Dynamic linking and using a qemu binary which | 6 | with 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 | |||
9 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
10 | --- | 12 | --- |
11 | gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- | 13 | gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp | 4 ---- |
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-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch index 8db33100..39c9c17e 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-12/0004-Patch-testsuite-Add-MicroBlaze-to-target-supports-fo.patch | |||
@@ -13,6 +13,8 @@ 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 | |||
16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 18 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
17 | --- | 19 | --- |
18 | gcc/testsuite/lib/target-supports.exp | 1 + | 20 | gcc/testsuite/lib/target-supports.exp | 1 + |
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-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch index 0fb32850..d127a03e 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0005-Patch-testsuite-Update-MicroBlaze-strings-test.patch | |||
@@ -11,6 +11,8 @@ 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 | |||
14 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
15 | --- | 17 | --- |
16 | gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++ | 18 | gcc/testsuite/gcc.target/microblaze/others/strings1.c | 4 ++++ |
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-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch index a82f11cc..3c412471 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-12/0006-Patch-testsuite-Allow-MicroBlaze-.weakext-pattern-in.patch | |||
@@ -13,6 +13,8 @@ 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 | |||
16 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 18 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
17 | 19 | ||
18 | Conflicts: | 20 | Conflicts: |
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-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch index 736f5cd1..89d3b75a 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-12/0007-Patch-testsuite-Add-MicroBlaze-to-check_profiling_av.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 07/53] [Patch, testsuite]: Add MicroBlaze to | |||
6 | check_profiling_available inline with other archs setting | 6 | check_profiling_available inline with other archs setting |
7 | profiling_available_saved to 0 | 7 | profiling_available_saved to 0 |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
9 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
10 | --- | 12 | --- |
11 | gcc/testsuite/lib/target-supports.exp | 1 + | 13 | gcc/testsuite/lib/target-supports.exp | 1 + |
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-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch index 451070c0..21747726 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0008-Patch-microblaze-Fix-atomic-side-effects.patch | |||
@@ -7,6 +7,8 @@ Subject: [PATCH 08/53] [Patch, microblaze]: Fix atomic side effects. In | |||
7 | generated assembly code with undefined side effects after invocation of the | 7 | generated assembly code with undefined side effects after invocation of the |
8 | atomic. | 8 | atomic. |
9 | 9 | ||
10 | Upstream-Status: Pending | ||
11 | |||
10 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | 12 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> |
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 13 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
12 | 14 | ||
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-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch index c7efbb07..97f35569 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-12/0009-Patch-microblaze-Fix-atomic-boolean-return-value.patch | |||
@@ -5,6 +5,8 @@ Subject: [PATCH 09/53] [Patch, microblaze]: Fix atomic boolean return value. | |||
5 | In atomic_compare_and_swapsi, fix boolean return value. Previously, it | 5 | In atomic_compare_and_swapsi, fix boolean return value. Previously, it |
6 | contained zero if successful and non-zero if unsuccessful. | 6 | contained zero if successful and non-zero if unsuccessful. |
7 | 7 | ||
8 | Upstream-Status: Pending | ||
9 | |||
8 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | 10 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> |
9 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
10 | --- | 12 | --- |
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-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch index 1bffafa9..62bb02a9 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-12/0010-Patch-microblaze-Fix-the-Microblaze-crash-with-msmal.patch | |||
@@ -9,6 +9,8 @@ Subject: [PATCH 10/53] [Patch, microblaze]: Fix the Microblaze crash with | |||
9 | have subreg register due to this compiler was crashing. Changed the logic to | 9 | have subreg register due to this compiler was crashing. Changed the logic to |
10 | avoid sub_reg call | 10 | avoid sub_reg call |
11 | 11 | ||
12 | Upstream-Status: Pending | ||
13 | |||
12 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> | 14 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> |
13 | 15 | ||
14 | Conflicts: | 16 | Conflicts: |
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-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch index 1bd73b8a..09ebfca6 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-12/0011-Patch-microblaze-Added-ashrsi3_with_size_opt.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 11/53] [Patch, microblaze]: Added ashrsi3_with_size_opt Added | |||
6 | optimization is used. lshrsi3_with_size_opt is being removed as it has | 6 | optimization is used. lshrsi3_with_size_opt is being removed as it has |
7 | conflicts with unsigned int variables | 7 | conflicts with unsigned int variables |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
9 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> | 11 | Signed-off-by:Nagaraju Mekala <nmekala@xilix.com> |
10 | --- | 12 | --- |
11 | gcc/config/microblaze/microblaze.md | 21 +++++++++++++++++++++ | 13 | gcc/config/microblaze/microblaze.md | 21 +++++++++++++++++++++ |
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-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch index f40fff9a..c26d46d4 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-12/0012-Patch-microblaze-Use-bralid-for-profiler-calls.patch | |||
@@ -2,6 +2,8 @@ From 12d7e086376916ef61e2c48639671fd0f7c8fbbf 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/53] [Patch, microblaze]: Use bralid for profiler calls |
5 | Upstream-Status: Pending | ||
6 | |||
5 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> | 7 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> |
6 | 8 | ||
7 | --- | 9 | --- |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch index 5c927264..8739e6ea 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0013-Patch-microblaze-Removed-moddi3-routinue.patch | |||
@@ -4,6 +4,8 @@ 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/53] [Patch, microblaze]: Removed moddi3 routinue Using the |
5 | default moddi3 function as the existing implementation has many bugs | 5 | default moddi3 function as the existing implementation has many bugs |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
7 | Signed-off-by:Nagaraju <nmekala@xilix.com> | 9 | Signed-off-by:Nagaraju <nmekala@xilix.com> |
8 | 10 | ||
9 | Conflicts: | 11 | Conflicts: |
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-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch index f8bcabe3..472c543c 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-12/0014-Patch-microblaze-Add-INIT_PRIORITY-support-Added.patch | |||
@@ -10,6 +10,10 @@ 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 | |||
13 | --- | 17 | --- |
14 | gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++ | 18 | gcc/config/microblaze/microblaze.cc | 53 +++++++++++++++++++++++++++++ |
15 | 1 file changed, 53 insertions(+) | 19 | 1 file changed, 53 insertions(+) |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch index 0f7d356f..7ce5ebc0 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0015-Patch-microblaze-Add-optimized-lshrsi3.patch | |||
@@ -17,6 +17,8 @@ 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 | |||
20 | Signed-off-by:Nagaraju <nmekala@xilix.com> | 22 | Signed-off-by:Nagaraju <nmekala@xilix.com> |
21 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | 23 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> |
22 | --- | 24 | --- |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch index 19ae324d..dc645c30 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0016-Patch-microblaze-Add-cbranchsi4_reg.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 16/53] [Patch, microblaze]: Add cbranchsi4_reg This patch | |||
6 | instruction has no immediate values.For the immediate values the xor | 6 | instruction has no immediate values.For the immediate values the xor |
7 | instruction is generated | 7 | instruction is generated |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
9 | Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> | 11 | Signed-off-by: Nagaraju Mekala <nmekala@xilix.com> |
10 | Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> | 12 | Signed-off-by: Ajit Agarwal <ajitkum@xilinx.com> |
11 | 13 | ||
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-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch index e3a98a08..b0d33516 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-12/0017-Patch-microblaze-Inline-Expansion-of-fsqrt-builtin.patch | |||
@@ -22,6 +22,8 @@ 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 | |||
25 | Signed-off-by:Ajit Agarwal ajitkum@xilinx.com | 27 | Signed-off-by:Ajit Agarwal ajitkum@xilinx.com |
26 | Nagaraju Mekala nmekala@xilinx.com | 28 | Nagaraju Mekala nmekala@xilinx.com |
27 | --- | 29 | --- |
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-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch index 831b8f22..94235be6 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-12/0018-PATCH-microblaze.md-Improve-adddi3-and-subdi3-insn-d.patch | |||
@@ -17,6 +17,8 @@ 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 | |||
20 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | 22 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> |
21 | --- | 23 | --- |
22 | gcc/config/microblaze/microblaze.md | 13 ++++++------- | 24 | gcc/config/microblaze/microblaze.md | 13 ++++++------- |
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-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch index ab3fa535..e955938e 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0019-Patch-microblaze-Update-ashlsi3-movsf-patterns.patch | |||
@@ -24,6 +24,10 @@ 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 | |||
27 | --- | 31 | --- |
28 | gcc/config/microblaze/microblaze.cc | 2 +- | 32 | gcc/config/microblaze/microblaze.cc | 2 +- |
29 | gcc/config/microblaze/microblaze.md | 10 ++++++++-- | 33 | gcc/config/microblaze/microblaze.md | 10 ++++++++-- |
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-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch index 67eb0893..2d384b78 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-12/0020-Patch-microblaze-8-stage-pipeline-for-microblaze.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 20/53] [Patch, microblaze]: 8-stage pipeline for microblaze | |||
6 | pipeline reduces the latencies of float & integer division drastically | 6 | pipeline reduces the 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 | |||
9 | --- | 13 | --- |
10 | gcc/config/microblaze/microblaze.cc | 11 ++++ | 14 | gcc/config/microblaze/microblaze.cc | 11 ++++ |
11 | gcc/config/microblaze/microblaze.h | 3 +- | 15 | gcc/config/microblaze/microblaze.h | 3 +- |
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-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch index 96fe4f73..1b8d924c 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-12/0021-PATCH-21-53-Patch-microblaze-Correct-the-const-high-.patch | |||
@@ -9,6 +9,10 @@ Subject: [PATCH 21/53] [PATCH 21/53] [Patch, microblaze]: Correct the const | |||
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 | |||
12 | --- | 16 | --- |
13 | gcc/config/microblaze/microblaze.cc | 6 ++++-- | 17 | gcc/config/microblaze/microblaze.cc | 6 ++++-- |
14 | gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ | 18 | gcc/testsuite/gcc.target/microblaze/others/long.c | 9 +++++++++ |
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-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch index 332db5d3..a5917947 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-12/0022-Fix-microblaze-Fix-internal-compiler-error-with-msma.patch | |||
@@ -9,6 +9,10 @@ Subject: [PATCH 22/53] [Fix, microblaze]: Fix internal compiler error with | |||
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 | |||
12 | --- | 16 | --- |
13 | gcc/config/microblaze/microblaze.cc | 2 +- | 17 | gcc/config/microblaze/microblaze.cc | 2 +- |
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 18 | 1 file changed, 1 insertion(+), 1 deletion(-) |
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-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch index 47e13fa6..ae05e791 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-12/0023-patch-microblaze-Fix-the-calculation-of-high-word-in.patch | |||
@@ -14,6 +14,10 @@ Subject: [PATCH 23/53] [patch,microblaze]: Fix the calculation of high word in | |||
14 | 14 | ||
15 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 15 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
16 | Ajit Agarwal <ajitkum@xilinx.com> | 16 | Ajit Agarwal <ajitkum@xilinx.com> |
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
20 | |||
17 | --- | 21 | --- |
18 | gcc/config/microblaze/microblaze.cc | 3 --- | 22 | gcc/config/microblaze/microblaze.cc | 3 --- |
19 | 1 file changed, 3 deletions(-) | 23 | 1 file changed, 3 deletions(-) |
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-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch index 8ed5ae83..444c9397 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-12/0024-Patch-MicroBlaze-this-patch-has-1.Fixed-the-bug-in.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 24/53] [Patch,MicroBlaze] : this patch has 1.Fixed the bug in | |||
5 | version calculation. 2.Add new bitfield instructions. | 5 | version calculation. 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 | |||
8 | --- | 12 | --- |
9 | gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++-------------- | 13 | gcc/config/microblaze/microblaze.cc | 154 ++++++++++++++-------------- |
10 | gcc/config/microblaze/microblaze.h | 2 + | 14 | gcc/config/microblaze/microblaze.h | 2 + |
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-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch index 109e0686..2800dee7 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-12/0025-Fixing-the-issue-with-the-builtin_alloc.patch | |||
@@ -6,6 +6,10 @@ Subject: [PATCH 25/53] Fixing the issue with the builtin_alloc. register r18 | |||
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 | |||
9 | --- | 13 | --- |
10 | gcc/config/microblaze/microblaze.md | 8 ++++---- | 14 | gcc/config/microblaze/microblaze.md | 8 ++++---- |
11 | 1 file changed, 4 insertions(+), 4 deletions(-) | 15 | 1 file changed, 4 insertions(+), 4 deletions(-) |
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-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch index 4f101b96..a1e4fb36 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-12/0026-Patch-Microblaze-Removed-fsqrt-generation-for-double.patch | |||
@@ -4,6 +4,10 @@ Date: Mon, 4 Jun 2018 10:10:18 +0530 | |||
4 | Subject: [PATCH 26/53] [Patch,Microblaze] : Removed fsqrt generation for | 4 | Subject: [PATCH 26/53] [Patch,Microblaze] : Removed fsqrt generation for |
5 | double values. | 5 | double values. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 14 -------------- | 12 | gcc/config/microblaze/microblaze.md | 14 -------------- |
9 | 1 file changed, 14 deletions(-) | 13 | 1 file changed, 14 deletions(-) |
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-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch index 2e7106d6..a9222e54 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-12/0027-Patch-MicroBlaze-Intial-commit-of-64-bit-Microblaze.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 27/53] [Patch,MicroBlaze]: 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 | |||
8 | --- | 12 | --- |
9 | gcc/config/microblaze/constraints.md | 6 + | 13 | gcc/config/microblaze/constraints.md | 6 + |
10 | gcc/config/microblaze/microblaze-protos.h | 1 + | 14 | gcc/config/microblaze/microblaze-protos.h | 1 + |
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-12/0028-Intial-commit-for-64bit-MB-sources.patch index 1ffa79cb..c36e246a 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0028-Intial-commit-for-64bit-MB-sources.patch | |||
@@ -4,6 +4,10 @@ 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/53] Intial commit for 64bit-MB sources. Need to cleanup |
5 | the code later. | 5 | the code later. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/constraints.md | 2 +- | 12 | gcc/config/microblaze/constraints.md | 2 +- |
9 | gcc/config/microblaze/microblaze-c.cc | 6 + | 13 | gcc/config/microblaze/microblaze-c.cc | 6 + |
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-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch index 26cdfca2..0a275c0b 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-12/0029-Patch-MicroBlaze-re-arrangement-of-the-compare-branc.patch | |||
@@ -4,6 +4,10 @@ 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/53] [Patch,MicroBlaze] : re-arrangement of the compare |
5 | branches | 5 | branches |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.cc | 28 ++---- | 12 | gcc/config/microblaze/microblaze.cc | 28 ++---- |
9 | gcc/config/microblaze/microblaze.md | 141 +++++++++++++--------------- | 13 | gcc/config/microblaze/microblaze.md | 141 +++++++++++++--------------- |
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-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch index 83d047cb..bda4e7da 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-12/0030-Patch-Microblaze-previous-commit-broke-the-handling-.patch | |||
@@ -4,6 +4,10 @@ Date: Wed, 8 Aug 2018 17:37:26 +0530 | |||
4 | Subject: [PATCH 30/53] [Patch,Microblaze] : previous commit broke the | 4 | Subject: [PATCH 30/53] [Patch,Microblaze] : previous commit broke the |
5 | handling of SI Branch compare for Microblaze 32-bit.. | 5 | handling of SI Branch compare for Microblaze 32-bit.. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 4 ++-- | 12 | gcc/config/microblaze/microblaze.md | 4 ++-- |
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
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-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch index c230049c..a9a7a03d 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-12/0031-Patch-Microblaze-Support-of-multilibs-with-m64.patch | |||
@@ -7,6 +7,10 @@ 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 | |||
10 | --- | 14 | --- |
11 | gcc/config/microblaze/microblaze-c.cc | 1 + | 15 | gcc/config/microblaze/microblaze-c.cc | 1 + |
12 | gcc/config/microblaze/t-microblaze | 15 ++++++--------- | 16 | gcc/config/microblaze/t-microblaze | 15 ++++++--------- |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch index 36a20450..cb62c5a7 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0032-Patch-MicroBlaze-Fixed-issues-like.patch | |||
@@ -4,6 +4,10 @@ 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/53] [Patch,MicroBlaze]: Fixed issues like: 1 Interrupt |
5 | alignment issue 2 Sign extension issue | 5 | alignment issue 2 Sign extension issue |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.cc | 16 ++++++++++------ | 12 | gcc/config/microblaze/microblaze.cc | 16 ++++++++++------ |
9 | gcc/config/microblaze/microblaze.md | 2 +- | 13 | gcc/config/microblaze/microblaze.md | 2 +- |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch index 9c9e4dd2..9760695c 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0033-Patch-MicroBlaze.patch | |||
@@ -7,6 +7,10 @@ Subject: [PATCH 33/53] [Patch,MicroBlaze]: fixed below issues: - Floating | |||
7 | 7 | ||
8 | Conflicts: | 8 | Conflicts: |
9 | gcc/config/microblaze/microblaze.md | 9 | gcc/config/microblaze/microblaze.md |
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
10 | --- | 14 | --- |
11 | gcc/config/microblaze/microblaze.cc | 12 +++- | 15 | gcc/config/microblaze/microblaze.cc | 12 +++- |
12 | gcc/config/microblaze/microblaze.h | 7 +++ | 16 | gcc/config/microblaze/microblaze.h | 7 +++ |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch index 7bd3001d..3f07dfa1 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0034-Added-double-arith-instructions.patch | |||
@@ -4,6 +4,10 @@ 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/53] -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 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++---- | 12 | gcc/config/microblaze/microblaze.md | 78 +++++++++++++++++++++++++---- |
9 | gcc/config/microblaze/t-microblaze | 7 +++ | 13 | gcc/config/microblaze/t-microblaze | 7 +++ |
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-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch index 89018aae..3ff6a2d0 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-12/0035-Fixed-the-issue-in-the-delay-slot-with-swap-instruct.patch | |||
@@ -4,6 +4,10 @@ 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/53] 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 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 6 ++++++ | 12 | gcc/config/microblaze/microblaze.md | 6 ++++++ |
9 | 1 file changed, 6 insertions(+) | 13 | 1 file changed, 6 insertions(+) |
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-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch index 0c27d69f..90ddf3eb 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-12/0036-Fixed-the-load-store-issue-with-the-32bit-arith-libr.patch | |||
@@ -4,6 +4,10 @@ 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/53] 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 | |||
7 | --- | 11 | --- |
8 | libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++- | 12 | libgcc/config/microblaze/divsi3.S | 25 ++++++++++++++++++++++++- |
9 | libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++- | 13 | libgcc/config/microblaze/modsi3.S | 26 +++++++++++++++++++++++++- |
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-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch index 2eab03ec..191c7627 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-12/0037-extending-the-Dwarf-support-to-64bit-Microblaze.patch | |||
@@ -3,6 +3,10 @@ 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/53] extending the Dwarf support to 64bit Microblaze |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gcc/config/microblaze/microblaze.h | 2 +- | 11 | gcc/config/microblaze/microblaze.h | 2 +- |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
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-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch index 4d6be758..8697be58 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-12/0038-fixing-the-typo-errors-in-umodsi3-file.patch | |||
@@ -3,6 +3,10 @@ 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/53] fixing the typo errors in umodsi3 file |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | libgcc/config/microblaze/umodsi3.S | 6 +++--- | 11 | libgcc/config/microblaze/umodsi3.S | 6 +++--- |
8 | 1 file changed, 3 insertions(+), 3 deletions(-) | 12 | 1 file changed, 3 insertions(+), 3 deletions(-) |
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-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch index 1a5a0ef7..032cab4d 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-12/0039-fixing-the-32bit-LTO-related-issue9-1014024.patch | |||
@@ -3,6 +3,10 @@ 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/53] fixing the 32bit LTO related issue9(1014024) |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- | 11 | gcc/config/microblaze/microblaze.h | 24 ++++++++++++++---------- |
8 | 1 file changed, 14 insertions(+), 10 deletions(-) | 12 | 1 file changed, 14 insertions(+), 10 deletions(-) |
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-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch index 7c6f9008..1ed53957 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-12/0040-Fixed-the-missing-stack-adjustment-in-prologue-of-mo.patch | |||
@@ -4,6 +4,10 @@ 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/53] 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 | |||
7 | --- | 11 | --- |
8 | libgcc/config/microblaze/modsi3.S | 1 + | 12 | libgcc/config/microblaze/modsi3.S | 1 + |
9 | 1 file changed, 1 insertion(+) | 13 | 1 file changed, 1 insertion(+) |
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-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch index 9cec7be9..e6335e8e 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-12/0041-Patch-Microblaze-corrected-SPN-for-dlong-instruction.patch | |||
@@ -4,6 +4,10 @@ Date: Wed, 24 Oct 2018 18:31:04 +0530 | |||
4 | Subject: [PATCH 41/53] [Patch,Microblaze] : corrected SPN for dlong | 4 | Subject: [PATCH 41/53] [Patch,Microblaze] : corrected SPN for dlong |
5 | instruction mapping. | 5 | instruction mapping. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 4 ++-- | 12 | gcc/config/microblaze/microblaze.md | 4 ++-- |
9 | 1 file changed, 2 insertions(+), 2 deletions(-) | 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
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-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch index 8836d0e7..f4013b9e 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-12/0042-fixing-the-long-long-long-mingw-toolchain-issue.patch | |||
@@ -3,6 +3,10 @@ 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/53] fixing the long & long long mingw toolchain issue |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gcc/config/microblaze/constraints.md | 2 +- | 11 | gcc/config/microblaze/constraints.md | 2 +- |
8 | gcc/config/microblaze/microblaze.md | 8 ++++---- | 12 | gcc/config/microblaze/microblaze.md | 8 ++++---- |
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-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch index c8caff29..7f3c8373 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-12/0043-Fix-the-MB-64-bug-of-handling-QI-objects.patch | |||
@@ -3,6 +3,10 @@ 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/53] Fix the MB-64 bug of handling QI objects |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gcc/config/microblaze/microblaze.md | 14 +++++++------- | 11 | gcc/config/microblaze/microblaze.md | 14 +++++++------- |
8 | 1 file changed, 7 insertions(+), 7 deletions(-) | 12 | 1 file changed, 7 insertions(+), 7 deletions(-) |
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-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch index e0d7df3d..14eb812a 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-12/0044-Patch-Microblaze-We-will-check-the-possibility-of-pe.patch | |||
@@ -4,6 +4,10 @@ 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/53] [Patch,Microblaze] : We will check the possibility of |
5 | peephole2 optimization,if we can then we will fix the compiler issue. | 5 | peephole2 optimization,if we can then we will fix the compiler issue. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------ | 12 | gcc/config/microblaze/microblaze.md | 63 +++++++++++++++++------------ |
9 | 1 file changed, 38 insertions(+), 25 deletions(-) | 13 | 1 file changed, 38 insertions(+), 25 deletions(-) |
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-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch index 770d0f70..54135b0f 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-12/0045-Patch-MicroBlaze-fixed-typos-in-mul-div-and-mod-asse.patch | |||
@@ -4,6 +4,10 @@ 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/53] [Patch,MicroBlaze]: fixed typos in mul,div and mod |
5 | assembly files. | 5 | assembly files. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++---- | 12 | libgcc/config/microblaze/divsi3.S | 47 ++++++++++++++++++++---- |
9 | libgcc/config/microblaze/modsi3.S | 40 ++++++++++++++++++--- | 13 | libgcc/config/microblaze/modsi3.S | 40 ++++++++++++++++++--- |
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-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch index 29a7b4eb..def10321 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-12/0046-Patch-microblaze-MB-64-removal-of-barrel-shift-instr.patch | |||
@@ -8,6 +8,10 @@ Subject: [PATCH 46/53] [Patch, microblaze]: MB-64 removal of barrel-shift | |||
8 | enabled. Similarly to double instructions as well. | 8 | enabled. Similarly to double instructions as well. |
9 | 9 | ||
10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> | 10 | Signed-off-by :Nagaraju Mekala <nmekala@xilix.com> |
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | gcc/config/microblaze/microblaze.cc | 2 +- | 16 | gcc/config/microblaze/microblaze.cc | 2 +- |
13 | gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- | 17 | gcc/config/microblaze/microblaze.md | 269 ++++++++++++++++++++++++++-- |
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-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch index 774fad5a..318abe7b 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-12/0047-Added-new-MB-64-single-register-arithmetic-instructi.patch | |||
@@ -3,6 +3,10 @@ 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/53] Added new MB-64 single register arithmetic instructions |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
9 | |||
6 | --- | 10 | --- |
7 | gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++ | 11 | gcc/config/microblaze/microblaze.md | 56 +++++++++++++++++++++++++++++ |
8 | 1 file changed, 56 insertions(+) | 12 | 1 file changed, 56 insertions(+) |
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-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch index a442bf0f..09514a7d 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-12/0048-Patch-MicroBlaze-Added-support-for-64-bit-Immediate-.patch | |||
@@ -4,6 +4,10 @@ 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/53] [Patch,MicroBlaze] : Added support for 64 bit Immediate |
5 | values. | 5 | values. |
6 | 6 | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
10 | |||
7 | --- | 11 | --- |
8 | gcc/config/microblaze/constraints.md | 4 ++-- | 12 | gcc/config/microblaze/constraints.md | 4 ++-- |
9 | gcc/config/microblaze/microblaze.md | 3 +-- | 13 | gcc/config/microblaze/microblaze.md | 3 +-- |
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-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch index 5732000d..6258e799 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-12/0049-Patch-microblaze-Fix-Compiler-crash-with-freg-struct.patch | |||
@@ -7,6 +7,10 @@ Subject: [PATCH 49/53] [Patch, microblaze]: Fix Compiler crash with | |||
7 | With this patch all other modes are handled properly | 7 | With this patch all other modes are 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 | |||
10 | --- | 14 | --- |
11 | gcc/config/microblaze/microblaze.cc | 11 ++++++++++- | 15 | gcc/config/microblaze/microblaze.cc | 11 ++++++++++- |
12 | gcc/config/microblaze/microblaze.h | 19 ------------------- | 16 | gcc/config/microblaze/microblaze.h | 19 ------------------- |
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-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch index ed48daf7..8d99c93d 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-12/0050-Patch-microblaze-Add-TARGET_OPTION_OPTIMIZATION-and-.patch | |||
@@ -9,6 +9,8 @@ Added TARGET_OPTION_OPTIMIZATIONS and Turn off ivopts by default. | |||
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 | |||
12 | Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> | 14 | Signed-off-by: Nagaraju Mekala <nmekala@xilinx.com> |
13 | Mahesh Bodapati <mbodapat@xilinx.com> | 15 | Mahesh Bodapati <mbodapat@xilinx.com> |
14 | Conflicts: | 16 | Conflicts: |
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-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch index b9575eac..64069e3c 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-12/0051-Patch-microblaze-Reducing-Stack-space-for-arguments.patch | |||
@@ -9,6 +9,10 @@ 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 | |||
12 | --- | 16 | --- |
13 | gcc/config/microblaze/microblaze-protos.h | 1 + | 17 | gcc/config/microblaze/microblaze-protos.h | 1 + |
14 | gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++ | 18 | gcc/config/microblaze/microblaze.cc | 130 ++++++++++++++++++++++ |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch index d504a092..63feff79 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0052-Patch-MicroBlaze.patch | |||
@@ -8,6 +8,10 @@ Subject: [PATCH 52/53] [Patch,MicroBlaze] : If we use break_handler | |||
8 | break_handler attribute. signed-off-by : Mahesh Bodapati | 8 | break_handler attribute. signed-off-by : Mahesh Bodapati |
9 | <mbodapat@xilinx.com> | 9 | <mbodapat@xilinx.com> |
10 | 10 | ||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
14 | |||
11 | --- | 15 | --- |
12 | gcc/config/microblaze/microblaze.cc | 13 +++++-------- | 16 | gcc/config/microblaze/microblaze.cc | 13 +++++-------- |
13 | 1 file changed, 5 insertions(+), 8 deletions(-) | 17 | 1 file changed, 5 insertions(+), 8 deletions(-) |
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-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch index 6b3f4ddd..1552a5e9 100644 --- a/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch +++ b/meta-microblaze/recipes-devtools/gcc/gcc-12/0053-patch-microblaze64-Add-Zero_extended-instructions.patch | |||
@@ -9,6 +9,8 @@ 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 | |||
12 | Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com> | 14 | Signed-off-by: Nagaraju Mekala<nmekala@xilinx.com> |
13 | Mahesh Bodapati<mbodapat@xilinx.com> | 15 | Mahesh Bodapati<mbodapat@xilinx.com> |
14 | --- | 16 | --- |
diff --git a/meta-microblaze/recipes-devtools/gcc/gcc-common.inc b/meta-microblaze/recipes-devtools/gcc/gcc-common.inc new file mode 100644 index 00000000..5ac82b1b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-common.inc | |||
@@ -0,0 +1,118 @@ | |||
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 new file mode 100644 index 00000000..e4cdb73f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-configure-common.inc | |||
@@ -0,0 +1,123 @@ | |||
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 new file mode 100644 index 00000000..ec87b462 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian.inc | |||
@@ -0,0 +1,187 @@ | |||
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 new file mode 100644 index 00000000..bf53c5cd --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb | |||
@@ -0,0 +1,5 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross-canadian_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..a540fb24 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross.inc | |||
@@ -0,0 +1,163 @@ | |||
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 new file mode 100644 index 00000000..b43cca0c --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross_12.2.bb | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-cross_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..bd65b1fe --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk.inc | |||
@@ -0,0 +1,12 @@ | |||
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 new file mode 100644 index 00000000..40a6c4fe --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_12.2.bb | |||
@@ -0,0 +1,2 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-crosssdk_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..2dbbc23c --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-multilib-config.inc | |||
@@ -0,0 +1,249 @@ | |||
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 new file mode 100644 index 00000000..8bb58631 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-runtime.inc | |||
@@ -0,0 +1,310 @@ | |||
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 new file mode 100644 index 00000000..dd430b57 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_12.2.bb | |||
@@ -0,0 +1,2 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-runtime_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..f6aa9c99 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers.inc | |||
@@ -0,0 +1,120 @@ | |||
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 new file mode 100644 index 00000000..8bda2cca --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_12.2.bb | |||
@@ -0,0 +1,7 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-sanitizers_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..03f520b0 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-shared-source.inc | |||
@@ -0,0 +1,21 @@ | |||
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 new file mode 100644 index 00000000..265bcf4b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-source.inc | |||
@@ -0,0 +1,45 @@ | |||
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.2.bb b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb new file mode 100644 index 00000000..b890fa33 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-source_12.2.bb | |||
@@ -0,0 +1,4 @@ | |||
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-target.inc b/meta-microblaze/recipes-devtools/gcc/gcc-target.inc new file mode 100644 index 00000000..7dac3ef4 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-target.inc | |||
@@ -0,0 +1,259 @@ | |||
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 new file mode 100644 index 00000000..f68fec58 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc-testsuite.inc | |||
@@ -0,0 +1,107 @@ | |||
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 new file mode 100644 index 00000000..66e582ca --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | |||
@@ -0,0 +1,39 @@ | |||
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 new file mode 100644 index 00000000..5aa635b3 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch | |||
@@ -0,0 +1,239 @@ | |||
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 new file mode 100644 index 00000000..e83f05b8 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0003-64-bit-multilib-hack.patch | |||
@@ -0,0 +1,134 @@ | |||
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 new file mode 100644 index 00000000..e8f21634 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0004-Pass-CXXFLAGS_FOR_BUILD-in-a-couple-of-places-to-avo.patch | |||
@@ -0,0 +1,64 @@ | |||
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 new file mode 100644 index 00000000..e34eb2cf --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0005-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch | |||
@@ -0,0 +1,92 @@ | |||
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 new file mode 100644 index 00000000..b08aecc7 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0006-cpp-honor-sysroot.patch | |||
@@ -0,0 +1,53 @@ | |||
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 new file mode 100644 index 00000000..b59eed57 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | |||
@@ -0,0 +1,403 @@ | |||
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 new file mode 100644 index 00000000..c9bc38cc --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0008-libtool.patch | |||
@@ -0,0 +1,39 @@ | |||
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 new file mode 100644 index 00000000..dd67b115 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0009-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch | |||
@@ -0,0 +1,40 @@ | |||
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 new file mode 100644 index 00000000..45edc62e --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0010-Use-the-multilib-config-files-from-B-instead-of-usin.patch | |||
@@ -0,0 +1,99 @@ | |||
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 new file mode 100644 index 00000000..352c6eec --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0011-Avoid-using-libdir-from-.la-which-usually-points-to-.patch | |||
@@ -0,0 +1,28 @@ | |||
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 new file mode 100644 index 00000000..f52e21ed --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0011-aarch64-Fix-include-paths-when-S-B.patch | |||
@@ -0,0 +1,55 @@ | |||
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 new file mode 100644 index 00000000..b05be59c --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0012-Avoid-using-libdir-from-.la-which-usually-points-to-.patch | |||
@@ -0,0 +1,28 @@ | |||
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 new file mode 100644 index 00000000..61e61ecc --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0013-Ensure-target-gcc-headers-can-be-included.patch | |||
@@ -0,0 +1,113 @@ | |||
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 new file mode 100644 index 00000000..94308b2a --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0014-Don-t-search-host-directory-during-relink-if-inst_pr.patch | |||
@@ -0,0 +1,35 @@ | |||
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 new file mode 100644 index 00000000..ce9635ce --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0015-libcc1-fix-libcc1-s-install-path-and-rpath.patch | |||
@@ -0,0 +1,51 @@ | |||
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 new file mode 100644 index 00000000..3b547195 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0016-handle-sysroot-support-for-nativesdk-gcc.patch | |||
@@ -0,0 +1,510 @@ | |||
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 new file mode 100644 index 00000000..9b05da64 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0017-Search-target-sysroot-gcc-version-specific-dirs-with.patch | |||
@@ -0,0 +1,99 @@ | |||
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 new file mode 100644 index 00000000..56793e03 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0018-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch | |||
@@ -0,0 +1,84 @@ | |||
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 new file mode 100644 index 00000000..bb1699be --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0019-Re-introduce-spe-commandline-options.patch | |||
@@ -0,0 +1,39 @@ | |||
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 new file mode 100644 index 00000000..f3709208 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0020-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch | |||
@@ -0,0 +1,83 @@ | |||
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 new file mode 100644 index 00000000..f5f04ae3 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0021-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch | |||
@@ -0,0 +1,182 @@ | |||
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 new file mode 100644 index 00000000..cb8969b1 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0022-libatomic-Do-not-enforce-march-on-aarch64.patch | |||
@@ -0,0 +1,42 @@ | |||
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 new file mode 100644 index 00000000..11f42c59 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0023-Fix-install-path-of-linux64.h.patch | |||
@@ -0,0 +1,31 @@ | |||
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 new file mode 100644 index 00000000..2f016598 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0023-libatomic-Do-not-enforce-march-on-aarch64.patch | |||
@@ -0,0 +1,42 @@ | |||
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 new file mode 100644 index 00000000..ad826901 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch | |||
@@ -0,0 +1,28 @@ | |||
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 new file mode 100644 index 00000000..555be623 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0024-Fix-install-path-of-linux64.h.patch | |||
@@ -0,0 +1,31 @@ | |||
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 new file mode 100644 index 00000000..bbe2f18f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/0026-rust-recursion-limit.patch | |||
@@ -0,0 +1,92 @@ | |||
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 new file mode 100644 index 00000000..f3485858 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/hardcoded-paths.patch | |||
@@ -0,0 +1,19 @@ | |||
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 new file mode 100644 index 00000000..7f1a2dee --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc/prefix-map-realpath.patch | |||
@@ -0,0 +1,63 @@ | |||
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 new file mode 100644 index 00000000..c1996ab1 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc_12.2.bb | |||
@@ -0,0 +1,14 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/gcc_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..ac0a5a7b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc-common.inc | |||
@@ -0,0 +1,163 @@ | |||
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 new file mode 100644 index 00000000..8251e3c2 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc-initial.inc | |||
@@ -0,0 +1,58 @@ | |||
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 new file mode 100644 index 00000000..a259082b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_12.2.bb | |||
@@ -0,0 +1,5 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc-initial_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..84a2d930 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc.inc | |||
@@ -0,0 +1,53 @@ | |||
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 new file mode 100644 index 00000000..f88963b0 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc_12.2.bb | |||
@@ -0,0 +1,5 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgcc_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..99fdd89c --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgfortran.inc | |||
@@ -0,0 +1,88 @@ | |||
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 new file mode 100644 index 00000000..71dd8b4b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgfortran_12.2.bb | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100644 index 00000000..d1df2061 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/libgfortran_13.%.bbappend | |||
@@ -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 new file mode 100644 index 00000000..67c40845 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gcc/microblaze-block.inc | |||
@@ -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 new file mode 100644 index 00000000..925b0c2f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb-common.inc | |||
@@ -0,0 +1,66 @@ | |||
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 new file mode 100644 index 00000000..81dc572b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian.inc | |||
@@ -0,0 +1,44 @@ | |||
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 ??= "python 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 new file mode 100644 index 00000000..4ab2b715 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb-cross-canadian_12.1.bb | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100644 index 00000000..9f9675c1 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb-cross.inc | |||
@@ -0,0 +1,31 @@ | |||
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 ??= "python 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 new file mode 100644 index 00000000..3b654a2f --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb-cross_12.1.bb | |||
@@ -0,0 +1,2 @@ | |||
1 | require gdb-cross.inc | ||
2 | require gdb.inc | ||
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb.inc b/meta-microblaze/recipes-devtools/gdb/gdb.inc new file mode 100644 index 00000000..a5dc5545 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb.inc | |||
@@ -0,0 +1,20 @@ | |||
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.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver.patch index a5f3acd2..050bdde5 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0001-Add-initial-port-of-linux-gdbserver.patch | |||
@@ -17,6 +17,8 @@ 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 | |||
20 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | 22 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> |
21 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | 23 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> |
22 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | 24 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
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 new file mode 100644 index 00000000..16d6cf19 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0001-make-man-install-relative-to-DESTDIR.patch | |||
@@ -0,0 +1,28 @@ | |||
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-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch index a871b582..f7af2a62 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0002-Patch-MicroBlaze-Initial-port-of-core-reading-suppor.patch | |||
@@ -6,6 +6,8 @@ Subject: [PATCH 2/8] [Patch,MicroBlaze]: Initial port of core reading support | |||
6 | PRSTATUS and PSINFO information for rebuilding ".reg" sections of core dumps | 6 | PRSTATUS and PSINFO information for rebuilding ".reg" sections of core dumps |
7 | at run time. | 7 | at run time. |
8 | 8 | ||
9 | Upstream-Status: Pending | ||
10 | |||
9 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> | 11 | Signed-off-by: David Holsgrove <david.holsgrove@petalogix.com> |
10 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | 12 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> |
11 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | 13 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> |
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 new file mode 100644 index 00000000..8d263de8 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0002-mips-linux-nat-Define-_ABIO32-if-not-defined.patch | |||
@@ -0,0 +1,35 @@ | |||
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 index d2d06b54..d8ba6fca 100644 --- 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 | |||
@@ -3,6 +3,8 @@ From: Nathan Rossi <nathan.rossi@petalogix.com> | |||
3 | Date: Tue, 8 May 2012 18:11:17 +1000 | 3 | Date: Tue, 8 May 2012 18:11:17 +1000 |
4 | Subject: [PATCH 3/8] Fix debug message when register is unavailable | 4 | Subject: [PATCH 3/8] Fix debug message when register is unavailable |
5 | 5 | ||
6 | Upstream-Status: Pending | ||
7 | |||
6 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> | 8 | Signed-off-by: Nathan Rossi <nathan.rossi@petalogix.com> |
7 | 9 | ||
8 | Conflicts: | 10 | Conflicts: |
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 new file mode 100644 index 00000000..7e09404b --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0003-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | |||
@@ -0,0 +1,52 @@ | |||
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 new file mode 100644 index 00000000..a1e85e91 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Dont-disable-libreadline.a-when-using-disable-static.patch | |||
@@ -0,0 +1,50 @@ | |||
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-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch index 90944525..08b0ae17 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0004-Patch-MicroBlaze-MicroBlaze-native-gdb-port.patch | |||
@@ -4,6 +4,10 @@ Date: Mon, 10 Oct 2022 18:53:46 +0530 | |||
4 | Subject: [PATCH 4/8] [Patch,MicroBlaze] : MicroBlaze native gdb port. | 4 | Subject: [PATCH 4/8] [Patch,MicroBlaze] : 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 | --- | 11 | --- |
8 | gdb/Makefile.in | 2 + | 12 | gdb/Makefile.in | 2 + |
9 | gdb/configure.nat | 4 + | 13 | gdb/configure.nat | 4 + |
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch index caf20303..6eea28fe 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0005-Patch-microblaze-Adding-64-bit-MB-support.patch | |||
@@ -34,6 +34,10 @@ Conflicts: | |||
34 | gdb/regformats/microblaze-with-stack-protect.dat | 34 | gdb/regformats/microblaze-with-stack-protect.dat |
35 | gdbserver/linux-microblaze-low.c | 35 | gdbserver/linux-microblaze-low.c |
36 | include/elf/common.h | 36 | include/elf/common.h |
37 | Upstream-Status: Pending | ||
38 | |||
39 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
40 | |||
37 | --- | 41 | --- |
38 | bfd/Makefile.am | 2 + | 42 | bfd/Makefile.am | 2 + |
39 | bfd/Makefile.in | 3 + | 43 | bfd/Makefile.in | 3 + |
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 new file mode 100644 index 00000000..242099b9 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0005-use-asm-sgidefs.h.patch | |||
@@ -0,0 +1,36 @@ | |||
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-Change-order-of-CFLAGS.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch new file mode 100644 index 00000000..58c9b1d0 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Change-order-of-CFLAGS.patch | |||
@@ -0,0 +1,30 @@ | |||
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/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch index 402d7fe1..9d12cc53 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0006-Patch-MicroBlaze-these-changes-will-make-64-bit-vect.patch | |||
@@ -5,6 +5,10 @@ Subject: [PATCH 6/8] [Patch,MicroBlaze] : these changes will make 64 bit | |||
5 | vectors as default target types when we built gdb with microblaze 64 bit type | 5 | vectors as default target types when we built gdb with microblaze 64 bit type |
6 | targets,for instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64 | 6 | targets,for instance microblaze-xilinx-elf64/microblazeel-xilinx-elf64 |
7 | 7 | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | |||
8 | --- | 12 | --- |
9 | bfd/config.bfd | 8 ++++++++ | 13 | bfd/config.bfd | 8 ++++++++ |
10 | 1 file changed, 8 insertions(+) | 14 | 1 file changed, 8 insertions(+) |
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 index 59449bfa..ec11e7be 100644 --- 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 | |||
@@ -7,6 +7,10 @@ Subject: [PATCH 7/8] [Patch,MicroBlaze] : Added m64 abi for 64 bit target | |||
7 | Conflicts: | 7 | Conflicts: |
8 | gdb/microblaze-tdep.c | 8 | gdb/microblaze-tdep.c |
9 | gdb/microblaze-tdep.h | 9 | gdb/microblaze-tdep.h |
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
13 | |||
10 | --- | 14 | --- |
11 | gdb/features/microblaze64.xml | 1 + | 15 | gdb/features/microblaze64.xml | 1 + |
12 | gdb/microblaze-tdep.c | 159 ++++++++++++++++++++++++++++++++-- | 16 | gdb/microblaze-tdep.c | 159 ++++++++++++++++++++++++++++++++-- |
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 new file mode 100644 index 00000000..bbd1f0b2 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0007-resolve-restrict-keyword-conflict.patch | |||
@@ -0,0 +1,48 @@ | |||
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/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 new file mode 100644 index 00000000..3e293276 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch | |||
@@ -0,0 +1,55 @@ | |||
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 new file mode 100644 index 00000000..ed1310ce --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Fix-invalid-sigprocmask-call.patch | |||
@@ -0,0 +1,49 @@ | |||
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/0008-Patch-MicroBlaze.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Patch-MicroBlaze.patch index 4c96fb49..941a3b9c 100644 --- a/meta-microblaze/recipes-devtools/gdb/gdb/0008-Patch-MicroBlaze.patch +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0008-Patch-MicroBlaze.patch | |||
@@ -12,6 +12,10 @@ 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 | ||
16 | |||
17 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
18 | |||
15 | --- | 19 | --- |
16 | gdb/microblaze-tdep.c | 14 +++----------- | 20 | gdb/microblaze-tdep.c | 14 +++----------- |
17 | 1 file changed, 3 insertions(+), 11 deletions(-) | 21 | 1 file changed, 3 insertions(+), 11 deletions(-) |
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 new file mode 100644 index 00000000..f53d3bd1 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0009-gdbserver-ctrl-c-handling.patch | |||
@@ -0,0 +1,40 @@ | |||
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/readline-8.2.patch b/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch new file mode 100644 index 00000000..c2db4c0d --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/readline-8.2.patch | |||
@@ -0,0 +1,39 @@ | |||
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 new file mode 100644 index 00000000..9c6db4ca --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb_12.1.bb | |||
@@ -0,0 +1,39 @@ | |||
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-microblaze/recipes-devtools/m4/files/m4-stack-direction-microblaze.patch b/meta-microblaze/recipes-devtools/m4/files/m4-stack-direction-microblaze.patch index b8b40fb8..2821e55f 100644 --- a/meta-microblaze/recipes-devtools/m4/files/m4-stack-direction-microblaze.patch +++ b/meta-microblaze/recipes-devtools/m4/files/m4-stack-direction-microblaze.patch | |||
@@ -1,3 +1,9 @@ | |||
1 | Need a broader match for microblazeel. | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
6 | |||
1 | --- m4-1.4.19/m4/stack-direction.m4.orig 2021-11-30 13:19:56.005640547 -0800 | 7 | --- m4-1.4.19/m4/stack-direction.m4.orig 2021-11-30 13:19:56.005640547 -0800 |
2 | +++ m4-1.4.19/m4/stack-direction.m4 2021-11-30 13:20:03.917640741 -0800 | 8 | +++ m4-1.4.19/m4/stack-direction.m4 2021-11-30 13:20:03.917640741 -0800 |
3 | @@ -35,7 +35,7 @@ | 9 | @@ -35,7 +35,7 @@ |
diff --git a/meta-microblaze/recipes-devtools/python/python3_%.bbappend b/meta-microblaze/recipes-devtools/python/python3_%.bbappend new file mode 100644 index 00000000..9ea0eac5 --- /dev/null +++ b/meta-microblaze/recipes-devtools/python/python3_%.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | # Microblaze's libpython seems to be named slightly differently | ||
2 | # /usr/lib/python3.11/config-3.11/libpython3.11.a | ||
3 | FILES:libpython3-staticdev:append:microblaze = " ${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}/libpython${PYTHON_MAJMIN}.a" | ||
diff --git a/meta-microblaze/recipes-extended/grep/files/m4-stack-direction-microblaze.patch b/meta-microblaze/recipes-extended/grep/files/m4-stack-direction-microblaze.patch deleted file mode 100644 index b8b40fb8..00000000 --- a/meta-microblaze/recipes-extended/grep/files/m4-stack-direction-microblaze.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | --- m4-1.4.19/m4/stack-direction.m4.orig 2021-11-30 13:19:56.005640547 -0800 | ||
2 | +++ m4-1.4.19/m4/stack-direction.m4 2021-11-30 13:20:03.917640741 -0800 | ||
3 | @@ -35,7 +35,7 @@ | ||
4 | m68* | \ | ||
5 | m88k | \ | ||
6 | mcore | \ | ||
7 | - microblaze | \ | ||
8 | + microblaze* | \ | ||
9 | mips* | \ | ||
10 | mmix | \ | ||
11 | mn10200 | \ | ||
diff --git a/meta-microblaze/recipes-extended/grep/grep_%.bbappend b/meta-microblaze/recipes-extended/grep/grep_%.bbappend deleted file mode 100644 index c0afc82d..00000000 --- a/meta-microblaze/recipes-extended/grep/grep_%.bbappend +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/files" | ||
2 | SRC_URI:append:microblaze = " \ | ||
3 | file://m4-stack-direction-microblaze.patch \ | ||
4 | " | ||
diff --git a/meta-microblaze/recipes-extended/xz/xz_%.bbappend b/meta-microblaze/recipes-extended/xz/xz_%.bbappend new file mode 100644 index 00000000..be8fffd8 --- /dev/null +++ b/meta-microblaze/recipes-extended/xz/xz_%.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | # Microblaze doesn't support versioned symbols | ||
2 | # | ||
3 | # ../../../xz-5.4.1/src/liblzma/common/stream_encoder_mt.c:1283:1: error: symver is only supported on ELF platforms | ||
4 | # | ||
5 | EXTRA_OECONF:append:microblaze = " --disable-symbol-versions" | ||
diff --git a/meta-microblaze/recipes-graphics/mesa/mesa_%.bbappend b/meta-microblaze/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 00000000..7c80fb6c --- /dev/null +++ b/meta-microblaze/recipes-graphics/mesa/mesa_%.bbappend | |||
@@ -0,0 +1,14 @@ | |||
1 | # mesa doesn't compile with microblaze compiler | ||
2 | |||
3 | # | ||
4 | # When building POKY, it's advised that the user set the following: | ||
5 | # | ||
6 | # POKY_DEFAULT_DISTRO_FEATURES:microblaze = "ptest" | ||
7 | # | ||
8 | # The original version is: POKY_DEFAULT_DISTRO_FEATURES = "opengl ptest multiarch wayland vulkan" | ||
9 | # | ||
10 | # opengl, wayland and vulkan are not supported, primarily due to mesa not compiling. | ||
11 | # | ||
12 | # multiarch is not something we have on microblaze, so can be left or removed | ||
13 | # | ||
14 | COMPATIBLE_MACHINE:microblaze = "none" | ||
diff --git a/meta-xilinx-bsp/conf/layer.conf b/meta-xilinx-bsp/conf/layer.conf index 56a5bc29..dbb5ecfc 100644 --- a/meta-xilinx-bsp/conf/layer.conf +++ b/meta-xilinx-bsp/conf/layer.conf | |||
@@ -16,6 +16,4 @@ BBFILE_PRIORITY_xilinx-bsp = "5" | |||
16 | 16 | ||
17 | LAYERDEPENDS_xilinx-bsp = "xilinx" | 17 | LAYERDEPENDS_xilinx-bsp = "xilinx" |
18 | 18 | ||
19 | LAYERSERIES_COMPAT_xilinx-bsp = "langdale" | 19 | LAYERSERIES_COMPAT_xilinx-bsp = "mickledore" |
20 | |||
21 | PREFERRED_VERSION_kc705-bitstream ?= "${XILINX_RELEASE_VERSION}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vck5000-versal.conf b/meta-xilinx-bsp/conf/machine/vck5000-versal.conf deleted file mode 100644 index 9396bd97..00000000 --- a/meta-xilinx-bsp/conf/machine/vck5000-versal.conf +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vck500-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VCK5000 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vck5000-versal:']['vck5000-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 template}" | ||
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 | # vck5000-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VCK5000 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 vck5000-versal xsa as reference input. | ||
39 | # User can override with vck5000 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vck5000-versal" | ||
42 | |||
43 | #### No additional settings should be after the Postamble | ||
44 | #### Postamble | ||
45 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vck5000_versal']['vck5000-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/vhk158-versal.conf b/meta-xilinx-bsp/conf/machine/vhk158-versal.conf deleted file mode 100644 index b09bde28..00000000 --- a/meta-xilinx-bsp/conf/machine/vhk158-versal.conf +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | #@TYPE: Machine | ||
2 | #@NAME: vhk158-versal | ||
3 | #@DESCRIPTION: Machine configuration for the VHK158 evaluation board. | ||
4 | |||
5 | #### Preamble | ||
6 | MACHINEOVERRIDES =. "${@['', 'vhk158-versal:']['vhk158-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-vhk158-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 | # vhk158-versal Serial Console | ||
30 | SERIAL_CONSOLES ?= "115200;ttyAMA0" | ||
31 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | ||
32 | |||
33 | # Required generic machine inclusion | ||
34 | # VHK158 board uses Versal HBM device hence use soc variant based generic | ||
35 | # machine inclusion | ||
36 | require conf/machine/versal-hbm-generic.conf | ||
37 | |||
38 | # This machine conf file uses vhk158-versal xsa as reference input. | ||
39 | # User can override with vhk158 custom xsa using HDF_BASE and HDF_PATH variables | ||
40 | # from local.conf. | ||
41 | HDF_MACHINE = "vhk158-versal" | ||
42 | |||
43 | # VHK158 has 32GB memory only but default versal-generic has QB_MEM set to 8G, | ||
44 | # Since versal-vhk158-reva.dts has 32GB set, we need set same in QB_MEM | ||
45 | QB_MEM = "-m 32G" | ||
46 | |||
47 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vhk158.dtb" | ||
48 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-virt.dtb" | ||
49 | |||
50 | #### No additional settings should be after the Postamble | ||
51 | #### Postamble | ||
52 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' vhk158_versal']['vhk158-versal' != '${MACHINE}']}" | ||
diff --git a/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf new file mode 100644 index 00000000..18aa3eee --- /dev/null +++ b/meta-xilinx-bsp/conf/machine/zcu1275-zynqmp.conf | |||
@@ -0,0 +1,52 @@ | |||
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/zcu670-zynqmp.conf b/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf index c726e9f5..6fba3619 100644 --- a/meta-xilinx-bsp/conf/machine/zcu670-zynqmp.conf +++ b/meta-xilinx-bsp/conf/machine/zcu1285-zynqmp.conf | |||
@@ -1,9 +1,11 @@ | |||
1 | XILINX_DEPRECATED[zcu1285-zynqmp] = "${@'zcu1285-zynqmp is not supported in 2023.2' if d.getVar("XILINX_RELEASE_VERSION") == 'v2023.2' else ''}" | ||
2 | |||
1 | #@TYPE: Machine | 3 | #@TYPE: Machine |
2 | #@NAME: zcu670-zynqmp | 4 | #@NAME: zcu1285-zynqmp |
3 | #@DESCRIPTION: Machine configuration for the ZCU670 evaluation board. | 5 | #@DESCRIPTION: Machine configuration for the ZCU1285 evaluation board. |
4 | 6 | ||
5 | #### Preamble | 7 | #### Preamble |
6 | MACHINEOVERRIDES =. "${@['', 'zcu670-zynqmp:']['zcu670-zynqmp' !='${MACHINE}']}" | 8 | MACHINEOVERRIDES =. "${@['', 'zcu1285-zynqmp:']['zcu1285-zynqmp' !='${MACHINE}']}" |
7 | #### Regular settings follow | 9 | #### Regular settings follow |
8 | 10 | ||
9 | # Variables that changes based on hw design or board specific requirement must be | 11 | # Variables that changes based on hw design or board specific requirement must be |
@@ -13,7 +15,7 @@ MACHINEOVERRIDES =. "${@['', 'zcu670-zynqmp:']['zcu670-zynqmp' !='${MACHINE}']}" | |||
13 | # Yocto device-tree variables | 15 | # Yocto device-tree variables |
14 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" | 16 | YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "psu_uart_0" |
15 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" | 17 | YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PSU_DDR_0" |
16 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu670-revb}" | 18 | YAML_DT_BOARD_FLAGS ?= "{BOARD zcu1285-reva}" |
17 | 19 | ||
18 | # Yocto arm-trusted-firmware(TF-A) variables | 20 | # Yocto arm-trusted-firmware(TF-A) variables |
19 | ATF_CONSOLE ?= "cadence" | 21 | ATF_CONSOLE ?= "cadence" |
@@ -31,20 +33,24 @@ YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "psu_uart_0" | |||
31 | UBOOT_ENTRYPOINT ?= "0x200000" | 33 | UBOOT_ENTRYPOINT ?= "0x200000" |
32 | UBOOT_LOADADDRESS ?= "0x200000" | 34 | UBOOT_LOADADDRESS ?= "0x200000" |
33 | 35 | ||
34 | # zcu670-zynqmp Serial Console | 36 | # zcu1285-zynqmp Serial Console |
35 | SERIAL_CONSOLES ?= "115200;ttyPS0" | 37 | SERIAL_CONSOLES ?= "115200;ttyPS0" |
36 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" | 38 | YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200" |
37 | 39 | ||
38 | # Required generic machine inclusion | 40 | # Required generic machine inclusion |
39 | # ZCU670 board uses ZynqMP DR device hence use soc variant based generic machine | 41 | # ZCU1285 board uses ZynqMP DR device hence use soc variant based generic machine |
40 | # inclusion | 42 | # inclusion |
41 | require conf/machine/zynqmp-dr-generic.conf | 43 | require conf/machine/zynqmp-dr-generic.conf |
42 | 44 | ||
43 | # This eval board machine conf file uses zcu670-zynqmp xsa as reference input. | 45 | # This eval board machine conf file uses zcu1285-zynqmp xsa as reference input. |
44 | # User can override with zcu670 custom xsa using HDF_BASE and HDF_PATH variables | 46 | # User can override with zcu1285 custom xsa using HDF_BASE and HDF_PATH variables |
45 | # from local.conf. | 47 | # from local.conf. |
46 | HDF_MACHINE = "zcu670-zynqmp" | 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" | ||
47 | 53 | ||
48 | #### No additional settings should be after the Postamble | 54 | #### No additional settings should be after the Postamble |
49 | #### Postamble | 55 | #### Postamble |
50 | PACKAGE_EXTRA_ARCHS:append = "${@['', ' zcu670_zynqmp']['zcu670-zynqmp' != '${MACHINE}']}" | 56 | PACKAGE_EXTRA_ARCHS:append = "${@['', 'zcu1285_zynqmp']['zcu1285-zynqmp' != '${MACHINE}']}" |
diff --git a/meta-xilinx-bsp/recipes-bsp/reference-design/kc705-bitstream_2022.2.bb b/meta-xilinx-bsp/recipes-bsp/reference-design/kc705-bitstream_2022.2.bb deleted file mode 100644 index e512777c..00000000 --- a/meta-xilinx-bsp/recipes-bsp/reference-design/kc705-bitstream_2022.2.bb +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | SUMMARY = "KC705 Pre-built Bitstream" | ||
2 | DESCRIPTION = "A Pre-built bitstream for the KC705, which is capable of booting a Linux system." | ||
3 | HOMEPAGE = "http://www.xilinx.com" | ||
4 | SECTION = "bsp" | ||
5 | |||
6 | # The BSP package does not include any license information. | ||
7 | LICENSE = "Proprietary" | ||
8 | LICENSE_FLAGS = "xilinx" | ||
9 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" | ||
10 | |||
11 | COMPATIBLE_MACHINE = "kc705-microblazeel" | ||
12 | |||
13 | inherit deploy | ||
14 | inherit xilinx-fetch-restricted | ||
15 | |||
16 | BSP_NAME = "xilinx-kc705" | ||
17 | BSP_FILE = "${BSP_NAME}-v${PV}-final.bsp" | ||
18 | SRC_URI = "https://www.xilinx.com/member/forms/download/xef.html?filename=${BSP_FILE};downloadfilename=${BSP_FILE}" | ||
19 | SRC_URI[md5sum] = "5c0365a8a26cc27b4419aa1d7dd82351" | ||
20 | SRC_URI[sha256sum] = "a909a91a37a9925ee2f972ccb10f986a26ff9785c1a71a483545a192783bf773" | ||
21 | |||
22 | PROVIDES = "virtual/bitstream" | ||
23 | |||
24 | FILES:${PN} += "/boot/download.bit" | ||
25 | |||
26 | INHIBIT_DEFAULT_DEPS = "1" | ||
27 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
28 | |||
29 | # deps needed to extract content from the .bsp file | ||
30 | DEPENDS += "tar-native gzip-native" | ||
31 | |||
32 | do_compile() { | ||
33 | # Extract the bitstream into workdir | ||
34 | tar -xf ${WORKDIR}/${BSP_FILE} ${BSP_NAME}-axi-full-${PV}/pre-built/linux/images/download.bit -C ${S} | ||
35 | # move the bit file to ${S}/ as it is in a subdir in the tar file | ||
36 | for i in $(find -type f -name download.bit); do mv $i ${S}; done | ||
37 | } | ||
38 | |||
39 | do_install() { | ||
40 | install -D ${S}/download.bit ${D}/boot/download.bit | ||
41 | } | ||
42 | |||
43 | do_deploy () { | ||
44 | install -D ${S}/download.bit ${DEPLOYDIR}/download.bit | ||
45 | } | ||
46 | |||
47 | addtask deploy before do_build after do_install | ||
48 | |||
diff --git a/meta-xilinx-contrib/conf/layer.conf b/meta-xilinx-contrib/conf/layer.conf index f3d6c6e4..58dd0a52 100644 --- a/meta-xilinx-contrib/conf/layer.conf +++ b/meta-xilinx-contrib/conf/layer.conf | |||
@@ -21,4 +21,4 @@ LAYERDEPENDS_xilinx-contrib = " \ | |||
21 | xilinx \ | 21 | xilinx \ |
22 | " | 22 | " |
23 | 23 | ||
24 | LAYERSERIES_COMPAT_xilinx-contrib = "langdale" | 24 | LAYERSERIES_COMPAT_xilinx-contrib = "mickledore" |
diff --git a/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend b/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend new file mode 100644 index 00000000..4653c93a --- /dev/null +++ b/meta-xilinx-contrib/recipes-bsp/bitstream/bitstream-extraction_%.bbappend | |||
@@ -0,0 +1,2 @@ | |||
1 | COMPATIBLE_MACHINE:zybo-linux-bd-zynq7 = "^$" | ||
2 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch new file mode 100644 index 00000000..660bc218 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch | |||
@@ -0,0 +1,305 @@ | |||
1 | From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:14:13 +1000 | ||
4 | Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards | ||
5 | |||
6 | Add the dglnt_encoder driver that enables DRM support for the VGA and | ||
7 | HDMI output ports found on many Digilent boards. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
12 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
13 | --- | ||
14 | .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++ | ||
15 | drivers/gpu/drm/xilinx/Kconfig | 6 + | ||
16 | drivers/gpu/drm/xilinx/Makefile | 1 + | ||
17 | drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++ | ||
18 | 4 files changed, 247 insertions(+) | ||
19 | create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
20 | create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
21 | |||
22 | diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
23 | new file mode 100644 | ||
24 | index 0000000..242b24e | ||
25 | --- /dev/null | ||
26 | +++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
27 | @@ -0,0 +1,23 @@ | ||
28 | +Device-Tree bindings for Digilent DRM Encoder Slave | ||
29 | + | ||
30 | +This driver provides support for VGA and HDMI outputs on Digilent FPGA boards. | ||
31 | +The VGA or HDMI port must be connected to a Xilinx display pipeline via an | ||
32 | +axi2vid IP core. | ||
33 | + | ||
34 | +Required properties: | ||
35 | + - compatible: Should be "digilent,drm-encoder". | ||
36 | + | ||
37 | +Optional properties: | ||
38 | + - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video | ||
39 | + connector. This is used to obtain the supported resolutions | ||
40 | + of an attached monitor. If not defined, then a default | ||
41 | + set of resolutions is used and the display will initialize | ||
42 | + to 720p. Note most VGA connectors on Digilent boards do | ||
43 | + not have the DDC bus routed out. | ||
44 | + | ||
45 | +Example: | ||
46 | + | ||
47 | + encoder_0: digilent_encoder { | ||
48 | + compatible = "digilent,drm-encoder"; | ||
49 | + dglnt,edid-i2c = <&i2c1>; | ||
50 | + }; | ||
51 | diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig | ||
52 | index 57e18a9..d9ecff2 100644 | ||
53 | --- a/drivers/gpu/drm/xilinx/Kconfig | ||
54 | +++ b/drivers/gpu/drm/xilinx/Kconfig | ||
55 | @@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB | ||
56 | help | ||
57 | DRM driver for Xilinx Display Port Subsystem. | ||
58 | |||
59 | +config DRM_DIGILENT_ENCODER | ||
60 | + tristate "Digilent VGA/HDMI DRM Encoder Driver" | ||
61 | + depends on DRM_XILINX | ||
62 | + help | ||
63 | + DRM slave encoder for Video-out on Digilent boards. | ||
64 | + | ||
65 | config DRM_XILINX_DP_SUB_DEBUG_FS | ||
66 | bool "Xilinx DRM DPSUB debugfs" | ||
67 | depends on DEBUG_FS && DRM_XILINX_DP_SUB | ||
68 | diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile | ||
69 | index 19bc154..c2717e40 100644 | ||
70 | --- a/drivers/gpu/drm/xilinx/Makefile | ||
71 | +++ b/drivers/gpu/drm/xilinx/Makefile | ||
72 | @@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \ | ||
73 | xilinx_drm_plane.o | ||
74 | xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o | ||
75 | |||
76 | +obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o | ||
77 | obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o | ||
78 | obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o | ||
79 | obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o | ||
80 | diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
81 | new file mode 100644 | ||
82 | index 0000000..cb9fc7d | ||
83 | --- /dev/null | ||
84 | +++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
85 | @@ -0,0 +1,217 @@ | ||
86 | +/* | ||
87 | + * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards | ||
88 | + * | ||
89 | + * Copyright (C) 2015 Digilent | ||
90 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
91 | + * | ||
92 | + * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat. | ||
93 | + * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc. | ||
94 | + * | ||
95 | + * This software is licensed under the terms of the GNU General Public | ||
96 | + * License version 2, as published by the Free Software Foundation, and | ||
97 | + * may be copied, distributed, and modified under those terms. | ||
98 | + * | ||
99 | + * This program is distributed in the hope that it will be useful, | ||
100 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
101 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
102 | + * GNU General Public License for more details. | ||
103 | + */ | ||
104 | + | ||
105 | +#include <drm/drmP.h> | ||
106 | +#include <drm/drm_edid.h> | ||
107 | +#include <drm/drm_encoder_slave.h> | ||
108 | + | ||
109 | +#include <linux/device.h> | ||
110 | +#include <linux/module.h> | ||
111 | +#include <linux/err.h> | ||
112 | +#include <linux/i2c.h> | ||
113 | +#include <linux/of.h> | ||
114 | +#include <linux/of_platform.h> | ||
115 | +#include <linux/platform_device.h> | ||
116 | + | ||
117 | +#define DGLNT_ENC_MAX_FREQ 150000 | ||
118 | +#define DGLNT_ENC_MAX_H 1920 | ||
119 | +#define DGLNT_ENC_MAX_V 1080 | ||
120 | +#define DGLNT_ENC_PREF_H 1280 | ||
121 | +#define DGLNT_ENC_PREF_V 720 | ||
122 | + | ||
123 | +struct dglnt_encoder { | ||
124 | + struct drm_encoder *encoder; | ||
125 | + struct i2c_adapter *i2c_bus; | ||
126 | + bool i2c_present; | ||
127 | +}; | ||
128 | + | ||
129 | +static inline struct dglnt_encoder *to_dglnt_encoder( | ||
130 | + struct drm_encoder *encoder) | ||
131 | +{ | ||
132 | + return to_encoder_slave(encoder)->slave_priv; | ||
133 | +} | ||
134 | + | ||
135 | +static bool dglnt_mode_fixup(struct drm_encoder *encoder, | ||
136 | + const struct drm_display_mode *mode, | ||
137 | + struct drm_display_mode *adjusted_mode) | ||
138 | +{ | ||
139 | + return true; | ||
140 | +} | ||
141 | + | ||
142 | +static void dglnt_encoder_mode_set(struct drm_encoder *encoder, | ||
143 | + struct drm_display_mode *mode, | ||
144 | + struct drm_display_mode *adjusted_mode) | ||
145 | +{ | ||
146 | +} | ||
147 | + | ||
148 | +static void | ||
149 | +dglnt_encoder_dpms(struct drm_encoder *encoder, int mode) | ||
150 | +{ | ||
151 | +} | ||
152 | + | ||
153 | +static void dglnt_encoder_save(struct drm_encoder *encoder) | ||
154 | +{ | ||
155 | +} | ||
156 | + | ||
157 | +static void dglnt_encoder_restore(struct drm_encoder *encoder) | ||
158 | +{ | ||
159 | +} | ||
160 | + | ||
161 | +static int dglnt_encoder_mode_valid(struct drm_encoder *encoder, | ||
162 | + struct drm_display_mode *mode) | ||
163 | +{ | ||
164 | + if (mode && | ||
165 | + !(mode->flags & ((DRM_MODE_FLAG_INTERLACE | | ||
166 | + DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) && | ||
167 | + (mode->clock <= DGLNT_ENC_MAX_FREQ) && | ||
168 | + (mode->hdisplay <= DGLNT_ENC_MAX_H) && | ||
169 | + (mode->vdisplay <= DGLNT_ENC_MAX_V)) | ||
170 | + return MODE_OK; | ||
171 | + return MODE_BAD; | ||
172 | +} | ||
173 | + | ||
174 | +static int dglnt_encoder_get_modes(struct drm_encoder *encoder, | ||
175 | + struct drm_connector *connector) | ||
176 | +{ | ||
177 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
178 | + struct edid *edid; | ||
179 | + int num_modes = 0; | ||
180 | + | ||
181 | + if (dglnt->i2c_present) { | ||
182 | + edid = drm_get_edid(connector, dglnt->i2c_bus); | ||
183 | + drm_connector_update_edid_property(connector, edid); | ||
184 | + if (edid) { | ||
185 | + num_modes = drm_add_edid_modes(connector, edid); | ||
186 | + kfree(edid); | ||
187 | + } | ||
188 | + } else { | ||
189 | + num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H, | ||
190 | + DGLNT_ENC_MAX_V); | ||
191 | + drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H, | ||
192 | + DGLNT_ENC_PREF_V); | ||
193 | + } | ||
194 | + return num_modes; | ||
195 | +} | ||
196 | + | ||
197 | +static enum drm_connector_status dglnt_encoder_detect( | ||
198 | + struct drm_encoder *encoder, | ||
199 | + struct drm_connector *connector) | ||
200 | +{ | ||
201 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
202 | + | ||
203 | + if (dglnt->i2c_present) { | ||
204 | + if (drm_probe_ddc(dglnt->i2c_bus)) | ||
205 | + return connector_status_connected; | ||
206 | + return connector_status_disconnected; | ||
207 | + } else | ||
208 | + return connector_status_unknown; | ||
209 | +} | ||
210 | + | ||
211 | +static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = { | ||
212 | + .dpms = dglnt_encoder_dpms, | ||
213 | + .save = dglnt_encoder_save, | ||
214 | + .restore = dglnt_encoder_restore, | ||
215 | + .mode_fixup = dglnt_mode_fixup, | ||
216 | + .mode_valid = dglnt_encoder_mode_valid, | ||
217 | + .mode_set = dglnt_encoder_mode_set, | ||
218 | + .detect = dglnt_encoder_detect, | ||
219 | + .get_modes = dglnt_encoder_get_modes, | ||
220 | +}; | ||
221 | + | ||
222 | +static int dglnt_encoder_encoder_init(struct platform_device *pdev, | ||
223 | + struct drm_device *dev, | ||
224 | + struct drm_encoder_slave *encoder) | ||
225 | +{ | ||
226 | + struct dglnt_encoder *dglnt = platform_get_drvdata(pdev); | ||
227 | + struct device_node *sub_node; | ||
228 | + | ||
229 | + encoder->slave_priv = dglnt; | ||
230 | + encoder->slave_funcs = &dglnt_encoder_slave_funcs; | ||
231 | + | ||
232 | + dglnt->encoder = &encoder->base; | ||
233 | + | ||
234 | + /* get i2c adapter for edid */ | ||
235 | + dglnt->i2c_present = false; | ||
236 | + sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0); | ||
237 | + if (sub_node) { | ||
238 | + dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node); | ||
239 | + if (!dglnt->i2c_bus) | ||
240 | + DRM_INFO("failed to get the edid i2c adapter, using default modes\n"); | ||
241 | + else | ||
242 | + dglnt->i2c_present = true; | ||
243 | + of_node_put(sub_node); | ||
244 | + } | ||
245 | + | ||
246 | + return 0; | ||
247 | +} | ||
248 | + | ||
249 | +static int dglnt_encoder_probe(struct platform_device *pdev) | ||
250 | +{ | ||
251 | + struct dglnt_encoder *dglnt; | ||
252 | + | ||
253 | + dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL); | ||
254 | + if (!dglnt) | ||
255 | + return -ENOMEM; | ||
256 | + | ||
257 | + platform_set_drvdata(pdev, dglnt); | ||
258 | + | ||
259 | + return 0; | ||
260 | +} | ||
261 | + | ||
262 | +static int dglnt_encoder_remove(struct platform_device *pdev) | ||
263 | +{ | ||
264 | + return 0; | ||
265 | +} | ||
266 | + | ||
267 | +static const struct of_device_id dglnt_encoder_of_match[] = { | ||
268 | + { .compatible = "digilent,drm-encoder", }, | ||
269 | + { /* end of table */ }, | ||
270 | +}; | ||
271 | +MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match); | ||
272 | + | ||
273 | +static struct drm_platform_encoder_driver dglnt_encoder_driver = { | ||
274 | + .platform_driver = { | ||
275 | + .probe = dglnt_encoder_probe, | ||
276 | + .remove = dglnt_encoder_remove, | ||
277 | + .driver = { | ||
278 | + .owner = THIS_MODULE, | ||
279 | + .name = "dglnt-drm-enc", | ||
280 | + .of_match_table = dglnt_encoder_of_match, | ||
281 | + }, | ||
282 | + }, | ||
283 | + | ||
284 | + .encoder_init = dglnt_encoder_encoder_init, | ||
285 | +}; | ||
286 | + | ||
287 | +static int __init dglnt_encoder_init(void) | ||
288 | +{ | ||
289 | + return platform_driver_register(&dglnt_encoder_driver.platform_driver); | ||
290 | +} | ||
291 | + | ||
292 | +static void __exit dglnt_encoder_exit(void) | ||
293 | +{ | ||
294 | + platform_driver_unregister(&dglnt_encoder_driver.platform_driver); | ||
295 | +} | ||
296 | + | ||
297 | +module_init(dglnt_encoder_init); | ||
298 | +module_exit(dglnt_encoder_exit); | ||
299 | + | ||
300 | +MODULE_AUTHOR("Digilent, Inc."); | ||
301 | +MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards"); | ||
302 | +MODULE_LICENSE("GPL v2"); | ||
303 | -- | ||
304 | 2.7.4 | ||
305 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch new file mode 100644 index 00000000..9b6229db --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch | |||
@@ -0,0 +1,607 @@ | |||
1 | From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:16:06 +1000 | ||
4 | Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core | ||
5 | |||
6 | Add support for the axi_dynclk IP Core available from Digilent. This IP | ||
7 | core dynamically configures the clock resources inside a Xilinx FPGA to | ||
8 | generate a clock with a software programmable frequency. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
13 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
14 | --- | ||
15 | drivers/clk/Kconfig | 8 + | ||
16 | drivers/clk/Makefile | 1 + | ||
17 | drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++ | ||
18 | 3 files changed, 556 insertions(+) | ||
19 | create mode 100644 drivers/clk/clk-dglnt-dynclk.c | ||
20 | |||
21 | diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig | ||
22 | index dccb111100..7fe65a702b 100644 | ||
23 | --- a/drivers/clk/Kconfig | ||
24 | +++ b/drivers/clk/Kconfig | ||
25 | @@ -148,6 +148,14 @@ config CLK_QORIQ | ||
26 | This adds the clock driver support for Freescale QorIQ platforms | ||
27 | using common clock framework. | ||
28 | |||
29 | +config COMMON_CLK_DGLNT_DYNCLK | ||
30 | + tristate "Digilent axi_dynclk Driver" | ||
31 | + depends on ARCH_ZYNQ || MICROBLAZE | ||
32 | + help | ||
33 | + ---help--- | ||
34 | + Support for the Digilent AXI Dynamic Clock core for Xilinx | ||
35 | + FPGAs. | ||
36 | + | ||
37 | config COMMON_CLK_XGENE | ||
38 | bool "Clock driver for APM XGene SoC" | ||
39 | default y | ||
40 | diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile | ||
41 | index 0760449dde..45ce97d053 100644 | ||
42 | --- a/drivers/clk/Makefile | ||
43 | +++ b/drivers/clk/Makefile | ||
44 | @@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o | ||
45 | obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o | ||
46 | obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o | ||
47 | obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o | ||
48 | +obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o | ||
49 | obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o | ||
50 | obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o | ||
51 | obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o | ||
52 | diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c | ||
53 | new file mode 100644 | ||
54 | index 0000000000..496ad5fc90 | ||
55 | --- /dev/null | ||
56 | +++ b/drivers/clk/clk-dglnt-dynclk.c | ||
57 | @@ -0,0 +1,547 @@ | ||
58 | +/* | ||
59 | + * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver | ||
60 | + * | ||
61 | + * Copyright (C) 2015 Digilent | ||
62 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
63 | + * | ||
64 | + * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc. | ||
65 | + * | ||
66 | + * This software is licensed under the terms of the GNU General Public | ||
67 | + * License version 2, as published by the Free Software Foundation, and | ||
68 | + * may be copied, distributed, and modified under those terms. | ||
69 | + * | ||
70 | + * This program is distributed in the hope that it will be useful, | ||
71 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
72 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
73 | + * GNU General Public License for more details. | ||
74 | + */ | ||
75 | + | ||
76 | +#include <linux/platform_device.h> | ||
77 | +#include <linux/clk-provider.h> | ||
78 | +#include <linux/clk.h> | ||
79 | +#include <linux/slab.h> | ||
80 | +#include <linux/io.h> | ||
81 | +#include <linux/of.h> | ||
82 | +#include <linux/module.h> | ||
83 | +#include <linux/err.h> | ||
84 | +#include <linux/kernel.h> | ||
85 | + | ||
86 | +#define CLK_BIT_WEDGE 13 | ||
87 | +#define CLK_BIT_NOCOUNT 12 | ||
88 | + | ||
89 | +/* This value is used to signal an error */ | ||
90 | +#define ERR_CLKCOUNTCALC 0xFFFFFFFF | ||
91 | +#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT) | ||
92 | + | ||
93 | +#define DYNCLK_DIV_1_REGMASK 0x1041 | ||
94 | +/* 25 MHz (125 KHz / 5) */ | ||
95 | +#define DYNCLK_DEFAULT_FREQ 125000 | ||
96 | + | ||
97 | +#define MMCM_FREQ_VCOMIN 600000 | ||
98 | +#define MMCM_FREQ_VCOMAX 1200000 | ||
99 | +#define MMCM_FREQ_PFDMIN 10000 | ||
100 | +#define MMCM_FREQ_PFDMAX 450000 | ||
101 | +#define MMCM_FREQ_OUTMIN 4000 | ||
102 | +#define MMCM_FREQ_OUTMAX 800000 | ||
103 | +#define MMCM_DIV_MAX 106 | ||
104 | +#define MMCM_FB_MIN 2 | ||
105 | +#define MMCM_FB_MAX 64 | ||
106 | +#define MMCM_CLKDIV_MAX 128 | ||
107 | +#define MMCM_CLKDIV_MIN 1 | ||
108 | + | ||
109 | +#define OFST_DISPLAY_CTRL 0x0 | ||
110 | +#define OFST_DISPLAY_STATUS 0x4 | ||
111 | +#define OFST_DISPLAY_CLK_L 0x8 | ||
112 | +#define OFST_DISPLAY_FB_L 0x0C | ||
113 | +#define OFST_DISPLAY_FB_H_CLK_H 0x10 | ||
114 | +#define OFST_DISPLAY_DIV 0x14 | ||
115 | +#define OFST_DISPLAY_LOCK_L 0x18 | ||
116 | +#define OFST_DISPLAY_FLTR_LOCK_H 0x1C | ||
117 | + | ||
118 | +static const u64 lock_lookup[64] = { | ||
119 | + 0b0011000110111110100011111010010000000001, | ||
120 | + 0b0011000110111110100011111010010000000001, | ||
121 | + 0b0100001000111110100011111010010000000001, | ||
122 | + 0b0101101011111110100011111010010000000001, | ||
123 | + 0b0111001110111110100011111010010000000001, | ||
124 | + 0b1000110001111110100011111010010000000001, | ||
125 | + 0b1001110011111110100011111010010000000001, | ||
126 | + 0b1011010110111110100011111010010000000001, | ||
127 | + 0b1100111001111110100011111010010000000001, | ||
128 | + 0b1110011100111110100011111010010000000001, | ||
129 | + 0b1111111111111000010011111010010000000001, | ||
130 | + 0b1111111111110011100111111010010000000001, | ||
131 | + 0b1111111111101110111011111010010000000001, | ||
132 | + 0b1111111111101011110011111010010000000001, | ||
133 | + 0b1111111111101000101011111010010000000001, | ||
134 | + 0b1111111111100111000111111010010000000001, | ||
135 | + 0b1111111111100011111111111010010000000001, | ||
136 | + 0b1111111111100010011011111010010000000001, | ||
137 | + 0b1111111111100000110111111010010000000001, | ||
138 | + 0b1111111111011111010011111010010000000001, | ||
139 | + 0b1111111111011101101111111010010000000001, | ||
140 | + 0b1111111111011100001011111010010000000001, | ||
141 | + 0b1111111111011010100111111010010000000001, | ||
142 | + 0b1111111111011001000011111010010000000001, | ||
143 | + 0b1111111111011001000011111010010000000001, | ||
144 | + 0b1111111111010111011111111010010000000001, | ||
145 | + 0b1111111111010101111011111010010000000001, | ||
146 | + 0b1111111111010101111011111010010000000001, | ||
147 | + 0b1111111111010100010111111010010000000001, | ||
148 | + 0b1111111111010100010111111010010000000001, | ||
149 | + 0b1111111111010010110011111010010000000001, | ||
150 | + 0b1111111111010010110011111010010000000001, | ||
151 | + 0b1111111111010010110011111010010000000001, | ||
152 | + 0b1111111111010001001111111010010000000001, | ||
153 | + 0b1111111111010001001111111010010000000001, | ||
154 | + 0b1111111111010001001111111010010000000001, | ||
155 | + 0b1111111111001111101011111010010000000001, | ||
156 | + 0b1111111111001111101011111010010000000001, | ||
157 | + 0b1111111111001111101011111010010000000001, | ||
158 | + 0b1111111111001111101011111010010000000001, | ||
159 | + 0b1111111111001111101011111010010000000001, | ||
160 | + 0b1111111111001111101011111010010000000001, | ||
161 | + 0b1111111111001111101011111010010000000001, | ||
162 | + 0b1111111111001111101011111010010000000001, | ||
163 | + 0b1111111111001111101011111010010000000001, | ||
164 | + 0b1111111111001111101011111010010000000001, | ||
165 | + 0b1111111111001111101011111010010000000001, | ||
166 | + 0b1111111111001111101011111010010000000001, | ||
167 | + 0b1111111111001111101011111010010000000001, | ||
168 | + 0b1111111111001111101011111010010000000001, | ||
169 | + 0b1111111111001111101011111010010000000001, | ||
170 | + 0b1111111111001111101011111010010000000001, | ||
171 | + 0b1111111111001111101011111010010000000001, | ||
172 | + 0b1111111111001111101011111010010000000001, | ||
173 | + 0b1111111111001111101011111010010000000001, | ||
174 | + 0b1111111111001111101011111010010000000001, | ||
175 | + 0b1111111111001111101011111010010000000001, | ||
176 | + 0b1111111111001111101011111010010000000001, | ||
177 | + 0b1111111111001111101011111010010000000001, | ||
178 | + 0b1111111111001111101011111010010000000001, | ||
179 | + 0b1111111111001111101011111010010000000001, | ||
180 | + 0b1111111111001111101011111010010000000001, | ||
181 | + 0b1111111111001111101011111010010000000001, | ||
182 | + 0b1111111111001111101011111010010000000001 | ||
183 | +}; | ||
184 | + | ||
185 | +static const u32 filter_lookup_low[64] = { | ||
186 | + 0b0001011111, | ||
187 | + 0b0001010111, | ||
188 | + 0b0001111011, | ||
189 | + 0b0001011011, | ||
190 | + 0b0001101011, | ||
191 | + 0b0001110011, | ||
192 | + 0b0001110011, | ||
193 | + 0b0001110011, | ||
194 | + 0b0001110011, | ||
195 | + 0b0001001011, | ||
196 | + 0b0001001011, | ||
197 | + 0b0001001011, | ||
198 | + 0b0010110011, | ||
199 | + 0b0001010011, | ||
200 | + 0b0001010011, | ||
201 | + 0b0001010011, | ||
202 | + 0b0001010011, | ||
203 | + 0b0001010011, | ||
204 | + 0b0001010011, | ||
205 | + 0b0001010011, | ||
206 | + 0b0001010011, | ||
207 | + 0b0001010011, | ||
208 | + 0b0001010011, | ||
209 | + 0b0001100011, | ||
210 | + 0b0001100011, | ||
211 | + 0b0001100011, | ||
212 | + 0b0001100011, | ||
213 | + 0b0001100011, | ||
214 | + 0b0001100011, | ||
215 | + 0b0001100011, | ||
216 | + 0b0001100011, | ||
217 | + 0b0001100011, | ||
218 | + 0b0001100011, | ||
219 | + 0b0001100011, | ||
220 | + 0b0001100011, | ||
221 | + 0b0001100011, | ||
222 | + 0b0001100011, | ||
223 | + 0b0010010011, | ||
224 | + 0b0010010011, | ||
225 | + 0b0010010011, | ||
226 | + 0b0010010011, | ||
227 | + 0b0010010011, | ||
228 | + 0b0010010011, | ||
229 | + 0b0010010011, | ||
230 | + 0b0010010011, | ||
231 | + 0b0010010011, | ||
232 | + 0b0010010011, | ||
233 | + 0b0010100011, | ||
234 | + 0b0010100011, | ||
235 | + 0b0010100011, | ||
236 | + 0b0010100011, | ||
237 | + 0b0010100011, | ||
238 | + 0b0010100011, | ||
239 | + 0b0010100011, | ||
240 | + 0b0010100011, | ||
241 | + 0b0010100011, | ||
242 | + 0b0010100011, | ||
243 | + 0b0010100011, | ||
244 | + 0b0010100011, | ||
245 | + 0b0010100011, | ||
246 | + 0b0010100011, | ||
247 | + 0b0010100011, | ||
248 | + 0b0010100011, | ||
249 | + 0b0010100011 | ||
250 | +}; | ||
251 | + | ||
252 | +struct dglnt_dynclk_reg; | ||
253 | +struct dglnt_dynclk_mode; | ||
254 | +struct dglnt_dynclk; | ||
255 | + | ||
256 | +struct dglnt_dynclk_reg { | ||
257 | + u32 clk0L; | ||
258 | + u32 clkFBL; | ||
259 | + u32 clkFBH_clk0H; | ||
260 | + u32 divclk; | ||
261 | + u32 lockL; | ||
262 | + u32 fltr_lockH; | ||
263 | +}; | ||
264 | + | ||
265 | +struct dglnt_dynclk_mode { | ||
266 | + u32 freq; | ||
267 | + u32 fbmult; | ||
268 | + u32 clkdiv; | ||
269 | + u32 maindiv; | ||
270 | +}; | ||
271 | + | ||
272 | +struct dglnt_dynclk { | ||
273 | + void __iomem *base; | ||
274 | + struct clk_hw clk_hw; | ||
275 | + unsigned long freq; | ||
276 | +}; | ||
277 | + | ||
278 | +u32 dglnt_dynclk_divider(u32 divide) | ||
279 | +{ | ||
280 | + u32 output = 0; | ||
281 | + u32 highTime = 0; | ||
282 | + u32 lowTime = 0; | ||
283 | + | ||
284 | + if ((divide < 1) || (divide > 128)) | ||
285 | + return ERR_CLKDIVIDER; | ||
286 | + | ||
287 | + if (divide == 1) | ||
288 | + return DYNCLK_DIV_1_REGMASK; | ||
289 | + | ||
290 | + highTime = divide / 2; | ||
291 | + /* if divide is odd */ | ||
292 | + if (divide & 0x1) { | ||
293 | + lowTime = highTime + 1; | ||
294 | + output = 1 << CLK_BIT_WEDGE; | ||
295 | + } else { | ||
296 | + lowTime = highTime; | ||
297 | + } | ||
298 | + | ||
299 | + output |= 0x03F & lowTime; | ||
300 | + output |= 0xFC0 & (highTime << 6); | ||
301 | + return output; | ||
302 | +} | ||
303 | + | ||
304 | +u32 dglnt_dynclk_count_calc(u32 divide) | ||
305 | +{ | ||
306 | + u32 output = 0; | ||
307 | + u32 divCalc = 0; | ||
308 | + | ||
309 | + divCalc = dglnt_dynclk_divider(divide); | ||
310 | + if (divCalc == ERR_CLKDIVIDER) | ||
311 | + output = ERR_CLKCOUNTCALC; | ||
312 | + else | ||
313 | + output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000); | ||
314 | + return output; | ||
315 | +} | ||
316 | + | ||
317 | + | ||
318 | +int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues, | ||
319 | + struct dglnt_dynclk_mode *clkParams) | ||
320 | +{ | ||
321 | + if ((clkParams->fbmult < 2) || clkParams->fbmult > 64) | ||
322 | + return -EINVAL; | ||
323 | + | ||
324 | + regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv); | ||
325 | + if (regValues->clk0L == ERR_CLKCOUNTCALC) | ||
326 | + return -EINVAL; | ||
327 | + | ||
328 | + regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult); | ||
329 | + if (regValues->clkFBL == ERR_CLKCOUNTCALC) | ||
330 | + return -EINVAL; | ||
331 | + | ||
332 | + regValues->clkFBH_clk0H = 0; | ||
333 | + | ||
334 | + regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv); | ||
335 | + if (regValues->divclk == ERR_CLKDIVIDER) | ||
336 | + return -EINVAL; | ||
337 | + | ||
338 | + regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] & | ||
339 | + 0xFFFFFFFF); | ||
340 | + | ||
341 | + regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >> | ||
342 | + 32) & 0x000000FF); | ||
343 | + regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] << | ||
344 | + 16) & 0x03FF0000); | ||
345 | + | ||
346 | + return 0; | ||
347 | +} | ||
348 | + | ||
349 | +void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues, | ||
350 | + void __iomem *baseaddr) | ||
351 | +{ | ||
352 | + writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L); | ||
353 | + writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L); | ||
354 | + writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H); | ||
355 | + writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV); | ||
356 | + writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L); | ||
357 | + writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H); | ||
358 | +} | ||
359 | + | ||
360 | +u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq, | ||
361 | + struct dglnt_dynclk_mode *bestPick) | ||
362 | +{ | ||
363 | + u32 bestError = MMCM_FREQ_OUTMAX; | ||
364 | + u32 curError; | ||
365 | + u32 curClkMult; | ||
366 | + u32 curFreq; | ||
367 | + u32 divVal; | ||
368 | + u32 curFb, curClkDiv; | ||
369 | + u32 minFb = 0; | ||
370 | + u32 maxFb = 0; | ||
371 | + u32 curDiv = 1; | ||
372 | + u32 maxDiv; | ||
373 | + bool freq_found = false; | ||
374 | + | ||
375 | + bestPick->freq = 0; | ||
376 | + if (parentFreq == 0) | ||
377 | + return 0; | ||
378 | + | ||
379 | + /* minimum frequency is actually dictated by VCOmin */ | ||
380 | + if (freq < MMCM_FREQ_OUTMIN) | ||
381 | + freq = MMCM_FREQ_OUTMIN; | ||
382 | + if (freq > MMCM_FREQ_OUTMAX) | ||
383 | + freq = MMCM_FREQ_OUTMAX; | ||
384 | + | ||
385 | + if (parentFreq > MMCM_FREQ_PFDMAX) | ||
386 | + curDiv = 2; | ||
387 | + maxDiv = parentFreq / MMCM_FREQ_PFDMIN; | ||
388 | + if (maxDiv > MMCM_DIV_MAX) | ||
389 | + maxDiv = MMCM_DIV_MAX; | ||
390 | + | ||
391 | + while (curDiv <= maxDiv && !freq_found) { | ||
392 | + minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq); | ||
393 | + maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq); | ||
394 | + if (maxFb > MMCM_FB_MAX) | ||
395 | + maxFb = MMCM_FB_MAX; | ||
396 | + if (minFb < MMCM_FB_MIN) | ||
397 | + minFb = MMCM_FB_MIN; | ||
398 | + | ||
399 | + divVal = curDiv * freq; | ||
400 | + /* | ||
401 | + * This multiplier is used to find the best clkDiv value for | ||
402 | + * each FB value | ||
403 | + */ | ||
404 | + curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal; | ||
405 | + | ||
406 | + curFb = minFb; | ||
407 | + while (curFb <= maxFb && !freq_found) { | ||
408 | + curClkDiv = ((curClkMult * curFb) + 500) / 1000; | ||
409 | + if (curClkDiv > MMCM_CLKDIV_MAX) | ||
410 | + curClkDiv = MMCM_CLKDIV_MAX; | ||
411 | + if (curClkDiv < MMCM_CLKDIV_MIN) | ||
412 | + curClkDiv = MMCM_CLKDIV_MIN; | ||
413 | + curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv); | ||
414 | + if (curFreq >= freq) | ||
415 | + curError = curFreq - freq; | ||
416 | + else | ||
417 | + curError = freq - curFreq; | ||
418 | + if (curError < bestError) { | ||
419 | + bestError = curError; | ||
420 | + bestPick->clkdiv = curClkDiv; | ||
421 | + bestPick->fbmult = curFb; | ||
422 | + bestPick->maindiv = curDiv; | ||
423 | + bestPick->freq = curFreq; | ||
424 | + } | ||
425 | + if (!curError) | ||
426 | + freq_found = true; | ||
427 | + curFb++; | ||
428 | + } | ||
429 | + curDiv++; | ||
430 | + } | ||
431 | + return bestPick->freq; | ||
432 | +} | ||
433 | + | ||
434 | +static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw) | ||
435 | +{ | ||
436 | + return container_of(clk_hw, struct dglnt_dynclk, clk_hw); | ||
437 | +} | ||
438 | + | ||
439 | + | ||
440 | +static int dglnt_dynclk_enable(struct clk_hw *clk_hw) | ||
441 | +{ | ||
442 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
443 | + unsigned int clock_state; | ||
444 | + | ||
445 | + if (dglnt_dynclk->freq) { | ||
446 | + writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
447 | + do { | ||
448 | + clock_state = readl(dglnt_dynclk->base + | ||
449 | + OFST_DISPLAY_STATUS); | ||
450 | + } while (!clock_state); | ||
451 | + } | ||
452 | + return 0; | ||
453 | +} | ||
454 | + | ||
455 | +static void dglnt_dynclk_disable(struct clk_hw *clk_hw) | ||
456 | +{ | ||
457 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
458 | + | ||
459 | + writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
460 | +} | ||
461 | + | ||
462 | +static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw, | ||
463 | + unsigned long rate, unsigned long parent_rate) | ||
464 | +{ | ||
465 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
466 | + struct dglnt_dynclk_reg clkReg; | ||
467 | + struct dglnt_dynclk_mode clkMode; | ||
468 | + | ||
469 | + if (parent_rate == 0 || rate == 0) | ||
470 | + return -EINVAL; | ||
471 | + if (rate == dglnt_dynclk->freq) | ||
472 | + return 0; | ||
473 | + | ||
474 | + /* | ||
475 | + * Convert from Hz to KHz, then multiply by five to account for | ||
476 | + * BUFR division | ||
477 | + */ | ||
478 | + rate = (rate + 100) / 200; | ||
479 | + /* convert from Hz to KHz */ | ||
480 | + parent_rate = (parent_rate + 500) / 1000; | ||
481 | + if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode)) | ||
482 | + return -EINVAL; | ||
483 | + | ||
484 | + /* | ||
485 | + * Write to the PLL dynamic configuration registers to configure it | ||
486 | + * with the calculated parameters. | ||
487 | + */ | ||
488 | + dglnt_dynclk_find_reg(&clkReg, &clkMode); | ||
489 | + dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base); | ||
490 | + dglnt_dynclk->freq = clkMode.freq * 200; | ||
491 | + dglnt_dynclk_disable(clk_hw); | ||
492 | + dglnt_dynclk_enable(clk_hw); | ||
493 | + | ||
494 | + return 0; | ||
495 | +} | ||
496 | + | ||
497 | +static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
498 | + unsigned long *parent_rate) | ||
499 | +{ | ||
500 | + struct dglnt_dynclk_mode clkMode; | ||
501 | + | ||
502 | + dglnt_dynclk_find_mode(((rate + 100) / 200), | ||
503 | + ((*parent_rate) + 500) / 1000, &clkMode); | ||
504 | + | ||
505 | + return (clkMode.freq * 200); | ||
506 | +} | ||
507 | + | ||
508 | +static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw, | ||
509 | + unsigned long parent_rate) | ||
510 | +{ | ||
511 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
512 | + | ||
513 | + return dglnt_dynclk->freq; | ||
514 | +} | ||
515 | + | ||
516 | + | ||
517 | +static const struct clk_ops dglnt_dynclk_ops = { | ||
518 | + .recalc_rate = dglnt_dynclk_recalc_rate, | ||
519 | + .round_rate = dglnt_dynclk_round_rate, | ||
520 | + .set_rate = dglnt_dynclk_set_rate, | ||
521 | + .enable = dglnt_dynclk_enable, | ||
522 | + .disable = dglnt_dynclk_disable, | ||
523 | +}; | ||
524 | + | ||
525 | +static const struct of_device_id dglnt_dynclk_ids[] = { | ||
526 | + { .compatible = "digilent,axi-dynclk", }, | ||
527 | + { }, | ||
528 | +}; | ||
529 | +MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids); | ||
530 | + | ||
531 | +static int dglnt_dynclk_probe(struct platform_device *pdev) | ||
532 | +{ | ||
533 | + const struct of_device_id *id; | ||
534 | + struct dglnt_dynclk *dglnt_dynclk; | ||
535 | + struct clk_init_data init; | ||
536 | + const char *parent_name; | ||
537 | + const char *clk_name; | ||
538 | + struct resource *mem; | ||
539 | + struct clk *clk; | ||
540 | + | ||
541 | + if (!pdev->dev.of_node) | ||
542 | + return -ENODEV; | ||
543 | + | ||
544 | + id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node); | ||
545 | + if (!id) | ||
546 | + return -ENODEV; | ||
547 | + | ||
548 | + dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk), | ||
549 | + GFP_KERNEL); | ||
550 | + if (!dglnt_dynclk) | ||
551 | + return -ENOMEM; | ||
552 | + | ||
553 | + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
554 | + dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem); | ||
555 | + if (IS_ERR(dglnt_dynclk->base)) | ||
556 | + return PTR_ERR(dglnt_dynclk->base); | ||
557 | + | ||
558 | + parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0); | ||
559 | + if (!parent_name) | ||
560 | + return -EINVAL; | ||
561 | + | ||
562 | + clk_name = pdev->dev.of_node->name; | ||
563 | + of_property_read_string(pdev->dev.of_node, "clock-output-names", | ||
564 | + &clk_name); | ||
565 | + | ||
566 | + init.name = clk_name; | ||
567 | + init.ops = &dglnt_dynclk_ops; | ||
568 | + init.flags = 0; | ||
569 | + init.parent_names = &parent_name; | ||
570 | + init.num_parents = 1; | ||
571 | + | ||
572 | + dglnt_dynclk->freq = 0; | ||
573 | + dglnt_dynclk_disable(&dglnt_dynclk->clk_hw); | ||
574 | + | ||
575 | + dglnt_dynclk->clk_hw.init = &init; | ||
576 | + clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw); | ||
577 | + if (IS_ERR(clk)) | ||
578 | + return PTR_ERR(clk); | ||
579 | + | ||
580 | + return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, | ||
581 | + clk); | ||
582 | +} | ||
583 | + | ||
584 | +static int dglnt_dynclk_remove(struct platform_device *pdev) | ||
585 | +{ | ||
586 | + of_clk_del_provider(pdev->dev.of_node); | ||
587 | + | ||
588 | + return 0; | ||
589 | +} | ||
590 | + | ||
591 | +static struct platform_driver dglnt_dynclk_driver = { | ||
592 | + .driver = { | ||
593 | + .name = "dglnt-dynclk", | ||
594 | + .owner = THIS_MODULE, | ||
595 | + .of_match_table = dglnt_dynclk_ids, | ||
596 | + }, | ||
597 | + .probe = dglnt_dynclk_probe, | ||
598 | + .remove = dglnt_dynclk_remove, | ||
599 | +}; | ||
600 | +module_platform_driver(dglnt_dynclk_driver); | ||
601 | + | ||
602 | +MODULE_LICENSE("GPL v2"); | ||
603 | +MODULE_AUTHOR("Sam Bobrowicz <sbobrowicz@digilentinc.com>"); | ||
604 | +MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core"); | ||
605 | -- | ||
606 | 2.14.2 | ||
607 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch new file mode 100644 index 00000000..a98d84c5 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Mon, 2 May 2016 23:46:42 +1000 | ||
4 | Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on | ||
5 | |||
6 | Fix the issues where the VTC is reset (losing its timing config). | ||
7 | |||
8 | Also fix the issue where the plane destroys its DMA descriptors and | ||
9 | marks the DMA channels as inactive but never recreates the descriptors | ||
10 | and never updates the active state when turning DPMS back on. | ||
11 | |||
12 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
13 | Upstream-Status: Pending [This is a workaround] | ||
14 | --- | ||
15 | drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 - | ||
16 | drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++- | ||
17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
20 | index 631d35b921..93dbd4b58a 100644 | ||
21 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
22 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
23 | @@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms) | ||
24 | default: | ||
25 | if (crtc->vtc) { | ||
26 | xilinx_vtc_disable(crtc->vtc); | ||
27 | - xilinx_vtc_reset(crtc->vtc); | ||
28 | } | ||
29 | if (crtc->cresample) { | ||
30 | xilinx_cresample_disable(crtc->cresample); | ||
31 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
32 | index 6a248b72d4..d2518a4bdf 100644 | ||
33 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
34 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
35 | @@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
36 | for (i = 0; i < MAX_NUM_SUB_PLANES; i++) { | ||
37 | struct xilinx_drm_plane_dma *dma = &plane->dma[i]; | ||
38 | |||
39 | - if (dma->chan && dma->is_active) { | ||
40 | + if (dma->chan) { | ||
41 | flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; | ||
42 | desc = dmaengine_prep_interleaved_dma(dma->chan, | ||
43 | &dma->xt, | ||
44 | @@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
45 | dmaengine_submit(desc); | ||
46 | |||
47 | dma_async_issue_pending(dma->chan); | ||
48 | + dma->is_active = true; | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | -- | ||
53 | 2.14.2 | ||
54 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0004-minized-wifi-bluetooth.cfg b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0004-minized-wifi-bluetooth.cfg new file mode 100644 index 00000000..f71e53ab --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.1/0004-minized-wifi-bluetooth.cfg | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # Bluetooth config | ||
3 | # | ||
4 | CONFIG_BT=y | ||
5 | CONFIG_BT_BREDR=y | ||
6 | CONFIG_BT_HS=y | ||
7 | CONFIG_BT_LE=y | ||
8 | CONFIG_BT_BCM=y | ||
9 | CONFIG_BT_HCIUART=y | ||
10 | CONFIG_BT_HCIUART_H4=y | ||
11 | CONFIG_BT_HCIUART_BCM=y | ||
12 | CONFIG_BT_HIDP=y | ||
13 | CONFIG_CFG80211=y | ||
14 | CONFIG_CFG80211_DEFAULT_PS=y | ||
15 | CONFIG_CFG80211_CRDA_SUPPORT=y | ||
16 | CONFIG_BRCMUTIL=y | ||
17 | CONFIG_BRCMFMAC=y | ||
18 | CONFIG_BRCMFMAC_PROTO_BCDC=y | ||
19 | CONFIG_BRCMFMAC_SDIO=y | ||
20 | CONFIG_CRYPTO_BLKCIPHER=y | ||
21 | CONFIG_CRYPTO_MANAGER=y | ||
22 | CONFIG_CRYPTO_ECB=y | ||
23 | CONFIG_CRYPTO_CMAC=y | ||
24 | CONFIG_CRYPTO_SHA256=y | ||
25 | |||
26 | # | ||
27 | # Regulator config | ||
28 | # | ||
29 | CONFIG_REGMAP_IRQ=y | ||
30 | CONFIG_I2C_XILINX=y | ||
31 | CONFIG_MFD_DA9062=y | ||
32 | CONFIG_REGULATOR_DA9062=y | ||
33 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch new file mode 100644 index 00000000..660bc218 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch | |||
@@ -0,0 +1,305 @@ | |||
1 | From 21cc8144efdaa3cd8dbd7279f87b14fa3432fae4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:14:13 +1000 | ||
4 | Subject: [PATCH 1/3] drm: xilinx: Add encoder for Digilent boards | ||
5 | |||
6 | Add the dglnt_encoder driver that enables DRM support for the VGA and | ||
7 | HDMI output ports found on many Digilent boards. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
12 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
13 | --- | ||
14 | .../bindings/drm/xilinx/dglnt_encoder.txt | 23 +++ | ||
15 | drivers/gpu/drm/xilinx/Kconfig | 6 + | ||
16 | drivers/gpu/drm/xilinx/Makefile | 1 + | ||
17 | drivers/gpu/drm/xilinx/dglnt_encoder.c | 217 +++++++++++++++++++++ | ||
18 | 4 files changed, 247 insertions(+) | ||
19 | create mode 100644 Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
20 | create mode 100644 drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
21 | |||
22 | diff --git a/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
23 | new file mode 100644 | ||
24 | index 0000000..242b24e | ||
25 | --- /dev/null | ||
26 | +++ b/Documentation/devicetree/bindings/drm/xilinx/dglnt_encoder.txt | ||
27 | @@ -0,0 +1,23 @@ | ||
28 | +Device-Tree bindings for Digilent DRM Encoder Slave | ||
29 | + | ||
30 | +This driver provides support for VGA and HDMI outputs on Digilent FPGA boards. | ||
31 | +The VGA or HDMI port must be connected to a Xilinx display pipeline via an | ||
32 | +axi2vid IP core. | ||
33 | + | ||
34 | +Required properties: | ||
35 | + - compatible: Should be "digilent,drm-encoder". | ||
36 | + | ||
37 | +Optional properties: | ||
38 | + - dglnt,edid-i2c: The I2C device connected to the DDC bus on the video | ||
39 | + connector. This is used to obtain the supported resolutions | ||
40 | + of an attached monitor. If not defined, then a default | ||
41 | + set of resolutions is used and the display will initialize | ||
42 | + to 720p. Note most VGA connectors on Digilent boards do | ||
43 | + not have the DDC bus routed out. | ||
44 | + | ||
45 | +Example: | ||
46 | + | ||
47 | + encoder_0: digilent_encoder { | ||
48 | + compatible = "digilent,drm-encoder"; | ||
49 | + dglnt,edid-i2c = <&i2c1>; | ||
50 | + }; | ||
51 | diff --git a/drivers/gpu/drm/xilinx/Kconfig b/drivers/gpu/drm/xilinx/Kconfig | ||
52 | index 57e18a9..d9ecff2 100644 | ||
53 | --- a/drivers/gpu/drm/xilinx/Kconfig | ||
54 | +++ b/drivers/gpu/drm/xilinx/Kconfig | ||
55 | @@ -33,6 +33,12 @@ config DRM_XILINX_DP_SUB | ||
56 | help | ||
57 | DRM driver for Xilinx Display Port Subsystem. | ||
58 | |||
59 | +config DRM_DIGILENT_ENCODER | ||
60 | + tristate "Digilent VGA/HDMI DRM Encoder Driver" | ||
61 | + depends on DRM_XILINX | ||
62 | + help | ||
63 | + DRM slave encoder for Video-out on Digilent boards. | ||
64 | + | ||
65 | config DRM_XILINX_DP_SUB_DEBUG_FS | ||
66 | bool "Xilinx DRM DPSUB debugfs" | ||
67 | depends on DEBUG_FS && DRM_XILINX_DP_SUB | ||
68 | diff --git a/drivers/gpu/drm/xilinx/Makefile b/drivers/gpu/drm/xilinx/Makefile | ||
69 | index 19bc154..c2717e40 100644 | ||
70 | --- a/drivers/gpu/drm/xilinx/Makefile | ||
71 | +++ b/drivers/gpu/drm/xilinx/Makefile | ||
72 | @@ -7,6 +7,7 @@ xilinx_drm-y := xilinx_drm_crtc.o xilinx_drm_connector.o xilinx_drm_drv.o \ | ||
73 | xilinx_drm_plane.o | ||
74 | xilinx_drm-y += xilinx_cresample.o xilinx_osd.o xilinx_rgb2yuv.o xilinx_vtc.o | ||
75 | |||
76 | +obj-$(CONFIG_DRM_DIGILENT_ENCODER) += dglnt_encoder.o | ||
77 | obj-$(CONFIG_DRM_XILINX) += xilinx_drm.o | ||
78 | obj-$(CONFIG_DRM_XILINX_DP) += xilinx_drm_dp.o | ||
79 | obj-$(CONFIG_DRM_XILINX_DP_SUB) += xilinx_drm_dp_sub.o | ||
80 | diff --git a/drivers/gpu/drm/xilinx/dglnt_encoder.c b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
81 | new file mode 100644 | ||
82 | index 0000000..cb9fc7d | ||
83 | --- /dev/null | ||
84 | +++ b/drivers/gpu/drm/xilinx/dglnt_encoder.c | ||
85 | @@ -0,0 +1,217 @@ | ||
86 | +/* | ||
87 | + * dglnt_encoder.c - DRM slave encoder for Video-out on Digilent boards | ||
88 | + * | ||
89 | + * Copyright (C) 2015 Digilent | ||
90 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
91 | + * | ||
92 | + * Based on udl_encoder.c and udl_connector.c, Copyright (C) 2012 Red Hat. | ||
93 | + * Also based on xilinx_drm_dp.c, Copyright (C) 2014 Xilinx, Inc. | ||
94 | + * | ||
95 | + * This software is licensed under the terms of the GNU General Public | ||
96 | + * License version 2, as published by the Free Software Foundation, and | ||
97 | + * may be copied, distributed, and modified under those terms. | ||
98 | + * | ||
99 | + * This program is distributed in the hope that it will be useful, | ||
100 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
101 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
102 | + * GNU General Public License for more details. | ||
103 | + */ | ||
104 | + | ||
105 | +#include <drm/drmP.h> | ||
106 | +#include <drm/drm_edid.h> | ||
107 | +#include <drm/drm_encoder_slave.h> | ||
108 | + | ||
109 | +#include <linux/device.h> | ||
110 | +#include <linux/module.h> | ||
111 | +#include <linux/err.h> | ||
112 | +#include <linux/i2c.h> | ||
113 | +#include <linux/of.h> | ||
114 | +#include <linux/of_platform.h> | ||
115 | +#include <linux/platform_device.h> | ||
116 | + | ||
117 | +#define DGLNT_ENC_MAX_FREQ 150000 | ||
118 | +#define DGLNT_ENC_MAX_H 1920 | ||
119 | +#define DGLNT_ENC_MAX_V 1080 | ||
120 | +#define DGLNT_ENC_PREF_H 1280 | ||
121 | +#define DGLNT_ENC_PREF_V 720 | ||
122 | + | ||
123 | +struct dglnt_encoder { | ||
124 | + struct drm_encoder *encoder; | ||
125 | + struct i2c_adapter *i2c_bus; | ||
126 | + bool i2c_present; | ||
127 | +}; | ||
128 | + | ||
129 | +static inline struct dglnt_encoder *to_dglnt_encoder( | ||
130 | + struct drm_encoder *encoder) | ||
131 | +{ | ||
132 | + return to_encoder_slave(encoder)->slave_priv; | ||
133 | +} | ||
134 | + | ||
135 | +static bool dglnt_mode_fixup(struct drm_encoder *encoder, | ||
136 | + const struct drm_display_mode *mode, | ||
137 | + struct drm_display_mode *adjusted_mode) | ||
138 | +{ | ||
139 | + return true; | ||
140 | +} | ||
141 | + | ||
142 | +static void dglnt_encoder_mode_set(struct drm_encoder *encoder, | ||
143 | + struct drm_display_mode *mode, | ||
144 | + struct drm_display_mode *adjusted_mode) | ||
145 | +{ | ||
146 | +} | ||
147 | + | ||
148 | +static void | ||
149 | +dglnt_encoder_dpms(struct drm_encoder *encoder, int mode) | ||
150 | +{ | ||
151 | +} | ||
152 | + | ||
153 | +static void dglnt_encoder_save(struct drm_encoder *encoder) | ||
154 | +{ | ||
155 | +} | ||
156 | + | ||
157 | +static void dglnt_encoder_restore(struct drm_encoder *encoder) | ||
158 | +{ | ||
159 | +} | ||
160 | + | ||
161 | +static int dglnt_encoder_mode_valid(struct drm_encoder *encoder, | ||
162 | + struct drm_display_mode *mode) | ||
163 | +{ | ||
164 | + if (mode && | ||
165 | + !(mode->flags & ((DRM_MODE_FLAG_INTERLACE | | ||
166 | + DRM_MODE_FLAG_DBLCLK) | DRM_MODE_FLAG_3D_MASK)) && | ||
167 | + (mode->clock <= DGLNT_ENC_MAX_FREQ) && | ||
168 | + (mode->hdisplay <= DGLNT_ENC_MAX_H) && | ||
169 | + (mode->vdisplay <= DGLNT_ENC_MAX_V)) | ||
170 | + return MODE_OK; | ||
171 | + return MODE_BAD; | ||
172 | +} | ||
173 | + | ||
174 | +static int dglnt_encoder_get_modes(struct drm_encoder *encoder, | ||
175 | + struct drm_connector *connector) | ||
176 | +{ | ||
177 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
178 | + struct edid *edid; | ||
179 | + int num_modes = 0; | ||
180 | + | ||
181 | + if (dglnt->i2c_present) { | ||
182 | + edid = drm_get_edid(connector, dglnt->i2c_bus); | ||
183 | + drm_connector_update_edid_property(connector, edid); | ||
184 | + if (edid) { | ||
185 | + num_modes = drm_add_edid_modes(connector, edid); | ||
186 | + kfree(edid); | ||
187 | + } | ||
188 | + } else { | ||
189 | + num_modes = drm_add_modes_noedid(connector, DGLNT_ENC_MAX_H, | ||
190 | + DGLNT_ENC_MAX_V); | ||
191 | + drm_set_preferred_mode(connector, DGLNT_ENC_PREF_H, | ||
192 | + DGLNT_ENC_PREF_V); | ||
193 | + } | ||
194 | + return num_modes; | ||
195 | +} | ||
196 | + | ||
197 | +static enum drm_connector_status dglnt_encoder_detect( | ||
198 | + struct drm_encoder *encoder, | ||
199 | + struct drm_connector *connector) | ||
200 | +{ | ||
201 | + struct dglnt_encoder *dglnt = to_dglnt_encoder(encoder); | ||
202 | + | ||
203 | + if (dglnt->i2c_present) { | ||
204 | + if (drm_probe_ddc(dglnt->i2c_bus)) | ||
205 | + return connector_status_connected; | ||
206 | + return connector_status_disconnected; | ||
207 | + } else | ||
208 | + return connector_status_unknown; | ||
209 | +} | ||
210 | + | ||
211 | +static struct drm_encoder_slave_funcs dglnt_encoder_slave_funcs = { | ||
212 | + .dpms = dglnt_encoder_dpms, | ||
213 | + .save = dglnt_encoder_save, | ||
214 | + .restore = dglnt_encoder_restore, | ||
215 | + .mode_fixup = dglnt_mode_fixup, | ||
216 | + .mode_valid = dglnt_encoder_mode_valid, | ||
217 | + .mode_set = dglnt_encoder_mode_set, | ||
218 | + .detect = dglnt_encoder_detect, | ||
219 | + .get_modes = dglnt_encoder_get_modes, | ||
220 | +}; | ||
221 | + | ||
222 | +static int dglnt_encoder_encoder_init(struct platform_device *pdev, | ||
223 | + struct drm_device *dev, | ||
224 | + struct drm_encoder_slave *encoder) | ||
225 | +{ | ||
226 | + struct dglnt_encoder *dglnt = platform_get_drvdata(pdev); | ||
227 | + struct device_node *sub_node; | ||
228 | + | ||
229 | + encoder->slave_priv = dglnt; | ||
230 | + encoder->slave_funcs = &dglnt_encoder_slave_funcs; | ||
231 | + | ||
232 | + dglnt->encoder = &encoder->base; | ||
233 | + | ||
234 | + /* get i2c adapter for edid */ | ||
235 | + dglnt->i2c_present = false; | ||
236 | + sub_node = of_parse_phandle(pdev->dev.of_node, "dglnt,edid-i2c", 0); | ||
237 | + if (sub_node) { | ||
238 | + dglnt->i2c_bus = of_find_i2c_adapter_by_node(sub_node); | ||
239 | + if (!dglnt->i2c_bus) | ||
240 | + DRM_INFO("failed to get the edid i2c adapter, using default modes\n"); | ||
241 | + else | ||
242 | + dglnt->i2c_present = true; | ||
243 | + of_node_put(sub_node); | ||
244 | + } | ||
245 | + | ||
246 | + return 0; | ||
247 | +} | ||
248 | + | ||
249 | +static int dglnt_encoder_probe(struct platform_device *pdev) | ||
250 | +{ | ||
251 | + struct dglnt_encoder *dglnt; | ||
252 | + | ||
253 | + dglnt = devm_kzalloc(&pdev->dev, sizeof(*dglnt), GFP_KERNEL); | ||
254 | + if (!dglnt) | ||
255 | + return -ENOMEM; | ||
256 | + | ||
257 | + platform_set_drvdata(pdev, dglnt); | ||
258 | + | ||
259 | + return 0; | ||
260 | +} | ||
261 | + | ||
262 | +static int dglnt_encoder_remove(struct platform_device *pdev) | ||
263 | +{ | ||
264 | + return 0; | ||
265 | +} | ||
266 | + | ||
267 | +static const struct of_device_id dglnt_encoder_of_match[] = { | ||
268 | + { .compatible = "digilent,drm-encoder", }, | ||
269 | + { /* end of table */ }, | ||
270 | +}; | ||
271 | +MODULE_DEVICE_TABLE(of, dglnt_encoder_of_match); | ||
272 | + | ||
273 | +static struct drm_platform_encoder_driver dglnt_encoder_driver = { | ||
274 | + .platform_driver = { | ||
275 | + .probe = dglnt_encoder_probe, | ||
276 | + .remove = dglnt_encoder_remove, | ||
277 | + .driver = { | ||
278 | + .owner = THIS_MODULE, | ||
279 | + .name = "dglnt-drm-enc", | ||
280 | + .of_match_table = dglnt_encoder_of_match, | ||
281 | + }, | ||
282 | + }, | ||
283 | + | ||
284 | + .encoder_init = dglnt_encoder_encoder_init, | ||
285 | +}; | ||
286 | + | ||
287 | +static int __init dglnt_encoder_init(void) | ||
288 | +{ | ||
289 | + return platform_driver_register(&dglnt_encoder_driver.platform_driver); | ||
290 | +} | ||
291 | + | ||
292 | +static void __exit dglnt_encoder_exit(void) | ||
293 | +{ | ||
294 | + platform_driver_unregister(&dglnt_encoder_driver.platform_driver); | ||
295 | +} | ||
296 | + | ||
297 | +module_init(dglnt_encoder_init); | ||
298 | +module_exit(dglnt_encoder_exit); | ||
299 | + | ||
300 | +MODULE_AUTHOR("Digilent, Inc."); | ||
301 | +MODULE_DESCRIPTION("DRM slave encoder for Video-out on Digilent boards"); | ||
302 | +MODULE_LICENSE("GPL v2"); | ||
303 | -- | ||
304 | 2.7.4 | ||
305 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch new file mode 100644 index 00000000..9b6229db --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch | |||
@@ -0,0 +1,607 @@ | |||
1 | From 217e3b6f4393926b8dcad841381527ef3fc808c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wu <jason.wu.misc@gmail.com> | ||
3 | Date: Sun, 10 Apr 2016 13:16:06 +1000 | ||
4 | Subject: [PATCH 2/3] clk: Add driver for axi_dynclk IP Core | ||
5 | |||
6 | Add support for the axi_dynclk IP Core available from Digilent. This IP | ||
7 | core dynamically configures the clock resources inside a Xilinx FPGA to | ||
8 | generate a clock with a software programmable frequency. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
13 | Signed-off-by: Jason Wu <jason.wu.misc@gmail.com> | ||
14 | --- | ||
15 | drivers/clk/Kconfig | 8 + | ||
16 | drivers/clk/Makefile | 1 + | ||
17 | drivers/clk/clk-dglnt-dynclk.c | 547 +++++++++++++++++++++++++++++++++++++++++ | ||
18 | 3 files changed, 556 insertions(+) | ||
19 | create mode 100644 drivers/clk/clk-dglnt-dynclk.c | ||
20 | |||
21 | diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig | ||
22 | index dccb111100..7fe65a702b 100644 | ||
23 | --- a/drivers/clk/Kconfig | ||
24 | +++ b/drivers/clk/Kconfig | ||
25 | @@ -148,6 +148,14 @@ config CLK_QORIQ | ||
26 | This adds the clock driver support for Freescale QorIQ platforms | ||
27 | using common clock framework. | ||
28 | |||
29 | +config COMMON_CLK_DGLNT_DYNCLK | ||
30 | + tristate "Digilent axi_dynclk Driver" | ||
31 | + depends on ARCH_ZYNQ || MICROBLAZE | ||
32 | + help | ||
33 | + ---help--- | ||
34 | + Support for the Digilent AXI Dynamic Clock core for Xilinx | ||
35 | + FPGAs. | ||
36 | + | ||
37 | config COMMON_CLK_XGENE | ||
38 | bool "Clock driver for APM XGene SoC" | ||
39 | default y | ||
40 | diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile | ||
41 | index 0760449dde..45ce97d053 100644 | ||
42 | --- a/drivers/clk/Makefile | ||
43 | +++ b/drivers/clk/Makefile | ||
44 | @@ -24,6 +24,7 @@ obj-$(CONFIG_COMMON_CLK_CDCE706) += clk-cdce706.o | ||
45 | obj-$(CONFIG_COMMON_CLK_CDCE925) += clk-cdce925.o | ||
46 | obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o | ||
47 | obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o | ||
48 | +obj-$(CONFIG_COMMON_CLK_DGLNT_DYNCLK) += clk-dglnt-dynclk.o | ||
49 | obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o | ||
50 | obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o | ||
51 | obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o | ||
52 | diff --git a/drivers/clk/clk-dglnt-dynclk.c b/drivers/clk/clk-dglnt-dynclk.c | ||
53 | new file mode 100644 | ||
54 | index 0000000000..496ad5fc90 | ||
55 | --- /dev/null | ||
56 | +++ b/drivers/clk/clk-dglnt-dynclk.c | ||
57 | @@ -0,0 +1,547 @@ | ||
58 | +/* | ||
59 | + * clk-dglnt-dynclk.c - Digilent AXI Dynamic Clock (axi_dynclk) Driver | ||
60 | + * | ||
61 | + * Copyright (C) 2015 Digilent | ||
62 | + * Author: Sam Bobrowicz <sbobrowicz@digilentinc.com> | ||
63 | + * | ||
64 | + * Reused code from clk-axi-clkgen.c, Copyright (C) 2012-2013 Analog Devices Inc. | ||
65 | + * | ||
66 | + * This software is licensed under the terms of the GNU General Public | ||
67 | + * License version 2, as published by the Free Software Foundation, and | ||
68 | + * may be copied, distributed, and modified under those terms. | ||
69 | + * | ||
70 | + * This program is distributed in the hope that it will be useful, | ||
71 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
72 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
73 | + * GNU General Public License for more details. | ||
74 | + */ | ||
75 | + | ||
76 | +#include <linux/platform_device.h> | ||
77 | +#include <linux/clk-provider.h> | ||
78 | +#include <linux/clk.h> | ||
79 | +#include <linux/slab.h> | ||
80 | +#include <linux/io.h> | ||
81 | +#include <linux/of.h> | ||
82 | +#include <linux/module.h> | ||
83 | +#include <linux/err.h> | ||
84 | +#include <linux/kernel.h> | ||
85 | + | ||
86 | +#define CLK_BIT_WEDGE 13 | ||
87 | +#define CLK_BIT_NOCOUNT 12 | ||
88 | + | ||
89 | +/* This value is used to signal an error */ | ||
90 | +#define ERR_CLKCOUNTCALC 0xFFFFFFFF | ||
91 | +#define ERR_CLKDIVIDER (1 << CLK_BIT_WEDGE | 1 << CLK_BIT_NOCOUNT) | ||
92 | + | ||
93 | +#define DYNCLK_DIV_1_REGMASK 0x1041 | ||
94 | +/* 25 MHz (125 KHz / 5) */ | ||
95 | +#define DYNCLK_DEFAULT_FREQ 125000 | ||
96 | + | ||
97 | +#define MMCM_FREQ_VCOMIN 600000 | ||
98 | +#define MMCM_FREQ_VCOMAX 1200000 | ||
99 | +#define MMCM_FREQ_PFDMIN 10000 | ||
100 | +#define MMCM_FREQ_PFDMAX 450000 | ||
101 | +#define MMCM_FREQ_OUTMIN 4000 | ||
102 | +#define MMCM_FREQ_OUTMAX 800000 | ||
103 | +#define MMCM_DIV_MAX 106 | ||
104 | +#define MMCM_FB_MIN 2 | ||
105 | +#define MMCM_FB_MAX 64 | ||
106 | +#define MMCM_CLKDIV_MAX 128 | ||
107 | +#define MMCM_CLKDIV_MIN 1 | ||
108 | + | ||
109 | +#define OFST_DISPLAY_CTRL 0x0 | ||
110 | +#define OFST_DISPLAY_STATUS 0x4 | ||
111 | +#define OFST_DISPLAY_CLK_L 0x8 | ||
112 | +#define OFST_DISPLAY_FB_L 0x0C | ||
113 | +#define OFST_DISPLAY_FB_H_CLK_H 0x10 | ||
114 | +#define OFST_DISPLAY_DIV 0x14 | ||
115 | +#define OFST_DISPLAY_LOCK_L 0x18 | ||
116 | +#define OFST_DISPLAY_FLTR_LOCK_H 0x1C | ||
117 | + | ||
118 | +static const u64 lock_lookup[64] = { | ||
119 | + 0b0011000110111110100011111010010000000001, | ||
120 | + 0b0011000110111110100011111010010000000001, | ||
121 | + 0b0100001000111110100011111010010000000001, | ||
122 | + 0b0101101011111110100011111010010000000001, | ||
123 | + 0b0111001110111110100011111010010000000001, | ||
124 | + 0b1000110001111110100011111010010000000001, | ||
125 | + 0b1001110011111110100011111010010000000001, | ||
126 | + 0b1011010110111110100011111010010000000001, | ||
127 | + 0b1100111001111110100011111010010000000001, | ||
128 | + 0b1110011100111110100011111010010000000001, | ||
129 | + 0b1111111111111000010011111010010000000001, | ||
130 | + 0b1111111111110011100111111010010000000001, | ||
131 | + 0b1111111111101110111011111010010000000001, | ||
132 | + 0b1111111111101011110011111010010000000001, | ||
133 | + 0b1111111111101000101011111010010000000001, | ||
134 | + 0b1111111111100111000111111010010000000001, | ||
135 | + 0b1111111111100011111111111010010000000001, | ||
136 | + 0b1111111111100010011011111010010000000001, | ||
137 | + 0b1111111111100000110111111010010000000001, | ||
138 | + 0b1111111111011111010011111010010000000001, | ||
139 | + 0b1111111111011101101111111010010000000001, | ||
140 | + 0b1111111111011100001011111010010000000001, | ||
141 | + 0b1111111111011010100111111010010000000001, | ||
142 | + 0b1111111111011001000011111010010000000001, | ||
143 | + 0b1111111111011001000011111010010000000001, | ||
144 | + 0b1111111111010111011111111010010000000001, | ||
145 | + 0b1111111111010101111011111010010000000001, | ||
146 | + 0b1111111111010101111011111010010000000001, | ||
147 | + 0b1111111111010100010111111010010000000001, | ||
148 | + 0b1111111111010100010111111010010000000001, | ||
149 | + 0b1111111111010010110011111010010000000001, | ||
150 | + 0b1111111111010010110011111010010000000001, | ||
151 | + 0b1111111111010010110011111010010000000001, | ||
152 | + 0b1111111111010001001111111010010000000001, | ||
153 | + 0b1111111111010001001111111010010000000001, | ||
154 | + 0b1111111111010001001111111010010000000001, | ||
155 | + 0b1111111111001111101011111010010000000001, | ||
156 | + 0b1111111111001111101011111010010000000001, | ||
157 | + 0b1111111111001111101011111010010000000001, | ||
158 | + 0b1111111111001111101011111010010000000001, | ||
159 | + 0b1111111111001111101011111010010000000001, | ||
160 | + 0b1111111111001111101011111010010000000001, | ||
161 | + 0b1111111111001111101011111010010000000001, | ||
162 | + 0b1111111111001111101011111010010000000001, | ||
163 | + 0b1111111111001111101011111010010000000001, | ||
164 | + 0b1111111111001111101011111010010000000001, | ||
165 | + 0b1111111111001111101011111010010000000001, | ||
166 | + 0b1111111111001111101011111010010000000001, | ||
167 | + 0b1111111111001111101011111010010000000001, | ||
168 | + 0b1111111111001111101011111010010000000001, | ||
169 | + 0b1111111111001111101011111010010000000001, | ||
170 | + 0b1111111111001111101011111010010000000001, | ||
171 | + 0b1111111111001111101011111010010000000001, | ||
172 | + 0b1111111111001111101011111010010000000001, | ||
173 | + 0b1111111111001111101011111010010000000001, | ||
174 | + 0b1111111111001111101011111010010000000001, | ||
175 | + 0b1111111111001111101011111010010000000001, | ||
176 | + 0b1111111111001111101011111010010000000001, | ||
177 | + 0b1111111111001111101011111010010000000001, | ||
178 | + 0b1111111111001111101011111010010000000001, | ||
179 | + 0b1111111111001111101011111010010000000001, | ||
180 | + 0b1111111111001111101011111010010000000001, | ||
181 | + 0b1111111111001111101011111010010000000001, | ||
182 | + 0b1111111111001111101011111010010000000001 | ||
183 | +}; | ||
184 | + | ||
185 | +static const u32 filter_lookup_low[64] = { | ||
186 | + 0b0001011111, | ||
187 | + 0b0001010111, | ||
188 | + 0b0001111011, | ||
189 | + 0b0001011011, | ||
190 | + 0b0001101011, | ||
191 | + 0b0001110011, | ||
192 | + 0b0001110011, | ||
193 | + 0b0001110011, | ||
194 | + 0b0001110011, | ||
195 | + 0b0001001011, | ||
196 | + 0b0001001011, | ||
197 | + 0b0001001011, | ||
198 | + 0b0010110011, | ||
199 | + 0b0001010011, | ||
200 | + 0b0001010011, | ||
201 | + 0b0001010011, | ||
202 | + 0b0001010011, | ||
203 | + 0b0001010011, | ||
204 | + 0b0001010011, | ||
205 | + 0b0001010011, | ||
206 | + 0b0001010011, | ||
207 | + 0b0001010011, | ||
208 | + 0b0001010011, | ||
209 | + 0b0001100011, | ||
210 | + 0b0001100011, | ||
211 | + 0b0001100011, | ||
212 | + 0b0001100011, | ||
213 | + 0b0001100011, | ||
214 | + 0b0001100011, | ||
215 | + 0b0001100011, | ||
216 | + 0b0001100011, | ||
217 | + 0b0001100011, | ||
218 | + 0b0001100011, | ||
219 | + 0b0001100011, | ||
220 | + 0b0001100011, | ||
221 | + 0b0001100011, | ||
222 | + 0b0001100011, | ||
223 | + 0b0010010011, | ||
224 | + 0b0010010011, | ||
225 | + 0b0010010011, | ||
226 | + 0b0010010011, | ||
227 | + 0b0010010011, | ||
228 | + 0b0010010011, | ||
229 | + 0b0010010011, | ||
230 | + 0b0010010011, | ||
231 | + 0b0010010011, | ||
232 | + 0b0010010011, | ||
233 | + 0b0010100011, | ||
234 | + 0b0010100011, | ||
235 | + 0b0010100011, | ||
236 | + 0b0010100011, | ||
237 | + 0b0010100011, | ||
238 | + 0b0010100011, | ||
239 | + 0b0010100011, | ||
240 | + 0b0010100011, | ||
241 | + 0b0010100011, | ||
242 | + 0b0010100011, | ||
243 | + 0b0010100011, | ||
244 | + 0b0010100011, | ||
245 | + 0b0010100011, | ||
246 | + 0b0010100011, | ||
247 | + 0b0010100011, | ||
248 | + 0b0010100011, | ||
249 | + 0b0010100011 | ||
250 | +}; | ||
251 | + | ||
252 | +struct dglnt_dynclk_reg; | ||
253 | +struct dglnt_dynclk_mode; | ||
254 | +struct dglnt_dynclk; | ||
255 | + | ||
256 | +struct dglnt_dynclk_reg { | ||
257 | + u32 clk0L; | ||
258 | + u32 clkFBL; | ||
259 | + u32 clkFBH_clk0H; | ||
260 | + u32 divclk; | ||
261 | + u32 lockL; | ||
262 | + u32 fltr_lockH; | ||
263 | +}; | ||
264 | + | ||
265 | +struct dglnt_dynclk_mode { | ||
266 | + u32 freq; | ||
267 | + u32 fbmult; | ||
268 | + u32 clkdiv; | ||
269 | + u32 maindiv; | ||
270 | +}; | ||
271 | + | ||
272 | +struct dglnt_dynclk { | ||
273 | + void __iomem *base; | ||
274 | + struct clk_hw clk_hw; | ||
275 | + unsigned long freq; | ||
276 | +}; | ||
277 | + | ||
278 | +u32 dglnt_dynclk_divider(u32 divide) | ||
279 | +{ | ||
280 | + u32 output = 0; | ||
281 | + u32 highTime = 0; | ||
282 | + u32 lowTime = 0; | ||
283 | + | ||
284 | + if ((divide < 1) || (divide > 128)) | ||
285 | + return ERR_CLKDIVIDER; | ||
286 | + | ||
287 | + if (divide == 1) | ||
288 | + return DYNCLK_DIV_1_REGMASK; | ||
289 | + | ||
290 | + highTime = divide / 2; | ||
291 | + /* if divide is odd */ | ||
292 | + if (divide & 0x1) { | ||
293 | + lowTime = highTime + 1; | ||
294 | + output = 1 << CLK_BIT_WEDGE; | ||
295 | + } else { | ||
296 | + lowTime = highTime; | ||
297 | + } | ||
298 | + | ||
299 | + output |= 0x03F & lowTime; | ||
300 | + output |= 0xFC0 & (highTime << 6); | ||
301 | + return output; | ||
302 | +} | ||
303 | + | ||
304 | +u32 dglnt_dynclk_count_calc(u32 divide) | ||
305 | +{ | ||
306 | + u32 output = 0; | ||
307 | + u32 divCalc = 0; | ||
308 | + | ||
309 | + divCalc = dglnt_dynclk_divider(divide); | ||
310 | + if (divCalc == ERR_CLKDIVIDER) | ||
311 | + output = ERR_CLKCOUNTCALC; | ||
312 | + else | ||
313 | + output = (0xFFF & divCalc) | ((divCalc << 10) & 0x00C00000); | ||
314 | + return output; | ||
315 | +} | ||
316 | + | ||
317 | + | ||
318 | +int dglnt_dynclk_find_reg(struct dglnt_dynclk_reg *regValues, | ||
319 | + struct dglnt_dynclk_mode *clkParams) | ||
320 | +{ | ||
321 | + if ((clkParams->fbmult < 2) || clkParams->fbmult > 64) | ||
322 | + return -EINVAL; | ||
323 | + | ||
324 | + regValues->clk0L = dglnt_dynclk_count_calc(clkParams->clkdiv); | ||
325 | + if (regValues->clk0L == ERR_CLKCOUNTCALC) | ||
326 | + return -EINVAL; | ||
327 | + | ||
328 | + regValues->clkFBL = dglnt_dynclk_count_calc(clkParams->fbmult); | ||
329 | + if (regValues->clkFBL == ERR_CLKCOUNTCALC) | ||
330 | + return -EINVAL; | ||
331 | + | ||
332 | + regValues->clkFBH_clk0H = 0; | ||
333 | + | ||
334 | + regValues->divclk = dglnt_dynclk_divider(clkParams->maindiv); | ||
335 | + if (regValues->divclk == ERR_CLKDIVIDER) | ||
336 | + return -EINVAL; | ||
337 | + | ||
338 | + regValues->lockL = (u32)(lock_lookup[clkParams->fbmult - 1] & | ||
339 | + 0xFFFFFFFF); | ||
340 | + | ||
341 | + regValues->fltr_lockH = (u32)((lock_lookup[clkParams->fbmult - 1] >> | ||
342 | + 32) & 0x000000FF); | ||
343 | + regValues->fltr_lockH |= ((filter_lookup_low[clkParams->fbmult - 1] << | ||
344 | + 16) & 0x03FF0000); | ||
345 | + | ||
346 | + return 0; | ||
347 | +} | ||
348 | + | ||
349 | +void dglnt_dynclk_write_reg(struct dglnt_dynclk_reg *regValues, | ||
350 | + void __iomem *baseaddr) | ||
351 | +{ | ||
352 | + writel(regValues->clk0L, baseaddr + OFST_DISPLAY_CLK_L); | ||
353 | + writel(regValues->clkFBL, baseaddr + OFST_DISPLAY_FB_L); | ||
354 | + writel(regValues->clkFBH_clk0H, baseaddr + OFST_DISPLAY_FB_H_CLK_H); | ||
355 | + writel(regValues->divclk, baseaddr + OFST_DISPLAY_DIV); | ||
356 | + writel(regValues->lockL, baseaddr + OFST_DISPLAY_LOCK_L); | ||
357 | + writel(regValues->fltr_lockH, baseaddr + OFST_DISPLAY_FLTR_LOCK_H); | ||
358 | +} | ||
359 | + | ||
360 | +u32 dglnt_dynclk_find_mode(u32 freq, u32 parentFreq, | ||
361 | + struct dglnt_dynclk_mode *bestPick) | ||
362 | +{ | ||
363 | + u32 bestError = MMCM_FREQ_OUTMAX; | ||
364 | + u32 curError; | ||
365 | + u32 curClkMult; | ||
366 | + u32 curFreq; | ||
367 | + u32 divVal; | ||
368 | + u32 curFb, curClkDiv; | ||
369 | + u32 minFb = 0; | ||
370 | + u32 maxFb = 0; | ||
371 | + u32 curDiv = 1; | ||
372 | + u32 maxDiv; | ||
373 | + bool freq_found = false; | ||
374 | + | ||
375 | + bestPick->freq = 0; | ||
376 | + if (parentFreq == 0) | ||
377 | + return 0; | ||
378 | + | ||
379 | + /* minimum frequency is actually dictated by VCOmin */ | ||
380 | + if (freq < MMCM_FREQ_OUTMIN) | ||
381 | + freq = MMCM_FREQ_OUTMIN; | ||
382 | + if (freq > MMCM_FREQ_OUTMAX) | ||
383 | + freq = MMCM_FREQ_OUTMAX; | ||
384 | + | ||
385 | + if (parentFreq > MMCM_FREQ_PFDMAX) | ||
386 | + curDiv = 2; | ||
387 | + maxDiv = parentFreq / MMCM_FREQ_PFDMIN; | ||
388 | + if (maxDiv > MMCM_DIV_MAX) | ||
389 | + maxDiv = MMCM_DIV_MAX; | ||
390 | + | ||
391 | + while (curDiv <= maxDiv && !freq_found) { | ||
392 | + minFb = curDiv * DIV_ROUND_UP(MMCM_FREQ_VCOMIN, parentFreq); | ||
393 | + maxFb = curDiv * (MMCM_FREQ_VCOMAX / parentFreq); | ||
394 | + if (maxFb > MMCM_FB_MAX) | ||
395 | + maxFb = MMCM_FB_MAX; | ||
396 | + if (minFb < MMCM_FB_MIN) | ||
397 | + minFb = MMCM_FB_MIN; | ||
398 | + | ||
399 | + divVal = curDiv * freq; | ||
400 | + /* | ||
401 | + * This multiplier is used to find the best clkDiv value for | ||
402 | + * each FB value | ||
403 | + */ | ||
404 | + curClkMult = ((parentFreq * 1000) + (divVal / 2)) / divVal; | ||
405 | + | ||
406 | + curFb = minFb; | ||
407 | + while (curFb <= maxFb && !freq_found) { | ||
408 | + curClkDiv = ((curClkMult * curFb) + 500) / 1000; | ||
409 | + if (curClkDiv > MMCM_CLKDIV_MAX) | ||
410 | + curClkDiv = MMCM_CLKDIV_MAX; | ||
411 | + if (curClkDiv < MMCM_CLKDIV_MIN) | ||
412 | + curClkDiv = MMCM_CLKDIV_MIN; | ||
413 | + curFreq = (((parentFreq * curFb) / curDiv) / curClkDiv); | ||
414 | + if (curFreq >= freq) | ||
415 | + curError = curFreq - freq; | ||
416 | + else | ||
417 | + curError = freq - curFreq; | ||
418 | + if (curError < bestError) { | ||
419 | + bestError = curError; | ||
420 | + bestPick->clkdiv = curClkDiv; | ||
421 | + bestPick->fbmult = curFb; | ||
422 | + bestPick->maindiv = curDiv; | ||
423 | + bestPick->freq = curFreq; | ||
424 | + } | ||
425 | + if (!curError) | ||
426 | + freq_found = true; | ||
427 | + curFb++; | ||
428 | + } | ||
429 | + curDiv++; | ||
430 | + } | ||
431 | + return bestPick->freq; | ||
432 | +} | ||
433 | + | ||
434 | +static struct dglnt_dynclk *clk_hw_to_dglnt_dynclk(struct clk_hw *clk_hw) | ||
435 | +{ | ||
436 | + return container_of(clk_hw, struct dglnt_dynclk, clk_hw); | ||
437 | +} | ||
438 | + | ||
439 | + | ||
440 | +static int dglnt_dynclk_enable(struct clk_hw *clk_hw) | ||
441 | +{ | ||
442 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
443 | + unsigned int clock_state; | ||
444 | + | ||
445 | + if (dglnt_dynclk->freq) { | ||
446 | + writel(1, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
447 | + do { | ||
448 | + clock_state = readl(dglnt_dynclk->base + | ||
449 | + OFST_DISPLAY_STATUS); | ||
450 | + } while (!clock_state); | ||
451 | + } | ||
452 | + return 0; | ||
453 | +} | ||
454 | + | ||
455 | +static void dglnt_dynclk_disable(struct clk_hw *clk_hw) | ||
456 | +{ | ||
457 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
458 | + | ||
459 | + writel(0, dglnt_dynclk->base + OFST_DISPLAY_CTRL); | ||
460 | +} | ||
461 | + | ||
462 | +static int dglnt_dynclk_set_rate(struct clk_hw *clk_hw, | ||
463 | + unsigned long rate, unsigned long parent_rate) | ||
464 | +{ | ||
465 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
466 | + struct dglnt_dynclk_reg clkReg; | ||
467 | + struct dglnt_dynclk_mode clkMode; | ||
468 | + | ||
469 | + if (parent_rate == 0 || rate == 0) | ||
470 | + return -EINVAL; | ||
471 | + if (rate == dglnt_dynclk->freq) | ||
472 | + return 0; | ||
473 | + | ||
474 | + /* | ||
475 | + * Convert from Hz to KHz, then multiply by five to account for | ||
476 | + * BUFR division | ||
477 | + */ | ||
478 | + rate = (rate + 100) / 200; | ||
479 | + /* convert from Hz to KHz */ | ||
480 | + parent_rate = (parent_rate + 500) / 1000; | ||
481 | + if (!dglnt_dynclk_find_mode(rate, parent_rate, &clkMode)) | ||
482 | + return -EINVAL; | ||
483 | + | ||
484 | + /* | ||
485 | + * Write to the PLL dynamic configuration registers to configure it | ||
486 | + * with the calculated parameters. | ||
487 | + */ | ||
488 | + dglnt_dynclk_find_reg(&clkReg, &clkMode); | ||
489 | + dglnt_dynclk_write_reg(&clkReg, dglnt_dynclk->base); | ||
490 | + dglnt_dynclk->freq = clkMode.freq * 200; | ||
491 | + dglnt_dynclk_disable(clk_hw); | ||
492 | + dglnt_dynclk_enable(clk_hw); | ||
493 | + | ||
494 | + return 0; | ||
495 | +} | ||
496 | + | ||
497 | +static long dglnt_dynclk_round_rate(struct clk_hw *hw, unsigned long rate, | ||
498 | + unsigned long *parent_rate) | ||
499 | +{ | ||
500 | + struct dglnt_dynclk_mode clkMode; | ||
501 | + | ||
502 | + dglnt_dynclk_find_mode(((rate + 100) / 200), | ||
503 | + ((*parent_rate) + 500) / 1000, &clkMode); | ||
504 | + | ||
505 | + return (clkMode.freq * 200); | ||
506 | +} | ||
507 | + | ||
508 | +static unsigned long dglnt_dynclk_recalc_rate(struct clk_hw *clk_hw, | ||
509 | + unsigned long parent_rate) | ||
510 | +{ | ||
511 | + struct dglnt_dynclk *dglnt_dynclk = clk_hw_to_dglnt_dynclk(clk_hw); | ||
512 | + | ||
513 | + return dglnt_dynclk->freq; | ||
514 | +} | ||
515 | + | ||
516 | + | ||
517 | +static const struct clk_ops dglnt_dynclk_ops = { | ||
518 | + .recalc_rate = dglnt_dynclk_recalc_rate, | ||
519 | + .round_rate = dglnt_dynclk_round_rate, | ||
520 | + .set_rate = dglnt_dynclk_set_rate, | ||
521 | + .enable = dglnt_dynclk_enable, | ||
522 | + .disable = dglnt_dynclk_disable, | ||
523 | +}; | ||
524 | + | ||
525 | +static const struct of_device_id dglnt_dynclk_ids[] = { | ||
526 | + { .compatible = "digilent,axi-dynclk", }, | ||
527 | + { }, | ||
528 | +}; | ||
529 | +MODULE_DEVICE_TABLE(of, dglnt_dynclk_ids); | ||
530 | + | ||
531 | +static int dglnt_dynclk_probe(struct platform_device *pdev) | ||
532 | +{ | ||
533 | + const struct of_device_id *id; | ||
534 | + struct dglnt_dynclk *dglnt_dynclk; | ||
535 | + struct clk_init_data init; | ||
536 | + const char *parent_name; | ||
537 | + const char *clk_name; | ||
538 | + struct resource *mem; | ||
539 | + struct clk *clk; | ||
540 | + | ||
541 | + if (!pdev->dev.of_node) | ||
542 | + return -ENODEV; | ||
543 | + | ||
544 | + id = of_match_node(dglnt_dynclk_ids, pdev->dev.of_node); | ||
545 | + if (!id) | ||
546 | + return -ENODEV; | ||
547 | + | ||
548 | + dglnt_dynclk = devm_kzalloc(&pdev->dev, sizeof(*dglnt_dynclk), | ||
549 | + GFP_KERNEL); | ||
550 | + if (!dglnt_dynclk) | ||
551 | + return -ENOMEM; | ||
552 | + | ||
553 | + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
554 | + dglnt_dynclk->base = devm_ioremap_resource(&pdev->dev, mem); | ||
555 | + if (IS_ERR(dglnt_dynclk->base)) | ||
556 | + return PTR_ERR(dglnt_dynclk->base); | ||
557 | + | ||
558 | + parent_name = of_clk_get_parent_name(pdev->dev.of_node, 0); | ||
559 | + if (!parent_name) | ||
560 | + return -EINVAL; | ||
561 | + | ||
562 | + clk_name = pdev->dev.of_node->name; | ||
563 | + of_property_read_string(pdev->dev.of_node, "clock-output-names", | ||
564 | + &clk_name); | ||
565 | + | ||
566 | + init.name = clk_name; | ||
567 | + init.ops = &dglnt_dynclk_ops; | ||
568 | + init.flags = 0; | ||
569 | + init.parent_names = &parent_name; | ||
570 | + init.num_parents = 1; | ||
571 | + | ||
572 | + dglnt_dynclk->freq = 0; | ||
573 | + dglnt_dynclk_disable(&dglnt_dynclk->clk_hw); | ||
574 | + | ||
575 | + dglnt_dynclk->clk_hw.init = &init; | ||
576 | + clk = devm_clk_register(&pdev->dev, &dglnt_dynclk->clk_hw); | ||
577 | + if (IS_ERR(clk)) | ||
578 | + return PTR_ERR(clk); | ||
579 | + | ||
580 | + return of_clk_add_provider(pdev->dev.of_node, of_clk_src_simple_get, | ||
581 | + clk); | ||
582 | +} | ||
583 | + | ||
584 | +static int dglnt_dynclk_remove(struct platform_device *pdev) | ||
585 | +{ | ||
586 | + of_clk_del_provider(pdev->dev.of_node); | ||
587 | + | ||
588 | + return 0; | ||
589 | +} | ||
590 | + | ||
591 | +static struct platform_driver dglnt_dynclk_driver = { | ||
592 | + .driver = { | ||
593 | + .name = "dglnt-dynclk", | ||
594 | + .owner = THIS_MODULE, | ||
595 | + .of_match_table = dglnt_dynclk_ids, | ||
596 | + }, | ||
597 | + .probe = dglnt_dynclk_probe, | ||
598 | + .remove = dglnt_dynclk_remove, | ||
599 | +}; | ||
600 | +module_platform_driver(dglnt_dynclk_driver); | ||
601 | + | ||
602 | +MODULE_LICENSE("GPL v2"); | ||
603 | +MODULE_AUTHOR("Sam Bobrowicz <sbobrowicz@digilentinc.com>"); | ||
604 | +MODULE_DESCRIPTION("CCF Driver for Digilent axi_dynclk IP Core"); | ||
605 | -- | ||
606 | 2.14.2 | ||
607 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch new file mode 100644 index 00000000..a98d84c5 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0003-drm-xilinx-Fix-DPMS-transition-to-on.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 1a18e2b514ae9e75145597ac509a87f656c976ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Nathan Rossi <nathan@nathanrossi.com> | ||
3 | Date: Mon, 2 May 2016 23:46:42 +1000 | ||
4 | Subject: [PATCH 3/3] drm: xilinx: Fix DPMS transition to on | ||
5 | |||
6 | Fix the issues where the VTC is reset (losing its timing config). | ||
7 | |||
8 | Also fix the issue where the plane destroys its DMA descriptors and | ||
9 | marks the DMA channels as inactive but never recreates the descriptors | ||
10 | and never updates the active state when turning DPMS back on. | ||
11 | |||
12 | Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> | ||
13 | Upstream-Status: Pending [This is a workaround] | ||
14 | --- | ||
15 | drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | 1 - | ||
16 | drivers/gpu/drm/xilinx/xilinx_drm_plane.c | 3 ++- | ||
17 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
20 | index 631d35b921..93dbd4b58a 100644 | ||
21 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
22 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_crtc.c | ||
23 | @@ -88,7 +88,6 @@ static void xilinx_drm_crtc_dpms(struct drm_crtc *base_crtc, int dpms) | ||
24 | default: | ||
25 | if (crtc->vtc) { | ||
26 | xilinx_vtc_disable(crtc->vtc); | ||
27 | - xilinx_vtc_reset(crtc->vtc); | ||
28 | } | ||
29 | if (crtc->cresample) { | ||
30 | xilinx_cresample_disable(crtc->cresample); | ||
31 | diff --git a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
32 | index 6a248b72d4..d2518a4bdf 100644 | ||
33 | --- a/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
34 | +++ b/drivers/gpu/drm/xilinx/xilinx_drm_plane.c | ||
35 | @@ -140,7 +140,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
36 | for (i = 0; i < MAX_NUM_SUB_PLANES; i++) { | ||
37 | struct xilinx_drm_plane_dma *dma = &plane->dma[i]; | ||
38 | |||
39 | - if (dma->chan && dma->is_active) { | ||
40 | + if (dma->chan) { | ||
41 | flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; | ||
42 | desc = dmaengine_prep_interleaved_dma(dma->chan, | ||
43 | &dma->xt, | ||
44 | @@ -153,6 +153,7 @@ void xilinx_drm_plane_commit(struct drm_plane *base_plane) | ||
45 | dmaengine_submit(desc); | ||
46 | |||
47 | dma_async_issue_pending(dma->chan); | ||
48 | + dma->is_active = true; | ||
49 | } | ||
50 | } | ||
51 | } | ||
52 | -- | ||
53 | 2.14.2 | ||
54 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0004-minized-wifi-bluetooth.cfg b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0004-minized-wifi-bluetooth.cfg new file mode 100644 index 00000000..f71e53ab --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx/v2022.2/0004-minized-wifi-bluetooth.cfg | |||
@@ -0,0 +1,33 @@ | |||
1 | # | ||
2 | # Bluetooth config | ||
3 | # | ||
4 | CONFIG_BT=y | ||
5 | CONFIG_BT_BREDR=y | ||
6 | CONFIG_BT_HS=y | ||
7 | CONFIG_BT_LE=y | ||
8 | CONFIG_BT_BCM=y | ||
9 | CONFIG_BT_HCIUART=y | ||
10 | CONFIG_BT_HCIUART_H4=y | ||
11 | CONFIG_BT_HCIUART_BCM=y | ||
12 | CONFIG_BT_HIDP=y | ||
13 | CONFIG_CFG80211=y | ||
14 | CONFIG_CFG80211_DEFAULT_PS=y | ||
15 | CONFIG_CFG80211_CRDA_SUPPORT=y | ||
16 | CONFIG_BRCMUTIL=y | ||
17 | CONFIG_BRCMFMAC=y | ||
18 | CONFIG_BRCMFMAC_PROTO_BCDC=y | ||
19 | CONFIG_BRCMFMAC_SDIO=y | ||
20 | CONFIG_CRYPTO_BLKCIPHER=y | ||
21 | CONFIG_CRYPTO_MANAGER=y | ||
22 | CONFIG_CRYPTO_ECB=y | ||
23 | CONFIG_CRYPTO_CMAC=y | ||
24 | CONFIG_CRYPTO_SHA256=y | ||
25 | |||
26 | # | ||
27 | # Regulator config | ||
28 | # | ||
29 | CONFIG_REGMAP_IRQ=y | ||
30 | CONFIG_I2C_XILINX=y | ||
31 | CONFIG_MFD_DA9062=y | ||
32 | CONFIG_REGULATOR_DA9062=y | ||
33 | |||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.1.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.1.bbappend new file mode 100644 index 00000000..c789c7a9 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.1.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-xlnx/v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}:" | ||
2 | |||
3 | # Note: These patches are very old and doesn't apply on top of 5.x | ||
4 | # kernel. For more details refer README.md file. | ||
5 | |||
6 | #SRC_URI:append:zybo-linux-bd-zynq7 = " \ | ||
7 | # file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \ | ||
8 | # file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \ | ||
9 | # file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \ | ||
10 | # " | ||
11 | |||
12 | SRC_URI:append:minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg" | ||
diff --git a/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.2.bbappend b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.2.bbappend new file mode 100644 index 00000000..c789c7a9 --- /dev/null +++ b/meta-xilinx-contrib/recipes-kernel/linux/linux-xlnx_2022.2.bbappend | |||
@@ -0,0 +1,12 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/linux-xlnx/v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}:" | ||
2 | |||
3 | # Note: These patches are very old and doesn't apply on top of 5.x | ||
4 | # kernel. For more details refer README.md file. | ||
5 | |||
6 | #SRC_URI:append:zybo-linux-bd-zynq7 = " \ | ||
7 | # file://0001-drm-xilinx-Add-encoder-for-Digilent-boards.patch \ | ||
8 | # file://0002-clk-Add-driver-for-axi_dynclk-IP-Core.patch \ | ||
9 | # file://0003-drm-xilinx-Fix-DPMS-transition-to-on.patch \ | ||
10 | # " | ||
11 | |||
12 | SRC_URI:append:minized-zynq7 = " file://0004-minized-wifi-bluetooth.cfg" | ||
diff --git a/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass b/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass index 1ed1cd77..b4de5ee1 100644 --- a/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass +++ b/meta-xilinx-core/classes/image-types-xilinx-qemu.bbclass | |||
@@ -7,9 +7,9 @@ | |||
7 | 7 | ||
8 | CONVERSIONTYPES:append = " qemu-sd qemu-sd-fatimg" | 8 | CONVERSIONTYPES:append = " qemu-sd qemu-sd-fatimg" |
9 | CONVERSION_CMD:qemu-sd () { | 9 | CONVERSION_CMD:qemu-sd () { |
10 | cp ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd | 10 | cp ${IMGDEPLOYDIR}/${IMAGE_NAME}.${type} ${IMGDEPLOYDIR}/${IMAGE_NAME}.${type}.qemu-sd |
11 | # Get the wic.qemu-sd file size | 11 | # Get the wic.qemu-sd file size |
12 | file_size=`stat -c '%s' ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd` | 12 | file_size=`stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}.${type}.qemu-sd` |
13 | powerof2=1 | 13 | powerof2=1 |
14 | file_size=${file_size%.*} | 14 | file_size=${file_size%.*} |
15 | # Get the next power of 2 value for the image size value | 15 | # Get the next power of 2 value for the image size value |
@@ -17,7 +17,7 @@ CONVERSION_CMD:qemu-sd () { | |||
17 | powerof2=$(expr $powerof2 \* 2) | 17 | powerof2=$(expr $powerof2 \* 2) |
18 | done | 18 | done |
19 | # Resize the image using qemu-img | 19 | # Resize the image using qemu-img |
20 | qemu-img resize -f raw ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qemu-sd ${powerof2} | 20 | qemu-img resize -f raw ${IMGDEPLOYDIR}/${IMAGE_NAME}.${type}.qemu-sd ${powerof2} |
21 | } | 21 | } |
22 | 22 | ||
23 | BOOT_VOLUME_ID ?= "BOOT" | 23 | BOOT_VOLUME_ID ?= "BOOT" |
diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf index 5441fd96..afbf71c3 100644 --- a/meta-xilinx-core/conf/layer.conf +++ b/meta-xilinx-core/conf/layer.conf | |||
@@ -25,7 +25,7 @@ xilinx-tools:${LAYERDIR}/dynamic-layers/meta-xilinx-tools/recipes-*/*/*.bbappend | |||
25 | LAYERDEPENDS_xilinx = "core" | 25 | LAYERDEPENDS_xilinx = "core" |
26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" | 26 | LAYERRECOMMENDS_xilinx = "openembedded-layer" |
27 | 27 | ||
28 | LAYERSERIES_COMPAT_xilinx = "langdale" | 28 | LAYERSERIES_COMPAT_xilinx = "mickledore" |
29 | 29 | ||
30 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ | 30 | SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \ |
31 | *->xrt \ | 31 | *->xrt \ |
@@ -46,12 +46,15 @@ XILINX_RELEASE_VERSION ??= "v2023.2" | |||
46 | 46 | ||
47 | BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" | 47 | BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION" |
48 | 48 | ||
49 | XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%" | ||
50 | XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%" | ||
49 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" | 51 | XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%" |
50 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" | 52 | XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%" |
51 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 53 | PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
52 | PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 54 | PREFERRED_VERSION_qemu-xilinx-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
53 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 55 | PREFERRED_VERSION_qemu-xilinx-system-native ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
54 | PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%" | 56 | PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%" |
57 | PREFERRED_PROVIDER_qemu ?= "qemu-xilinx" | ||
55 | 58 | ||
56 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" | 59 | XILINX_ATF_VERSION[v2023.1] = "2.8-xilinx-v2023.1%" |
57 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" | 60 | XILINX_ATF_VERSION[v2023.2] = "2.8-xilinx-v2023.2%" |
@@ -63,7 +66,9 @@ XILINX_UBOOT_VERSION[v2023.2] = "v2023.01-xilinx-v2023.2%" | |||
63 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 66 | PREFERRED_VERSION_u-boot-xlnx ?= "${@d.getVarFlag('XILINX_UBOOT_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
64 | PREFERRED_VERSION_u-boot-tools-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'}" |
65 | 68 | ||
66 | XILINX_LINUX_VERSION[v2023.1] = "6.1.5-xilinx-v2023.1%" | 69 | XILINX_LINUX_VERSION[v2022.1] = "5.15.19-xilinx-v2022.1%" |
70 | XILINX_LINUX_VERSION[v2022.2] = "5.15.36-xilinx-v2022.2%" | ||
71 | XILINX_LINUX_VERSION[v2023.1] = "6.1.30-xilinx-v2023.1%" | ||
67 | XILINX_LINUX_VERSION[v2023.2] = "6.1.30-xilinx-v2023.2%" | 72 | XILINX_LINUX_VERSION[v2023.2] = "6.1.30-xilinx-v2023.2%" |
68 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" | 73 | PREFERRED_VERSION_linux-xlnx ?= "${@d.getVarFlag('XILINX_LINUX_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}" |
69 | 74 | ||
diff --git a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch index 5b4ffaaf..83e5b58a 100644 --- a/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch +++ b/meta-xilinx-core/dynamic-layers/openembedded-layer/recipes-benchmark/glmark2/files/0002-native-state-fbdev-Add-support-for-glmark2-es2-fbdev.patch | |||
@@ -19,11 +19,11 @@ Signed-off-by: Mark Hatle <mark.hatle@amd.com> | |||
19 | create mode 100644 src/native-state-fbdev.cpp | 19 | create mode 100644 src/native-state-fbdev.cpp |
20 | create mode 100644 src/native-state-fbdev.h | 20 | create mode 100644 src/native-state-fbdev.h |
21 | 21 | ||
22 | diff --git a/src/gl-state-egl.cpp b/src/gl-state-egl.cpp | 22 | Index: git/src/gl-state-egl.cpp |
23 | index 5a6843c..14c7dac 100644 | 23 | =================================================================== |
24 | --- a/src/gl-state-egl.cpp | 24 | --- git.orig/src/gl-state-egl.cpp |
25 | +++ b/src/gl-state-egl.cpp | 25 | +++ git/src/gl-state-egl.cpp |
26 | @@ -510,6 +510,7 @@ GLStateEGL::gotValidDisplay() | 26 | @@ -508,6 +508,7 @@ GLStateEGL::gotValidDisplay() |
27 | return false; | 27 | return false; |
28 | } | 28 | } |
29 | 29 | ||
@@ -31,7 +31,7 @@ index 5a6843c..14c7dac 100644 | |||
31 | char const * __restrict const supported_extensions = | 31 | char const * __restrict const supported_extensions = |
32 | egl_query_string(EGL_NO_DISPLAY, EGL_EXTENSIONS); | 32 | egl_query_string(EGL_NO_DISPLAY, EGL_EXTENSIONS); |
33 | 33 | ||
34 | @@ -543,6 +544,9 @@ GLStateEGL::gotValidDisplay() | 34 | @@ -541,6 +542,9 @@ GLStateEGL::gotValidDisplay() |
35 | Log::debug("Falling back to eglGetDisplay()\n"); | 35 | Log::debug("Falling back to eglGetDisplay()\n"); |
36 | egl_display_ = egl_get_display(native_display_); | 36 | egl_display_ = egl_get_display(native_display_); |
37 | } | 37 | } |
@@ -41,11 +41,11 @@ index 5a6843c..14c7dac 100644 | |||
41 | 41 | ||
42 | if (!egl_display_) { | 42 | if (!egl_display_) { |
43 | Log::error("eglGetDisplay() failed with error: 0x%x\n", egl_get_error()); | 43 | Log::error("eglGetDisplay() failed with error: 0x%x\n", egl_get_error()); |
44 | diff --git a/src/main.cpp b/src/main.cpp | 44 | Index: git/src/main.cpp |
45 | index ce8b094..7c9f501 100644 | 45 | =================================================================== |
46 | --- a/src/main.cpp | 46 | --- git.orig/src/main.cpp |
47 | +++ b/src/main.cpp | 47 | +++ git/src/main.cpp |
48 | @@ -36,6 +36,8 @@ | 48 | @@ -37,6 +37,8 @@ |
49 | 49 | ||
50 | #if GLMARK2_USE_X11 | 50 | #if GLMARK2_USE_X11 |
51 | #include "native-state-x11.h" | 51 | #include "native-state-x11.h" |
@@ -53,21 +53,20 @@ index ce8b094..7c9f501 100644 | |||
53 | +#include "native-state-fbdev.h" | 53 | +#include "native-state-fbdev.h" |
54 | #elif GLMARK2_USE_DRM | 54 | #elif GLMARK2_USE_DRM |
55 | #include "native-state-drm.h" | 55 | #include "native-state-drm.h" |
56 | #elif GLMARK2_USE_MIR | 56 | #elif GLMARK2_USE_GBM |
57 | @@ -172,6 +174,8 @@ main(int argc, char *argv[]) | 57 | @@ -160,6 +162,8 @@ main(int argc, char *argv[]) |
58 | // Create the canvas | 58 | { |
59 | #if GLMARK2_USE_X11 | 59 | #if GLMARK2_USE_X11 |
60 | NativeStateX11 native_state; | 60 | NativeStateX11 native_state; |
61 | +#elif GLMARK2_USE_FBDEV | 61 | +#elif GLMARK2_USE_FBDEV |
62 | + NativeStateFbdev native_state; | 62 | + NativeStateFbdev native_state; |
63 | #elif GLMARK2_USE_DRM | 63 | #elif GLMARK2_USE_DRM |
64 | NativeStateDRM native_state; | 64 | NativeStateDRM native_state; |
65 | #elif GLMARK2_USE_MIR | 65 | #elif GLMARK2_USE_GBM |
66 | diff --git a/src/native-state-fbdev.cpp b/src/native-state-fbdev.cpp | 66 | Index: git/src/native-state-fbdev.cpp |
67 | new file mode 100644 | 67 | =================================================================== |
68 | index 0000000..0c82a25 | ||
69 | --- /dev/null | 68 | --- /dev/null |
70 | +++ b/src/native-state-fbdev.cpp | 69 | +++ git/src/native-state-fbdev.cpp |
71 | @@ -0,0 +1,172 @@ | 70 | @@ -0,0 +1,172 @@ |
72 | + | 71 | + |
73 | +/* | 72 | +/* |
@@ -241,11 +240,10 @@ index 0000000..0c82a25 | |||
241 | + | 240 | + |
242 | + return fd; | 241 | + return fd; |
243 | +} | 242 | +} |
244 | diff --git a/src/native-state-fbdev.h b/src/native-state-fbdev.h | 243 | Index: git/src/native-state-fbdev.h |
245 | new file mode 100644 | 244 | =================================================================== |
246 | index 0000000..0162ee0 | ||
247 | --- /dev/null | 245 | --- /dev/null |
248 | +++ b/src/native-state-fbdev.h | 246 | +++ git/src/native-state-fbdev.h |
249 | @@ -0,0 +1,59 @@ | 247 | @@ -0,0 +1,59 @@ |
250 | +/* | 248 | +/* |
251 | + * Copyright © 2018 Xilinx Inc | 249 | + * Copyright © 2018 Xilinx Inc |
@@ -306,11 +304,11 @@ index 0000000..0162ee0 | |||
306 | +}; | 304 | +}; |
307 | + | 305 | + |
308 | +#endif /* GLMARK2_NATIVE_STATE_FBDEV_H_ */ | 306 | +#endif /* GLMARK2_NATIVE_STATE_FBDEV_H_ */ |
309 | diff --git a/src/wscript_build b/src/wscript_build | 307 | Index: git/src/wscript_build |
310 | index a01c8a8..c179342 100644 | 308 | =================================================================== |
311 | --- a/src/wscript_build | 309 | --- git.orig/src/wscript_build |
312 | +++ b/src/wscript_build | 310 | +++ git/src/wscript_build |
313 | @@ -90,6 +90,7 @@ flavor_sources = { | 311 | @@ -88,6 +88,7 @@ flavor_sources = { |
314 | 'win32-glesv2': common_flavor_sources + ['native-state-win32.cpp', 'gl-state-egl.cpp'], | 312 | 'win32-glesv2': common_flavor_sources + ['native-state-win32.cpp', 'gl-state-egl.cpp'], |
315 | 'x11-gl' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-glx.cpp'], | 313 | 'x11-gl' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-glx.cpp'], |
316 | 'x11-glesv2' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-egl.cpp'], | 314 | 'x11-glesv2' : common_flavor_sources + ['native-state-x11.cpp', 'gl-state-egl.cpp'], |
@@ -318,7 +316,7 @@ index a01c8a8..c179342 100644 | |||
318 | } | 316 | } |
319 | flavor_uselibs = { | 317 | flavor_uselibs = { |
320 | 'dispmanx-glesv2' : ['glad-egl-dispmanx', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2', 'dispmanx'], | 318 | 'dispmanx-glesv2' : ['glad-egl-dispmanx', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2', 'dispmanx'], |
321 | @@ -103,6 +104,7 @@ flavor_uselibs = { | 319 | @@ -99,6 +100,7 @@ flavor_uselibs = { |
322 | 'win32-glesv2': ['glad-egl-win32', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'], | 320 | 'win32-glesv2': ['glad-egl-win32', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'], |
323 | 'x11-gl' : ['x11', 'glad-gl', 'glad-glx', 'matrix-gl', 'common-gl'], | 321 | 'x11-gl' : ['x11', 'glad-gl', 'glad-glx', 'matrix-gl', 'common-gl'], |
324 | 'x11-glesv2' : ['x11', 'glad-egl-x11', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'], | 322 | 'x11-glesv2' : ['x11', 'glad-egl-x11', 'glad-glesv2', 'matrix-glesv2', 'common-glesv2'], |
@@ -326,7 +324,7 @@ index a01c8a8..c179342 100644 | |||
326 | } | 324 | } |
327 | 325 | ||
328 | flavor_defines = { | 326 | flavor_defines = { |
329 | @@ -117,6 +119,7 @@ flavor_defines = { | 327 | @@ -111,6 +113,7 @@ flavor_defines = { |
330 | 'win32-glesv2': ['GLMARK2_USE_WIN32', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'], | 328 | 'win32-glesv2': ['GLMARK2_USE_WIN32', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'], |
331 | 'x11-gl' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GL', 'GLMARK2_USE_GLX'], | 329 | 'x11-gl' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GL', 'GLMARK2_USE_GLX'], |
332 | 'x11-glesv2' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'], | 330 | 'x11-glesv2' : ['GLMARK2_USE_X11', 'GLMARK2_USE_GLESv2', 'GLMARK2_USE_EGL'], |
@@ -334,7 +332,7 @@ index a01c8a8..c179342 100644 | |||
334 | } | 332 | } |
335 | flavor_libs = { | 333 | flavor_libs = { |
336 | 'dispmanx-glesv2' : [], | 334 | 'dispmanx-glesv2' : [], |
337 | @@ -156,6 +159,7 @@ flavor_sources_gen = { | 335 | @@ -144,6 +147,7 @@ flavor_sources_gen = { |
338 | 'win32-glesv2' : [], | 336 | 'win32-glesv2' : [], |
339 | 'x11-gl' : [], | 337 | 'x11-gl' : [], |
340 | 'x11-glesv2' : [], | 338 | 'x11-glesv2' : [], |
@@ -342,7 +340,7 @@ index a01c8a8..c179342 100644 | |||
342 | } | 340 | } |
343 | egl_platform_defines = { | 341 | egl_platform_defines = { |
344 | 'dispmanx' : ['MESA_EGL_NO_X11_HEADERS'], | 342 | 'dispmanx' : ['MESA_EGL_NO_X11_HEADERS'], |
345 | @@ -164,6 +168,7 @@ egl_platform_defines = { | 343 | @@ -151,6 +155,7 @@ egl_platform_defines = { |
346 | 'wayland' : ['WL_EGL_PLATFORM'], | 344 | 'wayland' : ['WL_EGL_PLATFORM'], |
347 | 'win32' : [], | 345 | 'win32' : [], |
348 | 'x11' : [], | 346 | 'x11' : [], |
@@ -350,11 +348,11 @@ index a01c8a8..c179342 100644 | |||
350 | } | 348 | } |
351 | 349 | ||
352 | includes = ['.', 'scene-ideas', 'scene-terrain'] + platform_includes | 350 | includes = ['.', 'scene-ideas', 'scene-terrain'] + platform_includes |
353 | diff --git a/wscript b/wscript | 351 | Index: git/wscript |
354 | index cecc3d9..4ae50d8 100644 | 352 | =================================================================== |
355 | --- a/wscript | 353 | --- git.orig/wscript |
356 | +++ b/wscript | 354 | +++ git/wscript |
357 | @@ -19,6 +19,7 @@ FLAVORS = { | 355 | @@ -17,6 +17,7 @@ FLAVORS = { |
358 | 'win32-glesv2': 'glmark2-es2', | 356 | 'win32-glesv2': 'glmark2-es2', |
359 | 'x11-gl' : 'glmark2', | 357 | 'x11-gl' : 'glmark2', |
360 | 'x11-glesv2' : 'glmark2-es2', | 358 | 'x11-glesv2' : 'glmark2-es2', |
@@ -362,14 +360,11 @@ index cecc3d9..4ae50d8 100644 | |||
362 | } | 360 | } |
363 | FLAVORS_STR = ", ".join(sorted(list(FLAVORS) + ['all-linux', 'all-win32'])) | 361 | FLAVORS_STR = ", ".join(sorted(list(FLAVORS) + ['all-linux', 'all-win32'])) |
364 | 362 | ||
365 | @@ -213,6 +214,7 @@ def configure_linux(ctx): | 363 | @@ -210,6 +211,7 @@ def configure_linux(ctx): |
364 | ('libdrm','drm', None, list_contains(ctx.options.flavors, 'drm')), | ||
366 | ('gbm','gbm', None, list_contains(ctx.options.flavors, 'drm')), | 365 | ('gbm','gbm', None, list_contains(ctx.options.flavors, 'drm')), |
367 | ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'drm')), | 366 | ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'drm')), |
368 | ('mirclient','mirclient', '0.13', list_contains(ctx.options.flavors, 'mir')), | ||
369 | + ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'fbdev')), | 367 | + ('libudev', 'udev', None, list_contains(ctx.options.flavors, 'fbdev')), |
370 | ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')), | 368 | ('wayland-client','wayland-client', None, list_contains(ctx.options.flavors, 'wayland')), |
371 | ('wayland-cursor','wayland-cursor', None, list_contains(ctx.options.flavors, 'wayland')), | 369 | ('wayland-cursor','wayland-cursor', None, list_contains(ctx.options.flavors, 'wayland')), |
372 | ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))] | 370 | ('wayland-egl','wayland-egl', None, list_contains(ctx.options.flavors, 'wayland'))] |
373 | -- | ||
374 | 2.17.1 | ||
375 | |||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.3.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.3.bb new file mode 100644 index 00000000..6a4fd880 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.3.bb | |||
@@ -0,0 +1,47 @@ | |||
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.inc | ||
5 | |||
6 | SECTION = "libs" | ||
7 | |||
8 | AIEDIR ?= "${S}/driver" | ||
9 | S = "${WORKDIR}/git" | ||
10 | I = "${AIEDIR}/include" | ||
11 | |||
12 | COMPATIBLE_MACHINE = "^$" | ||
13 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
14 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
15 | PV = "3.3" | ||
16 | |||
17 | IOBACKENDS ?= "Linux" | ||
18 | |||
19 | DEPENDS = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
20 | RDEPENDS:${PN} = "${@bb.utils.contains('IOBACKENDS', 'metal', 'libmetal', '', d)}" | ||
21 | |||
22 | PROVIDES = "libxaiengine" | ||
23 | RPROVIDES:${PN} = "libxaiengine" | ||
24 | |||
25 | # The makefile isn't ready for parallel execution at the moment | ||
26 | PARALLEL_MAKE = "-j 1" | ||
27 | |||
28 | CFLAGS += "-Wall -Wextra -fno-thread-jumps -fno-tree-pre" | ||
29 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'Linux', ' -D__AIELINUX__', '', d)}" | ||
30 | CFLAGS += "${@bb.utils.contains('IOBACKENDS', 'metal', ' -D__AIEMETAL__', '', d)}" | ||
31 | EXTRA_OEMAKE = "-C ${AIEDIR}/src -f Makefile.Linux CFLAGS='${CFLAGS}'" | ||
32 | |||
33 | |||
34 | do_compile(){ | ||
35 | oe_runmake | ||
36 | } | ||
37 | |||
38 | do_install(){ | ||
39 | install -d ${D}${includedir} | ||
40 | install ${I}/*.h ${D}${includedir}/ | ||
41 | install -d ${D}${includedir}/xaiengine | ||
42 | install ${I}/xaiengine/*.h ${D}${includedir}/xaiengine/ | ||
43 | install -d ${D}${libdir} | ||
44 | cp -dr ${AIEDIR}/src/*.so* ${D}${libdir} | ||
45 | } | ||
46 | |||
47 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb index e364462b..f86c5985 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/ai-engine-driver_3.4.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "Xilinx AI Engine runtime" | 1 | SUMMARY = "Xilinx AI Engine runtime" |
2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" | 2 | DESCRIPTION = "This library provides APIs for the runtime support of the Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt.inc | 4 | require aie-rt-2022.inc |
5 | 5 | ||
6 | SECTION = "libs" | 6 | SECTION = "libs" |
7 | 7 | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.inc b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.inc new file mode 100644 index 00000000..85121654 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aie-rt-2022.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_v2022.2" | ||
6 | SRCREV ?= "ae24c8ede049906323510693f37e6167a963fd0e" | ||
7 | |||
8 | LICENSE = "BSD-3-Clause" | ||
9 | LIC_FILES_CHKSUM ?= "file://license.txt;md5=b81abf1f508952331dd7d2ab36408f5b" | ||
10 | |||
11 | SRC_URI = "${REPO};branch=${BRANCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.4.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.4.bb new file mode 100644 index 00000000..641c39a9 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.4.bb | |||
@@ -0,0 +1,33 @@ | |||
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.inc | ||
5 | |||
6 | SECTION = "devel" | ||
7 | |||
8 | XAIEFAL_DIR ?= "fal" | ||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | COMPATIBLE_MACHINE = "^$" | ||
12 | COMPATIBLE_MACHINE:versal-ai-core = "versal-ai-core" | ||
13 | COMPATIBLE_MACHINE:versal-ai-edge = "${SOC_VARIANT_ARCH}" | ||
14 | |||
15 | IOBACKENDS ?= "Linux" | ||
16 | |||
17 | PROVIDES = "aiefal" | ||
18 | ALLOW_EMPTY:${PN} = "1" | ||
19 | |||
20 | inherit pkgconfig cmake | ||
21 | |||
22 | DEPENDS = "libxaiengine" | ||
23 | |||
24 | OECMAKE_SOURCEPATH = "${S}/${XAIEFAL_DIR}" | ||
25 | |||
26 | EXTRA_OECMAKE = "-DWITH_TESTS=OFF " | ||
27 | EXTRA_OECMAKE:append = "${@'-DWITH_EXAMPLES=ON' if d.getVar('WITH_EXAMPLES') == 'y' else '-DWITH_EXAMPLES=OFF'}" | ||
28 | |||
29 | FILES:${PN}-demos = " \ | ||
30 | ${bindir}/* \ | ||
31 | " | ||
32 | |||
33 | PACKAGE_ARCH:versal-ai-core = "${SOC_VARIANT_ARCH}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb index 6ac86a1b..2c6c9cd1 100644 --- a/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb +++ b/meta-xilinx-core/recipes-bsp/ai-engine/aiefal_1.5.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" | 1 | SUMMARY = "Xilinx AI Engine FAL(Functional Abstraction Layer)" |
2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" | 2 | DESCRIPTION = "AIE FAL provides functional abstraction APIs for runtime support of Xilinx AI Engine IP" |
3 | 3 | ||
4 | require aie-rt.inc | 4 | require aie-rt-2022.inc |
5 | 5 | ||
6 | SECTION = "devel" | 6 | SECTION = "devel" |
7 | 7 | ||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.1.bb new file mode 100644 index 00000000..f02bb879 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | ATF_VERSION = "2.6" | ||
2 | SRCREV = "67ca59c67f542322554d78820bf9ddaa736d6a84" | ||
3 | BRANCH = "xlnx_rebase_v2.6" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | |||
7 | include arm-trusted-firmware.inc | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb new file mode 100644 index 00000000..5ef2e6ac --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2022.2.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | ATF_VERSION = "2.6" | ||
2 | SRCREV = "0897efd45ccad29a3dbab610578c70e3a52b2caa" | ||
3 | BRANCH = "xlnx_rebase_v2.6" | ||
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | ||
5 | |||
6 | |||
7 | include arm-trusted-firmware.inc | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb index 454fbe86..2bcbe7d4 100644 --- a/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb +++ b/meta-xilinx-core/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2023.1.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | ATF_VERSION = "2.8" | 1 | ATF_VERSION = "2.8" |
2 | SRCREV = "6fcc6b179dc14de0f6ba19a1829e597b60f7aee5" | 2 | SRCREV = "c9b71dc96f3f18ca94cad590612aae3224c8c84d" |
3 | BRANCH = "xlnx_rebase_v2.8" | 3 | BRANCH = "xlnx_rebase_v2.8" |
4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" | 4 | LIC_FILES_CHKSUM = "file://license.rst;md5=1dd070c98a281d18d9eefd938729b031" |
5 | 5 | ||
diff --git a/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb new file mode 100644 index 00000000..fdf28f41 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/bootgen/bootgen_1.0.bb | |||
@@ -0,0 +1,31 @@ | |||
1 | SUMMARY = "Building and installing bootgen" | ||
2 | DESCRIPTION = "Building and installing bootgen, a Xilinx tool that lets you stitch binary files together and generate device boot images" | ||
3 | |||
4 | LICENSE = "Apache-2.0" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=d526b6d0807bf263b97da1da876f39b1" | ||
6 | |||
7 | S = "${WORKDIR}/git" | ||
8 | |||
9 | DEPENDS += "openssl" | ||
10 | RDEPENDS:${PN} += "openssl" | ||
11 | |||
12 | REPO ?= "git://github.com/Xilinx/bootgen.git;protocol=https" | ||
13 | BRANCH ?= "xlnx_rel_v2022.2" | ||
14 | SRCREV = "cf4ba93b99644dc4429ef633471a639e1382f0e7" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | EXTRA_OEMAKE += 'CROSS_COMPILER="${CXX}" -C ${S}' | ||
20 | CXXFLAGS:append = " -std=c++0x" | ||
21 | |||
22 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
23 | |||
24 | do_install() { | ||
25 | install -d ${D}${bindir} | ||
26 | install -Dm 0755 ${S}/bootgen ${D}${bindir} | ||
27 | } | ||
28 | |||
29 | FILES:${PN} = "${bindir}/bootgen" | ||
30 | |||
31 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb new file mode 100644 index 00000000..b4de4fe6 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/dfx-mgr/dfx-mgr_1.0.bb | |||
@@ -0,0 +1,78 @@ | |||
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_v2022.2" | ||
12 | SRCREV = "bc06691eb35d7f0acb7c2508b6d050d77b0264a0" | ||
13 | SOMAJOR = "1" | ||
14 | SOMINOR = "0" | ||
15 | SOVERSION = "${SOMAJOR}.${SOMINOR}" | ||
16 | |||
17 | COMPATIBLE_MACHINE = "^$" | ||
18 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
19 | COMPATIBLE_MACHINE:versal = "versal" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit cmake update-rc.d systemd | ||
24 | |||
25 | DEPENDS += " libwebsockets inotify-tools libdfx zocl libdrm" | ||
26 | RDEPENDS:${PN} += " fru-print" | ||
27 | EXTRA_OECMAKE += " \ | ||
28 | -DCMAKE_SYSROOT:PATH=${RECIPE_SYSROOT} \ | ||
29 | " | ||
30 | |||
31 | # Workaround for: the comparison will always evaluate as 'true' for the address of 'defaul_accel_name' will never be NULL [-Werror=address] | ||
32 | CFLAGS += "-Wno-address" | ||
33 | |||
34 | # Workaround for: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-truncation] | ||
35 | CFLAGS += "-Wno-stringop-truncation" | ||
36 | |||
37 | INITSCRIPT_NAME = "dfx-mgr.sh" | ||
38 | INITSCRIPT_PARAMS = "start 99 S ." | ||
39 | |||
40 | SYSTEMD_PACKAGES="${PN}" | ||
41 | SYSTEMD_SERVICE:${PN}="dfx-mgr.service" | ||
42 | SYSTEMD_AUTO_ENABLE:${PN}="enable" | ||
43 | |||
44 | |||
45 | do_install(){ | ||
46 | install -d ${D}${bindir} | ||
47 | install -d ${D}${libdir} | ||
48 | install -d ${D}${includedir} | ||
49 | install -d ${D}${base_libdir}/firmware/xilinx | ||
50 | install -d ${D}${sysconfdir}/dfx-mgrd | ||
51 | |||
52 | cp ${B}/example/sys/linux/dfx-mgrd-static ${D}${bindir}/dfx-mgrd | ||
53 | cp ${B}/example/sys/linux/dfx-mgr-client-static ${D}${bindir}/dfx-mgr-client | ||
54 | chrpath -d ${D}${bindir}/dfx-mgrd | ||
55 | chrpath -d ${D}${bindir}/dfx-mgr-client | ||
56 | install -m 0644 ${S}/src/dfxmgr_client.h ${D}${includedir} | ||
57 | |||
58 | oe_soinstall ${B}/src/libdfx-mgr.so.${SOVERSION} ${D}${libdir} | ||
59 | |||
60 | install -m 0755 ${S}/src/daemon.conf ${D}${sysconfdir}/dfx-mgrd/ | ||
61 | |||
62 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
63 | install -d ${D}${sysconfdir}/init.d/ | ||
64 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${sysconfdir}/init.d/ | ||
65 | fi | ||
66 | |||
67 | install -m 0755 ${S}/src/dfx-mgr.sh ${D}${bindir} | ||
68 | install -m 0755 ${S}/src/scripts/xlnx-firmware-detect ${D}${bindir} | ||
69 | |||
70 | install -d ${D}${systemd_system_unitdir} | ||
71 | install -m 0644 ${S}/src/dfx-mgr.service ${D}${systemd_system_unitdir} | ||
72 | } | ||
73 | |||
74 | PACKAGES =+ "libdfx-mgr" | ||
75 | |||
76 | FILES:${PN} += "${base_libdir}/firmware/xilinx" | ||
77 | FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','sysvinit','${sysconfdir}/init.d/dfx-mgr.sh', '', d)} ${systemd_system_unitdir}" | ||
78 | FILES:libdfx-mgr = "${libdir}/libdfx-mgr.so.${SOVERSION} ${libdir}/libdfx-mgr.so.${SOMAJOR}" | ||
diff --git a/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb index af786e7e..2114eafd 100644 --- a/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb +++ b/meta-xilinx-core/recipes-bsp/initramdisk/initramdisk-xilinx.bb | |||
@@ -18,18 +18,18 @@ do_install[vardepsexclude] += "DEPLOY_DIR_IMAGE" | |||
18 | do_install[depends] += "${INITRAMFS_IMAGE}:do_image_complete" | 18 | do_install[depends] += "${INITRAMFS_IMAGE}:do_image_complete" |
19 | do_install[cleandirs] = "${D}" | 19 | do_install[cleandirs] = "${D}" |
20 | do_install() { | 20 | do_install() { |
21 | if [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ]; then | 21 | if [ -e ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot ]; then |
22 | install -d ${D}/boot/ | 22 | install -d ${D}/boot/ |
23 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot ${D}/boot/. | 23 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot ${D}/boot/. |
24 | else | 24 | else |
25 | bbfatal "Unable to find expected initramfs: ${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot" | 25 | bbfatal "Unable to find expected initramfs: ${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot" |
26 | fi | 26 | fi |
27 | } | 27 | } |
28 | 28 | ||
29 | PACKAGES = "${PACKAGE_BEFORE_PN} ${PN}" | 29 | PACKAGES = "${PACKAGE_BEFORE_PN} ${PN}" |
30 | 30 | ||
31 | RPROVIDES:${PN} = "initramdisk" | 31 | RPROVIDES:${PN} = "initramdisk" |
32 | FILES:${PN} = "/boot/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz.u-boot" | 32 | FILES:${PN} = "/boot/${INITRAMFS_IMAGE}-${MACHINE}.rootfs.cpio.gz.u-boot" |
33 | 33 | ||
34 | python() { | 34 | python() { |
35 | if not d.getVar('INITRAMFS_IMAGE'): | 35 | if not d.getVar('INITRAMFS_IMAGE'): |
diff --git a/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb new file mode 100644 index 00000000..2c180561 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/libdfx/libdfx_1.0.bb | |||
@@ -0,0 +1,23 @@ | |||
1 | SUMMARY = "Xilinx libdfx library" | ||
2 | DESCRIPTION = "Xilinx libdfx Library and headers" | ||
3 | |||
4 | LICENSE = "MIT & GPL-2.0-or-later" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=94aba86aec117f003b958a52f019f1a7" | ||
6 | |||
7 | BRANCH ?= "xlnx_rel_v2022.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 = "f2b7bbca9d6936141024becfb92266600eeefc2b" | ||
12 | |||
13 | COMPATIBLE_MACHINE = "^$" | ||
14 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
15 | COMPATIBLE_MACHINE:versal = "versal" | ||
16 | |||
17 | S = "${WORKDIR}/git" | ||
18 | |||
19 | inherit cmake | ||
20 | |||
21 | # Due to an update where the soname/version was defined, we need to use an RREPLACES | ||
22 | # so updates will work properly. | ||
23 | RREPLACES:${PN} = "libdfx" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb new file mode 100644 index 00000000..eaf8d4ce --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.1.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2022.1.inc | ||
3 | |||
4 | # MUST clear CONFIG_VIDEO to avoid a compilation failure trying to construct | ||
5 | # bmp_logo.h | ||
6 | SED_CONFIG_EFI:append = ' -e "s/CONFIG_VIDEO=.*/# CONFIG_VIDEO is not set/"' | ||
7 | |||
8 | # Default do_compile fails with: | ||
9 | # | error: object directory ../downloads/git2/github.com.Xilinx.u-boot-xlnx.git/objects does not exist; check .git/objects/info/alternates. | ||
10 | # The regular workaround of calling 'git diff' seems to be problematic. | ||
11 | do_compile () { | ||
12 | oe_runmake -C ${S} tools-only_defconfig O=${B} | ||
13 | |||
14 | # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and | ||
15 | # generating it requires bin2header tool, which for target build | ||
16 | # is built with target tools and thus cannot be executed on host. | ||
17 | sed -i -e "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" ${SED_CONFIG_EFI} ${B}/.config | ||
18 | |||
19 | oe_runmake -C ${S} cross_tools NO_SDL=1 O=${B} | ||
20 | } | ||
21 | |||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb new file mode 100644 index 00000000..44636872 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-tools-xlnx_2022.2.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | require u-boot-tools-xlnx.inc | ||
2 | require u-boot-xlnx-2022.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-2022.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc new file mode 100644 index 00000000..a0c0b50d --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.1.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update" | ||
4 | |||
5 | SRCREV = "91ad7924e7f59584d597353e1bb86794341e0a7e" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc new file mode 100644 index 00000000..6415861d --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2022.2.inc | |||
@@ -0,0 +1,17 @@ | |||
1 | UBOOT_VERSION = "v2021.01" | ||
2 | |||
3 | UBRANCH ?= "xlnx_rebase_v2022.01" | ||
4 | |||
5 | SRCREV = "b31476685debf5512ed0d4e8000fa5167a22f530" | ||
6 | |||
7 | LICENSE = "GPL-2.0-or-later" | ||
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | ||
9 | |||
10 | # u-boot-xlnx has support for these | ||
11 | HAS_PLATFORM_INIT ?= " \ | ||
12 | xilinx_zynqmp_virt_config \ | ||
13 | xilinx_zynq_virt_defconfig \ | ||
14 | xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \ | ||
15 | " | ||
16 | |||
17 | DEPENDS += "bc-native dtc-native python3-setuptools-native gnutls-native" | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc index fd51561a..72f43f71 100644 --- a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx-2023.1.inc | |||
@@ -1,8 +1,8 @@ | |||
1 | UBOOT_VERSION = "v2023.01" | 1 | UBOOT_VERSION = "v2023.01" |
2 | 2 | ||
3 | UBRANCH = "xlnx_rebase_v2023.01" | 3 | UBRANCH = "xlnx_rebase_v2023.01_update" |
4 | 4 | ||
5 | SRCREV = "8624651f9ae49d326e29d9ec9a80a881a769640a" | 5 | SRCREV = "1689570b68dd3827e527a520805aa0bb7f58ee09" |
6 | 6 | ||
7 | LICENSE = "GPL-2.0-or-later" | 7 | LICENSE = "GPL-2.0-or-later" |
8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" | 8 | LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897" |
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb new file mode 100644 index 00000000..c1c45e56 --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb | |||
@@ -0,0 +1,4 @@ | |||
1 | |||
2 | require u-boot-xlnx.inc | ||
3 | require u-boot-spl-zynq-init.inc | ||
4 | require u-boot-xlnx-2022.1.inc | ||
diff --git a/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.2.bb new file mode 100644 index 00000000..b10f321b --- /dev/null +++ b/meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.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-2022.2.inc | ||
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend b/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend new file mode 100644 index 00000000..fd3a3c11 --- /dev/null +++ b/meta-xilinx-core/recipes-core/images/core-image-ptest-all.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | # Minimum board memory required for each type | ||
2 | QB_MEM:microblaze = "-m 2G" | ||
3 | QB_MEM:zynq = "-m 1G" | ||
4 | QB_MEM:zynqmp = "-m 4G" | ||
5 | QB_MEM:versal = "-m 16G" | ||
diff --git a/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend b/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend new file mode 100644 index 00000000..fd3a3c11 --- /dev/null +++ b/meta-xilinx-core/recipes-core/images/core-image-ptest.bbappend | |||
@@ -0,0 +1,5 @@ | |||
1 | # Minimum board memory required for each type | ||
2 | QB_MEM:microblaze = "-m 2G" | ||
3 | QB_MEM:zynq = "-m 1G" | ||
4 | QB_MEM:zynqmp = "-m 4G" | ||
5 | QB_MEM:versal = "-m 16G" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc index 7e88713c..c18a5326 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-alt.inc | |||
@@ -17,4 +17,37 @@ python () { | |||
17 | if (d.getVar('BPN') != 'qemu'): | 17 | if (d.getVar('BPN') != 'qemu'): |
18 | for pkg in d.getVar('PACKAGES').split(): | 18 | for pkg in d.getVar('PACKAGES').split(): |
19 | d.appendVar('RPROVIDES:%s' % pkg, ' ' + pkg.replace(d.getVar('PN'), 'qemu')) | 19 | d.appendVar('RPROVIDES:%s' % pkg, ' ' + pkg.replace(d.getVar('PN'), 'qemu')) |
20 | |||
21 | for pkg in d.getVar('PACKAGES_DYNAMIC').split(): | ||
22 | d.appendVar('PACKAGES_DYNAMIC', ' ' + pkg.replace(d.getVar('PN'), 'qemu')) | ||
20 | } | 23 | } |
24 | |||
25 | # From Poky qemu.inc | ||
26 | # Modified to add compatibility RPROVIDES | ||
27 | python split_qemu_packages () { | ||
28 | archdir = d.expand('${bindir}/') | ||
29 | syspackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', '${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True) | ||
30 | if syspackages: | ||
31 | d.setVar('RDEPENDS:' + d.getVar('PN') + '-system-all', ' '.join(syspackages)) | ||
32 | |||
33 | if (d.getVar('BPN') != 'qemu'): | ||
34 | for pkg in syspackages: | ||
35 | d.appendVar('RPROVIDES:%s' % pkg, ' ' + pkg.replace(d.getVar('PN'), 'qemu')) | ||
36 | |||
37 | userpackages = do_split_packages(d, archdir, r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', '${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True) | ||
38 | if userpackages: | ||
39 | d.setVar('RDEPENDS:' + d.getVar('PN') + '-user-all', ' '.join(userpackages)) | ||
40 | |||
41 | if (d.getVar('BPN') != 'qemu'): | ||
42 | for pkg in userpackages: | ||
43 | d.appendVar('RPROVIDES:%s' % pkg, ' ' + pkg.replace(d.getVar('PN'), 'qemu')) | ||
44 | |||
45 | mipspackage = d.getVar('PN') + "-user-mips" | ||
46 | if mipspackage in ' '.join(userpackages): | ||
47 | d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 'bash') | ||
48 | |||
49 | if (d.getVar('BPN') != 'qemu'): | ||
50 | for pkg in mipspackage: | ||
51 | d.appendVar('RPROVIDES:%s' % pkg, ' ' + pkg.replace(d.getVar('PN'), 'qemu')) | ||
52 | } | ||
53 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb new file mode 100644 index 00000000..7c734cd6 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb | |||
@@ -0,0 +1,8 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.1" | ||
5 | SRCREV ?= "0499324af1178057c3730b0989c8fb5c5bbc4cf8" | ||
6 | |||
7 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
8 | SRC_URI:append = " file://0001-Makefile-Use-python3-instead-of-python.patch" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb new file mode 100644 index 00000000..6675ba3e --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | |||
2 | require qemu-devicetrees.inc | ||
3 | |||
4 | BRANCH ?= "xlnx_rel_v2022.2" | ||
5 | SRCREV ?= "cf5d357e16c13ac447861f908e83951ffb7b4301" | ||
6 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb index 91e787bd..dc1feda4 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb | |||
@@ -2,5 +2,5 @@ | |||
2 | require qemu-devicetrees.inc | 2 | require qemu-devicetrees.inc |
3 | 3 | ||
4 | BRANCH ?= "xlnx_rel_v2023.1" | 4 | BRANCH ?= "xlnx_rel_v2023.1" |
5 | SRCREV ?= "1c45adcde1fc06432c01be250bf668c6477d8459" | 5 | SRCREV ?= "56538937584f527fb408347c3b430142e74723e8" |
6 | 6 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc new file mode 100644 index 00000000..bb8fac70 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc new file mode 100644 index 00000000..bb8fac70 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | # Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx | ||
2 | # Instead it's the current master version, as qemu 6.1.0 doesn't | ||
3 | # work reliabily anymore. | ||
4 | |||
5 | XILINX_QEMU_VERSION = "v7.1.0" | ||
6 | BRANCH = "master" | ||
7 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | ||
8 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc index 06ac05a1..362a7dbe 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc | |||
@@ -1,3 +1,5 @@ | |||
1 | XILINX_QEMU_VERSION = "v7.1.0" | 1 | XILINX_QEMU_VERSION = "v7.1.0" |
2 | BRANCH = "xlnx_rel_v2023.1" | 2 | BRANCH = "xlnx_rel_v2023.1" |
3 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" | 3 | SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376" |
4 | |||
5 | PACKAGECONFIG[debuginfo] = "" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-6.1.0/cross.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-6.1.0/cross.patch deleted file mode 100644 index bdb77ec7..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-6.1.0/cross.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From f51ece86f84c877f255746cba22a6745f37d2b7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Tue, 5 Jan 2021 23:00:14 +0000 | ||
4 | Subject: [PATCH] qemu: Upgrade 5.1.0->5.2.0 | ||
5 | |||
6 | We need to be able to trigger configure's cross code but we don't want | ||
7 | to set cross_prefix as it does other things we don't want. Patch things | ||
8 | so we can do what we need in the target config case. | ||
9 | |||
10 | Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?] | ||
11 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
12 | --- | ||
13 | configure | 4 ---- | ||
14 | 1 file changed, 4 deletions(-) | ||
15 | |||
16 | diff --git a/configure b/configure | ||
17 | index 9a79a004d..563b7827f 100755 | ||
18 | --- a/configure | ||
19 | +++ b/configure | ||
20 | @@ -5128,7 +5128,6 @@ if test "$skip_meson" = no; then | ||
21 | fi | ||
22 | echo "strip = [$(meson_quote $strip)]" >> $cross | ||
23 | echo "windres = [$(meson_quote $windres)]" >> $cross | ||
24 | - if test "$cross_compile" = "yes"; then | ||
25 | cross_arg="--cross-file config-meson.cross" | ||
26 | echo "[host_machine]" >> $cross | ||
27 | if test "$mingw32" = "yes" ; then | ||
28 | @@ -5160,9 +5159,6 @@ if test "$skip_meson" = no; then | ||
29 | else | ||
30 | echo "endian = 'little'" >> $cross | ||
31 | fi | ||
32 | - else | ||
33 | - cross_arg="--native-file config-meson.cross" | ||
34 | - fi | ||
35 | mv $cross config-meson.cross | ||
36 | |||
37 | rm -rf meson-private meson-info meson-logs | ||
38 | -- | ||
39 | 2.17.1 | ||
40 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch new file mode 100644 index 00000000..6c85a77b --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | CVE: CVE-2022-2962 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From 5c5c50b0a73d78ffe18336c9996fef5eae9bbbb0 Mon Sep 17 00:00:00 2001 | ||
6 | From: Zheyu Ma <zheyuma97@gmail.com> | ||
7 | Date: Sun, 21 Aug 2022 20:43:43 +0800 | ||
8 | Subject: [PATCH] net: tulip: Restrict DMA engine to memories | ||
9 | |||
10 | The DMA engine is started by I/O access and then itself accesses the | ||
11 | I/O registers, triggering a reentrancy bug. | ||
12 | |||
13 | The following log can reveal it: | ||
14 | ==5637==ERROR: AddressSanitizer: stack-overflow | ||
15 | #0 0x5595435f6078 in tulip_xmit_list_update qemu/hw/net/tulip.c:673 | ||
16 | #1 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
17 | #2 0x559544637f86 in memory_region_write_accessor qemu/softmmu/memory.c:492:5 | ||
18 | #3 0x5595446379fa in access_with_adjusted_size qemu/softmmu/memory.c:554:18 | ||
19 | #4 0x5595446372fa in memory_region_dispatch_write qemu/softmmu/memory.c | ||
20 | #5 0x55954468b74c in flatview_write_continue qemu/softmmu/physmem.c:2825:23 | ||
21 | #6 0x559544683662 in flatview_write qemu/softmmu/physmem.c:2867:12 | ||
22 | #7 0x5595446833f3 in address_space_write qemu/softmmu/physmem.c:2963:18 | ||
23 | #8 0x5595435fb082 in dma_memory_rw_relaxed qemu/include/sysemu/dma.h:87:12 | ||
24 | #9 0x5595435fb082 in dma_memory_rw qemu/include/sysemu/dma.h:130:12 | ||
25 | #10 0x5595435fb082 in dma_memory_write qemu/include/sysemu/dma.h:171:12 | ||
26 | #11 0x5595435fb082 in stl_le_dma qemu/include/sysemu/dma.h:272:1 | ||
27 | #12 0x5595435fb082 in stl_le_pci_dma qemu/include/hw/pci/pci.h:910:1 | ||
28 | #13 0x5595435fb082 in tulip_desc_write qemu/hw/net/tulip.c:101:9 | ||
29 | #14 0x5595435f7e3d in tulip_xmit_list_update qemu/hw/net/tulip.c:706:9 | ||
30 | #15 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13 | ||
31 | |||
32 | Fix this bug by restricting the DMA engine to memories regions. | ||
33 | |||
34 | Signed-off-by: Zheyu Ma <zheyuma97@gmail.com> | ||
35 | Signed-off-by: Jason Wang <jasowang@redhat.com> | ||
36 | --- | ||
37 | hw/net/tulip.c | 4 ++-- | ||
38 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
39 | |||
40 | diff --git a/hw/net/tulip.c b/hw/net/tulip.c | ||
41 | index 097e905bec..b9e42c322a 100644 | ||
42 | --- a/hw/net/tulip.c | ||
43 | +++ b/hw/net/tulip.c | ||
44 | @@ -70,7 +70,7 @@ static const VMStateDescription vmstate_pci_tulip = { | ||
45 | static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
46 | struct tulip_descriptor *desc) | ||
47 | { | ||
48 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
49 | + const MemTxAttrs attrs = { .memory = true }; | ||
50 | |||
51 | if (s->csr[0] & CSR0_DBO) { | ||
52 | ldl_be_pci_dma(&s->dev, p, &desc->status, attrs); | ||
53 | @@ -88,7 +88,7 @@ static void tulip_desc_read(TULIPState *s, hwaddr p, | ||
54 | static void tulip_desc_write(TULIPState *s, hwaddr p, | ||
55 | struct tulip_descriptor *desc) | ||
56 | { | ||
57 | - const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; | ||
58 | + const MemTxAttrs attrs = { .memory = true }; | ||
59 | |||
60 | if (s->csr[0] & CSR0_DBO) { | ||
61 | stl_be_pci_dma(&s->dev, p, desc->status, attrs); | ||
62 | -- | ||
63 | 2.34.1 | ||
64 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch new file mode 100644 index 00000000..6fb160e6 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From de64af82950a6908f9407dfc92b83c17e2af3eab Mon Sep 17 00:00:00 2001 | ||
2 | From: Jason Wessel <jason.wessel@windriver.com> | ||
3 | Date: Fri, 28 Mar 2014 17:42:43 +0800 | ||
4 | Subject: [PATCH 01/12] qemu: Add addition environment space to boot loader | ||
5 | qemu-system-mips | ||
6 | |||
7 | Upstream-Status: Inappropriate - OE uses deep paths | ||
8 | |||
9 | If you create a project with very long directory names like 128 characters | ||
10 | deep and use NFS, the kernel arguments will be truncated. The kernel will | ||
11 | accept longer strings such as 1024 bytes, but the qemu boot loader defaulted | ||
12 | to only 256 bytes. This patch expands the limit. | ||
13 | |||
14 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
15 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
16 | |||
17 | --- | ||
18 | hw/mips/malta.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/hw/mips/malta.c b/hw/mips/malta.c | ||
22 | index 628851172..12d37f35d 100644 | ||
23 | --- a/hw/mips/malta.c | ||
24 | +++ b/hw/mips/malta.c | ||
25 | @@ -61,7 +61,7 @@ | ||
26 | #define ENVP_PADDR 0x2000 | ||
27 | #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR) | ||
28 | #define ENVP_NB_ENTRIES 16 | ||
29 | -#define ENVP_ENTRY_SIZE 256 | ||
30 | +#define ENVP_ENTRY_SIZE 1024 | ||
31 | |||
32 | /* Hardware addresses */ | ||
33 | #define FLASH_ADDRESS 0x1e000000ULL | ||
34 | -- | ||
35 | 2.30.2 | ||
36 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch new file mode 100644 index 00000000..63a99c96 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch | |||
@@ -0,0 +1,246 @@ | |||
1 | From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@xilinx.com> | ||
3 | Date: Thu, 21 Dec 2017 11:35:16 -0800 | ||
4 | Subject: [PATCH 02/12] chardev: connect socket to a spawned command | ||
5 | |||
6 | The command is started in a shell (sh -c) with stdin connect to QEMU | ||
7 | via a Unix domain stream socket. QEMU then exchanges data via its own | ||
8 | end of the socket, just like it normally does. | ||
9 | |||
10 | "-chardev socket" supports some ways of connecting via protocols like | ||
11 | telnet, but that is only a subset of the functionality supported by | ||
12 | tools socat. To use socat instead, for example to connect via a socks | ||
13 | proxy, use: | ||
14 | |||
15 | -chardev 'socket,id=socat,cmd=exec socat FD:0 SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \ | ||
16 | -device usb-serial,chardev=socat | ||
17 | |||
18 | Beware that commas in the command must be escaped as double commas. | ||
19 | |||
20 | Or interactively in the console: | ||
21 | (qemu) chardev-add socket,id=cat,cmd=cat | ||
22 | (qemu) device_add usb-serial,chardev=cat | ||
23 | ^ac | ||
24 | # cat >/dev/ttyUSB0 | ||
25 | hello | ||
26 | hello | ||
27 | |||
28 | Another usage is starting swtpm from inside QEMU. swtpm will | ||
29 | automatically shut down once it looses the connection to the parent | ||
30 | QEMU, so there is no risk of lingering processes: | ||
31 | |||
32 | -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \ | ||
33 | -tpmdev emulator,id=tpm0,chardev=chrtpm0 \ | ||
34 | -device tpm-tis,tpmdev=tpm0 | ||
35 | |||
36 | The patch was discussed upstream, but QEMU developers believe that the | ||
37 | code calling QEMU should be responsible for managing additional | ||
38 | processes. In OE-core, that would imply enhancing runqemu and | ||
39 | oeqa. This patch is a simpler solution. | ||
40 | |||
41 | Because it is not going upstream, the patch was written so that it is | ||
42 | as simple as possible. | ||
43 | |||
44 | Upstream-Status: Inappropriate [embedded specific] | ||
45 | |||
46 | Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> | ||
47 | |||
48 | --- | ||
49 | chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++ | ||
50 | chardev/char.c | 3 ++ | ||
51 | qapi/char.json | 5 +++ | ||
52 | 3 files changed, 108 insertions(+) | ||
53 | |||
54 | diff --git a/chardev/char-socket.c b/chardev/char-socket.c | ||
55 | index fab2d791d..c79641f24 100644 | ||
56 | --- a/chardev/char-socket.c | ||
57 | +++ b/chardev/char-socket.c | ||
58 | @@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock, | ||
59 | return true; | ||
60 | } | ||
61 | |||
62 | +#ifndef _WIN32 | ||
63 | +static void chardev_open_socket_cmd(Chardev *chr, | ||
64 | + const char *cmd, | ||
65 | + Error **errp) | ||
66 | +{ | ||
67 | + int fds[2] = { -1, -1 }; | ||
68 | + QIOChannelSocket *sioc = NULL; | ||
69 | + pid_t pid = -1; | ||
70 | + const char *argv[] = { "/bin/sh", "-c", cmd, NULL }; | ||
71 | + | ||
72 | + /* | ||
73 | + * We need a Unix domain socket for commands like swtpm and a single | ||
74 | + * connection, therefore we cannot use qio_channel_command_new_spawn() | ||
75 | + * without patching it first. Duplicating the functionality is easier. | ||
76 | + */ | ||
77 | + if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) { | ||
78 | + error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC)"); | ||
79 | + goto error; | ||
80 | + } | ||
81 | + | ||
82 | + pid = qemu_fork(errp); | ||
83 | + if (pid < 0) { | ||
84 | + goto error; | ||
85 | + } | ||
86 | + | ||
87 | + if (!pid) { | ||
88 | + /* child */ | ||
89 | + dup2(fds[1], STDIN_FILENO); | ||
90 | + execv(argv[0], (char * const *)argv); | ||
91 | + _exit(1); | ||
92 | + } | ||
93 | + | ||
94 | + /* | ||
95 | + * Hand over our end of the socket pair to the qio channel. | ||
96 | + * | ||
97 | + * We don't reap the child because it is expected to keep | ||
98 | + * running. We also don't support the "reconnect" option for the | ||
99 | + * same reason. | ||
100 | + */ | ||
101 | + sioc = qio_channel_socket_new_fd(fds[0], errp); | ||
102 | + if (!sioc) { | ||
103 | + goto error; | ||
104 | + } | ||
105 | + fds[0] = -1; | ||
106 | + | ||
107 | + g_free(chr->filename); | ||
108 | + chr->filename = g_strdup_printf("cmd:%s", cmd); | ||
109 | + tcp_chr_new_client(chr, sioc); | ||
110 | + | ||
111 | + error: | ||
112 | + if (fds[0] >= 0) { | ||
113 | + close(fds[0]); | ||
114 | + } | ||
115 | + if (fds[1] >= 0) { | ||
116 | + close(fds[1]); | ||
117 | + } | ||
118 | + if (sioc) { | ||
119 | + object_unref(OBJECT(sioc)); | ||
120 | + } | ||
121 | +} | ||
122 | +#endif | ||
123 | |||
124 | static void qmp_chardev_open_socket(Chardev *chr, | ||
125 | ChardevBackend *backend, | ||
126 | @@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
127 | { | ||
128 | SocketChardev *s = SOCKET_CHARDEV(chr); | ||
129 | ChardevSocket *sock = backend->u.socket.data; | ||
130 | +#ifndef _WIN32 | ||
131 | + const char *cmd = sock->cmd; | ||
132 | +#endif | ||
133 | bool do_nodelay = sock->has_nodelay ? sock->nodelay : false; | ||
134 | bool is_listen = sock->has_server ? sock->server : true; | ||
135 | bool is_telnet = sock->has_telnet ? sock->telnet : false; | ||
136 | @@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr, | ||
137 | |||
138 | update_disconnected_filename(s); | ||
139 | |||
140 | +#ifndef _WIN32 | ||
141 | + if (cmd) { | ||
142 | + chardev_open_socket_cmd(chr, cmd, errp); | ||
143 | + | ||
144 | + /* everything ready (or failed permanently) before we return */ | ||
145 | + *be_opened = true; | ||
146 | + } else | ||
147 | +#endif | ||
148 | if (s->is_listen) { | ||
149 | if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270, | ||
150 | is_waitconnect, errp) < 0) { | ||
151 | @@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
152 | const char *host = qemu_opt_get(opts, "host"); | ||
153 | const char *port = qemu_opt_get(opts, "port"); | ||
154 | const char *fd = qemu_opt_get(opts, "fd"); | ||
155 | +#ifndef _WIN32 | ||
156 | + const char *cmd = qemu_opt_get(opts, "cmd"); | ||
157 | +#endif | ||
158 | #ifdef CONFIG_LINUX | ||
159 | bool tight = qemu_opt_get_bool(opts, "tight", true); | ||
160 | bool abstract = qemu_opt_get_bool(opts, "abstract", false); | ||
161 | @@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
162 | SocketAddressLegacy *addr; | ||
163 | ChardevSocket *sock; | ||
164 | |||
165 | +#ifndef _WIN32 | ||
166 | + if (cmd) { | ||
167 | + /* | ||
168 | + * Here we have to ensure that no options are set which are incompatible with | ||
169 | + * spawning a command, otherwise unmodified code that doesn't know about | ||
170 | + * command spawning (like socket_reconnect_timeout()) might get called. | ||
171 | + */ | ||
172 | + if (path || sock->server || sock->has_telnet || sock->has_tn3270 || sock->reconnect || host || port || sock->tls_creds) { | ||
173 | + error_setg(errp, "chardev: socket: cmd does not support any additional options"); | ||
174 | + return; | ||
175 | + } | ||
176 | + } else | ||
177 | +#endif | ||
178 | + | ||
179 | if ((!!path + !!fd + !!host) > 1) { | ||
180 | error_setg(errp, | ||
181 | "None or one of 'path', 'fd' or 'host' option required."); | ||
182 | @@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, ChardevBackend *backend, | ||
183 | sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds")); | ||
184 | sock->has_tls_authz = qemu_opt_get(opts, "tls-authz"); | ||
185 | sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz")); | ||
186 | +#ifndef _WIN32 | ||
187 | + sock->cmd = g_strdup(cmd); | ||
188 | +#endif | ||
189 | |||
190 | addr = g_new0(SocketAddressLegacy, 1); | ||
191 | +#ifndef _WIN32 | ||
192 | + if (path || cmd) { | ||
193 | +#else | ||
194 | if (path) { | ||
195 | +#endif | ||
196 | UnixSocketAddress *q_unix; | ||
197 | addr->type = SOCKET_ADDRESS_TYPE_UNIX; | ||
198 | q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1); | ||
199 | +#ifndef _WIN32 | ||
200 | + q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path); | ||
201 | +#else | ||
202 | q_unix->path = g_strdup(path); | ||
203 | +#endif | ||
204 | #ifdef CONFIG_LINUX | ||
205 | q_unix->has_tight = true; | ||
206 | q_unix->tight = tight; | ||
207 | diff --git a/chardev/char.c b/chardev/char.c | ||
208 | index 0169d8dde..ce9a21f41 100644 | ||
209 | --- a/chardev/char.c | ||
210 | +++ b/chardev/char.c | ||
211 | @@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = { | ||
212 | },{ | ||
213 | .name = "path", | ||
214 | .type = QEMU_OPT_STRING, | ||
215 | + },{ | ||
216 | + .name = "cmd", | ||
217 | + .type = QEMU_OPT_STRING, | ||
218 | },{ | ||
219 | .name = "host", | ||
220 | .type = QEMU_OPT_STRING, | ||
221 | diff --git a/qapi/char.json b/qapi/char.json | ||
222 | index 7b4215157..37feabdac 100644 | ||
223 | --- a/qapi/char.json | ||
224 | +++ b/qapi/char.json | ||
225 | @@ -250,6 +250,10 @@ | ||
226 | # | ||
227 | # @addr: socket address to listen on (server=true) | ||
228 | # or connect to (server=false) | ||
229 | +# @cmd: command to run via "sh -c" with stdin as one end of | ||
230 | +# a AF_UNIX SOCK_DSTREAM socket pair. The other end | ||
231 | +# is used by the chardev. Either an addr or a cmd can | ||
232 | +# be specified, but not both. | ||
233 | # @tls-creds: the ID of the TLS credentials object (since 2.6) | ||
234 | # @tls-authz: the ID of the QAuthZ authorization object against which | ||
235 | # the client's x509 distinguished name will be validated. This | ||
236 | @@ -276,6 +280,7 @@ | ||
237 | ## | ||
238 | { 'struct': 'ChardevSocket', | ||
239 | 'data': { 'addr': 'SocketAddressLegacy', | ||
240 | + '*cmd': 'str', | ||
241 | '*tls-creds': 'str', | ||
242 | '*tls-authz' : 'str', | ||
243 | '*server': 'bool', | ||
244 | -- | ||
245 | 2.30.2 | ||
246 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch new file mode 100644 index 00000000..f350ffce --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From dc2a8ccd440ee3741b61606eafed3f7e092f4312 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
3 | Date: Tue, 26 Feb 2013 11:43:28 -0500 | ||
4 | Subject: [PATCH 03/12] apic: fixup fallthrough to PIC | ||
5 | |||
6 | Commit 0e21e12bb311c4c1095d0269dc2ef81196ccb60a [Don't route PIC | ||
7 | interrupts through the local APIC if the local APIC config says so.] | ||
8 | missed a check to ensure the local APIC is enabled. Since if the local | ||
9 | APIC is disabled it doesn't matter what the local APIC config says. | ||
10 | |||
11 | If this check isn't done and the guest has disabled the local APIC the | ||
12 | guest will receive a general protection fault, similar to what is seen | ||
13 | here: | ||
14 | |||
15 | https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02304.html | ||
16 | |||
17 | The GPF is caused by an attempt to service interrupt 0xffffffff. This | ||
18 | comes about since cpu_get_pic_interrupt() calls apic_accept_pic_intr() | ||
19 | (with the local APIC disabled apic_get_interrupt() returns -1). | ||
20 | apic_accept_pic_intr() returns 0 and thus the interrupt number which | ||
21 | is returned from cpu_get_pic_interrupt(), and which is attempted to be | ||
22 | serviced, is -1. | ||
23 | |||
24 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
25 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg00878.html] | ||
26 | Signed-off-by: He Zhe <zhe.he@windriver.com> | ||
27 | |||
28 | --- | ||
29 | hw/intc/apic.c | 2 +- | ||
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/hw/intc/apic.c b/hw/intc/apic.c | ||
33 | index 3df11c34d..9506c88ce 100644 | ||
34 | --- a/hw/intc/apic.c | ||
35 | +++ b/hw/intc/apic.c | ||
36 | @@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev) | ||
37 | APICCommonState *s = APIC(dev); | ||
38 | uint32_t lvt0; | ||
39 | |||
40 | - if (!s) | ||
41 | + if (!s || !(s->spurious_vec & APIC_SV_ENABLE)) | ||
42 | return -1; | ||
43 | |||
44 | lvt0 = s->lvt[APIC_LVT_LINT0]; | ||
45 | -- | ||
46 | 2.30.2 | ||
47 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-6.1.0/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch index 4298964d..6faebd4e 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-6.1.0/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From b51e6dd833172954c718bd600d846540eeb07220 Mon Sep 17 00:00:00 2001 | 1 | From d8265abdce5dc2bf74b3fccdf2b7257b4f3894f0 Mon Sep 17 00:00:00 2001 |
2 | From: He Zhe <zhe.he@windriver.com> | 2 | From: He Zhe <zhe.he@windriver.com> |
3 | Date: Wed, 28 Aug 2019 19:56:28 +0800 | 3 | Date: Wed, 28 Aug 2019 19:56:28 +0800 |
4 | Subject: [PATCH] configure: Add pkg-config handling for libgcrypt | 4 | Subject: [PATCH 04/12] configure: Add pkg-config handling for libgcrypt |
5 | 5 | ||
6 | libgcrypt may also be controlled by pkg-config, this patch adds pkg-config | 6 | libgcrypt may also be controlled by pkg-config, this patch adds pkg-config |
7 | handling for libgcrypt. | 7 | handling for libgcrypt. |
@@ -15,10 +15,10 @@ Signed-off-by: He Zhe <zhe.he@windriver.com> | |||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | 15 | 1 file changed, 1 insertion(+), 1 deletion(-) |
16 | 16 | ||
17 | diff --git a/meson.build b/meson.build | 17 | diff --git a/meson.build b/meson.build |
18 | index b3e7ec0e9..4cbe715b7 100644 | 18 | index 861de93c4..d45ff2d7c 100644 |
19 | --- a/meson.build | 19 | --- a/meson.build |
20 | +++ b/meson.build | 20 | +++ b/meson.build |
21 | @@ -874,7 +874,7 @@ endif | 21 | @@ -1063,7 +1063,7 @@ endif |
22 | if not gnutls_crypto.found() | 22 | if not gnutls_crypto.found() |
23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() | 23 | if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() |
24 | gcrypt = dependency('libgcrypt', version: '>=1.8', | 24 | gcrypt = dependency('libgcrypt', version: '>=1.8', |
@@ -27,3 +27,6 @@ index b3e7ec0e9..4cbe715b7 100644 | |||
27 | required: get_option('gcrypt'), | 27 | required: get_option('gcrypt'), |
28 | kwargs: static_kwargs) | 28 | kwargs: static_kwargs) |
29 | # Debian has removed -lgpg-error from libgcrypt-config | 29 | # Debian has removed -lgpg-error from libgcrypt-config |
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch new file mode 100644 index 00000000..3f3c39f9 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From f39e7bfc5ed07b5ecaeb705c4eae4855ca120d47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleksiy Obitotskyy <oobitots@cisco.com> | ||
3 | Date: Wed, 25 Mar 2020 21:21:35 +0200 | ||
4 | Subject: [PATCH 05/12] qemu: Do not include file if not exists | ||
5 | |||
6 | Script configure checks for if_alg.h and check failed but | ||
7 | if_alg.h still included. | ||
8 | |||
9 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg07188.html] | ||
10 | Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> | ||
11 | |||
12 | [update patch context] | ||
13 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
14 | |||
15 | --- | ||
16 | linux-user/syscall.c | 2 ++ | ||
17 | 1 file changed, 2 insertions(+) | ||
18 | |||
19 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c | ||
20 | index f65045efe..340e0c6f0 100644 | ||
21 | --- a/linux-user/syscall.c | ||
22 | +++ b/linux-user/syscall.c | ||
23 | @@ -113,7 +113,9 @@ | ||
24 | #include <linux/blkpg.h> | ||
25 | #include <netpacket/packet.h> | ||
26 | #include <linux/netlink.h> | ||
27 | +#if defined(CONFIG_AF_ALG) | ||
28 | #include <linux/if_alg.h> | ||
29 | +#endif | ||
30 | #include <linux/rtc.h> | ||
31 | #include <sound/asound.h> | ||
32 | #ifdef HAVE_BTRFS_H | ||
33 | -- | ||
34 | 2.30.2 | ||
35 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch new file mode 100644 index 00000000..75c03693 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 375cae3dd6151ef33cae8f243f6a2c2da6c0c356 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Fri, 8 Jan 2021 17:27:06 +0000 | ||
4 | Subject: [PATCH 06/12] qemu: Add some user space mmap tweaks to address musl | ||
5 | 32 bit | ||
6 | |||
7 | When using qemu-i386 to build qemux86 webkitgtk on musl, it sits in an | ||
8 | infinite loop of mremap calls of ever decreasing/increasing addresses. | ||
9 | |||
10 | I suspect something in the musl memory allocation code loops indefinitely | ||
11 | if it only sees ENOMEM and only exits when it hits EFAULT. | ||
12 | |||
13 | According to the docs, trying to mremap outside the address space | ||
14 | can/should return EFAULT and changing this allows the build to succeed. | ||
15 | |||
16 | A better return value for the other cases of invalid addresses is EINVAL | ||
17 | rather than ENOMEM so adjust the other part of the test to this. | ||
18 | |||
19 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html] | ||
20 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org | ||
21 | |||
22 | --- | ||
23 | linux-user/mmap.c | 10 +++++++--- | ||
24 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/linux-user/mmap.c b/linux-user/mmap.c | ||
27 | index c125031b9..e651834a5 100644 | ||
28 | --- a/linux-user/mmap.c | ||
29 | +++ b/linux-user/mmap.c | ||
30 | @@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, | ||
31 | int prot; | ||
32 | void *host_addr; | ||
33 | |||
34 | - if (!guest_range_valid_untagged(old_addr, old_size) || | ||
35 | - ((flags & MREMAP_FIXED) && | ||
36 | + if (!guest_range_valid_untagged(old_addr, old_size)) { | ||
37 | + errno = EFAULT; | ||
38 | + return -1; | ||
39 | + } | ||
40 | + | ||
41 | + if (((flags & MREMAP_FIXED) && | ||
42 | !guest_range_valid_untagged(new_addr, new_size)) || | ||
43 | ((flags & MREMAP_MAYMOVE) == 0 && | ||
44 | !guest_range_valid_untagged(old_addr, new_size))) { | ||
45 | - errno = ENOMEM; | ||
46 | + errno = EINVAL; | ||
47 | return -1; | ||
48 | } | ||
49 | |||
50 | -- | ||
51 | 2.30.2 | ||
52 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch new file mode 100644 index 00000000..0d7dae36 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 50bab5c2605b609ea7ea154f57a9be96d656725a Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Mon, 1 Mar 2021 13:00:47 +0000 | ||
4 | Subject: [PATCH 07/12] qemu: Determinism fixes | ||
5 | |||
6 | When sources are included within debug information, a couple of areas of the | ||
7 | qemu build are not reproducible due to either full buildpaths or timestamps. | ||
8 | |||
9 | Replace the full paths with relative ones. I couldn't figure out how to get | ||
10 | meson to pass relative paths but we can fix that in the script. | ||
11 | |||
12 | Upstream-Status: Pending [some version of all/part of this may be accepted] | ||
13 | RP 2021/3/1 | ||
14 | |||
15 | --- | ||
16 | scripts/decodetree.py | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/scripts/decodetree.py b/scripts/decodetree.py | ||
20 | index a03dc6b5e..4ea24c1f3 100644 | ||
21 | --- a/scripts/decodetree.py | ||
22 | +++ b/scripts/decodetree.py | ||
23 | @@ -1328,7 +1328,7 @@ def main(): | ||
24 | toppat = ExcMultiPattern(0) | ||
25 | |||
26 | for filename in args: | ||
27 | - input_file = filename | ||
28 | + input_file = os.path.relpath(filename) | ||
29 | f = open(filename, 'rt', encoding='utf-8') | ||
30 | parse_file(f, toppat) | ||
31 | f.close() | ||
32 | -- | ||
33 | 2.30.2 | ||
34 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch new file mode 100644 index 00000000..43d3c7cf --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 2bf9388b801d4389e2d57e95a7897bfc1c42786e Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 14 Jan 2021 06:33:04 +0000 | ||
4 | Subject: [PATCH 08/12] tests/meson.build: use relative path to refer to files | ||
5 | |||
6 | Fix error like: | ||
7 | Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long | ||
8 | |||
9 | when build path is too long, use meson.source_root() will make this | ||
10 | filename too long. Fixed by using relative path to refer to files | ||
11 | |||
12 | Upstream-Status: Submitted [send to qemu-devel] | ||
13 | |||
14 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
15 | |||
16 | --- | ||
17 | tests/unit/meson.build | 4 ++-- | ||
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
19 | |||
20 | diff --git a/tests/unit/meson.build b/tests/unit/meson.build | ||
21 | index 96b295263..e4c3246dc 100644 | ||
22 | --- a/tests/unit/meson.build | ||
23 | +++ b/tests/unit/meson.build | ||
24 | @@ -44,9 +44,9 @@ tests = { | ||
25 | 'test-keyval': [testqapi], | ||
26 | 'test-logging': [], | ||
27 | 'test-uuid': [], | ||
28 | - 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], | ||
29 | + 'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'], | ||
30 | 'test-qapi-util': [], | ||
31 | - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], | ||
32 | + 'test-smp-parse': [qom, '../../hw/core/machine-smp.c'], | ||
33 | } | ||
34 | |||
35 | if have_system or have_tools | ||
36 | -- | ||
37 | 2.30.2 | ||
38 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch new file mode 100644 index 00000000..23d0a698 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From ebf4bb2f51da83af0c61480414cfa156f7308b34 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 21 Mar 2022 10:09:38 -0700 | ||
4 | Subject: [PATCH 09/12] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux | ||
5 | systems | ||
6 | |||
7 | linux only wires MAP_SYNC and MAP_SHARED_VALIDATE for architectures | ||
8 | which include asm-generic/mman.h and mips/powerpc are not including this | ||
9 | file in linux/mman.h, therefore these should be defined for such | ||
10 | architectures on Linux as well. This fixes build on mips/musl/linux | ||
11 | |||
12 | Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2022-03/msg05298.html] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | Cc: Zhang Yi <yi.z.zhang@linux.intel.com> | ||
15 | Cc: Michael S. Tsirkin <mst@redhat.com> | ||
16 | |||
17 | --- | ||
18 | util/mmap-alloc.c | 10 +++++++--- | ||
19 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
20 | |||
21 | diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c | ||
22 | index 893d86435..86d3cda24 100644 | ||
23 | --- a/util/mmap-alloc.c | ||
24 | +++ b/util/mmap-alloc.c | ||
25 | @@ -10,14 +10,18 @@ | ||
26 | * later. See the COPYING file in the top-level directory. | ||
27 | */ | ||
28 | |||
29 | +#include "qemu/osdep.h" | ||
30 | #ifdef CONFIG_LINUX | ||
31 | #include <linux/mman.h> | ||
32 | -#else /* !CONFIG_LINUX */ | ||
33 | +#endif /* CONFIG_LINUX */ | ||
34 | + | ||
35 | +#ifndef MAP_SYNC | ||
36 | #define MAP_SYNC 0x0 | ||
37 | +#endif /* MAP_SYNC */ | ||
38 | +#ifndef MAP_SHARED_VALIDATE | ||
39 | #define MAP_SHARED_VALIDATE 0x0 | ||
40 | -#endif /* CONFIG_LINUX */ | ||
41 | +#endif /* MAP_SHARED_VALIDATE */ | ||
42 | |||
43 | -#include "qemu/osdep.h" | ||
44 | #include "qemu/mmap-alloc.h" | ||
45 | #include "qemu/host-utils.h" | ||
46 | #include "qemu/cutils.h" | ||
47 | -- | ||
48 | 2.30.2 | ||
49 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch new file mode 100644 index 00000000..810c74fa --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | CVE: CVE-2022-1050 | ||
2 | Upstream-Status: Submitted [https://lore.kernel.org/qemu-devel/20220403095234.2210-1-yuval.shaia.ml@gmail.com/] | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From dbdef95c272e8f3ec037c3db4197c66002e30995 Mon Sep 17 00:00:00 2001 | ||
6 | From: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
7 | Date: Sun, 3 Apr 2022 12:52:34 +0300 | ||
8 | Subject: [PATCH] hw/pvrdma: Protect against buggy or malicious guest driver | ||
9 | |||
10 | Guest driver might execute HW commands when shared buffers are not yet | ||
11 | allocated. | ||
12 | This could happen on purpose (malicious guest) or because of some other | ||
13 | guest/host address mapping error. | ||
14 | We need to protect againts such case. | ||
15 | |||
16 | Fixes: CVE-2022-1050 | ||
17 | |||
18 | Reported-by: Raven <wxhusst@gmail.com> | ||
19 | Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> | ||
20 | --- | ||
21 | hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++ | ||
22 | 1 file changed, 6 insertions(+) | ||
23 | |||
24 | diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c | ||
25 | index da7ddfa548..89db963c46 100644 | ||
26 | --- a/hw/rdma/vmw/pvrdma_cmd.c | ||
27 | +++ b/hw/rdma/vmw/pvrdma_cmd.c | ||
28 | @@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev) | ||
29 | |||
30 | dsr_info = &dev->dsr_info; | ||
31 | |||
32 | + if (!dsr_info->dsr) { | ||
33 | + /* Buggy or malicious guest driver */ | ||
34 | + rdma_error_report("Exec command without dsr, req or rsp buffers"); | ||
35 | + goto out; | ||
36 | + } | ||
37 | + | ||
38 | if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) / | ||
39 | sizeof(struct cmd_handler)) { | ||
40 | rdma_error_report("Unsupported command"); | ||
41 | -- | ||
42 | 2.34.1 | ||
43 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch new file mode 100644 index 00000000..3b4a6694 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | CVE: CVE-2022-3165 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
4 | |||
5 | From d307040b18bfcb1393b910f1bae753d5c12a4dc7 Mon Sep 17 00:00:00 2001 | ||
6 | From: Mauro Matteo Cascella <mcascell@redhat.com> | ||
7 | Date: Sun, 25 Sep 2022 22:45:11 +0200 | ||
8 | Subject: [PATCH] ui/vnc-clipboard: fix integer underflow in | ||
9 | vnc_client_cut_text_ext | ||
10 | |||
11 | Extended ClientCutText messages start with a 4-byte header. If len < 4, | ||
12 | an integer underflow occurs in vnc_client_cut_text_ext. The result is | ||
13 | used to decompress data in a while loop in inflate_buffer, leading to | ||
14 | CPU consumption and denial of service. Prevent this by checking dlen in | ||
15 | protocol_client_msg. | ||
16 | |||
17 | Fixes: CVE-2022-3165 | ||
18 | Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support") | ||
19 | Reported-by: TangPeng <tangpeng@qianxin.com> | ||
20 | Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> | ||
21 | Message-Id: <20220925204511.1103214-1-mcascell@redhat.com> | ||
22 | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> | ||
23 | --- | ||
24 | ui/vnc.c | 11 ++++++++--- | ||
25 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
26 | |||
27 | diff --git a/ui/vnc.c b/ui/vnc.c | ||
28 | index 6a05d06147..acb3629cd8 100644 | ||
29 | --- a/ui/vnc.c | ||
30 | +++ b/ui/vnc.c | ||
31 | @@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
32 | if (len == 1) { | ||
33 | return 8; | ||
34 | } | ||
35 | + uint32_t dlen = abs(read_s32(data, 4)); | ||
36 | if (len == 8) { | ||
37 | - uint32_t dlen = abs(read_s32(data, 4)); | ||
38 | if (dlen > (1 << 20)) { | ||
39 | error_report("vnc: client_cut_text msg payload has %u bytes" | ||
40 | " which exceeds our limit of 1MB.", dlen); | ||
41 | @@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len) | ||
42 | } | ||
43 | |||
44 | if (read_s32(data, 4) < 0) { | ||
45 | - vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)), | ||
46 | - read_u32(data, 8), data + 12); | ||
47 | + if (dlen < 4) { | ||
48 | + error_report("vnc: malformed payload (header less than 4 bytes)" | ||
49 | + " in extended clipboard pseudo-encoding."); | ||
50 | + vnc_client_error(vs); | ||
51 | + break; | ||
52 | + } | ||
53 | + vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12); | ||
54 | break; | ||
55 | } | ||
56 | vnc_client_cut_text(vs, read_u32(data, 4), data + 8); | ||
57 | -- | ||
58 | GitLab | ||
59 | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch new file mode 100644 index 00000000..071691f8 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP | ||
2 | |||
3 | SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark | ||
4 | it with ARM_CP_EL3_NO_EL2_KEEP. | ||
5 | |||
6 | Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL") | ||
7 | Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
8 | |||
9 | Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04515.html] | ||
10 | |||
11 | --- | ||
12 | target/arm/helper.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | Index: qemu-7.1.0/target/arm/helper.c | ||
16 | =================================================================== | ||
17 | --- qemu-7.1.0.orig/target/arm/helper.c | ||
18 | +++ qemu-7.1.0/target/arm/helper.c | ||
19 | @@ -4971,7 +4971,7 @@ static const ARMCPRegInfo v8_cp_reginfo[ | ||
20 | .fieldoffset = offsetof(CPUARMState, sp_el[0]) }, | ||
21 | { .name = "SP_EL1", .state = ARM_CP_STATE_AA64, | ||
22 | .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0, | ||
23 | - .access = PL2_RW, .type = ARM_CP_ALIAS, | ||
24 | + .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP, | ||
25 | .fieldoffset = offsetof(CPUARMState, sp_el[1]) }, | ||
26 | { .name = "SPSel", .state = ARM_CP_STATE_AA64, | ||
27 | .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0, | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin new file mode 100644 index 00000000..c4044296 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin | |||
Binary files differ | |||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch new file mode 100644 index 00000000..abad1cfe --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Avoid conflicts between sys/mount.h and linux/mount.h that are seen | ||
2 | with glibc 2.36 | ||
3 | |||
4 | Source: https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- a/linux-user/syscall.c | ||
9 | +++ b/linux-user/syscall.c | ||
10 | @@ -95,7 +95,25 @@ | ||
11 | #include <linux/soundcard.h> | ||
12 | #include <linux/kd.h> | ||
13 | #include <linux/mtio.h> | ||
14 | + | ||
15 | +#ifdef HAVE_SYS_MOUNT_FSCONFIG | ||
16 | +/* | ||
17 | + * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h, | ||
18 | + * which in turn prevents use of linux/fs.h. So we have to | ||
19 | + * define the constants ourselves for now. | ||
20 | + */ | ||
21 | +#define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
22 | +#define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
23 | +#define FS_IOC_GETVERSION _IOR('v', 1, long) | ||
24 | +#define FS_IOC_SETVERSION _IOW('v', 2, long) | ||
25 | +#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap) | ||
26 | +#define FS_IOC32_GETFLAGS _IOR('f', 1, int) | ||
27 | +#define FS_IOC32_SETFLAGS _IOW('f', 2, int) | ||
28 | +#define FS_IOC32_GETVERSION _IOR('v', 1, int) | ||
29 | +#define FS_IOC32_SETVERSION _IOW('v', 2, int) | ||
30 | +#else | ||
31 | #include <linux/fs.h> | ||
32 | +#endif | ||
33 | #include <linux/fd.h> | ||
34 | #if defined(CONFIG_FIEMAP) | ||
35 | #include <linux/fiemap.h> | ||
36 | --- a/meson.build | ||
37 | +++ b/meson.build | ||
38 | @@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET', | ||
39 | cc.has_header_symbol('getopt.h', 'optreset')) | ||
40 | config_host_data.set('HAVE_IPPROTO_MPTCP', | ||
41 | cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) | ||
42 | +config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG', | ||
43 | + cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG')) | ||
44 | |||
45 | # has_member | ||
46 | config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest new file mode 100644 index 00000000..f9a4e8fb --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | #This script is used to run qemu test suites | ||
4 | # | ||
5 | |||
6 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
7 | export SRC_PATH=$ptestdir | ||
8 | |||
9 | cd $ptestdir/tests | ||
10 | tests=$(find . -name "test-*" ! -name "*.p") | ||
11 | for f in $tests; do | ||
12 | $f | sed '/^ok/ s/ok/PASS:/g' | ||
13 | done | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc index b65a1682..bf7ad610 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc | |||
@@ -36,6 +36,8 @@ SRC_URI += "\ | |||
36 | file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \ | 36 | file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \ |
37 | file://arm-cpreg-fix.patch \ | 37 | file://arm-cpreg-fix.patch \ |
38 | file://CVE-2022-3165.patch \ | 38 | file://CVE-2022-3165.patch \ |
39 | file://qemu-guest-agent.init \ | ||
40 | file://qemu-guest-agent.udev \ | ||
39 | " | 41 | " |
40 | 42 | ||
41 | S = "${WORKDIR}/git" | 43 | S = "${WORKDIR}/git" |
@@ -47,4 +49,7 @@ PACKAGECONFIG ??= " \ | |||
47 | " | 49 | " |
48 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp" | 50 | PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp" |
49 | 51 | ||
52 | # Disable this | ||
53 | PACKAGECONFIG[debuginfo] = "" | ||
54 | |||
50 | DISABLE_STATIC:pn-${PN} = "" | 55 | DISABLE_STATIC:pn-${PN} = "" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native.inc deleted file mode 100644 index b22ab432..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native.inc +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | require recipes-devtools/qemu/qemu-native.inc | ||
2 | require qemu-xilinx.inc | ||
3 | |||
4 | DEPENDS = "glib-2.0-native zlib-native ninja-native meson-native" | ||
5 | |||
6 | SRC_URI:remove = "file://0012-fix-libcap-header-issue-on-some-distro.patch" | ||
7 | SRC_URI:remove = "file://0013-cpus.c-Add-error-messages-when-qemi_cpu_kick_thread-.patch" | ||
8 | |||
9 | do_install:append(){ | ||
10 | rm -rf ${D}${datadir}/icons | ||
11 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb new file mode 100644 index 00000000..d3e1920a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
19 | |||
20 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb new file mode 100644 index 00000000..586c0a7a --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require qemu-xilinx-native-7.1.inc | ||
3 | require qemu-native-alt.inc | ||
4 | |||
5 | BPN = "qemu-xilinx" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | ||
19 | |||
20 | PACKAGECONFIG ??= "pie" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb index 06711fd9..796c4700 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb | |||
@@ -4,6 +4,17 @@ require qemu-native-alt.inc | |||
4 | 4 | ||
5 | BPN = "qemu-xilinx" | 5 | BPN = "qemu-xilinx" |
6 | 6 | ||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
7 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" | 18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" |
8 | 19 | ||
9 | PACKAGECONFIG ??= "pie" | 20 | PACKAGECONFIG ??= "pie" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb new file mode 100644 index 00000000..6b98c6a9 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.1.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
19 | |||
20 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
21 | |||
22 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
23 | |||
24 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
25 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
26 | |||
27 | do_install:append() { | ||
28 | # The following is also installed by qemu-native | ||
29 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
30 | rm -rf ${D}${datadir}/qemu/keymaps | ||
31 | rm -rf ${D}${datadir}/icons | ||
32 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
33 | |||
34 | # Install qmp.py to be used with testimage | ||
35 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
36 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
37 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb new file mode 100644 index 00000000..fd4ddd40 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | require qemu-system-native-alt.inc | ||
2 | require qemu-xilinx-2022.2.inc | ||
3 | require qemu-xilinx-native-7.1.inc | ||
4 | |||
5 | PROVIDES = "qemu-system-native" | ||
6 | |||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | ||
19 | |||
20 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | ||
21 | |||
22 | PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" | ||
23 | |||
24 | DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" | ||
25 | DEPENDS += "qemu-xilinx-multiarch-helper-native" | ||
26 | |||
27 | do_install:append() { | ||
28 | # The following is also installed by qemu-native | ||
29 | rm -f ${D}${datadir}/qemu/trace-events-all | ||
30 | rm -rf ${D}${datadir}/qemu/keymaps | ||
31 | rm -rf ${D}${datadir}/icons | ||
32 | rm -rf ${D}${includedir}/qemu-plugin.h | ||
33 | |||
34 | # Install qmp.py to be used with testimage | ||
35 | install -d ${D}${libdir}/qemu-python/qmp/ | ||
36 | install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/ | ||
37 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb index 1e738530..09a7a5f5 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb | |||
@@ -4,6 +4,17 @@ require qemu-xilinx-native-7.1.inc | |||
4 | 4 | ||
5 | PROVIDES = "qemu-system-native" | 5 | PROVIDES = "qemu-system-native" |
6 | 6 | ||
7 | # Latest poky has changed the defaults, restore them to something compatible | ||
8 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
9 | EXTRA_OECONF:remove = "--disable-download" | ||
10 | EXTRA_OECONF:remove = "--disable-docs" | ||
11 | |||
12 | EXTRA_OECONF:append = "\ | ||
13 | --with-git=/bin/false \ | ||
14 | --with-git-submodules=ignore \ | ||
15 | --meson=meson \ | ||
16 | " | ||
17 | |||
7 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | 18 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" |
8 | 19 | ||
9 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" | 20 | PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp" |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx.inc b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx.inc deleted file mode 100644 index 788a3fe0..00000000 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx.inc +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | SUMMARY = "Xilinx's fork of a fast open source processor emulator" | ||
2 | HOMEPAGE = "https://github.com/xilinx/qemu/" | ||
3 | |||
4 | # x86_64 is needed to build nativesdks | ||
5 | QEMU_TARGETS = "aarch64 arm microblaze microblazeel x86_64" | ||
6 | |||
7 | LIC_FILES_CHKSUM = " \ | ||
8 | file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ | ||
9 | file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \ | ||
10 | " | ||
11 | DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" | ||
12 | |||
13 | FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-6.1.0:" | ||
14 | |||
15 | PV = "${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
16 | REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = "${REPO};${BRANCHARG}" | ||
20 | |||
21 | SRC_URI:append = " file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch" | ||
22 | |||
23 | S = "${WORKDIR}/git" | ||
24 | |||
25 | # Disable KVM completely | ||
26 | PACKAGECONFIG:remove = "kvm" | ||
27 | PACKAGECONFIG:append = " fdt sdl gcrypt pie slirp" | ||
28 | |||
29 | |||
30 | # Remove when version is in sync with core oe-core | ||
31 | PACKAGECONFIG:remove:class-nativesdk= "pulsedio" | ||
32 | PACKAGECONFIG:remove:class-native = "pulsedio" | ||
33 | PACKAGECONFIG[alsa] = "--audio-drv-list=alsa,,alsa-lib" | ||
34 | PACKAGECONFIG[pulsedio] = "--audio-drv-list=pa,,pulseaudio" | ||
35 | PACKAGECONFIG[selinux] = "" | ||
36 | PACKAGECONFIG[slirp] = "--enable-slirp=git,--disable-slirp,," | ||
37 | PACKAGECONFIG[jack] = "" | ||
38 | |||
39 | DISABLE_STATIC:pn-${PN} = "" | ||
40 | |||
41 | do_install:append() { | ||
42 | # Prevent QA warnings about installed ${localstatedir}/run | ||
43 | if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi | ||
44 | } | ||
45 | |||
46 | FILES:${PN} += "${datadir}/qemu/" | ||
47 | FILES:${PN}:append:class-nativesdk:mingw32 = " ${SDKPATHNATIVE}" | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb new file mode 100644 index 00000000..e3ed8a2f --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb | |||
@@ -0,0 +1,37 @@ | |||
1 | require qemu-xilinx-2022.1.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
9 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
10 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
11 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
12 | |||
13 | BBCLASSEXTEND = "nativesdk" | ||
14 | |||
15 | RDEPENDS:${PN}:class-target += "bash" | ||
16 | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
19 | |||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | |||
25 | EXTRA_OECONF:append = "\ | ||
26 | --with-git=/bin/false \ | ||
27 | --with-git-submodules=ignore \ | ||
28 | --meson=meson \ | ||
29 | " | ||
30 | |||
31 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
32 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
33 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
34 | |||
35 | do_install:append:class-nativesdk() { | ||
36 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
37 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb new file mode 100644 index 00000000..44be50c2 --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | require qemu-xilinx-2022.2.inc | ||
2 | require recipes-devtools/qemu/qemu.inc | ||
3 | require qemu-xilinx-7.1.inc | ||
4 | require qemu-alt.inc | ||
5 | |||
6 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
7 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
8 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
9 | PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
10 | |||
11 | BBCLASSEXTEND = "nativesdk" | ||
12 | |||
13 | RDEPENDS:${PN}:class-target += "bash" | ||
14 | |||
15 | PROVIDES:class-nativesdk = "nativesdk-qemu" | ||
16 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | ||
17 | |||
18 | # Latest poky has changed the defaults, restore them to something compatible | ||
19 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
20 | EXTRA_OECONF:remove = "--disable-download" | ||
21 | EXTRA_OECONF:remove = "--disable-docs" | ||
22 | |||
23 | EXTRA_OECONF:append = "\ | ||
24 | --with-git=/bin/false \ | ||
25 | --with-git-submodules=ignore \ | ||
26 | --meson=meson \ | ||
27 | " | ||
28 | |||
29 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | ||
30 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | ||
31 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | ||
32 | |||
33 | do_install:append:class-nativesdk() { | ||
34 | ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} | ||
35 | } | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb index 3b12d161..fd7d3b4e 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb | |||
@@ -17,6 +17,17 @@ RDEPENDS:${PN}:class-target += "bash" | |||
17 | PROVIDES:class-nativesdk = "nativesdk-qemu" | 17 | PROVIDES:class-nativesdk = "nativesdk-qemu" |
18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" | 18 | RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" |
19 | 19 | ||
20 | # Latest poky has changed the defaults, restore them to something compatible | ||
21 | # with this QEMU. When we update to QEMU 8.x this won't be necessary. | ||
22 | EXTRA_OECONF:remove = "--disable-download" | ||
23 | EXTRA_OECONF:remove = "--disable-docs" | ||
24 | |||
25 | EXTRA_OECONF:append = "\ | ||
26 | --with-git=/bin/false \ | ||
27 | --with-git-submodules=ignore \ | ||
28 | --meson=meson \ | ||
29 | " | ||
30 | |||
20 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" | 31 | EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" |
21 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | 32 | EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" |
22 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | 33 | EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" |
diff --git a/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch b/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch index 97f51f03..08252db0 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch +++ b/meta-xilinx-core/recipes-graphics/mesa/files/0001-DRI_Add_xlnx_dri.patch | |||
@@ -2,6 +2,8 @@ DRI: Add xlnx dri | |||
2 | 2 | ||
3 | Add the Xilinx dri target | 3 | Add the Xilinx dri target |
4 | 4 | ||
5 | Upstream-Status: Pending | ||
6 | |||
5 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | 7 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
6 | 8 | ||
7 | diff -ur mesa-22.2.0.orig/src/gallium/targets/dri/meson.build mesa-22.2.0/src/gallium/targets/dri/meson.build | 9 | diff -ur mesa-22.2.0.orig/src/gallium/targets/dri/meson.build mesa-22.2.0/src/gallium/targets/dri/meson.build |
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch index fc2108e1..fdb30564 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0001-src-egl-eglinfo-Align-EXT_platform_device-extension-.patch | |||
@@ -8,7 +8,7 @@ Although the macro definitions are consistent, using the macros name | |||
8 | defined under khronos makes it backward compatible with older eglext.h | 8 | defined under khronos makes it backward compatible with older eglext.h |
9 | 9 | ||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | 10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
11 | upstream-status: Inappropriate [Xilinx specific] | 11 | Upstream-Status: Inappropriate [Xilinx specific] |
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | 12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
13 | --- | 13 | --- |
14 | src/egl/opengl/eglinfo.c | 6 +++--- | 14 | src/egl/opengl/eglinfo.c | 6 +++--- |
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch index 4453b63e..7212ef27 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/0002-src-egl-eglinfo-Use-EGL_PLATFORM_DEVICE_EXT-only-if-.patch | |||
@@ -8,7 +8,7 @@ Compiling against the other EGL provider like mali fails, as they dont | |||
8 | support this macro as one of thier supported platforms | 8 | support this macro as one of thier supported platforms |
9 | 9 | ||
10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | 10 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
11 | upstream-status: Inappropritate [Xilinx specific] | 11 | Upstream-Status: Inappropriate [Xilinx specific] |
12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | 12 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> |
13 | --- | 13 | --- |
14 | src/egl/opengl/eglinfo.c | 4 ++++ | 14 | src/egl/opengl/eglinfo.c | 4 ++++ |
diff --git a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch index 19248bb3..6cfecb38 100644 --- a/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch +++ b/meta-xilinx-core/recipes-graphics/mesa/mesa-demos/libmali-egl-workaround.patch | |||
@@ -1,3 +1,5 @@ | |||
1 | Upstream-Status: Inappropriate [libmali specific] | ||
2 | |||
1 | Index: mesa-demos-8.5.0/src/egl/opengl/eglinfo.c | 3 | Index: mesa-demos-8.5.0/src/egl/opengl/eglinfo.c |
2 | =================================================================== | 4 | =================================================================== |
3 | --- mesa-demos-8.5.0.orig/src/egl/opengl/eglinfo.c | 5 | --- mesa-demos-8.5.0.orig/src/egl/opengl/eglinfo.c |
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch index 33d33b0f..2713de2d 100644 --- a/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch +++ b/meta-xilinx-core/recipes-graphics/wayland/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch | |||
@@ -7,23 +7,24 @@ Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same | |||
7 | as opaque substitute. | 7 | as opaque substitute. |
8 | 8 | ||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | 9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
10 | Upstream-Status : Inappropriate [Xilinx specific] | 10 | Upstream-Status: Inappropriate [Xilinx specific] |
11 | |||
12 | Reworked the patch for the newer weston | ||
13 | |||
14 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
11 | --- | 15 | --- |
12 | libweston/pixel-formats.c | 1 - | 16 | libweston/pixel-formats.c | 1 - |
13 | 1 file changed, 1 deletion(-) | 17 | 1 file changed, 1 deletion(-) |
14 | 18 | ||
15 | diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c | 19 | Index: weston-11.0.1/libweston/pixel-formats.c |
16 | index 79dc709..ec2d3b7 100644 | 20 | =================================================================== |
17 | --- a/libweston/pixel-formats.c | 21 | --- weston-11.0.1.orig/libweston/pixel-formats.c |
18 | +++ b/libweston/pixel-formats.c | 22 | +++ weston-11.0.1/libweston/pixel-formats.c |
19 | @@ -193,7 +193,6 @@ static const struct pixel_format_info pixel_format_table[] = { | 23 | @@ -247,7 +247,6 @@ static const struct pixel_format_info pi |
20 | { | 24 | { |
21 | DRM_FORMAT(ARGB8888), | 25 | DRM_FORMAT(ARGB8888), |
22 | BITS_RGBA_FIXED(8, 8, 8, 8), | 26 | BITS_RGBA_FIXED(8, 8, 8, 8), |
23 | - .opaque_substitute = DRM_FORMAT_XRGB8888, | 27 | - .opaque_substitute = DRM_FORMAT_XRGB8888, |
24 | .depth = 32, | 28 | .addfb_legacy_depth = 32, |
25 | .bpp = 32, | 29 | .bpp = 32, |
26 | GL_FORMAT(GL_BGRA_EXT), | 30 | GL_FORMAT(GL_BGRA_EXT), |
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch new file mode 100644 index 00000000..6b5f53b0 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/files/9.0.0/0001-libweston-Remove-substitute-format-for-ARGB8888.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 3fbb596e53524e78703b76c4fdc33cd6ac62f777 Mon Sep 17 00:00:00 2001 | ||
2 | From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
3 | Date: Fri, 11 Dec 2020 16:21:38 -0800 | ||
4 | Subject: [PATCH] libweston: Remove substitute format for ARGB8888 | ||
5 | |||
6 | Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same | ||
7 | as opaque substitute. | ||
8 | |||
9 | Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> | ||
10 | Upstream-Status: Inappropriate [Xilinx specific] | ||
11 | --- | ||
12 | libweston/pixel-formats.c | 1 - | ||
13 | 1 file changed, 1 deletion(-) | ||
14 | |||
15 | diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c | ||
16 | index 79dc709..ec2d3b7 100644 | ||
17 | --- a/libweston/pixel-formats.c | ||
18 | +++ b/libweston/pixel-formats.c | ||
19 | @@ -193,7 +193,6 @@ static const struct pixel_format_info pixel_format_table[] = { | ||
20 | { | ||
21 | DRM_FORMAT(ARGB8888), | ||
22 | BITS_RGBA_FIXED(8, 8, 8, 8), | ||
23 | - .opaque_substitute = DRM_FORMAT_XRGB8888, | ||
24 | .depth = 32, | ||
25 | .bpp = 32, | ||
26 | GL_FORMAT(GL_BGRA_EXT), | ||
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston.inc b/meta-xilinx-core/recipes-graphics/wayland/weston.inc new file mode 100644 index 00000000..fadc9486 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston.inc | |||
@@ -0,0 +1,15 @@ | |||
1 | SRC_URI:append:zynqmp = " file://0001-libweston-Remove-substitute-format-for-ARGB8888.patch" | ||
2 | |||
3 | # Due to the SRC_URI zynqmp specific change, this needs to be SOC_FAMILY_ARCH specific | ||
4 | SOC_FAMILY_ARCH ??= "${TUNE_PKGARCH}" | ||
5 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
6 | DEFAULT_PACKAGE_ARCH:zynqmp = "${SOC_FAMILY_ARCH}" | ||
7 | PACKAGE_ARCH = "${DEFAULT_PACKAGE_ARCH}" | ||
8 | |||
9 | |||
10 | # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific | ||
11 | DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}" | ||
12 | MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH" | ||
13 | MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else '${DEFAULT_PACKAGE_ARCH}'}" | ||
14 | PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH" | ||
15 | PACKAGE_ARCH = "${@bb.utils.contains_any('DEPENDS', 'virtual/libgles1 virtual/libgles2 virtual/egl virtual/libgbm', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}" | ||
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_12.%.bbappend index 18396c5e..3ee9cafa 100644 --- a/meta-xilinx-core/recipes-graphics/wayland/weston_10.0.2.bbappend +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_12.%.bbappend | |||
@@ -1,8 +1,12 @@ | |||
1 | FILESEXTRAPATHS:prepend:zynqmp := "${THISDIR}/files:" | ||
2 | |||
3 | require weston.inc | ||
4 | |||
1 | ZYNQMP_WARN_DEFAULT = "0" | 5 | ZYNQMP_WARN_DEFAULT = "0" |
2 | ZYNQMP_WARN_DEFAULT:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '0', d)}" | 6 | ZYNQMP_WARN_DEFAULT:zynqmp = "${@bb.utils.contains('DISTRO_FEATURES', 'libmali', '1', '0', d)}" |
3 | ZYNQMP_WARN = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${ZYNQMP_WARN_DEFAULT}', '0', d)}" | 7 | ZYNQMP_WARN = "${@bb.utils.contains('MACHINE_FEATURES', 'mali400', '${ZYNQMP_WARN_DEFAULT}', '0', d)}" |
4 | 8 | ||
5 | python() { | 9 | python() { |
6 | if d.getVar('ZYNQMP_WARN') == "1": | 10 | if d.getVar('ZYNQMP_WARN') == "1": |
7 | raise bb.parse.SkipRecipe("Weston 10.0.0.2 requires GLES 3 interfaces which are not available when libmali enabled. Use Weston 9.0.0.0 instead.") | 11 | raise bb.parse.SkipRecipe("Weston %s requires GLES 3 interfaces which are not available when libmali enabled. Use Weston 9.0.0.0 instead." % (d.getVar('PV'))) |
8 | } | 12 | } |
diff --git a/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend new file mode 100644 index 00000000..80512ac3 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/wayland/weston_9.0.0.bbappend | |||
@@ -0,0 +1,3 @@ | |||
1 | FILESEXTRAPATHS:prepend:zynqmp := "${THISDIR}/files/9.0.0:${THISDIR}/files:" | ||
2 | |||
3 | require weston.inc | ||
diff --git a/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb new file mode 100644 index 00000000..dda6ec31 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/dp/kernel-module-dp_2022.2.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Xilinx DisplayPort Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree DisplayPort(DP) kernel modules provider for aarch64 devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XLNX_DP_VERSION = "5.10.0" | ||
8 | PV = "${XLNX_DP_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2022.2" | ||
13 | REPO ?= "git://github.com/xilinx/dp-modules.git;protocol=https" | ||
14 | SRCREV ?= "c57b2ce95ee6c86f35caecbc7007644ff8f6d337" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb new file mode 100644 index 00000000..c1f66013 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/hdmi/kernel-module-hdmi_2022.2.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Xilinx HDMI Linux Kernel module" | ||
2 | DESCRIPTION = "Out-of-tree HDMI kernel modules provider for MPSoC EG/EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=b34277fe156508fd5a650609dc36d1fe" | ||
6 | |||
7 | XLNX_HDMI_VERSION = "5.15.19" | ||
8 | PV = "${XLNX_HDMI_VERSION}+xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | BRANCH ?= "xlnx_rel_v2022.2" | ||
13 | REPO ?= "git://github.com/Xilinx/hdmi-modules.git;protocol=https" | ||
14 | SRCREV = "25b6fe7a26a975be15c002b48cfd4c291486491e" | ||
15 | |||
16 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
17 | SRC_URI = "${REPO};${BRANCHARG}" | ||
18 | |||
19 | inherit module | ||
20 | |||
21 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
22 | COMPATIBLE_MACHINE = "^$" | ||
23 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
24 | COMPATIBLE_MACHINE:versal = "versal" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch new file mode 100644 index 00000000..5a4d203d --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx/mb-no-tree-loop-distribute-patterns.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | Disable tree-loop-distribute-patterns CFLAG | ||
2 | |||
3 | Issue: CR-1086247 | ||
4 | |||
5 | GCC 10.2.0 added -ftree-loop-distribute-patterns by default with -O2. This | ||
6 | is causing a condition where the kernel will no longer boot. | ||
7 | |||
8 | This is a temporary workaround until we can identify the true cause of | ||
9 | the boot failure. | ||
10 | |||
11 | Symtoms: | ||
12 | |||
13 | earlycon: uartlite_a0 at MMIO 0x40600000 (options '115200n8') | ||
14 | printk: bootconsole [uartlite_a0] enabled | ||
15 | cma: Reserved 16 MiB at 0xaec00000 | ||
16 | Linux version 5.10.0-xilinx-v2020.2 (oe-user@oe-host) (microblazeel-xilinx-linux-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35.0.20200730) #1 Mon Mar 1 12:58:36 UTC 2021 | ||
17 | setup_memory: max_mapnr: 0x40000 | ||
18 | setup_memory: min_low_pfn: 0x80000 | ||
19 | setup_memory: max_low_pfn: 0xb0000 | ||
20 | setup_memory: max_pfn: 0xc0000 | ||
21 | Zone ranges: | ||
22 | DMA [mem 0x0000000080000000-0x00000000afffffff] | ||
23 | Normal empty | ||
24 | HighMem [mem 0x00000000b0000000-0x00000000bfffffff] | ||
25 | Movable zone start for each node | ||
26 | Early memory node ranges | ||
27 | node 0: [mem 0x0000000080000000-0x00000000bfffffff] | ||
28 | Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff] | ||
29 | <hang> | ||
30 | |||
31 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
32 | |||
33 | diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile | ||
34 | index bb980891816d..e368c35ad21c 100644 | ||
35 | --- a/arch/microblaze/Makefile | ||
36 | +++ b/arch/microblaze/Makefile | ||
37 | @@ -48,6 +48,10 @@ CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER)) | ||
38 | # r31 holds current when in kernel mode | ||
39 | KBUILD_CFLAGS += -ffixed-r31 $(CPUFLAGS-y) $(CPUFLAGS-1) $(CPUFLAGS-2) | ||
40 | |||
41 | +# GCC 10.x now has -ftree-loop-distribute-patterns by default in -O2 | ||
42 | +# This causes a boot failure, so disable it | ||
43 | +KBUILD_CFLAGS += -fno-tree-loop-distribute-patterns | ||
44 | + | ||
45 | head-y := arch/microblaze/kernel/head.o | ||
46 | libs-y += arch/microblaze/lib/ | ||
47 | core-y += arch/microblaze/kernel/ | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb new file mode 100644 index 00000000..41c1ffe2 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.1.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | LINUX_VERSION = "5.15.19" | ||
2 | KBRANCH="xlnx_rebase_v5.15_LTS_2022.1_update" | ||
3 | SRCREV = "75872fda9ad270b611ee6ae2433492da1e22b688" | ||
4 | |||
5 | KCONF_AUDIT_LEVEL="0" | ||
6 | |||
7 | include linux-xlnx.inc | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb new file mode 100644 index 00000000..260224b8 --- /dev/null +++ b/meta-xilinx-core/recipes-kernel/linux/linux-xlnx_2022.2.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | LINUX_VERSION = "5.15.36" | ||
2 | KBRANCH="xlnx_rebase_v5.15_LTS" | ||
3 | SRCREV = "19984dd147fa7fbb7cb14b17400263ad0925c189" | ||
4 | |||
5 | KCONF_AUDIT_LEVEL="0" | ||
6 | |||
7 | include linux-xlnx.inc | ||
8 | |||
9 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Current-gcc-requires-cstdint-for-C-types.patch b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Current-gcc-requires-cstdint-for-C-types.patch new file mode 100644 index 00000000..defe14dc --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Current-gcc-requires-cstdint-for-C-types.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 2316632e8f3eefc21bc4f9cb97be4603b4c14719 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 28 Sep 2023 12:24:04 -0600 | ||
4 | Subject: [PATCH] Current gcc requires cstdint for C types | ||
5 | |||
6 | Add #include <cstdint> to resolve the issues similar to the following: | ||
7 | |||
8 | module/module_structs.h:259:3: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? | ||
9 | module/module_structs.h:260:3: error: 'uint16_t' does not name a type | ||
10 | |||
11 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
12 | --- | ||
13 | exe_omx/encoder/EncCmdMngr.h | 1 + | ||
14 | module/module_structs.h | 1 + | ||
15 | utility/processor_fifo.h | 1 + | ||
16 | 3 files changed, 3 insertions(+) | ||
17 | |||
18 | diff --git a/exe_omx/encoder/EncCmdMngr.h b/exe_omx/encoder/EncCmdMngr.h | ||
19 | index 6dacd68..cd3d0a6 100644 | ||
20 | --- a/exe_omx/encoder/EncCmdMngr.h | ||
21 | +++ b/exe_omx/encoder/EncCmdMngr.h | ||
22 | @@ -7,6 +7,7 @@ | ||
23 | #include <iostream> | ||
24 | #include <string> | ||
25 | #include <vector> | ||
26 | +#include <cstdint> | ||
27 | |||
28 | #include "ICommandsSender.h" | ||
29 | |||
30 | diff --git a/module/module_structs.h b/module/module_structs.h | ||
31 | index 7151b86..37ff8ac 100644 | ||
32 | --- a/module/module_structs.h | ||
33 | +++ b/module/module_structs.h | ||
34 | @@ -6,6 +6,7 @@ | ||
35 | #include "module_enums.h" | ||
36 | #include <string> | ||
37 | #include <vector> | ||
38 | +#include <cstdint> | ||
39 | |||
40 | template<typename T> | ||
41 | struct InputOutput | ||
42 | diff --git a/utility/processor_fifo.h b/utility/processor_fifo.h | ||
43 | index 1c62ba4..3c9cd86 100644 | ||
44 | --- a/utility/processor_fifo.h | ||
45 | +++ b/utility/processor_fifo.h | ||
46 | @@ -6,6 +6,7 @@ | ||
47 | #include <utility/locked_queue.h> | ||
48 | #include <thread> | ||
49 | #include <functional> | ||
50 | +#include <string> | ||
51 | |||
52 | #if defined __linux__ | ||
53 | #include <sys/prctl.h> | ||
54 | -- | ||
55 | 2.34.1 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch new file mode 100644 index 00000000..788edd03 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/files/0001-Support-updated-gcc-add-cstdint-where-necessary.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From b58c0a7dd0eeb16b2251edfad3b4763ce5653ea2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Hatle <mark.hatle@amd.com> | ||
3 | Date: Thu, 28 Sep 2023 12:04:34 -0600 | ||
4 | Subject: [PATCH] Support updated gcc, add cstdint where necessary | ||
5 | |||
6 | With the latest gcc, cstdint is now needs to be explicitly included, otherwise | ||
7 | errors similar to the following will occur: | ||
8 | |||
9 | include/lib_app/Parser.h:413:36: error: 'uint32_t' has not been declared | ||
10 | 413 | static void resetFlag(T* bitfield, uint32_t uFlag) | ||
11 | | ^~~~~~~~ | ||
12 | include/lib_app/Parser.h: In function 'void resetFlag(T*, int)': | ||
13 | include/lib_app/Parser.h:415:20: error: 'uint32_t' was not declared in this scope | ||
14 | 415 | *bitfield = (T)((uint32_t)*bitfield & ~uFlag); | ||
15 | | ^~~~~~~~ | ||
16 | include/lib_app/Parser.h:18:1: note: 'uint32_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? | ||
17 | 17 | #include <iomanip> | ||
18 | +++ |+#include <cstdint> | ||
19 | 18 | | ||
20 | |||
21 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
22 | --- | ||
23 | exe_encoder/EncCmdMngr.h | 1 + | ||
24 | include/lib_app/Parser.h | 1 + | ||
25 | 2 files changed, 2 insertions(+) | ||
26 | |||
27 | diff --git a/exe_encoder/EncCmdMngr.h b/exe_encoder/EncCmdMngr.h | ||
28 | index 6dacd68..cd3d0a6 100644 | ||
29 | --- a/exe_encoder/EncCmdMngr.h | ||
30 | +++ b/exe_encoder/EncCmdMngr.h | ||
31 | @@ -7,6 +7,7 @@ | ||
32 | #include <iostream> | ||
33 | #include <string> | ||
34 | #include <vector> | ||
35 | +#include <cstdint> | ||
36 | |||
37 | #include "ICommandsSender.h" | ||
38 | |||
39 | diff --git a/include/lib_app/Parser.h b/include/lib_app/Parser.h | ||
40 | index efb7f94..66d5164 100644 | ||
41 | --- a/include/lib_app/Parser.h | ||
42 | +++ b/include/lib_app/Parser.h | ||
43 | @@ -15,6 +15,7 @@ | ||
44 | #include <sstream> | ||
45 | #include <vector> | ||
46 | #include <iomanip> | ||
47 | +#include <cstdint> | ||
48 | |||
49 | std::deque<Token> toReversePolish(std::deque<Token>& tokens); | ||
50 | std::string parseString(std::deque<Token>& tokens); | ||
51 | -- | ||
52 | 2.34.1 | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb new file mode 100644 index 00000000..7ef1d5fd --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.1.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2022.1" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "9d2657550eccebccce08cacfcdd369367b9f6be4" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb new file mode 100644 index 00000000..b1c96d3c --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/kernel-module-vcu_2022.2.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Linux kernel module for Video Code Unit" | ||
2 | DESCRIPTION = "Out-of-tree VCU decoder, encoder and common kernel modules provider for MPSoC EV devices" | ||
3 | SECTION = "kernel/modules" | ||
4 | LICENSE = "GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | XILINX_VCU_VERSION = "1.0.0" | ||
8 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
13 | |||
14 | BRANCH = "xlnx_rel_v2022.2" | ||
15 | REPO = "git://github.com/Xilinx/vcu-modules.git;protocol=https" | ||
16 | SRCREV = "b131e220285e06658b6ab27f9e19b1c592a55f3a" | ||
17 | |||
18 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
19 | SRC_URI = " \ | ||
20 | ${REPO};${BRANCHARG} \ | ||
21 | file://99-vcu-enc-dec.rules \ | ||
22 | " | ||
23 | |||
24 | inherit module features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
27 | |||
28 | EXTRA_OEMAKE += "O=${STAGING_KERNEL_BUILDDIR}" | ||
29 | |||
30 | RDEPENDS:${PN} = "vcu-firmware" | ||
31 | |||
32 | KERNEL_MODULE_AUTOLOAD += "dmaproxy" | ||
33 | |||
34 | do_install:append() { | ||
35 | install -d ${D}${sysconfdir}/udev/rules.d | ||
36 | install -m 0644 ${WORKDIR}/99-vcu-enc-dec.rules ${D}${sysconfdir}/udev/rules.d/ | ||
37 | } | ||
38 | |||
39 | FILES:${PN} = "${sysconfdir}/udev/rules.d/*" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb new file mode 100644 index 00000000..47c521c4 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.1.bb | |||
@@ -0,0 +1,51 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "b3308c608be7ed9250b9c6732f6e0a02b1a2e985" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | DEPENDS = "libvcu-xlnx" | ||
25 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
26 | |||
27 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
28 | |||
29 | EXTRA_OEMAKE = " \ | ||
30 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
31 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
32 | " | ||
33 | |||
34 | do_install() { | ||
35 | install -d ${D}${libdir} | ||
36 | install -d ${D}${includedir}/vcu-omx-il | ||
37 | |||
38 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
39 | |||
40 | install -Dm 0755 ${S}/bin/omx_decoder ${D}/${bindir}/omx_decoder | ||
41 | install -Dm 0755 ${S}/bin/omx_encoder ${D}/${bindir}/omx_encoder | ||
42 | |||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
45 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
46 | } | ||
47 | |||
48 | # These libraries shouldn't get installed in world builds unless something | ||
49 | # explicitly depends upon them. | ||
50 | |||
51 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb new file mode 100644 index 00000000..c5b956bc --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2022.2.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | SUMMARY = "OpenMAX Integration layer for VCU" | ||
2 | DESCRIPTION = "OMX IL Libraries,test applications and headers for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-omx-il.git;protocol=https" | ||
11 | SRCREV = "6752f5da88a8783f689ae762065295b89902d6d4" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | COMPATIBLE_MACHINE = "^$" | ||
19 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | DEPENDS = "libvcu-xlnx" | ||
24 | RDEPENDS:${PN} = "kernel-module-vcu libvcu-xlnx" | ||
25 | |||
26 | EXTERNAL_INCLUDE="${STAGING_INCDIR}/vcu-ctrl-sw/include" | ||
27 | |||
28 | EXTRA_OEMAKE = " \ | ||
29 | CC='${CC}' CXX='${CXX} ${CXXFLAGS}' \ | ||
30 | EXTERNAL_INCLUDE='${EXTERNAL_INCLUDE}' \ | ||
31 | " | ||
32 | |||
33 | do_install() { | ||
34 | install -d ${D}${libdir} | ||
35 | install -d ${D}${includedir}/vcu-omx-il | ||
36 | |||
37 | install -m 0644 ${S}/omx_header/*.h ${D}${includedir}/vcu-omx-il | ||
38 | |||
39 | install -Dm 0755 ${S}/bin/omx_decoder ${D}/${bindir}/omx_decoder | ||
40 | install -Dm 0755 ${S}/bin/omx_encoder ${D}/${bindir}/omx_encoder | ||
41 | |||
42 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.core ${D}/${libdir}/ | ||
43 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_decoder ${D}/${libdir}/ | ||
44 | oe_libinstall -C ${S}/bin/ -so libOMX.allegro.video_encoder ${D}/${libdir}/ | ||
45 | } | ||
46 | |||
47 | # These libraries shouldn't get installed in world builds unless something | ||
48 | # explicitly depends upon them. | ||
49 | |||
50 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb index 3c258008..75a05fed 100644 --- a/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vcu/libomxil-xlnx_2023.1.bb | |||
@@ -13,6 +13,8 @@ SRCREV = "4773b372b72b88ccbabc122b023f042fb22a019e" | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
14 | SRC_URI = "${REPO};${BRANCHARG}" | 14 | SRC_URI = "${REPO};${BRANCHARG}" |
15 | 15 | ||
16 | SRC_URI += "file://0001-Current-gcc-requires-cstdint-for-C-types.patch" | ||
17 | |||
16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
17 | 19 | ||
18 | inherit features_check | 20 | inherit features_check |
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb new file mode 100644 index 00000000..71e6e572 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.1.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.1" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "5bf158af204b181f00ac009c8745557642ecfe5f" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | install -Dm 0755 ${S}/bin/ctrlsw_encoder ${D}/${bindir}/ctrlsw_encoder | ||
33 | install -Dm 0755 ${S}/bin/ctrlsw_decoder ${D}/${bindir}/ctrlsw_decoder | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | # These libraries shouldn't get installed in world builds unless something | ||
41 | # explicitly depends upon them. | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||
44 | |||
45 | # Disable buildpaths QA check warnings. | ||
46 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb new file mode 100644 index 00000000..130d79bc --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2022.2.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SUMMARY = "Control Software for VCU" | ||
2 | DESCRIPTION = "Control software libraries, test applications and headers provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=03a7aef7e6f6a76a59fd9b8ba450b493" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | BRANCH ?= "xlnx_rel_v2022.2" | ||
10 | REPO ?= "git://github.com/Xilinx/vcu-ctrl-sw.git;protocol=https" | ||
11 | SRCREV = "3c59dede1923a159a8db736ce0b4ab55633a2114" | ||
12 | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
14 | SRC_URI = "${REPO};${BRANCHARG}" | ||
15 | |||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | RDEPENDS:${PN} = "kernel-module-vcu" | ||
25 | |||
26 | EXTRA_OEMAKE = "CC='${CC}' CXX='${CXX} ${CXXFLAGS}'" | ||
27 | |||
28 | do_install() { | ||
29 | install -d ${D}${libdir} | ||
30 | install -d ${D}${includedir}/vcu-ctrl-sw/include | ||
31 | |||
32 | install -Dm 0755 ${S}/bin/ctrlsw_encoder ${D}/${bindir}/ctrlsw_encoder | ||
33 | install -Dm 0755 ${S}/bin/ctrlsw_decoder ${D}/${bindir}/ctrlsw_decoder | ||
34 | |||
35 | oe_runmake install_headers INSTALL_HDR_PATH=${D}${includedir}/vcu-ctrl-sw/include | ||
36 | oe_libinstall -C ${S}/bin/ -so liballegro_decode ${D}/${libdir}/ | ||
37 | oe_libinstall -C ${S}/bin/ -so liballegro_encode ${D}/${libdir}/ | ||
38 | } | ||
39 | |||
40 | # These libraries shouldn't get installed in world builds unless something | ||
41 | # explicitly depends upon them. | ||
42 | |||
43 | EXCLUDE_FROM_WORLD = "1" | ||
44 | |||
45 | # Disable buildpaths QA check warnings. | ||
46 | INSANE_SKIP:${PN} += "buildpaths" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb index 7dc97d72..53a03f45 100644 --- a/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vcu/libvcu-xlnx_2023.1.bb | |||
@@ -13,6 +13,8 @@ SRCREV = "83aabb84c26667f7d6aee632654c63e504838061" | |||
13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | 13 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" |
14 | SRC_URI = "${REPO};${BRANCHARG}" | 14 | SRC_URI = "${REPO};${BRANCHARG}" |
15 | 15 | ||
16 | SRC_URI += "file://0001-Support-updated-gcc-add-cstdint-where-necessary.patch" | ||
17 | |||
16 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
17 | 19 | ||
18 | inherit features_check | 20 | inherit features_check |
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb new file mode 100644 index 00000000..c5c2b045 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.1.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=63b45903a9a50120df488435f03cf498" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2022.1" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "569f980527fd58f43baf16bd0b294bf8c7cdf963" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | do_install() { | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}/lib/firmware/al5d_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}/lib/firmware/al5d.fw | ||
27 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}/lib/firmware/al5e_b.fw | ||
28 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}/lib/firmware/al5e.fw | ||
29 | } | ||
30 | |||
31 | # Inhibit warnings about files being stripped | ||
32 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
33 | INHIBIT_PACKAGE_STRIP = "1" | ||
34 | FILES:${PN} = "/lib/firmware/*" | ||
35 | |||
36 | # These libraries shouldn't get installed in world builds unless something | ||
37 | # explicitly depends upon them. | ||
38 | EXCLUDE_FROM_WORLD = "1" | ||
39 | |||
40 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb new file mode 100644 index 00000000..594a94c3 --- /dev/null +++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2022.2.bb | |||
@@ -0,0 +1,40 @@ | |||
1 | SUMMARY = "Firmware for VCU" | ||
2 | DESCRIPTION = "Firmware binaries provider for VCU" | ||
3 | LICENSE = "Proprietary" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=63b45903a9a50120df488435f03cf498" | ||
5 | |||
6 | XILINX_VCU_VERSION = "1.0.0" | ||
7 | PV = "${XILINX_VCU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or ''}+git${SRCPV}" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | |||
11 | BRANCH ?= "xlnx_rel_v2022.2" | ||
12 | REPO ?= "git://github.com/Xilinx/vcu-firmware.git;protocol=https" | ||
13 | SRCREV = "3980c778d71fa51a15e89bf70fd8fb28d5cb12e0" | ||
14 | |||
15 | BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" | ||
16 | SRC_URI = "${REPO};${BRANCHARG}" | ||
17 | |||
18 | inherit features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | ||
21 | |||
22 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
23 | |||
24 | do_install() { | ||
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}/lib/firmware/al5d_b.fw | ||
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}/lib/firmware/al5d.fw | ||
27 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}/lib/firmware/al5e_b.fw | ||
28 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}/lib/firmware/al5e.fw | ||
29 | } | ||
30 | |||
31 | # Inhibit warnings about files being stripped | ||
32 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | ||
33 | INHIBIT_PACKAGE_STRIP = "1" | ||
34 | FILES:${PN} = "/lib/firmware/*" | ||
35 | |||
36 | # These libraries shouldn't get installed in world builds unless something | ||
37 | # explicitly depends upon them. | ||
38 | EXCLUDE_FROM_WORLD = "1" | ||
39 | |||
40 | INSANE_SKIP:${PN} = "ldflags" | ||
diff --git a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb index 50e7926d..a90d307f 100644 --- a/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vcu/vcu-firmware_2023.1.bb | |||
@@ -20,16 +20,16 @@ inherit features_check | |||
20 | REQUIRED_MACHINE_FEATURES = "vcu" | 20 | REQUIRED_MACHINE_FEATURES = "vcu" |
21 | 21 | ||
22 | do_install() { | 22 | do_install() { |
23 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}/lib/firmware/al5d_b.fw | 23 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d_b.fw ${D}${nonarch_base_libdir}/firmware/al5d_b.fw |
24 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}/lib/firmware/al5d.fw | 24 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5d.fw ${D}${nonarch_base_libdir}/firmware/al5d.fw |
25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}/lib/firmware/al5e_b.fw | 25 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e_b.fw ${D}${nonarch_base_libdir}/firmware/al5e_b.fw |
26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}/lib/firmware/al5e.fw | 26 | install -Dm 0644 ${S}/${XILINX_VCU_VERSION}/lib/firmware/al5e.fw ${D}${nonarch_base_libdir}/firmware/al5e.fw |
27 | } | 27 | } |
28 | 28 | ||
29 | # Inhibit warnings about files being stripped | 29 | # Inhibit warnings about files being stripped |
30 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" | 30 | INHIBIT_PACKAGE_DEBUG_SPLIT = "1" |
31 | INHIBIT_PACKAGE_STRIP = "1" | 31 | INHIBIT_PACKAGE_STRIP = "1" |
32 | FILES:${PN} = "/lib/firmware/*" | 32 | FILES:${PN} = "${nonarch_base_libdir}/firmware/*" |
33 | 33 | ||
34 | # These libraries shouldn't get installed in world builds unless something | 34 | # These libraries shouldn't get installed in world builds unless something |
35 | # explicitly depends upon them. | 35 | # explicitly depends upon them. |
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb index 9b835490..9b835490 100755..100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/kernel-module-vdu_2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb index 602dc2fc..602dc2fc 100755..100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-ctrlsw_2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb index b4fc482e..b4fc482e 100755..100644 --- a/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb +++ b/meta-xilinx-core/recipes-multimedia/vdu/libvdu-omxil_2023.1.bb | |||
diff --git a/meta-xilinx-core/recipes-xrt/xrt/files/xrt-cstdint.patch b/meta-xilinx-core/recipes-xrt/xrt/files/xrt-cstdint.patch new file mode 100644 index 00000000..67ca68c6 --- /dev/null +++ b/meta-xilinx-core/recipes-xrt/xrt/files/xrt-cstdint.patch | |||
@@ -0,0 +1,117 @@ | |||
1 | Add cstdint as necessary | ||
2 | |||
3 | In GCC 13.1 usage of uint64 and similar will result in an error without | ||
4 | #include <cstdint> | ||
5 | |||
6 | Signed-off-by: Mark Hatle <mark.hatle@amd.com> | ||
7 | |||
8 | diff --git a/src/runtime_src/core/common/time.h b/src/runtime_src/core/common/time.h | ||
9 | index a4a96b11d..585d38756 100644 | ||
10 | --- a/src/runtime_src/core/common/time.h | ||
11 | +++ b/src/runtime_src/core/common/time.h | ||
12 | @@ -19,6 +19,7 @@ | ||
13 | |||
14 | #include "core/common/config.h" | ||
15 | #include <string> | ||
16 | +#include <cstdint> | ||
17 | |||
18 | namespace xrt_core { | ||
19 | |||
20 | diff --git a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
21 | index 196304765..36ce35e80 | ||
22 | --- a/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
23 | +++ b/src/runtime_src/core/edge/user/aie/common_layer/adf_api_config.h | ||
24 | @@ -18,6 +18,7 @@ | ||
25 | |||
26 | #include <string> | ||
27 | #include <vector> | ||
28 | +#include <cstdint> | ||
29 | |||
30 | namespace adf | ||
31 | { | ||
32 | diff --git a/src/runtime_src/core/edge/user/zynq_dev.h b/src/runtime_src/core/edge/user/zynq_dev.h | ||
33 | index 6fe36c615..2abd7473b 100644 | ||
34 | --- a/src/runtime_src/core/edge/user/zynq_dev.h | ||
35 | +++ b/src/runtime_src/core/edge/user/zynq_dev.h | ||
36 | @@ -19,6 +19,7 @@ | ||
37 | #include <fstream> | ||
38 | #include <string> | ||
39 | #include <vector> | ||
40 | +#include <cstdint> | ||
41 | |||
42 | class zynq_device { | ||
43 | public: | ||
44 | diff --git a/src/runtime_src/tools/xclbinutil/CBOR.h b/src/runtime_src/tools/xclbinutil/CBOR.h | ||
45 | index 368459f59..acbf6ebae 100644 | ||
46 | --- a/src/runtime_src/tools/xclbinutil/CBOR.h | ||
47 | +++ b/src/runtime_src/tools/xclbinutil/CBOR.h | ||
48 | @@ -22,6 +22,7 @@ | ||
49 | // #includes here - please keep these to a bare minimum! | ||
50 | #include <string> | ||
51 | #include <sstream> | ||
52 | +#include <cstdint> | ||
53 | |||
54 | // ------------ F O R W A R D - D E C L A R A T I O N S ---------------------- | ||
55 | // Forward declarations - use these instead whenever possible... | ||
56 | diff --git a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
57 | index 361015962..1c3bca18d 100644 | ||
58 | --- a/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
59 | +++ b/src/runtime_src/tools/xclbinutil/DTCStringsBlock.h | ||
60 | @@ -19,6 +19,7 @@ | ||
61 | |||
62 | // ----------------------- I N C L U D E S ----------------------------------- | ||
63 | #include <sstream> | ||
64 | +#include <cstdint> | ||
65 | #include <string> | ||
66 | |||
67 | // ----------- C L A S S : D T C S t r i n g s B l o c k ------------------- | ||
68 | diff --git a/src/runtime_src/tools/xclbinutil/XclBinSignature.h b/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
69 | index b19ab56a4..f1b72d4d2 100644 | ||
70 | --- a/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
71 | +++ b/src/runtime_src/tools/xclbinutil/XclBinSignature.h | ||
72 | @@ -18,6 +18,7 @@ | ||
73 | #define __XclBinSignature_h_ | ||
74 | |||
75 | #include <string> | ||
76 | +#include <cstdint> | ||
77 | |||
78 | // ----------------------- I N C L U D E S ----------------------------------- | ||
79 | |||
80 | diff --git a/src/runtime_src/xdp/profile/database/events/vtf_event.h b/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
81 | index f8d0121db..b5f36554c 100644 | ||
82 | --- a/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
83 | +++ b/src/runtime_src/xdp/profile/database/events/vtf_event.h | ||
84 | @@ -19,6 +19,7 @@ | ||
85 | #define VTF_EVENT_DOT_H | ||
86 | |||
87 | #include <fstream> | ||
88 | +#include <cstdint> | ||
89 | |||
90 | #include "xdp/config.h" | ||
91 | |||
92 | diff --git a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | ||
93 | index 98c57de2e..6077bd247 100644 | ||
94 | --- a/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | ||
95 | +++ b/src/runtime_src/xdp/profile/device/aie_trace/aie_trace_logger.h | ||
96 | @@ -17,7 +17,8 @@ | ||
97 | #ifndef XDP_PROFILE_AIE_TRACE_LOGGER_H | ||
98 | #define XDP_PROFILE_AIE_TRACE_LOGGER_H | ||
99 | |||
100 | -#include<iostream> | ||
101 | +#include <iostream> | ||
102 | +#include <cstdint> | ||
103 | |||
104 | namespace xdp { | ||
105 | |||
106 | diff --git a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | ||
107 | index a88597464..f392ec0e6 100644 | ||
108 | --- a/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | ||
109 | +++ b/src/runtime_src/xdp/profile/writer/vp_base/vp_writer.h | ||
110 | @@ -19,6 +19,7 @@ | ||
111 | |||
112 | #include <fstream> | ||
113 | #include <string> | ||
114 | +#include <cstdint> | ||
115 | |||
116 | #include "xdp/config.h" | ||
117 | |||
diff --git a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc b/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc index 2ddb173d..a9192f62 100644 --- a/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc +++ b/meta-xilinx-standalone-experimental/conf/dtb-embeddedsw.inc | |||
@@ -8,7 +8,4 @@ REPO = "git://github.com/Xilinx/embeddedsw-experimental-dt-support.git;protocol= | |||
8 | 8 | ||
9 | ESW_BRANCH[2023_sdt_experimental] = "xlnx_rel_v2023.2_sdt" | 9 | ESW_BRANCH[2023_sdt_experimental] = "xlnx_rel_v2023.2_sdt" |
10 | ESW_REV[2023_sdt_experimental] = "742a608800e7621fb7c376daf5124333b5826d6d" | 10 | ESW_REV[2023_sdt_experimental] = "742a608800e7621fb7c376daf5124333b5826d6d" |
11 | LIC_FILES_CHKSUM[master] = '7c92de7a21a6613265035c28f4a92f48' | ||
12 | LIC_FILES_CHKSUM[xlnx_rel_v2022.1_sdt_experimental_beta] = 'e26f53a7d6f58f4b1a9687099417225c' | ||
13 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_sdt_experimental] = 'ce611484168a6000bd35df68fc4f4290' | ||
14 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_sdt] = 'ce611484168a6000bd35df68fc4f4290' | 11 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2_sdt] = 'ce611484168a6000bd35df68fc4f4290' |
diff --git a/meta-xilinx-standalone-experimental/conf/layer.conf b/meta-xilinx-standalone-experimental/conf/layer.conf index c3e5cdca..12734173 100644 --- a/meta-xilinx-standalone-experimental/conf/layer.conf +++ b/meta-xilinx-standalone-experimental/conf/layer.conf | |||
@@ -22,7 +22,7 @@ LAYERDEPENDS_xilinx-standalone-exp = "core \ | |||
22 | virtualization-layer \ | 22 | virtualization-layer \ |
23 | " | 23 | " |
24 | 24 | ||
25 | LAYERSERIES_COMPAT_xilinx-standalone-exp = "langdale" | 25 | LAYERSERIES_COMPAT_xilinx-standalone-exp = "mickledore" |
26 | 26 | ||
27 | # Aid debugging, show where the device trees are we are using | 27 | # Aid debugging, show where the device trees are we are using |
28 | BUILDCFG_VARS:append = " SYSTEM_DTFILE CONFIG_DTFILE" | 28 | BUILDCFG_VARS:append = " SYSTEM_DTFILE CONFIG_DTFILE" |
diff --git a/meta-xilinx-standalone-experimental/recipes-libraries/nativesdk-esw-conf_git.bb b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb index 63119fd4..e6cf1d8b 100644 --- a/meta-xilinx-standalone-experimental/recipes-libraries/nativesdk-esw-conf_git.bb +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/esw-conf_git.bb | |||
@@ -1,5 +1,5 @@ | |||
1 | # Can't depend on esw since this is needed for setup! | 1 | # Can't depend on esw since this is needed for setup! |
2 | inherit xlnx-embeddedsw nativesdk | 2 | inherit xlnx-embeddedsw |
3 | 3 | ||
4 | # We need to override the inherit | 4 | # We need to override the inherit |
5 | require conf/dtb-embeddedsw.inc | 5 | require conf/dtb-embeddedsw.inc |
@@ -7,8 +7,10 @@ require conf/dtb-embeddedsw.inc | |||
7 | S = "${WORKDIR}/git" | 7 | S = "${WORKDIR}/git" |
8 | B = "${WORKDIR}/build" | 8 | B = "${WORKDIR}/build" |
9 | 9 | ||
10 | # Don't need any specific dependencies for this | 10 | INHIBIT_DEFAULT_DEPS = "1" |
11 | DEPENDS = "" | 11 | |
12 | # Installing this recipe should install the lopper tools and such | ||
13 | DEPENDS = "lopper xilinx-lops" | ||
12 | 14 | ||
13 | COMPATIBLE_HOST:forcevariable = ".*" | 15 | COMPATIBLE_HOST:forcevariable = ".*" |
14 | 16 | ||
@@ -28,3 +30,5 @@ do_install() { | |||
28 | } | 30 | } |
29 | 31 | ||
30 | FILES:${PN} += "${datadir}/embeddedsw" | 32 | FILES:${PN} += "${datadir}/embeddedsw" |
33 | |||
34 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass index 12db0da2..15b91fdb 100644 --- a/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass +++ b/meta-xilinx-standalone/classes/xlnx-embeddedsw.bbclass | |||
@@ -3,19 +3,25 @@ ESW_VER ?= "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or 'master' | |||
3 | 3 | ||
4 | REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" | 4 | REPO ??= "git://github.com/Xilinx/embeddedsw.git;protocol=https" |
5 | 5 | ||
6 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1" | 6 | ESW_BRANCH[2022.1] = "xlnx_rel_v2022.1_update" |
7 | ESW_BRANCH[2022.2] = "xlnx_rel_v2022.2" | ||
8 | ESW_BRANCH[2023.1] = "xlnx_rel_v2023.1_update" | ||
7 | ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2" | 9 | ESW_BRANCH[2023.2] = "xlnx_rel_v2023.2" |
8 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" | 10 | BRANCH ??= "${@d.getVarFlag('ESW_BRANCH', d.getVar('ESW_VER')) or '${ESW_VER}'}" |
9 | 11 | ||
10 | ESW_REV[2023.1] = "e24fe92b5517ee447e560790e798cad792f53bab" | 12 | ESW_REV[2022.1] = "56d94a506fd9f80949f4cff08e13015928603f01" |
13 | ESW_REV[2022.2] = "5330a64c8efd14f0eef09befdbb8d3d738c33ec2" | ||
14 | ESW_REV[2023.1] = "af784f742dad0ca6e69e05baf8de51152c396b9a" | ||
11 | ESW_REV[2023.2] = "c9a0ee31b2a14cbcfcb56ca369037319b4ad4847" | 15 | ESW_REV[2023.2] = "c9a0ee31b2a14cbcfcb56ca369037319b4ad4847" |
12 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or '${AUTOREV}'}" | 16 | SRCREV ??= "${@d.getVarFlag('ESW_REV', d.getVar('ESW_VER')) or 'invalid'}" |
13 | 17 | ||
14 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" | 18 | EMBEDDEDSW_BRANCHARG ?= "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH') != '']}" |
15 | EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" | 19 | EMBEDDEDSW_SRCURI ?= "${REPO};${EMBEDDEDSW_BRANCHARG}" |
16 | 20 | ||
17 | LICENSE = "MIT" | 21 | LICENSE = "MIT" |
18 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1] = '3c310a3ee2197a4c92c6a0e2937c207c' | 22 | LIC_FILES_CHKSUM[xlnx_rel_v2022.1_update] = 'e62cb7a722c4430999e0a55a7234035d' |
23 | LIC_FILES_CHKSUM[xlnx_rel_v2022.2] = 'ce611484168a6000bd35df68fc4f4290' | ||
24 | LIC_FILES_CHKSUM[xlnx_rel_v2023.1_update] = '3c310a3ee2197a4c92c6a0e2937c207c' | ||
19 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2] = '9fceecdbcad88698f265578f3d4cb26c' | 25 | LIC_FILES_CHKSUM[xlnx_rel_v2023.2] = '9fceecdbcad88698f265578f3d4cb26c' |
20 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" | 26 | LIC_FILES_CHKSUM ??= "file://license.txt;md5=${@d.getVarFlag('LIC_FILES_CHKSUM', d.getVar('BRANCH')) or '0'}" |
21 | 27 | ||
diff --git a/meta-xilinx-standalone/conf/layer.conf b/meta-xilinx-standalone/conf/layer.conf index d71f2d0f..a47a769a 100644 --- a/meta-xilinx-standalone/conf/layer.conf +++ b/meta-xilinx-standalone/conf/layer.conf | |||
@@ -15,7 +15,7 @@ BBFILE_PRIORITY_xilinx-standalone = "7" | |||
15 | LAYERDEPENDS_xilinx-standalone = "core xilinx" | 15 | LAYERDEPENDS_xilinx-standalone = "core xilinx" |
16 | LAYERRECOMMENDS_xilinx-standalone = "xilinx-microblaze" | 16 | LAYERRECOMMENDS_xilinx-standalone = "xilinx-microblaze" |
17 | 17 | ||
18 | LAYERSERIES_COMPAT_xilinx-standalone = "langdale" | 18 | LAYERSERIES_COMPAT_xilinx-standalone = "mickledore" |
19 | 19 | ||
20 | PREFERRED_VERSION_plm-firmware ?= "${@d.getVar("XILINX_RELEASE_VERSION").replace('v','')}%" | 20 | PREFERRED_VERSION_plm-firmware ?= "${@d.getVar("XILINX_RELEASE_VERSION").replace('v','')}%" |
21 | PREFERRED_VERSION_psm-firmware ?= "${@d.getVar("XILINX_RELEASE_VERSION").replace('v','')}%" | 21 | PREFERRED_VERSION_psm-firmware ?= "${@d.getVar("XILINX_RELEASE_VERSION").replace('v','')}%" |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb new file mode 100644 index 00000000..3f9740a0 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.1.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require fsbl-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://fsbl-fixups.patch \ | ||
8 | " | ||
9 | |||
10 | # This version does not build for zynq | ||
11 | COMPATIBLE_MACHINE:zynq = "none" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb new file mode 100644 index 00000000..3f9740a0 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/fsbl-firmware_2022.2.bb | |||
@@ -0,0 +1,11 @@ | |||
1 | require fsbl-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://fsbl-fixups.patch \ | ||
8 | " | ||
9 | |||
10 | # This version does not build for zynq | ||
11 | COMPATIBLE_MACHINE:zynq = "none" | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb new file mode 100644 index 00000000..cc810241 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require plm-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb new file mode 100644 index 00000000..cc810241 --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_2022.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require plm-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb new file mode 100644 index 00000000..2c554d6d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require pmu-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb new file mode 100644 index 00000000..2c554d6d --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2022.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require pmu-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-zynqmp_pmufw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-ffunction-sections -fdata-sections -Wall -Wextra -Os -flto -ffat-lto-objects" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb new file mode 100644 index 00000000..d861fb1c --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.1.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require psm-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb new file mode 100644 index 00000000..d861fb1c --- /dev/null +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_2022.2.bb | |||
@@ -0,0 +1,16 @@ | |||
1 | require psm-firmware.inc | ||
2 | |||
3 | FILESPATH .= ":${FILE_DIRNAME}/embeddedsw" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://makefile-skip-copy_bsp.sh.patch \ | ||
7 | file://0001-versal_fw-Fixup-core-makefiles.patch \ | ||
8 | " | ||
9 | |||
10 | EXTRA_COMPILER_FLAGS = "-g -ffunction-sections -fdata-sections -Wall -Wextra" | ||
11 | |||
12 | do_compile() { | ||
13 | oe_runmake | ||
14 | |||
15 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
diff --git a/meta-xilinx-standalone/recipes-core/newlib/libgloss_4.%.bbappend b/meta-xilinx-standalone/recipes-core/newlib/libgloss_%.bbappend index fcdc1ebd..fcdc1ebd 100644 --- a/meta-xilinx-standalone/recipes-core/newlib/libgloss_4.%.bbappend +++ b/meta-xilinx-standalone/recipes-core/newlib/libgloss_%.bbappend | |||
diff --git a/meta-xilinx-standalone/recipes-core/newlib/newlib_4.%.bbappend b/meta-xilinx-standalone/recipes-core/newlib/newlib_%.bbappend index aff092cc..aff092cc 100644 --- a/meta-xilinx-standalone/recipes-core/newlib/newlib_4.%.bbappend +++ b/meta-xilinx-standalone/recipes-core/newlib/newlib_%.bbappend | |||
diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_%.bbappend index 0d824324..0d824324 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_12.%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-source_%.bbappend | |||
diff --git a/meta-xilinx-vendor/conf/layer.conf b/meta-xilinx-vendor/conf/layer.conf index 29ebc949..9e3886b9 100644 --- a/meta-xilinx-vendor/conf/layer.conf +++ b/meta-xilinx-vendor/conf/layer.conf | |||
@@ -15,4 +15,4 @@ BBFILE_PATTERN_xilinx-vendor = "^${LAYERDIR}/" | |||
15 | BBFILE_PRIORITY_xilinx-vendor = "5" | 15 | BBFILE_PRIORITY_xilinx-vendor = "5" |
16 | 16 | ||
17 | LAYERDEPENDS_xilinx-vendor = "xilinx" | 17 | LAYERDEPENDS_xilinx-vendor = "xilinx" |
18 | LAYERSERIES_COMPAT_xilinx-vendor = "langdale" | 18 | LAYERSERIES_COMPAT_xilinx-vendor = "mickledore" |