From c85f3b9fb4f52077196f1b55e1ffb53d723edb8d Mon Sep 17 00:00:00 2001 From: Sai Pavan Boddu Date: Mon, 13 Dec 2021 13:50:32 -0800 Subject: qemu-xilinx*: Upgrade Qemu 5.1.0 -> 6.1.0 Upgrade Qemu from 5.1.0 -> 6.1.0 for 2022 release Signed-off-by: Sai Pavan Boddu Signed-off-by: Sai Hari Chandana Kalluri Signed-off-by: Mark Hatle --- .../qemu/files/0001-Add-enable-disable-udev.patch | 30 ------- ...ure-Add-pkg-config-handling-for-libgcrypt.patch | 100 ++++----------------- .../recipes-devtools/qemu/files/cross.patch | 40 +++++++++ .../qemu/qemu-xilinx-native_2022.1.bb | 1 + .../qemu/qemu-xilinx-system-native_2022.1.bb | 5 +- .../recipes-devtools/qemu/qemu-xilinx.inc | 22 +++-- .../recipes-devtools/qemu/qemu-xilinx_2022.1.bb | 1 + 7 files changed, 73 insertions(+), 126 deletions(-) delete mode 100644 meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch create mode 100644 meta-xilinx-bsp/recipes-devtools/qemu/files/cross.patch (limited to 'meta-xilinx-bsp') diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch b/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch deleted file mode 100644 index 32c33385..00000000 --- a/meta-xilinx-bsp/recipes-devtools/qemu/files/0001-Add-enable-disable-udev.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 4ebe009d505bf10b0d90bad081d3fe5bd1cf7441 Mon Sep 17 00:00:00 2001 -From: Sai Hari Chandana Kalluri -Date: Thu, 6 May 2021 14:33:42 -0700 -Subject: [PATCH] Add enable/disable libudev - -Upstream-Status: Pending -Signed-off-by: Jeremy Puhlman -Signed-off-by: Sai Hari Chandana Kalluri ---- - configure | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure b/configure -index c2ef164..612f987 100755 ---- a/configure -+++ b/configure -@@ -1633,6 +1633,10 @@ for opt do - ;; - --gdb=*) gdb_bin="$optarg" - ;; -+ --enable-libudev) libudev="yes" -+ ;; -+ --disable-libudev) libudev="no" -+ ;; - --enable-rng-none) rng_none=yes - ;; - --disable-rng-none) rng_none=no --- -2.7.4 - diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/files/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch b/meta-xilinx-bsp/recipes-devtools/qemu/files/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch index a8ab7daa..4298964d 100644 --- a/meta-xilinx-bsp/recipes-devtools/qemu/files/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch +++ b/meta-xilinx-bsp/recipes-devtools/qemu/files/0010-configure-Add-pkg-config-handling-for-libgcrypt.patch @@ -1,7 +1,7 @@ -From 5214dd4461f2090ef0965b4d2518f49927d61cbc Mon Sep 17 00:00:00 2001 +From b51e6dd833172954c718bd600d846540eeb07220 Mon Sep 17 00:00:00 2001 From: He Zhe Date: Wed, 28 Aug 2019 19:56:28 +0800 -Subject: [Qemu-devel] [PATCH] configure: Add pkg-config handling for libgcrypt +Subject: [PATCH] configure: Add pkg-config handling for libgcrypt libgcrypt may also be controlled by pkg-config, this patch adds pkg-config handling for libgcrypt. @@ -9,85 +9,21 @@ handling for libgcrypt. Upstream-Status: Denied [https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg06333.html] Signed-off-by: He Zhe ---- - configure | 48 ++++++++++++++++++++++++++++++++++++++++-------- - 1 file changed, 40 insertions(+), 8 deletions(-) -diff --git a/configure b/configure -index e44e454..0f362a7 100755 ---- a/configure -+++ b/configure -@@ -2875,6 +2875,30 @@ has_libgcrypt() { - return 0 - } - -+has_libgcrypt_pkgconfig() { -+ if ! has $pkg_config ; then -+ return 1 -+ fi -+ -+ if ! $pkg_config --list-all | grep libgcrypt > /dev/null 2>&1 ; then -+ return 1 -+ fi -+ -+ if test -n "$cross_prefix" ; then -+ host=$($pkg_config --variable=host libgcrypt) -+ if test "${host%-gnu}-" != "${cross_prefix%-gnu}" ; then -+ print_error "host($host) does not match cross_prefix($cross_prefix)" -+ return 1 -+ fi -+ fi -+ -+ if ! $pkg_config --atleast-version=1.5.0 libgcrypt ; then -+ print_error "libgcrypt version is $($pkg_config --modversion libgcrypt)" -+ return 1 -+ fi -+ -+ return 0 -+} - - if test "$nettle" != "no"; then - pass="no" -@@ -2902,7 +2926,14 @@ fi - - if test "$gcrypt" != "no"; then - pass="no" -- if has_libgcrypt; then -+ if has_libgcrypt_pkgconfig; then -+ gcrypt_cflags=$($pkg_config --cflags libgcrypt) -+ if test "$static" = "yes" ; then -+ gcrypt_libs=$($pkg_config --libs --static libgcrypt) -+ else -+ gcrypt_libs=$($pkg_config --libs libgcrypt) -+ fi -+ elif has_libgcrypt; then - gcrypt_cflags=$(libgcrypt-config --cflags) - gcrypt_libs=$(libgcrypt-config --libs) - # Debian has removed -lgpg-error from libgcrypt-config -@@ -2912,15 +2943,16 @@ if test "$gcrypt" != "no"; then - then - gcrypt_libs="$gcrypt_libs -lgpg-error" - fi -+ fi - -- # Link test to make sure the given libraries work (e.g for static). -- write_c_skeleton -- if compile_prog "" "$gcrypt_libs" ; then -- LIBS="$gcrypt_libs $LIBS" -- QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags" -- pass="yes" -- fi -+ # Link test to make sure the given libraries work (e.g for static). -+ write_c_skeleton -+ if compile_prog "" "$gcrypt_libs" ; then -+ LIBS="$gcrypt_libs $LIBS" -+ QEMU_CFLAGS="$QEMU_CFLAGS $gcrypt_cflags" -+ pass="yes" - fi -+ - if test "$pass" = "yes"; then - gcrypt="yes" - cat > $TMPC << EOF --- -2.7.4 +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) +diff --git a/meson.build b/meson.build +index b3e7ec0e9..4cbe715b7 100644 +--- a/meson.build ++++ b/meson.build +@@ -874,7 +874,7 @@ endif + if not gnutls_crypto.found() + if (not get_option('gcrypt').auto() or have_system) and not get_option('nettle').enabled() + gcrypt = dependency('libgcrypt', version: '>=1.8', +- method: 'config-tool', ++ method: 'pkg-config', + required: get_option('gcrypt'), + kwargs: static_kwargs) + # Debian has removed -lgpg-error from libgcrypt-config diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/files/cross.patch b/meta-xilinx-bsp/recipes-devtools/qemu/files/cross.patch new file mode 100644 index 00000000..bdb77ec7 --- /dev/null +++ b/meta-xilinx-bsp/recipes-devtools/qemu/files/cross.patch @@ -0,0 +1,40 @@ +From f51ece86f84c877f255746cba22a6745f37d2b7f Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Tue, 5 Jan 2021 23:00:14 +0000 +Subject: [PATCH] qemu: Upgrade 5.1.0->5.2.0 + +We need to be able to trigger configure's cross code but we don't want +to set cross_prefix as it does other things we don't want. Patch things +so we can do what we need in the target config case. + +Upstream-Status: Inappropriate [may be rewritten in a way upstream may accept?] +Signed-off-by: Richard Purdie +--- + configure | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/configure b/configure +index 9a79a004d..563b7827f 100755 +--- a/configure ++++ b/configure +@@ -5128,7 +5128,6 @@ if test "$skip_meson" = no; then + fi + echo "strip = [$(meson_quote $strip)]" >> $cross + echo "windres = [$(meson_quote $windres)]" >> $cross +- if test "$cross_compile" = "yes"; then + cross_arg="--cross-file config-meson.cross" + echo "[host_machine]" >> $cross + if test "$mingw32" = "yes" ; then +@@ -5160,9 +5159,6 @@ if test "$skip_meson" = no; then + else + echo "endian = 'little'" >> $cross + fi +- else +- cross_arg="--native-file config-meson.cross" +- fi + mv $cross config-meson.cross + + rm -rf meson-private meson-info meson-logs +-- +2.17.1 + diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb index f657186f..5e6c2d28 100644 --- a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb +++ b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb @@ -4,3 +4,4 @@ BPN = "qemu-xilinx" EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-blobs --disable-guest-agent" PROVIDES = "qemu-native" +PACKAGECONFIG ??= "pie" diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb index b30777d2..f5b89f05 100644 --- a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb +++ b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb @@ -2,16 +2,17 @@ require qemu-xilinx-native.inc EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" -PACKAGECONFIG ??= "fdt alsa kvm" +PACKAGECONFIG ??= "fdt alsa kvm pie" PACKAGECONFIG:remove = "${@'kvm' if not os.path.exists('/usr/include/linux/kvm.h') else ''}" -DEPENDS += "pixman-native qemu-xilinx-native" +DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native meson-native" do_install:append() { # The following is also installed by qemu-native rm -f ${D}${datadir}/qemu/trace-events-all rm -rf ${D}${datadir}/qemu/keymaps rm -rf ${D}${datadir}/icons + rm -rf ${D}${includedir}/qemu-plugin.h } diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc index e1ba96e9..d268f3e7 100644 --- a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc +++ b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx.inc @@ -8,11 +8,11 @@ LIC_FILES_CHKSUM = " \ file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \ file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \ " -DEPENDS = "glib-2.0 zlib pixman" +DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native" -XILINX_QEMU_VERSION ?= "v5.1.0" +XILINX_QEMU_VERSION ?= "v6.1.0" BRANCH ?= "master" -SRCREV = "303b509ec23138c43be8a3712068347210df67fd" +SRCREV = "8dd1b8cabff3e3e5b965d7a60472278ca4e27ceb" FILESEXTRAPATHS:prepend := "${THISDIR}/files:" @@ -22,25 +22,23 @@ REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https" BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" SRC_URI = "${REPO};${BRANCHARG}" -SRC_URI:append = " file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch \ - file://0001-Add-enable-disable-udev.patch \ -" -SRC_URI:remove:class-target = " file://cross.patch" -SRC_URI:remove:class-nativesdk = " file://cross.patch" +SRC_URI:append = " file://0010-configure-Add-pkg-config-handling-for-libgcrypt.patch" S = "${WORKDIR}/git" # Disable KVM completely PACKAGECONFIG:remove = "kvm" -PACKAGECONFIG:append = " fdt gcrypt" +PACKAGECONFIG:append = " fdt sdl gcrypt pie" + +PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt," +PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2" +PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," DISABLE_STATIC:pn-${PN} = "" +EXTRA_OECONF:remove = " --with-git=/bin/false --with-git-submodules=ignore" PTEST_ENABLED = "" -EXTRA_OECONF:append = " --with-git=/bin/false --disable-git-update" -EXTRA_OECONF:remove = " --with-suffix=${BPN} --with-git-submodules=ignore --meson=meson" - do_install:append() { # Prevent QA warnings about installed ${localstatedir}/run if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi diff --git a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2022.1.bb b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2022.1.bb index 5189595a..4983b4df 100644 --- a/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2022.1.bb +++ b/meta-xilinx-bsp/recipes-devtools/qemu/qemu-xilinx_2022.1.bb @@ -10,6 +10,7 @@ RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu" EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}" EXTRA_OECONF:append:class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" +EXTRA_OECONF:append:class-target:mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" do_install:append:class-nativesdk() { ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)} -- cgit v1.2.3-54-g00ecf