From 68633c6ce580fa26d03bc212e172b165c521e632 Mon Sep 17 00:00:00 2001 From: YanqiXu Date: Tue, 9 Aug 2022 19:53:34 +0400 Subject: [PATCH 1/4] yocto: add bbappend for libdrm - add libdrm 2.4.109 Signed-off-by: YanqiXu --- .../recipes-graphics/drm/libdrm_%.bbappend | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta-openeuler/recipes-graphics/drm/libdrm_%.bbappend diff --git a/meta-openeuler/recipes-graphics/drm/libdrm_%.bbappend b/meta-openeuler/recipes-graphics/drm/libdrm_%.bbappend new file mode 100644 index 00000000000..0386ca2b4ce --- /dev/null +++ b/meta-openeuler/recipes-graphics/drm/libdrm_%.bbappend @@ -0,0 +1,14 @@ +# main bb file: yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.104.bb + +PV = "2.4.109" + +SRC_URI_prepend += "file://libdrm-${PV}.tar.xz \ + file://libdrm-2.4.0-no-bc.patch \ + file://libdrm-make-dri-perms-okay.patch \ +" + +SRC_URI_remove = "http://dri.freedesktop.org/libdrm/${BP}.tar.xz \ + file://0001-meson-Also-search-for-rst2man.py.patch \ +" +SRC_URI[md5sum] = "376523fcbba8b9e194bcb5adff142d5d" +SRC_URI[sha256sum] = "629352e08c1fe84862ca046598d8a08ce14d26ab25ee1f4704f993d074cb7f26" -- Gitee From 3759c919c6767f2711b63d3fb479b134368aebda Mon Sep 17 00:00:00 2001 From: YanqiXu Date: Tue, 9 Aug 2022 19:55:12 +0400 Subject: [PATCH 2/4] yocto: add bbappend and patch for mesa - add mesa 21.3.1 - add patch for meson build option "elf-tls", which is only used by yocto Signed-off-by: YanqiXu --- ....1-meson.build-make-tls-elf-optional.patch | 35 +++++++++++++++++++ .../recipes-graphics/mesa/mesa_%.bbappend | 27 ++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 meta-openeuler/recipes-graphics/mesa/mesa/mesa-21.3.1-meson.build-make-tls-elf-optional.patch create mode 100644 meta-openeuler/recipes-graphics/mesa/mesa_%.bbappend diff --git a/meta-openeuler/recipes-graphics/mesa/mesa/mesa-21.3.1-meson.build-make-tls-elf-optional.patch b/meta-openeuler/recipes-graphics/mesa/mesa/mesa-21.3.1-meson.build-make-tls-elf-optional.patch new file mode 100644 index 00000000000..330d5114e12 --- /dev/null +++ b/meta-openeuler/recipes-graphics/mesa/mesa/mesa-21.3.1-meson.build-make-tls-elf-optional.patch @@ -0,0 +1,35 @@ +diff --git a/meson.build b/meson.build +index bd54e78..c52e4c4 100644 +--- a/meson.build ++++ b/meson.build +@@ -497,8 +497,11 @@ use_elf_tls = false + if (not ['freebsd', 'openbsd', 'haiku'].contains(host_machine.system()) and + (not with_platform_android or get_option('platform-sdk-version') >= 29) and + (not with_platform_windows or not with_shared_glapi)) +- pre_args += '-DUSE_ELF_TLS' +- use_elf_tls = true ++ use_elf_tls = false ++ if get_option('elf-tls') ++ use_elf_tls = true ++ pre_args += '-DUSE_ELF_TLS' ++ endif + + if with_platform_android + # By default the NDK compiler, at least, emits emutls references instead of +diff --git a/meson_options.txt b/meson_options.txt +index 32c7593..13ff9ab 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -467,6 +467,12 @@ option( + value : false, + description : 'Prefer new crocus driver over older i965 driver for gen4-7' + ) ++option( ++ 'elf-tls', ++ type : 'boolean', ++ value : true, ++ description : 'Enable TLS support in ELF', ++) + option('egl-lib-suffix', + type : 'string', + value : '', diff --git a/meta-openeuler/recipes-graphics/mesa/mesa_%.bbappend b/meta-openeuler/recipes-graphics/mesa/mesa_%.bbappend new file mode 100644 index 00000000000..4282a39b7a6 --- /dev/null +++ b/meta-openeuler/recipes-graphics/mesa/mesa_%.bbappend @@ -0,0 +1,27 @@ +# main bbfile: yocto-poky/meta/recipes-graphics/mesa/mesa_21.0.3.bb + +# version in openEuler +PV = "21.3.1" + +# files, patches can't be applied in openeuler or conflict with openeuler +SRC_URI_remove = " \ + https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0002-meson.build-make-TLS-ELF-optional.patch \ + file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ +" + +DEPENDS = "expat zlib" + +# files, patches that come from openeuler +SRC_URI += " \ + file://${BP}.tar.xz;name=tarball \ + file://0001-evergreen-big-endian.patch \ + file://backport-fix-build-err-on-arm.patch \ + file://mesa-21.3.1-meson.build-make-TLS-ELF-optional.patch \ +" +SRC_URI[tarball.md5sum] = "17a4ea65de7a9ab42437f3131e616a7f" +SRC_URI[tarball.sha256sum] = "646e6c5a9a185faa4cea796d378a1ba8e1148dbb197ca6605f95986a25af2752" +LIC_FILES_CHKSUM = "file://docs/license.rst;md5=17a4ea65de7a9ab42437f3131e616a7f" + -- Gitee From 66947a2cad50912451e84ff3a2d3cafbeb624316 Mon Sep 17 00:00:00 2001 From: YanqiXu Date: Tue, 9 Aug 2022 19:56:51 +0400 Subject: [PATCH 3/4] yocto: add bbappend for xorgproto - add xorgproto 2021.05 from src-openeuler/xorg-x11-proto-devel Signed-off-by: YanqiXu --- .../recipes-graphics/xorg-proto/xorgproto_%.bbappend | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 meta-openeuler/recipes-graphics/xorg-proto/xorgproto_%.bbappend diff --git a/meta-openeuler/recipes-graphics/xorg-proto/xorgproto_%.bbappend b/meta-openeuler/recipes-graphics/xorg-proto/xorgproto_%.bbappend new file mode 100644 index 00000000000..78ddd1228ee --- /dev/null +++ b/meta-openeuler/recipes-graphics/xorg-proto/xorgproto_%.bbappend @@ -0,0 +1,12 @@ +# main bb file: yocto-poky/meta/recipes-graphics/xorg-proto/xorgproto_2020.1.bb + +PV = "2021.5" + +SRC_URI_prepend += "file://xorg-x11-proto-devel/xorgproto-${PV}.tar.bz2 \ +" + +SRC_URI_remove = "${XORG_MIRROR}/individual/proto/${BP}.tar.bz2 \ +" +SRC_URI[md5sum] = "bff0c9a6a060ecde954e255a2d1d9a22" +SRC_URI[sha256sum] = "aa2f663b8dbd632960b24f7477aa07d901210057f6ab1a1db5158732569ca015" +LIC_FILES_CHKSUM = "file://COPYING-x11proto;md5=dfc4bd2b0568b31725b85b0604e69b56" -- Gitee From dec18ad6626600915ce1590331745b03c92521c7 Mon Sep 17 00:00:00 2001 From: YanqiXu Date: Tue, 9 Aug 2022 20:00:13 +0400 Subject: [PATCH 4/4] scripts: add mesa, libdrm, and xorgproto to download add mesa 21.3.1, libdrm 2.4.109, xorgproto 2021.05 to download_code.sh Signed-off-by: YanqiXu --- scripts/download_code.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/download_code.sh b/scripts/download_code.sh index e4e6bdafd83..49a104b611d 100644 --- a/scripts/download_code.sh +++ b/scripts/download_code.sh @@ -234,6 +234,9 @@ download_code() update_code_repo src-openeuler/wpa_supplicant openEuler-22.09 update_code_repo src-openeuler/grub2 openEuler-22.09 update_code_repo src-openeuler/parted openEuler-22.09 + update_code_repo src-openeuler/mesa ${SRC_BRANCH} + update_code_repo src-openeuler/libdrm ${SRC_BRANCH} + update_code_repo src-openeuler/xorg-x11-proto-devel ${SRC_BRANCH} } # download iSulad related packages -- Gitee