aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--EULA106
-rw-r--r--SCR/SCR-5.4.24_2.1.0.txt (renamed from SCR/SCR-5.4.3_2.0.0.txt)526
-rw-r--r--classes/fsl-eula-unpack.bbclass2
-rw-r--r--classes/fsl-kernel-localversion.bbclass31
-rw-r--r--classes/use-imx-security-controller-firmware.bbclass36
-rw-r--r--conf/machine/imx6qdlsabreauto.conf4
-rw-r--r--conf/machine/imx6qdlsabresd.conf4
-rw-r--r--conf/machine/imx6ullevk.conf2
-rw-r--r--conf/machine/imx8mmevk.conf2
-rw-r--r--conf/machine/imx8mnevk.conf2
-rw-r--r--conf/machine/imx8mpevk.conf66
-rw-r--r--conf/machine/imx8mqevk.conf2
-rw-r--r--conf/machine/include/imx-base.inc52
-rw-r--r--dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc2
-rw-r--r--dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb2
-rw-r--r--dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc2
-rw-r--r--dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0001-config.tests-add-DEFINES-to-compile-egl-test-with-im.patch25
-rw-r--r--dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0002-config.tests-add-DEFINES-to-compile-egl4gles1-test-w.patch25
-rwxr-xr-xrecipes-bsp/alsa-state/alsa-state/imx/asound.state2067
-rw-r--r--recipes-bsp/atf/atf-tools_git.bb2
-rw-r--r--recipes-bsp/atf/atf_git.bb4
-rw-r--r--recipes-bsp/boot-format/boot-format_git.bb2
-rw-r--r--recipes-bsp/ddr-phy/ddr-phy_git.bb2
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx-8.8.inc (renamed from recipes-bsp/firmware-imx/firmware-imx-8.5.inc)9
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx-8_8.8.bb (renamed from recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb)2
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx-8m_8.8.bb (renamed from recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb)2
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx_8.5.bb76
-rw-r--r--recipes-bsp/firmware-imx/firmware-imx_8.8.bb129
-rw-r--r--recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-1.bb24
-rw-r--r--recipes-bsp/firmware-qca/firmware-qca.inc8
-rw-r--r--recipes-bsp/firmware-qca/firmware-qca6174_3.0.2.bb (renamed from recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb)2
-rw-r--r--recipes-bsp/firmware-qca/firmware-qca9377_3.0.2.bb (renamed from recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb)2
-rw-r--r--recipes-bsp/firmware-qca/qca-tools_3.0.2.bb (renamed from recipes-bsp/firmware-qca/qca-tools_3.0.1.bb)2
-rw-r--r--recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb2
-rw-r--r--recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch29
-rw-r--r--recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch62
-rw-r--r--recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch13
-rw-r--r--recipes-bsp/imx-atf/imx-atf_2.2.bb (renamed from recipes-bsp/imx-atf/imx-atf_2.0.bb)16
-rw-r--r--recipes-bsp/imx-kobs/imx-kobs_git.bb2
-rw-r--r--recipes-bsp/imx-lib/imx-lib_git.bb2
-rw-r--r--recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch70
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb (renamed from recipes-bsp/imx-mkimage/imx-boot_0.2.bb)81
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.bb9
-rw-r--r--recipes-bsp/imx-mkimage/imx-mkimage_git.inc8
-rw-r--r--recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.5.0.bb (renamed from recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb)18
-rw-r--r--recipes-bsp/imx-seco/imx-seco-libs_git.bb24
-rw-r--r--recipes-bsp/imx-seco/imx-seco_2.3.1.bb30
-rw-r--r--recipes-bsp/imx-seco/imx-seco_3.6.3.bb26
-rw-r--r--recipes-bsp/imx-test/imx-test_git.bb5
-rw-r--r--recipes-bsp/imx-uuc/imx-uuc_git.bb2
-rw-r--r--recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.1.0.bb35
-rw-r--r--recipes-bsp/inphi/inphi_git.bb2
-rw-r--r--recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb (renamed from recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb)18
-rw-r--r--recipes-bsp/ls2-phy/ls2-phy_git.bb2
-rw-r--r--recipes-bsp/mc-utils/mc-utils_git.bb2
-rw-r--r--recipes-bsp/mxsldr/mxsldr_git.bb2
-rw-r--r--recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb2
-rw-r--r--recipes-bsp/qe-ucode/qe-ucode_git.bb2
-rw-r--r--recipes-bsp/rcw/rcw_git.bb2
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc4
-rw-r--r--recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.04.bb8
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-common.inc6
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb (renamed from recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb)0
-rw-r--r--recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb (renamed from recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb)0
-rw-r--r--recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch49
-rw-r--r--recipes-bsp/u-boot/u-boot-imx_2020.04.bb (renamed from recipes-bsp/u-boot/u-boot-imx_2019.04.bb)5
-rw-r--r--recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb2
-rw-r--r--recipes-bsp/uefi/uefi_git.bb2
-rw-r--r--recipes-devtools/cst/cst_git.bb2
-rw-r--r--recipes-devtools/devregs/devregs_git.bb6
-rw-r--r--recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb2
-rw-r--r--recipes-devtools/qemu/qemu-qoriq_4.1.0.bb2
-rw-r--r--recipes-devtools/utp-com/utp-com_git.bb2
-rw-r--r--recipes-dpaa/eth-config/eth-config_git.bb2
-rw-r--r--recipes-dpaa/flib/flib_git.bb2
-rw-r--r--recipes-dpaa/fm-ucode/fm-ucode_git.bb2
-rw-r--r--recipes-dpaa/fmlib/fmlib_git.bb2
-rw-r--r--recipes-dpaa2/aiopsl/aiopsl_git.bb2
-rw-r--r--recipes-dpaa2/dce/dce_git.bb4
-rw-r--r--recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb2
-rw-r--r--recipes-dpaa2/management-complex/management-complex_10.14.1.bb2
-rw-r--r--recipes-dpaa2/management-complex/management-complex_10.20.4.bb2
-rw-r--r--recipes-dpaa2/restool/restool_git.bb2
-rw-r--r--recipes-dpaa2/spc/spc_git.bb2
-rw-r--r--recipes-extended/dpdk/dpdk_19.11-20.04.bb2
-rw-r--r--recipes-extended/ipc-ust/ipc-ust_git.bb2
-rw-r--r--recipes-extended/jailhouse/jailhouse_0.11.bb2
-rw-r--r--recipes-extended/libpkcs11/libpkcs11_git.bb2
-rw-r--r--recipes-extended/odp/odp.inc6
-rw-r--r--recipes-extended/ofp/ofp_git.bb2
-rw-r--r--recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb2
-rw-r--r--recipes-extended/secure-obj/secure-obj.inc2
-rw-r--r--recipes-extended/skmm-ep/skmm-ep_git.bb2
-rw-r--r--recipes-extended/tsntool/tsntool_git.bb2
-rw-r--r--recipes-graphics/drm/libdrm-armada_git.bb17
-rw-r--r--recipes-graphics/drm/libdrm_2.4.99.imx.bb2
-rw-r--r--recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb (renamed from recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb)11
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch10004
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch169
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch276
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch62
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch60
-rw-r--r--recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb7
-rw-r--r--recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb (renamed from recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb)10
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc35
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb6
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb (renamed from recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb)4
-rw-r--r--recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb6
-rw-r--r--recipes-graphics/mesa/mesa_%.bbappend31
-rw-r--r--recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch10
-rw-r--r--recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch10
-rw-r--r--recipes-graphics/wayland/wayland-protocols_1.18.imx.bb2
-rw-r--r--recipes-graphics/wayland/weston-init.bbappend3
-rw-r--r--recipes-graphics/wayland/weston_8.0.0.imx.bb4
-rw-r--r--recipes-graphics/xorg-driver/xf86-video-armada_git.bb48
-rw-r--r--recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb4
-rw-r--r--recipes-kernel/ceetm/ceetm_git.bb2
-rw-r--r--recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-ar_git.bb2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4+fslc.bb (renamed from recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0+fslc.bb)4
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4.bb (renamed from recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb)8
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-ipc.inc2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-ls-debug_git.bb2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-qca9377_3.1.bb (renamed from recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb)0
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-scatter-gather_git.bb2
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-uio-seville_0.1.bb2
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/imx/defconfig33
-rw-r--r--recipes-kernel/linux/linux-fslc-imx/mx8/defconfig68
-rw-r--r--recipes-kernel/linux/linux-fslc-imx_5.4.bb40
-rw-r--r--recipes-kernel/linux/linux-fslc-mfgtool_5.4.bb16
-rw-r--r--recipes-kernel/linux/linux-fslc-qoriq_5.4.bb2
-rw-r--r--recipes-kernel/linux/linux-fslc.inc2
-rw-r--r--recipes-kernel/linux/linux-fslc/defconfig2
-rw-r--r--recipes-kernel/linux/linux-fslc_5.4.bb4
-rw-r--r--recipes-kernel/linux/linux-imx-headers_5.4.bb (renamed from recipes-kernel/linux/linux-imx-headers_5.4.3.bb)8
-rw-r--r--recipes-kernel/linux/linux-imx-mfgtool_5.4.bb (renamed from recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb)0
-rw-r--r--recipes-kernel/linux/linux-imx.inc2
-rw-r--r--recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch63
-rw-r--r--recipes-kernel/linux/linux-imx/imx/defconfig31
-rw-r--r--recipes-kernel/linux/linux-imx/mx8/defconfig66
-rw-r--r--recipes-kernel/linux/linux-imx_5.4.bb (renamed from recipes-kernel/linux/linux-imx_5.4.3.bb)12
-rw-r--r--recipes-kernel/linux/linux-mfgtool.inc2
-rw-r--r--recipes-kernel/linux/linux-qoriq.inc2
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-libtraceevent-Fix-build-with-binutils-2.35.patch38
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-perf-bench-Share-some-global-variables-to-fix-build-.patch239
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch68
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch42
-rw-r--r--recipes-kernel/linux/linux-qoriq_5.4.bb6
-rw-r--r--recipes-kernel/skmm-host/skmm-host_git.bb2
-rwxr-xr-xrecipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch119
-rw-r--r--recipes-multimedia/alsa/alsa-lib_%.bbappend1
-rw-r--r--recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch16
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch14
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch45
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch34
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch27
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch51
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch35
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch8
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb14
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch87
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch44
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb11
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb6
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb2
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb80
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb6
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-fsl_parser.h-fix-compiler-error-with-fcommon.patch34
-rw-r--r--recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb10
-rw-r--r--recipes-multimedia/imx-codec/imx-codec_4.5.5.bb (renamed from recipes-multimedia/imx-codec/imx-codec_4.5.3.bb)6
-rw-r--r--recipes-multimedia/imx-parser/imx-parser_4.5.5.bb (renamed from recipes-multimedia/imx-parser/imx-parser_4.5.3.bb)10
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb32
-rw-r--r--recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb29
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb (renamed from recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb)8
-rw-r--r--recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb2
-rw-r--r--recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch17
-rw-r--r--recipes-security/optee-imx/optee-client_3.7.0.imx.bb (renamed from recipes-security/optee-imx/optee-client_3.2.0.imx.bb)18
-rw-r--r--recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch36
-rw-r--r--recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch427
-rw-r--r--recipes-security/optee-imx/optee-os_3.7.0.imx.bb (renamed from recipes-security/optee-imx/optee-os_3.2.0.imx.bb)44
-rw-r--r--recipes-security/optee-imx/optee-test_3.2.0.imx.bb58
-rw-r--r--recipes-security/optee-imx/optee-test_3.7.0.imx.bb62
-rw-r--r--recipes-security/optee/optee-client-qoriq.bb2
-rw-r--r--recipes-security/optee/optee-os-qoriq/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch161
-rw-r--r--recipes-security/optee/optee-os-qoriq_git.bb3
-rw-r--r--recipes-security/optee/optee-test-qoriq_git.bb2
191 files changed, 4768 insertions, 12198 deletions
diff --git a/EULA b/EULA
index 402c87ca..4e0774e6 100644
--- a/EULA
+++ b/EULA
@@ -1,4 +1,4 @@
-LA_OPT_NXP_Software_License v10 December 2019
+LA_OPT_NXP_Software_License v11 February 2020
IMPORTANT. Read the following NXP Software License Agreement ("Agreement")
completely. By selecting the "I Accept" button at the end of this page, or by
@@ -196,32 +196,24 @@ or limitation on use or subsequent modification. Notwithstanding the foregoing,
you will have the license rights granted in Section 2 hereto to any such
modifications made by you or your subcontractor.
-6. PATENT COVENANT NOT TO SUE. As partial, material consideration for the
-rights granted to you under this Agreement, you covenant not to sue or
-otherwise assert your patents against NXP or an NXP Affiliate, or a NXP
-licensee of the Licensed Software for infringement of your Intellectual
-Property Rights by the manufacture, use, sale, offer for sale, importation or
-other disposition or promotion of the Licensed Software and/or any
-redistributed portions of the Licensed Software.
-
-7. ESSENTIAL PATENTS. NXP has no obligation to identify or obtain any
+6. ESSENTIAL PATENTS. NXP has no obligation to identify or obtain any
license to any Intellectual Property Right of a third-party that may be
necessary for use in connection with technology that is incorporated into the
Authorized System (whether or not as part of the Licensed Software).
-8. TERM AND TERMINATION. This Agreement will remain in effect unless
+7. TERM AND TERMINATION. This Agreement will remain in effect unless
terminated as provided in this Section.
-8.1. You may terminate this Agreement immediately upon written notice
+7.1. You may terminate this Agreement immediately upon written notice
to NXP at the address provided below.
-8.2. Either party may terminate this Agreement if the other party is in
+7.2. Either party may terminate this Agreement if the other party is in
default of any of the terms and conditions of this Agreement, and termination
is effective if the defaulting party fails to correct such default within 30
days after written notice thereof by the non-defaulting party to the defaulting
party at the address below.
-8.3. Notwithstanding the foregoing, NXP may terminate this Agreement
+7.3. Notwithstanding the foregoing, NXP may terminate this Agreement
immediately upon written notice if you: breach any of your confidentiality
obligations or the license restrictions under this Agreement; become bankrupt,
insolvent, or file a petition for bankruptcy or insolvency; make an assignment
@@ -229,17 +221,17 @@ for the benefit of its creditors; enter proceedings for winding up or
dissolution; are dissolved; or are nationalized or become subject to the
expropriation of all or substantially all of your business or assets.
-8.4. Upon termination of this Agreement, all licenses granted under
+7.4. Upon termination of this Agreement, all licenses granted under
Section 2 will expire.
-8.5. After termination of this Agreement by either party you will
+7.5. After termination of this Agreement by either party you will
destroy all parts of Licensed Software and its Derivative Works (if any) and
will provide to NXP a statement certifying the same.
-8.6. Notwithstanding the termination of this Agreement for any reason,
-the terms of Sections 1 and 3 through 25 will survive.
+7.6. Notwithstanding the termination of this Agreement for any reason,
+the terms of Sections 1 and 3 through 24 will survive.
-9. SUPPORT. NXP is not obligated to provide any support, upgrades or
+8. SUPPORT. NXP is not obligated to provide any support, upgrades or
new releases of the Licensed Software under this Agreement. If you wish, you
may contact NXP and report problems and provide suggestions regarding the
Licensed Software. NXP has no obligation to respond to such a problem report or
@@ -247,7 +239,7 @@ suggestion. NXP may make changes to the Licensed Software at any time, without
any obligation to notify or provide updated versions of the Licensed Software
to you.
-10. NO WARRANTY. To the maximum extent permitted by law, NXP expressly
+9. NO WARRANTY. To the maximum extent permitted by law, NXP expressly
disclaims any warranty for the Licensed Software. The Licensed Software is
provided "AS IS", without warranty of any kind, either express or implied,
including without limitation the implied warranties of merchantability, fitness
@@ -255,15 +247,15 @@ for a particular purpose, or non-infringement. You assume the entire risk
arising out of the use or performance of the licensed software, or any systems
you design using the licensed software (if any).
-11. INDEMNITY. You agree to fully defend and indemnify NXP from all
+10. INDEMNITY. You agree to fully defend and indemnify NXP from all
claims, liabilities, and costs (including reasonable attorney's fees) related
to (1) your use (including your subcontractor's or distributee's use, if
permitted) of the Licensed Software or (2) your violation of the terms and
conditions of this Agreement.
-12. LIMITATION OF LIABILITY. EXCLUDING LIABILITY FOR A BREACH OF
+11. LIMITATION OF LIABILITY. EXCLUDING LIABILITY FOR A BREACH OF
SECTION 2 (LICENSE GRANTS), SECTION 3 (LICENSE LIMITATIONS AND RESTRICTIONS),
-SECTION 17 (CONFIDENTIAL INFORMATION), OR CLAIMS UNDER SECTION 11(INDEMNITY),
+SECTION 16 (CONFIDENTIAL INFORMATION), OR CLAIMS UNDER SECTION 10 (INDEMNITY),
IN NO EVENT WILL EITHER PARTY BE LIABLE, WHETHER IN CONTRACT, TORT, OR
OTHERWISE, FOR ANY INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL OR PUNITIVE
DAMAGES, INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR ANY LOSS OF USE, LOSS OF
@@ -274,7 +266,7 @@ WITH THIS AGREEMENT OR PRODUCT(S) SUPPLIED UNDER THIS AGREEMENT IS LIMITED TO
THE AGGREGATE AMOUNT PAID BY YOU TO NXP IN CONNECTION WITH THE LICENSED
SOFTWARE PROVIDED UNDER THIS AGREEMENT TO WHICH LOSSES OR DAMAGES ARE CLAIMED.
-13. EXPORT COMPLIANCE. Each party shall comply with all applicable
+12. EXPORT COMPLIANCE. Each party shall comply with all applicable
export and import control laws and regulations including but not limited to the
US Export Administration Regulation (including prohibited party lists issued by
other federal governments), Catch-all regulations and all national and
@@ -288,9 +280,9 @@ such transfer, diversion, export or re-export is restricted or prohibited,
without obtaining prior written authorization from the applicable competent
government authorities to the extent required by those laws.
-14. GOVERNMENT CONTRACT COMPLIANCE
+13. GOVERNMENT CONTRACT COMPLIANCE
-14.1. If you sell Authorized Systems directly to any government or public
+13.1. If you sell Authorized Systems directly to any government or public
entity, including U.S., state, local, foreign or international governments or
public entities, or indirectly via a prime contractor or subcontractor of such
governments or entities, NXP makes no representations, certifications, or
@@ -298,7 +290,7 @@ warranties whatsoever about compliance with government or public entity
acquisition statutes or regulations, including, without limitation, statutes or
regulations that may relate to pricing, quality, origin or content.
-14.2. The Licensed Software has been developed at private expense and is a
+13.2. The Licensed Software has been developed at private expense and is a
"Commercial Item" as defined in 48 C.F.R. Section 2.101, consisting of
"Commercial Computer Software", and/or "Commercial Computer Software
Documentation," as such terms are used in 48 C.F.R. Section 12.212 (or 48
@@ -309,20 +301,25 @@ Licensed Software will include a provision that reiterates the limitations of
this document and requires all sub-agreements to similarly contain such
limitations.
-15. CRITICAL APPLICATIONS
-
-15.1. You make the ultimate design decisions regarding your products and
-are solely responsible for compliance with all legal, regulatory, safety, and
-security related requirements concerning your products, regardless of any
-information or support that may be provided by NXP. The Licensed Software is
-not designed for use in connection with products, applications, or systems
-where a failure could cause personal injury or death. If Licensee's, or
-Licensee's contractors or distributees, permit use of the Licensed Software for
-such products, applications, or systems, Licensee agrees to indemnify NXP and
-its officers and employees from all liability, including attorneys' fees and
-costs.
-
-16. CHOICE OF LAW; VENUE. This Agreement will be governed by,
+14. CRITICAL APPLICATIONS. In some cases, NXP may promote certain
+software for use in the development of, or for incorporation into, products or
+services (a) used in applications requiring fail-safe performance or (b) in
+which failure could lead to death, personal injury, or severe physical or
+environmental damage (these products and services are referred to as "Critical
+Applications"). NXP's goal is to educate customers so that they can design
+their own end-product solutions to meet applicable functional safety standards
+and requirements. Licensee makes the ultimate design decisions regarding its
+products and is solely responsible for compliance with all legal, regulatory,
+safety, and security related requirements concerning its products, regardless
+of any information or support that may be provided by NXP. As such, Licensee
+assumes all risk related to use of the Licensed Software in Critical
+Applications and NXP SHALL NOT BE LIABLE FOR ANY SUCH USE IN CRITICAL
+APPLICATIONS BY LICENSEE. Accordingly, Licensee will indemnify and hold NXP
+harmless from any claims, liabilities, damages and associated costs and
+expenses (including attorneys' fees) that NXP may incur related to Licensee’s
+incorporation of the Licensed Software in a Critical Application.
+
+15. CHOICE OF LAW; VENUE. This Agreement will be governed by,
construed, and enforced in accordance with the laws of The Netherlands, without
regard to conflicts of laws principles, will apply to all matters relating to
this Agreement or the Licensed Software, and you agree that any litigation will
@@ -330,7 +327,7 @@ be subject to the exclusive jurisdiction of the courts of Amsterdam, The
Netherlands. The United Nations Convention on Contracts for the International
Sale of Goods will not apply to this document.
-17. CONFIDENTIAL INFORMATION. Subject to the license grants and
+16. CONFIDENTIAL INFORMATION. Subject to the license grants and
restrictions contained herein, you must treat the Licensed Software as
confidential information and you agree to retain the Licensed Software in
confidence perpetually. You may not disclose any part of the Licensed Software
@@ -347,16 +344,16 @@ disclose the minimum of the required information, and that you allow NXP the
opportunity to object to such court or other legal body requiring such
disclosure.
-18. TRADEMARKS. You are not authorized to use any NXP trademarks, brand
+17. TRADEMARKS. You are not authorized to use any NXP trademarks, brand
names, or logos.
-19 ENTIRE AGREEMENT. This Agreement constitutes the entire agreement
+18. ENTIRE AGREEMENT. This Agreement constitutes the entire agreement
between you and NXP regarding the subject matter of this Agreement, and
supersedes all prior communications, negotiations, understandings, agreements
or representations, either written or oral, if any. This Agreement may only be
amended in written form, signed by you and NXP.
-20. SEVERABILITY. If any provision of this Agreement is held for any
+19. SEVERABILITY. If any provision of this Agreement is held for any
reason to be invalid or unenforceable, then the remaining provisions of this
Agreement will be unimpaired and, unless a modification or replacement of the
invalid or unenforceable provision is further held to deprive you or NXP of a
@@ -365,11 +362,11 @@ invalid or unenforceable provision will be replaced with a provision that is
valid and enforceable and that comes closest to the intention underlying the
invalid or unenforceable provision.
-21. NO WAIVER. The waiver by NXP of any breach of any provision of this
+20. NO WAIVER. The waiver by NXP of any breach of any provision of this
Agreement will not operate or be construed as a waiver of any other or a
subsequent breach of the same or a different provision.
-22. AUDIT. You will keep full, clear and accurate records with respect
+21. AUDIT. You will keep full, clear and accurate records with respect
to your compliance with the limited license rights granted under this Agreement
for three years following expiration or termination of this Agreement. NXP will
have the right, either itself or through an independent certified public
@@ -379,24 +376,25 @@ compliance with the limited license rights granted above. You must make prompt
adjustment to compensate for any errors and/or omissions disclosed by such
examination or audit.
-23. NOTICES. All notices and communications under this
+22. NOTICES. All notices and communications under this
Agreement will be made in writing, and will be effective when received at the
following addresses:
- NXP: NXP B.V.
- High Tech Campus 60
- 5656 AG Eindhoven
- The Netherlands
+ NXP: NXP B.V.
+ High Tech Campus 60
+ 5656 AG Eindhoven
+ The Netherlands
+
ATTN: Legal Department
You: The address provided at registration will be used.
-24. RELATIONSHIP OF THE PARTIES. The parties are independent
+23. RELATIONSHIP OF THE PARTIES. The parties are independent
contractors. Nothing in this Agreement will be construed to create any
partnership, joint venture, or similar relationship. Neither party is
authorized to bind the other to any obligations with third parties.
-25. SUCCESSION AND ASSIGNMENT. This Agreement will be binding upon and
+24. SUCCESSION AND ASSIGNMENT. This Agreement will be binding upon and
inure to the benefit of the parties and their permitted successors and assigns.
You may not assign this Agreement, or any part of this Agreement, without the
prior written approval of NXP, which approval will not be unreasonably withheld
diff --git a/SCR/SCR-5.4.3_2.0.0.txt b/SCR/SCR-5.4.24_2.1.0.txt
index fdf5b719..67aab05a 100644
--- a/SCR/SCR-5.4.3_2.0.0.txt
+++ b/SCR/SCR-5.4.24_2.1.0.txt
@@ -1,12 +1,12 @@
NXP Software Content Register
-Release - Linux 5.4.3_2.0.0
- March 2020
+Release - Linux 5.4.24_2.1.0
+ June 2020
Yocto Project recipe manifest:
-repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx_5.4.3_2.0.0.xml
+repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-zeus -m imx_5.4.24_2.1.0.xml
-Release tag: rel_imx_5.4.3_2.0.0
+Release tag: rel_imx_5.4.24_2.1.0
--------------------------------------------
BSP Packages
@@ -18,7 +18,7 @@ License File: COPYING
Package Category: BSP
Type of Content: source
Description and comments: The Linux kernel with i.MX-specific drivers
-Release Location: https://source.codeaurora.org/external/imx/linux-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/linux-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (GPL-2.0)
kernel.org (GPL-2.0) - https://www.kernel.org/
@@ -30,7 +30,7 @@ License File: COPYING
Package Category: BSP
Type of Content: source
Description and comments: Bootloader with i.MX-specific capabilities
-Release Location: https://source.codeaurora.org/external/imx/uboot-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/uboot-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (GPL-2.0)
Das U-Boot - Universal Bootloader (GPL-2.0) - http://www.denx.de/wiki/U-Boot/WebHome
Android Open Source Project (BSD-2-Clause) - https://source.android.com/
@@ -38,56 +38,19 @@ Origin: NXP (GPL-2.0)
--------------------------------------------
-Package: imx-optee-os.git
-Outgoing License: BSD-2-Clause
-License File: LICENSE
-Package Category: BSP
-Type of Content: source
-Description and comments: Open Portable Trusted Execution Environment for Linux on ARM
-Release Location: https://source.codeaurora.org/external/imx/imx-optee-os -b rel_imx_5.4.3_2.0.0
-Origin: NXP (BSD-2-Clause)
- OP-TEE Trusted OS (BSD-2-Clause) - https://github.com/OP-TEE/optee_os
- Mbed TLS (Apache-2.0) - https://github.com/ARMmbed/mbedtls/
-
---------------------------------------------
-
-Package: imx-optee-client.git
-Outgoing License: BSD-2-Clause
-License File: LICENSE
-Package Category: BSP
-Type of Content: source
-Description and comments: Open Portable Trusted Execution Environment for TEE Client library
-Release Location: https://source.codeaurora.org/external/imx/imx-optee-client -b rel_imx_5.4.3_2.0.0
-Origin: NXP (BSD-2-Clause)
- optee_client (BSD-2-Clause) - https://github.com/OP-TEE/optee_client
-
---------------------------------------------
-
-Package: imx-optee-test.git
-Outgoing License: BSD-2-Clause (ta/) and GPL-2.0 (host/)
-License File: LICENSE.md
-Package Category: BSP
-Type of Content: source
-Description and comments: Open Portable Trusted Execution Environment sanity tests
-Release Location: https://source.codeaurora.org/external/imx/imx-optee-test -b rel_imx_5.4.3_2.0.0
-Origin: NXP (BSD-2-Clause)
- optee_test (BSD-2-Clause) - https://github.com/OP-TEE/optee_test
-
---------------------------------------------
-
Package: imx-atf.git
Outgoing License: BSD-3-Clause
-License File: license.rst
+License File: docs/license.rst
Package Category: BSP
Type of Content: source
Description and comments: ARM Trusted Firmware
-Release Location: https://source.codeaurora.org/external/imx/imx-atf -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/imx-atf -b rel_imx_5.4.24_2.1.0
Origin: NXP (BSD-3-clause)
arm-trusted-firmware - ARM Limited (BSD-3-clause) - http://github.com/ARM-software/arm-trusted-firmware/
--------------------------------------------
-Package: imx-sc-firmware-1.4.0.bin
+Package: imx-sc-firmware-1.5.0.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: BSP
@@ -99,66 +62,46 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx-mkimage.git
-Outgoing License: GPL-2.0
-License File: COPYING
-Package Category: BSP
-Type of Content: source
-Description and comments: Make Image BootLoader
-Release Location: https://source.codeaurora.org/external/imx/imx-mkimage -b rel_imx_5.4.3_2.0.0
-Origin: NXP (GPL-2.0)
- Das U-Boot - Universal Bootloader (GPL-2.0) - http://www.denx.de/wiki/U-Boot/WebHome
-
---------------------------------------------
-
-Package: imx-seco-2.6.1.bin
+Package: firmware-imx-8.8.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: BSP
Type of Content: binary
-Description and comments: BSP firmware – SECO
+Description and comments: BSP firmware - DDR EPDC HDMI SDMA VPU
Release Location: Mirror
Origin: NXP (proprietary)
---------------------------------------------
+ In addition, these components contain code from the companies listed below.
+ DDR: origin: Synopsys (proprietary)
+ EASRC: origin: NXP (proprietary)
+ EPDC: origin: E Ink Corporation (proprietary)
+ HDMI: origin: Cadence Design Systems, Inc. (proprietary)
+ SDMA: origin: NXP (proprietary)
+ XCVR: origin: NXP (proprietary)
+ XUVI: origin: NXP (proprietary)
+ VPU: vpu_fw_imx27_TO1.bin
+ vpu_fw_imx27_TO2.bin
+ vpu_fw_imx51.bin
+ vpu_fw_imx53.bin
+ vpu_fw_imx6d.bin
+ vpu_fw_imx6q.bin
+ origin: Chips & Media, Inc. (proprietary)
-Package: imx-seco-libs.bin
-Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
-License File: COPYING
-Package Category: BSP
-Type of Content: source
-Description and comments: BSP source – SECO
-Release Location: Mirror
-Origin: NXP (proprietary)
+ vpu_fw_imx8_dec.bin
+ vpu_fw_imx8_enc.bin
+ origin: Amphion Semiconductor Ltd (proprietary)
--------------------------------------------
-Package: firmware-imx-8.7.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: imx-mkimage.git
+Outgoing License: GPL-2.0
License File: COPYING
Package Category: BSP
-Type of Content: binary
-Description and comments: BSP firmware - DDR EPDC HDMI SDMA VPU
-Release Location: Mirror
-Origin: NXP (proprietary)
-
- In addition, these components contain code from the companies listed below.
- DDR: origin: Synopsys (proprietary)
- EASRC: origin: NXP (proprietary)
- EPDC: origin: E Ink Corporation (proprietary)
- HDMI: origin: Cadence Design Systems, Inc. (proprietary)
- SDMA: origin: NXP (proprietary)
- VPU: vpu_fw_imx27_TO1.bin
- vpu_fw_imx27_TO2.bin
- vpu_fw_imx51.bin
- vpu_fw_imx53.bin
- vpu_fw_imx6d.bin
- vpu_fw_imx6q.bin
- origin: Chips & Media, Inc. (proprietary)
-
- vpu_fw_imx8_dec.bin
- vpu_fw_imx8_enc.bin
- origin: Amphion Semiconductor Ltd (proprietary)
+Type of Content: source
+Description and comments: Make Image BootLoader
+Release Location: https://github.com/nxp-imx/imx-mkimage -b rel_imx_5.4.24_2.1.0
+Origin: NXP (GPL-2.0)
+ Das U-Boot - Universal Bootloader (GPL-2.0) - http://www.denx.de/wiki/U-Boot/WebHome
--------------------------------------------
@@ -168,7 +111,7 @@ License File: COPYING-LGPL-2.1
Package Category: BSP
Type of Content: source
Description and comments: BSP libraries
-Release Location: https://source.codeaurora.org/external/imx/imx-lib -b master
+Release Location: https://github.com/nxp-imx/imx-lib -b master
Origin: NXP (LGPL-2.1)
--------------------------------------------
@@ -179,7 +122,7 @@ License File: COPYING
Package Category: BSP
Type of Content: source
Description and comments: Linux unit test applications
-Release Location: https://source.codeaurora.org/external/imx/imx-test -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/imx-test -b rel_imx_5.4.24_2.1.0
Origin: NXP (GPL-2.0)
module_test: NXP (GPL-2.0+)
Hantro Products Oy. (GPL-2.0+)
@@ -243,36 +186,98 @@ Origin: NXP (GPL-2.0)
--------------------------------------------
-Package: imx-jailhouse.git
-Outgoing License: GPL-2.0
+Package: qcacld-2.0-imx.git
+Outgoing License: ISC
License File: COPYING
Package Category: BSP
Type of Content: source
-Description and comments: A partitioning Hypervisor based on Linux
-Release Location: https://source.codeaurora.org/external/imx/imx-jailhouse -b rel_imx_5.4.3_2.0.0
-Origin: NXP (GPL-2.0)
- Siemens AG (GPL-2.0) - https://github.com/siemens/jailhouse
+Description and comments: QCA9377 WLAN linux driver
+Release Location: https://github.com/nxp-imx/qcacld-2.0-imx -b rel_imx_5.4.24_2.1.0
+Origin: NXP (ISC)
+ Qualcomm Atheros, Inc. (ISC) – https://source.codeaurora.org/external/wlan/qcacld-2.0
--------------------------------------------
-Package: imx-xen.git
-Outgoing License: GPL-2.0
+Package: firmware-qca-3.0.2.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies and Qualcomm Atheros License
License File: COPYING
Package Category: BSP
+Type of Content: binary
+Description and comments: Qca9377 WLAN & BT firmware
+Release Location: Mirror
+Origin: Qualcomm Atheros, Inc. (proprietary)
+
+--------------------------------------------
+
+Package: imx-firmware.git
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: nxp/EULA.txt
+Package Category: BSP
+Type of Content: binary
+Description and comments: BSP firmware - Broadcom Bluetooh and WIFI
+Release Location: https://github.com/NXP/imx-firmware -b master
+Origin: brcm: Broadcom Corporation (proprietary)
+ cyw-wifi-bt: Cypress Semiconductor Corporation (proprietary)
+ nxp: NXP (proprietary)
+
+--------------------------------------------
+
+Package: mwifiex.git
+Outgoing License: GPL-2.0
+License File: mwifiex*/gpl-2.0.txt
+Package Category: BSP
Type of Content: source
-Description and comments: A Virtual Machine Monitor
-Release Location: https://source.codeaurora.org/external/imx/imx-xen -b rel_imx_5.4.3_2.0.0
+Description and comments: NXP Wi-Fi linux SDK
+Release Location: https://github.com/nxp-imx/mwifiex -b rel_imx_5.4.24_2.1.0
Origin: NXP (GPL-2.0)
--------------------------------------------
+Package: imx-seco-3.6.3.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: BSP
+Type of Content: binary
+Description and comments: BSP firmware - SECO
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: imx-seco-libs.git
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: EULA.txt
+Package Category: BSP
+Type of Content: source
+Description and comments: BSP source - SECO
+Release Location: https://github.com/NXP/imx-seco-libs.git -b rel_imx_5.4.24_2.1.0
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
+Package: sof-imx-1.5.0-1
+Outgoing License: BSD-3-Clause
+License File: LICENCE
+Package Category: BSP
+Type of Content: binary
+Description and comments: Sound Open Firmware
+Release Location: Mirror
+Origin: NXP (BSD-3-clause)
+ Intel Corporation (BSD-3-clause)
+ Cadence Design Systems, Inc. (MIT)
+ Ulf Magnusson (ISC)
+ FreeBSD (BSD-2-clause)
+ source code in: https://github.com/thesofproject/sof
+
+--------------------------------------------
+
Package: simg2img.git
Outgoing License: Apache-2.0
License File: COPYING
Package Category: BSP
Type of Content: source
Description and comments: Tool to convert Android sparse images to raw images
-Release Location: https://source.codeaurora.org/external/imx/simg2img -b master
+Release Location: https://github.com/nxp-imx/simg2img -b master
Origin: NXP (Apache-2.0)
The Android Open Source Project (Apache-2.0) - https://android.googlesource.com/platform/system/core/+/master/libsparse
Gary S Brown (Public Domain) - http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/libkern/crc32.c?txt
@@ -304,42 +309,68 @@ Origin: NXP (GPL-2.0)
--------------------------------------------
-Package: qcacld-2.0-imx.git
-Outgoing License: ISC
-License File: COPYING
+Package: imx-optee-client.git
+Outgoing License: BSD-2-Clause
+License File: LICENSE
Package Category: BSP
Type of Content: source
-Description and comments: QCA9377 WLAN linux driver
-Release Location: https://source.codeaurora.org/external/imx/qcacld-2.0-imx -b rel_imx_5.4.3_2.0.0
-Origin: NXP (ISC)
- Qualcomm Atheros, Inc. (ISC) – https://source.codeaurora.org/external/wlan/qcacld-2.0
+Description and comments: Open Portable Trusted Execution Environment for TEE Client library
+Release Location: https://github.com/nxp-imx/imx-optee-client -b rel_imx_5.4.24_2.1.0
+Origin: NXP (BSD-2-Clause)
+ optee_client (BSD-2-Clause) - https://github.com/OP-TEE/optee_client
--------------------------------------------
-Package: firmware-qca-3.0.2.bin
-Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies and Qualcomm Atheros License
+Package: imx-optee-os.git
+Outgoing License: BSD-2-Clause
+License File: LICENSE
+Package Category: BSP
+Type of Content: source
+Description and comments: Open Portable Trusted Execution Environment for Linux on ARM
+Release Location: https://github.com/nxp-imx/imx-optee-os -b rel_imx_5.4.24_2.1.0
+Origin: NXP (BSD-2-Clause)
+ OP-TEE Trusted OS (BSD-2-Clause) - https://github.com/OP-TEE/optee_os
+ Mbed TLS (Apache-2.0) - https://github.com/ARMmbed/mbedtls/
+
+--------------------------------------------
+
+Package: imx-optee-test.git
+Outgoing License: BSD-2-Clause (ta/) and GPL-2.0 (host/)
+License File: LICENSE.md
+Package Category: BSP
+Type of Content: source
+Description and comments: Open Portable Trusted Execution Environment sanity tests
+Release Location: https://github.com/nxp-imx/imx-optee-test -b rel_imx_5.4.24_2.1.0
+Origin: NXP (BSD-2-Clause)
+ optee_test (BSD-2-Clause) - https://github.com/OP-TEE/optee_test
+
+--------------------------------------------
+
+Package: imx-jailhouse.git
+Outgoing License: GPL-2.0
License File: COPYING
Package Category: BSP
-Type of Content: binary
-Description and comments: Qca9377 WLAN & BT firmware
-Release Location: Mirror
-Origin: Qualcomm Atheros, Inc. (proprietary)
+Type of Content: source
+Description and comments: A partitioning Hypervisor based on Linux
+Release Location: https://github.com/nxp-imx/imx-jailhouse -b rel_imx_5.4.24_2.1.0
+Origin: NXP (GPL-2.0)
+ Siemens AG (GPL-2.0) - https://github.com/siemens/jailhouse
--------------------------------------------
-Package: mwifiex.git
+Package: imx-xen.git
Outgoing License: GPL-2.0
-License File: gpl-2.0.txt
+License File: COPYING
Package Category: BSP
Type of Content: source
-Description and comments: Marvell Wi-Fi linux driver
-Release Location: https://source.codeaurora.org/external/imx/mwifiex -b rel_imx_5.4.3_2.0.0
+Description and comments: A Virtual Machine Monitor
+Release Location: https://github.com/nxp-imx/imx-xen -b rel_imx_5.4.24_2.1.0
Origin: NXP (GPL-2.0)
--------------------------------------------
Package: ml-security-1.0.2.bin
-Outgoing License: LA_OPT_NXP_Software_License v8 June 2019 - Production Use - Section 2.3 applies
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: BSP
Type of Content: binary
@@ -349,29 +380,50 @@ Origin: NXP (NXP Proprietary)
--------------------------------------------
-Package: imx-firmware.git
-Outgoing License: LA_OPT_NXP_Software_License v5 January 2019 - Production Use - Section 2.3 applies
-License File: EULA.txt
+Package: imx-smw.git
+Outgoing License: BSD-3-Clause
+License File: COPYING
Package Category: BSP
-Type of Content: binary
-Description and comments: BSP firmware - Broadcom Bluetooh and WIFI
-Release Location: https://github.com/NXP/imx-firmware -b master
-Origin: Broadcom Corporation (proprietary)
- Cypress Semiconductor Corporation (proprietary)
+Type of Content: source
+Description and comments: NXP i.MX Security Middleware Library
+Release Location: https://github.com/nxp-imx/imx-smw -b rel_imx_5.4.24_2.1.0
+Origin: NXP (BSD-3-Clause)
--------------------------------------------
Graphics Packages
--------------------------------------------
-Package: arm-computelibrary-imx.git
-Outgoing License: MIT
-License File: LICENSE
+Package: isp-vvcam.git
+Outgoing License: GPL-2.0
+License File: vvcam/LICENSE
Package Category: Graphics
-Type of Content: source
-Description and comments: ARM Compute Library fork
-Release Location: https://source.codeaurora.org/external/imx/ARM-ComputeLibrary-imx -b rel_imx_5.4.3_2.0.0
-Origin: NXP (MIT)
- ARM Software (MIT) - https://github.com/ARM-software/ComputeLibrary
+Type of Content: ISP Kernel Module source
+Description and comments: Kernel Loadable Module for ISP
+Release Location: https://github.com/nxp-imx/isp-vvcam -b rel_imx_5.4.24_2.1.0
+Origin: VeriSilicon Holdings Co., Ltd. (GPL-2.0)
+
+--------------------------------------------
+
+Package: isp-imx-4.0.8.2.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: Graphics
+Type of Content: binary and source
+Description and comments: i.MX software ISP
+Release Location: Mirror
+Origin: VeriSilicon Holdings Co., Ltd. (proprietary)
+
+--------------------------------------------
+
+Package: basler-camera-1.0.2.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: Graphics
+Type of Content: binary
+Description and comments: Basler camera binary drivers
+Release Location: Mirror
+Origin: Basler AG (proprietary)
+ VeriSilicon Holdings Co., Ltd. (proprietary)
--------------------------------------------
@@ -381,13 +433,13 @@ License File: LICENSE
Package Category: Graphics
Type of Content: source
Description and comments: GPU Core IP and test application source
-Release Location: https://source.codeaurora.org/external/imx/apitrace-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/apitrace-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
apitrace (MIT) - https://github.com/apitrace/apitrace
--------------------------------------------
-Package: imx-gpu-viv-6.4.0.p2.2-aarch32.bin
+Package: imx-gpu-viv-6.4.0.p2.4-aarch32.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
@@ -405,7 +457,7 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx-gpu-viv-6.4.0.p2.2-aarch64.bin
+Package: imx-gpu-viv-6.4.0.p2.4-aarch64.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
@@ -429,7 +481,7 @@ License File: COPYING-MIT
Package Category: Graphics
Type of Content: source
Description and comments: Xserver Library extensions
-Release Location: https://source.codeaurora.org/external/imx/xf86-video-imx-vivante -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/xf86-video-imx-vivante -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
Vivante Corp. (MIT)
xorg-server (MIT) - http://xorg.freedesktop.org/
@@ -447,7 +499,7 @@ License File: License.md
Package Category: Graphics
Type of Content: source
Description and comments: Graphics sample applications
-Release Location: https://github.com/NXPmicro/gtec-demo-framework -b 5.5.0
+Release Location: https://github.com/NXPmicro/gtec-demo-framework -b 5.5.3
Origin: NXP (BSD-3-clause)
Demo Framework
The Android Open Source Project (Apache-2.0) - https://source.android.com/
@@ -477,7 +529,7 @@ Origin: NXP (BSD-3-clause)
--------------------------------------------
-Package: imx-dpu-g2d-1.8.5.bin
+Package: imx-dpu-g2d-1.8.7.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
@@ -494,7 +546,7 @@ License File: COPYING
Package Category: Graphics
Type of Content: source
Description and comments: i.MX DRM Direct Rendering Manager
-Release Location: https://source.codeaurora.org/external/imx/libdrm-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/libdrm-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
--------------------------------------------
@@ -505,7 +557,7 @@ License File: COPYING
Package Category: Graphics
Type of Content: source
Description and comments: Wayland protocol development
-Release Location: https://source.codeaurora.org/external/imx/wayland-protocols-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/wayland-protocols-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
Weston (MIT) - https://anongit.freedesktop.org/git/wayland/wayland-protocols.git
@@ -517,7 +569,7 @@ License File: COPYING
Package Category: Graphics
Type of Content: source
Description and comments: A reference implementation of a Wayland compositor
-Release Location: https://source.codeaurora.org/external/imx/weston-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/weston-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
Weston (MIT) - http://github.com/wayland-project/weston/
@@ -529,12 +581,12 @@ License File: LICENSE.txt
Package Category: Graphics
Type of Content: source
Description and comments: Sample program to monitor i.MX GPU performance data
-Release Location: https://source.codeaurora.org/external/imx/imx-gputop -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/imx-gputop -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
--------------------------------------------
-Package: imx-gpu-g2d-6.4.0.p2.2-arm.bin
+Package: imx-gpu-g2d-6.4.0.p2.4-arm.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
@@ -545,7 +597,7 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx-gpu-g2d-6.4.0.p2.2-aarch64.bin
+Package: imx-gpu-g2d-6.4.0.p2.4-aarch64.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
@@ -556,8 +608,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-aarch64-fb.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-aarch64-fb.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -567,8 +619,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-aarch64-wayland.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-aarch64-wayland.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -578,8 +630,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-aarch64-x11.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-aarch64-x11.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -589,8 +641,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-arm-fb.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-arm-fb.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -600,8 +652,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-arm-wayland.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-arm-wayland.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -611,8 +663,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: libgpuperfcnt-6.4.0.p2.2-arm-x11.bin
-Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+Package: libgpuperfcnt-6.4.0.p2.4-arm-x11.bin
+Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Graphics
Type of Content: binary
@@ -622,13 +674,30 @@ Origin: NXP (proprietary)
--------------------------------------------
+Package: nn-imx.git
+Outgoing License: MIT
+License File: LICENSE
+Package Category: Graphics
+Type of Content: source
+Description and comments: i.MX Neural Networks Accelerator Plugin
+Release Location: https://github.com/nxp-imx/nn-imx -b rel_imx_5.4.24_2.1.0
+Origin: NXP (MIT)
+ Vivante Corporation (MIT)
+ Boost Software (Boost) - https://www.boost.org/
+ Android Open Source Project (Apache 2.0) - https://developer.android.com/index.html
+ OpenCV (BSD-3-clause) - https://github.com/opencv/opencv/
+ JSON-CPP (public domain) - https://github.com/open-source-parsers/jsoncpp/
+ libjpeg (IJG) - http://www.ijg.org/
+
+--------------------------------------------
+
Package: opencv-imx.git
Outgoing License: BSD-3-Clause
License File: LICENSE
Package Category: Graphics
Type of Content: source
Description and comments: i.MX OpenCV
-Release Location: https://source.codeaurora.org/external/imx/opencv-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/opencv-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (BSD-3-Cluse)
OpenCV Foundation (BSD-3-Clause) - https://github.com/opencv/opencv
Intel Corporation (BSD-3-Clause)
@@ -639,26 +708,21 @@ Origin: NXP (BSD-3-Cluse)
--------------------------------------------
-Package: nn-imx.git
+Package: arm-computelibrary-imx.git
Outgoing License: MIT
License File: LICENSE
Package Category: Graphics
Type of Content: source
-Description and comments: i.MX Neural Networks Accelerator Plugin
-Release Location: https://source.codeaurora.org/external/imx/nn-imx -b rel_imx_5.4.3_2.0.0
+Description and comments: ARM Compute Library fork
+Release Location: https://github.com/nxp-imx/ARM-ComputeLibrary-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
- Vivante Corporation (MIT)
- Boost Software (Boost) - https://www.boost.org/
- Android Open Source Project (Apache 2.0) - https://developer.android.com/index.html
- OpenCV (BSD-3-clause) - https://github.com/opencv/opencv/
- JSON-CPP (public domain) - https://github.com/open-source-parsers/jsoncpp/
- libjpeg (IJG) - http://www.ijg.org/
+ ARM Software (MIT) - https://github.com/ARM-software/ComputeLibrary
--------------------------------------------
Multimedia Packages
--------------------------------------------
-Package: imx-codec-4.5.4.bin
+Package: imx-codec-4.5.5.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
@@ -674,7 +738,7 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx-parser-4.5.4.bin
+Package: imx-parser-4.5.5.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
@@ -691,7 +755,7 @@ License File: COPYING-LGPL-2.1
Package Category: Multimedia
Type of Content: source
Description and comments: i.MX Gstreamer 1.0 plugins
-Release Location: https://source.codeaurora.org/external/imx/imx-gst1.0-plugin -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/imx-gst1.0-plugin -b rel_imx_5.4.24_2.1.0
Origin: NXP (LGPL-2.1)
Gstreamer plugins-Base (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-base/
Gstreamer plugins-Good (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-good/
@@ -705,7 +769,7 @@ License File: COPYING
Package Category: Multimedia
Type of Content: source
Description and comments: Open Source Multimedia Farmework
-Release Location: https://source.codeaurora.org/external/imx/gstreamer -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/gstreamer -b rel_imx_5.4.24_2.1.0
Origin: NXP (LGPL-2.1)
GStreamer (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gstreamer/
@@ -717,7 +781,7 @@ License File: COPYING
Package Category: Multimedia
Type of Content: source
Description and comments: Gstreamer plugins with good quality code and correct functionality
-Release Location: https://source.codeaurora.org/external/imx/gst-plugins-good -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/gst-plugins-good -b rel_imx_5.4.24_2.1.0
Origin: NXP (LGPL-2.1)
Gstreamer plugins-Good (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-good/
@@ -725,11 +789,11 @@ Origin: NXP (LGPL-2.1)
Package: gst-plugins-base.git
Outgoing License: LGPL-2.0
-License File: COPYING.LIB
+License File: COPYING
Package Category: Multimedia
Type of Content: source
Description and comments: Collection of well-groomed and well-maintained Gstreamer plugins
-Release Location: https://source.codeaurora.org/external/imx/gst-plugins-base -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/gst-plugins-base -b rel_imx_5.4.24_2.1.0
Origin: NXP (LGPL-2.1)
Gstreamer plugins-Base (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-base/
@@ -741,7 +805,7 @@ License File: COPYING.LIB
Package Category: Multimedia
Type of Content: source
Description and comments: Gstreamer plug-ins that aren't up to par compared to the rest. Close to good quality but missing something.
-Release Location: https://source.codeaurora.org/external/imx/gst-plugins-bad -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/gst-plugins-bad -b rel_imx_5.4.24_2.1.0
Origin: NXP (LGPL-2.1)
Gstreamer plugins-Bad (LGPL-2.1+) - http://gstreamer.freedesktop.org/src/gst-plugins-bad/
@@ -759,20 +823,31 @@ Origin: NXP (proprietary)
--------------------------------------------
+Package: imx-sw-pdm-1.0.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: Multimedia
+Type of Content: binary
+Description and comments: NXP PDM to PCM Software Decimation SIMD Library
+Release Location: Mirror
+Origin: NXP (proprietary)
+
+--------------------------------------------
+
Package: imx-vpuwrap.git
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
Type of Content: source
Description and comments: i.MX VPU wrapper library
-Release Location: https://github.com/NXP/imx-vpuwrap -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/NXP/imx-vpuwrap.git -b rel_imx_5.4.24_2.1.0
Origin: NXP (proprietary)
sqlite (Public Domain) - http://www.hwaci.com/sw/sqlite/index.html
--------------------------------------------
-Package: imx-vpu-5.4.39.2.bin
-Outgoing License: LA_OPT_NXP_Software_License v9 August 2019 - Production Use - Section 2.3 applies
+Package: imx-vpu-5.4.39.3.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
Type of Content: binary
@@ -783,7 +858,7 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx-vpu-hantro-1.17.0.bin
+Package: imx-vpu-hantro-1.18.0.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
@@ -797,7 +872,7 @@ Origin: VeriSilicon Inc. (proprietary)
--------------------------------------------
-Package: imx-vpu-hantro-vc-1.0.0.bin
+Package: imx-vpu-hantro-vc-1.1.0.bin
Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: Multimedia
@@ -838,7 +913,7 @@ License File: COPYING.GPL
Package Category: Multimedia
Type of Content: source
Description and comments: Plugins for various audio libraries and sound servers
-Release Location: https://source.codeaurora.org/external/imx/imx-alsa-plugins -b nxp/master
+Release Location: https://github.com/nxp-imx/imx-alsa-plugins -b nxp/master
Origin: NXP (GPL-2.0)
Alsa Plugins (GPL-2.0+) - ftp://ftp.alsa-project.org/pub/plugins/
GNU libtool (GPL-2.0+) http://www.gnu.org/software/libtool/
@@ -847,8 +922,21 @@ Origin: NXP (GPL-2.0)
M4 Processor Packages
--------------------------------------------
-Package: imx7ulp-m4-demo-2.6.0.bin
-Outgoing License: LA_OPT_NXP_Software_License v7 April 2019 - Production Use - Section 2.3 applies
+Package: imx7ulp-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
+License File: COPYING
+Package Category: M4_Processor
+Type of Content: binary
+Description and comments: i.MX MCUXpresso SDK demo image on Cortex-M4 core
+Release Location: Mirror
+Origin: NXP (proprietary)
+ CMSIS Core Header files - ARM Limited (BSD-3-clause) - http://silver.arm.com
+ CMSIS DSP Library - ARM Limited (BSD-3-clause) - http://silver.arm.com
+
+--------------------------------------------
+
+Package: imx8dxl-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M4_Processor
Type of Content: binary
@@ -860,8 +948,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx8mm-m4-demo-2.6.1.bin
-Outgoing License: LA_OPT_NXP_Software_License v9 August 2019 - Production Use - Section 2.3 applies
+Package: imx8mm-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M4_Processor
Type of Content: binary
@@ -873,8 +961,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx8mq-m4-demo-2.3.0.bin
-Outgoing License: LA_OPT_BASE_LICENSE v20 June 2017
+Package: imx8mq-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M4_Processor
Type of Content: binary
@@ -886,8 +974,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx8qm-m4-demo-2.5.2.bin
-Outgoing License: LA_OPT_NXP_Software_License v5 January 2019 - Production Use - Section 2.3 applies
+Package: imx8qm-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M4_Processor
Type of Content: binary
@@ -899,8 +987,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx8qx-m4-demo-2.5.3.bin
-Outgoing License: LA_OPT_NXP_Software_License v9 August 2019 - Production Use - Section 2.3 applies
+Package: imx8qx-m4-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M4_Processor
Type of Content: binary
@@ -914,8 +1002,8 @@ Origin: NXP (proprietary)
M7 Processor Packages
--------------------------------------------
-Package: imx8mn-m7-demo-2.6.1.bin
-Outgoing License: LA_OPT_NXP_Software_License v9 August 2019 - Production Use - Section 2.3 applies
+Package: imx8mn-m7-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M7_Processor
Type of Content: binary
@@ -927,8 +1015,8 @@ Origin: NXP (proprietary)
--------------------------------------------
-Package: imx8mp-m7-demo-2.7.0.bin
-Outgoing License: LA_OPT_NXP_Software_License v10 December 2019 - Production Use - Section 2.3 applies
+Package: imx8mp-m7-demo-2.8.0.bin
+Outgoing License: LA_OPT_NXP_Software_License v11 February 2020 - Production Use - Section 2.3 applies
License File: COPYING
Package Category: M7_Processor
Type of Content: binary
@@ -940,18 +1028,18 @@ Origin: NXP (proprietary)
Mentor Graphics, Ltd. (BSD-3-Clause) - https://github.com/OpenAMP/open-amp/
--------------------------------------------
-Machine Learning Packages
+MachineLearning Packages
--------------------------------------------
-Package: tensorflow-imx.git
-Outgoing License: Apache-2.0
+Package: armnn.git
+Outgoing License: MIT
License File: LICENSE
Package Category: MachineLearning
Type of Content: source
-Description and comments: TensorFlow Lite C++ Library
-Release Location: https://source.codeaurora.org/external/imx/tensorflow-imx -b rel_imx_5.4.3_2.0.0
-Origin: NXP (Apache-2.0)
- TensorFlow (Apache-2.0) - https://github.com/tensorflow/tensorflow/
+Description and comments: ARM Neural Network SDK
+Release Location: https://github.com/nxp-imx/armnn-imx -b rel_imx_5.4.24_2.1.0
+Origin: NXP (MIT)
+ armnn (MIT) - https://github.com/ARM-software/armnn
--------------------------------------------
@@ -961,7 +1049,7 @@ License File: LICENSE
Package Category: MachineLearning
Type of Content: source
Description and comments: Onnxruntime cross-platform scoring engine
-Release Location: https://source.codeaurora.org/external/imx/onnxruntime-imx -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/nxp-imx/onnxruntime-imx -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
Microsoft/onnxruntime (MIT) - https://github.com/Microsoft/onnxruntime
Google's Protocol Buffer (BSD-3-clause) - https://tracker.debian.org/pkg/protobuf
@@ -975,28 +1063,28 @@ License File: LICENSE
Package Category: MachineLearning
Type of Content: source
Description and comments: Python wrapper for armnn
-Release Location: https://github.com/NXPmicro/pyarmnn-release -b rel_imx_5.4.3_2.0.0
+Release Location: https://github.com/NXPmicro/pyarmnn-release -b rel_imx_5.4.24_2.1.0
Origin: NXP (MIT)
--------------------------------------------
-Package: armnn-imx.git
-Outgoing License: MIT
+Package: tensorflow-imx.git
+Outgoing License: Apache-2.0
License File: LICENSE
Package Category: MachineLearning
Type of Content: source
-Description and comments: ARM Neural Network SDK
-Release Location: https://source.codeaurora.org/external/imx/armnn-imx -b rel_imx_5.4.3_2.0.0
-Origin: NXP (MIT)
- armnn (MIT) - https://github.com/ARM-software/armnn
+Description and comments: TensorFlow Lite C++ Library
+Release Location: https://github.com/nxp-imx/tensorflow-imx -b rel_imx_5.4.24_2.1.0
+Origin: NXP (Apache-2.0)
+ TensorFlow (Apache-2.0) - https://github.com/tensorflow/tensorflow/
--------------------------------------------
Tools Packages
--------------------------------------------
-Package: Verisilicon_Tool_Acuity_IDE_4_2_0_CL257550_Linux_Windows_SDK6.4.x_234062_CL254215A_20200325.tgz
+Package: VeriSiliconTool-6.4.0.p2.2.tgz
Outgoing License: VeriSilicon License
-License File: In Installer
+License File:
Package Category: Tools
Type of Content: binary
Description and comments: VeriSilicon Tools
diff --git a/classes/fsl-eula-unpack.bbclass b/classes/fsl-eula-unpack.bbclass
index fee78907..65128300 100644
--- a/classes/fsl-eula-unpack.bbclass
+++ b/classes/fsl-eula-unpack.bbclass
@@ -53,7 +53,7 @@ FSL_EULA_FILE_MD5SUMS = " \
# The checksum for the EULA in the layer
FSL_EULA_FILE_MD5SUM ?= \
- "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V10}"
+ "${FSL_EULA_FILE_MD5SUM_LA_OPT_NXP_SOFTWARE_LICENSE_V11}"
LIC_FILES_CHKSUM_LAYER ?= "file://${FSL_EULA_FILE};md5=${FSL_EULA_FILE_MD5SUM}"
LIC_FILES_CHKSUM_LAYER[vardepsexclude] += "FSL_EULA_FILE"
diff --git a/classes/fsl-kernel-localversion.bbclass b/classes/fsl-kernel-localversion.bbclass
index ff1075e5..d4322e25 100644
--- a/classes/fsl-kernel-localversion.bbclass
+++ b/classes/fsl-kernel-localversion.bbclass
@@ -12,32 +12,25 @@
SCMVERSION ??= "y"
LOCALVERSION ??= "+fslc"
-kernel_conf_variable() {
- CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;"
- if test "$2" = "n"
- then
- echo "# CONFIG_$1 is not set" >> ${B}/.config
- else
- echo "CONFIG_$1=$2" >> ${B}/.config
- fi
-}
+# LINUX_VERSION_EXTENSION is used as CONFIG_LOCALVERSION by kernel-yocto class
+LINUX_VERSION_EXTENSION ?= "${LOCALVERSION}"
-do_preconfigure() {
- mkdir -p ${B}
- echo "" > ${B}/.config
- CONF_SED_SCRIPT=""
+do_kernel_localversion[dirs] += "${S} ${B}"
+do_kernel_localversion() {
- kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\""
- if [ "${SCMVERSION}" = "y" ]; then
- kernel_conf_variable LOCALVERSION_AUTO y
+ # Fallback for recipes not able to use LINUX_VERSION_EXTENSION
+ if [ "${@bb.data.inherits_class('kernel-yocto', d)}" = "False" ]; then
+ echo "CONFIG_LOCALVERSION=${LOCALVERSION}" >> ${B}/.config
fi
- sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config'
-
if [ "${SCMVERSION}" = "y" ]; then
# Add GIT revision to the local version
head=`git --git-dir=${S}/.git rev-parse --verify --short HEAD 2> /dev/null`
printf "%s%s" +g $head > ${S}/.scmversion
+
+ sed -i -e "/CONFIG_LOCALVERSION_AUTO[ =]/d" ${B}/.config
+ echo "CONFIG_LOCALVERSION_AUTO=y" >> ${B}/.config
fi
}
-addtask preconfigure before do_configure after do_unpack do_patch
+
+addtask kernel_localversion before do_configure after do_patch do_kernel_configme
diff --git a/classes/use-imx-security-controller-firmware.bbclass b/classes/use-imx-security-controller-firmware.bbclass
new file mode 100644
index 00000000..7b82bcaf
--- /dev/null
+++ b/classes/use-imx-security-controller-firmware.bbclass
@@ -0,0 +1,36 @@
+#
+# Class to provide a possibility to re-use names of Security Controller (SECO)
+# Firmware files, which are required by certain derivatives on i.MX8 family.
+#
+# SECO Firmware names are used by imx-boot and imx-seco recipes, therefore
+# their respective definitions are moved into a separate class, which is
+# inherited by both recipes.
+#
+# Currently, only 'mx8m' family does not require SECO FW to be provided in the
+# target image, therefore as a first step - the machine override is verified
+# if it matches, and then derivative is taken.
+#
+# NOTE: SECO_FIRMWARE_NAME defaults to empty string, and is verified against
+# the family first. If a derivative in the family does not have a firmware name
+# set in this class - recipe parsing is stopped.
+# This behavior ensures that derivatives which requires SECO Firmware to be
+# present in the image file have it properly defined.
+
+SECO_FIRMWARE_NAME ?= ""
+
+SECO_FIRMWARE_NAME_mx8qm = "mx8qmb0-ahab-container.img"
+SECO_FIRMWARE_NAME_mx8qxp = "mx8qxb0-ahab-container.img"
+SECO_FIRMWARE_NAME_mx8qxpc0 = "mx8qxc0-ahab-container.img"
+SECO_FIRMWARE_NAME_mx8phantomdxl = "mx8qxb0-ahab-container.img"
+SECO_FIRMWARE_NAME_mx8dxl = "mx8dxla0-ahab-container.img"
+
+python () {
+ if "mx8m" in d.getVar('MACHINEOVERRIDES').split(":"):
+ return # We need to allow the recipes to be parsed for this case
+
+ seco_firmware = d.getVar('SECO_FIRMWARE_NAME')
+ if not seco_firmware:
+ raise bb.parse.SkipRecipe("This SoC requires 'SECO_FIRMWARE_NAME', define it in 'use-imx-security-controller-firmware' bbclass")
+}
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
diff --git a/conf/machine/imx6qdlsabreauto.conf b/conf/machine/imx6qdlsabreauto.conf
index 16c1dcb6..a6d5908b 100644
--- a/conf/machine/imx6qdlsabreauto.conf
+++ b/conf/machine/imx6qdlsabreauto.conf
@@ -40,6 +40,10 @@ UBOOT_SUFFIX = "img"
SPL_BINARY = "SPL"
WKS_FILE = "imx-uboot-spl-bootpart.wks.in"
+# The fsl distro uses u-boot-imx which does not provide unified functionality
+# for dl/q/qp SoC variants. Change the defconfig to the targeted SoC variant.
+UBOOT_MACHINE_fsl = "mx6qsabreauto_defconfig"
+
SERIAL_CONSOLES = "115200;ttymxc3"
MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k"
diff --git a/conf/machine/imx6qdlsabresd.conf b/conf/machine/imx6qdlsabresd.conf
index 2fe95dc6..406ad7d7 100644
--- a/conf/machine/imx6qdlsabresd.conf
+++ b/conf/machine/imx6qdlsabresd.conf
@@ -49,6 +49,10 @@ UBOOT_SUFFIX = "img"
SPL_BINARY = "SPL"
WKS_FILE = "imx-uboot-spl-bootpart.wks.in"
+# The fsl distro uses u-boot-imx which does not provide unified functionality
+# for dl/q/qp SoC variants. Change the defconfig to the targeted SoC variant.
+UBOOT_MACHINE_fsl = "mx6qsabresd_defconfig"
+
SERIAL_CONSOLES = "115200;ttymxc0"
MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k"
diff --git a/conf/machine/imx6ullevk.conf b/conf/machine/imx6ullevk.conf
index 1b31c2f7..bcaeede7 100644
--- a/conf/machine/imx6ullevk.conf
+++ b/conf/machine/imx6ullevk.conf
@@ -2,7 +2,7 @@
#@NAME: NXP i.MX6ULL Evaluation Kit
#@SOC: i.MX6ULL
#@DESCRIPTION: Machine configuration for NXP i.MX6ULL EVK
-#@MAINTAINER: Alexandru Palalau <ioan-alexandru.palalau@nxp.com>
+#@MAINTAINER: Lauren Post <lauren.post@nxp.com>
MACHINEOVERRIDES =. "mx6:mx6ull:"
diff --git a/conf/machine/imx8mmevk.conf b/conf/machine/imx8mmevk.conf
index 57d74d9c..db722c72 100644
--- a/conf/machine/imx8mmevk.conf
+++ b/conf/machine/imx8mmevk.conf
@@ -39,7 +39,7 @@ SPL_BINARY = "spl/u-boot-spl.bin"
DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
# Set u-boot DTB
-UBOOT_DTB_NAME = "fsl-imx8mm-evk.dtb"
+UBOOT_DTB_NAME = "imx8mm-evk.dtb"
# Set imx-mkimage boot target
IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}"
diff --git a/conf/machine/imx8mnevk.conf b/conf/machine/imx8mnevk.conf
index cc92ac7c..80d77ac8 100644
--- a/conf/machine/imx8mnevk.conf
+++ b/conf/machine/imx8mnevk.conf
@@ -36,7 +36,7 @@ DDR_FIRMWARE_NAME = "ddr4_imem_1d_201810.bin \
ddr4_dmem_2d_201810.bin"
# Set u-boot DTB
-UBOOT_DTB_NAME = "fsl-imx8mn-ddr4-evk.dtb"
+UBOOT_DTB_NAME = "imx8mn-ddr4-evk.dtb"
# Set imx-mkimage boot target
IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_ddr4_evk_flexspi', 'flash_ddr4_evk', d)}"
diff --git a/conf/machine/imx8mpevk.conf b/conf/machine/imx8mpevk.conf
new file mode 100644
index 00000000..d1376649
--- /dev/null
+++ b/conf/machine/imx8mpevk.conf
@@ -0,0 +1,66 @@
+#@TYPE: Machine
+#@NAME: NXP i.MX8MP Evaluation Kit and i.MX8MP Evaluation Kit
+#@SOC: i.MX8MP
+#@DESCRIPTION: Machine configuration for NXP i.MX8MP EVK
+#@MAINTAINER: Alexandru Palalau <ioan-alexandru.palalau@nxp.com>
+
+MACHINEOVERRIDES =. "mx8:mx8m:mx8mp:"
+
+require conf/machine/include/imx-base.inc
+require conf/machine/include/tune-cortexa53.inc
+
+IMX_DEFAULT_BSP = "nxp"
+
+MACHINE_FEATURES += " pci wifi bluetooth optee mrvl8997"
+
+KERNEL_DEVICETREE = " \
+ freescale/imx8mp-ab2.dtb \
+ freescale/imx8mp-evk-basler.dtb \
+ freescale/imx8mp-evk.dtb \
+ freescale/imx8mp-evk-dsp.dtb \
+ freescale/imx8mp-evk-flexcan2.dtb \
+ freescale/imx8mp-evk-inmate.dtb \
+ freescale/imx8mp-evk-jdi-wuxga-lvds-panel.dtb \
+ freescale/imx8mp-evk-it6263-lvds-dual-channel.dtb \
+ freescale/imx8mp-evk-ov2775.dtb \
+ freescale/imx8mp-evk-rm67191.dtb \
+ freescale/imx8mp-evk-root.dtb \
+ freescale/imx8mp-evk-rpmsg.dtb \
+ freescale/imx8mp-evk-sof-wm8960.dtb \
+"
+
+UBOOT_CONFIG ??= "sd"
+UBOOT_CONFIG[sd] = "imx8mp_evk_defconfig,sdcard"
+UBOOT_CONFIG[fspi] = "imx8mp_evk_defconfig"
+UBOOT_CONFIG[ecc] = "imx8mp_evk_inline_ecc_defconfig"
+UBOOT_CONFIG[mfgtool] = "imx8mp_evk_defconfig"
+SPL_BINARY = "spl/u-boot-spl.bin"
+
+# Set DDR FIRMWARE
+DDR_FIRMWARE_NAME = " \
+ lpddr4_pmu_train_1d_dmem_201904.bin \
+ lpddr4_pmu_train_1d_imem_201904.bin \
+ lpddr4_pmu_train_2d_dmem_201904.bin \
+ lpddr4_pmu_train_2d_imem_201904.bin \
+"
+
+# Set u-boot DTB
+UBOOT_DTB_NAME = "imx8mp-evk.dtb"
+
+# Set imx-mkimage boot target
+IMXBOOT_TARGETS = "${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_evk_flexspi', 'flash_evk', d)}"
+
+# Set Serial console
+SERIAL_CONSOLES = "115200;ttymxc1"
+
+IMAGE_BOOTLOADER = "imx-boot"
+
+LOADADDR = ""
+UBOOT_SUFFIX = "bin"
+UBOOT_MAKE_TARGET = ""
+IMX_BOOT_SEEK = "32"
+
+OPTEE_BIN_EXT = "8mp"
+
+# Add additional firmware
+MACHINE_FIRMWARE_append = " linux-firmware-ath10k"
diff --git a/conf/machine/imx8mqevk.conf b/conf/machine/imx8mqevk.conf
index 25e03093..2c9c8c29 100644
--- a/conf/machine/imx8mqevk.conf
+++ b/conf/machine/imx8mqevk.conf
@@ -41,7 +41,7 @@ SPL_BINARY = "spl/u-boot-spl.bin"
DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
# Set u-boot DTB
-UBOOT_DTB_NAME = "fsl-imx8mq-evk.dtb"
+UBOOT_DTB_NAME = "imx8mq-evk.dtb"
# Set imx-mkimage boot target
IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index b64596b4..f4dd8d79 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -53,6 +53,7 @@ UBOOT_ENTRYPOINT_mx7 = "0x80008000"
UBOOT_ENTRYPOINT_mx7ulp = "0x60008000"
UBOOT_ENTRYPOINT_mx8mm = "0x40480000"
UBOOT_ENTRYPOINT_mx8mn = "0x40480000"
+UBOOT_ENTRYPOINT_mx8mp = "0x40480000"
UBOOT_ENTRYPOINT_mx8mq = "0x40480000"
UBOOT_ENTRYPOINT_vf = "0x80008000"
@@ -84,6 +85,7 @@ DEFAULTTUNE_vf ?= "cortexa5thf-neon"
DEFAULTTUNE_mx8mm ?= "cortexa53-crypto"
DEFAULTTUNE_mx8mn ?= "cortexa53-crypto"
+DEFAULTTUNE_mx8mp ?= "cortexa53-crypto"
DEFAULTTUNE_mx8mq ?= "cortexa53-crypto"
DEFAULTTUNE_mx8qm ?= "cortexa72-cortexa53-crypto"
DEFAULTTUNE_mx8qxp ?= "cortexa35-crypto"
@@ -103,6 +105,7 @@ MACHINEOVERRIDES_EXTENDER_mx7ulp = "imxfbdev:imxpxp:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8qm = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mm = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mn = "imxdrm:imxgpu:imxgpu3d"
+MACHINEOVERRIDES_EXTENDER_mx8mp = "imxdrm:imxvpu:imxgpu:imxgpu2d:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8mq = "imxdrm:imxvpu:imxgpu:imxgpu3d"
MACHINEOVERRIDES_EXTENDER_mx8qxp = "imxdrm:imxdpu:imxgpu:imxgpu2d:imxgpu3d"
@@ -126,6 +129,7 @@ MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp = " \
mx8qm \
mx8mm \
mx8mn \
+ mx8mp \
mx8mq \
mx8qxp \
"
@@ -146,6 +150,7 @@ MACHINE_SOCARCH_SUFFIX_mx6ull = "-mx6ul"
MACHINE_SOCARCH_SUFFIX_mx8qm = "-mx8"
MACHINE_SOCARCH_SUFFIX_mx8mm = "-mx8mm"
MACHINE_SOCARCH_SUFFIX_mx8mn = "-mx8mn"
+MACHINE_SOCARCH_SUFFIX_mx8mp = "-mx8mp"
MACHINE_SOCARCH_SUFFIX_mx8mq = "-mx8m"
MACHINE_SOCARCH_SUFFIX_mx8qxp = "-mx8"
MACHINE_SOCARCH_SUFFIX_use-mainline-bsp = "-imx"
@@ -158,7 +163,6 @@ MACHINE_SOCARCH_FILTER_append_imx = " \
"
MACHINE_SOCARCH_FILTER_append_imxvpu = " \
imx-codec \
- imx-parser \
imx-vpuwrap \
libimxvpuapi \
virtual/imxvpu \
@@ -217,6 +221,7 @@ SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS_append = " \
# Firmware
MACHINE_FIRMWARE ?= ""
MACHINE_FIRMWARE_append_mx25 = " firmware-imx-sdma-imx25"
+MACHINE_FIRMWARE_append_mx27 = " firmware-imx-vpu-imx27"
MACHINE_FIRMWARE_append_mx7d = " linux-firmware-imx-sdma-imx7d firmware-imx-epdc"
MACHINE_FIRMWARE_append_mx6 = " linux-firmware-imx-sdma-imx6q"
MACHINE_FIRMWARE_append_mx6q = " firmware-imx-vpu-imx6q"
@@ -226,12 +231,14 @@ MACHINE_FIRMWARE_append_mx6sll = " firmware-imx-epdc"
MACHINE_FIRMWARE_append_mx6ull = " firmware-imx-epdc"
MACHINE_FIRMWARE_append_mx53 = " firmware-imx-vpu-imx53 firmware-imx-sdma-imx53"
MACHINE_FIRMWARE_append_mx51 = " firmware-imx-vpu-imx51 firmware-imx-sdma-imx51"
-MACHINE_FIRMWARE_append_mx8qxp = " firmware-imx-vpu-imx8qxp"
+MACHINE_FIRMWARE_append_mx8mm = " linux-firmware-imx-sdma-imx7d"
+MACHINE_FIRMWARE_append_mx8mn = " linux-firmware-imx-sdma-imx7d"
+MACHINE_FIRMWARE_append_mx8mp = " linux-firmware-imx-sdma-imx7d firmware-imx-easrc-imx8mn firmware-imx-xcvr-imx8mp firmware-sof-imx"
+MACHINE_FIRMWARE_append_mx8mq = " linux-firmware-imx-sdma-imx7d"
+MACHINE_FIRMWARE_append_mx8qm = " firmware-imx-vpu-imx8"
+MACHINE_FIRMWARE_append_mx8qxp = " firmware-imx-vpu-imx8"
MACHINE_FIRMWARE_append_use-mainline-bsp = " linux-firmware-imx-sdma-imx6q linux-firmware-imx-sdma-imx7d firmware-imx-vpu-imx6q firmware-imx-vpu-imx6d"
-# FIXME: Needs addition of firmware-imx of official BSPs
-#MACHINE_FIRMWARE_append_mx27 = " firmware-imx-vpu-imx27"
-
MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE}"
# Extra audio support
@@ -261,14 +268,17 @@ MACHINE_EXTRA_RRECOMMENDS += " \
"
# GStreamer 1.0 plugins
-MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
-MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta"
-MACHINE_GSTREAMER_1_0_PLUGIN_mx6q ?= "gstreamer1.0-plugins-imx-meta"
-MACHINE_GSTREAMER_1_0_PLUGIN_mx6sl ?= "gstreamer1.0-plugins-imx-meta"
-MACHINE_GSTREAMER_1_0_PLUGIN_mx6sx ?= "gstreamer1.0-plugins-imx-meta"
-MACHINE_GSTREAMER_1_0_PLUGIN_mx6ul ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN ?= ""
+MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx6q ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx6sl ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx6sx ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx6ul ?= "gstreamer1.0-plugins-imx-meta"
MACHINE_GSTREAMER_1_0_PLUGIN_mx6ull ?= "gstreamer1.0-plugins-imx-meta"
-MACHINE_GSTREAMER_1_0_PLUGIN_mx7d ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx7d ?= "gstreamer1.0-plugins-imx-meta"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8mm ?= "imx-gst1.0-plugin"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8mn ?= "imx-gst1.0-plugin"
+MACHINE_GSTREAMER_1_0_PLUGIN_mx8mp ?= "imx-gst1.0-plugin"
# Determines if the SoC has support for Vivante kernel driver
SOC_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT = "0"
@@ -305,9 +315,9 @@ PREFERRED_VERSION_libdrm_mx7 ?= "2.4.99.imx"
PREFERRED_VERSION_libdrm_mx8 ?= "2.4.99.imx"
# Use i.MX optee Version
-PREFERRED_VERSION_optee-os_mx8 ?= "3.2.0.imx"
-PREFERRED_VERSION_optee-client_mx8 ?= "3.2.0.imx"
-PREFERRED_VERSION_optee-test_mx8 ?= "3.2.0.imx"
+PREFERRED_VERSION_optee-os_mx8 ?= "3.7.0.imx"
+PREFERRED_VERSION_optee-client_mx8 ?= "3.7.0.imx"
+PREFERRED_VERSION_optee-test_mx8 ?= "3.7.0.imx"
# Handle default kernel
IMX_DEFAULT_KERNEL = "linux-fslc-imx"
@@ -361,18 +371,6 @@ SOC_DEFAULT_WKS_FILE_mxs ?= "imx-uboot-mxs-bootpart.wks.in"
WKS_FILE ?= "${SOC_DEFAULT_WKS_FILE}"
-# Certain machines override the default fsl u-boot with the
-# fslc u-boot. To restore the fsl u-boot, add use-fsl-bsp like this:
-# MACHINEOVERRIDES_prepend_imx6ulevk = "use-fsl-bsp:"
-UBOOT_MAKE_TARGET_use-fsl-bsp_mx6 = "u-boot.imx"
-UBOOT_SUFFIX_use-fsl-bsp_mx6 = "imx"
-SPL_BINARY_use-fsl-bsp_mx6 = ""
-WKS_FILE_use-fsl-bsp_mx6 = "imx-uboot-bootpart.wks.in"
-UBOOT_MAKE_TARGET_use-fsl-bsp_mx7 = "u-boot.imx"
-UBOOT_SUFFIX_use-fsl-bsp_mx7 = "imx"
-SPL_BINARY_use-fsl-bsp_mx7 = ""
-WKS_FILE_use-fsl-bsp_mx7 = "imx-uboot-bootpart.wks.in"
-
SERIAL_CONSOLES = "115200;ttymxc0"
SERIAL_CONSOLES_mxs = "115200;ttyAMA0"
diff --git a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc b/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc
index cdd0f08f..d5e67874 100644
--- a/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc
+++ b/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-imx.inc
@@ -14,7 +14,7 @@ CHROMIUM_IMX_COMMON_PATCHES ?= " "
CHROMIUM_IMX_VPU_PATCHES ?= " "
CHROMIUM_IMX_WAYLAND_PATCHES ?= " "
-SRC_URI += "git://github.com/Freescale/chromium-imx.git;destsuffix=${CHROMIUM_IMX_DESTSUFFIX};branch=${CHROMIUM_IMX_BRANCH};rev=${CHROMIUM_IMX_SRCREV}"
+SRC_URI += "git://github.com/Freescale/chromium-imx.git;destsuffix=${CHROMIUM_IMX_DESTSUFFIX};branch=${CHROMIUM_IMX_BRANCH};rev=${CHROMIUM_IMX_SRCREV};protocol=https"
do_unpack[postfuncs] += "copy_chromium_imx_files"
# using =+ instead of += to make sure add_chromium_imx_patches is
diff --git a/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb b/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
index 2f5f1afa..3a91f46d 100644
--- a/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
+++ b/dynamic-layers/openembedded-layer/recipes-dpaa/fmc/fmc_git.bb
@@ -6,7 +6,7 @@ PR = "r2"
DEPENDS = "libxml2 fmlib tclap"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/fmc;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/fmc;protocol=https;nobranch=1"
SRCREV = "c7576ab7fb6fb09b68ebc40531e5452fc89e5cd5"
S = "${WORKDIR}/git"
diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
index 187681a8..1f3f9e0f 100644
--- a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
+++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4-imx-support.inc
@@ -12,6 +12,8 @@ SRC_URI_append_imxgpu2d += " \
file://0001-Add-support-for-i.MX-codecs-to-phonon.patch \
file://0002-i.MX-video-renderer-Allow-v4l-device-from-environmen.patch \
file://0003-i.MX6-force-egl-visual-ID-33.patch \
+ file://0001-config.tests-add-DEFINES-to-compile-egl-test-with-im.patch \
+ file://0002-config.tests-add-DEFINES-to-compile-egl4gles1-test-w.patch \
"
DEPENDS_append_imxgpu2d = " virtual/kernel virtual/libgles2"
diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0001-config.tests-add-DEFINES-to-compile-egl-test-with-im.patch b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0001-config.tests-add-DEFINES-to-compile-egl-test-with-im.patch
new file mode 100644
index 00000000..7eee7cf2
--- /dev/null
+++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0001-config.tests-add-DEFINES-to-compile-egl-test-with-im.patch
@@ -0,0 +1,25 @@
+From 234580de9d63fd79a8b444358cdaeac111a17061 Mon Sep 17 00:00:00 2001
+From: Mauro Salvini <m.salvini@koansoftware.com>
+Date: Thu, 29 Sep 2022 16:06:04 +0200
+Subject: [PATCH 1/2] config.tests: add DEFINES to compile egl test with
+ imxgpu2d (Vivante)
+
+Signed-off-by: Mauro Salvini <m.salvini@koansoftware.com>
+---
+ config.tests/unix/egl/egl.pro | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config.tests/unix/egl/egl.pro b/config.tests/unix/egl/egl.pro
+index f04d0535..bc35b908 100644
+--- a/config.tests/unix/egl/egl.pro
++++ b/config.tests/unix/egl/egl.pro
+@@ -6,5 +6,6 @@ for(p, QMAKE_LIBDIR_EGL) {
+
+ !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+ !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
++DEFINES += LINUX=1 EGL_API_FB=1
+
+ CONFIG -= qt
+--
+2.17.1
+
diff --git a/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0002-config.tests-add-DEFINES-to-compile-egl4gles1-test-w.patch b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0002-config.tests-add-DEFINES-to-compile-egl4gles1-test-w.patch
new file mode 100644
index 00000000..993df85e
--- /dev/null
+++ b/dynamic-layers/qt4-layer/recipes-qt4/qt4/qt4/0002-config.tests-add-DEFINES-to-compile-egl4gles1-test-w.patch
@@ -0,0 +1,25 @@
+From adb19c68d3c92eb1a88e49e447ce827f14943486 Mon Sep 17 00:00:00 2001
+From: Mauro Salvini <m.salvini@koansoftware.com>
+Date: Thu, 29 Sep 2022 16:12:11 +0200
+Subject: [PATCH 2/2] config.tests: add DEFINES to compile egl4gles1 test with
+ imxgpu2d (Vivante)
+
+Signed-off-by: Mauro Salvini <m.salvini@koansoftware.com>
+---
+ config.tests/unix/egl4gles1/egl4gles1.pro | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config.tests/unix/egl4gles1/egl4gles1.pro b/config.tests/unix/egl4gles1/egl4gles1.pro
+index 667ea8e3..14cb4a76 100644
+--- a/config.tests/unix/egl4gles1/egl4gles1.pro
++++ b/config.tests/unix/egl4gles1/egl4gles1.pro
+@@ -6,5 +6,6 @@ for(p, QMAKE_LIBDIR_EGL) {
+
+ !isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+ !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
++DEFINES += LINUX=1 EGL_API_FB=1
+
+ CONFIG -= qt
+--
+2.17.1
+
diff --git a/recipes-bsp/alsa-state/alsa-state/imx/asound.state b/recipes-bsp/alsa-state/alsa-state/imx/asound.state
index 87f44994..c0dfc0e8 100755
--- a/recipes-bsp/alsa-state/alsa-state/imx/asound.state
+++ b/recipes-bsp/alsa-state/alsa-state/imx/asound.state
@@ -7090,3 +7090,2070 @@ state.ak4497audio {
}
}
}
+state.sofwm8960audio {
+ control.1 {
+ iface MIXER
+ name 'Capture Volume'
+ value.0 35
+ value.1 35
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 63'
+ dbmin -1725
+ dbmax 3000
+ dbvalue.0 900
+ dbvalue.1 900
+ }
+ }
+ control.2 {
+ iface MIXER
+ name 'Capture Volume ZC Switch'
+ value.0 0
+ value.1 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 1'
+ }
+ }
+ control.3 {
+ iface MIXER
+ name 'Capture Switch'
+ value.0 true
+ value.1 true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.4 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.5 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.6 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.7 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.8 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.9 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.10 {
+ iface MIXER
+ name 'Playback Volume'
+ value.0 235
+ value.1 235
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 0
+ dbvalue.0 -1000
+ dbvalue.1 -1000
+ }
+ }
+ control.11 {
+ iface MIXER
+ name 'Headphone Playback Volume'
+ value.0 101
+ value.1 101
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -2000
+ dbvalue.1 -2000
+ }
+ }
+ control.12 {
+ iface MIXER
+ name 'Headphone Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.13 {
+ iface MIXER
+ name 'Speaker Playback Volume'
+ value.0 110
+ value.1 110
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -1100
+ dbvalue.1 -1100
+ }
+ }
+ control.14 {
+ iface MIXER
+ name 'Speaker Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.15 {
+ iface MIXER
+ name 'Speaker DC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.16 {
+ iface MIXER
+ name 'Speaker AC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.17 {
+ iface MIXER
+ name 'PCM Playback -6dB Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.18 {
+ iface MIXER
+ name 'ADC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.19 {
+ iface MIXER
+ name 'ADC High Pass Filter Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.20 {
+ iface MIXER
+ name 'DAC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.21 {
+ iface MIXER
+ name 'DAC Deemphasis Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.22 {
+ iface MIXER
+ name '3D Filter Upper Cut-Off'
+ value High
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 High
+ item.1 Low
+ }
+ }
+ control.23 {
+ iface MIXER
+ name '3D Filter Lower Cut-Off'
+ value Low
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Low
+ item.1 High
+ }
+ }
+ control.24 {
+ iface MIXER
+ name '3D Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.25 {
+ iface MIXER
+ name '3D Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.26 {
+ iface MIXER
+ name 'ALC Function'
+ value Off
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Off
+ item.1 Right
+ item.2 Left
+ item.3 Stereo
+ }
+ }
+ control.27 {
+ iface MIXER
+ name 'ALC Max Gain'
+ value 7
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.28 {
+ iface MIXER
+ name 'ALC Target'
+ value 4
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.29 {
+ iface MIXER
+ name 'ALC Min Gain'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.30 {
+ iface MIXER
+ name 'ALC Hold Time'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.31 {
+ iface MIXER
+ name 'ALC Mode'
+ value ALC
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 ALC
+ item.1 Limiter
+ }
+ }
+ control.32 {
+ iface MIXER
+ name 'ALC Decay'
+ value 3
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.33 {
+ iface MIXER
+ name 'ALC Attack'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.34 {
+ iface MIXER
+ name 'Noise Gate Threshold'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 31'
+ }
+ }
+ control.35 {
+ iface MIXER
+ name 'Noise Gate Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.36 {
+ iface MIXER
+ name 'ADC PCM Capture Volume'
+ value.0 195
+ value.1 195
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 3000
+ dbvalue.0 0
+ dbvalue.1 0
+ }
+ }
+ control.37 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.38 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.39 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.40 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.41 {
+ iface MIXER
+ name 'ADC Data Output Select'
+ value 'Left Data = Left ADC; Right Data = Left ADC'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'Left Data = Left ADC; Right Data = Right ADC'
+ item.1 'Left Data = Left ADC; Right Data = Left ADC'
+ item.2 'Left Data = Right ADC; Right Data = Right ADC'
+ item.3 'Left Data = Right ADC; Right Data = Left ADC'
+ }
+ }
+ control.42 {
+ iface MIXER
+ name 'Mono Output Mixer Left Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.43 {
+ iface MIXER
+ name 'Mono Output Mixer Right Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.44 {
+ iface MIXER
+ name 'Right Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.45 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.46 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.47 {
+ iface MIXER
+ name 'Left Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.48 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.49 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.50 {
+ iface MIXER
+ name 'Right Input Mixer Boost Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.51 {
+ iface MIXER
+ name 'Left Input Mixer Boost Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.52 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.53 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.54 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT1 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.55 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.56 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.57 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT1 Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.58 {
+ iface CARD
+ name 'Headphone Jack'
+ value true
+ comment {
+ access read
+ type BOOLEAN
+ count 1
+ }
+ }
+}
+state.wm8960audio2 {
+ control.1 {
+ iface MIXER
+ name 'Capture Volume'
+ value.0 35
+ value.1 35
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 63'
+ dbmin -1725
+ dbmax 3000
+ dbvalue.0 900
+ dbvalue.1 900
+ }
+ }
+ control.2 {
+ iface MIXER
+ name 'Capture Volume ZC Switch'
+ value.0 0
+ value.1 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 1'
+ }
+ }
+ control.3 {
+ iface MIXER
+ name 'Capture Switch'
+ value.0 true
+ value.1 true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.4 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.5 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.6 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.7 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.8 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.9 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.10 {
+ iface MIXER
+ name 'Playback Volume'
+ value.0 235
+ value.1 235
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 0
+ dbvalue.0 -1000
+ dbvalue.1 -1000
+ }
+ }
+ control.11 {
+ iface MIXER
+ name 'Headphone Playback Volume'
+ value.0 101
+ value.1 101
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -2000
+ dbvalue.1 -2000
+ }
+ }
+ control.12 {
+ iface MIXER
+ name 'Headphone Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.13 {
+ iface MIXER
+ name 'Speaker Playback Volume'
+ value.0 110
+ value.1 110
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -1100
+ dbvalue.1 -1100
+ }
+ }
+ control.14 {
+ iface MIXER
+ name 'Speaker Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.15 {
+ iface MIXER
+ name 'Speaker DC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.16 {
+ iface MIXER
+ name 'Speaker AC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.17 {
+ iface MIXER
+ name 'PCM Playback -6dB Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.18 {
+ iface MIXER
+ name 'ADC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.19 {
+ iface MIXER
+ name 'ADC High Pass Filter Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.20 {
+ iface MIXER
+ name 'DAC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.21 {
+ iface MIXER
+ name 'DAC Deemphasis Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.22 {
+ iface MIXER
+ name '3D Filter Upper Cut-Off'
+ value High
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 High
+ item.1 Low
+ }
+ }
+ control.23 {
+ iface MIXER
+ name '3D Filter Lower Cut-Off'
+ value Low
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Low
+ item.1 High
+ }
+ }
+ control.24 {
+ iface MIXER
+ name '3D Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.25 {
+ iface MIXER
+ name '3D Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.26 {
+ iface MIXER
+ name 'ALC Function'
+ value Off
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Off
+ item.1 Right
+ item.2 Left
+ item.3 Stereo
+ }
+ }
+ control.27 {
+ iface MIXER
+ name 'ALC Max Gain'
+ value 7
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.28 {
+ iface MIXER
+ name 'ALC Target'
+ value 4
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.29 {
+ iface MIXER
+ name 'ALC Min Gain'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.30 {
+ iface MIXER
+ name 'ALC Hold Time'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.31 {
+ iface MIXER
+ name 'ALC Mode'
+ value ALC
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 ALC
+ item.1 Limiter
+ }
+ }
+ control.32 {
+ iface MIXER
+ name 'ALC Decay'
+ value 3
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.33 {
+ iface MIXER
+ name 'ALC Attack'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.34 {
+ iface MIXER
+ name 'Noise Gate Threshold'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 31'
+ }
+ }
+ control.35 {
+ iface MIXER
+ name 'Noise Gate Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.36 {
+ iface MIXER
+ name 'ADC PCM Capture Volume'
+ value.0 195
+ value.1 195
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 3000
+ dbvalue.0 0
+ dbvalue.1 0
+ }
+ }
+ control.37 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.38 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.39 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.40 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.41 {
+ iface MIXER
+ name 'ADC Data Output Select'
+ value 'Left Data = Left ADC; Right Data = Left ADC'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'Left Data = Left ADC; Right Data = Right ADC'
+ item.1 'Left Data = Left ADC; Right Data = Left ADC'
+ item.2 'Left Data = Right ADC; Right Data = Right ADC'
+ item.3 'Left Data = Right ADC; Right Data = Left ADC'
+ }
+ }
+ control.42 {
+ iface MIXER
+ name 'Mono Output Mixer Left Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.43 {
+ iface MIXER
+ name 'Mono Output Mixer Right Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.44 {
+ iface MIXER
+ name 'Right Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.45 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.46 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.47 {
+ iface MIXER
+ name 'Left Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.48 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.49 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.50 {
+ iface MIXER
+ name 'Right Input Mixer Boost Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.51 {
+ iface MIXER
+ name 'Left Input Mixer Boost Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.52 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.53 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.54 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT1 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.55 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.56 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.57 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT1 Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.58 {
+ iface CARD
+ name 'Headphone Jack'
+ value true
+ comment {
+ access read
+ type BOOLEAN
+ count 1
+ }
+ }
+}
+state.wm8960audio3 {
+ control.1 {
+ iface MIXER
+ name 'Capture Volume'
+ value.0 35
+ value.1 35
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 63'
+ dbmin -1725
+ dbmax 3000
+ dbvalue.0 900
+ dbvalue.1 900
+ }
+ }
+ control.2 {
+ iface MIXER
+ name 'Capture Volume ZC Switch'
+ value.0 0
+ value.1 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 1'
+ }
+ }
+ control.3 {
+ iface MIXER
+ name 'Capture Switch'
+ value.0 true
+ value.1 true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.4 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.5 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.6 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT3 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.7 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT2 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -9999999
+ }
+ }
+ control.8 {
+ iface MIXER
+ name 'Right Input Boost Mixer RINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.9 {
+ iface MIXER
+ name 'Left Input Boost Mixer LINPUT1 Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 3'
+ dbmin 0
+ dbmax 2900
+ dbvalue.0 0
+ }
+ }
+ control.10 {
+ iface MIXER
+ name 'Playback Volume'
+ value.0 235
+ value.1 235
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 0
+ dbvalue.0 -1000
+ dbvalue.1 -1000
+ }
+ }
+ control.11 {
+ iface MIXER
+ name 'Headphone Playback Volume'
+ value.0 101
+ value.1 101
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -2000
+ dbvalue.1 -2000
+ }
+ }
+ control.12 {
+ iface MIXER
+ name 'Headphone Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.13 {
+ iface MIXER
+ name 'Speaker Playback Volume'
+ value.0 110
+ value.1 110
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 127'
+ dbmin -9999999
+ dbmax 600
+ dbvalue.0 -1100
+ dbvalue.1 -1100
+ }
+ }
+ control.14 {
+ iface MIXER
+ name 'Speaker Playback ZC Switch'
+ value.0 false
+ value.1 false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 2
+ }
+ }
+ control.15 {
+ iface MIXER
+ name 'Speaker DC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.16 {
+ iface MIXER
+ name 'Speaker AC Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 5'
+ }
+ }
+ control.17 {
+ iface MIXER
+ name 'PCM Playback -6dB Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.18 {
+ iface MIXER
+ name 'ADC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.19 {
+ iface MIXER
+ name 'ADC High Pass Filter Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.20 {
+ iface MIXER
+ name 'DAC Polarity'
+ value 'No Inversion'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'No Inversion'
+ item.1 'Left Inverted'
+ item.2 'Right Inverted'
+ item.3 'Stereo Inversion'
+ }
+ }
+ control.21 {
+ iface MIXER
+ name 'DAC Deemphasis Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.22 {
+ iface MIXER
+ name '3D Filter Upper Cut-Off'
+ value High
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 High
+ item.1 Low
+ }
+ }
+ control.23 {
+ iface MIXER
+ name '3D Filter Lower Cut-Off'
+ value Low
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Low
+ item.1 High
+ }
+ }
+ control.24 {
+ iface MIXER
+ name '3D Volume'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.25 {
+ iface MIXER
+ name '3D Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.26 {
+ iface MIXER
+ name 'ALC Function'
+ value Off
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 Off
+ item.1 Right
+ item.2 Left
+ item.3 Stereo
+ }
+ }
+ control.27 {
+ iface MIXER
+ name 'ALC Max Gain'
+ value 7
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.28 {
+ iface MIXER
+ name 'ALC Target'
+ value 4
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.29 {
+ iface MIXER
+ name 'ALC Min Gain'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ }
+ }
+ control.30 {
+ iface MIXER
+ name 'ALC Hold Time'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.31 {
+ iface MIXER
+ name 'ALC Mode'
+ value ALC
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 ALC
+ item.1 Limiter
+ }
+ }
+ control.32 {
+ iface MIXER
+ name 'ALC Decay'
+ value 3
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.33 {
+ iface MIXER
+ name 'ALC Attack'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 15'
+ }
+ }
+ control.34 {
+ iface MIXER
+ name 'Noise Gate Threshold'
+ value 0
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 31'
+ }
+ }
+ control.35 {
+ iface MIXER
+ name 'Noise Gate Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.36 {
+ iface MIXER
+ name 'ADC PCM Capture Volume'
+ value.0 195
+ value.1 195
+ comment {
+ access 'read write'
+ type INTEGER
+ count 2
+ range '0 - 255'
+ dbmin -9999999
+ dbmax 3000
+ dbvalue.0 0
+ dbvalue.1 0
+ }
+ }
+ control.37 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.38 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.39 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.40 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Volume'
+ value 2
+ comment {
+ access 'read write'
+ type INTEGER
+ count 1
+ range '0 - 7'
+ dbmin -2100
+ dbmax 0
+ dbvalue.0 -1500
+ }
+ }
+ control.41 {
+ iface MIXER
+ name 'ADC Data Output Select'
+ value 'Left Data = Left ADC; Right Data = Left ADC'
+ comment {
+ access 'read write'
+ type ENUMERATED
+ count 1
+ item.0 'Left Data = Left ADC; Right Data = Right ADC'
+ item.1 'Left Data = Left ADC; Right Data = Left ADC'
+ item.2 'Left Data = Right ADC; Right Data = Right ADC'
+ item.3 'Left Data = Right ADC; Right Data = Left ADC'
+ }
+ }
+ control.42 {
+ iface MIXER
+ name 'Mono Output Mixer Left Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.43 {
+ iface MIXER
+ name 'Mono Output Mixer Right Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.44 {
+ iface MIXER
+ name 'Right Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.45 {
+ iface MIXER
+ name 'Right Output Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.46 {
+ iface MIXER
+ name 'Right Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.47 {
+ iface MIXER
+ name 'Left Output Mixer PCM Playback Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.48 {
+ iface MIXER
+ name 'Left Output Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.49 {
+ iface MIXER
+ name 'Left Output Mixer Boost Bypass Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.50 {
+ iface MIXER
+ name 'Right Input Mixer Boost Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.51 {
+ iface MIXER
+ name 'Left Input Mixer Boost Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.52 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.53 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.54 {
+ iface MIXER
+ name 'Right Boost Mixer RINPUT1 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.55 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT2 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.56 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT3 Switch'
+ value false
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.57 {
+ iface MIXER
+ name 'Left Boost Mixer LINPUT1 Switch'
+ value true
+ comment {
+ access 'read write'
+ type BOOLEAN
+ count 1
+ }
+ }
+ control.58 {
+ iface CARD
+ name 'Headphone Jack'
+ value true
+ comment {
+ access read
+ type BOOLEAN
+ count 1
+ }
+ }
+}
diff --git a/recipes-bsp/atf/atf-tools_git.bb b/recipes-bsp/atf/atf-tools_git.bb
index 33ec51c2..aa6f1aed 100644
--- a/recipes-bsp/atf/atf-tools_git.bb
+++ b/recipes-bsp/atf/atf-tools_git.bb
@@ -2,7 +2,7 @@ SUMMARY = "Tools for ARM Trusted Firmware, e.g. FIP image creation tool"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/atf;protocol=https;nobranch=1"
SRCREV = "7d748e6f0ec652ba7c43733dc67a3d0b0217390a"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/atf/atf_git.bb b/recipes-bsp/atf/atf_git.bb
index a93cb804..ee8ef5ae 100644
--- a/recipes-bsp/atf/atf_git.bb
+++ b/recipes-bsp/atf/atf_git.bb
@@ -6,12 +6,12 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=e927e02bca647e14efd87e9e914b2443"
inherit deploy
DEPENDS += "u-boot-mkimage-native u-boot openssl openssl-native mbedtls rcw cst-native"
-DEPENDS_append_lx2160a += "ddr-phy"
+DEPENDS_append_lx2160a = " ddr-phy"
do_compile[depends] += "u-boot:do_deploy rcw:do_deploy uefi:do_deploy"
S = "${WORKDIR}/git"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/atf;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/atf;protocol=https;nobranch=1"
SRCREV = "7d748e6f0ec652ba7c43733dc67a3d0b0217390a"
COMPATIBLE_MACHINE = "(qoriq)"
diff --git a/recipes-bsp/boot-format/boot-format_git.bb b/recipes-bsp/boot-format/boot-format_git.bb
index 92ec8307..99e320b4 100644
--- a/recipes-bsp/boot-format/boot-format_git.bb
+++ b/recipes-bsp/boot-format/boot-format_git.bb
@@ -3,7 +3,7 @@ LICENSE = "GPLv2"
PR = "r6"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/boot-format;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/boot-format;protocol=https;nobranch=1 \
file://flags.patch"
SRCREV = "4eb81a6797ef4e58bf7d9b2d58afb37a21c1f550"
diff --git a/recipes-bsp/ddr-phy/ddr-phy_git.bb b/recipes-bsp/ddr-phy/ddr-phy_git.bb
index 31f6c101..c196fcad 100644
--- a/recipes-bsp/ddr-phy/ddr-phy_git.bb
+++ b/recipes-bsp/ddr-phy/ddr-phy_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA.txt;md5=89cc852481956e861228286ac7430
inherit deploy
-SRC_URI = "git://github.com/nxp/ddr-phy-binary.git;nobranch=1"
+SRC_URI = "git://github.com/nxp/ddr-phy-binary.git;nobranch=1;protocol=https"
SRCREV = "fbc036b88acb6c06ffed02c898cbae9856ec75ba"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/firmware-imx/firmware-imx-8.5.inc b/recipes-bsp/firmware-imx/firmware-imx-8.8.inc
index ae6b1d78..a2ba7f58 100644
--- a/recipes-bsp/firmware-imx/firmware-imx-8.5.inc
+++ b/recipes-bsp/firmware-imx/firmware-imx-8.8.inc
@@ -1,17 +1,16 @@
# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
# Copyright (C) 2018 O.S. Systems Software LTDA.
SECTION = "base"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
-SRCBRANCH ?= "master"
SRC_URI = " \
${FSL_MIRROR}/firmware-imx-${PV}.bin;fsl-eula=true \
"
-SRC_URI[md5sum] = "a6b926d087e1e642580da8a6d982abe6"
-SRC_URI[sha256sum] = "45b0a7392e7a4b2e6c7e1cb988dd660ff3f8cd465afdf796ff840a00db08389d"
+SRC_URI[md5sum] = "eabb27d28bba375a9f14d6306c07af5f"
+SRC_URI[sha256sum] = "5ca1f8b6e6b191594d17ac7b51c38cdbc2ff808d15568ab4b0bbeb5dc6c621f6"
S = "${WORKDIR}/firmware-imx-${PV}"
diff --git a/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb b/recipes-bsp/firmware-imx/firmware-imx-8_8.8.bb
index 64fa2885..650c1cfd 100644
--- a/recipes-bsp/firmware-imx/firmware-imx-8_8.5.bb
+++ b/recipes-bsp/firmware-imx/firmware-imx-8_8.8.bb
@@ -1,4 +1,4 @@
-# Copyright 2018 NXP
+# Copyright (C) 2018-2020 NXP
SUMMARY = "Freescale i.MX firmware for 8 family"
DESCRIPTION = "Freescale i.MX firmware for 8 family"
diff --git a/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb b/recipes-bsp/firmware-imx/firmware-imx-8m_8.8.bb
index a605d226..44e9ff4a 100644
--- a/recipes-bsp/firmware-imx/firmware-imx-8m_8.5.bb
+++ b/recipes-bsp/firmware-imx/firmware-imx-8m_8.8.bb
@@ -1,4 +1,4 @@
-# Copyright 2018 NXP
+# Copyright (C) 2018-2020 NXP
SUMMARY = "Freescale i.MX firmware for 8M and 8M Mini family"
DESCRIPTION = "Freescale i.MX firmware for 8M and 8M Mini family"
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.5.bb b/recipes-bsp/firmware-imx/firmware-imx_8.5.bb
deleted file mode 100644
index ff623057..00000000
--- a/recipes-bsp/firmware-imx/firmware-imx_8.5.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright 2017-2019 NXP
-# Copyright (C) 2018 O.S. Systems Software LTDA.
-SUMMARY = "Freescale i.MX firmware"
-DESCRIPTION = "Freescale i.MX firmware such as for the VPU"
-
-require firmware-imx-${PV}.inc
-
-PE = "1"
-
-SRC_URI += " \
- git://github.com/NXP/imx-firmware.git;protocol=https;branch=${SRCBRANCH};destsuffix=${S}/git \
-"
-SRCREV = "8ce9046f5058fdd2c5271f86ccfc61bc5a248ae3"
-
-inherit allarch
-
-do_install() {
- install -d ${D}${base_libdir}/firmware/imx
-
- cd firmware
- for d in *; do
- case $d in
- easrc)
- # excluding as only applies Nano SoC
- ;;
- ddr|hdmi|seco)
- # These folders are for i.MX 8 and are included in the boot image via imx-boot
- bbnote Excluding folder $d
- ;;
- *)
- cp -rfv $d ${D}${base_libdir}/firmware
- ;;
- esac
- done
- cd -
-
- mv ${D}${base_libdir}/firmware/epdc/ ${D}${base_libdir}/firmware/imx/epdc/
- mv ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw
-
- find ${D}${base_libdir}/firmware -type f -exec chmod 644 '{}' ';'
- find ${D}${base_libdir}/firmware -type f -exec chown root:root '{}' ';'
-
- # Remove files not going to be installed
- rm ${D}${base_libdir}/firmware/sdma/sdma-imx6q.bin
- rm ${D}${base_libdir}/firmware/sdma/sdma-imx7d.bin
- find ${D}${base_libdir}/firmware/ -name '*.mk' -exec rm '{}' ';'
-}
-
-python populate_packages_prepend() {
- vpudir = bb.data.expand('${base_libdir}/firmware/vpu', d)
- do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
- output_pattern='firmware-imx-vpu-%s',
- description='Freescale IMX Firmware %s',
- extra_depends='',
- prepend=True)
-
- sdmadir = bb.data.expand('${base_libdir}/firmware/sdma', d)
- do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
- output_pattern='firmware-imx-sdma-%s',
- description='Freescale IMX Firmware %s',
- extra_depends='',
- prepend=True)
-}
-
-ALLOW_EMPTY_${PN} = "1"
-
-PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-*"
-
-PACKAGES =+ "${PN}-epdc ${PN}-scfw ${PN}-sdma"
-
-FILES_${PN}-epdc = "${base_libdir}/firmware/imx/epdc/"
-FILES_${PN}-scfw = "${base_libdir}/firmware/scfw/"
-FILES_${PN}-sdma = " ${base_libdir}/firmware/imx/sdma"
-
-COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)"
diff --git a/recipes-bsp/firmware-imx/firmware-imx_8.8.bb b/recipes-bsp/firmware-imx/firmware-imx_8.8.bb
new file mode 100644
index 00000000..8ff4a321
--- /dev/null
+++ b/recipes-bsp/firmware-imx/firmware-imx_8.8.bb
@@ -0,0 +1,129 @@
+# Copyright (C) 2012-2016 Freescale Semiconductor
+# Copyright (C) 2017-2020 NXP
+# Copyright (C) 2018 O.S. Systems Software LTDA.
+SUMMARY = "Freescale i.MX firmware"
+DESCRIPTION = "Freescale i.MX firmware such as for the VPU"
+
+require firmware-imx-${PV}.inc
+
+PE = "1"
+
+inherit allarch
+
+do_install() {
+ install -d ${D}${nonarch_base_libdir}/firmware/imx
+
+ # SDMA Firmware section
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/sdma
+ install -m 0644 ${S}/firmware/sdma/* ${D}${nonarch_base_libdir}/firmware/imx/sdma
+ rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx6q.bin
+ rm -f ${D}${nonarch_base_libdir}/firmware/imx/sdma/sdma-imx7d.bin
+
+ # EASRC Firmware section
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/easrc
+ install -m 0644 ${S}/firmware/easrc/* ${D}${nonarch_base_libdir}/firmware/imx/easrc/
+
+ # XCVR Firmware section
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/xcvr
+ install -m 0644 ${S}/firmware/xcvr/* ${D}${nonarch_base_libdir}/firmware/imx/xcvr/
+
+ # XUVI Firmware section
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/xuvi
+ install -m 0644 ${S}/firmware/xuvi/* ${D}${nonarch_base_libdir}/firmware/imx/xuvi/
+
+ # EPDC Firmware section
+ # NOTE:
+ # epdc_ED060XH2C1.fw file has .nonrestricted suffix in the source archive, hence it should
+ # be installed with a different name
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/epdc
+ install -m 0644 ${S}/firmware/epdc/*.fw ${D}${nonarch_base_libdir}/firmware/imx/epdc/
+ install -m 0644 ${S}/firmware/epdc/epdc_ED060XH2C1.fw.nonrestricted ${D}${nonarch_base_libdir}/firmware/imx/epdc/epdc_ED060XH2C1.fw
+
+ # HDMI Firmware section
+ # NOTE:
+ # Only install pre-defined list of firmware files, since the source archive contains
+ # also HDMI binary files for imx8m derivatives, which are taken care of by another recipe
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/hdmi
+ install -m 0644 ${S}/firmware/hdmi/cadence/hdmitxfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi
+ install -m 0644 ${S}/firmware/hdmi/cadence/hdmirxfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi
+ install -m 0644 ${S}/firmware/hdmi/cadence/dpfw.bin ${D}${nonarch_base_libdir}/firmware/imx/hdmi
+
+ # VPU Firmware section
+ # NOTE:
+ # Do the same thing as above for HDMI - only install a pre-defined list of firmware files,
+ # as some of other files are provided by packages from other recipes.
+ install -d ${D}${nonarch_base_libdir}/firmware/vpu
+ install -m 0644 ${S}/firmware/vpu/vpu_fw_imx*.bin ${D}${nonarch_base_libdir}/firmware/vpu
+}
+
+#
+# This prepend is here to produce separate packages containing firmware,
+# which could be included separately based on the machine definition.
+#
+# It operates similar to the FILES mechanism by travesing through
+# ${D} + folder supplied as a first parameter, matches the regexp supplied
+# as second one, and for every file match - it creates a separate package,
+# which contains only files that matches the pattern.
+#
+python populate_packages_prepend() {
+ easrcdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/easrc', d)
+ do_split_packages(d, easrcdir, '^easrc-([^_]*).*\.bin',
+ output_pattern='firmware-imx-easrc-%s',
+ description='Freescale IMX EASRC Firmware [%s]',
+ extra_depends='',
+ prepend=True)
+
+ vpudir = bb.data.expand('${nonarch_base_libdir}/firmware/vpu', d)
+ do_split_packages(d, vpudir, '^vpu_fw_([^_]*).*\.bin',
+ output_pattern='firmware-imx-vpu-%s',
+ description='Freescale IMX VPU Firmware [%s]',
+ extra_depends='',
+ prepend=True)
+
+ sdmadir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/sdma', d)
+ do_split_packages(d, sdmadir, '^sdma-([^-]*).*\.bin',
+ output_pattern='firmware-imx-sdma-%s',
+ description='Freescale IMX SDMA Firmware [%s]',
+ extra_depends='',
+ prepend=True)
+
+ xcvrdir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xcvr', d)
+ do_split_packages(d, xcvrdir, '^xcvr-([^_]*).*\.bin',
+ output_pattern='firmware-imx-xcvr-%s',
+ description='Freescale IMX XCVR Firmware [%s]',
+ extra_depends='',
+ prepend=True)
+
+ xuvidir = bb.data.expand('${nonarch_base_libdir}/firmware/imx/xuvi', d)
+ do_split_packages(d, xuvidir, '^vpu_fw_([^_]*).*\.bin',
+ output_pattern='firmware-imx-xuvi-%s',
+ description='Freescale IMX XUVI Firmware [%s]',
+ extra_depends='',
+ prepend=True)
+}
+
+# Declare a contract that we would provide packages produced by prepend above
+PACKAGES_DYNAMIC = "${PN}-vpu-* ${PN}-sdma-* ${PN}-easrc-* ${PN}-xcvr-* ${PN}-xuvi-*"
+
+#
+# Deal with the rest of Firmware packages here
+#
+# Provide EPDC and HDMI Firmware in common packages as they tend to be special in
+# terms of the content.
+#
+# NOTE: PACKAGES are defined explicitly here in order to remove the auto-generated
+# complimentary packages (-dev and -dbg).
+# This is done in order to be able to keep the main package empty and fail when
+# somebody tries to install it in the image.
+# If -dev package is present in that setup, and dev-pkgs is enabled in
+# IMAGE_FEATURES - this leads to a failure during do_rootfs() while all -dev
+# packages would be installed, and -dev package would fail because the main one
+# is empty.
+# Therefore, we opt-out from producing -dev package here, since also for firmware
+# files it makes no sense.
+PACKAGES = "${PN} ${PN}-epdc ${PN}-hdmi"
+
+FILES_${PN}-epdc = "${nonarch_base_libdir}/firmware/imx/epdc/"
+FILES_${PN}-hdmi = "${nonarch_base_libdir}/firmware/imx/hdmi/"
+
+COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)"
diff --git a/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-1.bb b/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-1.bb
new file mode 100644
index 00000000..7ec06c5b
--- /dev/null
+++ b/recipes-bsp/firmware-imx/firmware-sof-imx_1.5.0-1.bb
@@ -0,0 +1,24 @@
+# Copyright (C) 2020 Mihai Lindner <mihai.lindner@nxp.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Sound Open Firmware"
+HOMEPAGE = "https://www.sofproject.org"
+SECTION = "base"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=0f00d99239d922ffd13cabef83b33444"
+
+SRC_URI = "${FSL_MIRROR}/sof-imx-${PV}.tar.gz"
+SRC_URI[md5sum] = "c03aa6a07570b2e7b8f60ab859b8f24a"
+SRC_URI[sha256sum] = "d6fecb5f398ecce4fefb7f98a35c9c2741735ccc4668d676bcf53b1d4ebbe778"
+
+S = "${WORKDIR}/sof-imx-${PV}"
+
+inherit allarch
+
+do_install() {
+ # Install sof and sof-tplg folder
+ install -d ${D}${nonarch_base_libdir}/firmware/imx/
+ cp -r sof* ${D}${nonarch_base_libdir}/firmware/imx/
+}
+
+FILES_${PN} = "${nonarch_base_libdir}/firmware/imx"
diff --git a/recipes-bsp/firmware-qca/firmware-qca.inc b/recipes-bsp/firmware-qca/firmware-qca.inc
index bafd0ea8..f33f4eb9 100644
--- a/recipes-bsp/firmware-qca/firmware-qca.inc
+++ b/recipes-bsp/firmware-qca/firmware-qca.inc
@@ -1,15 +1,15 @@
-# Copyright 2018-2019 NXP
+# Copyright (C) 2018-2020 NXP
SUMMARY = "Qualcomm Wi-Fi and Bluetooth firmware"
SECTION = "base"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3 \
+LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d \
file://QUALCOMM_ATHEROS_LICENSE_AGREEMENT.pdf;md5=e629669cf17f6a2a6872e067582986e3 \
"
SRC_URI = " ${FSL_MIRROR}/firmware-qca-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "3569cb11300758635d2502322c5bf206"
-SRC_URI[sha256sum] = "ae75308d59390e926244ad2594248c3c835ee780e94e4a92ac536429cccd286b"
+SRC_URI[md5sum] = "75b1b2a8dea8f81609ccfc072d42fa86"
+SRC_URI[sha256sum] = "6ad56ac1df841e252ac6db0a8966082715a3cb6dc7189426bade13333a16fd9d"
S = "${WORKDIR}/firmware-qca-${PV}"
inherit fsl-eula-unpack
diff --git a/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb b/recipes-bsp/firmware-qca/firmware-qca6174_3.0.2.bb
index fd0e24f0..47b289af 100644
--- a/recipes-bsp/firmware-qca/firmware-qca6174_3.0.1.bb
+++ b/recipes-bsp/firmware-qca/firmware-qca6174_3.0.2.bb
@@ -1,4 +1,4 @@
-# Copyright 2019 NXP
+# Copyright (C) 2019-2020 NXP
require firmware-qca.inc
diff --git a/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb b/recipes-bsp/firmware-qca/firmware-qca9377_3.0.2.bb
index a1d6b0f1..26c41d50 100644
--- a/recipes-bsp/firmware-qca/firmware-qca9377_3.0.1.bb
+++ b/recipes-bsp/firmware-qca/firmware-qca9377_3.0.2.bb
@@ -1,4 +1,4 @@
-# Copyright 2018-2019 NXP
+# Copyright (C) 2018-2020 NXP
require firmware-qca.inc
diff --git a/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb b/recipes-bsp/firmware-qca/qca-tools_3.0.2.bb
index b7bf0dff..e996c62d 100644
--- a/recipes-bsp/firmware-qca/qca-tools_3.0.1.bb
+++ b/recipes-bsp/firmware-qca/qca-tools_3.0.2.bb
@@ -1,4 +1,4 @@
-# Copyright 2018 NXP
+# Copyright (C) 2018-2020 NXP
require firmware-qca.inc
diff --git a/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb b/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb
index 60598ae5..3a84cc0d 100644
--- a/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb
+++ b/recipes-bsp/fsl-tlu/fsl-tlu_1.0.0.bb
@@ -5,7 +5,7 @@ and configuration files."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=8a71d0475d08eee76d8b6d0c6dbec543"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/fsl-tlu;protocol=https;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/fsl-tlu;protocol=https;nobranch=1"
SRCREV = "8837cce3c86b30c0931c319e9e1a8ca622ae5354"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch b/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch
deleted file mode 100644
index be747789..00000000
--- a/recipes-bsp/imx-atf/imx-atf/0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 4123893a8a4d93362a0a36f72134f75436fee457 Mon Sep 17 00:00:00 2001
-From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Thu, 18 Oct 2018 18:03:46 -0500
-Subject: [PATCH] Allow BUILD_STRING to be set in .revision file.
-
-Upstream-Status: Pending
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
----
- Makefile | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 57c4a90..ec49397 100644
---- a/Makefile
-+++ b/Makefile
-@@ -97,6 +97,9 @@ endif
-
- # Default build string (git branch and commit)
- ifeq (${BUILD_STRING},)
-+ BUILD_STRING := $(shell cat .revision 2> /dev/null)
-+endif
-+ifeq (${BUILD_STRING},)
- BUILD_STRING := $(shell git describe --long --always --dirty --tags 2> /dev/null)
- endif
- VERSION_STRING := v${VERSION_MAJOR}.${VERSION_MINOR}(${BUILD_TYPE}):${BUILD_STRING}
---
-2.7.4
-
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch
new file mode 100644
index 00000000..209098d6
--- /dev/null
+++ b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-missing-inclusion-of-cdefs.h.patch
@@ -0,0 +1,62 @@
+From e8bb1c2caa19fa224090eca0793586857199af9e Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 4 Dec 2019 02:48:37 -0600
+Subject: [PATCH] imx: Fix missing inclusion of cdefs.h
+
+This was found by compiling with -fno-common:
+
+./build/picopi/release/bl2/imx_snvs.o:(.bss.__packed+0x0): multiple definition of `__packed';
+./build/picopi/release/bl2/imx_caam.o:(.bss.__packed+0x0): first defined here
+
+__packed was intended to be the attribute macro from cdefs.h, not an
+object of the structure type.
+
+Upstream-Status: Backport
+
+Signed-off-by: Samuel Holland <samuel@sholland.org>
+Change-Id: Id02fac3f098be2d71c35c6b4a18012515532f32a
+---
+ plat/imx/common/include/imx_caam.h | 3 ++-
+ plat/imx/common/include/imx_snvs.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/plat/imx/common/include/imx_caam.h b/plat/imx/common/include/imx_caam.h
+index 335bd0f8b..61005b51c 100644
+--- a/plat/imx/common/include/imx_caam.h
++++ b/plat/imx/common/include/imx_caam.h
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
++ * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+@@ -7,6 +7,7 @@
+ #ifndef IMX_CAAM_H
+ #define IMX_CAAM_H
+
++#include <cdefs.h>
+ #include <stdint.h>
+ #include <arch.h>
+ #include <imx_regs.h>
+diff --git a/plat/imx/common/include/imx_snvs.h b/plat/imx/common/include/imx_snvs.h
+index 0b3d1085f..565c451dd 100644
+--- a/plat/imx/common/include/imx_snvs.h
++++ b/plat/imx/common/include/imx_snvs.h
+@@ -1,11 +1,12 @@
+ /*
+- * Copyright (C) 2018, ARM Limited and Contributors. All rights reserved.
++ * Copyright (C) 2018-2019, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+ #ifndef IMX_SNVS_H
+ #define IMX_SNVS_H
+
++#include <cdefs.h>
+ #include <stdint.h>
+
+ #include <arch.h>
+--
+2.28.0
+
diff --git a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch
index 000eff41..94050a06 100644
--- a/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch
+++ b/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch
@@ -1,4 +1,4 @@
-From 8c433aa6c6b2eaed4084233beea99ee3fb0b652f Mon Sep 17 00:00:00 2001
+From 2338329e35254c1b8a887409d930ca76d9612093 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 4 Dec 2019 02:45:58 -0600
Subject: [PATCH] imx: Fix multiple definition of ipc_handle
@@ -15,20 +15,19 @@ Change-Id: I6535954cc567d6efa06919069b91e3f50975b073
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/plat/imx/common/include/sci/sci_ipc.h b/plat/imx/common/include/sci/sci_ipc.h
-index 7cb109206..d2c3bba1c 100644
+index cc8e47b28..1e3e53247 100755
--- a/plat/imx/common/include/sci/sci_ipc.h
+++ b/plat/imx/common/include/sci/sci_ipc.h
-@@ -63,7 +63,7 @@ void sc_ipc_read(sc_ipc_t ipc, void *data);
+@@ -63,6 +63,6 @@ void sc_ipc_read(sc_ipc_t ipc, void *data);
*/
void sc_ipc_write(sc_ipc_t ipc, const void *data);
-sc_ipc_t ipc_handle;
+extern sc_ipc_t ipc_handle;
- #endif /* SC_IPC_H */
-
+ #endif /* SCI_IPC_H */
diff --git a/plat/imx/common/sci/ipc.c b/plat/imx/common/sci/ipc.c
-index 68b0b8ef0..3169b7e0b 100644
+index f329482fe..bf35a5ead 100755
--- a/plat/imx/common/sci/ipc.c
+++ b/plat/imx/common/sci/ipc.c
@@ -11,6 +11,8 @@
@@ -37,7 +36,7 @@ index 68b0b8ef0..3169b7e0b 100644
+sc_ipc_t ipc_handle;
+
- #include <bakery_lock.h>
+ #include <lib/bakery_lock.h>
DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock);
#define sc_ipc_lock_init() bakery_lock_init(&sc_ipc_bakery_lock)
--
diff --git a/recipes-bsp/imx-atf/imx-atf_2.0.bb b/recipes-bsp/imx-atf/imx-atf_2.2.bb
index 1e1baba3..02458e8c 100644
--- a/recipes-bsp/imx-atf/imx-atf_2.0.bb
+++ b/recipes-bsp/imx-atf/imx-atf_2.2.bb
@@ -1,4 +1,4 @@
-# Copyright (C) 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
DESCRIPTION = "i.MX ARM Trusted Firmware"
SECTION = "BSP"
@@ -7,12 +7,12 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/BSD-3-Clause;m
PV .= "+git${SRCPV}"
-SRCBRANCH = "lf-5.4.y"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
- file://0001-Allow-BUILD_STRING-to-be-set-in-.revision-file.patch \
+SRCBRANCH = "imx_5.4.24_2.1.0"
+SRC_URI = "git://github.com/nxp-imx/imx-atf.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-imx-Fix-missing-inclusion-of-cdefs.h.patch \
file://0001-imx-Fix-multiple-definition-of-ipc_handle.patch \
"
-SRCREV = "7b3389d49815f1e3f7942bd312a27ee665bd2e33"
+SRCREV = "b0a00f22b09c13572d3e87902a1069dee34763bd"
S = "${WORKDIR}/git"
@@ -22,10 +22,14 @@ BOOT_TOOLS = "imx-boot-tools"
PLATFORM ?= "INVALID"
PLATFORM_mx8qm = "imx8qm"
-PLATFORM_mx8qxp = "imx8qx"
+PLATFORM_mx8x = "imx8qx"
PLATFORM_mx8mq = "imx8mq"
PLATFORM_mx8mm = "imx8mm"
PLATFORM_mx8mn = "imx8mn"
+PLATFORM_mx8mp = "imx8mp"
+PLATFORM_mx8dx = "imx8dx"
+PLATFORM_imx8dxlevk = "imx8dxl"
+PLATFORM_mx8dxlevk-phantom = "imx8qx"
EXTRA_OEMAKE += " \
CROSS_COMPILE="${TARGET_PREFIX}" \
diff --git a/recipes-bsp/imx-kobs/imx-kobs_git.bb b/recipes-bsp/imx-kobs/imx-kobs_git.bb
index b104fafd..9c19b8eb 100644
--- a/recipes-bsp/imx-kobs/imx-kobs_git.bb
+++ b/recipes-bsp/imx-kobs/imx-kobs_git.bb
@@ -8,7 +8,7 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
PV = "5.5+git${SRCPV}"
-SRC_URI = "git://github.com/NXPmicro/imx-kobs.git;protocol=https \
+SRC_URI = "git://github.com/NXPmicro/imx-kobs.git;protocol=https;branch=master \
"
SRCREV = "cee66d0e956a64d03cc866fa8819da5b798c7f1b"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/imx-lib/imx-lib_git.bb b/recipes-bsp/imx-lib/imx-lib_git.bb
index d94b2daa..4ebd9521 100644
--- a/recipes-bsp/imx-lib/imx-lib_git.bb
+++ b/recipes-bsp/imx-lib/imx-lib_git.bb
@@ -13,7 +13,7 @@ PE = "1"
PV = "5.8+${SRCPV}"
SRCBRANCH = "master"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-lib.git;protocol=https;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/nxp-imx/imx-lib.git;protocol=https;branch=${SRCBRANCH}"
SRCREV = "3f777974c0c146817e2ff5cb0340ca66a1f99e57"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
new file mode 100644
index 00000000..be8c78aa
--- /dev/null
+++ b/recipes-bsp/imx-mkimage/files/0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch
@@ -0,0 +1,70 @@
+From fe3d11ae2886f00ff57e2a3d20cdae02cca28234 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Thu, 21 Oct 2021 08:53:38 +0000
+Subject: [PATCH] iMX8M: soc.mak: use native mkimage from sysroot
+
+mkimage tool is provided as a part of sysroot from Yocto build. Current
+implementation on the imx-mkimge on the other hand copies it locally in
+order to invoke it from within the build folder.
+
+Since recent updates, mkimage requires openssl.so to be installed, which
+when local copy is used causes the tool not to operate and fails the
+build.
+
+Use it from the build sysroot, and do not pull the local version of it.
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ iMX8M/soc.mak | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/iMX8M/soc.mak b/iMX8M/soc.mak
+index b7b3986..ca00411 100644
+--- a/iMX8M/soc.mak
++++ b/iMX8M/soc.mak
+@@ -142,7 +142,7 @@ u-boot.itb: $(dtbs)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs)
+ DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtbs) > u-boot.its
+- ./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
++ mkimage -E -p 0x3000 -f u-boot.its u-boot.itb
+ @rm -f u-boot.its $(dtbs)
+
+ dtbs_ddr3l = valddr3l.dtb
+@@ -154,7 +154,7 @@ u-boot-ddr3l.itb: $(dtbs_ddr3l)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_ddr3l)
+ DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtbs_ddr3l) > u-boot-ddr3l.its
+- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
++ mkimage -E -p 0x3000 -f u-boot-ddr3l.its u-boot-ddr3l.itb
+ @rm -f u-boot.its $(dtbs_ddr3l)
+
+ dtbs_ddr4 = valddr4.dtb
+@@ -166,7 +166,7 @@ u-boot-ddr4.itb: $(dtbs_ddr4)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_ddr4)
+ DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtbs_ddr4) > u-boot-ddr4.its
+- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
++ mkimage -E -p 0x3000 -f u-boot-ddr4.its u-boot-ddr4.itb
+ @rm -f u-boot.its $(dtbs_ddr4)
+
+ dtbs_ddr4_evk = evkddr4.dtb
+@@ -178,7 +178,7 @@ u-boot-ddr4-evk.itb: $(dtbs_ddr4_evk)
+ ./$(PAD_IMAGE) bl31.bin
+ ./$(PAD_IMAGE) u-boot-nodtb.bin $(dtbs_ddr4_evk)
+ DEK_BLOB_LOAD_ADDR=$(DEK_BLOB_LOAD_ADDR) TEE_LOAD_ADDR=$(TEE_LOAD_ADDR) ATF_LOAD_ADDR=$(ATF_LOAD_ADDR) ./mkimage_fit_atf.sh $(dtbs_ddr4_evk) > u-boot-ddr4-evk.its
+- ./mkimage_uboot -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
++ mkimage -E -p 0x3000 -f u-boot-ddr4-evk.its u-boot-ddr4-evk.itb
+ @rm -f u-boot.its $(dtbs_ddr4_evk)
+
+ ifeq ($(HDMI),yes)
+@@ -285,7 +285,6 @@ nightly :
+ @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/fsl-$(PLAT)-evk.dtb -O fsl-$(PLAT)-evk.dtb
+ @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_hdmi_imx8m.bin -O signed_hdmi_imx8m.bin
+ @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/signed_dp_imx8m.bin -O signed_dp_imx8m.bin
+- @$(WGET) -q $(SERVER)/$(DIR)/$(FW_DIR)/mkimage_uboot -O mkimage_uboot
+
+ archive :
+ git ls-files --others --exclude-standard -z | xargs -0 tar rvf $(ARCHIVE_PATH)/$(ARCHIVE_NAME)
diff --git a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index 0f13a08b..45556718 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_0.2.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -1,4 +1,4 @@
-# Copyright 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
require imx-mkimage_git.inc
@@ -7,17 +7,20 @@ LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
SECTION = "BSP"
+inherit use-imx-security-controller-firmware uboot-sign
+
IMX_EXTRA_FIRMWARE = "firmware-imx-8 imx-sc-firmware imx-seco"
IMX_EXTRA_FIRMWARE_mx8m = "firmware-imx-8m"
IMX_EXTRA_FIRMWARE_mx8x = "imx-sc-firmware imx-seco"
DEPENDS += " \
- firmware-imx \
+ u-boot \
${IMX_EXTRA_FIRMWARE} \
imx-atf \
${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'optee-os', '', d)} \
- u-boot-mkimage-native \
"
-DEPENDS_append_mx8m = " dtc-native"
+# xxd is a dependency of fspi_packer.sh
+DEPENDS += "xxd-native"
+DEPENDS_append_mx8m = " u-boot-mkimage-native dtc-native"
BOOT_NAME = "imx-boot"
PROVIDES = "${BOOT_NAME}"
@@ -39,10 +42,14 @@ SC_FIRMWARE_NAME ?= "scfw_tcm.bin"
ATF_MACHINE_NAME ?= "bl31-imx8qm.bin"
ATF_MACHINE_NAME_mx8qm = "bl31-imx8qm.bin"
-ATF_MACHINE_NAME_mx8qxp = "bl31-imx8qx.bin"
+ATF_MACHINE_NAME_mx8x = "bl31-imx8qx.bin"
ATF_MACHINE_NAME_mx8mq = "bl31-imx8mq.bin"
ATF_MACHINE_NAME_mx8mm = "bl31-imx8mm.bin"
ATF_MACHINE_NAME_mx8mn = "bl31-imx8mn.bin"
+ATF_MACHINE_NAME_mx8mp = "bl31-imx8mp.bin"
+ATF_MACHINE_NAME_mx8phantomdxl = "bl31-imx8qx.bin"
+ATF_MACHINE_NAME_mx8dxl = "bl31-imx8dxl.bin"
+ATF_MACHINE_NAME_mx8dx = "bl31-imx8dx.bin"
ATF_MACHINE_NAME_append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', '-optee', '', d)}"
UBOOT_NAME = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
@@ -52,29 +59,36 @@ TOOLS_NAME ?= "mkimage_imx8"
SOC_TARGET ?= "INVALID"
SOC_TARGET_mx8qm = "iMX8QM"
-SOC_TARGET_mx8qxp = "iMX8QX"
+SOC_TARGET_mx8x = "iMX8QX"
SOC_TARGET_mx8mq = "iMX8M"
SOC_TARGET_mx8mm = "iMX8MM"
SOC_TARGET_mx8mn = "iMX8MN"
+SOC_TARGET_mx8mp = "iMX8MP"
+SOC_TARGET_mx8dxl = "iMX8DXL"
+SOC_TARGET_mx8phantomdxl = "iMX8QX"
+SOC_TARGET_mx8dx = "iMX8DX"
DEPLOY_OPTEE = "${@bb.utils.contains('MACHINE_FEATURES', 'optee', 'true', 'false', d)}"
IMXBOOT_TARGETS ?= \
"${@bb.utils.contains('UBOOT_CONFIG', 'fspi', 'flash_flexspi', \
bb.utils.contains('UBOOT_CONFIG', 'nand', 'flash_nand', \
- 'flash flash_dcd', d), d)}"
+ 'flash_multi_cores flash_dcd', d), d)}"
BOOT_STAGING = "${S}/${SOC_TARGET}"
-BOOT_STAGING_mx8mm = "${S}/iMX8M"
-BOOT_STAGING_mx8mn = "${S}/iMX8M"
+BOOT_STAGING_mx8m = "${S}/iMX8M"
+BOOT_STAGING_mx8dx = "${S}/iMX8QX"
SOC_FAMILY = "INVALID"
SOC_FAMILY_mx8 = "mx8"
SOC_FAMILY_mx8m = "mx8m"
SOC_FAMILY_mx8x = "mx8x"
+REV_OPTION ?= ""
+REV_OPTION_mx8qxpc0 = "REV=C0"
+
compile_mx8m() {
- bbnote 8MQ/8MM/8MN boot binary build
+ bbnote 8MQ/8MM/8MN/8MP boot binary build
for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
bbnote "Copy ddr_firmware: ${ddr_firmware} from ${DEPLOY_DIR_IMAGE} -> ${BOOT_STAGING} "
cp ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${BOOT_STAGING}
@@ -84,9 +98,12 @@ compile_mx8m() {
cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
${BOOT_STAGING}/u-boot-spl.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING}
+ if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
+ # Use DTB binary patched with signature node
+ cp ${DEPLOY_DIR_IMAGE}/${UBOOT_DTB_BINARY} ${BOOT_STAGING}/${UBOOT_DTB_NAME}
+ fi
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \
${BOOT_STAGING}/u-boot-nodtb.bin
- cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
}
@@ -95,26 +112,40 @@ compile_mx8() {
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
- cp ${DEPLOY_DIR_IMAGE}/mx8qm-ahab-container.img ${BOOT_STAGING}
+ cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
+ if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
+ cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
+ ${BOOT_STAGING}/u-boot-spl.bin
+ fi
}
+
compile_mx8x() {
bbnote 8QX boot binary build
- cp ${DEPLOY_DIR_IMAGE}/mx8qx-ahab-container.img ${BOOT_STAGING}
+ cp ${DEPLOY_DIR_IMAGE}/${SECO_FIRMWARE_NAME} ${BOOT_STAGING}
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${SC_FIRMWARE_NAME} ${BOOT_STAGING}/scfw_tcm.bin
cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin
cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin
+ if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
+ cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
+ ${BOOT_STAGING}/u-boot-spl.bin
+ fi
}
do_compile() {
- # mkimage_uboot requires libssl.so.1.1 from ${STAGING_LIBDIR_NATIVE}
- export LD_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE}:$LD_LIBRARY_PATH
- compile_${SOC_FAMILY}
# mkimage for i.MX8
+ # Copy TEE binary to SoC target folder to mkimage
if ${DEPLOY_OPTEE}; then
cp ${DEPLOY_DIR_IMAGE}/tee.bin ${BOOT_STAGING}
fi
for target in ${IMXBOOT_TARGETS}; do
- bbnote "building ${SOC_TARGET} - ${target}"
- make SOC=${SOC_TARGET} dtbs=${UBOOT_DTB_NAME} ${target}
+ compile_${SOC_FAMILY}
+ if [ "$target" = "flash_linux_m4_no_v2x" ]; then
+ # Special target build for i.MX 8DXL with V2X off
+ bbnote "building ${SOC_TARGET} - ${REV_OPTION} V2X=NO ${target}"
+ make SOC=${SOC_TARGET} ${REV_OPTION} V2X=NO dtbs=${UBOOT_DTB_NAME} flash_linux_m4
+ else
+ bbnote "building ${SOC_TARGET} - ${REV_OPTION} ${target}"
+ make SOC=${SOC_TARGET} ${REV_OPTION} dtbs=${UBOOT_DTB_NAME} ${target}
+ fi
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE}-${target}
fi
@@ -142,17 +173,25 @@ deploy_mx8m() {
}
deploy_mx8() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
- install -m 0644 ${BOOT_STAGING}/mx8qm-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS}
+ install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
+ if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
+ ${DEPLOYDIR}/${BOOT_TOOLS}
+ fi
}
deploy_mx8x() {
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
- install -m 0644 ${BOOT_STAGING}/mx8qx-ahab-container.img ${DEPLOYDIR}/${BOOT_TOOLS}
+ install -m 0644 ${BOOT_STAGING}/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0755 ${S}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
+ if [ -e ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} ] ; then
+ install -m 0644 ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \
+ ${DEPLOYDIR}/${BOOT_TOOLS}
+ fi
}
do_deploy() {
deploy_${SOC_FAMILY}
- # copy the tool mkimage to deploy path and sc fw, dcd and uboot
+ # copy the sc fw, dcd and uboot to deploy path
install -m 0644 ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
# copy tee.bin to deploy path
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
index 5304ebf9..ed15c6f8 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.bb
@@ -1,5 +1,5 @@
# Copyright (C) 2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
require imx-mkimage_git.inc
@@ -12,13 +12,16 @@ inherit native deploy
CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR} -L ${STAGING_LIBDIR}"
+REV_CHIP ?= "B0"
+REV_CHIP_mx8qxpc0 = "C0"
+
do_compile () {
cd ${S}
oe_runmake clean
oe_runmake bin
oe_runmake -C iMX8M -f soc.mak mkimage_imx8
- oe_runmake -C iMX8QM -f soc.mak imx8qm_dcd.cfg.tmp
- oe_runmake -C iMX8QX -f soc.mak imx8qx_dcd.cfg.tmp
+ oe_runmake -C iMX8QM REV=${REV_CHIP} -f soc.mak imx8qm_dcd.cfg.tmp
+ oe_runmake -C iMX8QX REV=${REV_CHIP} -f soc.mak imx8qx_dcd.cfg.tmp
}
do_install () {
diff --git a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
index 6e417722..a3af6eeb 100644
--- a/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
+++ b/recipes-bsp/imx-mkimage/imx-mkimage_git.inc
@@ -2,9 +2,11 @@
DEPENDS = "zlib-native openssl-native"
-SRCBRANCH = "lf-5.4.y"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "1c2277b95ce59f5d0265f26fec522e2ac2581e59"
+SRCBRANCH = "imx_5.4.24_2.1.0"
+SRC_URI = "git://github.com/nxp-imx/imx-mkimage.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-iMX8M-soc.mak-use-native-mkimage-from-sysroot.patch \
+"
+SRCREV = "6745ccdcf15384891639b7ced3aa6ce938682365"
S = "${WORKDIR}/git"
BOOT_TOOLS = "imx-boot-tools"
diff --git a/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb b/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.5.0.bb
index 3bf7024c..14803d89 100644
--- a/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.2.7.1.bb
+++ b/recipes-bsp/imx-sc-firmware/imx-sc-firmware_1.5.0.bb
@@ -1,22 +1,26 @@
# Copyright (C) 2016 Freescale Semiconductor
-# Copyright (C) 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
DESCRIPTION = "i.MX System Controller Firmware"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6c12031a11b81db21cdfe0be88cac4b3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
SECTION = "BSP"
-inherit fsl-eula-unpack deploy
+inherit fsl-eula-unpack pkgconfig deploy
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "b9d81d0c4cb7871e62dfe7b26d203240"
-SRC_URI[sha256sum] = "5a28180217975f3d78fcfac15e46b0a942910fadf078e4af76deb6dc498136ed"
+SRC_URI[md5sum] = "e939f40ca655afbdedabfae73863e6da"
+SRC_URI[sha256sum] = "18ef3717180ef034c1a3418d7342803f2727e4e09531e0a5db13e6f5244f2058"
BOARD_TYPE ?= "mek"
-SC_FIRMWARE_NAME ?= "mx8qm-mek-scfw-tcm.bin"
+SC_FIRMWARE_NAME ?= "INVALID"
SC_FIRMWARE_NAME_mx8qm = "mx8qm-${BOARD_TYPE}-scfw-tcm.bin"
SC_FIRMWARE_NAME_mx8qxp = "mx8qx-${BOARD_TYPE}-scfw-tcm.bin"
+SC_FIRMWARE_NAME_mx8phantomdxl = "mx8dxl-phantom-${BOARD_TYPE}-scfw-tcm.bin"
+SC_FIRMWARE_NAME_mx8dxl = "mx8dxl-${BOARD_TYPE}-scfw-tcm.bin"
+SC_FIRMWARE_NAME_mx8dx = "mx8dx-${BOARD_TYPE}-scfw-tcm.bin"
+
symlink_name = "scfw_tcm.bin"
BOOT_TOOLS = "imx-boot-tools"
@@ -35,4 +39,4 @@ INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(mx8qm|mx8qxp)"
+COMPATIBLE_MACHINE = "(mx8qm|mx8qxp|mx8phantomdxl|mx8dxl|mx8dx)"
diff --git a/recipes-bsp/imx-seco/imx-seco-libs_git.bb b/recipes-bsp/imx-seco/imx-seco-libs_git.bb
new file mode 100644
index 00000000..f292dedd
--- /dev/null
+++ b/recipes-bsp/imx-seco/imx-seco-libs_git.bb
@@ -0,0 +1,24 @@
+# Copyright (C) 2019-2020 NXP
+
+SUMMARY = "NXP i.MX SECO library"
+DESCRIPTION = "NXP IMX SECO library"
+SECTION = "base"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://EULA.txt;md5=228c72f2a91452b8a03c4cab30f30ef9"
+
+DEPENDS = "zlib"
+
+SRCBRANCH = "imx_5.4.24_2.1.0"
+SRC_URI = "git://github.com/NXP/imx-seco-libs.git;protocol=https;branch=${SRCBRANCH}"
+SRCREV = "a4faaa474e49fa0d3668db466739834fe45a6767"
+
+S = "${WORKDIR}/git"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_install () {
+ oe_runmake DESTDIR=${D} install
+}
+
+COMPATIBLE_MACHINE = "(mx8)"
+COMPATIBLE_MACHINE_mx8m = "(^$)"
diff --git a/recipes-bsp/imx-seco/imx-seco_2.3.1.bb b/recipes-bsp/imx-seco/imx-seco_2.3.1.bb
deleted file mode 100644
index b86ea0b6..00000000
--- a/recipes-bsp/imx-seco/imx-seco_2.3.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 2019 NXP
-
-SUMMARY = "NXP i.MX SECO firmware"
-DESCRIPTION = "NXP IMX SECO firmware"
-SECTION = "base"
-LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fb0303e4ee8b0e71c094171e2272bd44"
-
-inherit fsl-eula-unpack deploy
-
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true "
-
-SRC_URI[md5sum] = "cf8d6bbf93f0aa6e1049f1098a0f7e0f"
-SRC_URI[sha256sum] = "b429ac58b2ea1771b3fdf7ae87bf1d37ccaf596bde01a5ecccae27b2145f6824"
-
-do_compile[noexec] = "1"
-
-do_install[noexec] = "1"
-
-SECO_FIRMWARE_NAME ?= "mx8qm-ahab-container.img"
-SECO_FIRMWARE_NAME_mx8qm = "mx8qm-ahab-container.img"
-SECO_FIRMWARE_NAME_mx8x = "mx8qx-ahab-container.img"
-
-addtask deploy after do_install
-do_deploy () {
- # Deploy i.MX8 SECO firmware files
- install -m 0644 ${S}/firmware/seco/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}
-}
-
-COMPATIBLE_MACHINE = "(mx8qm|mx8x)"
diff --git a/recipes-bsp/imx-seco/imx-seco_3.6.3.bb b/recipes-bsp/imx-seco/imx-seco_3.6.3.bb
new file mode 100644
index 00000000..144125f8
--- /dev/null
+++ b/recipes-bsp/imx-seco/imx-seco_3.6.3.bb
@@ -0,0 +1,26 @@
+# Copyright (C) 2019-2020 NXP
+
+SUMMARY = "NXP i.MX SECO firmware"
+DESCRIPTION = "NXP IMX SECO firmware"
+SECTION = "base"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
+
+inherit fsl-eula-unpack use-imx-security-controller-firmware deploy
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+SRC_URI[md5sum] = "22a47e14e3f2e713b4b1b2b7ff768b11"
+SRC_URI[sha256sum] = "52ba07633e0f8707d8c26724b5cd03ef96444c8de1e0e134acac50acacf3e7dd"
+
+do_compile[noexec] = "1"
+
+do_install[noexec] = "1"
+
+addtask deploy after do_install
+do_deploy () {
+ # Deploy i.MX8 SECO firmware files
+ install -m 0644 ${S}/firmware/seco/${SECO_FIRMWARE_NAME} ${DEPLOYDIR}
+}
+
+COMPATIBLE_MACHINE = "(mx8qm|mx8qxp|mx8qxpc0|mx8phantomdxl|mx8dxl)"
diff --git a/recipes-bsp/imx-test/imx-test_git.bb b/recipes-bsp/imx-test/imx-test_git.bb
index 81bbd3a3..a46b5115 100644
--- a/recipes-bsp/imx-test/imx-test_git.bb
+++ b/recipes-bsp/imx-test/imx-test_git.bb
@@ -18,7 +18,7 @@ PV = "7.0+${SRCPV}"
SRCBRANCH = "lf-5.4.y"
SRC_URI = " \
- git://source.codeaurora.org/external/imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \
+ git://github.com/nxp-imx/imx-test.git;protocol=https;branch=${SRCBRANCH} \
file://0001-mxc_v4l2_test-fix-compilation-error-produced-by-gcc9.patch \
file://memtool_profile \
"
@@ -49,6 +49,9 @@ PACKAGECONFIG_append_imxvpu = " vpu"
PACKAGECONFIG[x11] = ",,libx11 libxdamage libxrender libxrandr"
PACKAGECONFIG[vpu] = "HAS_VPU=true,HAS_VPU=false,virtual/imxvpu"
+# FIXME: Fail to build due to misuse of printf
+SECURITY_STRINGFORMAT = ""
+
do_compile() {
CFLAGS="${TOOLCHAIN_OPTIONS}"
oe_runmake V=1 VERBOSE='' \
diff --git a/recipes-bsp/imx-uuc/imx-uuc_git.bb b/recipes-bsp/imx-uuc/imx-uuc_git.bb
index bfa6607b..a7a9822b 100644
--- a/recipes-bsp/imx-uuc/imx-uuc_git.bb
+++ b/recipes-bsp/imx-uuc/imx-uuc_git.bb
@@ -11,7 +11,7 @@ inherit autotools-brokensep
PR = "r1"
PV = "0.5.1+git${SRCPV}"
-SRC_URI = "git://github.com/NXPmicro/imx-uuc.git;protocol=https"
+SRC_URI = "git://github.com/NXPmicro/imx-uuc.git;protocol=https;branch=master"
SRCREV = "d6afb27e55d73d7ad08cd2dd51c784d8ec9694dc"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.1.0.bb b/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.1.0.bb
new file mode 100644
index 00000000..286f3c87
--- /dev/null
+++ b/recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.1.0.bb
@@ -0,0 +1,35 @@
+# Copyright (C) 2019-2020 NXP
+
+DESCRIPTION = "i.MX VC8000E Encoder library"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
+
+inherit fsl-eula-unpack
+
+SRC_URI = "${FSL_MIRROR}/${BP}.bin;fsl-eula=true"
+
+S = "${WORKDIR}/${BPN}-${PV}"
+
+SRC_URI[md5sum] = "5c254523ae4c44491ea838e84e9aee49"
+SRC_URI[sha256sum] = "c5dd1fbf8c9776d7a2844a225e0aa2e489aa24eaab8f55cb48a6e3184def235d"
+
+# SCR is the location and name of the Software Content Register file
+# relative to ${D}${D_SUBDIR}.
+SCR = "SCR.txt"
+
+do_install () {
+ install -d ${D}${D_SUBDIR}
+ cp -r ${S}/* ${D}${D_SUBDIR}
+ if [ -d "${D}/usr/lib" ] && [ "${D}/usr/lib" != "${D}${libdir}" ]; then
+ mv ${D}/usr/lib ${D}${libdir}
+ fi
+ rm ${D}${D_SUBDIR}/COPYING
+ if [ ! -f ${D}${D_SUBDIR}/${SCR} ]; then
+ bbfatal "Missing Software Content Register \"${D}${D_SUBDIR}/${SCR}\""
+ fi
+ rm ${D}${D_SUBDIR}/${SCR}
+}
+
+FILES_${PN} = "/"
+
+COMPATIBLE_MACHINE = "(mx8mp)"
diff --git a/recipes-bsp/inphi/inphi_git.bb b/recipes-bsp/inphi/inphi_git.bb
index 3f3c5f28..a9718b09 100644
--- a/recipes-bsp/inphi/inphi_git.bb
+++ b/recipes-bsp/inphi/inphi_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://EULA.txt;md5=86d76166990962fa552f840ff08e5798"
inherit deploy
-SRC_URI = "git://github.com/nxp/qoriq-firmware-inphi.git;nobranch=1"
+SRC_URI = "git://github.com/nxp/qoriq-firmware-inphi.git;nobranch=1;protocol=https"
SRCREV = "f22e9ff3bfed8342da6efb699e473b11fbad5695"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb
index 9b918f2c..bc40a1cf 100644
--- a/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.0.1.bb
+++ b/recipes-bsp/libimxdmabuffer/libimxdmabuffer_1.1.3.bb
@@ -8,8 +8,8 @@ SECTION = "base"
PV .= "+git${SRCPV}"
SRCBRANCH ?= "master"
-SRCREV = "d2058aa404ee1e8e8abd552c6a637787bcdcf514"
-SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH} \
+SRCREV = "faf547cc2345bfbf95507ab7e86530f85289bb5b"
+SRC_URI = "git://github.com/Freescale/libimxdmabuffer.git;branch=${SRCBRANCH};protocol=https \
file://run-ptest \
"
@@ -18,15 +18,23 @@ S = "${WORKDIR}/git"
inherit pkgconfig waf use-imx-headers ptest
+# dma-heap allocator is unavailable because it requires kernel 5.6 or newer.
EXTRA_OECONF = "--imx-linux-headers-path=${STAGING_INCDIR_IMX} \
--libdir=${libdir} \
+ --with-dma-heap-allocator=no \
${PACKAGECONFIG_CONFARGS}"
-PACKAGECONFIG ?= " "
-PACKAGECONFIG_append_imxgpu2d = " g2d"
+# If imxdpu is in use, the DPU is also used for implementing
+# libg2d. However, that implementation's g2d_alloc() function
+# is broken, so we cannot use it.
+LIBG2D_PACKAGECONFIG = "g2d"
+LIBG2D_PACKAGECONFIG_imxdpu = ""
+
+PACKAGECONFIG ?= " ion "
+PACKAGECONFIG_append_imxgpu2d = " ${LIBG2D_PACKAGECONFIG}"
PACKAGECONFIG_append_imxipu = " ipu"
PACKAGECONFIG_append_imxpxp = " pxp"
-PACKAGECONFIG_append_mx8m = " dwl ion"
+PACKAGECONFIG_append_mx8m = " dwl"
HANTRO_CONF = "--hantro-headers-path=${STAGING_INCDIR}/hantro_dec --hantro-decoder-version=G2"
diff --git a/recipes-bsp/ls2-phy/ls2-phy_git.bb b/recipes-bsp/ls2-phy/ls2-phy_git.bb
index a1c412be..7369b540 100644
--- a/recipes-bsp/ls2-phy/ls2-phy_git.bb
+++ b/recipes-bsp/ls2-phy/ls2-phy_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://EULA.txt;md5=86d76166990962fa552f840ff08e5798"
inherit deploy
-SRC_URI = "git://github.com/nxp/qoriq-firmware-cortina.git;nobranch=1"
+SRC_URI = "git://github.com/nxp/qoriq-firmware-cortina.git;nobranch=1;protocol=https"
SRCREV = "9143c2a3adede595966583c00ca4edc99ec698cf"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/mc-utils/mc-utils_git.bb b/recipes-bsp/mc-utils/mc-utils_git.bb
index 31645061..c2c7b0bc 100644
--- a/recipes-bsp/mc-utils/mc-utils_git.bb
+++ b/recipes-bsp/mc-utils/mc-utils_git.bb
@@ -9,7 +9,7 @@ DEPENDS += "dtc-native"
inherit deploy
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/mc-utils;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/mc-utils;protocol=https;nobranch=1"
SRCREV = "8672a5f5abcd3a354dcab07e03f2a8a69b2e962d"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/mxsldr/mxsldr_git.bb b/recipes-bsp/mxsldr/mxsldr_git.bb
index 01e24993..62b4b7ad 100644
--- a/recipes-bsp/mxsldr/mxsldr_git.bb
+++ b/recipes-bsp/mxsldr/mxsldr_git.bb
@@ -7,7 +7,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "c40d80472525e1d57dae5317c028b745968c0399"
-SRC_URI = "git://git.denx.de/mxsldr.git \
+SRC_URI = "git://git.denx.de/mxsldr.git;branch=master \
file://0001-Do-not-ignore-OE-cflags-and-ldflags.patch \
"
diff --git a/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb b/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
index fd53807f..4e5ee6ec 100644
--- a/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
+++ b/recipes-bsp/ppfe-firmware/ppfe-firmware_git.bb
@@ -7,7 +7,7 @@ INHIBIT_DEFAULT_DEPS = "1"
inherit deploy
-SRC_URI = "git://github.com/NXP/qoriq-engine-pfe-bin.git;nobranch=1"
+SRC_URI = "git://github.com/NXP/qoriq-engine-pfe-bin.git;nobranch=1;protocol=https"
SRCREV = "d3a8ef0760c54ddc243039c86389497e37be90ab"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/qe-ucode/qe-ucode_git.bb b/recipes-bsp/qe-ucode/qe-ucode_git.bb
index cecd5903..9e9a769f 100644
--- a/recipes-bsp/qe-ucode/qe-ucode_git.bb
+++ b/recipes-bsp/qe-ucode/qe-ucode_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=c62f8109b4df15ca37ceeb5e4943626c"
inherit deploy
-SRC_URI = "git://github.com/NXP/qoriq-qe-ucode.git;nobranch=1"
+SRC_URI = "git://github.com/NXP/qoriq-qe-ucode.git;nobranch=1;protocol=https"
SRCREV= "57401f6dff6507055558eaa6838116baa8a2fd46"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/rcw/rcw_git.bb b/recipes-bsp/rcw/rcw_git.bb
index e1e63cce..f4d77198 100644
--- a/recipes-bsp/rcw/rcw_git.bb
+++ b/recipes-bsp/rcw/rcw_git.bb
@@ -7,7 +7,7 @@ DEPENDS += "tcl-native"
inherit deploy siteinfo
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/rcw;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/rcw;protocol=https;nobranch=1"
SRCREV = "e0fab6d9b61003caef577f7474c2fac61e6ba2ff"
S = "${WORKDIR}/git"
diff --git a/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc b/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc
index 1ccd0d17..11d77e92 100644
--- a/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc
+++ b/recipes-bsp/u-boot/u-boot-fslc-common_2020.04.inc
@@ -8,9 +8,9 @@ LIC_FILES_CHKSUM = "file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
DEPENDS += "bison-native"
-SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/Freescale/u-boot-fslc.git;branch=${SRCBRANCH};protocol=https"
-SRCREV = "a266838009e02b369b51f4139c6ac64facb12d34"
+SRCREV = "88c58453be8cd87eb55f8e283ac4dcce5b59006d"
SRCBRANCH = "2020.04+fslc"
PV = "v2020.04+git${SRCPV}"
diff --git a/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.04.bb b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.04.bb
new file mode 100644
index 00000000..7f02746b
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-fslc-mfgtool_2020.04.bb
@@ -0,0 +1,8 @@
+# Copyright (C) 2014 O.S. Systems Software LTDA.
+# Copyright (C) 2014-2016 Freescale Semiconductor
+# Copyright 2017-2019 NXP
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/u-boot-fslc:"
+
+require u-boot-fslc_${PV}.bb
+require u-boot-mfgtool.inc
diff --git a/recipes-bsp/u-boot/u-boot-imx-common.inc b/recipes-bsp/u-boot/u-boot-imx-common.inc
index a2d2ed01..5eb234ce 100644
--- a/recipes-bsp/u-boot/u-boot-imx-common.inc
+++ b/recipes-bsp/u-boot/u-boot-imx-common.inc
@@ -3,9 +3,9 @@ DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCBRANCH = "lf-5.4.y_v2019.04"
-SRC_URI = "git://source.codeaurora.org/external/imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "228843cdf5435d4bd69f42a6015f78761ff4cc0d"
+SRCBRANCH = "imx_v2020.04_5.4.24_2.1.0"
+SRC_URI = "git://github.com/nxp-imx/uboot-imx.git;protocol=https;branch=${SRCBRANCH}"
+SRCREV = "4979a99482f7e04a3c1f4fb55e3182395ee8f710"
DEPENDS += "flex-native bison-native bc-native dtc-native"
diff --git a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb
index 2b296c19..2b296c19 100644
--- a/recipes-bsp/u-boot/u-boot-imx-mfgtool_2019.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx-mfgtool_2020.04.bb
diff --git a/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb
index 12ac72e2..12ac72e2 100644
--- a/recipes-bsp/u-boot/u-boot-imx-tools_2019.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx-tools_2020.04.bb
diff --git a/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch b/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch
deleted file mode 100644
index c717e029..00000000
--- a/recipes-bsp/u-boot/u-boot-imx/0001-Add-target-to-generate-initial-environment.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From bdaa73a5b3923257add182b4ab8058dbfa33421b Mon Sep 17 00:00:00 2001
-From: Stefano Babic <sbabic@denx.de>
-Date: Wed, 13 Mar 2019 09:46:45 +0100
-Subject: [PATCH] Add target to generate initial environment
-
-The initial environment is linked to the u-boot binary. Modifying the
-environment from User Space with the env tools requires that the tools
-are always built together with the bootloader to be sure that they
-contain the initial environment in case no environment is stored into
-persistent storage or when a board boots with just the default
-environment. This makes difficult for distros to provide a general
-package to access the environment. A simpler way is if the tools are
-generic for all boards and a configuration file is given to provide the
-initial environment.
-
-The patch just generates the initial environment by extracting it from
-the compiled object. This file can then be used for tools in user space
-to initialize the environment.
-
-Signed-off-by: Stefano Babic <sbabic@denx.de>
-
-Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/bdaa73a5b3923257add182b4ab8058dbfa33421b]
-
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- Makefile | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 66a09ac900..f2c7bb6041 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1977,6 +1977,13 @@ endif
- $(build)=$(build-dir) $(@:.ko=.o)
- $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
-
-+quiet_cmd_genenv = GENENV $@
-+cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
-+ sed --in-place -e 's/\x00/\x0A/g' $@
-+
-+u-boot-initial-env: u-boot.bin
-+ $(call if_changed,genenv)
-+
- # Consistency checks
- # ---------------------------------------------------------------------------
-
---
-2.17.1
-
diff --git a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb b/recipes-bsp/u-boot/u-boot-imx_2020.04.bb
index d37ede83..b36730e0 100644
--- a/recipes-bsp/u-boot/u-boot-imx_2019.04.bb
+++ b/recipes-bsp/u-boot/u-boot-imx_2020.04.bb
@@ -1,12 +1,10 @@
# Copyright (C) 2013-2016 Freescale Semiconductor
# Copyright 2018 (C) O.S. Systems Software LTDA.
-# Copyright 2017-2019 NXP
+# Copyright (C) 2017-2020 NXP
require recipes-bsp/u-boot/u-boot.inc
require u-boot-imx-common.inc
-SRC_URI += "file://0001-Add-target-to-generate-initial-environment.patch"
-
PROVIDES += "u-boot"
do_deploy_append_mx8m() {
@@ -21,7 +19,6 @@ do_deploy_append_mx8m() {
then
install -d ${DEPLOYDIR}/${BOOT_TOOLS}
install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
- install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot
install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
fi
done
diff --git a/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb b/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb
index 571fadb7..b32cd1ab 100644
--- a/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb
+++ b/recipes-bsp/u-boot/u-boot-qoriq_2019.10.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c \
"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/u-boot;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/u-boot;protocol=https;nobranch=1 \
file://0001-patman-Drop-binary-parameter.patch \
file://0001-patman-Update-command.Run-to-handle-failure-better.patch \
file://0001-patman-Adjust-command-to-return-strings-instead-of-b.patch \
diff --git a/recipes-bsp/uefi/uefi_git.bb b/recipes-bsp/uefi/uefi_git.bb
index f94a67e2..4c5adf41 100644
--- a/recipes-bsp/uefi/uefi_git.bb
+++ b/recipes-bsp/uefi/uefi_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://NXP-Binary-EULA;md5=343ec8f06efc37467a6de53686fa6315"
inherit deploy
-SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1"
+SRC_URI = "git://github.com/NXP/qoriq-uefi-binary.git;nobranch=1;protocol=https"
SRCREV= "e95ed52322f15437f98dee2b27de45a7495d648c"
S = "${WORKDIR}/git"
diff --git a/recipes-devtools/cst/cst_git.bb b/recipes-devtools/cst/cst_git.bb
index fef0fbcf..d2171283 100644
--- a/recipes-devtools/cst/cst_git.bb
+++ b/recipes-devtools/cst/cst_git.bb
@@ -16,7 +16,7 @@ inherit kernel-arch
#SECURE_PRI_KEY = "/path/srk.pri"
#SECURE_PUB_KEY = "/path/srk.pub"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cst;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/cst;protocol=https;nobranch=1 \
file://0001-tools-Mark-struct-input_field-file_field-extern.patch \
"
SRCREV = "9aafbdf2441858ceca2779279b6876c6bdc2d3ed"
diff --git a/recipes-devtools/devregs/devregs_git.bb b/recipes-devtools/devregs/devregs_git.bb
index 7f158fd8..2bee7b8b 100644
--- a/recipes-devtools/devregs/devregs_git.bb
+++ b/recipes-devtools/devregs/devregs_git.bb
@@ -1,10 +1,10 @@
DESCRIPTION = "i.MX Register tool"
SECTION = "devel"
-LICENSE = "GPL-1"
+LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=5003fa041d799dd5dd5f646b74e36924"
-SRCREV = "d5f6223027f4d6ae71bd5d432f5611486e0e6074"
-SRC_URI = "git://github.com/boundarydevices/devregs.git;protocol=http"
+SRCREV = "dcc3e3f26d3d867d5297a104dc32bd99f5e6fa71"
+SRC_URI = "git://github.com/boundarydevices/devregs.git;protocol=https;branch=master"
PV = "1.0+${SRCPV}"
diff --git a/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb b/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb
index c5f51983..1a1e1a9c 100644
--- a/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb
+++ b/recipes-devtools/imx-usb-loader/imx-usb-loader_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
DEPENDS = "libusb1"
SRCREV = "f009770d841468204ab104bf7d3b0c5bc8425dbb"
-SRC_URI = "git://github.com/boundarydevices/imx_usb_loader.git;protocol=http"
+SRC_URI = "git://github.com/boundarydevices/imx_usb_loader.git;protocol=https;branch=master"
PV = "1.0+${SRCPV}"
diff --git a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb b/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
index a281170c..7938719f 100644
--- a/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
+++ b/recipes-devtools/qemu/qemu-qoriq_4.1.0.bb
@@ -9,7 +9,7 @@ DEPENDS = "glib-2.0 zlib pixman bison-native"
LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
-SRC_URI = "gitsm://source.codeaurora.org/external/qoriq/qoriq-components/qemu;nobranch=1 \
+SRC_URI = "gitsm://github.com/nxp-qoriq/qemu;protocol=https;nobranch=1 \
file://powerpc_rom.bin \
file://run-ptest \
file://0002-Add-subpackage-ptest-which-runs-all-unit-test-cases-.patch \
diff --git a/recipes-devtools/utp-com/utp-com_git.bb b/recipes-devtools/utp-com/utp-com_git.bb
index db2d7f08..0b0a6cf2 100644
--- a/recipes-devtools/utp-com/utp-com_git.bb
+++ b/recipes-devtools/utp-com/utp-com_git.bb
@@ -6,7 +6,7 @@ DEPENDS = "sg3-utils"
SRCREV = "dee512ced1e9367d223d22f10797fbf9aeacfab6"
SRC_URI = " \
- git://github.com/Freescale/utp_com;protocol=https \
+ git://github.com/Freescale/utp_com;protocol=https;branch=master \
"
PV = "1.0+git${SRCPV}"
diff --git a/recipes-dpaa/eth-config/eth-config_git.bb b/recipes-dpaa/eth-config/eth-config_git.bb
index cfeae114..f05e1f14 100644
--- a/recipes-dpaa/eth-config/eth-config_git.bb
+++ b/recipes-dpaa/eth-config/eth-config_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=47716bd5b656aa5e298a132a64d2d1e4"
PR = "r2"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/eth-config;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/eth-config;protocol=https;nobranch=1"
SRCREV = "6164664070e45810c793f112781ebcedc979e132"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa/flib/flib_git.bb b/recipes-dpaa/flib/flib_git.bb
index 3ae05889..9152939b 100644
--- a/recipes-dpaa/flib/flib_git.bb
+++ b/recipes-dpaa/flib/flib_git.bb
@@ -3,7 +3,7 @@ SECTION = "flib"
LICENSE = "BSD & GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=9f6d1afdf6b0f6b3ba65c25ba589ee53"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/flib;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/flib;protocol=https;nobranch=1"
SRCREV = "cbb31427466649c07d2ac2739a41bb42f5f6be7c"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa/fm-ucode/fm-ucode_git.bb b/recipes-dpaa/fm-ucode/fm-ucode_git.bb
index 39e4f9d0..4b39b006 100644
--- a/recipes-dpaa/fm-ucode/fm-ucode_git.bb
+++ b/recipes-dpaa/fm-ucode/fm-ucode_git.bb
@@ -7,7 +7,7 @@ PR = "r1"
inherit deploy
-SRC_URI = "git://github.com/NXP/qoriq-fm-ucode.git;nobranch=1"
+SRC_URI = "git://github.com/NXP/qoriq-fm-ucode.git;nobranch=1;protocol=https"
SRCREV = "c275e91392e2adab1ed22f3867b8269ca3c54014"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa/fmlib/fmlib_git.bb b/recipes-dpaa/fmlib/fmlib_git.bb
index 880d768b..ecc3a690 100644
--- a/recipes-dpaa/fmlib/fmlib_git.bb
+++ b/recipes-dpaa/fmlib/fmlib_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9c7bd5e45d066db084bdb3543d55b1ac"
PR = "r1"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/fmlib;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/fmlib;protocol=https;nobranch=1"
SRCREV = "69a70474cd8411d5a099c34f40760b6567d781d6"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa2/aiopsl/aiopsl_git.bb b/recipes-dpaa2/aiopsl/aiopsl_git.bb
index a1b00289..6030dc1f 100644
--- a/recipes-dpaa2/aiopsl/aiopsl_git.bb
+++ b/recipes-dpaa2/aiopsl/aiopsl_git.bb
@@ -7,7 +7,7 @@ BASEDEPENDS = ""
S = "${WORKDIR}/git"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/aiopsl;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/aiopsl;protocol=https;nobranch=1"
SRCREV = "87d83d8e99770325cc7ad9e10965c9959e7cb828"
do_configure[noexec] = "1"
diff --git a/recipes-dpaa2/dce/dce_git.bb b/recipes-dpaa2/dce/dce_git.bb
index 0e31a3c4..f52acf85 100644
--- a/recipes-dpaa2/dce/dce_git.bb
+++ b/recipes-dpaa2/dce/dce_git.bb
@@ -3,8 +3,8 @@ SECTION = "dpaa2"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=956df5ea6cfe0a1dcf2dee7ca37c0cdf"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dce;nobranch=1 \
- git://source.codeaurora.org/external/qoriq/qoriq-components/qbman_userspace;nobranch=1;name=qbman;destsuffix=git/lib/qbman_userspace \
+SRC_URI = "git://github.com/nxp-qoriq/dce;protocol=https;nobranch=1 \
+ git://github.com/nxp-qoriq/qbman_userspace;protocol=https;nobranch=1;name=qbman;destsuffix=git/lib/qbman_userspace \
"
SRCREV = "0ec35ad12ad04b5dadfa9f8c8a718c715bde41db"
SRCREV_qbman = "a1af1e1528fe2e1ce0df1e6d9170b6c239c8ab4f"
diff --git a/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb b/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
index a9c3180f..e809a375 100644
--- a/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
+++ b/recipes-dpaa2/gpp-aioptool/gpp-aioptool_git.bb
@@ -6,7 +6,7 @@ SECTION = "dpaa2"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=386a6287daa6504b7e7e5014ddfb3987"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/gpp-aioptool;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/gpp-aioptool;protocol=https;nobranch=1 \
file://0001-remove-libio.h.patch \
"
SRCREV = "6ead470dde043f3ca67f1ba19b313dd64ec199e1"
diff --git a/recipes-dpaa2/management-complex/management-complex_10.14.1.bb b/recipes-dpaa2/management-complex/management-complex_10.14.1.bb
index ddb305c1..4f30ae93 100644
--- a/recipes-dpaa2/management-complex/management-complex_10.14.1.bb
+++ b/recipes-dpaa2/management-complex/management-complex_10.14.1.bb
@@ -6,7 +6,7 @@ inherit deploy
INHIBIT_DEFAULT_DEPS = "1"
-SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1"
+SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1;protocol=https"
SRCREV = "408110ee632f6291545b0b156cd74e7e3b4612cc"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa2/management-complex/management-complex_10.20.4.bb b/recipes-dpaa2/management-complex/management-complex_10.20.4.bb
index 3e14a26e..684ca9a9 100644
--- a/recipes-dpaa2/management-complex/management-complex_10.20.4.bb
+++ b/recipes-dpaa2/management-complex/management-complex_10.20.4.bb
@@ -6,7 +6,7 @@ inherit deploy
INHIBIT_DEFAULT_DEPS = "1"
-SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1"
+SRC_URI = "git://github.com/nxp/qoriq-mc-binary;nobranch=1;protocol=https"
SRCREV = "f73683596a7b72124d67b62e64f3dc2bb36b9321"
S = "${WORKDIR}/git"
diff --git a/recipes-dpaa2/restool/restool_git.bb b/recipes-dpaa2/restool/restool_git.bb
index 0211c779..53d165ee 100644
--- a/recipes-dpaa2/restool/restool_git.bb
+++ b/recipes-dpaa2/restool/restool_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ec8d84e9cd4de287e290275d09db27f0"
RDEPENDS_${PN} += "bash dtc"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/restool;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/restool;protocol=https;nobranch=1 \
file://0001-restool-fix-build-error-with-gcc7.patch"
SRCREV = "f0cec094e4c6d1c975b377203a3bf994ba9325a9"
diff --git a/recipes-dpaa2/spc/spc_git.bb b/recipes-dpaa2/spc/spc_git.bb
index e9bf1427..5b0d4974 100644
--- a/recipes-dpaa2/spc/spc_git.bb
+++ b/recipes-dpaa2/spc/spc_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=163b09a1c249a6ff2b28da1ceca2e0a8"
DEPENDS = "libxml2 fmlib tclap"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/spc;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/spc;protocol=https;nobranch=1"
SRCREV = "be7dd8e346a934aae1e4bdd6b579f2aa4bb5cd86"
S = "${WORKDIR}/git"
diff --git a/recipes-extended/dpdk/dpdk_19.11-20.04.bb b/recipes-extended/dpdk/dpdk_19.11-20.04.bb
index 398d2ec4..13d9e352 100644
--- a/recipes-extended/dpdk/dpdk_19.11-20.04.bb
+++ b/recipes-extended/dpdk/dpdk_19.11-20.04.bb
@@ -1,6 +1,6 @@
LIC_FILES_CHKSUM = "file://license/README;md5=3383def2d4c82237df281174e981a492"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/dpdk;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/dpdk;protocol=https;nobranch=1 \
file://add-RTE_KERNELDIR_OUT-to-split-kernel-bu.patch \
file://0001-add-Wno-cast-function-type.patch \
file://0001-Add-RTE_KERNELDIR_OUT.patch \
diff --git a/recipes-extended/ipc-ust/ipc-ust_git.bb b/recipes-extended/ipc-ust/ipc-ust_git.bb
index df496c28..91e0c288 100644
--- a/recipes-extended/ipc-ust/ipc-ust_git.bb
+++ b/recipes-extended/ipc-ust/ipc-ust_git.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "DSP boot application and ipc test application"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/ipc;branch=nxp/sdk-v2.0.x \
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/ipc;protocol=https;branch=nxp/sdk-v2.0.x \
file://Makefile-use-LDFLAGS-if-set.patch \
"
SRCREV = "74d662707558290f070f9589177db730444bc435"
diff --git a/recipes-extended/jailhouse/jailhouse_0.11.bb b/recipes-extended/jailhouse/jailhouse_0.11.bb
index 32a4f92f..5a1665eb 100644
--- a/recipes-extended/jailhouse/jailhouse_0.11.bb
+++ b/recipes-extended/jailhouse/jailhouse_0.11.bb
@@ -16,7 +16,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \
SRCBRANCH = "lf-5.4.y"
SRCREV = "82d5698945eafaffa58bab3b4d6da320bf56289c"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/nxp-imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \
file://0001-tools-scripts-update-shebang-to-python3.patch \
"
diff --git a/recipes-extended/libpkcs11/libpkcs11_git.bb b/recipes-extended/libpkcs11/libpkcs11_git.bb
index 33c27ecd..554d5159 100644
--- a/recipes-extended/libpkcs11/libpkcs11_git.bb
+++ b/recipes-extended/libpkcs11/libpkcs11_git.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "PKCS library"
LICENSE = "GPLv2 & BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=803852533e29eb1d6d5e55ad3078b625"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/libpkcs11;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/libpkcs11;protocol=https;nobranch=1"
SRCREV = "a243fb21772f1bd434d8bc1ac45feb36571afadb"
DEPENDS = "openssl secure-obj"
diff --git a/recipes-extended/odp/odp.inc b/recipes-extended/odp/odp.inc
index 129f77ae..6965c372 100644
--- a/recipes-extended/odp/odp.inc
+++ b/recipes-extended/odp/odp.inc
@@ -9,9 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=ca6103dc75397fb6bec596187d6b7829"
FILESEXTRAPATHS_prepend := "${THISDIR}/odp:"
SRC_URI = " \
-git://source.codeaurora.org/external/qoriq/qoriq-components/odp;nobranch=1 \
-git://source.codeaurora.org/external/qoriq/qoriq-components/qbman_userspace;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \
-git://source.codeaurora.org/external/qoriq/qoriq-components/flib;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \
+git://github.com/nxp-qoriq/odp;protocol=https;nobranch=1 \
+git://github.com/nxp-qoriq/qbman_userspace;protocol=https;nobranch=1;name=qbman;destsuffix=git/platform/linux-dpaa2/flib/qbman \
+git://github.com/nxp-qoriq/flib;protocol=https;nobranch=1;name=rta;destsuffix=git/platform/linux-dpaa2/flib/rta \
"
SRC_URI += "file://0001-Fix-this-build-error.patch"
diff --git a/recipes-extended/ofp/ofp_git.bb b/recipes-extended/ofp/ofp_git.bb
index c76eafd7..60fc59dd 100644
--- a/recipes-extended/ofp/ofp_git.bb
+++ b/recipes-extended/ofp/ofp_git.bb
@@ -6,7 +6,7 @@ SECTION = "console/network"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=fbe4957c430eed6cc20521d4eb429fae"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ofp;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/ofp;protocol=https;nobranch=1"
SRCREV = "fe66f4659f7d356f7aa73a8fb32fcf67c6cf1108"
diff --git a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
index 9b5d2516..a0dc4a82 100644
--- a/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
+++ b/recipes-extended/ovs-dpdk/ovs-dpdk_2.13.0.bb
@@ -7,7 +7,7 @@ RDEPENDS_${PN} = "bash libcrypto libssl python3"
inherit python3native
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ovs-dpdk;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/ovs-dpdk;protocol=https;nobranch=1 \
file://0001-netdev-dpdk-have-env-based-configurable-number-of-pa.patch \
"
SRCREV = "71d553b995d0bd527d3ab1e9fbaf5a2ae34de2f3"
diff --git a/recipes-extended/secure-obj/secure-obj.inc b/recipes-extended/secure-obj/secure-obj.inc
index 617601ac..14fa8c3c 100644
--- a/recipes-extended/secure-obj/secure-obj.inc
+++ b/recipes-extended/secure-obj/secure-obj.inc
@@ -10,7 +10,7 @@ inherit python3native
LDFLAGS += "${TOOLCHAIN_OPTIONS}"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/secure_obj;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/secure_obj;protocol=https;nobranch=1 \
"
SRCREV = "fb179a861e8e9bfed85ac5ef8387bdd30de48db9"
diff --git a/recipes-extended/skmm-ep/skmm-ep_git.bb b/recipes-extended/skmm-ep/skmm-ep_git.bb
index b75c0feb..1a66e880 100644
--- a/recipes-extended/skmm-ep/skmm-ep_git.bb
+++ b/recipes-extended/skmm-ep/skmm-ep_git.bb
@@ -7,7 +7,7 @@ DEPENDS = "libedit openssl virtual/kernel"
PACKAGE_ARCH = "${MACHINE_ARCH}"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/skmm-ep;protocol=https;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/skmm-ep;protocol=https;nobranch=1 \
file://add-two-missing-header-files.patch \
"
SRCREV = "de6816c7d66129683bc62229b482ac3cf585d896"
diff --git a/recipes-extended/tsntool/tsntool_git.bb b/recipes-extended/tsntool/tsntool_git.bb
index 5694e91c..108adc02 100644
--- a/recipes-extended/tsntool/tsntool_git.bb
+++ b/recipes-extended/tsntool/tsntool_git.bb
@@ -7,7 +7,7 @@ DEPENDS = "cjson libnl readline"
inherit pkgconfig
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/tsntool;protocol=https;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/tsntool;protocol=https;nobranch=1"
SRCREV = "ca2d8fb348bb54960d706177108c43ae213e0063"
S = "${WORKDIR}/git"
diff --git a/recipes-graphics/drm/libdrm-armada_git.bb b/recipes-graphics/drm/libdrm-armada_git.bb
deleted file mode 100644
index a47987a5..00000000
--- a/recipes-graphics/drm/libdrm-armada_git.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-SUMMARY = "Userspace interface to kernel DRM services"
-SECTION = "x11/base"
-LICENSE = "GPLv2 & BSD"
-
-LIC_FILES_CHKSUM = "file://libdrm_lists.h;beginline=1;endline=25;md5=2af1df1026ba1d24c8e7c370e68ed198"
-
-DEPENDS = "libdrm"
-
-SRCREV = "6b461c163b0bd02c76b65d94cc2fb3767167bda8"
-PV = "0.1+git${SRCPV}"
-SRC_URI = "git://git.armlinux.org.uk/~rmk/libdrm-armada.git"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/git"
-
-COMPATIBLE_MACHINE ?= "(imx|use-mainline-bsp)"
diff --git a/recipes-graphics/drm/libdrm_2.4.99.imx.bb b/recipes-graphics/drm/libdrm_2.4.99.imx.bb
index dc2aa8a9..81ee35ab 100644
--- a/recipes-graphics/drm/libdrm_2.4.99.imx.bb
+++ b/recipes-graphics/drm/libdrm_2.4.99.imx.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c5
PROVIDES = "drm"
DEPENDS = "libpthread-stubs"
-IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1"
+IMX_LIBDRM_SRC ?= "git://github.com/nxp-imx/libdrm-imx.git;protocol=https;nobranch=1"
IMX_LIBDRM_BRANCH ?= "libdrm-imx-2.4.99"
SRC_URI = "${IMX_LIBDRM_SRC};branch=${IMX_LIBDRM_BRANCH} \
file://musl-ioctl.patch \
diff --git a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb b/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb
index 4465ee7e..ae6da7b6 100644
--- a/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.3.bb
+++ b/recipes-graphics/imx-dpu-g2d/imx-dpu-g2d_1.8.7.bb
@@ -4,12 +4,12 @@
DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and DPU"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
PROVIDES += "virtual/libg2d"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "57a0a0a7d20e4ea1a0d2dcd162abfa79"
-SRC_URI[sha256sum] = "f8bc83e23263e179bd66492dafaeb104a3967337d76325d0ec97993ae846fb13"
+SRC_URI[md5sum] = "2b8fea58c87a724c1d5c023ee8bd551b"
+SRC_URI[sha256sum] = "7533e34f447e8b076fa6461ac83806efdd677310094741eef2a67858034730fe"
inherit fsl-eula-unpack
@@ -27,4 +27,9 @@ INSANE_SKIP_${PN} += "ldflags"
RDEPENDS_${PN} = "libgal-imx libdrm"
+# This is required to provide support for VPU Amphion HEVC tile format
+# From NXP [MGS-5547] (commit e175d6b4f78deab24d319b852998bef55cdecc99):
+# VPU Amphion HEVC tile support was added using OpenCL, so add a dependency on libopencl-imx.
+RDEPENDS_${PN} += "libopencl-imx"
+
COMPATIBLE_MACHINE = "(imxdpu)"
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch
deleted file mode 100644
index 27382c34..00000000
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0001-switch-from-python2-to-python3.patch
+++ /dev/null
@@ -1,10004 +0,0 @@
-From bfa1b7c7e675f198f4573325f1252e91f80f0b4d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Piotr=20Podsiad=C5=82y?= <ppodsiadly@mykolab.com>
-Date: Thu, 3 Jan 2019 20:39:55 +0100
-Subject: [PATCH 1/4] switch from python2 to python3
-
-Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/0b8b019952f2668a5e8786cc2d331062b958f02e]
-
-(cherry picked from commit 0b8b019952f2668a5e8786cc2d331062b958f02e)
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- CMakeLists.txt | 7 +-
- cli/CMakeLists.txt | 2 +-
- dispatch/CMakeLists.txt | 2 +-
- dispatch/__init__.py | 2 +-
- dispatch/dispatch.py | 56 +-
- dispatch/glproc.py | 204 +++----
- retrace/CMakeLists.txt | 14 +-
- retrace/d3d9retrace.py | 248 ++++----
- retrace/ddrawretrace.py | 102 ++--
- retrace/dllretrace.py | 46 +-
- retrace/dxgiretrace.py | 370 +++++------
- retrace/dxgistate_so.py | 98 +--
- retrace/glretrace.py | 660 ++++++++++----------
- retrace/glstate_params.py | 556 ++++++++---------
- retrace/retrace.py | 300 ++++-----
- scripts/convert.py | 4 +-
- scripts/jsondiff.py | 16 +-
- scripts/jsonextractimages.py | 2 +-
- scripts/leaks.py | 163 +++++
- scripts/profileshader.py | 18 +-
- scripts/retracediff.py | 6 +-
- scripts/snapdiff.py | 7 +-
- scripts/tracediff.py | 16 +-
- scripts/unpickle.py | 16 +-
- specs/cglapi.py | 6 +-
- specs/d2d1.py | 6 +-
- specs/d3d.py | 8 +-
- specs/d3d10.py | 4 +-
- specs/d3d10sdklayers.py | 2 +-
- specs/d3d11.py | 4 +-
- specs/d3d11sdklayers.py | 2 +-
- specs/d3d8.py | 6 +-
- specs/d3d8caps.py | 4 +-
- specs/d3d8types.py | 2 +-
- specs/d3d9.py | 6 +-
- specs/d3d9caps.py | 4 +-
- specs/d3d9types.py | 2 +-
- specs/d3dcaps.py | 4 +-
- specs/d3dtypes.py | 2 +-
- specs/dcommon.py | 2 +-
- specs/dcomp.py | 303 +++++++++
- specs/ddraw.py | 2 +-
- specs/debug.py | 2 +-
- specs/dwrite.py | 4 +-
- specs/dxgi.py | 2 +-
- specs/dxva2.py | 2 +-
- specs/eglapi.py | 6 +-
- specs/eglenum.py | 2 +-
- specs/glapi.py | 6 +-
- specs/glparams.py | 4 +-
- specs/gltypes.py | 2 +-
- specs/glxapi.py | 4 +-
- specs/scripts/c2api.py | 40 +-
- specs/scripts/cxx2api.py | 488 +++++++++++++++
- specs/scripts/spec2api.py | 6 +-
- specs/scripts/txt2api.py | 8 +-
- specs/scripts/xml2api.py | 6 +-
- specs/scripts/xml2enum.py | 4 +-
- specs/scripts/xml2glparams.py | 4 +-
- specs/stdapi.py | 43 +-
- specs/wglapi.py | 6 +-
- specs/wglenum.py | 2 +-
- specs/winapi.py | 2 +-
- wrappers/CMakeLists.txt | 18 +-
- wrappers/cgltrace.py | 74 +--
- wrappers/d2d1trace.py | 18 +-
- wrappers/d3d8trace.py | 36 +-
- wrappers/d3d9trace.py | 62 +-
- wrappers/ddrawtrace.py | 12 +-
- wrappers/dlltrace.py | 36 +-
- wrappers/dxgitrace.py | 98 +--
- wrappers/egltrace.py | 420 ++++++-------
- wrappers/gltrace.py | 1080 ++++++++++++++++-----------------
- wrappers/glxtrace.py | 54 +-
- wrappers/trace.py | 707 ++++++++++-----------
- wrappers/wgltrace.py | 86 +--
- 76 files changed, 3803 insertions(+), 2825 deletions(-)
- create mode 100755 scripts/leaks.py
- create mode 100644 specs/dcomp.py
- create mode 100755 specs/scripts/cxx2api.py
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 900028c6..03ffd07c 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -104,10 +104,7 @@ else ()
- endmacro()
- endif ()
-
--find_host_package (PythonInterp 2.7 REQUIRED)
--if (NOT PYTHON_VERSION_MAJOR EQUAL 2)
-- message (FATAL_ERROR "Python 2.x required and requested, but Python ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} found.")
--endif ()
-+find_host_package(Python3 COMPONENTS Interpreter REQUIRED)
-
- find_package (Threads)
-
-@@ -591,7 +588,7 @@ set (CPACK_PACKAGE_VERSION_MINOR "0")
-
- # Use current date in YYYYMMDD format as patch number
- execute_process (
-- COMMAND ${PYTHON_EXECUTABLE} -c "import time, sys; sys.stdout.write(time.strftime('%Y%m%d'))"
-+ COMMAND ${Python3_EXECUTABLE} -c "import time, sys; sys.stdout.write(time.strftime('%Y%m%d'))"
- OUTPUT_VARIABLE CPACK_PACKAGE_VERSION_PATCH
- )
-
-diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
-index 9b621bb1..eb5d485d 100644
---- a/cli/CMakeLists.txt
-+++ b/cli/CMakeLists.txt
-@@ -13,7 +13,7 @@ add_definitions(
- if (WIN32)
- add_definitions (-DAPITRACE_PYTHON_EXECUTABLE="python")
- else ()
-- add_definitions (-DAPITRACE_PYTHON_EXECUTABLE="${PYTHON_EXECUTABLE}")
-+ add_definitions (-DAPITRACE_PYTHON_EXECUTABLE="${Python3_EXECUTABLE}")
- endif ()
-
- add_executable (apitrace
-diff --git a/dispatch/CMakeLists.txt b/dispatch/CMakeLists.txt
-index d023e6e9..e51eec48 100644
---- a/dispatch/CMakeLists.txt
-+++ b/dispatch/CMakeLists.txt
-@@ -7,7 +7,7 @@ add_custom_command (
- OUTPUT
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp
-- COMMAND ${PYTHON_EXECUTABLE}
-+ COMMAND ${Python3_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/glproc.py
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.hpp
- ${CMAKE_CURRENT_BINARY_DIR}/glproc.cpp
-diff --git a/dispatch/__init__.py b/dispatch/__init__.py
-index b872135e..d8e8596e 100644
---- a/dispatch/__init__.py
-+++ b/dispatch/__init__.py
-@@ -1 +1 @@
--from dispatch import *
-+from .dispatch import *
-diff --git a/dispatch/dispatch.py b/dispatch/dispatch.py
-index 9e778561..e1dd8bc9 100644
---- a/dispatch/dispatch.py
-+++ b/dispatch/dispatch.py
-@@ -58,18 +58,18 @@ class Dispatcher:
- # define standard name aliases for convenience, but only when not
- # tracing, as that would cause symbol clashing with the tracing
- # functions
-- print '#ifdef RETRACE'
-+ print('#ifdef RETRACE')
- for function in module.functions:
-- print '#define %s _%s' % (function.name, function.name)
-- print '#endif /* RETRACE */'
-- print
-+ print('#define %s _%s' % (function.name, function.name))
-+ print('#endif /* RETRACE */')
-+ print()
-
- def dispatchFunctionDecl(self, module, function):
- ptype = function_pointer_type(function)
- pvalue = function_pointer_value(function)
-- print 'typedef ' + function.prototype('* %s' % ptype) + ';'
-- print 'extern %s %s;' % (ptype, pvalue)
-- print
-+ print('typedef ' + function.prototype('* %s' % ptype) + ';')
-+ print('extern %s %s;' % (ptype, pvalue))
-+ print()
-
- def dispatchModuleImpl(self, module):
- for function in module.functions:
-@@ -84,19 +84,19 @@ class Dispatcher:
- else:
- ret = 'return '
-
-- print 'static ' + function.prototype('_fail_' + function.name) + ' {'
-+ print('static ' + function.prototype('_fail_' + function.name) + ' {')
- self.failFunction(function)
-- print '}'
-- print
-+ print('}')
-+ print()
-
-- print 'static ' + function.prototype('_get_' + function.name) + ' {'
-+ print('static ' + function.prototype('_get_' + function.name) + ' {')
- self.invokeGetProcAddress(module, function)
-- print ' %s%s(%s);' % (ret, pvalue, ', '.join([str(arg.name) for arg in function.args]))
-- print '}'
-- print
-+ print(' %s%s(%s);' % (ret, pvalue, ', '.join([str(arg.name) for arg in function.args])))
-+ print('}')
-+ print()
-
-- print '%s %s = &%s;' % (ptype, pvalue, '_get_' + function.name)
-- print
-+ print('%s %s = &%s;' % (ptype, pvalue, '_get_' + function.name))
-+ print()
-
- def getProcAddressName(self, module, function):
- raise NotImplementedError
-@@ -105,25 +105,25 @@ class Dispatcher:
- ptype = function_pointer_type(function)
- pvalue = function_pointer_value(function)
- getProcAddressName = self.getProcAddressName(module, function)
-- print ' %s _ptr;' % (ptype,)
-- print ' _ptr = (%s)%s("%s");' % (ptype, getProcAddressName, function.name)
-- print ' if (!_ptr) {'
-- print ' _ptr = &%s;' % ('_fail_' + function.name)
-- print ' }'
-- print ' %s = _ptr;' % (pvalue,)
-+ print(' %s _ptr;' % (ptype,))
-+ print(' _ptr = (%s)%s("%s");' % (ptype, getProcAddressName, function.name))
-+ print(' if (!_ptr) {')
-+ print(' _ptr = &%s;' % ('_fail_' + function.name))
-+ print(' }')
-+ print(' %s = _ptr;' % (pvalue,))
-
- def failFunction(self, function):
-- print r' const char *_name = "%s";' % function.name
-+ print(r' const char *_name = "%s";' % function.name)
- if function.type is stdapi.Void or function.fail is not None:
-- print r' os::log("warning: ignoring call to unavailable function %s\n", _name);'
-+ print(r' os::log("warning: ignoring call to unavailable function %s\n", _name);')
- if function.type is stdapi.Void:
- assert function.fail is None
-- print ' return;'
-+ print(' return;')
- else:
- assert function.fail is not None
-- print ' return %s;' % function.fail
-+ print(' return %s;' % function.fail)
- else:
-- print r' os::log("error: unavailable function %s\n", _name);'
-- print r' os::abort();'
-+ print(r' os::log("error: unavailable function %s\n", _name);')
-+ print(r' os::abort();')
-
-
-diff --git a/dispatch/glproc.py b/dispatch/glproc.py
-index f26a4f7d..93bba232 100644
---- a/dispatch/glproc.py
-+++ b/dispatch/glproc.py
-@@ -506,15 +506,15 @@ class GlDispatcher(Dispatcher):
- if sys.platform == 'darwin':
- # Fallback to EXT_debug_label on MacOSX, some enums need to be translated.
- if function.name in ('glObjectLabel', 'glObjectLabelKHR'):
-- print r' if (translateDebugLabelIdentifier(identifier)) {'
-- print r' _glLabelObjectEXT(identifier, name, length < 0 ? 0 : length, length == 0 ? "" : label);'
-- print r' return;'
-- print r' }'
-+ print(r' if (translateDebugLabelIdentifier(identifier)) {')
-+ print(r' _glLabelObjectEXT(identifier, name, length < 0 ? 0 : length, length == 0 ? "" : label);')
-+ print(r' return;')
-+ print(r' }')
- if function.name in ('glGetObjectLabel', 'glGetObjectLabelKHR'):
-- print r' if (translateDebugLabelIdentifier(identifier)) {'
-- print r' _glGetObjectLabelEXT(identifier, name, bufSize, length, label);'
-- print r' return;'
-- print r' }'
-+ print(r' if (translateDebugLabelIdentifier(identifier)) {')
-+ print(r' _glGetObjectLabelEXT(identifier, name, bufSize, length, label);')
-+ print(r' return;')
-+ print(r' }')
- if function.name in (
- # GL_KHR_debug
- 'glDebugMessageControl',
-@@ -549,25 +549,25 @@ class GlDispatcher(Dispatcher):
- ):
- return
- if function.name.startswith('glGetObjectLabel'):
-- print r' if (length != 0) *length = 0;'
-- print r' if (label != 0 && bufSize > 0) *label = 0;'
-+ print(r' if (length != 0) *length = 0;')
-+ print(r' if (label != 0 && bufSize > 0) *label = 0;')
- return
- if function.name == 'glGetDebugMessageLogAMD':
-- print r' if (categories != 0) *categories = 0;'
-- print r' if (ids != 0) *ids = 0;'
-- print r' if (severities != 0) *severities = 0;'
-- print r' if (lengths != 0) *lengths = 0;'
-- print r' if (message != 0 && bufsize > 0) *message = 0;'
-- print r' return 0;'
-+ print(r' if (categories != 0) *categories = 0;')
-+ print(r' if (ids != 0) *ids = 0;')
-+ print(r' if (severities != 0) *severities = 0;')
-+ print(r' if (lengths != 0) *lengths = 0;')
-+ print(r' if (message != 0 && bufsize > 0) *message = 0;')
-+ print(r' return 0;')
- return
- if function.name.startswith('glGetDebugMessageLog'):
-- print r' if (sources != 0) *sources = 0;'
-- print r' if (types != 0) *types = 0;'
-- print r' if (ids != 0) *ids = 0;'
-- print r' if (severities != 0) *severities = 0;'
-- print r' if (lengths != 0) *lengths = 0;'
-- print r' if (messageLog != 0 && bufsize > 0) *messageLog = 0;'
-- print r' return 0;'
-+ print(r' if (sources != 0) *sources = 0;')
-+ print(r' if (types != 0) *types = 0;')
-+ print(r' if (ids != 0) *ids = 0;')
-+ print(r' if (severities != 0) *severities = 0;')
-+ print(r' if (lengths != 0) *lengths = 0;')
-+ print(r' if (messageLog != 0 && bufsize > 0) *messageLog = 0;')
-+ print(r' return 0;')
- return
-
- Dispatcher.failFunction(self, function)
-@@ -577,96 +577,96 @@ if __name__ == '__main__':
- decl, impl = sys.argv[1:]
-
- sys.stdout = open(decl, 'wt')
-- print
-- print '#pragma once'
-- print
-- print '#include "glimports.hpp"'
-- print
-- print '#if defined(_WIN32)'
-- print 'extern HMODULE _libGlHandle;'
-- print '#else'
-- print 'extern void * _libGlHandle;'
-- print '#endif'
-- print
-- print 'void * _getPublicProcAddress(const char *procName);'
-- print 'void * _getPrivateProcAddress(const char *procName);'
-- print
-+ print()
-+ print('#pragma once')
-+ print()
-+ print('#include "glimports.hpp"')
-+ print()
-+ print('#if defined(_WIN32)')
-+ print('extern HMODULE _libGlHandle;')
-+ print('#else')
-+ print('extern void * _libGlHandle;')
-+ print('#endif')
-+ print()
-+ print('void * _getPublicProcAddress(const char *procName);')
-+ print('void * _getPrivateProcAddress(const char *procName);')
-+ print()
- dispatcher = GlDispatcher()
-- print
-+ print()
- dispatcher.dispatchModuleDecl(eglapi)
-- print
-- print '#if defined(_WIN32)'
-- print
-+ print()
-+ print('#if defined(_WIN32)')
-+ print()
- dispatcher.dispatchModuleDecl(wglapi)
-- print
-- print '#elif defined(__APPLE__)'
-- print
-+ print()
-+ print('#elif defined(__APPLE__)')
-+ print()
- dispatcher.dispatchModuleDecl(cglapi)
-- print
-- print '#elif defined(HAVE_X11)'
-- print
-+ print()
-+ print('#elif defined(HAVE_X11)')
-+ print()
- dispatcher.dispatchModuleDecl(glxapi)
-- print
-- print '#endif'
-- print
-+ print()
-+ print('#endif')
-+ print()
- dispatcher.dispatchModuleDecl(glapi)
-- print
-+ print()
-
- sys.stdout = open(impl, 'wt')
-- print
-- print '#include "glproc.hpp"'
-- print '#include "os.hpp"'
-- print
-+ print()
-+ print('#include "glproc.hpp"')
-+ print('#include "os.hpp"')
-+ print()
- dispatcher = GlDispatcher()
-- print
-+ print()
- dispatcher.dispatchModuleImpl(eglapi)
-- print
-- print '#if defined(_WIN32)'
-- print
-+ print()
-+ print('#if defined(_WIN32)')
-+ print()
- dispatcher.dispatchModuleImpl(wglapi)
-- print
-- print '#elif defined(__APPLE__)'
-- print
-- print 'static inline bool'
-- print 'translateDebugLabelIdentifier(GLenum & identifier)'
-- print '{'
-- print ' switch (identifier) {'
-- print ' case GL_TEXTURE:'
-- print ' case GL_FRAMEBUFFER:'
-- print ' case GL_RENDERBUFFER:'
-- print ' case GL_SAMPLER:'
-- print ' case GL_TRANSFORM_FEEDBACK:'
-- print ' return true;'
-- print ' case GL_BUFFER:'
-- print ' identifier = GL_BUFFER_OBJECT_EXT;'
-- print ' return true;'
-- print ' case GL_SHADER:'
-- print ' identifier = GL_SHADER_OBJECT_EXT;'
-- print ' return true;'
-- print ' case GL_PROGRAM:'
-- print ' identifier = GL_PROGRAM_OBJECT_EXT;'
-- print ' return true;'
-- print ' case GL_VERTEX_ARRAY:'
-- print ' identifier = GL_VERTEX_ARRAY_OBJECT_EXT;'
-- print ' return true;'
-- print ' case GL_QUERY:'
-- print ' identifier = GL_QUERY_OBJECT_EXT;'
-- print ' return true;'
-- print ' case GL_PROGRAM_PIPELINE:'
-- print ' identifier = GL_PROGRAM_PIPELINE_OBJECT_EXT;'
-- print ' return true;'
-- print ' default:'
-- print ' return false;'
-- print ' }'
-- print '}'
-- print
-+ print()
-+ print('#elif defined(__APPLE__)')
-+ print()
-+ print('static inline bool')
-+ print('translateDebugLabelIdentifier(GLenum & identifier)')
-+ print('{')
-+ print(' switch (identifier) {')
-+ print(' case GL_TEXTURE:')
-+ print(' case GL_FRAMEBUFFER:')
-+ print(' case GL_RENDERBUFFER:')
-+ print(' case GL_SAMPLER:')
-+ print(' case GL_TRANSFORM_FEEDBACK:')
-+ print(' return true;')
-+ print(' case GL_BUFFER:')
-+ print(' identifier = GL_BUFFER_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' case GL_SHADER:')
-+ print(' identifier = GL_SHADER_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' case GL_PROGRAM:')
-+ print(' identifier = GL_PROGRAM_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' case GL_VERTEX_ARRAY:')
-+ print(' identifier = GL_VERTEX_ARRAY_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' case GL_QUERY:')
-+ print(' identifier = GL_QUERY_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' case GL_PROGRAM_PIPELINE:')
-+ print(' identifier = GL_PROGRAM_PIPELINE_OBJECT_EXT;')
-+ print(' return true;')
-+ print(' default:')
-+ print(' return false;')
-+ print(' }')
-+ print('}')
-+ print()
- dispatcher.dispatchModuleImpl(cglapi)
-- print
-- print '#elif defined(HAVE_X11)'
-- print
-+ print()
-+ print('#elif defined(HAVE_X11)')
-+ print()
- dispatcher.dispatchModuleImpl(glxapi)
-- print
-- print '#endif'
-- print
-+ print()
-+ print('#endif')
-+ print()
- dispatcher.dispatchModuleImpl(glapi)
-- print
-+ print()
-diff --git a/retrace/CMakeLists.txt b/retrace/CMakeLists.txt
-index c0c4f316..2475abb8 100644
---- a/retrace/CMakeLists.txt
-+++ b/retrace/CMakeLists.txt
-@@ -14,7 +14,7 @@ add_definitions (-DRETRACE)
-
- add_custom_command (
- OUTPUT glretrace_gl.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glretrace_gl.cpp
- DEPENDS
- glretrace.py
- retrace.py
-@@ -25,7 +25,7 @@ add_custom_command (
-
- add_custom_command (
- OUTPUT glstate_params.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate_params.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glstate_params.py > ${CMAKE_CURRENT_BINARY_DIR}/glstate_params.cpp
- DEPENDS
- glstate_params.py
- ${CMAKE_SOURCE_DIR}/specs/glparams.py
-@@ -273,7 +273,7 @@ if (WIN32)
- include_directories (BEFORE SYSTEM ${DirectX_D3D_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3dretrace_ddraw.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_ddraw.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_ddraw.cpp
- DEPENDS
- ddrawretrace.py
- dllretrace.py
-@@ -306,7 +306,7 @@ if (WIN32)
- endif ()
- add_custom_command (
- OUTPUT d3dretrace_d3d8.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9retrace.py d3d8 ${HAVE_D3D8} > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_d3d8.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9retrace.py d3d8 ${HAVE_D3D8} > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_d3d8.cpp
- DEPENDS
- d3d9retrace.py
- dllretrace.py
-@@ -327,7 +327,7 @@ if (WIN32)
- endif ()
- add_custom_command (
- OUTPUT d3dretrace_d3d9.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9retrace.py d3d9 ${HAVE_D3D9} > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_d3d9.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9retrace.py d3d9 ${HAVE_D3D9} > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_d3d9.cpp
- DEPENDS
- d3d9retrace.py
- dllretrace.py
-@@ -359,7 +359,7 @@ if (WIN32)
- )
- add_custom_command (
- OUTPUT dxgistate_so.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgistate_so.py > ${CMAKE_CURRENT_BINARY_DIR}/dxgistate_so.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgistate_so.py > ${CMAKE_CURRENT_BINARY_DIR}/dxgistate_so.cpp
- DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/dxgistate_so.py
- ${CMAKE_SOURCE_DIR}/specs/d3d11.py
-@@ -372,7 +372,7 @@ if (WIN32)
- )
- add_custom_command (
- OUTPUT d3dretrace_dxgi.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgiretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_dxgi.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgiretrace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3dretrace_dxgi.cpp
- DEPENDS
- dxgiretrace.py
- dllretrace.py
-diff --git a/retrace/d3d9retrace.py b/retrace/d3d9retrace.py
-index 7313acc9..22364476 100644
---- a/retrace/d3d9retrace.py
-+++ b/retrace/d3d9retrace.py
-@@ -35,32 +35,32 @@ from specs.stdapi import API
- class D3DRetracer(Retracer):
-
- def retraceApi(self, api):
-- print '// Swizzling mapping for lock addresses'
-- print 'typedef std::pair<void *, UINT> MappingKey;'
-- print 'static std::map<MappingKey, void *> _maps;'
-- print
-+ print('// Swizzling mapping for lock addresses')
-+ print('typedef std::pair<void *, UINT> MappingKey;')
-+ print('static std::map<MappingKey, void *> _maps;')
-+ print()
-
- Retracer.retraceApi(self, api)
-
- def invokeFunction(self, function):
- if function.name in ('Direct3DCreate9', 'Direct3DCreate9Ex'):
-- print 'if (retrace::debug >= 2 && !g_szD3D9DllName && LoadLibraryA("d3d9d.dll")) {'
-- print ' /*'
-- print ' * D3D9D only works for simple applications, it will often report bogus errors'
-- print ' * on complex traces, or traces which use unofficial D3D9 features.'
-- print ' */'
-- print ' g_szD3D9DllName = "d3d9d.dll";'
-- print ' SDKVersion |= 0x80000000;'
-- print '} else {'
-- print ' SDKVersion &= ~0x80000000;'
-- print '}'
-+ print('if (retrace::debug >= 2 && !g_szD3D9DllName && LoadLibraryA("d3d9d.dll")) {')
-+ print(' /*')
-+ print(' * D3D9D only works for simple applications, it will often report bogus errors')
-+ print(' * on complex traces, or traces which use unofficial D3D9 features.')
-+ print(' */')
-+ print(' g_szD3D9DllName = "d3d9d.dll";')
-+ print(' SDKVersion |= 0x80000000;')
-+ print('} else {')
-+ print(' SDKVersion &= ~0x80000000;')
-+ print('}')
-
- # d3d8d.dll can be found in the Aug 2007 DXSDK. It works on XP, but
- # not on Windows 7.
- if function.name in ('Direct3DCreate8'):
-- print 'if (retrace::debug >= 2 && !g_szD3D8DllName && LoadLibraryA("d3d8d.dll")) {'
-- print ' g_szD3D8DllName = "d3d8d.dll";'
-- print '}'
-+ print('if (retrace::debug >= 2 && !g_szD3D8DllName && LoadLibraryA("d3d8d.dll")) {')
-+ print(' g_szD3D8DllName = "d3d8d.dll";')
-+ print('}')
-
- Retracer.invokeFunction(self, function)
-
-@@ -73,37 +73,37 @@ class D3DRetracer(Retracer):
- # keep track of the last used device for state dumping
- if interface.name in ('IDirect3DDevice9', 'IDirect3DDevice9Ex'):
- if method.name == 'Release':
-- print r' if (call.ret->toUInt() == 0) {'
-- print r' d3d9Dumper.unbindDevice(_this);'
-- print r' }'
-+ print(r' if (call.ret->toUInt() == 0) {')
-+ print(r' d3d9Dumper.unbindDevice(_this);')
-+ print(r' }')
- else:
-- print r' d3d9Dumper.bindDevice(_this);'
-+ print(r' d3d9Dumper.bindDevice(_this);')
- if interface.name in ('IDirect3DDevice8', 'IDirect3DDevice8Ex'):
- if method.name == 'Release':
-- print r' if (call.ret->toUInt() == 0) {'
-- print r' d3d8Dumper.unbindDevice(_this);'
-- print r' }'
-+ print(r' if (call.ret->toUInt() == 0) {')
-+ print(r' d3d8Dumper.unbindDevice(_this);')
-+ print(r' }')
- else:
-- print r' d3d8Dumper.bindDevice(_this);'
-+ print(r' d3d8Dumper.bindDevice(_this);')
-
- # create windows as neccessary
- if method.name in ('CreateDevice', 'CreateDeviceEx', 'CreateAdditionalSwapChain'):
-- print r' HWND hWnd = d3dretrace::createWindow(pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight);'
-- print r' pPresentationParameters->hDeviceWindow = hWnd;'
-+ print(r' HWND hWnd = d3dretrace::createWindow(pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight);')
-+ print(r' pPresentationParameters->hDeviceWindow = hWnd;')
- if 'hFocusWindow' in method.argNames():
-- print r' hFocusWindow = hWnd;'
-+ print(r' hFocusWindow = hWnd;')
-
- # force windowed mode
-- print r' if (retrace::forceWindowed) {'
-- print r' pPresentationParameters->Windowed = TRUE;'
-- print r' pPresentationParameters->FullScreen_RefreshRateInHz = 0;'
-+ print(r' if (retrace::forceWindowed) {')
-+ print(r' pPresentationParameters->Windowed = TRUE;')
-+ print(r' pPresentationParameters->FullScreen_RefreshRateInHz = 0;')
- if interface.name.startswith('IDirect3D8'):
-- print r' pPresentationParameters->FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;'
-- print r' }'
-+ print(r' pPresentationParameters->FullScreen_PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;')
-+ print(r' }')
- if 'BehaviorFlags' in method.argNames():
-- print r' if (retrace::dumpingState) {'
-- print r' BehaviorFlags &= ~D3DCREATE_PUREDEVICE;'
-- print r' }'
-+ print(r' if (retrace::dumpingState) {')
-+ print(r' BehaviorFlags &= ~D3DCREATE_PUREDEVICE;')
-+ print(r' }')
-
- # On D3D8, ensure we use BackBufferFormat compatible with the
- # current DisplayFormat.
-@@ -113,76 +113,76 @@ class D3DRetracer(Retracer):
- # valid values for BackBufferFormat include D3DFMT_X1R5G5B5 and
- # D3DFMT_A1R5G5B5, but exclude D3DFMT_R5G6B5.
- if interface.name.startswith('IDirect3D8'):
-- print r' if (pPresentationParameters->Windowed) {'
-- print r' D3DDISPLAYMODE Mode;'
-- print r' HRESULT hr;'
-- print r' hr = _this->GetAdapterDisplayMode(Adapter, &Mode);'
-- print r' assert(SUCCEEDED(hr));'
-- print r' hr = _this->CheckDeviceType(Adapter, DeviceType, Mode.Format, pPresentationParameters->BackBufferFormat, pPresentationParameters->Windowed);'
-- print r' if (hr == D3DERR_NOTAVAILABLE) {'
-- print r' retrace::warning(call) << "forcing back buffer format to match display mode format\n";'
-- print r' pPresentationParameters->BackBufferFormat = Mode.Format;'
-- print r' }'
-- print r' }'
-+ print(r' if (pPresentationParameters->Windowed) {')
-+ print(r' D3DDISPLAYMODE Mode;')
-+ print(r' HRESULT hr;')
-+ print(r' hr = _this->GetAdapterDisplayMode(Adapter, &Mode);')
-+ print(r' assert(SUCCEEDED(hr));')
-+ print(r' hr = _this->CheckDeviceType(Adapter, DeviceType, Mode.Format, pPresentationParameters->BackBufferFormat, pPresentationParameters->Windowed);')
-+ print(r' if (hr == D3DERR_NOTAVAILABLE) {')
-+ print(r' retrace::warning(call) << "forcing back buffer format to match display mode format\n";')
-+ print(r' pPresentationParameters->BackBufferFormat = Mode.Format;')
-+ print(r' }')
-+ print(r' }')
-
- if method.name in self.createDeviceMethodNames:
- # override the device type
-- print r' switch (retrace::driver) {'
-- print r' case retrace::DRIVER_HARDWARE:'
-- print r' DeviceType = D3DDEVTYPE_HAL;'
-- print r' break;'
-- print r' case retrace::DRIVER_SOFTWARE:'
-- print r' case retrace::DRIVER_REFERENCE:'
-- print r' DeviceType = D3DDEVTYPE_REF;'
-- print r' break;'
-- print r' case retrace::DRIVER_NULL:'
-+ print(r' switch (retrace::driver) {')
-+ print(r' case retrace::DRIVER_HARDWARE:')
-+ print(r' DeviceType = D3DDEVTYPE_HAL;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_SOFTWARE:')
-+ print(r' case retrace::DRIVER_REFERENCE:')
-+ print(r' DeviceType = D3DDEVTYPE_REF;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_NULL:')
- if interface.name.startswith('IDirect3D9'):
-- print r' DeviceType = D3DDEVTYPE_NULLREF;'
-+ print(r' DeviceType = D3DDEVTYPE_NULLREF;')
- else:
-- print r' retrace::warning(call) << "null driver not supported\n";'
-- print r' break;'
-- print r' case retrace::DRIVER_MODULE:'
-- print r' retrace::warning(call) << "driver module not supported\n";'
-- print r' break;'
-- print r' default:'
-- print r' assert(0);'
-- print r' /* fall-through */'
-- print r' case retrace::DRIVER_DEFAULT:'
-- print r' break;'
-- print r' }'
-+ print(r' retrace::warning(call) << "null driver not supported\n";')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_MODULE:')
-+ print(r' retrace::warning(call) << "driver module not supported\n";')
-+ print(r' break;')
-+ print(r' default:')
-+ print(r' assert(0);')
-+ print(r' /* fall-through */')
-+ print(r' case retrace::DRIVER_DEFAULT:')
-+ print(r' break;')
-+ print(r' }')
-
- if method.name in ('Reset', 'ResetEx'):
- # force windowed mode
-- print r' if (retrace::forceWindowed) {'
-- print r' pPresentationParameters->Windowed = TRUE;'
-- print r' pPresentationParameters->FullScreen_RefreshRateInHz = 0;'
-- print r' }'
-+ print(r' if (retrace::forceWindowed) {')
-+ print(r' pPresentationParameters->Windowed = TRUE;')
-+ print(r' pPresentationParameters->FullScreen_RefreshRateInHz = 0;')
-+ print(r' }')
- # resize window
-- print r' if (pPresentationParameters->Windowed) {'
-- print r' d3dretrace::resizeWindow(pPresentationParameters->hDeviceWindow, pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight);'
-- print r' }'
-+ print(r' if (pPresentationParameters->Windowed) {')
-+ print(r' d3dretrace::resizeWindow(pPresentationParameters->hDeviceWindow, pPresentationParameters->BackBufferWidth, pPresentationParameters->BackBufferHeight);')
-+ print(r' }')
-
- # notify frame has been completed
- if method.name in ('Present', 'PresentEx'):
- if interface.name.startswith('IDirect3DSwapChain9'):
-- print r' d3d9scDumper.bindDevice(_this);'
-- print r' retrace::frameComplete(call);'
-- print r' hDestWindowOverride = NULL;'
-+ print(r' d3d9scDumper.bindDevice(_this);')
-+ print(r' retrace::frameComplete(call);')
-+ print(r' hDestWindowOverride = NULL;')
-
- # Ensure textures can be locked when dumping
- # TODO: Pre-check with CheckDeviceFormat
- if method.name in ('CreateTexture', 'CreateCubeTexture', 'CreateVolumeTexture'):
-- print r' if (retrace::dumpingState &&'
-- print r' Pool == D3DPOOL_DEFAULT &&'
-- print r' !(Usage & (D3DUSAGE_RENDERTARGET|D3DUSAGE_DEPTHSTENCIL))) {'
-- print r' Usage |= D3DUSAGE_DYNAMIC;'
-- print r' }'
-+ print(r' if (retrace::dumpingState &&')
-+ print(r' Pool == D3DPOOL_DEFAULT &&')
-+ print(r' !(Usage & (D3DUSAGE_RENDERTARGET|D3DUSAGE_DEPTHSTENCIL))) {')
-+ print(r' Usage |= D3DUSAGE_DYNAMIC;')
-+ print(r' }')
-
- if 'pSharedHandle' in method.argNames():
-- print r' if (pSharedHandle) {'
-- print r' retrace::warning(call) << "shared surfaces unsupported\n";'
-- print r' pSharedHandle = NULL;'
-- print r' }'
-+ print(r' if (pSharedHandle) {')
-+ print(r' retrace::warning(call) << "shared surfaces unsupported\n";')
-+ print(r' pSharedHandle = NULL;')
-+ print(r' }')
-
- if method.name in ('Lock', 'LockRect', 'LockBox'):
- # Reset _DONOTWAIT flags. Otherwise they may fail, and we have no
-@@ -190,7 +190,7 @@ class D3DRetracer(Retracer):
- mapFlagsArg = method.getArgByName('Flags')
- for flag in mapFlagsArg.type.values:
- if flag.endswith('_DONOTWAIT'):
-- print r' Flags &= ~%s;' % flag
-+ print(r' Flags &= ~%s;' % flag)
-
- Retracer.invokeInterfaceMethod(self, interface, method)
-
-@@ -201,7 +201,7 @@ class D3DRetracer(Retracer):
-
- # process events after presents
- if method.name == 'Present':
-- print r' d3dretrace::processEvents();'
-+ print(r' d3dretrace::processEvents();')
-
- def mapping_subkey():
- if 'Level' in method.argNames():
-@@ -210,35 +210,35 @@ class D3DRetracer(Retracer):
- return ('0',)
-
- if method.name in ('Lock', 'LockRect', 'LockBox'):
-- print ' VOID *_pbData = NULL;'
-- print ' size_t _MappedSize = 0;'
-- print ' if (!(Flags & D3DLOCK_READONLY)) {'
-- print ' _getMapInfo(_this, %s, _pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
-- print ' }'
-- print ' if (_MappedSize) {'
-- print ' _maps[MappingKey(_this, %s)] = _pbData;' % mapping_subkey()
-+ print(' VOID *_pbData = NULL;')
-+ print(' size_t _MappedSize = 0;')
-+ print(' if (!(Flags & D3DLOCK_READONLY)) {')
-+ print(' _getMapInfo(_this, %s, _pbData, _MappedSize);' % ', '.join(method.argNames()[:-1]))
-+ print(' }')
-+ print(' if (_MappedSize) {')
-+ print(' _maps[MappingKey(_this, %s)] = _pbData;' % mapping_subkey())
- self.checkPitchMismatch(method)
-- print ' } else {'
-- print ' return;'
-- print ' }'
-+ print(' } else {')
-+ print(' return;')
-+ print(' }')
-
- if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
-- print ' VOID *_pbData = 0;'
-- print ' MappingKey _mappingKey(_this, %s);' % mapping_subkey()
-- print ' _pbData = _maps[_mappingKey];'
-- print ' if (_pbData) {'
-- print ' retrace::delRegionByPointer(_pbData);'
-- print ' _maps[_mappingKey] = 0;'
-- print ' }'
-+ print(' VOID *_pbData = 0;')
-+ print(' MappingKey _mappingKey(_this, %s);' % mapping_subkey())
-+ print(' _pbData = _maps[_mappingKey];')
-+ print(' if (_pbData) {')
-+ print(' retrace::delRegionByPointer(_pbData);')
-+ print(' _maps[_mappingKey] = 0;')
-+ print(' }')
-
-
- def main():
-- print r'#include <string.h>'
-- print
-- print r'#include <iostream>'
-- print
-- print r'#include "d3dretrace.hpp"'
-- print
-+ print(r'#include <string.h>')
-+ print()
-+ print(r'#include <iostream>')
-+ print()
-+ print(r'#include "d3dretrace.hpp"')
-+ print()
-
- moduleName = sys.argv[1]
- support = int(sys.argv[2])
-@@ -249,24 +249,24 @@ def main():
- if moduleName == 'd3d9':
- from specs.d3d9 import d3d9, d3dperf
- from specs.dxva2 import dxva2
-- print r'#include "d3d9imports.hpp"'
-- print r'#include "d3d9size.hpp"'
-- print r'#include "dxva2imports.hpp"'
-+ print(r'#include "d3d9imports.hpp"')
-+ print(r'#include "d3d9size.hpp"')
-+ print(r'#include "dxva2imports.hpp"')
- d3d9.mergeModule(d3dperf)
- api.addModule(d3d9)
- api.addModule(dxva2)
-- print
-- print '''static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;'''
-- print '''static d3dretrace::D3DDumper<IDirect3DSwapChain9> d3d9scDumper;'''
-- print
-+ print()
-+ print('''static d3dretrace::D3DDumper<IDirect3DDevice9> d3d9Dumper;''')
-+ print('''static d3dretrace::D3DDumper<IDirect3DSwapChain9> d3d9scDumper;''')
-+ print()
- elif moduleName == 'd3d8':
- from specs.d3d8 import d3d8
-- print r'#include "d3d8imports.hpp"'
-- print r'#include "d3d8size.hpp"'
-+ print(r'#include "d3d8imports.hpp"')
-+ print(r'#include "d3d8size.hpp"')
- api.addModule(d3d8)
-- print
-- print '''static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;'''
-- print
-+ print()
-+ print('''static d3dretrace::D3DDumper<IDirect3DDevice8> d3d8Dumper;''')
-+ print()
- else:
- assert False
-
-diff --git a/retrace/ddrawretrace.py b/retrace/ddrawretrace.py
-index 4f2ff944..863283fd 100644
---- a/retrace/ddrawretrace.py
-+++ b/retrace/ddrawretrace.py
-@@ -37,12 +37,12 @@ from specs.ddraw import DDCREATE_LPGUID
- class D3DRetracer(Retracer):
-
- def retraceApi(self, api):
-- print '// Swizzling mapping for lock addresses'
-- print 'static std::map<void *, void *> _maps;'
-- print
-+ print('// Swizzling mapping for lock addresses')
-+ print('static std::map<void *, void *> _maps;')
-+ print()
- # TODO: Keep a table of windows
-- print 'static HWND g_hWnd;'
-- print
-+ print('static HWND g_hWnd;')
-+ print()
-
- Retracer.retraceApi(self, api)
-
-@@ -50,20 +50,20 @@ class D3DRetracer(Retracer):
- # keep track of the last used device for state dumping
- if interface.name in ('IDirect3DDevice7',):
- if method.name == 'Release':
-- print r' if (call.ret->toUInt() == 0) {'
-- print r' d3d7Dumper.unbindDevice(_this);'
-- print r' }'
-+ print(r' if (call.ret->toUInt() == 0) {')
-+ print(r' d3d7Dumper.unbindDevice(_this);')
-+ print(r' }')
- else:
-- print r' d3d7Dumper.bindDevice(_this);'
-+ print(r' d3d7Dumper.bindDevice(_this);')
-
- # create windows as neccessary
- hWndArg = method.getArgByType(HWND)
- if hWndArg is not None:
- # FIXME: Try to guess the window size (e.g., from IDirectDrawSurface7::Blt)
-- print r' if (!g_hWnd) {'
-- print r' g_hWnd = d3dretrace::createWindow(512, 512);'
-- print r' }'
-- print r' %s = g_hWnd;' % hWndArg.name
-+ print(r' if (!g_hWnd) {')
-+ print(r' g_hWnd = d3dretrace::createWindow(512, 512);')
-+ print(r' }')
-+ print(r' %s = g_hWnd;' % hWndArg.name)
-
-
- if method.name == 'Lock':
-@@ -71,74 +71,74 @@ class D3DRetracer(Retracer):
- # way to cope with it (other than retry).
- mapFlagsArg = method.getArgByName('dwFlags')
- if mapFlagsArg is not None:
-- print r' dwFlags &= DDLOCK_DONOTWAIT;'
-- print r' dwFlags |= DDLOCK_WAIT;'
-+ print(r' dwFlags &= DDLOCK_DONOTWAIT;')
-+ print(r' dwFlags |= DDLOCK_WAIT;')
-
- Retracer.invokeInterfaceMethod(self, interface, method)
-
- if method.name == 'CreateDevice':
-- print r' if (FAILED(_result)) {'
-- print r' exit(1);'
-- print r' }'
-+ print(r' if (FAILED(_result)) {')
-+ print(r' exit(1);')
-+ print(r' }')
-
- # notify frame has been completed
- # process events after presents
- if interface.name == 'IDirectDrawSurface7' and method.name == 'Blt':
-- print r' DDSCAPS2 ddsCaps;'
-- print r' if (SUCCEEDED(_this->GetCaps(&ddsCaps)) &&'
-- print r' (ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) {'
-- print r' retrace::frameComplete(call);'
-- print r' d3dretrace::processEvents();'
-- print r' }'
-+ print(r' DDSCAPS2 ddsCaps;')
-+ print(r' if (SUCCEEDED(_this->GetCaps(&ddsCaps)) &&')
-+ print(r' (ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)) {')
-+ print(r' retrace::frameComplete(call);')
-+ print(r' d3dretrace::processEvents();')
-+ print(r' }')
-
- if method.name == 'Lock':
-- print ' VOID *_pbData = NULL;'
-- print ' size_t _MappedSize = 0;'
-+ print(' VOID *_pbData = NULL;')
-+ print(' size_t _MappedSize = 0;')
- # FIXME: determine the mapping size
- #print ' _getMapInfo(_this, %s, _pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
-- print ' if (_MappedSize) {'
-- print ' _maps[_this] = _pbData;'
-+ print(' if (_MappedSize) {')
-+ print(' _maps[_this] = _pbData;')
- # TODO: check pitches match
-- print ' } else {'
-- print ' return;'
-- print ' }'
-+ print(' } else {')
-+ print(' return;')
-+ print(' }')
-
- if method.name == 'Unlock':
-- print ' VOID *_pbData = 0;'
-- print ' _pbData = _maps[_this];'
-- print ' if (_pbData) {'
-- print ' retrace::delRegionByPointer(_pbData);'
-- print ' _maps[_this] = 0;'
-- print ' }'
-+ print(' VOID *_pbData = 0;')
-+ print(' _pbData = _maps[_this];')
-+ print(' if (_pbData) {')
-+ print(' retrace::delRegionByPointer(_pbData);')
-+ print(' _maps[_this] = 0;')
-+ print(' }')
-
- def extractArg(self, function, arg, arg_type, lvalue, rvalue):
- # Handle DDCREATE_* flags
- if arg.type is DDCREATE_LPGUID:
-- print ' if (%s.toArray()) {' % rvalue
-+ print(' if (%s.toArray()) {' % rvalue)
- Retracer.extractArg(self, function, arg, arg_type, lvalue, rvalue)
-- print ' } else {'
-- print ' %s = static_cast<%s>(%s.toPointer());' % (lvalue, arg_type, rvalue)
-- print ' }'
-+ print(' } else {')
-+ print(' %s = static_cast<%s>(%s.toPointer());' % (lvalue, arg_type, rvalue))
-+ print(' }')
- return
-
- Retracer.extractArg(self, function, arg, arg_type, lvalue, rvalue)
-
-
- def main():
-- print r'#include <string.h>'
-- print
-- print r'#include <iostream>'
-- print
-- print r'#include "d3dretrace.hpp"'
-- print
-+ print(r'#include <string.h>')
-+ print()
-+ print(r'#include <iostream>')
-+ print()
-+ print(r'#include "d3dretrace.hpp"')
-+ print()
-
- api = API()
-
-- print r'#include "d3dimports.hpp"'
-+ print(r'#include "d3dimports.hpp"')
- api.addModule(ddraw)
-- print
-- print '''static d3dretrace::D3DDumper<IDirect3DDevice7> d3d7Dumper;'''
-- print
-+ print()
-+ print('''static d3dretrace::D3DDumper<IDirect3DDevice7> d3d7Dumper;''')
-+ print()
-
- retracer = D3DRetracer()
- retracer.table_name = 'd3dretrace::ddraw_callbacks'
-diff --git a/retrace/dllretrace.py b/retrace/dllretrace.py
-index c818b0a9..ad9db9a4 100644
---- a/retrace/dllretrace.py
-+++ b/retrace/dllretrace.py
-@@ -33,29 +33,29 @@ class DllDispatcher(Dispatcher):
-
- def dispatchModule(self, module):
- tag = module.name.upper()
-- print r'const char *g_sz%sDllName = NULL;' % (tag,)
-- print r'HMODULE g_h%sModule = NULL;' % (tag,)
-- print r''
-- print r'static PROC'
-- print r'_get%sProcAddress(LPCSTR lpProcName) {' % tag
-- print r' if (!g_h%sModule) {' % tag
-- print r' if (g_sz%sDllName) {' % tag
-- print r' g_h%sModule = LoadLibraryA(g_sz%sDllName);' % (tag, tag)
-- print r' if (!g_h%sModule) {' % tag
-- print r' os::log("warning: failed to load %%s\n", g_sz%sDllName);' % tag
-- print r' }'
-- print r' }'
-- print r' if (!g_h%sModule) {' % tag
-- print r' g_h%sModule = LoadLibraryA("%s.dll");' % (tag, module.name)
-- print r' }'
-- print r' if (!g_h%sModule) {' % tag
-- print r' os::log("error: failed to load %s.dll\n");' % module.name
-- print r' exit(1);'
-- print r' }'
-- print r' }'
-- print r' return GetProcAddress(g_h%sModule, lpProcName);' % tag
-- print r'}'
-- print r''
-+ print(r'const char *g_sz%sDllName = NULL;' % (tag,))
-+ print(r'HMODULE g_h%sModule = NULL;' % (tag,))
-+ print(r'')
-+ print(r'static PROC')
-+ print(r'_get%sProcAddress(LPCSTR lpProcName) {' % tag)
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' if (g_sz%sDllName) {' % tag)
-+ print(r' g_h%sModule = LoadLibraryA(g_sz%sDllName);' % (tag, tag))
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' os::log("warning: failed to load %%s\n", g_sz%sDllName);' % tag)
-+ print(r' }')
-+ print(r' }')
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' g_h%sModule = LoadLibraryA("%s.dll");' % (tag, module.name))
-+ print(r' }')
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' os::log("error: failed to load %s.dll\n");' % module.name)
-+ print(r' exit(1);')
-+ print(r' }')
-+ print(r' }')
-+ print(r' return GetProcAddress(g_h%sModule, lpProcName);' % tag)
-+ print(r'}')
-+ print(r'')
-
- Dispatcher.dispatchModule(self, module)
-
-diff --git a/retrace/dxgiretrace.py b/retrace/dxgiretrace.py
-index 799e3df9..8986a767 100755
---- a/retrace/dxgiretrace.py
-+++ b/retrace/dxgiretrace.py
-@@ -40,10 +40,10 @@ from specs.d3d11 import d3d11
- class D3DRetracer(Retracer):
-
- def retraceApi(self, api):
-- print '// Swizzling mapping for lock addresses, mapping a (pDeviceContext, pResource, Subresource) -> void *'
-- print 'typedef std::pair< IUnknown *, UINT > SubresourceKey;'
-- print 'static std::map< IUnknown *, std::map< SubresourceKey, void * > > g_Maps;'
-- print
-+ print('// Swizzling mapping for lock addresses, mapping a (pDeviceContext, pResource, Subresource) -> void *')
-+ print('typedef std::pair< IUnknown *, UINT > SubresourceKey;')
-+ print('static std::map< IUnknown *, std::map< SubresourceKey, void * > > g_Maps;')
-+ print()
- self.table_name = 'd3dretrace::dxgi_callbacks'
-
- Retracer.retraceApi(self, api)
-@@ -61,41 +61,41 @@ class D3DRetracer(Retracer):
- if function.name in self.createDeviceFunctionNames:
- # create windows as neccessary
- if 'pSwapChainDesc' in function.argNames():
-- print r' d3dretrace::createWindowForSwapChain(pSwapChainDesc);'
-+ print(r' d3dretrace::createWindowForSwapChain(pSwapChainDesc);')
-
- # Compensate for the fact we don't trace DXGI object creation
- if function.name.startswith('D3D11CreateDevice'):
-- print r' if (DriverType == D3D_DRIVER_TYPE_UNKNOWN && !pAdapter) {'
-- print r' DriverType = D3D_DRIVER_TYPE_HARDWARE;'
-- print r' }'
-+ print(r' if (DriverType == D3D_DRIVER_TYPE_UNKNOWN && !pAdapter) {')
-+ print(r' DriverType = D3D_DRIVER_TYPE_HARDWARE;')
-+ print(r' }')
-
- if function.name.startswith('D3D10CreateDevice'):
- # Toggle debugging
-- print r' Flags &= ~D3D10_CREATE_DEVICE_DEBUG;'
-- print r' if (retrace::debug) {'
-- print r' HMODULE hD3d10SdkLayers = LoadLibraryA("d3d10sdklayers");'
-- print r' if (hD3d10SdkLayers) {'
-- print r' FreeLibrary(hD3d10SdkLayers);'
-- print r' Flags |= D3D10_CREATE_DEVICE_DEBUG;'
-- print r' } else {'
-- print r' retrace::warning(call) << "Direct3D 10.x SDK Debug Layer (d3d10sdklayers.dll) not available, continuing without debug output\n";'
-- print r' }'
-- print r' }'
-+ print(r' Flags &= ~D3D10_CREATE_DEVICE_DEBUG;')
-+ print(r' if (retrace::debug) {')
-+ print(r' HMODULE hD3d10SdkLayers = LoadLibraryA("d3d10sdklayers");')
-+ print(r' if (hD3d10SdkLayers) {')
-+ print(r' FreeLibrary(hD3d10SdkLayers);')
-+ print(r' Flags |= D3D10_CREATE_DEVICE_DEBUG;')
-+ print(r' } else {')
-+ print(r' retrace::warning(call) << "Direct3D 10.x SDK Debug Layer (d3d10sdklayers.dll) not available, continuing without debug output\n";')
-+ print(r' }')
-+ print(r' }')
-
- # Force driver
- self.forceDriver('D3D10_DRIVER_TYPE')
-
- if function.name.startswith('D3D11CreateDevice'):
- # Toggle debugging
-- print r' Flags &= ~D3D11_CREATE_DEVICE_DEBUG;'
-- print r' if (retrace::debug) {'
-- print r' HRESULT hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_NULL, 0, D3D11_CREATE_DEVICE_DEBUG, NULL, 0, D3D11_SDK_VERSION, NULL, NULL, NULL);'
-- print r' if (SUCCEEDED(hr)) {'
-- print r' Flags |= D3D11_CREATE_DEVICE_DEBUG;'
-- print r' } else {'
-- print r' retrace::warning(call) << "Direct3D 11.x SDK Debug Layer (d3d11*sdklayers.dll) not available, continuing without debug output\n";'
-- print r' }'
-- print r' }'
-+ print(r' Flags &= ~D3D11_CREATE_DEVICE_DEBUG;')
-+ print(r' if (retrace::debug) {')
-+ print(r' HRESULT hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_NULL, 0, D3D11_CREATE_DEVICE_DEBUG, NULL, 0, D3D11_SDK_VERSION, NULL, NULL, NULL);')
-+ print(r' if (SUCCEEDED(hr)) {')
-+ print(r' Flags |= D3D11_CREATE_DEVICE_DEBUG;')
-+ print(r' } else {')
-+ print(r' retrace::warning(call) << "Direct3D 11.x SDK Debug Layer (d3d11*sdklayers.dll) not available, continuing without debug output\n";')
-+ print(r' }')
-+ print(r' }')
-
- # Force driver
- self.forceDriver('D3D_DRIVER_TYPE')
-@@ -108,15 +108,15 @@ class D3DRetracer(Retracer):
- if interface is not None:
- getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
- if getDeviceRemovedReasonMethod is not None:
-- print r' if (FAILED(_result)) {'
-- print r' retrace::failed(call, _result);'
-- print r' if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
-- print r' HRESULT _reason = _this->GetDeviceRemovedReason();'
-- print r' retrace::failed(call, _reason);'
-- print r' exit(1);'
-- print r' }'
-- print r' return;'
-- print r' }'
-+ print(r' if (FAILED(_result)) {')
-+ print(r' retrace::failed(call, _result);')
-+ print(r' if (_result == DXGI_ERROR_DEVICE_REMOVED) {')
-+ print(r' HRESULT _reason = _this->GetDeviceRemovedReason();')
-+ print(r' retrace::failed(call, _reason);')
-+ print(r' exit(1);')
-+ print(r' }')
-+ print(r' return;')
-+ print(r' }')
- return
-
- Retracer.checkResult(self, interface, methodOrFunction)
-@@ -124,112 +124,112 @@ class D3DRetracer(Retracer):
- def forceDriver(self, enum):
- # This can only work when pAdapter is NULL. For non-NULL pAdapter we
- # need to override inside the EnumAdapters call below
-- print r' if (pAdapter == NULL) {'
-- print r' switch (retrace::driver) {'
-- print r' case retrace::DRIVER_HARDWARE:'
-- print r' DriverType = %s_HARDWARE;' % enum
-- print r' Software = NULL;'
-- print r' break;'
-- print r' case retrace::DRIVER_SOFTWARE:'
-- print r' DriverType = %s_WARP;' % enum
-- print r' Software = NULL;'
-- print r' break;'
-- print r' case retrace::DRIVER_REFERENCE:'
-- print r' DriverType = %s_REFERENCE;' % enum
-- print r' Software = NULL;'
-- print r' break;'
-- print r' case retrace::DRIVER_NULL:'
-- print r' DriverType = %s_NULL;' % enum
-- print r' Software = NULL;'
-- print r' break;'
-- print r' case retrace::DRIVER_MODULE:'
-- print r' DriverType = %s_SOFTWARE;' % enum
-- print r' Software = LoadLibraryA(retrace::driverModule);'
-- print r' if (!Software) {'
-- print r' retrace::warning(call) << "failed to load " << retrace::driverModule << "\n";'
-- print r' }'
-- print r' break;'
-- print r' default:'
-- print r' assert(0);'
-- print r' /* fall-through */'
-- print r' case retrace::DRIVER_DEFAULT:'
-- print r' if (DriverType == %s_SOFTWARE) {' % enum
-- print r' Software = LoadLibraryA("d3d10warp");'
-- print r' if (!Software) {'
-- print r' retrace::warning(call) << "failed to load d3d10warp.dll\n";'
-- print r' }'
-- print r' }'
-- print r' break;'
-- print r' }'
-- print r' } else {'
-- print r' Software = NULL;'
-- print r' }'
-+ print(r' if (pAdapter == NULL) {')
-+ print(r' switch (retrace::driver) {')
-+ print(r' case retrace::DRIVER_HARDWARE:')
-+ print(r' DriverType = %s_HARDWARE;' % enum)
-+ print(r' Software = NULL;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_SOFTWARE:')
-+ print(r' DriverType = %s_WARP;' % enum)
-+ print(r' Software = NULL;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_REFERENCE:')
-+ print(r' DriverType = %s_REFERENCE;' % enum)
-+ print(r' Software = NULL;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_NULL:')
-+ print(r' DriverType = %s_NULL;' % enum)
-+ print(r' Software = NULL;')
-+ print(r' break;')
-+ print(r' case retrace::DRIVER_MODULE:')
-+ print(r' DriverType = %s_SOFTWARE;' % enum)
-+ print(r' Software = LoadLibraryA(retrace::driverModule);')
-+ print(r' if (!Software) {')
-+ print(r' retrace::warning(call) << "failed to load " << retrace::driverModule << "\n";')
-+ print(r' }')
-+ print(r' break;')
-+ print(r' default:')
-+ print(r' assert(0);')
-+ print(r' /* fall-through */')
-+ print(r' case retrace::DRIVER_DEFAULT:')
-+ print(r' if (DriverType == %s_SOFTWARE) {' % enum)
-+ print(r' Software = LoadLibraryA("d3d10warp");')
-+ print(r' if (!Software) {')
-+ print(r' retrace::warning(call) << "failed to load d3d10warp.dll\n";')
-+ print(r' }')
-+ print(r' }')
-+ print(r' break;')
-+ print(r' }')
-+ print(r' } else {')
-+ print(r' Software = NULL;')
-+ print(r' }')
-
- def invokeInterfaceMethod(self, interface, method):
- # keep track of the last used device for state dumping
- if interface.name in ('ID3D10Device', 'ID3D10Device1'):
- if method.name == 'Release':
-- print r' if (call.ret->toUInt() == 0) {'
-- print r' d3d10Dumper.unbindDevice(_this);'
-- print r' }'
-+ print(r' if (call.ret->toUInt() == 0) {')
-+ print(r' d3d10Dumper.unbindDevice(_this);')
-+ print(r' }')
- else:
-- print r' d3d10Dumper.bindDevice(_this);'
-+ print(r' d3d10Dumper.bindDevice(_this);')
- if interface.name.startswith('ID3D11DeviceContext'):
- if method.name == 'Release':
-- print r' if (call.ret->toUInt() == 0) {'
-- print r' d3d11Dumper.unbindDevice(_this);'
-- print r' }'
-+ print(r' if (call.ret->toUInt() == 0) {')
-+ print(r' d3d11Dumper.unbindDevice(_this);')
-+ print(r' }')
- else:
-- print r' if (_this->GetType() == D3D11_DEVICE_CONTEXT_IMMEDIATE) {'
-- print r' d3d11Dumper.bindDevice(_this);'
-- print r' }'
-+ print(r' if (_this->GetType() == D3D11_DEVICE_CONTEXT_IMMEDIATE) {')
-+ print(r' d3d11Dumper.bindDevice(_this);')
-+ print(r' }')
-
- # intercept private interfaces
- if method.name == 'QueryInterface':
-- print r' if (!d3dretrace::overrideQueryInterface(_this, riid, ppvObj, &_result)) {'
-+ print(r' if (!d3dretrace::overrideQueryInterface(_this, riid, ppvObj, &_result)) {')
- Retracer.invokeInterfaceMethod(self, interface, method)
-- print r' }'
-+ print(r' }')
- return
-
- # create windows as neccessary
- if method.name == 'CreateSwapChain':
-- print r' d3dretrace::createWindowForSwapChain(pDesc);'
-+ print(r' d3dretrace::createWindowForSwapChain(pDesc);')
- if method.name == 'CreateSwapChainForHwnd':
-- print r' WindowHandle = d3dretrace::createWindow(pDesc->Width, pDesc->Height);'
-- print r' // DXGI_SCALING_NONE is only supported on Win8 and beyond'
-- print r' if (pDesc->Scaling == DXGI_SCALING_NONE && !IsWindows8OrGreater()) {'
-- print r' pDesc->Scaling = DXGI_SCALING_STRETCH;'
-- print r' }'
-+ print(r' WindowHandle = d3dretrace::createWindow(pDesc->Width, pDesc->Height);')
-+ print(r' // DXGI_SCALING_NONE is only supported on Win8 and beyond')
-+ print(r' if (pDesc->Scaling == DXGI_SCALING_NONE && !IsWindows8OrGreater()) {')
-+ print(r' pDesc->Scaling = DXGI_SCALING_STRETCH;')
-+ print(r' }')
- if method.name == 'CreateSwapChainForComposition':
-- print r' HWND hWnd = d3dretrace::createWindow(pDesc->Width, pDesc->Height);'
-- print r' _result = _this->CreateSwapChainForHwnd(pDevice, hWnd, pDesc, NULL, pRestrictToOutput, ppSwapChain);'
-+ print(r' HWND hWnd = d3dretrace::createWindow(pDesc->Width, pDesc->Height);')
-+ print(r' _result = _this->CreateSwapChainForHwnd(pDevice, hWnd, pDesc, NULL, pRestrictToOutput, ppSwapChain);')
- self.checkResult(interface, method)
- return
-
- if method.name == 'SetFullscreenState':
-- print r' if (retrace::forceWindowed) {'
-- print r' Fullscreen = FALSE;'
-- print r' pTarget = NULL;'
-- print r' }'
-+ print(r' if (retrace::forceWindowed) {')
-+ print(r' Fullscreen = FALSE;')
-+ print(r' pTarget = NULL;')
-+ print(r' }')
-
- # notify frame has been completed
- if interface.name.startswith('IDXGISwapChain') and method.name.startswith('Present'):
- if interface.name.startswith('IDXGISwapChainDWM'):
-- print r' com_ptr<IDXGISwapChain> pSwapChain;'
-- print r' if (SUCCEEDED(_this->QueryInterface(IID_IDXGISwapChain, (void **) &pSwapChain))) {'
-- print r' dxgiDumper.bindDevice(pSwapChain);'
-- print r' } else {'
-- print r' assert(0);'
-- print r' }'
-+ print(r' com_ptr<IDXGISwapChain> pSwapChain;')
-+ print(r' if (SUCCEEDED(_this->QueryInterface(IID_IDXGISwapChain, (void **) &pSwapChain))) {')
-+ print(r' dxgiDumper.bindDevice(pSwapChain);')
-+ print(r' } else {')
-+ print(r' assert(0);')
-+ print(r' }')
- else:
-- print r' dxgiDumper.bindDevice(_this);'
-- print r' retrace::frameComplete(call);'
-+ print(r' dxgiDumper.bindDevice(_this);')
-+ print(r' retrace::frameComplete(call);')
-
- if 'pSharedResource' in method.argNames():
-- print r' if (pSharedResource) {'
-- print r' retrace::warning(call) << "shared surfaces unsupported\n";'
-- print r' pSharedResource = NULL;'
-- print r' }'
-+ print(r' if (pSharedResource) {')
-+ print(r' retrace::warning(call) << "shared surfaces unsupported\n";')
-+ print(r' pSharedResource = NULL;')
-+ print(r' }')
-
- # Force driver
- if interface.name.startswith('IDXGIFactory') and method.name.startswith('EnumAdapters'):
-@@ -260,31 +260,31 @@ class D3DRetracer(Retracer):
- return
-
- if interface.name.startswith('ID3D10Device') and method.name.startswith('OpenSharedResource'):
-- print r' retrace::warning(call) << "replacing shared resource with checker pattern\n";'
-- print r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);'
-+ print(r' retrace::warning(call) << "replacing shared resource with checker pattern\n";')
-+ print(r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);')
- self.checkResult(interface, method)
- return
- if interface.name.startswith('ID3D11Device') and method.name == 'OpenSharedResource':
- # Some applications (e.g., video playing in IE11) create shared resources within the same process.
- # TODO: Generalize to other OpenSharedResource variants
-- print r' retrace::map<HANDLE>::const_iterator it = _shared_handle_map.find(hResource);'
-- print r' if (it == _shared_handle_map.end()) {'
-- print r' retrace::warning(call) << "replacing shared resource with checker pattern\n";'
-- print r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);'
-+ print(r' retrace::map<HANDLE>::const_iterator it = _shared_handle_map.find(hResource);')
-+ print(r' if (it == _shared_handle_map.end()) {')
-+ print(r' retrace::warning(call) << "replacing shared resource with checker pattern\n";')
-+ print(r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);')
- self.checkResult(interface, method)
-- print r' } else {'
-- print r' hResource = it->second;'
-+ print(r' } else {')
-+ print(r' hResource = it->second;')
- Retracer.invokeInterfaceMethod(self, interface, method)
-- print r' }'
-+ print(r' }')
- return
- if interface.name.startswith('ID3D11Device') and method.name.startswith('OpenSharedResource'):
-- print r' retrace::warning(call) << "replacing shared resource with checker pattern\n";'
-- print r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);'
-+ print(r' retrace::warning(call) << "replacing shared resource with checker pattern\n";')
-+ print(r' _result = d3dretrace::createSharedResource(_this, ReturnedInterface, ppResource);')
- if method.name == 'OpenSharedResourceByName':
-- print r' (void)lpName;'
-- print r' (void)dwDesiredAccess;'
-+ print(r' (void)lpName;')
-+ print(r' (void)dwDesiredAccess;')
- else:
-- print r' (void)hResource;'
-+ print(r' (void)hResource;')
- self.checkResult(interface, method)
- return
-
-@@ -294,7 +294,7 @@ class D3DRetracer(Retracer):
- mapFlagsArg = method.getArgByName('MapFlags')
- for flag in mapFlagsArg.type.values:
- if flag.endswith('_MAP_FLAG_DO_NOT_WAIT'):
-- print r' MapFlags &= ~%s;' % flag
-+ print(r' MapFlags &= ~%s;' % flag)
-
- if method.name.startswith('UpdateSubresource'):
- # The D3D10 debug layer is buggy (or at least inconsistent with the
-@@ -303,108 +303,108 @@ class D3DRetracer(Retracer):
- # SrcDepthPitch is garbagge for non 3D textures.
- # XXX: It also seems to expect padding bytes at the end of the last
- # row, but we never record (or allocate) those...
-- print r' if (retrace::debug && pDstBox && pDstBox->front == 0 && pDstBox->back == 1) {'
-- print r' SrcDepthPitch = 0;'
-- print r' }'
-+ print(r' if (retrace::debug && pDstBox && pDstBox->front == 0 && pDstBox->back == 1) {')
-+ print(r' SrcDepthPitch = 0;')
-+ print(r' }')
-
- if method.name == 'SetGammaControl':
- # This method is only supported while in full-screen mode
-- print r' if (retrace::forceWindowed) {'
-- print r' return;'
-- print r' }'
-+ print(r' if (retrace::forceWindowed) {')
-+ print(r' return;')
-+ print(r' }')
-
- Retracer.invokeInterfaceMethod(self, interface, method)
-
- if method.name in ('AcquireSync', 'ReleaseSync'):
-- print r' if (SUCCEEDED(_result) && _result != S_OK) {'
-- print r' retrace::warning(call) << " returned " << _result << "\n";'
-- print r' }'
-+ print(r' if (SUCCEEDED(_result) && _result != S_OK) {')
-+ print(r' retrace::warning(call) << " returned " << _result << "\n";')
-+ print(r' }')
-
- # process events after presents
- if interface.name.startswith('IDXGISwapChain') and method.name.startswith('Present'):
-- print r' d3dretrace::processEvents();'
-+ print(r' d3dretrace::processEvents();')
-
- if method.name in ('Map', 'Unmap'):
- if interface.name.startswith('ID3D11DeviceContext'):
-- print ' void * & _pbData = g_Maps[_this][SubresourceKey(pResource, Subresource)];'
-+ print(' void * & _pbData = g_Maps[_this][SubresourceKey(pResource, Subresource)];')
- else:
- subresourceArg = method.getArgByName('Subresource')
- if subresourceArg is None:
-- print ' UINT Subresource = 0;'
-- print ' void * & _pbData = g_Maps[0][SubresourceKey(_this, Subresource)];'
-+ print(' UINT Subresource = 0;')
-+ print(' void * & _pbData = g_Maps[0][SubresourceKey(_this, Subresource)];')
-
- if method.name == 'Map':
-- print ' _MAP_DESC _MapDesc;'
-- print ' _getMapDesc(_this, %s, _MapDesc);' % ', '.join(method.argNames())
-- print ' size_t _MappedSize = _MapDesc.Size;'
-- print ' if (_MapDesc.Size) {'
-- print ' _pbData = _MapDesc.pData;'
-+ print(' _MAP_DESC _MapDesc;')
-+ print(' _getMapDesc(_this, %s, _MapDesc);' % ', '.join(method.argNames()))
-+ print(' size_t _MappedSize = _MapDesc.Size;')
-+ print(' if (_MapDesc.Size) {')
-+ print(' _pbData = _MapDesc.pData;')
- if interface.name.startswith('ID3D11DeviceContext'):
- # Prevent false warnings on 1D and 2D resources, since the
- # pitches are often junk there...
-- print ' _normalizeMap(pResource, pMappedResource);'
-+ print(' _normalizeMap(pResource, pMappedResource);')
- self.checkPitchMismatch(method)
- else:
-- print ' _pbData = _MapDesc.pData;'
-+ print(' _pbData = _MapDesc.pData;')
- self.checkPitchMismatch(method)
-- print ' } else {'
-- print ' return;'
-- print ' }'
-+ print(' } else {')
-+ print(' return;')
-+ print(' }')
-
- if method.name == 'Unmap':
-- print ' if (_pbData) {'
-- print ' retrace::delRegionByPointer(_pbData);'
-- print ' _pbData = 0;'
-- print ' }'
-+ print(' if (_pbData) {')
-+ print(' retrace::delRegionByPointer(_pbData);')
-+ print(' _pbData = 0;')
-+ print(' }')
-
- # Attach shader byte code for lookup
- if 'pShaderBytecode' in method.argNames():
- ppShader = method.args[-1]
- assert ppShader.output
-- print r' if (retrace::dumpingState && SUCCEEDED(_result)) {'
-- print r' (*%s)->SetPrivateData(d3dstate::GUID_D3DSTATE, BytecodeLength, pShaderBytecode);' % ppShader.name
-- print r' }'
-+ print(r' if (retrace::dumpingState && SUCCEEDED(_result)) {')
-+ print(r' (*%s)->SetPrivateData(d3dstate::GUID_D3DSTATE, BytecodeLength, pShaderBytecode);' % ppShader.name)
-+ print(r' }')
-
- def extractArg(self, function, arg, arg_type, lvalue, rvalue):
- # Set object names
- if function.name == 'SetPrivateData' and arg.name == 'pData':
- iid = function.args[0].name
-- print r' if (%s != WKPDID_D3DDebugObjectName) {' % iid
-- print r' return;'
-- print r' }'
-+ print(r' if (%s != WKPDID_D3DDebugObjectName) {' % iid)
-+ print(r' return;')
-+ print(r' }')
- # Interpret argument as string
- Retracer.extractArg(self, function, arg, LPCSTR, lvalue, rvalue)
-- print r' assert(pData);'
-- print r' assert(DataSize >= strlen((const char *)pData));'
-- print r' // Some applications include the trailing zero terminator in the data'
-- print r' DataSize = strlen((const char *)pData);'
-+ print(r' assert(pData);')
-+ print(r' assert(DataSize >= strlen((const char *)pData));')
-+ print(r' // Some applications include the trailing zero terminator in the data')
-+ print(r' DataSize = strlen((const char *)pData);')
- return
-
- Retracer.extractArg(self, function, arg, arg_type, lvalue, rvalue)
-
-
- def main():
-- print r'#define INITGUID'
-- print
-- print r'#include <string.h>'
-- print
-- print r'#include <iostream>'
-- print
-- print r'#include "d3dretrace.hpp"'
-- print r'#include "os_version.hpp"'
-- print
-- print r'#include "d3dretrace_dxgi.hpp"'
-- print r'#include "d3d10imports.hpp"'
-- print r'#include "d3d10size.hpp"'
-- print r'#include "d3d10state.hpp"'
-- print r'#include "d3d11imports.hpp"'
-- print r'#include "d3d11size.hpp"'
-- print r'#include "d3dstate.hpp"'
-- print
-- print '''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;'''
-- print '''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;'''
-- print '''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;'''
-- print
-+ print(r'#define INITGUID')
-+ print()
-+ print(r'#include <string.h>')
-+ print()
-+ print(r'#include <iostream>')
-+ print()
-+ print(r'#include "d3dretrace.hpp"')
-+ print(r'#include "os_version.hpp"')
-+ print()
-+ print(r'#include "d3dretrace_dxgi.hpp"')
-+ print(r'#include "d3d10imports.hpp"')
-+ print(r'#include "d3d10size.hpp"')
-+ print(r'#include "d3d10state.hpp"')
-+ print(r'#include "d3d11imports.hpp"')
-+ print(r'#include "d3d11size.hpp"')
-+ print(r'#include "d3dstate.hpp"')
-+ print()
-+ print('''static d3dretrace::D3DDumper<IDXGISwapChain> dxgiDumper;''')
-+ print('''static d3dretrace::D3DDumper<ID3D10Device> d3d10Dumper;''')
-+ print('''static d3dretrace::D3DDumper<ID3D11DeviceContext> d3d11Dumper;''')
-+ print()
-
- api = API()
- api.addModule(dxgi)
-diff --git a/retrace/dxgistate_so.py b/retrace/dxgistate_so.py
-index 86f6db57..33745c8f 100644
---- a/retrace/dxgistate_so.py
-+++ b/retrace/dxgistate_so.py
-@@ -48,9 +48,9 @@ class ValueDumper(stdapi.Visitor, stdapi.ExpanderMixin):
-
- def visitLiteral(self, literal, instance):
- if literal.kind in ('SInt', 'UInt'):
-- print ' writer.writeInt(%s);' % (instance)
-+ print(' writer.writeInt(%s);' % (instance))
- elif literal.kind in ('Float',):
-- print ' writer.writeFloat(%s);' % (instance)
-+ print(' writer.writeFloat(%s);' % (instance))
- else:
- raise NotImplementedError
-
-@@ -66,36 +66,36 @@ class ValueDumper(stdapi.Visitor, stdapi.ExpanderMixin):
- # reinterpret_cast is necessary for GLubyte * <=> char *
- instance = 'reinterpret_cast<%s>(%s)' % (cast, instance)
- assert string.length is None
-- print ' writer.write%s(%s);' % (suffix, instance)
-+ print(' writer.write%s(%s);' % (suffix, instance))
-
- def visitConst(self, const, instance):
- self.visit(const.type, instance)
-
- def visitStruct(self, struct, instance):
-- print ' writer.beginObject();'
-+ print(' writer.beginObject();')
- for member in struct.members:
- memberType, memberName = member
- if memberName is not None:
-- print ' writer.beginMember("%s");' % memberName
-+ print(' writer.beginMember("%s");' % memberName)
- self.visitMember(member, instance)
- if memberName is not None:
-- print ' writer.endMember(); // %s' % memberName
-- print ' writer.endObject();'
-+ print(' writer.endMember(); // %s' % memberName)
-+ print(' writer.endObject();')
-
- def visitArray(self, array, instance):
- length = '_c' + array.type.tag
- index = '_i' + array.type.tag
- array_length = self.expand(array.length)
-- print ' if (%s) {' % instance
-- print ' size_t %s = %s > 0 ? %s : 0;' % (length, array_length, array_length)
-- print ' writer.beginArray();'
-- print ' for (size_t %s = 0; %s < %s; ++%s) {' % (index, index, length, index)
-+ print(' if (%s) {' % instance)
-+ print(' size_t %s = %s > 0 ? %s : 0;' % (length, array_length, array_length))
-+ print(' writer.beginArray();')
-+ print(' for (size_t %s = 0; %s < %s; ++%s) {' % (index, index, length, index))
- self.visitElement(index, array.type, '(%s)[%s]' % (instance, index))
-- print ' }'
-- print ' writer.endArray();'
-- print ' } else {'
-- print ' writer.writeNull();'
-- print ' }'
-+ print(' }')
-+ print(' writer.endArray();')
-+ print(' } else {')
-+ print(' writer.writeNull();')
-+ print(' }')
-
- def visitAttribArray(self, array, instance):
- raise NotImplementedError
-@@ -104,37 +104,37 @@ class ValueDumper(stdapi.Visitor, stdapi.ExpanderMixin):
- raise NotImplementedError
-
- def visitEnum(self, enum, instance):
-- print ' switch (%s) {' % instance
-+ print(' switch (%s) {' % instance)
- for value in enum.values:
-- print ' case %s:' % value
-- print ' writer.writeString("%s");' % value
-- print ' break;'
-- print ' default:'
-- print ' writer.writeInt(%s);' % instance
-- print ' break;'
-- print ' }'
-+ print(' case %s:' % value)
-+ print(' writer.writeString("%s");' % value)
-+ print(' break;')
-+ print(' default:')
-+ print(' writer.writeInt(%s);' % instance)
-+ print(' break;')
-+ print(' }')
-
- def visitBitmask(self, bitmask, instance):
- # TODO
- self.visit(bitmask.type, instance)
-
- def visitPointer(self, pointer, instance):
-- print ' if (%s) {' % instance
-- print ' writer.beginArray();'
-+ print(' if (%s) {' % instance)
-+ print(' writer.beginArray();')
- self.visit(pointer.type, "*" + instance)
-- print ' writer.endArray();'
-- print ' } else {'
-- print ' writer.writeNull();'
-- print ' }'
-+ print(' writer.endArray();')
-+ print(' } else {')
-+ print(' writer.writeNull();')
-+ print(' }')
-
- def visitIntPointer(self, pointer, instance):
-- print ' writer.writeInt((uintptr_t)%s);' % instance
-+ print(' writer.writeInt((uintptr_t)%s);' % instance)
-
- def visitObjPointer(self, pointer, instance):
-- print ' writer.writeInt((uintptr_t)%s);' % instance
-+ print(' writer.writeInt((uintptr_t)%s);' % instance)
-
- def visitLinearPointer(self, pointer, instance):
-- print ' writer.writeInt((uintptr_t)%s);' % instance
-+ print(' writer.writeInt((uintptr_t)%s);' % instance)
-
- def visitReference(self, reference, instance):
- self.visit(reference.type, instance)
-@@ -146,23 +146,23 @@ class ValueDumper(stdapi.Visitor, stdapi.ExpanderMixin):
- self.visit(alias.type, instance)
-
- def visitOpaque(self, opaque, instance):
-- print ' writer.writeInt((uintptr_t)%s);' % instance
-+ print(' writer.writeInt((uintptr_t)%s);' % instance)
-
- def visitInterface(self, interface, instance):
- assert False
-
- def visitPolymorphic(self, polymorphic, instance):
- switchExpr = self.expand(polymorphic.switchExpr)
-- print ' switch (static_cast<int>(%s)) {' % switchExpr
-+ print(' switch (static_cast<int>(%s)) {' % switchExpr)
- for cases, type in polymorphic.iterSwitch():
- for case in cases:
-- print ' %s:' % case
-+ print(' %s:' % case)
- caseInstance = instance
- if type.expr is not None:
- caseInstance = 'static_cast<%s>(%s)' % (type, caseInstance)
- self.visit(type, caseInstance)
-- print ' break;'
-- print ' }'
-+ print(' break;')
-+ print(' }')
-
-
- class Dumper:
-@@ -187,8 +187,8 @@ class Dumper:
- # Includes
- for module in api.modules:
- for header in module.headers:
-- print header
-- print
-+ print(header)
-+ print()
-
- # Generate the dumper functions
- types = api.getAllTypes()
-@@ -196,13 +196,13 @@ class Dumper:
- self.dumpType(type)
-
- def dumpType(self, type):
-- print r'void'
-- print r'dumpStateObject(StateWriter &writer, const %s & so)' % type
-- print r'{'
-+ print(r'void')
-+ print(r'dumpStateObject(StateWriter &writer, const %s & so)' % type)
-+ print(r'{')
- visitor = self.dumperFactory()
- visitor.visit(type, 'so')
-- print r'}'
-- print
-+ print(r'}')
-+ print()
-
- def header(self):
- pass
-@@ -212,10 +212,10 @@ class Dumper:
-
-
- if __name__ == '__main__':
-- print r'#include "dxgistate_so.hpp"'
-- print
-- print r'#include "state_writer.hpp"'
-- print
-+ print(r'#include "dxgistate_so.hpp"')
-+ print()
-+ print(r'#include "state_writer.hpp"')
-+ print()
-
- api = stdapi.API()
- api.addModule(dxgi.dxgi)
-diff --git a/retrace/glretrace.py b/retrace/glretrace.py
-index 2ead195d..0dfe5c5b 100644
---- a/retrace/glretrace.py
-+++ b/retrace/glretrace.py
-@@ -127,190 +127,190 @@ class GlRetracer(Retracer):
-
- # For backwards compatibility with old traces where non VBO drawing was supported
- if (is_array_pointer or is_draw_arrays or is_draw_elements) and not is_draw_indirect:
-- print ' if (retrace::parser->getVersion() < 1) {'
-+ print(' if (retrace::parser->getVersion() < 1) {')
-
- if is_array_pointer or is_draw_arrays:
-- print ' GLint _array_buffer = 0;'
-- print ' glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &_array_buffer);'
-- print ' if (!_array_buffer) {'
-+ print(' GLint _array_buffer = 0;')
-+ print(' glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &_array_buffer);')
-+ print(' if (!_array_buffer) {')
- self.failFunction(function)
-- print ' }'
-+ print(' }')
-
- if is_draw_elements:
-- print ' GLint _element_array_buffer = 0;'
-- print ' glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &_element_array_buffer);'
-- print ' if (!_element_array_buffer) {'
-+ print(' GLint _element_array_buffer = 0;')
-+ print(' glGetIntegerv(GL_ELEMENT_ARRAY_BUFFER_BINDING, &_element_array_buffer);')
-+ print(' if (!_element_array_buffer) {')
- self.failFunction(function)
-- print ' }'
-+ print(' }')
-
-- print ' }'
-+ print(' }')
-
- # When no pack buffer object is bound, the pack functions are no-ops.
- if self.pack_function_regex.match(function.name):
-- print ' GLint _pack_buffer = 0;'
-- print ' glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, &_pack_buffer);'
-- print ' if (!_pack_buffer) {'
-- print ' return;'
-- print ' }'
-+ print(' GLint _pack_buffer = 0;')
-+ print(' glGetIntegerv(GL_PIXEL_PACK_BUFFER_BINDING, &_pack_buffer);')
-+ print(' if (!_pack_buffer) {')
-+ print(' return;')
-+ print(' }')
-
- # Pre-snapshots
- if self.bind_framebuffer_function_regex.match(function.name):
-- print ' assert(call.flags & trace::CALL_FLAG_SWAP_RENDERTARGET);'
-+ print(' assert(call.flags & trace::CALL_FLAG_SWAP_RENDERTARGET);')
- if function.name == 'glStringMarkerGREMEDY':
- return
- if function.name == 'glFrameTerminatorGREMEDY':
-- print ' glretrace::frame_complete(call);'
-+ print(' glretrace::frame_complete(call);')
- return
-
- Retracer.retraceFunctionBody(self, function)
-
- # Post-snapshots
- if function.name in ('glFlush', 'glFinish'):
-- print ' if (!retrace::doubleBuffer) {'
-- print ' glretrace::frame_complete(call);'
-- print ' }'
-+ print(' if (!retrace::doubleBuffer) {')
-+ print(' glretrace::frame_complete(call);')
-+ print(' }')
- if is_draw_arrays or is_draw_elements or is_misc_draw:
-- print ' assert(call.flags & trace::CALL_FLAG_RENDER);'
-+ print(' assert(call.flags & trace::CALL_FLAG_RENDER);')
-
-
- def invokeFunction(self, function):
- if function.name == "glTexDirectVIVMap" or function.name == "glTexDirectMapVIV" or function.name == "glTexDirectTiledMapVIV":
-- print '#if defined(HAVE_VIVANTE_G2D)'
-- print ' GLint tex;'
-- print ' glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);'
-- print ' int32_t size = 0;'
-- print ' switch(format){'
-- print ' case GL_VIV_YV12:'
-- print ' case GL_VIV_I420:'
-- print ' case GL_VIV_NV12:'
-- print ' case GL_VIV_NV21:'
-- print ' size=width * height * 3 / 2;'
-- print ' break;'
-- print ' case GL_RGBA:'
-- print ' case GL_BGRA_EXT:'
-- print ' size=width * height * 4;'
-- print ' break;'
-- print ' case GL_RGB:'
-- print ' size=width * height *3;'
-- print ' break;'
-- print ' case GL_VIV_YUY2:'
-- print ' case GL_VIV_UYVY:'
-- print ' case GL_RGB565_OES:'
-- print ' case GL_LUMINANCE8_ALPHA8_EXT:'
-- print ' size=width * height *2;'
-- print ' break;'
-- print ' case GL_ALPHA:'
-- print ' size=width * height;'
-- print ' break;'
-- print ' default:'
-- print ' break;'
-- print ' }'
-- print ' if(tex != 0)'
-- print ' {'
-- print ' GLuint pindex = *(GLuint*)Logical;'
-- print ' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];'
-- print ' if(data.privateData == 0) // new entry'
-- print ' {'
-- print ' data.privateData = alloc_dma_buffer(size, (uintptr_t*)&data.logical, &data.physical);'
-- print ' data.index = pindex;'
-- print ' data.size = size;'
-- print ' retrace::addRegion(call,data.index,data.logical,size);'
-- print ' }'
-- print ' else // already have one; check size and index'
-- print ' {'
-- print ' if((size!=data.size)||(pindex!=data.index))'
-- print ' {'
-- print ' retrace::delRegionByPointer(data.logical);'
-- print ' free_dma_buffer(data.privateData);'
-- print ' data.privateData = alloc_dma_buffer(size, (uintptr_t*)&data.logical, &data.physical);'
-- print ' data.index = pindex;'
-- print ' data.size = size;'
-- print ' retrace::addRegion(call,data.index,data.logical,size);'
-- print ' }'
-- print ' }'
-- print ' *Logical = data.logical;'
-- print ' *Physical = data.physical;'
-- print ' }'
-- print '#endif /* HAVE_VIVANTE_G2D */'
-+ print('#if defined(HAVE_VIVANTE_G2D)')
-+ print(' GLint tex;')
-+ print(' glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);')
-+ print(' int32_t size = 0;')
-+ print(' switch(format){')
-+ print(' case GL_VIV_YV12:')
-+ print(' case GL_VIV_I420:')
-+ print(' case GL_VIV_NV12:')
-+ print(' case GL_VIV_NV21:')
-+ print(' size=width * height * 3 / 2;')
-+ print(' break;')
-+ print(' case GL_RGBA:')
-+ print(' case GL_BGRA_EXT:')
-+ print(' size=width * height * 4;')
-+ print(' break;')
-+ print(' case GL_RGB:')
-+ print(' size=width * height *3;')
-+ print(' break;')
-+ print(' case GL_VIV_YUY2:')
-+ print(' case GL_VIV_UYVY:')
-+ print(' case GL_RGB565_OES:')
-+ print(' case GL_LUMINANCE8_ALPHA8_EXT:')
-+ print(' size=width * height *2;')
-+ print(' break;')
-+ print(' case GL_ALPHA:')
-+ print(' size=width * height;')
-+ print(' break;')
-+ print(' default:')
-+ print(' break;')
-+ print(' }')
-+ print(' if(tex != 0)')
-+ print(' {')
-+ print(' GLuint pindex = *(GLuint*)Logical;')
-+ print(' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];')
-+ print(' if(data.privateData == 0) // new entry')
-+ print(' {')
-+ print(' data.privateData = alloc_dma_buffer(size, (uintptr_t*)&data.logical, &data.physical);')
-+ print(' data.index = pindex;')
-+ print(' data.size = size;')
-+ print(' retrace::addRegion(call,data.index,data.logical,size);')
-+ print(' }')
-+ print(' else // already have one; check size and index')
-+ print(' {')
-+ print(' if((size!=data.size)||(pindex!=data.index))')
-+ print(' {')
-+ print(' retrace::delRegionByPointer(data.logical);')
-+ print(' free_dma_buffer(data.privateData);')
-+ print(' data.privateData = alloc_dma_buffer(size, (uintptr_t*)&data.logical, &data.physical);')
-+ print(' data.index = pindex;')
-+ print(' data.size = size;')
-+ print(' retrace::addRegion(call,data.index,data.logical,size);')
-+ print(' }')
-+ print(' }')
-+ print(' *Logical = data.logical;')
-+ print(' *Physical = data.physical;')
-+ print(' }')
-+ print('#endif /* HAVE_VIVANTE_G2D */')
- # Infer the drawable size from GL calls
- if function.name == "glViewport":
-- print ' glretrace::updateDrawable(x + width, y + height);'
-+ print(' glretrace::updateDrawable(x + width, y + height);')
- if function.name == "glViewportArray":
- # We are concerned about drawables so only care for the first viewport
-- print ' if (first == 0 && count > 0) {'
-- print ' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];'
-- print ' glretrace::updateDrawable(x + w, y + h);'
-- print ' }'
-+ print(' if (first == 0 && count > 0) {')
-+ print(' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];')
-+ print(' glretrace::updateDrawable(x + w, y + h);')
-+ print(' }')
- if function.name == "glViewportIndexedf":
-- print ' if (index == 0) {'
-- print ' glretrace::updateDrawable(x + w, y + h);'
-- print ' }'
-+ print(' if (index == 0) {')
-+ print(' glretrace::updateDrawable(x + w, y + h);')
-+ print(' }')
- if function.name == "glViewportIndexedfv":
-- print ' if (index == 0) {'
-- print ' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];'
-- print ' glretrace::updateDrawable(x + w, y + h);'
-- print ' }'
-+ print(' if (index == 0) {')
-+ print(' GLfloat x = v[0], y = v[1], w = v[2], h = v[3];')
-+ print(' glretrace::updateDrawable(x + w, y + h);')
-+ print(' }')
- if function.name in ('glBlitFramebuffer', 'glBlitFramebufferEXT'):
- # Some applications do all their rendering in a framebuffer, and
- # then just blit to the drawable without ever calling glViewport.
-- print ' glretrace::updateDrawable(std::max(dstX0, dstX1), std::max(dstY0, dstY1));'
-+ print(' glretrace::updateDrawable(std::max(dstX0, dstX1), std::max(dstY0, dstY1));')
-
- if function.name.startswith('gl') and not function.name.startswith('glX'):
- # The Windows OpenGL runtime will skip calls when there's no
- # context bound to the current context, but this might cause
- # crashes on other systems, particularly with NVIDIA Linux drivers.
-- print r' glretrace::Context *currentContext = glretrace::getCurrentContext();'
-- print r' if (!currentContext) {'
-- print r' if (retrace::debug) {'
-- print r' retrace::warning(call) << "no current context\n";'
-- print r' }'
-- print r'#ifndef _WIN32'
-- print r' return;'
-- print r'#endif'
-- print r' }'
-+ print(r' glretrace::Context *currentContext = glretrace::getCurrentContext();')
-+ print(r' if (!currentContext) {')
-+ print(r' if (retrace::debug) {')
-+ print(r' retrace::warning(call) << "no current context\n";')
-+ print(r' }')
-+ print(r'#ifndef _WIN32')
-+ print(r' return;')
-+ print(r'#endif')
-+ print(r' }')
-
- if function.name == "glEnd":
-- print r' if (currentContext) {'
-- print r' currentContext->insideBeginEnd = false;'
-- print r' }'
-+ print(r' if (currentContext) {')
-+ print(r' currentContext->insideBeginEnd = false;')
-+ print(r' }')
-
- if function.name == 'memcpy':
-- print ' if (!dest || !src || !n) return;'
-+ print(' if (!dest || !src || !n) return;')
-
- # Skip glEnable/Disable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) as we don't
- # faithfully set the CONTEXT_DEBUG_BIT_ARB flags on context creation.
- if function.name in ('glEnable', 'glDisable'):
-- print ' if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) return;'
-+ print(' if (cap == GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB) return;')
-
- # Destroy the buffer mapping
- if self.unmap_function_regex.match(function.name):
-- print r' GLvoid *ptr = NULL;'
-+ print(r' GLvoid *ptr = NULL;')
- if function.name == 'glUnmapBuffer':
-- print r' glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &ptr);'
-+ print(r' glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &ptr);')
- elif function.name == 'glUnmapBufferARB':
-- print r' glGetBufferPointervARB(target, GL_BUFFER_MAP_POINTER_ARB, &ptr);'
-+ print(r' glGetBufferPointervARB(target, GL_BUFFER_MAP_POINTER_ARB, &ptr);')
- elif function.name == 'glUnmapBufferOES':
-- print r' glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER_OES, &ptr);'
-+ print(r' glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER_OES, &ptr);')
- elif function.name == 'glUnmapNamedBuffer':
-- print r' glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &ptr);'
-+ print(r' glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &ptr);')
- elif function.name == 'glUnmapNamedBufferEXT':
-- print r' glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &ptr);'
-+ print(r' glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &ptr);')
- elif function.name == 'glUnmapObjectBufferATI':
- # TODO
- pass
- else:
- assert False
-- print r' if (ptr) {'
-- print r' retrace::delRegionByPointer(ptr);'
-- print r' } else {'
-- print r' retrace::warning(call) << "failed to get mapped pointer\n";'
-- print r' }'
-+ print(r' if (ptr) {')
-+ print(r' retrace::delRegionByPointer(ptr);')
-+ print(r' } else {')
-+ print(r' retrace::warning(call) << "failed to get mapped pointer\n";')
-+ print(r' }')
-
- if function.name in ('glBindProgramPipeline', 'glBindProgramPipelineEXT'):
- # Note if glBindProgramPipeline has ever been called
-- print r' if (pipeline) {'
-- print r' _pipelineHasBeenBound = true;'
-- print r' }'
-+ print(r' if (pipeline) {')
-+ print(r' _pipelineHasBeenBound = true;')
-+ print(r' }')
-
- is_draw_arrays = self.draw_arrays_function_regex.match(function.name) is not None
- is_draw_elements = self.draw_elements_function_regex.match(function.name) is not None
-@@ -325,240 +325,240 @@ class GlRetracer(Retracer):
-
- # Keep track of active program for call lists
- if function.name in ('glUseProgram', 'glUseProgramObjectARB'):
-- print r' if (currentContext) {'
-- print r' currentContext->activeProgram = call.arg(0).toUInt();'
-- print r' }'
-+ print(r' if (currentContext) {')
-+ print(r' currentContext->activeProgram = call.arg(0).toUInt();')
-+ print(r' }')
-
- # Only profile if not inside a list as the queries get inserted into list
- if function.name == 'glNewList':
-- print r' if (currentContext) {'
-- print r' currentContext->insideList = true;'
-- print r' }'
-+ print(r' if (currentContext) {')
-+ print(r' currentContext->insideList = true;')
-+ print(r' }')
-
- if function.name == 'glEndList':
-- print r' if (currentContext) {'
-- print r' currentContext->insideList = false;'
-- print r' }'
-+ print(r' if (currentContext) {')
-+ print(r' currentContext->insideList = false;')
-+ print(r' }')
-
- if function.name == 'glBegin' or \
- is_draw_arrays or \
- is_draw_elements or \
- function.name.startswith('glBeginTransformFeedback'):
-- print r' if (retrace::debug) {'
-- print r' _validateActiveProgram(call);'
-- print r' }'
-+ print(r' if (retrace::debug) {')
-+ print(r' _validateActiveProgram(call);')
-+ print(r' }')
-
- if function.name != 'glEnd':
-- print r' if (currentContext && !currentContext->insideList && !currentContext->insideBeginEnd && retrace::profiling) {'
-+ print(r' if (currentContext && !currentContext->insideList && !currentContext->insideBeginEnd && retrace::profiling) {')
- if profileDraw:
-- print r' glretrace::beginProfile(call, true);'
-+ print(r' glretrace::beginProfile(call, true);')
- else:
-- print r' glretrace::beginProfile(call, false);'
-- print r' }'
-+ print(r' glretrace::beginProfile(call, false);')
-+ print(r' }')
-
- if function.name in ('glCreateShaderProgramv', 'glCreateShaderProgramEXT', 'glCreateShaderProgramvEXT'):
- # When dumping state, break down glCreateShaderProgram* so that the
- # shader source can be recovered.
-- print r' if (retrace::dumpingState) {'
-- print r' GLuint _shader = glCreateShader(type);'
-- print r' if (_shader) {'
-+ print(r' if (retrace::dumpingState) {')
-+ print(r' GLuint _shader = glCreateShader(type);')
-+ print(r' if (_shader) {')
- if not function.name.startswith('glCreateShaderProgramv'):
-- print r' GLsizei count = 1;'
-- print r' const GLchar **strings = &string;'
-- print r' glShaderSource(_shader, count, strings, NULL);'
-- print r' glCompileShader(_shader);'
-- print r' const GLuint _program = glCreateProgram();'
-- print r' if (_program) {'
-- print r' GLint compiled = GL_FALSE;'
-- print r' glGetShaderiv(_shader, GL_COMPILE_STATUS, &compiled);'
-+ print(r' GLsizei count = 1;')
-+ print(r' const GLchar **strings = &string;')
-+ print(r' glShaderSource(_shader, count, strings, NULL);')
-+ print(r' glCompileShader(_shader);')
-+ print(r' const GLuint _program = glCreateProgram();')
-+ print(r' if (_program) {')
-+ print(r' GLint compiled = GL_FALSE;')
-+ print(r' glGetShaderiv(_shader, GL_COMPILE_STATUS, &compiled);')
- if function.name == 'glCreateShaderProgramvEXT':
-- print r' glProgramParameteriEXT(_program, GL_PROGRAM_SEPARABLE, GL_TRUE);'
-+ print(r' glProgramParameteriEXT(_program, GL_PROGRAM_SEPARABLE, GL_TRUE);')
- else:
-- print r' glProgramParameteri(_program, GL_PROGRAM_SEPARABLE, GL_TRUE);'
-- print r' if (compiled) {'
-- print r' glAttachShader(_program, _shader);'
-- print r' glLinkProgram(_program);'
-- print r' if (false) glDetachShader(_program, _shader);'
-- print r' }'
-- print r' // TODO: append shader info log to program info log'
-- print r' }'
-- print r' glDeleteShader(_shader);'
-- print r' _result = _program;'
-- print r' } else {'
-- print r' _result = 0;'
-- print r' }'
-- print r' } else {'
-+ print(r' glProgramParameteri(_program, GL_PROGRAM_SEPARABLE, GL_TRUE);')
-+ print(r' if (compiled) {')
-+ print(r' glAttachShader(_program, _shader);')
-+ print(r' glLinkProgram(_program);')
-+ print(r' if (false) glDetachShader(_program, _shader);')
-+ print(r' }')
-+ print(r' // TODO: append shader info log to program info log')
-+ print(r' }')
-+ print(r' glDeleteShader(_shader);')
-+ print(r' _result = _program;')
-+ print(r' } else {')
-+ print(r' _result = 0;')
-+ print(r' }')
-+ print(r' } else {')
- Retracer.invokeFunction(self, function)
-- print r' }'
-+ print(r' }')
- elif function.name in ('glDetachShader', 'glDetachObjectARB'):
-- print r' if (!retrace::dumpingState) {'
-+ print(r' if (!retrace::dumpingState) {')
- Retracer.invokeFunction(self, function)
-- print r' }'
-+ print(r' }')
- elif function.name == 'glClientWaitSync':
-- print r' _result = glretrace::clientWaitSync(call, sync, flags, timeout);'
-- print r' (void)_result;'
-+ print(r' _result = glretrace::clientWaitSync(call, sync, flags, timeout);')
-+ print(r' (void)_result;')
- elif function.name == 'glGetSynciv':
-- print r' if (pname == GL_SYNC_STATUS &&'
-- print r' bufSize >= 1 &&'
-- print r' values != NULL &&'
-- print r' call.arg(4)[0].toSInt() == GL_SIGNALED) {'
-- print r' // Fence was signalled, so ensure it happened here'
-- print r' glretrace::blockOnFence(call, sync, GL_SYNC_FLUSH_COMMANDS_BIT);'
-- print r' (void)length;'
-- print r' }'
-+ print(r' if (pname == GL_SYNC_STATUS &&')
-+ print(r' bufSize >= 1 &&')
-+ print(r' values != NULL &&')
-+ print(r' call.arg(4)[0].toSInt() == GL_SIGNALED) {')
-+ print(r' // Fence was signalled, so ensure it happened here')
-+ print(r' glretrace::blockOnFence(call, sync, GL_SYNC_FLUSH_COMMANDS_BIT);')
-+ print(r' (void)length;')
-+ print(r' }')
- else:
- Retracer.invokeFunction(self, function)
-
- if function.name == "glBegin":
-- print ' if (currentContext) {'
-- print ' currentContext->insideBeginEnd = true;'
-- print ' }'
-+ print(' if (currentContext) {')
-+ print(' currentContext->insideBeginEnd = true;')
-+ print(' }')
-
- if function.name == "glTexDirectVIV":
-- print '#if defined(HAVE_VIVANTE_G2D)'
-- print ' int32_t ysize = 0;'
-- print ' int32_t usize = 0;'
-- print ' int32_t vsize = 0;'
-- print ' switch(format){'
-- print ' case GL_VIV_YV12:'
-- print ' case GL_VIV_I420:'
-- print ' ysize=width * height;'
-- print ' usize=ysize/4;'
-- print ' vsize=usize;'
-- print ' break;'
-- print ' case GL_VIV_NV12:'
-- print ' case GL_VIV_NV21:'
-- print ' ysize=width * height;'
-- print ' usize=ysize/2;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_RGBA:'
-- print ' case GL_BGRA_EXT:'
-- print ' ysize=width * height *4;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_RGB:'
-- print ' ysize=width * height *3;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_VIV_YUY2:'
-- print ' case GL_VIV_UYVY:'
-- print ' case GL_RGB565_OES:'
-- print ' ysize=width * height *2;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' default:'
-- print ' break;'
-- print ' }'
-- print ' const trace::Array * arrayGLvoid = (call.arg(4)).toArray();'
-- print ' if(ysize > 0)'
-- print ' retrace::addRegion(call,(*arrayGLvoid->values[0]).toUInt(),(GLvoid*)pixels[0], ysize);'
-- print ' if(usize > 0)'
-- print ' retrace::addRegion(call,(*arrayGLvoid->values[1]).toUInt(),(GLvoid*)pixels[1], usize);'
-- print ' if(vsize > 0)'
-- print ' retrace::addRegion(call,(*arrayGLvoid->values[2]).toUInt(),(GLvoid*)pixels[2], vsize);'
-- print '#endif /* HAVE_VIVANTE_G2D */'
--
-- print r' if (currentContext && !currentContext->insideList && !currentContext->insideBeginEnd && retrace::profiling) {'
-+ print('#if defined(HAVE_VIVANTE_G2D)')
-+ print(' int32_t ysize = 0;')
-+ print(' int32_t usize = 0;')
-+ print(' int32_t vsize = 0;')
-+ print(' switch(format){')
-+ print(' case GL_VIV_YV12:')
-+ print(' case GL_VIV_I420:')
-+ print(' ysize=width * height;')
-+ print(' usize=ysize/4;')
-+ print(' vsize=usize;')
-+ print(' break;')
-+ print(' case GL_VIV_NV12:')
-+ print(' case GL_VIV_NV21:')
-+ print(' ysize=width * height;')
-+ print(' usize=ysize/2;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_RGBA:')
-+ print(' case GL_BGRA_EXT:')
-+ print(' ysize=width * height *4;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_RGB:')
-+ print(' ysize=width * height *3;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_VIV_YUY2:')
-+ print(' case GL_VIV_UYVY:')
-+ print(' case GL_RGB565_OES:')
-+ print(' ysize=width * height *2;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' default:')
-+ print(' break;')
-+ print(' }')
-+ print(' const trace::Array * arrayGLvoid = (call.arg(4)).toArray();')
-+ print(' if(ysize > 0)')
-+ print(' retrace::addRegion(call,(*arrayGLvoid->values[0]).toUInt(),(GLvoid*)pixels[0], ysize);')
-+ print(' if(usize > 0)')
-+ print(' retrace::addRegion(call,(*arrayGLvoid->values[1]).toUInt(),(GLvoid*)pixels[1], usize);')
-+ print(' if(vsize > 0)')
-+ print(' retrace::addRegion(call,(*arrayGLvoid->values[2]).toUInt(),(GLvoid*)pixels[2], vsize);')
-+ print('#endif /* HAVE_VIVANTE_G2D */')
-+
-+ print(r' if (currentContext && !currentContext->insideList && !currentContext->insideBeginEnd && retrace::profiling) {')
- if profileDraw:
-- print r' glretrace::endProfile(call, true);'
-+ print(r' glretrace::endProfile(call, true);')
- else:
-- print r' glretrace::endProfile(call, false);'
-- print r' }'
-+ print(r' glretrace::endProfile(call, false);')
-+ print(r' }')
-
- # Error checking
- if function.name.startswith('gl'):
- # glGetError is not allowed inside glBegin/glEnd
-- print ' if (retrace::debug && currentContext && !currentContext->insideBeginEnd) {'
-- print ' glretrace::checkGlError(call);'
-+ print(' if (retrace::debug && currentContext && !currentContext->insideBeginEnd) {')
-+ print(' glretrace::checkGlError(call);')
- if function.name in ('glProgramStringARB', 'glLoadProgramNV'):
-- print r' GLint error_position = -1;'
-- print r' glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &error_position);'
-- print r' if (error_position != -1) {'
-- print r' const char *error_string = (const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB);'
-- print r' retrace::warning(call) << "error in position " << error_position << ": " << error_string << "\n";'
-- print r' }'
-+ print(r' GLint error_position = -1;')
-+ print(r' glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &error_position);')
-+ print(r' if (error_position != -1) {')
-+ print(r' const char *error_string = (const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB);')
-+ print(r' retrace::warning(call) << "error in position " << error_position << ": " << error_string << "\n";')
-+ print(r' }')
- if function.name == 'glCompileShader':
-- print r' GLint compile_status = 0;'
-- print r' glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_status);'
-- print r' if (!compile_status) {'
-- print r' retrace::warning(call) << "compilation failed\n";'
-- print r' }'
-- print r' GLint info_log_length = 0;'
-- print r' glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &info_log_length);'
-- print r' if (info_log_length > 1) {'
-- print r' GLchar *infoLog = new GLchar[info_log_length];'
-- print r' glGetShaderInfoLog(shader, info_log_length, NULL, infoLog);'
-- print r' retrace::warning(call) << infoLog << "\n";'
-- print r' delete [] infoLog;'
-- print r' }'
-+ print(r' GLint compile_status = 0;')
-+ print(r' glGetShaderiv(shader, GL_COMPILE_STATUS, &compile_status);')
-+ print(r' if (!compile_status) {')
-+ print(r' retrace::warning(call) << "compilation failed\n";')
-+ print(r' }')
-+ print(r' GLint info_log_length = 0;')
-+ print(r' glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &info_log_length);')
-+ print(r' if (info_log_length > 1) {')
-+ print(r' GLchar *infoLog = new GLchar[info_log_length];')
-+ print(r' glGetShaderInfoLog(shader, info_log_length, NULL, infoLog);')
-+ print(r' retrace::warning(call) << infoLog << "\n";')
-+ print(r' delete [] infoLog;')
-+ print(r' }')
- if function.name in ('glLinkProgram', 'glCreateShaderProgramv', 'glCreateShaderProgramEXT', 'glCreateShaderProgramvEXT', 'glProgramBinary', 'glProgramBinaryOES'):
- if function.name.startswith('glCreateShaderProgram'):
-- print r' GLuint program = _result;'
-- print r' GLint link_status = 0;'
-- print r' glGetProgramiv(program, GL_LINK_STATUS, &link_status);'
-- print r' if (!link_status) {'
-- print r' retrace::warning(call) << "link failed\n";'
-- print r' }'
-- print r' GLint info_log_length = 0;'
-- print r' glGetProgramiv(program, GL_INFO_LOG_LENGTH, &info_log_length);'
-- print r' if (info_log_length > 1) {'
-- print r' GLchar *infoLog = new GLchar[info_log_length];'
-- print r' glGetProgramInfoLog(program, info_log_length, NULL, infoLog);'
-- print r' retrace::warning(call) << infoLog << "\n";'
-- print r' delete [] infoLog;'
-- print r' }'
-+ print(r' GLuint program = _result;')
-+ print(r' GLint link_status = 0;')
-+ print(r' glGetProgramiv(program, GL_LINK_STATUS, &link_status);')
-+ print(r' if (!link_status) {')
-+ print(r' retrace::warning(call) << "link failed\n";')
-+ print(r' }')
-+ print(r' GLint info_log_length = 0;')
-+ print(r' glGetProgramiv(program, GL_INFO_LOG_LENGTH, &info_log_length);')
-+ print(r' if (info_log_length > 1) {')
-+ print(r' GLchar *infoLog = new GLchar[info_log_length];')
-+ print(r' glGetProgramInfoLog(program, info_log_length, NULL, infoLog);')
-+ print(r' retrace::warning(call) << infoLog << "\n";')
-+ print(r' delete [] infoLog;')
-+ print(r' }')
- if function.name == 'glCompileShaderARB':
-- print r' GLint compile_status = 0;'
-- print r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_COMPILE_STATUS_ARB, &compile_status);'
-- print r' if (!compile_status) {'
-- print r' retrace::warning(call) << "compilation failed\n";'
-- print r' }'
-- print r' GLint info_log_length = 0;'
-- print r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);'
-- print r' if (info_log_length > 1) {'
-- print r' GLchar *infoLog = new GLchar[info_log_length];'
-- print r' glGetInfoLogARB(shaderObj, info_log_length, NULL, infoLog);'
-- print r' retrace::warning(call) << infoLog << "\n";'
-- print r' delete [] infoLog;'
-- print r' }'
-+ print(r' GLint compile_status = 0;')
-+ print(r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_COMPILE_STATUS_ARB, &compile_status);')
-+ print(r' if (!compile_status) {')
-+ print(r' retrace::warning(call) << "compilation failed\n";')
-+ print(r' }')
-+ print(r' GLint info_log_length = 0;')
-+ print(r' glGetObjectParameterivARB(shaderObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);')
-+ print(r' if (info_log_length > 1) {')
-+ print(r' GLchar *infoLog = new GLchar[info_log_length];')
-+ print(r' glGetInfoLogARB(shaderObj, info_log_length, NULL, infoLog);')
-+ print(r' retrace::warning(call) << infoLog << "\n";')
-+ print(r' delete [] infoLog;')
-+ print(r' }')
- if function.name == 'glLinkProgramARB':
-- print r' GLint link_status = 0;'
-- print r' glGetObjectParameterivARB(programObj, GL_OBJECT_LINK_STATUS_ARB, &link_status);'
-- print r' if (!link_status) {'
-- print r' retrace::warning(call) << "link failed\n";'
-- print r' }'
-- print r' GLint info_log_length = 0;'
-- print r' glGetObjectParameterivARB(programObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);'
-- print r' if (info_log_length > 1) {'
-- print r' GLchar *infoLog = new GLchar[info_log_length];'
-- print r' glGetInfoLogARB(programObj, info_log_length, NULL, infoLog);'
-- print r' retrace::warning(call) << infoLog << "\n";'
-- print r' delete [] infoLog;'
-- print r' }'
-+ print(r' GLint link_status = 0;')
-+ print(r' glGetObjectParameterivARB(programObj, GL_OBJECT_LINK_STATUS_ARB, &link_status);')
-+ print(r' if (!link_status) {')
-+ print(r' retrace::warning(call) << "link failed\n";')
-+ print(r' }')
-+ print(r' GLint info_log_length = 0;')
-+ print(r' glGetObjectParameterivARB(programObj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &info_log_length);')
-+ print(r' if (info_log_length > 1) {')
-+ print(r' GLchar *infoLog = new GLchar[info_log_length];')
-+ print(r' glGetInfoLogARB(programObj, info_log_length, NULL, infoLog);')
-+ print(r' retrace::warning(call) << infoLog << "\n";')
-+ print(r' delete [] infoLog;')
-+ print(r' }')
- if self.map_function_regex.match(function.name):
-- print r' if (!_result) {'
-- print r' retrace::warning(call) << "failed to map buffer\n";'
-- print r' }'
-+ print(r' if (!_result) {')
-+ print(r' retrace::warning(call) << "failed to map buffer\n";')
-+ print(r' }')
- if self.unmap_function_regex.match(function.name) and function.type is not stdapi.Void:
-- print r' if (!_result) {'
-- print r' retrace::warning(call) << "failed to unmap buffer\n";'
-- print r' }'
-+ print(r' if (!_result) {')
-+ print(r' retrace::warning(call) << "failed to unmap buffer\n";')
-+ print(r' }')
- if function.name in ('glGetAttribLocation', 'glGetAttribLocationARB'):
-- print r' GLint _origResult = call.ret->toSInt();'
-- print r' if (_result != _origResult) {'
-- print r' retrace::warning(call) << "vertex attrib location mismatch " << _origResult << " -> " << _result << "\n";'
-- print r' }'
-+ print(r' GLint _origResult = call.ret->toSInt();')
-+ print(r' if (_result != _origResult) {')
-+ print(r' retrace::warning(call) << "vertex attrib location mismatch " << _origResult << " -> " << _result << "\n";')
-+ print(r' }')
- if function.name in ('glCheckFramebufferStatus', 'glCheckFramebufferStatusEXT', 'glCheckNamedFramebufferStatus', 'glCheckNamedFramebufferStatusEXT'):
-- print r' GLint _origResult = call.ret->toSInt();'
-- print r' if (_origResult == GL_FRAMEBUFFER_COMPLETE &&'
-- print r' _result != GL_FRAMEBUFFER_COMPLETE) {'
-- print r' retrace::warning(call) << "incomplete framebuffer (" << glstate::enumToString(_result) << ")\n";'
-- print r' }'
-- print ' }'
-+ print(r' GLint _origResult = call.ret->toSInt();')
-+ print(r' if (_origResult == GL_FRAMEBUFFER_COMPLETE &&')
-+ print(r' _result != GL_FRAMEBUFFER_COMPLETE) {')
-+ print(r' retrace::warning(call) << "incomplete framebuffer (" << glstate::enumToString(_result) << ")\n";')
-+ print(r' }')
-+ print(' }')
-
- # Query the buffer length for whole buffer mappings
- if self.map_function_regex.match(function.name):
-@@ -566,23 +566,23 @@ class GlRetracer(Retracer):
- assert 'BufferRange' in function.name
- else:
- assert 'BufferRange' not in function.name
-- print r' GLint length = 0;'
-+ print(r' GLint length = 0;')
- if function.name in ('glMapBuffer', 'glMapBufferOES'):
-- print r' glGetBufferParameteriv(target, GL_BUFFER_SIZE, &length);'
-+ print(r' glGetBufferParameteriv(target, GL_BUFFER_SIZE, &length);')
- elif function.name == 'glMapBufferARB':
-- print r' glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, &length);'
-+ print(r' glGetBufferParameterivARB(target, GL_BUFFER_SIZE_ARB, &length);')
- elif function.name == 'glMapNamedBuffer':
-- print r' glGetNamedBufferParameteriv(buffer, GL_BUFFER_SIZE, &length);'
-+ print(r' glGetNamedBufferParameteriv(buffer, GL_BUFFER_SIZE, &length);')
- elif function.name == 'glMapNamedBufferEXT':
-- print r' glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_SIZE, &length);'
-+ print(r' glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_SIZE, &length);')
- elif function.name == 'glMapObjectBufferATI':
-- print r' glGetObjectBufferivATI(buffer, GL_OBJECT_BUFFER_SIZE_ATI, &length);'
-+ print(r' glGetObjectBufferivATI(buffer, GL_OBJECT_BUFFER_SIZE_ATI, &length);')
- else:
- assert False
-
- def extractArg(self, function, arg, arg_type, lvalue, rvalue):
- if function.name in self.array_pointer_function_names and arg.name == 'pointer':
-- print ' %s = static_cast<%s>(retrace::toPointer(%s, true));' % (lvalue, arg_type, rvalue)
-+ print(' %s = static_cast<%s>(retrace::toPointer(%s, true));' % (lvalue, arg_type, rvalue))
- return
-
- if self.draw_elements_function_regex.match(function.name) and arg.name == 'indices' or\
-@@ -594,18 +594,18 @@ class GlRetracer(Retracer):
- # object.
- if self.pack_function_regex.match(function.name) and arg.output:
- assert isinstance(arg_type, (stdapi.Pointer, stdapi.Array, stdapi.Blob, stdapi.Opaque))
-- print ' %s = static_cast<%s>((%s).toPointer());' % (lvalue, arg_type, rvalue)
-+ print(' %s = static_cast<%s>((%s).toPointer());' % (lvalue, arg_type, rvalue))
- return
-
- if (arg.type.depends(glapi.GLlocation) or \
- arg.type.depends(glapi.GLsubroutine)) \
- and 'program' not in function.argNames():
- # Determine the active program for uniforms swizzling
-- print ' GLint program = _getActiveProgram();'
-+ print(' GLint program = _getActiveProgram();')
-
- if arg.type is glapi.GLlocationARB \
- and 'programObj' not in function.argNames():
-- print ' GLhandleARB programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB);'
-+ print(' GLhandleARB programObj = glGetHandleARB(GL_PROGRAM_OBJECT_ARB);')
-
- Retracer.extractArg(self, function, arg, arg_type, lvalue, rvalue)
-
-@@ -613,28 +613,28 @@ class GlRetracer(Retracer):
- if arg.name == 'samples':
- if function.name == 'glRasterSamplesEXT':
- assert arg.type is glapi.GLuint
-- print ' GLint max_samples = 0;'
-- print ' glGetIntegerv(GL_MAX_RASTER_SAMPLES_EXT, &max_samples);'
-- print ' if (samples > static_cast<GLuint>(max_samples)) {'
-- print ' samples = static_cast<GLuint>(max_samples);'
-- print ' }'
-+ print(' GLint max_samples = 0;')
-+ print(' glGetIntegerv(GL_MAX_RASTER_SAMPLES_EXT, &max_samples);')
-+ print(' if (samples > static_cast<GLuint>(max_samples)) {')
-+ print(' samples = static_cast<GLuint>(max_samples);')
-+ print(' }')
- else:
- assert arg.type is glapi.GLsizei
-- print ' GLint max_samples = 0;'
-- print ' glGetIntegerv(GL_MAX_SAMPLES, &max_samples);'
-- print ' if (samples > max_samples) {'
-- print ' samples = max_samples;'
-- print ' }'
-+ print(' GLint max_samples = 0;')
-+ print(' glGetIntegerv(GL_MAX_SAMPLES, &max_samples);')
-+ print(' if (samples > max_samples) {')
-+ print(' samples = max_samples;')
-+ print(' }')
-
- # These parameters are referred beyond the call life-time
- # TODO: Replace ad-hoc solution for bindable parameters with general one
- if function.name in ('glFeedbackBuffer', 'glSelectBuffer') and arg.output:
-- print ' _allocator.bind(%s);' % arg.name
-+ print(' _allocator.bind(%s);' % arg.name)
-
-
-
- if __name__ == '__main__':
-- print r'''
-+ print(r'''
- #include <string.h>
-
- #include "glproc.hpp"
-@@ -692,13 +692,13 @@ static void free_dma_buffer(void *buf)
-
- #endif /* HAVE_VIVANTE_G2D */
-
--'''
-+''')
- api = stdapi.API()
- api.addModule(glapi.glapi)
- retracer = GlRetracer()
- retracer.retraceApi(api)
-
-- print r'''
-+ print(r'''
- static GLint
- _getActiveProgram(void)
- {
-@@ -771,4 +771,4 @@ _validateActiveProgram(trace::Call &call)
- }
- }
-
--'''
-+''')
-diff --git a/retrace/glstate_params.py b/retrace/glstate_params.py
-index fb49ff9a..bc90f66b 100755
---- a/retrace/glstate_params.py
-+++ b/retrace/glstate_params.py
-@@ -134,17 +134,17 @@ class StateGetter(Visitor):
- elem_type = self.inflector.reduced_type(type)
- inflection = self.inflector.inflect(type)
- if inflection.endswith('v' + self.inflector.suffix):
-- print ' %s %s = 0;' % (elem_type, temp_name)
-- print ' %s(%s, &%s);' % (inflection, ', '.join(args), temp_name)
-+ print(' %s %s = 0;' % (elem_type, temp_name))
-+ print(' %s(%s, &%s);' % (inflection, ', '.join(args), temp_name))
- else:
-- print ' %s %s = %s(%s);' % (elem_type, temp_name, inflection, ', '.join(args))
-+ print(' %s %s = %s(%s);' % (elem_type, temp_name, inflection, ', '.join(args)))
- return temp_name
-
- def visitString(self, string, args):
- temp_name = self.temp_name(args)
- inflection = self.inflector.inflect(string)
- assert not inflection.endswith('v' + self.inflector.suffix)
-- print ' %s %s = (%s)%s(%s);' % (string, temp_name, string, inflection, ', '.join(args))
-+ print(' %s %s = (%s)%s(%s);' % (string, temp_name, string, inflection, ', '.join(args)))
- return temp_name
-
- def visitAlias(self, alias, args):
-@@ -166,28 +166,28 @@ class StateGetter(Visitor):
- array_length = array.length
- if isinstance(array_length, int):
- # Static integer length
-- print ' %s %s[%s + 1];' % (elem_type, temp_name, array_length)
-+ print(' %s %s[%s + 1];' % (elem_type, temp_name, array_length))
- else:
- # Put the length in a variable to avoid recomputing it every time
-- print ' size_t _%s_length = %s;' % (temp_name, array_length)
-+ print(' size_t _%s_length = %s;' % (temp_name, array_length))
- array_length = '_%s_length' % temp_name
- # Allocate a dynamic sized array
-- print ' %s *%s = _allocator.alloc<%s>(%s + 1);' % (elem_type, temp_name, elem_type, array_length)
-- print ' memset(%s, 0, %s * sizeof *%s);' % (temp_name, array_length, temp_name)
-- print ' %s[%s] = (%s)0xdeadc0de;' % (temp_name, array_length, elem_type)
-- print ' if (%s) {' % array_length
-- print ' %s(%s, %s);' % (inflection, ', '.join(args), temp_name)
-- print ' }'
-+ print(' %s *%s = _allocator.alloc<%s>(%s + 1);' % (elem_type, temp_name, elem_type, array_length))
-+ print(' memset(%s, 0, %s * sizeof *%s);' % (temp_name, array_length, temp_name))
-+ print(' %s[%s] = (%s)0xdeadc0de;' % (temp_name, array_length, elem_type))
-+ print(' if (%s) {' % array_length)
-+ print(' %s(%s, %s);' % (inflection, ', '.join(args), temp_name))
-+ print(' }')
- # Simple buffer overflow detection
-- print ' assert(%s[%s] == (%s)0xdeadc0de);' % (temp_name, array_length, elem_type)
-+ print(' assert(%s[%s] == (%s)0xdeadc0de);' % (temp_name, array_length, elem_type))
- return temp_name
-
- def visitOpaque(self, pointer, args):
- temp_name = self.temp_name(args)
- inflection = self.inflector.inflect(pointer)
- assert inflection.endswith('v' + self.inflector.suffix)
-- print ' GLvoid *%s;' % temp_name
-- print ' %s(%s, &%s);' % (inflection, ', '.join(args), temp_name)
-+ print(' GLvoid *%s;' % temp_name)
-+ print(' %s(%s, &%s);' % (inflection, ', '.join(args), temp_name))
- return temp_name
-
-
-@@ -236,26 +236,26 @@ class JsonWriter(Visitor):
-
- def visitLiteral(self, literal, instance):
- if literal.kind == 'Bool':
-- print ' writer.writeBool(%s);' % instance
-+ print(' writer.writeBool(%s);' % instance)
- elif literal.kind in ('SInt', 'Uint'):
-- print ' writer.writeInt(%s);' % instance
-+ print(' writer.writeInt(%s);' % instance)
- elif literal.kind in ('Float', 'Double'):
-- print ' writer.writeFloat(%s);' % instance
-+ print(' writer.writeFloat(%s);' % instance)
- else:
- raise NotImplementedError
-
- def visitString(self, string, instance):
- assert string.length is None
-- print ' writer.writeString((const char *)%s);' % instance
-+ print(' writer.writeString((const char *)%s);' % instance)
-
- def visitEnum(self, enum, instance):
- if enum is GLboolean:
-- print ' dumpBoolean(writer, %s);' % instance
-+ print(' dumpBoolean(writer, %s);' % instance)
- elif enum is GLenum:
-- print ' dumpEnum(writer, %s);' % instance
-+ print(' dumpEnum(writer, %s);' % instance)
- else:
- assert False
-- print ' writer.writeInt(%s);' % instance
-+ print(' writer.writeInt(%s);' % instance)
-
- def visitBitmask(self, bitmask, instance):
- raise NotImplementedError
-@@ -264,18 +264,18 @@ class JsonWriter(Visitor):
- self.visit(alias.type, instance)
-
- def visitOpaque(self, opaque, instance):
-- print ' writer.writeInt((size_t)%s);' % instance
-+ print(' writer.writeInt((size_t)%s);' % instance)
-
- __index = 0
-
- def visitArray(self, array, instance):
- index = '_i%u' % JsonWriter.__index
- JsonWriter.__index += 1
-- print ' writer.beginArray();'
-- print ' for (unsigned %s = 0; %s < %s; ++%s) {' % (index, index, array.length, index)
-+ print(' writer.beginArray();')
-+ print(' for (unsigned %s = 0; %s < %s; ++%s) {' % (index, index, array.length, index))
- self.visit(array.type, '%s[%s]' % (instance, index))
-- print ' }'
-- print ' writer.endArray();'
-+ print(' }')
-+ print(' writer.endArray();')
-
-
-
-@@ -287,75 +287,75 @@ class StateDumper:
- pass
-
- def dump(self):
-- print '#include <assert.h>'
-- print '#include <string.h>'
-- print
-- print '#include "state_writer.hpp"'
-- print '#include "scoped_allocator.hpp"'
-- print '#include "glproc.hpp"'
-- print '#include "glsize.hpp"'
-- print '#include "glstate.hpp"'
-- print '#include "glstate_internal.hpp"'
-- print
-- print 'namespace glstate {'
-- print
--
-- print 'const char *'
-- print 'enumToString(GLenum pname)'
-- print '{'
-- print ' switch (pname) {'
-+ print('#include <assert.h>')
-+ print('#include <string.h>')
-+ print()
-+ print('#include "state_writer.hpp"')
-+ print('#include "scoped_allocator.hpp"')
-+ print('#include "glproc.hpp"')
-+ print('#include "glsize.hpp"')
-+ print('#include "glstate.hpp"')
-+ print('#include "glstate_internal.hpp"')
-+ print()
-+ print('namespace glstate {')
-+ print()
-+
-+ print('const char *')
-+ print('enumToString(GLenum pname)')
-+ print('{')
-+ print(' switch (pname) {')
- for name in GLenum.values:
-- print ' case %s:' % name
-- print ' return "%s";' % name
-- print ' default:'
-- print ' return NULL;'
-- print ' }'
-- print '}'
-- print
--
-- print 'static void'
-- print 'dumpTextureTargetParameters(StateWriter &writer, Context &context, GLenum target, GLuint texture)'
-- print '{'
-- print ' writer.beginMember(enumToString(target));'
-- print ' writer.beginObject();'
-- print ' dumpObjectLabel(writer, context, GL_TEXTURE, texture, "GL_TEXTURE_LABEL");'
-+ print(' case %s:' % name)
-+ print(' return "%s";' % name)
-+ print(' default:')
-+ print(' return NULL;')
-+ print(' }')
-+ print('}')
-+ print()
-+
-+ print('static void')
-+ print('dumpTextureTargetParameters(StateWriter &writer, Context &context, GLenum target, GLuint texture)')
-+ print('{')
-+ print(' writer.beginMember(enumToString(target));')
-+ print(' writer.beginObject();')
-+ print(' dumpObjectLabel(writer, context, GL_TEXTURE, texture, "GL_TEXTURE_LABEL");')
- # ARB_texture_buffer forbids glGetTexParameter and
- # glGetTexLevelParameter for TEXTURE_BUFFER, but
- # ARB_texture_buffer_range introduced parameters which can be queries
- # with glGetTexLevelParameter...
-- print ' if (target != GL_TEXTURE_BUFFER) {'
-+ print(' if (target != GL_TEXTURE_BUFFER) {')
- self.dump_atoms(glGetTexParameter, 'target')
-- print ' }'
-- print ' if (!context.ES) {'
-- print ' GLenum levelTarget;'
-- print ' if (target == GL_TEXTURE_CUBE_MAP ||'
-- print ' target == GL_TEXTURE_CUBE_MAP_ARRAY) {'
-- print ' // Must pick a face'
-- print ' levelTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X;'
-- print ' } else {'
-- print ' levelTarget = target;'
-- print ' }'
-+ print(' }')
-+ print(' if (!context.ES) {')
-+ print(' GLenum levelTarget;')
-+ print(' if (target == GL_TEXTURE_CUBE_MAP ||')
-+ print(' target == GL_TEXTURE_CUBE_MAP_ARRAY) {')
-+ print(' // Must pick a face')
-+ print(' levelTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X;')
-+ print(' } else {')
-+ print(' levelTarget = target;')
-+ print(' }')
- self.dump_atoms(glGetTexLevelParameter, 'levelTarget', '0')
-- print ' }'
-- print ' writer.endObject();'
-- print ' writer.endMember(); // target'
-- print '}'
-- print
--
-- print 'static void'
-- print 'dumpFramebufferAttachementParameters(StateWriter &writer, Context &context, GLenum target, GLenum attachment)'
-- print '{'
-+ print(' }')
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // target')
-+ print('}')
-+ print()
-+
-+ print('static void')
-+ print('dumpFramebufferAttachementParameters(StateWriter &writer, Context &context, GLenum target, GLenum attachment)')
-+ print('{')
- self.dump_attachment_parameters('target', 'attachment')
-- print '}'
-- print
--
-- print 'void dumpParameters(StateWriter &writer, Context &context)'
-- print '{'
-- print ' ScopedAllocator _allocator;'
-- print ' (void)_allocator;'
-- print
-- print ' writer.beginMember("parameters");'
-- print ' writer.beginObject();'
-+ print('}')
-+ print()
-+
-+ print('void dumpParameters(StateWriter &writer, Context &context)')
-+ print('{')
-+ print(' ScopedAllocator _allocator;')
-+ print(' (void)_allocator;')
-+ print()
-+ print(' writer.beginMember("parameters");')
-+ print(' writer.beginObject();')
-
- self.dump_atoms(glGet)
-
-@@ -368,58 +368,58 @@ class StateDumper:
- self.dump_framebuffer_parameters()
- self.dump_labels()
-
-- print ' writer.endObject();'
-- print ' writer.endMember(); // parameters'
-- print '}'
-- print
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // parameters')
-+ print('}')
-+ print()
-
-- print '} /*namespace glstate */'
-+ print('} /*namespace glstate */')
-
- def dump_material_params(self):
-- print ' if (!context.ES) {'
-+ print(' if (!context.ES) {')
- for face in ['GL_FRONT', 'GL_BACK']:
-- print ' writer.beginMember("%s");' % face
-- print ' writer.beginObject();'
-+ print(' writer.beginMember("%s");' % face)
-+ print(' writer.beginObject();')
- self.dump_atoms(glGetMaterial, face)
-- print ' writer.endObject();'
-- print ' }'
-- print
-+ print(' writer.endObject();')
-+ print(' }')
-+ print()
-
- def dump_light_params(self):
-- print ' GLint max_lights = 0;'
-- print ' _glGetIntegerv(GL_MAX_LIGHTS, &max_lights);'
-- print ' for (GLint index = 0; index < max_lights; ++index) {'
-- print ' GLenum light = GL_LIGHT0 + index;'
-- print ' if (glIsEnabled(light)) {'
-- print ' char name[32];'
-- print ' snprintf(name, sizeof name, "GL_LIGHT%i", index);'
-- print ' writer.beginMember(name);'
-- print ' writer.beginObject();'
-+ print(' GLint max_lights = 0;')
-+ print(' _glGetIntegerv(GL_MAX_LIGHTS, &max_lights);')
-+ print(' for (GLint index = 0; index < max_lights; ++index) {')
-+ print(' GLenum light = GL_LIGHT0 + index;')
-+ print(' if (glIsEnabled(light)) {')
-+ print(' char name[32];')
-+ print(' snprintf(name, sizeof name, "GL_LIGHT%i", index);')
-+ print(' writer.beginMember(name);')
-+ print(' writer.beginObject();')
- self.dump_atoms(glGetLight, ' GL_LIGHT0 + index')
-- print ' writer.endObject();'
-- print ' writer.endMember(); // GL_LIGHTi'
-- print ' }'
-- print ' }'
-- print
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // GL_LIGHTi')
-+ print(' }')
-+ print(' }')
-+ print()
-
- def dump_sampler_params(self):
-- print ' // GL_SAMPLER_BINDING'
-- print ' if (context.ARB_sampler_objects) {'
-- print ' GLint sampler_binding = 0;'
-- print ' glGetIntegerv(GL_SAMPLER_BINDING, &sampler_binding);'
-- print ' writer.beginMember("GL_SAMPLER_BINDING");'
-- print ' writer.writeInt(sampler_binding);'
-- print ' writer.endMember();'
-- print ' if (sampler_binding) {'
-- print ' writer.beginMember("GL_SAMPLER");'
-- print ' writer.beginObject();'
-- print ' dumpObjectLabel(writer, context, GL_SAMPLER, sampler_binding, "GL_SAMPLER_LABEL");'
-+ print(' // GL_SAMPLER_BINDING')
-+ print(' if (context.ARB_sampler_objects) {')
-+ print(' GLint sampler_binding = 0;')
-+ print(' glGetIntegerv(GL_SAMPLER_BINDING, &sampler_binding);')
-+ print(' writer.beginMember("GL_SAMPLER_BINDING");')
-+ print(' writer.writeInt(sampler_binding);')
-+ print(' writer.endMember();')
-+ print(' if (sampler_binding) {')
-+ print(' writer.beginMember("GL_SAMPLER");')
-+ print(' writer.beginObject();')
-+ print(' dumpObjectLabel(writer, context, GL_SAMPLER, sampler_binding, "GL_SAMPLER_LABEL");')
- for _, _, name in glGetSamplerParameter.iter():
- self.dump_atom(glGetSamplerParameter, 'sampler_binding', name)
-- print ' writer.endObject();'
-- print ' writer.endMember(); // GL_SAMPLER'
-- print ' }'
-- print ' }'
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // GL_SAMPLER')
-+ print(' }')
-+ print(' }')
-
- def texenv_param_target(self, name):
- if name == 'GL_TEXTURE_LOD_BIAS':
-@@ -431,34 +431,34 @@ class StateDumper:
-
- def dump_texenv_params(self):
- for target in ['GL_TEXTURE_ENV', 'GL_TEXTURE_FILTER_CONTROL', 'GL_POINT_SPRITE']:
-- print ' if (!context.ES) {'
-- print ' writer.beginMember("%s");' % target
-- print ' writer.beginObject();'
-+ print(' if (!context.ES) {')
-+ print(' writer.beginMember("%s");' % target)
-+ print(' writer.beginObject();')
- for _, _, name in glGetTexEnv.iter():
- if self.texenv_param_target(name) == target:
- self.dump_atom(glGetTexEnv, target, name)
-- print ' writer.endObject();'
-- print ' }'
-+ print(' writer.endObject();')
-+ print(' }')
-
- def dump_vertex_attribs(self):
-- print ' GLint max_vertex_attribs = 0;'
-- print ' _glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);'
-- print ' for (GLint index = 0; index < max_vertex_attribs; ++index) {'
-- print ' char name[32];'
-- print ' snprintf(name, sizeof name, "GL_VERTEX_ATTRIB_ARRAY%i", index);'
-- print ' writer.beginMember(name);'
-- print ' writer.beginObject();'
-+ print(' GLint max_vertex_attribs = 0;')
-+ print(' _glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &max_vertex_attribs);')
-+ print(' for (GLint index = 0; index < max_vertex_attribs; ++index) {')
-+ print(' char name[32];')
-+ print(' snprintf(name, sizeof name, "GL_VERTEX_ATTRIB_ARRAY%i", index);')
-+ print(' writer.beginMember(name);')
-+ print(' writer.beginObject();')
- self.dump_atoms(glGetVertexAttrib, 'index')
-
- # Dump vertex attrib buffer label
-- print ' GLint buffer_binding = 0;'
-- print ' glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &buffer_binding);'
-- print ' dumpObjectLabel(writer, context, GL_BUFFER, buffer_binding, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_LABEL");'
-+ print(' GLint buffer_binding = 0;')
-+ print(' glGetVertexAttribiv(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, &buffer_binding);')
-+ print(' dumpObjectLabel(writer, context, GL_BUFFER, buffer_binding, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_LABEL");')
-
-- print ' writer.endObject();'
-- print ' writer.endMember(); // GL_VERTEX_ATTRIB_ARRAYi'
-- print ' }'
-- print
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // GL_VERTEX_ATTRIB_ARRAYi')
-+ print(' }')
-+ print()
-
- object_bindings = [
- ('GL_BUFFER', 'GL_ARRAY_BUFFER_BINDING'),
-@@ -488,11 +488,11 @@ class StateDumper:
- member_name = object_binding.replace('BINDING', 'LABEL')
- if member_name == object_binding:
- member_name += '_LABEL'
-- print ' {'
-- print ' GLint binding = 0;'
-- print ' glGetIntegerv(%s, &binding);' % object_binding
-- print ' dumpObjectLabel(writer, context, %s, binding, "%s");' % (object_type, member_name)
-- print ' }'
-+ print(' {')
-+ print(' GLint binding = 0;')
-+ print(' glGetIntegerv(%s, &binding);' % object_binding)
-+ print(' dumpObjectLabel(writer, context, %s, binding, "%s");' % (object_type, member_name))
-+ print(' }')
-
- program_targets = [
- 'GL_FRAGMENT_PROGRAM_ARB',
-@@ -501,12 +501,12 @@ class StateDumper:
-
- def dump_program_params(self):
- for target in self.program_targets:
-- print ' if (glIsEnabled(%s)) {' % target
-- print ' writer.beginMember("%s");' % target
-- print ' writer.beginObject();'
-+ print(' if (glIsEnabled(%s)) {' % target)
-+ print(' writer.beginMember("%s");' % target)
-+ print(' writer.beginObject();')
- self.dump_atoms(glGetProgramARB, target)
-- print ' writer.endObject();'
-- print ' }'
-+ print(' writer.endObject();')
-+ print(' }')
-
- buffer_targets = [
- ('GL_ARRAY_BUFFER', 'GL_ARRAY_BUFFER_BINDING', None),
-@@ -529,135 +529,135 @@ class StateDumper:
- def dump_buffer_parameters(self):
- # general binding points
- for target, binding, max_bindings in self.buffer_targets:
-- print ' // %s' % target
-- print ' {'
-- print ' writer.beginMember("%s");' % target
-- print ' writer.beginObject();'
-- print ' GLint buffer = 0;'
-- print ' glGetIntegerv(%s, &buffer);' % binding
-- print ' if (buffer) {'
-+ print(' // %s' % target)
-+ print(' {')
-+ print(' writer.beginMember("%s");' % target)
-+ print(' writer.beginObject();')
-+ print(' GLint buffer = 0;')
-+ print(' glGetIntegerv(%s, &buffer);' % binding)
-+ print(' if (buffer) {')
- self.dump_atoms(glGetBufferParameter, target)
-- print ' }'
-+ print(' }')
- if max_bindings is not None:
- # indexed binding points
- start = target + '_START'
- size = target + '_SIZE'
-- print ' GLint max_bindings = 0;'
-- print ' glGetIntegerv(%s, &max_bindings);' % max_bindings
-- print ' if (max_bindings) {'
-- print ' writer.beginMember("i");'
-- print ' writer.beginArray();'
-- print ' for (GLint i = 0; i < max_bindings; ++i) {'
-- print ' writer.beginObject();'
-+ print(' GLint max_bindings = 0;')
-+ print(' glGetIntegerv(%s, &max_bindings);' % max_bindings)
-+ print(' if (max_bindings) {')
-+ print(' writer.beginMember("i");')
-+ print(' writer.beginArray();')
-+ print(' for (GLint i = 0; i < max_bindings; ++i) {')
-+ print(' writer.beginObject();')
- for pname in [binding, start, size]:
- self.dump_atom(glGet_i, pname, 'i')
-- print ' writer.endObject();'
-- print ' }'
-- print ' writer.endArray();'
-- print ' writer.endMember();'
-- print ' }'
-+ print(' writer.endObject();')
-+ print(' }')
-+ print(' writer.endArray();')
-+ print(' writer.endMember();')
-+ print(' }')
-
-- print ' writer.endObject();'
-- print ' writer.endMember();'
-- print ' }'
-- print
-+ print(' writer.endObject();')
-+ print(' writer.endMember();')
-+ print(' }')
-+ print()
-
- def dump_texture_parameters(self):
-- print ' {'
-- print ' GLint active_texture = GL_TEXTURE0;'
-- print ' glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture);'
-- print ' GLint max_texture_coords = 0;'
-- print ' if (!context.core) {'
-- print ' glGetIntegerv(GL_MAX_TEXTURE_COORDS, &max_texture_coords);'
-- print ' }'
-- print ' GLint max_combined_texture_image_units = 0;'
-- print ' glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &max_combined_texture_image_units);'
-- print ' max_combined_texture_image_units = std::max(max_combined_texture_image_units, 2);'
-- print ' GLint max_units = std::max(max_combined_texture_image_units, max_texture_coords);'
-- print ' for (GLint unit = 0; unit < max_units; ++unit) {'
-- print ' char name[32];'
-- print ' snprintf(name, sizeof name, "GL_TEXTURE%i", unit);'
-- print ' writer.beginMember(name);'
-- print ' glActiveTexture(GL_TEXTURE0 + unit);'
-- print ' writer.beginObject();'
-- print
-+ print(' {')
-+ print(' GLint active_texture = GL_TEXTURE0;')
-+ print(' glGetIntegerv(GL_ACTIVE_TEXTURE, &active_texture);')
-+ print(' GLint max_texture_coords = 0;')
-+ print(' if (!context.core) {')
-+ print(' glGetIntegerv(GL_MAX_TEXTURE_COORDS, &max_texture_coords);')
-+ print(' }')
-+ print(' GLint max_combined_texture_image_units = 0;')
-+ print(' glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &max_combined_texture_image_units);')
-+ print(' max_combined_texture_image_units = std::max(max_combined_texture_image_units, 2);')
-+ print(' GLint max_units = std::max(max_combined_texture_image_units, max_texture_coords);')
-+ print(' for (GLint unit = 0; unit < max_units; ++unit) {')
-+ print(' char name[32];')
-+ print(' snprintf(name, sizeof name, "GL_TEXTURE%i", unit);')
-+ print(' writer.beginMember(name);')
-+ print(' glActiveTexture(GL_TEXTURE0 + unit);')
-+ print(' writer.beginObject();')
-+ print()
- self.dump_atoms(glGet_texture)
-- print
-- print ' for (unsigned i = 0; i < numTextureTargets; ++i) {'
-- print ' GLenum target = textureTargets[i];'
-- print ' GLboolean enabled = GL_FALSE;'
-- print ' if (unit < max_texture_coords &&'
-- print ' (target == GL_TEXTURE_1D ||'
-- print ' target == GL_TEXTURE_2D ||'
-- print ' target == GL_TEXTURE_3D ||'
-- print ' target == GL_TEXTURE_CUBE_MAP ||'
-- print ' target == GL_TEXTURE_RECTANGLE)) {'
-- print ' glGetBooleanv(target, &enabled);'
-- print ' writer.beginMember(enumToString(target));'
-- print ' dumpBoolean(writer, enabled);'
-- print ' writer.endMember();'
-- print ' }'
-- print ' GLint texture = 0;'
-- print ' GLenum binding = getTextureBinding(target);'
-- print ' glGetIntegerv(binding, &texture);'
-- print ' if (enabled || texture) {'
-- print ' dumpTextureTargetParameters(writer, context, target, texture);'
-- print ' }'
-- print ' }'
-- print
-+ print()
-+ print(' for (unsigned i = 0; i < numTextureTargets; ++i) {')
-+ print(' GLenum target = textureTargets[i];')
-+ print(' GLboolean enabled = GL_FALSE;')
-+ print(' if (unit < max_texture_coords &&')
-+ print(' (target == GL_TEXTURE_1D ||')
-+ print(' target == GL_TEXTURE_2D ||')
-+ print(' target == GL_TEXTURE_3D ||')
-+ print(' target == GL_TEXTURE_CUBE_MAP ||')
-+ print(' target == GL_TEXTURE_RECTANGLE)) {')
-+ print(' glGetBooleanv(target, &enabled);')
-+ print(' writer.beginMember(enumToString(target));')
-+ print(' dumpBoolean(writer, enabled);')
-+ print(' writer.endMember();')
-+ print(' }')
-+ print(' GLint texture = 0;')
-+ print(' GLenum binding = getTextureBinding(target);')
-+ print(' glGetIntegerv(binding, &texture);')
-+ print(' if (enabled || texture) {')
-+ print(' dumpTextureTargetParameters(writer, context, target, texture);')
-+ print(' }')
-+ print(' }')
-+ print()
- self.dump_sampler_params()
-- print
-- print ' if (unit < max_texture_coords) {'
-+ print()
-+ print(' if (unit < max_texture_coords) {')
- self.dump_texenv_params()
-- print ' }'
-- print ' writer.endObject();'
-- print ' writer.endMember(); // GL_TEXTUREi'
-- print ' }'
-- print ' glActiveTexture(active_texture);'
-- print ' }'
-- print
-+ print(' }')
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // GL_TEXTUREi')
-+ print(' }')
-+ print(' glActiveTexture(active_texture);')
-+ print(' }')
-+ print()
-
- def dump_framebuffer_parameters(self):
-- print ' {'
-- print ' GLint max_color_attachments = 0;'
-- print ' glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &max_color_attachments);'
-- print ' GLint framebuffer;'
-+ print(' {')
-+ print(' GLint max_color_attachments = 0;')
-+ print(' glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &max_color_attachments);')
-+ print(' GLint framebuffer;')
- for target, binding in framebuffer_targets:
-- print ' // %s' % target
-- print ' framebuffer = 0;'
-- print ' glGetIntegerv(%s, &framebuffer);' % binding
-- print ' if (framebuffer) {'
-- print ' writer.beginMember("%s");' % target
-- print ' writer.beginObject();'
-- print ' dumpObjectLabel(writer, context, GL_FRAMEBUFFER, framebuffer, "GL_FRAMEBUFFER_LABEL");'
-- print ' for (GLint i = 0; i < max_color_attachments; ++i) {'
-- print ' GLint color_attachment = GL_COLOR_ATTACHMENT0 + i;'
-- print ' dumpFramebufferAttachementParameters(writer, context, %s, color_attachment);' % target
-- print ' }'
-- print ' dumpFramebufferAttachementParameters(writer, context, %s, GL_DEPTH_ATTACHMENT);' % target
-- print ' dumpFramebufferAttachementParameters(writer, context, %s, GL_STENCIL_ATTACHMENT);' % target
-- print ' writer.endObject();'
-- print ' writer.endMember(); // %s' % target
-- print ' }'
-- print
-- print ' }'
-- print
-+ print(' // %s' % target)
-+ print(' framebuffer = 0;')
-+ print(' glGetIntegerv(%s, &framebuffer);' % binding)
-+ print(' if (framebuffer) {')
-+ print(' writer.beginMember("%s");' % target)
-+ print(' writer.beginObject();')
-+ print(' dumpObjectLabel(writer, context, GL_FRAMEBUFFER, framebuffer, "GL_FRAMEBUFFER_LABEL");')
-+ print(' for (GLint i = 0; i < max_color_attachments; ++i) {')
-+ print(' GLint color_attachment = GL_COLOR_ATTACHMENT0 + i;')
-+ print(' dumpFramebufferAttachementParameters(writer, context, %s, color_attachment);' % target)
-+ print(' }')
-+ print(' dumpFramebufferAttachementParameters(writer, context, %s, GL_DEPTH_ATTACHMENT);' % target)
-+ print(' dumpFramebufferAttachementParameters(writer, context, %s, GL_STENCIL_ATTACHMENT);' % target)
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // %s' % target)
-+ print(' }')
-+ print()
-+ print(' }')
-+ print()
-
- def dump_attachment_parameters(self, target, attachment):
-- print ' {'
-- print ' GLint object_type = GL_NONE;'
-- print ' glGetFramebufferAttachmentParameteriv(%s, %s, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &object_type);' % (target, attachment)
-- print ' if (object_type != GL_NONE) {'
-- print ' writer.beginMember(enumToString(%s));' % attachment
-- print ' writer.beginObject();'
-+ print(' {')
-+ print(' GLint object_type = GL_NONE;')
-+ print(' glGetFramebufferAttachmentParameteriv(%s, %s, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &object_type);' % (target, attachment))
-+ print(' if (object_type != GL_NONE) {')
-+ print(' writer.beginMember(enumToString(%s));' % attachment)
-+ print(' writer.beginObject();')
- self.dump_atoms(glGetFramebufferAttachmentParameter, target, attachment)
-- print ' GLint object_name = 0;'
-- print ' glGetFramebufferAttachmentParameteriv(%s, %s, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &object_name);' % (target, attachment)
-- print ' dumpObjectLabel(writer, context, object_type, object_name, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_LABEL");'
-- print ' writer.endObject();'
-- print ' writer.endMember(); // GL_x_ATTACHMENT'
-- print ' }'
-- print ' }'
-+ print(' GLint object_name = 0;')
-+ print(' glGetFramebufferAttachmentParameteriv(%s, %s, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &object_name);' % (target, attachment))
-+ print(' dumpObjectLabel(writer, context, object_type, object_name, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_LABEL");')
-+ print(' writer.endObject();')
-+ print(' writer.endMember(); // GL_x_ATTACHMENT')
-+ print(' }')
-+ print(' }')
-
- def dump_atoms(self, getter, *args):
- for _, _, name in getter.iter():
-@@ -666,20 +666,20 @@ class StateDumper:
- def dump_atom(self, getter, *args):
- name = args[getter.pnameIdx]
-
-- print ' // %s' % name
-- print ' {'
-- print ' flushErrors();'
-+ print(' // %s' % name)
-+ print(' {')
-+ print(' flushErrors();')
- type, value = getter(*args)
-- print ' if (glGetError() != GL_NO_ERROR) {'
-+ print(' if (glGetError() != GL_NO_ERROR) {')
- #print ' std::cerr << "warning: %s(%s) failed\\n";' % (inflection, name)
-- print ' flushErrors();'
-- print ' } else {'
-- print ' writer.beginMember("%s");' % name
-+ print(' flushErrors();')
-+ print(' } else {')
-+ print(' writer.beginMember("%s");' % name)
- JsonWriter().visit(type, value)
-- print ' writer.endMember();'
-- print ' }'
-- print ' }'
-- print
-+ print(' writer.endMember();')
-+ print(' }')
-+ print(' }')
-+ print()
-
-
- if __name__ == '__main__':
-diff --git a/retrace/retrace.py b/retrace/retrace.py
-index 164944ed..0149817c 100644
---- a/retrace/retrace.py
-+++ b/retrace/retrace.py
-@@ -69,10 +69,10 @@ class ValueAllocator(stdapi.Visitor):
- pass
-
- def visitArray(self, array, lvalue, rvalue):
-- print ' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, array.type, rvalue)
-+ print(' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, array.type, rvalue))
-
- def visitPointer(self, pointer, lvalue, rvalue):
-- print ' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, pointer.type, rvalue)
-+ print(' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, pointer.type, rvalue))
-
- def visitIntPointer(self, pointer, lvalue, rvalue):
- pass
-@@ -109,7 +109,7 @@ class ValueAllocator(stdapi.Visitor):
- class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
-
- def visitLiteral(self, literal, lvalue, rvalue):
-- print ' %s = (%s).to%s();' % (lvalue, rvalue, literal.kind)
-+ print(' %s = (%s).to%s();' % (lvalue, rvalue, literal.kind))
-
- def visitConst(self, const, lvalue, rvalue):
- self.visit(const.type, lvalue, rvalue)
-@@ -118,7 +118,7 @@ class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
- self.visit(alias.type, lvalue, rvalue)
-
- def visitEnum(self, enum, lvalue, rvalue):
-- print ' %s = static_cast<%s>((%s).toSInt());' % (lvalue, enum, rvalue)
-+ print(' %s = static_cast<%s>((%s).toSInt());' % (lvalue, enum, rvalue))
-
- def visitBitmask(self, bitmask, lvalue, rvalue):
- self.visit(bitmask.type, lvalue, rvalue)
-@@ -127,50 +127,50 @@ class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
- tmp = '_a_' + array.tag + '_' + str(self.seq)
- self.seq += 1
-
-- print ' const trace::Array *%s = (%s).toArray();' % (tmp, rvalue)
-- print ' if (%s) {' % (tmp,)
-+ print(' const trace::Array *%s = (%s).toArray();' % (tmp, rvalue))
-+ print(' if (%s) {' % (tmp,))
-
- length = '%s->values.size()' % (tmp,)
- if self.insideStruct:
- if isinstance(array.length, int):
- # Member is an array
-- print r' static_assert( std::is_array< std::remove_reference< decltype( %s ) >::type >::value , "lvalue must be an array" );' % lvalue
-- print r' static_assert( std::extent< std::remove_reference< decltype( %s ) >::type >::value == %s, "array size mismatch" );' % (lvalue, array.length)
-- print r' assert( %s );' % (tmp,)
-- print r' assert( %s->size() == %s );' % (tmp, array.length)
-+ print(r' static_assert( std::is_array< std::remove_reference< decltype( %s ) >::type >::value , "lvalue must be an array" );' % lvalue)
-+ print(r' static_assert( std::extent< std::remove_reference< decltype( %s ) >::type >::value == %s, "array size mismatch" );' % (lvalue, array.length))
-+ print(r' assert( %s );' % (tmp,))
-+ print(r' assert( %s->size() == %s );' % (tmp, array.length))
- length = str(array.length)
- else:
- # Member is a pointer to an array, hence must be allocated
-- print r' static_assert( std::is_pointer< std::remove_reference< decltype( %s ) >::type >::value , "lvalue must be a pointer" );' % lvalue
-- print r' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, array.type, rvalue)
-+ print(r' static_assert( std::is_pointer< std::remove_reference< decltype( %s ) >::type >::value , "lvalue must be a pointer" );' % lvalue)
-+ print(r' %s = _allocator.allocArray<%s>(&%s);' % (lvalue, array.type, rvalue))
-
- index = '_j' + array.tag
-- print ' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length)
-+ print(' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length))
- try:
- self.visit(array.type, '%s[%s]' % (lvalue, index), '*%s->values[%s]' % (tmp, index))
- finally:
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-
- def visitPointer(self, pointer, lvalue, rvalue):
- tmp = '_a_' + pointer.tag + '_' + str(self.seq)
- self.seq += 1
-
-- print ' if (%s) {' % (lvalue,)
-- print ' const trace::Array *%s = (%s).toArray();' % (tmp, rvalue)
-+ print(' if (%s) {' % (lvalue,))
-+ print(' const trace::Array *%s = (%s).toArray();' % (tmp, rvalue))
- try:
- self.visit(pointer.type, '%s[0]' % (lvalue,), '*%s->values[0]' % (tmp,))
- finally:
-- print ' }'
-+ print(' }')
-
- def visitIntPointer(self, pointer, lvalue, rvalue):
-- print ' %s = static_cast<%s>((%s).toPointer());' % (lvalue, pointer, rvalue)
-+ print(' %s = static_cast<%s>((%s).toPointer());' % (lvalue, pointer, rvalue))
-
- def visitObjPointer(self, pointer, lvalue, rvalue):
-- print ' %s = retrace::asObjPointer<%s>(call, %s);' % (lvalue, pointer.type, rvalue)
-+ print(' %s = retrace::asObjPointer<%s>(call, %s);' % (lvalue, pointer.type, rvalue))
-
- def visitLinearPointer(self, pointer, lvalue, rvalue):
-- print ' %s = static_cast<%s>(retrace::toPointer(%s));' % (lvalue, pointer, rvalue)
-+ print(' %s = static_cast<%s>(retrace::toPointer(%s));' % (lvalue, pointer, rvalue))
-
- def visitReference(self, reference, lvalue, rvalue):
- self.visit(reference.type, lvalue, rvalue);
-@@ -179,23 +179,23 @@ class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
- #OpaqueValueDeserializer().visit(handle.type, lvalue, rvalue);
- self.visit(handle.type, lvalue, rvalue);
- new_lvalue = lookupHandle(handle, lvalue)
-- print ' if (retrace::verbosity >= 2) {'
-- print ' std::cout << "%s " << size_t(%s) << " <- " << size_t(%s) << "\\n";' % (handle.name, lvalue, new_lvalue)
-- print ' }'
-+ print(' if (retrace::verbosity >= 2) {')
-+ print(' std::cout << "%s " << size_t(%s) << " <- " << size_t(%s) << "\\n";' % (handle.name, lvalue, new_lvalue))
-+ print(' }')
- if (new_lvalue.startswith('_program_map') or new_lvalue.startswith('_shader_map')):
-- print 'if (glretrace::supportsARBShaderObjects) {'
-- print ' %s = _handleARB_map[%s];' % (lvalue, lvalue)
-- print '} else {'
-- print ' %s = %s;' % (lvalue, new_lvalue)
-- print '}'
-+ print('if (glretrace::supportsARBShaderObjects) {')
-+ print(' %s = _handleARB_map[%s];' % (lvalue, lvalue))
-+ print('} else {')
-+ print(' %s = %s;' % (lvalue, new_lvalue))
-+ print('}')
- else:
-- print ' %s = %s;' % (lvalue, new_lvalue)
-+ print(' %s = %s;' % (lvalue, new_lvalue))
-
- def visitBlob(self, blob, lvalue, rvalue):
-- print ' %s = static_cast<%s>((%s).toPointer());' % (lvalue, blob, rvalue)
-+ print(' %s = static_cast<%s>((%s).toPointer());' % (lvalue, blob, rvalue))
-
- def visitString(self, string, lvalue, rvalue):
-- print ' %s = (%s)((%s).toString());' % (lvalue, string.expr, rvalue)
-+ print(' %s = (%s)((%s).toString());' % (lvalue, string.expr, rvalue))
-
- seq = 0
-
-@@ -207,8 +207,8 @@ class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
-
- self.insideStruct += 1
-
-- print ' const trace::Struct *%s = (%s).toStruct();' % (tmp, rvalue)
-- print ' assert(%s);' % (tmp)
-+ print(' const trace::Struct *%s = (%s).toStruct();' % (tmp, rvalue))
-+ print(' assert(%s);' % (tmp))
- for i in range(len(struct.members)):
- member = struct.members[i]
- self.visitMember(member, lvalue, '*%s->members[%s]' % (tmp, i))
-@@ -218,24 +218,24 @@ class ValueDeserializer(stdapi.Visitor, stdapi.ExpanderMixin):
- def visitPolymorphic(self, polymorphic, lvalue, rvalue):
- if polymorphic.defaultType is None:
- switchExpr = self.expand(polymorphic.switchExpr)
-- print r' switch (%s) {' % switchExpr
-+ print(r' switch (%s) {' % switchExpr)
- for cases, type in polymorphic.iterSwitch():
- for case in cases:
-- print r' %s:' % case
-+ print(r' %s:' % case)
- caseLvalue = lvalue
- if type.expr is not None:
- caseLvalue = 'static_cast<%s>(%s)' % (type, caseLvalue)
-- print r' {'
-+ print(r' {')
- try:
- self.visit(type, caseLvalue, rvalue)
- finally:
-- print r' }'
-- print r' break;'
-+ print(r' }')
-+ print(r' break;')
- if polymorphic.defaultType is None:
-- print r' default:'
-- print r' retrace::warning(call) << "unexpected polymorphic case" << %s << "\n";' % (switchExpr,)
-- print r' break;'
-- print r' }'
-+ print(r' default:')
-+ print(r' retrace::warning(call) << "unexpected polymorphic case" << %s << "\n";' % (switchExpr,))
-+ print(r' break;')
-+ print(r' }')
- else:
- self.visit(polymorphic.defaultType, lvalue, rvalue)
-
-@@ -250,7 +250,7 @@ class OpaqueValueDeserializer(ValueDeserializer):
- in the context of handles.'''
-
- def visitOpaque(self, opaque, lvalue, rvalue):
-- print ' %s = static_cast<%s>(retrace::toPointer(%s));' % (lvalue, opaque, rvalue)
-+ print(' %s = static_cast<%s>(retrace::toPointer(%s));' % (lvalue, opaque, rvalue))
-
-
- class SwizzledValueRegistrator(stdapi.Visitor, stdapi.ExpanderMixin):
-@@ -270,67 +270,67 @@ class SwizzledValueRegistrator(stdapi.Visitor, stdapi.ExpanderMixin):
- pass
-
- def visitArray(self, array, lvalue, rvalue):
-- print ' const trace::Array *_a%s = (%s).toArray();' % (array.tag, rvalue)
-- print ' if (_a%s) {' % (array.tag)
-+ print(' const trace::Array *_a%s = (%s).toArray();' % (array.tag, rvalue))
-+ print(' if (_a%s) {' % (array.tag))
- length = '_a%s->values.size()' % array.tag
- index = '_j' + array.tag
-- print ' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length)
-+ print(' for (size_t {i} = 0; {i} < {length}; ++{i}) {{'.format(i = index, length = length))
- try:
- self.visit(array.type, '%s[%s]' % (lvalue, index), '*_a%s->values[%s]' % (array.tag, index))
- finally:
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-
- def visitPointer(self, pointer, lvalue, rvalue):
-- print ' const trace::Array *_a%s = (%s).toArray();' % (pointer.tag, rvalue)
-- print ' if (_a%s) {' % (pointer.tag)
-+ print(' const trace::Array *_a%s = (%s).toArray();' % (pointer.tag, rvalue))
-+ print(' if (_a%s) {' % (pointer.tag))
- try:
- self.visit(pointer.type, '%s[0]' % (lvalue,), '*_a%s->values[0]' % (pointer.tag,))
- finally:
-- print ' }'
-+ print(' }')
-
- def visitIntPointer(self, pointer, lvalue, rvalue):
- pass
-
- def visitObjPointer(self, pointer, lvalue, rvalue):
-- print r' retrace::addObj(call, %s, %s);' % (rvalue, lvalue)
-+ print(r' retrace::addObj(call, %s, %s);' % (rvalue, lvalue))
-
- def visitLinearPointer(self, pointer, lvalue, rvalue):
- assert pointer.size is not None
- if pointer.size is not None:
-- print r' retrace::addRegion(call, (%s).toUIntPtr(), %s, %s);' % (rvalue, lvalue, pointer.size)
-+ print(r' retrace::addRegion(call, (%s).toUIntPtr(), %s, %s);' % (rvalue, lvalue, pointer.size))
-
- def visitReference(self, reference, lvalue, rvalue):
- pass
-
- def visitHandle(self, handle, lvalue, rvalue):
-- print ' %s _origResult;' % handle.type
-+ print(' %s _origResult;' % handle.type)
- OpaqueValueDeserializer().visit(handle.type, '_origResult', rvalue);
- if handle.range is None:
- rvalue = "_origResult"
- entry = lookupHandle(handle, rvalue, True)
- if (entry.startswith('_program_map') or entry.startswith('_shader_map')):
-- print 'if (glretrace::supportsARBShaderObjects) {'
-- print ' _handleARB_map[%s] = %s;' % (rvalue, lvalue)
-- print '} else {'
-- print ' %s = %s;' % (entry, lvalue)
-- print '}'
-+ print('if (glretrace::supportsARBShaderObjects) {')
-+ print(' _handleARB_map[%s] = %s;' % (rvalue, lvalue))
-+ print('} else {')
-+ print(' %s = %s;' % (entry, lvalue))
-+ print('}')
- else:
-- print " %s = %s;" % (entry, lvalue)
-- print ' if (retrace::verbosity >= 2) {'
-- print ' std::cout << "{handle.name} " << {rvalue} << " -> " << {lvalue} << "\\n";'.format(**locals())
-- print ' }'
-+ print(" %s = %s;" % (entry, lvalue))
-+ print(' if (retrace::verbosity >= 2) {')
-+ print(' std::cout << "{handle.name} " << {rvalue} << " -> " << {lvalue} << "\\n";'.format(**locals()))
-+ print(' }')
- else:
- i = '_h' + handle.tag
- lvalue = "%s + %s" % (lvalue, i)
- rvalue = "_origResult + %s" % (i,)
- entry = lookupHandle(handle, rvalue)
-- print ' for ({handle.type} {i} = 0; {i} < {handle.range}; ++{i}) {{'.format(**locals())
-- print ' {entry} = {lvalue};'.format(**locals())
-- print ' if (retrace::verbosity >= 2) {'
-- print ' std::cout << "{handle.name} " << ({rvalue}) << " -> " << ({lvalue}) << "\\n";'.format(**locals())
-- print ' }'
-- print ' }'
-+ print(' for ({handle.type} {i} = 0; {i} < {handle.range}; ++{i}) {{'.format(**locals()))
-+ print(' {entry} = {lvalue};'.format(**locals()))
-+ print(' if (retrace::verbosity >= 2) {')
-+ print(' std::cout << "{handle.name} " << ({rvalue}) << " -> " << ({lvalue}) << "\\n";'.format(**locals()))
-+ print(' }')
-+ print(' }')
-
- def visitBlob(self, blob, lvalue, rvalue):
- pass
-@@ -344,9 +344,9 @@ class SwizzledValueRegistrator(stdapi.Visitor, stdapi.ExpanderMixin):
- tmp = '_s_' + struct.tag + '_' + str(self.seq)
- self.seq += 1
-
-- print ' const trace::Struct *%s = (%s).toStruct();' % (tmp, rvalue)
-- print ' assert(%s);' % (tmp,)
-- print ' (void)%s;' % (tmp,)
-+ print(' const trace::Struct *%s = (%s).toStruct();' % (tmp, rvalue))
-+ print(' assert(%s);' % (tmp,))
-+ print(' (void)%s;' % (tmp,))
- for i in range(len(struct.members)):
- member = struct.members[i]
- self.visitMember(member, lvalue, '*%s->members[%s]' % (tmp, i))
-@@ -362,16 +362,16 @@ class SwizzledValueRegistrator(stdapi.Visitor, stdapi.ExpanderMixin):
- class Retracer:
-
- def retraceFunction(self, function):
-- print 'static void retrace_%s(trace::Call &call) {' % function.name
-+ print('static void retrace_%s(trace::Call &call) {' % function.name)
- self.retraceFunctionBody(function)
-- print '}'
-- print
-+ print('}')
-+ print()
-
- def retraceInterfaceMethod(self, interface, method):
-- print 'static void retrace_%s__%s(trace::Call &call) {' % (interface.name, method.name)
-+ print('static void retrace_%s__%s(trace::Call &call) {' % (interface.name, method.name))
- self.retraceInterfaceMethodBody(interface, method)
-- print '}'
-- print
-+ print('}')
-+ print()
-
- def retraceFunctionBody(self, function):
- assert function.sideeffects
-@@ -409,38 +409,38 @@ class Retracer:
- assert function.type is not stdapi.Void
-
- if str(function.type) == 'HRESULT':
-- print r' if (call.ret && FAILED(call.ret->toSInt())) {'
-- print r' return;'
-- print r' }'
-+ print(r' if (call.ret && FAILED(call.ret->toSInt())) {')
-+ print(r' return;')
-+ print(r' }')
-
- def deserializeThisPointer(self, interface):
-- print r' %s *_this;' % (interface.name,)
-- print r' _this = retrace::asObjPointer<%s>(call, call.arg(0));' % (interface.name,)
-- print r' if (!_this) {'
-- print r' return;'
-- print r' }'
-+ print(r' %s *_this;' % (interface.name,))
-+ print(r' _this = retrace::asObjPointer<%s>(call, call.arg(0));' % (interface.name,))
-+ print(r' if (!_this) {')
-+ print(r' return;')
-+ print(r' }')
-
- def deserializeArgs(self, function):
-- print ' retrace::ScopedAllocator _allocator;'
-- print ' (void)_allocator;'
-+ print(' retrace::ScopedAllocator _allocator;')
-+ print(' (void)_allocator;')
- success = True
- for arg in function.args:
- arg_type = arg.type.mutable()
-- print ' %s %s;' % (arg_type, arg.name)
-+ print(' %s %s;' % (arg_type, arg.name))
- rvalue = 'call.arg(%u)' % (arg.index,)
- lvalue = arg.name
- try:
- self.extractArg(function, arg, arg_type, lvalue, rvalue)
- except UnsupportedType:
- success = False
-- print ' memset(&%s, 0, sizeof %s); // FIXME' % (arg.name, arg.name)
-- print
-+ print(' memset(&%s, 0, sizeof %s); // FIXME' % (arg.name, arg.name))
-+ print()
-
- if not success:
-- print ' if (1) {'
-+ print(' if (1) {')
- self.failFunction(function)
- sys.stderr.write('warning: unsupported %s call\n' % function.name)
-- print ' }'
-+ print(' }')
-
- def swizzleValues(self, function):
- for arg in function.args:
-@@ -451,7 +451,7 @@ class Retracer:
- try:
- self.regiterSwizzledValue(arg_type, lvalue, rvalue)
- except UnsupportedType:
-- print ' // XXX: %s' % arg.name
-+ print(' // XXX: %s' % arg.name)
- if function.type is not stdapi.Void:
- rvalue = '*call.ret'
- lvalue = '_result'
-@@ -459,15 +459,15 @@ class Retracer:
- self.regiterSwizzledValue(function.type, lvalue, rvalue)
- except UnsupportedType:
- raise
-- print ' // XXX: result'
-+ print(' // XXX: result')
-
- def failFunction(self, function):
-- print ' if (retrace::verbosity >= 0) {'
-- print ' retrace::unsupported(call);'
-- print ' }'
-+ print(' if (retrace::verbosity >= 0) {')
-+ print(' retrace::unsupported(call);')
-+ print(' }')
- # MGS-469: GPU hangs when retracing OGLESParticles on mx6sx
- # Workaround: do not `return`
-- #print ' return;'
-+ #print(' return;')
-
- def extractArg(self, function, arg, arg_type, lvalue, rvalue):
- ValueAllocator().visit(arg_type, lvalue, rvalue)
-@@ -487,22 +487,22 @@ class Retracer:
-
- def declareRet(self, function):
- if function.type is not stdapi.Void:
-- print ' %s _result;' % (function.type)
-+ print(' %s _result;' % (function.type))
-
- def invokeFunction(self, function):
- arg_names = ", ".join(function.argNames())
- if function.type is not stdapi.Void:
-- print ' _result = %s(%s);' % (function.name, arg_names)
-+ print(' _result = %s(%s);' % (function.name, arg_names))
- self.checkResult(None, function)
- else:
-- print ' %s(%s);' % (function.name, arg_names)
-+ print(' %s(%s);' % (function.name, arg_names))
-
- def invokeInterfaceMethod(self, interface, method):
- arg_names = ", ".join(method.argNames())
- if method.type is not stdapi.Void:
-- print ' _result = _this->%s(%s);' % (method.name, arg_names)
-+ print(' _result = _this->%s(%s);' % (method.name, arg_names))
- else:
-- print ' _this->%s(%s);' % (method.name, arg_names)
-+ print(' _this->%s(%s);' % (method.name, arg_names))
-
- # Adjust reference count when QueryInterface fails. This is
- # particularly useful when replaying traces on older Direct3D runtimes
-@@ -511,12 +511,12 @@ class Retracer:
- #
- # TODO: Generalize to other methods that return interfaces
- if method.name == 'QueryInterface':
-- print r' if (FAILED(_result)) {'
-- print r' IUnknown *pObj = retrace::asObjPointer<IUnknown>(call, *call.arg(2).toArray()->values[0]);'
-- print r' if (pObj) {'
-- print r' pObj->AddRef();'
-- print r' }'
-- print r' }'
-+ print(r' if (FAILED(_result)) {')
-+ print(r' IUnknown *pObj = retrace::asObjPointer<IUnknown>(call, *call.arg(2).toArray()->values[0]);')
-+ print(r' if (pObj) {')
-+ print(r' pObj->AddRef();')
-+ print(r' }')
-+ print(r' }')
-
- if method.type is not stdapi.Void:
- self.checkResult(interface, method)
-@@ -524,28 +524,28 @@ class Retracer:
- # Debug COM reference counting. Disabled by default as reported
- # reference counts depend on internal implementation details.
- if method.name in ('AddRef', 'Release'):
-- print r' if (0) retrace::checkMismatch(call, "cRef", call.ret, _result);'
-+ print(r' if (0) retrace::checkMismatch(call, "cRef", call.ret, _result);')
-
- # On release our reference when we reach Release() == 0 call in the
- # trace.
- if method.name == 'Release':
-- print r' ULONG _orig_result = call.ret->toUInt();'
-- print r' if (_orig_result == 0 || _result == 0) {'
-- print r' if (_orig_result != 0) {'
-- print r' retrace::warning(call) << "unexpected object destruction\n";'
-- print r' }'
-- print r' retrace::delObj(call.arg(0));'
-- print r' }'
-+ print(r' ULONG _orig_result = call.ret->toUInt();')
-+ print(r' if (_orig_result == 0 || _result == 0) {')
-+ print(r' if (_orig_result != 0) {')
-+ print(r' retrace::warning(call) << "unexpected object destruction\n";')
-+ print(r' }')
-+ print(r' retrace::delObj(call.arg(0));')
-+ print(r' }')
-
- def checkResult(self, interface, methodOrFunction):
- assert methodOrFunction.type is not stdapi.Void
- if str(methodOrFunction.type) == 'HRESULT':
-- print r' if (FAILED(_result)) {'
-- print r' retrace::failed(call, _result);'
-- print r' return;'
-- print r' }'
-+ print(r' if (FAILED(_result)) {')
-+ print(r' retrace::failed(call, _result);')
-+ print(r' return;')
-+ print(r' }')
- else:
-- print r' (void)_result;'
-+ print(r' (void)_result;')
-
- def checkPitchMismatch(self, method):
- # Warn for mismatches in 2D/3D mappings.
-@@ -554,19 +554,19 @@ class Retracer:
- if outArg.output \
- and isinstance(outArg.type, stdapi.Pointer) \
- and isinstance(outArg.type.type, stdapi.Struct):
-- print r' const trace::Array *_%s = call.arg(%u).toArray();' % (outArg.name, outArg.index)
-- print r' if (%s) {' % outArg.name
-- print r' const trace::Struct *_struct = _%s->values[0]->toStruct();' % (outArg.name)
-- print r' if (_struct) {'
-+ print(r' const trace::Array *_%s = call.arg(%u).toArray();' % (outArg.name, outArg.index))
-+ print(r' if (%s) {' % outArg.name)
-+ print(r' const trace::Struct *_struct = _%s->values[0]->toStruct();' % (outArg.name))
-+ print(r' if (_struct) {')
- struct = outArg.type.type
- for memberIndex in range(len(struct.members)):
- memberType, memberName = struct.members[memberIndex]
- if memberName.endswith('Pitch'):
-- print r' if (%s->%s) {' % (outArg.name, memberName)
-- print r' retrace::checkMismatch(call, "%s", _struct->members[%u], %s->%s);' % (memberName, memberIndex, outArg.name, memberName)
-- print r' }'
-- print r' }'
-- print r' }'
-+ print(r' if (%s->%s) {' % (outArg.name, memberName))
-+ print(r' retrace::checkMismatch(call, "%s", _struct->members[%u], %s->%s);' % (memberName, memberIndex, outArg.name, memberName))
-+ print(r' }')
-+ print(r' }')
-+ print(r' }')
-
- def filterFunction(self, function):
- return True
-@@ -575,11 +575,11 @@ class Retracer:
-
- def retraceApi(self, api):
-
-- print '#include "os_time.hpp"'
-- print '#include "trace_parser.hpp"'
-- print '#include "retrace.hpp"'
-- print '#include "retrace_swizzle.hpp"'
-- print
-+ print('#include "os_time.hpp"')
-+ print('#include "trace_parser.hpp"')
-+ print('#include "retrace.hpp"')
-+ print('#include "retrace_swizzle.hpp"')
-+ print()
-
- types = api.getAllTypes()
- handles = [type for type in types if isinstance(type, stdapi.Handle)]
-@@ -587,14 +587,14 @@ class Retracer:
- for handle in handles:
- if handle.name not in handle_names:
- if handle.key is None:
-- print 'static retrace::map<%s> _%s_map;' % (handle.type, handle.name)
-+ print('static retrace::map<%s> _%s_map;' % (handle.type, handle.name))
- else:
- key_name, key_type = handle.key
-- print 'static std::map<%s, retrace::map<%s> > _%s_map;' % (key_type, handle.type, handle.name)
-+ print('static std::map<%s, retrace::map<%s> > _%s_map;' % (key_type, handle.type, handle.name))
- handle_names.add(handle.name)
-- print
-+ print()
-
-- functions = filter(self.filterFunction, api.getAllFunctions())
-+ functions = list(filter(self.filterFunction, api.getAllFunctions()))
- for function in functions:
- if function.sideeffects and not function.internal:
- self.retraceFunction(function)
-@@ -604,20 +604,20 @@ class Retracer:
- if method.sideeffects and not method.internal:
- self.retraceInterfaceMethod(interface, method)
-
-- print 'const retrace::Entry %s[] = {' % self.table_name
-+ print('const retrace::Entry %s[] = {' % self.table_name)
- for function in functions:
- if not function.internal:
- if function.sideeffects:
-- print ' {"%s", &retrace_%s},' % (function.name, function.name)
-+ print(' {"%s", &retrace_%s},' % (function.name, function.name))
- else:
-- print ' {"%s", &retrace::ignore},' % (function.name,)
-+ print(' {"%s", &retrace::ignore},' % (function.name,))
- for interface in interfaces:
- for base, method in interface.iterBaseMethods():
- if method.sideeffects:
-- print ' {"%s::%s", &retrace_%s__%s},' % (interface.name, method.name, base.name, method.name)
-+ print(' {"%s::%s", &retrace_%s__%s},' % (interface.name, method.name, base.name, method.name))
- else:
-- print ' {"%s::%s", &retrace::ignore},' % (interface.name, method.name)
-- print ' {NULL, NULL}'
-- print '};'
-- print
-+ print(' {"%s::%s", &retrace::ignore},' % (interface.name, method.name))
-+ print(' {NULL, NULL}')
-+ print('};')
-+ print()
-
-diff --git a/scripts/convert.py b/scripts/convert.py
-index 5f338d80..83df70ce 100755
---- a/scripts/convert.py
-+++ b/scripts/convert.py
-@@ -100,9 +100,9 @@ def detectApiFromCsv(inCsv):
- import csv
- csvReader = csv.reader(open(inCsv, 'rt'), )
- for row in csvReader:
-- print row
-+ print(row)
- event = row[2]
-- print event
-+ print(event)
- if event.startswith("Direct3DCreate9"):
- return "d3d9"
- if event.startswith("CreateDXGIFactory"):
-diff --git a/scripts/jsondiff.py b/scripts/jsondiff.py
-index 3b1f9110..25c4840e 100755
---- a/scripts/jsondiff.py
-+++ b/scripts/jsondiff.py
-@@ -36,7 +36,7 @@ import sys
- def strip_object_hook(obj):
- if '__class__' in obj:
- return None
-- for name in obj.keys():
-+ for name in list(obj.keys()):
- if name.startswith('__') and name.endswith('__'):
- del obj[name]
- return obj
-@@ -80,7 +80,7 @@ class Dumper(Visitor):
- def visitObject(self, node):
- self.enter_object()
-
-- members = node.keys()
-+ members = list(node.keys())
- members.sort()
- for i in range(len(members)):
- name = members[i]
-@@ -148,8 +148,8 @@ class Comparer(Visitor):
- return False
- if len(a) != len(b) and not self.ignore_added:
- return False
-- ak = a.keys()
-- bk = b.keys()
-+ ak = list(a.keys())
-+ bk = list(b.keys())
- ak.sort()
- bk.sort()
- if ak != bk and not self.ignore_added:
-@@ -175,8 +175,8 @@ class Comparer(Visitor):
- return True
-
- def visitValue(self, a, b):
-- if isinstance(a, float) and isinstance(b, (int, long, float)) or \
-- isinstance(b, float) and isinstance(a, (int, long, float)):
-+ if isinstance(a, float) and isinstance(b, (int, float)) or \
-+ isinstance(b, float) and isinstance(a, (int, float)):
- if a is b:
- # NaNs take this path
- return True
-@@ -208,7 +208,7 @@ class Differ(Visitor):
- self.dumper.enter_object()
- names = set(a.keys())
- if not self.comparer.ignore_added:
-- names.update(b.keys())
-+ names.update(list(b.keys()))
- names = list(names)
- names.sort()
-
-@@ -284,7 +284,7 @@ class Differ(Visitor):
- self.dumper.visit(b)
-
- def isMultilineString(self, value):
-- return isinstance(value, basestring) and '\n' in value
-+ return isinstance(value, str) and '\n' in value
-
-
- #
-diff --git a/scripts/jsonextractimages.py b/scripts/jsonextractimages.py
-index ea1c927d..917ee7e4 100755
---- a/scripts/jsonextractimages.py
-+++ b/scripts/jsonextractimages.py
-@@ -38,7 +38,7 @@ pngSignature = "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"
-
-
- def dumpSurfaces(state, memberName):
-- for name, imageObj in state[memberName].iteritems():
-+ for name, imageObj in state[memberName].items():
- data = imageObj['__data__']
- data = base64.b64decode(data)
-
-diff --git a/scripts/leaks.py b/scripts/leaks.py
-new file mode 100755
-index 00000000..325af1e2
---- /dev/null
-+++ b/scripts/leaks.py
-@@ -0,0 +1,163 @@
-+#!/usr/bin/env python
-+##########################################################################
-+#
-+# Copyright 2014-2016 VMware, Inc.
-+# All Rights Reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to deal
-+# in the Software without restriction, including without limitation the rights
-+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+# copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included in
-+# all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+# THE SOFTWARE.
-+#
-+##########################################################################/
-+
-+
-+import subprocess
-+import sys
-+import os.path
-+import optparse
-+import re
-+
-+import unpickle
-+
-+
-+class LeakDetector(unpickle.Unpickler):
-+
-+ def __init__(self, apitrace, trace):
-+
-+ cmd = [apitrace, 'pickle', '--symbolic', trace]
-+ p = subprocess.Popen(args = cmd, stdout = subprocess.PIPE)
-+
-+ unpickle.Unpickler.__init__(self, p.stdout)
-+
-+ self.numContexts = 0
-+
-+ # a map of maps
-+ self.objectDicts = {}
-+
-+ def parse(self):
-+ unpickle.Unpickler.parse(self)
-+
-+ # Reached the end of the trace -- dump any live objects
-+ self.dumpLeaks("<EOF>")
-+
-+ genDelRegExp = re.compile('^gl(Gen|Delete)(Buffers|Textures|FrameBuffers|RenderBuffers)[A-Z]*$')
-+
-+ def handleCall(self, call):
-+ # Ignore calls without side effects
-+ if call.flags & unpickle.CALL_FLAG_NO_SIDE_EFFECTS:
-+ return
-+
-+ # Dump call for debugging:
-+ if 0:
-+ sys.stderr.write('%s\n' % call)
-+
-+ mo = self.genDelRegExp.match(call.functionName)
-+ if mo:
-+ verb = mo.group(1)
-+ subject = mo.group(2)
-+
-+ subject = subject.lower().rstrip('s')
-+ objectDict = self.objectDicts.setdefault(subject, {})
-+
-+ if verb == 'Gen':
-+ self.handleGenerate(call, objectDict)
-+ elif verb == 'Delete':
-+ self.handleDelete(call, objectDict)
-+ else:
-+ assert 0
-+
-+ # TODO: Track labels via glObjectLabel* calls
-+
-+ if call.functionName in [
-+ 'CGLCreateContext',
-+ 'eglCreateContext',
-+ 'glXCreateContext',
-+ 'glXCreateNewContext',
-+ 'glXCreateContextAttribsARB',
-+ 'glXCreateContextWithConfigSGIX',
-+ 'wglCreateContext',
-+ 'wglCreateContextAttribsARB',
-+ ]:
-+ # FIXME: Ignore failing context creation calls
-+ self.numContexts += 1
-+
-+ if call.functionName in [
-+ 'CGLDestroyContext',
-+ 'glXDestroyContext',
-+ 'eglDestroyContext',
-+ 'wglDeleteContext',
-+ ]:
-+ assert self.numContexts > 0
-+ self.numContexts -= 1
-+ if self.numContexts == 0:
-+ self.dumpLeaks(call.no)
-+
-+ def handleGenerate(self, call, objectDict):
-+ n, names = call.argValues()
-+ for i in range(n):
-+ name = names[i]
-+ objectDict[name] = call.no
-+ # TODO: Keep track of call stack backtrace too
-+
-+ def handleDelete(self, call, objectDict):
-+ n, names = call.argValues()
-+ for i in range(n):
-+ name = names[i]
-+ try:
-+ del objectDict[name]
-+ except KeyError:
-+ # Ignore if texture name was never generated
-+ pass
-+
-+ def dumpLeaks(self, currentCallNo):
-+ for kind, objectDict in self.objectDicts.items():
-+ self.dumpNamespaceLeaks(currentCallNo, objectDict, kind)
-+
-+ def dumpNamespaceLeaks(self, currentCallNo, objectDict, kind):
-+ for name, creationCallNo in (sorted(iter(objectDict.items()),key=lambda t: t[1])):
-+ sys.stderr.write('%u: error: %s %u was not destroyed until %s\n' % (creationCallNo, kind, name, currentCallNo))
-+ objectDict.clear()
-+
-+
-+def main():
-+ '''Main program.
-+ '''
-+
-+ # Parse command line options
-+ optparser = optparse.OptionParser(
-+ usage='\n\t%prog [options] TRACE',
-+ version='%%prog')
-+ optparser.add_option(
-+ '-a', '--apitrace', metavar='PROGRAM',
-+ type='string', dest='apitrace', default='apitrace',
-+ help='apitrace command [default: %default]')
-+
-+ options, args = optparser.parse_args(sys.argv[1:])
-+ if len(args) != 1:
-+ optparser.error("incorrect number of arguments")
-+
-+ inTrace = args[0]
-+ if not os.path.isfile(inTrace):
-+ sys.stderr.write("error: `%s` does not exist\n" % inTrace)
-+ sys.exit(1)
-+
-+ detector = LeakDetector(options.apitrace, inTrace)
-+ detector.parse()
-+
-+
-+if __name__ == '__main__':
-+ main()
-diff --git a/scripts/profileshader.py b/scripts/profileshader.py
-index 3c490a0e..5c2a58fb 100755
---- a/scripts/profileshader.py
-+++ b/scripts/profileshader.py
-@@ -58,13 +58,13 @@ def process(stream, groupField):
- continue
-
- if fields[callCol] == 'call':
-- callId = long(fields[callIdCol])
-- duration = long(fields[gpuDuraCol])
-+ callId = int(fields[callIdCol])
-+ duration = int(fields[gpuDuraCol])
- group = fields[groupCol]
-
- maxGroupLen = max(maxGroupLen, len(group))
-
-- if times.has_key(group):
-+ if group in times:
- times[group]['draws'] += 1
- times[group]['duration'] += duration
-
-@@ -74,7 +74,7 @@ def process(stream, groupField):
- else:
- times[group] = {'draws': 1, 'duration': duration, 'longest': callId, 'longestDuration': duration}
-
-- times = sorted(times.items(), key=lambda x: x[1]['duration'], reverse=True)
-+ times = sorted(list(times.items()), key=lambda x: x[1]['duration'], reverse=True)
-
- if groupField == 'program':
- groupTitle = 'Shader[id]'
-@@ -84,9 +84,9 @@ def process(stream, groupField):
- groupTitle = groupField.center(maxGroupLen)
- groupLine = '-' * maxGroupLen
-
-- print '+-%s-+--------------+--------------------+--------------+-------------+' % groupLine
-- print '| %s | Draws [#] | Duration [ns] v | Per Call[ns] | Longest[id] |' % groupTitle
-- print '+-%s-+--------------+--------------------+--------------+-------------+' % groupLine
-+ print('+-%s-+--------------+--------------------+--------------+-------------+' % groupLine)
-+ print('| %s | Draws [#] | Duration [ns] v | Per Call[ns] | Longest[id] |' % groupTitle)
-+ print('+-%s-+--------------+--------------------+--------------+-------------+' % groupLine)
-
- for group in times:
- id = str(group[0]).rjust(maxGroupLen)
-@@ -94,9 +94,9 @@ def process(stream, groupField):
- dura = str(group[1]['duration']).rjust(18)
- perCall = str(group[1]['duration'] / group[1]['draws']).rjust(12)
- longest = str(group[1]['longest']).rjust(11)
-- print "| %s | %s | %s | %s | %s |" % (id, draw, dura, perCall, longest)
-+ print("| %s | %s | %s | %s | %s |" % (id, draw, dura, perCall, longest))
-
-- print '+-%s-+--------------+--------------------+--------------+-------------+' % groupLine
-+ print('+-%s-+--------------+--------------------+--------------+-------------+' % groupLine)
-
-
- def main():
-diff --git a/scripts/retracediff.py b/scripts/retracediff.py
-index bb5aa7f5..8105f536 100755
---- a/scripts/retracediff.py
-+++ b/scripts/retracediff.py
-@@ -83,12 +83,12 @@ class Retracer:
- self.retraceExe,
- ] + args + self.args
- if self.env:
-- for name, value in self.env.iteritems():
-+ for name, value in self.env.items():
- sys.stderr.write('%s=%s ' % (name, value))
- sys.stderr.write(' '.join(cmd) + '\n')
- try:
- return subprocess.Popen(cmd, env=self.env, stdout=stdout, stderr=NULL)
-- except OSError, ex:
-+ except OSError as ex:
- sys.stderr.write('error: failed to execute %s: %s\n' % (cmd[0], ex.strerror))
- sys.exit(1)
-
-@@ -160,7 +160,7 @@ def read_pnm(stream):
- while line.startswith('#'):
- comment += line[1:]
- line = stream.readline()
-- width, height = map(int, line.strip().split())
-+ width, height = list(map(int, line.strip().split()))
- maximum = int(stream.readline().strip())
- if bytesPerChannel == 1:
- assert maximum == 255
-diff --git a/scripts/snapdiff.py b/scripts/snapdiff.py
-index 59ec870e..b0d5f757 100755
---- a/scripts/snapdiff.py
-+++ b/scripts/snapdiff.py
-@@ -40,6 +40,7 @@ from PIL import Image
- from PIL import ImageChops
- from PIL import ImageEnhance
- from PIL import ImageFilter
-+from functools import reduce
-
-
- thumbSize = 320
-@@ -50,12 +51,12 @@ class Comparer:
- '''Image comparer.'''
-
- def __init__(self, ref_image, src_image, alpha = False):
-- if isinstance(ref_image, basestring):
-+ if isinstance(ref_image, str):
- self.ref_im = Image.open(ref_image)
- else:
- self.ref_im = ref_image
-
-- if isinstance(src_image, basestring):
-+ if isinstance(src_image, str):
- self.src_im = Image.open(src_image)
- else:
- self.src_im = src_image
-@@ -106,7 +107,7 @@ class Comparer:
- # Compute absolute error
-
- if self.size_mismatch():
-- return sys.maxint
-+ return sys.maxsize
-
- # TODO: this is approximate due to the grayscale conversion
- h = self.diff.convert('L').histogram()
-diff --git a/scripts/tracediff.py b/scripts/tracediff.py
-index f111322a..0cd9c8c6 100755
---- a/scripts/tracediff.py
-+++ b/scripts/tracediff.py
-@@ -237,7 +237,7 @@ class BlobReplacer(Rebuilder):
- return Blob(len(obj), hash(str(obj)))
-
- def visitCall(self, call):
-- call.args = map(self.visit, call.args)
-+ call.args = list(map(self.visit, call.args))
- call.ret = self.visit(call.ret)
-
-
-@@ -312,7 +312,7 @@ class PythonDiffer(Differ):
- elif tag == 'equal':
- self.equal(alo, ahi, blo, bhi)
- else:
-- raise ValueError, 'unknown tag %s' % (tag,)
-+ raise ValueError('unknown tag %s' % (tag,))
-
- def isjunk(self, call):
- return call.functionName == 'glGetError' and call.ret in ('GL_NO_ERROR', 0)
-@@ -338,12 +338,12 @@ class PythonDiffer(Differ):
- elif tag == 'equal':
- self.replace_similar(_alo, _ahi, _blo, _bhi)
- else:
-- raise ValueError, 'unknown tag %s' % (tag,)
-+ raise ValueError('unknown tag %s' % (tag,))
-
- def replace_similar(self, alo, ahi, blo, bhi):
- assert alo < ahi and blo < bhi
- assert ahi - alo == bhi - blo
-- for i in xrange(0, bhi - blo):
-+ for i in range(0, bhi - blo):
- self.highlighter.write('| ')
- a_call = self.a[alo + i]
- b_call = self.b[blo + i]
-@@ -355,7 +355,7 @@ class PythonDiffer(Differ):
- self.highlighter.write('(')
- sep = ''
- numArgs = max(len(a_call.args), len(b_call.args))
-- for j in xrange(numArgs):
-+ for j in range(numArgs):
- self.highlighter.write(sep)
- try:
- a_argName, a_argVal = a_call.args[j]
-@@ -402,7 +402,7 @@ class PythonDiffer(Differ):
- def delete(self, alo, ahi, blo, bhi):
- assert alo < ahi
- assert blo == bhi
-- for i in xrange(alo, ahi):
-+ for i in range(alo, ahi):
- call = self.a[i]
- self.highlighter.write('- ')
- self.dumpCallNos(call.no, None)
-@@ -413,7 +413,7 @@ class PythonDiffer(Differ):
- def insert(self, alo, ahi, blo, bhi):
- assert alo == ahi
- assert blo < bhi
-- for i in xrange(blo, bhi):
-+ for i in range(blo, bhi):
- call = self.b[i]
- self.highlighter.write('+ ')
- self.dumpCallNos(None, call.no)
-@@ -425,7 +425,7 @@ class PythonDiffer(Differ):
- return
- assert alo < ahi and blo < bhi
- assert ahi - alo == bhi - blo
-- for i in xrange(0, bhi - blo):
-+ for i in range(0, bhi - blo):
- self.highlighter.write(' ')
- a_call = self.a[alo + i]
- b_call = self.b[blo + i]
-diff --git a/scripts/unpickle.py b/scripts/unpickle.py
-index 334c1a01..86891d29 100755
---- a/scripts/unpickle.py
-+++ b/scripts/unpickle.py
-@@ -38,7 +38,7 @@ import optparse
- import sys
- import time
- import re
--import cPickle as pickle
-+import pickle as pickle
-
-
- # Same as trace_model.hpp's call flags
-@@ -58,7 +58,7 @@ CALL_FLAG_MARKER_POP = (1 << 10)
- class Pointer(long):
-
- def __str__(self):
-- if self == 0L:
-+ if self == 0:
- return 'NULL'
- else:
- return hex(self).rstrip('L')
-@@ -73,7 +73,7 @@ class Visitor:
- self.dispatch[type(None)] = self.visitNone
- self.dispatch[bool] = self.visitBool
- self.dispatch[int] = self.visitInt
-- self.dispatch[long] = self.visitInt
-+ self.dispatch[int] = self.visitInt
- self.dispatch[float] = self.visitFloat
- self.dispatch[str] = self.visitStr
- self.dispatch[tuple] = self.visitTuple
-@@ -140,18 +140,18 @@ class Dumper(Visitor):
- return repr(obj)
-
- def visitTuple(self, obj):
-- return '(' + ', '.join(itertools.imap(self.visit, obj)) + ')'
-+ return '(' + ', '.join(map(self.visit, obj)) + ')'
-
- def visitList(self, obj):
- if len(obj) == 1:
- return '&' + self.visit(obj[0])
-- return '{' + ', '.join(itertools.imap(self.visit, obj)) + '}'
-+ return '{' + ', '.join(map(self.visit, obj)) + '}'
-
- def visitItems(self, items):
- return ', '.join(['%s = %s' % (name, self.visit(value)) for name, value in items])
-
- def visitDict(self, obj):
-- return '{' + self.visitItems(obj.iteritems()) + '}'
-+ return '{' + self.visitItems(iter(obj.items())) + '}'
-
- def visitByteArray(self, obj):
- return 'blob(%u)' % len(obj)
-@@ -167,7 +167,7 @@ class Hasher(Visitor):
- return obj
-
- def visitIterable(self, obj):
-- return tuple(itertools.imap(self.visit, obj))
-+ return tuple(map(self.visit, obj))
-
- def visitByteArray(self, obj):
- return str(obj)
-@@ -268,7 +268,7 @@ class Counter(Unpickler):
- def parse(self):
- Unpickler.parse(self)
-
-- functionFrequencies = self.functionFrequencies.items()
-+ functionFrequencies = list(self.functionFrequencies.items())
- functionFrequencies.sort(lambda (name1, freq1), (name2, freq2): cmp(freq1, freq2))
- for name, frequency in functionFrequencies:
- sys.stdout.write('%8u %s\n' % (frequency, name))
-diff --git a/specs/cglapi.py b/specs/cglapi.py
-index 69faeeb4..5d61886f 100644
---- a/specs/cglapi.py
-+++ b/specs/cglapi.py
-@@ -29,9 +29,9 @@ http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/
- """
-
-
--from stdapi import *
--from glapi import *
--from glapi import glapi
-+from .stdapi import *
-+from .glapi import *
-+from .glapi import glapi
-
- IOSurfaceRef = Opaque("IOSurfaceRef")
- CGLContextObj = Opaque("CGLContextObj")
-diff --git a/specs/d2d1.py b/specs/d2d1.py
-index dacbea69..9bae43c5 100644
---- a/specs/d2d1.py
-+++ b/specs/d2d1.py
-@@ -25,9 +25,9 @@
- ##########################################################################/
-
-
--from winapi import *
--from dxgi import DXGI_FORMAT, IDXGISurface
--from dwrite import *
-+from .winapi import *
-+from .dxgi import DXGI_FORMAT, IDXGISurface
-+from .dwrite import *
-
-
-
-diff --git a/specs/d3d.py b/specs/d3d.py
-index 0dde09f4..4b7244b2 100644
---- a/specs/d3d.py
-+++ b/specs/d3d.py
-@@ -25,10 +25,10 @@
-
- """d3d.h"""
-
--from winapi import *
--from ddraw import *
--from d3dtypes import *
--from d3dcaps import *
-+from .winapi import *
-+from .ddraw import *
-+from .d3dtypes import *
-+from .d3dcaps import *
-
- d3dnextFlags = Flags(DWORD, [
- "D3DNEXT_NEXT",
-diff --git a/specs/d3d10.py b/specs/d3d10.py
-index 2161a5fd..e22bc230 100644
---- a/specs/d3d10.py
-+++ b/specs/d3d10.py
-@@ -24,8 +24,8 @@
- ##########################################################################/
-
-
--from dxgi import *
--from d3d10sdklayers import *
-+from .dxgi import *
-+from .d3d10sdklayers import *
-
-
- HRESULT = MAKE_HRESULT([
-diff --git a/specs/d3d10sdklayers.py b/specs/d3d10sdklayers.py
-index aad53f04..82beb721 100644
---- a/specs/d3d10sdklayers.py
-+++ b/specs/d3d10sdklayers.py
-@@ -24,7 +24,7 @@
- ##########################################################################/
-
-
--from dxgi import *
-+from .dxgi import *
-
-
- D3D10_DEBUG_FEATURE = Flags(UINT, [
-diff --git a/specs/d3d11.py b/specs/d3d11.py
-index f704b062..0a28caa3 100644
---- a/specs/d3d11.py
-+++ b/specs/d3d11.py
-@@ -24,8 +24,8 @@
- ##########################################################################/
-
-
--from dxgi import *
--from d3d11sdklayers import *
-+from .dxgi import *
-+from .d3d11sdklayers import *
-
-
- HRESULT = MAKE_HRESULT([
-diff --git a/specs/d3d11sdklayers.py b/specs/d3d11sdklayers.py
-index 907c4b09..97d07750 100644
---- a/specs/d3d11sdklayers.py
-+++ b/specs/d3d11sdklayers.py
-@@ -24,7 +24,7 @@
- ##########################################################################/
-
-
--from dxgi import *
-+from .dxgi import *
-
-
- ID3D11DeviceChild = Interface("ID3D11DeviceChild", IUnknown)
-diff --git a/specs/d3d8.py b/specs/d3d8.py
-index 2dbf1140..400af498 100644
---- a/specs/d3d8.py
-+++ b/specs/d3d8.py
-@@ -25,9 +25,9 @@
-
- """d3d8.h"""
-
--from winapi import *
--from d3d8types import *
--from d3d8caps import *
-+from .winapi import *
-+from .d3d8types import *
-+from .d3d8caps import *
-
-
- D3DSHADER8 = Blob(Const(DWORD), "_shaderSize(pFunction)")
-diff --git a/specs/d3d8caps.py b/specs/d3d8caps.py
-index 1af1a19f..b7ee5873 100644
---- a/specs/d3d8caps.py
-+++ b/specs/d3d8caps.py
-@@ -25,8 +25,8 @@
-
- """d3d8caps.h"""
-
--from winapi import *
--from d3d8types import *
-+from .winapi import *
-+from .d3d8types import *
-
- D3DCAPS = Flags(DWORD, [
- "D3DCAPS_READ_SCANLINE",
-diff --git a/specs/d3d8types.py b/specs/d3d8types.py
-index fe58a0cd..a2482328 100644
---- a/specs/d3d8types.py
-+++ b/specs/d3d8types.py
-@@ -25,7 +25,7 @@
-
- """d3d8types.h"""
-
--from winapi import *
-+from .winapi import *
-
- D3DCOLOR = Alias("D3DCOLOR", DWORD)
-
-diff --git a/specs/d3d9.py b/specs/d3d9.py
-index 21015149..68dcaca2 100644
---- a/specs/d3d9.py
-+++ b/specs/d3d9.py
-@@ -25,9 +25,9 @@
-
- """d3d9.h"""
-
--from winapi import *
--from d3d9types import *
--from d3d9caps import *
-+from .winapi import *
-+from .d3d9types import *
-+from .d3d9caps import *
-
-
- D3DSHADER9 = Blob(Const(DWORD), "_shaderSize(pFunction)")
-diff --git a/specs/d3d9caps.py b/specs/d3d9caps.py
-index b3582879..541263b6 100644
---- a/specs/d3d9caps.py
-+++ b/specs/d3d9caps.py
-@@ -25,8 +25,8 @@
-
- """d3d9caps.h"""
-
--from winapi import *
--from d3d9types import *
-+from .winapi import *
-+from .d3d9types import *
-
- D3DVS20CAPS = Flags(DWORD, [
- "D3DVS20CAPS_PREDICATION",
-diff --git a/specs/d3d9types.py b/specs/d3d9types.py
-index 2545a767..c9847030 100644
---- a/specs/d3d9types.py
-+++ b/specs/d3d9types.py
-@@ -26,7 +26,7 @@
-
- """d3d9types.h"""
-
--from winapi import *
-+from .winapi import *
-
- D3DCOLOR = Alias("D3DCOLOR", DWORD)
-
-diff --git a/specs/d3dcaps.py b/specs/d3dcaps.py
-index 0fa9f1cc..88725067 100644
---- a/specs/d3dcaps.py
-+++ b/specs/d3dcaps.py
-@@ -25,8 +25,8 @@
-
- """d3dcaps.h"""
-
--from winapi import *
--from d3dtypes import *
-+from .winapi import *
-+from .d3dtypes import *
-
- D3DTRANSFORMCAPS = Flags(DWORD, [
- "D3DTRANSFORMCAPS_CLIP",
-diff --git a/specs/d3dtypes.py b/specs/d3dtypes.py
-index e1507975..ba460022 100644
---- a/specs/d3dtypes.py
-+++ b/specs/d3dtypes.py
-@@ -25,7 +25,7 @@
-
- """d3dtypes.h"""
-
--from winapi import *
-+from .winapi import *
-
- D3DVALUE = Float
- LPD3DVALUE = Pointer(D3DVALUE)
-diff --git a/specs/dcommon.py b/specs/dcommon.py
-index 21659a5e..6324db3a 100644
---- a/specs/dcommon.py
-+++ b/specs/dcommon.py
-@@ -24,7 +24,7 @@
- ##########################################################################/
-
-
--from winapi import *
-+from .winapi import *
-
-
- DWRITE_MEASURING_MODE = Enum("DWRITE_MEASURING_MODE", [
-diff --git a/specs/dcomp.py b/specs/dcomp.py
-new file mode 100644
-index 00000000..b139a89e
---- /dev/null
-+++ b/specs/dcomp.py
-@@ -0,0 +1,303 @@
-+##########################################################################
-+#
-+# Copyright 2009-2016 VMware, Inc.
-+# All Rights Reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to deal
-+# in the Software without restriction, including without limitation the rights
-+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+# copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included in
-+# all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+# THE SOFTWARE.
-+#
-+##########################################################################/
-+
-+
-+from .dxgi import *
-+from .d2d1 import D2D_MATRIX_3X2_F, D2D_RECT_F
-+from .d3d9types import D3DMATRIX
-+from .d2d1 import D2D1_COMPOSITE_MODE
-+
-+DCOMPOSITION_BITMAP_INTERPOLATION_MODE = Enum('DCOMPOSITION_BITMAP_INTERPOLATION_MODE', [
-+ 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR',
-+ 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR',
-+ 'DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT',
-+])
-+
-+DCOMPOSITION_BORDER_MODE = Enum('DCOMPOSITION_BORDER_MODE', [
-+ 'DCOMPOSITION_BORDER_MODE_SOFT',
-+ 'DCOMPOSITION_BORDER_MODE_HARD',
-+ 'DCOMPOSITION_BORDER_MODE_INHERIT',
-+])
-+
-+DCOMPOSITION_COMPOSITE_MODE = Enum('DCOMPOSITION_COMPOSITE_MODE', [
-+ 'DCOMPOSITION_COMPOSITE_MODE_SOURCE_OVER',
-+ 'DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT',
-+ 'DCOMPOSITION_COMPOSITE_MODE_INHERIT',
-+])
-+
-+DCOMPOSITION_FRAME_STATISTICS = Struct('DCOMPOSITION_FRAME_STATISTICS', [
-+ (LARGE_INTEGER, 'lastFrameTime'),
-+ (DXGI_RATIONAL, 'currentCompositionRate'),
-+ (LARGE_INTEGER, 'currentTime'),
-+ (LARGE_INTEGER, 'timeFrequency'),
-+ (LARGE_INTEGER, 'nextEstimatedFrameTime'),
-+])
-+
-+COMPOSITIONOBJECT = Flags(DWORD, [
-+ 'COMPOSITIONOBJECT_ALL_ACCESS', # 0x0003
-+ 'COMPOSITIONOBJECT_READ', # 0x0001
-+ 'COMPOSITIONOBJECT_WRITE', # 0x0002
-+])
-+
-+IDCompositionAnimation = Interface('IDCompositionAnimation', IUnknown)
-+IDCompositionDevice = Interface('IDCompositionDevice', IUnknown)
-+IDCompositionTarget = Interface('IDCompositionTarget', IUnknown)
-+IDCompositionVisual = Interface('IDCompositionVisual', IUnknown)
-+IDCompositionEffect = Interface('IDCompositionEffect', IUnknown)
-+IDCompositionEffectGroup = Interface('IDCompositionEffectGroup', IDCompositionEffect)
-+IDCompositionTransform3D = Interface('IDCompositionTransform3D', IDCompositionEffect)
-+IDCompositionTransform = Interface('IDCompositionTransform', IDCompositionTransform3D)
-+IDCompositionTranslateTransform = Interface('IDCompositionTranslateTransform', IDCompositionTransform)
-+IDCompositionTranslateTransform3D = Interface('IDCompositionTranslateTransform3D', IDCompositionTransform3D)
-+IDCompositionScaleTransform = Interface('IDCompositionScaleTransform', IDCompositionTransform)
-+IDCompositionScaleTransform3D = Interface('IDCompositionScaleTransform3D', IDCompositionTransform3D)
-+IDCompositionRotateTransform = Interface('IDCompositionRotateTransform', IDCompositionTransform)
-+IDCompositionRotateTransform3D = Interface('IDCompositionRotateTransform3D', IDCompositionTransform3D)
-+IDCompositionSkewTransform = Interface('IDCompositionSkewTransform', IDCompositionTransform)
-+IDCompositionMatrixTransform = Interface('IDCompositionMatrixTransform', IDCompositionTransform)
-+IDCompositionMatrixTransform3D = Interface('IDCompositionMatrixTransform3D', IDCompositionTransform3D)
-+IDCompositionClip = Interface('IDCompositionClip', IUnknown)
-+IDCompositionRectangleClip = Interface('IDCompositionRectangleClip', IDCompositionClip)
-+IDCompositionSurface = Interface('IDCompositionSurface', IUnknown)
-+IDCompositionVirtualSurface = Interface('IDCompositionVirtualSurface', IDCompositionSurface)
-+
-+IDCompositionAnimation.methods += [
-+ StdMethod(HRESULT, 'Reset', []),
-+ StdMethod(HRESULT, 'SetAbsoluteBeginTime', [(LARGE_INTEGER, 'beginTime')]),
-+ StdMethod(HRESULT, 'AddCubic', [(Double, 'beginOffset'), (Float, 'constantCoefficient'), (Float, 'linearCoefficient'), (Float, 'quadraticCoefficient'), (Float, 'cubicCoefficient')]),
-+ StdMethod(HRESULT, 'AddSinusoidal', [(Double, 'beginOffset'), (Float, 'bias'), (Float, 'amplitude'), (Float, 'frequency'), (Float, 'phase')]),
-+ StdMethod(HRESULT, 'AddRepeat', [(Double, 'beginOffset'), (Double, 'durationToRepeat')]),
-+ StdMethod(HRESULT, 'End', [(Double, 'endOffset'), (Float, 'endValue')]),
-+]
-+
-+IDCompositionDevice.methods += [
-+ StdMethod(HRESULT, 'Commit', []),
-+ StdMethod(HRESULT, 'WaitForCommitCompletion', []),
-+ StdMethod(HRESULT, 'GetFrameStatistics', [Out(Pointer(DCOMPOSITION_FRAME_STATISTICS), 'statistics')]),
-+ StdMethod(HRESULT, 'CreateTargetForHwnd', [(HWND, 'hwnd'), (BOOL, 'topmost'), Out(Pointer(ObjPointer(IDCompositionTarget)), 'target')]),
-+ StdMethod(HRESULT, 'CreateVisual', [Out(Pointer(ObjPointer(IDCompositionVisual)), 'visual')]),
-+ StdMethod(HRESULT, 'CreateSurface', [(UINT, 'width'), (UINT, 'height'), (DXGI_FORMAT, 'pixelFormat'), (DXGI_ALPHA_MODE, 'alphaMode'), Out(Pointer(ObjPointer(IDCompositionSurface)), 'surface')]),
-+ StdMethod(HRESULT, 'CreateVirtualSurface', [(UINT, 'initialWidth'), (UINT, 'initialHeight'), (DXGI_FORMAT, 'pixelFormat'), (DXGI_ALPHA_MODE, 'alphaMode'), Out(Pointer(ObjPointer(IDCompositionVirtualSurface)), 'virtualSurface')]),
-+ StdMethod(HRESULT, 'CreateSurfaceFromHandle', [(HANDLE, 'handle'), Out(Pointer(ObjPointer(IUnknown)), 'surface')]),
-+ StdMethod(HRESULT, 'CreateSurfaceFromHwnd', [(HWND, 'hwnd'), Out(Pointer(ObjPointer(IUnknown)), 'surface')]),
-+ StdMethod(HRESULT, 'CreateTranslateTransform', [Out(Pointer(ObjPointer(IDCompositionTranslateTransform)), 'translateTransform')]),
-+ StdMethod(HRESULT, 'CreateScaleTransform', [Out(Pointer(ObjPointer(IDCompositionScaleTransform)), 'scaleTransform')]),
-+ StdMethod(HRESULT, 'CreateRotateTransform', [Out(Pointer(ObjPointer(IDCompositionRotateTransform)), 'rotateTransform')]),
-+ StdMethod(HRESULT, 'CreateSkewTransform', [Out(Pointer(ObjPointer(IDCompositionSkewTransform)), 'skewTransform')]),
-+ StdMethod(HRESULT, 'CreateMatrixTransform', [Out(Pointer(ObjPointer(IDCompositionMatrixTransform)), 'matrixTransform')]),
-+ StdMethod(HRESULT, 'CreateTransformGroup', [(Array(ObjPointer(IDCompositionTransform), 'elements'), 'transforms'), (UINT, 'elements'), Out(Pointer(ObjPointer(IDCompositionTransform)), 'transformGroup')]),
-+ StdMethod(HRESULT, 'CreateTranslateTransform3D', [Out(Pointer(ObjPointer(IDCompositionTranslateTransform3D)), 'translateTransform3D')]),
-+ StdMethod(HRESULT, 'CreateScaleTransform3D', [Out(Pointer(ObjPointer(IDCompositionScaleTransform3D)), 'scaleTransform3D')]),
-+ StdMethod(HRESULT, 'CreateRotateTransform3D', [Out(Pointer(ObjPointer(IDCompositionRotateTransform3D)), 'rotateTransform3D')]),
-+ StdMethod(HRESULT, 'CreateMatrixTransform3D', [Out(Pointer(ObjPointer(IDCompositionMatrixTransform3D)), 'matrixTransform3D')]),
-+ StdMethod(HRESULT, 'CreateTransform3DGroup', [(Array(ObjPointer(IDCompositionTransform3D), 'elements'), 'transforms3D'), (UINT, 'elements'), Out(Pointer(ObjPointer(IDCompositionTransform3D)), 'transform3DGroup')]),
-+ StdMethod(HRESULT, 'CreateEffectGroup', [Out(Pointer(ObjPointer(IDCompositionEffectGroup)), 'effectGroup')]),
-+ StdMethod(HRESULT, 'CreateRectangleClip', [Out(Pointer(ObjPointer(IDCompositionRectangleClip)), 'clip')]),
-+ StdMethod(HRESULT, 'CreateAnimation', [Out(Pointer(ObjPointer(IDCompositionAnimation)), 'animation')]),
-+ StdMethod(HRESULT, 'CheckDeviceState', [Out(Pointer(BOOL), 'pfValid')]),
-+]
-+
-+IDCompositionTarget.methods += [
-+ StdMethod(HRESULT, 'SetRoot', [(ObjPointer(IDCompositionVisual), 'visual')]),
-+]
-+
-+IDCompositionVisual.methods += [
-+ StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTransform', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTransform', [(ObjPointer(IDCompositionTransform), 'transform')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTransformParent', [(ObjPointer(IDCompositionVisual), 'visual')]),
-+ StdMethod(HRESULT, 'SetEffect', [(ObjPointer(IDCompositionEffect), 'effect')]),
-+ StdMethod(HRESULT, 'SetBitmapInterpolationMode', [(DCOMPOSITION_BITMAP_INTERPOLATION_MODE, 'interpolationMode')]),
-+ StdMethod(HRESULT, 'SetBorderMode', [(DCOMPOSITION_BORDER_MODE, 'borderMode')]),
-+ StdMethod(HRESULT, 'SetClip', [(Reference(Const(D2D_RECT_F)), 'rect')], overloaded=True),
-+ StdMethod(HRESULT, 'SetClip', [(ObjPointer(IDCompositionClip), 'clip')], overloaded=True),
-+ StdMethod(HRESULT, 'SetContent', [(ObjPointer(IUnknown), 'content')]),
-+ StdMethod(HRESULT, 'AddVisual', [(ObjPointer(IDCompositionVisual), 'visual'), (BOOL, 'insertAbove'), (ObjPointer(IDCompositionVisual), 'referenceVisual')]),
-+ StdMethod(HRESULT, 'RemoveVisual', [(ObjPointer(IDCompositionVisual), 'visual')]),
-+ StdMethod(HRESULT, 'RemoveAllVisuals', []),
-+ StdMethod(HRESULT, 'SetCompositeMode', [(DCOMPOSITION_COMPOSITE_MODE, 'compositeMode')]),
-+]
-+
-+IDCompositionTransform.methods += [
-+]
-+
-+IDCompositionTransform3D.methods += [
-+]
-+
-+IDCompositionTranslateTransform.methods += [
-+ StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionTranslateTransform3D.methods += [
-+ StdMethod(HRESULT, 'SetOffsetX', [(Float, 'offsetX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(Float, 'offsetY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetZ', [(Float, 'offsetZ')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOffsetZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionScaleTransform.methods += [
-+ StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionScaleTransform3D.methods += [
-+ StdMethod(HRESULT, 'SetScaleX', [(Float, 'scaleX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleY', [(Float, 'scaleY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleZ', [(Float, 'scaleZ')], overloaded=True),
-+ StdMethod(HRESULT, 'SetScaleZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionRotateTransform.methods += [
-+ StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionRotateTransform3D.methods += [
-+ StdMethod(HRESULT, 'SetAngle', [(Float, 'angle')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAngle', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisX', [(Float, 'axisX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisY', [(Float, 'axisY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisZ', [(Float, 'axisZ')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAxisZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterZ', [(Float, 'centerZ')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterZ', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionSkewTransform.methods += [
-+ StdMethod(HRESULT, 'SetAngleX', [(Float, 'angleX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAngleX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAngleY', [(Float, 'angleY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetAngleY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(Float, 'centerX')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(Float, 'centerY')], overloaded=True),
-+ StdMethod(HRESULT, 'SetCenterY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionMatrixTransform.methods += [
-+ StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D2D_MATRIX_3X2_F)), 'matrix')]),
-+ StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True),
-+ StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionMatrixTransform3D.methods += [
-+ StdMethod(HRESULT, 'SetMatrix', [(Reference(Const(D3DMATRIX)), 'matrix')]),
-+ StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (Float, 'value')], overloaded=True),
-+ StdMethod(HRESULT, 'SetMatrixElement', [(Int, 'row'), (Int, 'column'), (ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionEffect.methods += [
-+]
-+
-+IDCompositionEffectGroup.methods += [
-+ StdMethod(HRESULT, 'SetOpacity', [(Float, 'opacity')], overloaded=True),
-+ StdMethod(HRESULT, 'SetOpacity', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTransform3D', [(ObjPointer(IDCompositionTransform3D), 'transform3D')]),
-+]
-+
-+IDCompositionClip.methods += [
-+]
-+
-+IDCompositionRectangleClip.methods += [
-+ StdMethod(HRESULT, 'SetLeft', [(Float, 'left')], overloaded=True),
-+ StdMethod(HRESULT, 'SetLeft', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTop', [(Float, 'top')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTop', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetRight', [(Float, 'right')], overloaded=True),
-+ StdMethod(HRESULT, 'SetRight', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottom', [(Float, 'bottom')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottom', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopLeftRadiusX', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopLeftRadiusY', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopRightRadiusX', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopRightRadiusY', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetTopRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomLeftRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomLeftRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomRightRadiusX', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomRightRadiusX', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomRightRadiusY', [(Float, 'radius')], overloaded=True),
-+ StdMethod(HRESULT, 'SetBottomRightRadiusY', [(ObjPointer(IDCompositionAnimation), 'animation')], overloaded=True),
-+]
-+
-+IDCompositionSurface.methods += [
-+ # XXX: riid might be ID2D1DeviceContext
-+ StdMethod(HRESULT, 'BeginDraw', [(Pointer(Const(RECT)), 'updateRect'), (REFIID, 'iid'), Out(Pointer(ObjPointer(Void)), 'updateObject'), Out(Pointer(POINT), 'updateOffset')]),
-+ StdMethod(HRESULT, 'EndDraw', []),
-+ StdMethod(HRESULT, 'SuspendDraw', []),
-+ StdMethod(HRESULT, 'ResumeDraw', []),
-+ StdMethod(HRESULT, 'Scroll', [(Pointer(Const(RECT)), 'scrollRect'), (Pointer(Const(RECT)), 'clipRect'), (Int, 'offsetX'), (Int, 'offsetY')]),
-+]
-+
-+IDCompositionVirtualSurface.methods += [
-+ StdMethod(HRESULT, 'Resize', [(UINT, 'width'), (UINT, 'height')]),
-+ StdMethod(HRESULT, 'Trim', [(Array(Const(RECT), 'count'), 'rectangles'), (UINT, 'count')]),
-+]
-+
-+dcomp = Module('dcomp')
-+dcomp.addFunctions([
-+ StdFunction(HRESULT, 'DCompositionCreateDevice', [(ObjPointer(IDXGIDevice), 'dxgiDevice'), (REFIID, 'iid'), Out(Pointer(ObjPointer(Void)), 'dcompositionDevice')]),
-+ StdFunction(HRESULT, 'DCompositionCreateSurfaceHandle', [(COMPOSITIONOBJECT, 'desiredAccess'), (Pointer(SECURITY_ATTRIBUTES), 'securityAttributes'), Out(Pointer(HANDLE), 'surfaceHandle')]),
-+])
-+dcomp.addInterfaces([
-+ IDCompositionDevice,
-+])
-diff --git a/specs/ddraw.py b/specs/ddraw.py
-index 99f542fe..5df48be0 100644
---- a/specs/ddraw.py
-+++ b/specs/ddraw.py
-@@ -25,7 +25,7 @@
-
- """ddraw.h"""
-
--from winapi import *
-+from .winapi import *
-
- DirectDrawOptSurfaceDescFlags = Flags(DWORD, [
- "DDOSD_GUID",
-diff --git a/specs/debug.py b/specs/debug.py
-index 0a004741..6ef80f64 100644
---- a/specs/debug.py
-+++ b/specs/debug.py
-@@ -49,7 +49,7 @@ def excepthook(type, value, tb):
- import traceback, pdb
- # we are NOT in interactive mode, print the exception...
- traceback.print_exception(type, value, tb)
-- print
-+ print()
- # ...then start the debugger in post-mortem mode.
- pdb.pm()
-
-diff --git a/specs/dwrite.py b/specs/dwrite.py
-index 60e5034c..be273f81 100644
---- a/specs/dwrite.py
-+++ b/specs/dwrite.py
-@@ -24,8 +24,8 @@
- ##########################################################################/
-
-
--from winapi import *
--from dcommon import *
-+from .winapi import *
-+from .dcommon import *
-
-
- ID2D1SimplifiedGeometrySink = Interface("ID2D1SimplifiedGeometrySink", IUnknown)
-diff --git a/specs/dxgi.py b/specs/dxgi.py
-index 0e880548..040f3bc4 100644
---- a/specs/dxgi.py
-+++ b/specs/dxgi.py
-@@ -25,7 +25,7 @@
- ##########################################################################/
-
-
--from winapi import *
-+from .winapi import *
-
-
- DXGI_FORMAT = Enum("DXGI_FORMAT", [
-diff --git a/specs/dxva2.py b/specs/dxva2.py
-index 3936afac..65f5f0c0 100644
---- a/specs/dxva2.py
-+++ b/specs/dxva2.py
-@@ -24,7 +24,7 @@
- ##########################################################################/
-
-
--from d3d9 import *
-+from .d3d9 import *
-
-
- HRESULT = MAKE_HRESULT(errors = [
-diff --git a/specs/eglapi.py b/specs/eglapi.py
-index 8379e45e..e1edff06 100644
---- a/specs/eglapi.py
-+++ b/specs/eglapi.py
-@@ -26,9 +26,9 @@
- """EGL API description."""
-
-
--from stdapi import *
--from gltypes import *
--from eglenum import *
-+from .stdapi import *
-+from .gltypes import *
-+from .eglenum import *
-
- EGLNativeDisplayType = Opaque("EGLNativeDisplayType")
- EGLNativeWindowType = Opaque("EGLNativeWindowType")
-diff --git a/specs/eglenum.py b/specs/eglenum.py
-index 8b10868d..e6290fb2 100644
---- a/specs/eglenum.py
-+++ b/specs/eglenum.py
-@@ -28,7 +28,7 @@
- """EGL enum description"""
-
-
--from stdapi import *
-+from .stdapi import *
-
- # Most of the following content was produced in a semi-automated fashion by
- # the scripts/eglenum.sed sed script.
-diff --git a/specs/glapi.py b/specs/glapi.py
-index c0e92b3c..8d20052e 100644
---- a/specs/glapi.py
-+++ b/specs/glapi.py
-@@ -34,9 +34,9 @@ corner cases correctly.
- """
-
-
--from stdapi import *
--from gltypes import *
--import glparams
-+from .stdapi import *
-+from .gltypes import *
-+from . import glparams
-
-
- def GlFunction(*args, **kwargs):
-diff --git a/specs/glparams.py b/specs/glparams.py
-index 1bed8a6b..5a036975 100644
---- a/specs/glparams.py
-+++ b/specs/glparams.py
-@@ -27,9 +27,9 @@
- '''Describe GL parameters.'''
-
-
--from stdapi import *
-+from .stdapi import *
-
--from gltypes import *
-+from .gltypes import *
-
-
- # Shorthands for the types
-diff --git a/specs/gltypes.py b/specs/gltypes.py
-index a9ffc4a1..631eb868 100644
---- a/specs/gltypes.py
-+++ b/specs/gltypes.py
-@@ -29,7 +29,7 @@
-
- import platform
-
--from stdapi import *
-+from .stdapi import *
-
-
- GLboolean = Enum("GLboolean", [
-diff --git a/specs/glxapi.py b/specs/glxapi.py
-index 0d3cd969..f4182799 100644
---- a/specs/glxapi.py
-+++ b/specs/glxapi.py
-@@ -26,8 +26,8 @@
- """GLX API description."""
-
-
--from stdapi import *
--from glapi import *
-+from .stdapi import *
-+from .glapi import *
-
- VisualID = Alias("VisualID", UInt32)
- Display = Opaque("Display *")
-diff --git a/specs/scripts/c2api.py b/specs/scripts/c2api.py
-index 7deb2955..b8aaa81d 100755
---- a/specs/scripts/c2api.py
-+++ b/specs/scripts/c2api.py
-@@ -122,7 +122,7 @@ class DeclParser:
- self.consume()
- type = 'Pointer(%s)' % type
- name = self.consume()
-- print '%s = Alias("%s", %s)' % (name, name, type)
-+ print('%s = Alias("%s", %s)' % (name, name, type))
- if self.match(','):
- self.consume()
- else:
-@@ -136,7 +136,7 @@ class DeclParser:
- name = self.consume()
- self.consume('{')
-
-- print '%s = Enum("%s", [' % (name, name)
-+ print('%s = Enum("%s", [' % (name, name))
-
- #value = 0
- while self.lookahead() != '}':
-@@ -148,12 +148,12 @@ class DeclParser:
- self.consume(',')
- tags = self.parse_tags()
- #print ' "%s",\t# %s' % (name, value)
-- print ' "%s",' % (name,)
-+ print(' "%s",' % (name,))
- #value += 1
- self.consume('}')
-
-- print '])'
-- print
-+ print('])')
-+ print()
-
- def parse_value(self, ref_token, constructor):
- self.consume(ref_token)
-@@ -161,14 +161,14 @@ class DeclParser:
- name = self.consume()
- self.consume('{')
-
-- print '%s = %s(%s, [' % (name, constructor, type)
-+ print('%s = %s(%s, [' % (name, constructor, type))
-
- while self.lookahead() != '}':
- name, value = self.parse_define()
- self.consume('}')
-
-- print '])'
-- print
-+ print('])')
-+ print()
-
- def parse_define(self):
- self.consume('#')
-@@ -176,18 +176,18 @@ class DeclParser:
- name = self.consume()
- value = self.consume()
- #print ' "%s",\t# %s' % (name, value)
-- print ' "%s",' % (name,)
-+ print(' "%s",' % (name,))
- return name, value
-
- def parse_struct(self):
- self.consume('struct')
- name = self.consume()
-
-- print '%s = Struct("%s", [' % (name, name)
-+ print('%s = Struct("%s", [' % (name, name))
- for type, name in self.parse_members():
-- print ' (%s, "%s"),' % (type, name)
-- print '])'
-- print
-+ print(' (%s, "%s"),' % (type, name))
-+ print('])')
-+ print()
-
- def parse_union(self):
- self.consume('union')
-@@ -226,8 +226,8 @@ class DeclParser:
- base = self.consume()
- self.consume('{')
-
-- print '%s = Interface("%s", %s)' % (name, name, base)
-- print '%s.methods += [' % (name,)
-+ print('%s = Interface("%s", %s)' % (name, name, base))
-+ print('%s.methods += [' % (name,))
-
- while self.lookahead() != '}':
- if self.lookahead() in ('public', 'private'):
-@@ -238,8 +238,8 @@ class DeclParser:
- self.consume(';')
- self.consume('}')
-
-- print ']'
-- print
-+ print(']')
-+ print()
-
- def parse_prototype(self, creator = 'Function'):
- if self.match('extern', 'virtual'):
-@@ -275,7 +275,7 @@ class DeclParser:
- self.consume()
- self.consume('0')
-
-- print ' %s(%s, "%s", [%s]%s),' % (creator, ret, name, ', '.join(args), extra)
-+ print(' %s(%s, "%s", [%s]%s),' % (creator, ret, name, ', '.join(args), extra))
-
- def parse_arg(self):
- tags = self.parse_tags()
-@@ -404,8 +404,8 @@ class DeclParser:
- type = 'S' + type
- elif short:
- type = 'Short'
-- elif long:
-- type = 'Long' * long
-+ elif int:
-+ type = 'Long' * int
- else:
- type = 'Int'
- if unsigned:
-diff --git a/specs/scripts/cxx2api.py b/specs/scripts/cxx2api.py
-new file mode 100755
-index 00000000..9720615d
---- /dev/null
-+++ b/specs/scripts/cxx2api.py
-@@ -0,0 +1,488 @@
-+#!/usr/bin/env python
-+
-+
-+
-+copyright = '''
-+##########################################################################
-+#
-+# Copyright 2009-2016 VMware, Inc.
-+# All Rights Reserved.
-+#
-+# Permission is hereby granted, free of charge, to any person obtaining a copy
-+# of this software and associated documentation files (the "Software"), to deal
-+# in the Software without restriction, including without limitation the rights
-+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+# copies of the Software, and to permit persons to whom the Software is
-+# furnished to do so, subject to the following conditions:
-+#
-+# The above copyright notice and this permission notice shall be included in
-+# all copies or substantial portions of the Software.
-+#
-+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+# THE SOFTWARE.
-+#
-+##########################################################################/
-+'''
-+
-+
-+#
-+# Generates API specs from headers using castxml/pygccxml.
-+#
-+# Usage:
-+#
-+# sudo apt-get install castxml mingw-w64-i686-dev
-+# pip install 'pygccxml==1.9.1'
-+# python specs/scripts/cxx2api.py -Idxsdk/Include -DD2D_USE_C_DEFINITIONS dcomp.h dcomptypes.h dcompanimation.h
-+#
-+# See also:
-+# - http://pygccxml.readthedocs.org/en/develop/index.html
-+# - https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst
-+#
-+
-+import os.path
-+import sys
-+import io as StringIO
-+import subprocess
-+
-+from pygccxml import utils
-+from pygccxml import parser
-+from pygccxml import declarations
-+
-+from pygccxml.declarations import algorithm
-+from pygccxml.declarations import decl_visitor
-+from pygccxml.declarations import type_traits
-+from pygccxml.declarations import type_visitor
-+
-+
-+class decl_dumper_t(decl_visitor.decl_visitor_t):
-+
-+ def __init__(self, decl = None):
-+ decl_visitor.decl_visitor_t.__init__(self)
-+ self.decl = decl
-+ self.result = None
-+
-+ def clone(self):
-+ return decl_dumper_t(self.decl)
-+
-+ def visit_class(self):
-+ class_ = self.decl
-+ assert class_.class_type in ('struct', 'union')
-+ self.result = class_.name
-+
-+ def visit_class_declaration(self):
-+ class_ = self.decl
-+ self.result = class_.name
-+
-+ def visit_typedef(self):
-+ typedef = self.decl
-+ self.result = typedef.name
-+
-+ def visit_enumeration(self):
-+ self.result = self.decl.name
-+
-+
-+def dump_decl(decl):
-+ visitor = decl_dumper_t(decl)
-+ algorithm.apply_visitor(visitor, decl)
-+ return visitor.result
-+
-+
-+class type_dumper_t(type_visitor.type_visitor_t):
-+
-+ def __init__(self, type):
-+ type_visitor.type_visitor_t.__init__(self)
-+ self.type = type
-+ self.result = None
-+
-+ def clone(self):
-+ return type_dumper_t(self.type)
-+
-+ def visit_void(self):
-+ self.result = 'Void'
-+
-+ def visit_char(self):
-+ self.result = 'Char'
-+
-+ def visit_unsigned_char(self):
-+ self.result = 'UChar'
-+
-+ def visit_signed_char(self):
-+ self.result = 'SChar'
-+
-+ def visit_wchar(self):
-+ raise NotImplementedError
-+
-+ def visit_short_int(self):
-+ self.result = 'Short'
-+
-+ def visit_short_unsigned_int(self):
-+ self.result = 'UShort'
-+
-+ def visit_bool(self):
-+ raise NotImplementedError
-+
-+ def visit_int(self):
-+ self.result = 'Int'
-+
-+ def visit_unsigned_int(self):
-+ self.result = 'UInt'
-+
-+ def visit_long_int(self):
-+ self.result = 'Long'
-+
-+ def visit_long_unsigned_int(self):
-+ self.result = 'ULong'
-+
-+ def visit_long_long_int(self):
-+ self.result = 'LongLong'
-+
-+ def visit_long_long_unsigned_int(self):
-+ self.result = 'ULongLong'
-+
-+ def visit_float(self):
-+ self.result = "Float"
-+
-+ def visit_double(self):
-+ self.result = "Double"
-+
-+ def visit_array(self):
-+ base_type = dump_type(self.type.base)
-+ length = self.type.size
-+ try:
-+ int(length)
-+ except ValueError:
-+ length = '"%s"' % length
-+ self.result = 'Array(%s, %s)' % (base_type, length)
-+
-+ def visit_pointer(self):
-+ base_type = dump_type(self.type.base)
-+ # TODO: Use ObjPointer where appropriate
-+ #if isinstance(self.type.base, declarations.cpptypes.declarated_t):
-+ # decl = self.type.base.declaration
-+ # if isinstance(decl, declarations.typedef.typedef_t):
-+ # print(decl.type, type(decl.type))
-+ # if isinstance(decl, declarations.class_declaration.class_t):
-+ # if decl.public_members:
-+ # self.result = 'ObjPointer(%s)' % decl.name
-+ # return
-+ # if isinstance(decl, declarations.class_declaration.class_declaration_t):
-+ # if decl.public_members:
-+ # self.result = 'ObjPointer(%s)' % decl.name
-+ # return
-+ if base_type.startswith('IDComposition') or \
-+ base_type.startswith('IDXGI') or \
-+ base_type == 'IUnknown':
-+ self.result = 'ObjPointer(%s)' % base_type
-+ return
-+ self.result = 'Pointer(%s)' % base_type
-+
-+ def visit_reference(self):
-+ base_type = dump_type(self.type.base)
-+ if base_type == 'Const(IID)':
-+ self.result = 'REFIID'
-+ elif base_type == 'Const(GUID)':
-+ self.result = 'REFGUID'
-+ else:
-+ self.result = 'Reference(%s)' % base_type
-+
-+ def visit_const(self):
-+ self.result = 'Const(%s)' % dump_type(self.type.base)
-+
-+ def visit_declarated(self):
-+ decl = self.type.declaration
-+ self.result = dump_decl(decl)
-+
-+ def visit_free_function_type(self):
-+ self.result = 'Opaque("%s")' % self.type
-+
-+
-+def dump_type(type):
-+ visitor = type_dumper_t(type)
-+ algorithm.apply_visitor(visitor, type)
-+ # XXX: RECT becomes tagRECT somehow
-+ if visitor.result == 'tagRECT':
-+ return 'RECT'
-+ return visitor.result
-+
-+
-+def is_interface(class_):
-+ if not class_.name.startswith('I'):
-+ return
-+ if len(class_.bases) != 1:
-+ return False
-+ # TODO: Ensure interface derives from IUnknown
-+ return True
-+
-+
-+class decl2_dumper_t(decl_visitor.decl_visitor_t):
-+
-+ def __init__(self, name):
-+ decl_visitor.decl_visitor_t.__init__(self)
-+
-+ self.name = name
-+
-+ # The current declaration
-+ self.decl = None
-+
-+ self.interfaces = StringIO.StringIO()
-+ self.methods = StringIO.StringIO()
-+ self.functions = StringIO.StringIO()
-+
-+ def start(self):
-+ print(copyright.strip())
-+ print()
-+ print()
-+ print(r'from winapi import *')
-+ print()
-+
-+ def finish(self):
-+ sys.stdout.write(self.interfaces.getvalue())
-+ sys.stdout.write('\n')
-+ sys.stdout.write(self.methods.getvalue())
-+
-+ name = self.name
-+ sys.stdout.write('%s = Module(%r)\n' % (name, name))
-+ sys.stdout.write('%s.addFunctions([\n' % (name,))
-+ sys.stdout.write(self.functions.getvalue())
-+ sys.stdout.write('])\n\n')
-+
-+ def clone(self):
-+ return decl_dumper_t(self.decl)
-+
-+ def visit_class(self):
-+ class_ = self.decl
-+ assert class_.class_type in ('struct', 'union')
-+
-+ if is_interface(class_):
-+ self.visit_interface()
-+ elif class_.name != '':
-+ self.visit_struct(class_.name, class_)
-+
-+ def visit_struct(self, decl_name, decl):
-+ struct = decl
-+ print(r'%s = Struct(%r, [' % (decl_name, decl_name))
-+ for variable in struct.variables(allow_empty=True):
-+ var_type = dump_type(variable.decl_type)
-+ print(r' (%s, %r),' % (var_type, variable.name))
-+ print(r'])')
-+ print()
-+
-+ def visit_interface(self):
-+ class_ = self.decl
-+ assert len(class_.bases) == 1
-+ base = class_.bases[0]
-+
-+ s = self.interfaces
-+ s.write('%s = Interface(%r, %s)\n' % (class_.name, class_.name, base.related_class.name))
-+
-+ s = self.methods
-+ s.write('%s.methods += [\n' % (class_.name,))
-+ for member in class_.public_members:
-+ if member.virtuality != 'pure virtual':
-+ continue
-+ ret_type = dump_type(member.return_type)
-+ arg_types = self.convert_args(member.arguments)
-+ s.write(' StdMethod(%s, %r, [%s]),\n' % (ret_type, member.name, arg_types))
-+ s.write(']\n\n')
-+
-+ def convert_args(self, args):
-+ # TODO: use __attribute__ ((annotate ("out")))
-+ # See also:
-+ # - https://github.com/CastXML/CastXML/issues/25
-+ # XXX: Requires a castxml version newer than the one in Ubuntu 15.10
-+ arg_types = []
-+ for arg in args:
-+ if arg.attributes is not None:
-+ sys.stderr.write('warning: found %s attribute %r\n' % (arg.name, arg.attributes))
-+ res_arg_type = dump_type(arg.decl_type)
-+ res_arg = '(%s, %r)' % (res_arg_type, arg.name)
-+
-+ # Infer output arguments
-+ if res_arg_type.startswith('Pointer(') and \
-+ not res_arg_type.startswith('Pointer(Const('):
-+ res_arg = 'Out' + res_arg
-+
-+ arg_types.append(res_arg)
-+
-+ arg_types = ', '.join(arg_types)
-+ return arg_types
-+
-+ def visit_class_declaration(self):
-+ pass
-+
-+ def visit_typedef(self):
-+ typedef = self.decl
-+ base_type = dump_type(typedef.decl_type)
-+ if base_type == typedef.name:
-+ # Ignore `typedef struct Foo Foo;`
-+ return
-+ if base_type == '':
-+ if isinstance(typedef.decl_type, declarations.cpptypes.declarated_t):
-+ base_decl = typedef.decl_type.declaration
-+ self.visit_struct(typedef.name, base_decl)
-+ return
-+ print(r'%s = Alias(%r, %s)' % (typedef.name, typedef.name, base_type))
-+ print()
-+
-+ def visit_enumeration(self):
-+ enum = self.decl
-+ print(r'%s = Enum(%r, [' % (enum.name, enum.name))
-+ for name, value in enum.values:
-+ print(r' %r,' % (name,))
-+ print(r'])')
-+ print()
-+
-+ def visit_variable(self):
-+ pass
-+
-+ def visit_free_function(self):
-+ function = self.decl
-+ if function.has_inline:
-+ return
-+
-+ s = self.functions
-+ ret_type = dump_type(function.return_type)
-+ arg_types = self.convert_args(function.arguments)
-+ s.write(' StdFunction(%s, %r, [%s]),\n' % (ret_type, function.name, arg_types))
-+
-+ def visit_free_operator(self):
-+ pass
-+
-+
-+def main():
-+ defines = []
-+ includes = []
-+ cxxflags = [
-+ '-Wno-unknown-attributes',
-+ '-Wno-unused-value',
-+ '-Wno-macro-redefined',
-+ ]
-+ compiler = 'g++'
-+
-+ args = sys.argv[1:]
-+ while args and args[0].startswith('-'):
-+ arg = args.pop(0)
-+ if arg.startswith('-I'):
-+ include = arg[2:]
-+ includes.append(include)
-+ elif arg.startswith('-D'):
-+ define = arg[2:]
-+ defines.append(define)
-+ else:
-+ sys.stderr.write('error: unknown option %r\n' % arg)
-+ sys.exit(1)
-+
-+ winsdk = True
-+ if winsdk:
-+ # Set up Clang compiler flags to use MinGW runtime
-+ # http://stackoverflow.com/a/19839946
-+ p = subprocess.Popen(
-+ ["x86_64-w64-mingw32-g++", "-x", "c++", "-E", "-Wp,-v", '-', '-fsyntax-only'],
-+ stdin=open(os.devnull, 'rt'),
-+ stdout=open(os.devnull, 'wt'),
-+ stderr=subprocess.PIPE)
-+ includes.append('/usr/share/castxml/clang/include')
-+ for line in p.stderr:
-+ if line.startswith(' '):
-+ include = line.strip()
-+ if os.path.isdir(include):
-+ if os.path.exists(os.path.join(include, 'ia32intrin.h')):
-+ # XXX: We must use Clang's intrinsic headers
-+ continue
-+ includes.append(os.path.normpath(include))
-+
-+ winver = 0x0602
-+
-+ defines += [
-+ # emulate MinGW
-+ '__MINGW32__',
-+ '_WIN32',
-+ '_WIN64',
-+ '__declspec(x)=',
-+ # Avoid namespace pollution when including windows.h
-+ # http://support.microsoft.com/kb/166474
-+ 'WIN32_LEAN_AND_MEAN',
-+ # Set Windows version to 8.1
-+ '_WIN32_WINNT=0x%04X' % winver,
-+ 'WINVER=0x%04X' % winver,
-+ 'NTDDI_VERSION=0x%04X0000' % winver,
-+ # Prevent headers from requiring a rpcndr.h version beyond MinGW's
-+ '__REQUIRED_RPCNDR_H_VERSION__=475',
-+ # Avoid C++ helper classes
-+ 'D3D10_NO_HELPERS',
-+ 'D3D11_NO_HELPERS',
-+ 'D3D11_VIDEO_NO_HELPERS',
-+ ]
-+
-+ # XXX: Change compiler?
-+ #compiler = 'cl'
-+
-+ # XXX: This doesn't seem to work well
-+ cxxflags += [
-+ #'-m32',
-+ #'-target', 'x86_64-pc-mingw32',
-+ ]
-+
-+ sys.stderr.write('Include path:\n')
-+ for include in includes:
-+ sys.stderr.write(' %s\n' % include)
-+ sys.stderr.write('Definitions:\n')
-+ for define in defines:
-+ sys.stderr.write(' %s\n' % define)
-+
-+ import logging
-+ utils.loggers.set_level(logging.DEBUG)
-+
-+ # Find the location of the xml generator (castxml or gccxml)
-+ generator_path, generator_name = utils.find_xml_generator("castxml")
-+
-+ # Configure the xml generator
-+ config = parser.xml_generator_configuration_t(
-+ xml_generator_path=generator_path,
-+ xml_generator=generator_name,
-+ define_symbols = defines,
-+ include_paths = includes,
-+ cflags = ' '.join(cxxflags),
-+ compiler = compiler,
-+ #keep_xml = True,
-+ )
-+
-+ script_dir = os.path.dirname(__file__)
-+ headers = [
-+ os.path.join(script_dir, '..', '..', 'compat', 'winsdk_compat.h'),
-+ os.path.join(script_dir, 'cxx2api.h'),
-+ ]
-+ main_header = args[0]
-+ headers.append(main_header)
-+
-+ decls = parser.parse(headers, config, parser.COMPILATION_MODE.ALL_AT_ONCE)
-+ global_ns = declarations.get_global_namespace(decls)
-+
-+ def decl_filter(decl):
-+ location = decl.location
-+ if location is None:
-+ return False
-+ return os.path.basename(location.file_name) in list(map(os.path.basename, args))
-+
-+ module, _ = os.path.splitext(main_header)
-+ visitor = decl2_dumper_t(module)
-+ visitor.start()
-+ for decl in global_ns.declarations:
-+ if not decl_filter(decl):
-+ continue
-+
-+ if sys.stdout.isatty():
-+ print('# ' + str(decl))
-+
-+ visitor.decl = decl
-+ algorithm.apply_visitor(visitor, decl)
-+ visitor.finish()
-+
-+
-+if __name__ == '__main__':
-+ main()
-diff --git a/specs/scripts/spec2api.py b/specs/scripts/spec2api.py
-index f21b08d5..7fb395a4 100755
---- a/specs/scripts/spec2api.py
-+++ b/specs/scripts/spec2api.py
-@@ -181,8 +181,8 @@ class SpecParser(LineParser):
- category = self.prefix.upper() + '_' + category
- if category != self.category:
- if self.category is not None:
-- print
-- print ' # %s' % category
-+ print()
-+ print(' # %s' % category)
- self.category = category
-
- if self.prefix == 'wgl':
-@@ -190,7 +190,7 @@ class SpecParser(LineParser):
- else:
- constructor = 'GlFunction'
-
-- print ' %s(%s, "%s", [%s]%s),' % (constructor, ret_type, function_name, ', '.join(args), extra)
-+ print(' %s(%s, "%s", [%s]%s),' % (constructor, ret_type, function_name, ', '.join(args), extra))
-
- array_re = re.compile(r'^array\s+\[(.*)\]$')
-
-diff --git a/specs/scripts/txt2api.py b/specs/scripts/txt2api.py
-index 6cd99dd9..e9469d3c 100755
---- a/specs/scripts/txt2api.py
-+++ b/specs/scripts/txt2api.py
-@@ -31,7 +31,7 @@
- import sys
- import re
- import optparse
--from urllib2 import urlopen
-+from urllib.request import urlopen
-
-
- def stderr(x):
-@@ -116,7 +116,7 @@ class TxtParser(LineParser):
- self.consume()
- line = self.consume()
- self.parse_section(line)
-- print
-+ print()
-
- def parse_section(self, name):
- if name == 'Name Strings':
-@@ -136,7 +136,7 @@ class TxtParser(LineParser):
- name = line.strip()
- if name.startswith('EGL_'):
- self.prefix = ''
-- print ' # %s' % name
-+ print(' # %s' % name)
-
- def skip_c_comments(self):
- while not self.eof():
-@@ -192,7 +192,7 @@ class TxtParser(LineParser):
- args.append(arg)
- if self.tokens[0] == ',':
- self.tokens.pop(0)
-- print ' GlFunction(%s, "%s", [%s]%s),' % (ret, name, ', '.join(args), extra)
-+ print(' GlFunction(%s, "%s", [%s]%s),' % (ret, name, ', '.join(args), extra))
-
- def parse_arg(self):
- type = self.parse_type()
-diff --git a/specs/scripts/xml2api.py b/specs/scripts/xml2api.py
-index e3820e09..f09fe0bf 100755
---- a/specs/scripts/xml2api.py
-+++ b/specs/scripts/xml2api.py
-@@ -126,7 +126,7 @@ def processRequire(node, filterName):
-
-
- def printPrototypes(prototypes, extensionName, functionNames, skip=set()):
-- print ' # %s' % extensionName
-+ print(' # %s' % extensionName)
-
- if extensionName == 'GL_EXT_direct_state_access':
- functionNames.sort()
-@@ -134,9 +134,9 @@ def printPrototypes(prototypes, extensionName, functionNames, skip=set()):
- for functionName in functionNames:
- if functionName not in skip:
- prototype = prototypes[functionName]
-- print ' %s,' % prototype
-+ print(' %s,' % prototype)
-
-- print
-+ print()
-
-
- def main():
-diff --git a/specs/scripts/xml2enum.py b/specs/scripts/xml2enum.py
-index 6d49e11c..cb2c4ae9 100755
---- a/specs/scripts/xml2enum.py
-+++ b/specs/scripts/xml2enum.py
-@@ -58,8 +58,8 @@ for arg in sys.argv[1:]:
- params.setdefault(value, name)
-
-
-- values = params.keys()
-+ values = list(params.keys())
- values.sort()
- for value in values:
- name = params[value]
-- print ' "%s",\t\t# 0x%04X' % (name, value)
-+ print(' "%s",\t\t# 0x%04X' % (name, value))
-diff --git a/specs/scripts/xml2glparams.py b/specs/scripts/xml2glparams.py
-index 7e2bc351..805aac86 100755
---- a/specs/scripts/xml2glparams.py
-+++ b/specs/scripts/xml2glparams.py
-@@ -58,8 +58,8 @@ for arg in sys.argv[1:]:
- params.setdefault(value, name)
-
-
-- values = params.keys()
-+ values = list(params.keys())
- values.sort()
- for value in values:
- name = params[value]
-- print ' ("",\tX,\t1,\t"%s"),\t# 0x%04X' % (name, value)
-+ print(' ("",\tX,\t1,\t"%s"),\t# 0x%04X' % (name, value))
-diff --git a/specs/stdapi.py b/specs/stdapi.py
-index c72c264b..487b6c1e 100644
---- a/specs/stdapi.py
-+++ b/specs/stdapi.py
-@@ -26,7 +26,9 @@
- """C basic types"""
-
-
--import debug
-+import sys
-+
-+from . import debug
-
-
- class Type:
-@@ -266,6 +268,10 @@ class Bitmask(Type):
- Flags = Bitmask
-
-
-+def EnumFlags(name, values):
-+ return Flags(Alias(name, UInt), values)
-+
-+
- class Array(Type):
-
- def __init__(self, type_, length):
-@@ -273,7 +279,7 @@ class Array(Type):
- self.type = type_
- self.length = length
- if not isinstance(length, int):
-- assert isinstance(length, basestring)
-+ assert isinstance(length, str)
- # Check if length is actually a valid constant expression
- try:
- eval(length, {}, {})
-@@ -329,6 +335,10 @@ class Struct(Type):
- def visit(self, visitor, *args, **kwargs):
- return visitor.visitStruct(self, *args, **kwargs)
-
-+ def getMemberByName(self, name):
-+ memberNames = [memberName for memberType, memberName in self.members]
-+ return memberNames.index(name)
-+
-
- def Union(kindExpr, kindTypes, contextLess=True):
- switchTypes = []
-@@ -372,7 +382,7 @@ def InOut(type, name):
-
- class Function:
-
-- def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False):
-+ def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False, overloaded=False):
- self.type = type
- self.name = name
-
-@@ -394,6 +404,7 @@ class Function:
- self.fail = fail
- self.sideeffects = sideeffects
- self.internal = internal
-+ self.overloaded = overloaded
-
- def prototype(self, name=None):
- if name is not None:
-@@ -414,6 +425,17 @@ class Function:
- s += ")"
- return s
-
-+ def sigName(self):
-+ name = self.name
-+ if self.overloaded:
-+ # suffix used to make overloaded functions/methods unique
-+ suffix = ','.join([str(arg.type) for arg in self.args])
-+ suffix = suffix.replace(' *', '*')
-+ suffix = suffix.replace(' &', '&')
-+ suffix = '(' + suffix + ')'
-+ name += suffix
-+ return name
-+
- def argNames(self):
- return [arg.name for arg in self.args]
-
-@@ -463,14 +485,12 @@ class Interface(Type):
- yield method
- for method in self.methods:
- yield method
-- raise StopIteration
-
- def iterBases(self):
- iface = self
- while iface is not None:
- yield iface
- iface = iface.base
-- raise StopIteration
-
- def hasBase(self, *bases):
- for iface in self.iterBases():
-@@ -484,14 +504,13 @@ class Interface(Type):
- yield iface, method
- for method in self.methods:
- yield self, method
-- raise StopIteration
-
-
- class Method(Function):
-
-- def __init__(self, type, name, args, call = '', const=False, sideeffects=True):
-+ def __init__(self, type, name, args, call = '', const=False, sideeffects=True, overloaded=False):
- assert call == '__stdcall'
-- Function.__init__(self, type, name, args, call = call, sideeffects=sideeffects)
-+ Function.__init__(self, type, name, args, call = call, sideeffects=sideeffects, overloaded=overloaded)
- for index in range(len(self.args)):
- self.args[index].index = index + 1
- self.const = const
-@@ -576,7 +595,7 @@ class Polymorphic(Type):
- else:
- cases[i].append(case)
-
-- return zip(cases, types)
-+ return list(zip(cases, types))
-
-
- def EnumPolymorphic(enumName, switchExpr, switchTypes, defaultType, contextLess=True):
-@@ -734,7 +753,7 @@ class Rebuilder(Visitor):
- if pointer_type is pointer.type:
- return pointer
- else:
-- return LinearPointer(pointer_type)
-+ return LinearPointer(pointer_type, self.size)
-
- def visitReference(self, reference):
- reference_type = self.visit(reference.type)
-@@ -792,7 +811,7 @@ class MutableRebuilder(Rebuilder):
-
- def visitReference(self, reference):
- # Strip out references
-- return reference.type
-+ return self.visit(reference.type)
-
-
- class Traverser(Visitor):
-@@ -894,7 +913,7 @@ class ExpanderMixin:
-
- def expand(self, expr):
- # Expand a C expression, replacing certain variables
-- if not isinstance(expr, basestring):
-+ if not isinstance(expr, str):
- return expr
- variables = {}
-
-diff --git a/specs/wglapi.py b/specs/wglapi.py
-index f24a8d21..563f0269 100644
---- a/specs/wglapi.py
-+++ b/specs/wglapi.py
-@@ -27,9 +27,9 @@
- """WGL API description"""
-
-
--from glapi import *
--from winapi import *
--from wglenum import *
-+from .glapi import *
-+from .winapi import *
-+from .wglenum import *
-
-
- wglapi = Module("WGL")
-diff --git a/specs/wglenum.py b/specs/wglenum.py
-index ad9bbccf..6bc4e74d 100644
---- a/specs/wglenum.py
-+++ b/specs/wglenum.py
-@@ -27,7 +27,7 @@
- """WGL enum description"""
-
-
--from stdapi import *
-+from .stdapi import *
-
- WGLenum = FakeEnum(Int, [
- "WGL_GPU_VENDOR_AMD", # 0x1F00
-diff --git a/specs/winapi.py b/specs/winapi.py
-index 445039ff..e66d063a 100644
---- a/specs/winapi.py
-+++ b/specs/winapi.py
-@@ -26,7 +26,7 @@
- """Win32 API type description."""
-
-
--from stdapi import *
-+from .stdapi import *
-
-
- SHORT = Alias("SHORT", Short)
-diff --git a/wrappers/CMakeLists.txt b/wrappers/CMakeLists.txt
-index 2ceac332..7a452ed4 100644
---- a/wrappers/CMakeLists.txt
-+++ b/wrappers/CMakeLists.txt
-@@ -79,7 +79,7 @@ if (WIN32)
- include_directories (BEFORE SYSTEM ${DirectX_D3D_INCLUDE_DIR})
- add_custom_command (
- OUTPUT ddrawtrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/ddrawtrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ddrawtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/ddrawtrace.cpp
- DEPENDS
- ddrawtrace.py
- dlltrace.py
-@@ -109,7 +109,7 @@ if (WIN32)
- include_directories (BEFORE SYSTEM ${DirectX_D3D9_INCLUDE_DIR} ${DirectX_D3D8_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3d8trace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8trace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d8trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d8trace.cpp
- DEPENDS
- d3d8trace.py
- dlltrace.py
-@@ -143,7 +143,7 @@ if (WIN32)
- include_directories (BEFORE SYSTEM ${DirectX_D3D9_INCLUDE_DIR})
- add_custom_command (
- OUTPUT d3d9trace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9trace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d3d9trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d3d9trace.cpp
- DEPENDS
- d3d9trace.py
- dlltrace.py
-@@ -179,7 +179,7 @@ if (WIN32)
-
- add_custom_command (
- OUTPUT dxgitrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgitrace.py > ${CMAKE_CURRENT_BINARY_DIR}/dxgitrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/dxgitrace.py > ${CMAKE_CURRENT_BINARY_DIR}/dxgitrace.cpp
- DEPENDS
- dxgitrace.py
- dlltrace.py
-@@ -216,7 +216,7 @@ if (WIN32)
-
- add_custom_command (
- OUTPUT d2d1trace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d2d1trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d2d1trace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/d2d1trace.py > ${CMAKE_CURRENT_BINARY_DIR}/d2d1trace.cpp
- DEPENDS
- d2d1trace.py
- trace.py
-@@ -241,7 +241,7 @@ if (WIN32)
- # opengl32.dll
- add_custom_command (
- OUTPUT wgltrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/wgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/wgltrace.cpp
- DEPENDS
- wgltrace.py
- gltrace.py
-@@ -278,7 +278,7 @@ elseif (APPLE)
- # OpenGL framework
- add_custom_command (
- OUTPUT cgltrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/cgltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/cgltrace.cpp
- DEPENDS
- cgltrace.py
- gltrace.py
-@@ -322,7 +322,7 @@ elseif (X11_FOUND)
- # libGL.so
- add_custom_command (
- OUTPUT glxtrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/glxtrace.py > ${CMAKE_CURRENT_BINARY_DIR}/glxtrace.cpp
- DEPENDS
- glxtrace.py
- gltrace.py
-@@ -372,7 +372,7 @@ if (ENABLE_EGL AND NOT WIN32 AND NOT APPLE)
- # libEGL.so/libGL.so
- add_custom_command (
- OUTPUT egltrace.cpp
-- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/egltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/egltrace.cpp
-+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/egltrace.py > ${CMAKE_CURRENT_BINARY_DIR}/egltrace.cpp
- DEPENDS
- egltrace.py
- gltrace.py
-diff --git a/wrappers/cgltrace.py b/wrappers/cgltrace.py
-index 6c72f696..02b3c518 100644
---- a/wrappers/cgltrace.py
-+++ b/wrappers/cgltrace.py
-@@ -43,55 +43,55 @@ class CglTracer(GlTracer):
- if function.name == 'CGLReleaseContext':
- # Unlike other GL APIs like EGL or GLX, CGL will make the context
- # not current if it's the current context.
-- print ' if (_CGLGetContextRetainCount(ctx) == 1) {'
-- print ' if (gltrace::releaseContext((uintptr_t)ctx)) {'
-- print ' if (_CGLGetCurrentContext() == ctx) {'
-- print ' gltrace::clearContext();'
-- print ' }'
-- print ' }'
-- print ' }'
-+ print(' if (_CGLGetContextRetainCount(ctx) == 1) {')
-+ print(' if (gltrace::releaseContext((uintptr_t)ctx)) {')
-+ print(' if (_CGLGetCurrentContext() == ctx) {')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-
- if function.name == 'CGLDestroyContext':
- # The same rule applies here about the as for CGLReleaseContext.
-- print ' if (gltrace::releaseContext((uintptr_t)ctx)) {'
-- print ' if (_CGLGetCurrentContext() == ctx) {'
-- print ' gltrace::clearContext();'
-- print ' }'
-- print ' }'
-+ print(' if (gltrace::releaseContext((uintptr_t)ctx)) {')
-+ print(' if (_CGLGetCurrentContext() == ctx) {')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-+ print(' }')
-
- GlTracer.traceFunctionImplBody(self, function)
-
- if function.name == 'CGLCreateContext':
-- print ' if (_result == kCGLNoError) {'
-- print ' gltrace::createContext((uintptr_t)*ctx);'
-- print ' }'
-+ print(' if (_result == kCGLNoError) {')
-+ print(' gltrace::createContext((uintptr_t)*ctx);')
-+ print(' }')
-
- if function.name == 'CGLSetCurrentContext':
-- print ' if (_result == kCGLNoError) {'
-- print ' if (ctx != NULL) {'
-- print ' gltrace::setContext((uintptr_t)ctx);'
-- print ' } else {'
-- print ' gltrace::clearContext();'
-- print ' }'
-- print ' }'
-+ print(' if (_result == kCGLNoError) {')
-+ print(' if (ctx != NULL) {')
-+ print(' gltrace::setContext((uintptr_t)ctx);')
-+ print(' } else {')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-+ print(' }')
-
- if function.name == 'CGLRetainContext':
-- print ' gltrace::retainContext((uintptr_t)ctx);'
-+ print(' gltrace::retainContext((uintptr_t)ctx);')
-
-
- if __name__ == '__main__':
-- print
-- print '#include <stdlib.h>'
-- print '#include <string.h>'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print
-- print '// To validate our prototypes'
-- print '#define GL_GLEXT_PROTOTYPES'
-- print
-- print '#include "glproc.hpp"'
-- print '#include "glsize.hpp"'
-- print
-+ print()
-+ print('#include <stdlib.h>')
-+ print('#include <string.h>')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print()
-+ print('// To validate our prototypes')
-+ print('#define GL_GLEXT_PROTOTYPES')
-+ print()
-+ print('#include "glproc.hpp"')
-+ print('#include "glsize.hpp"')
-+ print()
-
- module = Module()
- module.mergeModule(cglapi)
-@@ -101,7 +101,7 @@ if __name__ == '__main__':
- tracer = CglTracer()
- tracer.traceApi(api)
-
-- print r'''
-+ print(r'''
-
- PUBLIC
- void * gll_noop = 0;
-@@ -130,4 +130,4 @@ _init(void) {
- setenv("SDL_OPENGL_LIBRARY", "/System/Library/Frameworks/OpenGL.framework/OpenGL", 1);
- }
-
--'''
-+''')
-diff --git a/wrappers/d2d1trace.py b/wrappers/d2d1trace.py
-index 26223005..2176341f 100644
---- a/wrappers/d2d1trace.py
-+++ b/wrappers/d2d1trace.py
-@@ -31,15 +31,15 @@ from specs.d2d1 import d2d1
-
-
- if __name__ == '__main__':
-- print '#include "guids_defs.hpp"'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print '#include "os.hpp"'
-- print
-- print '#define DWRITE_EXPORT WINAPI'
-- print
-- print '#include "d2dimports.hpp"'
-- print
-+ print('#include "guids_defs.hpp"')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print('#include "os.hpp"')
-+ print()
-+ print('#define DWRITE_EXPORT WINAPI')
-+ print()
-+ print('#include "d2dimports.hpp"')
-+ print()
-
- api = API()
- api.addModule(d2d1)
-diff --git a/wrappers/d3d8trace.py b/wrappers/d3d8trace.py
-index 2903c48f..11afbca5 100644
---- a/wrappers/d3d8trace.py
-+++ b/wrappers/d3d8trace.py
-@@ -34,7 +34,7 @@ class D3D8Tracer(DllTracer):
- def serializeArgValue(self, function, arg):
- # Dump shaders as strings
- if arg.type is D3DSHADER8:
-- print ' DumpShader(trace::localWriter, %s);' % (arg.name)
-+ print(' DumpShader(trace::localWriter, %s);' % (arg.name))
- return
-
- DllTracer.serializeArgValue(self, function, arg)
-@@ -55,32 +55,32 @@ class D3D8Tracer(DllTracer):
-
- def implementWrapperInterfaceMethodBody(self, interface, base, method):
- if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
-- print ' if (_MappedSize && m_pbData) {'
-+ print(' if (_MappedSize && m_pbData) {')
- self.emit_memcpy('(LPBYTE)m_pbData', '_MappedSize')
-- print ' }'
-+ print(' }')
-
- DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
-
- if method.name in ('Lock', 'LockRect', 'LockBox'):
- # FIXME: handle recursive locks
-- print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
-- print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
-- print ' } else {'
-- print ' m_pbData = NULL;'
-- print ' _MappedSize = 0;'
-- print ' }'
-+ print(' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {')
-+ print(' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1]))
-+ print(' } else {')
-+ print(' m_pbData = NULL;')
-+ print(' _MappedSize = 0;')
-+ print(' }')
-
-
- if __name__ == '__main__':
-- print '#define INITGUID'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print '#include "os.hpp"'
-- print
-- print '#include "d3d8imports.hpp"'
-- print '#include "d3d8size.hpp"'
-- print '#include "d3d9shader.hpp"'
-- print
-+ print('#define INITGUID')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print('#include "os.hpp"')
-+ print()
-+ print('#include "d3d8imports.hpp"')
-+ print('#include "d3d8size.hpp"')
-+ print('#include "d3d9shader.hpp"')
-+ print()
-
- api = API()
- api.addModule(d3d8)
-diff --git a/wrappers/d3d9trace.py b/wrappers/d3d9trace.py
-index 0850ba3e..53d5152f 100644
---- a/wrappers/d3d9trace.py
-+++ b/wrappers/d3d9trace.py
-@@ -35,7 +35,7 @@ class D3D9Tracer(DllTracer):
- def serializeArgValue(self, function, arg):
- # Dump shaders as strings
- if arg.type is D3DSHADER9:
-- print ' DumpShader(trace::localWriter, %s);' % (arg.name)
-+ print(' DumpShader(trace::localWriter, %s);' % (arg.name))
- return
-
- DllTracer.serializeArgValue(self, function, arg)
-@@ -72,49 +72,49 @@ class D3D9Tracer(DllTracer):
- def implementWrapperInterfaceMethodBody(self, interface, base, method):
- if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
- if interface.name in ['IDirect3DTexture9']:
-- print ' std::map<UINT, std::pair<size_t, VOID *> >::iterator it = _MappedData.find(Level);'
-- print ' if (it != _MappedData.end()) {'
-+ print(' std::map<UINT, std::pair<size_t, VOID *> >::iterator it = _MappedData.find(Level);')
-+ print(' if (it != _MappedData.end()) {')
- self.emit_memcpy('(LPBYTE)it->second.second', 'it->second.first')
-- print ' _MappedData.erase(it);'
-- print ' }'
-+ print(' _MappedData.erase(it);')
-+ print(' }')
- else:
-- print ' if (_MappedSize && m_pbData) {'
-+ print(' if (_MappedSize && m_pbData) {')
- self.emit_memcpy('(LPBYTE)m_pbData', '_MappedSize')
-- print ' }'
-+ print(' }')
-
- DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
-
- if method.name in ('Lock', 'LockRect', 'LockBox'):
- if interface.name in ['IDirect3DTexture9']:
-- print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
-- print ' size_t mappedSize;'
-- print ' VOID * pbData;'
-- print ' _getMapInfo(_this, %s, pbData, mappedSize);' % ', '.join(method.argNames()[:-1])
-- print ' _MappedData[Level] = std::make_pair(mappedSize, pbData);'
-- print ' } else {'
-- print ' _MappedData.erase(Level);'
-- print ' }'
-+ print(' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {')
-+ print(' size_t mappedSize;')
-+ print(' VOID * pbData;')
-+ print(' _getMapInfo(_this, %s, pbData, mappedSize);' % ', '.join(method.argNames()[:-1]))
-+ print(' _MappedData[Level] = std::make_pair(mappedSize, pbData);')
-+ print(' } else {')
-+ print(' _MappedData.erase(Level);')
-+ print(' }')
- else:
- # FIXME: handle recursive locks
-- print ' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {'
-- print ' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1])
-- print ' } else {'
-- print ' m_pbData = NULL;'
-- print ' _MappedSize = 0;'
-- print ' }'
-+ print(' if (SUCCEEDED(_result) && !(Flags & D3DLOCK_READONLY)) {')
-+ print(' _getMapInfo(_this, %s, m_pbData, _MappedSize);' % ', '.join(method.argNames()[:-1]))
-+ print(' } else {')
-+ print(' m_pbData = NULL;')
-+ print(' _MappedSize = 0;')
-+ print(' }')
-
-
- if __name__ == '__main__':
-- print '#define INITGUID'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print '#include "os.hpp"'
-- print
-- print '#include "d3d9imports.hpp"'
-- print '#include "d3d9size.hpp"'
-- print '#include "d3d9shader.hpp"'
-- print '#include "dxva2imports.hpp"'
-- print
-+ print('#define INITGUID')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print('#include "os.hpp"')
-+ print()
-+ print('#include "d3d9imports.hpp"')
-+ print('#include "d3d9size.hpp"')
-+ print('#include "d3d9shader.hpp"')
-+ print('#include "dxva2imports.hpp"')
-+ print()
-
- d3d9.mergeModule(d3dperf)
-
-diff --git a/wrappers/ddrawtrace.py b/wrappers/ddrawtrace.py
-index 96602d21..da7ffbe7 100644
---- a/wrappers/ddrawtrace.py
-+++ b/wrappers/ddrawtrace.py
-@@ -41,12 +41,12 @@ class DDrawTracer(DllTracer):
-
-
- if __name__ == '__main__':
-- print '#define INITGUID'
-- print '#include "d3dimports.hpp"'
-- print '#include "trace_writer_local.hpp"'
-- print '#include "d3d7size.hpp"'
-- print '#include "os.hpp"'
-- print
-+ print('#define INITGUID')
-+ print('#include "d3dimports.hpp"')
-+ print('#include "trace_writer_local.hpp"')
-+ print('#include "d3d7size.hpp"')
-+ print('#include "os.hpp"')
-+ print()
-
- api = API()
- api.addModule(ddraw)
-diff --git a/wrappers/dlltrace.py b/wrappers/dlltrace.py
-index 26962216..8ac18b0c 100644
---- a/wrappers/dlltrace.py
-+++ b/wrappers/dlltrace.py
-@@ -37,24 +37,24 @@ class DllDispatcher(Dispatcher):
-
- def dispatchModule(self, module):
- tag = module.name.upper()
-- print r'HMODULE g_h%sModule = NULL;' % (tag,)
-- print r''
-- print r'static PROC'
-- print r'_get%sProcAddress(LPCSTR lpProcName) {' % tag
-- print r' if (!g_h%sModule) {' % tag
-- print r' char szDll[MAX_PATH] = {0};'
-- print r' if (!GetSystemDirectoryA(szDll, MAX_PATH)) {'
-- print r' return NULL;'
-- print r' }'
-- print r' strcat(szDll, "\\%s.dll");' % module.name
-- print r' g_h%sModule = LoadLibraryA(szDll);' % tag
-- print r' if (!g_h%sModule) {' % tag
-- print r' return NULL;'
-- print r' }'
-- print r' }'
-- print r' return GetProcAddress(g_h%sModule, lpProcName);' % tag
-- print r'}'
-- print r''
-+ print(r'HMODULE g_h%sModule = NULL;' % (tag,))
-+ print(r'')
-+ print(r'static PROC')
-+ print(r'_get%sProcAddress(LPCSTR lpProcName) {' % tag)
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' char szDll[MAX_PATH] = {0};')
-+ print(r' if (!GetSystemDirectoryA(szDll, MAX_PATH)) {')
-+ print(r' return NULL;')
-+ print(r' }')
-+ print(r' strcat(szDll, "\\%s.dll");' % module.name)
-+ print(r' g_h%sModule = LoadLibraryA(szDll);' % tag)
-+ print(r' if (!g_h%sModule) {' % tag)
-+ print(r' return NULL;')
-+ print(r' }')
-+ print(r' }')
-+ print(r' return GetProcAddress(g_h%sModule, lpProcName);' % tag)
-+ print(r'}')
-+ print(r'')
-
- Dispatcher.dispatchModule(self, module)
-
-diff --git a/wrappers/dxgitrace.py b/wrappers/dxgitrace.py
-index 3edda2c2..134f45d7 100644
---- a/wrappers/dxgitrace.py
-+++ b/wrappers/dxgitrace.py
-@@ -40,47 +40,47 @@ class D3DCommonTracer(DllTracer):
- def serializeArgValue(self, function, arg):
- # Dump shaders as strings
- if isinstance(arg.type, stdapi.Blob) and arg.name.startswith('pShaderBytecode'):
-- print ' DumpShader(trace::localWriter, %s, %s);' % (arg.name, arg.type.size)
-+ print(' DumpShader(trace::localWriter, %s, %s);' % (arg.name, arg.type.size))
- return
-
- # Serialize the swapchain dimensions
- if function.name == 'CreateSwapChain' and arg.name == 'pDesc' \
- or arg.name == 'pSwapChainDesc':
-- print r' DXGI_SWAP_CHAIN_DESC *_pSwapChainDesc = NULL;'
-- print r' DXGI_SWAP_CHAIN_DESC _SwapChainDesc;'
-- print r' if (%s) {' % arg.name
-- print r' _SwapChainDesc = *%s;' % arg.name
-+ print(r' DXGI_SWAP_CHAIN_DESC *_pSwapChainDesc = NULL;')
-+ print(r' DXGI_SWAP_CHAIN_DESC _SwapChainDesc;')
-+ print(r' if (%s) {' % arg.name)
-+ print(r' _SwapChainDesc = *%s;' % arg.name)
- if function.name != 'CreateSwapChain' or not self.interface.name.endswith('DWM'):
- # Obtain size from the window
-- print r' RECT _rect;'
-- print r' if (GetClientRect(%s->OutputWindow, &_rect)) {' % arg.name
-- print r' if (%s->BufferDesc.Width == 0) {' % arg.name
-- print r' _SwapChainDesc.BufferDesc.Width = _rect.right - _rect.left;'
-- print r' }'
-- print r' if (%s->BufferDesc.Height == 0) {' % arg.name
-- print r' _SwapChainDesc.BufferDesc.Height = _rect.bottom - _rect.top;'
-- print r' }'
-- print r' }'
-+ print(r' RECT _rect;')
-+ print(r' if (GetClientRect(%s->OutputWindow, &_rect)) {' % arg.name)
-+ print(r' if (%s->BufferDesc.Width == 0) {' % arg.name)
-+ print(r' _SwapChainDesc.BufferDesc.Width = _rect.right - _rect.left;')
-+ print(r' }')
-+ print(r' if (%s->BufferDesc.Height == 0) {' % arg.name)
-+ print(r' _SwapChainDesc.BufferDesc.Height = _rect.bottom - _rect.top;')
-+ print(r' }')
-+ print(r' }')
- else:
- # Obtain size from the output
-- print r' DXGI_OUTPUT_DESC _OutputDesc;'
-- print r' if (SUCCEEDED(pOutput->GetDesc(&_OutputDesc))) {'
-- print r' _SwapChainDesc.BufferDesc.Width = _OutputDesc.DesktopCoordinates.right - _OutputDesc.DesktopCoordinates.left;'
-- print r' _SwapChainDesc.BufferDesc.Height = _OutputDesc.DesktopCoordinates.bottom - _OutputDesc.DesktopCoordinates.top;'
-- print r' }'
-- print r' _pSwapChainDesc = &_SwapChainDesc;'
-- print r' }'
-+ print(r' DXGI_OUTPUT_DESC _OutputDesc;')
-+ print(r' if (SUCCEEDED(pOutput->GetDesc(&_OutputDesc))) {')
-+ print(r' _SwapChainDesc.BufferDesc.Width = _OutputDesc.DesktopCoordinates.right - _OutputDesc.DesktopCoordinates.left;')
-+ print(r' _SwapChainDesc.BufferDesc.Height = _OutputDesc.DesktopCoordinates.bottom - _OutputDesc.DesktopCoordinates.top;')
-+ print(r' }')
-+ print(r' _pSwapChainDesc = &_SwapChainDesc;')
-+ print(r' }')
- self.serializeValue(arg.type, '_pSwapChainDesc')
- return
-
- # Serialize object names
- if function.name == 'SetPrivateData' and arg.name == 'pData':
- iid = function.args[0].name
-- print r' if (%s == WKPDID_D3DDebugObjectName) {' % iid
-- print r' trace::localWriter.writeString(static_cast<const char *>(pData), DataSize);'
-- print r' } else {'
-+ print(r' if (%s == WKPDID_D3DDebugObjectName) {' % iid)
-+ print(r' trace::localWriter.writeString(static_cast<const char *>(pData), DataSize);')
-+ print(r' } else {')
- DllTracer.serializeArgValue(self, function, arg)
-- print r' }'
-+ print(r' }')
- return
-
- DllTracer.serializeArgValue(self, function, arg)
-@@ -110,47 +110,47 @@ class D3DCommonTracer(DllTracer):
- if method.getArgByName('pInitialData'):
- pDesc1 = method.getArgByName('pDesc1')
- if pDesc1 is not None:
-- print r' %s pDesc = pDesc1;' % (pDesc1.type,)
-+ print(r' %s pDesc = pDesc1;' % (pDesc1.type,))
-
- if method.name in ('Map', 'Unmap'):
- # On D3D11 Map/Unmap is not a resource method, but a context method instead.
- resourceArg = method.getArgByName('pResource')
- if resourceArg is None:
-- print ' _MAP_DESC & _MapDesc = m_MapDesc;'
-+ print(' _MAP_DESC & _MapDesc = m_MapDesc;')
- else:
-- print ' _MAP_DESC & _MapDesc = m_MapDescs[std::pair<%s, UINT>(pResource, Subresource)];' % resourceArg.type
-+ print(' _MAP_DESC & _MapDesc = m_MapDescs[std::pair<%s, UINT>(pResource, Subresource)];' % resourceArg.type)
-
- if method.name == 'Unmap':
-- print ' if (_MapDesc.Size && _MapDesc.pData) {'
-+ print(' if (_MapDesc.Size && _MapDesc.pData) {')
- self.emit_memcpy('_MapDesc.pData', '_MapDesc.Size')
-- print ' }'
-+ print(' }')
-
- DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method)
-
- if method.name == 'Map':
- # NOTE: recursive locks are explicitely forbidden
-- print ' if (SUCCEEDED(_result)) {'
-- print ' _getMapDesc(_this, %s, _MapDesc);' % ', '.join(method.argNames())
-- print ' } else {'
-- print ' _MapDesc.pData = NULL;'
-- print ' _MapDesc.Size = 0;'
-- print ' }'
-+ print(' if (SUCCEEDED(_result)) {')
-+ print(' _getMapDesc(_this, %s, _MapDesc);' % ', '.join(method.argNames()))
-+ print(' } else {')
-+ print(' _MapDesc.pData = NULL;')
-+ print(' _MapDesc.Size = 0;')
-+ print(' }')
-
-
- if __name__ == '__main__':
-- print r'#define INITGUID'
-- print
-- print r'#include "trace_writer_local.hpp"'
-- print r'#include "os.hpp"'
-- print
-- print r'#include "d3dcommonshader.hpp"'
-- print
-- print r'#include "d3d10imports.hpp"'
-- print r'#include "d3d10size.hpp"'
-- print r'#include "d3d11imports.hpp"'
-- print r'#include "d3d11size.hpp"'
-- print r'#include "d3d9imports.hpp" // D3DPERF_*'
-- print
-+ print(r'#define INITGUID')
-+ print()
-+ print(r'#include "trace_writer_local.hpp"')
-+ print(r'#include "os.hpp"')
-+ print()
-+ print(r'#include "d3dcommonshader.hpp"')
-+ print()
-+ print(r'#include "d3d10imports.hpp"')
-+ print(r'#include "d3d10size.hpp"')
-+ print(r'#include "d3d11imports.hpp"')
-+ print(r'#include "d3d11size.hpp"')
-+ print(r'#include "d3d9imports.hpp" // D3DPERF_*')
-+ print()
-
- api = API()
- api.addModule(dxgi.dxgi)
-diff --git a/wrappers/egltrace.py b/wrappers/egltrace.py
-index 1fcb0fd6..f5b61c0c 100644
---- a/wrappers/egltrace.py
-+++ b/wrappers/egltrace.py
-@@ -50,239 +50,239 @@ class EglTracer(GlTracer):
-
- def traceFunctionImplBody(self, function):
- if function.name == 'glTexDirectMapVIV':
-- print ' // prevent loop call'
-- print ' glTexDirectVIVMap(target, width, height, format, Logical, Physical);'
-+ print(' // prevent loop call')
-+ print(' glTexDirectVIVMap(target, width, height, format, Logical, Physical);')
- return
-
- if function.name == 'glTexDirectInvalidateVIV':
-- print ' // get current texture'
-- print ' GLint tex = 0;'
-- print ' int32_t size = 0;'
-- print ' int32_t ysize = 0;'
-- print ' int32_t usize = 0;'
-- print ' int32_t vsize = 0;'
-- print ' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);'
-- print ' if(tex == 0)'
-- print ' {'
-- print ' return;'
-- print ' }'
-- print ' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];'
-- print ' switch(data.format){'
-- print ' case GL_VIV_YV12:'
-- print ' case GL_VIV_I420:'
-- print ' ysize=data.width * data.height;'
-- print ' usize=ysize/4;'
-- print ' vsize=usize;'
-- print ' break;'
-- print ' case GL_VIV_NV12:'
-- print ' case GL_VIV_NV21:'
-- print ' ysize=data.width * data.height;'
-- print ' usize=ysize/2;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_RGBA:'
-- print ' case GL_BGRA_EXT:'
-- print ' ysize=data.width * data.height *4;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_RGB:'
-- print ' ysize=data.width * data.height *3;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_VIV_YUY2:'
-- print ' case GL_VIV_UYVY:'
-- print ' case GL_RGB565_OES:'
-- print ' case GL_LUMINANCE8_ALPHA8_EXT:'
-- print ' ysize=data.width * data.height *2;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' case GL_ALPHA:'
-- print ' ysize=data.width * data.height;'
-- print ' usize=0;'
-- print ' vsize=0;'
-- print ' break;'
-- print ' default:'
-- print ' return;'
-- print ' }'
-- print ' if (NULL==(GLvoid*)data.logical) {'
-- print ' if (ysize > 0) {'
-+ print(' // get current texture')
-+ print(' GLint tex = 0;')
-+ print(' int32_t size = 0;')
-+ print(' int32_t ysize = 0;')
-+ print(' int32_t usize = 0;')
-+ print(' int32_t vsize = 0;')
-+ print(' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);')
-+ print(' if(tex == 0)')
-+ print(' {')
-+ print(' return;')
-+ print(' }')
-+ print(' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];')
-+ print(' switch(data.format){')
-+ print(' case GL_VIV_YV12:')
-+ print(' case GL_VIV_I420:')
-+ print(' ysize=data.width * data.height;')
-+ print(' usize=ysize/4;')
-+ print(' vsize=usize;')
-+ print(' break;')
-+ print(' case GL_VIV_NV12:')
-+ print(' case GL_VIV_NV21:')
-+ print(' ysize=data.width * data.height;')
-+ print(' usize=ysize/2;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_RGBA:')
-+ print(' case GL_BGRA_EXT:')
-+ print(' ysize=data.width * data.height *4;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_RGB:')
-+ print(' ysize=data.width * data.height *3;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_VIV_YUY2:')
-+ print(' case GL_VIV_UYVY:')
-+ print(' case GL_RGB565_OES:')
-+ print(' case GL_LUMINANCE8_ALPHA8_EXT:')
-+ print(' ysize=data.width * data.height *2;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' case GL_ALPHA:')
-+ print(' ysize=data.width * data.height;')
-+ print(' usize=0;')
-+ print(' vsize=0;')
-+ print(' break;')
-+ print(' default:')
-+ print(' return;')
-+ print(' }')
-+ print(' if (NULL==(GLvoid*)data.logical) {')
-+ print(' if (ysize > 0) {')
- self.emit_memcpy_opt('(GLvoid*)data.planes[0]', 'ysize')
-- print ' }'
-- print ' if (usize > 0) {'
-+ print(' }')
-+ print(' if (usize > 0) {')
- self.emit_memcpy_opt('(GLvoid*)data.planes[1]', 'usize')
-- print ' }'
-- print ' if (vsize > 0) {'
-+ print(' }')
-+ print(' if (vsize > 0) {')
- self.emit_memcpy_opt('(GLvoid*)data.planes[2]', 'vsize')
-- print ' }'
-- print ' } else {'
-- print ' size = ysize + usize + vsize;'
-- print ' if (size > 0) {'
-+ print(' }')
-+ print(' } else {')
-+ print(' size = ysize + usize + vsize;')
-+ print(' if (size > 0) {')
- self.emit_memcpy_opt('(GLvoid*)data.logical', 'size')
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-
- if function.name == 'eglGetProcAddress':
-- print ' procname = __get_alias_func_name(procname);'
-+ print(' procname = __get_alias_func_name(procname);')
-
- GlTracer.traceFunctionImplBody(self, function)
-
- if function.name == 'glTexDirectVIV':
-- print ' // get current texture'
-- print ' GLint tex = 0;'
-- print ' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);'
-- print ' if(tex != 0)'
-- print ' {'
-- print ' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];'
-- print ' data.width = width;'
-- print ' data.height = height;'
-- print ' data.format = format;'
-- print ' data.planes[0] = pixels[0];'
-- print ' data.planes[1] = pixels[1];'
-- print ' data.planes[2] = pixels[2];'
-- print ' }'
-+ print(' // get current texture')
-+ print(' GLint tex = 0;')
-+ print(' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);')
-+ print(' if(tex != 0)')
-+ print(' {')
-+ print(' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];')
-+ print(' data.width = width;')
-+ print(' data.height = height;')
-+ print(' data.format = format;')
-+ print(' data.planes[0] = pixels[0];')
-+ print(' data.planes[1] = pixels[1];')
-+ print(' data.planes[2] = pixels[2];')
-+ print(' }')
-
- if function.name == 'glTexDirectVIVMap' or function.name == 'glTexDirectTiledMapVIV':
-- print ' // get current texture'
-- print ' GLint tex = 0;'
-- print ' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);'
-- print ' if(tex != 0)'
-- print ' {'
-- print ' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];'
-- print ' data.width = width;'
-- print ' data.height = height;'
-- print ' data.format = format;'
-- print ' data.logical = *Logical; // Logical != NULL'
-- print ' data.physical = *Physical;'
-- print ' }'
-+ print(' // get current texture')
-+ print(' GLint tex = 0;')
-+ print(' _glGetIntegerv(GL_TEXTURE_BINDING_2D, &tex);')
-+ print(' if(tex != 0)')
-+ print(' {')
-+ print(' TEXDIRECTVIVDATA &data = _directTextureDataMap[tex];')
-+ print(' data.width = width;')
-+ print(' data.height = height;')
-+ print(' data.format = format;')
-+ print(' data.logical = *Logical; // Logical != NULL')
-+ print(' data.physical = *Physical;')
-+ print(' }')
-
- if function.name == 'eglCreateContext':
-- print ' if (_result != EGL_NO_CONTEXT)'
-- print ' gltrace::createContext((uintptr_t)_result);'
-+ print(' if (_result != EGL_NO_CONTEXT)')
-+ print(' gltrace::createContext((uintptr_t)_result);')
-
- if function.name == 'eglMakeCurrent':
-- print r' if (_result) {'
-- print r' // update the profile'
-- print r' if (ctx != EGL_NO_CONTEXT) {'
-- print r' gltrace::setContext((uintptr_t)ctx);'
-- print r' gltrace::Context *tr = gltrace::getContext();'
-- print r' EGLint api = EGL_OPENGL_ES_API;'
-- print r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);'
-- print r' if (api == EGL_OPENGL_API) {'
-- print r' assert(tr->profile.api == glprofile::API_GL);'
-- print r' } else if (api == EGL_OPENGL_ES_API) {'
-- print r' EGLint client_version = 1;'
-- print r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &client_version);'
-- print r' if (tr->profile.api != glprofile::API_GLES ||'
-- print r' tr->profile.major < client_version) {'
-- print r' std::string version = tr->profile.str();'
-- print r' os::log("apitrace: warning: eglMakeCurrent: expected OpenGL ES %i.x context, but got %s\n",'
-- print r' client_version, version.c_str());'
-- print r' }'
-- print r' } else {'
-- print r' assert(0);'
-- print r' }'
-- print r' } else {'
-- print r' gltrace::clearContext();'
-- print r' }'
-- print r' }'
-+ print(r' if (_result) {')
-+ print(r' // update the profile')
-+ print(r' if (ctx != EGL_NO_CONTEXT) {')
-+ print(r' gltrace::setContext((uintptr_t)ctx);')
-+ print(r' gltrace::Context *tr = gltrace::getContext();')
-+ print(r' EGLint api = EGL_OPENGL_ES_API;')
-+ print(r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);')
-+ print(r' if (api == EGL_OPENGL_API) {')
-+ print(r' assert(tr->profile.api == glprofile::API_GL);')
-+ print(r' } else if (api == EGL_OPENGL_ES_API) {')
-+ print(r' EGLint client_version = 1;')
-+ print(r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &client_version);')
-+ print(r' if (tr->profile.api != glprofile::API_GLES ||')
-+ print(r' tr->profile.major < client_version) {')
-+ print(r' std::string version = tr->profile.str();')
-+ print(r' os::log("apitrace: warning: eglMakeCurrent: expected OpenGL ES %i.x context, but got %s\n",')
-+ print(r' client_version, version.c_str());')
-+ print(r' }')
-+ print(r' } else {')
-+ print(r' assert(0);')
-+ print(r' }')
-+ print(r' } else {')
-+ print(r' gltrace::clearContext();')
-+ print(r' }')
-+ print(r' }')
-
- if function.name == 'eglDestroyContext':
-- print ' if (_result) {'
-- print ' gltrace::releaseContext((uintptr_t)ctx);'
-- print ' }'
-+ print(' if (_result) {')
-+ print(' gltrace::releaseContext((uintptr_t)ctx);')
-+ print(' }')
-
- if function.name == 'glEGLImageTargetTexture2DOES':
-- print ' image_info *info = _EGLImageKHR_get_image_info(target, image);'
-- print ' if (info) {'
-- print ' GLint level = 0;'
-- print ' GLint internalformat = info->internalformat;'
-- print ' GLsizei width = info->width;'
-- print ' GLsizei height = info->height;'
-- print ' GLint border = 0;'
-- print ' GLenum format = info->format;'
-- print ' GLenum type = info->type;'
-- print ' const GLvoid * pixels = info->pixels;'
-+ print(' image_info *info = _EGLImageKHR_get_image_info(target, image);')
-+ print(' if (info) {')
-+ print(' GLint level = 0;')
-+ print(' GLint internalformat = info->internalformat;')
-+ print(' GLsizei width = info->width;')
-+ print(' GLsizei height = info->height;')
-+ print(' GLint border = 0;')
-+ print(' GLenum format = info->format;')
-+ print(' GLenum type = info->type;')
-+ print(' const GLvoid * pixels = info->pixels;')
- self.emitFakeTexture2D()
-- print ' _EGLImageKHR_free_image_info(info);'
-- print ' }'
-+ print(' _EGLImageKHR_free_image_info(info);')
-+ print(' }')
-
-
- if __name__ == '__main__':
-- print '#include <stdlib.h>'
-- print '#include <string.h>'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print
-- print '// To validate our prototypes'
-- print '#define GL_GLEXT_PROTOTYPES'
-- print '#define EGL_EGLEXT_PROTOTYPES'
-- print
-- print '#include "dlopen.hpp"'
-- print '#include "glproc.hpp"'
-- print '#include "glsize.hpp"'
-- print '#include "eglsize.hpp"'
-- print
-- print 'static const char *__get_alias_func_name(const char *origFunName)'
-- print '{'
-- print ' /* Vivante driver uses alias name for following OES/EXT functions, that means dlsym for thoese functions will fail */'
-- print ' static const char * __glExtProcAlias[][2] ='
-- print ' {'
-- print ' /* Extension API alias for GL_OES_texture_3D */'
-- print ' {"glTexImage3DOES", "glTexImage3D"},'
-- print ' {"glTexSubImage3DOES", "glTexSubImage3D"},'
-- print ' {"glCopyTexSubImage3DOES", "glCopyTexSubImage3D"},'
-- print ' {"glCompressedTexImage3DOES", "glCompressedTexImage3D"},'
-- print ' {"glCompressedTexSubImage3DOES", "glCompressedTexSubImage3D"},'
-- print
-- print ' /* Extension API alias for GL_OES_get_program_binary */'
-- print ' {"glGetProgramBinaryOES", "glGetProgramBinary"},'
-- print ' {"glProgramBinaryOES", "glProgramBinary"},'
-- print
-- print ' /* Extension API alias for GL_OES_vertex_array_object */'
-- print ' {"glBindVertexArrayOES", "glBindVertexArray"},'
-- print ' {"glDeleteVertexArraysOES", "glDeleteVertexArrays"},'
-- print ' {"glGenVertexArraysOES", "glGenVertexArrays"},'
-- print ' {"glIsVertexArrayOES", "glIsVertexArray"},'
-- print
-- print ' /* Extension API alias for GL_OES_blend_minmax */'
-- print ' {"glBlendEquationEXT", "glBlendEquation"}'
-- print ' };'
-- print
-- print ' int count = sizeof(__glExtProcAlias) / sizeof(__glExtProcAlias[0]);'
-- print ' int i;'
-- print
-- print ' for(i=0; i<count; i++)'
-- print ' {'
-- print ' if(strcmp(__glExtProcAlias[i][0], origFunName) == 0)'
-- print ' return __glExtProcAlias[i][1];'
-- print ' }'
-- print
-- print ' return origFunName;'
-- print '}'
--
-- print
-- print 'typedef struct TexDirectVivData'
-- print '{'
-- print ' int width;'
-- print ' int height;'
-- print ' GLenum format;'
-- print ' GLvoid*planes[3]; // used for glTexDirectVIV'
-- print ' GLvoid*logical; // used for glTexDirectVIVMap/glTexDirectMapVIV/glTexDirectTiledMapVIV'
-- print ' GLuint physical;'
-- print '}TEXDIRECTVIVDATA;'
-- print
-- print 'static std::map<GLint, TEXDIRECTVIVDATA> _directTextureDataMap;'
-- print
-- print '#define GL_VIV_YV12 0x8FC0'
-- print '#define GL_VIV_NV12 0x8FC1'
-- print '#define GL_VIV_YUY2 0x8FC2'
-- print '#define GL_VIV_UYVY 0x8FC3'
-- print '#define GL_VIV_NV21 0x8FC4'
-- print '#define GL_VIV_I420 0x8FC5'
-- print
-+ print('#include <stdlib.h>')
-+ print('#include <string.h>')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print()
-+ print('// To validate our prototypes')
-+ print('#define GL_GLEXT_PROTOTYPES')
-+ print('#define EGL_EGLEXT_PROTOTYPES')
-+ print()
-+ print('#include "dlopen.hpp"')
-+ print('#include "glproc.hpp"')
-+ print('#include "glsize.hpp"')
-+ print('#include "eglsize.hpp"')
-+ print()
-+ print('static const char *__get_alias_func_name(const char *origFunName)')
-+ print('{')
-+ print(' /* Vivante driver uses alias name for following OES/EXT functions, that means dlsym for thoese functions will fail */')
-+ print(' static const char * __glExtProcAlias[][2] =')
-+ print(' {')
-+ print(' /* Extension API alias for GL_OES_texture_3D */')
-+ print(' {"glTexImage3DOES", "glTexImage3D"},')
-+ print(' {"glTexSubImage3DOES", "glTexSubImage3D"},')
-+ print(' {"glCopyTexSubImage3DOES", "glCopyTexSubImage3D"},')
-+ print(' {"glCompressedTexImage3DOES", "glCompressedTexImage3D"},')
-+ print(' {"glCompressedTexSubImage3DOES", "glCompressedTexSubImage3D"},')
-+ print()
-+ print(' /* Extension API alias for GL_OES_get_program_binary */')
-+ print(' {"glGetProgramBinaryOES", "glGetProgramBinary"},')
-+ print(' {"glProgramBinaryOES", "glProgramBinary"},')
-+ print()
-+ print(' /* Extension API alias for GL_OES_vertex_array_object */')
-+ print(' {"glBindVertexArrayOES", "glBindVertexArray"},')
-+ print(' {"glDeleteVertexArraysOES", "glDeleteVertexArrays"},')
-+ print(' {"glGenVertexArraysOES", "glGenVertexArrays"},')
-+ print(' {"glIsVertexArrayOES", "glIsVertexArray"},')
-+ print()
-+ print(' /* Extension API alias for GL_OES_blend_minmax */')
-+ print(' {"glBlendEquationEXT", "glBlendEquation"}')
-+ print(' };')
-+ print()
-+ print(' int count = sizeof(__glExtProcAlias) / sizeof(__glExtProcAlias[0]);')
-+ print(' int i;')
-+ print()
-+ print(' for(i=0; i<count; i++)')
-+ print(' {')
-+ print(' if(strcmp(__glExtProcAlias[i][0], origFunName) == 0)')
-+ print(' return __glExtProcAlias[i][1];')
-+ print(' }')
-+ print()
-+ print(' return origFunName;')
-+ print('}')
-+
-+ print()
-+ print('typedef struct TexDirectVivData')
-+ print('{')
-+ print(' int width;')
-+ print(' int height;')
-+ print(' GLenum format;')
-+ print(' GLvoid*planes[3]; // used for glTexDirectVIV')
-+ print(' GLvoid*logical; // used for glTexDirectVIVMap/glTexDirectMapVIV/glTexDirectTiledMapVIV')
-+ print(' GLuint physical;')
-+ print('}TEXDIRECTVIVDATA;')
-+ print()
-+ print('static std::map<GLint, TEXDIRECTVIVDATA> _directTextureDataMap;')
-+ print()
-+ print('#define GL_VIV_YV12 0x8FC0')
-+ print('#define GL_VIV_NV12 0x8FC1')
-+ print('#define GL_VIV_YUY2 0x8FC2')
-+ print('#define GL_VIV_UYVY 0x8FC3')
-+ print('#define GL_VIV_NV21 0x8FC4')
-+ print('#define GL_VIV_I420 0x8FC5')
-+ print()
-
- module = Module()
- module.mergeModule(eglapi)
-@@ -292,7 +292,7 @@ if __name__ == '__main__':
- tracer = EglTracer()
- tracer.traceApi(api)
-
-- print r'''
-+ print(r'''
-
-
-
-@@ -453,8 +453,8 @@ void APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride,
- #endif /* ANDROID */
-
-
--'''
-- print r'''
-+''')
-+ print(r'''
- /*
- * let the GPU driver know that we are in apitrace
- */
-@@ -464,4 +464,4 @@ int APIENTRY ApiTraceEnabled(void) {
- return 1;
- }
-
--'''
-+''')
-diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
-index cf13ae18..02504148 100644
---- a/wrappers/gltrace.py
-+++ b/wrappers/gltrace.py
-@@ -79,7 +79,7 @@ class TypeGetter(stdapi.Visitor):
- suffix = 'iv'
- arg_type = 'GLint'
- else:
-- print alias.expr
-+ print(alias.expr)
- assert False
- function_name = self.prefix + suffix + self.ext_suffix
- return function_name, arg_type
-@@ -114,48 +114,48 @@ class GlTracer(Tracer):
- def header(self, api):
- Tracer.header(self, api)
-
-- print '#include <algorithm>'
-- print
-- print '#include "gltrace.hpp"'
-- print
-+ print('#include <algorithm>')
-+ print()
-+ print('#include "gltrace.hpp"')
-+ print()
-
- # Which glVertexAttrib* variant to use
-- print 'enum vertex_attrib {'
-- print ' VERTEX_ATTRIB,'
-- print ' VERTEX_ATTRIB_NV,'
-- print '};'
-- print
-- print 'static vertex_attrib _get_vertex_attrib(void) {'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' if (ctx->user_arrays_nv) {'
-- print ' GLboolean _vertex_program = GL_FALSE;'
-- print ' _glGetBooleanv(GL_VERTEX_PROGRAM_ARB, &_vertex_program);'
-- print ' if (_vertex_program) {'
-- print ' if (ctx->user_arrays_nv) {'
-- print ' GLint _vertex_program_binding_nv = _glGetInteger(GL_VERTEX_PROGRAM_BINDING_NV);'
-- print ' if (_vertex_program_binding_nv) {'
-- print ' return VERTEX_ATTRIB_NV;'
-- print ' }'
-- print ' }'
-- print ' }'
-- print ' }'
-- print ' return VERTEX_ATTRIB;'
-- print '}'
-- print
-+ print('enum vertex_attrib {')
-+ print(' VERTEX_ATTRIB,')
-+ print(' VERTEX_ATTRIB_NV,')
-+ print('};')
-+ print()
-+ print('static vertex_attrib _get_vertex_attrib(void) {')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' if (ctx->user_arrays_nv) {')
-+ print(' GLboolean _vertex_program = GL_FALSE;')
-+ print(' _glGetBooleanv(GL_VERTEX_PROGRAM_ARB, &_vertex_program);')
-+ print(' if (_vertex_program) {')
-+ print(' if (ctx->user_arrays_nv) {')
-+ print(' GLint _vertex_program_binding_nv = _glGetInteger(GL_VERTEX_PROGRAM_BINDING_NV);')
-+ print(' if (_vertex_program_binding_nv) {')
-+ print(' return VERTEX_ATTRIB_NV;')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print(' return VERTEX_ATTRIB;')
-+ print('}')
-+ print()
-
- self.defineShadowBufferHelper()
-
- # Whether we need user arrays
-- print 'static inline bool _need_user_arrays(void)'
-- print '{'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' if (!ctx->user_arrays) {'
-- print ' return false;'
-- print ' }'
-- print
-- print ' glprofile::Profile profile = ctx->profile;'
-- print ' bool es1 = profile.es() && profile.major == 1;'
-- print
-+ print('static inline bool _need_user_arrays(void)')
-+ print('{')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' if (!ctx->user_arrays) {')
-+ print(' return false;')
-+ print(' }')
-+ print()
-+ print(' glprofile::Profile profile = ctx->profile;')
-+ print(' bool es1 = profile.es() && profile.major == 1;')
-+ print()
-
- for camelcase_name, uppercase_name in self.arrays:
- # in which profile is the array available?
-@@ -166,120 +166,120 @@ class GlTracer(Tracer):
- function_name = 'gl%sPointer' % camelcase_name
- enable_name = 'GL_%s_ARRAY' % uppercase_name
- binding_name = 'GL_%s_ARRAY_BUFFER_BINDING' % uppercase_name
-- print ' // %s' % function_name
-- print ' if (%s) {' % profile_check
-+ print(' // %s' % function_name)
-+ print(' if (%s) {' % profile_check)
- self.array_prolog(api, uppercase_name)
-- print ' if (_glIsEnabled(%s) &&' % enable_name
-- print ' _glGetInteger(%s) == 0) {' % binding_name
-+ print(' if (_glIsEnabled(%s) &&' % enable_name)
-+ print(' _glGetInteger(%s) == 0) {' % binding_name)
- self.array_cleanup(api, uppercase_name)
-- print ' return true;'
-- print ' }'
-+ print(' return true;')
-+ print(' }')
- self.array_epilog(api, uppercase_name)
-- print ' }'
-- print
--
-- print ' // ES1 does not support generic vertex attributes'
-- print ' if (es1)'
-- print ' return false;'
-- print
-- print ' vertex_attrib _vertex_attrib = _get_vertex_attrib();'
-- print
-- print ' // glVertexAttribPointer'
-- print ' if (_vertex_attrib == VERTEX_ATTRIB) {'
-- print ' GLint _max_vertex_attribs = _glGetInteger(GL_MAX_VERTEX_ATTRIBS);'
-- print ' for (GLint index = 0; index < _max_vertex_attribs; ++index) {'
-- print ' if (_glGetVertexAttribi(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED) &&'
-- print ' _glGetVertexAttribi(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) == 0) {'
-- print ' return true;'
-- print ' }'
-- print ' }'
-- print ' }'
-- print
-- print ' // glVertexAttribPointerNV'
-- print ' if (_vertex_attrib == VERTEX_ATTRIB_NV) {'
-- print ' for (GLint index = 0; index < 16; ++index) {'
-- print ' if (_glIsEnabled(GL_VERTEX_ATTRIB_ARRAY0_NV + index)) {'
-- print ' return true;'
-- print ' }'
-- print ' }'
-- print ' }'
-- print
--
-- print ' return false;'
-- print '}'
-- print
--
-- print 'static void _trace_user_arrays(GLuint count);'
-- print
--
-- print '// whether glLockArraysEXT() has ever been called'
-- print 'static bool _checkLockArraysEXT = false;'
-- print
-+ print(' }')
-+ print()
-+
-+ print(' // ES1 does not support generic vertex attributes')
-+ print(' if (es1)')
-+ print(' return false;')
-+ print()
-+ print(' vertex_attrib _vertex_attrib = _get_vertex_attrib();')
-+ print()
-+ print(' // glVertexAttribPointer')
-+ print(' if (_vertex_attrib == VERTEX_ATTRIB) {')
-+ print(' GLint _max_vertex_attribs = _glGetInteger(GL_MAX_VERTEX_ATTRIBS);')
-+ print(' for (GLint index = 0; index < _max_vertex_attribs; ++index) {')
-+ print(' if (_glGetVertexAttribi(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED) &&')
-+ print(' _glGetVertexAttribi(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) == 0) {')
-+ print(' return true;')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print()
-+ print(' // glVertexAttribPointerNV')
-+ print(' if (_vertex_attrib == VERTEX_ATTRIB_NV) {')
-+ print(' for (GLint index = 0; index < 16; ++index) {')
-+ print(' if (_glIsEnabled(GL_VERTEX_ATTRIB_ARRAY0_NV + index)) {')
-+ print(' return true;')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print()
-+
-+ print(' return false;')
-+ print('}')
-+ print()
-+
-+ print('static void _trace_user_arrays(GLuint count);')
-+ print()
-+
-+ print('// whether glLockArraysEXT() has ever been called')
-+ print('static bool _checkLockArraysEXT = false;')
-+ print()
-
- # Buffer mappings
-- print '// whether glMapBufferRange(GL_MAP_WRITE_BIT) has ever been called'
-- print 'static bool _checkBufferMapRange = false;'
-- print
-- print '// whether glBufferParameteriAPPLE(GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE) has ever been called'
-- print 'static bool _checkBufferFlushingUnmapAPPLE = false;'
-- print
-+ print('// whether glMapBufferRange(GL_MAP_WRITE_BIT) has ever been called')
-+ print('static bool _checkBufferMapRange = false;')
-+ print()
-+ print('// whether glBufferParameteriAPPLE(GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE) has ever been called')
-+ print('static bool _checkBufferFlushingUnmapAPPLE = false;')
-+ print()
-
- # Generate a helper function to determine whether a parameter name
- # refers to a symbolic value or not
-- print 'static bool'
-- print 'is_symbolic_pname(GLenum pname) {'
-- print ' switch (pname) {'
-+ print('static bool')
-+ print('is_symbolic_pname(GLenum pname) {')
-+ print(' switch (pname) {')
- for function, type, count, name in glparams.parameters:
- if type is glapi.GLenum:
-- print ' case %s:' % name
-- print ' return true;'
-- print ' default:'
-- print ' return false;'
-- print ' }'
-- print '}'
-- print
-+ print(' case %s:' % name)
-+ print(' return true;')
-+ print(' default:')
-+ print(' return false;')
-+ print(' }')
-+ print('}')
-+ print()
-
- # Generate a helper function to determine whether a parameter value is
- # potentially symbolic or not; i.e., if the value can be represented in
- # an enum or not
-- print 'template<class T>'
-- print 'static inline bool'
-- print 'is_symbolic_param(T param) {'
-- print ' return static_cast<T>(static_cast<GLenum>(param)) == param;'
-- print '}'
-- print
-+ print('template<class T>')
-+ print('static inline bool')
-+ print('is_symbolic_param(T param) {')
-+ print(' return static_cast<T>(static_cast<GLenum>(param)) == param;')
-+ print('}')
-+ print()
-
- # Generate a helper function to know how many elements a parameter has
-- print 'static size_t'
-- print '_gl_param_size(GLenum pname) {'
-- print ' switch (pname) {'
-+ print('static size_t')
-+ print('_gl_param_size(GLenum pname) {')
-+ print(' switch (pname) {')
- for function, type, count, name in glparams.parameters:
- if name == 'GL_PROGRAM_BINARY_FORMATS':
- count = 0
- if type is not None:
-- print ' case %s: return %s;' % (name, count)
-- print ' default:'
-- print r' os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);'
-- print ' return 1;'
-- print ' }'
-- print '}'
-- print
-+ print(' case %s: return %s;' % (name, count))
-+ print(' default:')
-+ print(r' os::log("apitrace: warning: %s: unknown GLenum 0x%04X\n", __FUNCTION__, pname);')
-+ print(' return 1;')
-+ print(' }')
-+ print('}')
-+ print()
-
- # states such as GL_UNPACK_ROW_LENGTH are not available in GLES
-- print 'static inline bool'
-- print 'can_unpack_subimage(void) {'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' return ctx->profile.desktop();'
-- print '}'
-- print
-+ print('static inline bool')
-+ print('can_unpack_subimage(void) {')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' return ctx->profile.desktop();')
-+ print('}')
-+ print()
-
- # VMWX_map_buffer_debug
-- print r'extern "C" PUBLIC'
-- print r'void APIENTRY'
-- print r'glNotifyMappedBufferRangeVMWX(const void * start, GLsizeiptr length) {'
-+ print(r'extern "C" PUBLIC')
-+ print(r'void APIENTRY')
-+ print(r'glNotifyMappedBufferRangeVMWX(const void * start, GLsizeiptr length) {')
- self.emit_memcpy('start', 'length')
-- print r'}'
-- print
-+ print(r'}')
-+ print()
-
- getProcAddressFunctionNames = []
-
-@@ -290,70 +290,70 @@ class GlTracer(Tracer):
- argType = getProcAddressFunction.args[0].type
- retType = getProcAddressFunction.type
-
-- print 'static %s _wrapProcAddress(%s procName, %s procPtr);' % (retType, argType, retType)
-- print
-+ print('static %s _wrapProcAddress(%s procName, %s procPtr);' % (retType, argType, retType))
-+ print()
-
- Tracer.traceApi(self, api)
-
-- print 'static %s _wrapProcAddress(%s procName, %s procPtr) {' % (retType, argType, retType)
-+ print('static %s _wrapProcAddress(%s procName, %s procPtr) {' % (retType, argType, retType))
-
- # Provide fallback functions to missing debug functions
-- print ' if (!procPtr) {'
-+ print(' if (!procPtr) {')
- else_ = ''
- for function_name in self.debug_functions:
- if self.api.getFunctionByName(function_name):
-- print ' %sif (strcmp("%s", (const char *)procName) == 0) {' % (else_, function_name)
-- print ' return (%s)&%s;' % (retType, function_name)
-- print ' }'
-+ print(' %sif (strcmp("%s", (const char *)procName) == 0) {' % (else_, function_name))
-+ print(' return (%s)&%s;' % (retType, function_name))
-+ print(' }')
- else_ = 'else '
-- print ' %s{' % else_
-- print ' return NULL;'
-- print ' }'
-- print ' }'
-+ print(' %s{' % else_)
-+ print(' return NULL;')
-+ print(' }')
-+ print(' }')
-
- for function in api.getAllFunctions():
- ptype = function_pointer_type(function)
- pvalue = function_pointer_value(function)
-- print ' if (strcmp("%s", (const char *)procName) == 0) {' % function.name
-- print ' assert(procPtr != (%s)&%s);' % (retType, function.name)
-- print ' %s = (%s)procPtr;' % (pvalue, ptype)
-- print ' return (%s)&%s;' % (retType, function.name,)
-- print ' }'
-- print ' os::log("apitrace: warning: unknown function \\"%s\\"\\n", (const char *)procName);'
-- print ' return procPtr;'
-- print '}'
-- print
-+ print(' if (strcmp("%s", (const char *)procName) == 0) {' % function.name)
-+ print(' assert(procPtr != (%s)&%s);' % (retType, function.name))
-+ print(' %s = (%s)procPtr;' % (pvalue, ptype))
-+ print(' return (%s)&%s;' % (retType, function.name,))
-+ print(' }')
-+ print(' os::log("apitrace: warning: unknown function \\"%s\\"\\n", (const char *)procName);')
-+ print(' return procPtr;')
-+ print('}')
-+ print()
- else:
- Tracer.traceApi(self, api)
-
- def defineShadowBufferHelper(self):
-- print 'void _shadow_glGetBufferSubData(GLenum target, GLintptr offset,'
-- print ' GLsizeiptr size, GLvoid *data)'
-- print '{'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' if (!ctx->needsShadowBuffers() || target != GL_ELEMENT_ARRAY_BUFFER) {'
-- print ' _glGetBufferSubData(target, offset, size, data);'
-- print ' return;'
-- print ' }'
-- print
-- print ' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);'
-- print ' if (buffer_binding > 0) {'
-- print ' gltrace::Buffer & buf = ctx->buffers[buffer_binding];'
-- print ' buf.getSubData(offset, size, data);'
-- print ' }'
-- print '}'
-+ print('void _shadow_glGetBufferSubData(GLenum target, GLintptr offset,')
-+ print(' GLsizeiptr size, GLvoid *data)')
-+ print('{')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' if (!ctx->needsShadowBuffers() || target != GL_ELEMENT_ARRAY_BUFFER) {')
-+ print(' _glGetBufferSubData(target, offset, size, data);')
-+ print(' return;')
-+ print(' }')
-+ print()
-+ print(' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);')
-+ print(' if (buffer_binding > 0) {')
-+ print(' gltrace::Buffer & buf = ctx->buffers[buffer_binding];')
-+ print(' buf.getSubData(offset, size, data);')
-+ print(' }')
-+ print('}')
-
- def shadowBufferMethod(self, method):
- # Emit code to fetch the shadow buffer, and invoke a method
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' if (ctx->needsShadowBuffers() && target == GL_ELEMENT_ARRAY_BUFFER) {'
-- print ' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);'
-- print ' if (buffer_binding > 0) {'
-- print ' gltrace::Buffer & buf = ctx->buffers[buffer_binding];'
-- print ' buf.' + method + ';'
-- print ' }'
-- print ' }'
-- print
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' if (ctx->needsShadowBuffers() && target == GL_ELEMENT_ARRAY_BUFFER) {')
-+ print(' GLint buffer_binding = _glGetInteger(GL_ELEMENT_ARRAY_BUFFER_BINDING);')
-+ print(' if (buffer_binding > 0) {')
-+ print(' gltrace::Buffer & buf = ctx->buffers[buffer_binding];')
-+ print(' buf.' + method + ';')
-+ print(' }')
-+ print(' }')
-+ print()
-
- def shadowBufferProlog(self, function):
- if function.name == 'glBufferData':
-@@ -363,12 +363,12 @@ class GlTracer(Tracer):
- self.shadowBufferMethod('bufferSubData(offset, size, data)')
-
- if function.name == 'glDeleteBuffers':
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' if (ctx->needsShadowBuffers()) {'
-- print ' for (GLsizei i = 0; i < n; i++) {'
-- print ' ctx->buffers.erase(buffer[i]);'
-- print ' }'
-- print ' }'
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' if (ctx->needsShadowBuffers()) {')
-+ print(' for (GLsizei i = 0; i < n; i++) {')
-+ print(' ctx->buffers.erase(buffer[i]);')
-+ print(' }')
-+ print(' }')
-
- array_pointer_function_names = set((
- "glVertexPointer",
-@@ -426,42 +426,42 @@ class GlTracer(Tracer):
- def traceFunctionImplBody(self, function):
- # Defer tracing of user array pointers...
- if function.name in self.array_pointer_function_names:
-- print ' GLint _array_buffer = _glGetInteger(GL_ARRAY_BUFFER_BINDING);'
-- print ' if (!_array_buffer) {'
-- print ' static bool warned = false;'
-- print ' if (!warned) {'
-- print ' warned = true;'
-- print ' os::log("apitrace: warning: %s: call will be faked due to pointer to user memory (https://github.com/apitrace/apitrace/blob/master/docs/BUGS.markdown#tracing)\\n", __FUNCTION__);'
-- print ' }'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' ctx->user_arrays = true;'
-+ print(' GLint _array_buffer = _glGetInteger(GL_ARRAY_BUFFER_BINDING);')
-+ print(' if (!_array_buffer) {')
-+ print(' static bool warned = false;')
-+ print(' if (!warned) {')
-+ print(' warned = true;')
-+ print(' os::log("apitrace: warning: %s: call will be faked due to pointer to user memory (https://github.com/apitrace/apitrace/blob/master/docs/BUGS.markdown#tracing)\\n", __FUNCTION__);')
-+ print(' }')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' ctx->user_arrays = true;')
- if function.name == "glVertexAttribPointerNV":
-- print ' ctx->user_arrays_nv = true;'
-+ print(' ctx->user_arrays_nv = true;')
- self.invokeFunction(function)
-
- # And also break down glInterleavedArrays into the individual calls
- if function.name == 'glInterleavedArrays':
-- print
-+ print()
-
- # Initialize the enable flags
- for camelcase_name, uppercase_name in self.arrays:
- flag_name = '_' + uppercase_name.lower()
-- print ' GLboolean %s = GL_FALSE;' % flag_name
-- print
-+ print(' GLboolean %s = GL_FALSE;' % flag_name)
-+ print()
-
- # Switch for the interleaved formats
-- print ' switch (format) {'
-+ print(' switch (format) {')
- for format in self.interleaved_formats:
-- print ' case %s:' % format
-+ print(' case %s:' % format)
- for camelcase_name, uppercase_name in self.arrays:
- flag_name = '_' + uppercase_name.lower()
- if format.find('_' + uppercase_name[0]) >= 0:
-- print ' %s = GL_TRUE;' % flag_name
-- print ' break;'
-- print ' default:'
-- print ' return;'
-- print ' }'
-- print
-+ print(' %s = GL_TRUE;' % flag_name)
-+ print(' break;')
-+ print(' default:')
-+ print(' return;')
-+ print(' }')
-+ print()
-
- # Emit fake glEnableClientState/glDisableClientState flags
- for camelcase_name, uppercase_name in self.arrays:
-@@ -469,16 +469,16 @@ class GlTracer(Tracer):
- enable_name = 'GL_%s_ARRAY' % uppercase_name
-
- # Emit a fake function
-- print ' {'
-- print ' static const trace::FunctionSig &_sig = %s ? _glEnableClientState_sig : _glDisableClientState_sig;' % flag_name
-- print ' unsigned _call = trace::localWriter.beginEnter(&_sig, true);'
-- print ' trace::localWriter.beginArg(0);'
-+ print(' {')
-+ print(' static const trace::FunctionSig &_sig = %s ? _glEnableClientState_sig : _glDisableClientState_sig;' % flag_name)
-+ print(' unsigned _call = trace::localWriter.beginEnter(&_sig, true);')
-+ print(' trace::localWriter.beginArg(0);')
- self.serializeValue(glapi.GLenum, enable_name)
-- print ' trace::localWriter.endArg();'
-- print ' trace::localWriter.endEnter();'
-- print ' trace::localWriter.beginLeave(_call);'
-- print ' trace::localWriter.endLeave();'
-- print ' }'
-+ print(' trace::localWriter.endArg();')
-+ print(' trace::localWriter.endEnter();')
-+ print(' trace::localWriter.beginLeave(_call);')
-+ print(' trace::localWriter.endLeave();')
-+ print(' }')
-
- # Warn about buggy glGet(GL_*ARRAY_SIZE) not returning GL_BGRA
- buggyFunctions = {
-@@ -489,224 +489,224 @@ class GlTracer(Tracer):
- }
- if function.name in buggyFunctions:
- getter, extraArg, pname = buggyFunctions[function.name]
-- print r' static bool _checked = false;'
-- print r' if (!_checked && size == GL_BGRA) {'
-- print r' GLint _size = 0;'
-- print r' _%s(%s%s, &_size);' % (getter, extraArg, pname)
-- print r' if (_size != GL_BGRA) {'
-- print r' os::log("apitrace: warning: %s(%s) does not return GL_BGRA; trace will be incorrect (https://github.com/apitrace/apitrace/issues/261)\n");' % (getter, pname)
-- print r' }'
-- print r' _checked = true;'
-- print r' }'
--
-- print ' return;'
-- print ' }'
-+ print(r' static bool _checked = false;')
-+ print(r' if (!_checked && size == GL_BGRA) {')
-+ print(r' GLint _size = 0;')
-+ print(r' _%s(%s%s, &_size);' % (getter, extraArg, pname))
-+ print(r' if (_size != GL_BGRA) {')
-+ print(r' os::log("apitrace: warning: %s(%s) does not return GL_BGRA; trace will be incorrect (https://github.com/apitrace/apitrace/issues/261)\n");' % (getter, pname))
-+ print(r' }')
-+ print(r' _checked = true;')
-+ print(r' }')
-+
-+ print(' return;')
-+ print(' }')
-
- # ... to the draw calls
- if self.draw_function_regex.match(function.name):
- if not self.multi_draw_function_regex.match(function.name):
-- print ' if (trace::localWriter.isIgnored()) {'
-+ print(' if (trace::localWriter.isIgnored()) {')
- self.invokeFunction(function)
-- print ' return;'
-- print ' }'
-- print ' if (_need_user_arrays()) {'
-+ print(' return;')
-+ print(' }')
-+ print(' if (_need_user_arrays()) {')
- if 'Indirect' in function.name:
-- print r' os::log("apitrace: warning: %s: indirect user arrays not supported\n");' % (function.name,)
-+ print(r' os::log("apitrace: warning: %s: indirect user arrays not supported\n");' % (function.name,))
- else:
- arg_names = ', '.join([arg.name for arg in function.args[1:]])
-- print ' GLuint _count = _%s_count(%s);' % (function.name, arg_names)
-+ print(' GLuint _count = _%s_count(%s);' % (function.name, arg_names))
- # Some apps, in particular Quake3, can tell the driver to lock more
- # vertices than those actually required for the draw call.
-- print ' if (_checkLockArraysEXT) {'
-- print ' GLuint _locked_count = _glGetInteger(GL_ARRAY_ELEMENT_LOCK_FIRST_EXT)'
-- print ' + _glGetInteger(GL_ARRAY_ELEMENT_LOCK_COUNT_EXT);'
-- print ' _count = std::max(_count, _locked_count);'
-- print ' }'
-- print ' _trace_user_arrays(_count);'
-- print ' }'
-+ print(' if (_checkLockArraysEXT) {')
-+ print(' GLuint _locked_count = _glGetInteger(GL_ARRAY_ELEMENT_LOCK_FIRST_EXT)')
-+ print(' + _glGetInteger(GL_ARRAY_ELEMENT_LOCK_COUNT_EXT);')
-+ print(' _count = std::max(_count, _locked_count);')
-+ print(' }')
-+ print(' _trace_user_arrays(_count);')
-+ print(' }')
- if function.name == 'glLockArraysEXT':
-- print ' _checkLockArraysEXT = true;'
-+ print(' _checkLockArraysEXT = true;')
-
- # Warn if user arrays are used with glBegin/glArrayElement/glEnd.
- if function.name == 'glBegin':
-- print r' gltrace::Context *ctx = gltrace::getContext();'
-- print r' ctx->userArraysOnBegin = _need_user_arrays();'
-+ print(r' gltrace::Context *ctx = gltrace::getContext();')
-+ print(r' ctx->userArraysOnBegin = _need_user_arrays();')
- if function.name.startswith('glArrayElement'):
-- print r' gltrace::Context *ctx = gltrace::getContext();'
-- print r' if (ctx->userArraysOnBegin) {'
-- print r' os::log("apitrace: warning: user arrays with glArrayElement not supported (https://github.com/apitrace/apitrace/issues/276)\n");'
-- print r' ctx->userArraysOnBegin = false;'
-- print r' }'
-+ print(r' gltrace::Context *ctx = gltrace::getContext();')
-+ print(r' if (ctx->userArraysOnBegin) {')
-+ print(r' os::log("apitrace: warning: user arrays with glArrayElement not supported (https://github.com/apitrace/apitrace/issues/276)\n");')
-+ print(r' ctx->userArraysOnBegin = false;')
-+ print(r' }')
-
- # Emit a fake memcpy on buffer uploads
- if function.name == 'glBufferParameteriAPPLE':
-- print ' if (pname == GL_BUFFER_FLUSHING_UNMAP_APPLE && param == GL_FALSE) {'
-- print ' _checkBufferFlushingUnmapAPPLE = true;'
-- print ' }'
-+ print(' if (pname == GL_BUFFER_FLUSHING_UNMAP_APPLE && param == GL_FALSE) {')
-+ print(' _checkBufferFlushingUnmapAPPLE = true;')
-+ print(' }')
- if function.name in ('glUnmapBuffer', 'glUnmapBufferARB'):
- if function.name.endswith('ARB'):
- suffix = 'ARB'
- else:
- suffix = ''
-- print ' GLint access_flags = 0;'
-- print ' GLint access = 0;'
-- print ' bool flush;'
-- print ' // GLES3 does not have GL_BUFFER_ACCESS;'
-- print ' if (_checkBufferMapRange) {'
-- print ' _glGetBufferParameteriv%s(target, GL_BUFFER_ACCESS_FLAGS, &access_flags);' % suffix
-- print ' flush = (access_flags & GL_MAP_WRITE_BIT) && !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT));'
-- print ' } else {'
-- print ' _glGetBufferParameteriv%s(target, GL_BUFFER_ACCESS, &access);' % suffix
-- print ' flush = access != GL_READ_ONLY;'
-- print ' }'
-- print ' if (flush) {'
-- print ' GLvoid *map = NULL;'
-- print ' _glGetBufferPointerv%s(target, GL_BUFFER_MAP_POINTER, &map);' % suffix
-- print ' if (map) {'
-- print ' GLint length = -1;'
-- print ' if (_checkBufferMapRange) {'
-- print ' _glGetBufferParameteriv%s(target, GL_BUFFER_MAP_LENGTH, &length);' % suffix
-- print ' if (length == -1) {'
-- print ' // Mesa drivers refuse GL_BUFFER_MAP_LENGTH without GL 3.0 up-to'
-- print ' // http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffee498fb848b253a7833373fe5430f8c7ca0c5f'
-- print ' static bool warned = false;'
-- print ' if (!warned) {'
-- print ' os::log("apitrace: warning: glGetBufferParameteriv%s(GL_BUFFER_MAP_LENGTH) failed\\n");' % suffix
-- print ' warned = true;'
-- print ' }'
-- print ' }'
-- print ' } else {'
-- print ' length = 0;'
-- print ' _glGetBufferParameteriv%s(target, GL_BUFFER_SIZE, &length);' % suffix
-- print ' }'
-- print ' if (_checkBufferFlushingUnmapAPPLE) {'
-- print ' GLint flushing_unmap = GL_TRUE;'
-- print ' _glGetBufferParameteriv%s(target, GL_BUFFER_FLUSHING_UNMAP_APPLE, &flushing_unmap);' % suffix
-- print ' flush = flush && flushing_unmap;'
-- print ' }'
-- print ' if (flush && length > 0) {'
-+ print(' GLint access_flags = 0;')
-+ print(' GLint access = 0;')
-+ print(' bool flush;')
-+ print(' // GLES3 does not have GL_BUFFER_ACCESS;')
-+ print(' if (_checkBufferMapRange) {')
-+ print(' _glGetBufferParameteriv%s(target, GL_BUFFER_ACCESS_FLAGS, &access_flags);' % suffix)
-+ print(' flush = (access_flags & GL_MAP_WRITE_BIT) && !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT));')
-+ print(' } else {')
-+ print(' _glGetBufferParameteriv%s(target, GL_BUFFER_ACCESS, &access);' % suffix)
-+ print(' flush = access != GL_READ_ONLY;')
-+ print(' }')
-+ print(' if (flush) {')
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetBufferPointerv%s(target, GL_BUFFER_MAP_POINTER, &map);' % suffix)
-+ print(' if (map) {')
-+ print(' GLint length = -1;')
-+ print(' if (_checkBufferMapRange) {')
-+ print(' _glGetBufferParameteriv%s(target, GL_BUFFER_MAP_LENGTH, &length);' % suffix)
-+ print(' if (length == -1) {')
-+ print(' // Mesa drivers refuse GL_BUFFER_MAP_LENGTH without GL 3.0 up-to')
-+ print(' // http://cgit.freedesktop.org/mesa/mesa/commit/?id=ffee498fb848b253a7833373fe5430f8c7ca0c5f')
-+ print(' static bool warned = false;')
-+ print(' if (!warned) {')
-+ print(' os::log("apitrace: warning: glGetBufferParameteriv%s(GL_BUFFER_MAP_LENGTH) failed\\n");' % suffix)
-+ print(' warned = true;')
-+ print(' }')
-+ print(' }')
-+ print(' } else {')
-+ print(' length = 0;')
-+ print(' _glGetBufferParameteriv%s(target, GL_BUFFER_SIZE, &length);' % suffix)
-+ print(' }')
-+ print(' if (_checkBufferFlushingUnmapAPPLE) {')
-+ print(' GLint flushing_unmap = GL_TRUE;')
-+ print(' _glGetBufferParameteriv%s(target, GL_BUFFER_FLUSHING_UNMAP_APPLE, &flushing_unmap);' % suffix)
-+ print(' flush = flush && flushing_unmap;')
-+ print(' }')
-+ print(' if (flush && length > 0) {')
- self.emit_memcpy('map', 'length')
-- print ' }'
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-+ print(' }')
- if function.name == 'glUnmapBufferOES':
-- print ' GLint access_flags = 0;'
-- print ' GLint access = 0;'
-- print ' bool flush;'
-- print ' // GLES3 does not have GL_BUFFER_ACCESS;'
-- print ' if (_checkBufferMapRange) {'
-- print ' _glGetBufferParameteriv(target, GL_BUFFER_ACCESS_FLAGS, &access_flags);'
-- print ' flush = (access_flags & GL_MAP_WRITE_BIT) && !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT));'
-- print ' } else {'
-- print ' _glGetBufferParameteriv(target, GL_BUFFER_ACCESS, &access);'
-- print ' flush = access != GL_READ_ONLY;'
-- print ' }'
-- print ' if (flush) {'
-- print ' GLvoid *map = NULL;'
-- print ' _glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER, &map);'
-- print ' if (map) {'
-- print ' GLint length = 0;'
-- print ' GLint offset = 0;'
-- print ' if (_checkBufferMapRange) {'
-- print ' _glGetBufferParameteriv(target, GL_BUFFER_MAP_LENGTH, &length);'
-- print ' _glGetBufferParameteriv(target, GL_BUFFER_MAP_OFFSET, &offset);'
-- print ' } else {'
-- print ' _glGetBufferParameteriv(target, GL_BUFFER_SIZE, &length);'
-- print ' }'
-- print ' if (flush && length > 0) {'
-+ print(' GLint access_flags = 0;')
-+ print(' GLint access = 0;')
-+ print(' bool flush;')
-+ print(' // GLES3 does not have GL_BUFFER_ACCESS;')
-+ print(' if (_checkBufferMapRange) {')
-+ print(' _glGetBufferParameteriv(target, GL_BUFFER_ACCESS_FLAGS, &access_flags);')
-+ print(' flush = (access_flags & GL_MAP_WRITE_BIT) && !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT));')
-+ print(' } else {')
-+ print(' _glGetBufferParameteriv(target, GL_BUFFER_ACCESS, &access);')
-+ print(' flush = access != GL_READ_ONLY;')
-+ print(' }')
-+ print(' if (flush) {')
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' if (map) {')
-+ print(' GLint length = 0;')
-+ print(' GLint offset = 0;')
-+ print(' if (_checkBufferMapRange) {')
-+ print(' _glGetBufferParameteriv(target, GL_BUFFER_MAP_LENGTH, &length);')
-+ print(' _glGetBufferParameteriv(target, GL_BUFFER_MAP_OFFSET, &offset);')
-+ print(' } else {')
-+ print(' _glGetBufferParameteriv(target, GL_BUFFER_SIZE, &length);')
-+ print(' }')
-+ print(' if (flush && length > 0) {')
- self.emit_memcpy('map', 'length')
- self.shadowBufferMethod('bufferSubData(offset, length, map)')
-- print ' }'
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-+ print(' }')
- if function.name == 'glUnmapNamedBuffer':
-- print ' GLint access_flags = 0;'
-- print ' _glGetNamedBufferParameteriv(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);'
-- print ' if ((access_flags & GL_MAP_WRITE_BIT) &&'
-- print ' !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT))) {'
-- print ' GLvoid *map = NULL;'
-- print ' _glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &map);'
-- print ' GLint length = 0;'
-- print ' _glGetNamedBufferParameteriv(buffer, GL_BUFFER_MAP_LENGTH, &length);'
-- print ' if (map && length > 0) {'
-+ print(' GLint access_flags = 0;')
-+ print(' _glGetNamedBufferParameteriv(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);')
-+ print(' if ((access_flags & GL_MAP_WRITE_BIT) &&')
-+ print(' !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT))) {')
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' GLint length = 0;')
-+ print(' _glGetNamedBufferParameteriv(buffer, GL_BUFFER_MAP_LENGTH, &length);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('map', 'length')
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
- if function.name == 'glUnmapNamedBufferEXT':
-- print ' GLint access_flags = 0;'
-- print ' _glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);'
-- print ' if ((access_flags & GL_MAP_WRITE_BIT) &&'
-- print ' !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT))) {'
-- print ' GLvoid *map = NULL;'
-- print ' _glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &map);'
-- print ' GLint length = 0;'
-- print ' _glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_MAP_LENGTH, &length);'
-- print ' if (map && length > 0) {'
-+ print(' GLint access_flags = 0;')
-+ print(' _glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);')
-+ print(' if ((access_flags & GL_MAP_WRITE_BIT) &&')
-+ print(' !(access_flags & (GL_MAP_FLUSH_EXPLICIT_BIT | GL_MAP_PERSISTENT_BIT))) {')
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' GLint length = 0;')
-+ print(' _glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_MAP_LENGTH, &length);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('map', 'length')
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
- if function.name == 'glFlushMappedBufferRange':
-- print ' GLvoid *map = NULL;'
-- print ' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);'
-- print ' if (map && length > 0) {'
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('(const char *)map + offset', 'length')
-- print ' }'
-+ print(' }')
- if function.name == 'glFlushMappedBufferRangeEXT':
-- print ' GLvoid *map = NULL;'
-- print ' _glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER_OES, &map);'
-- print ' if (map && length > 0) {'
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetBufferPointervOES(target, GL_BUFFER_MAP_POINTER_OES, &map);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('(const char *)map + offset', 'length')
-- print ' }'
-+ print(' }')
- if function.name == 'glFlushMappedBufferRangeAPPLE':
-- print ' GLvoid *map = NULL;'
-- print ' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);'
-- print ' if (map && size > 0) {'
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetBufferPointerv(target, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' if (map && size > 0) {')
- self.emit_memcpy('(const char *)map + offset', 'size')
-- print ' }'
-+ print(' }')
- if function.name == 'glFlushMappedNamedBufferRange':
-- print ' GLvoid *map = NULL;'
-- print ' _glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &map);'
-- print ' if (map && length > 0) {'
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetNamedBufferPointerv(buffer, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('(const char *)map + offset', 'length')
-- print ' }'
-+ print(' }')
- if function.name == 'glFlushMappedNamedBufferRangeEXT':
-- print ' GLvoid *map = NULL;'
-- print ' _glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &map);'
-- print ' if (map && length > 0) {'
-+ print(' GLvoid *map = NULL;')
-+ print(' _glGetNamedBufferPointervEXT(buffer, GL_BUFFER_MAP_POINTER, &map);')
-+ print(' if (map && length > 0) {')
- self.emit_memcpy('(const char *)map + offset', 'length')
-- print ' }'
-+ print(' }')
-
- # FIXME: We don't support coherent/pinned memory mappings
- if function.name in ('glBufferStorage', 'glNamedBufferStorage', 'glNamedBufferStorageEXT'):
-- print r' if (!(flags & GL_MAP_PERSISTENT_BIT)) {'
-- print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);'
-- print r' }'
-- print r' flags &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;'
-+ print(r' if (!(flags & GL_MAP_PERSISTENT_BIT)) {')
-+ print(r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);')
-+ print(r' }')
-+ print(r' flags &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;')
- if function.name in ('glMapBufferRange', 'glMapBufferRangeEXT', 'glMapNamedBufferRange', 'glMapNamedBufferRangeEXT'):
-- print r' if (access & GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX) {'
-- print r' if (!(access & GL_MAP_PERSISTENT_BIT)) {'
-- print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);'
-- print r' }'
-- print r' if (access & GL_MAP_FLUSH_EXPLICIT_BIT) {'
-- print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/ MAP_FLUSH_EXPLICIT_BIT\n", __FUNCTION__);'
-- print r' }'
-- print r' access &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;'
-- print r' } else if (access & GL_MAP_COHERENT_BIT) {'
-- print r' os::log("apitrace: warning: %s: MAP_COHERENT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);'
-- print r' } else if ((access & GL_MAP_PERSISTENT_BIT) &&'
-- print r' !(access & GL_MAP_FLUSH_EXPLICIT_BIT)) {'
-- print r' os::log("apitrace: warning: %s: MAP_PERSISTENT_BIT w/o FLUSH_EXPLICIT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);'
-- print r' }'
-+ print(r' if (access & GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX) {')
-+ print(r' if (!(access & GL_MAP_PERSISTENT_BIT)) {')
-+ print(r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);')
-+ print(r' }')
-+ print(r' if (access & GL_MAP_FLUSH_EXPLICIT_BIT) {')
-+ print(r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/ MAP_FLUSH_EXPLICIT_BIT\n", __FUNCTION__);')
-+ print(r' }')
-+ print(r' access &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;')
-+ print(r' } else if (access & GL_MAP_COHERENT_BIT) {')
-+ print(r' os::log("apitrace: warning: %s: MAP_COHERENT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);')
-+ print(r' } else if ((access & GL_MAP_PERSISTENT_BIT) &&')
-+ print(r' !(access & GL_MAP_FLUSH_EXPLICIT_BIT)) {')
-+ print(r' os::log("apitrace: warning: %s: MAP_PERSISTENT_BIT w/o FLUSH_EXPLICIT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);')
-+ print(r' }')
- if function.name in ('glBufferData', 'glBufferDataARB'):
-- print r' if (target == GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD) {'
-- print r' os::log("apitrace: warning: GL_AMD_pinned_memory not fully supported\n");'
-- print r' }'
-+ print(r' if (target == GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD) {')
-+ print(r' os::log("apitrace: warning: GL_AMD_pinned_memory not fully supported\n");')
-+ print(r' }')
-
- # TODO: We don't track GL_INTEL_map_texture mappings
- if function.name == 'glMapTexture2DINTEL':
-- print r' if (access & GL_MAP_WRITE_BIT) {'
-- print r' os::log("apitrace: warning: GL_INTEL_map_texture not fully supported\n");'
-- print r' }'
-+ print(r' if (access & GL_MAP_WRITE_BIT) {')
-+ print(r' os::log("apitrace: warning: GL_INTEL_map_texture not fully supported\n");')
-+ print(r' }')
-
- # Don't leave vertex attrib locations to chance. Instead emit fake
- # glBindAttribLocation calls to ensure that the same locations will be
-@@ -715,40 +715,40 @@ class GlTracer(Tracer):
- # many entry-points, including non-shader related ones.
- if function.name == 'glLinkProgram':
- Tracer.invokeFunction(self, function)
-- print ' GLint active_attributes = 0;'
-- print ' _glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &active_attributes);'
-- print ' for (GLint attrib = 0; attrib < active_attributes; ++attrib) {'
-- print ' GLint size = 0;'
-- print ' GLenum type = 0;'
-- print ' GLchar name[256];'
-+ print(' GLint active_attributes = 0;')
-+ print(' _glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &active_attributes);')
-+ print(' for (GLint attrib = 0; attrib < active_attributes; ++attrib) {')
-+ print(' GLint size = 0;')
-+ print(' GLenum type = 0;')
-+ print(' GLchar name[256];')
- # TODO: Use ACTIVE_ATTRIBUTE_MAX_LENGTH instead of 256
-- print ' _glGetActiveAttrib(program, attrib, sizeof name, NULL, &size, &type, name);'
-- print " if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {"
-- print ' GLint location = _glGetAttribLocation(program, name);'
-- print ' if (location >= 0) {'
-+ print(' _glGetActiveAttrib(program, attrib, sizeof name, NULL, &size, &type, name);')
-+ print(" if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {")
-+ print(' GLint location = _glGetAttribLocation(program, name);')
-+ print(' if (location >= 0) {')
- bind_function = glapi.glapi.getFunctionByName('glBindAttribLocation')
- self.fake_call(bind_function, ['program', 'location', 'name'])
-- print ' }'
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-+ print(' }')
- if function.name == 'glLinkProgramARB':
- Tracer.invokeFunction(self, function)
-- print ' GLint active_attributes = 0;'
-- print ' _glGetObjectParameterivARB(programObj, GL_OBJECT_ACTIVE_ATTRIBUTES_ARB, &active_attributes);'
-- print ' for (GLint attrib = 0; attrib < active_attributes; ++attrib) {'
-- print ' GLint size = 0;'
-- print ' GLenum type = 0;'
-- print ' GLcharARB name[256];'
-+ print(' GLint active_attributes = 0;')
-+ print(' _glGetObjectParameterivARB(programObj, GL_OBJECT_ACTIVE_ATTRIBUTES_ARB, &active_attributes);')
-+ print(' for (GLint attrib = 0; attrib < active_attributes; ++attrib) {')
-+ print(' GLint size = 0;')
-+ print(' GLenum type = 0;')
-+ print(' GLcharARB name[256];')
- # TODO: Use ACTIVE_ATTRIBUTE_MAX_LENGTH instead of 256
-- print ' _glGetActiveAttribARB(programObj, attrib, sizeof name, NULL, &size, &type, name);'
-- print " if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {"
-- print ' GLint location = _glGetAttribLocationARB(programObj, name);'
-- print ' if (location >= 0) {'
-+ print(' _glGetActiveAttribARB(programObj, attrib, sizeof name, NULL, &size, &type, name);')
-+ print(" if (name[0] != 'g' || name[1] != 'l' || name[2] != '_') {")
-+ print(' GLint location = _glGetAttribLocationARB(programObj, name);')
-+ print(' if (location >= 0) {')
- bind_function = glapi.glapi.getFunctionByName('glBindAttribLocationARB')
- self.fake_call(bind_function, ['programObj', 'location', 'name'])
-- print ' }'
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
-+ print(' }')
-
- self.shadowBufferProlog(function)
-
-@@ -815,9 +815,9 @@ class GlTracer(Tracer):
- # Force glProgramBinary to fail. Per ARB_get_program_binary this
- # should signal the app that it needs to recompile.
- if function.name in ('glProgramBinary', 'glProgramBinaryOES'):
-- print r' binaryFormat = 0xDEADDEAD;'
-- print r' binary = &binaryFormat;'
-- print r' length = sizeof binaryFormat;'
-+ print(r' binaryFormat = 0xDEADDEAD;')
-+ print(r' binary = &binaryFormat;')
-+ print(r' length = sizeof binaryFormat;')
-
- Tracer.invokeFunction(self, function)
-
-@@ -838,25 +838,25 @@ class GlTracer(Tracer):
- # We may be faking KHR_debug, so ensure the pointer queries result is
- # always zeroed to prevent dereference of unitialized pointers
- if function.name == 'glGetPointerv':
-- print ' if (params &&'
-- print ' (pname == GL_DEBUG_CALLBACK_FUNCTION ||'
-- print ' pname == GL_DEBUG_CALLBACK_USER_PARAM)) {'
-- print ' *params = NULL;'
-- print ' }'
-+ print(' if (params &&')
-+ print(' (pname == GL_DEBUG_CALLBACK_FUNCTION ||')
-+ print(' pname == GL_DEBUG_CALLBACK_USER_PARAM)) {')
-+ print(' *params = NULL;')
-+ print(' }')
-
- if function.name in self.getProcAddressFunctionNames:
- nameArg = function.args[0].name
-- print ' if (strcmp("glNotifyMappedBufferRangeVMWX", (const char *)%s) == 0) {' % (nameArg,)
-- print ' _result = (%s)&glNotifyMappedBufferRangeVMWX;' % (function.type,)
-- print ' } else if (strcmp("glTexDirectVIV", (const char *)%s) == 0) {' % (nameArg,)
-- print ' _result = (%s)&glTexDirectVIV;' % (function.type,)
-- print ' } else if (strcmp("glTexDirectInvalidateVIV", (const char *)%s) == 0) {' % (nameArg,)
-- print ' _result = (%s)&glTexDirectInvalidateVIV;' % (function.type,)
-+ print(' if (strcmp("glNotifyMappedBufferRangeVMWX", (const char *)%s) == 0) {' % (nameArg,))
-+ print(' _result = (%s)&glNotifyMappedBufferRangeVMWX;' % (function.type,))
-+ print(' } else if (strcmp("glTexDirectVIV", (const char *)%s) == 0) {' % (nameArg,))
-+ print(' _result = (%s)&glTexDirectVIV;' % (function.type,))
-+ print(' } else if (strcmp("glTexDirectInvalidateVIV", (const char *)%s) == 0) {' % (nameArg,))
-+ print(' _result = (%s)&glTexDirectInvalidateVIV;' % (function.type,))
- for marker_function in self.marker_functions:
- if self.api.getFunctionByName(marker_function):
-- print ' } else if (strcmp("%s", (const char *)%s) == 0) {' % (marker_function, nameArg)
-- print ' _result = (%s)&%s;' % (function.type, marker_function)
-- print ' } else {'
-+ print(' } else if (strcmp("%s", (const char *)%s) == 0) {' % (marker_function, nameArg))
-+ print(' _result = (%s)&%s;' % (function.type, marker_function))
-+ print(' } else {')
- Tracer.doInvokeFunction(self, function)
-
- # Replace function addresses with ours
-@@ -864,24 +864,24 @@ class GlTracer(Tracer):
- # contain the addresses of the wrapper functions, and not the real
- # functions, but in practice this should make no difference.
- if function.name in self.getProcAddressFunctionNames:
-- print ' _result = _wrapProcAddress(%s, _result);' % (nameArg,)
-+ print(' _result = _wrapProcAddress(%s, _result);' % (nameArg,))
-
-- print ' }'
-+ print(' }')
- return
-
- if function.name in ('glGetProgramBinary', 'glGetProgramBinaryOES'):
-- print r' bufSize = 0;'
-+ print(r' bufSize = 0;')
-
- Tracer.doInvokeFunction(self, function)
-
- if function.name == 'glGetProgramiv':
-- print r' if (params && pname == GL_PROGRAM_BINARY_LENGTH) {'
-- print r' *params = 0;'
-- print r' }'
-+ print(r' if (params && pname == GL_PROGRAM_BINARY_LENGTH) {')
-+ print(r' *params = 0;')
-+ print(r' }')
- if function.name in ('glGetProgramBinary', 'glGetProgramBinaryOES'):
-- print r' if (length) {'
-- print r' *length = 0;'
-- print r' }'
-+ print(r' if (length) {')
-+ print(r' *length = 0;')
-+ print(r' }')
-
- buffer_targets = [
- 'ARRAY_BUFFER',
-@@ -902,9 +902,9 @@ class GlTracer(Tracer):
-
- # Keep track of buffer mappings
- if function.name in ('glMapBufferRange', 'glMapBufferRangeEXT'):
-- print ' if (access & GL_MAP_WRITE_BIT) {'
-- print ' _checkBufferMapRange = true;'
-- print ' }'
-+ print(' if (access & GL_MAP_WRITE_BIT) {')
-+ print(' _checkBufferMapRange = true;')
-+ print(' }')
-
- boolean_names = [
- 'GL_FALSE',
-@@ -932,17 +932,17 @@ class GlTracer(Tracer):
- and (isinstance(arg.type, stdapi.Blob) \
- or (isinstance(arg.type, stdapi.Const) \
- and isinstance(arg.type.type, stdapi.Blob))):
-- print ' {'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print ' GLint _unpack_buffer = 0;'
-- print ' if (ctx->profile.desktop())'
-- print ' _glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, &_unpack_buffer);'
-- print ' if (_unpack_buffer) {'
-- print ' trace::localWriter.writePointer((uintptr_t)%s);' % arg.name
-- print ' } else {'
-+ print(' {')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print(' GLint _unpack_buffer = 0;')
-+ print(' if (ctx->profile.desktop())')
-+ print(' _glGetIntegerv(GL_PIXEL_UNPACK_BUFFER_BINDING, &_unpack_buffer);')
-+ print(' if (_unpack_buffer) {')
-+ print(' trace::localWriter.writePointer((uintptr_t)%s);' % arg.name)
-+ print(' } else {')
- Tracer.serializeArgValue(self, function, arg)
-- print ' }'
-- print ' }'
-+ print(' }')
-+ print(' }')
- return
-
- # Several GL state functions take GLenum symbolic names as
-@@ -953,11 +953,11 @@ class GlTracer(Tracer):
- assert arg.index > 0
- assert function.args[arg.index - 1].name == 'pname'
- assert function.args[arg.index - 1].type == glapi.GLenum
-- print ' if (is_symbolic_pname(pname) && is_symbolic_param(%s)) {' % arg.name
-+ print(' if (is_symbolic_pname(pname) && is_symbolic_param(%s)) {' % arg.name)
- self.serializeValue(glapi.GLenum, arg.name)
-- print ' } else {'
-+ print(' } else {')
- Tracer.serializeArgValue(self, function, arg)
-- print ' }'
-+ print(' }')
- return
-
- Tracer.serializeArgValue(self, function, arg)
-@@ -967,20 +967,20 @@ class GlTracer(Tracer):
-
- # A simple state tracker to track the pointer values
- # update the state
-- print 'static void _trace_user_arrays(GLuint count)'
-- print '{'
-- print ' gltrace::Context *ctx = gltrace::getContext();'
-- print
-- print ' glprofile::Profile profile = ctx->profile;'
-- print ' bool es1 = profile.es() && profile.major == 1;'
-- print
-+ print('static void _trace_user_arrays(GLuint count)')
-+ print('{')
-+ print(' gltrace::Context *ctx = gltrace::getContext();')
-+ print()
-+ print(' glprofile::Profile profile = ctx->profile;')
-+ print(' bool es1 = profile.es() && profile.major == 1;')
-+ print()
-
- # Temporarily unbind the array buffer
-- print ' GLint _array_buffer = _glGetInteger(GL_ARRAY_BUFFER_BINDING);'
-- print ' if (_array_buffer) {'
-+ print(' GLint _array_buffer = _glGetInteger(GL_ARRAY_BUFFER_BINDING);')
-+ print(' if (_array_buffer) {')
- self.fake_glBindBuffer(api, 'GL_ARRAY_BUFFER', '0')
-- print ' }'
-- print
-+ print(' }')
-+ print()
-
- for camelcase_name, uppercase_name in self.arrays:
- # in which profile is the array available?
-@@ -993,45 +993,45 @@ class GlTracer(Tracer):
- binding_name = 'GL_%s_ARRAY_BUFFER_BINDING' % uppercase_name
- function = api.getFunctionByName(function_name)
-
-- print ' // %s' % function.prototype()
-- print ' if (%s) {' % profile_check
-+ print(' // %s' % function.prototype())
-+ print(' if (%s) {' % profile_check)
- self.array_trace_prolog(api, uppercase_name)
- self.array_prolog(api, uppercase_name)
-- print ' if (_glIsEnabled(%s)) {' % enable_name
-- print ' GLint _binding = _glGetInteger(%s);' % binding_name
-- print ' if (!_binding) {'
-+ print(' if (_glIsEnabled(%s)) {' % enable_name)
-+ print(' GLint _binding = _glGetInteger(%s);' % binding_name)
-+ print(' if (!_binding) {')
-
- # Get the arguments via glGet*
- for arg in function.args:
- arg_get_enum = 'GL_%s_ARRAY_%s' % (uppercase_name, arg.name.upper())
- arg_get_function, arg_type = TypeGetter().visit(arg.type)
-- print ' %s %s = 0;' % (arg_type, arg.name)
-- print ' _%s(%s, &%s);' % (arg_get_function, arg_get_enum, arg.name)
-+ print(' %s %s = 0;' % (arg_type, arg.name))
-+ print(' _%s(%s, &%s);' % (arg_get_function, arg_get_enum, arg.name))
-
- arg_names = ', '.join([arg.name for arg in function.args[:-1]])
-- print ' size_t _size = _%s_size(%s, count);' % (function.name, arg_names)
-+ print(' size_t _size = _%s_size(%s, count);' % (function.name, arg_names))
-
- # Emit a fake function
- self.array_trace_intermezzo(api, uppercase_name)
-- print ' unsigned _call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,)
-+ print(' unsigned _call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,))
- for arg in function.args:
- assert not arg.output
-- print ' trace::localWriter.beginArg(%u);' % (arg.index,)
-+ print(' trace::localWriter.beginArg(%u);' % (arg.index,))
- if arg.name != 'pointer':
- self.serializeValue(arg.type, arg.name)
- else:
-- print ' trace::localWriter.writeBlob((const void *)%s, _size);' % (arg.name)
-- print ' trace::localWriter.endArg();'
-+ print(' trace::localWriter.writeBlob((const void *)%s, _size);' % (arg.name))
-+ print(' trace::localWriter.endArg();')
-
-- print ' trace::localWriter.endEnter();'
-- print ' trace::localWriter.beginLeave(_call);'
-- print ' trace::localWriter.endLeave();'
-- print ' }'
-- print ' }'
-+ print(' trace::localWriter.endEnter();')
-+ print(' trace::localWriter.beginLeave(_call);')
-+ print(' trace::localWriter.endLeave();')
-+ print(' }')
-+ print(' }')
- self.array_epilog(api, uppercase_name)
- self.array_trace_epilog(api, uppercase_name)
-- print ' }'
-- print
-+ print(' }')
-+ print()
-
- # Samething, but for glVertexAttribPointer*
- #
-@@ -1043,12 +1043,12 @@ class GlTracer(Tracer):
- # This means that the implementations of these functions do not always
- # alias, and they need to be considered independently.
- #
-- print ' // ES1 does not support generic vertex attributes'
-- print ' if (es1)'
-- print ' return;'
-- print
-- print ' vertex_attrib _vertex_attrib = _get_vertex_attrib();'
-- print
-+ print(' // ES1 does not support generic vertex attributes')
-+ print(' if (es1)')
-+ print(' return;')
-+ print()
-+ print(' vertex_attrib _vertex_attrib = _get_vertex_attrib();')
-+ print()
- for suffix in ['', 'NV']:
- if suffix:
- SUFFIX = '_' + suffix
-@@ -1057,24 +1057,24 @@ class GlTracer(Tracer):
- function_name = 'glVertexAttribPointer' + suffix
- function = api.getFunctionByName(function_name)
-
-- print ' // %s' % function.prototype()
-- print ' if (_vertex_attrib == VERTEX_ATTRIB%s) {' % SUFFIX
-+ print(' // %s' % function.prototype())
-+ print(' if (_vertex_attrib == VERTEX_ATTRIB%s) {' % SUFFIX)
- if suffix == 'NV':
-- print ' GLint _max_vertex_attribs = 16;'
-+ print(' GLint _max_vertex_attribs = 16;')
- else:
-- print ' GLint _max_vertex_attribs = _glGetInteger(GL_MAX_VERTEX_ATTRIBS);'
-- print ' for (GLint index = 0; index < _max_vertex_attribs; ++index) {'
-- print ' GLint _enabled = 0;'
-+ print(' GLint _max_vertex_attribs = _glGetInteger(GL_MAX_VERTEX_ATTRIBS);')
-+ print(' for (GLint index = 0; index < _max_vertex_attribs; ++index) {')
-+ print(' GLint _enabled = 0;')
- if suffix == 'NV':
-- print ' _glGetIntegerv(GL_VERTEX_ATTRIB_ARRAY0_NV + index, &_enabled);'
-+ print(' _glGetIntegerv(GL_VERTEX_ATTRIB_ARRAY0_NV + index, &_enabled);')
- else:
-- print ' _glGetVertexAttribiv%s(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED%s, &_enabled);' % (suffix, SUFFIX)
-- print ' if (_enabled) {'
-- print ' GLint _binding = 0;'
-+ print(' _glGetVertexAttribiv%s(index, GL_VERTEX_ATTRIB_ARRAY_ENABLED%s, &_enabled);' % (suffix, SUFFIX))
-+ print(' if (_enabled) {')
-+ print(' GLint _binding = 0;')
- if suffix != 'NV':
- # It doesn't seem possible to use VBOs with NV_vertex_program.
-- print ' _glGetVertexAttribiv%s(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING%s, &_binding);' % (suffix, SUFFIX)
-- print ' if (!_binding) {'
-+ print(' _glGetVertexAttribiv%s(index, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING%s, &_binding);' % (suffix, SUFFIX))
-+ print(' if (!_binding) {')
-
- # Get the arguments via glGet*
- for arg in function.args[1:]:
-@@ -1083,40 +1083,40 @@ class GlTracer(Tracer):
- else:
- arg_get_enum = 'GL_VERTEX_ATTRIB_ARRAY_%s%s' % (arg.name.upper(), SUFFIX)
- arg_get_function, arg_type = TypeGetter('glGetVertexAttrib', False, suffix).visit(arg.type)
-- print ' %s %s = 0;' % (arg_type, arg.name)
-- print ' _%s(index, %s, &%s);' % (arg_get_function, arg_get_enum, arg.name)
-+ print(' %s %s = 0;' % (arg_type, arg.name))
-+ print(' _%s(index, %s, &%s);' % (arg_get_function, arg_get_enum, arg.name))
-
- arg_names = ', '.join([arg.name for arg in function.args[1:-1]])
-- print ' size_t _size = _%s_size(%s, count);' % (function.name, arg_names)
-+ print(' size_t _size = _%s_size(%s, count);' % (function.name, arg_names))
-
- # Emit a fake function
-- print ' unsigned _call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,)
-+ print(' unsigned _call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,))
- for arg in function.args:
- assert not arg.output
-- print ' trace::localWriter.beginArg(%u);' % (arg.index,)
-+ print(' trace::localWriter.beginArg(%u);' % (arg.index,))
- if arg.name != 'pointer':
- self.serializeValue(arg.type, arg.name)
- else:
-- print ' trace::localWriter.writeBlob((const void *)%s, _size);' % (arg.name)
-- print ' trace::localWriter.endArg();'
-+ print(' trace::localWriter.writeBlob((const void *)%s, _size);' % (arg.name))
-+ print(' trace::localWriter.endArg();')
-
-- print ' trace::localWriter.endEnter();'
-- print ' trace::localWriter.beginLeave(_call);'
-- print ' trace::localWriter.endLeave();'
-- print ' }'
-- print ' }'
-- print ' }'
-- print ' }'
-- print
-+ print(' trace::localWriter.endEnter();')
-+ print(' trace::localWriter.beginLeave(_call);')
-+ print(' trace::localWriter.endLeave();')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print(' }')
-+ print()
-
- # Restore the original array_buffer
-- print ' if (_array_buffer) {'
-+ print(' if (_array_buffer) {')
- self.fake_glBindBuffer(api, 'GL_ARRAY_BUFFER', '_array_buffer')
-- print ' }'
-- print
-+ print(' }')
-+ print()
-
-- print '}'
-- print
-+ print('}')
-+ print()
-
- #
- # Hooks for glTexCoordPointer, which is identical to the other array
-@@ -1125,49 +1125,49 @@ class GlTracer(Tracer):
-
- def array_prolog(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' GLint max_units = 0;'
-- print ' if (ctx->profile.desktop())'
-- print ' _glGetIntegerv(GL_MAX_TEXTURE_COORDS, &max_units);'
-- print ' else'
-- print ' _glGetIntegerv(GL_MAX_TEXTURE_UNITS, &max_units);'
-- print ' GLint client_active_texture = GL_TEXTURE0;'
-- print ' if (max_units > 0) {'
-- print ' _glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE, &client_active_texture);'
-- print ' }'
-- print ' GLint unit = 0;'
-- print ' do {'
-- print ' GLint texture = GL_TEXTURE0 + unit;'
-- print ' if (max_units > 0) {'
-- print ' _glClientActiveTexture(texture);'
-- print ' }'
-+ print(' GLint max_units = 0;')
-+ print(' if (ctx->profile.desktop())')
-+ print(' _glGetIntegerv(GL_MAX_TEXTURE_COORDS, &max_units);')
-+ print(' else')
-+ print(' _glGetIntegerv(GL_MAX_TEXTURE_UNITS, &max_units);')
-+ print(' GLint client_active_texture = GL_TEXTURE0;')
-+ print(' if (max_units > 0) {')
-+ print(' _glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE, &client_active_texture);')
-+ print(' }')
-+ print(' GLint unit = 0;')
-+ print(' do {')
-+ print(' GLint texture = GL_TEXTURE0 + unit;')
-+ print(' if (max_units > 0) {')
-+ print(' _glClientActiveTexture(texture);')
-+ print(' }')
-
- def array_trace_prolog(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' bool client_active_texture_dirty = false;'
-+ print(' bool client_active_texture_dirty = false;')
-
- def array_epilog(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' } while (++unit < max_units);'
-+ print(' } while (++unit < max_units);')
- self.array_cleanup(api, uppercase_name)
-
- def array_cleanup(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' if (max_units > 0) {'
-- print ' _glClientActiveTexture(client_active_texture);'
-- print ' }'
-+ print(' if (max_units > 0) {')
-+ print(' _glClientActiveTexture(client_active_texture);')
-+ print(' }')
-
- def array_trace_intermezzo(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' if (texture != client_active_texture || client_active_texture_dirty) {'
-- print ' client_active_texture_dirty = true;'
-+ print(' if (texture != client_active_texture || client_active_texture_dirty) {')
-+ print(' client_active_texture_dirty = true;')
- self.fake_glClientActiveTexture_call(api, "texture");
-- print ' }'
-+ print(' }')
-
- def array_trace_epilog(self, api, uppercase_name):
- if uppercase_name == 'TEXTURE_COORD':
-- print ' if (client_active_texture_dirty) {'
-+ print(' if (client_active_texture_dirty) {')
- self.fake_glClientActiveTexture_call(api, "client_active_texture");
-- print ' }'
-+ print(' }')
-
- def fake_glBindBuffer(self, api, target, buffer):
- function = api.getFunctionByName('glBindBuffer')
-@@ -1180,13 +1180,13 @@ class GlTracer(Tracer):
- def emitFakeTexture2D(self):
- function = glapi.glapi.getFunctionByName('glTexImage2D')
- instances = function.argNames()
-- print ' unsigned _fake_call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,)
-+ print(' unsigned _fake_call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,))
- for arg in function.args:
- assert not arg.output
- self.serializeArg(function, arg)
-- print ' trace::localWriter.endEnter();'
-- print ' trace::localWriter.beginLeave(_fake_call);'
-- print ' trace::localWriter.endLeave();'
-+ print(' trace::localWriter.endEnter();')
-+ print(' trace::localWriter.beginLeave(_fake_call);')
-+ print(' trace::localWriter.endLeave();')
-
-
-
-diff --git a/wrappers/glxtrace.py b/wrappers/glxtrace.py
-index f35d1fe9..b05028e2 100644
---- a/wrappers/glxtrace.py
-+++ b/wrappers/glxtrace.py
-@@ -64,7 +64,7 @@ class GlxTracer(GlTracer):
-
- def traceFunctionImplBody(self, function):
- if function.name in self.destroyContextFunctionNames:
-- print ' gltrace::releaseContext((uintptr_t)ctx);'
-+ print(' gltrace::releaseContext((uintptr_t)ctx);')
-
- if function.name == 'glXGetCurrentDisplay':
- print ' if(_glXGetCurrentDisplay == &glXGetCurrentDisplay ){'
-@@ -74,16 +74,16 @@ class GlxTracer(GlTracer):
- GlTracer.traceFunctionImplBody(self, function)
-
- if function.name in self.createContextFunctionNames:
-- print ' if (_result != NULL)'
-- print ' gltrace::createContext((uintptr_t)_result);'
-+ print(' if (_result != NULL)')
-+ print(' gltrace::createContext((uintptr_t)_result);')
-
- if function.name in self.makeCurrentFunctionNames:
-- print ' if (_result) {'
-- print ' if (ctx != NULL)'
-- print ' gltrace::setContext((uintptr_t)ctx);'
-- print ' else'
-- print ' gltrace::clearContext();'
-- print ' }'
-+ print(' if (_result) {')
-+ print(' if (ctx != NULL)')
-+ print(' gltrace::setContext((uintptr_t)ctx);')
-+ print(' else')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-
- if function.name == 'glXBindTexImageEXT':
- # FIXME: glXBindTexImageEXT gets called frequently, so we should
-@@ -92,7 +92,7 @@ class GlxTracer(GlTracer):
- # emit emitFakeTexture2D when it changes
- # - keep a global hash of the pixels
- # FIXME: Handle mipmaps
-- print r'''
-+ print(r'''
- unsigned glx_target = 0;
- _glXQueryDrawable(display, drawable, GLX_TEXTURE_TARGET_EXT, &glx_target);
- GLenum target;
-@@ -152,29 +152,29 @@ class GlxTracer(GlTracer):
- GLint row_stride = _align(width * 4, alignment);
- GLvoid * pixels = malloc(height * row_stride);
- _glGetTexImage(target, level, format, type, pixels);
-- '''
-+ ''')
- self.emitFakeTexture2D()
-- print r'''
-+ print(r'''
- free(pixels);
- }
-- '''
-+ ''')
-
-
- if __name__ == '__main__':
-- print
-- print '#include <stdlib.h>'
-- print '#include <string.h>'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print
-- print '// To validate our prototypes'
-- print '#define GL_GLEXT_PROTOTYPES'
-- print '#define GLX_GLXEXT_PROTOTYPES'
-- print
-- print '#include "dlopen.hpp"'
-- print '#include "glproc.hpp"'
-- print '#include "glsize.hpp"'
-- print
-+ print()
-+ print('#include <stdlib.h>')
-+ print('#include <string.h>')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print()
-+ print('// To validate our prototypes')
-+ print('#define GL_GLEXT_PROTOTYPES')
-+ print('#define GLX_GLXEXT_PROTOTYPES')
-+ print()
-+ print('#include "dlopen.hpp"')
-+ print('#include "glproc.hpp"')
-+ print('#include "glsize.hpp"')
-+ print()
-
- module = Module()
- module.mergeModule(glxapi)
-diff --git a/wrappers/trace.py b/wrappers/trace.py
-index 7d1baa10..318f0990 100644
---- a/wrappers/trace.py
-+++ b/wrappers/trace.py
-@@ -69,21 +69,21 @@ class ComplexValueSerializer(stdapi.OnceVisitor):
-
- def visitStruct(self, struct):
- # Ensure member array has nonzero length to avoid MSVC error C2466
-- print 'static const char * _struct%s_members[%u] = {' % (struct.tag, max(len(struct.members), 1))
-+ print('static const char * _struct%s_members[%u] = {' % (struct.tag, max(len(struct.members), 1)))
- for type, name, in struct.members:
- if name is None:
-- print ' "",'
-+ print(' "",')
- else:
-- print ' "%s",' % (name,)
-- print '};'
-- print 'static const trace::StructSig _struct%s_sig = {' % (struct.tag,)
-+ print(' "%s",' % (name,))
-+ print('};')
-+ print('static const trace::StructSig _struct%s_sig = {' % (struct.tag,))
- if struct.name is None:
- structName = '""'
- else:
- structName = '"%s"' % struct.name
-- print ' %u, %s, %u, _struct%s_members' % (struct.id, structName, len(struct.members), struct.tag)
-- print '};'
-- print
-+ print(' %u, %s, %u, _struct%s_members' % (struct.id, structName, len(struct.members), struct.tag))
-+ print('};')
-+ print()
-
- def visitArray(self, array):
- self.visit(array.type)
-@@ -95,26 +95,26 @@ class ComplexValueSerializer(stdapi.OnceVisitor):
- pass
-
- def visitEnum(self, enum):
-- print 'static const trace::EnumValue _enum%s_values[] = {' % (enum.tag)
-+ print('static const trace::EnumValue _enum%s_values[] = {' % (enum.tag))
- for value in enum.values:
-- print ' {"%s", %s},' % (value, value)
-- print '};'
-- print
-- print 'static const trace::EnumSig _enum%s_sig = {' % (enum.tag)
-- print ' %u, %u, _enum%s_values' % (enum.id, len(enum.values), enum.tag)
-- print '};'
-- print
-+ print(' {"%s", %s},' % (value, value))
-+ print('};')
-+ print()
-+ print('static const trace::EnumSig _enum%s_sig = {' % (enum.tag))
-+ print(' %u, %u, _enum%s_values' % (enum.id, len(enum.values), enum.tag))
-+ print('};')
-+ print()
-
- def visitBitmask(self, bitmask):
-- print 'static const trace::BitmaskFlag _bitmask%s_flags[] = {' % (bitmask.tag)
-+ print('static const trace::BitmaskFlag _bitmask%s_flags[] = {' % (bitmask.tag))
- for value in bitmask.values:
-- print ' {"%s", %s},' % (value, value)
-- print '};'
-- print
-- print 'static const trace::BitmaskSig _bitmask%s_sig = {' % (bitmask.tag)
-- print ' %u, %u, _bitmask%s_flags' % (bitmask.id, len(bitmask.values), bitmask.tag)
-- print '};'
-- print
-+ print(' {"%s", %s},' % (value, value))
-+ print('};')
-+ print()
-+ print('static const trace::BitmaskSig _bitmask%s_sig = {' % (bitmask.tag))
-+ print(' %u, %u, _bitmask%s_flags' % (bitmask.id, len(bitmask.values), bitmask.tag))
-+ print('};')
-+ print()
-
- def visitPointer(self, pointer):
- self.visit(pointer.type)
-@@ -146,16 +146,16 @@ class ComplexValueSerializer(stdapi.OnceVisitor):
- def visitPolymorphic(self, polymorphic):
- if not polymorphic.contextLess:
- return
-- print 'static void _write__%s(int selector, %s const & value) {' % (polymorphic.tag, polymorphic.expr)
-- print ' switch (selector) {'
-+ print('static void _write__%s(int selector, %s const & value) {' % (polymorphic.tag, polymorphic.expr))
-+ print(' switch (selector) {')
- for cases, type in polymorphic.iterSwitch():
- for case in cases:
-- print ' %s:' % case
-+ print(' %s:' % case)
- self.serializer.visit(type, '(%s)(value)' % (type,))
-- print ' break;'
-- print ' }'
-- print '}'
-- print
-+ print(' break;')
-+ print(' }')
-+ print('}')
-+ print()
-
-
- class ValueSerializer(stdapi.Visitor, stdapi.ExpanderMixin):
-@@ -167,7 +167,7 @@ class ValueSerializer(stdapi.Visitor, stdapi.ExpanderMixin):
- '''
-
- def visitLiteral(self, literal, instance):
-- print ' trace::localWriter.write%s(%s);' % (literal.kind, instance)
-+ print(' trace::localWriter.write%s(%s);' % (literal.kind, instance))
-
- def visitString(self, string, instance):
- if not string.wide:
-@@ -183,33 +183,33 @@ class ValueSerializer(stdapi.Visitor, stdapi.ExpanderMixin):
- length = ', %s' % self.expand(string.length)
- else:
- length = ''
-- print ' trace::localWriter.write%s(%s%s);' % (suffix, instance, length)
-+ print(' trace::localWriter.write%s(%s%s);' % (suffix, instance, length))
-
- def visitConst(self, const, instance):
- self.visit(const.type, instance)
-
- def visitStruct(self, struct, instance):
-- print ' trace::localWriter.beginStruct(&_struct%s_sig);' % (struct.tag,)
-+ print(' trace::localWriter.beginStruct(&_struct%s_sig);' % (struct.tag,))
- for member in struct.members:
- self.visitMember(member, instance)
-- print ' trace::localWriter.endStruct();'
-+ print(' trace::localWriter.endStruct();')
-
- def visitArray(self, array, instance):
- length = '_c' + array.type.tag
- index = '_i' + array.type.tag
- array_length = self.expand(array.length)
-- print ' if (%s) {' % instance
-- print ' size_t %s = %s > 0 ? %s : 0;' % (length, array_length, array_length)
-- print ' trace::localWriter.beginArray(%s);' % length
-- print ' for (size_t %s = 0; %s < %s; ++%s) {' % (index, index, length, index)
-- print ' trace::localWriter.beginElement();'
-+ print(' if (%s) {' % instance)
-+ print(' size_t %s = %s > 0 ? %s : 0;' % (length, array_length, array_length))
-+ print(' trace::localWriter.beginArray(%s);' % length)
-+ print(' for (size_t %s = 0; %s < %s; ++%s) {' % (index, index, length, index))
-+ print(' trace::localWriter.beginElement();')
- self.visitElement(index, array.type, '(%s)[%s]' % (instance, index))
-- print ' trace::localWriter.endElement();'
-- print ' }'
-- print ' trace::localWriter.endArray();'
-- print ' } else {'
-- print ' trace::localWriter.writeNull();'
-- print ' }'
-+ print(' trace::localWriter.endElement();')
-+ print(' }')
-+ print(' trace::localWriter.endArray();')
-+ print(' } else {')
-+ print(' trace::localWriter.writeNull();')
-+ print(' }')
-
- def visitAttribArray(self, array, instance):
- # For each element, decide if it is a key or a value (which depends on the previous key).
-@@ -218,90 +218,90 @@ class ValueSerializer(stdapi.Visitor, stdapi.ExpanderMixin):
-
- # determine the array length which must be passed to writeArray() up front
- count = '_c' + array.baseType.tag
-- print ' {'
-- print ' int %s;' % count
-- print ' for (%(c)s = 0; %(array)s && %(array)s[%(c)s] != %(terminator)s; %(c)s += 2) {' \
-- % {'c': count, 'array': instance, 'terminator': array.terminator}
-+ print(' {')
-+ print(' int %s;' % count)
-+ print(' for (%(c)s = 0; %(array)s && %(array)s[%(c)s] != %(terminator)s; %(c)s += 2) {' \
-+ % {'c': count, 'array': instance, 'terminator': array.terminator})
- if array.hasKeysWithoutValues:
-- print ' switch (int(%(array)s[%(c)s])) {' % {'array': instance, 'c': count}
-+ print(' switch (int(%(array)s[%(c)s])) {' % {'array': instance, 'c': count})
- for key, valueType in array.valueTypes:
- if valueType is None:
-- print ' case %s:' % key
-- print ' %s--;' % count # the next value is a key again and checked if it's the terminator
-- print ' break;'
-- print ' }'
-- print ' }'
-- print ' %(c)s += %(array)s ? 1 : 0;' % {'c': count, 'array': instance}
-- print ' trace::localWriter.beginArray(%s);' % count
-+ print(' case %s:' % key)
-+ print(' %s--;' % count) # the next value is a key again and checked if it's the terminator
-+ print(' break;')
-+ print(' }')
-+ print(' }')
-+ print(' %(c)s += %(array)s ? 1 : 0;' % {'c': count, 'array': instance})
-+ print(' trace::localWriter.beginArray(%s);' % count)
-
- # for each key / key-value pair write the key and the value, if the key requires one
-
- index = '_i' + array.baseType.tag
-- print ' for (int %(i)s = 0; %(i)s < %(count)s; %(i)s++) {' % {'i': index, 'count': count}
-- print ' trace::localWriter.beginElement();'
-+ print(' for (int %(i)s = 0; %(i)s < %(count)s; %(i)s++) {' % {'i': index, 'count': count})
-+ print(' trace::localWriter.beginElement();')
- self.visit(array.baseType, "%(array)s[%(i)s]" % {'array': instance, 'i': index})
-- print ' trace::localWriter.endElement();'
-- print ' if (%(i)s + 1 >= %(count)s) {' % {'i': index, 'count': count}
-- print ' break;'
-- print ' }'
-- print ' switch (int(%(array)s[%(i)s++])) {' % {'array': instance, 'i': index}
-+ print(' trace::localWriter.endElement();')
-+ print(' if (%(i)s + 1 >= %(count)s) {' % {'i': index, 'count': count})
-+ print(' break;')
-+ print(' }')
-+ print(' switch (int(%(array)s[%(i)s++])) {' % {'array': instance, 'i': index})
- # write generic value the usual way
- for key, valueType in array.valueTypes:
- if valueType is not None:
-- print ' case %s:' % key
-- print ' trace::localWriter.beginElement();'
-+ print(' case %s:' % key)
-+ print(' trace::localWriter.beginElement();')
- self.visitElement(index, valueType, '(%(array)s)[%(i)s]' % {'array': instance, 'i': index})
-- print ' trace::localWriter.endElement();'
-- print ' break;'
-+ print(' trace::localWriter.endElement();')
-+ print(' break;')
- # known key with no value, just decrease the index so we treat the next value as a key
- if array.hasKeysWithoutValues:
- for key, valueType in array.valueTypes:
- if valueType is None:
-- print ' case %s:' % key
-- print ' %s--;' % index
-- print ' break;'
-+ print(' case %s:' % key)
-+ print(' %s--;' % index)
-+ print(' break;')
- # unknown key, write an int value
-- print ' default:'
-- print ' trace::localWriter.beginElement();'
-- print ' os::log("apitrace: warning: %s: unknown key 0x%04X, interpreting value as int\\n", ' + \
-- '__FUNCTION__, int(%(array)s[%(i)s - 1]));' % {'array': instance, 'i': index}
-- print ' trace::localWriter.writeSInt(%(array)s[%(i)s]);' % {'array': instance, 'i': index}
-- print ' trace::localWriter.endElement();'
-- print ' break;'
-- print ' }'
-- print ' }'
-- print ' trace::localWriter.endArray();'
-- print ' }'
-+ print(' default:')
-+ print(' trace::localWriter.beginElement();')
-+ print(' os::log("apitrace: warning: %s: unknown key 0x%04X, interpreting value as int\\n", ' + \
-+ '__FUNCTION__, int(%(array)s[%(i)s - 1]));' % {'array': instance, 'i': index})
-+ print(' trace::localWriter.writeSInt(%(array)s[%(i)s]);' % {'array': instance, 'i': index})
-+ print(' trace::localWriter.endElement();')
-+ print(' break;')
-+ print(' }')
-+ print(' }')
-+ print(' trace::localWriter.endArray();')
-+ print(' }')
-
-
- def visitBlob(self, blob, instance):
-- print ' trace::localWriter.writeBlob(%s, %s);' % (instance, self.expand(blob.size))
-+ print(' trace::localWriter.writeBlob(%s, %s);' % (instance, self.expand(blob.size)))
-
- def visitEnum(self, enum, instance):
-- print ' trace::localWriter.writeEnum(&_enum%s_sig, %s);' % (enum.tag, instance)
-+ print(' trace::localWriter.writeEnum(&_enum%s_sig, %s);' % (enum.tag, instance))
-
- def visitBitmask(self, bitmask, instance):
-- print ' trace::localWriter.writeBitmask(&_bitmask%s_sig, %s);' % (bitmask.tag, instance)
-+ print(' trace::localWriter.writeBitmask(&_bitmask%s_sig, %s);' % (bitmask.tag, instance))
-
- def visitPointer(self, pointer, instance):
-- print ' if (%s) {' % instance
-- print ' trace::localWriter.beginArray(1);'
-- print ' trace::localWriter.beginElement();'
-+ print(' if (%s) {' % instance)
-+ print(' trace::localWriter.beginArray(1);')
-+ print(' trace::localWriter.beginElement();')
- self.visit(pointer.type, "*" + instance)
-- print ' trace::localWriter.endElement();'
-- print ' trace::localWriter.endArray();'
-- print ' } else {'
-- print ' trace::localWriter.writeNull();'
-- print ' }'
-+ print(' trace::localWriter.endElement();')
-+ print(' trace::localWriter.endArray();')
-+ print(' } else {')
-+ print(' trace::localWriter.writeNull();')
-+ print(' }')
-
- def visitIntPointer(self, pointer, instance):
-- print ' trace::localWriter.writePointer((uintptr_t)%s);' % instance
-+ print(' trace::localWriter.writePointer((uintptr_t)%s);' % instance)
-
- def visitObjPointer(self, pointer, instance):
-- print ' trace::localWriter.writePointer((uintptr_t)%s);' % instance
-+ print(' trace::localWriter.writePointer((uintptr_t)%s);' % instance)
-
- def visitLinearPointer(self, pointer, instance):
-- print ' trace::localWriter.writePointer((uintptr_t)%s);' % instance
-+ print(' trace::localWriter.writePointer((uintptr_t)%s);' % instance)
-
- def visitReference(self, reference, instance):
- self.visit(reference.type, instance)
-@@ -313,31 +313,31 @@ class ValueSerializer(stdapi.Visitor, stdapi.ExpanderMixin):
- self.visit(alias.type, instance)
-
- def visitOpaque(self, opaque, instance):
-- print ' trace::localWriter.writePointer((uintptr_t)%s);' % instance
-+ print(' trace::localWriter.writePointer((uintptr_t)%s);' % instance)
-
- def visitInterface(self, interface, instance):
- assert False
-
- def visitPolymorphic(self, polymorphic, instance):
- if polymorphic.contextLess:
-- print ' _write__%s(%s, %s);' % (polymorphic.tag, polymorphic.switchExpr, instance)
-+ print(' _write__%s(%s, %s);' % (polymorphic.tag, polymorphic.switchExpr, instance))
- else:
- switchExpr = self.expand(polymorphic.switchExpr)
-- print ' switch (%s) {' % switchExpr
-+ print(' switch (%s) {' % switchExpr)
- for cases, type in polymorphic.iterSwitch():
- for case in cases:
-- print ' %s:' % case
-+ print(' %s:' % case)
- caseInstance = instance
- if type.expr is not None:
- caseInstance = 'static_cast<%s>(%s)' % (type, caseInstance)
- self.visit(type, caseInstance)
-- print ' break;'
-+ print(' break;')
- if polymorphic.defaultType is None:
-- print r' default:'
-- print r' os::log("apitrace: warning: %%s: unexpected polymorphic case %%i\n", __FUNCTION__, (int)%s);' % (switchExpr,)
-- print r' trace::localWriter.writeNull();'
-- print r' break;'
-- print ' }'
-+ print(r' default:')
-+ print(r' os::log("apitrace: warning: %%s: unexpected polymorphic case %%i\n", __FUNCTION__, (int)%s);' % (switchExpr,))
-+ print(r' trace::localWriter.writeNull();')
-+ print(r' break;')
-+ print(' }')
-
-
- class WrapDecider(stdapi.Traverser):
-@@ -369,16 +369,16 @@ class ValueWrapper(stdapi.Traverser, stdapi.ExpanderMixin):
-
- def visitArray(self, array, instance):
- array_length = self.expand(array.length)
-- print " if (%s) {" % instance
-- print " for (size_t _i = 0, _s = %s; _i < _s; ++_i) {" % array_length
-+ print(" if (%s) {" % instance)
-+ print(" for (size_t _i = 0, _s = %s; _i < _s; ++_i) {" % array_length)
- self.visitElement('_i', array.type, instance + "[_i]")
-- print " }"
-- print " }"
-+ print(" }")
-+ print(" }")
-
- def visitPointer(self, pointer, instance):
-- print " if (%s) {" % instance
-+ print(" if (%s) {" % instance)
- self.visit(pointer.type, "*" + instance)
-- print " }"
-+ print(" }")
-
- def visitObjPointer(self, pointer, instance):
- elem_type = pointer.type.mutable()
-@@ -388,13 +388,13 @@ class ValueWrapper(stdapi.Traverser, stdapi.ExpanderMixin):
- self.visitInterfacePointer(elem_type.type, instance)
- else:
- # All interfaces should at least implement IUnknown
-- print " WrapIUnknown::_wrap(__FUNCTION__, (IUnknown **) &%s);" % (instance,)
-+ print(" WrapIUnknown::_wrap(__FUNCTION__, (IUnknown **) &%s);" % (instance,))
-
- def visitInterface(self, interface, instance):
- raise NotImplementedError
-
- def visitInterfacePointer(self, interface, instance):
-- print " Wrap%s::_wrap(__FUNCTION__, &%s);" % (interface.name, instance)
-+ print(" Wrap%s::_wrap(__FUNCTION__, &%s);" % (interface.name, instance))
-
- def visitPolymorphic(self, type, instance):
- # XXX: There might be polymorphic values that need wrapping in the future
-@@ -409,17 +409,17 @@ class ValueUnwrapper(ValueWrapper):
- def visitStruct(self, struct, instance):
- if not self.allocated:
- # Argument is constant. We need to create a non const
-- print ' {'
-- print " %s * _t = static_cast<%s *>(alloca(sizeof *_t));" % (struct, struct)
-- print ' *_t = %s;' % (instance,)
-+ print(' {')
-+ print(" %s * _t = static_cast<%s *>(alloca(sizeof *_t));" % (struct, struct))
-+ print(' *_t = %s;' % (instance,))
- assert instance.startswith('*')
-- print ' %s = _t;' % (instance[1:],)
-+ print(' %s = _t;' % (instance[1:],))
- instance = '*_t'
- self.allocated = True
- try:
- return ValueWrapper.visitStruct(self, struct, instance)
- finally:
-- print ' }'
-+ print(' }')
- else:
- return ValueWrapper.visitStruct(self, struct, instance)
-
-@@ -428,18 +428,18 @@ class ValueUnwrapper(ValueWrapper):
- return ValueWrapper.visitArray(self, array, instance)
- array_length = self.expand(array.length)
- elem_type = array.type.mutable()
-- print " if (%s && %s) {" % (instance, array_length)
-- print " %s * _t = static_cast<%s *>(alloca(%s * sizeof *_t));" % (elem_type, elem_type, array_length)
-- print " for (size_t _i = 0, _s = %s; _i < _s; ++_i) {" % array_length
-- print " _t[_i] = %s[_i];" % instance
-+ print(" if (%s && %s) {" % (instance, array_length))
-+ print(" %s * _t = static_cast<%s *>(alloca(%s * sizeof *_t));" % (elem_type, elem_type, array_length))
-+ print(" for (size_t _i = 0, _s = %s; _i < _s; ++_i) {" % array_length)
-+ print(" _t[_i] = %s[_i];" % instance)
- self.allocated = True
- self.visit(array.type, "_t[_i]")
-- print " }"
-- print " %s = _t;" % instance
-- print " }"
-+ print(" }")
-+ print(" %s = _t;" % instance)
-+ print(" }")
-
- def visitInterfacePointer(self, interface, instance):
-- print r' Wrap%s::_unwrap(__FUNCTION__, &%s);' % (interface.name, instance)
-+ print(r' Wrap%s::_unwrap(__FUNCTION__, &%s);' % (interface.name, instance))
-
-
- def _getInterfaceHierarchy(allIfaces, baseIface, result):
-@@ -479,14 +479,17 @@ class Tracer:
- # Includes
- for module in api.modules:
- for header in module.headers:
-- print header
-- print
-+ print(header)
-+ print()
-
- # Generate the serializer functions
- types = api.getAllTypes()
- visitor = ComplexValueSerializer(self.serializerFactory())
-- map(visitor.visit, types)
-- print
-+
-+ for tp in types:
-+ visitor.visit(tp)
-+
-+ print()
-
- # Interfaces wrapers
- self.traceInterfaces(api)
-@@ -498,22 +501,22 @@ class Tracer:
- self.traceFunctionDecl(function)
- for function in api.getAllFunctions():
- self.traceFunctionImpl(function)
-- print
-+ print()
-
- self.footer(api)
-
- def header(self, api):
-- print '#ifdef _WIN32'
-- print '# include <malloc.h> // alloca'
-- print '# ifndef alloca'
-- print '# define alloca _alloca'
-- print '# endif'
-- print '#else'
-- print '# include <alloca.h> // alloca'
-- print '#endif'
-- print
-- print
-- print 'static std::map<void *, void *> g_WrappedObjects;'
-+ print('#ifdef _WIN32')
-+ print('# include <malloc.h> // alloca')
-+ print('# ifndef alloca')
-+ print('# define alloca _alloca')
-+ print('# endif')
-+ print('#else')
-+ print('# include <alloca.h> // alloca')
-+ print('#endif')
-+ print()
-+ print()
-+ print('static std::map<void *, void *> g_WrappedObjects;')
-
- def footer(self, api):
- pass
-@@ -523,11 +526,11 @@ class Tracer:
-
- if not function.internal:
- if function.args:
-- print 'static const char * _%s_args[%u] = {%s};' % (function.name, len(function.args), ', '.join(['"%s"' % arg.name for arg in function.args]))
-+ print('static const char * _%s_args[%u] = {%s};' % (function.name, len(function.args), ', '.join(['"%s"' % arg.name for arg in function.args])))
- else:
-- print 'static const char ** _%s_args = NULL;' % (function.name,)
-- print 'static const trace::FunctionSig _%s_sig = {%u, "%s", %u, _%s_args};' % (function.name, self.getFunctionSigId(), function.name, len(function.args), function.name)
-- print
-+ print('static const char ** _%s_args = NULL;' % (function.name,))
-+ print('static const trace::FunctionSig _%s_sig = {%u, "%s", %u, _%s_args};' % (function.name, self.getFunctionSigId(), function.sigName(), len(function.args), function.name))
-+ print()
-
- def getFunctionSigId(self):
- id = Tracer.__id
-@@ -539,12 +542,12 @@ class Tracer:
-
- def traceFunctionImpl(self, function):
- if self.isFunctionPublic(function):
-- print 'extern "C" PUBLIC'
-+ print('extern "C" PUBLIC')
- else:
-- print 'extern "C" PRIVATE'
-- print function.prototype() + ' {'
-+ print('extern "C" PRIVATE')
-+ print(function.prototype() + ' {')
- if function.type is not stdapi.Void:
-- print ' %s _result;' % function.type
-+ print(' %s _result;' % function.type)
-
- for arg in function.args:
- if not arg.output:
-@@ -555,43 +558,43 @@ class Tracer:
- # XXX: wrapping should go here, but before we can do that we'll need to protect g_WrappedObjects with its own mutex
-
- if function.type is not stdapi.Void:
-- print ' return _result;'
-+ print(' return _result;')
-
-- print '}'
-- print
-+ print('}')
-+ print()
-
- def traceFunctionImplBody(self, function):
- multi_draw_function_regex = re.compile(r'^glMultiDraw(Arrays|Elements)([A-Z][a-zA-Z]*)?$' )
- if not function.internal:
-- print ' unsigned _call = trace::localWriter.beginEnter(&_%s_sig);' % (function.name,)
-+ print(' unsigned _call = trace::localWriter.beginEnter(&_%s_sig);' % (function.name,))
- for arg in function.args:
- if not arg.output:
- self.serializeArg(function, arg)
-- print ' trace::localWriter.endEnter();'
-+ print(' trace::localWriter.endEnter();')
-
- if self.multi_draw_function_regex.match(function.name):
-- print ' trace::localWriter.beginIgnore();'
-- print ' trace::localWriter.endIgnore();'
-+ print(' trace::localWriter.beginIgnore();')
-+ print(' trace::localWriter.endEnter();')
-
- self.invokeFunction(function)
-
- if self.multi_draw_function_regex.match(function.name):
-- print ' trace::localWriter.beginTrace();'
-- print ' trace::localWriter.endTrace();'
-+ print(' trace::localWriter.beginTrace();')
-+ print(' trace::localWriter.endTrace();')
-
- if not function.internal:
-- print ' trace::localWriter.beginLeave(_call);'
-- print ' if (%s) {' % self.wasFunctionSuccessful(function)
-+ print(' trace::localWriter.beginLeave(_call);')
-+ print(' if (%s) {' % self.wasFunctionSuccessful(function))
- for arg in function.args:
- if arg.output:
- self.serializeArg(function, arg)
- self.wrapArg(function, arg)
-- print ' }'
-+ print(' }')
- if function.type is not stdapi.Void:
- self.serializeRet(function, "_result")
- if function.type is not stdapi.Void:
- self.wrapRet(function, "_result")
-- print ' trace::localWriter.endLeave();'
-+ print(' trace::localWriter.endLeave();')
-
- def invokeFunction(self, function):
- self.doInvokeFunction(function)
-@@ -603,7 +606,7 @@ class Tracer:
- else:
- result = '_result = '
- dispatch = prefix + function.name + suffix
-- print ' %s%s(%s);' % (result, dispatch, ', '.join([str(arg.name) for arg in function.args]))
-+ print(' %s%s(%s);' % (result, dispatch, ', '.join([str(arg.name) for arg in function.args])))
-
- def wasFunctionSuccessful(self, function):
- if function.type is stdapi.Void:
-@@ -613,9 +616,9 @@ class Tracer:
- return 'true'
-
- def serializeArg(self, function, arg):
-- print ' trace::localWriter.beginArg(%u);' % (arg.index,)
-+ print(' trace::localWriter.beginArg(%u);' % (arg.index,))
- self.serializeArgValue(function, arg)
-- print ' trace::localWriter.endArg();'
-+ print(' trace::localWriter.endArg();')
-
- def serializeArgValue(self, function, arg):
- self.serializeValue(arg.type, arg.name)
-@@ -641,9 +644,9 @@ class Tracer:
- self.unwrapValue(arg.type, arg.name)
-
- def serializeRet(self, function, instance):
-- print ' trace::localWriter.beginReturn();'
-+ print(' trace::localWriter.beginReturn();')
- self.serializeValue(function.type, instance)
-- print ' trace::localWriter.endReturn();'
-+ print(' trace::localWriter.endReturn();')
-
- def serializeValue(self, type, instance):
- serializer = self.serializerFactory()
-@@ -672,70 +675,72 @@ class Tracer:
- if not interfaces:
- return
-
-- print r'#include "guids.hpp"'
-- print
-+ print(r'#include "guids.hpp"')
-+ print()
-
- map(self.declareWrapperInterface, interfaces)
-
- # Helper functions to wrap/unwrap interface pointers
-- print r'static inline bool'
-- print r'hasChildInterface(REFIID riid, IUnknown *pUnknown) {'
-- print r' IUnknown *pObj = NULL;'
-- print r' HRESULT hr = pUnknown->QueryInterface(riid, (VOID **)&pObj);'
-- print r' if (FAILED(hr)) {'
-- print r' return false;'
-- print r' }'
-- print r' assert(pObj);'
-- print r' pObj->Release();'
-- print r' return pUnknown == pObj;'
-- print r'}'
-- print
-- print r'static inline const void *'
-- print r'getVtbl(const void *pvObj) {'
-- print r' return pvObj ? *(const void **)pvObj : NULL;'
-- print r'}'
-- print
-+ print(r'static inline bool')
-+ print(r'hasChildInterface(REFIID riid, IUnknown *pUnknown) {')
-+ print(r' IUnknown *pObj = NULL;')
-+ print(r' HRESULT hr = pUnknown->QueryInterface(riid, (VOID **)&pObj);')
-+ print(r' if (FAILED(hr)) {')
-+ print(r' return false;')
-+ print(r' }')
-+ print(r' assert(pObj);')
-+ print(r' pObj->Release();')
-+ print(r' return pUnknown == pObj;')
-+ print(r'}')
-+ print()
-+ print(r'static inline const void *')
-+ print(r'getVtbl(const void *pvObj) {')
-+ print(r' return pvObj ? *(const void **)pvObj : NULL;')
-+ print(r'}')
-+ print()
-
- self.implementIidWrapper(api)
-
-- map(self.implementWrapperInterface, interfaces)
-- print
-+ for iface in interfaces:
-+ self.implementWrapperInterface(iface)
-+
-+ print()
-
- def declareWrapperInterface(self, interface):
- wrapperInterfaceName = getWrapperInterfaceName(interface)
-- print "class %s : public %s " % (wrapperInterfaceName, interface.name)
-- print "{"
-- print "private:"
-- print " %s(%s * pInstance);" % (wrapperInterfaceName, interface.name)
-- print " virtual ~%s();" % wrapperInterfaceName
-- print "public:"
-- print " static %s* _create(const char *entryName, %s * pInstance);" % (wrapperInterfaceName, interface.name)
-- print " static void _wrap(const char *entryName, %s ** ppInstance);" % (interface.name,)
-- print " static void _unwrap(const char *entryName, %s ** pInstance);" % (interface.name,)
-- print
-+ print("class %s : public %s " % (wrapperInterfaceName, interface.name))
-+ print("{")
-+ print("private:")
-+ print(" %s(%s * pInstance);" % (wrapperInterfaceName, interface.name))
-+ print(" virtual ~%s();" % wrapperInterfaceName)
-+ print("public:")
-+ print(" static %s* _create(const char *entryName, %s * pInstance);" % (wrapperInterfaceName, interface.name))
-+ print(" static void _wrap(const char *entryName, %s ** ppInstance);" % (interface.name,))
-+ print(" static void _unwrap(const char *entryName, %s ** pInstance);" % (interface.name,))
-+ print()
-
- methods = list(interface.iterMethods())
- for method in methods:
-- print " " + method.prototype() + ";"
-+ print(" " + method.prototype() + ";")
- print
-
- for type, name, value in self.enumWrapperInterfaceVariables(interface):
-- print ' %s %s;' % (type, name)
-- print
--
-- print r'private:'
-- print r' void _dummy(unsigned i) const {'
-- print r' os::log("error: %%s: unexpected virtual method %%i of instance pWrapper=%%p pvObj=%%p pVtbl=%%p\n", "%s", i, this, m_pInstance, m_pVtbl);' % interface.name
-- print r' trace::localWriter.flush();'
-- print r' os::abort();'
-- print r' }'
-- print
-+ print(' %s %s;' % (type, name))
-+ print()
-+
-+ print(r'private:')
-+ print(r' void _dummy(unsigned i) const {')
-+ print(r' os::log("error: %%s: unexpected virtual method %%i of instance pWrapper=%%p pvObj=%%p pVtbl=%%p\n", "%s", i, this, m_pInstance, m_pVtbl);' % interface.name)
-+ print(r' trace::localWriter.flush();')
-+ print(r' os::abort();')
-+ print(r' }')
-+ print()
- for i in range(len(methods), 64):
-- print r' virtual void _dummy%i(void) const { _dummy(%i); }' % (i, i)
-- print
-+ print(r' virtual void _dummy%i(void) const { _dummy(%i); }' % (i, i))
-+ print()
-
-- print "};"
-- print
-+ print("};")
-+ print()
-
- def enumWrapperInterfaceVariables(self, interface):
- return [
-@@ -751,101 +756,101 @@ class Tracer:
- wrapperInterfaceName = getWrapperInterfaceName(iface)
-
- # Private constructor
-- print '%s::%s(%s * pInstance) {' % (wrapperInterfaceName, wrapperInterfaceName, iface.name)
-+ print('%s::%s(%s * pInstance) {' % (wrapperInterfaceName, wrapperInterfaceName, iface.name))
- for type, name, value in self.enumWrapperInterfaceVariables(iface):
- if value is not None:
-- print ' %s = %s;' % (name, value)
-- print '}'
-- print
-+ print(' %s = %s;' % (name, value))
-+ print('}')
-+ print()
-
- # Public constructor
-- print '%s *%s::_create(const char *entryName, %s * pInstance) {' % (wrapperInterfaceName, wrapperInterfaceName, iface.name)
-- print r' Wrap%s *pWrapper = new Wrap%s(pInstance);' % (iface.name, iface.name)
-+ print('%s *%s::_create(const char *entryName, %s * pInstance) {' % (wrapperInterfaceName, wrapperInterfaceName, iface.name))
-+ print(r' Wrap%s *pWrapper = new Wrap%s(pInstance);' % (iface.name, iface.name))
- if debug:
-- print r' os::log("%%s: created %s pvObj=%%p pWrapper=%%p pVtbl=%%p\n", entryName, pInstance, pWrapper, pWrapper->m_pVtbl);' % iface.name
-- print r' g_WrappedObjects[pInstance] = pWrapper;'
-- print r' return pWrapper;'
-- print '}'
-- print
-+ print(r' os::log("%%s: created %s pvObj=%%p pWrapper=%%p pVtbl=%%p\n", entryName, pInstance, pWrapper, pWrapper->m_pVtbl);' % iface.name)
-+ print(r' g_WrappedObjects[pInstance] = pWrapper;')
-+ print(r' return pWrapper;')
-+ print('}')
-+ print()
-
- # Destructor
-- print '%s::~%s() {' % (wrapperInterfaceName, wrapperInterfaceName)
-+ print('%s::~%s() {' % (wrapperInterfaceName, wrapperInterfaceName))
- if debug:
-- print r' os::log("%s::Release: deleted pvObj=%%p pWrapper=%%p pVtbl=%%p\n", m_pInstance, this, m_pVtbl);' % iface.name
-- print r' g_WrappedObjects.erase(m_pInstance);'
-- print '}'
-- print
-+ print(r' os::log("%s::Release: deleted pvObj=%%p pWrapper=%%p pVtbl=%%p\n", m_pInstance, this, m_pVtbl);' % iface.name)
-+ print(r' g_WrappedObjects.erase(m_pInstance);')
-+ print('}')
-+ print()
-
- baseMethods = list(iface.iterBaseMethods())
- for base, method in baseMethods:
- self.base = base
- self.implementWrapperInterfaceMethod(iface, base, method)
-
-- print
-+ print()
-
- # Wrap pointer
- ifaces = self.api.getAllInterfaces()
-- print r'void'
-- print r'%s::_wrap(const char *entryName, %s **ppObj) {' % (wrapperInterfaceName, iface.name)
-- print r' if (!ppObj) {'
-- print r' return;'
-- print r' }'
-- print r' %s *pObj = *ppObj;' % (iface.name,)
-- print r' if (!pObj) {'
-- print r' return;'
-- print r' }'
-- print r' assert(hasChildInterface(IID_%s, pObj));' % iface.name
-- print r' std::map<void *, void *>::const_iterator it = g_WrappedObjects.find(pObj);'
-- print r' if (it != g_WrappedObjects.end()) {'
-- print r' Wrap%s *pWrapper = (Wrap%s *)it->second;' % (iface.name, iface.name)
-- print r' assert(pWrapper);'
-- print r' assert(pWrapper->m_dwMagic == 0xd8365d6c);'
-- print r' assert(pWrapper->m_pInstance == pObj);'
-- print r' if (pWrapper->m_pVtbl == getVtbl(pObj) &&'
-- print r' pWrapper->m_NumMethods >= %s) {' % len(baseMethods)
-+ print(r'void')
-+ print(r'%s::_wrap(const char *entryName, %s **ppObj) {' % (wrapperInterfaceName, iface.name))
-+ print(r' if (!ppObj) {')
-+ print(r' return;')
-+ print(r' }')
-+ print(r' %s *pObj = *ppObj;' % (iface.name,))
-+ print(r' if (!pObj) {')
-+ print(r' return;')
-+ print(r' }')
-+ print(r' assert(hasChildInterface(IID_%s, pObj));' % iface.name)
-+ print(r' std::map<void *, void *>::const_iterator it = g_WrappedObjects.find(pObj);')
-+ print(r' if (it != g_WrappedObjects.end()) {')
-+ print(r' Wrap%s *pWrapper = (Wrap%s *)it->second;' % (iface.name, iface.name))
-+ print(r' assert(pWrapper);')
-+ print(r' assert(pWrapper->m_dwMagic == 0xd8365d6c);')
-+ print(r' assert(pWrapper->m_pInstance == pObj);')
-+ print(r' if (pWrapper->m_pVtbl == getVtbl(pObj) &&')
-+ print(r' pWrapper->m_NumMethods >= %s) {' % len(baseMethods))
- if debug:
-- print r' os::log("%s: fetched pvObj=%p pWrapper=%p pVtbl=%p\n", entryName, pObj, pWrapper, pWrapper->m_pVtbl);'
-- print r' *ppObj = pWrapper;'
-- print r' return;'
-- print r' }'
-- print r' }'
-+ print(r' os::log("%s: fetched pvObj=%p pWrapper=%p pVtbl=%p\n", entryName, pObj, pWrapper, pWrapper->m_pVtbl);')
-+ print(r' *ppObj = pWrapper;')
-+ print(r' return;')
-+ print(r' }')
-+ print(r' }')
- for childIface in getInterfaceHierarchy(ifaces, iface):
-- print r' if (hasChildInterface(IID_%s, pObj)) {' % (childIface.name,)
-- print r' *ppObj = Wrap%s::_create(entryName, static_cast<%s *>(pObj));' % (childIface.name, childIface.name)
-- print r' return;'
-- print r' }'
-- print r' *ppObj = Wrap%s::_create(entryName, pObj);' % iface.name
-- print r'}'
-- print
-+ print(r' if (hasChildInterface(IID_%s, pObj)) {' % (childIface.name,))
-+ print(r' *ppObj = Wrap%s::_create(entryName, static_cast<%s *>(pObj));' % (childIface.name, childIface.name))
-+ print(r' return;')
-+ print(r' }')
-+ print(r' *ppObj = Wrap%s::_create(entryName, pObj);' % iface.name)
-+ print(r'}')
-+ print()
-
- # Unwrap pointer
-- print r'void'
-- print r'%s::_unwrap(const char *entryName, %s **ppObj) {' % (wrapperInterfaceName, iface.name)
-- print r' if (!ppObj || !*ppObj) {'
-- print r' return;'
-- print r' }'
-- print r' const %s *pWrapper = static_cast<const %s*>(*ppObj);' % (wrapperInterfaceName, getWrapperInterfaceName(iface))
-- print r' if (pWrapper && pWrapper->m_dwMagic == 0xd8365d6c) {'
-- print r' *ppObj = pWrapper->m_pInstance;'
-- print r' } else {'
-- print r' os::log("apitrace: warning: %%s: unexpected %%s pointer %%p\n", entryName, "%s", *ppObj);' % iface.name
-- print r' trace::localWriter.flush();'
-- print r' }'
-- print r'}'
-- print
-+ print(r'void')
-+ print(r'%s::_unwrap(const char *entryName, %s **ppObj) {' % (wrapperInterfaceName, iface.name))
-+ print(r' if (!ppObj || !*ppObj) {')
-+ print(r' return;')
-+ print(r' }')
-+ print(r' const %s *pWrapper = static_cast<const %s*>(*ppObj);' % (wrapperInterfaceName, getWrapperInterfaceName(iface)))
-+ print(r' if (pWrapper && pWrapper->m_dwMagic == 0xd8365d6c) {')
-+ print(r' *ppObj = pWrapper->m_pInstance;')
-+ print(r' } else {')
-+ print(r' os::log("apitrace: warning: %%s: unexpected %%s pointer %%p\n", entryName, "%s", *ppObj);' % iface.name)
-+ print(r' trace::localWriter.flush();')
-+ print(r' }')
-+ print(r'}')
-+ print()
-
- def implementWrapperInterfaceMethod(self, interface, base, method):
- wrapperInterfaceName = getWrapperInterfaceName(interface)
-
-- print method.prototype(wrapperInterfaceName + '::' + method.name) + ' {'
-+ print(method.prototype(wrapperInterfaceName + '::' + method.name) + ' {')
-
- if False:
-- print r' os::log("%%s(%%p -> %%p)\n", "%s", this, m_pInstance);' % (wrapperInterfaceName + '::' + method.name)
-+ print(r' os::log("%%s(%%p -> %%p)\n", "%s", this, m_pInstance);' % (wrapperInterfaceName + '::' + method.name))
-
- if method.type is not stdapi.Void:
-- print ' %s _result;' % method.type
-+ print(' %s _result;' % method.type)
-
-- print ' %s *_this = static_cast<%s *>(m_pInstance);' % (base, base)
-+ print(' %s *_this = static_cast<%s *>(m_pInstance);' % (base, base))
- for arg in method.args:
- if not arg.output:
- self.unwrapArg(method, arg)
-@@ -855,36 +860,36 @@ class Tracer:
- # XXX: wrapping should go here, but before we can do that we'll need to protect g_WrappedObjects with its own mutex
-
- if method.type is not stdapi.Void:
-- print ' return _result;'
-+ print(' return _result;')
-
-- print '}'
-- print
-+ print('}')
-+ print()
-
- def implementWrapperInterfaceMethodBody(self, interface, base, method):
- assert not method.internal
-
-- print ' static const char * _args[%u] = {%s};' % (len(method.args) + 1, ', '.join(['"this"'] + ['"%s"' % arg.name for arg in method.args]))
-- print ' static const trace::FunctionSig _sig = {%u, "%s", %u, _args};' % (self.getFunctionSigId(), interface.name + '::' + method.name, len(method.args) + 1)
-+ print(' static const char * _args[%u] = {%s};' % (len(method.args) + 1, ', '.join(['"this"'] + ['"%s"' % arg.name for arg in method.args])))
-+ print(' static const trace::FunctionSig _sig = {%u, "%s", %u, _args};' % (self.getFunctionSigId(), interface.name + '::' + method.name, len(method.args) + 1))
-
-- print ' unsigned _call = trace::localWriter.beginEnter(&_sig);'
-- print ' trace::localWriter.beginArg(0);'
-- print ' trace::localWriter.writePointer((uintptr_t)m_pInstance);'
-- print ' trace::localWriter.endArg();'
-+ print(' unsigned _call = trace::localWriter.beginEnter(&_sig);')
-+ print(' trace::localWriter.beginArg(0);')
-+ print(' trace::localWriter.writePointer((uintptr_t)m_pInstance);')
-+ print(' trace::localWriter.endArg();')
- for arg in method.args:
- if not arg.output:
- self.serializeArg(method, arg)
-- print ' trace::localWriter.endEnter();'
-+ print(' trace::localWriter.endEnter();')
-
- self.invokeMethod(interface, base, method)
-
-- print ' trace::localWriter.beginLeave(_call);'
-+ print(' trace::localWriter.beginLeave(_call);')
-
-- print ' if (%s) {' % self.wasFunctionSuccessful(method)
-+ print(' if (%s) {' % self.wasFunctionSuccessful(method))
- for arg in method.args:
- if arg.output:
- self.serializeArg(method, arg)
- self.wrapArg(method, arg)
-- print ' }'
-+ print(' }')
-
- if method.type is not stdapi.Void:
- self.serializeRet(method, '_result')
-@@ -893,51 +898,51 @@ class Tracer:
-
- if method.name == 'Release':
- assert method.type is not stdapi.Void
-- print r' if (!_result) {'
-- print r' delete this;'
-- print r' }'
-+ print(r' if (!_result) {')
-+ print(r' delete this;')
-+ print(r' }')
-
-- print ' trace::localWriter.endLeave();'
-+ print(' trace::localWriter.endLeave();')
-
- def implementIidWrapper(self, api):
- ifaces = api.getAllInterfaces()
-
-- print r'static void'
-- print r'warnIID(const char *entryName, REFIID riid, void *pvObj, const char *reason) {'
-- print r' os::log("apitrace: warning: %s: %s IID %s\n",'
-- print r' entryName, reason,'
-- print r' getGuidName(riid));'
-- print r' void * pVtbl = *(void **)pvObj;'
-- print r' HMODULE hModule = 0;'
-- print r' BOOL bRet = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |'
-- print r' GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,'
-- print r' (LPCTSTR)pVtbl,'
-- print r' &hModule);'
-- print r' assert(bRet);'
-- print r' if (bRet) {'
-- print r' char szModule[MAX_PATH];'
-- print r' DWORD dwRet = GetModuleFileNameA(hModule, szModule, sizeof szModule);'
-- print r' assert(dwRet);'
-- print r' if (dwRet) {'
-- print r' DWORD dwOffset = (UINT_PTR)pVtbl - (UINT_PTR)hModule;'
-- print r' os::log("apitrace: warning: pVtbl = %p (%s!+0x%0lx)\n", pVtbl, szModule, dwOffset);'
-- print r' }'
-- print r' }'
-- print r'}'
-- print
-- print r'static void'
-- print r'wrapIID(const char *entryName, REFIID riid, void * * ppvObj) {'
-- print r' if (!ppvObj || !*ppvObj) {'
-- print r' return;'
-- print r' }'
-+ print(r'static void')
-+ print(r'warnIID(const char *entryName, REFIID riid, void *pvObj, const char *reason) {')
-+ print(r' os::log("apitrace: warning: %s: %s IID %s\n",')
-+ print(r' entryName, reason,')
-+ print(r' getGuidName(riid));')
-+ print(r' void * pVtbl = *(void **)pvObj;')
-+ print(r' HMODULE hModule = 0;')
-+ print(r' BOOL bRet = GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |')
-+ print(r' GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,')
-+ print(r' (LPCTSTR)pVtbl,')
-+ print(r' &hModule);')
-+ print(r' assert(bRet);')
-+ print(r' if (bRet) {')
-+ print(r' char szModule[MAX_PATH];')
-+ print(r' DWORD dwRet = GetModuleFileNameA(hModule, szModule, sizeof szModule);')
-+ print(r' assert(dwRet);')
-+ print(r' if (dwRet) {')
-+ print(r' DWORD dwOffset = (UINT_PTR)pVtbl - (UINT_PTR)hModule;')
-+ print(r' os::log("apitrace: warning: pVtbl = %p (%s!+0x%0lx)\n", pVtbl, szModule, dwOffset);')
-+ print(r' }')
-+ print(r' }')
-+ print(r'}')
-+ print()
-+ print(r'static void')
-+ print(r'wrapIID(const char *entryName, REFIID riid, void * * ppvObj) {')
-+ print(r' if (!ppvObj || !*ppvObj) {')
-+ print(r' return;')
-+ print(r' }')
- for iface in ifaces:
-- print r' if (riid == IID_%s) {' % (iface.name,)
-- print r' Wrap%s::_wrap(entryName, (%s **) ppvObj);' % (iface.name, iface.name)
-- print r' return;'
-- print r' }'
-- print r' warnIID(entryName, riid, *ppvObj, "unsupported");'
-- print r'}'
-- print
-+ print(r' if (riid == IID_%s) {' % (iface.name,))
-+ print(r' Wrap%s::_wrap(entryName, (%s **) ppvObj);' % (iface.name, iface.name))
-+ print(r' return;')
-+ print(r' }')
-+ print(r' warnIID(entryName, riid, *ppvObj, "unsupported");')
-+ print(r'}')
-+ print()
-
- def wrapIid(self, function, riid, out):
- # Cast output arg to `void **` if necessary
-@@ -947,42 +952,42 @@ class Tracer:
- assert isinstance(obj_type, stdapi.Interface)
- out_name = 'reinterpret_cast<void * *>(%s)' % out_name
-
-- print r' if (%s && *%s) {' % (out.name, out.name)
-+ print(r' if (%s && *%s) {' % (out.name, out.name))
- functionName = function.name
- else_ = ''
- if self.interface is not None:
- functionName = self.interface.name + '::' + functionName
-- print r' if (*%s == m_pInstance &&' % (out_name,)
-- print r' (%s)) {' % ' || '.join('%s == IID_%s' % (riid.name, iface.name) for iface in self.interface.iterBases())
-- print r' *%s = this;' % (out_name,)
-- print r' }'
-+ print(r' if (*%s == m_pInstance &&' % (out_name,))
-+ print(r' (%s)) {' % ' || '.join('%s == IID_%s' % (riid.name, iface.name) for iface in self.interface.iterBases()))
-+ print(r' *%s = this;' % (out_name,))
-+ print(r' }')
- else_ = 'else '
-- print r' %s{' % else_
-- print r' wrapIID("%s", %s, %s);' % (functionName, riid.name, out_name)
-- print r' }'
-- print r' }'
-+ print(r' %s{' % else_)
-+ print(r' wrapIID("%s", %s, %s);' % (functionName, riid.name, out_name))
-+ print(r' }')
-+ print(r' }')
-
- def invokeMethod(self, interface, base, method):
- if method.type is stdapi.Void:
- result = ''
- else:
- result = '_result = '
-- print ' %s_this->%s(%s);' % (result, method.name, ', '.join([str(arg.name) for arg in method.args]))
-+ print(' %s_this->%s(%s);' % (result, method.name, ', '.join([str(arg.name) for arg in method.args])))
-
- def emit_memcpy(self, ptr, size):
-- print ' trace::fakeMemcpy(%s, %s);' % (ptr, size)
-+ print(' trace::fakeMemcpy(%s, %s);' % (ptr, size))
-
- def emit_memcpy_opt(self, ptr, size):
-- print ' trace::fakeMemcpyOpt(%s, %s);' % (ptr, size)
-+ print(' trace::fakeMemcpyOpt(%s, %s);' % (ptr, size))
-
- def fake_call(self, function, args):
-- print ' unsigned _fake_call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,)
-+ print(' unsigned _fake_call = trace::localWriter.beginEnter(&_%s_sig, true);' % (function.name,))
- for arg, instance in zip(function.args, args):
- assert not arg.output
-- print ' trace::localWriter.beginArg(%u);' % (arg.index,)
-+ print(' trace::localWriter.beginArg(%u);' % (arg.index,))
- self.serializeValue(arg.type, instance)
-- print ' trace::localWriter.endArg();'
-- print ' trace::localWriter.endEnter();'
-- print ' trace::localWriter.beginLeave(_fake_call);'
-- print ' trace::localWriter.endLeave();'
-+ print(' trace::localWriter.endArg();')
-+ print(' trace::localWriter.endEnter();')
-+ print(' trace::localWriter.beginLeave(_fake_call);')
-+ print(' trace::localWriter.endLeave();')
-
-diff --git a/wrappers/wgltrace.py b/wrappers/wgltrace.py
-index bc79d774..be86c36e 100644
---- a/wrappers/wgltrace.py
-+++ b/wrappers/wgltrace.py
-@@ -66,63 +66,65 @@ class WglTracer(GlTracer):
- # wglCreateContext/wglCreateLayerContext to obtain a HGLRC that's
- # recognizable by OPENGL32.DLL. Therefore we need to detect and
- # dispatch internal calls, without further ado.
-- print r' if (_reentrant) {'
-+ print(r' if (_reentrant) {')
- self.invokeFunction(function)
- if function.type is not Void:
-- print ' return _result;'
-- print r' }'
-- print r' ReentryScope _reentry;'
-- print r' (void)_reentry;'
-- print
-+ print(' return _result;')
-+ print(r' }')
-+ print(r' ReentryScope _reentry;')
-+ print(r' (void)_reentry;')
-+ print()
-
- if function.name in self.destroyContextFunctionNames:
- # Unlike other GL APIs like EGL or GLX, WGL will make the context
- # inactive if it's currently the active context.
-- print ' if (_wglGetCurrentContext() == hglrc) {'
-- print ' gltrace::clearContext();'
-- print ' }'
-- print ' gltrace::releaseContext((uintptr_t)hglrc);'
-+ print(' if (_wglGetCurrentContext() == hglrc) {')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-+ print(' gltrace::releaseContext((uintptr_t)hglrc);')
-
- GlTracer.traceFunctionImplBody(self, function)
-
- if function.name in self.createContextFunctionNames:
-- print ' if (_result)'
-- print ' gltrace::createContext((uintptr_t)_result);'
-+ print(' if (_result)')
-+ print(' gltrace::createContext((uintptr_t)_result);')
-
- if function.name in self.makeCurrentFunctionNames:
-- print ' if (_result) {'
-- print ' if (hglrc != NULL)'
-- print ' gltrace::setContext((uintptr_t)hglrc);'
-- print ' else'
-- print ' gltrace::clearContext();'
-- print ' }'
-+ print(' if (_result) {')
-+ print(' if (hglrc != NULL)')
-+ print(' gltrace::setContext((uintptr_t)hglrc);')
-+ print(' else')
-+ print(' gltrace::clearContext();')
-+ print(' }')
-
-
- if __name__ == '__main__':
-- print
-- print '#define _GDI32_'
-- print
-- print '#include <string.h>'
-- print '#include <windows.h>'
-- print
-- print '#include "trace_writer_local.hpp"'
-- print '#include "os.hpp"'
-- print
-- print '// To validate our prototypes'
-- print '#define GL_GLEXT_PROTOTYPES'
-- print '#define WGL_GLXEXT_PROTOTYPES'
-- print
-- print '#include "glproc.hpp"'
-- print '#include "glsize.hpp"'
-- print
-- print 'static OS_THREAD_SPECIFIC(uintptr_t) _reentrant;'
-- print
-- print '// Helper class to track reentries in function scope.'
-- print 'struct ReentryScope {'
-- print 'inline ReentryScope() { _reentrant = 1; }'
-- print 'inline ~ReentryScope() { _reentrant = 0; }'
-- print '};'
-- print
-+ print()
-+ print('#define _GDI32_')
-+ print()
-+ print('#include <string.h>')
-+ print('#include <windows.h>')
-+ print()
-+ print('#include <sstream>')
-+ print()
-+ print('#include "trace_writer_local.hpp"')
-+ print('#include "os.hpp"')
-+ print()
-+ print('// To validate our prototypes')
-+ print('#define GL_GLEXT_PROTOTYPES')
-+ print('#define WGL_GLXEXT_PROTOTYPES')
-+ print()
-+ print('#include "glproc.hpp"')
-+ print('#include "glsize.hpp"')
-+ print()
-+ print('static OS_THREAD_LOCAL uintptr_t _reentrant;')
-+ print()
-+ print('// Helper class to track reentries in function scope.')
-+ print('struct ReentryScope {')
-+ print('inline ReentryScope() { _reentrant = 1; }')
-+ print('inline ~ReentryScope() { _reentrant = 0; }')
-+ print('};')
-+ print()
- module = Module()
- module.mergeModule(glapi)
- module.mergeModule(wglapi)
---
-2.17.1
-
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch
deleted file mode 100644
index 25141602..00000000
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0002-specs-Tie-Python-2-3-conversion-loose-ends.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From a8791e3dca61500a382be84dc96973639b8bd182 Mon Sep 17 00:00:00 2001
-From: Jose Fonseca <jfonseca@vmware.com>
-Date: Sun, 28 Apr 2019 14:13:01 +0100
-Subject: [PATCH 2/4] specs: Tie Python 2 ->3 conversion loose ends.
-
-Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/5b3c68cafaddc82c0f34bea8127582eee07ac3be]
-
-(cherry picked from commit 5b3c68cafaddc82c0f34bea8127582eee07ac3be)
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- specs/scripts/Makefile | 16 ++++++++--------
- specs/scripts/c2api.py | 6 +++---
- specs/scripts/cxx2api.py | 2 +-
- specs/scripts/spec2api.py | 2 +-
- specs/scripts/txt2api.py | 8 +++++---
- specs/scripts/xml2api.py | 2 +-
- specs/scripts/xml2enum.py | 2 +-
- specs/scripts/xml2glparams.py | 2 +-
- 8 files changed, 21 insertions(+), 19 deletions(-)
-
-diff --git a/specs/scripts/Makefile b/specs/scripts/Makefile
-index 714a3deb..f03f36eb 100644
---- a/specs/scripts/Makefile
-+++ b/specs/scripts/Makefile
-@@ -37,28 +37,28 @@ download: \
- wget -N https://www.opengl.org/registry/oldspecs/$@
-
- glapi.py: xml2api.py gl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- glxapi.py: xml2api.py glx.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- wglapi.py: xml2api.py wgl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- eglapi.py: xml2api.py egl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- glparams.py: xml2glparams.py gl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- glxenum.py: xml2enum.py glx.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- wglenum.py: xml2enum.py wgl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- eglenum.py: xml2enum.py egl.xml
-- python $^ > $@
-+ python3 $^ > $@
-
- clean:
- rm -f \
-diff --git a/specs/scripts/c2api.py b/specs/scripts/c2api.py
-index b8aaa81d..208169d2 100755
---- a/specs/scripts/c2api.py
-+++ b/specs/scripts/c2api.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 Jose Fonseca
-@@ -404,8 +404,8 @@ class DeclParser:
- type = 'S' + type
- elif short:
- type = 'Short'
-- elif int:
-- type = 'Long' * int
-+ elif long:
-+ type = 'Long' * long
- else:
- type = 'Int'
- if unsigned:
-diff --git a/specs/scripts/cxx2api.py b/specs/scripts/cxx2api.py
-index 9720615d..8056de47 100755
---- a/specs/scripts/cxx2api.py
-+++ b/specs/scripts/cxx2api.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
-
-
-
-diff --git a/specs/scripts/spec2api.py b/specs/scripts/spec2api.py
-index 7fb395a4..33a8d058 100755
---- a/specs/scripts/spec2api.py
-+++ b/specs/scripts/spec2api.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2010 VMware, Inc.
-diff --git a/specs/scripts/txt2api.py b/specs/scripts/txt2api.py
-index e9469d3c..a32ca658 100755
---- a/specs/scripts/txt2api.py
-+++ b/specs/scripts/txt2api.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2010 VMware, Inc.
-@@ -28,6 +28,7 @@
- """Parser for OpenGL .txt extensions specification."""
-
-
-+import io
- import sys
- import re
- import optparse
-@@ -233,12 +234,13 @@ def main():
-
- for arg in args:
- if arg.startswith('http://') or arg.startswith('https://'):
-- stream = urlopen(arg, 'rt')
-+ stream = urlopen(arg)
-+ stream = io.TextIOWrapper(stream, encoding='ascii')
- else:
- stream = open(arg, 'rt')
- parser = TxtParser(stream, prefix = options.prefix)
- parser.parse()
--
-+
-
- if __name__ == '__main__':
- main()
-diff --git a/specs/scripts/xml2api.py b/specs/scripts/xml2api.py
-index f09fe0bf..6b4ec3b7 100755
---- a/specs/scripts/xml2api.py
-+++ b/specs/scripts/xml2api.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2014 VMware, Inc
-diff --git a/specs/scripts/xml2enum.py b/specs/scripts/xml2enum.py
-index cb2c4ae9..f799b7b5 100755
---- a/specs/scripts/xml2enum.py
-+++ b/specs/scripts/xml2enum.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2014 VMware, Inc
-diff --git a/specs/scripts/xml2glparams.py b/specs/scripts/xml2glparams.py
-index 805aac86..a651d896 100755
---- a/specs/scripts/xml2glparams.py
-+++ b/specs/scripts/xml2glparams.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2014 VMware, Inc
---
-2.17.1
-
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch
deleted file mode 100644
index e30273d5..00000000
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0003-scripts-Tie-Python-2-3-conversion-loose-ends.patch
+++ /dev/null
@@ -1,276 +0,0 @@
-From 8ba82a1ef77e60bd614cca1e583e1a0c25b4f281 Mon Sep 17 00:00:00 2001
-From: Jose Fonseca <jfonseca@vmware.com>
-Date: Sun, 28 Apr 2019 14:14:44 +0100
-Subject: [PATCH 3/4] scripts: Tie Python 2 -> 3 conversion loose ends.
-
-Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/247e1fa87f4e87b8914662e44a8ecef4d444cc90]
-
-(cherry picked from commit 247e1fa87f4e87b8914662e44a8ecef4d444cc90)
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- retrace/glstate_params.py | 2 +-
- scripts/convert.py | 2 +-
- scripts/highlight.py | 3 ++-
- scripts/jsondiff.py | 2 +-
- scripts/jsonextractimages.py | 2 +-
- scripts/leaks.py | 4 ++--
- scripts/profileshader.py | 2 +-
- scripts/retracediff.py | 2 +-
- scripts/snapdiff.py | 2 +-
- scripts/tracecheck.py | 2 +-
- scripts/tracediff.py | 10 +++++-----
- scripts/unpickle.py | 19 ++++++++++---------
- 12 files changed, 27 insertions(+), 25 deletions(-)
-
-diff --git a/retrace/glstate_params.py b/retrace/glstate_params.py
-index bc90f66b..55f2dbc9 100755
---- a/retrace/glstate_params.py
-+++ b/retrace/glstate_params.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 Jose Fonseca
-diff --git a/scripts/convert.py b/scripts/convert.py
-index 83df70ce..1f285a8c 100755
---- a/scripts/convert.py
-+++ b/scripts/convert.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2012 VMware Inc.
-diff --git a/scripts/highlight.py b/scripts/highlight.py
-index ed3b54d4..e494abf4 100644
---- a/scripts/highlight.py
-+++ b/scripts/highlight.py
-@@ -221,7 +221,8 @@ def LessHighlighter():
- try:
- less = subprocess.Popen(
- args = ['less', '-FRXn'],
-- stdin = subprocess.PIPE
-+ stdin = subprocess.PIPE,
-+ universal_newlines = True
- )
- except OSError:
- return ColorHighlighter()
-diff --git a/scripts/jsondiff.py b/scripts/jsondiff.py
-index 25c4840e..d7a18e21 100755
---- a/scripts/jsondiff.py
-+++ b/scripts/jsondiff.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2015 VMware, Inc.
-diff --git a/scripts/jsonextractimages.py b/scripts/jsonextractimages.py
-index 917ee7e4..785e32db 100755
---- a/scripts/jsonextractimages.py
-+++ b/scripts/jsonextractimages.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2012 Jose Fonseca
-diff --git a/scripts/leaks.py b/scripts/leaks.py
-index 325af1e2..706e60a9 100755
---- a/scripts/leaks.py
-+++ b/scripts/leaks.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2014-2016 VMware, Inc.
-@@ -39,7 +39,7 @@ class LeakDetector(unpickle.Unpickler):
- def __init__(self, apitrace, trace):
-
- cmd = [apitrace, 'pickle', '--symbolic', trace]
-- p = subprocess.Popen(args = cmd, stdout = subprocess.PIPE)
-+ p = subprocess.Popen(args = cmd, stdout=subprocess.PIPE)
-
- unpickle.Unpickler.__init__(self, p.stdout)
-
-diff --git a/scripts/profileshader.py b/scripts/profileshader.py
-index 5c2a58fb..c6c1c935 100755
---- a/scripts/profileshader.py
-+++ b/scripts/profileshader.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2012-2013 VMware, Inc.
-diff --git a/scripts/retracediff.py b/scripts/retracediff.py
-index 8105f536..967f3a93 100755
---- a/scripts/retracediff.py
-+++ b/scripts/retracediff.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 Jose Fonseca
-diff --git a/scripts/snapdiff.py b/scripts/snapdiff.py
-index b0d5f757..58fefe88 100755
---- a/scripts/snapdiff.py
-+++ b/scripts/snapdiff.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 Jose Fonseca
-diff --git a/scripts/tracecheck.py b/scripts/tracecheck.py
-index 3a2ec452..38167e89 100755
---- a/scripts/tracecheck.py
-+++ b/scripts/tracecheck.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 VMware, Inc.
-diff --git a/scripts/tracediff.py b/scripts/tracediff.py
-index 0cd9c8c6..88e389a3 100755
---- a/scripts/tracediff.py
-+++ b/scripts/tracediff.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2011 Jose Fonseca
-@@ -173,7 +173,7 @@ class ExternalDiffer(Differ):
- try:
- less = subprocess.Popen(
- args = ['less', '-FRXn'],
-- stdin = subprocess.PIPE
-+ stdin = subprocess.PIPE,
- )
- except OSError:
- pass
-@@ -214,7 +214,7 @@ ignoredFunctionNames = set([
-
-
- class Blob:
-- '''Data-less proxy for bytearrays, to save memory.'''
-+ '''Data-less proxy for bytes, to save memory.'''
-
- def __init__(self, size, hash):
- self.size = size
-@@ -233,7 +233,7 @@ class Blob:
- class BlobReplacer(Rebuilder):
- '''Replace blobs with proxys.'''
-
-- def visitByteArray(self, obj):
-+ def visitBytes(self, obj):
- return Blob(len(obj), hash(str(obj)))
-
- def visitCall(self, call):
-@@ -287,7 +287,7 @@ class PythonDiffer(Differ):
- '--calls=' + calls,
- trace
- ],
-- stdout = subprocess.PIPE,
-+ stdout=subprocess.PIPE,
- )
-
- parser = Loader(p.stdout)
-diff --git a/scripts/unpickle.py b/scripts/unpickle.py
-index 86891d29..822b8ea8 100755
---- a/scripts/unpickle.py
-+++ b/scripts/unpickle.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- ##########################################################################
- #
- # Copyright 2012 Jose Fonseca
-@@ -34,6 +34,7 @@ Run as:
-
-
- import itertools
-+import operator
- import optparse
- import sys
- import time
-@@ -55,7 +56,7 @@ CALL_FLAG_MARKER_PUSH = (1 << 9)
- CALL_FLAG_MARKER_POP = (1 << 10)
-
-
--class Pointer(long):
-+class Pointer(int):
-
- def __str__(self):
- if self == 0:
-@@ -79,7 +80,7 @@ class Visitor:
- self.dispatch[tuple] = self.visitTuple
- self.dispatch[list] = self.visitList
- self.dispatch[dict] = self.visitDict
-- self.dispatch[bytearray] = self.visitByteArray
-+ self.dispatch[bytes] = self.visitBytes
- self.dispatch[Pointer] = self.visitPointer
-
- def visit(self, obj):
-@@ -119,7 +120,7 @@ class Visitor:
- def visitDict(self, obj):
- return self.visitIterable(obj)
-
-- def visitByteArray(self, obj):
-+ def visitBytes(self, obj):
- raise NotImplementedError
-
- def visitPointer(self, obj):
-@@ -153,7 +154,7 @@ class Dumper(Visitor):
- def visitDict(self, obj):
- return '{' + self.visitItems(iter(obj.items())) + '}'
-
-- def visitByteArray(self, obj):
-+ def visitBytes(self, obj):
- return 'blob(%u)' % len(obj)
-
-
-@@ -169,7 +170,7 @@ class Hasher(Visitor):
- def visitIterable(self, obj):
- return tuple(map(self.visit, obj))
-
-- def visitByteArray(self, obj):
-+ def visitBytes(self, obj):
- return str(obj)
-
-
-@@ -193,7 +194,7 @@ class Rebuilder(Visitor):
- else:
- return obj
-
-- def visitByteArray(self, obj):
-+ def visitBytes(self, obj):
- return obj
-
-
-@@ -269,7 +270,7 @@ class Counter(Unpickler):
- Unpickler.parse(self)
-
- functionFrequencies = list(self.functionFrequencies.items())
-- functionFrequencies.sort(lambda (name1, freq1), (name2, freq2): cmp(freq1, freq2))
-+ functionFrequencies.sort(key=operator.itemgetter(1))
- for name, frequency in functionFrequencies:
- sys.stdout.write('%8u %s\n' % (frequency, name))
-
-@@ -311,7 +312,7 @@ def main():
- msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
-
- startTime = time.time()
-- parser = Counter(sys.stdin, options.verbose)
-+ parser = Counter(sys.stdin.buffer, options.verbose)
- parser.parse()
- stopTime = time.time()
- duration = stopTime - startTime
---
-2.17.1
-
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch
deleted file mode 100644
index 8974e5db..00000000
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0004-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From aa8e341e73c288b77a5187e3676a2bbb6588b705 Mon Sep 17 00:00:00 2001
-From: Jose Fonseca <jfonseca@vmware.com>
-Date: Mon, 29 Apr 2019 06:41:49 +0100
-Subject: [PATCH 4/4] scripts: Tie a few more Python 2 to 3 conversion loose
- ends.
-
-Upstream-Status: Backport [https://github.com/apitrace/apitrace/commit/f527924cca45591966139eae8c2fefb4a9a0f947]
-
-(cherry picked from commit f527924cca45591966139eae8c2fefb4a9a0f947)
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- scripts/jsonextractimages.py | 10 +++++-----
- scripts/profileshader.py | 2 +-
- 2 files changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/scripts/jsonextractimages.py b/scripts/jsonextractimages.py
-index 785e32db..ac20c23d 100755
---- a/scripts/jsonextractimages.py
-+++ b/scripts/jsonextractimages.py
-@@ -34,7 +34,7 @@ import base64
- import sys
-
-
--pngSignature = "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"
-+pngSignature = b"\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"
-
-
- def dumpSurfaces(state, memberName):
-@@ -46,13 +46,13 @@ def dumpSurfaces(state, memberName):
- extName = 'png'
- else:
- magic = data[:2]
-- if magic in ('P1', 'P4'):
-+ if magic in (b'P1', b'P4'):
- extName = 'pbm'
-- elif magic in ('P2', 'P5'):
-+ elif magic in (b'P2', b'P5'):
- extName = 'pgm'
-- elif magic in ('P3', 'P6'):
-+ elif magic in (b'P3', b'P6'):
- extName = 'ppm'
-- elif magic in ('Pf', 'PF'):
-+ elif magic in (b'Pf', b'PF'):
- extName = 'pfm'
- else:
- sys.stderr.write('warning: unsupport Netpbm format %s\n' % magic)
-diff --git a/scripts/profileshader.py b/scripts/profileshader.py
-index c6c1c935..7e8637eb 100755
---- a/scripts/profileshader.py
-+++ b/scripts/profileshader.py
-@@ -92,7 +92,7 @@ def process(stream, groupField):
- id = str(group[0]).rjust(maxGroupLen)
- draw = str(group[1]['draws']).rjust(12)
- dura = str(group[1]['duration']).rjust(18)
-- perCall = str(group[1]['duration'] / group[1]['draws']).rjust(12)
-+ perCall = str(group[1]['duration'] // group[1]['draws']).rjust(12)
- longest = str(group[1]['longest']).rjust(11)
- print("| %s | %s | %s | %s | %s |" % (id, draw, dura, perCall, longest))
-
---
-2.17.1
-
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch
deleted file mode 100644
index 6bff7e92..00000000
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace/0005-scripts-Tie-a-few-more-Python-2-to-3-conversion-loos.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 8b3afcaeebdd87962f2f3fef36973090621d116b Mon Sep 17 00:00:00 2001
-From: Max Krummenacher <max.krummenacher@toradex.com>
-Date: Sun, 29 Mar 2020 15:38:31 +0000
-Subject: [PATCH 5/5] scripts: Tie a few more Python 2 to 3 conversion loose
- ends.
-
-Upstream-Status: pending
-Note: code exists in NXP's fork only.
-
-Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
----
- wrappers/glxtrace.py | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/wrappers/glxtrace.py b/wrappers/glxtrace.py
-index b05028e2..2472560d 100644
---- a/wrappers/glxtrace.py
-+++ b/wrappers/glxtrace.py
-@@ -67,9 +67,9 @@ class GlxTracer(GlTracer):
- print(' gltrace::releaseContext((uintptr_t)ctx);')
-
- if function.name == 'glXGetCurrentDisplay':
-- print ' if(_glXGetCurrentDisplay == &glXGetCurrentDisplay ){'
-- print ' _glXGetCurrentDisplay = (PFN_GLXGETCURRENTDISPLAY)_getPublicProcAddress("glXGetCurrentDisplay");'
-- print ' }'
-+ print (' if(_glXGetCurrentDisplay == &glXGetCurrentDisplay ){')
-+ print (' _glXGetCurrentDisplay = (PFN_GLXGETCURRENTDISPLAY)_getPublicProcAddress("glXGetCurrentDisplay");')
-+ print (' }')
-
- GlTracer.traceFunctionImplBody(self, function)
-
-@@ -184,7 +184,7 @@ if __name__ == '__main__':
- tracer = GlxTracer()
- tracer.traceApi(api)
-
-- print r'''
-+ print (r'''
-
-
- /*
-@@ -247,8 +247,8 @@ void * dlopen(const char *filename, int flag)
-
-
-
--'''
-- print r'''
-+''')
-+ print (r'''
- /*
- * let the GPU driver know that we are in apitrace
- */
-@@ -257,4 +257,4 @@ int APIENTRY ApiTraceEnabled(void) {
- return 1;
- }
-
--'''
-+''')
---
-2.20.1
-
diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb
index 9461a34d..7601a1cb 100644
--- a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb
+++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_9.0.0.bb
@@ -4,18 +4,19 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50"
DEPENDS = "imx-gpu-viv zlib libpng procps"
-SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_9.0"
-SRCREV = "8636fa989d8e914a7986916b058878761a981a6f"
+SRC_URI = "git://github.com/nxp-imx/apitrace-imx.git;protocol=https;branch=imx_9.0"
+SRCREV = "fed74f6f84cb4f48ddace4306c9bf90bf7a9a967"
S = "${WORKDIR}/git"
inherit cmake pkgconfig perlnative python3native
-PACKAGECONFIG ??= "egl waffle"
+PACKAGECONFIG ??= "egl"
PACKAGECONFIG_append = \
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \
bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', \
'', d), d)}"
+PACKAGECONFIG_append_mx8 = " waffle"
PACKAGECONFIG_append_imxgpu2d = " vivante"
PACKAGECONFIG[egl] = "-DENABLE_EGL=ON,-DENABLE_EGL=OFF,virtual/egl"
diff --git a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb
index 8de2c35f..ea760954 100644
--- a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.0.bb
+++ b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.4.0.p2.4.bb
@@ -5,7 +5,7 @@
DESCRIPTION = "GPU G2D library and apps for i.MX with 2D GPU and no DPU"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
DEPENDS += "libgal-imx"
PROVIDES += "virtual/libg2d"
@@ -13,10 +13,10 @@ PROVIDES += "virtual/libg2d"
FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}"
SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true"
-SRC_URI[aarch64.md5sum] = "46a25ffb33312b36b4c1b8dea38c05f4"
-SRC_URI[aarch64.sha256sum] = "3278d4e2bae91e86d148c7e142178d50d4d8eb476fc1ee4a2e265f7e66334741"
-SRC_URI[arm.md5sum] = "69532382092c1a5e754be594d1a486b7"
-SRC_URI[arm.sha256sum] = "c618c3ac6adc5f28439ceb88cb46889b78daaf36655ab82ea2ac6f50a88297f5"
+SRC_URI[aarch64.md5sum] = "88f98e03f3f85c9a768ea5e4ff7475fa"
+SRC_URI[aarch64.sha256sum] = "553bbe9ee1caa222fd14b835deb2afedf9ed936b7a13424328df75892286f666"
+SRC_URI[arm.md5sum] = "3b12892309d166554c697a87e8084b16"
+SRC_URI[arm.sha256sum] = "010bab5780476f26406e16b058514453dc235a0e7f4b995fa03c976d06e5cb96"
S = "${WORKDIR}/${FSLBIN_NAME}"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
index 5c25eec6..efafe78d 100644
--- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
@@ -6,7 +6,7 @@
DESCRIPTION = "GPU driver and apps for i.MX"
SECTION = "libs"
LICENSE = "Proprietary"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
DEPENDS += " \
${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
@@ -61,6 +61,11 @@ REQUIRED_DISTRO_FEATURES_mx8 = "wayland"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
+PACKAGECONFIG ?= ""
+
+# Enables valgrind annotations for libgal-imx
+PACKAGECONFIG[valgrind] = ""
+
# Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below
IMX_PACKAGES_GBM = ""
IMX_PACKAGES_GBM_mx8 = "libgbm-imx libgbm-imx-dev"
@@ -217,7 +222,6 @@ do_install () {
if [ "${USE_WL}" = "yes" -o "${USE_X11}" = "yes" ]; then
cp ${S}/gpu-core/usr/lib/libGL-${backend}.so ${D}${libdir}/libGL.so.1.2.0
ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2
- ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1
ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so
fi
mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1.0
@@ -242,11 +246,17 @@ do_install () {
ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so
if [ "${IS_MX8}" = "1" ]; then
- # Change libvulkon.so driver soname, so that it does not clash with the
- # vulkan-loader libvulkan.so
- patchelf --set-soname libvulkan_VSI.so.1 ${D}${libdir}/libvulkan-${backend}.so
- mv ${D}${libdir}/libvulkan-${backend}.so ${D}${libdir}/libvulkan_VSI.so
+ # Rename the vulkan implementation library which is wrapped by the vulkan-loader
+ # library of the same name
+ MAJOR=1
+ FULL=$MAJOR.1.3
+ mv ${D}${libdir}/libvulkan-${backend}.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$FULL
+ patchelf --set-soname libvulkan_VSI.so.$MAJOR ${D}${libdir}/libvulkan_VSI.so.$FULL
+ rm ${D}${libdir}/libvulkan.so.$MAJOR ${D}${libdir}/libvulkan.so
+ ln -s libvulkan_VSI.so.$FULL ${D}${libdir}/libvulkan_VSI.so.$MAJOR
+ ln -s libvulkan_VSI.so.$FULL ${D}${libdir}/libvulkan_VSI.so
fi
+
for header in ${GLES3_HEADER_REMOVALS}; do
rm -f ${D}${includedir}/GLES3/${header}
done
@@ -258,8 +268,8 @@ do_install () {
fi
for i in wl x11 fb dri; do
- find ${D}${libdir} -name "*-$i.so" -exec rm '{}' ';'
- find ${D}${libdir} -name "*.$i.so" -exec rm '{}' ';'
+ find ${D}${libdir} -name "*-$i.so*" -exec rm '{}' ';'
+ find ${D}${libdir} -name "*.$i.so*" -exec rm '{}' ';'
done
# FIXME: MX6SL does not have 3D support; hack it for now
@@ -301,7 +311,7 @@ FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/
FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}"
FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL"
RDEPENDS_libgal-imx += "kernel-module-imx-gpu-viv"
-RSUGGESTS_libgal-imx += "valgrind"
+RDEPENDS_libgal-imx += "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', 'valgrind', '', d)}"
RPROVIDES_libgal-imx += "libgal-imx"
INSANE_SKIP_libgal-imx += "build-deps"
@@ -311,11 +321,12 @@ FILES_libgbm-imx_mx8 = "${libdir}/libgbm*${SOLIBS}"
FILES_libgbm-imx-dev_mx8 = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}"
RDEPENDS_libgbm-imx_append_mx8 = " libdrm"
-FILES_libvulkan-imx = "${libdir}/libvulkan_VSI${SOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}"
+FILES_libvulkan-imx = "${libdir}/libvulkan_VSI${REALSOLIBS} ${libdir}/libSPIRV_viv${SOLIBS}"
FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/libvulkan_VSI${SOLIBSDEV}"
FILES_libopenvx-imx = " \
- ${libdir}/libOpenVX*${SOLIBS} \
+ ${libdir}/libOpenVX*${REALSOLIBS} \
+ ${libdir}/libOpenVXU${SOLIBS} \
${libdir}/libOvx*${SOLIBS} \
${libdir}/libovx*${SOLIBS} \
"
@@ -346,7 +357,7 @@ RDEPENDS_libgles2-imx-dev += "libgles3-imx-dev"
FILES_libglslc-imx = "${libdir}/libGLSLC${SOLIBS}"
FILES_libglslc-imx-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}"
-FILES_libopencl-imx = "${libdir}/libOpenCL${SOLIBS} \
+FILES_libopencl-imx = "${libdir}/libOpenCL${REALSOLIBS} \
${libdir}/libVivanteOpenCL${SOLIBS} \
${libdir}/libLLVM_viv${SOLIBS} \
${sysconfdir}/OpenCL/vendors/Vivante.icd"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb
deleted file mode 100644
index b46c6115..00000000
--- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch64.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require imx-gpu-viv-6.inc
-
-SRC_URI[md5sum] = "f4005a4a2dba6a79d8f25547612aa3b9"
-SRC_URI[sha256sum] = "148e1b1a9e382a8159d5763dd2b08caad008eb931f3d925ac901c2438440d508"
-
-COMPATIBLE_MACHINE = "(mx8)"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb
index d1b82f6e..66e4d90a 100644
--- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.0-aarch32.bb
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch32.bb
@@ -4,7 +4,7 @@
require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
-SRC_URI[md5sum] = "4544b0c874914dfbc47ec93855bd04a7"
-SRC_URI[sha256sum] = "bae4099119259a303a265eb02d9f0d63348bbf3f8637de6cb892e209171b4c97"
+SRC_URI[md5sum] = "cd5e9ba9247aa0da5d97b0f030e2ede1"
+SRC_URI[sha256sum] = "9cc4c6594083f5970bc394a698a0a8ed0c7f2a1a753dfbf25cb0be5ab8bdcbd5"
COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb
new file mode 100644
index 00000000..241752d8
--- /dev/null
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.0.p2.4-aarch64.bb
@@ -0,0 +1,6 @@
+require imx-gpu-viv-6.inc
+
+SRC_URI[md5sum] = "633029434f0ccc0e8a6b01d92cae95b2"
+SRC_URI[sha256sum] = "a295f41a6346c507fc8a677c26ecf9b2f416735e32e6d0734516ef5363027720"
+
+COMPATIBLE_MACHINE = "(mx8)"
diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
index 8d429abf..139263be 100644
--- a/recipes-graphics/mesa/mesa_%.bbappend
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -17,17 +17,26 @@ python () {
# Enable Etnaviv and Freedreno support
PACKAGECONFIG_append_use-mainline-bsp = " gallium etnaviv kmsro freedreno"
-USE_OSMESA_ONLY ?= "no"
-
-# Etnaviv support state for i.MX8 is unknown, therefore only enable OSMesa and
-# disable Gallium for now. If you still want to enable Etnaviv, just set
-# USE_OSMESA_ONLY_mx8 = "no" in your bbappend.
-USE_OSMESA_ONLY_mx8 ?= "yes"
-
-# Enable OSMesa which also requires dri (classic) swrast
-PACKAGECONFIG_append = " ${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', ' osmesa', '', d)}"
-PACKAGECONFIG_remove = " ${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', 'gallium', '', d)}"
-DRIDRIVERS_append = "${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', 'swrast', '', d)}"
+# For NXP BSP, choose between gallium and osmesa, and between enabling
+# dri and swrast or not. gallium and dri are default.
+#
+# For parts with no GPU, use gallium and dri
+PACKAGECONFIG_REMOVE_NXPBSP = ""
+PACKAGECONFIG_APPEND_NXPBSP = ""
+DRIDRIVERS_NXPBSP = ""
+#
+# For parts with GPU but no DRM, use gallium
+PACKAGECONFIG_REMOVE_NXPBSP_imxgpu = "dri"
+DRIDRIVERS_NXPBSP_imxgpu = ""
+#
+# For parts with GPU and DRM, use osmesa, dri, and swrast
+PACKAGECONFIG_REMOVE_NXPBSP_imxgpu = "gallium"
+PACKAGECONFIG_APPEND_NXPBSP_imxgpu = "osmesa"
+DRIDRIVERS_NXPBSP_imxgpu = "swrast"
+#
+PACKAGECONFIG_remove_use-nxp-bsp = "${PACKAGECONFIG_REMOVE_NXPBSP}"
+PACKAGECONFIG_append_use-nxp-bsp = " ${PACKAGECONFIG_APPEND_NXPBSP}"
+DRIDRIVERS_use-nxp-bsp = "${DRIDRIVERS_NXPBSP}"
BACKEND = \
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
diff --git a/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch b/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch
index b5225693..f613386f 100644
--- a/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch
+++ b/recipes-graphics/waffle/waffle/0001-meson-Add-missing-wayland-dependency-on-EGL.patch
@@ -1,4 +1,4 @@
-From 87fc7761cff5931a58984c7f7e78f421a0660e0e Mon Sep 17 00:00:00 2001
+From 932c21d2851fe79bf4fe55d3b613f71f65762adb Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Apr 2020 13:40:04 -0500
Subject: [PATCH] meson: Add missing wayland dependency on EGL
@@ -9,13 +9,12 @@ missing dependency.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-
---
meson.build | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
-index ca8b127..efb51f4 100644
+index 957737c..4ebb022 100644
--- a/meson.build
+++ b/meson.build
@@ -65,6 +65,7 @@ dep_gl = _dep_null
@@ -28,7 +27,7 @@ index ca8b127..efb51f4 100644
dep_udev = _dep_null
@@ -90,7 +91,8 @@ else
dep_wayland_client = dependency(
- 'wayland-client', version : '>= 1.10', required : get_option('wayland'),
+ 'wayland-client', version : '>= 1.0', required : get_option('wayland'),
)
- dep_wayland_egl = dependency(
+ dep_wayland_egl = dependency('egl', required : get_option('wayland'))
@@ -45,3 +44,6 @@ index ca8b127..efb51f4 100644
build_glx = dep_gl.found()
build_gbm = dep_gbm.found() and dep_udev.found()
build_surfaceless = dep_egl.found()
+--
+2.17.1
+
diff --git a/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch
index 9d5003e2..3f9f3b1c 100644
--- a/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch
+++ b/recipes-graphics/waffle/waffle/0002-meson-Separate-surfaceless-option-from-x11.patch
@@ -1,7 +1,7 @@
-From 12ac4372cc6a66e83b61f8510bdaa4f11c72113d Mon Sep 17 00:00:00 2001
+From 451381a61ad0c96e870da2325fc188eaa3d91fec Mon Sep 17 00:00:00 2001
From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Wed, 22 Apr 2020 14:08:36 -0500
-Subject: [PATCH] meson: Separate surfaceless option from x11
+Subject: [PATCH 2/2] meson: Separate surfaceless option from x11
Allow surfaceless build separate from the x11 option.
Also require gbm for surfaceless build.
@@ -9,13 +9,12 @@ Also require gbm for surfaceless build.
Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
-
---
meson.build | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
-index efb51f4..0ee3ee5 100644
+index 4ebb022..0705f61 100644
--- a/meson.build
+++ b/meson.build
@@ -72,6 +72,7 @@ dep_udev = _dep_null
@@ -42,3 +41,6 @@ index efb51f4..0ee3ee5 100644
endif
dep_bash = dependency('bash-completion', required : false)
+--
+2.17.1
+
diff --git a/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb b/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb
index 7f15bdb3..a799bf59 100644
--- a/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb
+++ b/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb
@@ -9,7 +9,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \
file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
-SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.18"
+SRC_URI = "git://github.com/nxp-imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.18"
SRCREV = "ee18c1f66877f7fb652467c349108395c20d4f9a"
S = "${WORKDIR}/git"
diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
index ba68761f..e5bbca66 100644
--- a/recipes-graphics/wayland/weston-init.bbappend
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -21,6 +21,9 @@ INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \
INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \
use-g2d=1 \
"
+INI_UNCOMMENT_ASSIGNMENTS_append_mx8mp = " \
+ use-g2d=1 \
+"
INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \
gbm-format=argb8888 \
\\[shell\\] \
diff --git a/recipes-graphics/wayland/weston_8.0.0.imx.bb b/recipes-graphics/wayland/weston_8.0.0.imx.bb
index 26cd417f..4909b826 100644
--- a/recipes-graphics/wayland/weston_8.0.0.imx.bb
+++ b/recipes-graphics/wayland/weston_8.0.0.imx.bb
@@ -65,7 +65,7 @@ PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
# Weston with systemd-login support
PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
# Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor"
# colord CMS support
PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord"
# Clients support
@@ -127,7 +127,7 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork"
DEFAULT_PREFERENCE = "-1"
SRCBRANCH = "weston-imx-8.0"
-SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/nxp-imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
diff --git a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb b/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
deleted file mode 100644
index 0aba8e5a..00000000
--- a/recipes-graphics/xorg-driver/xf86-video-armada_git.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "X.org graphics driver for KMS based systems with pluggable GPU backend"
-DESCRIPTION = "The xf86-video-armada module is a 2D graphics driver for the X Window \
-System as implemented by X.org, supporting these DRM KMS drivers: \
-\
- Freescale i.MX \
- Marvell Armada 510 (Dove) \
-\
-and GPU drivers: \
- Vivante libGAL (Armada only) \
- Etnaviv (Armada and i.MX) with galcore kernel driver \
- Etnaviv (Armada and i.MX) with etnaviv DRM kernel driver \
-"
-LICENSE = "BSD"
-
-require recipes-graphics/xorg-driver/xorg-driver-video.inc
-
-DEPENDS += "libdrm-armada"
-
-LIC_FILES_CHKSUM = " \
- file://README;md5=d5271074fb6ad959b7b6cfa68b4adaf0 \
- file://../etna_viv/LICENSE;md5=9d4853905d85f044ed013e75def30a76 \
- "
-
-SRCREV_armada = "78e7116a5bc6cdd9f93cbf1552d342933623ab59"
-SRCREV_etna = "8478eef32fd911ebb300c970071e22227afa1896"
-SRCREV_FORMAT = "armada_etna"
-
-PV = "0.1+git${SRCPV}"
-
-SRC_URI = " \
- git://git.arm.linux.org.uk/cgit/xf86-video-armada.git;branch=unstable-devel;protocol=http;name=armada \
- git://github.com/etnaviv/etna_viv.git;protocol=https;name=etna;destsuffix=etna_viv \
- "
-
-S = "${WORKDIR}/git"
-
-RDEPENDS_${PN} = "xserver-xorg-module-exa \
- xserver-xorg-extension-dri \
- xserver-xorg-extension-dri2 \
- xserver-xorg-extension-glx \
- "
-
-EXTRA_OECONF = "--disable-etnaviv \
- --disable-vivante \
- --with-etnaviv-source=${WORKDIR}/etna_viv \
- "
-
-COMPATIBLE_MACHINE = "(imx|use-mainline-bsp)"
diff --git a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb b/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb
index 9268b11e..b71e81a3 100644
--- a/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-imx-vivante_6.4.0.p0.0.bb
@@ -15,10 +15,10 @@ LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3"
SRCREV = "c828e8a7c38743e960967e7bb78c134cec31c102"
SRCBRANCH = "imx_exa_viv6_g2d"
-SRC_URI = "git://source.codeaurora.org/external/imx/xf86-video-imx-vivante.git;protocol=https;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/nxp-imx/xf86-video-imx-vivante.git;protocol=https;branch=${SRCBRANCH} \
file://rc.autohdmi"
-S = "${WORKDIR}/git/"
+S = "${WORKDIR}/git"
INITSCRIPT_PACKAGES = "xserver-xorg-extension-viv-autohdmi"
INITSCRIPT_NAME = "rc.autohdmi"
diff --git a/recipes-kernel/ceetm/ceetm_git.bb b/recipes-kernel/ceetm/ceetm_git.bb
index 68fb67e0..ac084855 100644
--- a/recipes-kernel/ceetm/ceetm_git.bb
+++ b/recipes-kernel/ceetm/ceetm_git.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "CEETM TC QDISC"
LICENSE = "GPLv2 & BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=bac620b9883d38a84dfb73ca7122d915"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/ceetm;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/ceetm;protocol=https;nobranch=1"
SRCREV = "6a7f2ec2091df2f4380cb8d25a36c399aed5af1b"
SRC_URI_append = " file://0001-Makefile-update-CFLAGS.patch \
"
diff --git a/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc b/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc
index bb785831..f8ce6d6e 100644
--- a/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc
+++ b/recipes-kernel/cryptodev/cryptodev-qoriq-1.10.inc
@@ -13,7 +13,7 @@ python() {
d.appendVar("RREPLACES_" + p, ' ' + p.replace('-qoriq', ''))
}
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/cryptodev-linux;protocol=https;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq/cryptodev-linux;protocol=https;nobranch=1"
SRCREV = "f3007431120a1b4ae983c2b9ea09051311aa5e2f"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-ar_git.bb b/recipes-kernel/kernel-modules/kernel-module-ar_git.bb
index feddc8fa..59a8ecc5 100644
--- a/recipes-kernel/kernel-modules/kernel-module-ar_git.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-ar_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5881ecf398da8a03a3f4c501e29d287"
inherit module
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/auto-resp;branch=nxp/sdk-v2.0.x"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/auto-resp;protocol=https;branch=nxp/sdk-v2.0.x"
SRCREV = "9a74743167dcfcfbca5056eedbff9a52337c9712"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0+fslc.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4+fslc.bb
index af435413..3e3f8aff 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0+fslc.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4+fslc.bb
@@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
PV .= "+git${SRCPV}"
-SRCREV = "bc26daca3f330f1f037e5387d9219e135455a303"
-SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https"
+SRCREV = "f2e8483fbda59bf2482f77efb0804c014848f749"
+SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https;branch=master"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4.bb
index 4c9015e9..ead4f2f0 100644
--- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.0.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p2.4.bb
@@ -1,5 +1,5 @@
# Copyright (C) 2015-2016 Freescale Semiconductor
-# Copyright 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
SUMMARY = "Kernel loadable module for Vivante GPU"
DESCRIPTION = "Builds the Vivante GPU kernel driver as a loadable kernel module, \
@@ -7,14 +7,14 @@ allowing flexibility to use a newer graphics release with an older kernel."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-SRCBRANCH = "lf-5.4.y"
+SRCBRANCH = "imx_5.4.24_2.1.0"
LOCALVERSION = "-${SRCBRANCH}"
-KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https"
+KERNEL_SRC ?= "git://github.com/nxp-imx/linux-imx.git;protocol=https"
SRC_URI = " \
${KERNEL_SRC};branch=${SRCBRANCH};subpath=drivers/mxc/gpu-viv;destsuffix=git/src \
file://Add-makefile.patch \
"
-SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466"
+SRCREV = "2f6f3e92a82e51fe39b53ee758273bef26964836"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-ipc.inc b/recipes-kernel/kernel-modules/kernel-module-ipc.inc
index 350ba186..39466ca9 100644
--- a/recipes-kernel/kernel-modules/kernel-module-ipc.inc
+++ b/recipes-kernel/kernel-modules/kernel-module-ipc.inc
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fa38cd73d71527dc6efb546474f64d10"
inherit module qoriq_build_64bit_kernel
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/ipc;protocol=https;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/ipc;protocol=https;nobranch=1"
SRCREV = "74d662707558290f070f9589177db730444bc435"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-ls-debug_git.bb b/recipes-kernel/kernel-modules/kernel-module-ls-debug_git.bb
index cad18b69..a5801188 100644
--- a/recipes-kernel/kernel-modules/kernel-module-ls-debug_git.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-ls-debug_git.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94263f12f9416f9fd0493c8f9e8085a3"
inherit module autotools-brokensep
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/ls-dbg;branch=nxp/master"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/ls-dbg;protocol=https;branch=nxp/master"
SRCREV = "40501f6659e880d38508cdd34a4df2d348d1c68e"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb b/recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb
index 4a31f1e3..1ac045b1 100644
--- a/recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-perf-qoriq_0.8.2.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "QorIQ extension to Perf for supporting non core counters"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=e29234dd5d40dc352cc60cc0c93437ba"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/qoriq-perf;branch=nxp/master"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/qoriq-perf;protocol=https;branch=nxp/master"
SRCREV = "7beb3783edac66bab00c85d99a7b073f569af7fd"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb b/recipes-kernel/kernel-modules/kernel-module-qca9377_3.1.bb
index fbc87ea2..fbc87ea2 100644
--- a/recipes-kernel/kernel-modules/kernel-module-qca9377_3.0.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-qca9377_3.1.bb
diff --git a/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc b/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc
index 0b23a47c..3fb18f06 100644
--- a/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc
+++ b/recipes-kernel/kernel-modules/kernel-module-qcacld-lea.inc
@@ -2,7 +2,7 @@ SUMMARY = "Qualcomm WiFi driver for QCA module 9377 and 6174"
LICENSE = "BSD & GPLv2"
LIC_FILES_CHKSUM = "file://CORE/HDD/src/wlan_hdd_main.c;beginline=1;endline=20;md5=ec8d62116b13db773825ebf7cf91be1d;"
-QCACLD_SRC ?= "git://source.codeaurora.org/external/imx/qcacld-2.0-imx.git;protocol=https"
+QCACLD_SRC ?= "git://github.com/nxp-imx/qcacld-2.0-imx.git;protocol=https"
SRC_URI = "${QCACLD_SRC};branch=IMX_CNSS.LEA.NRT_3.0_KRL5.4"
SRCREV = "7dc91e5977f31d60741c55682564788c0f930163"
diff --git a/recipes-kernel/kernel-modules/kernel-module-scatter-gather_git.bb b/recipes-kernel/kernel-modules/kernel-module-scatter-gather_git.bb
index 20d894ed..e6afe4fc 100644
--- a/recipes-kernel/kernel-modules/kernel-module-scatter-gather_git.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-scatter-gather_git.bb
@@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e9605a22ea50467bd2bfe4cdd66e69ae"
inherit module
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/scatter-gather;branch=nxp/master"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/scatter-gather;protocol=https;branch=nxp/master"
SRCREV = "97db173d08a70abe2b9a6fa928299a117f3febc2"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/kernel-modules/kernel-module-uio-seville_0.1.bb b/recipes-kernel/kernel-modules/kernel-module-uio-seville_0.1.bb
index f7beed21..28aad165 100644
--- a/recipes-kernel/kernel-modules/kernel-module-uio-seville_0.1.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-uio-seville_0.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "UIO driver for T1040 L2 Switch"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/l2switch-uio;branch=nxp/sdk-v2.0.x"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/l2switch-uio;protocol=https;branch=nxp/sdk-v2.0.x"
SRCREV = "0f31fbcbe9ab1ab9c424da34f70c82314b16f8de"
inherit module
diff --git a/recipes-kernel/linux/linux-fslc-imx/imx/defconfig b/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
index 622e5430..8781d8bb 100644
--- a/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
+++ b/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
@@ -1,5 +1,6 @@
CONFIG_KERNEL_LZO=y
CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
@@ -7,6 +8,12 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
+CONFIG_MEMCG=y
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
@@ -57,6 +64,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BINFMT_MISC=m
CONFIG_CMA=y
+CONFIG_SECCOMP=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -120,6 +128,7 @@ CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
+CONFIG_OF_OVERLAY=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=65536
@@ -142,7 +151,7 @@ CONFIG_NETDEVICES=y
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
# CONFIG_NET_VENDOR_FARADAY is not set
-# CONFIG_NET_VENDOR_INTEL is not set
+CONFIG_E1000E=y
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
@@ -165,6 +174,7 @@ CONFIG_USB_NET_SMSC95XX=y
CONFIG_USB_NET_MCS7830=y
CONFIG_BRCMFMAC=m
CONFIG_HOSTAP=y
+CONFIG_MXMWIFIEX=m
CONFIG_WL12XX=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
@@ -446,6 +456,8 @@ CONFIG_STAGING_MEDIA=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_MAILBOX=y
CONFIG_IMX_MBOX=y
+CONFIG_REMOTEPROC=y
+CONFIG_IMX_REMOTEPROC=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_IIO=y
CONFIG_IMX7D_ADC=y
@@ -483,6 +495,7 @@ CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
+CONFIG_OVERLAY_FS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
@@ -511,7 +524,7 @@ CONFIG_CRYPTO_CFB=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_OFB=m
-CONFIG_CRYPTO_XTS=m
+CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_RMD128=m
@@ -535,6 +548,20 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_SAHARA=y
CONFIG_CRYPTO_DEV_MXS_DCP=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
+CONFIG_CRYPTO_SM3=m
+CONFIG_CRYPTO_STREEBOG=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_SHA1=m
CONFIG_CRC_CCITT=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC7=m
@@ -550,3 +577,5 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FTRACE is not set
+CONFIG_ION=y
+CONFIG_ION_CMA_HEAP=y
diff --git a/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig b/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
index 469ee0ef..1e9ee4f8 100644
--- a/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
+++ b/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
@@ -66,6 +66,7 @@ CONFIG_EFI_CAPSULE_LOADER=y
CONFIG_IMX_DSP=y
CONFIG_IMX_SCU=y
CONFIG_IMX_SCU_PD=y
+CONFIG_IMX_SECO_MU=y
CONFIG_ACPI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
@@ -127,9 +128,17 @@ CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_LLC2=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_MULTIQ=y
+CONFIG_NET_SCH_CBS=y
+CONFIG_NET_SCH_TAPRIO=y
+CONFIG_NET_SCH_MQPRIO=y
+CONFIG_NET_CLS_BASIC=y
+CONFIG_NET_CLS_TCINDEX=y
CONFIG_TSN=y
CONFIG_NET_SWITCHDEV=y
CONFIG_BPF_JIT=y
+CONFIG_NET_PKTGEN=y
CONFIG_CAN=m
CONFIG_CAN_FLEXCAN=m
CONFIG_BT=y
@@ -272,7 +281,7 @@ CONFIG_MSCC_OCELOT_SWITCH=y
CONFIG_QCOM_EMAC=m
CONFIG_SMC91X=y
CONFIG_SMSC911X=y
-CONFIG_STMMAC_ETH=m
+CONFIG_STMMAC_ETH=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
CONFIG_AQUANTIA_PHY=y
@@ -300,9 +309,10 @@ CONFIG_USB_NET_MCS7830=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_PCIE=y
CONFIG_HOSTAP=y
+CONFIG_MXMWIFIEX=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
-CONFIG_IVSHMEM_NET=m
+CONFIG_IVSHMEM_NET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_ADC=m
CONFIG_KEYBOARD_GPIO=y
@@ -351,6 +361,7 @@ CONFIG_I2C_IMX_LPI2C=y
CONFIG_I2C_RK3X=y
CONFIG_I2C_RPBUS=y
CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_XEN_I2C_BACKEND=y
CONFIG_I2C_SLAVE=y
CONFIG_SPI=y
CONFIG_SPI_FSL_LPSPI=y
@@ -369,9 +380,11 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_PINCTRL_MAX77620=y
CONFIG_PINCTRL_IMX8MM=y
CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
CONFIG_PINCTRL_IMX8MQ=y
CONFIG_PINCTRL_IMX8QM=y
CONFIG_PINCTRL_IMX8QXP=y
+CONFIG_PINCTRL_IMX8DXL=y
CONFIG_PINCTRL_S32V234=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_SYSFS=y
@@ -411,8 +424,10 @@ CONFIG_ARM_SBSA_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_IMX_SC_WDT=y
+CONFIG_XEN_WDT=y
CONFIG_MFD_BD9571MWV=y
CONFIG_MFD_AXP20X_I2C=y
+CONFIG_MFD_IMX_AUDIOMIX=y
CONFIG_MFD_HI6421_PMIC=y
CONFIG_MFD_MAX77620=y
CONFIG_MFD_RK808=y
@@ -458,6 +473,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_OV5640=y
CONFIG_IMX_DPU_CORE=y
CONFIG_IMX_LCDIF_CORE=y
+CONFIG_IMX_LCDIFV3_CORE=y
CONFIG_DRM=y
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_MALI_DISPLAY=m
@@ -465,16 +481,24 @@ CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_RCAR_LVDS=m
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_PANEL_RAYDIUM_RM67191=y
+CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
+CONFIG_DRM_FSL_IMX_LVDS_BRIDGE=y
CONFIG_DRM_SII902X=m
CONFIG_DRM_I2C_ADV7511=y
CONFIG_DRM_NWL_MIPI_DSI=y
CONFIG_DRM_CDNS_HDMI_CEC=y
CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
+CONFIG_DRM_DW_HDMI_GP_AUDIO=y
+CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_ITE_IT6263=y
CONFIG_DRM_IMX=y
+CONFIG_DRM_IMX_LCDIF_MUX_DISPLAY=y
CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
CONFIG_DRM_IMX_TVE=y
CONFIG_DRM_IMX_LDB=y
+CONFIG_DRM_IMX8QM_LDB=y
+CONFIG_DRM_IMX8QXP_LDB=y
+CONFIG_DRM_IMX8MP_LDB=y
CONFIG_DRM_IMX_HDMI=y
CONFIG_DRM_IMX_SEC_DSIM=y
CONFIG_DRM_IMX_CDNS_MHDP=y
@@ -516,12 +540,14 @@ CONFIG_SND_SOC_IMX_AUDMIX=y
CONFIG_SND_SOC_IMX_PDM_MIC=y
CONFIG_SND_SOC_IMX_DSP=y
CONFIG_SND_SOC_IMX_CDNHDMI=y
+CONFIG_SND_SOC_IMX_XCVR=y
CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SOF_OF=m
CONFIG_SND_SOC_SOF_IMX_TOPLEVEL=y
-CONFIG_SND_SOC_SOF_IMX8_SUPPORT=y
-CONFIG_SND_SOC_SOF_IMX8=m
+CONFIG_SND_SOC_SOF_IMX8_SUPPORT=m
+CONFIG_SND_SOC_SOF_IMX8M_SUPPORT=m
CONFIG_SND_SOC_AK4613=m
+CONFIG_SND_SOC_BT_SCO=y
CONFIG_SND_SOC_DMIC=m
CONFIG_SND_SOC_ES7134=m
CONFIG_SND_SOC_ES7241=m
@@ -554,6 +580,11 @@ CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_ISP1760=y
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_CONSOLE=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_SIMPLE=y
+CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_TEST=m
CONFIG_USB_EHSET_TEST_FIXTURE=m
CONFIG_USB_HSIC_USB3503=y
@@ -619,6 +650,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_EDAC=y
CONFIG_EDAC_GHES=y
+CONFIG_EDAC_SYNOPSYS=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_RTC_DRV_MAX77686=y
@@ -646,6 +678,7 @@ CONFIG_QCOM_HIDMA=y
CONFIG_DMATEST=y
CONFIG_UIO=y
CONFIG_UIO_PCI_GENERIC=y
+CONFIG_UIO_IVSHMEM=y
CONFIG_VFIO=y
CONFIG_VFIO_PCI=y
CONFIG_VFIO_FSL_MC=y
@@ -680,6 +713,7 @@ CONFIG_COMMON_CLK_XGENE=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_CLK_IMX8MM=y
CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
CONFIG_CLK_IMX8MQ=y
CONFIG_CLK_IMX8QXP=y
CONFIG_HWSPINLOCK=y
@@ -689,11 +723,13 @@ CONFIG_PLATFORM_MHU=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_V3=y
CONFIG_REMOTEPROC=y
+CONFIG_IMX_REMOTEPROC=y
CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_SOC_BRCMSTB=y
CONFIG_FSL_MC_DPIO=y
CONFIG_FSL_QIXIS=y
CONFIG_IMX_SCU_SOC=y
+CONFIG_SECVIO_SC=y
CONFIG_SOC_TI=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_EXTCON_USBC_CROS_EC=y
@@ -707,10 +743,14 @@ CONFIG_PWM=y
CONFIG_PWM_CROS_EC=m
CONFIG_PWM_IMX27=y
CONFIG_PHY_XGENE=y
+CONFIG_PHY_MIXEL_LVDS=y
+CONFIG_PHY_MIXEL_LVDS_COMBO=y
+CONFIG_PHY_FSL_IMX8MP_LVDS=y
CONFIG_PHY_MIXEL_MIPI_DPHY=y
+CONFIG_PHY_SAMSUNG_HDMI_PHY=y
CONFIG_PHY_QCOM_USB_HS=y
CONFIG_PHY_SAMSUNG_USB2=y
-CONFIG_FSL_IMX8_DDR_PMU=m
+CONFIG_FSL_IMX8_DDR_PMU=y
CONFIG_HISI_PMU=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_IMX_OCOTP_SCU=y
@@ -762,7 +802,7 @@ CONFIG_CRYPTO_CFB=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_OFB=m
-CONFIG_CRYPTO_XTS=m
+CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=m
CONFIG_CRYPTO_RMD128=m
@@ -784,6 +824,19 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
+CONFIG_CRYPTO_SM3=m
+CONFIG_CRYPTO_STREEBOG=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
CONFIG_INDIRECT_PIO=y
CONFIG_CMA_SIZE_MBYTES=320
CONFIG_PRINTK_TIME=y
@@ -795,3 +848,6 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_FTRACE is not set
CONFIG_MEMTEST=y
+CONFIG_CORESIGHT=y
+CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
+CONFIG_CORESIGHT_SOURCE_ETM4X=y
diff --git a/recipes-kernel/linux/linux-fslc-imx_5.4.bb b/recipes-kernel/linux/linux-fslc-imx_5.4.bb
index 9c578f7b..df44c71c 100644
--- a/recipes-kernel/linux/linux-fslc-imx_5.4.bb
+++ b/recipes-kernel/linux/linux-fslc-imx_5.4.bb
@@ -13,7 +13,7 @@ Latest stable Kernel patchlevel is applied and maintained by Community."
# This recipe (and corresponding kernel repository and branch) receives updates
# from 3 different sources:
# 1. Stable [linux-5.4.y] branch updates of korg;
-# 2. NXP-specific updates via branch [lf-5.4.y] shared via CodeAurora forum;
+# 2. NXP-specific updates via branch [5.4-2.1.x-imx] shared via CodeAurora forum;
# 3. Critical patches, which are not (yet) integrated into either of 2 above
# sources, but are required to be applied to the kernel tree.
#
@@ -28,32 +28,26 @@ Latest stable Kernel patchlevel is applied and maintained by Community."
# ------------------------------------------------------------------------------
# 1. Stable (tag or SHA(s))
# ------------------------------------------------------------------------------
-# tag: v5.4.66
+# tag: v5.4.147
#
# ------------------------------------------------------------------------------
# 2. NXP-specific (tag or SHA(s))
# ------------------------------------------------------------------------------
-# tag: lf-5.4.y-1.0.0
-# 40fe6bd54230 MLK-23844-2 ARM64: dts: freescale: imx8mm: correct VDDARM@1.6GHz
-# aec0c14ae61d MLK-23844-1: ARM64: dts: freescale: imx8mn-ddr4-evk: cleanup Rhom pmic
-# e8e35fd0e759 MLK-23275-2: ARM64: dts: freescale: imx8mn-ddr4-evk: correct ldo1/ldo2 voltage
-# 975d8ab07267 MLK-23275-1: ARM64: dts: freescale: fsl-imx8mm-evk: correct ldo1/ldo2 voltage
-# 4711466d535c MLK-23562: regulator: core: adjust supply voltage in bypass
-# bbbc26a40a9c MLK-13793-6 regulator: anatop: fix min dropout for bypass mode
+# tag: rel_imx_5.4.24_2.1.0
#
# ------------------------------------------------------------------------------
# 3. Critical patches (SHA(s))
# ------------------------------------------------------------------------------
-# bffbf24c88a7 fbdev: fix fbinfo flag dropped upstream
-# fd34d250e9a5 arm64: dts: imx8m: change ocotp node name on i.MX8M SoCs
-# 4e0a3bc7b1af arm64: dts: imx8mn: Use "fsl,imx8mm-ocotp" as ocotp's fallback compatible
-# 66af62de926c arm64: dts: imx8mm: Remove incorrect fallback compatible for ocotp
-# 19be176e9eed perf cs-etm: Move definition of 'traceid_list' global variable from header file
-# d40fb1b86571 libtraceevent: Fix build with binutils 2.35
-# 0296957500a0 arm: imx: include i.MX6SX DDR freq implementation for i.MX6UL
-# 804e520787f3 arm: imx: do not include smp_wfe_imx6.S for i.MX6SX
-# 0c01f815c1b4 arm: imx: enable HAVE_IMX_BUSFREQ for i.MX6
-# 691712e2b671 arm: imx: do not build busfreq without HAVE_IMX_BUSFREQ
+# 391a7c6dfd13 irq-imx-irqsteer: fix compile error if CONFIG_PM_SLEEP is not set
+# b3d088d2f8fa fbdev: fix fbinfo flag dropped upstream
+# c874333fa0be arm64: dts: imx8mp: Add fallback compatible to ocotp node
+# 55abb34c9faf arm64: dts: imx8m: change ocotp node name on i.MX8M SoCs
+# df1f59fb613e arm64: dts: imx8mn: Use "fsl,imx8mm-ocotp" as ocotp's fallback compatible
+# 7ad2a7f3fd6f arm64: dts: imx8mm: Remove incorrect fallback compatible for ocotp
+# 129a6fad43b8 arm: imx: include i.MX6SX DDR freq implementation for i.MX6UL
+# e85ce3157725 arm: imx: do not include smp_wfe_imx6.S for i.MX6SX
+# 4f49200132e6 arm: imx: enable HAVE_IMX_BUSFREQ for i.MX6
+# 5d229c51b5a5 arm: imx: do not build busfreq without HAVE_IMX_BUSFREQ
# 285869ec9087 ARM: dts: imx6ul-kontron-n6x1x-s: Remove an obsolete comment and fix indentation
# f03791085754 ARM: dts: imx6ul-kontron-n6x1x-s: Add vbus-supply and overcurrent polarity to usb nodes
# 67e44952c670 ARM: dts: imx6ul-kontron-n6x1x: Add 'chosen' node with 'stdout-path'
@@ -78,18 +72,18 @@ include linux-fslc.inc
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-SRCBRANCH = "5.4-1.0.0-imx"
-SRCREV = "f2d5ecb51e9a80b69bd686b24965eb7441591ff9"
+SRCBRANCH = "5.4-2.1.x-imx"
+SRCREV = "074a74780f813c7e6037f3ca3e581c405276e502"
# PV is defined in the base in linux-imx.inc file and uses the LINUX_VERSION definition
# required by kernel-yocto.bbclass.
#
# LINUX_VERSION define should match to the kernel version referenced by SRC_URI and
# should be updated once patchlevel is merged.
-LINUX_VERSION = "5.4.66"
+LINUX_VERSION = "5.4.147"
# Local version indicates the branch name in the NXP kernel tree where patches are collected from.
-LOCALVERSION = "-lf-5.4.y"
+LOCALVERSION = "-imx-5.4.24-2.1.0"
DEFAULT_PREFERENCE = "1"
diff --git a/recipes-kernel/linux/linux-fslc-mfgtool_5.4.bb b/recipes-kernel/linux/linux-fslc-mfgtool_5.4.bb
new file mode 100644
index 00000000..3bed2fa8
--- /dev/null
+++ b/recipes-kernel/linux/linux-fslc-mfgtool_5.4.bb
@@ -0,0 +1,16 @@
+# Copyright (C) 2014-2018 O.S. Systems Software LTDA.
+# Copyright (C) 2014-2016 Freescale Semiconductor
+
+SUMMARY = "Produces a Manufacturing Tool compatible Linux Kernel"
+DESCRIPTION = "Linux Kernel provided and supported by the Freescale Community \
+that produces a Manufacturing Tool compatible Linux Kernel to be used in updater \
+environment"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-fslc:"
+require linux-fslc_${PV}.bb
+require linux-mfgtool.inc
+
+KERNEL_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
+MODULE_IMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
+do_package[vardepsexclude] = "DATETIME"
+
diff --git a/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb b/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb
index eb8cf0c4..a82483c3 100644
--- a/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb
+++ b/recipes-kernel/linux/linux-fslc-qoriq_5.4.bb
@@ -14,4 +14,4 @@ LINUX_VERSION = "5.4.64"
SRCBRANCH = "5.4.y+qoriq+fslc"
SRCREV = "4c04c442c0e91e7cf01f830aca524f09b5613f29"
-SRC_URI := "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH}"
+SRC_URI := "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH};protocol=https"
diff --git a/recipes-kernel/linux/linux-fslc.inc b/recipes-kernel/linux/linux-fslc.inc
index f6d04d59..7315df0d 100644
--- a/recipes-kernel/linux/linux-fslc.inc
+++ b/recipes-kernel/linux/linux-fslc.inc
@@ -5,6 +5,6 @@ require recipes-kernel/linux/linux-imx.inc
DEPENDS += "lzop-native bc-native"
-SRC_URI = "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/Freescale/linux-fslc.git;branch=${SRCBRANCH};protocol=https \
file://defconfig"
LOCALVERSION = "-fslc"
diff --git a/recipes-kernel/linux/linux-fslc/defconfig b/recipes-kernel/linux/linux-fslc/defconfig
index dbb2387c..3526cee7 100644
--- a/recipes-kernel/linux/linux-fslc/defconfig
+++ b/recipes-kernel/linux/linux-fslc/defconfig
@@ -467,3 +467,5 @@ CONFIG_PROVE_LOCKING=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_SCH_FIFO=y
+CONFIG_ION=y
+CONFIG_ION_CMA_HEAP=y
diff --git a/recipes-kernel/linux/linux-fslc_5.4.bb b/recipes-kernel/linux/linux-fslc_5.4.bb
index c8a86d2c..fc5924c8 100644
--- a/recipes-kernel/linux/linux-fslc_5.4.bb
+++ b/recipes-kernel/linux/linux-fslc_5.4.bb
@@ -19,9 +19,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
#
# LINUX_VERSION define should match to the kernel version referenced by SRC_URI and
# should be updated once patchlevel is merged.
-LINUX_VERSION = "5.4.67"
+LINUX_VERSION = "5.4.172"
SRCBRANCH = "5.4.x+fslc"
-SRCREV = "044233c86e8e4a2ed99315ef0367ec691ea253cb"
+SRCREV = "9eb5a8b554ee8bd41c6c52ae6f5c74e3c60d16f9"
COMPATIBLE_MACHINE = "(mxs|mx5|mx6|vf|use-mainline-bsp)"
diff --git a/recipes-kernel/linux/linux-imx-headers_5.4.3.bb b/recipes-kernel/linux/linux-imx-headers_5.4.bb
index 4257c41a..bb5db8d0 100644
--- a/recipes-kernel/linux/linux-imx-headers_5.4.3.bb
+++ b/recipes-kernel/linux/linux-imx-headers_5.4.bb
@@ -7,10 +7,10 @@ New headers are installed in ${includedir}/imx."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
-SRCBRANCH = "lf-5.4.y"
-LOCALVERSION = "-1.0.0"
-SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466"
+SRCBRANCH = "imx_5.4.24_2.1.0"
+LOCALVERSION = "-2.1.0"
+SRC_URI = "git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}"
+SRCREV = "dea2fede7e024ee7029b13e8d82a00ec14427777"
S = "${WORKDIR}/git"
diff --git a/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb b/recipes-kernel/linux/linux-imx-mfgtool_5.4.bb
index 0a9f5259..0a9f5259 100644
--- a/recipes-kernel/linux/linux-imx-mfgtool_5.4.3.bb
+++ b/recipes-kernel/linux/linux-imx-mfgtool_5.4.bb
diff --git a/recipes-kernel/linux/linux-imx.inc b/recipes-kernel/linux/linux-imx.inc
index d508a727..36823eec 100644
--- a/recipes-kernel/linux/linux-imx.inc
+++ b/recipes-kernel/linux/linux-imx.inc
@@ -14,7 +14,7 @@ SRCBRANCH ?= ""
# Set the PV to the correct kernel version to satisfy the kernel version sanity check
PV = "${LINUX_VERSION}+git${SRCPV}"
-SRC_URI = "git://source.codeaurora.org/external/imx/linux-imx;protocol=https;branch=${SRCBRANCH} \
+SRC_URI = "git://github.com/nxp-imx/linux-imx;protocol=https;branch=${SRCBRANCH} \
file://defconfig \
"
diff --git a/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch b/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch
deleted file mode 100644
index e3df8084..00000000
--- a/recipes-kernel/linux/linux-imx/0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Mon Sep 17 00:00:00 2001
-From: Changbin Du <changbin.du@gmail.com>
-Date: Tue, 28 Jan 2020 23:29:38 +0800
-Subject: [PATCH] perf: Make perf able to build with latest libbfd
-
-libbfd has changed the bfd_section_* macros to inline functions
-bfd_section_<field> since 2019-09-18. See below two commits:
- o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html
- o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html
-
-This fix make perf able to build with both old and new libbfd.
-
-Upstream-Status: Submitted [commit 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 upstream]
-
-Signed-off-by: Changbin Du <changbin.du@gmail.com>
-Acked-by: Jiri Olsa <jolsa@redhat.com>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com
-Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- tools/perf/util/srcline.c | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
-
-diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
-index 6ccf6f6d09df..5b7d6c16d33f 100644
---- a/tools/perf/util/srcline.c
-+++ b/tools/perf/util/srcline.c
-@@ -193,16 +193,30 @@ static void find_address_in_section(bfd *abfd, asection *section, void *data)
- bfd_vma pc, vma;
- bfd_size_type size;
- struct a2l_data *a2l = data;
-+ flagword flags;
-
- if (a2l->found)
- return;
-
-- if ((bfd_get_section_flags(abfd, section) & SEC_ALLOC) == 0)
-+#ifdef bfd_get_section_flags
-+ flags = bfd_get_section_flags(abfd, section);
-+#else
-+ flags = bfd_section_flags(section);
-+#endif
-+ if ((flags & SEC_ALLOC) == 0)
- return;
-
- pc = a2l->addr;
-+#ifdef bfd_get_section_vma
- vma = bfd_get_section_vma(abfd, section);
-+#else
-+ vma = bfd_section_vma(section);
-+#endif
-+#ifdef bfd_get_section_size
- size = bfd_get_section_size(section);
-+#else
-+ size = bfd_section_size(section);
-+#endif
-
- if (pc < vma || pc >= vma + size)
- return;
---
-2.17.1
-
diff --git a/recipes-kernel/linux/linux-imx/imx/defconfig b/recipes-kernel/linux/linux-imx/imx/defconfig
index 622e5430..7ac298a7 100644
--- a/recipes-kernel/linux/linux-imx/imx/defconfig
+++ b/recipes-kernel/linux/linux-imx/imx/defconfig
@@ -1,5 +1,6 @@
CONFIG_KERNEL_LZO=y
CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT=y
@@ -7,6 +8,12 @@ CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_CGROUPS=y
+CONFIG_MEMCG=y
+CONFIG_CGROUP_PIDS=y
+CONFIG_CGROUP_FREEZER=y
+CONFIG_CGROUP_DEVICE=y
+CONFIG_NAMESPACES=y
+CONFIG_USER_NS=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_EXPERT=y
@@ -57,6 +64,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BINFMT_MISC=m
CONFIG_CMA=y
+CONFIG_SECCOMP=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
@@ -120,6 +128,7 @@ CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
+CONFIG_OF_OVERLAY=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=65536
@@ -142,7 +151,7 @@ CONFIG_NETDEVICES=y
CONFIG_CS89x0=y
CONFIG_CS89x0_PLATFORM=y
# CONFIG_NET_VENDOR_FARADAY is not set
-# CONFIG_NET_VENDOR_INTEL is not set
+CONFIG_E1000E=y
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
@@ -165,6 +174,7 @@ CONFIG_USB_NET_SMSC95XX=y
CONFIG_USB_NET_MCS7830=y
CONFIG_BRCMFMAC=m
CONFIG_HOSTAP=y
+CONFIG_MXMWIFIEX=m
CONFIG_WL12XX=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
@@ -446,6 +456,8 @@ CONFIG_STAGING_MEDIA=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_MAILBOX=y
CONFIG_IMX_MBOX=y
+CONFIG_REMOTEPROC=y
+CONFIG_IMX_REMOTEPROC=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_IIO=y
CONFIG_IMX7D_ADC=y
@@ -483,6 +495,7 @@ CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not set
CONFIG_AUTOFS4_FS=y
CONFIG_FUSE_FS=y
+CONFIG_OVERLAY_FS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
@@ -535,6 +548,20 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_SAHARA=y
CONFIG_CRYPTO_DEV_MXS_DCP=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
+CONFIG_CRYPTO_SM3=m
+CONFIG_CRYPTO_STREEBOG=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_SHA1=m
CONFIG_CRC_CCITT=m
CONFIG_CRC_T10DIF=y
CONFIG_CRC7=m
@@ -550,3 +577,5 @@ CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
# CONFIG_FTRACE is not set
+CONFIG_ION=y
+CONFIG_ION_CMA_HEAP=y
diff --git a/recipes-kernel/linux/linux-imx/mx8/defconfig b/recipes-kernel/linux/linux-imx/mx8/defconfig
index 469ee0ef..cf8df95f 100644
--- a/recipes-kernel/linux/linux-imx/mx8/defconfig
+++ b/recipes-kernel/linux/linux-imx/mx8/defconfig
@@ -66,6 +66,7 @@ CONFIG_EFI_CAPSULE_LOADER=y
CONFIG_IMX_DSP=y
CONFIG_IMX_SCU=y
CONFIG_IMX_SCU_PD=y
+CONFIG_IMX_SECO_MU=y
CONFIG_ACPI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
@@ -127,9 +128,17 @@ CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_LLC2=y
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_MULTIQ=y
+CONFIG_NET_SCH_CBS=y
+CONFIG_NET_SCH_TAPRIO=y
+CONFIG_NET_SCH_MQPRIO=y
+CONFIG_NET_CLS_BASIC=y
+CONFIG_NET_CLS_TCINDEX=y
CONFIG_TSN=y
CONFIG_NET_SWITCHDEV=y
CONFIG_BPF_JIT=y
+CONFIG_NET_PKTGEN=y
CONFIG_CAN=m
CONFIG_CAN_FLEXCAN=m
CONFIG_BT=y
@@ -272,7 +281,7 @@ CONFIG_MSCC_OCELOT_SWITCH=y
CONFIG_QCOM_EMAC=m
CONFIG_SMC91X=y
CONFIG_SMSC911X=y
-CONFIG_STMMAC_ETH=m
+CONFIG_STMMAC_ETH=y
CONFIG_MDIO_BITBANG=y
CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
CONFIG_AQUANTIA_PHY=y
@@ -300,9 +309,10 @@ CONFIG_USB_NET_MCS7830=m
CONFIG_BRCMFMAC=m
CONFIG_BRCMFMAC_PCIE=y
CONFIG_HOSTAP=y
+CONFIG_MXMWIFIEX=m
CONFIG_WL18XX=m
CONFIG_WLCORE_SDIO=m
-CONFIG_IVSHMEM_NET=m
+CONFIG_IVSHMEM_NET=y
CONFIG_INPUT_EVDEV=y
CONFIG_KEYBOARD_ADC=m
CONFIG_KEYBOARD_GPIO=y
@@ -351,6 +361,7 @@ CONFIG_I2C_IMX_LPI2C=y
CONFIG_I2C_RK3X=y
CONFIG_I2C_RPBUS=y
CONFIG_I2C_CROS_EC_TUNNEL=y
+CONFIG_XEN_I2C_BACKEND=y
CONFIG_I2C_SLAVE=y
CONFIG_SPI=y
CONFIG_SPI_FSL_LPSPI=y
@@ -369,9 +380,11 @@ CONFIG_PINCTRL_SINGLE=y
CONFIG_PINCTRL_MAX77620=y
CONFIG_PINCTRL_IMX8MM=y
CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
CONFIG_PINCTRL_IMX8MQ=y
CONFIG_PINCTRL_IMX8QM=y
CONFIG_PINCTRL_IMX8QXP=y
+CONFIG_PINCTRL_IMX8DXL=y
CONFIG_PINCTRL_S32V234=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_SYSFS=y
@@ -411,8 +424,10 @@ CONFIG_ARM_SBSA_WATCHDOG=y
CONFIG_DW_WATCHDOG=y
CONFIG_IMX2_WDT=y
CONFIG_IMX_SC_WDT=y
+CONFIG_XEN_WDT=y
CONFIG_MFD_BD9571MWV=y
CONFIG_MFD_AXP20X_I2C=y
+CONFIG_MFD_IMX_AUDIOMIX=y
CONFIG_MFD_HI6421_PMIC=y
CONFIG_MFD_MAX77620=y
CONFIG_MFD_RK808=y
@@ -458,6 +473,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_OV5640=y
CONFIG_IMX_DPU_CORE=y
CONFIG_IMX_LCDIF_CORE=y
+CONFIG_IMX_LCDIFV3_CORE=y
CONFIG_DRM=y
CONFIG_DRM_I2C_NXP_TDA998X=m
CONFIG_DRM_MALI_DISPLAY=m
@@ -465,16 +481,24 @@ CONFIG_DRM_NOUVEAU=m
CONFIG_DRM_RCAR_LVDS=m
CONFIG_DRM_PANEL_SIMPLE=y
CONFIG_DRM_PANEL_RAYDIUM_RM67191=y
+CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
+CONFIG_DRM_FSL_IMX_LVDS_BRIDGE=y
CONFIG_DRM_SII902X=m
CONFIG_DRM_I2C_ADV7511=y
CONFIG_DRM_NWL_MIPI_DSI=y
CONFIG_DRM_CDNS_HDMI_CEC=y
CONFIG_DRM_DW_HDMI_I2S_AUDIO=m
+CONFIG_DRM_DW_HDMI_GP_AUDIO=y
+CONFIG_DRM_DW_HDMI_CEC=y
CONFIG_DRM_ITE_IT6263=y
CONFIG_DRM_IMX=y
+CONFIG_DRM_IMX_LCDIF_MUX_DISPLAY=y
CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
CONFIG_DRM_IMX_TVE=y
CONFIG_DRM_IMX_LDB=y
+CONFIG_DRM_IMX8QM_LDB=y
+CONFIG_DRM_IMX8QXP_LDB=y
+CONFIG_DRM_IMX8MP_LDB=y
CONFIG_DRM_IMX_HDMI=y
CONFIG_DRM_IMX_SEC_DSIM=y
CONFIG_DRM_IMX_CDNS_MHDP=y
@@ -516,12 +540,14 @@ CONFIG_SND_SOC_IMX_AUDMIX=y
CONFIG_SND_SOC_IMX_PDM_MIC=y
CONFIG_SND_SOC_IMX_DSP=y
CONFIG_SND_SOC_IMX_CDNHDMI=y
+CONFIG_SND_SOC_IMX_XCVR=y
CONFIG_SND_SOC_SOF_TOPLEVEL=y
CONFIG_SND_SOC_SOF_OF=m
CONFIG_SND_SOC_SOF_IMX_TOPLEVEL=y
-CONFIG_SND_SOC_SOF_IMX8_SUPPORT=y
-CONFIG_SND_SOC_SOF_IMX8=m
+CONFIG_SND_SOC_SOF_IMX8_SUPPORT=m
+CONFIG_SND_SOC_SOF_IMX8M_SUPPORT=m
CONFIG_SND_SOC_AK4613=m
+CONFIG_SND_SOC_BT_SCO=y
CONFIG_SND_SOC_DMIC=m
CONFIG_SND_SOC_ES7134=m
CONFIG_SND_SOC_ES7241=m
@@ -554,6 +580,11 @@ CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_ISP1760=y
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_CONSOLE=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_SIMPLE=y
+CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_TEST=m
CONFIG_USB_EHSET_TEST_FIXTURE=m
CONFIG_USB_HSIC_USB3503=y
@@ -619,6 +650,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_LEDS_TRIGGER_PANIC=y
CONFIG_EDAC=y
CONFIG_EDAC_GHES=y
+CONFIG_EDAC_SYNOPSYS=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS1307=y
CONFIG_RTC_DRV_MAX77686=y
@@ -646,6 +678,7 @@ CONFIG_QCOM_HIDMA=y
CONFIG_DMATEST=y
CONFIG_UIO=y
CONFIG_UIO_PCI_GENERIC=y
+CONFIG_UIO_IVSHMEM=y
CONFIG_VFIO=y
CONFIG_VFIO_PCI=y
CONFIG_VFIO_FSL_MC=y
@@ -680,6 +713,7 @@ CONFIG_COMMON_CLK_XGENE=y
CONFIG_COMMON_CLK_PWM=y
CONFIG_CLK_IMX8MM=y
CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
CONFIG_CLK_IMX8MQ=y
CONFIG_CLK_IMX8QXP=y
CONFIG_HWSPINLOCK=y
@@ -689,11 +723,13 @@ CONFIG_PLATFORM_MHU=y
CONFIG_ARM_SMMU=y
CONFIG_ARM_SMMU_V3=y
CONFIG_REMOTEPROC=y
+CONFIG_IMX_REMOTEPROC=y
CONFIG_RPMSG_QCOM_GLINK_RPM=y
CONFIG_SOC_BRCMSTB=y
CONFIG_FSL_MC_DPIO=y
CONFIG_FSL_QIXIS=y
CONFIG_IMX_SCU_SOC=y
+CONFIG_SECVIO_SC=y
CONFIG_SOC_TI=y
CONFIG_EXTCON_USB_GPIO=y
CONFIG_EXTCON_USBC_CROS_EC=y
@@ -707,10 +743,14 @@ CONFIG_PWM=y
CONFIG_PWM_CROS_EC=m
CONFIG_PWM_IMX27=y
CONFIG_PHY_XGENE=y
+CONFIG_PHY_MIXEL_LVDS=y
+CONFIG_PHY_MIXEL_LVDS_COMBO=y
+CONFIG_PHY_FSL_IMX8MP_LVDS=y
CONFIG_PHY_MIXEL_MIPI_DPHY=y
+CONFIG_PHY_SAMSUNG_HDMI_PHY=y
CONFIG_PHY_QCOM_USB_HS=y
CONFIG_PHY_SAMSUNG_USB2=y
-CONFIG_FSL_IMX8_DDR_PMU=m
+CONFIG_FSL_IMX8_DDR_PMU=y
CONFIG_HISI_PMU=y
CONFIG_NVMEM_IMX_OCOTP=y
CONFIG_NVMEM_IMX_OCOTP_SCU=y
@@ -784,6 +824,19 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y
CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=m
CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y
CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_VMAC=m
+CONFIG_CRYPTO_SM3=m
+CONFIG_CRYPTO_STREEBOG=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_SALSA20=m
+CONFIG_CRYPTO_SEED=m
+CONFIG_CRYPTO_SM4=m
+CONFIG_CRYPTO_TEA=m
CONFIG_INDIRECT_PIO=y
CONFIG_CMA_SIZE_MBYTES=320
CONFIG_PRINTK_TIME=y
@@ -795,3 +848,6 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_FTRACE is not set
CONFIG_MEMTEST=y
+CONFIG_CORESIGHT=y
+CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
+CONFIG_CORESIGHT_SOURCE_ETM4X=y
diff --git a/recipes-kernel/linux/linux-imx_5.4.3.bb b/recipes-kernel/linux/linux-imx_5.4.bb
index 6c042184..8c56b986 100644
--- a/recipes-kernel/linux/linux-imx_5.4.3.bb
+++ b/recipes-kernel/linux/linux-imx_5.4.bb
@@ -1,5 +1,5 @@
# Copyright 2013-2016 (C) Freescale Semiconductor
-# Copyright 2017-2019 (C) NXP
+# Copyright 2017-2020 (C) NXP
# Copyright 2018 (C) O.S. Systems Software LTDA.
# Released under the MIT license (see COPYING.MIT for the terms)
#
@@ -17,18 +17,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
DEPENDS += "lzop-native bc-native"
-SRCBRANCH = "lf-5.4.y"
-LOCALVERSION = "-1.0.0"
-SRCREV = "f8118585ee3c7025265b28985fdfe0af96a84466"
+SRCBRANCH = "imx_5.4.24_2.1.0"
+LOCALVERSION = "-2.1.0"
+SRCREV = "babac008e5cf168abca1a85bda2e8071ca27a5c0"
# PV is defined in the base in linux-imx.inc file and uses the LINUX_VERSION definition
# required by kernel-yocto.bbclass.
#
# LINUX_VERSION define should match to the kernel version referenced by SRC_URI and
# should be updated once patchlevel is merged.
-LINUX_VERSION = "5.4.3"
-
-SRC_URI += "file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch"
+LINUX_VERSION = "5.4.24"
DEFAULT_PREFERENCE = "1"
diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc
index 7ff370e4..93a27d8c 100644
--- a/recipes-kernel/linux/linux-mfgtool.inc
+++ b/recipes-kernel/linux/linux-mfgtool.inc
@@ -4,4 +4,4 @@
PROVIDES = "linux-mfgtool"
-KERNEL_PACKAGE_NAME = "mfgtool"
+KERNEL_PACKAGE_NAME = "linux-mfgtool"
diff --git a/recipes-kernel/linux/linux-qoriq.inc b/recipes-kernel/linux/linux-qoriq.inc
index dcf28401..4d134b47 100644
--- a/recipes-kernel/linux/linux-qoriq.inc
+++ b/recipes-kernel/linux/linux-qoriq.inc
@@ -53,7 +53,7 @@ do_merge_delta_config() {
done
cp .config ${WORKDIR}/defconfig
}
-addtask merge_delta_config before do_preconfigure after do_patch
+addtask merge_delta_config before do_kernel_localversion after do_patch
# The link of dts folder is needed for 32b compile of aarch64 targets(e.g. ls1043ardb-32b)
do_compile_prepend_fsl-lsch2-32b() {
diff --git a/recipes-kernel/linux/linux-qoriq/0001-libtraceevent-Fix-build-with-binutils-2.35.patch b/recipes-kernel/linux/linux-qoriq/0001-libtraceevent-Fix-build-with-binutils-2.35.patch
new file mode 100644
index 00000000..b1d07fc4
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq/0001-libtraceevent-Fix-build-with-binutils-2.35.patch
@@ -0,0 +1,38 @@
+From 39efdd94e314336f4acbac4c07e0f37bdc3bef71 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Sat, 25 Jul 2020 02:06:23 +0100
+Subject: [PATCH] libtraceevent: Fix build with binutils 2.35
+
+In binutils 2.35, 'nm -D' changed to show symbol versions along with
+symbol names, with the usual @@ separator. When generating
+libtraceevent-dynamic-list we need just the names, so strip off the
+version suffix if present.
+
+Upstream-Status: Backport
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Tested-by: Salvatore Bonaccorso <carnil@debian.org>
+Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
+Cc: linux-trace-devel@vger.kernel.org
+Cc: stable@vger.kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/lib/traceevent/plugins/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/lib/traceevent/plugins/Makefile b/tools/lib/traceevent/plugins/Makefile
+index 349bb81482ab..680d883efe05 100644
+--- a/tools/lib/traceevent/plugins/Makefile
++++ b/tools/lib/traceevent/plugins/Makefile
+@@ -197,7 +197,7 @@ define do_generate_dynamic_list_file
+ xargs echo "U w W" | tr 'w ' 'W\n' | sort -u | xargs echo`;\
+ if [ "$$symbol_type" = "U W" ];then \
+ (echo '{'; \
+- $(NM) -u -D $1 | awk 'NF>1 {print "\t"$$2";"}' | sort -u;\
++ $(NM) -u -D $1 | awk 'NF>1 {sub("@.*", "", $$2); print "\t"$$2";"}' | sort -u;\
+ echo '};'; \
+ ) > $2; \
+ else \
+--
+2.17.1
+
diff --git a/recipes-kernel/linux/linux-qoriq/0001-perf-bench-Share-some-global-variables-to-fix-build-.patch b/recipes-kernel/linux/linux-qoriq/0001-perf-bench-Share-some-global-variables-to-fix-build-.patch
new file mode 100644
index 00000000..b18ae803
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq/0001-perf-bench-Share-some-global-variables-to-fix-build-.patch
@@ -0,0 +1,239 @@
+From e4d9b04b973b2dbce7b42af95ea70d07da1c936d Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Mon, 2 Mar 2020 12:09:38 -0300
+Subject: [PATCH] perf bench: Share some global variables to fix build with gcc
+ 10
+
+Noticed with gcc 10 (fedora rawhide) that those variables were not being
+declared as static, so end up with:
+
+ ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here
+ make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/bench/perf-in.o] Error 1
+
+Prefix those with bench__ and add them to bench/bench.h, so that we can
+share those on the tools needing to access those variables from signal
+handlers.
+
+Upstream-Status: Backport
+
+Acked-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Davidlohr Bueso <dave@stgolabs.net>
+Cc: Jiri Olsa <jolsa@kernel.org>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Link: http://lore.kernel.org/lkml/20200303155811.GD13702@kernel.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/perf/bench/bench.h | 4 ++++
+ tools/perf/bench/epoll-ctl.c | 7 +++----
+ tools/perf/bench/epoll-wait.c | 11 +++++------
+ tools/perf/bench/futex-hash.c | 12 ++++++------
+ tools/perf/bench/futex-lock-pi.c | 11 +++++------
+ 5 files changed, 23 insertions(+), 22 deletions(-)
+
+diff --git a/tools/perf/bench/bench.h b/tools/perf/bench/bench.h
+index fddb3ced9db6..4aa6de1aa67d 100644
+--- a/tools/perf/bench/bench.h
++++ b/tools/perf/bench/bench.h
+@@ -2,6 +2,10 @@
+ #ifndef BENCH_H
+ #define BENCH_H
+
++#include <sys/time.h>
++
++extern struct timeval bench__start, bench__end, bench__runtime;
++
+ /*
+ * The madvise transparent hugepage constants were added in glibc
+ * 2.13. For compatibility with older versions of glibc, define these
+diff --git a/tools/perf/bench/epoll-ctl.c b/tools/perf/bench/epoll-ctl.c
+index bb617e568841..a7526c05df38 100644
+--- a/tools/perf/bench/epoll-ctl.c
++++ b/tools/perf/bench/epoll-ctl.c
+@@ -35,7 +35,6 @@
+
+ static unsigned int nthreads = 0;
+ static unsigned int nsecs = 8;
+-struct timeval start, end, runtime;
+ static bool done, __verbose, randomize;
+
+ /*
+@@ -94,8 +93,8 @@ static void toggle_done(int sig __maybe_unused,
+ {
+ /* inform all threads that we're done for the day */
+ done = true;
+- gettimeofday(&end, NULL);
+- timersub(&end, &start, &runtime);
++ gettimeofday(&bench__end, NULL);
++ timersub(&bench__end, &bench__start, &bench__runtime);
+ }
+
+ static void nest_epollfd(void)
+@@ -361,7 +360,7 @@ int bench_epoll_ctl(int argc, const char **argv)
+
+ threads_starting = nthreads;
+
+- gettimeofday(&start, NULL);
++ gettimeofday(&bench__start, NULL);
+
+ do_threads(worker, cpu);
+
+diff --git a/tools/perf/bench/epoll-wait.c b/tools/perf/bench/epoll-wait.c
+index 7af694437f4e..d1c5cb526b9f 100644
+--- a/tools/perf/bench/epoll-wait.c
++++ b/tools/perf/bench/epoll-wait.c
+@@ -90,7 +90,6 @@
+
+ static unsigned int nthreads = 0;
+ static unsigned int nsecs = 8;
+-struct timeval start, end, runtime;
+ static bool wdone, done, __verbose, randomize, nonblocking;
+
+ /*
+@@ -276,8 +275,8 @@ static void toggle_done(int sig __maybe_unused,
+ {
+ /* inform all threads that we're done for the day */
+ done = true;
+- gettimeofday(&end, NULL);
+- timersub(&end, &start, &runtime);
++ gettimeofday(&bench__end, NULL);
++ timersub(&bench__end, &bench__start, &bench__runtime);
+ }
+
+ static void print_summary(void)
+@@ -287,7 +286,7 @@ static void print_summary(void)
+
+ printf("\nAveraged %ld operations/sec (+- %.2f%%), total secs = %d\n",
+ avg, rel_stddev_stats(stddev, avg),
+- (int) runtime.tv_sec);
++ (int)bench__runtime.tv_sec);
+ }
+
+ static int do_threads(struct worker *worker, struct perf_cpu_map *cpu)
+@@ -479,7 +478,7 @@ int bench_epoll_wait(int argc, const char **argv)
+
+ threads_starting = nthreads;
+
+- gettimeofday(&start, NULL);
++ gettimeofday(&bench__start, NULL);
+
+ do_threads(worker, cpu);
+
+@@ -519,7 +518,7 @@ int bench_epoll_wait(int argc, const char **argv)
+ qsort(worker, nthreads, sizeof(struct worker), cmpworker);
+
+ for (i = 0; i < nthreads; i++) {
+- unsigned long t = worker[i].ops/runtime.tv_sec;
++ unsigned long t = worker[i].ops / bench__runtime.tv_sec;
+
+ update_stats(&throughput_stats, t);
+
+diff --git a/tools/perf/bench/futex-hash.c b/tools/perf/bench/futex-hash.c
+index 8ba0c3330a9a..21776862e940 100644
+--- a/tools/perf/bench/futex-hash.c
++++ b/tools/perf/bench/futex-hash.c
+@@ -37,7 +37,7 @@ static unsigned int nfutexes = 1024;
+ static bool fshared = false, done = false, silent = false;
+ static int futex_flag = 0;
+
+-struct timeval start, end, runtime;
++struct timeval bench__start, bench__end, bench__runtime;
+ static pthread_mutex_t thread_lock;
+ static unsigned int threads_starting;
+ static struct stats throughput_stats;
+@@ -103,8 +103,8 @@ static void toggle_done(int sig __maybe_unused,
+ {
+ /* inform all threads that we're done for the day */
+ done = true;
+- gettimeofday(&end, NULL);
+- timersub(&end, &start, &runtime);
++ gettimeofday(&bench__end, NULL);
++ timersub(&bench__end, &bench__start, &bench__runtime);
+ }
+
+ static void print_summary(void)
+@@ -114,7 +114,7 @@ static void print_summary(void)
+
+ printf("%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\n",
+ !silent ? "\n" : "", avg, rel_stddev_stats(stddev, avg),
+- (int) runtime.tv_sec);
++ (int)bench__runtime.tv_sec);
+ }
+
+ int bench_futex_hash(int argc, const char **argv)
+@@ -161,7 +161,7 @@ int bench_futex_hash(int argc, const char **argv)
+
+ threads_starting = nthreads;
+ pthread_attr_init(&thread_attr);
+- gettimeofday(&start, NULL);
++ gettimeofday(&bench__start, NULL);
+ for (i = 0; i < nthreads; i++) {
+ worker[i].tid = i;
+ worker[i].futex = calloc(nfutexes, sizeof(*worker[i].futex));
+@@ -204,7 +204,7 @@ int bench_futex_hash(int argc, const char **argv)
+ pthread_mutex_destroy(&thread_lock);
+
+ for (i = 0; i < nthreads; i++) {
+- unsigned long t = worker[i].ops/runtime.tv_sec;
++ unsigned long t = worker[i].ops / bench__runtime.tv_sec;
+ update_stats(&throughput_stats, t);
+ if (!silent) {
+ if (nfutexes == 1)
+diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c
+index d0cae8125423..30d97121dc4f 100644
+--- a/tools/perf/bench/futex-lock-pi.c
++++ b/tools/perf/bench/futex-lock-pi.c
+@@ -37,7 +37,6 @@ static bool silent = false, multi = false;
+ static bool done = false, fshared = false;
+ static unsigned int nthreads = 0;
+ static int futex_flag = 0;
+-struct timeval start, end, runtime;
+ static pthread_mutex_t thread_lock;
+ static unsigned int threads_starting;
+ static struct stats throughput_stats;
+@@ -64,7 +63,7 @@ static void print_summary(void)
+
+ printf("%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\n",
+ !silent ? "\n" : "", avg, rel_stddev_stats(stddev, avg),
+- (int) runtime.tv_sec);
++ (int)bench__runtime.tv_sec);
+ }
+
+ static void toggle_done(int sig __maybe_unused,
+@@ -73,8 +72,8 @@ static void toggle_done(int sig __maybe_unused,
+ {
+ /* inform all threads that we're done for the day */
+ done = true;
+- gettimeofday(&end, NULL);
+- timersub(&end, &start, &runtime);
++ gettimeofday(&bench__end, NULL);
++ timersub(&bench__end, &bench__start, &bench__runtime);
+ }
+
+ static void *workerfn(void *arg)
+@@ -185,7 +184,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
+
+ threads_starting = nthreads;
+ pthread_attr_init(&thread_attr);
+- gettimeofday(&start, NULL);
++ gettimeofday(&bench__start, NULL);
+
+ create_threads(worker, thread_attr, cpu);
+ pthread_attr_destroy(&thread_attr);
+@@ -211,7 +210,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
+ pthread_mutex_destroy(&thread_lock);
+
+ for (i = 0; i < nthreads; i++) {
+- unsigned long t = worker[i].ops/runtime.tv_sec;
++ unsigned long t = worker[i].ops / bench__runtime.tv_sec;
+
+ update_stats(&throughput_stats, t);
+ if (!silent)
+--
+2.17.1
+
diff --git a/recipes-kernel/linux/linux-qoriq/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch b/recipes-kernel/linux/linux-qoriq/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
new file mode 100644
index 00000000..f5366416
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq/0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch
@@ -0,0 +1,68 @@
+From 168200b6d6ea0cb5765943ec5da5b8149701f36a Mon Sep 17 00:00:00 2001
+From: Leo Yan <leo.yan@linaro.org>
+Date: Tue, 5 May 2020 21:36:42 +0800
+Subject: [PATCH] perf cs-etm: Move definition of 'traceid_list' global
+ variable from header file
+
+The variable 'traceid_list' is defined in the header file cs-etm.h,
+if multiple C files include cs-etm.h the compiler might complaint for
+multiple definition of 'traceid_list'.
+
+To fix multiple definition error, move the definition of 'traceid_list'
+into cs-etm.c.
+
+Upstream-Status: Backport
+
+Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata")
+Reported-by: Thomas Backlund <tmb@mageia.org>
+Signed-off-by: Leo Yan <leo.yan@linaro.org>
+Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
+Reviewed-by: Mike Leach <mike.leach@linaro.org>
+Tested-by: Mike Leach <mike.leach@linaro.org>
+Tested-by: Thomas Backlund <tmb@mageia.org>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
+Cc: Tor Jeremiassen <tor@ti.com>
+Cc: linux-arm-kernel@lists.infradead.org
+Link: http://lore.kernel.org/lkml/20200505133642.4756-1-leo.yan@linaro.org
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/perf/util/cs-etm.c | 3 +++
+ tools/perf/util/cs-etm.h | 3 ---
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
+index 3c802fde4954..c283223fb31f 100644
+--- a/tools/perf/util/cs-etm.c
++++ b/tools/perf/util/cs-etm.c
+@@ -94,6 +94,9 @@ struct cs_etm_queue {
+ struct cs_etm_traceid_queue **traceid_queues;
+ };
+
++/* RB tree for quick conversion between traceID and metadata pointers */
++static struct intlist *traceid_list;
++
+ static int cs_etm__update_queues(struct cs_etm_auxtrace *etm);
+ static int cs_etm__process_queues(struct cs_etm_auxtrace *etm);
+ static int cs_etm__process_timeless_queues(struct cs_etm_auxtrace *etm,
+diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h
+index 650ecc2a6349..4ad925d6d799 100644
+--- a/tools/perf/util/cs-etm.h
++++ b/tools/perf/util/cs-etm.h
+@@ -114,9 +114,6 @@ enum cs_etm_isa {
+ CS_ETM_ISA_T32,
+ };
+
+-/* RB tree for quick conversion between traceID and metadata pointers */
+-struct intlist *traceid_list;
+-
+ struct cs_etm_queue;
+
+ struct cs_etm_packet {
+--
+2.17.1
+
diff --git a/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch b/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch
new file mode 100644
index 00000000..b36ed2cc
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch
@@ -0,0 +1,42 @@
+From cff20b3151ccab690715cb6cf0f5da5cccb32adf Mon Sep 17 00:00:00 2001
+From: Arnaldo Carvalho de Melo <acme@redhat.com>
+Date: Mon, 2 Mar 2020 11:13:19 -0300
+Subject: [PATCH] perf tests bp_account: Make global variable static
+
+To fix the build with newer gccs, that without this patch exit with:
+
+ LD /tmp/build/perf/tests/perf-in.o
+ ld: /tmp/build/perf/tests/bp_account.o:/git/perf/tools/perf/tests/bp_account.c:22: multiple definition of `the_var'; /tmp/build/perf/tests/bp_signal.o:/git/perf/tools/perf/tests/bp_signal.c:38: first defined here
+ make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/tests/perf-in.o] Error 1
+
+First noticed in fedora:rawhide/32 with:
+
+ [perfbuilder@a5ff49d6e6e4 ~]$ gcc --version
+ gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8)
+
+Upstream-Status: Backport
+
+Reported-by: Jiri Olsa <jolsa@kernel.org>
+Cc: Adrian Hunter <adrian.hunter@intel.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+---
+ tools/perf/tests/bp_account.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
+index d0b935356274..489b50604cf2 100644
+--- a/tools/perf/tests/bp_account.c
++++ b/tools/perf/tests/bp_account.c
+@@ -19,7 +19,7 @@
+ #include "../perf-sys.h"
+ #include "cloexec.h"
+
+-volatile long the_var;
++static volatile long the_var;
+
+ static noinline int test_function(void)
+ {
+--
+2.17.1
+
diff --git a/recipes-kernel/linux/linux-qoriq_5.4.bb b/recipes-kernel/linux/linux-qoriq_5.4.bb
index d1b979f9..e5f9e192 100644
--- a/recipes-kernel/linux/linux-qoriq_5.4.bb
+++ b/recipes-kernel/linux/linux-qoriq_5.4.bb
@@ -2,9 +2,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
LINUX_VERSION = "5.4.3"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/linux;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/linux;protocol=https;nobranch=1 \
file://0001-Makfefile-linux-5.4-add-warning-cflags-on-LSDK-20.04.patch \
file://0001-perf-Make-perf-able-to-build-with-latest-libbfd.patch \
+ file://0001-perf-tests-bp_account-Make-global-variable-static.patch \
+ file://0001-perf-cs-etm-Move-definition-of-traceid_list-global-v.patch \
+ file://0001-perf-bench-Share-some-global-variables-to-fix-build-.patch \
+ file://0001-libtraceevent-Fix-build-with-binutils-2.35.patch \
"
SRCREV = "134788b16485dd9fa81988681d2365ee38633fa2"
diff --git a/recipes-kernel/skmm-host/skmm-host_git.bb b/recipes-kernel/skmm-host/skmm-host_git.bb
index 4b111b5d..41902ca2 100644
--- a/recipes-kernel/skmm-host/skmm-host_git.bb
+++ b/recipes-kernel/skmm-host/skmm-host_git.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=99803d8e9a595c0bdb45ca710f353813"
inherit module qoriq_build_64bit_kernel
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-yocto-sdk/skmm-host;protocol=https;nobranch=1"
+SRC_URI = "git://github.com/nxp-qoriq-yocto-sdk/skmm-host;protocol=https;nobranch=1"
SRCREV = "d5912ebdb8d3b29b1e2df52710e8821d1ce3eb80"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
new file mode 100755
index 00000000..d72fb02c
--- /dev/null
+++ b/recipes-multimedia/alsa/alsa-lib/0006-add-conf-for-iMX-XCVR-sound-card.patch
@@ -0,0 +1,119 @@
+From 2fd2737a1a0553e164d1b4f78687edf573f8e621 Mon Sep 17 00:00:00 2001
+From: Viorel Suman <viorel.suman@nxp.com>
+Date: Mon, 9 Mar 2020 14:25:46 +0200
+Subject: [PATCH] add conf for iMX XCVR sound card
+
+Upstream Status: Pending
+
+Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
+---
+ src/conf/cards/IMX-XCVR.conf | 69 ++++++++++++++++++++++++++++++++++++++++++++
+ src/conf/cards/Makefile.am | 3 +-
+ src/conf/cards/aliases.conf | 1 +
+ 3 files changed, 72 insertions(+), 1 deletion(-)
+ create mode 100755 src/conf/cards/IMX-XCVR.conf
+
+diff --git a/src/conf/cards/IMX-XCVR.conf b/src/conf/cards/IMX-XCVR.conf
+new file mode 100755
+index 0000000..ee323c7
+--- /dev/null
++++ b/src/conf/cards/IMX-XCVR.conf
+@@ -0,0 +1,69 @@
++#
++# Configuration for the IMX-XCVR sound card using software IEC958
++# subframe conversion
++#
++IMX-XCVR.pcm.default {
++ @args [ CARD ]
++ @args.CARD { type string }
++ type asym
++ playback.pcm {
++ type linear
++ slave.pcm {
++ @func concat
++ strings [ "iec958:" $CARD ]
++ }
++ slave.format S24_LE
++ }
++ capture.pcm {
++ type plug
++ slave.pcm {
++ @func concat
++ strings [ "iec958:" $CARD ]
++ }
++ }
++}
++
++<confdir:pcm/iec958.conf>
++
++IMX-XCVR.pcm.iec958.0 {
++ @args [ CARD AES0 AES1 AES2 AES3 ]
++ @args.CARD { type string }
++ @args.AES0 { type integer }
++ @args.AES1 { type integer }
++ @args.AES2 { type integer }
++ @args.AES3 { type integer }
++ type asym
++ playback.pcm {
++ type hooks
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ hooks.0 {
++ type ctl_elems
++ hook_args [
++ {
++ interface PCM
++ name "IEC958 Playback Default"
++ preserve true
++ optional true
++ value [ $AES0 $AES1 $AES2 $AES3 ]
++ }
++ ]
++ }
++ }
++ capture.pcm {
++ type iec958
++ slave {
++ format IEC958_SUBFRAME_LE
++ pcm {
++ type plug
++ slave.pcm {
++ type hw
++ card $CARD
++ }
++ }
++ }
++ status [ $AES0 $AES1 $AES2 $AES3 ]
++ }
++}
+diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
+index 34fa5a3..70b9bab 100644
+--- a/src/conf/cards/Makefile.am
++++ b/src/conf/cards/Makefile.am
+@@ -61,7 +61,8 @@ cfg_files = aliases.conf \
+ VXPocket440.conf \
+ CS42888.conf \
+ IMX-HDMI.conf \
+- AK4458.conf
++ AK4458.conf \
++ IMX-XCVR.conf
+
+ if BUILD_ALISP
+ cfg_files += aliases.alisp
+diff --git a/src/conf/cards/aliases.conf b/src/conf/cards/aliases.conf
+index 5d92ac7..c195848 100644
+--- a/src/conf/cards/aliases.conf
++++ b/src/conf/cards/aliases.conf
+@@ -60,6 +60,7 @@ VC4-HDMI cards.vc4-hdmi
+ cs42888-audio cards.CS42888
+ imx-hdmi-soc cards.IMX-HDMI
+ ak4458-audio cards.AK4458
++imx-audio-xcvr cards.IMX-XCVR
+
+ <confdir:pcm/default.conf>
+ <confdir:pcm/dmix.conf>
+--
+2.7.4
+
diff --git a/recipes-multimedia/alsa/alsa-lib_%.bbappend b/recipes-multimedia/alsa/alsa-lib_%.bbappend
index 3bf3abff..80c11f33 100644
--- a/recipes-multimedia/alsa/alsa-lib_%.bbappend
+++ b/recipes-multimedia/alsa/alsa-lib_%.bbappend
@@ -4,6 +4,7 @@ IMX_PATCH = " \
file://0001-add-conf-for-multichannel-support-in-imx.patch \
file://0004-pcm-Don-t-store-the-state-for-SND_PCM_STATE_SUSPENDE.patch \
file://0005-add-ak4458-conf-for-multichannel-support.patch \
+ file://0006-add-conf-for-iMX-XCVR-sound-card.patch \
"
SRC_URI_append_imx = "${IMX_PATCH}"
diff --git a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb b/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
index db2f71fd..237b4925 100644
--- a/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
+++ b/recipes-multimedia/alsa/imx-alsa-plugins_1.0.26.bb
@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f"
inherit autotools pkgconfig use-imx-headers
SRCBRANCH = "MM_04.05.01_1909_L4.19.35"
-SRC_URI = "git://source.codeaurora.org/external/imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/nxp-imx/imx-alsa-plugins.git;protocol=https;branch=${SRCBRANCH}"
SRCREV = "cde60d68ab2acee913dbfacb8aabb53d87dd3e38"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch
index 088976d8..5e6a1c05 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-ext-wayland-fix-meson-build-in-nxp-fork.patch
@@ -1,4 +1,4 @@
-From e637d9f6bb961afcecb74faa6dff38562f6ce796 Mon Sep 17 00:00:00 2001
+From 9e092d8976db034a2d6848d738c4f73cc001fd09 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Date: Sun, 26 Jan 2020 10:45:28 +0000
Subject: [PATCH] ext/wayland: fix meson build in nxp fork
@@ -9,17 +9,18 @@ Subject: [PATCH] ext/wayland: fix meson build in nxp fork
Upstream-Status: Pending
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+
---
ext/wayland/meson.build | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/ext/wayland/meson.build b/ext/wayland/meson.build
-index fa6fbf42f..eb425b14f 100644
+index 3c377eefb..98a7cb76f 100644
--- a/ext/wayland/meson.build
+++ b/ext/wayland/meson.build
-@@ -8,6 +8,11 @@ wl_sources = [
- 'wllinuxdmabuf.c'
- ]
+@@ -10,6 +10,11 @@ wl_sources = [
+
+ libdrm_dep = dependency('libdrm', version: '>= 2.4.55', required:get_option('wayland'))
+imx_wl_sources = [
+ 'wlutils.c',
@@ -29,7 +30,7 @@ index fa6fbf42f..eb425b14f 100644
if use_wayland
protocols_datadir = wl_protocol_dep.get_pkgconfig_variable('pkgdatadir')
-@@ -19,6 +24,25 @@ if use_wayland
+@@ -21,6 +26,25 @@ if use_wayland
'fullscreen-shell-unstable-v1-protocol.c', 'fullscreen-shell-unstable-v1-client-protocol.h'],
['/stable/xdg-shell/xdg-shell.xml', 'xdg-shell-protocol.c', 'xdg-shell-client-protocol.h'],
]
@@ -55,6 +56,3 @@ index fa6fbf42f..eb425b14f 100644
protocols_files = []
foreach protodef: protocol_defs
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
index 13218520..4f9041dc 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch
@@ -1,8 +1,8 @@
-From 97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19 Mon Sep 17 00:00:00 2001
+From 69cff1595f9e0014c582c6f540d69d86d5e824ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
Date: Fri, 18 Oct 2019 00:39:12 +0100
-Subject: [PATCH 1/2] meson: build gir even when cross-compiling if
- introspection was enabled explicitly
+Subject: [PATCH] meson: build gir even when cross-compiling if introspection
+ was enabled explicitly
This can be made to work in certain circumstances when
cross-compiling, so default to not building g-i stuff
@@ -14,15 +14,16 @@ See gstreamer/gstreamer#454 and gstreamer/gstreamer#381.
Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19]
Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
+
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
-index 67aeeb4d0..7b3314bd9 100644
+index 2b492faea..bea89b23d 100644
--- a/meson.build
+++ b/meson.build
-@@ -411,7 +411,7 @@ python3 = import('python').find_installation()
+@@ -405,7 +405,7 @@ python3 = import('python').find_installation()
gir = find_program('g-ir-scanner', required : get_option('introspection'))
gnome = import('gnome')
@@ -31,6 +32,3 @@ index 67aeeb4d0..7b3314bd9 100644
gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \
'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch
deleted file mode 100644
index 874b8abc..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From f41f356aebee916910453031c06c111000f2f261 Mon Sep 17 00:00:00 2001
-From: Christoph Reiter <reiter.christoph@gmail.com>
-Date: Sun, 5 May 2019 22:11:16 +0200
-Subject: [PATCH] meson: fix build with opencv=enabled and opencv4. Fixes #964
-
-Having the opencv feature enabled would lead to the opencv3 dependency
-being required which failed with only opencv4 being available.
-
-Instead don't require anything and error out at the end if the feature was enabled
-but no dependency was found.
-
-Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/commit/22c6a4085f8792d8af0cdabfe1664d55ca2dee11]
-
-(cherry picked from commit 22c6a4085f8792d8af0cdabfe1664d55ca2dee11)
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- gst-libs/gst/opencv/meson.build | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build
-index 3fd472fda..8dc2ad99b 100644
---- a/gst-libs/gst/opencv/meson.build
-+++ b/gst-libs/gst/opencv/meson.build
-@@ -9,9 +9,9 @@ opencv_headers = [
- 'gstopencvvideofilter.h',
- ]
-
--opencv_dep = dependency('opencv', version : '>= 3.0.0', required : get_option('opencv'))
-+opencv_dep = dependency('opencv', version : '>= 3.0.0', required : false)
- if not opencv_dep.found()
-- opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : get_option('opencv'))
-+ opencv_dep = dependency('opencv4', version : '>= 4.0.0', required : false)
- endif
- if opencv_dep.found()
- gstopencv = library('gstopencv-' + api_version,
-@@ -30,4 +30,6 @@ if opencv_dep.found()
- dependencies : [gstvideo_dep, opencv_dep])
-
- install_headers(opencv_headers, subdir : 'gstreamer-1.0/gst/opencv')
-+elif get_option('opencv').enabled()
-+ error('OpenCV support enabled but required dependencies were not found.')
- endif
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch
deleted file mode 100644
index a9e1bd00..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.3.x.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From cfb196925312b3c3d7a19dbb9a3ce64d20d66409 Mon Sep 17 00:00:00 2001
-From: Andrey Zhizhikin <andrey.z@gmail.com>
-Date: Sat, 9 May 2020 19:56:51 +0000
-Subject: [PATCH] opencv: allow compilation against 4.3.x
-
-Backport upstream commit 4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef to NXP
-fork of gstreamer1.0-plugins-bad.
-
-Original commit link:
-https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef
-
-Upstream-Status: Backport [4cf362e2df0fb809ea0f21dd4a6fbb8b46ca54ef]
-
-Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
----
- ext/opencv/meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
-index d0ce1d3ee..05b142edc 100644
---- a/ext/opencv/meson.build
-+++ b/ext/opencv/meson.build
-@@ -65,7 +65,7 @@ if opencv_found
- endif
- endforeach
- else
-- opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.1.0'], required : false)
-+ opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.4.0'], required : false)
- opencv_found = opencv_dep.found()
- if opencv_found
- foreach h : libopencv4_headers
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch
new file mode 100644
index 00000000..525f4a45
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-opencv-allow-compilation-against-4.4.x.patch
@@ -0,0 +1,27 @@
+From a4df38174d33dc1e620ea535e16cac406ff59da2 Mon Sep 17 00:00:00 2001
+From: Nicola Murino <nicola.murino@gmail.com>
+Date: Fri, 31 Jul 2020 23:38:56 +0200
+Subject: [PATCH] opencv: allow compilation against 4.4.x
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1482>
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/8544f3928ea46d2da3f27dc65576e8baf42a46d]
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+
+---
+ ext/opencv/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build
+index a26403482..b3270e540 100644
+--- a/ext/opencv/meson.build
++++ b/ext/opencv/meson.build
+@@ -65,7 +65,7 @@ if opencv_found
+ endif
+ endforeach
+ else
+- opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.2.0'], required : false)
++ opencv_dep = dependency('opencv4', version : ['>= 4.0.0', '< 4.5.0'], required : false)
+ opencv_found = opencv_dep.found()
+ if opencv_found
+ foreach h : libopencv4_headers
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch
new file mode 100644
index 00000000..5b8e0159
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch
@@ -0,0 +1,51 @@
+From 54c700f9721ef218188803b48acae46e885626ee Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@ltnglobal.com>
+Date: Sat, 9 May 2020 19:59:46 +0200
+Subject: [PATCH] vulkan: Drop use of VK_RESULT_BEGIN_RANGE
+
+This was removed in Vulkan 1.2.140.
+
+> Shortly after 2020-04-24, we will be removing the automatically
+> generated `VK_*_BEGIN_RANGE`, `VK_*_END_RANGE`, and `VK_*_RANGE_SIZE`
+> tokens from the Vulkan headers. These tokens are currently defined for
+> some enumerated types, but are explicitly not part of the Vulkan API.
+> They existed only to support some Vulkan implementation internals,
+> which no longer require them. We will be accepting comments on this
+> topic in [#1230], but we strongly suggest any external projects using
+> these tokens immediately migrate away from them.
+
+[#1230]: https://github.com/KhronosGroup/Vulkan-Docs/issues/1230
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1603>
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/commit/17850d7e87af93c6bd181d7c25903478c2254fa6]
+Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+---
+ ext/vulkan/vkerror.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/ext/vulkan/vkerror.c b/ext/vulkan/vkerror.c
+index 3fec27e4d..c91589d9b 100644
+--- a/ext/vulkan/vkerror.c
++++ b/ext/vulkan/vkerror.c
+@@ -27,7 +27,7 @@
+ #include "vkerror.h"
+
+ /* *INDENT-OFF* */
+-static const struct
++static const struct
+ {
+ VkResult result;
+ const char *str;
+@@ -63,8 +63,6 @@ _vk_result_to_string (VkResult result)
+
+ if (result >= 0)
+ return NULL;
+- if (result < VK_RESULT_BEGIN_RANGE)
+- return "Unknown Error";
+
+ for (i = 0; i < G_N_ELEMENTS (vk_result_string_map); i++) {
+ if (result == vk_result_string_map[i].result)
+--
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
index 32261279..da2dd8bf 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
@@ -1,4 +1,4 @@
-From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001
+From 05f9a7a9025cb1c6a5592ba998ab95d565f9c76f Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Wed, 3 Feb 2016 18:05:41 -0800
Subject: [PATCH] avoid including <sys/poll.h> directly
@@ -8,12 +8,13 @@ musl libc generates warnings if <sys/poll.h> is included directly.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
sys/dvb/gstdvbsrc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
-index b93255f..49f145a 100644
+index bd07369c3..ebfbe4947 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -97,7 +97,7 @@
@@ -25,6 +26,3 @@ index b93255f..49f145a 100644
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
---
-1.9.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
index 2d5389d9..c25a11e9 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -1,4 +1,4 @@
-From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001
+From f9a8b71897af39640894915a5f202d0027124f57 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 9 Feb 2016 14:00:00 -0800
Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc
@@ -17,17 +17,18 @@ without an explicit cast to a pointer type.
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
sys/decklink/gstdecklink.cpp | 10 +++++-----
sys/decklink/gstdecklinkaudiosrc.cpp | 2 +-
sys/decklink/gstdecklinkvideosink.cpp | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
-@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck
+diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
+index 464b0de9d..9fb7246d3 100644
+--- a/sys/decklink/gstdecklink.cpp
++++ b/sys/decklink/gstdecklink.cpp
+@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f,
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
"interlace-mode", G_TYPE_STRING,
mode->interlaced ? "interleaved" : "progressive",
@@ -36,7 +37,7 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
if (input && mode->interlaced) {
if (mode->tff)
-@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck
+@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f,
case bmdFormat8BitYUV: /* '2vuy' */
gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
"colorimetry", G_TYPE_STRING, mode->colorimetry,
@@ -57,11 +58,11 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp
break;
case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
-@@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase
+diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
+index 2fef934c8..c47229abf 100644
+--- a/sys/decklink/gstdecklinkaudiosrc.cpp
++++ b/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -379,7 +379,7 @@ gst_decklink_audio_src_start (GstDecklinkAudioSrc * self)
g_mutex_unlock (&self->input->lock);
if (videosrc) {
@@ -70,11 +71,11 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp
gst_object_unref (videosrc);
switch (vconn) {
-Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
-===================================================================
---- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp
-+++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp
-@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu
+diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
+index 7aea3f7a2..4864508bb 100644
+--- a/sys/decklink/gstdecklinkvideosink.cpp
++++ b/sys/decklink/gstdecklinkvideosink.cpp
+@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
gpointer user_data)
{
gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
index 73681f10..7758300e 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
@@ -1,4 +1,4 @@
-From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001
+From e7914eb0baa3530a5075c0d3db7936ccddd8e3fe Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Tue, 26 Jan 2016 15:16:01 -0800
Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
@@ -6,12 +6,13 @@ Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
Upstream-Status: Pending
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
---
gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
-index fd16ee0..ddb890c 100644
+index ac579712d..1686f6081 100644
--- a/gst-libs/gst/codecparsers/gstvc1parser.c
+++ b/gst-libs/gst/codecparsers/gstvc1parser.c
@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
@@ -23,6 +24,3 @@ index fd16ee0..ddb890c 100644
guint8 structA[8] = { 0, };
guint8 structB[12] = { 0, };
GstBitReader br;
---
-1.9.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
index 3fe3f649..dc3a8c69 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch
@@ -1,7 +1,7 @@
-From 5830de9b1c8965683025082aeed7ccaf1dd85969 Mon Sep 17 00:00:00 2001
+From 387886b05f4ae0de9b7faf1f9ca66040d38d19ee Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Date: Sun, 26 Jan 2020 19:55:06 +0000
-Subject: [PATCH 2/2] opencv: resolve missing opencv data dir in yocto build
+Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build
When Yocto build is performed, opencv searches for data dir using simple
test command, and this fails because pkg-config provides an absolute
@@ -11,6 +11,7 @@ in order for the 'test' utility to pick up the absolute path.
Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
+
---
ext/opencv/meson.build | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
@@ -44,6 +45,3 @@ index f38b55dfe..a26403482 100644
if r.returncode() == 0
gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"'
else
---
-2.17.1
-
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
index 59aeca11..4000410d 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.imx.bb
@@ -3,30 +3,28 @@ require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
DEPENDS_append_imxgpu2d = " virtual/libg2d"
DEPENDS_append_mx8 = " libdrm"
-PACKAGECONFIG_append_mx6q = " opencv"
-PACKAGECONFIG_append_mx6qp = " opencv"
-PACKAGECONFIG_append_mx8 = " opencv kms"
+PACKAGECONFIG_append_mx8 = " kms"
DEFAULT_PREFERENCE = "-1"
PACKAGE_ARCH_imxpxp = "${MACHINE_SOCARCH}"
PACKAGE_ARCH_mx8 = "${MACHINE_SOCARCH}"
-GST1.0-PLUGINS-BAD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-bad.git;protocol=https"
-SRCBRANCH = "MM_04.05.03_1911_L5.4.0"
+GST1.0-PLUGINS-BAD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-bad.git;protocol=https"
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
SRC_URI = " \
${GST1.0-PLUGINS-BAD_SRC};branch=${SRCBRANCH} \
file://0001-ext-wayland-fix-meson-build-in-nxp-fork.patch \
file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
- file://0001-meson-fix-build-with-opencv-enabled-and-opencv4.-Fix.patch \
- file://0001-opencv-allow-compilation-against-4.3.x.patch \
file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
+ file://0001-opencv-allow-compilation-against-4.4.x.patch \
+ file://0001-vulkan-Drop-use-of-VK_RESULT_BEGIN_RANGE.patch \
file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
file://avoid-including-sys-poll.h-directly.patch \
file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
"
-SRCREV = "b80b6a2db690c815a88c2450956e23e86dbd6538"
+SRCREV = "2fdaef1839ebfef7ea3bc8c1c59463a9ef0ae19a"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch
new file mode 100644
index 00000000..f891a63a
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch
@@ -0,0 +1,87 @@
+From 8d32de090554cf29fe359f83aa46000ba658a693 Mon Sep 17 00:00:00 2001
+From: Thibault Saunier <tsaunier@igalia.com>
+Date: Fri, 27 Sep 2019 11:10:43 -0300
+Subject: [PATCH] glupload: Add VideoMetas and GLSyncMeta to the raw uploaded
+ buffers
+
+This is done by reusing `gst_gl_memory_setup_buffer` avoiding to
+duplicate code.
+
+Without a VideoMeta, mapping those buffers lead to GstBuffer mapping the
+buffer in system memory even when specifying the GL flags (through the
+buffer merging mechanism) making the result totally broken.
+
+Part-of: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/444
+Upstream-Status: Backport [8d32de090554cf29fe359f83aa46000ba658a693]
+
+Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
+---
+ gst-libs/gst/gl/gstglupload.c | 32 +++++++++++---------------------
+ tests/check/libs/gstglupload.c | 2 ++
+ 2 files changed, 13 insertions(+), 21 deletions(-)
+
+diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c
+index bc6db7e0a..67ec4f4e9 100644
+--- a/gst-libs/gst/gl/gstglupload.c
++++ b/gst-libs/gst/gl/gstglupload.c
+@@ -1293,33 +1293,23 @@ _raw_data_upload_perform (gpointer impl, GstBuffer * buffer,
+ (raw->upload->context));
+
+ /* FIXME Use a buffer pool to cache the generated textures */
+- /* FIXME: multiview support with separated left/right frames? */
+ *outbuf = gst_buffer_new ();
+- for (i = 0; i < n_mem; i++) {
+- GstGLBaseMemory *tex;
+-
+- raw->params->parent.wrapped_data = raw->in_frame->frame.data[i];
+- raw->params->plane = i;
+- raw->params->tex_format =
+- gst_gl_format_from_video_info (raw->upload->context, in_info, i);
+-
+- tex =
+- gst_gl_base_memory_alloc (allocator,
+- (GstGLAllocationParams *) raw->params);
+- if (!tex) {
+- gst_buffer_unref (*outbuf);
+- *outbuf = NULL;
+- GST_ERROR_OBJECT (raw->upload, "Failed to allocate wrapped texture");
+- return GST_GL_UPLOAD_ERROR;
+- }
++ raw->params->parent.context = raw->upload->context;
++ if (gst_gl_memory_setup_buffer ((GstGLMemoryAllocator *) allocator, *outbuf,
++ raw->params, NULL, raw->in_frame->frame.data, n_mem)) {
+
+- _raw_upload_frame_ref (raw->in_frame);
+- gst_buffer_append_memory (*outbuf, (GstMemory *) tex);
++ for (i = 0; i < n_mem; i++)
++ _raw_upload_frame_ref (raw->in_frame);
++ gst_buffer_add_gl_sync_meta (raw->upload->context, *outbuf);
++ } else {
++ GST_ERROR_OBJECT (raw->upload, "Failed to allocate wrapped texture");
++ gst_buffer_unref (*outbuf);
++ return GST_GL_UPLOAD_ERROR;
+ }
+ gst_object_unref (allocator);
+-
+ _raw_upload_frame_unref (raw->in_frame);
+ raw->in_frame = NULL;
++
+ return GST_GL_UPLOAD_DONE;
+ }
+
+diff --git a/tests/check/libs/gstglupload.c b/tests/check/libs/gstglupload.c
+index 74bff2b83..eff2f18ba 100644
+--- a/tests/check/libs/gstglupload.c
++++ b/tests/check/libs/gstglupload.c
+@@ -281,6 +281,8 @@ GST_START_TEST (test_upload_data)
+ res = gst_gl_upload_perform_with_buffer (upload, inbuf, &outbuf);
+ fail_unless (res == GST_GL_UPLOAD_DONE, "Failed to upload buffer");
+ fail_unless (GST_IS_BUFFER (outbuf));
++ fail_unless (gst_buffer_get_video_meta (outbuf));
++ fail_unless (gst_buffer_get_gl_sync_meta (outbuf));
+
+ res = gst_buffer_map (outbuf, &map_info, GST_MAP_READ | GST_MAP_GL);
+ fail_if (res == FALSE, "Failed to map gl memory");
+--
+2.28.0
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch
new file mode 100644
index 00000000..c761619f
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-viv-fb-code-must-link-against-libg2d.patch
@@ -0,0 +1,44 @@
+From 8153e86dac04076fb80fc272c8374d4ba019fa3c Mon Sep 17 00:00:00 2001
+From: Zan Dobersek <zdobersek@igalia.com>
+Date: Wed, 4 Nov 2020 14:02:10 +0100
+Subject: [PATCH] meson: viv-fb code must link against libg2d
+
+Find the libg2d library and link against it, if necessary, avoiding
+linking errors for couple of libg2d symbols.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
+---
+ gst-libs/gst/gl/meson.build | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
+index 6f6c6866d..fb6a9aabf 100644
+--- a/gst-libs/gst/gl/meson.build
++++ b/gst-libs/gst/gl/meson.build
+@@ -818,9 +818,11 @@ if need_win_gbm != 'no'
+ endif
+
+ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
+- if egl_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
++ g2d_dep = cc.find_library('g2d', required : false)
++ if egl_dep.found() and g2d_dep.found() and cc.has_function ('fbGetDisplay', dependencies : egl_dep)
+ if cc.has_function ('glTexDirectVIV', dependencies : gles2_dep)
+ enabled_gl_winsys += 'viv-fb'
++ gl_winsys_deps += [g2d_dep]
+ glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
+ glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
+ glconf.set10('GST_GL_HAVE_PHYMEM', 1)
+@@ -834,6 +836,8 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
+ ]
+ gl_cpp_args += ['-DEGL_API_FB']
+ endif
++ else
++ g2d_dep = unneeded_dep
+ endif
+ endif
+
+--
+2.28.0
+
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
index ae372729..0bb11c2c 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.imx.bb
@@ -4,9 +4,9 @@ LICENSE = "GPLv2+ & LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
-GST1.0-PLUGINS-BASE_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-base.git;protocol=https"
-SRCBRANCH = "MM_04.05.03_1911_L5.4.0"
-SRCREV = "289e06a129224b530d23b6d41f0a65cc341109c5"
+GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https"
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
+SRCREV = "cad00a3c4318c787c9661990e8f9328e4a69a329"
SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \
file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \
file://0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch \
@@ -14,6 +14,8 @@ SRC_URI = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} \
file://0005-viv-fb-Make-sure-config.h-is-included.patch \
file://0009-glimagesink-Downrank-to-marginal.patch \
file://0001-gst-libs-gst-gl-wayland-fix-meson-build.patch \
+ file://0001-glupload-Add-VideoMetas-and-GLSyncMeta-to-the-raw-up.patch \
+ file://0001-meson-viv-fb-code-must-link-against-libg2d.patch \
"
S = "${WORKDIR}/git"
@@ -41,7 +43,7 @@ PACKAGECONFIG ??= " \
OPENGL_APIS = 'opengl gles2'
OPENGL_PLATFORMS = 'egl'
-OPENGL_WINSYS = 'x11 wayland gbm'
+OPENGL_WINSYS = 'x11 wayland gbm viv-fb'
X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
@@ -70,6 +72,7 @@ PACKAGECONFIG[egl] = ",,virtual/egl"
# OpenGL window systems (except for X11)
PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
+PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
EXTRA_OEMESON += " \
-Dgl-graphene=disabled \
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
index 6134789d..5b848d0d 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.imx.bb
@@ -1,13 +1,13 @@
require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc
-GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://source.codeaurora.org/external/imx/gst-plugins-good.git;protocol=https"
-SRCBRANCH = "MM_04.05.03_1911_L5.4.0"
+GST1.0-PLUGINS-GOOD_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-good.git;protocol=https"
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
SRC_URI = " \
${GST1.0-PLUGINS-GOOD_SRC};branch=${SRCBRANCH} \
"
-SRCREV = "3bcc85705695ee629ac3fb687411bb196d231918"
+SRCREV = "fc6d8ccf3bd775517fafb1ce1d9224312d2812d8"
DEFAULT_PREFERENCE = "-1"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb
index 35996337..394fe39b 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_0.13.1.bb
@@ -18,7 +18,7 @@ PV .= "+git${SRCPV}"
SRCBRANCH ?= "master"
SRCREV = "805987bff74af13fcb14ff111955206f1c92554d"
-SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
new file mode 100644
index 00000000..7e2f2573
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-imx_2.2.0.bb
@@ -0,0 +1,80 @@
+# Copyright (C) 2018 O.S. Systems Software LTDA.
+DESCRIPTION = "GStreamer 1.0 plugins for i.MX platforms"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605"
+SECTION = "multimedia"
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base libimxdmabuffer"
+# add the audioparsers and the videoparsersbad plugins as RDEPENDS ; audioparsers
+# for the uniaudio decoder, videoparsersbad for the VPU video decoder
+# the gstreamer1.0-plugins-imx RDEPENDS is necessary to ensure the -good recipe is
+# built (it is not a compile-time dependency however, hence RDEPENDS and not DEPENDS)
+RDEPENDS_gstreamer1.0-plugins-imx = "gstreamer1.0-plugins-good gstreamer1.0-plugins-bad"
+RDEPENDS_gstreamer1.0-plugins-imx-imxaudio = "gstreamer1.0-plugins-good-audioparsers"
+RDEPENDS_gstreamer1.0-plugins-imx-imxvpu = "gstreamer1.0-plugins-bad-videoparsersbad"
+
+PV .= "+git${SRCPV}"
+
+SRCBRANCH ?= "master"
+SRCREV = "cb3cd45676e808b222ac573e8a118f44fd70c288"
+SRC_URI = "git://github.com/Freescale/gstreamer-imx.git;branch=${SRCBRANCH};protocol=https"
+
+S = "${WORKDIR}/git"
+
+# Setting DEFAULT_PREFERENCE to -1 since dunfell has had gstreamer-imx version
+# 0.13.1 for a long time already, so silently replacing it with version 2.1.0
+# may break existing BSPs.
+DEFAULT_PREFERENCE = "-1"
+
+inherit pkgconfig meson use-imx-headers
+
+# libg2d on i.MX8 SoCs with a DPU is emulated via the DPU.
+# That particular libg2d .so depends on libdrm, however.
+# Also, due to behavioral differences, an additional flag
+# is needed to improve performance.
+LIBG2D_DPU_OPTION = "-Dg2d-based-on-dpu=false"
+LIBG2D_DEPENDENCIES = "virtual/libg2d"
+LIBG2D_DPU_OPTION_imxdpu = "-Dg2d-based-on-dpu=true"
+LIBG2D_DEPENDENCIES_imxdpu = "virtual/libg2d libdrm"
+
+# OE dunfell's meson version does not have the necessary
+# functionality for build scripts to query the sysroot path,
+# so it must be specified manually via the -Dsysroot option.
+EXTRA_OEMESON += "-Dimx-headers-path=${STAGING_INCDIR_IMX} -Dsysroot=${RECIPE_SYSROOT}"
+
+PACKAGECONFIG ?= "uniaudiodec"
+PACKAGECONFIG_append_imxgpu2d = " g2d"
+PACKAGECONFIG_append_imxvpu = " vpu"
+PACKAGECONFIG_append_imxipu = " ipu"
+PACKAGECONFIG_append_imxpxp = " pxp"
+# The custom imxv4l2 source and sink elements are only
+# available on the i.MX6.
+# The 2D blitter sinks require an MXC framebuffer, which
+# is not available anymore on the i.MX8 (since these SoCs
+# now use KMS instead of the old Linux framebuffer).
+PACKAGECONFIG_append_mx6 = " imx2dvideosink v4l2-mxc-source-sink"
+PACKAGECONFIG_append_mx7 = " imx2dvideosink"
+# The custom Amphion V4L2 mem-2-mem elements are meant for
+# the QuadMax and QuadXPlus SoCs.
+PACKAGECONFIG_append_mx8qm = " v4l2-amphion"
+PACKAGECONFIG_append_mx8qxp = " v4l2-amphion"
+
+PACKAGECONFIG[g2d] = "-Dg2d=enabled ${LIBG2D_DPU_OPTION},-Dg2d=disabled,${LIBG2D_DEPENDENCIES}"
+PACKAGECONFIG[pxp] = "-Dpxp=enabled,-Dpxp=disabled,"
+PACKAGECONFIG[ipu] = "-Dipu=enabled,-Dipu=disabled,"
+PACKAGECONFIG[vpu] = "-Dvpu=enabled,-Dvpu=disabled,libimxvpuapi2"
+PACKAGECONFIG[imx2dvideosink] = "-Dimx2d-videosink=true,-Dimx2d-videosink=false,"
+PACKAGECONFIG[v4l2-mxc-source-sink] = "-Dv4l2-mxc-source-sink=true,-Dv4l2-mxc-source-sink=false,"
+# v4l2-isi is not enabled by default because the ISI devices
+# need to be turned on in the devicetree. See the readme on
+# the gstreamer-imx github site for details.
+PACKAGECONFIG[v4l2-isi] = "-Dv4l2-isi=true,-Dv4l2-isi=false,"
+PACKAGECONFIG[v4l2-amphion] = "-Dv4l2-amphion=enabled,-Dv4l2-amphion=disabled,"
+PACKAGECONFIG[uniaudiodec] = "-Duniaudiodec=enabled,-Duniaudiodec=disabled,imx-codec"
+PACKAGECONFIG[mp3encoder] = "-Dmp3encoder=enabled,-Dmp3encoder=disabled,imx-codec"
+
+require recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc
+
+# the following line is required to produce one package for each plugin
+PACKAGES_DYNAMIC = "^${PN}-.*"
+
+COMPATIBLE_MACHINE = "(mx6dl|mx6q|mx6sl|mx6sx|mx6ul|mx6ull|mx7d|mx8)"
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
index f344db2d..18fb4b5a 100644
--- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
+++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.16.imx.bb
@@ -14,8 +14,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
# Use i.MX fork of GST for customizations
-GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https"
-SRCBRANCH = "MM_04.05.03_1911_L5.4.0"
+GST1.0_SRC ?= "gitsm://github.com/nxp-imx/gstreamer.git;protocol=https"
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
SRC_URI = " \
${GST1.0_SRC};branch=${SRCBRANCH} \
@@ -25,7 +25,7 @@ SRC_URI = " \
file://0004-meson-Add-option-for-installed-tests.patch \
file://capfix.patch \
"
-SRCREV = "a4c220605ac0923596b89f4f07c05d235bc09259"
+SRCREV = "beca1b382febc2ba38a21fcb8f5092209773eb7f"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-fsl_parser.h-fix-compiler-error-with-fcommon.patch b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-fsl_parser.h-fix-compiler-error-with-fcommon.patch
new file mode 100644
index 00000000..9a0afea5
--- /dev/null
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin/0001-fsl_parser.h-fix-compiler-error-with-fcommon.patch
@@ -0,0 +1,34 @@
+From eb89cd344535706c6194359bd1f1fed50162a041 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Tue, 1 Sep 2020 08:24:52 +0000
+Subject: [PATCH] fsl_parser.h: fix compiler error with -fcommon
+
+When -fcommon is set in GCC10 configuration, following error is produced
+during linking:
+./git/ext-includes/fsl_parser.h:598: multiple definition of `TrackExtTagIndex';
+./git/ext-includes/fsl_parser.h:598: first defined here
+
+Remove unused enum name to resolve multiple definitions, it is not used
+anywhere in the code base.
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ ext-includes/fsl_parser.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext-includes/fsl_parser.h b/ext-includes/fsl_parser.h
+index d3aae20..c037c9a 100755
+--- a/ext-includes/fsl_parser.h
++++ b/ext-includes/fsl_parser.h
+@@ -595,7 +595,7 @@ enum{
+ FSL_PARSER_TRACKEXTTAG_CRYPTO_ENCRYPTED_BYTE_BLOCK,
+ FSL_PARSER_TRACKEXTTAG_CRYPTO_SKIP_BYTE_BLOCK,
+ FSL_PARSER_TRACKEXTTAG_CRYPTO_IV,
+-}TrackExtTagIndex;
++};
+
+ typedef struct _SeiPosition
+ {
+--
+2.17.1
+
diff --git a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb
index 4e244715..169f84f1 100644
--- a/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb
+++ b/recipes-multimedia/gstreamer/imx-gst1.0-plugin_4.5.3.bb
@@ -20,11 +20,13 @@ RCONFLICTS_${PN} = "gst1.0-fsl-plugin"
LIC_FILES_CHKSUM = "file://COPYING-LGPL-2;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
file://COPYING-LGPL-2.1;md5=fbc093901857fcd118f065f900982c24"
-IMXGST_SRC ?= "git://source.codeaurora.org/external/imx/imx-gst1.0-plugin.git;protocol=https"
-SRCBRANCH = "MM_04.05.03_1911_L5.4.0"
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
-SRC_URI = "${IMXGST_SRC};branch=${SRCBRANCH}"
-SRCREV = "190b80c50aa06d2fe32423f6e36d76374bb530b2"
+SRC_URI = " \
+ git://github.com/nxp-imx/imx-gst1.0-plugin.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-fsl_parser.h-fix-compiler-error-with-fcommon.patch \
+"
+SRCREV = "4d2e5c1547c5f8a5e4e26a034ab87c809b34fb54"
S = "${WORKDIR}/git"
diff --git a/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb b/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb
index e41469f3..8f5caff0 100644
--- a/recipes-multimedia/imx-codec/imx-codec_4.5.3.bb
+++ b/recipes-multimedia/imx-codec/imx-codec_4.5.5.bb
@@ -5,14 +5,14 @@
DESCRIPTION = "Freescale Multimedia codec libs"
LICENSE = "Proprietary"
SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
# Backward compatibility
PROVIDES += "libfslcodec"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "a0413b390a473aee862806dd25a4a366"
-SRC_URI[sha256sum] = "ecaecb4afb646efad9a81d67a1a5e50a9e06ed49fa8ea947064465a085b2c578"
+SRC_URI[md5sum] = "5472ae7b57a8390224761d151632a2a6"
+SRC_URI[sha256sum] = "b0d5a6f847df99ee213cc79dae4f5e7194f567859c43d68d7c7c794a97f90294"
inherit fsl-eula-unpack autotools pkgconfig
diff --git a/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb b/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb
index ee0243dd..82041e08 100644
--- a/recipes-multimedia/imx-parser/imx-parser_4.5.3.bb
+++ b/recipes-multimedia/imx-parser/imx-parser_4.5.5.bb
@@ -1,11 +1,11 @@
# Copyright (C) 2012-2018 O.S. Systems Software LTDA.
# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright 2017, 2019 NXP
+# Copyright (C) 2017, 2019 NXP
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Freescale Multimedia parser libs"
LICENSE = "Proprietary"
SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
# For backwards compatibility
PROVIDES += "libfslparser"
@@ -14,8 +14,8 @@ RPROVIDES_${PN} = "libfslparser"
RCONFLICTS_${PN} = "libfslparser"
SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-SRC_URI[md5sum] = "9659678b1a07a14558d55ed7e23e04d3"
-SRC_URI[sha256sum] = "c6cb8a06acad73f50052d18cda02be729616218472f93974390622d6acea768e"
+SRC_URI[md5sum] = "0845c64d2b64c2822328e8bc8442f5b8"
+SRC_URI[sha256sum] = "33b8377a663b2ca749f40ef1164918335913e4de02a3857f2892707647d243de"
inherit fsl-eula-unpack autotools pkgconfig
@@ -39,8 +39,6 @@ do_package_qa[prefuncs] += "__set_insane_skip"
# FIXME: gst-fsl-plugin looks for the .so files so we need to deploy those
FILES_${PN} += "${libdir}/imx-mm/*/*${SOLIBS} ${libdir}/imx-mm/*/*${SOLIBSDEV}"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
INHIBIT_SYSROOT_STRIP = "1"
COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb
deleted file mode 100644
index 3dcfcef8..00000000
--- a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.3.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright (C) 2013-2016 Freescale Semiconductor
-# Copyright 2018 (C) O.S. Systems Software LTDA.
-# Copyright 2017, 2019 NXP
-# Released under the MIT license (see COPYING.MIT for the terms)
-DESCRIPTION = "Freescale Multimedia VPU wrapper"
-DEPENDS = "virtual/imxvpu"
-LICENSE = "Proprietary"
-SECTION = "multimedia"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fd4b227530cd88a82af6a5982cfb724d"
-
-# For backwards compatibility
-PROVIDES += "libfslvpuwrap"
-RREPLACES_${PN} = "libfslvpuwrap"
-RPROVIDES_${PN} = "libfslvpuwrap"
-RCONFLICTS_${PN} = "libfslvpuwrap"
-
-SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true"
-
-SRC_URI[md5sum] = "41515584410b9e9a75d0880b51af5d76"
-SRC_URI[sha256sum] = "b2a7297afc9c5e1caebc1f3b7b4755430f595241d283c61cd0a3ba13dcf5c82b"
-
-inherit fsl-eula-unpack autotools pkgconfig
-
-do_install_append() {
- # FIXME: Drop examples for now
- rm -r ${D}${datadir}
-}
-
-INSANE_SKIP_imx-vpuwrap = "file-rdeps"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "(imxvpu)"
diff --git a/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb
new file mode 100644
index 00000000..06f97b09
--- /dev/null
+++ b/recipes-multimedia/imx-vpuwrap/imx-vpuwrap_4.5.5.bb
@@ -0,0 +1,29 @@
+# Copyright (C) 2013-2016 Freescale Semiconductor
+# Copyright (C) 2017-2020 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Freescale Multimedia VPU wrapper"
+LICENSE = "Proprietary"
+SECTION = "multimedia"
+LIC_FILES_CHKSUM = "file://COPYING;md5=228c72f2a91452b8a03c4cab30f30ef9"
+
+DEPENDS = "virtual/imxvpu"
+DEPENDS_append_mx8mp = " imx-vpu-hantro-vc"
+
+SRC_URI = "git://github.com/NXP/imx-vpuwrap.git;protocol=https;branch=${SRCBRANCH}"
+
+SRCBRANCH = "MM_04.05.05_2005_L5.4.24"
+SRCREV = "76225d8e15b2b72cd11ce073706473473e446294"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+ # FIXME: Drop examples for now
+ rm -r ${D}${datadir}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+COMPATIBLE_MACHINE = "(imxvpu)"
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb
index 9a4497d8..51e6b554 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.0.1.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi2_2.3.0.bb
@@ -4,12 +4,15 @@ LICENSE = "LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE;md5=38fa42a5a6425b26d2919b17b1527324"
SECTION = "multimedia"
DEPENDS = "virtual/imxvpu libimxdmabuffer"
+# Add imx-vpu-hantro-vc as dependency for being
+# able to encode video using the VC8000E encoder
+DEPENDS_append_mx8mp = " imx-vpu-hantro-vc"
PV .= "+git${SRCPV}"
SRCBRANCH ?= "master"
-SRCREV = "9a5e84af53e6765c4f0ea299df264a4e32a13ea7"
-SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}"
+SRCREV = "6f803f46d6b53a08cf02fc3d440072e01e2f3a09"
+SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
S = "${WORKDIR}/git"
@@ -18,6 +21,7 @@ inherit waf pkgconfig use-imx-headers
IMX_PLATFORM_mx6 = "imx6"
IMX_PLATFORM_mx8mq = "imx8m"
IMX_PLATFORM_mx8mm = "imx8mm"
+IMX_PLATFORM_mx8mp = "imx8mp"
EXTRA_OECONF = "--imx-platform=${IMX_PLATFORM} --libdir=${libdir} --imx-headers=${STAGING_INCDIR_IMX} --sysroot-path=${RECIPE_SYSROOT}"
diff --git a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
index 2d0f8571..778514fb 100644
--- a/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
+++ b/recipes-multimedia/libimxvpuapi/libimxvpuapi_git.bb
@@ -10,7 +10,7 @@ PV = "0.10.3+${SRCPV}"
SRCBRANCH ?= "v1"
SRCREV = "3a1ee3a54fe93813868d38c3d32ea065b59e227e"
-SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH}"
+SRC_URI = "git://github.com/Freescale/libimxvpuapi.git;branch=${SRCBRANCH};protocol=https"
S = "${WORKDIR}/git"
diff --git a/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch b/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
index 86c360f2..9c6b1069 100644
--- a/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
+++ b/recipes-security/optee-imx/optee-client/0001-flags-do-not-override-CFLAGS-from-host.patch
@@ -1,4 +1,4 @@
-From 6a600c5637c5446ab3d11eb4304a1dd473ec503e Mon Sep 17 00:00:00 2001
+From 591461d6efe51989b4a7f4e875cdf37505eba360 Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Thu, 4 Jun 2020 19:24:05 +0000
Subject: [PATCH] flags: do not override CFLAGS from host
@@ -19,11 +19,11 @@ Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
---
- flags.mk | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ flags.mk | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/flags.mk b/flags.mk
-index 71f3d18..faabef9 100644
+index c2f0e1c..65192bc 100644
--- a/flags.mk
+++ b/flags.mk
@@ -6,7 +6,7 @@ CROSS_COMPILE ?= arm-linux-gnueabihf-
@@ -35,10 +35,13 @@ index 71f3d18..faabef9 100644
-Werror-implicit-function-declaration -Wextra \
-Wfloat-equal -Wformat-nonliteral -Wformat-security \
-Wformat=2 -Winit-self -Wmissing-declarations \
-@@ -15,11 +15,11 @@ CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
- -Wpointer-arith -Wshadow -Wstrict-prototypes \
+@@ -16,13 +16,13 @@ CFLAGS := -Wall -Wbad-function-cast -Wcast-align \
-Wswitch-default -Wunsafe-loop-optimizations \
- -Wwrite-strings -Werror
+ -Wwrite-strings -D_FILE_OFFSET_BITS=64
+ ifeq ($(CFG_WERROR),y)
+-CFLAGS += -Werror
++override CFLAGS += -Werror
+ endif
-CFLAGS += -c -fPIC
+override CFLAGS += -c -fPIC
diff --git a/recipes-security/optee-imx/optee-client_3.2.0.imx.bb b/recipes-security/optee-imx/optee-client_3.7.0.imx.bb
index 19770849..ee0cead8 100644
--- a/recipes-security/optee-imx/optee-client_3.2.0.imx.bb
+++ b/recipes-security/optee-imx/optee-client_3.7.0.imx.bb
@@ -7,35 +7,35 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
inherit python3native systemd
-SRCBRANCH = "lf-5.4.y"
-OPTEE_CLIENT_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https"
-SRC_URI = "${OPTEE_CLIENT_SRC};branch=${SRCBRANCH}"
+SRCBRANCH = "imx_5.4.24_2.1.0"
+SRC_URI = "git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH}"
-SRCREV = "71a9bef78fff2d5d4db8a2307d3b91e2aa671dc9"
+SRCREV = "bc0ec8ce1e4dc5ae23f4737ef659338b7cd408fe"
SRC_URI += "file://tee-supplicant.service \
file://0001-flags-do-not-override-CFLAGS-from-host.patch \
"
S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH_armv7a = "arm32"
OPTEE_ARCH_aarch64 = "arm64"
-EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH}"
+EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}"
do_install () {
- oe_runmake install
+ oe_runmake -C ${S} install
- install -D -p -m0644 ${S}/out/export/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
+ install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
- install -D -p -m0755 ${S}/out/export/bin/tee-supplicant ${D}${bindir}/tee-supplicant
+ install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant
- cp -a ${S}/out/export/include ${D}/usr/
+ cp -a ${B}/export/usr/include ${D}/usr/
sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${WORKDIR}/tee-supplicant.service
install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
diff --git a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch b/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
index 509c7fb6..ab42d340 100644
--- a/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
+++ b/recipes-security/optee-imx/optee-os/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
@@ -1,4 +1,4 @@
-From 027a3b9a33fbb23e1d1d7ed6411d4d112d2a55a1 Mon Sep 17 00:00:00 2001
+From 109ed8d9a5351c7bb0fdc0953c7e7fb6cedcad9c Mon Sep 17 00:00:00 2001
From: Andrey Zhizhikin <andrey.z@gmail.com>
Date: Sat, 30 May 2020 22:00:59 +0000
Subject: [PATCH] optee-os: fix gcc10 compilation issue and missing cc-options
@@ -14,17 +14,17 @@ Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/3891]
Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
---
- core/arch/arm/arm.mk | 21 ++++++++++++++++-----
+ core/arch/arm/arm.mk | 22 +++++++++++++++++-----
core/core.mk | 5 +----
mk/cc-option.mk | 9 +++++++++
mk/gcc.mk | 2 +-
ta/mk/ta_dev_kit.mk | 3 +++
ta/ta.mk | 1 +
- 6 files changed, 31 insertions(+), 10 deletions(-)
+ 6 files changed, 32 insertions(+), 10 deletions(-)
create mode 100644 mk/cc-option.mk
diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk
-index aa101be8..4123d85d 100644
+index 5defb327..fffa491a 100644
--- a/core/arch/arm/arm.mk
+++ b/core/arch/arm/arm.mk
@@ -1,3 +1,16 @@
@@ -44,7 +44,7 @@ index aa101be8..4123d85d 100644
CFG_LTC_OPTEE_THREAD ?= y
# Size of emulated TrustZone protected SRAM, 448 kB.
# Only applicable when paging is enabled.
-@@ -88,7 +101,7 @@ arm32-platform-aflags-no-hard-float ?=
+@@ -106,7 +119,7 @@ arm32-platform-aflags-no-hard-float ?=
arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only
arm64-platform-cflags-hard-float ?=
@@ -53,7 +53,7 @@ index aa101be8..4123d85d 100644
ifeq ($(DEBUG),1)
# For backwards compatibility
-@@ -117,14 +130,12 @@ core-platform-aflags += $(platform-aflags-generic)
+@@ -135,14 +148,12 @@ core-platform-aflags += $(platform-aflags-generic)
core-platform-aflags += $(platform-aflags-debug-info)
ifeq ($(CFG_ARM64_core),y)
@@ -68,16 +68,20 @@ index aa101be8..4123d85d 100644
core-platform-cppflags += $(arm32-platform-cppflags)
core-platform-cflags += $(arm32-platform-cflags)
core-platform-cflags += $(arm32-platform-cflags-no-hard-float)
-@@ -196,5 +207,5 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_
- ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_
+@@ -241,8 +252,9 @@ ta-mk-file-export-add-ta_arm64 += COMPILER ?= gcc_nl_
+ ta-mk-file-export-add-ta_arm64 += COMPILER_ta_arm64 ?= $$(COMPILER)_nl_
endif
-# Set cross compiler prefix for each submodule
-$(foreach sm, core $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm)))))
+# Set cross compiler prefix for each TA target
+$(foreach sm, $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm)))))
++
+
+ arm32-sysreg-txt = core/arch/arm/kernel/arm32_sysreg.txt
+ arm32-sysregs-$(arm32-sysreg-txt)-h := arm32_sysreg.h
diff --git a/core/core.mk b/core/core.mk
-index c05815f3..68f45552 100644
+index a51cf847..28c7235c 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -8,6 +8,7 @@ arch-dir := core/arch/$(ARCH)
@@ -89,7 +93,7 @@ index c05815f3..68f45552 100644
PLATFORM_$(PLATFORM) := y
@@ -16,10 +17,6 @@ PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y
- $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA)
+ $(eval $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA))
include core/crypto.mk
-# Setup compiler for this sub module
@@ -128,10 +132,10 @@ index 1f2c5990..c53a23b1 100644
# Define these to something to discover accidental use
diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk
-index fa0bddfe..ae70ef87 100644
+index 04a4f94b..e4b02ea7 100644
--- a/ta/mk/ta_dev_kit.mk
+++ b/ta/mk/ta_dev_kit.mk
-@@ -78,6 +78,9 @@ clean:
+@@ -92,6 +92,9 @@ clean:
@$(cmd-echo-silent) ' CLEAN $(O)'
${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi
@@ -139,16 +143,16 @@ index fa0bddfe..ae70ef87 100644
+include $(ta-dev-kit-dir$(sm))/mk/cc-option.mk
+
subdirs = .
- include $(ta-dev-kit-dir)/mk/subdir.mk
+ include $(ta-dev-kit-dir$(sm))/mk/subdir.mk
diff --git a/ta/ta.mk b/ta/ta.mk
-index 32353de3..9c64319d 100644
+index dde7be67..ca17054a 100644
--- a/ta/ta.mk
+++ b/ta/ta.mk
-@@ -98,6 +98,7 @@ $(foreach f, $(libfiles), \
+@@ -157,6 +157,7 @@ $(foreach f, $(libfiles), \
# Copy .mk files
- ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/cleandirs.mk \
+ ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/clang.mk mk/cleandirs.mk \
+ mk/cc-option.mk \
ta/arch/$(ARCH)/link.mk ta/arch/$(ARCH)/link_shlib.mk \
ta/mk/ta_dev_kit.mk
diff --git a/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch b/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch
deleted file mode 100644
index 9621cf6c..00000000
--- a/recipes-security/optee-imx/optee-os/0001-scripts-update-scripts-to-use-python3.patch
+++ /dev/null
@@ -1,427 +0,0 @@
-From 0d4941123b5a88351f5954f6de00892f85ed5abc Mon Sep 17 00:00:00 2001
-From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
-Date: Mon, 20 Jan 2020 22:32:13 +0000
-Subject: [PATCH] scripts: update scripts to use python3
-
-Python2 is deprecated effective Jan. 2020, and is not available in
-several distributions.
-
-Update scripts here to re-target then onto python version 3.
-
-Upstream-Status: Pending
-
-Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
----
- scripts/gen_hashed_bin.py | 282 ++++++++++++++++++++------------------
- scripts/gen_ld_sects.py | 8 +-
- scripts/pem_to_pub_c.py | 2 +-
- scripts/sign.py | 2 +-
- scripts/symbolize.py | 2 +-
- scripts/ta_bin_to_c.py | 2 +-
- scripts/tee_bin_parser.py | 2 +-
- 7 files changed, 157 insertions(+), 143 deletions(-)
-
-diff --git a/scripts/gen_hashed_bin.py b/scripts/gen_hashed_bin.py
-index 32350a47..a76a62cc 100755
---- a/scripts/gen_hashed_bin.py
-+++ b/scripts/gen_hashed_bin.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2014-2017, Linaro Limited
-@@ -14,163 +14,177 @@ import hashlib
- arch_id = {'arm32': 0, 'arm64': 1}
- image_id = {'pager': 0, 'paged': 1}
-
-+
- def write_header_v1(outf, init_size, args, paged_size):
-- magic = 0x4554504f # 'OPTE'
-- version = 1;
-- outf.write(struct.pack('<IBBHIIIII', \
-- magic, version, arch_id[args.arch], args.flags, init_size, \
-- args.init_load_addr_hi, args.init_load_addr_lo, \
-- args.init_mem_usage, paged_size))
-+ magic = 0x4554504f # 'OPTE'
-+ version = 1
-+ outf.write(struct.pack('<IBBHIIIII',
-+ magic,
-+ version,
-+ arch_id[args.arch],
-+ args.flags,
-+ init_size,
-+ args.init_load_addr_hi,
-+ args.init_load_addr_lo,
-+ args.init_mem_usage,
-+ paged_size))
-+
-
- def write_header_v2(outf, init_size, args, paged_size):
-- magic = 0x4554504f # 'OPTE'
-- version = 2
-- nb_images = 1 if paged_size == 0 else 2
-- outf.write(struct.pack('<IBBHI', \
-- magic, version, arch_id[args.arch], args.flags, nb_images))
-- outf.write(struct.pack('<IIII', \
-- args.init_load_addr_hi, args.init_load_addr_lo, \
-- image_id['pager'], init_size))
-- if nb_images == 2:
-- outf.write(struct.pack('<IIII', \
-- 0xffffffff, 0xffffffff, image_id['paged'], paged_size))
-+ magic = 0x4554504f # 'OPTE'
-+ version = 2
-+ nb_images = 1 if paged_size == 0 else 2
-+ outf.write(struct.pack('<IBBHI', magic, version,
-+ arch_id[args.arch], args.flags, nb_images))
-+ outf.write(struct.pack('<IIII',
-+ args.init_load_addr_hi, args.init_load_addr_lo,
-+ image_id['pager'], init_size))
-+ if nb_images == 2:
-+ outf.write(
-+ struct.pack(
-+ '<IIII',
-+ 0xffffffff,
-+ 0xffffffff,
-+ image_id['paged'],
-+ paged_size))
-+
-
- def append_to(outf, start_offs, in_fname, max_bytes=0xffffffff):
-- #print "Appending %s@0x%x 0x%x bytes at position 0x%x" % \
-- #( in_fname, start_offs, max_bytes, int(outf.tell()) )
-- inf = open(in_fname, 'rb');
-- inf.seek(start_offs)
-- while True :
-- nbytes = min(16 * 1024, max_bytes)
-- if nbytes == 0 :
-- break
-- #print "Reading %s %d bytes" % (in_fname, nbytes)
-- buf = inf.read(nbytes)
-- if not buf :
-- break
-- outf.write(buf)
-- max_bytes -= len(buf)
-- inf.close()
-+ inf = open(in_fname, 'rb')
-+ inf.seek(start_offs)
-+ while True:
-+ nbytes = min(16 * 1024, max_bytes)
-+ if nbytes == 0:
-+ break
-+ buf = inf.read(nbytes)
-+ if not buf:
-+ break
-+ outf.write(buf)
-+ max_bytes -= len(buf)
-+ inf.close()
-+
-
- def append_hashes(outf, in_fname):
-- page_size = 4 * 1024
--
-- inf = open(in_fname, 'r')
-- while True :
-- page = inf.read(page_size)
-- if len(page) == page_size :
-- #print "Writing hash at position 0x%x" % \
-- #int(outf.tell())
-- outf.write(hashlib.sha256(page).digest())
-- elif len(page) == 0 :
-- break
-- else :
-- print("Error: short read, got " + repr(len(page)))
-- sys.exit(1)
--
-- inf.close()
-+ page_size = 4 * 1024
-+
-+ inf = open(in_fname, 'rb')
-+ while True:
-+ page = inf.read(page_size)
-+ if len(page) == page_size:
-+ outf.write(hashlib.sha256(page).digest())
-+ elif len(page) == 0:
-+ break
-+ else:
-+ print("Error: short read, got {}".format(len(page)))
-+ sys.exit(1)
-+
-+ inf.close()
-+
-
- def int_parse(str):
-- return int(str, 0)
-+ return int(str, 0)
-+
-
- def get_args():
-- parser = argparse.ArgumentParser()
-- parser.add_argument('--arch', required=True, \
-- choices=arch_id.keys(), \
-- help='Architecture')
-+ parser = argparse.ArgumentParser()
-+ parser.add_argument('--arch', required=True,
-+ choices=list(arch_id.keys()),
-+ help='Architecture')
-
-- parser.add_argument('--flags', \
-- type=int, default=0, \
-- help='Flags, currently none defined')
-+ parser.add_argument('--flags',
-+ type=int, default=0,
-+ help='Flags, currently none defined')
-
-- parser.add_argument('--init_size', \
-- required=True, type=int_parse, \
-- help='Size of initialization part of binary')
-+ parser.add_argument('--init_size',
-+ required=True, type=int_parse,
-+ help='Size of initialization part of binary')
-
-- parser.add_argument('--init_load_addr_hi', \
-- type=int_parse, default=0, \
-- help='Upper 32 bits of load address of binary')
-+ parser.add_argument('--init_load_addr_hi',
-+ type=int_parse, default=0,
-+ help='Upper 32 bits of load address of binary')
-
-- parser.add_argument('--init_load_addr_lo', \
-- required=True, type=int_parse, \
-- help='Lower 32 bits of load address of binary')
-+ parser.add_argument('--init_load_addr_lo',
-+ required=True, type=int_parse,
-+ help='Lower 32 bits of load address of binary')
-
-- parser.add_argument('--init_mem_usage', \
-- required=True, type=int_parse, \
-- help='Total amount of used memory when initializing');
-+ parser.add_argument('--init_mem_usage',
-+ required=True, type=int_parse,
-+ help='Total amount of used memory when initializing')
-
-- parser.add_argument('--tee_pager_bin', \
-- required=True, \
-- help='The input tee_pager.bin')
-+ parser.add_argument('--tee_pager_bin',
-+ required=True,
-+ help='The input tee_pager.bin')
-
-- parser.add_argument('--tee_pageable_bin', \
-- required=True, \
-- help='The input tee_pageable.bin')
-+ parser.add_argument('--tee_pageable_bin',
-+ required=True,
-+ help='The input tee_pageable.bin')
-
-- parser.add_argument('--out', \
-- required=False, type=argparse.FileType('wb'), \
-- help='The output tee.bin')
-+ parser.add_argument('--out',
-+ required=False, type=argparse.FileType('wb'),
-+ help='The output tee.bin')
-
-- parser.add_argument('--out_header_v2', \
-- required=False, type=argparse.FileType('wb'), \
-- help='The output tee_header_v2.bin')
-+ parser.add_argument('--out_header_v2',
-+ required=False, type=argparse.FileType('wb'),
-+ help='The output tee_header_v2.bin')
-
-- parser.add_argument('--out_pager_v2', \
-- required=False, type=argparse.FileType('wb'), \
-- help='The output tee_pager_v2.bin')
-+ parser.add_argument('--out_pager_v2',
-+ required=False, type=argparse.FileType('wb'),
-+ help='The output tee_pager_v2.bin')
-
-- parser.add_argument('--out_pageable_v2', \
-- required=False, type=argparse.FileType('wb'), \
-- help='The output tee_pageable_v2.bin')
-+ parser.add_argument('--out_pageable_v2',
-+ required=False, type=argparse.FileType('wb'),
-+ help='The output tee_pageable_v2.bin')
-+
-+ return parser.parse_args()
-
-- return parser.parse_args();
-
- def main():
-- args = get_args()
-- init_bin_size = args.init_size
-- tee_pager_fname = args.tee_pager_bin
-- tee_pageable_fname = args.tee_pageable_bin
-- pager_input_size = os.path.getsize(tee_pager_fname);
-- paged_input_size = os.path.getsize(tee_pageable_fname);
-- hash_size = paged_input_size / (4 * 1024) * \
-- hashlib.sha256().digest_size
--
-- if paged_input_size % (4 * 1024) != 0:
-- print("Error: pageable size not a multiple of 4K:" + \
-- repr(paged_input_size))
-- sys.exit(1)
--
-- init_size = pager_input_size + \
-- min(init_bin_size, paged_input_size) + \
-- hash_size
-- paged_size = paged_input_size - \
-- min(init_bin_size, paged_input_size)
--
-- if args.out is not None:
-- outf = args.out
-- write_header_v1(outf, init_size, args, paged_size)
-- append_to(outf, 0, tee_pager_fname)
-- append_to(outf, 0, tee_pageable_fname, init_bin_size)
-- append_hashes(outf, tee_pageable_fname)
-- append_to(outf, init_bin_size, tee_pageable_fname)
-- outf.close()
--
-- if args.out_header_v2 is not None:
-- outf = args.out_header_v2
-- write_header_v2(outf, init_size, args, paged_size)
-- outf.close()
--
-- if args.out_pager_v2 is not None:
-- outf = args.out_pager_v2
-- append_to(outf, 0, tee_pager_fname)
-- append_to(outf, 0, tee_pageable_fname, init_bin_size)
-- append_hashes(outf, tee_pageable_fname)
-- outf.close()
--
-- if args.out_pageable_v2 is not None:
-- outf = args.out_pageable_v2
-- append_to(outf, init_bin_size, tee_pageable_fname)
-- outf.close()
-+ args = get_args()
-+ init_bin_size = args.init_size
-+ tee_pager_fname = args.tee_pager_bin
-+ tee_pageable_fname = args.tee_pageable_bin
-+ pager_input_size = os.path.getsize(tee_pager_fname)
-+ paged_input_size = os.path.getsize(tee_pageable_fname)
-+ hash_size = paged_input_size // (4 * 1024) * \
-+ hashlib.sha256().digest_size
-+
-+ if paged_input_size % (4 * 1024) != 0:
-+ print("Error: pageable size not a multiple of 4K: {}".format(
-+ paged_input_size))
-+ sys.exit(1)
-+
-+ init_size = pager_input_size + \
-+ min(init_bin_size, paged_input_size) + \
-+ hash_size
-+ paged_size = paged_input_size - \
-+ min(init_bin_size, paged_input_size)
-+
-+ if args.out is not None:
-+ outf = args.out
-+ write_header_v1(outf, init_size, args, paged_size)
-+ append_to(outf, 0, tee_pager_fname)
-+ append_to(outf, 0, tee_pageable_fname, init_bin_size)
-+ append_hashes(outf, tee_pageable_fname)
-+ append_to(outf, init_bin_size, tee_pageable_fname)
-+ outf.close()
-+
-+ if args.out_header_v2 is not None:
-+ outf = args.out_header_v2
-+ write_header_v2(outf, init_size, args, paged_size)
-+ outf.close()
-+
-+ if args.out_pager_v2 is not None:
-+ outf = args.out_pager_v2
-+ append_to(outf, 0, tee_pager_fname)
-+ append_to(outf, 0, tee_pageable_fname, init_bin_size)
-+ append_hashes(outf, tee_pageable_fname)
-+ outf.close()
-+
-+ if args.out_pageable_v2 is not None:
-+ outf = args.out_pageable_v2
-+ append_to(outf, init_bin_size, tee_pageable_fname)
-+ outf.close()
-+
-
- if __name__ == "__main__":
-- main()
-+ main()
-diff --git a/scripts/gen_ld_sects.py b/scripts/gen_ld_sects.py
-index c5dc3a7b..2bdbb192 100755
---- a/scripts/gen_ld_sects.py
-+++ b/scripts/gen_ld_sects.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2017, Linaro Limited
-@@ -8,8 +8,8 @@ import sys
- import re
-
- def usage():
-- print "Usage: {0} <section reg exp match> [<skip section>...]".format( \
-- sys.argv[0])
-+ print("Usage: {0} <section reg exp match> [<skip section>...]".format( \
-+ sys.argv[0]))
- sys.exit (1)
-
- def main():
-@@ -55,7 +55,7 @@ def main():
- if sect_name in skip_sections :
- continue
-
-- print '\t*({0})'.format(sect_name)
-+ print ('\t*({0})'.format(sect_name))
-
- if __name__ == "__main__":
- main()
-diff --git a/scripts/pem_to_pub_c.py b/scripts/pem_to_pub_c.py
-index 6b8fa365..0b03d62e 100755
---- a/scripts/pem_to_pub_c.py
-+++ b/scripts/pem_to_pub_c.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2015, Linaro Limited
-diff --git a/scripts/sign.py b/scripts/sign.py
-index ad47479b..348b40a2 100755
---- a/scripts/sign.py
-+++ b/scripts/sign.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- #
- # Copyright (c) 2015, 2017, Linaro Limited
- #
-diff --git a/scripts/symbolize.py b/scripts/symbolize.py
-index 1eecf758..0e9bd3ed 100755
---- a/scripts/symbolize.py
-+++ b/scripts/symbolize.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2017, Linaro Limited
-diff --git a/scripts/ta_bin_to_c.py b/scripts/ta_bin_to_c.py
-index cabddbbd..f325fda0 100755
---- a/scripts/ta_bin_to_c.py
-+++ b/scripts/ta_bin_to_c.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2017, Linaro Limited
-diff --git a/scripts/tee_bin_parser.py b/scripts/tee_bin_parser.py
-index 5f7dd3f0..07da5791 100755
---- a/scripts/tee_bin_parser.py
-+++ b/scripts/tee_bin_parser.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/bin/env python3
- # SPDX-License-Identifier: BSD-2-Clause
- #
- # Copyright (c) 2016, Linaro Limited
---
-2.17.1
-
diff --git a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb b/recipes-security/optee-imx/optee-os_3.7.0.imx.bb
index d2c82940..e7116b25 100644
--- a/recipes-security/optee-imx/optee-os_3.2.0.imx.bb
+++ b/recipes-security/optee-imx/optee-os_3.7.0.imx.bb
@@ -1,23 +1,22 @@
-# Copyright (C) 2017-2018 NXP
+# Copyright (C) 2017-2020 NXP
SUMMARY = "OPTEE OS"
DESCRIPTION = "OPTEE OS"
HOMEPAGE = "http://www.optee.org/"
LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
inherit deploy python3native autotools
-DEPENDS = "python3-pycrypto-native u-boot-mkimage-native"
+DEPENDS = "python3-pycryptodome-native python3-pyelftools-native u-boot-mkimage-native"
+
+SRCBRANCH = "imx_5.4.24_2.1.0"
-SRCBRANCH = "lf-5.4.y"
-OPTEE_OS_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https"
SRC_URI = "\
- ${OPTEE_OS_SRC};branch=${SRCBRANCH} \
- file://0001-scripts-update-scripts-to-use-python3.patch \
+ git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \
file://0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch \
"
-SRCREV = "6d99b525af752ecdaabdca6098b2564b2665f2b2"
+SRCREV = "7a49776de59265500f10a247125429fde1555ac1"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build.${PLATFORM_FLAVOR}"
@@ -29,9 +28,13 @@ PLATFORM_FLAVOR_imx6ul7d = "mx6ulevk"
PLATFORM_FLAVOR_imx6ull14x14evk = "mx6ullevk"
PLATFORM_FLAVOR_imx6ull9x9evk = "mx6ullevk"
PLATFORM_FLAVOR_imx6ulz14x14evk = "mx6ulzevk"
-PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
-PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
-PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
+PLATFORM_FLAVOR_mx8mm = "mx8mmevk"
+PLATFORM_FLAVOR_mx8mn = "mx8mnevk"
+PLATFORM_FLAVOR_mx8qxp = "mx8qxpmek"
+PLATFORM_FLAVOR_mx8mp = "mx8mpevk"
+PLATFORM_FLAVOR_mx8dx = "mx8dxmek"
+PLATFORM_FLAVOR_mx8dxl = "mx8dxlevk"
+PLATFORM_FLAVOR_mx8phantomdxl = "mx8qxpmek"
OPTEE_ARCH ?= "arm32"
OPTEE_ARCH_armv7a = "arm32"
@@ -42,19 +45,20 @@ OPTEE_ARCH_aarch64 = "arm64"
# For 64bits, CROSS_COMPILE64 must be set
# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
# any 32 or 64 bits builds will pass
-EXTRA_OEMAKE = "PLATFORM=imx PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
- CROSS_COMPILE=${HOST_PREFIX} \
- CROSS_COMPILE64=${HOST_PREFIX} \
- NOWERROR=1 \
- LDFLAGS= \
- O=${B} \
- "
-
+EXTRA_OEMAKE = " \
+ PLATFORM=imx \
+ PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \
+ CROSS_COMPILE=${HOST_PREFIX} \
+ CROSS_COMPILE64=${HOST_PREFIX} \
+ NOWERROR=1 \
+ LDFLAGS= \
+ O=${B} \
+"
do_compile () {
unset LDFLAGS
export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}"
- oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0
+ oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0 CFG_TEE_CORE_LOG_LEVEL=0
}
diff --git a/recipes-security/optee-imx/optee-test_3.2.0.imx.bb b/recipes-security/optee-imx/optee-test_3.2.0.imx.bb
deleted file mode 100644
index c78f9816..00000000
--- a/recipes-security/optee-imx/optee-test_3.2.0.imx.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright (C) 2017-2018 NXP
-
-SUMMARY = "OPTEE test"
-HOMEPAGE = "http://www.optee.org/"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
-
-DEPENDS = "optee-os optee-client python3-pycrypto-native openssl"
-inherit python3native
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRCBRANCH = "lf-5.4.y"
-OPTEE_TEST_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https"
-
-SRC_URI = "${OPTEE_TEST_SRC};branch=${SRCBRANCH} \
- file://0003-sock_server-fix-compilation-against-musl-sys-errno.h.patch \
- file://0004-build-ignore-declaration-after-statement-warnings.patch \
- file://0005-benchmark_1000-fix-compilation-against-musl-uint.patch \
- file://0006-regression_8100-use-null-terminated-strings-with-fil.patch \
- file://0001-use-python3-instead-of-python.patch \
-"
-
-S = "${WORKDIR}/git"
-
-SRCREV = "b7114b828b82f2c0eec124ed424eff1230cc5319"
-
-OPTEE_ARCH ?= "arm32"
-OPTEE_ARCH_armv7a = "arm32"
-OPTEE_ARCH_aarch64 = "arm64"
-
-do_compile () {
- export TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_${OPTEE_ARCH}/
- export ARCH=${OPTEE_ARCH}
-
- export OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr
- export CROSS_COMPILE_HOST=${HOST_PREFIX}
- export CROSS_COMPILE_TA=${HOST_PREFIX}
- export CROSS_COMPILE=${HOST_PREFIX}
- export OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/
- oe_runmake V=1 --warn-undefined-variables
-}
-
-do_install () {
- install -d ${D}/usr/bin
- install ${S}/out/xtest/xtest ${D}/usr/bin/
-
- install -d ${D}/lib/optee_armtz
- find ${S}/out/ta -name '*.ta' | while read name; do
- install -m 444 $name ${D}/lib/optee_armtz/
- done
-
-}
-
-FILES_${PN} = "/usr/bin/ /lib*/optee_armtz/"
-
-COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-security/optee-imx/optee-test_3.7.0.imx.bb b/recipes-security/optee-imx/optee-test_3.7.0.imx.bb
new file mode 100644
index 00000000..13066507
--- /dev/null
+++ b/recipes-security/optee-imx/optee-test_3.7.0.imx.bb
@@ -0,0 +1,62 @@
+# Copyright (C) 2017-2018 NXP
+
+SUMMARY = "OPTEE test"
+HOMEPAGE = "http://www.optee.org/"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
+
+DEPENDS = "optee-os optee-client python3-pycrypto-native openssl"
+inherit python3native
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRCBRANCH = "imx_5.4.24_2.1.0"
+
+SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH} \
+ file://0001-use-python3-instead-of-python.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+SRCREV = "227d6f4c40eaa6f84fe049b9e48c7b27ad7fab08"
+
+OPTEE_ARCH ?= "arm32"
+OPTEE_ARCH_armv7a = "arm32"
+OPTEE_ARCH_aarch64 = "arm64"
+
+TA_DEV_KIT_DIR_arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32/"
+TA_DEV_KIT_DIR_aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64/"
+
+EXTRA_OEMAKE = " \
+ TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
+ ARCH=${OPTEE_ARCH} \
+ OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr \
+ CROSS_COMPILE_HOST=${HOST_PREFIX} \
+ CROSS_COMPILE_TA=${HOST_PREFIX} \
+ CROSS_COMPILE=${HOST_PREFIX} \
+ OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \
+ -C ${S} O=${B} \
+"
+do_compile() {
+ cd ${S}
+ # Top level makefile doesn't seem to handle parallel make gracefully
+ oe_runmake xtest
+ oe_runmake ta
+}
+do_compile[cleandirs] = "${B}"
+
+do_install () {
+ install -d ${D}/usr/bin
+ install ${B}/xtest/xtest ${D}/usr/bin/
+
+ install -d ${D}/lib/optee_armtz
+ find ${B}/ta -name '*.ta' | while read name; do
+ install -m 444 $name ${D}/lib/optee_armtz/
+ done
+}
+
+FILES_${PN} = "/usr/bin/ /lib*/optee_armtz/"
+
+COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
diff --git a/recipes-security/optee/optee-client-qoriq.bb b/recipes-security/optee/optee-client-qoriq.bb
index af5fc095..71ca2ecb 100644
--- a/recipes-security/optee/optee-client-qoriq.bb
+++ b/recipes-security/optee/optee-client-qoriq.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
inherit python3native systemd
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_client;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/optee_client;protocol=https;nobranch=1 \
"
S = "${WORKDIR}/git"
diff --git a/recipes-security/optee/optee-os-qoriq/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch b/recipes-security/optee/optee-os-qoriq/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
new file mode 100644
index 00000000..f9c71d0d
--- /dev/null
+++ b/recipes-security/optee/optee-os-qoriq/0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch
@@ -0,0 +1,161 @@
+From 027a3b9a33fbb23e1d1d7ed6411d4d112d2a55a1 Mon Sep 17 00:00:00 2001
+From: Andrey Zhizhikin <andrey.z@gmail.com>
+Date: Sat, 30 May 2020 22:00:59 +0000
+Subject: [PATCH] optee-os: fix gcc10 compilation issue and missing cc-options
+
+Backport PR 3891 from upstream to imx fork, which addressed compilation
+failure when GCC10 is used.
+
+Additional changes ported fixed cc-options macro, which allows to query
+compiler used if the desired option exists before it could be set. This
+solves also the build issues when GCC9 is used to build this component.
+
+Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/3891]
+
+Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com>
+---
+ core/arch/arm/arm.mk | 21 ++++++++++++++++-----
+ core/core.mk | 5 +----
+ mk/cc-option.mk | 9 +++++++++
+ mk/gcc.mk | 2 +-
+ ta/mk/ta_dev_kit.mk | 3 +++
+ ta/ta.mk | 1 +
+ 6 files changed, 31 insertions(+), 10 deletions(-)
+ create mode 100644 mk/cc-option.mk
+
+diff --git a/core/arch/arm/arm.mk b/core/arch/arm/arm.mk
+index 0a95b1ec..bfcbe896 100644
+--- a/core/arch/arm/arm.mk
++++ b/core/arch/arm/arm.mk
+@@ -1,3 +1,16 @@
++# Setup compiler for the core module
++ifeq ($(CFG_ARM64_core),y)
++arch-bits-core := 64
++else
++arch-bits-core := 32
++endif
++CROSS_COMPILE_core := $(CROSS_COMPILE$(arch-bits-core))
++COMPILER_core := $(COMPILER)
++include mk/$(COMPILER_core).mk
++
++# Defines the cc-option macro using the compiler set for the core module
++include mk/cc-option.mk
++
+ CFG_LTC_OPTEE_THREAD ?= y
+ # Size of emulated TrustZone protected SRAM, 448 kB.
+ # Only applicable when paging is enabled.
+@@ -95,7 +108,7 @@ arm32-platform-aflags-no-hard-float ?=
+
+ arm64-platform-cflags-no-hard-float ?= -mgeneral-regs-only
+ arm64-platform-cflags-hard-float ?=
+-arm64-platform-cflags-generic ?= -mstrict-align
++arm64-platform-cflags-generic := -mstrict-align $(call cc-option,-mno-outline-atomics,)
+
+ ifeq ($(DEBUG),1)
+ # For backwards compatibility
+@@ -124,14 +137,12 @@ core-platform-aflags += $(platform-aflags-generic)
+ core-platform-aflags += $(platform-aflags-debug-info)
+
+ ifeq ($(CFG_ARM64_core),y)
+-arch-bits-core := 64
+ core-platform-cppflags += $(arm64-platform-cppflags)
+ core-platform-cflags += $(arm64-platform-cflags)
+ core-platform-cflags += $(arm64-platform-cflags-generic)
+ core-platform-cflags += $(arm64-platform-cflags-no-hard-float)
+ core-platform-aflags += $(arm64-platform-aflags)
+ else
+-arch-bits-core := 32
+ core-platform-cppflags += $(arm32-platform-cppflags)
+ core-platform-cflags += $(arm32-platform-cflags)
+ core-platform-cflags += $(arm32-platform-cflags-no-hard-float)
+@@ -217,8 +228,8 @@ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE64 ?= $$(CROSS_COMPILE)_nl_
+ ta-mk-file-export-add-ta_arm64 += CROSS_COMPILE_ta_arm64 ?= $$(CROSS_COMPILE64)_nl_
+ endif
+
+-# Set cross compiler prefix for each submodule
+-$(foreach sm, core $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm)))))
++# Set cross compiler prefix for each TA target
++$(foreach sm, $(ta-targets), $(eval CROSS_COMPILE_$(sm) ?= $(CROSS_COMPILE$(arch-bits-$(sm)))))
+
+ arm32-sysreg-txt = core/arch/arm/kernel/arm32_sysreg.txt
+ arm32-sysregs-$(arm32-sysreg-txt)-h := arm32_sysreg.h
+diff --git a/core/core.mk b/core/core.mk
+index 37906792..4eec217a 100644
+--- a/core/core.mk
++++ b/core/core.mk
+@@ -8,6 +8,7 @@ arch-dir := core/arch/$(ARCH)
+ platform-dir := $(arch-dir)/plat-$(PLATFORM)
+ include $(platform-dir)/conf.mk
+ include mk/config.mk
++# $(ARCH).mk also sets the compiler for the core module
+ include core/arch/$(ARCH)/$(ARCH).mk
+
+ PLATFORM_$(PLATFORM) := y
+@@ -16,10 +17,6 @@ PLATFORM_FLAVOR_$(PLATFORM_FLAVOR) := y
+ $(call cfg-depends-all,CFG_PAGED_USER_TA,CFG_WITH_PAGER CFG_WITH_USER_TA)
+ include core/crypto.mk
+
+-# Setup compiler for this sub module
+-COMPILER_$(sm) ?= $(COMPILER)
+-include mk/$(COMPILER_$(sm)).mk
+-
+ cppflags$(sm) += -D__KERNEL__
+
+ cppflags$(sm) += -Icore/include
+diff --git a/mk/cc-option.mk b/mk/cc-option.mk
+new file mode 100644
+index 00000000..4699fbcc
+--- /dev/null
++++ b/mk/cc-option.mk
+@@ -0,0 +1,9 @@
++_cc-option-supported = $(if $(shell $(CC$(sm)) $(1) -c -x c /dev/null -o /dev/null 2>/dev/null >/dev/null || echo "Not supported"),,1)
++_cc-opt-cached-var-name = $(subst =,~,$(strip cached-cc-option-$(1)-$(subst $(empty) $(empty),,$(CC$(sm)))))
++define _cc-option
++$(eval _var_name := $(call _cc-opt-cached-var-name,$(1)))
++$(eval $(_var_name) := $(if $(filter $(origin $(_var_name)),undefined),$(call _cc-option-supported,$(1)),$($(_var_name))))
++$(if $($(_var_name)),$(1),$(2))
++endef
++cc-option = $(strip $(call _cc-option,$(1),$(2)))
++
+diff --git a/mk/gcc.mk b/mk/gcc.mk
+index c516c731..330b200a 100644
+--- a/mk/gcc.mk
++++ b/mk/gcc.mk
+@@ -12,7 +12,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
+ -print-file-name=include 2> /dev/null)
+
+ # Get location of libgcc from gcc
+-libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) $(comp-cflags$(sm)) \
++libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
+ -print-libgcc-file-name 2> /dev/null)
+
+ # Define these to something to discover accidental use
+diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk
+index 8473c6df..40e77c3e 100644
+--- a/ta/mk/ta_dev_kit.mk
++++ b/ta/mk/ta_dev_kit.mk
+@@ -86,6 +86,9 @@ clean:
+ @$(cmd-echo-silent) ' CLEAN $(O)'
+ ${q}if [ -d "$(O)" ]; then $(RMDIR) $(O); fi
+
++include $(ta-dev-kit-dir$(sm))/mk/$(COMPILER_$(sm)).mk
++include $(ta-dev-kit-dir$(sm))/mk/cc-option.mk
++
+ subdirs = .
+ include $(ta-dev-kit-dir$(sm))/mk/subdir.mk
+
+diff --git a/ta/ta.mk b/ta/ta.mk
+index 1b7e999d..e0915d18 100644
+--- a/ta/ta.mk
++++ b/ta/ta.mk
+@@ -105,6 +105,7 @@ $(foreach f, $(libfiles), \
+
+ # Copy .mk files
+ ta-mkfiles = mk/compile.mk mk/subdir.mk mk/gcc.mk mk/cleandirs.mk \
++ mk/cc-option.mk \
+ ta/arch/$(ARCH)/link.mk ta/arch/$(ARCH)/link_shlib.mk \
+ ta/mk/ta_dev_kit.mk
+
+--
+2.17.1
+
diff --git a/recipes-security/optee/optee-os-qoriq_git.bb b/recipes-security/optee/optee-os-qoriq_git.bb
index 6ffe8298..065c6093 100644
--- a/recipes-security/optee/optee-os-qoriq_git.bb
+++ b/recipes-security/optee/optee-os-qoriq_git.bb
@@ -9,10 +9,11 @@ DEPENDS = "python3-pycrypto-native"
inherit deploy python3native
SRCREV = "4e8d2e5307b99a91a0cac3ea3560ecb7d62898d6"
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/optee_os;protocol=https;nobranch=1 \
file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \
file://0001-Fix-alignment-of-data-for-mempool_alloc_pool.patch \
file://0001-use-python3-instead-of-python.patch \
+ file://0001-optee-os-fix-gcc10-compilation-issue-and-missing-cc-.patch \
"
S = "${WORKDIR}/git"
diff --git a/recipes-security/optee/optee-test-qoriq_git.bb b/recipes-security/optee/optee-test-qoriq_git.bb
index b66725c7..a1929403 100644
--- a/recipes-security/optee/optee-test-qoriq_git.bb
+++ b/recipes-security/optee/optee-test-qoriq_git.bb
@@ -8,7 +8,7 @@ DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycrypto-native"
inherit python3native
-SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \
+SRC_URI = "git://github.com/nxp-qoriq/optee_test;protocol=https;nobranch=1 \
file://0001-fix-build-failure-with-GCC-9.patch \
file://0001-use-python3-instead-of-python.patch \
"